Example #1
0
    def search(self, widget, data=None):
        dlg = search_dialog(self.gld.get_widget("main_win"), self.icon)
        if dlg.run() == RESPONSE_ACCEPT:
            keywords = dlg.entry.get_text()
        dlg.destroy()

        pacs = self.database.get_by_keywords(keywords)
        
        repos_model = self.gld.get_widget("repos_tree").get_model()
        if self.search_iter:
            repos_model.remove(self.search_iter)
        self.search_iter = repos_model.append(None, [_("Search results for '%s'") %keywords])
        self.models["search"] = search_list(pacs)
Example #2
0
	def _fork():	    
	    repos_tree = self.gld.get_widget("repos_tree")
	    repos_model = repos_tree.get_model()
	    
	    pacs = self.database.get_by_keywords(keywords)	    
	    if self.search_iter:
		repos_model.remove(self.search_iter)
	    self.search_iter = repos_model.append(None, [_("Search results for '%s'") %keywords])
	    self.models["search"] = search_list(pacs)
	    repos_tree.set_cursor_on_cell((1))
	    
	    dlg.destroy()
	    win.window.set_cursor(None)