summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 15bc7ba)
raw | patch | inline | side by side (parent: 15bc7ba)
author | Christian Stimming <stimming@tuhh.de> | |
Wed, 7 Nov 2007 17:44:35 +0000 (18:44 +0100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Wed, 19 Dec 2007 23:19:07 +0000 (10:19 +1100) |
Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index e291577e528e9eb9bf8c5d9d513a8319a1a67079..b861f8d0e97021bb0187714285f0b97ca97709ad 100755 (executable)
--- a/gitk
+++ b/gitk
label .tf.lbar.flab2 -text " [mc "commit"] " -font uifont
pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \
-side left -fill y
- set gdttype "containing:"
+ set gdttype [mc "containing:"]
set gm [tk_optionMenu .tf.lbar.gdttype gdttype \
- "containing:" \
- "touching paths:" \
- "adding/removing string:"]
+ [mc "containing:"] \
+ [mc "touching paths:"] \
+ [mc "adding/removing string:"]]
trace add variable gdttype write gdttype_change
$gm conf -font uifont
.tf.lbar.gdttype conf -font uifont
lappend entries $fstring
entry $fstring -width 30 -font textfont -textvariable findstring
trace add variable findstring write find_change
- set findtype Exact
+ set findtype [mc "Exact"]
set findtypemenu [tk_optionMenu .tf.lbar.findtype \
- findtype Exact IgnCase Regexp]
+ findtype [mc "Exact"] [mc "IgnCase"] [mc "Regexp"]]
trace add variable findtype write findcom_change
.tf.lbar.findtype configure -font uifont
.tf.lbar.findtype.menu configure -font uifont
- set findloc "All fields"
- tk_optionMenu .tf.lbar.findloc findloc "All fields" Headline \
- Comments Author Committer
+ set findloc [mc "All fields"]
+ tk_optionMenu .tf.lbar.findloc findloc [mc "All fields"] [mc "Headline"] \
+ [mc "Comments"] [mc "Author"] [mc "Committer"]
trace add variable findloc write find_change
.tf.lbar.findloc configure -font uifont
.tf.lbar.findloc.menu configure -font uifont
global flist_menu_file findstring gdttype
set x [shellquote $flist_menu_file]
- if {$only || $findstring eq {} || $gdttype ne "touching paths:"} {
+ if {$only || $findstring eq {} || $gdttype ne [mc "touching paths:"]} {
set findstring $x
} else {
append findstring " " $x
}
- set gdttype "touching paths:"
+ set gdttype [mc "touching paths:"]
}
# Functions for adding and removing shell-type quoting
if {$curview == 0} return
if {[info exists hlview] && $hlview == $curview} {
- set selectedhlview None
+ set selectedhlview [mc "None"]
unset hlview
}
allviewmenus $curview delete
clear_display
if {[info exists hlview] && $hlview == $n} {
unset hlview
- set selectedhlview None
+ set selectedhlview [mc "None"]
}
catch {unset commitinterest}
stopfinding
if {$findstring ne {}} {
- if {$gdttype eq "containing:"} {
+ if {$gdttype eq [mc "containing:"]} {
if {$highlight_files ne {}} {
set highlight_files {}
hfiles_change
global gdttype findstring highlight_files
stopfinding
- if {$gdttype eq "containing:"} {
+ if {$gdttype eq [mc "containing:"]} {
findcom_change
} else {
if {$highlight_files ne $findstring} {
catch {unset nhighlights}
unbolden
unmarkmatches
- if {$gdttype ne "containing:" || $findstring eq {}} {
+ if {$gdttype ne [mc "containing:"] || $findstring eq {}} {
set findpattern {}
- } elseif {$findtype eq "Regexp"} {
+ } elseif {$findtype eq [mc "Regexp"]} {
set findpattern $findstring
} else {
set e [string map {"*" "\\*" "?" "\\?" "\[" "\\\[" "\\" "\\\\"} \
proc do_file_hl {serial} {
global highlight_files filehighlight highlight_paths gdttype fhl_list
- if {$gdttype eq "touching paths:"} {
+ if {$gdttype eq [mc "touching paths:"]} {
if {[catch {set paths [shellsplit $highlight_files]}]} return
set highlight_paths [makepatterns $paths]
highlight_filelist
set gdtargs [concat -- $paths]
- } elseif {$gdttype eq "adding/removing string:"} {
+ } elseif {$gdttype eq [mc "adding/removing string:"]} {
set gdtargs [list "-S$highlight_files"]
} else {
# must be "containing:", i.e. we're searching commit info
proc doesmatch {f} {
global findtype findpattern
- if {$findtype eq "Regexp"} {
+ if {$findtype eq [mc "Regexp"]} {
return [regexp $findpattern $f]
- } elseif {$findtype eq "IgnCase"} {
+ } elseif {$findtype eq [mc "IgnCase"]} {
return [string match -nocase $findpattern $f]
} else {
return [string match $findpattern $f]
}
set info $commitinfo($id)
set isbold 0
- set fldtypes {Headline Author Date Committer CDate Comments}
+ set fldtypes [list [mc Headline] [mc Author] [mc Date] [mc Committer] [mc CDate] [mc Comments]]
foreach f $info ty $fldtypes {
- if {($findloc eq "All fields" || $findloc eq $ty) &&
+ if {($findloc eq [mc "All fields"] || $findloc eq $ty) &&
[doesmatch $f]} {
- if {$ty eq "Author"} {
+ if {$ty eq [mc "Author"]} {
set isbold 2
break
}
set author [lindex $commitinfo($id) 1]
$canv delete match$row
$canv2 delete match$row
- if {$findloc eq "All fields" || $findloc eq "Headline"} {
+ if {$findloc eq [mc "All fields"] || $findloc eq [mc "Headline"]} {
set m [findmatches $headline]
if {$m ne {}} {
markmatches $canv $row $headline $linehtag($row) $m \
[$canv itemcget $linehtag($row) -font] $row
}
}
- if {$findloc eq "All fields" || $findloc eq "Author"} {
+ if {$findloc eq [mc "All fields"] || $findloc eq [mc "Author"]} {
set m [findmatches $author]
if {$m ne {}} {
markmatches $canv2 $row $author $linentag($row) $m \
global highlight_related
rhighlight_none
- if {$highlight_related ne "None"} {
+ if {$highlight_related ne [mc "None"]} {
run drawvisible
}
}
set desc_todo [list $a]
catch {unset ancestor}
set anc_todo [list $a]
- if {$highlight_related ne "None"} {
+ if {$highlight_related ne [mc "None"]} {
rhighlight_none
run drawvisible
}
if {![info exists selectedline]} return
set isbold 0
- if {$highlight_related eq "Descendent" ||
- $highlight_related eq "Not descendent"} {
+ if {$highlight_related eq [mc "Descendent"] ||
+ $highlight_related eq [mc "Not descendent"]} {
if {![info exists descendent($id)]} {
is_descendent $id
}
- if {$descendent($id) == ($highlight_related eq "Descendent")} {
+ if {$descendent($id) == ($highlight_related eq [mc "Descendent"])} {
set isbold 1
}
- } elseif {$highlight_related eq "Ancestor" ||
- $highlight_related eq "Not ancestor"} {
+ } elseif {$highlight_related eq [mc "Ancestor"] ||
+ $highlight_related eq [mc "Not ancestor"]} {
if {![info exists ancestor($id)]} {
is_ancestor $id
}
- if {$ancestor($id) == ($highlight_related eq "Ancestor")} {
+ if {$ancestor($id) == ($highlight_related eq [mc "Ancestor"])} {
set isbold 1
}
}
if {$findpattern ne {} && ![info exists nhighlights($row)]} {
askfindhighlight $row $id
}
- if {$highlight_related ne "None" && ![info exists rhighlights($row)]} {
+ if {$highlight_related ne [mc "None"] && ![info exists rhighlights($row)]} {
askrelhighlight $row $id
}
if {![info exists iddrawn($id)]} {
proc findmatches {f} {
global findtype findstring
- if {$findtype == "Regexp"} {
+ if {$findtype == [mc "Regexp"]} {
set matches [regexp -indices -all -inline $findstring $f]
} else {
set fs $findstring
- if {$findtype == "IgnCase"} {
+ if {$findtype == [mc "IgnCase"]} {
set f [string tolower $f]
set fs [string tolower $fs]
}
set findstartline $selectedline
}
set findcurline $findstartline
- nowbusy finding "Searching"
- if {$gdttype ne "containing:" && ![info exists filehighlight]} {
+ nowbusy finding [mc "Searching"]
+ if {$gdttype ne [mc "containing:"] && ![info exists filehighlight]} {
after cancel do_file_hl $fh_serial
do_file_hl $fh_serial
}
if {![info exists find_dirn]} {
return 0
}
- set fldtypes {Headline Author Date Committer CDate Comments}
+ set fldtypes [list [mc "Headline"] [mc "Author"] [mc "Date"] [mc "Committer"] [mc "CDate"] [mc "Comments"]]
set l $findcurline
set moretodo 0
if {$find_dirn > 0} {
}
set found 0
set domore 1
- if {$gdttype eq "containing:"} {
+ if {$gdttype eq [mc "containing:"]} {
for {} {$n > 0} {incr n -1; incr l $find_dirn} {
set id [lindex $displayorder $l]
# shouldn't happen unless git log doesn't give all the commits...
}
set info $commitinfo($id)
foreach f $info ty $fldtypes {
- if {($findloc eq "All fields" || $findloc eq $ty) &&
+ if {($findloc eq [mc "All fields"] || $findloc eq $ty) &&
[doesmatch $f]} {
set found 1
break
set markingmatches 1
set findcurline $l
selectline $l 1
- if {$findloc == "All fields" || $findloc == "Comments"} {
+ if {$findloc == [mc "All fields"] || $findloc == [mc "Comments"]} {
# highlight the matches in the comments
set f [$ctext get 1.0 $commentend]
set matches [findmatches $f]
$ctext conf -state disabled
set commentend [$ctext index "end - 1c"]
- init_flist "Comments"
+ init_flist [mc "Comments"]
if {$cmitmode eq "tree"} {
gettree $id
} elseif {[llength $olds] <= 1} {
set nextviewnum 1
set curview 0
set selectedview 0
-set selectedhlview None
-set highlight_related None
+set selectedhlview [mc "None"]
+set highlight_related [mc "None"]
set highlight_files {}
set viewfiles(0) {}
set viewperm(0) 0