diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-07-02 02:51:08 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-07-02 02:51:08 +0800 |
commit | a6e1e46e4a3fe25796bdd7ebcbe5ed26cf7e7721 (patch) | |
tree | a9c0ba7658964fba97400a78b3ec98216b2ce67b /shell/e-shell-view.c | |
parent | f3a15eb3515fbecc1135496b3dc21990b867844f (diff) | |
download | gsoc2013-evolution-a6e1e46e4a3fe25796bdd7ebcbe5ed26cf7e7721.tar.gz gsoc2013-evolution-a6e1e46e4a3fe25796bdd7ebcbe5ed26cf7e7721.tar.zst gsoc2013-evolution-a6e1e46e4a3fe25796bdd7ebcbe5ed26cf7e7721.zip |
Remove debugging message.
* e-shell.c (e_shell_prepare_for_quit): Remove debugging message.
* e-shell-view.c (setup_verb_sensitivity_for_folder): Set
sensitivity of /commands/AddFolderToShortcutBar,
/commands/OpenFolder and /commands/OpenFolderInNewWindow too,
depending on whether the node that was right-clicked can be opened
as a folder.
* e-storage-set-view.c (popup_folder_menu): Pop up the right-click
menu even if we are not clicking on a folder with a proper
handler.
svn path=/trunk/; revision=17337
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r-- | shell/e-shell-view.c | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 07ef3d2aa4..2b706028c1 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -293,31 +293,42 @@ setup_verb_sensitivity_for_folder (EShellView *shell_view, { EShellViewPrivate *priv; BonoboUIComponent *ui_component; + EFolder *folder; const char *prop; priv = shell_view->priv; - /* Adjust sensitivity for menu options depending on whether the folder - selected is a stock folder. */ - - if (path == NULL) { - prop = "0"; - } else { - EFolder *folder; + ui_component = e_shell_view_get_bonobo_ui_component (shell_view); + if (path == NULL) + folder = NULL; + else folder = e_storage_set_get_folder (e_shell_get_storage_set (priv->shell), path); - if (folder != NULL && ! e_folder_get_is_stock (folder)) - prop = "1"; - else - prop = "0"; - } - ui_component = e_shell_view_get_bonobo_ui_component (shell_view); + /* Adjust sensitivity for menu options depending on whether the folder + selected is a stock folder. */ + if (folder != NULL && ! e_folder_get_is_stock (folder)) + prop = "1"; + else + prop = "0"; bonobo_ui_component_set_prop (ui_component, "/commands/MoveFolder", "sensitive", prop, NULL); bonobo_ui_component_set_prop (ui_component, "/commands/CopyFolder", "sensitive", prop, NULL); bonobo_ui_component_set_prop (ui_component, "/commands/DeleteFolder", "sensitive", prop, NULL); bonobo_ui_component_set_prop (ui_component, "/commands/RenameFolder", "sensitive", prop, NULL); + + /* Adjust sensitivity for menu options depending on whether the user + right-clicked a folder whose contents can be viewed. */ + + if (folder != NULL + && e_folder_type_registry_get_handler_for_type (e_shell_get_folder_type_registry (e_shell_view_get_shell (shell_view)), + e_folder_get_type_string (folder)) != NULL) + prop = "1"; + else + prop = "0"; + bonobo_ui_component_set_prop (ui_component, "/commands/ActivateView", "sensitive", prop, NULL); + bonobo_ui_component_set_prop (ui_component, "/commands/OpenFolderInNewWindow", "sensitive", prop, NULL); + bonobo_ui_component_set_prop (ui_component, "/commands/AddFolderToShortcutBar", "sensitive", prop, NULL); } |