Instantiate the Menu and Toolbar objects before trying to connect to a database using the --logbook command-line option.

pull/17/head
Christian Jacobs 2013-05-31 18:32:16 +01:00
rodzic 974b65a9ca
commit 572445bf4d
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -67,8 +67,6 @@ class PyQSO(Gtk.Window):
# once connected to the SQLite database.
self.logbook = Logbook(self)
self.logbook.set_scrollable(True)
if(logbook_path is not None):
self.logbook.db_connect(path=logbook_path)
# Set up menu and tool bars
# These classes depend on the Logbook class,
@ -76,6 +74,9 @@ class PyQSO(Gtk.Window):
self.menu = Menu(self)
self.toolbar = Toolbar(self)
if(logbook_path is not None):
self.logbook.db_connect(path=logbook_path)
vbox_outer.pack_start(self.menu, False, False, 0)
vbox_outer.pack_start(self.toolbar, False, False, 0)
vbox_outer.pack_start(self.logbook, True, True, 0)