def updateButton(self, reset=True): txt = unicode(self.form.searchEdit.lineEdit().text()).strip() d = self.mw.pm.profile[CONF_KEY_SAVED_FILTERS] for key, value in d.items(): if txt == value: self.sf_doSave = False self.sf_name = key self.form.sf_save.setIcon(icons.getQIcon("star_32.png")) return self.sf_doSave = True self.form.sf_save.setIcon(icons.getQIcon("star_off_32.png"))
def filterTree(self, root): root = self.CallbackItem(root, "My Filters", None) root.setIcon(0, QIcon(icons.getQIcon("star_dark_32.png"))) for name, filt in self.mw.pm.profile[CONF_KEY_SAVED_FILTERS].items(): item = self.CallbackItem(root, name, lambda s=filt: self.setFilter(s)) item.setIcon(0, QIcon(icons.getQIcon("star_dark_32.png")))