summaryrefslogtreecommitdiff
path: root/gtk-recordmydesktop/src/rmdSimple.py
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-11-16 19:41:36 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-11-16 19:41:36 +0000
commit5d0d1dd3d86d75b0e44c6f62a06a27e147c68594 (patch)
tree4de2f8cbd8a228bce2ab36d27b7f3f700a85f49d /gtk-recordmydesktop/src/rmdSimple.py
parent575d85d8c50e1f5700bfbc519eaa7fe92903e36f (diff)
added stubs for save-load preferences, made sure __exit__ is called only once
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@177 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'gtk-recordmydesktop/src/rmdSimple.py')
-rw-r--r--gtk-recordmydesktop/src/rmdSimple.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/gtk-recordmydesktop/src/rmdSimple.py b/gtk-recordmydesktop/src/rmdSimple.py
index 6164647..0bf7c21 100644
--- a/gtk-recordmydesktop/src/rmdSimple.py
+++ b/gtk-recordmydesktop/src/rmdSimple.py
@@ -169,10 +169,14 @@ class simpleWidget(object):
self.tooltips.set_tip(self.advanced_button,self.tooltipLabels[7])
def __exit__(self,Event=None):
- gtk.main_quit()
- self.values[0]=-1
- self.optionsOpen[0]=0
- self.window.destroy()
+ if self.exited==0:
+ self.exited=1
+ gtk.main_quit()
+ self.values[0]=-1
+ self.optionsOpen[0]=0
+ self.window.destroy()
+ if self.save_prefs()==False:
+ print "Warning!!!Couldn't save preferences"
def hide(self,Event=None):
self.window.hide()
self.hidden[0]=1
@@ -251,10 +255,17 @@ class simpleWidget(object):
def update(self) :
self.values[10]=int((self.v_quality.get_value()*63)/100)
self.values[11]=int(self.v_quality.get_value()/10)
+ def load_prefs(self):
+
+ return False
+ def save_prefs(self):
+ return False
def __init__(self):
- self.values= rmdConfig.default_values
+ if self.load_prefs()==False:
+ self.values= rmdConfig.default_values
self.optionsOpen=[0]
+ self.exited=0
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("destroy", self.__exit__)
self.window.set_border_width(10)
© All Rights Reserved