[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
This commit is contained in:
Ettore Perazzoli
2001-12-05 22:56:54 +00:00
parent 7963f20127
commit 225f981218
3 changed files with 43 additions and 1 deletions

View File

@ -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

View File

@ -283,6 +283,21 @@ command_new_folder (BonoboUIComponent *uih,
NULL /* result_callback_data */);
}
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,
@ -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),

View File

@ -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);