bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36156: [PATCH] Make toolbar show keyboard equivalents in its tooltip


From: Juri Linkov
Subject: bug#36156: [PATCH] Make toolbar show keyboard equivalents in its tooltips
Date: Sun, 25 Aug 2019 23:18:20 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> > Are we sure TOOL_BAR_ITEM_CAPTION will always produce human-readable
>> > text?
>>
>> I think so, because we do this above (quoted to avoid gmail mangling the 
>> code):
>
> That just makes sure it's a string, but what kind of string is that?
> A caption can be something unpalatable, like "OpNuFil".

Currently HELP's fallback to CAPTION is a standard way
to handle absence of HELP:

note_tool_bar_highlight has this code:

  help_echo_string = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_HELP);
  if (NILP (help_echo_string))
    help_echo_string = AREF (f->tool_bar_items, prop_idx + 
TOOL_BAR_ITEM_CAPTION);

xg_tool_bar_help_callback has this code:

      help = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_HELP);
      if (NILP (help))
        help = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_CAPTION);

The patch added the same handling to parse_tool_bar_item:

       Lisp_Object orig = PROP (TOOL_BAR_ITEM_HELP);
+      if (NILP (orig))
+        orig = PROP (TOOL_BAR_ITEM_CAPTION);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]