[meld] ui.bufferselectors: Add a TODO for fixing our duplicate UI files



commit 0fa9f7e1fc95ac10aac0d81ef308b8d35470ea1e
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Nov 26 06:39:13 2017 +1000

    ui.bufferselectors: Add a TODO for fixing our duplicate UI files
    
    There's a few issues with fixing this. The first and more serious is
    that there doesn't seem to be a way to have the template of e.g.,
    FilteredListSelector used for init_template() when subclassing. The
    other issue is that I couldn't figure out a sane way to access objects
    declared outside of the initialised template scope, such as the tree
    model.

 meld/ui/bufferselectors.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/meld/ui/bufferselectors.py b/meld/ui/bufferselectors.py
index 00e8b63..e62734a 100644
--- a/meld/ui/bufferselectors.py
+++ b/meld/ui/bufferselectors.py
@@ -73,6 +73,10 @@ class SourceLangSelector(FilteredListSelector, Gtk.Grid):
             return _("Plain Text")
         return lang.get_name()
 
+
+# TODO: When there's proper pygobject support for widget templates,
+# make both selectors here use a generic UI file. We can't do this
+# currently due to subclassing issues.
 template = open(ui_file('gedit-highlight-mode-selector.ui'), 'rb').read()
 template_bytes = GLib.Bytes.new(template)
 SourceLangSelector.set_template(template_bytes)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]