summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Branchaud <marcnarc@xiplink.com>2013-12-18 11:04:13 -0500
committerPaul Mackerras <paulus@samba.org>2014-01-21 22:18:23 +1100
commit786f15c849916513531862a5f3fb45c0323b61f6 (patch)
tree067a53dd11309522ed2092280983ae514164777e
parentc61f3a97b18ec01443440a4be55610929694020d (diff)
downloadgit-786f15c849916513531862a5f3fb45c0323b61f6.tar.gz
gitk: Replace "next" and "prev" buttons with down and up arrows
Users often find that "next" and "prev" do the opposite of what they expect. For example, "next" moves to the next match down the list, but that is almost always backwards in time. Replacing the text with arrows makes it clear where the buttons will take the user. Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rwxr-xr-xgitk30
1 files changed, 28 insertions, 2 deletions
diff --git a/gitk b/gitk
index 894e2d7ef3..3f297dbab1 100755
--- a/gitk
+++ b/gitk
@@ -2263,9 +2263,35 @@ proc makewindow {} {
# build up the bottom bar of upper window
${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}
+
+ set bm_down_data {
+ #define down_width 16
+ #define down_height 16
+ static unsigned char down_bits[] = {
+ 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
+ 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
+ 0x87, 0xe1, 0x8e, 0x71, 0x9c, 0x39, 0xb8, 0x1d,
+ 0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01};
+ }
+ image create bitmap bm-down -data $bm_down_data -foreground $uifgcolor
+ ${NS}::button .tf.lbar.fnext -width 26 -command {dofind 1 1}
+ .tf.lbar.fnext configure -image bm-down
+
+ set bm_up_data {
+ #define up_width 16
+ #define up_height 16
+ static unsigned char up_bits[] = {
+ 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f,
+ 0xb8, 0x1d, 0x9c, 0x39, 0x8e, 0x71, 0x87, 0xe1,
+ 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
+ 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01};
+ }
+ image create bitmap bm-up -data $bm_up_data -foreground $uifgcolor
+ ${NS}::button .tf.lbar.fprev -width 26 -command {dofind -1 1}
+ .tf.lbar.fprev configure -image bm-up
+
${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:"]