aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2009-06-22 04:09:14 +0000
committerChong Yidong2009-06-22 04:09:14 +0000
commitec7c992608dbbaaf0acaf6ae54c525f98cede22e (patch)
tree6fc86e28025e9a01b0526339cf3f1606aad59292 /src
parent303eb97f1036136e3b742486ebce3ad248821d1b (diff)
downloademacs-ec7c992608dbbaaf0acaf6ae54c525f98cede22e.tar.gz
emacs-ec7c992608dbbaaf0acaf6ae54c525f98cede22e.zip
* xterm.c (xg_default_icon_file): New variable.
(syms_of_xterm): Initialize it to the Emacs SVG icon file. (x_bitmap_icon): Under GTK, use xg_default_icon_file.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xterm.c23
2 files changed, 21 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c6378077d5c..580a6b0c0c6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -7,6 +7,9 @@
7 * xterm.c (x_draw_glyph_string): Use the glyph string's width 7 * xterm.c (x_draw_glyph_string): Use the glyph string's width
8 rather than its background_width for drawing the overline and 8 rather than its background_width for drawing the overline and
9 underline (Bug#489). 9 underline (Bug#489).
10 (xg_default_icon_file): New variable.
11 (syms_of_xterm): Initialize it to the Emacs SVG icon file.
12 (x_bitmap_icon): Under GTK, use xg_default_icon_file.
10 13
11 * xdisp.c (Qbefore_string, Qafter_string): Add externs. 14 * xdisp.c (Qbefore_string, Qafter_string): Add externs.
12 (load_overlay_strings): Remove externs. 15 (load_overlay_strings): Remove externs.
diff --git a/src/xterm.c b/src/xterm.c
index f09a02c2f04..2c946c7a126 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -320,6 +320,11 @@ static Lisp_Object Qalt, Qhyper, Qmeta, Qsuper, Qmodifier_value;
320static Lisp_Object Qvendor_specific_keysyms; 320static Lisp_Object Qvendor_specific_keysyms;
321static Lisp_Object Qlatin_1; 321static Lisp_Object Qlatin_1;
322 322
323#ifdef USE_GTK
324/* The name of the Emacs icon file. */
325static Lisp_Object xg_default_icon_file;
326#endif
327
323/* Used in x_flush. */ 328/* Used in x_flush. */
324 329
325extern Lisp_Object Vinhibit_redisplay; 330extern Lisp_Object Vinhibit_redisplay;
@@ -7617,16 +7622,19 @@ x_bitmap_icon (f, file)
7617 { 7622 {
7618 int rc = -1; 7623 int rc = -1;
7619 7624
7620#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
7621#ifdef USE_GTK 7625#ifdef USE_GTK
7622 if (xg_set_icon_from_xpm_data (f, gnu_xpm_bits)) 7626
7627 if (xg_set_icon (f, xg_default_icon_file)
7628 || xg_set_icon_from_xpm_data (f, gnu_xpm_bits))
7623 return 0; 7629 return 0;
7624#else 7630
7631#elif defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
7632
7625 rc = x_create_bitmap_from_xpm_data (f, gnu_xpm_bits); 7633 rc = x_create_bitmap_from_xpm_data (f, gnu_xpm_bits);
7626 if (rc != -1) 7634 if (rc != -1)
7627 FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = rc; 7635 FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = rc;
7628#endif /* USE_GTK */ 7636
7629#endif /* defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) */ 7637#endif
7630 7638
7631 /* If all else fails, use the (black and white) xbm image. */ 7639 /* If all else fails, use the (black and white) xbm image. */
7632 if (rc == -1) 7640 if (rc == -1)
@@ -10914,6 +10922,11 @@ syms_of_xterm ()
10914 staticpro (&last_mouse_press_frame); 10922 staticpro (&last_mouse_press_frame);
10915 last_mouse_press_frame = Qnil; 10923 last_mouse_press_frame = Qnil;
10916 10924
10925#ifdef USE_GTK
10926 xg_default_icon_file = build_string ("icons/hicolor/scalable/apps/emacs.svg");
10927 staticpro (&xg_default_icon_file);
10928#endif
10929
10917 DEFVAR_BOOL ("x-use-underline-position-properties", 10930 DEFVAR_BOOL ("x-use-underline-position-properties",
10918 &x_use_underline_position_properties, 10931 &x_use_underline_position_properties,
10919 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. 10932 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties.