gtg team mailing list archive
-
gtg team
-
Mailing list archive
-
Message #02474
[Merge] lp:~gtg-user/gtg/bugfix-578444 into lp:gtg
Luca Invernizzi has proposed merging lp:~gtg-user/gtg/bugfix-578444 into lp:gtg.
Requested reviews:
Gtg developers (gtg)
--
https://code.launchpad.net/~gtg-user/gtg/bugfix-578444/+merge/26478
Your team Gtg developers is requested to review the proposed merge of lp:~gtg-user/gtg/bugfix-578444 into lp:gtg.
=== modified file 'GTG/gtg.py'
--- GTG/gtg.py 2010-05-26 09:54:42 +0000
+++ GTG/gtg.py 2010-06-01 09:48:29 +0000
@@ -143,8 +143,16 @@
# application as the user last exited it.
# Ending the application: we save configuration
- config.save_config()
- config.save_datastore(ds)
+ @contextmanager
+ def signal_ignorer():
+ #if TERM or ABORT are caught, we close the browser
+ for s in [signal.SIGABRT, signal.SIGTERM]:
+ signal.signal(s, lambda a,b: None)
+ yield
+ with signal_catcher():
+ manager.save()
+ config.save_config()
+ config.save_datastore(ds)
#=== EXECUTION ================================================================
=== modified file 'GTG/viewmanager/manager.py'
--- GTG/viewmanager/manager.py 2010-05-20 09:18:47 +0000
+++ GTG/viewmanager/manager.py 2010-06-01 09:48:29 +0000
@@ -208,6 +208,8 @@
def quit(self,sender=None):
gtk.main_quit()
+
+ def save(self):
#save opened tasks and their positions.
open_task = []
for otid in self.opened_task.keys():
Follow ups