git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCHv2] gitk: Replace "next" and "prev" buttons with down and up arrows.

From
Marc Branchaud <marcnarc@xiplink.com>
Date
Dec 18, 2013, 16:04 UTC
Message-ID
<1387382653-8385-1-git-send-email-marcnarc@xiplink.com>
In-Reply-To
<20131008193618.GE9464@google.com>

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>
---
Finally got around to drawing some up and down arrows.
		M.
 gitk | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/gitk b/gitk
index 33c3a6c..abd2ef3 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:"]
-- 
1.8.5.2.2.g49768e2
Previous: Marc BranchaudNext: Marc Branchaud
Message 6 of 12 in “gitk next/prev buttons”
  1. Lucas Sandery [three am design]Oct 1, 2013
  2. Lucas SanderyOct 2, 2013
  3. Marc BranchaudOct 8, 2013
  4. Jonathan NiederOct 8, 2013
  5. Marc BranchaudOct 8, 2013
  6. [PATCHv2] gitk: Replace "next" and "prev" buttons with down and up arrows.Marc Branchaud, Dec 18, 2013
  7. Marc BranchaudJan 21, 2014
  8. Paul MackerrasJan 22, 2014
  9. Junio C HamanoJan 22, 2014
  10. Paul MackerrasJan 23, 2014
  11. Junio C HamanoJan 23, 2014
  12. gitk: Rename "next" and "prev" buttons to "older" and "newer".Marc Branchaud, Oct 8, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.