diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2008-11-16 18:46:49 (GMT) |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-11-16 21:33:09 (GMT) |
commit | 0ce76ded1b207063a460f859fe7bfeb6d90b4eb6 (patch) | |
tree | 6e13fbf833b927455fc1e47ee2d863582cdc0dff /git-gui.sh | |
parent | 7cf4566f48b7f17c68ab215a9ca6ef7792d9d791 (diff) | |
download | git-0ce76ded1b207063a460f859fe7bfeb6d90b4eb6.zip git-0ce76ded1b207063a460f859fe7bfeb6d90b4eb6.tar.gz git-0ce76ded1b207063a460f859fe7bfeb6d90b4eb6.tar.bz2 |
git-gui: Add a Tools menu for arbitrary commands.
Due to the emphasis on scriptability in the git
design, it is impossible to provide 100% complete
GUI. Currently unaccounted areas include git-svn
and other source control system interfaces, TopGit,
all custom scripts.
This problem can be mitigated by providing basic
customization capabilities in Git Gui. This commit
adds a new Tools menu, which can be configured
to contain items invoking arbitrary shell commands.
The interface is powerful enough to allow calling
both batch text programs like git-svn, and GUI editors.
To support the latter use, the commands have access
to the name of the currently selected file through
the environment.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-x | git-gui.sh | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -2289,6 +2289,9 @@ if {[is_enabled transport]} { .mbar add cascade -label [mc Merge] -menu .mbar.merge .mbar add cascade -label [mc Remote] -menu .mbar.remote } +if {[is_enabled multicommit] || [is_enabled singlecommit]} { + .mbar add cascade -label [mc Tools] -menu .mbar.tools +} . configure -menu .mbar # -- Repository Menu @@ -2563,6 +2566,20 @@ if {[is_MacOSX]} { -command do_options } +# -- Tools Menu +# +if {[is_enabled multicommit] || [is_enabled singlecommit]} { + set tools_menubar .mbar.tools + menu $tools_menubar + $tools_menubar add separator + $tools_menubar add command -label [mc "Add..."] -command tools_add::dialog + $tools_menubar add command -label [mc "Remove..."] -command tools_remove::dialog + set tools_tailcnt 3 + if {[array names repo_config guitool.*.cmd] ne {}} { + tools_populate_all + } +} + # -- Help Menu # .mbar add cascade -label [mc Help] -menu .mbar.help |