[gnome-commander] Adding this missing commit for renaming a method name and adding an method argument



commit 4bcdef2c8a4de131f336f0544219c919d515de1f
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Fri Jan 1 22:01:41 2021 +0100

    Adding this missing commit for renaming a method name and adding an method argument

 src/gnome-cmd-file-popmenu.cc | 2 +-
 src/gnome-cmd-file.cc         | 4 +---
 src/gnome-cmd-file.h          | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/gnome-cmd-file-popmenu.cc b/src/gnome-cmd-file-popmenu.cc
index a9103c4f..ed6e5c9d 100644
--- a/src/gnome-cmd-file-popmenu.cc
+++ b/src/gnome-cmd-file-popmenu.cc
@@ -834,7 +834,7 @@ guint add_open_with_entries(GtkUIManager *ui_manager, GnomeCmdFileList *gnomeCmd
     // Add menu items in the "Open with" submenu
     gint ii = -1;
     GList *gAppInfos, *tmp_list;
-    auto contentTypeString = gnomeCmdFile->GetGfileContentTypeString();
+    auto contentTypeString = gnomeCmdFile->GetGfileAttributeString(G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
     gAppInfos = tmp_list = g_app_info_get_all_for_type(contentTypeString);
     g_free(contentTypeString);
     for (; gAppInfos && ii < MAX_OPEN_WITH_APPS; gAppInfos = gAppInfos->next)
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index e869d2b8..d96ef96f 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -513,9 +513,7 @@ gchar *GnomeCmdFile::GetGfileAttributeString(const char *attribute)
 
 gchar *GnomeCmdFile::get_default_application_name_string()
 {
-    gchar *contentType = nullptr;
-
-    contentType = g_file_info_get_attribute_as_string (gFileInfo, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
+    auto contentType = GetGfileAttributeString (G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
 
     auto appInfo = g_app_info_get_default_for_type (contentType, false);
 
diff --git a/src/gnome-cmd-file.h b/src/gnome-cmd-file.h
index 6a717448..a115ed4e 100644
--- a/src/gnome-cmd-file.h
+++ b/src/gnome-cmd-file.h
@@ -105,7 +105,7 @@ struct GnomeCmdFile
     gboolean has_tree_size();
 
     GnomeVFSMimeApplication *get_default_application();
-    gchar *GetGfileContentTypeString();
+    gchar *GetGfileAttributeString(const char *attribute);
     gchar *get_default_application_name_string();
     gchar *get_default_application_action_label(GAppInfo *gAppInfo);
     gchar *get_default_application_name(GAppInfo *gAppInfo);


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