+2009-07-16 Chong Yidong <cyd@stupidchicken.com>
+
+ * xterm.c (Qx_gtk_map_stock): New var.
+
+ * gtkutil.c (update_frame_tool_bar): Use Qx_gtk_map_stock instead
+ of calling intern each time.
+
2009-07-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* nsfont.m (nsfont_draw): Remove code for stippling, which actually
/* Update the tool bar for frame F. Add new buttons and remove old. */
+extern Lisp_Object Qx_gtk_map_stock;
+
void
update_frame_tool_bar (f)
FRAME_PTR f;
for (i = 0; i < f->n_tool_bar_items; ++i)
{
-
int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P));
int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P));
int idx;
Lisp_Object rtl;
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);
}
specified_file = file_for_image (image);
- if (!NILP (specified_file) && EQ (Qt, Ffboundp (func)))
- stock = call1 (func, specified_file);
+ if (!NILP (specified_file) && !NILP (Ffboundp (Qx_gtk_map_stock)))
+ stock = call1 (Qx_gtk_map_stock, specified_file);
- if (! NILP (stock) && STRINGP (stock))
+ if (STRINGP (stock))
{
stock_name = SSDATA (stock);
if (stock_name[0] == 'n' && stock_name[1] == ':')
#ifdef USE_GTK
/* The name of the Emacs icon file. */
static Lisp_Object xg_default_icon_file;
+
+/* Used in gtkutil.c. */
+Lisp_Object Qx_gtk_map_stock;
#endif
/* Used in x_flush. */
#ifdef USE_GTK
xg_default_icon_file = build_string ("icons/hicolor/scalable/apps/emacs.svg");
staticpro (&xg_default_icon_file);
+
+ Qx_gtk_map_stock = intern ("x-gtk-map-stock");
+ staticpro (&Qx_gtk_map_stock);
#endif
DEFVAR_BOOL ("x-use-underline-position-properties",