aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-12-06 06:56:54 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-12-06 06:56:54 +0800
commit225f98121898dbdd8d633843c1df70093fd2e5ba (patch)
tree0d8425fc618606d37e492afa660889d47b7c6bd6 /shell
parent7963f2012702629741b9afabc3390357db048a89 (diff)
downloadgsoc2013-evolution-225f98121898dbdd8d633843c1df70093fd2e5ba.tar
gsoc2013-evolution-225f98121898dbdd8d633843c1df70093fd2e5ba.tar.gz
gsoc2013-evolution-225f98121898dbdd8d633843c1df70093fd2e5ba.tar.bz2
gsoc2013-evolution-225f98121898dbdd8d633843c1df70093fd2e5ba.tar.lz
gsoc2013-evolution-225f98121898dbdd8d633843c1df70093fd2e5ba.tar.xz
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')
-rw-r--r--shell/ChangeLog15
-rw-r--r--shell/e-shell-view-menu.c16
-rw-r--r--shell/e-shell-view.c13
3 files changed, 43 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 7dd91cbf36..155ec88dc4 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,18 @@
+2001-12-04 Ettore Perazzoli <ettore@ximian.com>
+
+ [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.
+
2001-11-15 Zbigniew Chyla <cyba@gnome.pl>
* e-shell-folder-commands.c (e_shell_command_rename_folder): Convert
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c
index b20c2e3545..e972184df4 100644
--- a/shell/e-shell-view-menu.c
+++ b/shell/e-shell-view-menu.c
@@ -284,6 +284,21 @@ command_new_folder (BonoboUIComponent *uih,
}
static void
+command_activate_view (BonoboUIComponent *uih,
+ void *data,
+ const char *path)
+{
+ EShellView *shell_view;
+ char *uri;
+
+ shell_view = E_SHELL_VIEW (data);
+
+ uri = g_strconcat (E_SHELL_URI_PREFIX, get_path_for_folder_op (shell_view), NULL);
+ e_shell_view_display_uri (shell_view, uri);
+ g_free (uri);
+}
+
+static void
command_open_folder_in_new_window (BonoboUIComponent *uih,
gpointer data,
const char *path)
@@ -592,6 +607,7 @@ BonoboUIVerb file_verbs [] = {
};
BonoboUIVerb folder_verbs [] = {
+ BONOBO_UI_VERB ("ActivateView", command_activate_view),
BONOBO_UI_VERB ("OpenFolderInNewWindow", command_open_folder_in_new_window),
BONOBO_UI_VERB ("MoveFolder", command_move_folder),
BONOBO_UI_VERB ("CopyFolder", command_copy_folder),
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);