summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 526aa2b)
raw | patch | inline | side by side (parent: 526aa2b)
author | Bert Wesarg <bert.wesarg@googlemail.com> | |
Fri, 14 Oct 2011 19:25:21 +0000 (21:25 +0200) | ||
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Tue, 18 Oct 2011 08:44:10 +0000 (09:44 +0100) |
The default is the current "ask".
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh | patch | blob | history | |
lib/index.tcl | patch | blob | history | |
lib/option.tcl | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index e5dd8bc1f2ffb489f4b41470c3cbda5ff7ca4656..7eeec52281f874e526a089ebb0411673f2cadb81 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
{fontui font_ui {mc "Main Font"}}
{fontdiff font_diff {mc "Diff/Console Font"}}
}
+set default_config(gui.stageuntracked) ask
######################################################################
##
diff --git a/lib/index.tcl b/lib/index.tcl
index 014acf93198d3ef3bc347a65b6129121b1228f09..45094c267209e4600bfd1ed373f03c24904739e0 100644 (file)
--- a/lib/index.tcl
+++ b/lib/index.tcl
}
}
if {[llength $untracked_paths]} {
- set reply [ask_popup [mc "Stage also untracked files?"]]
+ set reply 0
+ switch -- [get_config gui.stageuntracked] {
+ no {
+ set reply 0
+ }
+ yes {
+ set reply 1
+ }
+ ask -
+ default {
+ set reply [ask_popup [mc "Stage also untracked files?"]]
+ }
+ }
if {$reply} {
set paths [concat $paths $untracked_paths]
}
diff --git a/lib/option.tcl b/lib/option.tcl
index 3807c8d28324a277204db9191e99ddb856041c22..719103a4220cd3b84734c37e78e32773a8f23a47 100644 (file)
--- a/lib/option.tcl
+++ b/lib/option.tcl
{i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
{t gui.newbranchtemplate {mc "New Branch Name Template"}}
{c gui.encoding {mc "Default File Contents Encoding"}}
+ {s gui.stageuntracked {mc "Staging of untracked files"} {list "yes" "no" "ask"}}
} {
set type [lindex $option 0]
set name [lindex $option 1]
}
pack $w.$f.$optid -side top -anchor w -fill x
}
+ s {
+ set opts [eval [lindex $option 3]]
+ ${NS}::frame $w.$f.$optid
+ ${NS}::label $w.$f.$optid.l -text "$text:"
+ if {$use_ttk} {
+ ttk::combobox $w.$f.$optid.v \
+ -textvariable ${f}_config_new($name) \
+ -values $opts -state readonly
+ } else {
+ eval tk_optionMenu $w.$f.$optid.v \
+ ${f}_config_new($name) \
+ $opts
+ }
+ pack $w.$f.$optid.l -side left -anchor w -fill x
+ pack $w.$f.$optid.v -side right -anchor e -padx 5
+ pack $w.$f.$optid -side top -anchor w -fill x
+ }
}
}
}