emacs-diffs
[Top][All Lists]
Advanced

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

master 74c3895 1/5: Merge from origin/emacs-27


From: Glenn Morris
Subject: master 74c3895 1/5: Merge from origin/emacs-27
Date: Fri, 12 Mar 2021 11:47:52 -0500 (EST)

branch: master
commit 74c389526f93cc4eded6759ffd3e1cfa4d429d6f
Merge: f7b7ecc 2c5f215
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    Merge from origin/emacs-27
    
    2c5f215419 Avoid crashes in Mew due to corrupted tool-bar label
    7a23915618 * lisp/tooltip.el (tooltip): Doc fix for GTK.
    c4bbe02cc4 * lisp/help.el (help-for-help-internal): Doc fix; use impe...
    
    # Conflicts:
    #   lisp/help.el
    #   lisp/tooltip.el
---
 lisp/help.el    |  2 +-
 lisp/tooltip.el |  5 ++++-
 src/gtkutil.c   | 22 ++++++++++++++--------
 3 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/lisp/help.el b/lisp/help.el
index 79d8296..d4be9aa 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -210,7 +210,7 @@ Do not call this in the scope of `with-help-window'."
 \\[describe-key] KEYS      Display the full documentation for the key sequence.
 \\[Info-goto-emacs-key-command-node] KEYS      Show the Emacs manual's section 
for the command bound to KEYS.
 \\[view-lossage]           Show last 300 input keystrokes (lossage).
-\\[describe-language-environment] LANG-ENV  Describes a specific language 
environment, or RET for current.
+\\[describe-language-environment] LANG-ENV  Describe a specific language 
environment, or RET for current.
 \\[describe-mode]           Display documentation of current minor modes and 
current major mode,
              including their special commands.
 \\[view-emacs-news]           Display news of recent Emacs changes.
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index af3b86b..293c034 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -131,7 +131,10 @@ of the `tooltip' face are used instead."
      :inherit variable-pitch)
     (t
      :inherit variable-pitch))
-  "Face for tooltips."
+  "Face for tooltips.
+
+When using the GTK toolkit, this face will only be used if
+`x-gtk-use-system-tooltips' is non-nil."
   :group 'basic-faces)
 
 (defcustom tooltip-use-echo-area nil
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 11e59b9..4634c35 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -5014,11 +5014,10 @@ update_frame_tool_bar (struct frame *f)
       GtkWidget *wbutton = NULL;
       Lisp_Object specified_file;
       bool vert_only = ! NILP (PROP (TOOL_BAR_ITEM_VERT_ONLY));
-      const char *label
-       = (EQ (style, Qimage) || (vert_only && horiz)) ? NULL
-       : STRINGP (PROP (TOOL_BAR_ITEM_LABEL))
-       ? SSDATA (PROP (TOOL_BAR_ITEM_LABEL))
-       : "";
+      Lisp_Object label
+       = (EQ (style, Qimage) || (vert_only && horiz))
+       ? Qnil
+       : PROP (TOOL_BAR_ITEM_LABEL);
 
       ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j);
 
@@ -5131,8 +5130,11 @@ update_frame_tool_bar (struct frame *f)
 
       /* If there is an existing widget, check if it's stale; if so,
         remove it and make a new tool item from scratch.  */
-      if (ti && xg_tool_item_stale_p (wbutton, stock_name, icon_name,
-                                     img, label, horiz))
+      if (ti && xg_tool_item_stale_p (wbutton, stock_name, icon_name, img,
+                                     NILP (label)
+                                     ? NULL
+                                     : STRINGP (label) ? SSDATA (label) : "",
+                                     horiz))
        {
          gtk_container_remove (GTK_CONTAINER (wtoolbar),
                                GTK_WIDGET (ti));
@@ -5189,7 +5191,11 @@ update_frame_tool_bar (struct frame *f)
 #else
          if (w) gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
 #endif
-          ti = xg_make_tool_item (f, w, &wbutton, label, i, horiz, text_image);
+          ti = xg_make_tool_item (f, w, &wbutton,
+                                 NILP (label)
+                                 ? NULL
+                                 : STRINGP (label) ? SSDATA (label) : "",
+                                 i, horiz, text_image);
           gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j);
         }
 



reply via email to

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