[Xfce4-commits] [xfce/xfdesktop] 02/04: Additional context menu changes (thunar look and feel)

noreply at xfce.org noreply at xfce.org
Mon Feb 16 06:40:24 CET 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfdesktop.

commit 0eae2195dd82303630b6b260e4cd80535a87fcbf
Author: Thaddaeus Tintenfisch <thad.fisch at gmail.com>
Date:   Mon Feb 16 00:46:18 2015 +0100

    Additional context menu changes (thunar look and feel)
    
    Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
 src/xfdesktop-file-icon-manager.c |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c
index 7aa321b..8acc37c 100644
--- a/src/xfdesktop-file-icon-manager.c
+++ b/src/xfdesktop-file-icon-manager.c
@@ -1453,14 +1453,17 @@ xfdesktop_file_icon_manager_populate_context_menu(XfceDesktop *desktop,
                                      G_CALLBACK(xfdesktop_file_icon_menu_create_folder),
                                      fmanager);
 
-                    icon = g_content_type_get_icon("inode/directory");
+                    icon = g_themed_icon_new("folder-new");
                     img = gtk_image_new_from_gicon(icon, GTK_ICON_SIZE_MENU);
                     gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img);
                     gtk_widget_show(img);
                     
-                    /* create from template submenu, 0 disables the sub-menu */
+                    /* create document submenu, 0 disables the sub-menu */
                     if(fmanager->priv->max_templates > 0) {
-                        mi = gtk_menu_item_new_with_mnemonic(_("Create From _Template"));
+                        img = gtk_image_new_from_stock(GTK_STOCK_NEW, GTK_ICON_SIZE_MENU);
+                        gtk_widget_show(img);
+                        mi = gtk_image_menu_item_new_with_mnemonic(_("Create _Document"));
+                        gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img);
                         gtk_widget_show(mi);
                         gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
 
@@ -1480,14 +1483,23 @@ xfdesktop_file_icon_manager_populate_context_menu(XfceDesktop *desktop,
                             xfdesktop_file_icon_menu_fill_template_menu(tmpl_menu,
                                                                         templates_dir,
                                                                         fmanager);
+                        } else {
+                            mi = gtk_menu_item_new_with_label(_("No templates installed"));
+                            gtk_widget_set_sensitive(mi, FALSE);
+                            gtk_widget_show(mi);
+                            gtk_menu_shell_append(GTK_MENU_SHELL(tmpl_menu), mi);
                         }
 
                         if(templates_dir)
                             g_object_unref(templates_dir);
                         g_object_unref(home_dir);
 
+                        mi = gtk_separator_menu_item_new();
+                        gtk_widget_show(mi);
+                        gtk_menu_shell_append(GTK_MENU_SHELL(tmpl_menu), mi);
+
                         /* add the "Empty File" template option */
-                        img = gtk_image_new_from_stock(GTK_STOCK_NEW, GTK_ICON_SIZE_MENU);
+                        img = gtk_image_new_from_stock(GTK_STOCK_FILE, GTK_ICON_SIZE_MENU);
                         gtk_widget_show(img);
                         mi = gtk_image_menu_item_new_with_mnemonic(_("_Empty File"));
                         gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list