[kupfer: 2/53] ui: Add Reset All to the context menu



commit 192262fbc3ef9fe3bb804edcd9ef1360b391269b
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Mar 24 17:22:32 2011 +0100

    ui: Add Reset All to the context menu

 kupfer/ui/browser.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index 0d269ba..41f27fd 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -1176,6 +1176,7 @@ class Interface (gobject.GObject):
 		self.switch_to_source()
 		while self._browse_up():
 			pass
+		self.toggle_text_mode(False)
 		self.data_controller.object_stack_clear_all()
 		self.reset_current()
 		self.reset()
@@ -1383,13 +1384,15 @@ class Interface (gobject.GObject):
 			# TRANS: Remember = Make the action '%s' default
 			yield (_('Remember "%s" for this Object') % unicode(match),
 			       self.mark_as_default)
-		if self.search.get_match_state() == State.Match:
+		if has_match:
 			if self.data_controller.get_object_has_affinity(data.SourcePane):
 				match = self.search.get_current()
 				# TRANS: Affinity= learned and/or configured bonus rank
 				# TRANS: when matching it in search
 				yield (_('Forget Affinity for "%s"') % unicode(match),
 				       self.erase_affinity_for_first_pane)
+		if has_match:
+			yield (_("Reset All"), self.reset_all)
 
 	def _pane_reset(self, controller, pane, item):
 		wid = self._widget_for_pane(pane)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]