예제 #1
0
파일: difftool.py 프로젝트: wmwong/git-cola
    def refresh_filenames(self):
        self._tree.clear()

        if self.a and self.b is None:
            filenames = gitcmds.diff_index_filenames(self.a)
        else:
            filenames = gitcmds.diff(self.diff_arg)
        if not filenames:
            return

        icon = qtutils.file_icon()
        items = []
        for filename in filenames:
            item = QtGui.QTreeWidgetItem()
            item.setIcon(0, icon)
            item.setText(0, filename)
            item.setData(0, QtCore.Qt.UserRole, QtCore.QVariant(filename))
            items.append(item)
        self._tree.addTopLevelItems(items)
예제 #2
0
 def refresh_filenames(self):
     if self.a and self.b is None:
         filenames = gitcmds.diff_index_filenames(self.a)
     else:
         filenames = gitcmds.diff(self.diff_arg)
     self.tree.set_filenames(filenames, select=True)
예제 #3
0
 def refresh_filenames(self):
     if self.a and self.b is None:
         filenames = gitcmds.diff_index_filenames(self.a)
     else:
         filenames = gitcmds.diff(self.diff_arg)
     self.tree.set_filenames(filenames, select=True)