diff options
author | samr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109> | 2008-12-14 09:11:00 +0000 |
---|---|---|
committer | samr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109> | 2008-12-14 09:11:00 +0000 |
commit | 157fac5be5f78696689af776aa0da2700dbe332b (patch) | |
tree | fa25c6e0c220586fa837a379794a19c2b82d16a0 | |
parent | 174927d999ec7256ddbf875a5308242d5a744a66 (diff) | |
download | nohands-157fac5be5f78696689af776aa0da2700dbe332b.tar.gz |
Better handle errors from setting/restoring configuration values
when closing the dialog box.
git-svn-id: http://nohands.svn.sourceforge.net/svnroot/nohands/trunk@60 126591fb-c623-4b62-a76d-97a8e4f34109
-rwxr-xr-x | data/hfconsole.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/data/hfconsole.in b/data/hfconsole.in index e27d645..847a406 100755 --- a/data/hfconsole.in +++ b/data/hfconsole.in @@ -1151,11 +1151,15 @@ class HfConsole: if hasattr(self, 'config_savecfg'): del self.config_savecfg def config_ok_clicked(self, widget): - self.config_save_vals() + try: self.config_save_vals() + except dbus.exceptions.DBusException, (ex): + self.error_message(ex.get_dbus_message()) self.config_close() def config_cancel_clicked(self, widget): # Restore the save values - self.config_restore_vals(self.config_savecfg) + try: self.config_restore_vals(self.config_savecfg) + except dbus.exceptions.DBusException, (ex): + self.error_message(ex.get_dbus_message()) self.config_close() def config_get_vals(self): spr = self.soundio_props.GetAll('net.sf.nohands.hfpd.SoundIo') |