aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2021-03-12 08:47:41 -0800
committerGlenn Morris2021-03-12 08:47:41 -0800
commit74c389526f93cc4eded6759ffd3e1cfa4d429d6f (patch)
treeb5904c644dc1701ed7214ce6e997d2252c25f2c5 /src
parentf7b7ecc4df7108da31625a3630cbbbdbec3abbd7 (diff)
parent2c5f21541957e2420e54ab2a70883140811708f7 (diff)
downloademacs-74c389526f93cc4eded6759ffd3e1cfa4d429d6f.tar.gz
emacs-74c389526f93cc4eded6759ffd3e1cfa4d429d6f.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/gtkutil.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 11e59b9fae5..4634c35dd4c 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -5014,11 +5014,10 @@ update_frame_tool_bar (struct frame *f)
5014 GtkWidget *wbutton = NULL; 5014 GtkWidget *wbutton = NULL;
5015 Lisp_Object specified_file; 5015 Lisp_Object specified_file;
5016 bool vert_only = ! NILP (PROP (TOOL_BAR_ITEM_VERT_ONLY)); 5016 bool vert_only = ! NILP (PROP (TOOL_BAR_ITEM_VERT_ONLY));
5017 const char *label 5017 Lisp_Object label
5018 = (EQ (style, Qimage) || (vert_only && horiz)) ? NULL 5018 = (EQ (style, Qimage) || (vert_only && horiz))
5019 : STRINGP (PROP (TOOL_BAR_ITEM_LABEL)) 5019 ? Qnil
5020 ? SSDATA (PROP (TOOL_BAR_ITEM_LABEL)) 5020 : PROP (TOOL_BAR_ITEM_LABEL);
5021 : "";
5022 5021
5023 ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j); 5022 ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j);
5024 5023
@@ -5131,8 +5130,11 @@ update_frame_tool_bar (struct frame *f)
5131 5130
5132 /* If there is an existing widget, check if it's stale; if so, 5131 /* If there is an existing widget, check if it's stale; if so,
5133 remove it and make a new tool item from scratch. */ 5132 remove it and make a new tool item from scratch. */
5134 if (ti && xg_tool_item_stale_p (wbutton, stock_name, icon_name, 5133 if (ti && xg_tool_item_stale_p (wbutton, stock_name, icon_name, img,
5135 img, label, horiz)) 5134 NILP (label)
5135 ? NULL
5136 : STRINGP (label) ? SSDATA (label) : "",
5137 horiz))
5136 { 5138 {
5137 gtk_container_remove (GTK_CONTAINER (wtoolbar), 5139 gtk_container_remove (GTK_CONTAINER (wtoolbar),
5138 GTK_WIDGET (ti)); 5140 GTK_WIDGET (ti));
@@ -5189,7 +5191,11 @@ update_frame_tool_bar (struct frame *f)
5189#else 5191#else
5190 if (w) gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); 5192 if (w) gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
5191#endif 5193#endif
5192 ti = xg_make_tool_item (f, w, &wbutton, label, i, horiz, text_image); 5194 ti = xg_make_tool_item (f, w, &wbutton,
5195 NILP (label)
5196 ? NULL
5197 : STRINGP (label) ? SSDATA (label) : "",
5198 i, horiz, text_image);
5193 gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j); 5199 gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j);
5194 } 5200 }
5195 5201