From ccd69a31fd5a84dd24758a37a196dea33f46feea Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 17 Apr 2001 18:35:37 +0000 Subject: Proxy events to the tooltip object properly. 2001-04-17 Christopher James Lahey * e-shell-view.c (storage_set_view_box_event_cb): Proxy events to the tooltip object properly. svn path=/trunk/; revision=9428 --- shell/ChangeLog | 5 +++++ shell/e-shell-view.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/shell/ChangeLog b/shell/ChangeLog index 0206f3de09..f48a80a7bb 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,8 @@ +2001-04-17 Christopher James Lahey + + * e-shell-view.c (storage_set_view_box_event_cb): Proxy events to + the tooltip object properly. + 2001-04-15 Ettore Perazzoli * e-shell-folder-selection-dialog.c diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 5615142c2e..bc8dd1531d 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -211,6 +211,54 @@ storage_set_view_box_button_release_event_cb (GtkWidget *widget, return TRUE; } +static int +storage_set_view_box_event_cb (GtkWidget *widget, + GdkEvent *event, + void *data) +{ + GtkWidget *event_widget; + GtkWidget *tooltip; + EShellView *shell_view; + EShellViewPrivate *priv; + + shell_view = E_SHELL_VIEW (data); + priv = shell_view->priv; + + event_widget = gtk_get_event_widget (event); + + if (!event_widget) + return FALSE; + + tooltip = e_tree_get_tooltip (E_TREE(priv->storage_set_view)); + if (! (GTK_WIDGET_IS_SENSITIVE (event_widget) && + tooltip && + gtk_widget_is_ancestor (event_widget, tooltip))) + return FALSE; + + switch (event->type) { + case GDK_BUTTON_PRESS: + case GDK_2BUTTON_PRESS: + case GDK_3BUTTON_PRESS: + case GDK_KEY_PRESS: + case GDK_KEY_RELEASE: + case GDK_MOTION_NOTIFY: + case GDK_BUTTON_RELEASE: + case GDK_PROXIMITY_IN: + case GDK_PROXIMITY_OUT: + gtk_propagate_event (event_widget, event); + return TRUE; + break; + case GDK_ENTER_NOTIFY: + case GDK_LEAVE_NOTIFY: + gtk_widget_event (event_widget, event); + return TRUE; + break; + default: + break; + } + return FALSE; +} + static void popup_storage_set_view_button_clicked (ETitleBar *title_bar, void *data) @@ -253,6 +301,8 @@ storage_set_view_box_map_cb (GtkWidget *widget, } gtk_grab_add (widget); + gtk_signal_connect (GTK_OBJECT (widget), "event", + GTK_SIGNAL_FUNC (storage_set_view_box_event_cb), shell_view); gtk_signal_connect (GTK_OBJECT (widget), "button_release_event", GTK_SIGNAL_FUNC (storage_set_view_box_button_release_event_cb), shell_view); gtk_signal_connect (GTK_OBJECT (priv->storage_set_view), "button_release_event", -- cgit