summaryrefslogtreecommitdiffstats
path: root/frontend
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2008-04-21 17:36:18 +0200
committerMartin Sivak <msivak@redhat.com>2008-04-21 17:36:18 +0200
commite7b07ddc37735f9f6a9384438c67fe32d5ba481d (patch)
treee367a93737de4c2703781f6170865eb51c891d80 /frontend
parentc80e501e284d2acd237346b5f757a1220127be9a (diff)
downloadfirstaidkit-e7b07ddc37735f9f6a9384438c67fe32d5ba481d.tar.gz
firstaidkit-e7b07ddc37735f9f6a9384438c67fe32d5ba481d.tar.xz
firstaidkit-e7b07ddc37735f9f6a9384438c67fe32d5ba481d.zip
Make the Save function work
Diffstat (limited to 'frontend')
-rw-r--r--frontend/main.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/frontend/main.py b/frontend/main.py
index c9a00c7..a69f642 100644
--- a/frontend/main.py
+++ b/frontend/main.py
@@ -62,7 +62,16 @@ class CallbacksMainWindow(object):
print "on_mainmenu_save_activate"
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()
+ ret=d.run()
+
+ if ret==gtk.RESPONSE_ACCEPT:
+ try:
+ filename = d.get_filename()
+ fd = open(filename, "w")
+ self._cfg.write(fd)
+ except IOError, e:
+ pass
+
d.destroy()
return True