Commits

Erik Grinaker committed 72bff88

stop autolock-timer when manually locking file, to avoid crash when timer tries to re-lock file

Comments (0)

Files changed (5)

 	cracklib-packer commands as well as the old mkdict and
 	packer commands
 
+	* stop autolock-timer when manually locking file, to avoid
+	crash when timer tries to re-lock file
+
 2005-03-22  Erik Grinaker <erikg@codepoet.no>
 
 	* added quit button to unlock file dialog
 Bugfixes:
 - make configure search for new cracklib-format and cracklib-packer
   commands as well as the old mkdict and packer commands
+- stop autolock-timer when manually locking file, to avoid crash when
+  timer tries to re-lock file
 
 
 2005-03-22: Revelation 0.4.2
   - show complete account tree as a popup-submenu of the applet
   - make library modules more independent, so only a few are imported
 - run unit tests on built libraries instead of installed ones
-- remove the small "holes" on the sides of the file icon
-- disable file autolocking when file is already locked manually
-  (causes crash)
 
 0.5.x:
 - ensure complete UTF-8 support
 class Timer(gobject.GObject):
 	"Handles timeouts etc"
 
-	def __init__(self, resolution = 5):
+	def __init__(self, resolution = 1):
 		gobject.GObject.__init__(self)
 
 		self.offset		= None

src/revelation.in

 		self.entrystore		= data.EntryStore()
 		self.entrysearch	= data.EntrySearch(self.entrystore)
 		self.items		= ui.ItemFactory(self)
-		self.locktimer		= ui.Timer(1)
+		self.locktimer		= ui.Timer()
 		self.sessionclient	= gnome.ui.master_client()
 		self.undoqueue		= data.UndoQueue()
 
 		"Callback for locking the file"
 
 		if self.config.get("file/autolock") == True:
-			self.locktimer.stop()
 			self.file_lock()
-			self.locktimer.start(self.config.get("file/autolock_timeout") * 60)
 
 
 	def __cb_quit(self, widget, data = None):
 		if password is None:
 			return
 
+		self.locktimer.stop()
+
 		# TODO can this be done more elegantly?
 		transients = [ window for window in gtk.window_list_toplevels() if window.get_transient_for() == self ]
 
 		for window in transients:
 			window.show()
 
+		self.locktimer.start(self.config.get("file/autolock_timeout") * 60)
+
 
 	def file_new(self):
 		"Opens a new file"