def get_query(self): query = [] search_key = "name" search_match = "contains" search_text = self.__entry.get_text() if search_text: for t in string.split(search_text): query.append([search_key, search_match, t]) query.insert(0, ["", "begin-or", ""]) query.append(["", "end-or", ""]) status_filter = self.__status_filter() if status_filter: query.append(status_filter) channel_id = self.__channel_opt.get_channel_id() if red_channeloption.is_valid_channel(channel_id): channel = rcd_util.get_channel(channel_id) query.append(["catalog", "is", channel.get("name")]) return query
def get_query(self): query = [] search_key = "name" search_match = "contains" search_text = self.__entry.get_text() if search_text: for t in string.split(search_text): query.append([search_key, search_match, t]) query.insert(0, ["", "begin-or", ""]) query.append(["", "end-or", ""]) status_filter = self.__status_filter() if status_filter: query.append(status_filter) channel_id = self.__channel_opt.get_channel_id() if red_channeloption.is_valid_channel(channel_id): channel = rcd_util.get_channel(channel_id) query.append(["catalog", "is", channel.get("name")]) return query
def get_channel(self): h = self.get_history() if h < 0: return None id = self.item_id_list[h] return rcd_util.get_channel(id)
def get_channel(self): h = self.get_history() if h < 0: return None id = self.item_id_list[h] return rcd_util.get_channel(id)
def refresh(self): # We need to go through and delete packages in the pending actions # if they were going to be installed from a channel which no longer # exists. actions = (red_pendingops.TO_BE_INSTALLED, red_pendingops.TO_BE_INSTALLED_CANCELLED) for pkg in red_pendingops.packages_with_actions(*actions): if not rcd_util.get_channel(pkg.get("channel", "")): red_pendingops.set_action(pkg, red_pendingops.NO_ACTION) self.changed(lambda x: x) # noop