aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-09-21 06:59:37 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-09-21 06:59:37 +0800
commit4f77a21a2af63fe751f734b6d9316963d703d0fd (patch)
treeea5bf7b6f5e5a72b9e01481fce6d36aa4368bc87
parent0a31aa1bf976af4d244f47bc3fa3a899b81bb208 (diff)
downloadgsoc2013-evolution-4f77a21a2af63fe751f734b6d9316963d703d0fd.tar
gsoc2013-evolution-4f77a21a2af63fe751f734b6d9316963d703d0fd.tar.gz
gsoc2013-evolution-4f77a21a2af63fe751f734b6d9316963d703d0fd.tar.bz2
gsoc2013-evolution-4f77a21a2af63fe751f734b6d9316963d703d0fd.tar.lz
gsoc2013-evolution-4f77a21a2af63fe751f734b6d9316963d703d0fd.tar.xz
gsoc2013-evolution-4f77a21a2af63fe751f734b6d9316963d703d0fd.tar.zst
gsoc2013-evolution-4f77a21a2af63fe751f734b6d9316963d703d0fd.zip
Removed. (folder_bar_popup_map_callback): Don't connect.
* e-shell-view.c (storage_set_view_box_event_cb): Removed. (folder_bar_popup_map_callback): Don't connect. (reparent_storage_set_view_box_and_destroy_popup): Don't ungrab here. (popdown_transient_folder_bar): Ungrab here. (popdown_transient_folder_bar_idle): New. (switch_on_folder_tree_click): Invoke it in the idle loop. Also, ungrab. svn path=/trunk/; revision=13025
-rw-r--r--shell/ChangeLog11
-rw-r--r--shell/e-shell-view.c78
2 files changed, 34 insertions, 55 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 7e011992c3..482e7d5cf4 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,14 @@
+2001-09-20 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-shell-view.c (storage_set_view_box_event_cb): Removed.
+ (folder_bar_popup_map_callback): Don't connect.
+ (reparent_storage_set_view_box_and_destroy_popup): Don't ungrab
+ here.
+ (popdown_transient_folder_bar): Ungrab here.
+ (popdown_transient_folder_bar_idle): New.
+ (switch_on_folder_tree_click): Invoke it in the idle loop. Also,
+ ungrab.
+
2001-09-20 Iain Holmes <iain@ximian.com>
* e-shell-startup-wizard.c (e_shell_startup_wizard_create): Check
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 55566d7cfb..11f0025d16 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -295,9 +295,6 @@ reparent_storage_set_view_box_and_destroy_popup (EShellView *shell_view)
priv = shell_view->priv;
- gdk_pointer_ungrab (GDK_CURRENT_TIME);
- gtk_grab_remove (priv->storage_set_view_box);
-
g_assert (priv->folder_bar_popup != NULL);
gtk_widget_ref (priv->storage_set_view_box);
@@ -320,6 +317,9 @@ popdown_transient_folder_bar (EShellView *shell_view)
priv = shell_view->priv;
+ gdk_pointer_ungrab (GDK_CURRENT_TIME);
+ gtk_grab_remove (priv->storage_set_view_box);
+
reparent_storage_set_view_box_and_destroy_popup (shell_view);
gtk_widget_hide (priv->storage_set_view_box);
@@ -350,54 +350,6 @@ 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)
@@ -439,9 +391,6 @@ folder_bar_popup_map_callback (GtkWidget *widget,
gtk_grab_add (widget);
- gtk_signal_connect_while_alive (GTK_OBJECT (widget), "event",
- GTK_SIGNAL_FUNC (storage_set_view_box_event_cb), shell_view,
- GTK_OBJECT (priv->folder_bar_popup));
gtk_signal_connect_while_alive (GTK_OBJECT (widget), "button_release_event",
GTK_SIGNAL_FUNC (storage_set_view_box_button_release_event_cb), shell_view,
GTK_OBJECT (priv->folder_bar_popup));
@@ -518,6 +467,20 @@ set_folder_timeout (gpointer data)
return FALSE;
}
+static int
+popdown_transient_folder_bar_idle (void *data)
+{
+ EShellView *shell_view;
+
+ shell_view = E_SHELL_VIEW (data);
+
+ popdown_transient_folder_bar (shell_view);
+
+ gtk_object_unref (GTK_OBJECT (shell_view));
+
+ return FALSE;
+}
+
static void
switch_on_folder_tree_click (EShellView *shell_view,
const char *path)
@@ -527,6 +490,9 @@ switch_on_folder_tree_click (EShellView *shell_view,
priv = shell_view->priv;
+ gdk_pointer_ungrab (GDK_CURRENT_TIME);
+ gtk_grab_remove (priv->storage_set_view_box);
+
uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL);
if (priv->uri != NULL && !strcmp (uri, priv->uri)) {
g_free (uri);
@@ -543,8 +509,10 @@ switch_on_folder_tree_click (EShellView *shell_view,
if (priv->folder_bar_popup != NULL) {
e_shell_view_display_uri (shell_view, uri);
- popdown_transient_folder_bar (shell_view);
g_free (uri);
+
+ gtk_object_ref (GTK_OBJECT (shell_view));
+ gtk_idle_add (popdown_transient_folder_bar_idle, shell_view);
return;
}