[gnome-commander] Add GnomeCmdFile member method for retrieving boolean attribute



commit 260e3f82fef7382158225efcd53dad7e41de9a5d
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sat Jul 10 21:50:30 2021 +0200

    Add GnomeCmdFile member method for retrieving boolean attribute

 src/dialogs/gnome-cmd-delete-dialog.cc | 2 +-
 src/gnome-cmd-file.cc                  | 6 ++++++
 src/gnome-cmd-file.h                   | 1 +
 src/utils.cc                           | 2 +-
 src/utils.h                            | 2 +-
 5 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-delete-dialog.cc b/src/dialogs/gnome-cmd-delete-dialog.cc
index 1b8f1836..3c4beabe 100644
--- a/src/dialogs/gnome-cmd-delete-dialog.cc
+++ b/src/dialogs/gnome-cmd-delete-dialog.cc
@@ -197,7 +197,7 @@ static gboolean perform_delete_operation_r(DeleteData *deleteData, GList *gnomeC
         }
 
         if ((numDirs == 1 && numFiles == 0) // Empty directory
-            || (GetGfileAttributeBoolean(gFile, G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK)) //We want delete 
symlinks!
+            || (get_gfile_attribute_boolean(gFile, G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK)) //We want delete 
symlinks!
             || (GetGfileAttributeUInt32(gFile, G_FILE_ATTRIBUTE_STANDARD_TYPE) != G_FILE_TYPE_DIRECTORY)) // 
Not a directory
         {
             // DELETE IT!
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index 0fdb3ad4..91e177fe 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -522,6 +522,12 @@ GAppInfo *GnomeCmdFile::GetAppInfoForContentType()
 }
 
 
+gboolean GnomeCmdFile::GetGfileAttributeBoolean(const char *attribute)
+{
+    return get_gfile_attribute_boolean(this->gFile, attribute);
+}
+
+
 gchar *GnomeCmdFile::GetGfileAttributeString(const char *attribute)
 {
     g_return_val_if_fail (gFile != nullptr, nullptr);
diff --git a/src/gnome-cmd-file.h b/src/gnome-cmd-file.h
index af0a0a2b..b9b50c66 100644
--- a/src/gnome-cmd-file.h
+++ b/src/gnome-cmd-file.h
@@ -105,6 +105,7 @@ struct GnomeCmdFile
     void invalidate_tree_size();
     gboolean has_tree_size();
 
+    gboolean GetGfileAttributeBoolean(const char *attribute);
     guint32 GetGfileAttributeUInt32(const char *attribute);
     guint64 GetGfileAttributeUInt64(const char *attribute);
     gchar *GetGfileAttributeString(const char *attribute);
diff --git a/src/utils.cc b/src/utils.cc
index eb7c80a1..3ae3e6fe 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1174,7 +1174,7 @@ guint32 GetGfileAttributeUInt32(GFile *gFile, const char *attribute)
 }
 
 
-gboolean GetGfileAttributeBoolean(GFile *gFile, const char *attribute)
+gboolean get_gfile_attribute_boolean(GFile *gFile, const char *attribute)
 {
     GError *error;
     error = nullptr;
diff --git a/src/utils.h b/src/utils.h
index 19cffd34..638e8d2b 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -413,7 +413,7 @@ gchar* get_package_config_dir();
 
 gchar *string_double_underscores (const gchar *string);
 
-gboolean GetGfileAttributeBoolean(GFile *gFile, const char *attribute);
+gboolean get_gfile_attribute_boolean(GFile *gFile, const char *attribute);
 
 guint32 GetGfileAttributeUInt32(GFile *gFile, const char *attribute);
 


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