[nautilus] Don't show a desktop target in copy/move to if desktop is not shown
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Don't show a desktop target in copy/move to if desktop is not shown
- Date: Thu, 17 Feb 2011 18:26:24 +0000 (UTC)
commit e94fe49ef856a4658fd3fcbb228b78bb0d7b0657
Author: Alexander Larsson <alexl redhat com>
Date: Thu Feb 17 19:25:56 2011 +0100
Don't show a desktop target in copy/move to if desktop is not shown
src/nautilus-view.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 229228c..c197015 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -8467,6 +8467,7 @@ real_update_menus (NautilusView *view)
gboolean save_search_sensitive;
gboolean show_save_search_as;
gboolean show_open_folder_window;
+ gboolean show_desktop_target;
GtkAction *action;
GAppInfo *app;
GIcon *app_icon;
@@ -8841,12 +8842,17 @@ real_update_menus (NautilusView *view)
gtk_action_set_sensitive (action, can_delete_files && next_pane_is_writable);
+ show_desktop_target =
+ g_settings_get_boolean (gnome_background_preferences, NAUTILUS_PREFERENCES_SHOW_DESKTOP) &&
+ !g_settings_get_boolean (nautilus_preferences, NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR);
+
action = gtk_action_group_get_action (view->details->dir_action_group,
NAUTILUS_ACTION_COPY_TO_HOME);
gtk_action_set_sensitive (action, can_copy_files);
action = gtk_action_group_get_action (view->details->dir_action_group,
NAUTILUS_ACTION_COPY_TO_DESKTOP);
gtk_action_set_sensitive (action, can_copy_files);
+ gtk_action_set_visible (action, show_desktop_target);
action = gtk_action_group_get_action (view->details->dir_action_group,
NAUTILUS_ACTION_MOVE_TO_HOME);
@@ -8854,6 +8860,7 @@ real_update_menus (NautilusView *view)
action = gtk_action_group_get_action (view->details->dir_action_group,
NAUTILUS_ACTION_MOVE_TO_DESKTOP);
gtk_action_set_sensitive (action, can_delete_files);
+ gtk_action_set_visible (action, show_desktop_target);
action = gtk_action_group_get_action (view->details->dir_action_group,
"CopyToMenu");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]