[meld] ui.recentselector: Work around template initialisation issues (#343)



commit 7065f361fda628c4341970a36d22c4f0e9b24cdc
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Aug 31 09:00:44 2019 +1000

    ui.recentselector: Work around template initialisation issues (#343)
    
    This is a workaround for pygobject#341.

 meld/ui/recentselector.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/meld/ui/recentselector.py b/meld/ui/recentselector.py
index fc4e3e14..18546cd8 100644
--- a/meld/ui/recentselector.py
+++ b/meld/ui/recentselector.py
@@ -40,13 +40,13 @@ class RecentSelector(Gtk.Grid):
     search_entry = Template.Child()
     open_button = Template.Child()
 
-    def __init__(self, *args, **kwargs):
-        super().__init__(*args, **kwargs)
-        self.init_template()
 
+    def do_realize(self):
         self.filter_text = ''
         self.recent_chooser.set_filter(self.make_recent_filter())
 
+        return Gtk.Grid.do_realize(self)
+
     def custom_recent_filter_func(
             self, filter_info: Gtk.RecentFilterInfo) -> bool:
         """Filter function for Meld-specific files


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