GNU bug report logs - #73178
31.0.50; [PATCH] Improve the widget to customize icon

Previous Next

Package: emacs;

Reported by: David Ponce <da_vid <at> orange.fr>

Date: Wed, 11 Sep 2024 14:29:02 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: David Ponce <da_vid <at> orange.fr>
Subject: bug#73178: closed (Re: bug#73178: 31.0.50; [PATCH] Improve the
 widget to customize icon)
Date: Thu, 09 Jan 2025 14:37:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#73178: 31.0.50; [PATCH] Improve the widget to customize icon

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 73178 <at> debbugs.gnu.org.

-- 
73178: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73178
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: David Ponce <da_vid <at> orange.fr>
Cc: maurooaranda <at> gmail.com, 73178-done <at> debbugs.gnu.org
Subject: Re: bug#73178: 31.0.50; [PATCH] Improve the widget to customize icon
Date: Thu, 09 Jan 2025 16:35:56 +0200
> Date: Thu, 9 Jan 2025 11:01:40 +0100
> Cc: 73178 <at> debbugs.gnu.org
> From: David Ponce <da_vid <at> orange.fr>
> 
> > I wanted to install this, but byte-compiler produces a warning:
> > 
> >      ELC      cus-edit.elc
> > 
> >    In toplevel form:
> >    cus-edit.el:5595:20: Warning: reference to free variable `custom-icon--texts-widget'
> > 
> > Is that a typo, and you actually meant custom-icon--texts-sub-type?
> > 
> > Also, could you please accompany the patch with the ChangeLog-style
> > commit log message (see CONTRIBUTE for the details)?  Otherwise, I
> > will have to write the log message manually when installing your
> > changes.
> > 
> > Thanks.
> 
> Hello Eli,
> 
> Hmm, it seems you didn't install the correct patch?
> I attached the correct patch (V2) which applies cleanly for me.
> Also below is my proposed ChangeLog.
> 
> Thank you, and thanks Mauro for your review.

Thanks, and sorry for missing the last patch earlier.

Now installed on master, and closing the bug.

[Message part 3 (message/rfc822, inline)]
From: David Ponce <da_vid <at> orange.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; [PATCH] Improve the widget to customize icon
Date: Wed, 11 Sep 2024 16:28:24 +0200
[Message part 4 (text/plain, inline)]
Hello,

Whenever I try to use Emacs' built-in icons, I have some difficulty
understanding the user interface for customizing an icon. For example,
regardless of the type of icon element, all the fields have similar
labels, which makes the interface difficult to understand and use.
For instance, for Images, it is not clear that the String field is
intended to enter the image file name:

Choice: Value Menu [Images|Colorful Emojis|Monochrome Symbols|Text only]
Repeat:
INS DEL String:
INS
Plist:
INS DEL :
            Key:
            Value:
INS

Also, nothing guides you regarding usage of this complex widget.

I propose the attached patch that improves the widget used to
customize an icon. Possible ChangeLog:

2024-09-11  David Ponce  <da_vid <at> orange.fr>

	Improve usability of the widget used to customize icon.

	* lisp/cus-edit.el (custom-icon--images-sub-type)
	(custom-icon--emojis-sub-type, custom-icon--symbols-sub-type)
	(custom-icon--texts-sub-type): New constant.
	(custom-icon--type): New constant.
	(custom-icon-value-create): Use it.

With this patch, a quick help summarizes usage, and the different
fields are named according to the kind of icon element.

Here is a view of the new UI when customizing the default `button' icon:

---------------------------------------------------------------
Hide Button:
Icon elements:
- Only the first occurrence of a same element counts.
- Missing elements will take their default value.:
- At least one element should be provided with a valid value.

INS DEL Choice: Value Menu Images:
         
         Values:
         INS DEL Image filename:
         INS
         Image attributes:
         INS DEL :
                     Key: :face
                     Value: icon-button
         INS

INS DEL Choice: Value Menu Colorful Emojis:
         
         Values:
         INS DEL Emoji text: 🔵
         INS
         Emoji text properties:
         INS DEL :
                     Key: :face
                     Value: icon
         INS

INS DEL Choice: Value Menu Monochrome Symbols:
         
         Values:
         INS DEL Symbol text: ●
         INS
         Symbol text properties:
         INS DEL :
                     Key: :face
                     Value: icon-button
         INS

INS DEL Choice: Value Menu Texts Only:
         
         Values:
         INS DEL Text: button
         INS
         Text properties:
         INS DEL :
                     Key: :face
                     Value: icon-button
         INS

INS
---------------------------------------------------------------

WDYT?

Thanks!


In GNU Emacs 31.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
 3.24.43, cairo version 1.18.0) of 2024-09-11
Repository revision: 69e1aca041c57ba425425d31471e1c8f86d3bf04
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 40 (KDE Plasma)

Configured using:
 'configure --with-x-toolkit=gtk3 --with-cairo-xcb
 --with-native-compilation=no
 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LC_TIME: fr_FR.utf8
  value of $LANG: fr_FR.UTF-8
  locale-coding-system: utf-8-unix
[improve-widget-to-customize-icon-V0.patch (text/x-patch, attachment)]

This bug report was last modified 133 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.