Source

silk / silk.py

Diff from to

File silk.py

         window_size = (800, 640),
     )
 
-    def __init__(self, *args, **kwargs):
+    def __init__(self, config=None, *args, **kwargs):
         super(MainWindow, self).__init__(*args, **kwargs)
 
+        if config is not None:
+            self.config.update(config)
+
         self.set_default_size(*self.config.window_size)
 
         self._scrolled = Gtk.ScrolledWindow()
     if os.path.exists(opt.config_file):
         execfile(opt.config_file, user_config)
 
-    w = MainWindow()
-    w.config.update(user_config)
-
+    w = MainWindow(config=user_config)
     w.show_all()
-
     w.open(*args)
 
     Gtk.main()