diff options
| author | Jan D | 2011-03-08 09:34:55 +0100 |
|---|---|---|
| committer | Jan D | 2011-03-08 09:34:55 +0100 |
| commit | 0afb4571a7b54dc7693e605f7ec8a0a3a9251b4d (patch) | |
| tree | 58fa84febc60c1bf678f3e5f72358968bd3eaeba /doc | |
| parent | 25bbfb31d5a71dee8d6049e9bbe10dd7d4b65db9 (diff) | |
| download | emacs-0afb4571a7b54dc7693e605f7ec8a0a3a9251b4d.tar.gz emacs-0afb4571a7b54dc7693e605f7ec8a0a3a9251b4d.zip | |
Updates for compiling with Gtk+ 3.0 (--with-x-toolkit=gtk3).
* configure.in: Require 3.0 for --with-gtk3. Add HAVE_GTK3.
* doc/emacs/xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work
for Gtk+ 3.
* src/gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
gdk_window_get_screen, gdk_window_get_geometry,
gdk_x11_window_lookup_for_display and GDK_KEY_g.
(xg_set_screen): Use DEFAULT_GDK_DISPLAY.
(xg_get_pixbuf_from_pixmap): New function.
(xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
to Pixmap, take frame as parameter, remove GdkColormap parameter.
Call xg_get_pixbuf_from_pixmap instead of
gdk_pixbuf_get_from_drawable.
(xg_get_image_for_pixmap): Do not make GdkPixmaps, call
xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
(xg_check_special_colors): Use GtkStyleContext and its functions
for HAVE_GTK3.
(xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
(xg_prepare_tooltip, create_dialog, menubar_map_cb)
(xg_update_frame_menubar, xg_tool_bar_detach_callback)
(xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): Call
gtk_widget_get_preferred_size.
(xg_frame_resized): gdk_window_get_geometry only takes 5
parameters.
(xg_win_to_widget, xg_event_is_for_menubar): Call
gdk_x11_window_lookup_for_display.
(xg_set_widget_bg): New function.
(delete_cb): New function.
(xg_create_frame_widgets): connect delete-event to delete_cb.
Call xg_set_widget_bg. Only set backgrund pixmap for ! HAVE_GTK3
(xg_set_background_color): Call xg_set_widget_bg.
(xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
(xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
Only call gtk_range_set_update_policy if ! HAVE_GTK3.
(xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
if ! HAVE_GTK3.
(update_frame_tool_bar): Call gtk_widget_hide.
(xg_initialize): Use GDK_KEY_g.
* src/xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
* src/xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
if ! HAVE_GTK3
(x_session_initialize): Call gdk_x11_set_sm_client_id.
* src/xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
(x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
* src/xterm.h (DEFAULT_GDK_DISPLAY): New define.
(GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
for ! HAVE_GTK3.
(GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/xresources.texi | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index a2708b454f4..1c8ca4bc322 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-03-08 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work | ||
| 4 | for Gtk+ 3. | ||
| 5 | |||
| 1 | 2011-03-08 Glenn Morris <rgm@gnu.org> | 6 | 2011-03-08 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * display.texi (Optional Mode Line): Don't mention exactly where | 8 | * display.texi (Optional Mode Line): Don't mention exactly where |
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index 41a09a5f713..33ea83d7d6e 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi | |||
| @@ -660,8 +660,11 @@ The color for the border shadow, on the top and the left. | |||
| 660 | @iftex | 660 | @iftex |
| 661 | The most common way to customize the GTK widgets Emacs uses (menus, dialogs | 661 | The most common way to customize the GTK widgets Emacs uses (menus, dialogs |
| 662 | tool bars and scroll bars) is by choosing an appropriate theme, for example | 662 | tool bars and scroll bars) is by choosing an appropriate theme, for example |
| 663 | with the GNOME theme selector. You can also do Emacs specific customization | 663 | with the GNOME theme selector. |
| 664 | by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc}. Some GTK | 664 | |
| 665 | You can also do Emacs specific customization | ||
| 666 | by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc}, | ||
| 667 | but only if you have a Gtk+ version earlier than 3 (i.e. 2). Some GTK | ||
| 665 | themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything | 668 | themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything |
| 666 | works with all themes. To customize Emacs font, background, faces, etc., use | 669 | works with all themes. To customize Emacs font, background, faces, etc., use |
| 667 | the normal X resources (@pxref{Resources}). We will present some examples of | 670 | the normal X resources (@pxref{Resources}). We will present some examples of |