本文整理汇总了Python中cola.widgets.status.StatusWidget类的典型用法代码示例。如果您正苦于以下问题:Python StatusWidget类的具体用法?Python StatusWidget怎么用?Python StatusWidget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StatusWidget类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, model, parent=None, settings=None):
MainWindow.__init__(self, parent)
self.setAttribute(Qt.WA_MacMetalStyle)
# Default size; this is thrown out when save/restore is used
self.model = model
self.settings = settings
self.prefs_model = prefs_model = prefs.PreferencesModel()
# The widget version is used by import/export_state().
# Change this whenever dockwidgets are removed.
self.widget_version = 2
# Keeps track of merge messages we've seen
self.merge_message_hash = ''
# Runs asynchronous tasks
self.task_runner = TaskRunner(self)
self.progress = ProgressDialog('', '', self)
cfg = gitcfg.current()
self.browser_dockable = (cfg.get('cola.browserdockable') or
cfg.get('cola.classicdockable'))
if self.browser_dockable:
self.browserdockwidget = create_dock(N_('Browser'), self)
self.browserwidget = worktree_browser_widget(self)
self.browserdockwidget.setWidget(self.browserwidget)
# "Actions" widget
self.actionsdockwidget = create_dock(N_('Actions'), self)
self.actionsdockwidgetcontents = action.ActionButtons(self)
self.actionsdockwidget.setWidget(self.actionsdockwidgetcontents)
self.actionsdockwidget.toggleViewAction().setChecked(False)
self.actionsdockwidget.hide()
# "Repository Status" widget
self.statusdockwidget = create_dock(N_('Status'), self)
self.statuswidget = StatusWidget(self.statusdockwidget.titleBarWidget(),
parent=self.statusdockwidget)
self.statusdockwidget.setWidget(self.statuswidget)
# "Switch Repository" widgets
self.bookmarksdockwidget = create_dock(N_('Bookmarks'), self)
self.bookmarkswidget = bookmarks.BookmarksWidget(
bookmarks.BOOKMARKS, parent=self.bookmarksdockwidget)
self.bookmarksdockwidget.setWidget(self.bookmarkswidget)
self.recentdockwidget = create_dock(N_('Recent'), self)
self.recentwidget = bookmarks.BookmarksWidget(
bookmarks.RECENT_REPOS, parent=self.recentdockwidget)
self.recentdockwidget.setWidget(self.recentwidget)
self.recentdockwidget.hide()
# "Commit Message Editor" widget
self.position_label = QtGui.QLabel()
font = qtutils.default_monospace_font()
font.setPointSize(int(font.pointSize() * 0.8))
self.position_label.setFont(font)
# make the position label fixed size to avoid layout issues
fm = self.position_label.fontMetrics()
width = fm.width('999:999')
height = self.position_label.sizeHint().height()
self.position_label.setFixedSize(width, height)
self.commitdockwidget = create_dock(N_('Commit'), self)
titlebar = self.commitdockwidget.titleBarWidget()
titlebar.add_corner_widget(self.position_label)
self.commitmsgeditor = CommitMessageEditor(model, self)
self.commitdockwidget.setWidget(self.commitmsgeditor)
# "Console" widget
self.logwidget = LogWidget()
self.logdockwidget = create_dock(N_('Console'), self)
self.logdockwidget.setWidget(self.logwidget)
self.logdockwidget.toggleViewAction().setChecked(False)
self.logdockwidget.hide()
# "Diff Viewer" widget
self.diffdockwidget = create_dock(N_('Diff'), self)
self.diffeditorwidget = DiffEditorWidget(self.diffdockwidget)
self.diffeditor = self.diffeditorwidget.editor
self.diffdockwidget.setWidget(self.diffeditorwidget)
# All Actions
self.unstage_all_action = add_action(self,
N_('Unstage All'), cmds.run(cmds.UnstageAll))
self.unstage_all_action.setIcon(qtutils.icon('remove.svg'))
self.unstage_selected_action = add_action(self,
N_('Unstage From Commit'), cmds.run(cmds.UnstageSelected))
self.unstage_selected_action.setIcon(qtutils.icon('remove.svg'))
self.show_diffstat_action = add_action(self,
N_('Diffstat'), cmds.run(cmds.Diffstat), 'Alt+D')
self.stage_modified_action = add_action(self,
N_('Stage Changed Files To Commit'),
cmds.run(cmds.StageModified), 'Alt+A')
#.........这里部分代码省略.........
示例2: MainView
class MainView(MainWindow):
def __init__(self, model, parent=None, settings=None):
MainWindow.__init__(self, parent)
self.setAttribute(Qt.WA_MacMetalStyle)
# Default size; this is thrown out when save/restore is used
self.model = model
self.settings = settings
self.prefs_model = prefs_model = prefs.PreferencesModel()
# The widget version is used by import/export_state().
# Change this whenever dockwidgets are removed.
self.widget_version = 2
# Keeps track of merge messages we've seen
self.merge_message_hash = ''
# Runs asynchronous tasks
self.task_runner = TaskRunner(self)
self.progress = ProgressDialog('', '', self)
cfg = gitcfg.current()
self.browser_dockable = (cfg.get('cola.browserdockable') or
cfg.get('cola.classicdockable'))
if self.browser_dockable:
self.browserdockwidget = create_dock(N_('Browser'), self)
self.browserwidget = worktree_browser_widget(self)
self.browserdockwidget.setWidget(self.browserwidget)
# "Actions" widget
self.actionsdockwidget = create_dock(N_('Actions'), self)
self.actionsdockwidgetcontents = action.ActionButtons(self)
self.actionsdockwidget.setWidget(self.actionsdockwidgetcontents)
self.actionsdockwidget.toggleViewAction().setChecked(False)
self.actionsdockwidget.hide()
# "Repository Status" widget
self.statusdockwidget = create_dock(N_('Status'), self)
self.statuswidget = StatusWidget(self.statusdockwidget.titleBarWidget(),
parent=self.statusdockwidget)
self.statusdockwidget.setWidget(self.statuswidget)
# "Switch Repository" widgets
self.bookmarksdockwidget = create_dock(N_('Bookmarks'), self)
self.bookmarkswidget = bookmarks.BookmarksWidget(
bookmarks.BOOKMARKS, parent=self.bookmarksdockwidget)
self.bookmarksdockwidget.setWidget(self.bookmarkswidget)
self.recentdockwidget = create_dock(N_('Recent'), self)
self.recentwidget = bookmarks.BookmarksWidget(
bookmarks.RECENT_REPOS, parent=self.recentdockwidget)
self.recentdockwidget.setWidget(self.recentwidget)
self.recentdockwidget.hide()
# "Commit Message Editor" widget
self.position_label = QtGui.QLabel()
font = qtutils.default_monospace_font()
font.setPointSize(int(font.pointSize() * 0.8))
self.position_label.setFont(font)
# make the position label fixed size to avoid layout issues
fm = self.position_label.fontMetrics()
width = fm.width('999:999')
height = self.position_label.sizeHint().height()
self.position_label.setFixedSize(width, height)
self.commitdockwidget = create_dock(N_('Commit'), self)
titlebar = self.commitdockwidget.titleBarWidget()
titlebar.add_corner_widget(self.position_label)
self.commitmsgeditor = CommitMessageEditor(model, self)
self.commitdockwidget.setWidget(self.commitmsgeditor)
# "Console" widget
self.logwidget = LogWidget()
self.logdockwidget = create_dock(N_('Console'), self)
self.logdockwidget.setWidget(self.logwidget)
self.logdockwidget.toggleViewAction().setChecked(False)
self.logdockwidget.hide()
# "Diff Viewer" widget
self.diffdockwidget = create_dock(N_('Diff'), self)
self.diffeditorwidget = DiffEditorWidget(self.diffdockwidget)
self.diffeditor = self.diffeditorwidget.editor
self.diffdockwidget.setWidget(self.diffeditorwidget)
# All Actions
self.unstage_all_action = add_action(self,
N_('Unstage All'), cmds.run(cmds.UnstageAll))
self.unstage_all_action.setIcon(qtutils.icon('remove.svg'))
self.unstage_selected_action = add_action(self,
N_('Unstage From Commit'), cmds.run(cmds.UnstageSelected))
self.unstage_selected_action.setIcon(qtutils.icon('remove.svg'))
self.show_diffstat_action = add_action(self,
N_('Diffstat'), cmds.run(cmds.Diffstat), 'Alt+D')
self.stage_modified_action = add_action(self,
#.........这里部分代码省略.........
示例3: __init__
def __init__(self, model, parent=None):
MainWindow.__init__(self, parent)
# Default size; this is thrown out when save/restore is used
self.resize(987, 610)
self.model = model
self.prefs_model = prefs_model = prefs.PreferencesModel()
# The widget version is used by import/export_state().
# Change this whenever dockwidgets are removed.
self.widget_version = 2
# Keeps track of merge messages we've seen
self.merge_message_hash = ''
self.setAcceptDrops(True)
self.setAttribute(Qt.WA_MacMetalStyle)
cfg = gitcfg.instance()
self.browser_dockable = (cfg.get('cola.browserdockable') or
cfg.get('cola.classicdockable'))
if self.browser_dockable:
self.browserdockwidget = create_dock(N_('Browser'), self)
self.browserwidget = worktree_browser_widget(self)
self.browserdockwidget.setWidget(self.browserwidget)
# "Actions" widget
self.actionsdockwidget = create_dock(N_('Actions'), self)
self.actionsdockwidgetcontents = action.ActionButtons(self)
self.actionsdockwidget.setWidget(self.actionsdockwidgetcontents)
self.actionsdockwidget.toggleViewAction().setChecked(False)
self.actionsdockwidget.hide()
# "Repository Status" widget
self.statuswidget = StatusWidget(self)
self.statusdockwidget = create_dock(N_('Status'), self)
self.statusdockwidget.setWidget(self.statuswidget)
# "Commit Message Editor" widget
self.position_label = QtGui.QLabel()
font = qtutils.default_monospace_font()
font.setPointSize(int(font.pointSize() * 0.8))
self.position_label.setFont(font)
self.commitdockwidget = create_dock(N_('Commit'), self)
titlebar = self.commitdockwidget.titleBarWidget()
titlebar.add_corner_widget(self.position_label)
self.commitmsgeditor = CommitMessageEditor(model, self)
self.commitdockwidget.setWidget(self.commitmsgeditor)
# "Console" widget
self.logwidget = LogWidget()
self.logdockwidget = create_dock(N_('Console'), self)
self.logdockwidget.setWidget(self.logwidget)
self.logdockwidget.toggleViewAction().setChecked(False)
self.logdockwidget.hide()
# "Diff Viewer" widget
self.diffdockwidget = create_dock(N_('Diff'), self)
self.diffeditor = DiffEditor(self.diffdockwidget)
self.diffdockwidget.setWidget(self.diffeditor)
# "Diff Options" tool menu
self.diff_ignore_space_at_eol_action = add_action(self,
N_('Ignore changes in whitespace at EOL'),
self._update_diff_opts)
self.diff_ignore_space_at_eol_action.setCheckable(True)
self.diff_ignore_space_change_action = add_action(self,
N_('Ignore changes in amount of whitespace'),
self._update_diff_opts)
self.diff_ignore_space_change_action.setCheckable(True)
self.diff_ignore_all_space_action = add_action(self,
N_('Ignore all whitespace'),
self._update_diff_opts)
self.diff_ignore_all_space_action.setCheckable(True)
self.diff_function_context_action = add_action(self,
N_('Show whole surrounding functions of changes'),
self._update_diff_opts)
self.diff_function_context_action.setCheckable(True)
self.diffopts_button = create_toolbutton(text=N_('Options'),
icon=options_icon(),
tooltip=N_('Diff Options'))
self.diffopts_menu = create_menu(N_('Diff Options'),
self.diffopts_button)
self.diffopts_menu.addAction(self.diff_ignore_space_at_eol_action)
self.diffopts_menu.addAction(self.diff_ignore_space_change_action)
self.diffopts_menu.addAction(self.diff_ignore_all_space_action)
self.diffopts_menu.addAction(self.diff_function_context_action)
self.diffopts_button.setMenu(self.diffopts_menu)
self.diffopts_button.setPopupMode(QtGui.QToolButton.InstantPopup)
titlebar = self.diffdockwidget.titleBarWidget()
titlebar.add_corner_widget(self.diffopts_button)
# All Actions
self.menu_unstage_all = add_action(self,
#.........这里部分代码省略.........
示例4: MainView
class MainView(MainWindow):
def __init__(self, model, parent):
MainWindow.__init__(self, parent)
# Default size; this is thrown out when save/restore is used
self.resize(987, 610)
self.model = model
self.prefs_model = prefs_model = prefs.PreferencesModel()
# Internal field used by import/export_state().
# Change this whenever dockwidgets are removed.
self.widget_version = 2
# Keeps track of merge messages we've seen
self.merge_message_hash = ''
self.setAcceptDrops(True)
self.setAttribute(Qt.WA_MacMetalStyle)
# Dockwidget options
qtcompat.set_common_dock_options(self)
cfg = gitcfg.instance()
self.classic_dockable = (cfg.get('cola.browserdockable') or
cfg.get('cola.classicdockable'))
if self.classic_dockable:
self.classicdockwidget = create_dock(N_('Browser'), self)
self.classicwidget = classic_widget(self)
self.classicdockwidget.setWidget(self.classicwidget)
# "Actions" widget
self.actionsdockwidget = create_dock(N_('Action'), self)
self.actionsdockwidgetcontents = action.ActionButtons(self)
self.actionsdockwidget.setWidget(self.actionsdockwidgetcontents)
self.actionsdockwidget.toggleViewAction().setChecked(False)
self.actionsdockwidget.hide()
# "Repository Status" widget
self.statuswidget = StatusWidget(self)
self.statusdockwidget = create_dock(N_('Status'), self)
self.statusdockwidget.setWidget(self.statuswidget)
# "Commit Message Editor" widget
self.position_label = QtGui.QLabel()
font = qtutils.default_monospace_font()
font.setPointSize(int(font.pointSize() * 0.8))
self.position_label.setFont(font)
self.commitdockwidget = create_dock(N_('Commit'), self)
titlebar = self.commitdockwidget.titleBarWidget()
titlebar.add_corner_widget(self.position_label)
self.commitmsgeditor = CommitMessageEditor(model, self)
self.commitdockwidget.setWidget(self.commitmsgeditor)
# "Console" widget
self.logwidget = LogWidget()
self.logdockwidget = create_dock(N_('Console'), self)
self.logdockwidget.setWidget(self.logwidget)
self.logdockwidget.toggleViewAction().setChecked(False)
self.logdockwidget.hide()
# "Diff Viewer" widget
self.diffdockwidget = create_dock(N_('Diff'), self)
self.diffeditor = DiffEditor(self.diffdockwidget)
self.diffdockwidget.setWidget(self.diffeditor)
# "Diff Options" tool menu
self.diff_ignore_space_at_eol_action = add_action(self,
N_('Ignore changes in whitespace at EOL'),
self._update_diff_opts)
self.diff_ignore_space_at_eol_action.setCheckable(True)
self.diff_ignore_space_change_action = add_action(self,
N_('Ignore changes in amount of whitespace'),
self._update_diff_opts)
self.diff_ignore_space_change_action.setCheckable(True)
self.diff_ignore_all_space_action = add_action(self,
N_('Ignore all whitespace'),
self._update_diff_opts)
self.diff_ignore_all_space_action.setCheckable(True)
self.diff_function_context_action = add_action(self,
N_('Show whole surrounding functions of changes'),
self._update_diff_opts)
self.diff_function_context_action.setCheckable(True)
self.diffopts_button = create_toolbutton(text=N_('Options'),
icon=options_icon(),
tooltip=N_('Diff Options'))
self.diffopts_menu = create_menu(N_('Diff Options'),
self.diffopts_button)
self.diffopts_menu.addAction(self.diff_ignore_space_at_eol_action)
self.diffopts_menu.addAction(self.diff_ignore_space_change_action)
self.diffopts_menu.addAction(self.diff_ignore_all_space_action)
self.diffopts_menu.addAction(self.diff_function_context_action)
self.diffopts_button.setMenu(self.diffopts_menu)
self.diffopts_button.setPopupMode(QtGui.QToolButton.InstantPopup)
titlebar = self.diffdockwidget.titleBarWidget()
#.........这里部分代码省略.........
示例5: __init__
def __init__(self, model, parent=None):
MainWindow.__init__(self, parent)
self.setAttribute(Qt.WA_MacMetalStyle)
# Default size; this is thrown out when save/restore is used
self.resize(987, 610)
self.model = model
self.prefs_model = prefs_model = prefs.PreferencesModel()
# The widget version is used by import/export_state().
# Change this whenever dockwidgets are removed.
self.widget_version = 2
# Keeps track of merge messages we've seen
self.merge_message_hash = ""
cfg = gitcfg.instance()
self.browser_dockable = cfg.get("cola.browserdockable") or cfg.get("cola.classicdockable")
if self.browser_dockable:
self.browserdockwidget = create_dock(N_("Browser"), self)
self.browserwidget = worktree_browser_widget(self)
self.browserdockwidget.setWidget(self.browserwidget)
# "Actions" widget
self.actionsdockwidget = create_dock(N_("Actions"), self)
self.actionsdockwidgetcontents = action.ActionButtons(self)
self.actionsdockwidget.setWidget(self.actionsdockwidgetcontents)
self.actionsdockwidget.toggleViewAction().setChecked(False)
self.actionsdockwidget.hide()
# "Repository Status" widget
self.statuswidget = StatusWidget(self)
self.statusdockwidget = create_dock(N_("Status"), self)
self.statusdockwidget.setWidget(self.statuswidget)
# "Commit Message Editor" widget
self.position_label = QtGui.QLabel()
font = qtutils.default_monospace_font()
font.setPointSize(int(font.pointSize() * 0.8))
self.position_label.setFont(font)
self.commitdockwidget = create_dock(N_("Commit"), self)
titlebar = self.commitdockwidget.titleBarWidget()
titlebar.add_corner_widget(self.position_label)
self.commitmsgeditor = CommitMessageEditor(model, self)
self.commitdockwidget.setWidget(self.commitmsgeditor)
# "Console" widget
self.logwidget = LogWidget()
self.logdockwidget = create_dock(N_("Console"), self)
self.logdockwidget.setWidget(self.logwidget)
self.logdockwidget.toggleViewAction().setChecked(False)
self.logdockwidget.hide()
# "Diff Viewer" widget
self.diffdockwidget = create_dock(N_("Diff"), self)
self.diffeditor = DiffEditor(self.diffdockwidget)
self.diffdockwidget.setWidget(self.diffeditor)
# "Diff Options" tool menu
self.diff_ignore_space_at_eol_action = add_action(
self, N_("Ignore changes in whitespace at EOL"), self._update_diff_opts
)
self.diff_ignore_space_at_eol_action.setCheckable(True)
self.diff_ignore_space_change_action = add_action(
self, N_("Ignore changes in amount of whitespace"), self._update_diff_opts
)
self.diff_ignore_space_change_action.setCheckable(True)
self.diff_ignore_all_space_action = add_action(self, N_("Ignore all whitespace"), self._update_diff_opts)
self.diff_ignore_all_space_action.setCheckable(True)
self.diff_function_context_action = add_action(
self, N_("Show whole surrounding functions of changes"), self._update_diff_opts
)
self.diff_function_context_action.setCheckable(True)
self.diffopts_button = create_toolbutton(text=N_("Options"), icon=options_icon(), tooltip=N_("Diff Options"))
self.diffopts_menu = create_menu(N_("Diff Options"), self.diffopts_button)
self.diffopts_menu.addAction(self.diff_ignore_space_at_eol_action)
self.diffopts_menu.addAction(self.diff_ignore_space_change_action)
self.diffopts_menu.addAction(self.diff_ignore_all_space_action)
self.diffopts_menu.addAction(self.diff_function_context_action)
self.diffopts_button.setMenu(self.diffopts_menu)
self.diffopts_button.setPopupMode(QtGui.QToolButton.InstantPopup)
titlebar = self.diffdockwidget.titleBarWidget()
titlebar.add_corner_widget(self.diffopts_button)
# All Actions
self.unstage_all_action = add_action(self, N_("Unstage All"), cmds.run(cmds.UnstageAll))
self.unstage_all_action.setIcon(qtutils.icon("remove.svg"))
self.unstage_selected_action = add_action(self, N_("Unstage From Commit"), cmds.run(cmds.UnstageSelected))
self.unstage_selected_action.setIcon(qtutils.icon("remove.svg"))
self.show_diffstat_action = add_action(self, N_("Diffstat"), cmds.run(cmds.Diffstat), "Alt+D")
#.........这里部分代码省略.........
示例6: MainView
class MainView(MainWindow):
def __init__(self, model, parent=None):
MainWindow.__init__(self, parent)
self.setAttribute(Qt.WA_MacMetalStyle)
# Default size; this is thrown out when save/restore is used
self.resize(987, 610)
self.model = model
self.prefs_model = prefs_model = prefs.PreferencesModel()
# The widget version is used by import/export_state().
# Change this whenever dockwidgets are removed.
self.widget_version = 2
# Keeps track of merge messages we've seen
self.merge_message_hash = ""
cfg = gitcfg.instance()
self.browser_dockable = cfg.get("cola.browserdockable") or cfg.get("cola.classicdockable")
if self.browser_dockable:
self.browserdockwidget = create_dock(N_("Browser"), self)
self.browserwidget = worktree_browser_widget(self)
self.browserdockwidget.setWidget(self.browserwidget)
# "Actions" widget
self.actionsdockwidget = create_dock(N_("Actions"), self)
self.actionsdockwidgetcontents = action.ActionButtons(self)
self.actionsdockwidget.setWidget(self.actionsdockwidgetcontents)
self.actionsdockwidget.toggleViewAction().setChecked(False)
self.actionsdockwidget.hide()
# "Repository Status" widget
self.statuswidget = StatusWidget(self)
self.statusdockwidget = create_dock(N_("Status"), self)
self.statusdockwidget.setWidget(self.statuswidget)
# "Commit Message Editor" widget
self.position_label = QtGui.QLabel()
font = qtutils.default_monospace_font()
font.setPointSize(int(font.pointSize() * 0.8))
self.position_label.setFont(font)
self.commitdockwidget = create_dock(N_("Commit"), self)
titlebar = self.commitdockwidget.titleBarWidget()
titlebar.add_corner_widget(self.position_label)
self.commitmsgeditor = CommitMessageEditor(model, self)
self.commitdockwidget.setWidget(self.commitmsgeditor)
# "Console" widget
self.logwidget = LogWidget()
self.logdockwidget = create_dock(N_("Console"), self)
self.logdockwidget.setWidget(self.logwidget)
self.logdockwidget.toggleViewAction().setChecked(False)
self.logdockwidget.hide()
# "Diff Viewer" widget
self.diffdockwidget = create_dock(N_("Diff"), self)
self.diffeditor = DiffEditor(self.diffdockwidget)
self.diffdockwidget.setWidget(self.diffeditor)
# "Diff Options" tool menu
self.diff_ignore_space_at_eol_action = add_action(
self, N_("Ignore changes in whitespace at EOL"), self._update_diff_opts
)
self.diff_ignore_space_at_eol_action.setCheckable(True)
self.diff_ignore_space_change_action = add_action(
self, N_("Ignore changes in amount of whitespace"), self._update_diff_opts
)
self.diff_ignore_space_change_action.setCheckable(True)
self.diff_ignore_all_space_action = add_action(self, N_("Ignore all whitespace"), self._update_diff_opts)
self.diff_ignore_all_space_action.setCheckable(True)
self.diff_function_context_action = add_action(
self, N_("Show whole surrounding functions of changes"), self._update_diff_opts
)
self.diff_function_context_action.setCheckable(True)
self.diffopts_button = create_toolbutton(text=N_("Options"), icon=options_icon(), tooltip=N_("Diff Options"))
self.diffopts_menu = create_menu(N_("Diff Options"), self.diffopts_button)
self.diffopts_menu.addAction(self.diff_ignore_space_at_eol_action)
self.diffopts_menu.addAction(self.diff_ignore_space_change_action)
self.diffopts_menu.addAction(self.diff_ignore_all_space_action)
self.diffopts_menu.addAction(self.diff_function_context_action)
self.diffopts_button.setMenu(self.diffopts_menu)
self.diffopts_button.setPopupMode(QtGui.QToolButton.InstantPopup)
titlebar = self.diffdockwidget.titleBarWidget()
titlebar.add_corner_widget(self.diffopts_button)
# All Actions
self.unstage_all_action = add_action(self, N_("Unstage All"), cmds.run(cmds.UnstageAll))
self.unstage_all_action.setIcon(qtutils.icon("remove.svg"))
self.unstage_selected_action = add_action(self, N_("Unstage From Commit"), cmds.run(cmds.UnstageSelected))
self.unstage_selected_action.setIcon(qtutils.icon("remove.svg"))
self.show_diffstat_action = add_action(self, N_("Diffstat"), cmds.run(cmds.Diffstat), "Alt+D")
#.........这里部分代码省略.........