[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/gtkutil.c
From: |
Jan Djärv |
Subject: |
[Emacs-diffs] Changes to emacs/src/gtkutil.c |
Date: |
Sun, 09 Mar 2003 15:41:40 -0500 |
Index: emacs/src/gtkutil.c
diff -c emacs/src/gtkutil.c:1.12 emacs/src/gtkutil.c:1.13
*** emacs/src/gtkutil.c:1.12 Sat Mar 8 10:57:47 2003
--- emacs/src/gtkutil.c Sun Mar 9 15:41:39 2003
***************
*** 2301,2306 ****
--- 2301,2327 ----
return 0;
}
+ /* Return the scrollbar id for X Window WID.
+ Return -1 if WID not in id_to_widget. */
+ int
+ xg_get_scroll_id_for_window (wid)
+ Window wid;
+ {
+ int idx;
+ GtkWidget *w;
+
+ w = xg_win_to_widget (wid);
+
+ if (w)
+ {
+ for (idx = 0; idx < id_to_widget.max_size; ++idx)
+ if (id_to_widget.widgets[idx] == w)
+ return idx;
+ }
+
+ return -1;
+ }
+
/* Callback invoked when scroll bar WIDGET is destroyed.
DATA is the index into id_to_widget for WIDGET.
We free pointer to last scroll bar value here and remove the index. */
***************
*** 2381,2387 ****
g_signal_connect (G_OBJECT (wscroll),
"button-press-event",
G_CALLBACK (scroll_bar_button_cb),
! (gpointer)1);
g_signal_connect (G_OBJECT (wscroll),
"button-release-event",
G_CALLBACK (scroll_bar_button_cb),
--- 2402,2408 ----
g_signal_connect (G_OBJECT (wscroll),
"button-press-event",
G_CALLBACK (scroll_bar_button_cb),
! 0);
g_signal_connect (G_OBJECT (wscroll),
"button-release-event",
G_CALLBACK (scroll_bar_button_cb),
***************
*** 2676,2682 ****
Returns FALSE to tell GTK to keep processing this event. */
static gboolean
! xg_tool_bar_expose_callback (w, event, client_data)
GtkWidget *w;
GdkEventExpose *event;
gpointer client_data;
--- 2697,2703 ----
Returns FALSE to tell GTK to keep processing this event. */
static gboolean
! xg_tool_bar_item_expose_callback (w, event, client_data)
GtkWidget *w;
GdkEventExpose *event;
gpointer client_data;
***************
*** 2686,2691 ****
--- 2707,2730 ----
return FALSE;
}
+ /* This callback is called when a tool bar shall be redrawn.
+ We need to update the tool bar from here in case the image cache
+ has deleted the pixmaps used in the tool bar.
+ W is the GtkToolbar to be redrawn.
+ EVENT is the expose event for W.
+ CLIENT_DATA is pointing to the frame for this tool bar.
+
+ Returns FALSE to tell GTK to keep processing this event. */
+ static gboolean
+ xg_tool_bar_expose_callback (w, event, client_data)
+ GtkWidget *w;
+ GdkEventExpose *event;
+ gpointer client_data;
+ {
+ update_frame_tool_bar((FRAME_PTR)client_data);
+ return FALSE;
+ }
+
static void
xg_create_tool_bar (f)
FRAME_PTR f;
***************
*** 2722,2727 ****
--- 2761,2770 ----
G_CALLBACK (xg_tool_bar_detach_callback), f);
g_signal_connect (G_OBJECT (x->handlebox_widget), "child-attached",
G_CALLBACK (xg_tool_bar_attach_callback), f);
+ g_signal_connect (G_OBJECT (x->toolbar_widget),
+ "expose-event",
+ G_CALLBACK (xg_tool_bar_expose_callback),
+ f);
gtk_widget_show_all (x->handlebox_widget);
***************
*** 2828,2837 ****
(gpointer)img->pixmap);
/* Catch expose events to overcome an annoying redraw bug, see
! comment for xg_tool_bar_expose_callback. */
g_signal_connect (G_OBJECT (w),
"expose-event",
! G_CALLBACK (xg_tool_bar_expose_callback),
0);
/* We must set sensitive on the button that is the parent
--- 2871,2880 ----
(gpointer)img->pixmap);
/* Catch expose events to overcome an annoying redraw bug, see
! comment for xg_tool_bar_item_expose_callback. */
g_signal_connect (G_OBJECT (w),
"expose-event",
! G_CALLBACK (xg_tool_bar_item_expose_callback),
0);
/* We must set sensitive on the button that is the parent
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/08
- [Emacs-diffs] Changes to emacs/src/gtkutil.c,
Jan Djärv <=
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Kim F. Storm, 2003/03/12
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Andreas Schwab, 2003/03/12
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Andreas Schwab, 2003/03/12
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Andreas Schwab, 2003/03/12
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/14
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/14
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/17
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/17
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/18
- [Emacs-diffs] Changes to emacs/src/gtkutil.c, Jan Djärv, 2003/03/22