Commits

Erik Grinaker committed 1d846e1

fixed crash when doubleclicking tree with no entry selected

  • Participants
  • Parent commits 02aff16

Comments (0)

Files changed (3)

 - improved error detection during file saving
 - handle errors while loading icons [Wade Berrier]
 - scale icons with improper sizes
+- fixed crash when doubleclicking tree with no entry selected
 - password generator now always avoids ambiguous characters
 - password checker and generator follow "show passwords" preference
 - don't use passwords in default goto commands

File src/lib/ui.py

 		if data.button == 1 and data.type == gtk.gdk._2BUTTON_PRESS and path != None:
 			iter = self.model.get_iter(path[0])
 			self.toggle_expanded(iter)
-			self.emit("doubleclick", iter)
+
+			if iter != None:
+				self.emit("doubleclick", iter)
 
 		# display popup on right-click
 		elif data.button == 3:

File src/revelation.in

 		return True
 
 
-	def __cb_tree_doubleclick(self, widget, data = None):
+	def __cb_tree_doubleclick(self, widget, iter):
 		"Handles doubleclicks on the tree"
 
+		print iter
+
 		if self.config.get("behavior/doubleclick") == "edit":
-			self.entry_edit(self.tree.get_active())
+			self.entry_edit(iter)
 
 		elif self.config.get("behavior/doubleclick") == "copy":
-			self.clip_chain(self.entrystore.get_entry(self.tree.get_active()))
+			self.clip_chain(self.entrystore.get_entry(iter))
 
 		else:
-			self.entry_goto((self.tree.get_active(),))
+			self.entry_goto((iter,))
 
 
 	def __cb_tree_drag_received(self, tree, context, x, y, seldata, info, time):