[nautilus] Hide the New Document menu if no templates are installed
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Hide the New Document menu if no templates are installed
- Date: Fri, 25 May 2012 20:21:32 +0000 (UTC)
commit 9538d1a640fda650e4866d2cdcc69b9e1cfa3a35
Author: William Jon McCann <jmccann redhat com>
Date: Fri May 25 12:15:39 2012 -0400
Hide the New Document menu if no templates are installed
If you don't use templates we don't want to clutter up the menu.
https://bugzilla.gnome.org/show_bug.cgi?id=676838
src/nautilus-actions.h | 1 -
src/nautilus-directory-view-ui.xml | 2 --
src/nautilus-view.c | 7 ++-----
3 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/nautilus-actions.h b/src/nautilus-actions.h
index 10bd415..7bd1cd1 100644
--- a/src/nautilus-actions.h
+++ b/src/nautilus-actions.h
@@ -70,7 +70,6 @@
#define NAUTILUS_ACTION_PROPERTIES "Properties"
#define NAUTILUS_ACTION_PROPERTIES_ACCEL "PropertiesAccel"
#define NAUTILUS_ACTION_LOCATION_PROPERTIES "LocationProperties"
-#define NAUTILUS_ACTION_NO_TEMPLATES "No Templates"
#define NAUTILUS_ACTION_EMPTY_TRASH "Empty Trash"
#define NAUTILUS_ACTION_SAVE_SEARCH "Save Search"
#define NAUTILUS_ACTION_SAVE_SEARCH_AS "Save Search As"
diff --git a/src/nautilus-directory-view-ui.xml b/src/nautilus-directory-view-ui.xml
index e350e1f..e91e014 100644
--- a/src/nautilus-directory-view-ui.xml
+++ b/src/nautilus-directory-view-ui.xml
@@ -9,7 +9,6 @@
<menuitem name="New Folder" action="New Folder"/>
<menuitem name="New Folder with Selection" action="New Folder with Selection"/>
<menu action="New Documents">
- <menuitem name="No Templates" action="No Templates"/>
<placeholder name="New Documents Placeholder"/>
<separator name="After New Documents"/>
<menuitem name="New Empty Document" action="New Empty Document"/>
@@ -96,7 +95,6 @@
<placeholder name="New Object Items">
<menuitem name="New Folder" action="New Folder"/>
<menu action="New Documents">
- <menuitem name="No Templates" action="No Templates"/>
<placeholder name="New Documents Placeholder"/>
<separator name="After New Documents"/>
<menuitem name="New Empty Document" action="New Empty Document"/>
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index b9c8b0f..5db4608 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -5723,8 +5723,8 @@ update_templates_menu (NautilusView *view)
}
nautilus_directory_list_free (sorted_copy);
- action = gtk_action_group_get_action (view->details->dir_action_group, NAUTILUS_ACTION_NO_TEMPLATES);
- gtk_action_set_visible (action, !any_templates);
+ action = gtk_action_group_get_action (view->details->dir_action_group, NAUTILUS_ACTION_NEW_DOCUMENTS);
+ gtk_action_set_visible (action, any_templates);
g_free (templates_directory_uri);
}
@@ -7333,9 +7333,6 @@ real_merge_menus (NautilusView *view)
g_object_unref (action);
g_free (tooltip);
- action = gtk_action_group_get_action (action_group, NAUTILUS_ACTION_NO_TEMPLATES);
- gtk_action_set_sensitive (action, FALSE);
-
g_signal_connect_object (action_group, "connect-proxy",
G_CALLBACK (connect_proxy), G_OBJECT (view),
G_CONNECT_SWAPPED);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]