Commit 9538d1a6 authored by William Jon McCann's avatar William Jon McCann

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
parent 5d37c583
......@@ -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"
......
......@@ -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"/>
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment