Greetings,
   my gnome-panel is quite full and while the revelation applet suits my
needs well, the search entry is not necessary for me. So I added code to
switch it off in the preferences.

best regards,

mfg
--- /usr/share/revelation/libexec/revelation-applet	2005-11-29 03:07:24.000000000 +0100
+++ revelation-applet	2006-01-17 18:25:53.000000000 +0100
@@ -39,8 +39,6 @@
 
 from revelation import config, data, datahandler, dialog, entry, gnomemisc, io, ui, util
 
-
-
 class RevelationApplet(object):
 	"Revelation applet"
 
@@ -77,7 +75,8 @@
 			"chain_username"	: False,
 			"file"			: "",
 			"menuaction"		: "show",
-			"show_passwords"	: True
+			"show_passwords"	: True,
+			"show_search_entry"	: False,
 		}
 
 		for key, value in defaults.items():
@@ -181,6 +180,9 @@
 		self.eventbox.connect("button_press_event", self.__cb_icon_buttonpress)
 
 		self.hbox = ui.HBox(self.eventbox, self.entry)
+		self.hbox.pack_start(self.entry)
+		self.config.monitor("show_search_entry", self.__cb_show_search_entry)
+                
 		self.applet.add(self.hbox)
 
 		# set up various ui element holders
@@ -307,7 +309,12 @@
 		else:
 			self.entry_show(data)
 
+	def __cb_show_search_entry(self, key, value, data):
 
+		if value:
+			self.entry.show()
+		else:
+			self.entry.hide()
 
 	##### PRIVATE METHODS #####
 
@@ -737,6 +744,7 @@
 
 		self.page_general = self.notebook.create_page("General")
 		self.__init_section_file(self.page_general)
+		self.__init_section_search(self.page_general)
 		self.__init_section_menuaction(self.page_general)
 		self.__init_section_misc(self.page_general)
 
@@ -745,6 +753,10 @@
 
 		self.connect("response", lambda w,d: self.destroy())
 
+     
+
+
+
 
 	def __init_section_file(self, page):
 		"Sets up a file section in a page"
@@ -808,6 +820,18 @@
 			self.tooltips.set_tip(widget, tooltip)
 			self.section_goto.append_widget(e.typename, widget)
 
+	def __init_section_search(self, page):
+		"Sets up a search section in a page"
+
+		self.section_search = page.add_section("Search")
+		self.check_show_search_entry = ui.CheckButton("Show search entry in applet")
+		ui.config_bind(self.config, "show_search_entry", self.check_show_search_entry)
+
+		self.tooltips.set_tip(self.check_show_search_entry, "Display a search entry in the applet, which takes up space but makes navigating large collections of passwords easier")
+		self.section_search.append_widget(None, self.check_show_search_entry)
+
+
+
 
 	def __init_section_menuaction(self, page):
 		"Sets up a menuaction section in a page"

Reply via email to