summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d38d7d4)
raw | patch | inline | side by side (parent: d38d7d4)
author | Daniel A. Steffen <das@users.sourceforge.net> | |
Mon, 23 Mar 2009 11:17:38 +0000 (12:17 +0100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Mon, 23 Mar 2009 11:35:38 +0000 (22:35 +1100) |
- middle button is B3 on TkAqua
- add horizontal mousehweel scrolling
- nicer default fonts
- use OSX-specific extdifftool
- remove quit menu item, call doquit on quit event
- move about & preferences menu items into apple menu
- don't set menu font
Signed-off-by: Daniel A. Steffen <das@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
- add horizontal mousehweel scrolling
- nicer default fonts
- use OSX-specific extdifftool
- remove quit menu item, call doquit on quit event
- move about & preferences menu items into apple menu
- don't set menu font
Signed-off-by: Daniel A. Steffen <das@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 0dcfbf1b4afb5e1e1149ad80c259cc09820eab80..a7294a14763062a3141150681a12f6fbb60a6c1a 100755 (executable)
--- a/gitk
+++ b/gitk
option add *Button.font uifont startupFile
option add *Checkbutton.font uifont startupFile
option add *Radiobutton.font uifont startupFile
- option add *Menu.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
# The "mc" arguments here are purely so that xgettext
# sees the following string as needing to be translated
- makemenu .bar {
- {mc "File" cascade {
+ set file {
+ mc "File" cascade {
{mc "Update" command updatecommits -accelerator F5}
{mc "Reload" command reloadcommits -accelerator Meta1-F5}
{mc "Reread references" command rereadrefs}
{xx "" separator}
{mc "Quit" command doquit -accelerator Meta1-Q}
}}
- {mc "Edit" cascade {
+ set edit {
+ mc "Edit" cascade {
{mc "Preferences" command doprefs}
}}
- {mc "View" cascade {
+ set view {
+ mc "View" cascade {
{mc "New view..." command {newview 0} -accelerator Shift-F4}
{mc "Edit view..." command editview -state disabled -accelerator F4}
{mc "Delete view" command delview -state disabled}
{xx "" separator}
{mc "All files" radiobutton {selectedview 0} -command {showview 0}}
}}
- {mc "Help" cascade {
+ if {[tk windowingsystem] ne "aqua"} {
+ set help {
+ mc "Help" cascade {
+ {mc "About gitk" command about}
+ {mc "Key bindings" command keys}
+ }}
+ set bar [list $file $edit $view $help]
+ } else {
+ proc ::tk::mac::ShowPreferences {} {doprefs}
+ proc ::tk::mac::Quit {} {doquit}
+ lset file end [lreplace [lindex $file end] end-1 end]
+ set apple {
+ xx "Apple" cascade {
{mc "About gitk" command about}
+ {xx "" separator}
+ }}
+ set help {
+ mc "Help" cascade {
{mc "Key bindings" command keys}
}}
+ set bar [list $apple $file $view $help]
}
+ makemenu .bar $bar
. configure -menu .bar
# the gui has upper and lower half, parts of a paned window.
if {[tk windowingsystem] eq {aqua}} {
set M1B M1
+ set ::BM "3"
} else {
set M1B Control
+ set ::BM "2"
}
bind .pwbottom <Configure> {resizecdetpanes %W %w}
set delta [expr {- (%D)}]
allcanvs yview scroll $delta units
}
+ bindall <Shift-MouseWheel> {
+ set delta [expr {- (%D)}]
+ $canv xview scroll $delta units
+ }
}
}
- bindall <2> "canvscan mark %W %x %y"
- bindall <B2-Motion> "canvscan dragto %W %x %y"
+ bindall <$::BM> "canvscan mark %W %x %y"
+ bindall <B$::BM-Motion> "canvscan dragto %W %x %y"
bindkey <Home> selfirstline
bindkey <End> sellastline
bind . <Key-Up> "selnextline -1"
}
}
-set mainfont {Helvetica 9}
-set textfont {Courier 9}
-set uifont {Helvetica 9 bold}
+if {[tk windowingsystem] eq "aqua"} {
+ set mainfont {{Lucida Grande} 9}
+ set textfont {Monaco 9}
+ set uifont {{Lucida Grande} 9 bold}
+} else {
+ set mainfont {Helvetica 9}
+ set textfont {Courier 9}
+ set uifont {Helvetica 9 bold}
+}
set tabstop 8
set findmergefiles 0
set maxgraphpct 50
set autoselect 1
set perfile_attrs 0
-set extdifftool "meld"
+if {[tk windowingsystem] eq "aqua"} {
+ set extdifftool "opendiff"
+} else {
+ set extdifftool "meld"
+}
set colors {green red blue magenta darkgrey brown orange}
set bgcolor white