guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 30bd3bda23a3a26c3cabd010815e539bce0b4979
Author: Alexey Abramov <[email protected]>
AuthorDate: Fri Feb 6 19:40:37 2026 +0000

    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 <[email protected]>
---
 gnu/local.mk                                       |  1 +
 gnu/packages/calendar.scm                          |  3 ++-
 .../patches/tkremind-fix-fontchooser.patch         | 31 ++++++++++++++++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index aa51ca503e..fd063ec5f1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2469,6 +2469,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/tbb-other-arches.patch                  \
   %D%/packages/patches/tclxml-3.2-install.patch                        \
   %D%/packages/patches/tcsh-fix-autotest.patch                 \
+  %D%/packages/patches/tkremind-fix-fontchooser.patch          \
   %D%/packages/patches/teensy-loader-cli-help.patch            \
   %D%/packages/patches/tensorflow-c-api-fix.patch              \
   %D%/packages/patches/texinfo-headings-single.patch           \
diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 40ffdcb945..cc27a4bb5d 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -341,7 +341,8 @@ command-line interface} and a @acronym{TUI, textual user 
interface} named
                                         ".")
                            ".tar.gz"))
        (sha256
-        (base32 "1hp24d48nhlv6f7p6sj4qnqc9pyfgyhjah8w9426bzkqkqb31j9c"))))
+        (base32 "1hp24d48nhlv6f7p6sj4qnqc9pyfgyhjah8w9426bzkqkqb31j9c"))
+       (patches (search-patches "tkremind-fix-fontchooser.patch"))))
     (properties
      `((output-synopsis "tcl" "graphical front-end to Remind calendar 
program")))
     (build-system gnu-build-system)
diff --git a/gnu/packages/patches/tkremind-fix-fontchooser.patch 
b/gnu/packages/patches/tkremind-fix-fontchooser.patch
new file mode 100644
index 0000000000..2ac5777497
--- /dev/null
+++ b/gnu/packages/patches/tkremind-fix-fontchooser.patch
@@ -0,0 +1,31 @@
+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
+ }

Reply via email to