Commit 4e6b227d authored by Chong Yidong's avatar Chong Yidong

* 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.
parent c0db3477
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
......
......@@ -3827,6 +3827,8 @@ find_rtl_image (f, image, rtl)
/* 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;
......@@ -3878,7 +3880,6 @@ update_frame_tool_bar (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;
......@@ -3893,7 +3894,6 @@ update_frame_tool_bar (f)
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);
......@@ -3914,10 +3914,10 @@ update_frame_tool_bar (f)
}
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] == ':')
......
......@@ -323,6 +323,9 @@ static Lisp_Object Qlatin_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. */
......@@ -10788,6 +10791,9 @@ syms_of_xterm ()
#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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment