Index: channels/search.py ================================================================== --- channels/search.py +++ channels/search.py @@ -32,10 +32,24 @@ class search (AuxiliaryWindow): # either current channel, or last channel (avoid searching in bookmarks) current = None + # button + hook + def __init__(self, parent): + AuxiliaryWindow.__init__(self, parent) + parent.searchbtn.connect("clicked", self.menu_search) + self.show_searchbtn() + parent.hooks["config_save"].append(self.show_searchbtn) + + def show_searchbtn(self): + active = "searchbtn" in conf and conf.searchbtn + btn = self.main.searchbtn + btn.show() + btn.set_property("visible", active) + btn.set_property("visible_horizontal", active) + # show search dialog def menu_search(self, w): self.search_dialog.show_all(); # Update (x) current_channel checkbox if not self.current or self.main.current_channel != "bookmarks": Index: config.py ================================================================== --- config.py +++ config.py @@ -154,10 +154,11 @@ self.google_homepage = 0 self.open_mode = "r" if self.windows and PY2 else "rt" self.pyquery = 1 self.debug = 0 self.status_color = "#ffeecc" + self.searchbtn = 0 # update old setting names def migrate(self): # 2.1.7 if self.tmp == "/tmp":