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

[PATCH 4/5] gitk: Disable option when themed widgets are not available

From
MHMark Hills <mark@pogo.org.uk>
Date
Jan 13, 2010, 20:40 UTC
Message-ID
<1263415222-5911-4-git-send-email-mark@pogo.org.uk>
In-Reply-To
<1263415222-5911-3-git-send-email-mark@pogo.org.uk>

Disable the widget instead of using the label to indicate that themed widgets are not available.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
 gitk |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gitk b/gitk
index 3cdc31e..54f4fb3 100755
--- a/gitk
+++ b/gitk
@@ -10736,14 +10736,14 @@ proc doprefs {} {
 
     ${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)"]
+	${NS}::checkbutton $top.want_ttk -variable want_ttk \
+	    -text [mc "Use themed widgets (change requires restart)"]
     } else {
-	${NS}::label $top.ttk_note -text [mc "(currently unavailable)"]
+	${NS}::checkbutton $top.want_ttk \
+	    -text [mc "Use themed widgets"] -state disabled
     }
-    grid x $top.want_ttk $top.ttk_note -sticky w
+    grid x $top.want_ttk - -sticky w
 
     ${NS}::label $top.cdisp -text [mc "Colors: press to choose"]
     grid $top.cdisp - -sticky w -pady 10
-- 
1.6.6.5.ge408
Previous: Mark HillsNext: Mark Hills
Message 5 of 6 in “gitk: font and theme use”
  1. gitk: font and theme useMark Hills, Jan 13, 2010
  2. 1/5 gitk: Remove forced use of sans-serif fontMark Hills, Jan 13, 2010
  3. 2/5 gitk: Set the font for all spinbox widgetsMark Hills, Jan 13, 2010
  4. 3/5 gitk: Set the font for all listbox widgetsMark Hills, Jan 13, 2010
  5. 4/5 gitk: Disable option when themed widgets are not availableMark Hills, Jan 13, 2010
  6. 5/5 gitk: Use consistent font for all text input fieldsMark Hills, Jan 13, 2010

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.