diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-12-06 06:56:54 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-12-06 06:56:54 +0800 |
commit | 225f98121898dbdd8d633843c1df70093fd2e5ba (patch) | |
tree | 0d8425fc618606d37e492afa660889d47b7c6bd6 /shell/e-shell-view.c | |
parent | 7963f2012702629741b9afabc3390357db048a89 (diff) | |
download | gsoc2013-evolution-225f98121898dbdd8d633843c1df70093fd2e5ba.tar.gz gsoc2013-evolution-225f98121898dbdd8d633843c1df70093fd2e5ba.tar.zst gsoc2013-evolution-225f98121898dbdd8d633843c1df70093fd2e5ba.zip |
[Fix #7827, Switching desktops leaves the folder bar popped up.]
* e-shell-view.c (folder_bar_popup_map_callback): And grab the
keyboard as well.
(popdown_transient_folder_bar): Ungrab the keyboard as well.
(switch_on_folder_tree_click): Likewise.
[Fix #16507, Right Click -> View does nothing.]
* e-shell-view-menu.c: New verb "ActivateView".
(command_activate_view): New, callback for the "ActivateView"
verb.
svn path=/trunk/; revision=14897
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r-- | shell/e-shell-view.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index fbf80ec9df..b0960a972a 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -403,6 +403,7 @@ popdown_transient_folder_bar (EShellView *shell_view) priv = shell_view->priv; gdk_pointer_ungrab (GDK_CURRENT_TIME); + gdk_keyboard_ungrab (GDK_CURRENT_TIME); gtk_grab_remove (priv->storage_set_view_box); reparent_storage_set_view_box_and_destroy_popup (shell_view); @@ -459,21 +460,30 @@ folder_bar_popup_map_callback (GtkWidget *widget, { EShellView *shell_view; EShellViewPrivate *priv; + guint32 current_time; shell_view = E_SHELL_VIEW (data); priv = shell_view->priv; + current_time = GDK_CURRENT_TIME; + if (gdk_pointer_grab (widget->window, TRUE, (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK), - NULL, NULL, GDK_CURRENT_TIME) != 0) { + NULL, NULL, current_time) != 0) { g_warning ("e-shell-view.c:folder_bar_popup_map_callback() -- pointer grab failed."); return; } + if (gdk_keyboard_grab (widget->window, TRUE, 0) != 0) { + g_warning ("e-shell-view.c:folder_bar_popup_map_callback() -- keyboard grab failed."); + gdk_pointer_ungrab (current_time); + return; + } + gtk_grab_add (widget); gtk_signal_connect_while_alive (GTK_OBJECT (widget), "button_release_event", @@ -576,6 +586,7 @@ switch_on_folder_tree_click (EShellView *shell_view, priv = shell_view->priv; gdk_pointer_ungrab (GDK_CURRENT_TIME); + gdk_keyboard_ungrab (GDK_CURRENT_TIME); gtk_grab_remove (priv->storage_set_view_box); uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL); |