def add_new_repo(self):
    current_repo_index = self.repo_combo_box.currentIndex()
    current_repo = self.repo_combo_box.itemData(current_repo_index)
    if current_repo:
        self.repo_combo_box.removeItem(current_repo_index)
        root_item = QtGui.QTreeWidgetItem()
        root_item.setText(0, current_repo['value'][1])
        root_item.setData(0, QtCore.Qt.UserRole, current_repo)
        self.exclude_repo_list.append(current_repo['value'][3])
        self.repos_tree_widget.addTopLevelItem(root_item)
    else:
        for i in range((self.repo_combo_box.count() - 1)):
            current_repo = self.repo_combo_box.itemData(i)
            root_item = QtGui.QTreeWidgetItem()
            root_item.setText(0, current_repo['value'][1])
            root_item.setData(0, QtCore.Qt.UserRole, current_repo)
            self.exclude_repo_list.append(current_repo['value'][3])
            self.repos_tree_widget.addTopLevelItem(root_item)
    self.fill_repo_combo_box(self.exclude_repo_list)
    self.check_save_ability()
def add_new_repo(self):
    current_repo_index = self.repo_combo_box.currentIndex()
    current_repo = self.repo_combo_box.itemData(current_repo_index)
    if current_repo:
        self.repo_combo_box.removeItem(current_repo_index)
        root_item = QtGui.QTreeWidgetItem()
        root_item.setText(0, current_repo['value'][1])
        root_item.setData(0, QtCore.Qt.UserRole, current_repo)
        self.exclude_repo_list.append(current_repo['value'][3])
        self.repos_tree_widget.addTopLevelItem(root_item)
    else:
        for i in range((self.repo_combo_box.count() - 1)):
            current_repo = self.repo_combo_box.itemData(i)
            root_item = QtGui.QTreeWidgetItem()
            root_item.setText(0, current_repo['value'][1])
            root_item.setData(0, QtCore.Qt.UserRole, current_repo)
            self.exclude_repo_list.append(current_repo['value'][3])
            self.repos_tree_widget.addTopLevelItem(root_item)
    self.fill_repo_combo_box(self.exclude_repo_list)
    self.check_save_ability()