Commits

Yuki KODAMA committed faff6f8

gdialog: fix call timing of load_settings()

To reflect loaded settings for dialog size, load_settings()
function must be called before calling of set_default_size()
function.

This issue was introduced at 0f13d266f5ab.

Comments (0)

Files changed (1)

tortoisehg/hgtk/gdialog.py

         name = self.get_setting_name()
         if name:
             self.settings = settings.Settings(name)
-            self.load_settings()
-
-        # dialog size
-        defsize = self.get_defsize()
-        if defsize != (-1, -1):
-            self.set_default_size(*defsize)
 
         # signal handler
         self.connect('realize', self.realized)
             gtklib.idle_add_single_call(self.destroy)
             return
 
+        # load persistent settings
+        self.load_settings()
+
+        # dialog size
+        defsize = self.get_defsize()
+        if defsize != (-1, -1):
+            self.set_default_size(*defsize)
+
         # signal handler
         self.connect('response', self.dialog_response)