aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-07-16 01:24:00 +0000
committerChong Yidong2009-07-16 01:24:00 +0000
commit4e6b227dbe52c61ca54df5fc0597fb190734210d (patch)
tree54bbbc631d207a4a724f3e5e66df752cbe0573a6
parentc0db3477b4b038cf220b60790cb7bd7a9eff976d (diff)
downloademacs-4e6b227dbe52c61ca54df5fc0597fb190734210d.tar.gz
emacs-4e6b227dbe52c61ca54df5fc0597fb190734210d.zip
* 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.
-rw-r--r--src/ChangeLog7
-rw-r--r--src/gtkutil.c10
-rw-r--r--src/xterm.c6
3 files changed, 18 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 31103378691..999269f60a8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12009-07-16 Chong Yidong <cyd@stupidchicken.com>
2
3 * xterm.c (Qx_gtk_map_stock): New var.
4
5 * gtkutil.c (update_frame_tool_bar): Use Qx_gtk_map_stock instead
6 of calling intern each time.
7
12009-07-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 82009-07-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 9
3 * nsfont.m (nsfont_draw): Remove code for stippling, which actually 10 * nsfont.m (nsfont_draw): Remove code for stippling, which actually
diff --git a/src/gtkutil.c b/src/gtkutil.c
index e18044f85e2..5072094d6ce 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3827,6 +3827,8 @@ find_rtl_image (f, image, rtl)
3827 3827
3828/* Update the tool bar for frame F. Add new buttons and remove old. */ 3828/* Update the tool bar for frame F. Add new buttons and remove old. */
3829 3829
3830extern Lisp_Object Qx_gtk_map_stock;
3831
3830void 3832void
3831update_frame_tool_bar (f) 3833update_frame_tool_bar (f)
3832 FRAME_PTR f; 3834 FRAME_PTR f;
@@ -3878,7 +3880,6 @@ update_frame_tool_bar (f)
3878 3880
3879 for (i = 0; i < f->n_tool_bar_items; ++i) 3881 for (i = 0; i < f->n_tool_bar_items; ++i)
3880 { 3882 {
3881
3882 int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P)); 3883 int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P));
3883 int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P)); 3884 int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P));
3884 int idx; 3885 int idx;
@@ -3893,7 +3894,6 @@ update_frame_tool_bar (f)
3893 Lisp_Object rtl; 3894 Lisp_Object rtl;
3894 GtkWidget *wbutton = NULL; 3895 GtkWidget *wbutton = NULL;
3895 GtkWidget *weventbox; 3896 GtkWidget *weventbox;
3896 Lisp_Object func = intern ("x-gtk-map-stock");
3897 Lisp_Object specified_file; 3897 Lisp_Object specified_file;
3898 3898
3899 ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (x->toolbar_widget), i); 3899 ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (x->toolbar_widget), i);
@@ -3914,10 +3914,10 @@ update_frame_tool_bar (f)
3914 } 3914 }
3915 3915
3916 specified_file = file_for_image (image); 3916 specified_file = file_for_image (image);
3917 if (!NILP (specified_file) && EQ (Qt, Ffboundp (func))) 3917 if (!NILP (specified_file) && !NILP (Ffboundp (Qx_gtk_map_stock)))
3918 stock = call1 (func, specified_file); 3918 stock = call1 (Qx_gtk_map_stock, specified_file);
3919 3919
3920 if (! NILP (stock) && STRINGP (stock)) 3920 if (STRINGP (stock))
3921 { 3921 {
3922 stock_name = SSDATA (stock); 3922 stock_name = SSDATA (stock);
3923 if (stock_name[0] == 'n' && stock_name[1] == ':') 3923 if (stock_name[0] == 'n' && stock_name[1] == ':')
diff --git a/src/xterm.c b/src/xterm.c
index 8d9a7d3cc0b..7ec0e0268e8 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -323,6 +323,9 @@ static Lisp_Object Qlatin_1;
323#ifdef USE_GTK 323#ifdef USE_GTK
324/* The name of the Emacs icon file. */ 324/* The name of the Emacs icon file. */
325static Lisp_Object xg_default_icon_file; 325static Lisp_Object xg_default_icon_file;
326
327/* Used in gtkutil.c. */
328Lisp_Object Qx_gtk_map_stock;
326#endif 329#endif
327 330
328/* Used in x_flush. */ 331/* Used in x_flush. */
@@ -10788,6 +10791,9 @@ syms_of_xterm ()
10788#ifdef USE_GTK 10791#ifdef USE_GTK
10789 xg_default_icon_file = build_string ("icons/hicolor/scalable/apps/emacs.svg"); 10792 xg_default_icon_file = build_string ("icons/hicolor/scalable/apps/emacs.svg");
10790 staticpro (&xg_default_icon_file); 10793 staticpro (&xg_default_icon_file);
10794
10795 Qx_gtk_map_stock = intern ("x-gtk-map-stock");
10796 staticpro (&Qx_gtk_map_stock);
10791#endif 10797#endif
10792 10798
10793 DEFVAR_BOOL ("x-use-underline-position-properties", 10799 DEFVAR_BOOL ("x-use-underline-position-properties",