From 64aaef4c95beba60acf19bd925b58bc4c8dd8f1c Mon Sep 17 00:00:00 2001 From: Thaddaeus Tintenfisch Date: Tue, 17 Feb 2015 23:17:24 +0100 Subject: [PATCH] Show 'No templates installed' when no templates are found --- src/xfdesktop-file-icon-manager.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c index 19c1952..1eda202 100644 --- a/src/xfdesktop-file-icon-manager.c +++ b/src/xfdesktop-file-icon-manager.c @@ -1478,12 +1478,13 @@ xfdesktop_file_icon_manager_populate_context_menu(XfceDesktop *desktop, templates_dir = g_file_new_for_path(templates_dir_path); } - if(templates_dir && !g_file_equal(home_dir, templates_dir)) - { + if(templates_dir && !g_file_equal(home_dir, templates_dir)) { xfdesktop_file_icon_menu_fill_template_menu(tmpl_menu, templates_dir, fmanager); - } else { + } + + if(!gtk_container_get_children((GtkContainer*) tmpl_menu)) { mi = gtk_menu_item_new_with_label(_("No templates installed")); gtk_widget_set_sensitive(mi, FALSE); gtk_widget_show(mi); -- 2.1.4