aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2014-10-18 12:07:17 -0700
committerPaul Eggert2014-10-18 12:07:17 -0700
commit4e94689452f3a895a52e67787b795596c2390462 (patch)
tree8b2ad38ce5ee89b68c024927d4058ebb8569458a /src
parent6e5ff6166647e6af30beff38f67f2bca86cf9786 (diff)
downloademacs-4e94689452f3a895a52e67787b795596c2390462.tar.gz
emacs-4e94689452f3a895a52e67787b795596c2390462.zip
* gtkutil.c: Remove no-longer-used code.
(xg_update_menubar): Remove unused local and unnecessary call to gtk_menu_item_get_submenu. (XG_TOOL_BAR_PROXY_BUTTON, xg_tool_bar_proxy_callback) (xg_get_tool_bar_widgets, xg_tool_bar_proxy_help_callback) (TOOLBAR_TOP_WIDGET): Remove; no longer used.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/gtkutil.c43
2 files changed, 10 insertions, 42 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index aac111f680e..ae7272d39ca 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12014-10-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 * gtkutil.c: Remove no-longer-used code.
4 (xg_update_menubar): Remove unused local and unnecessary call to
5 gtk_menu_item_get_submenu.
6 (XG_TOOL_BAR_PROXY_BUTTON, xg_tool_bar_proxy_callback)
7 (xg_get_tool_bar_widgets, xg_tool_bar_proxy_help_callback)
8 (TOOLBAR_TOP_WIDGET): Remove; no longer used.
9
12014-10-18 Jan Djärv <jan.h.d@swipnet.se> 102014-10-18 Jan Djärv <jan.h.d@swipnet.se>
2 11
3 * xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar. 12 * xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar.
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 89897f8afa5..64940d07f19 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2789,7 +2789,6 @@ xg_update_menubar (GtkWidget *menubar,
2789 is up to date when leaving the minibuffer. */ 2789 is up to date when leaving the minibuffer. */
2790 GtkLabel *wlabel = GTK_LABEL (XG_BIN_CHILD (witem)); 2790 GtkLabel *wlabel = GTK_LABEL (XG_BIN_CHILD (witem));
2791 char *utf8_label = get_utf8_string (val->name); 2791 char *utf8_label = get_utf8_string (val->name);
2792 GtkWidget *submenu = gtk_menu_item_get_submenu (witem);
2793 2792
2794 /* GTK menu items don't notice when their labels have been 2793 /* GTK menu items don't notice when their labels have been
2795 changed from underneath them, so we have to explicitly 2794 changed from underneath them, so we have to explicitly
@@ -3981,9 +3980,6 @@ xg_event_is_for_scrollbar (struct frame *f, const XEvent *event)
3981 get them. */ 3980 get them. */
3982#define XG_TOOL_BAR_LAST_MODIFIER "emacs-tool-bar-modifier" 3981#define XG_TOOL_BAR_LAST_MODIFIER "emacs-tool-bar-modifier"
3983 3982
3984/* The key for storing the button widget in its proxy menu item. */
3985#define XG_TOOL_BAR_PROXY_BUTTON "emacs-tool-bar-proxy-button"
3986
3987/* The key for the data we put in the GtkImage widgets. The data is 3983/* The key for the data we put in the GtkImage widgets. The data is
3988 the stock name used by Emacs. We use this to see if we need to update 3984 the stock name used by Emacs. We use this to see if we need to update
3989 the GtkImage with a new image. */ 3985 the GtkImage with a new image. */
@@ -4056,41 +4052,6 @@ xg_tool_bar_callback (GtkWidget *w, gpointer client_data)
4056 x_focus_frame (f); 4052 x_focus_frame (f);
4057} 4053}
4058 4054
4059/* Callback function invoked when a tool bar item is pressed in a detached
4060 tool bar or the overflow drop down menu.
4061 We just call xg_tool_bar_callback.
4062 W is the menu item widget that got pressed,
4063 CLIENT_DATA is an integer that is the index of the button in the
4064 tool bar. 0 is the first button. */
4065
4066static void
4067xg_tool_bar_proxy_callback (GtkWidget *w, gpointer client_data)
4068{
4069 GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w),
4070 XG_TOOL_BAR_PROXY_BUTTON));
4071 xg_tool_bar_callback (wbutton, client_data);
4072}
4073
4074
4075static gboolean
4076xg_tool_bar_help_callback (GtkWidget *w,
4077 GdkEventCrossing *event,
4078 gpointer client_data);
4079
4080/* This callback is called when a help is to be shown for an item in
4081 the detached tool bar when the detached tool bar it is not expanded. */
4082
4083static gboolean
4084xg_tool_bar_proxy_help_callback (GtkWidget *w,
4085 GdkEventCrossing *event,
4086 gpointer client_data)
4087{
4088 GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w),
4089 XG_TOOL_BAR_PROXY_BUTTON));
4090
4091 return xg_tool_bar_help_callback (wbutton, event, client_data);
4092}
4093
4094static GtkWidget * 4055static GtkWidget *
4095xg_get_tool_bar_widgets (GtkWidget *vb, GtkWidget **wimage) 4056xg_get_tool_bar_widgets (GtkWidget *vb, GtkWidget **wimage)
4096{ 4057{
@@ -4183,8 +4144,6 @@ xg_tool_bar_item_expose_callback (GtkWidget *w,
4183 gtk_toolbar_set_orientation (GTK_TOOLBAR (w), o) 4144 gtk_toolbar_set_orientation (GTK_TOOLBAR (w), o)
4184#endif 4145#endif
4185 4146
4186#define TOOLBAR_TOP_WIDGET(x) ((x)->toolbar_widget)
4187
4188/* Attach a tool bar to frame F. */ 4147/* Attach a tool bar to frame F. */
4189 4148
4190static void 4149static void
@@ -4696,7 +4655,7 @@ update_frame_tool_bar (struct frame *f)
4696 if (!NILP (specified_file) && !NILP (Ffboundp (Qx_gtk_map_stock))) 4655 if (!NILP (specified_file) && !NILP (Ffboundp (Qx_gtk_map_stock)))
4697 stock = call1 (Qx_gtk_map_stock, specified_file); 4656 stock = call1 (Qx_gtk_map_stock, specified_file);
4698 4657
4699 if (CONSP (stock)) 4658 if (CONSP (stock))
4700 { 4659 {
4701 Lisp_Object tem; 4660 Lisp_Object tem;
4702 for (tem = stock; CONSP (tem); tem = XCDR (tem)) 4661 for (tem = stock; CONSP (tem); tem = XCDR (tem))