[nautilus] files-view : added file extensions to "New Document" submenu entries



commit 924032a58f89d1ee9c42452f563d552f8ab67b51
Author: Roshan R <roshanr2001 gmail com>
Date:   Mon Mar 7 23:58:27 2022 +0530

    files-view : added file extensions to "New Document" submenu entries
    
    Currently, while creating a new file using the "New Document" Section
    the file extensions of the template files are not shown. This may lead
    to confusion if there are files in the Templates directory with the
    same basename but with different extensions. To fix this, the full
    filename is now shown.
    
    Closes #2167

 src/nautilus-files-view.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 402e069c3..d85c4240a 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -5555,7 +5555,7 @@ add_template_to_templates_menus (NautilusFilesView *view,
                                  GMenu             *menu)
 {
     NautilusFilesViewPrivate *priv;
-    char *tmp, *uri, *name;
+    char *uri, *name;
     g_autofree gchar *escaped_uri = NULL;
     GdkTexture *mimetype_icon;
     char *action_name, *detailed_action_name;
@@ -5565,10 +5565,7 @@ add_template_to_templates_menus (NautilusFilesView *view,
     GMenuItem *menu_item;
 
     priv = nautilus_files_view_get_instance_private (view);
-    tmp = nautilus_file_get_display_name (file);
-    name = eel_filename_strip_extension (tmp);
-    g_free (tmp);
-
+    name = nautilus_file_get_display_name (file);
     uri = nautilus_file_get_uri (file);
     escaped_uri = g_uri_escape_string (uri, NULL, TRUE);
     action_name = g_strconcat ("template_", escaped_uri, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]