diff options
author | Jason Leach <jleach@ximian.com> | 2001-08-17 08:33:46 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-08-17 08:33:46 +0800 |
commit | b82937e47c24dc593479045ba3f6f6ac18c10534 (patch) | |
tree | 55e0160d308f00d7584dd9ae21e61bc14d048a58 /shell/e-shell-view.c | |
parent | 84332a1f1138c59d6c9522c56605fd5679d3ddbf (diff) | |
download | gsoc2013-evolution-b82937e47c24dc593479045ba3f6f6ac18c10534.tar.gz gsoc2013-evolution-b82937e47c24dc593479045ba3f6f6ac18c10534.tar.zst gsoc2013-evolution-b82937e47c24dc593479045ba3f6f6ac18c10534.zip |
Desensitize the move/copy/delete/rename in the menus (including right
2001-08-16 Jason Leach <jleach@ximian.com>
* e-shell-view.c (folder_selected_cb): Desensitize the
move/copy/delete/rename in the menus (including right click) for
stock folders.
* Evolution-Icon.idl: Actually remove this file from CVS (its
contents are now in Evolution-common.idl).
svn path=/trunk/; revision=12139
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r-- | shell/e-shell-view.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index d1d9129446..0c4f548582 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -546,8 +546,37 @@ folder_selected_cb (EStorageSetView *storage_set_view, void *data) { EShellView *shell_view; + EShellViewPrivate *priv; + EStorageSet *storage_set; + EFolder *folder; shell_view = E_SHELL_VIEW (data); + priv = shell_view->priv; + + /* Adjust sensitivity for menu options depending on whether + the folder selected is a stock folder */ + storage_set = e_shell_get_storage_set (priv->shell); + folder = e_storage_set_get_folder (storage_set, path); + if (folder) { + BonoboUIComponent *uic; + char *txt; + + if (e_folder_get_is_stock (folder)) + txt = "0"; + else + txt = "1"; + + uic = e_shell_view_get_bonobo_ui_component (shell_view); + + bonobo_ui_component_set_prop (uic, "/commands/MoveFolder", + "sensitive", txt, NULL); + bonobo_ui_component_set_prop (uic, "/commands/CopyFolder", + "sensitive", txt, NULL); + bonobo_ui_component_set_prop (uic, "/commands/DeleteFolder", + "sensitive", txt, NULL); + bonobo_ui_component_set_prop (uic, "/commands/RenameFolder", + "sensitive", txt, NULL); + } switch_on_folder_tree_click (shell_view, path); } |