# Path: meld/ui/util.py
# def map_widgets_into_lists(widget, widgetnames):
#     """Put sequentially numbered widgets into lists.
# 
#     Given an object with widgets self.button0, self.button1, ...,
#     after a call to object.map_widgets_into_lists(["button"])
#     object.button == [self.button0, self.button1, ...]
#     """
#     for item in widgetnames:
#         i, lst = 0, []
#         while 1:
#             key = "%s%i" % (item, i)
#             try:
#                 val = getattr(widget, key)
#             except AttributeError:
#                 if i == 0:
#                     log.critical(
#                         f"Tried to map missing attribute {key}")
#                 break
#             lst.append(val)
#             i += 1
#         setattr(widget, item, lst)


import enum
from gi.repository import Gio, GLib, GObject, Gtk
from meld.conf import _
from meld.melddoc import LabeledObjectMixin, MeldDoc
from meld.recent import recent_comparisons
from meld.ui.util import map_widgets_into_lists
# Copyright (C) 2011-2013 Kai Willadsen <kai.willadsen@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.





class DiffType(enum.IntEnum):
    # TODO: This should probably live in MeldWindow
    Unselected = -1
    File = 0

# Path: meld/ui/util.py
# def map_widgets_into_lists(widget, widgetnames):
#     """Put sequentially numbered widgets into lists.
# 
#     Given an object with widgets self.button0, self.button1, ...,
#     after a call to object.map_widgets_into_lists(["button"])
#     object.button == [self.button0, self.button1, ...]
#     """
#     for item in widgetnames:
#         i, lst = 0, []
#         while 1:
#             key = "%s%i" % (item, i)
#             try:
#                 val = getattr(widget, key)
#             except AttributeError:
#                 if i == 0:
#                     log.critical(
#                         f"Tried to map missing attribute {key}")
#                 break
#             lst.append(val)
#             i += 1
#         setattr(widget, item, lst)


# Path: meld/newdifftab.py
import enum
from gi.repository import Gio, GLib, GObject, Gtk
from meld.conf import _
from meld.melddoc import LabeledObjectMixin, MeldDoc
from meld.recent import recent_comparisons
from meld.ui.util import map_widgets_into_lists

# Copyright (C) 2011-2013 Kai Willadsen <kai.willadsen@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.





class DiffType(enum.IntEnum):
    # TODO: This should probably live in MeldWindow
    Unselected = -1
    File = 0

    Folder = 1