本文整理汇总了Python中cola.widgets.browse.BrowseDialog类的典型用法代码示例。如果您正苦于以下问题:Python BrowseDialog类的具体用法?Python BrowseDialog怎么用?Python BrowseDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BrowseDialog类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: browse_other
def browse_other():
"""Prompt for a branch and inspect content at that point in time."""
# Prompt for a branch to browse
branch = choose_ref(N_('Browse Commits...'), N_('Browse'))
if not branch:
return
BrowseDialog.browse(branch)
示例2: browse_other
def browse_other():
"""Prompt for a branch and inspect content at that point in time."""
# Prompt for a branch to browse
branch = choose_from_combo('Browse Revision...', gitcmds.all_refs())
if not branch:
return
BrowseDialog.browse(branch)
示例3: diff_branch
def diff_branch():
"""Launches a diff against a branch."""
branch = choose_from_combo('Select Branch, Tag, or Commit-ish',
['HEAD^'] +
cola.model().all_branches() +
cola.model().tags)
if not branch:
return
zfiles_str = git.instance().diff(branch, name_only=True,
no_color=True,
z=True).rstrip('\0')
files = [core.decode(f) for f in zfiles_str.split('\0')]
filename = BrowseDialog.select_file_from_list(files)
if not filename:
return
cola.notifier().broadcast(signals.branch_mode, branch, filename)
示例4: diff_branch
def diff_branch():
"""Launches a diff against a branch."""
branch = choose_from_combo('Select Branch, Tag, or Commit-ish',
['HEAD^'] +
cola.model().all_branches() +
cola.model().tags)
if not branch:
return
files = gitcmds.diff_filenames(branch)
if not files:
qtutils.critical('No Differences',
'No differences found for "%s"' % branch)
return
filename = BrowseDialog.select_file_from_list(files)
if not filename:
return
cola.notifier().broadcast(signals.branch_mode, branch, filename)
示例5: browse_current
def browse_current():
"""Launch the 'Browse Current Branch' dialog."""
branch = gitcmds.current_branch()
BrowseDialog.browse(branch)
示例6: save_blob_dialog
def save_blob_dialog(self):
sha1 = self.selected_sha1()
if sha1 is None:
return
return BrowseDialog.browse(sha1)
示例7: save_blob_dialog
def save_blob_dialog(self):
return BrowseDialog.browse(self._clicked_item.commit.sha1)
示例8: compare_file
def compare_file():
"""Launches a dialog for comparing revisions touching a file path"""
filename = BrowseDialog.select_file('HEAD')
if not filename:
return
compare(filename)