summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2007-11-22 08:40:20 +0000
committerJan Djärv <jan.h.d@swipnet.se>2007-11-22 08:40:20 +0000
commit1fbf5386109f20bd66a8c061ab1982f6ec3c3193 (patch)
treea95a69f8d0e352347ff7d114a9ce676358679db9 /src
parent33127d1a78f2a37d68ffa09642df2f38d78e95b1 (diff)
downloademacs-1fbf5386109f20bd66a8c061ab1982f6ec3c3193.tar.gz
(update_frame_tool_bar): Don't call x-gtk-map-stock if
file for image is nil.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/gtkutil.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5d3fdf4b9af..642ad1f638e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-22 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * gtkutil.c (update_frame_tool_bar): Don't call x-gtk-map-stock if
+ file for image is nil.
+
2007-11-19 Jason Rumney <jasonr@gnu.org>
* w32bdf.c (w32_init_bdf_font, w32_BDF_to_x_font): CreateFileMapping
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 86a4703d0b7..9b2f11b1f72 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3808,6 +3808,7 @@ update_frame_tool_bar (f)
GtkWidget *wbutton = NULL;
GtkWidget *weventbox;
Lisp_Object func = intern ("x-gtk-map-stock");
+ Lisp_Object specified_file;
ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (x->toolbar_widget), i);
@@ -3826,8 +3827,9 @@ update_frame_tool_bar (f)
continue;
}
- if (EQ (Qt, Ffboundp (func)))
- stock = call1 (func, file_for_image (image));
+ specified_file = file_for_image (image);
+ if (!NILP (specified_file) && EQ (Qt, Ffboundp (func)))
+ stock = call1 (func, specified_file);
if (! NILP (stock) && STRINGP (stock))
{