From c80e501e284d2acd237346b5f757a1220127be9a Mon Sep 17 00:00:00 2001 From: Martin Sivak Date: Mon, 21 Apr 2008 17:24:35 +0200 Subject: Open/Save dialogs --- frontend/main.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'frontend/main.py') diff --git a/frontend/main.py b/frontend/main.py index eb2161a..c9a00c7 100644 --- a/frontend/main.py +++ b/frontend/main.py @@ -52,13 +52,18 @@ class CallbacksMainWindow(object): #menu callbacks def on_mainmenu_open_activate(self, widget, *args): print "on_mainmenu_open_activate" + d = gtk.FileChooserDialog(title="Load the configuration file", parent=self._dialog, action=gtk.FILE_CHOOSER_ACTION_OPEN, + buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) + print d.run() + d.destroy() return True def on_mainmenu_save_activate(self, widget, *args): print "on_mainmenu_save_activate" - return True - - def on_mainmenu_save_as_activate(self, widget, *args): + d = gtk.FileChooserDialog(title="Save the configuration file", parent=self._dialog, action=gtk.FILE_CHOOSER_ACTION_SAVE, + buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) + print d.run() + d.destroy() return True def on_quit_activate(self, widget, *args): -- cgit