1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00
Files
guix/gnu/packages/patches/tkremind-fix-fontchooser.patch
Alexey Abramov 30bd3bda23 gnu: remind: Fix tkremind fontchooser issues.
Fontchooser breaks when the window class starts with ".".  wrap-program
renames tkremind to .tkremind-real, and Tk uses the script basename as
the window class, causing this issue.  Additionally, SetHeadingFont
references Option(HeadingFont) before it is set.

* gnu/packages/calendar.scm (remind)[source]: Add patch.
* gnu/packages/patches/tkremind-fix-fontchooser.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: I442b156a5780156080c663e2ee53aa1e3e741ec1
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-03-03 09:56:03 +00:00

32 lines
1.1 KiB
Diff

Fix tkremind fontchooser issues.
1. Pass -name to wish to set the window class explicitly. Without this,
wrap-program renames tkremind to .tkremind-real, and Tk uses the script
basename as the window class. A class starting with "." breaks the
fontchooser which interprets it as a window path.
2. Fix bug in SetHeadingFont: it references Option(HeadingFont) before it
is set, causing "can't read Option(HeadingFont): no such variable" when
selecting a heading font. Use the just-configured HeadingFont instead.
diff --git a/scripts/tkremind.in b/scripts/tkremind.in
--- a/scripts/tkremind.in
+++ b/scripts/tkremind.in
@@ -13,7 +13,7 @@
#--------------------------------------------------------------
# the next line restarts using wish \
-exec wish "$0" "$@"
+exec wish "$0" -name Tkremind "$@"
tk appname tkremind
@@ -5190,7 +5190,7 @@ proc SetHeadingFont {font} {
global tmpOpt
font configure HeadingFont {*}[font actual $font]
- font configure BoldFont {*}$Option(HeadingFont) -weight bold
+ font configure BoldFont {*}[font actual HeadingFont] -weight bold
set tmpOpt(HeadingFont) [font actual $font]
raise .opt
}