From 354af6bd69b442d0ce9449961f37d95ef12ba988 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sun, 23 Nov 2008 13:14:23 +1100 Subject: gitk: Restore scrolling position of diff pane on back/forward in history This arranges to save the scrolling position of the diff display pane when we move from displaying one thing to another, and then scroll the pane to the same position when we go back to the previous thing using the back or forward buttons. This works if we have clicked on a commit and are in patch display mode, or if we have clicked on a line or a tag, or have done a diff between two commits with the context menu. It doesn't currently restore the pane to where it was if is was displaying a commit in tree display mode. For future extensibility, addtohistory now takes an extra optional argument which is a script to invoke when moving from this thing to another. The script needs to return a list of pairs of variable name and value. If we go back to this thing, the godo procedure will set the named variables to the values given. At present that is just used to store the $ctext scrolling position, but in future we will use it to store the state of which directories are open in the file list pane. Signed-off-by: Paul Mackerras --- gitk | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 75 insertions(+), 9 deletions(-) diff --git a/gitk b/gitk index 9bdaafe40..08a45e1b9 100755 --- a/gitk +++ b/gitk @@ -6618,7 +6618,7 @@ proc selectline {l isnew {desired_loc {}}} { make_secsel $id if {$isnew} { - addtohistory [list selbyid $id] + addtohistory [list selbyid $id 0] savecmitpos } $sha1entry delete 0 end @@ -6770,10 +6770,12 @@ proc reselectline {} { } } -proc addtohistory {cmd} { +proc addtohistory {cmd {saveproc {}}} { global history historyindex curview - set elt [list $curview $cmd] + unset_posvars + save_position + set elt [list $curview $cmd $saveproc {}] if {$historyindex > 0 && [lindex $history [expr {$historyindex - 1}]] == $elt} { return @@ -6793,14 +6795,45 @@ proc addtohistory {cmd} { .tf.bar.rightbut conf -state disabled } +# save the scrolling position of the diff display pane +proc save_position {} { + global historyindex history + + if {$historyindex < 1} return + set hi [expr {$historyindex - 1}] + set fn [lindex $history $hi 2] + if {$fn ne {}} { + lset history $hi 3 [eval $fn] + } +} + +proc unset_posvars {} { + global last_posvars + + if {[info exists last_posvars]} { + foreach {var val} $last_posvars { + global $var + catch {unset $var} + } + unset last_posvars + } +} + proc godo {elt} { - global curview + global curview last_posvars set view [lindex $elt 0] set cmd [lindex $elt 1] + set pv [lindex $elt 3] if {$curview != $view} { showview $view } + unset_posvars + foreach {var val} $pv { + global $var + set $var $val + } + set last_posvars $pv eval $cmd } @@ -6809,6 +6842,7 @@ proc goback {} { focus . if {$historyindex > 1} { + save_position incr historyindex -1 godo [lindex $history [expr {$historyindex - 1}]] .tf.bar.rightbut conf -state normal @@ -6823,6 +6857,7 @@ proc goforw {} { focus . if {$historyindex < [llength $history]} { + save_position set cmd [lindex $history $historyindex] incr historyindex godo $cmd @@ -7189,6 +7224,34 @@ proc getblobdiffs {ids} { filerun $bdf [list getblobdiffline $bdf $diffids] } +proc savecmitpos {} { + global ctext cmitmode + + if {$cmitmode eq "tree"} { + return {} + } + return [list target_scrollpos [$ctext index @0,0]] +} + +proc savectextpos {} { + global ctext + + return [list target_scrollpos [$ctext index @0,0]] +} + +proc maybe_scroll_ctext {ateof} { + global ctext target_scrollpos + + if {![info exists target_scrollpos]} return + if {!$ateof} { + set nlines [expr {[winfo height $ctext] + / [font metrics textfont -linespace]}] + if {[$ctext compare "$target_scrollpos + $nlines lines" <= end]} return + } + $ctext yview $target_scrollpos + unset target_scrollpos +} + proc setinlist {var i val} { global $var @@ -7383,6 +7446,7 @@ proc getblobdiffline {bdf ids} { if {[info exists seehere]} { mark_ctext_line [lindex [split $seehere .] 0] } + maybe_scroll_ctext [eof $bdf] $ctext conf -state disabled if {[eof $bdf]} { close $bdf @@ -7877,7 +7941,7 @@ proc lineclick {x y id isnew} { } if {$isnew} { - addtohistory [list lineclick $x $y $id 0] + addtohistory [list lineclick $x $y $id 0] savectextpos } # fill the details pane with info about this line $ctext conf -state normal @@ -7908,6 +7972,7 @@ proc lineclick {x y id isnew} { $ctext insert end "\n\t[mc "Date"]:\t$date\n" } } + maybe_scroll_ctext 1 $ctext conf -state disabled init_flist {} } @@ -7921,10 +7986,10 @@ proc normalline {} { } } -proc selbyid {id} { +proc selbyid {id {isnew 1}} { global curview if {[commitinview $id $curview]} { - selectline [rowofcommit $id] 1 + selectline [rowofcommit $id] $isnew } } @@ -7974,7 +8039,7 @@ proc diffvssel {dirn} { set oldid $rowmenuid set newid [commitonrow $selectedline] } - addtohistory [list doseldiff $oldid $newid] + addtohistory [list doseldiff $oldid $newid] savectextpos doseldiff $oldid $newid } @@ -9886,7 +9951,7 @@ proc showtag {tag isnew} { global ctext tagcontents tagids linknum tagobjid if {$isnew} { - addtohistory [list showtag $tag 0] + addtohistory [list showtag $tag 0] savectextpos } $ctext conf -state normal clear_ctext @@ -9903,6 +9968,7 @@ proc showtag {tag isnew} { set text "[mc "Tag"]: $tag\n[mc "Id"]: $tagids($tag)" } appendwithlinks $text {} + maybe_scroll_ctext $ctext conf -state disabled init_flist {} } -- cgit v1.2.1 From d93f1713b0ba57b119f2ba2e2beda2ed9cc7349d Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Fri, 17 Apr 2009 01:24:35 +0100 Subject: gitk: Use themed tk widgets With Tk 8.5+, this uses the themed widgets to improve the appearance on Windows and MacOSX. On X11 less difference is apparent, but users can select alternate themes by setting *TkTheme in the resource database (eg: *TkTheme: clam). With Tk 8.6 there is a built-in font selection dialog. This will make use of that when available, as on Windows and MacOSX it calls the native font selection dialog. [paulus@samba.org - folded in subsequent patch to restore saved pane sizes for ttk widgets, and trimmed trailing whitespace.] Signed-off-by: Pat Thoyts Signed-off-by: Paul Mackerras --- gitk | 607 +++++++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 370 insertions(+), 237 deletions(-) diff --git a/gitk b/gitk index ab6fda184..4526193b3 100755 --- a/gitk +++ b/gitk @@ -7,6 +7,8 @@ exec wish "$0" -- "$@" # and distributed under the terms of the GNU General Public Licence, # either version 2, or (at your option) any later version. +package require Tk + proc gitdir {} { global env if {[info exists env(GIT_DIR)]} { @@ -264,7 +266,7 @@ proc parseviewrevs {view revs} { } lappend badrev $line } - } + } error_popup "[mc "Error parsing revisions:"] $err" return {} } @@ -1767,6 +1769,15 @@ proc removehead {id name} { unset headids($name) } +proc ttk_toplevel {w args} { + global use_ttk + eval [linsert $args 0 ::toplevel $w] + if {$use_ttk} { + place [ttk::frame $w._toplevel_background] -x 0 -y 0 -relwidth 1 -relheight 1 + } + return $w +} + proc make_transient {window origin} { global have_tk85 @@ -1786,9 +1797,11 @@ proc make_transient {window origin} { } proc show_error {w top msg} { + global NS + if {[wm state $top] eq "withdrawn"} { wm deiconify $top } message $w.m -text $msg -justify center -aspect 400 pack $w.m -side top -fill x -padx 20 -pady 20 - button $w.ok -text [mc OK] -command "destroy $top" + ${NS}::button $w.ok -default active -text [mc OK] -command "destroy $top" pack $w.ok -side bottom -fill x bind $top "grab $top; focus $top" bind $top "destroy $top" @@ -1798,45 +1811,56 @@ proc show_error {w top msg} { } proc error_popup {msg {owner .}} { - set w .error - toplevel $w - make_transient $w $owner - show_error $w $w $msg + if {[tk windowingsystem] eq "win32"} { + tk_messageBox -icon error -type ok -title [wm title .] \ + -parent $owner -message $msg + } else { + set w .error + ttk_toplevel $w + make_transient $w $owner + show_error $w $w $msg + } } proc confirm_popup {msg {owner .}} { - global confirm_ok + global confirm_ok NS set confirm_ok 0 set w .confirm - toplevel $w + ttk_toplevel $w make_transient $w $owner message $w.m -text $msg -justify center -aspect 400 pack $w.m -side top -fill x -padx 20 -pady 20 - button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w" + ${NS}::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w" pack $w.ok -side left -fill x - button $w.cancel -text [mc Cancel] -command "destroy $w" + ${NS}::button $w.cancel -text [mc Cancel] -command "destroy $w" pack $w.cancel -side right -fill x bind $w "grab $w; focus $w" bind $w "set confirm_ok 1; destroy $w" bind $w "set confirm_ok 1; destroy $w" bind $w "destroy $w" + tk::PlaceWindow $w widget $owner tkwait window $w return $confirm_ok } proc setoptions {} { - option add *Panedwindow.showHandle 1 startupFile - option add *Panedwindow.sashRelief raised startupFile + if {[tk windowingsystem] ne "win32"} { + option add *Panedwindow.showHandle 1 startupFile + option add *Panedwindow.sashRelief raised startupFile + if {[tk windowingsystem] ne "aqua"} { + option add *Menu.font uifont startupFile + } + } else { + option add *Menu.TearOff 0 startupFile + } option add *Button.font uifont startupFile option add *Checkbutton.font uifont startupFile option add *Radiobutton.font uifont startupFile - if {[tk windowingsystem] ne "aqua"} { - option add *Menu.font uifont startupFile - } option add *Menubutton.font uifont startupFile option add *Label.font uifont startupFile option add *Message.font uifont startupFile option add *Entry.font uifont startupFile + option add *Labelframe.font uifont startupFile } # Make a menu and submenus. @@ -1893,6 +1917,17 @@ proc mca {str} { return [string map {&& & & {}} [mc $str]] } +proc makedroplist {w varname args} { + global use_ttk + if {$use_ttk} { + set gm [ttk::combobox $w -width 10 -state readonly\ + -textvariable $varname -values $args] + } else { + set gm [eval [linsert $args 0 tk_optionMenu $w $varname]] + } + return $gm +} + proc makewindow {} { global canv canv2 canv3 linespc charspc ctext cflist cscroll global tabstop @@ -1908,7 +1943,7 @@ proc makewindow {} { global headctxmenu progresscanv progressitem progresscoords statusw global fprogitem fprogcoord lastprogupdate progupdatepending global rprogitem rprogcoord rownumsel numcommits - global have_tk85 + global have_tk85 use_ttk NS # The "mc" arguments here are purely so that xgettext # sees the following string as needing to be translated @@ -1960,8 +1995,13 @@ proc makewindow {} { makemenu .bar $bar . configure -menu .bar + if {$use_ttk} { + # cover the non-themed toplevel with a themed frame. + place [ttk::frame ._main_background] -x 0 -y 0 -relwidth 1 -relheight 1 + } + # the gui has upper and lower half, parts of a paned window. - panedwindow .ctop -orient vertical + ${NS}::panedwindow .ctop -orient vertical # possibly use assumed geometry if {![info exists geometry(pwsash0)]} { @@ -1969,14 +2009,17 @@ proc makewindow {} { set geometry(topwidth) [expr {80 * $charspc}] set geometry(botheight) [expr {15 * $linespc}] set geometry(botwidth) [expr {50 * $charspc}] - set geometry(pwsash0) "[expr {40 * $charspc}] 2" - set geometry(pwsash1) "[expr {60 * $charspc}] 2" + set geometry(pwsash0) [list [expr {40 * $charspc}] 2] + set geometry(pwsash1) [list [expr {60 * $charspc}] 2] } # the upper half will have a paned window, a scroll bar to the right, and some stuff below - frame .tf -height $geometry(topheight) -width $geometry(topwidth) - frame .tf.histframe - panedwindow .tf.histframe.pwclist -orient horizontal -sashpad 0 -handlesize 4 + ${NS}::frame .tf -height $geometry(topheight) -width $geometry(topwidth) + ${NS}::frame .tf.histframe + ${NS}::panedwindow .tf.histframe.pwclist -orient horizontal + if {!$use_ttk} { + .tf.histframe.pwclist configure -sashpad 0 -handlesize 4 + } # create three canvases set cscroll .tf.histframe.csb @@ -1996,19 +2039,28 @@ proc makewindow {} { -selectbackground $selectbgcolor \ -background $bgcolor -bd 0 -yscrollincr $linespc .tf.histframe.pwclist add $canv3 - eval .tf.histframe.pwclist sash place 0 $geometry(pwsash0) - eval .tf.histframe.pwclist sash place 1 $geometry(pwsash1) + if {$use_ttk} { + bind .tf.histframe.pwclist { + bind %W {} + .tf.histframe.pwclist sashpos 1 [lindex $::geometry(pwsash1) 0] + .tf.histframe.pwclist sashpos 0 [lindex $::geometry(pwsash0) 0] + } + } else { + eval .tf.histframe.pwclist sash place 0 $geometry(pwsash0) + eval .tf.histframe.pwclist sash place 1 $geometry(pwsash1) + } # a scroll bar to rule them - scrollbar $cscroll -command {allcanvs yview} -highlightthickness 0 + ${NS}::scrollbar $cscroll -command {allcanvs yview} + if {!$use_ttk} {$cscroll configure -highlightthickness 0} pack $cscroll -side right -fill y bind .tf.histframe.pwclist {resizeclistpanes %W %w} lappend bglist $canv $canv2 $canv3 pack .tf.histframe.pwclist -fill both -expand 1 -side left # we have two button bars at bottom of top frame. Bar 1 - frame .tf.bar - frame .tf.lbar -height 15 + ${NS}::frame .tf.bar + ${NS}::frame .tf.lbar -height 15 set sha1entry .tf.bar.sha1 set entries $sha1entry @@ -2017,7 +2069,7 @@ proc makewindow {} { -command gotocommit -width 8 $sha1but conf -disabledforeground [$sha1but cget -foreground] pack .tf.bar.sha1label -side left - entry $sha1entry -width 40 -font textfont -textvariable sha1string + ${NS}::entry $sha1entry -width 40 -font textfont -textvariable sha1string trace add variable sha1string write sha1change pack $sha1entry -side left -pady 2 @@ -2037,36 +2089,43 @@ proc makewindow {} { 0x00, 0x38, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0x00, 0x38, 0x00, 0x1c, 0x00, 0x0e, 0x00, 0x07, 0x80, 0x03, 0xc0, 0x01}; } - button .tf.bar.leftbut -image bm-left -command goback \ + ${NS}::button .tf.bar.leftbut -image bm-left -command goback \ -state disabled -width 26 pack .tf.bar.leftbut -side left -fill y - button .tf.bar.rightbut -image bm-right -command goforw \ + ${NS}::button .tf.bar.rightbut -image bm-right -command goforw \ -state disabled -width 26 pack .tf.bar.rightbut -side left -fill y - label .tf.bar.rowlabel -text [mc "Row"] + ${NS}::label .tf.bar.rowlabel -text [mc "Row"] set rownumsel {} - label .tf.bar.rownum -width 7 -font textfont -textvariable rownumsel \ + ${NS}::label .tf.bar.rownum -width 7 -textvariable rownumsel \ -relief sunken -anchor e - label .tf.bar.rowlabel2 -text "/" - label .tf.bar.numcommits -width 7 -font textfont -textvariable numcommits \ + ${NS}::label .tf.bar.rowlabel2 -text "/" + ${NS}::label .tf.bar.numcommits -width 7 -textvariable numcommits \ -relief sunken -anchor e pack .tf.bar.rowlabel .tf.bar.rownum .tf.bar.rowlabel2 .tf.bar.numcommits \ -side left + if {!$use_ttk} { + foreach w {rownum numcommits} {.tf.bar.$w configure -font textfont} + } global selectedline trace add variable selectedline write selectedline_change # Status label and progress bar set statusw .tf.bar.status - label $statusw -width 15 -relief sunken + ${NS}::label $statusw -width 15 -relief sunken pack $statusw -side left -padx 5 - set h [expr {[font metrics uifont -linespace] + 2}] - set progresscanv .tf.bar.progress - canvas $progresscanv -relief sunken -height $h -borderwidth 2 - set progressitem [$progresscanv create rect -1 0 0 $h -fill green] - set fprogitem [$progresscanv create rect -1 0 0 $h -fill yellow] - set rprogitem [$progresscanv create rect -1 0 0 $h -fill red] - pack $progresscanv -side right -expand 1 -fill x + if {$use_ttk} { + set progresscanv [ttk::progressbar .tf.bar.progress] + } else { + set h [expr {[font metrics uifont -linespace] + 2}] + set progresscanv .tf.bar.progress + canvas $progresscanv -relief sunken -height $h -borderwidth 2 + set progressitem [$progresscanv create rect -1 0 0 $h -fill green] + set fprogitem [$progresscanv create rect -1 0 0 $h -fill yellow] + set rprogitem [$progresscanv create rect -1 0 0 $h -fill red] + } + pack $progresscanv -side right -expand 1 -fill x -padx {0 2} set progresscoords {0 0} set fprogcoord 0 set rprogcoord 0 @@ -2075,14 +2134,14 @@ proc makewindow {} { set progupdatepending 0 # build up the bottom bar of upper window - label .tf.lbar.flabel -text "[mc "Find"] " - button .tf.lbar.fnext -text [mc "next"] -command {dofind 1 1} - button .tf.lbar.fprev -text [mc "prev"] -command {dofind -1 1} - label .tf.lbar.flab2 -text " [mc "commit"] " + ${NS}::label .tf.lbar.flabel -text "[mc "Find"] " + ${NS}::button .tf.lbar.fnext -text [mc "next"] -command {dofind 1 1} + ${NS}::button .tf.lbar.fprev -text [mc "prev"] -command {dofind -1 1} + ${NS}::label .tf.lbar.flab2 -text " [mc "commit"] " pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \ -side left -fill y set gdttype [mc "containing:"] - set gm [tk_optionMenu .tf.lbar.gdttype gdttype \ + set gm [makedroplist .tf.lbar.gdttype gdtype \ [mc "containing:"] \ [mc "touching paths:"] \ [mc "adding/removing string:"]] @@ -2092,14 +2151,14 @@ proc makewindow {} { set findstring {} set fstring .tf.lbar.findstring lappend entries $fstring - entry $fstring -width 30 -font textfont -textvariable findstring + ${NS}::entry $fstring -width 30 -font textfont -textvariable findstring trace add variable findstring write find_change set findtype [mc "Exact"] - set findtypemenu [tk_optionMenu .tf.lbar.findtype \ - findtype [mc "Exact"] [mc "IgnCase"] [mc "Regexp"]] + set findtypemenu [makedroplist .tf.lbar.findtype \ + findtype [mc "Exact"] [mc "IgnCase"] [mc "Regexp"]] trace add variable findtype write findcom_change set findloc [mc "All fields"] - tk_optionMenu .tf.lbar.findloc findloc [mc "All fields"] [mc "Headline"] \ + makedroplist .tf.lbar.findloc findloc [mc "All fields"] [mc "Headline"] \ [mc "Comments"] [mc "Author"] [mc "Committer"] trace add variable findloc write find_change pack .tf.lbar.findloc -side right @@ -2111,38 +2170,41 @@ proc makewindow {} { pack .tf.bar -in .tf -side bottom -fill x pack .tf.histframe -fill both -side top -expand 1 .ctop add .tf - .ctop paneconfigure .tf -height $geometry(topheight) - .ctop paneconfigure .tf -width $geometry(topwidth) + if {!$use_ttk} { + .ctop paneconfigure .tf -height $geometry(topheight) + .ctop paneconfigure .tf -width $geometry(topwidth) + } # now build up the bottom - panedwindow .pwbottom -orient horizontal + ${NS}::panedwindow .pwbottom -orient horizontal # lower left, a text box over search bar, scroll bar to the right # if we know window height, then that will set the lower text height, otherwise # we set lower text height which will drive window height if {[info exists geometry(main)]} { - frame .bleft -width $geometry(botwidth) + ${NS}::frame .bleft -width $geometry(botwidth) } else { - frame .bleft -width $geometry(botwidth) -height $geometry(botheight) + ${NS}::frame .bleft -width $geometry(botwidth) -height $geometry(botheight) } - frame .bleft.top - frame .bleft.mid - frame .bleft.bottom + ${NS}::frame .bleft.top + ${NS}::frame .bleft.mid + ${NS}::frame .bleft.bottom - button .bleft.top.search -text [mc "Search"] -command dosearch + ${NS}::button .bleft.top.search -text [mc "Search"] -command dosearch pack .bleft.top.search -side left -padx 5 set sstring .bleft.top.sstring - entry $sstring -width 20 -font textfont -textvariable searchstring + set searchstring "" + ${NS}::entry $sstring -width 20 -font textfont -textvariable searchstring lappend entries $sstring trace add variable searchstring write incrsearch pack $sstring -side left -expand 1 -fill x - radiobutton .bleft.mid.diff -text [mc "Diff"] \ + ${NS}::radiobutton .bleft.mid.diff -text [mc "Diff"] \ -command changediffdisp -variable diffelide -value {0 0} - radiobutton .bleft.mid.old -text [mc "Old version"] \ + ${NS}::radiobutton .bleft.mid.old -text [mc "Old version"] \ -command changediffdisp -variable diffelide -value {0 1} - radiobutton .bleft.mid.new -text [mc "New version"] \ + ${NS}::radiobutton .bleft.mid.new -text [mc "New version"] \ -command changediffdisp -variable diffelide -value {1 0} - label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: " + ${NS}::label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: " pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left spinbox .bleft.mid.diffcontext -width 5 -font textfont \ -from 1 -increment 1 -to 10000000 \ @@ -2152,7 +2214,7 @@ proc makewindow {} { trace add variable diffcontextstring write diffcontextchange lappend entries .bleft.mid.diffcontext pack .bleft.mid.labeldiffcontext .bleft.mid.diffcontext -side left - checkbutton .bleft.mid.ignspace -text [mc "Ignore space change"] \ + ${NS}::checkbutton .bleft.mid.ignspace -text [mc "Ignore space change"] \ -command changeignorespace -variable ignorespace pack .bleft.mid.ignspace -side left -padx 5 set ctext .bleft.bottom.ctext @@ -2163,9 +2225,8 @@ proc makewindow {} { if {$have_tk85} { $ctext conf -tabstyle wordprocessor } - scrollbar .bleft.bottom.sb -command "$ctext yview" - scrollbar .bleft.bottom.sbhorizontal -command "$ctext xview" -orient h \ - -width 10 + ${NS}::scrollbar .bleft.bottom.sb -command "$ctext yview" + ${NS}::scrollbar .bleft.bottom.sbhorizontal -command "$ctext xview" -orient h pack .bleft.top -side top -fill x pack .bleft.mid -side top -fill x grid $ctext .bleft.bottom.sb -sticky nsew @@ -2205,14 +2266,16 @@ proc makewindow {} { $ctext tag conf found -back yellow .pwbottom add .bleft - .pwbottom paneconfigure .bleft -width $geometry(botwidth) + if {!$use_ttk} { + .pwbottom paneconfigure .bleft -width $geometry(botwidth) + } # lower right - frame .bright - frame .bright.mode - radiobutton .bright.mode.patch -text [mc "Patch"] \ + ${NS}::frame .bright + ${NS}::frame .bright.mode + ${NS}::radiobutton .bright.mode.patch -text [mc "Patch"] \ -command reselectline -variable cmitmode -value "patch" - radiobutton .bright.mode.tree -text [mc "Tree"] \ + ${NS}::radiobutton .bright.mode.tree -text [mc "Tree"] \ -command reselectline -variable cmitmode -value "tree" grid .bright.mode.patch .bright.mode.tree -sticky ew pack .bright.mode -side top -fill x @@ -2228,7 +2291,7 @@ proc makewindow {} { -spacing1 1 -spacing3 1 lappend bglist $cflist lappend fglist $cflist - scrollbar .bright.sb -command "$cflist yview" + ${NS}::scrollbar .bright.sb -command "$cflist yview" pack .bright.sb -side right -fill y pack $cflist -side left -fill both -expand 1 $cflist tag configure highlight \ @@ -2263,6 +2326,17 @@ proc makewindow {} { set ::BM "2" } + if {$use_ttk} { + bind .ctop { + bind %W {} + %W sashpos 0 $::geometry(topheight) + } + bind .pwbottom { + bind %W {} + %W sashpos 0 $::geometry(botwidth) + } + } + bind .pwbottom {resizecdetpanes %W %w} pack .ctop -fill both -expand 1 bindall <1> {selcanvline %W %x %y} @@ -2482,7 +2556,12 @@ proc click {w} { proc adjustprogress {} { global progresscanv progressitem progresscoords global fprogitem fprogcoord lastprogupdate progupdatepending - global rprogitem rprogcoord + global rprogitem rprogcoord use_ttk + + if {$use_ttk} { + $progresscanv configure -value [expr {int($fprogcoord * 100)}] + return + } set w [expr {[winfo width $progresscanv] - 4}] set x0 [expr {$w * [lindex $progresscoords 0]}] @@ -2518,7 +2597,7 @@ proc savestuff {w} { global viewname viewfiles viewargs viewargscmd viewperm nextviewnum global cmitmode wrapcomment datetimeformat limitdiffs global colors bgcolor fgcolor diffcolors diffcontext selectbgcolor - global autoselect extdifftool perfile_attrs markbgcolor + global autoselect extdifftool perfile_attrs markbgcolor use_ttk if {$stuffsaved} return if {![winfo viewable .]} return @@ -2555,8 +2634,13 @@ proc savestuff {w} { puts $f "set geometry(state) [wm state .]" puts $f "set geometry(topwidth) [winfo width .tf]" puts $f "set geometry(topheight) [winfo height .tf]" - puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sash coord 0]\"" - puts $f "set geometry(pwsash1) \"[.tf.histframe.pwclist sash coord 1]\"" + if {$use_ttk} { + puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sashpos 0] 1\"" + puts $f "set geometry(pwsash1) \"[.tf.histframe.pwclist sashpos 1] 1\"" + } else { + puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sash coord 0]\"" + puts $f "set geometry(pwsash1) \"[.tf.histframe.pwclist sash coord 1]\"" + } puts $f "set geometry(botwidth) [winfo width .bleft]" puts $f "set geometry(botheight) [winfo height .bleft]" @@ -2574,10 +2658,15 @@ proc savestuff {w} { } proc resizeclistpanes {win w} { - global oldwidth + global oldwidth use_ttk if {[info exists oldwidth($win)]} { - set s0 [$win sash coord 0] - set s1 [$win sash coord 1] + if {$use_ttk} { + set s0 [$win sashpos 0] + set s1 [$win sashpos 1] + } else { + set s0 [$win sash coord 0] + set s1 [$win sash coord 1] + } if {$w < 60} { set sash0 [expr {int($w/2 - 2)}] set sash1 [expr {int($w*5/6 - 2)}] @@ -2598,16 +2687,25 @@ proc resizeclistpanes {win w} { } } } - $win sash place 0 $sash0 [lindex $s0 1] - $win sash place 1 $sash1 [lindex $s1 1] + if {$use_ttk} { + $win sashpos 0 $sash0 + $win sashpos 1 $sash1 + } else { + $win sash place 0 $sash0 [lindex $s0 1] + $win sash place 1 $sash1 [lindex $s1 1] + } } set oldwidth($win) $w } proc resizecdetpanes {win w} { - global oldwidth + global oldwidth use_ttk if {[info exists oldwidth($win)]} { - set s0 [$win sash coord 0] + if {$use_ttk} { + set s0 [$win sashpos 0] + } else { + set s0 [$win sash coord 0] + } if {$w < 60} { set sash0 [expr {int($w*3/4 - 2)}] } else { @@ -2620,7 +2718,11 @@ proc resizecdetpanes {win w} { set sash0 [expr {$w - 15}] } } - $win sash place 0 $sash0 [lindex $s0 1] + if {$use_ttk} { + $win sashpos 0 $sash0 + } else { + $win sash place 0 $sash0 [lindex $s0 1] + } } set oldwidth($win) $w } @@ -2640,31 +2742,33 @@ proc bindall {event action} { } proc about {} { - global uifont + global uifont NS set w .about if {[winfo exists $w]} { raise $w return } - toplevel $w + ttk_toplevel $w wm title $w [mc "About gitk"] make_transient $w . message $w.m -text [mc " Gitk - a commit viewer for git -Copyright © 2005-2008 Paul Mackerras +Copyright \u00a9 2005-2009 Paul Mackerras Use and redistribute under the terms of the GNU General Public License"] \ -justify center -aspect 400 -border 2 -bg white -relief groove pack $w.m -side top -fill x -padx 2 -pady 2 - button $w.ok -text [mc "Close"] -command "destroy $w" -default active + ${NS}::button $w.ok -text [mc "Close"] -command "destroy $w" -default active pack $w.ok -side bottom bind $w "focus $w.ok" bind $w "destroy $w" bind $w "destroy $w" + tk::PlaceWindow $w widget . } proc keys {} { + global NS set w .keys if {[winfo exists $w]} { raise $w @@ -2675,7 +2779,7 @@ proc keys {} { } else { set M1T Ctrl } - toplevel $w + ttk_toplevel $w wm title $w [mc "Gitk key bindings"] make_transient $w . message $w.m -text " @@ -2719,7 +2823,7 @@ proc keys {} { " \ -justify left -bg white -border 2 -relief groove pack $w.m -side top -fill both -padx 2 -pady 2 - button $w.ok -text [mc "Close"] -command "destroy $w" -default active + ${NS}::button $w.ok -text [mc "Close"] -command "destroy $w" -default active bind $w [list destroy $w] pack $w.ok -side bottom bind $w "focus $w.ok" @@ -3694,7 +3798,7 @@ proc encode_view_opts {n} { set pattern [lindex $patterns 0] set val $newviewopts($n,[lindex $opt 0]) - + if {[lindex $opt 1] eq "b"} { if {$val} { lappend rargs $pattern @@ -3782,16 +3886,16 @@ proc editview {} { proc vieweditor {top n title} { global newviewname newviewopts viewfiles bgcolor - global known_view_options + global known_view_options NS - toplevel $top + ttk_toplevel $top wm title $top $title make_transient $top . # View name - frame $top.nfr - label $top.nl -text [mc "Name"] - entry $top.name -width 20 -textvariable newviewname($n) + ${NS}::frame $top.nfr + ${NS}::label $top.nl -text [mc "Name"] + ${NS}::entry $top.name -width 20 -textvariable newviewname($n) pack $top.nfr -in $top -fill x -pady 5 -padx 3 pack $top.nl -in $top.nfr -side left -padx {0 30} pack $top.name -in $top.nfr -side left @@ -3810,7 +3914,7 @@ proc vieweditor {top n title} { if {$flags eq "+" || $flags eq "*"} { set cframe $top.fr$cnt incr cnt - frame $cframe + ${NS}::frame $cframe pack $cframe -in $top -fill x -pady 3 -padx 3 set cexpand [expr {$flags eq "*"}] } else { @@ -3818,18 +3922,18 @@ proc vieweditor {top n title} { } if {$type eq "b"} { - checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id) + ${NS}::checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id) pack $cframe.c_$id -in $cframe -side left \ -padx [list $lxpad 0] -expand $cexpand -anchor w } elseif {[regexp {^t(\d+)$} $type type sz]} { - message $cframe.l_$id -aspect 1500 -text $title - entry $cframe.e_$id -width $sz -background $bgcolor \ + ${NS}::label $cframe.l_$id -text $title + ${NS}::entry $cframe.e_$id -width $sz -background $bgcolor \ -textvariable newviewopts($n,$id) pack $cframe.l_$id -in $cframe -side left -padx [list $lxpad 0] pack $cframe.e_$id -in $cframe -side left -expand 1 -fill x } elseif {[regexp {^t(\d+)=$} $type type sz]} { - message $cframe.l_$id -aspect 1500 -text $title - entry $cframe.e_$id -width $sz -background $bgcolor \ + ${NS}::label $cframe.l_$id -text $title + ${NS}::entry $cframe.e_$id -width $sz -background $bgcolor \ -textvariable newviewopts($n,$id) pack $cframe.l_$id -in $cframe -side top -pady [list 3 0] -anchor w pack $cframe.e_$id -in $cframe -side top -fill x @@ -3837,7 +3941,7 @@ proc vieweditor {top n title} { } # Path list - message $top.l -aspect 1500 \ + ${NS}::label $top.l \ -text [mc "Enter files and directories to include, one per line:"] pack $top.l -in $top -side top -pady [list 7 0] -anchor w -padx 3 text $top.t -width 40 -height 5 -background $bgcolor -font uifont @@ -3850,10 +3954,10 @@ proc vieweditor {top n title} { $top.t mark set insert 0.0 } pack $top.t -in $top -side top -pady [list 0 5] -fill both -expand 1 -padx 3 - frame $top.buts - button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n] - button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1] - button $top.buts.can -text [mc "Cancel"] -command [list destroy $top] + ${NS}::frame $top.buts + ${NS}::button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n] + ${NS}::button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1] + ${NS}::button $top.buts.can -text [mc "Cancel"] -command [list destroy $top] bind $top [list newviewok $top $n] bind $top [list newviewok $top $n 1] bind $top [list destroy $top] @@ -6723,8 +6827,7 @@ proc selectline {l isnew {desired_loc {}}} { $sha1entry delete 0 end $sha1entry insert 0 $id if {$autoselect} { - $sha1entry selection from 0 - $sha1entry selection to end + $sha1entry selection range 0 end } rhighlight_sel $id @@ -8332,7 +8435,7 @@ proc doseldiff {oldid newid} { } proc mkpatch {} { - global rowmenuid currentid commitinfo patchtop patchnum + global rowmenuid currentid commitinfo patchtop patchnum NS if {![info exists currentid]} return set oldid $currentid @@ -8342,38 +8445,38 @@ proc mkpatch {} { set top .patch set patchtop $top catch {destroy $top} - toplevel $top + ttk_toplevel $top make_transient $top . - label $top.title -text [mc "Generate patch"] + ${NS}::label $top.title -text [mc "Generate patch"] grid $top.title - -pady 10 - label $top.from -text [mc "From:"] - entry $top.fromsha1 -width 40 -relief flat + ${NS}::label $top.from -text [mc "From:"] + ${NS}::entry $top.fromsha1 -width 40 $top.fromsha1 insert 0 $oldid $top.fromsha1 conf -state readonly grid $top.from $top.fromsha1 -sticky w - entry $top.fromhead -width 60 -relief flat + ${NS}::entry $top.fromhead -width 60 $top.fromhead insert 0 $oldhead $top.fromhead conf -state readonly grid x $top.fromhead -sticky w - label $top.to -text [mc "To:"] - entry $top.tosha1 -width 40 -relief flat + ${NS}::label $top.to -text [mc "To:"] + ${NS}::entry $top.tosha1 -width 40 $top.tosha1 insert 0 $newid $top.tosha1 conf -state readonly grid $top.to $top.tosha1 -sticky w - entry $top.tohead -width 60 -relief flat + ${NS}::entry $top.tohead -width 60 $top.tohead insert 0 $newhead $top.tohead conf -state readonly grid x $top.tohead -sticky w - button $top.rev -text [mc "Reverse"] -command mkpatchrev -padx 5 - grid $top.rev x -pady 10 - label $top.flab -text [mc "Output file:"] - entry $top.fname -width 60 + ${NS}::button $top.rev -text [mc "Reverse"] -command mkpatchrev + grid $top.rev x -pady 10 -padx 5 + ${NS}::label $top.flab -text [mc "Output file:"] + ${NS}::entry $top.fname -width 60 $top.fname insert 0 [file normalize "patch$patchnum.patch"] incr patchnum grid $top.flab $top.fname -sticky w - frame $top.buts - button $top.buts.gen -text [mc "Generate"] -command mkpatchgo - button $top.buts.can -text [mc "Cancel"] -command mkpatchcan + ${NS}::frame $top.buts + ${NS}::button $top.buts.gen -text [mc "Generate"] -command mkpatchgo + ${NS}::button $top.buts.can -text [mc "Cancel"] -command mkpatchcan bind $top mkpatchgo bind $top mkpatchcan grid $top.buts.gen $top.buts.can @@ -8424,30 +8527,30 @@ proc mkpatchcan {} { } proc mktag {} { - global rowmenuid mktagtop commitinfo + global rowmenuid mktagtop commitinfo NS set top .maketag set mktagtop $top catch {destroy $top} - toplevel $top + ttk_toplevel $top make_transient $top . - label $top.title -text [mc "Create tag"] + ${NS}::label $top.title -text [mc "Create tag"] grid $top.title - -pady 10 - label $top.id -text [mc "ID:"] - entry $top.sha1 -width 40 -relief flat + ${NS}::label $top.id -text [mc "ID:"] + ${NS}::entry $top.sha1 -width 40 $top.sha1 insert 0 $rowmenuid $top.sha1 conf -state readonly grid $top.id $top.sha1 -sticky w - entry $top.head -width 60 -relief flat + ${NS}::entry $top.head -width 60 $top.head insert 0 [lindex $commitinfo($rowmenuid) 0] $top.head conf -state readonly grid x $top.head -sticky w - label $top.tlab -text [mc "Tag name:"] - entry $top.tag -width 60 + ${NS}::label $top.tlab -text [mc "Tag name:"] + ${NS}::entry $top.tag -width 60 grid $top.tlab $top.tag -sticky w - frame $top.buts - button $top.buts.gen -text [mc "Create"] -command mktaggo - button $top.buts.can -text [mc "Cancel"] -command mktagcan + ${NS}::frame $top.buts + ${NS}::button $top.buts.gen -text [mc "Create"] -command mktaggo + ${NS}::button $top.buts.can -text [mc "Cancel"] -command mktagcan bind $top mktaggo bind $top mktagcan grid $top.buts.gen $top.buts.can @@ -8530,34 +8633,34 @@ proc mktaggo {} { } proc writecommit {} { - global rowmenuid wrcomtop commitinfo wrcomcmd + global rowmenuid wrcomtop commitinfo wrcomcmd NS set top .writecommit set wrcomtop $top catch {destroy $top} - toplevel $top + ttk_toplevel $top make_transient $top . - label $top.title -text [mc "Write commit to file"] + ${NS}::label $top.title -text [mc "Write commit to file"] grid $top.title - -pady 10 - label $top.id -text [mc "ID:"] - entry $top.sha1 -width 40 -relief flat + ${NS}::label $top.id -text [mc "ID:"] + ${NS}::entry $top.sha1 -width 40 $top.sha1 insert 0 $rowmenuid $top.sha1 conf -state readonly grid $top.id $top.sha1 -sticky w - entry $top.head -width 60 -relief flat + ${NS}::entry $top.head -width 60 $top.head insert 0 [lindex $commitinfo($rowmenuid) 0] $top.head conf -state readonly grid x $top.head -sticky w - label $top.clab -text [mc "Command:"] - entry $top.cmd -width 60 -textvariable wrcomcmd + ${NS}::label $top.clab -text [mc "Command:"] + ${NS}::entry $top.cmd -width 60 -textvariable wrcomcmd grid $top.clab $top.cmd -sticky w -pady 10 - label $top.flab -text [mc "Output file:"] - entry $top.fname -width 60 + ${NS}::label $top.flab -text [mc "Output file:"] + ${NS}::entry $top.fname -width 60 $top.fname insert 0 [file normalize "commit-[string range $rowmenuid 0 6]"] grid $top.flab $top.fname -sticky w - frame $top.buts - button $top.buts.gen -text [mc "Write"] -command wrcomgo - button $top.buts.can -text [mc "Cancel"] -command wrcomcan + ${NS}::frame $top.buts + ${NS}::button $top.buts.gen -text [mc "Write"] -command wrcomgo + ${NS}::button $top.buts.can -text [mc "Cancel"] -command wrcomcan bind $top wrcomgo bind $top wrcomcan grid $top.buts.gen $top.buts.can @@ -8588,25 +8691,25 @@ proc wrcomcan {} { } proc mkbranch {} { - global rowmenuid mkbrtop + global rowmenuid mkbrtop NS set top .makebranch catch {destroy $top} - toplevel $top + ttk_toplevel $top make_transient $top . - label $top.title -text [mc "Create new branch"] + ${NS}::label $top.title -text [mc "Create new branch"] grid $top.title - -pady 10 - label $top.id -text [mc "ID:"] - entry $top.sha1 -width 40 -relief flat + ${NS}::label $top.id -text [mc "ID:"] + ${NS}::entry $top.sha1 -width 40 $top.sha1 insert 0 $rowmenuid $top.sha1 conf -state readonly grid $top.id $top.sha1 -sticky w - label $top.nlab -text [mc "Name:"] - entry $top.name -width 40 + ${NS}::label $top.nlab -text [mc "Name:"] + ${NS}::entry $top.name -width 40 grid $top.nlab $top.name -sticky w - frame $top.buts - button $top.buts.go -text [mc "Create"] -command [list mkbrgo $top] - button $top.buts.can -text [mc "Cancel"] -command "catch {destroy $top}" + ${NS}::frame $top.buts + ${NS}::button $top.buts.go -text [mc "Create"] -command [list mkbrgo $top] + ${NS}::button $top.buts.can -text [mc "Cancel"] -command "catch {destroy $top}" bind $top [list mkbrgo $top] bind $top "catch {destroy $top}" grid $top.buts.go $top.buts.can @@ -8751,34 +8854,31 @@ proc cherrypick {} { } proc resethead {} { - global mainhead rowmenuid confirm_ok resettype + global mainhead rowmenuid confirm_ok resettype NS set confirm_ok 0 set w ".confirmreset" - toplevel $w + ttk_toplevel $w make_transient $w . wm title $w [mc "Confirm reset"] - message $w.m -text \ - [mc "Reset branch %s to %s?" $mainhead [string range $rowmenuid 0 7]] \ - -justify center -aspect 1000 + ${NS}::label $w.m -text \ + [mc "Reset branch %s to %s?" $mainhead [string range $rowmenuid 0 7]] pack $w.m -side top -fill x -padx 20 -pady 20 - frame $w.f -relief sunken -border 2 - message $w.f.rt -text [mc "Reset type:"] -aspect 1000 - grid $w.f.rt -sticky w + ${NS}::labelframe $w.f -text [mc "Reset type:"] set resettype mixed - radiobutton $w.f.soft -value soft -variable resettype -justify left \ + ${NS}::radiobutton $w.f.soft -value soft -variable resettype \ -text [mc "Soft: Leave working tree and index untouched"] grid $w.f.soft -sticky w - radiobutton $w.f.mixed -value mixed -variable resettype -justify left \ + ${NS}::radiobutton $w.f.mixed -value mixed -variable resettype \ -text [mc "Mixed: Leave working tree untouched, reset index"] grid $w.f.mixed -sticky w - radiobutton $w.f.hard -value hard -variable resettype -justify left \ + ${NS}::radiobutton $w.f.hard -value hard -variable resettype \ -text [mc "Hard: Reset working tree and index\n(discard ALL local changes)"] grid $w.f.hard -sticky w - pack $w.f -side top -fill x - button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w" + pack $w.f -side top -fill x -padx 4 + ${NS}::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w" pack $w.ok -side left -fill x -padx 20 -pady 20 - button $w.cancel -text [mc Cancel] -command "destroy $w" + ${NS}::button $w.cancel -text [mc Cancel] -command "destroy $w" bind $w [list destroy $w] pack $w.cancel -side right -fill x -padx 20 -pady 20 bind $w "grab $w; focus $w" @@ -8926,7 +9026,7 @@ proc rmbranch {} { # Display a list of tags and heads proc showrefs {} { - global showrefstop bgcolor fgcolor selectbgcolor + global showrefstop bgcolor fgcolor selectbgcolor NS global bglist fglist reflistfilter reflist maincursor set top .showrefs @@ -8936,7 +9036,7 @@ proc showrefs {} { refill_reflist return } - toplevel $top + ttk_toplevel $top wm title $top [mc "Tags and heads: %s" [file tail [pwd]]] make_transient $top . text $top.list -background $bgcolor -foreground $fgcolor \ @@ -8947,19 +9047,19 @@ proc showrefs {} { $top.list tag configure highlight -background $selectbgcolor lappend bglist $top.list lappend fglist $top.list - scrollbar $top.ysb -command "$top.list yview" -orient vertical - scrollbar $top.xsb -command "$top.list xview" -orient horizontal + ${NS}::scrollbar $top.ysb -command "$top.list yview" -orient vertical + ${NS}::scrollbar $top.xsb -command "$top.list xview" -orient horizontal grid $top.list $top.ysb -sticky nsew grid $top.xsb x -sticky ew - frame $top.f - label $top.f.l -text "[mc "Filter"]: " - entry $top.f.e -width 20 -textvariable reflistfilter + ${NS}::frame $top.f + ${NS}::label $top.f.l -text "[mc "Filter"]: " + ${NS}::entry $top.f.e -width 20 -textvariable reflistfilter set reflistfilter "*" trace add variable reflistfilter write reflistfilter_change pack $top.f.e -side right -fill x -expand 1 pack $top.f.l -side left grid $top.f - -sticky ew -pady 2 - button $top.close -command [list destroy $top] -text [mc "Close"] + ${NS}::button $top.close -command [list destroy $top] -text [mc "Close"] bind $top [list destroy $top] grid $top.close - grid columnconfigure $top 0 -weight 1 @@ -9157,7 +9257,7 @@ proc getallclines {fd} { global allparents allchildren idtags idheads nextarc global arcnos arcids arctags arcout arcend arcstart archeads growing global seeds allcommits cachedarcs allcupdate - + set nid 0 while {[incr nid] <= 1000 && [gets $fd line] >= 0} { set id [lindex $line 0] @@ -10255,19 +10355,20 @@ proc doquit {} { } proc mkfontdisp {font top which} { - global fontattr fontpref $font + global fontattr fontpref $font NS use_ttk set fontpref($font) [set $font] - button $top.${font}but -text $which -font optionfont \ + ${NS}::button $top.${font}but -text $which \ -command [list choosefont $font $which] - label $top.$font -relief flat -font $font \ + if {!$use_ttk} {$top.${font}but configure -font optionfont} + ${NS}::label $top.$font -relief flat -font $font \ -text $fontattr($font,family) -justify left grid x $top.${font}but $top.$font -sticky w } proc choosefont {font which} { global fontparam fontlist fonttop fontattr - global prefstop + global prefstop NS set fontparam(which) $which set fontparam(font) $font @@ -10280,21 +10381,21 @@ proc choosefont {font which} { if {![winfo exists $top]} { font create sample eval font config sample [font actual $font] - toplevel $top + ttk_toplevel $top make_transient $top $prefstop wm title $top [mc "Gitk font chooser"] - label $top.l -textvariable fontparam(which) + ${NS}::label $top.l -textvariable fontparam(which) pack $top.l -side top set fontlist [lsort [font families]] - frame $top.f + ${NS}::frame $top.f listbox $top.f.fam -listvariable fontlist \ -yscrollcommand [list $top.f.sb set] bind $top.f.fam <> selfontfam - scrollbar $top.f.sb -command [list $top.f.fam yview] + ${NS}::scrollbar $top.f.sb -command [list $top.f.fam yview] pack $top.f.sb -side right -fill y pack $top.f.fam -side left -fill both -expand 1 pack $top.f -side top -fill both -expand 1 - frame $top.g + ${NS}::frame $top.g spinbox $top.g.size -from 4 -to 40 -width 4 \ -textvariable fontparam(size) \ -validatecommand {string is integer -strict %s} @@ -10312,9 +10413,9 @@ proc choosefont {font which} { -fill black -tags text bind $top.c [list centertext $top.c] pack $top.c -side top -fill x - frame $top.buts - button $top.buts.ok -text [mc "OK"] -command fontok -default active - button $top.buts.can -text [mc "Cancel"] -command fontcan -default normal + ${NS}::frame $top.buts + ${NS}::button $top.buts.ok -text [mc "OK"] -command fontok -default active + ${NS}::button $top.buts.can -text [mc "Cancel"] -command fontcan -default normal bind $top fontok bind $top fontcan grid $top.buts.ok $top.buts.can @@ -10350,7 +10451,7 @@ proc fontok {} { } set w $prefstop.$f $w conf -text $fontparam(family) -font $fontpref($f) - + fontcan } @@ -10365,6 +10466,28 @@ proc fontcan {} { } } +if {[package vsatisfies [package provide Tk] 8.6]} { + # In Tk 8.6 we have a native font chooser dialog. Overwrite the above + # function to make use of it. + proc choosefont {font which} { + tk fontchooser configure -title $which -font $font \ + -command [list on_choosefont $font $which] + tk fontchooser show + } + proc on_choosefont {font which newfont} { + global fontparam + puts stderr "$font $newfont" + array set f [font actual $newfont] + set fontparam(which) $which + set fontparam(font) $font + set fontparam(family) $f(-family) + set fontparam(size) $f(-size) + set fontparam(weight) $f(-weight) + set fontparam(slant) $f(-slant) + fontok + } +} + proc selfontfam {} { global fonttop fontparam @@ -10381,7 +10504,7 @@ proc chg_fontparam {v sub op} { } proc doprefs {} { - global maxwidth maxgraphpct + global maxwidth maxgraphpct use_ttk NS global oldprefs prefstop showneartags showlocalchanges global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor global tabstop limitdiffs autoselect extdifftool perfile_attrs @@ -10396,103 +10519,109 @@ proc doprefs {} { limitdiffs tabstop perfile_attrs} { set oldprefs($v) [set $v] } - toplevel $top + ttk_toplevel $top wm title $top [mc "Gitk preferences"] make_transient $top . - label $top.ldisp -text [mc "Commit list display options"] + ${NS}::label $top.ldisp -text [mc "Commit list display options"] grid $top.ldisp - -sticky w -pady 10 - label $top.spacer -text " " - label $top.maxwidthl -text [mc "Maximum graph width (lines)"] \ - -font optionfont + ${NS}::label $top.spacer -text " " + ${NS}::label $top.maxwidthl -text [mc "Maximum graph width (lines)"] spinbox $top.maxwidth -from 0 -to 100 -width 4 -textvariable maxwidth grid $top.spacer $top.maxwidthl $top.maxwidth -sticky w - label $top.maxpctl -text [mc "Maximum graph width (% of pane)"] \ - -font optionfont + ${NS}::label $top.maxpctl -text [mc "Maximum graph width (% of pane)"] spinbox $top.maxpct -from 1 -to 100 -width 4 -textvariable maxgraphpct grid x $top.maxpctl $top.maxpct -sticky w - checkbutton $top.showlocal -text [mc "Show local changes"] \ - -font optionfont -variable showlocalchanges + ${NS}::checkbutton $top.showlocal -text [mc "Show local changes"] \ + -variable showlocalchanges grid x $top.showlocal -sticky w - checkbutton $top.autoselect -text [mc "Auto-select SHA1"] \ - -font optionfont -variable autoselect + ${NS}::checkbutton $top.autoselect -text [mc "Auto-select SHA1"] \ + -variable autoselect grid x $top.autoselect -sticky w - label $top.ddisp -text [mc "Diff display options"] + ${NS}::label $top.ddisp -text [mc "Diff display options"] grid $top.ddisp - -sticky w -pady 10 - label $top.tabstopl -text [mc "Tab spacing"] -font optionfont + ${NS}::label $top.tabstopl -text [mc "Tab spacing"] spinbox $top.tabstop -from 1 -to 20 -width 4 -textvariable tabstop grid x $top.tabstopl $top.tabstop -sticky w - checkbutton $top.ntag -text [mc "Display nearby tags"] \ - -font optionfont -variable showneartags + ${NS}::checkbutton $top.ntag -text [mc "Display nearby tags"] \ + -variable showneartags grid x $top.ntag -sticky w - checkbutton $top.ldiff -text [mc "Limit diffs to listed paths"] \ - -font optionfont -variable limitdiffs + ${NS}::checkbutton $top.ldiff -text [mc "Limit diffs to listed paths"] \ + -variable limitdiffs grid x $top.ldiff -sticky w - checkbutton $top.lattr -text [mc "Support per-file encodings"] \ - -font optionfont -variable perfile_attrs + ${NS}::checkbutton $top.lattr -text [mc "Support per-file encodings"] \ + -variable perfile_attrs grid x $top.lattr -sticky w - entry $top.extdifft -textvariable extdifftool - frame $top.extdifff - label $top.extdifff.l -text [mc "External diff tool" ] -font optionfont \ - -padx 10 - button $top.extdifff.b -text [mc "Choose..."] -font optionfont \ - -command choose_extdiff + ${NS}::entry $top.extdifft -textvariable extdifftool + ${NS}::frame $top.extdifff + ${NS}::label $top.extdifff.l -text [mc "External diff tool" ] + ${NS}::button $top.extdifff.b -text [mc "Choose..."] -command choose_extdiff pack $top.extdifff.l $top.extdifff.b -side left - grid x $top.extdifff $top.extdifft -sticky w + pack configure $top.extdifff.l -padx 10 + grid x $top.extdifff $top.extdifft -sticky ew - label $top.cdisp -text [mc "Colors: press to choose"] + ${NS}::label $top.cdisp -text [mc "Colors: press to choose"] grid $top.cdisp - -sticky w -pady 10 label $top.bg -padx 40 -relief sunk -background $bgcolor - button $top.bgbut -text [mc "Background"] -font optionfont \ + ${NS}::button $top.bgbut -text [mc "Background"] \ -command [list choosecolor bgcolor {} $top.bg [mc "background"] setbg] grid x $top.bgbut $top.bg -sticky w label $top.fg -padx 40 -relief sunk -background $fgcolor - button $top.fgbut -text [mc "Foreground"] -font optionfont \ + ${NS}::button $top.fgbut -text [mc "Foreground"] \ -command [list choosecolor fgcolor {} $top.fg [mc "foreground"] setfg] grid x $top.fgbut $top.fg -sticky w label $top.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0] - button $top.diffoldbut -text [mc "Diff: old lines"] -font optionfont \ + ${NS}::button $top.diffoldbut -text [mc "Diff: old lines"] \ -command [list choosecolor diffcolors 0 $top.diffold [mc "diff old lines"] \ [list $ctext tag conf d0 -foreground]] grid x $top.diffoldbut $top.diffold -sticky w label $top.diffnew -padx 40 -relief sunk -background [lindex $diffcolors 1] - button $top.diffnewbut -text [mc "Diff: new lines"] -font optionfont \ + ${NS}::button $top.diffnewbut -text [mc "Diff: new lines"] \ -command [list choosecolor diffcolors 1 $top.diffnew [mc "diff new lines"] \ [list $ctext tag conf dresult -foreground]] grid x $top.diffnewbut $top.diffnew -sticky w label $top.hunksep -padx 40 -relief sunk -background [lindex $diffcolors 2] - button $top.hunksepbut -text [mc "Diff: hunk header"] -font optionfont \ + ${NS}::button $top.hunksepbut -text [mc "Diff: hunk header"] \ -command [list choosecolor diffcolors 2 $top.hunksep \ [mc "diff hunk header"] \ [list $ctext tag conf hunksep -foreground]] grid x $top.hunksepbut $top.hunksep -sticky w label $top.markbgsep -padx 40 -relief sunk -background $markbgcolor - button $top.markbgbut -text [mc "Marked line bg"] -font optionfont \ + ${NS}::button $top.markbgbut -text [mc "Marked line bg"] \ -command [list choosecolor markbgcolor {} $top.markbgsep \ [mc "marked line background"] \ [list $ctext tag conf omark -background]] grid x $top.markbgbut $top.markbgsep -sticky w label $top.selbgsep -padx 40 -relief sunk -background $selectbgcolor - button $top.selbgbut -text [mc "Select bg"] -font optionfont \ + ${NS}::button $top.selbgbut -text [mc "Select bg"] \ -command [list choosecolor selectbgcolor {} $top.selbgsep [mc "background"] setselbg] grid x $top.selbgbut $top.selbgsep -sticky w - label $top.cfont -text [mc "Fonts: press to choose"] + ${NS}::label $top.cfont -text [mc "Fonts: press to choose"] grid $top.cfont - -sticky w -pady 10 mkfontdisp mainfont $top [mc "Main font"] mkfontdisp textfont $top [mc "Diff display font"] mkfontdisp uifont $top [mc "User interface font"] - frame $top.buts - button $top.buts.ok -text [mc "OK"] -command prefsok -default active - button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal + if {!$use_ttk} { + foreach w {maxpctl maxwidthl showlocal autoselect tabstopl ntag + ldiff lattr extdifff.l extdifff.b bgbut fgbut + diffoldbut diffnewbut hunksepbut markbgbut selbgbut} { + $top.$w configure -font optionfont + } + } + + ${NS}::frame $top.buts + ${NS}::button $top.buts.ok -text [mc "OK"] -command prefsok -default active + ${NS}::button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal bind $top prefsok bind $top prefscan grid $top.buts.ok $top.buts.can grid columnconfigure $top.buts 0 -weight 1 -uniform a grid columnconfigure $top.buts 1 -weight 1 -uniform a grid $top.buts - - -pady 10 -sticky ew + grid columnconfigure $top 2 -weight 1 bind $top "focus $top.buts.ok" } @@ -11156,6 +11285,10 @@ set nullid2 "0000000000000000000000000000000000000001" set nullfile "/dev/null" set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}] +if {![info exists use_ttk]} { + set use_ttk [llength [info commands ::ttk::style]] +} +set NS [expr {$use_ttk ? "ttk" : ""}] set runq {} set history {} -- cgit v1.2.1 From 3cb1f9c9820357812a9f17df92008c8838cbc1fc Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Tue, 12 May 2009 15:45:06 +0100 Subject: gitk: Fix errors in the theme patch This fixes a typo in the commit selection combobox that prevented it from working properly, and sets the width of the widget. This also fixes show_error to handle errors arising before the gui is fully configured (ie: invalid command line parameters) Signed-off-by: Pat Thoyts Signed-off-by: Paul Mackerras --- gitk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gitk b/gitk index 4526193b3..082fa7751 100755 --- a/gitk +++ b/gitk @@ -1798,6 +1798,7 @@ proc make_transient {window origin} { proc show_error {w top msg} { global NS + if {![info exists NS]} {set NS ""} if {[wm state $top] eq "withdrawn"} { wm deiconify $top } message $w.m -text $msg -justify center -aspect 400 pack $w.m -side top -fill x -padx 20 -pady 20 @@ -1920,7 +1921,12 @@ proc mca {str} { proc makedroplist {w varname args} { global use_ttk if {$use_ttk} { - set gm [ttk::combobox $w -width 10 -state readonly\ + set width 0 + foreach label $args { + set cx [string length $label] + if {$cx > $width} {set width $cx} + } + set gm [ttk::combobox $w -width $width -state readonly\ -textvariable $varname -values $args] } else { set gm [eval [linsert $args 0 tk_optionMenu $w $varname]] @@ -2141,7 +2147,7 @@ proc makewindow {} { pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \ -side left -fill y set gdttype [mc "containing:"] - set gm [makedroplist .tf.lbar.gdttype gdtype \ + set gm [makedroplist .tf.lbar.gdttype gdttype \ [mc "containing:"] \ [mc "touching paths:"] \ [mc "adding/removing string:"]] -- cgit v1.2.1 From 0cc08ff7ddaf4360966bdedf006af041cdf6f7d9 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sat, 5 Sep 2009 22:06:46 +1000 Subject: gitk: Add a user preference to enable/disable use of themed widgets Also move the hide-remotes option up into the commit display options in the Edit->Preferences panel, since it affects the commit display more than the diff display. Signed-off-by: Paul Mackerras --- gitk | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/gitk b/gitk index 9d8afd839..4d427e23c 100755 --- a/gitk +++ b/gitk @@ -2606,7 +2606,7 @@ proc savestuff {w} { global cmitmode wrapcomment datetimeformat limitdiffs global colors bgcolor fgcolor diffcolors diffcontext selectbgcolor global autoselect extdifftool perfile_attrs markbgcolor use_ttk - global hideremotes + global hideremotes want_ttk if {$stuffsaved} return if {![winfo viewable .]} return @@ -2630,6 +2630,7 @@ proc savestuff {w} { puts $f [list set showlocalchanges $showlocalchanges] puts $f [list set datetimeformat $datetimeformat] puts $f [list set limitdiffs $limitdiffs] + puts $f [list set want_ttk $want_ttk] puts $f [list set bgcolor $bgcolor] puts $f [list set fgcolor $fgcolor] puts $f [list set colors $colors] @@ -10586,7 +10587,7 @@ proc doprefs {} { global oldprefs prefstop showneartags showlocalchanges global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor global tabstop limitdiffs autoselect extdifftool perfile_attrs - global hideremotes + global hideremotes want_ttk have_ttk set top .gitkprefs set prefstop $top @@ -10595,7 +10596,7 @@ proc doprefs {} { return } foreach v {maxwidth maxgraphpct showneartags showlocalchanges \ - limitdiffs tabstop perfile_attrs hideremotes} { + limitdiffs tabstop perfile_attrs hideremotes want_ttk} { set oldprefs($v) [set $v] } ttk_toplevel $top @@ -10616,6 +10617,9 @@ proc doprefs {} { ${NS}::checkbutton $top.autoselect -text [mc "Auto-select SHA1"] \ -variable autoselect grid x $top.autoselect -sticky w + ${NS}::checkbutton $top.hideremotes -text [mc "Hide remote refs"] \ + -variable hideremotes + grid x $top.hideremotes -sticky w ${NS}::label $top.ddisp -text [mc "Diff display options"] grid $top.ddisp - -sticky w -pady 10 @@ -10625,9 +10629,6 @@ proc doprefs {} { ${NS}::checkbutton $top.ntag -text [mc "Display nearby tags"] \ -variable showneartags grid x $top.ntag -sticky w - ${NS}::checkbutton $top.hideremotes -text [mc "Hide remote refs"] \ - -variable hideremotes - grid x $top.hideremotes -sticky w ${NS}::checkbutton $top.ldiff -text [mc "Limit diffs to listed paths"] \ -variable limitdiffs grid x $top.ldiff -sticky w @@ -10643,6 +10644,17 @@ proc doprefs {} { pack configure $top.extdifff.l -padx 10 grid x $top.extdifff $top.extdifft -sticky ew + ${NS}::label $top.lgen -text [mc "General options"] + grid $top.lgen - -sticky w -pady 10 + ${NS}::checkbutton $top.want_ttk -variable want_ttk \ + -text [mc "Use themed widgets"] + if {$have_ttk} { + ${NS}::label $top.ttk_note -text [mc "(change requires restart)"] + } else { + ${NS}::label $top.ttk_note -text [mc "(currently unavailable)"] + } + grid x $top.want_ttk $top.ttk_note -sticky w + ${NS}::label $top.cdisp -text [mc "Colors: press to choose"] grid $top.cdisp - -sticky w -pady 10 label $top.bg -padx 40 -relief sunk -background $bgcolor @@ -10689,7 +10701,8 @@ proc doprefs {} { if {!$use_ttk} { foreach w {maxpctl maxwidthl showlocal autoselect tabstopl ntag ldiff lattr extdifff.l extdifff.b bgbut fgbut - diffoldbut diffnewbut hunksepbut markbgbut selbgbut} { + diffoldbut diffnewbut hunksepbut markbgbut selbgbut + want_ttk ttk_note} { $top.$w configure -font optionfont } } @@ -10760,7 +10773,7 @@ proc prefscan {} { global oldprefs prefstop foreach v {maxwidth maxgraphpct showneartags showlocalchanges \ - limitdiffs tabstop perfile_attrs hideremotes} { + limitdiffs tabstop perfile_attrs hideremotes want_ttk} { global $v set $v $oldprefs($v) } @@ -11236,6 +11249,7 @@ set limitdiffs 1 set datetimeformat "%Y-%m-%d %H:%M:%S" set autoselect 1 set perfile_attrs 0 +set want_ttk 1 if {[tk windowingsystem] eq "aqua"} { set extdifftool "opendiff" @@ -11372,10 +11386,12 @@ set nullid2 "0000000000000000000000000000000000000001" set nullfile "/dev/null" set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}] -if {![info exists use_ttk]} { - set use_ttk [llength [info commands ::ttk::style]] +if {![info exists have_ttk]} { + set have_ttk [llength [info commands ::ttk::style]] } +set use_ttk [expr {$have_ttk && $want_ttk}] set NS [expr {$use_ttk ? "ttk" : ""}] + set git_version [join [lrange [split [lindex [exec git version] end] .] 0 2] .] set runq {} -- cgit v1.2.1 From 4a3da5d91a4768a8abe6a8c64f1c3a49125a5bcf Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Mon, 7 Sep 2009 10:08:21 +1000 Subject: gitk: Show diff of commits at end of compare-commits output When comparing a string of commits, when we find two non-merge commits that differ, we now write the two commits to files and diff the files. This pulls out the logic for creating a temporary directory from external_diff into a separate procedure so that the new diffcommits procedure can use it. Because the diff command returns an exit status of 1 when the files differ, and Tcl treats that as an error, this adds catch {} around the close statements in getblobdiffline. At present this only removes the temporary files when gitk exits. It should remove them when the diff is done. Signed-off-by: Paul Mackerras --- gitk | 81 ++++++++++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/gitk b/gitk index 4d427e23c..34067b9ec 100755 --- a/gitk +++ b/gitk @@ -3278,6 +3278,28 @@ proc flist_hl {only} { set gdttype [mc "touching paths:"] } +proc gitknewtmpdir {} { + global diffnum gitktmpdir gitdir + + if {![info exists gitktmpdir]} { + set gitktmpdir [file join [file dirname $gitdir] \ + [format ".gitk-tmp.%s" [pid]]] + if {[catch {file mkdir $gitktmpdir} err]} { + error_popup "[mc "Error creating temporary directory %s:" $gitktmpdir] $err" + unset gitktmpdir + return {} + } + set diffnum 0 + } + incr diffnum + set diffdir [file join $gitktmpdir $diffnum] + if {[catch {file mkdir $diffdir} err]} { + error_popup "[mc "Error creating temporary directory %s:" $diffdir] $err" + return {} + } + return $diffdir +} + proc save_file_from_commit {filename output what} { global nullfile @@ -3312,11 +3334,10 @@ proc external_diff_get_one_file {diffid filename diffdir} { } proc external_diff {} { - global gitktmpdir nullid nullid2 + global nullid nullid2 global flist_menu_file global diffids - global diffnum - global gitdir extdifftool + global extdifftool if {[llength $diffids] == 1} { # no reference commit given @@ -3338,22 +3359,8 @@ proc external_diff {} { } # make sure that several diffs wont collide - if {![info exists gitktmpdir]} { - set gitktmpdir [file join [file dirname $gitdir] \ - [format ".gitk-tmp.%s" [pid]]] - if {[catch {file mkdir $gitktmpdir} err]} { - error_popup "[mc "Error creating temporary directory %s:" $gitktmpdir] $err" - unset gitktmpdir - return - } - set diffnum 0 - } - incr diffnum - set diffdir [file join $gitktmpdir $diffnum] - if {[catch {file mkdir $diffdir} err]} { - error_popup "[mc "Error creating temporary directory %s:" $diffdir] $err" - return - } + set diffdir [gitknewtmpdir] + if {$diffdir eq {}} return # gather files to diff set difffromfile [external_diff_get_one_file $diffidfrom $flist_menu_file $diffdir] @@ -7573,7 +7580,7 @@ proc getblobdiffline {bdf ids} { $ctext conf -state normal while {[incr nr] <= 1000 && [gets $bdf line] >= 0} { if {$ids != $diffids || $bdf != $blobdifffd($ids)} { - close $bdf + catch {close $bdf} return 0 } if {![string compare -length 5 "diff " $line]} { @@ -7726,7 +7733,7 @@ proc getblobdiffline {bdf ids} { maybe_scroll_ctext [eof $bdf] $ctext conf -state disabled if {[eof $bdf]} { - close $bdf + catch {close $bdf} return 0 } return [expr {$nr >= 1000? 2: 1}] @@ -8448,8 +8455,11 @@ proc do_cmp_commits {a b} { appendshortlink $a [mc "Commit "] " $heada\n" appendshortlink $b [mc " differs from\n "] \ " $headb\n" - $ctext insert end [mc "- stopping\n"] - break + $ctext insert end [mc "Diff of commits:\n\n"] + $ctext conf -state disabled + update + diffcommits $a $b + return } } if {$skipa} { @@ -8475,6 +8485,31 @@ proc do_cmp_commits {a b} { $ctext conf -state disabled } +proc diffcommits {a b} { + global diffcontext diffids blobdifffd diffinhdr + + set tmpdir [gitknewtmpdir] + set fna [file join $tmpdir "commit-[string range $a 0 7]"] + set fnb [file join $tmpdir "commit-[string range $b 0 7]"] + if {[catch { + exec git diff-tree -p --pretty $a >$fna + exec git diff-tree -p --pretty $b >$fnb + } err]} { + error_popup [mc "Error writing commit to file: %s" $err] + return + } + if {[catch { + set fd [open "| diff -U$diffcontext $fna $fnb" r] + } err]} { + error_popup [mc "Error diffing commits: %s" $err] + return + } + set diffids [list commits $a $b] + set blobdifffd($diffids) $fd + set diffinhdr 0 + filerun $fd [list getblobdiffline $fd $diffids] +} + proc diffvssel {dirn} { global rowmenuid selectedline -- cgit v1.2.1 From aa43561ac0c18dd6d200afe3a02e4e6c7e4beeae Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 10 Sep 2009 21:58:40 +1000 Subject: gitk: Don't compare fake children when comparing commits This fixes a bug where the compare-commits function would advance to a fake node (one representing local changes, either checked in but not committed, or not checked in) and then get an error when trying to get the patch-id. This fixes it by only considering the real children of each commit. Reported-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- gitk | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/gitk b/gitk index 34067b9ec..c0f38adb9 100755 --- a/gitk +++ b/gitk @@ -2,7 +2,7 @@ # Tcl ignores the next line -*- tcl -*- \ exec wish "$0" -- "$@" -# Copyright © 2005-2008 Paul Mackerras. All rights reserved. +# Copyright © 2005-2009 Paul Mackerras. All rights reserved. # This program is free software; it may be used, copied, modified # and distributed under the terms of the GNU General Public Licence, # either version 2, or (at your option) any later version. @@ -989,6 +989,18 @@ proc removefakerow {id} { drawvisible } +proc real_children {vp} { + global children nullid nullid2 + + set kids {} + foreach id $children($vp) { + if {$id ne $nullid && $id ne $nullid2} { + lappend kids $id + } + } + return $kids +} + proc first_real_child {vp} { global children nullid nullid2 @@ -8463,23 +8475,23 @@ proc do_cmp_commits {a b} { } } if {$skipa} { - if {[llength $children($curview,$a)] != 1} { + set kids [real_children $curview,$a] + if {[llength $kids] != 1} { $ctext insert end "\n" appendshortlink $a [mc "Commit "] \ - [mc " has %s children - stopping\n" \ - [llength $children($curview,$a)]] + [mc " has %s children - stopping\n" [llength $kids]] break } - set a [lindex $children($curview,$a) 0] + set a [lindex $kids 0] } if {$skipb} { - if {[llength $children($curview,$b)] != 1} { + set kids [real_children $curview,$b] + if {[llength $kids] != 1} { appendshortlink $b [mc "Commit "] \ - [mc " has %s children - stopping\n" \ - [llength $children($curview,$b)]] + [mc " has %s children - stopping\n" [llength $kids]] break } - set b [lindex $children($curview,$b) 0] + set b [lindex $kids 0] } } $ctext conf -state disabled -- cgit v1.2.1 From 5497f7a23ac11f9b230892220d5ed80263eedd1f Mon Sep 17 00:00:00 2001 From: "Guillermo S. Romero" Date: Thu, 15 Oct 2009 18:51:49 +0200 Subject: gitk: Add configuration for UI colour scheme This adds an option to control the global colour scheme in the Edit > Preferences dialog so that the whole interface can have a non-default main colour. Signed-off-by: Guillermo S. Romero Signed-off-by: Paul Mackerras --- gitk | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gitk b/gitk index a0214b700..d40a73548 100755 --- a/gitk +++ b/gitk @@ -2519,7 +2519,7 @@ proc savestuff {w} { global maxwidth showneartags showlocalchanges global viewname viewfiles viewargs viewargscmd viewperm nextviewnum global cmitmode wrapcomment datetimeformat limitdiffs - global colors bgcolor fgcolor diffcolors diffcontext selectbgcolor + global colors uicolor bgcolor fgcolor diffcolors diffcontext selectbgcolor global autoselect extdifftool perfile_attrs markbgcolor global hideremotes @@ -2546,6 +2546,7 @@ proc savestuff {w} { puts $f [list set showlocalchanges $showlocalchanges] puts $f [list set datetimeformat $datetimeformat] puts $f [list set limitdiffs $limitdiffs] + puts $f [list set uicolor $uicolor] puts $f [list set bgcolor $bgcolor] puts $f [list set fgcolor $fgcolor] puts $f [list set colors $colors] @@ -10425,7 +10426,7 @@ proc chg_fontparam {v sub op} { proc doprefs {} { global maxwidth maxgraphpct global oldprefs prefstop showneartags showlocalchanges - global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor + global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor global tabstop limitdiffs autoselect extdifftool perfile_attrs global hideremotes @@ -10489,6 +10490,10 @@ proc doprefs {} { label $top.cdisp -text [mc "Colors: press to choose"] grid $top.cdisp - -sticky w -pady 10 + label $top.ui -padx 40 -relief sunk -background $uicolor + button $top.uibut -text [mc "Interface"] -font optionfont \ + -command [list choosecolor uicolor {} $top.ui [mc "interface"] setui] + grid x $top.uibut $top.ui -sticky w label $top.bg -padx 40 -relief sunk -background $bgcolor button $top.bgbut -text [mc "Background"] -font optionfont \ -command [list choosecolor bgcolor {} $top.bg [mc "background"] setbg] @@ -10572,6 +10577,10 @@ proc setselbg {c} { allcanvs itemconf secsel -fill $c } +proc setui {c} { + tk_setPalette $c +} + proc setbg {c} { global bglist @@ -11079,6 +11088,7 @@ if {[tk windowingsystem] eq "aqua"} { } set colors {green red blue magenta darkgrey brown orange} +set uicolor grey85 set bgcolor white set fgcolor black set diffcolors {red "#00a000" blue} @@ -11130,6 +11140,8 @@ eval font create textfontbold [fontflags textfont 1] parsefont uifont $uifont eval font create uifont [fontflags uifont] +tk_setPalette $uicolor + setoptions # check that we can find a .git directory somewhere... -- cgit v1.2.1 From 90a77925417646041ac408e591f969d7477be0a9 Mon Sep 17 00:00:00 2001 From: Jens Lehmann Date: Tue, 27 Oct 2009 18:13:42 +0100 Subject: gitk: Fix diffing committed -> staged (typo in diffcmd) When highlighting a commit, using the context menu over the staged changes and then selecting "Diff this -> selected" the diff was empty. The same happened when highlighting the staged changes and using "Diff selected -> this" over a commit. The reason was a copy/paste error in [diffcmd]. This fixes it. Signed-off-by: Jens Lehmann Signed-off-by: Paul Mackerras --- gitk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitk b/gitk index d40a73548..785afd223 100755 --- a/gitk +++ b/gitk @@ -7225,7 +7225,7 @@ proc diffcmd {ids flags} { set cmd [concat | git diff-index --cached $flags] if {[llength $ids] > 1} { # comparing index with specific revision - if {$i == 0} { + if {$j == 0} { lappend cmd -R [lindex $ids 1] } else { lappend cmd [lindex $ids 0] -- cgit v1.2.1 From 5c838d23aa02476cfe91b0eea047b6d5857da770 Mon Sep 17 00:00:00 2001 From: Jens Lehmann Date: Wed, 28 Oct 2009 12:40:45 +0100 Subject: gitk: Use the --submodule option for displaying diffs when available When displaying diffs in a submodule, this makes gitk display the headlines of the commits being diffed, instead of just showing not-quite-helpful SHA-1 pairs, if the underlying git installation supports this. That makes it much easier to evaluate the changes, as it eliminates the need to start a gitk inside the submodule and use the superprojects hashes there to find out what the commits are about. Since the --submodule option of git diff is new in git version 1.6.6, this only uses the --submodule option when a git version of 1.6.6 or higher is detected. Signed-off-by: Jens Lehmann Signed-off-by: Paul Mackerras --- gitk | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/gitk b/gitk index 785afd223..59d592519 100755 --- a/gitk +++ b/gitk @@ -7344,7 +7344,11 @@ proc getblobdiffs {ids} { if {[package vcompare $git_version "1.6.1"] >= 0} { set textconv "--textconv" } - set cmd [diffcmd $ids "-p $textconv -C --cc --no-commit-id -U$diffcontext"] + set submodule {} + if {[package vcompare $git_version "1.6.6"] >= 0} { + set submodule "--submodule" + } + set cmd [diffcmd $ids "-p $textconv $submodule -C --cc --no-commit-id -U$diffcontext"] if {$ignorespace} { append cmd " -w" } @@ -7482,6 +7486,21 @@ proc getblobdiffline {bdf ids} { set diffnparents [expr {[string length $ats] - 1}] set diffinhdr 0 + } elseif {![string compare -length 10 "Submodule " $line]} { + # start of a new submodule + if {[string compare [$ctext get "end - 4c" end] "\n \n\n"]} { + $ctext insert end "\n"; # Add newline after commit message + } + set curdiffstart [$ctext index "end - 1c"] + lappend ctext_file_names "" + set fname [string range $line 10 [expr [string last " " $line] - 1]] + lappend ctext_file_lines $fname + makediffhdr $fname $ids + $ctext insert end "\n$line\n" filesep + } elseif {![string compare -length 3 " >" $line]} { + $ctext insert end "$line\n" dresult + } elseif {![string compare -length 3 " <" $line]} { + $ctext insert end "$line\n" d0 } elseif {$diffinhdr} { if {![string compare -length 12 "rename from " $line]} { set fname [string range $line [expr 6 + [string first " from " $line] ] end] -- cgit v1.2.1 From d40bc70ab88ab0d8fde20650c6ca132d3ca3cd2c Mon Sep 17 00:00:00 2001 From: Mizar Date: Fri, 30 Oct 2009 01:22:26 +0900 Subject: gitk: Add Japanese translation Signed-off-by: Paul Mackerras --- po/ja.po | 1245 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1245 insertions(+) create mode 100644 po/ja.po diff --git a/po/ja.po b/po/ja.po new file mode 100644 index 000000000..59d44a4e4 --- /dev/null +++ b/po/ja.po @@ -0,0 +1,1245 @@ +# Japanese translations for gitk package. +# Copyright (C) 2005-2009 Paul Mackerras +# This file is distributed under the same license as the gitk package. +# +# Mizar , 2009. +# Junio C Hamano , 2009. +msgid "" +msgstr "" +"Project-Id-Version: gitk\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-10-19 02:45+0900\n" +"PO-Revision-Date: 2009-10-19 17:03+0900\n" +"Last-Translator: Mizar \n" +"Language-Team: Japanese\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: gitk:113 +msgid "Couldn't get list of unmerged files:" +msgstr "マージされていないファイルのリストを取得できません:" + +#: gitk:269 +msgid "Error parsing revisions:" +msgstr "リビジョン解析エラー:" + +#: gitk:324 +msgid "Error executing --argscmd command:" +msgstr "--argscmd コマンド実行エラー:" + +#: gitk:337 +msgid "No files selected: --merge specified but no files are unmerged." +msgstr "ファイル未選択: --merge が指定されましたが、マージされていないファイルはありません。" + +#: gitk:340 +msgid "" +"No files selected: --merge specified but no unmerged files are within file " +"limit." +msgstr "ファイル未選択: --merge が指定されましたが、" +"ファイル制限内にマージされていないファイルはありません。" + +#: gitk:362 gitk:509 +msgid "Error executing git log:" +msgstr "git log 実行エラー:" + +#: gitk:380 gitk:525 +msgid "Reading" +msgstr "読み込み中" + +#: gitk:440 gitk:4131 +msgid "Reading commits..." +msgstr "コミット読み込み中..." + +#: gitk:443 gitk:1561 gitk:4134 +msgid "No commits selected" +msgstr "コミットが選択されていません" + +#: gitk:1437 +msgid "Can't parse git log output:" +msgstr "git log の出力を解析できません:" + +#: gitk:1657 +msgid "No commit information available" +msgstr "有効なコミットの情報がありません" + +#: gitk:1793 gitk:1817 gitk:3924 gitk:8822 gitk:10358 gitk:10534 +msgid "OK" +msgstr "OK" + +#: gitk:1819 gitk:3926 gitk:8419 gitk:8493 gitk:8603 gitk:8652 gitk:8824 +#: gitk:10359 gitk:10535 +msgid "Cancel" +msgstr "キャンセル" + +#: gitk:1919 +msgid "Update" +msgstr "更新" + +#: gitk:1920 +msgid "Reload" +msgstr "リロード" + +#: gitk:1921 +msgid "Reread references" +msgstr "リファレンスを再読み込み" + +#: gitk:1922 +msgid "List references" +msgstr "リファレンスリストを表示" + +#: gitk:1924 +msgid "Start git gui" +msgstr "git gui の開始" + +#: gitk:1926 +msgid "Quit" +msgstr "終了" + +#: gitk:1918 +msgid "File" +msgstr "ファイル" + +#: gitk:1930 +msgid "Preferences" +msgstr "設定" + +#: gitk:1929 +msgid "Edit" +msgstr "編集" + +#: gitk:1934 +msgid "New view..." +msgstr "新規ビュー..." + +#: gitk:1935 +msgid "Edit view..." +msgstr "ビュー編集..." + +#: gitk:1936 +msgid "Delete view" +msgstr "ビュー削除" + +#: gitk:1938 +msgid "All files" +msgstr "全てのファイル" + +#: gitk:1933 gitk:3678 +msgid "View" +msgstr "ビュー" + +#: gitk:1943 gitk:1953 gitk:2655 +msgid "About gitk" +msgstr "gitk について" + +#: gitk:1944 gitk:1958 +msgid "Key bindings" +msgstr "キーバインディング" + +#: gitk:1942 gitk:1957 +msgid "Help" +msgstr "ヘルプ" + +#: gitk:2018 +msgid "SHA1 ID: " +msgstr "SHA1 ID: " + +#: gitk:2049 +msgid "Row" +msgstr "行" + +#: gitk:2080 +msgid "Find" +msgstr "検索" + +#: gitk:2081 +msgid "next" +msgstr "次" + +#: gitk:2082 +msgid "prev" +msgstr "前" + +#: gitk:2083 +msgid "commit" +msgstr "コミット" + +#: gitk:2086 gitk:2088 gitk:4292 gitk:4315 gitk:4339 gitk:6280 gitk:6352 +#: gitk:6436 +msgid "containing:" +msgstr "含む:" + +#: gitk:2089 gitk:3163 gitk:3168 gitk:4367 +msgid "touching paths:" +msgstr "パスの一部:" + +#: gitk:2090 gitk:4372 +msgid "adding/removing string:" +msgstr "追加/除去する文字列:" + +#: gitk:2099 gitk:2101 +msgid "Exact" +msgstr "英字の大小を区別する" + +#: gitk:2101 gitk:4447 gitk:6248 +msgid "IgnCase" +msgstr "英字の大小を区別しない" + +#: gitk:2101 gitk:4341 gitk:4445 gitk:6244 +msgid "Regexp" +msgstr "正規表現" + +#: gitk:2103 gitk:2104 gitk:4466 gitk:4496 gitk:4503 gitk:6372 gitk:6440 +msgid "All fields" +msgstr "全ての項目" + +#: gitk:2104 gitk:4464 gitk:4496 gitk:6311 +msgid "Headline" +msgstr "ヘッドライン" + +#: gitk:2105 gitk:4464 gitk:6311 gitk:6440 gitk:6874 +msgid "Comments" +msgstr "コメント" + +#: gitk:2105 gitk:4464 gitk:4468 gitk:4503 gitk:6311 gitk:6809 gitk:8071 +#: gitk:8086 +msgid "Author" +msgstr "作成者" + +#: gitk:2105 gitk:4464 gitk:6311 gitk:6811 +msgid "Committer" +msgstr "コミットした人" + +#: gitk:2134 +msgid "Search" +msgstr "検索" + +#: gitk:2141 +msgid "Diff" +msgstr "Diff" + +#: gitk:2143 +msgid "Old version" +msgstr "旧バージョン" + +#: gitk:2145 +msgid "New version" +msgstr "新バージョン" + +#: gitk:2147 +msgid "Lines of context" +msgstr "文脈行数" + +#: gitk:2157 +msgid "Ignore space change" +msgstr "空白の違いを無視" + +#: gitk:2215 +msgid "Patch" +msgstr "パッチ" + +#: gitk:2217 +msgid "Tree" +msgstr "ツリー" + +#: gitk:2361 gitk:2378 +msgid "Diff this -> selected" +msgstr "これと選択したコミットのdiffを見る" + +#: gitk:2362 gitk:2379 +msgid "Diff selected -> this" +msgstr "選択したコミットとこれのdiffを見る" + +#: gitk:2363 gitk:2380 +msgid "Make patch" +msgstr "パッチ作成" + +#: gitk:2364 gitk:8477 +msgid "Create tag" +msgstr "タグ生成" + +#: gitk:2365 gitk:8583 +msgid "Write commit to file" +msgstr "コミットをファイルに書き込む" + +#: gitk:2366 gitk:8640 +msgid "Create new branch" +msgstr "新規ブランチ生成" + +#: gitk:2367 +msgid "Cherry-pick this commit" +msgstr "このコミットをチェリーピックする" + +#: gitk:2368 +msgid "Reset HEAD branch to here" +msgstr "ブランチのHEADをここにリセットする" + +#: gitk:2369 +msgid "Mark this commit" +msgstr "このコミットにマークをつける" + +#: gitk:2370 +msgid "Return to mark" +msgstr "マークを付けた所に戻る" + +#: gitk:2371 +msgid "Find descendant of this and mark" +msgstr "この子孫を見つけてマークする" + +#: gitk:2372 +msgid "Compare with marked commit" +msgstr "マークを付けたコミットと比較する" + +#: gitk:2386 +msgid "Check out this branch" +msgstr "このブランチをチェックアウトする" + +#: gitk:2387 +msgid "Remove this branch" +msgstr "このブランチを除去する" + +#: gitk:2394 +msgid "Highlight this too" +msgstr "これもハイライトさせる" + +#: gitk:2395 +msgid "Highlight this only" +msgstr "これだけをハイライトさせる" + +#: gitk:2396 +msgid "External diff" +msgstr "外部diffツール" + +#: gitk:2397 +msgid "Blame parent commit" +msgstr "親コミットから blame をかける" + +#: gitk:2404 +msgid "Show origin of this line" +msgstr "この行の出自を表示する" + +#: gitk:2405 +msgid "Run git gui blame on this line" +msgstr "この行に git gui で blame をかける" + +#: gitk:2657 +msgid "" +"\n" +"Gitk - a commit viewer for git\n" +"\n" +"Copyright c 2005-2008 Paul Mackerras\n" +"\n" +"Use and redistribute under the terms of the GNU General Public License" +msgstr "" +"\n" +"Gitk - gitコミットビューア\n" +"\n" +"Copyright c 2005-2008 Paul Mackerras\n" +"\n" +"使用および再配布は GNU General Public License に従ってください" + +#: gitk:2665 gitk:2727 gitk:9005 +msgid "Close" +msgstr "閉じる" + +#: gitk:2684 +msgid "Gitk key bindings" +msgstr "Gitk キーバインディング" + +#: gitk:2687 +msgid "Gitk key bindings:" +msgstr "Gitk キーバインディング:" + +#: gitk:2689 +#, tcl-format +msgid "<%s-Q>\t\tQuit" +msgstr "<%s-Q>\t\t終了" + +#: gitk:2690 +msgid "\t\tMove to first commit" +msgstr "\t\t最初のコミットに移動" + +#: gitk:2691 +msgid "\t\tMove to last commit" +msgstr "\t\t最後のコミットに移動" + +#: gitk:2692 +msgid ", p, i\tMove up one commit" +msgstr ", p, i\t一つ上のコミットに移動" + +#: gitk:2693 +msgid ", n, k\tMove down one commit" +msgstr ", n, k\t一つ下のコミットに移動" + +#: gitk:2694 +msgid ", z, j\tGo back in history list" +msgstr ", z, j\t履歴の前に戻る" + +#: gitk:2695 +msgid ", x, l\tGo forward in history list" +msgstr ", x, l\t履歴の次へ進む" + +#: gitk:2696 +msgid "\tMove up one page in commit list" +msgstr "\tコミットリストの一つ上のページに移動" + +#: gitk:2697 +msgid "\tMove down one page in commit list" +msgstr "\tコミットリストの一つ下のページに移動" + +#: gitk:2698 +#, tcl-format +msgid "<%s-Home>\tScroll to top of commit list" +msgstr "<%s-Home>\tコミットリストの一番上にスクロールする" + +#: gitk:2699 +#, tcl-format +msgid "<%s-End>\tScroll to bottom of commit list" +msgstr "<%s-End>\tコミットリストの一番下にスクロールする" + +#: gitk:2700 +#, tcl-format +msgid "<%s-Up>\tScroll commit list up one line" +msgstr "<%s-Up>\tコミットリストの一つ下の行にスクロールする" + +#: gitk:2701 +#, tcl-format +msgid "<%s-Down>\tScroll commit list down one line" +msgstr "<%s-Down>\tコミットリストの一つ下の行にスクロールする" + +#: gitk:2702 +#, tcl-format +msgid "<%s-PageUp>\tScroll commit list up one page" +msgstr "<%s-PageUp>\tコミットリストの上のページにスクロールする" + +#: gitk:2703 +#, tcl-format +msgid "<%s-PageDown>\tScroll commit list down one page" +msgstr "<%s-PageDown>\tコミットリストの下のページにスクロールする" + +#: gitk:2704 +msgid "\tFind backwards (upwards, later commits)" +msgstr "\t後ろを検索 (上方・後のコミット)" + +#: gitk:2705 +msgid "\tFind forwards (downwards, earlier commits)" +msgstr "\t前を検索(下方・前のコミット)" + +#: gitk:2706 +msgid ", b\tScroll diff view up one page" +msgstr ", b\tdiff画面を上のページにスクロールする" + +#: gitk:2707 +msgid "\tScroll diff view up one page" +msgstr "\tdiff画面を上のページにスクロールする" + +#: gitk:2708 +msgid "\t\tScroll diff view down one page" +msgstr "\t\tdiff画面を下のページにスクロールする" + +#: gitk:2709 +msgid "u\t\tScroll diff view up 18 lines" +msgstr "u\t\tdiff画面を上に18行スクロールする" + +#: gitk:2710 +msgid "d\t\tScroll diff view down 18 lines" +msgstr "d\t\tdiff画面を下に18行スクロールする" + +#: gitk:2711 +#, tcl-format +msgid "<%s-F>\t\tFind" +msgstr "<%s-F>\t\t検索" + +#: gitk:2712 +#, tcl-format +msgid "<%s-G>\t\tMove to next find hit" +msgstr "<%s-G>\t\t次を検索して移動" + +#: gitk:2713 +msgid "\tMove to next find hit" +msgstr "\t次を検索して移動" + +#: gitk:2714 +msgid "/\t\tFocus the search box" +msgstr "/\t\t検索ボックスにフォーカス" + +#: gitk:2715 +msgid "?\t\tMove to previous find hit" +msgstr "?\t\t前を検索して移動" + +#: gitk:2716 +msgid "f\t\tScroll diff view to next file" +msgstr "f\t\t次のファイルにdiff画面をスクロールする" + +#: gitk:2717 +#, tcl-format +msgid "<%s-S>\t\tSearch for next hit in diff view" +msgstr "<%s-S>\t\tdiff画面の次を検索" + +#: gitk:2718 +#, tcl-format +msgid "<%s-R>\t\tSearch for previous hit in diff view" +msgstr "<%s-R>\t\tdiff画面の前を検索" + +#: gitk:2719 +#, tcl-format +msgid "<%s-KP+>\tIncrease font size" +msgstr "<%s-KP+>\t文字サイズを拡大" + +#: gitk:2720 +#, tcl-format +msgid "<%s-plus>\tIncrease font size" +msgstr "<%s-plus>\t文字サイズを拡大" + +#: gitk:2721 +#, tcl-format +msgid "<%s-KP->\tDecrease font size" +msgstr "<%s-KP->\t文字サイズを縮小" + +#: gitk:2722 +#, tcl-format +msgid "<%s-minus>\tDecrease font size" +msgstr "<%s-minus>\t文字サイズを縮小" + +#: gitk:2723 +msgid "\t\tUpdate" +msgstr "\t\t更新" + +#: gitk:3178 gitk:3187 +#, tcl-format +msgid "Error creating temporary directory %s:" +msgstr "一時ディレクトリ %s 生成時エラー:" + +#: gitk:3200 +#, tcl-format +msgid "Error getting \"%s\" from %s:" +msgstr "\"%s\" のエラーが %s に発生:" + +#: gitk:3263 +msgid "command failed:" +msgstr "コマンド失敗:" + +#: gitk:3409 +msgid "No such commit" +msgstr "そのようなコミットはありません" + +#: gitk:3423 +msgid "git gui blame: command failed:" +msgstr "git gui blame: コマンド失敗:" + +#: gitk:3454 +#, tcl-format +msgid "Couldn't read merge head: %s" +msgstr "マージする HEAD を読み込めません: %s" + +#: gitk:3462 +#, tcl-format +msgid "Error reading index: %s" +msgstr "インデックス読み込みエラー: %s" + +#: gitk:3487 +#, tcl-format +msgid "Couldn't start git blame: %s" +msgstr "git blame を始められません: %s" + +#: gitk:3490 gitk:6279 +msgid "Searching" +msgstr "検索中" + +#: gitk:3522 +#, tcl-format +msgid "Error running git blame: %s" +msgstr "git blame 実行エラー: %s" + +#: gitk:3550 +#, tcl-format +msgid "That line comes from commit %s, which is not in this view" +msgstr "コミット %s に由来するその行は、このビューに表示されていません" + +#: gitk:3564 +msgid "External diff viewer failed:" +msgstr "外部diffビューアが失敗:" + +#: gitk:3682 +msgid "Gitk view definition" +msgstr "Gitk ビュー定義" + +#: gitk:3686 +msgid "Remember this view" +msgstr "このビューを記憶する" + +#: gitk:3687 +msgid "References (space separated list):" +msgstr "リファレンス(スペース区切りのリスト):" + +#: gitk:3688 +msgid "Branches & tags:" +msgstr "ブランチ&タグ:" + +#: gitk:3689 +msgid "All refs" +msgstr "全てのリファレンス" + +#: gitk:3690 +msgid "All (local) branches" +msgstr "全ての(ローカルな)ブランチ" + +#: gitk:3691 +msgid "All tags" +msgstr "全てのタグ" + +#: gitk:3692 +msgid "All remote-tracking branches" +msgstr "全てのリモート追跡ブランチ" + +#: gitk:3693 +msgid "Commit Info (regular expressions):" +msgstr "コミット情報(正規表現):" + +#: gitk:3694 +msgid "Author:" +msgstr "作成者:" + +#: gitk:3695 +msgid "Committer:" +msgstr "コミットした人:" + +#: gitk:3696 +msgid "Commit Message:" +msgstr "コミットメッセージ:" + +#: gitk:3697 +msgid "Matches all Commit Info criteria" +msgstr "コミット情報の全ての条件に一致" + +#: gitk:3698 +msgid "Changes to Files:" +msgstr "変更したファイル:" + +#: gitk:3699 +msgid "Fixed String" +msgstr "固定文字列" + +#: gitk:3700 +msgid "Regular Expression" +msgstr "正規表現" + +#: gitk:3701 +msgid "Search string:" +msgstr "検索文字列:" + +#: gitk:3702 +msgid "" +"Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 " +"15:27:38\"):" +msgstr "コミット日時 (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 " +"15:27:38\"):" + +#: gitk:3703 +msgid "Since:" +msgstr "期間の始め:" + +#: gitk:3704 +msgid "Until:" +msgstr "期間の終わり:" + +#: gitk:3705 +msgid "Limit and/or skip a number of revisions (positive integer):" +msgstr "制限・省略するリビジョンの数(正の整数):" + +#: gitk:3706 +msgid "Number to show:" +msgstr "表示する数:" + +#: gitk:3707 +msgid "Number to skip:" +msgstr "省略する数:" + +#: gitk:3708 +msgid "Miscellaneous options:" +msgstr "その他のオプション:" + +#: gitk:3709 +msgid "Strictly sort by date" +msgstr "厳密に日付順で並び替え" + +#: gitk:3710 +msgid "Mark branch sides" +msgstr "側枝マーク" + +#: gitk:3711 +msgid "Limit to first parent" +msgstr "最初の親に制限" + +#: gitk:3712 +msgid "Simple history" +msgstr "簡易な履歴" + +#: gitk:3713 +msgid "Additional arguments to git log:" +msgstr "git log への追加の引数:" + +#: gitk:3714 +msgid "Enter files and directories to include, one per line:" +msgstr "含まれるファイル・ディレクトリを一行ごとに入力:" + +#: gitk:3715 +msgid "Command to generate more commits to include:" +msgstr "コミット追加コマンド:" + +#: gitk:3837 +msgid "Gitk: edit view" +msgstr "Gitk: ビュー編集" + +#: gitk:3845 +msgid "-- criteria for selecting revisions" +msgstr "― リビジョンの選択条件" + +#: gitk:3850 +msgid "View Name:" +msgstr "ビュー名:" + +#: gitk:3925 +msgid "Apply (F5)" +msgstr "適用 (F5)" + +#: gitk:3963 +msgid "Error in commit selection arguments:" +msgstr "コミット選択引数のエラー:" + +#: gitk:4016 gitk:4068 gitk:4516 gitk:4530 gitk:5791 gitk:11232 gitk:11233 +msgid "None" +msgstr "無し" + +#: gitk:4464 gitk:6311 gitk:8073 gitk:8088 +msgid "Date" +msgstr "日付" + +#: gitk:4464 gitk:6311 +msgid "CDate" +msgstr "作成日" + +#: gitk:4613 gitk:4618 +msgid "Descendant" +msgstr "子孫" + +#: gitk:4614 +msgid "Not descendant" +msgstr "非子孫" + +#: gitk:4621 gitk:4626 +msgid "Ancestor" +msgstr "祖先" + +#: gitk:4622 +msgid "Not ancestor" +msgstr "非祖先" + +#: gitk:4912 +msgid "Local changes checked in to index but not committed" +msgstr "ステージされた、コミット前のローカルな変更" + +#: gitk:4948 +msgid "Local uncommitted changes, not checked in to index" +msgstr "ステージされていない、コミット前のローカルな変更" + +#: gitk:6629 +msgid "many" +msgstr "多数" + +#: gitk:6813 +msgid "Tags:" +msgstr "タグ:" + +#: gitk:6830 gitk:6836 gitk:8066 +msgid "Parent" +msgstr "親" + +#: gitk:6841 +msgid "Child" +msgstr "子" + +#: gitk:6850 +msgid "Branch" +msgstr "ブランチ" + +#: gitk:6853 +msgid "Follows" +msgstr "下位" + +#: gitk:6856 +msgid "Precedes" +msgstr "上位" + +#: gitk:7354 +#, tcl-format +msgid "Error getting diffs: %s" +msgstr "diff取得エラー: %s" + +#: gitk:7894 +msgid "Goto:" +msgstr "Goto:" + +#: gitk:7896 +msgid "SHA1 ID:" +msgstr "SHA1 ID:" + +#: gitk:7915 +#, tcl-format +msgid "Short SHA1 id %s is ambiguous" +msgstr "%s を含む SHA1 ID は複数存在します" + +#: gitk:7922 +#, tcl-format +msgid "Revision %s is not known" +msgstr "リビジョン %s は不明です" + +#: gitk:7932 +#, tcl-format +msgid "SHA1 id %s is not known" +msgstr "SHA1 id %s は不明です" + +#: gitk:7934 +#, tcl-format +msgid "Revision %s is not in the current view" +msgstr "リビジョン %s は現在のビューにはありません" + +#: gitk:8076 +msgid "Children" +msgstr "子供達" + +#: gitk:8133 +#, tcl-format +msgid "Reset %s branch to here" +msgstr "%s ブランチをここにリセットする" + +#: gitk:8135 +msgid "Detached head: can't reset" +msgstr "切り離されたHEAD: リセットできません" + +#: gitk:8244 gitk:8250 +msgid "Skipping merge commit " +msgstr "コミットマージをスキップ: " + +#: gitk:8259 gitk:8264 +msgid "Error getting patch ID for " +msgstr "パッチ取得エラー: ID " + +#: gitk:8260 gitk:8265 +msgid " - stopping\n" +msgstr " - 停止\n" + +#: gitk:8270 gitk:8273 gitk:8281 gitk:8294 gitk:8303 +msgid "Commit " +msgstr "コミット " + +#: gitk:8274 +msgid "" +" is the same patch as\n" +" " +msgstr "" +" は下記のパッチと同等\n" +" " + +#: gitk:8282 +msgid "" +" differs from\n" +" " +msgstr "" +" 下記からのdiff\n" +" " + +#: gitk:8284 +msgid "" +"Diff of commits:\n" +"\n" +msgstr "" +"コミットのdiff:\n" +"\n" + +#: gitk:8295 gitk:8304 +#, tcl-format +msgid " has %s children - stopping\n" +msgstr " には %s の子があります - 停止\n" + +#: gitk:8324 +#, tcl-format +msgid "Error writing commit to file: %s" +msgstr "ファイルへのコミット書き込みエラー: %s" + +#: gitk:8330 +#, tcl-format +msgid "Error diffing commits: %s" +msgstr "コミットのdiff実行エラー: %s" + +#: gitk:8360 +msgid "Top" +msgstr "Top" + +#: gitk:8361 +msgid "From" +msgstr "From" + +#: gitk:8366 +msgid "To" +msgstr "To" + +#: gitk:8390 +msgid "Generate patch" +msgstr "パッチ生成" + +#: gitk:8392 +msgid "From:" +msgstr "From:" + +#: gitk:8401 +msgid "To:" +msgstr "To:" + +#: gitk:8410 +msgid "Reverse" +msgstr "逆" + +#: gitk:8412 gitk:8597 +msgid "Output file:" +msgstr "出力ファイル:" + +#: gitk:8418 +msgid "Generate" +msgstr "生成" + +#: gitk:8456 +msgid "Error creating patch:" +msgstr "パッチ生成エラー:" + +#: gitk:8479 gitk:8585 gitk:8642 +msgid "ID:" +msgstr "ID:" + +#: gitk:8488 +msgid "Tag name:" +msgstr "タグ名:" + +#: gitk:8492 gitk:8651 +msgid "Create" +msgstr "生成" + +#: gitk:8509 +msgid "No tag name specified" +msgstr "タグの名称が指定されていません" + +#: gitk:8513 +#, tcl-format +msgid "Tag \"%s\" already exists" +msgstr "タグ \"%s\" は既に存在します" + +#: gitk:8519 +msgid "Error creating tag:" +msgstr "タグ生成エラー:" + +#: gitk:8594 +msgid "Command:" +msgstr "コマンド:" + +#: gitk:8602 +msgid "Write" +msgstr "書き込み" + +#: gitk:8620 +msgid "Error writing commit:" +msgstr "コミット書き込みエラー:" + +#: gitk:8647 +msgid "Name:" +msgstr "名前:" + +#: gitk:8670 +msgid "Please specify a name for the new branch" +msgstr "新しいブランチの名前を指定してください" + +#: gitk:8675 +#, tcl-format +msgid "Branch '%s' already exists. Overwrite?" +msgstr "ブランチ '%s' は既に存在します。上書きしますか?" + +#: gitk:8741 +#, tcl-format +msgid "Commit %s is already included in branch %s -- really re-apply it?" +msgstr "コミット %s は既にブランチ %s に含まれています ― 本当にこれを再適用しますか?" + +#: gitk:8746 +msgid "Cherry-picking" +msgstr "チェリーピック中" + +#: gitk:8755 +#, tcl-format +msgid "" +"Cherry-pick failed because of local changes to file '%s'.\n" +"Please commit, reset or stash your changes and try again." +msgstr "" +"ファイル '%s' のローカルな変更のためにチェリーピックは失敗しました。\n" +"あなたの変更に commit, reset, stash のいずれかを行ってからやり直してください。" + +#: gitk:8761 +msgid "" +"Cherry-pick failed because of merge conflict.\n" +"Do you wish to run git citool to resolve it?" +msgstr "" +"マージの衝突によってチェリーピックは失敗しました。\n" +"この解決のために git citool を実行したいですか?" + +#: gitk:8777 +msgid "No changes committed" +msgstr "何の変更もコミットされていません" + +#: gitk:8803 +msgid "Confirm reset" +msgstr "確認を取り消す" + +#: gitk:8805 +#, tcl-format +msgid "Reset branch %s to %s?" +msgstr "ブランチ %s を %s にリセットしますか?" + +#: gitk:8809 +msgid "Reset type:" +msgstr "Reset タイプ:" + +#: gitk:8813 +msgid "Soft: Leave working tree and index untouched" +msgstr "Soft: 作業ツリーもインデックスもそのままにする" + +#: gitk:8816 +msgid "Mixed: Leave working tree untouched, reset index" +msgstr "Mixed: 作業ツリーをそのままにして、インデックスをリセット" + +#: gitk:8819 +msgid "" +"Hard: Reset working tree and index\n" +"(discard ALL local changes)" +msgstr "" +"Hard: 作業ツリーやインデックスをリセット\n" +"(「全ての」ローカルな変更を破棄)" + +#: gitk:8836 +msgid "Resetting" +msgstr "リセット中" + +#: gitk:8893 +msgid "Checking out" +msgstr "チェックアウト" + +#: gitk:8946 +msgid "Cannot delete the currently checked-out branch" +msgstr "現在チェックアウトされているブランチを削除することはできません" + +#: gitk:8952 +#, tcl-format +msgid "" +"The commits on branch %s aren't on any other branch.\n" +"Really delete branch %s?" +msgstr "" +"ブランチ %s には他のブランチに存在しないコミットがあります。\n" +"本当にブランチ %s を削除しますか?" + +#: gitk:8983 +#, tcl-format +msgid "Tags and heads: %s" +msgstr "タグとHEAD: %s" + +#: gitk:8998 +msgid "Filter" +msgstr "フィルター" + +#: gitk:9293 +msgid "" +"Error reading commit topology information; branch and preceding/following " +"tag information will be incomplete." +msgstr "" +"コミット構造情報読み込みエラー; ブランチ及び上位/下位の" +"タグ情報が不完全であるようです。" + +#: gitk:10279 +msgid "Tag" +msgstr "タグ" + +#: gitk:10279 +msgid "Id" +msgstr "ID" + +#: gitk:10327 +msgid "Gitk font chooser" +msgstr "Gitk フォント選択" + +#: gitk:10344 +msgid "B" +msgstr "B" + +#: gitk:10347 +msgid "I" +msgstr "I" + +#: gitk:10443 +msgid "Gitk preferences" +msgstr "Gitk 設定" + +#: gitk:10445 +msgid "Commit list display options" +msgstr "コミットリスト表示オプション" + +#: gitk:10448 +msgid "Maximum graph width (lines)" +msgstr "最大グラフ幅(線の本数)" + +#: gitk:10452 +#, tcl-format +msgid "Maximum graph width (% of pane)" +msgstr "最大グラフ幅(ペインに対する%)" + +#: gitk:10456 +msgid "Show local changes" +msgstr "ローカルな変更を表示" + +#: gitk:10459 +msgid "Auto-select SHA1" +msgstr "SHA1 の自動選択" + +#: gitk:10463 +msgid "Diff display options" +msgstr "diff表示オプション" + +#: gitk:10465 +msgid "Tab spacing" +msgstr "タブ空白幅" + +#: gitk:10468 +msgid "Display nearby tags" +msgstr "近くのタグを表示する" + +#: gitk:10471 +msgid "Hide remote refs" +msgstr "リモートリファレンスを隠す" + +#: gitk:10474 +msgid "Limit diffs to listed paths" +msgstr "diff をリストのパスに制限" + +#: gitk:10477 +msgid "Support per-file encodings" +msgstr "ファイルごとのエンコーディングのサポート" + +#: gitk:10483 gitk:10548 +msgid "External diff tool" +msgstr "外部diffツール" + +#: gitk:10485 +msgid "Choose..." +msgstr "選択..." + +#: gitk:10490 +msgid "Colors: press to choose" +msgstr "色: ボタンを押して選択" + +#: gitk:10493 +msgid "Background" +msgstr "背景" + +#: gitk:10494 gitk:10524 +msgid "background" +msgstr "背景" + +#: gitk:10497 +msgid "Foreground" +msgstr "前景" + +#: gitk:10498 +msgid "foreground" +msgstr "前景" + +#: gitk:10501 +msgid "Diff: old lines" +msgstr "Diff: 旧バージョン" + +#: gitk:10502 +msgid "diff old lines" +msgstr "diff 旧バージョン" + +#: gitk:10506 +msgid "Diff: new lines" +msgstr "Diff: 新バージョン" + +#: gitk:10507 +msgid "diff new lines" +msgstr "diff 新バージョン" + +#: gitk:10511 +msgid "Diff: hunk header" +msgstr "Diff: hunkヘッダ" + +#: gitk:10513 +msgid "diff hunk header" +msgstr "diff hunkヘッダ" + +#: gitk:10517 +msgid "Marked line bg" +msgstr "マーク行の背景" + +#: gitk:10519 +msgid "marked line background" +msgstr "マーク行の背景" + +#: gitk:10523 +msgid "Select bg" +msgstr "選択の背景" + +#: gitk:10527 +msgid "Fonts: press to choose" +msgstr "フォント: ボタンを押して選択" + +#: gitk:10529 +msgid "Main font" +msgstr "主フォント" + +#: gitk:10530 +msgid "Diff display font" +msgstr "Diff表示用フォント" + +#: gitk:10531 +msgid "User interface font" +msgstr "UI用フォント" + +#: gitk:10558 +#, tcl-format +msgid "Gitk: choose color for %s" +msgstr "Gitk: 「%s」 の色を選択" + +#: gitk:11009 +msgid "" +"Sorry, gitk cannot run with this version of Tcl/Tk.\n" +" Gitk requires at least Tcl/Tk 8.4." +msgstr "" +"申し訳ありませんが、このバージョンの Tcl/Tk では gitk を実行できません。\n" +" Gitk は最低でも Tcl/Tk 8.4 を必要とします。" + +#: gitk:11137 +msgid "Cannot find a git repository here." +msgstr "ここにはgitリポジトリがありません。" + +#: gitk:11141 +#, tcl-format +msgid "Cannot find the git directory \"%s\"." +msgstr "gitディレクトリ \"%s\" を見つけられません。" + +#: gitk:11188 +#, tcl-format +msgid "Ambiguous argument '%s': both revision and filename" +msgstr "あいまいな引数 '%s': リビジョンとファイル名の両方に解釈できます" + +#: gitk:11200 +msgid "Bad arguments to gitk:" +msgstr "gitkへの不正な引数:" + +#: gitk:11285 +msgid "Command line" +msgstr "コマンド行" -- cgit v1.2.1 From 8d849957d81fc0480a52570d66cc3c2a688ecb1b Mon Sep 17 00:00:00 2001 From: Bernt Hansen Date: Mon, 2 Nov 2009 07:41:00 -0500 Subject: gitk: Skip translation of "wrong Tcl version" message We check the required Tcl version number before we setup msgcat for language translation. If the Tcl version is too old just display the untranslated error text. The caller of show_error can now pass an alternative function for mc. The Tcl list function turns the translation into a no-op. This fixes the error: Error in startup script: invalid command name "mc" when attempting to start gitk with Tcl 8.3. Tested with both Tcl 8.3 and 8.4. Signed-off-by: Bernt Hansen Signed-off-by: Paul Mackerras --- gitk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gitk b/gitk index 59d592519..db5ec54be 100755 --- a/gitk +++ b/gitk @@ -1787,10 +1787,10 @@ proc make_transient {window origin} { } } -proc show_error {w top msg} { +proc show_error {w top msg {mc mc}} { message $w.m -text $msg -justify center -aspect 400 pack $w.m -side top -fill x -padx 20 -pady 20 - button $w.ok -text [mc OK] -command "destroy $top" + button $w.ok -text [$mc OK] -command "destroy $top" pack $w.ok -side bottom -fill x bind $top "grab $top; focus $top" bind $top "destroy $top" @@ -11034,8 +11034,8 @@ proc get_path_encoding {path} { # First check that Tcl/Tk is recent enough if {[catch {package require Tk 8.4} err]} { - show_error {} . [mc "Sorry, gitk cannot run with this version of Tcl/Tk.\n\ - Gitk requires at least Tcl/Tk 8.4."] + show_error {} . "Sorry, gitk cannot run with this version of Tcl/Tk.\n\ + Gitk requires at least Tcl/Tk 8.4." list exit 1 } -- cgit v1.2.1 From 51a7e8b654a0f06dde6f66ae89a35297cea09168 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sat, 14 Nov 2009 21:15:01 +1100 Subject: gitk: Improve appearance of radiobuttons and checkbuttons Commit 5497f7a23ac11f9b230892220d5ed80263eedd1f ("gitk: Add configuration for UI colour scheme") added a call to tk_setPalette at startup. Unfortunately, tk_setPalette always chooses a dark red color for the selectColor value if none is given explicitly, and this makes checkbuttons and radiobuttons look rather bad. This restores the previous appearance by specifying selectColor explicitly. For light backgrounds we use white for selectColor, and for dark backgrounds we use black. The formula and threshold for distinguishing light from dark are the same as used in tk_setPalette for choosing the foreground color. Signed-off-by: Paul Mackerras --- gitk | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gitk b/gitk index db5ec54be..61771bd05 100755 --- a/gitk +++ b/gitk @@ -10596,8 +10596,18 @@ proc setselbg {c} { allcanvs itemconf secsel -fill $c } +# This sets the background color and the color scheme for the whole UI. +# For some reason, tk_setPalette chooses a nasty dark red for selectColor +# if we don't specify one ourselves, which makes the checkbuttons and +# radiobuttons look bad. This chooses white for selectColor if the +# background color is light, or black if it is dark. proc setui {c} { - tk_setPalette $c + set bg [winfo rgb . $c] + set selc black + if {[lindex $bg 0] + 1.5 * [lindex $bg 1] + 0.5 * [lindex $bg 2] > 100000} { + set selc white + } + tk_setPalette background $c selectColor $selc } proc setbg {c} { @@ -11159,7 +11169,7 @@ eval font create textfontbold [fontflags textfont 1] parsefont uifont $uifont eval font create uifont [fontflags uifont] -tk_setPalette $uicolor +setui $uicolor setoptions -- cgit v1.2.1 From 70a5fc443acbd1fe69cc21c10190375facabaf93 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Tue, 3 Nov 2009 21:30:12 +0530 Subject: gitk: Disable checkout of remote branches At the command line, trying to check out a remote branch gives you a detailed warning message, but the gitk GUI currently allows it without any fuss. Since the GUI is often used by people much less familiar with git, it seems reasonable to make the GUI more restrictive than the command line, not less. This prevents a lot of detached HEAD commits by new users. Signed-off-by: Sitaram Chamarty Signed-off-by: Paul Mackerras --- gitk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitk b/gitk index 61771bd05..5f0654576 100755 --- a/gitk +++ b/gitk @@ -8897,6 +8897,9 @@ proc headmenu {x y id head} { set headmenuid $id set headmenuhead $head set state normal + if {[string match "remotes/*" $head]} { + set state disabled + } if {$head eq $mainhead} { set state disabled } -- cgit v1.2.1 From a4390ace1a871d786b33456d6e80728bd2ab3b61 Mon Sep 17 00:00:00 2001 From: Markus Heidelberg Date: Wed, 4 Nov 2009 00:21:41 +0100 Subject: gitk: Fix "git gui blame" invocation when called from top-level directory When run in the top-level directory of a git repository, "git rev-parse --git-dir" doesn't return an absolute path, but merely ".git", so the selected file for "git gui blame" has a relative path. The function make_relative then tries to make the already relative path relative, which results in a path like "../../../../Makefile" with as many ".." as there are elements of [pwd]. This regression was introduced by commit 9712b81 (gitk: Fix bugs in blaming code, 2008-12-06), which fixed "git gui blame" when called from subdirs. This also fixes it for bare repositories. Signed-off-by: Markus Heidelberg Signed-off-by: Paul Mackerras --- gitk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitk b/gitk index 5f0654576..d5f0a88d7 100755 --- a/gitk +++ b/gitk @@ -3378,6 +3378,9 @@ proc index_sha1 {fname} { # Turn an absolute path into one relative to the current directory proc make_relative {f} { + if {[file pathtype $f] eq "relative"} { + return $f + } set elts [file split $f] set here [file split [pwd]] set ei 0 -- cgit v1.2.1 From 63ea915e163af144ebc82817be154c0e72c08bda Mon Sep 17 00:00:00 2001 From: Mizar Date: Sat, 14 Nov 2009 21:21:08 +1100 Subject: gitk: Update Japanese translation Signed-off-by: Paul Mackerras --- po/ja.po | 530 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 270 insertions(+), 260 deletions(-) diff --git a/po/ja.po b/po/ja.po index 59d44a4e4..c0c92addb 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: gitk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-10-19 02:45+0900\n" -"PO-Revision-Date: 2009-10-19 17:03+0900\n" +"POT-Creation-Date: 2009-11-04 00:08+0900\n" +"PO-Revision-Date: 2009-11-06 01:45+0900\n" "Last-Translator: Mizar \n" "Language-Team: Japanese\n" "MIME-Version: 1.0\n" @@ -31,14 +31,17 @@ msgstr "--argscmd コマンド実行エラー:" #: gitk:337 msgid "No files selected: --merge specified but no files are unmerged." -msgstr "ファイル未選択: --merge が指定されましたが、マージされていないファイルはありません。" +msgstr "" +"ファイル未選択: --merge が指定されましたが、マージされていないファイルはあり" +"ません。" #: gitk:340 msgid "" "No files selected: --merge specified but no unmerged files are within file " "limit." -msgstr "ファイル未選択: --merge が指定されましたが、" -"ファイル制限内にマージされていないファイルはありません。" +msgstr "" +"ファイル未選択: --merge が指定されましたが、ファイル制限内にマージされていな" +"いファイルはありません。" #: gitk:362 gitk:509 msgid "Error executing git log:" @@ -48,11 +51,11 @@ msgstr "git log 実行エラー:" msgid "Reading" msgstr "読み込み中" -#: gitk:440 gitk:4131 +#: gitk:440 gitk:4132 msgid "Reading commits..." msgstr "コミット読み込み中..." -#: gitk:443 gitk:1561 gitk:4134 +#: gitk:443 gitk:1561 gitk:4135 msgid "No commits selected" msgstr "コミットが選択されていません" @@ -64,12 +67,16 @@ msgstr "git log の出力を解析できません:" msgid "No commit information available" msgstr "有効なコミットの情報がありません" -#: gitk:1793 gitk:1817 gitk:3924 gitk:8822 gitk:10358 gitk:10534 +#: gitk:1790 +msgid "mc" +msgstr "mc" + +#: gitk:1817 gitk:3925 gitk:8842 gitk:10378 gitk:10558 msgid "OK" msgstr "OK" -#: gitk:1819 gitk:3926 gitk:8419 gitk:8493 gitk:8603 gitk:8652 gitk:8824 -#: gitk:10359 gitk:10535 +#: gitk:1819 gitk:3927 gitk:8439 gitk:8513 gitk:8623 gitk:8672 gitk:8844 +#: gitk:10379 gitk:10559 msgid "Cancel" msgstr "キャンセル" @@ -125,11 +132,11 @@ msgstr "ビュー削除" msgid "All files" msgstr "全てのファイル" -#: gitk:1933 gitk:3678 +#: gitk:1933 gitk:3679 msgid "View" msgstr "ビュー" -#: gitk:1943 gitk:1953 gitk:2655 +#: gitk:1943 gitk:1953 gitk:2656 msgid "About gitk" msgstr "gitk について" @@ -165,16 +172,16 @@ msgstr "前" msgid "commit" msgstr "コミット" -#: gitk:2086 gitk:2088 gitk:4292 gitk:4315 gitk:4339 gitk:6280 gitk:6352 -#: gitk:6436 +#: gitk:2086 gitk:2088 gitk:4293 gitk:4316 gitk:4340 gitk:6281 gitk:6353 +#: gitk:6437 msgid "containing:" msgstr "含む:" -#: gitk:2089 gitk:3163 gitk:3168 gitk:4367 +#: gitk:2089 gitk:3164 gitk:3169 gitk:4368 msgid "touching paths:" msgstr "パスの一部:" -#: gitk:2090 gitk:4372 +#: gitk:2090 gitk:4373 msgid "adding/removing string:" msgstr "追加/除去する文字列:" @@ -182,34 +189,34 @@ msgstr "追加/除去する文字列:" msgid "Exact" msgstr "英字の大小を区別する" -#: gitk:2101 gitk:4447 gitk:6248 +#: gitk:2101 gitk:4448 gitk:6249 msgid "IgnCase" msgstr "英字の大小を区別しない" -#: gitk:2101 gitk:4341 gitk:4445 gitk:6244 +#: gitk:2101 gitk:4342 gitk:4446 gitk:6245 msgid "Regexp" msgstr "正規表現" -#: gitk:2103 gitk:2104 gitk:4466 gitk:4496 gitk:4503 gitk:6372 gitk:6440 +#: gitk:2103 gitk:2104 gitk:4467 gitk:4497 gitk:4504 gitk:6373 gitk:6441 msgid "All fields" msgstr "全ての項目" -#: gitk:2104 gitk:4464 gitk:4496 gitk:6311 +#: gitk:2104 gitk:4465 gitk:4497 gitk:6312 msgid "Headline" msgstr "ヘッドライン" -#: gitk:2105 gitk:4464 gitk:6311 gitk:6440 gitk:6874 +#: gitk:2105 gitk:4465 gitk:6312 gitk:6441 gitk:6875 msgid "Comments" msgstr "コメント" -#: gitk:2105 gitk:4464 gitk:4468 gitk:4503 gitk:6311 gitk:6809 gitk:8071 -#: gitk:8086 +#: gitk:2105 gitk:4465 gitk:4469 gitk:4504 gitk:6312 gitk:6810 gitk:8091 +#: gitk:8106 msgid "Author" -msgstr "作成者" +msgstr "作者" -#: gitk:2105 gitk:4464 gitk:6311 gitk:6811 +#: gitk:2105 gitk:4465 gitk:6312 gitk:6812 msgid "Committer" -msgstr "コミットした人" +msgstr "コミット者" #: gitk:2134 msgid "Search" @@ -255,15 +262,15 @@ msgstr "選択したコミットとこれのdiffを見る" msgid "Make patch" msgstr "パッチ作成" -#: gitk:2364 gitk:8477 +#: gitk:2364 gitk:8497 msgid "Create tag" msgstr "タグ生成" -#: gitk:2365 gitk:8583 +#: gitk:2365 gitk:8603 msgid "Write commit to file" -msgstr "コミットをファイルに書き込む" +msgstr "コミットをファイルに書き出す" -#: gitk:2366 gitk:8640 +#: gitk:2366 gitk:8660 msgid "Create new branch" msgstr "新規ブランチ生成" @@ -285,7 +292,7 @@ msgstr "マークを付けた所に戻る" #: gitk:2371 msgid "Find descendant of this and mark" -msgstr "この子孫を見つけてマークする" +msgstr "これとマークをつけた所との子孫を見つける" #: gitk:2372 msgid "Compare with marked commit" @@ -323,518 +330,519 @@ msgstr "この行の出自を表示する" msgid "Run git gui blame on this line" msgstr "この行に git gui で blame をかける" -#: gitk:2657 +#: gitk:2658 msgid "" "\n" "Gitk - a commit viewer for git\n" "\n" -"Copyright c 2005-2008 Paul Mackerras\n" +"Copyright © 2005-2008 Paul Mackerras\n" "\n" "Use and redistribute under the terms of the GNU General Public License" msgstr "" "\n" "Gitk - gitコミットビューア\n" "\n" -"Copyright c 2005-2008 Paul Mackerras\n" +"Copyright © 2005-2008 Paul Mackerras\n" "\n" "使用および再配布は GNU General Public License に従ってください" -#: gitk:2665 gitk:2727 gitk:9005 +#: gitk:2666 gitk:2728 gitk:9025 msgid "Close" msgstr "閉じる" -#: gitk:2684 +#: gitk:2685 msgid "Gitk key bindings" msgstr "Gitk キーバインディング" -#: gitk:2687 +#: gitk:2688 msgid "Gitk key bindings:" msgstr "Gitk キーバインディング:" -#: gitk:2689 +#: gitk:2690 #, tcl-format msgid "<%s-Q>\t\tQuit" msgstr "<%s-Q>\t\t終了" -#: gitk:2690 +#: gitk:2691 msgid "\t\tMove to first commit" msgstr "\t\t最初のコミットに移動" -#: gitk:2691 +#: gitk:2692 msgid "\t\tMove to last commit" msgstr "\t\t最後のコミットに移動" -#: gitk:2692 +#: gitk:2693 msgid ", p, i\tMove up one commit" msgstr ", p, i\t一つ上のコミットに移動" -#: gitk:2693 +#: gitk:2694 msgid ", n, k\tMove down one commit" msgstr ", n, k\t一つ下のコミットに移動" -#: gitk:2694 +#: gitk:2695 msgid ", z, j\tGo back in history list" msgstr ", z, j\t履歴の前に戻る" -#: gitk:2695 +#: gitk:2696 msgid ", x, l\tGo forward in history list" msgstr ", x, l\t履歴の次へ進む" -#: gitk:2696 +#: gitk:2697 msgid "\tMove up one page in commit list" msgstr "\tコミットリストの一つ上のページに移動" -#: gitk:2697 +#: gitk:2698 msgid "\tMove down one page in commit list" msgstr "\tコミットリストの一つ下のページに移動" -#: gitk:2698 +#: gitk:2699 #, tcl-format msgid "<%s-Home>\tScroll to top of commit list" msgstr "<%s-Home>\tコミットリストの一番上にスクロールする" -#: gitk:2699 +#: gitk:2700 #, tcl-format msgid "<%s-End>\tScroll to bottom of commit list" msgstr "<%s-End>\tコミットリストの一番下にスクロールする" -#: gitk:2700 +#: gitk:2701 #, tcl-format msgid "<%s-Up>\tScroll commit list up one line" msgstr "<%s-Up>\tコミットリストの一つ下の行にスクロールする" -#: gitk:2701 +#: gitk:2702 #, tcl-format msgid "<%s-Down>\tScroll commit list down one line" msgstr "<%s-Down>\tコミットリストの一つ下の行にスクロールする" -#: gitk:2702 +#: gitk:2703 #, tcl-format msgid "<%s-PageUp>\tScroll commit list up one page" msgstr "<%s-PageUp>\tコミットリストの上のページにスクロールする" -#: gitk:2703 +#: gitk:2704 #, tcl-format msgid "<%s-PageDown>\tScroll commit list down one page" msgstr "<%s-PageDown>\tコミットリストの下のページにスクロールする" -#: gitk:2704 +#: gitk:2705 msgid "\tFind backwards (upwards, later commits)" -msgstr "\t後ろを検索 (上方・後のコミット)" +msgstr "\t後方を検索 (上方の・新しいコミット)" -#: gitk:2705 +#: gitk:2706 msgid "\tFind forwards (downwards, earlier commits)" -msgstr "\t前を検索(下方・前のコミット)" +msgstr "\t前方を検索(下方の・古いコミット)" -#: gitk:2706 +#: gitk:2707 msgid ", b\tScroll diff view up one page" msgstr ", b\tdiff画面を上のページにスクロールする" -#: gitk:2707 +#: gitk:2708 msgid "\tScroll diff view up one page" msgstr "\tdiff画面を上のページにスクロールする" -#: gitk:2708 +#: gitk:2709 msgid "\t\tScroll diff view down one page" msgstr "\t\tdiff画面を下のページにスクロールする" -#: gitk:2709 +#: gitk:2710 msgid "u\t\tScroll diff view up 18 lines" msgstr "u\t\tdiff画面を上に18行スクロールする" -#: gitk:2710 +#: gitk:2711 msgid "d\t\tScroll diff view down 18 lines" msgstr "d\t\tdiff画面を下に18行スクロールする" -#: gitk:2711 +#: gitk:2712 #, tcl-format msgid "<%s-F>\t\tFind" msgstr "<%s-F>\t\t検索" -#: gitk:2712 +#: gitk:2713 #, tcl-format msgid "<%s-G>\t\tMove to next find hit" msgstr "<%s-G>\t\t次を検索して移動" -#: gitk:2713 +#: gitk:2714 msgid "\tMove to next find hit" msgstr "\t次を検索して移動" -#: gitk:2714 +#: gitk:2715 msgid "/\t\tFocus the search box" msgstr "/\t\t検索ボックスにフォーカス" -#: gitk:2715 +#: gitk:2716 msgid "?\t\tMove to previous find hit" msgstr "?\t\t前を検索して移動" -#: gitk:2716 +#: gitk:2717 msgid "f\t\tScroll diff view to next file" msgstr "f\t\t次のファイルにdiff画面をスクロールする" -#: gitk:2717 +#: gitk:2718 #, tcl-format msgid "<%s-S>\t\tSearch for next hit in diff view" msgstr "<%s-S>\t\tdiff画面の次を検索" -#: gitk:2718 +#: gitk:2719 #, tcl-format msgid "<%s-R>\t\tSearch for previous hit in diff view" msgstr "<%s-R>\t\tdiff画面の前を検索" -#: gitk:2719 +#: gitk:2720 #, tcl-format msgid "<%s-KP+>\tIncrease font size" msgstr "<%s-KP+>\t文字サイズを拡大" -#: gitk:2720 +#: gitk:2721 #, tcl-format msgid "<%s-plus>\tIncrease font size" msgstr "<%s-plus>\t文字サイズを拡大" -#: gitk:2721 +#: gitk:2722 #, tcl-format msgid "<%s-KP->\tDecrease font size" msgstr "<%s-KP->\t文字サイズを縮小" -#: gitk:2722 +#: gitk:2723 #, tcl-format msgid "<%s-minus>\tDecrease font size" msgstr "<%s-minus>\t文字サイズを縮小" -#: gitk:2723 +#: gitk:2724 msgid "\t\tUpdate" msgstr "\t\t更新" -#: gitk:3178 gitk:3187 +#: gitk:3179 gitk:3188 #, tcl-format msgid "Error creating temporary directory %s:" msgstr "一時ディレクトリ %s 生成時エラー:" -#: gitk:3200 +#: gitk:3201 #, tcl-format msgid "Error getting \"%s\" from %s:" msgstr "\"%s\" のエラーが %s に発生:" -#: gitk:3263 +#: gitk:3264 msgid "command failed:" msgstr "コマンド失敗:" -#: gitk:3409 +#: gitk:3410 msgid "No such commit" msgstr "そのようなコミットはありません" -#: gitk:3423 +#: gitk:3424 msgid "git gui blame: command failed:" msgstr "git gui blame: コマンド失敗:" -#: gitk:3454 +#: gitk:3455 #, tcl-format msgid "Couldn't read merge head: %s" msgstr "マージする HEAD を読み込めません: %s" -#: gitk:3462 +#: gitk:3463 #, tcl-format msgid "Error reading index: %s" msgstr "インデックス読み込みエラー: %s" -#: gitk:3487 +#: gitk:3488 #, tcl-format msgid "Couldn't start git blame: %s" msgstr "git blame を始められません: %s" -#: gitk:3490 gitk:6279 +#: gitk:3491 gitk:6280 msgid "Searching" msgstr "検索中" -#: gitk:3522 +#: gitk:3523 #, tcl-format msgid "Error running git blame: %s" msgstr "git blame 実行エラー: %s" -#: gitk:3550 +#: gitk:3551 #, tcl-format msgid "That line comes from commit %s, which is not in this view" msgstr "コミット %s に由来するその行は、このビューに表示されていません" -#: gitk:3564 +#: gitk:3565 msgid "External diff viewer failed:" msgstr "外部diffビューアが失敗:" -#: gitk:3682 +#: gitk:3683 msgid "Gitk view definition" msgstr "Gitk ビュー定義" -#: gitk:3686 +#: gitk:3687 msgid "Remember this view" msgstr "このビューを記憶する" -#: gitk:3687 +#: gitk:3688 msgid "References (space separated list):" msgstr "リファレンス(スペース区切りのリスト):" -#: gitk:3688 +#: gitk:3689 msgid "Branches & tags:" msgstr "ブランチ&タグ:" -#: gitk:3689 +#: gitk:3690 msgid "All refs" msgstr "全てのリファレンス" -#: gitk:3690 +#: gitk:3691 msgid "All (local) branches" msgstr "全ての(ローカルな)ブランチ" -#: gitk:3691 +#: gitk:3692 msgid "All tags" msgstr "全てのタグ" -#: gitk:3692 +#: gitk:3693 msgid "All remote-tracking branches" msgstr "全てのリモート追跡ブランチ" -#: gitk:3693 +#: gitk:3694 msgid "Commit Info (regular expressions):" msgstr "コミット情報(正規表現):" -#: gitk:3694 +#: gitk:3695 msgid "Author:" -msgstr "作成者:" +msgstr "作者:" -#: gitk:3695 +#: gitk:3696 msgid "Committer:" -msgstr "コミットした人:" +msgstr "コミット者:" -#: gitk:3696 +#: gitk:3697 msgid "Commit Message:" msgstr "コミットメッセージ:" -#: gitk:3697 +#: gitk:3698 msgid "Matches all Commit Info criteria" msgstr "コミット情報の全ての条件に一致" -#: gitk:3698 +#: gitk:3699 msgid "Changes to Files:" msgstr "変更したファイル:" -#: gitk:3699 +#: gitk:3700 msgid "Fixed String" msgstr "固定文字列" -#: gitk:3700 +#: gitk:3701 msgid "Regular Expression" msgstr "正規表現" -#: gitk:3701 +#: gitk:3702 msgid "Search string:" msgstr "検索文字列:" -#: gitk:3702 +#: gitk:3703 msgid "" "Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 " "15:27:38\"):" -msgstr "コミット日時 (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 " +msgstr "" +"コミット日時 (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 " "15:27:38\"):" -#: gitk:3703 +#: gitk:3704 msgid "Since:" msgstr "期間の始め:" -#: gitk:3704 +#: gitk:3705 msgid "Until:" msgstr "期間の終わり:" -#: gitk:3705 +#: gitk:3706 msgid "Limit and/or skip a number of revisions (positive integer):" msgstr "制限・省略するリビジョンの数(正の整数):" -#: gitk:3706 +#: gitk:3707 msgid "Number to show:" msgstr "表示する数:" -#: gitk:3707 +#: gitk:3708 msgid "Number to skip:" msgstr "省略する数:" -#: gitk:3708 +#: gitk:3709 msgid "Miscellaneous options:" msgstr "その他のオプション:" -#: gitk:3709 +#: gitk:3710 msgid "Strictly sort by date" msgstr "厳密に日付順で並び替え" -#: gitk:3710 +#: gitk:3711 msgid "Mark branch sides" msgstr "側枝マーク" -#: gitk:3711 +#: gitk:3712 msgid "Limit to first parent" msgstr "最初の親に制限" -#: gitk:3712 +#: gitk:3713 msgid "Simple history" msgstr "簡易な履歴" -#: gitk:3713 +#: gitk:3714 msgid "Additional arguments to git log:" msgstr "git log への追加の引数:" -#: gitk:3714 +#: gitk:3715 msgid "Enter files and directories to include, one per line:" msgstr "含まれるファイル・ディレクトリを一行ごとに入力:" -#: gitk:3715 +#: gitk:3716 msgid "Command to generate more commits to include:" msgstr "コミット追加コマンド:" -#: gitk:3837 +#: gitk:3838 msgid "Gitk: edit view" msgstr "Gitk: ビュー編集" -#: gitk:3845 +#: gitk:3846 msgid "-- criteria for selecting revisions" msgstr "― リビジョンの選択条件" -#: gitk:3850 +#: gitk:3851 msgid "View Name:" msgstr "ビュー名:" -#: gitk:3925 +#: gitk:3926 msgid "Apply (F5)" msgstr "適用 (F5)" -#: gitk:3963 +#: gitk:3964 msgid "Error in commit selection arguments:" msgstr "コミット選択引数のエラー:" -#: gitk:4016 gitk:4068 gitk:4516 gitk:4530 gitk:5791 gitk:11232 gitk:11233 +#: gitk:4017 gitk:4069 gitk:4517 gitk:4531 gitk:5792 gitk:11263 gitk:11264 msgid "None" msgstr "無し" -#: gitk:4464 gitk:6311 gitk:8073 gitk:8088 +#: gitk:4465 gitk:6312 gitk:8093 gitk:8108 msgid "Date" msgstr "日付" -#: gitk:4464 gitk:6311 +#: gitk:4465 gitk:6312 msgid "CDate" msgstr "作成日" -#: gitk:4613 gitk:4618 +#: gitk:4614 gitk:4619 msgid "Descendant" msgstr "子孫" -#: gitk:4614 +#: gitk:4615 msgid "Not descendant" msgstr "非子孫" -#: gitk:4621 gitk:4626 +#: gitk:4622 gitk:4627 msgid "Ancestor" msgstr "祖先" -#: gitk:4622 +#: gitk:4623 msgid "Not ancestor" msgstr "非祖先" -#: gitk:4912 +#: gitk:4913 msgid "Local changes checked in to index but not committed" msgstr "ステージされた、コミット前のローカルな変更" -#: gitk:4948 +#: gitk:4949 msgid "Local uncommitted changes, not checked in to index" msgstr "ステージされていない、コミット前のローカルな変更" -#: gitk:6629 +#: gitk:6630 msgid "many" msgstr "多数" -#: gitk:6813 +#: gitk:6814 msgid "Tags:" msgstr "タグ:" -#: gitk:6830 gitk:6836 gitk:8066 +#: gitk:6831 gitk:6837 gitk:8086 msgid "Parent" msgstr "親" -#: gitk:6841 +#: gitk:6842 msgid "Child" msgstr "子" -#: gitk:6850 +#: gitk:6851 msgid "Branch" msgstr "ブランチ" -#: gitk:6853 +#: gitk:6854 msgid "Follows" msgstr "下位" -#: gitk:6856 +#: gitk:6857 msgid "Precedes" msgstr "上位" -#: gitk:7354 +#: gitk:7359 #, tcl-format msgid "Error getting diffs: %s" msgstr "diff取得エラー: %s" -#: gitk:7894 +#: gitk:7914 msgid "Goto:" msgstr "Goto:" -#: gitk:7896 +#: gitk:7916 msgid "SHA1 ID:" msgstr "SHA1 ID:" -#: gitk:7915 +#: gitk:7935 #, tcl-format msgid "Short SHA1 id %s is ambiguous" msgstr "%s を含む SHA1 ID は複数存在します" -#: gitk:7922 +#: gitk:7942 #, tcl-format msgid "Revision %s is not known" msgstr "リビジョン %s は不明です" -#: gitk:7932 +#: gitk:7952 #, tcl-format msgid "SHA1 id %s is not known" msgstr "SHA1 id %s は不明です" -#: gitk:7934 +#: gitk:7954 #, tcl-format msgid "Revision %s is not in the current view" msgstr "リビジョン %s は現在のビューにはありません" -#: gitk:8076 +#: gitk:8096 msgid "Children" -msgstr "子供達" +msgstr "子" -#: gitk:8133 +#: gitk:8153 #, tcl-format msgid "Reset %s branch to here" msgstr "%s ブランチをここにリセットする" -#: gitk:8135 +#: gitk:8155 msgid "Detached head: can't reset" msgstr "切り離されたHEAD: リセットできません" -#: gitk:8244 gitk:8250 +#: gitk:8264 gitk:8270 msgid "Skipping merge commit " msgstr "コミットマージをスキップ: " -#: gitk:8259 gitk:8264 +#: gitk:8279 gitk:8284 msgid "Error getting patch ID for " msgstr "パッチ取得エラー: ID " -#: gitk:8260 gitk:8265 +#: gitk:8280 gitk:8285 msgid " - stopping\n" msgstr " - 停止\n" -#: gitk:8270 gitk:8273 gitk:8281 gitk:8294 gitk:8303 +#: gitk:8290 gitk:8293 gitk:8301 gitk:8314 gitk:8323 msgid "Commit " msgstr "コミット " -#: gitk:8274 +#: gitk:8294 msgid "" " is the same patch as\n" " " @@ -842,7 +850,7 @@ msgstr "" " は下記のパッチと同等\n" " " -#: gitk:8282 +#: gitk:8302 msgid "" " differs from\n" " " @@ -850,7 +858,7 @@ msgstr "" " 下記からのdiff\n" " " -#: gitk:8284 +#: gitk:8304 msgid "" "Diff of commits:\n" "\n" @@ -858,130 +866,132 @@ msgstr "" "コミットのdiff:\n" "\n" -#: gitk:8295 gitk:8304 +#: gitk:8315 gitk:8324 #, tcl-format msgid " has %s children - stopping\n" msgstr " には %s の子があります - 停止\n" -#: gitk:8324 +#: gitk:8344 #, tcl-format msgid "Error writing commit to file: %s" -msgstr "ファイルへのコミット書き込みエラー: %s" +msgstr "ファイルへのコミット書き出しエラー: %s" -#: gitk:8330 +#: gitk:8350 #, tcl-format msgid "Error diffing commits: %s" msgstr "コミットのdiff実行エラー: %s" -#: gitk:8360 +#: gitk:8380 msgid "Top" msgstr "Top" -#: gitk:8361 +#: gitk:8381 msgid "From" msgstr "From" -#: gitk:8366 +#: gitk:8386 msgid "To" msgstr "To" -#: gitk:8390 +#: gitk:8410 msgid "Generate patch" msgstr "パッチ生成" -#: gitk:8392 +#: gitk:8412 msgid "From:" msgstr "From:" -#: gitk:8401 +#: gitk:8421 msgid "To:" msgstr "To:" -#: gitk:8410 +#: gitk:8430 msgid "Reverse" msgstr "逆" -#: gitk:8412 gitk:8597 +#: gitk:8432 gitk:8617 msgid "Output file:" msgstr "出力ファイル:" -#: gitk:8418 +#: gitk:8438 msgid "Generate" msgstr "生成" -#: gitk:8456 +#: gitk:8476 msgid "Error creating patch:" msgstr "パッチ生成エラー:" -#: gitk:8479 gitk:8585 gitk:8642 +#: gitk:8499 gitk:8605 gitk:8662 msgid "ID:" msgstr "ID:" -#: gitk:8488 +#: gitk:8508 msgid "Tag name:" msgstr "タグ名:" -#: gitk:8492 gitk:8651 +#: gitk:8512 gitk:8671 msgid "Create" msgstr "生成" -#: gitk:8509 +#: gitk:8529 msgid "No tag name specified" msgstr "タグの名称が指定されていません" -#: gitk:8513 +#: gitk:8533 #, tcl-format msgid "Tag \"%s\" already exists" msgstr "タグ \"%s\" は既に存在します" -#: gitk:8519 +#: gitk:8539 msgid "Error creating tag:" msgstr "タグ生成エラー:" -#: gitk:8594 +#: gitk:8614 msgid "Command:" msgstr "コマンド:" -#: gitk:8602 +#: gitk:8622 msgid "Write" -msgstr "書き込み" +msgstr "書き出し" -#: gitk:8620 +#: gitk:8640 msgid "Error writing commit:" -msgstr "コミット書き込みエラー:" +msgstr "コミット書き出しエラー:" -#: gitk:8647 +#: gitk:8667 msgid "Name:" msgstr "名前:" -#: gitk:8670 +#: gitk:8690 msgid "Please specify a name for the new branch" msgstr "新しいブランチの名前を指定してください" -#: gitk:8675 +#: gitk:8695 #, tcl-format msgid "Branch '%s' already exists. Overwrite?" msgstr "ブランチ '%s' は既に存在します。上書きしますか?" -#: gitk:8741 +#: gitk:8761 #, tcl-format msgid "Commit %s is already included in branch %s -- really re-apply it?" -msgstr "コミット %s は既にブランチ %s に含まれています ― 本当にこれを再適用しますか?" +msgstr "" +"コミット %s は既にブランチ %s に含まれています ― 本当にこれを再適用しますか?" -#: gitk:8746 +#: gitk:8766 msgid "Cherry-picking" msgstr "チェリーピック中" -#: gitk:8755 +#: gitk:8775 #, tcl-format msgid "" "Cherry-pick failed because of local changes to file '%s'.\n" "Please commit, reset or stash your changes and try again." msgstr "" "ファイル '%s' のローカルな変更のためにチェリーピックは失敗しました。\n" -"あなたの変更に commit, reset, stash のいずれかを行ってからやり直してください。" +"あなたの変更に commit, reset, stash のいずれかを行ってからやり直してくださ" +"い。" -#: gitk:8761 +#: gitk:8781 msgid "" "Cherry-pick failed because of merge conflict.\n" "Do you wish to run git citool to resolve it?" @@ -989,32 +999,32 @@ msgstr "" "マージの衝突によってチェリーピックは失敗しました。\n" "この解決のために git citool を実行したいですか?" -#: gitk:8777 +#: gitk:8797 msgid "No changes committed" msgstr "何の変更もコミットされていません" -#: gitk:8803 +#: gitk:8823 msgid "Confirm reset" msgstr "確認を取り消す" -#: gitk:8805 +#: gitk:8825 #, tcl-format msgid "Reset branch %s to %s?" msgstr "ブランチ %s を %s にリセットしますか?" -#: gitk:8809 +#: gitk:8829 msgid "Reset type:" msgstr "Reset タイプ:" -#: gitk:8813 +#: gitk:8833 msgid "Soft: Leave working tree and index untouched" msgstr "Soft: 作業ツリーもインデックスもそのままにする" -#: gitk:8816 +#: gitk:8836 msgid "Mixed: Leave working tree untouched, reset index" msgstr "Mixed: 作業ツリーをそのままにして、インデックスをリセット" -#: gitk:8819 +#: gitk:8839 msgid "" "Hard: Reset working tree and index\n" "(discard ALL local changes)" @@ -1022,19 +1032,19 @@ msgstr "" "Hard: 作業ツリーやインデックスをリセット\n" "(「全ての」ローカルな変更を破棄)" -#: gitk:8836 +#: gitk:8856 msgid "Resetting" msgstr "リセット中" -#: gitk:8893 +#: gitk:8913 msgid "Checking out" msgstr "チェックアウト" -#: gitk:8946 +#: gitk:8966 msgid "Cannot delete the currently checked-out branch" msgstr "現在チェックアウトされているブランチを削除することはできません" -#: gitk:8952 +#: gitk:8972 #, tcl-format msgid "" "The commits on branch %s aren't on any other branch.\n" @@ -1043,203 +1053,203 @@ msgstr "" "ブランチ %s には他のブランチに存在しないコミットがあります。\n" "本当にブランチ %s を削除しますか?" -#: gitk:8983 +#: gitk:9003 #, tcl-format msgid "Tags and heads: %s" msgstr "タグとHEAD: %s" -#: gitk:8998 +#: gitk:9018 msgid "Filter" msgstr "フィルター" -#: gitk:9293 +#: gitk:9313 msgid "" "Error reading commit topology information; branch and preceding/following " "tag information will be incomplete." msgstr "" -"コミット構造情報読み込みエラー; ブランチ及び上位/下位の" -"タグ情報が不完全であるようです。" +"コミット構造情報読み込みエラー; ブランチ及び上位/下位のタグ情報が不完全である" +"ようです。" -#: gitk:10279 +#: gitk:10299 msgid "Tag" msgstr "タグ" -#: gitk:10279 +#: gitk:10299 msgid "Id" msgstr "ID" -#: gitk:10327 +#: gitk:10347 msgid "Gitk font chooser" msgstr "Gitk フォント選択" -#: gitk:10344 +#: gitk:10364 msgid "B" msgstr "B" -#: gitk:10347 +#: gitk:10367 msgid "I" msgstr "I" -#: gitk:10443 +#: gitk:10463 msgid "Gitk preferences" msgstr "Gitk 設定" -#: gitk:10445 +#: gitk:10465 msgid "Commit list display options" msgstr "コミットリスト表示オプション" -#: gitk:10448 +#: gitk:10468 msgid "Maximum graph width (lines)" msgstr "最大グラフ幅(線の本数)" -#: gitk:10452 +#: gitk:10472 #, tcl-format msgid "Maximum graph width (% of pane)" msgstr "最大グラフ幅(ペインに対する%)" -#: gitk:10456 +#: gitk:10476 msgid "Show local changes" msgstr "ローカルな変更を表示" -#: gitk:10459 +#: gitk:10479 msgid "Auto-select SHA1" msgstr "SHA1 の自動選択" -#: gitk:10463 +#: gitk:10483 msgid "Diff display options" msgstr "diff表示オプション" -#: gitk:10465 +#: gitk:10485 msgid "Tab spacing" msgstr "タブ空白幅" -#: gitk:10468 +#: gitk:10488 msgid "Display nearby tags" msgstr "近くのタグを表示する" -#: gitk:10471 +#: gitk:10491 msgid "Hide remote refs" msgstr "リモートリファレンスを隠す" -#: gitk:10474 +#: gitk:10494 msgid "Limit diffs to listed paths" msgstr "diff をリストのパスに制限" -#: gitk:10477 +#: gitk:10497 msgid "Support per-file encodings" msgstr "ファイルごとのエンコーディングのサポート" -#: gitk:10483 gitk:10548 +#: gitk:10503 gitk:10572 msgid "External diff tool" msgstr "外部diffツール" -#: gitk:10485 +#: gitk:10505 msgid "Choose..." msgstr "選択..." -#: gitk:10490 +#: gitk:10510 msgid "Colors: press to choose" msgstr "色: ボタンを押して選択" -#: gitk:10493 +#: gitk:10513 +msgid "Interface" +msgstr "インターフェイス" + +#: gitk:10514 +msgid "interface" +msgstr "インターフェイス" + +#: gitk:10517 msgid "Background" msgstr "背景" -#: gitk:10494 gitk:10524 +#: gitk:10518 gitk:10548 msgid "background" msgstr "背景" -#: gitk:10497 +#: gitk:10521 msgid "Foreground" msgstr "前景" -#: gitk:10498 +#: gitk:10522 msgid "foreground" msgstr "前景" -#: gitk:10501 +#: gitk:10525 msgid "Diff: old lines" msgstr "Diff: 旧バージョン" -#: gitk:10502 +#: gitk:10526 msgid "diff old lines" msgstr "diff 旧バージョン" -#: gitk:10506 +#: gitk:10530 msgid "Diff: new lines" msgstr "Diff: 新バージョン" -#: gitk:10507 +#: gitk:10531 msgid "diff new lines" msgstr "diff 新バージョン" -#: gitk:10511 +#: gitk:10535 msgid "Diff: hunk header" msgstr "Diff: hunkヘッダ" -#: gitk:10513 +#: gitk:10537 msgid "diff hunk header" msgstr "diff hunkヘッダ" -#: gitk:10517 +#: gitk:10541 msgid "Marked line bg" msgstr "マーク行の背景" -#: gitk:10519 +#: gitk:10543 msgid "marked line background" msgstr "マーク行の背景" -#: gitk:10523 +#: gitk:10547 msgid "Select bg" msgstr "選択の背景" -#: gitk:10527 +#: gitk:10551 msgid "Fonts: press to choose" msgstr "フォント: ボタンを押して選択" -#: gitk:10529 +#: gitk:10553 msgid "Main font" msgstr "主フォント" -#: gitk:10530 +#: gitk:10554 msgid "Diff display font" msgstr "Diff表示用フォント" -#: gitk:10531 +#: gitk:10555 msgid "User interface font" msgstr "UI用フォント" -#: gitk:10558 +#: gitk:10582 #, tcl-format msgid "Gitk: choose color for %s" msgstr "Gitk: 「%s」 の色を選択" -#: gitk:11009 -msgid "" -"Sorry, gitk cannot run with this version of Tcl/Tk.\n" -" Gitk requires at least Tcl/Tk 8.4." -msgstr "" -"申し訳ありませんが、このバージョンの Tcl/Tk では gitk を実行できません。\n" -" Gitk は最低でも Tcl/Tk 8.4 を必要とします。" - -#: gitk:11137 +#: gitk:11168 msgid "Cannot find a git repository here." msgstr "ここにはgitリポジトリがありません。" -#: gitk:11141 +#: gitk:11172 #, tcl-format msgid "Cannot find the git directory \"%s\"." msgstr "gitディレクトリ \"%s\" を見つけられません。" -#: gitk:11188 +#: gitk:11219 #, tcl-format msgid "Ambiguous argument '%s': both revision and filename" msgstr "あいまいな引数 '%s': リビジョンとファイル名の両方に解釈できます" -#: gitk:11200 +#: gitk:11231 msgid "Bad arguments to gitk:" msgstr "gitkへの不正な引数:" -#: gitk:11285 +#: gitk:11316 msgid "Command line" msgstr "コマンド行" -- cgit v1.2.1 From 1924d1bc0dc99cd3460d3551671908cc76c09d3b Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Fri, 6 Nov 2009 23:28:01 +0000 Subject: gitk: Default to the system colours on Windows Also convert a button to use the themed widget set. Signed-off-by: Pat Thoyts Signed-off-by: Paul Mackerras --- gitk | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gitk b/gitk index ff6b680c7..4e2be7ff4 100755 --- a/gitk +++ b/gitk @@ -10732,7 +10732,7 @@ proc doprefs {} { ${NS}::label $top.cdisp -text [mc "Colors: press to choose"] grid $top.cdisp - -sticky w -pady 10 label $top.ui -padx 40 -relief sunk -background $uicolor - button $top.uibut -text [mc "Interface"] -font optionfont \ + ${NS}::button $top.uibut -text [mc "Interface"] \ -command [list choosecolor uicolor {} $top.ui [mc "interface"] setui] grid x $top.uibut $top.ui -sticky w label $top.bg -padx 40 -relief sunk -background $bgcolor @@ -11350,13 +11350,20 @@ if {[tk windowingsystem] eq "aqua"} { } set colors {green red blue magenta darkgrey brown orange} -set uicolor grey85 -set bgcolor white -set fgcolor black +if {[tk windowingsystem] eq "win32"} { + set uicolor SystemButtonFace + set bgcolor SystemWindow + set fgcolor SystemButtonText + set selectbgcolor SystemHighlight +} else { + set uicolor grey85 + set bgcolor white + set fgcolor black + set selectbgcolor gray85 +} set diffcolors {red "#00a000" blue} set diffcontext 3 set ignorespace 0 -set selectbgcolor gray85 set markbgcolor "#e0e0ff" set circlecolors {white blue gray blue blue} -- cgit v1.2.1 From a80e82f6ee79a0b1ad42781af79bc76628ec90e9 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Sat, 14 Nov 2009 13:21:09 +0000 Subject: gitk: Fix selection of tags When a tag is clicked an error is raised due to a missing parameter in a function call. Signed-off-by: Pat Thoyts Signed-off-by: Paul Mackerras --- gitk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitk b/gitk index 4e2be7ff4..364c7a84c 100755 --- a/gitk +++ b/gitk @@ -10489,7 +10489,7 @@ proc showtag {tag isnew} { set text "[mc "Tag"]: $tag\n[mc "Id"]: $tagids($tag)" } appendwithlinks $text {} - maybe_scroll_ctext + maybe_scroll_ctext 1 $ctext conf -state disabled init_flist {} } -- cgit v1.2.1