[gnome-flashback] desktop: remove gf_build_attributes_list



commit 372de51c9531ff5c5e8444d5ffa64978f5512c86
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Nov 14 00:13:18 2019 +0200

    desktop: remove gf_build_attributes_list

 gnome-flashback/libdesktop/gf-icon-view.c | 31 +++++++++++++++++++++++++------
 gnome-flashback/libdesktop/gf-utils.c     | 19 -------------------
 gnome-flashback/libdesktop/gf-utils.h     | 11 ++++-------
 3 files changed, 29 insertions(+), 32 deletions(-)
---
diff --git a/gnome-flashback/libdesktop/gf-icon-view.c b/gnome-flashback/libdesktop/gf-icon-view.c
index a3cfe7f..d93ee6d 100644
--- a/gnome-flashback/libdesktop/gf-icon-view.c
+++ b/gnome-flashback/libdesktop/gf-icon-view.c
@@ -84,15 +84,34 @@ static guint view_signals[LAST_SIGNAL] = { 0 };
 
 G_DEFINE_TYPE (GfIconView, gf_icon_view, GTK_TYPE_EVENT_BOX)
 
+static char *
+build_attributes_list (const char *first,
+                       ...)
+{
+  GString *attributes;
+  va_list args;
+  const char *attribute;
+
+  attributes = g_string_new (first);
+  va_start (args, first);
+
+  while ((attribute = va_arg (args, const char *)) != NULL)
+    g_string_append_printf (attributes, ",%s", attribute);
+
+  va_end (args);
+
+  return g_string_free (attributes, FALSE);
+}
+
 static char *
 get_required_attributes (void)
 {
-  return gf_build_attributes_list (G_FILE_ATTRIBUTE_STANDARD_NAME,
-                                   G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
-                                   G_FILE_ATTRIBUTE_STANDARD_ICON,
-                                   G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN,
-                                   G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP,
-                                   NULL);
+  return build_attributes_list (G_FILE_ATTRIBUTE_STANDARD_NAME,
+                                G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
+                                G_FILE_ATTRIBUTE_STANDARD_ICON,
+                                G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN,
+                                G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP,
+                                NULL);
 }
 
 static GfIconInfo *
diff --git a/gnome-flashback/libdesktop/gf-utils.c b/gnome-flashback/libdesktop/gf-utils.c
index a25b183..3ca8baa 100644
--- a/gnome-flashback/libdesktop/gf-utils.c
+++ b/gnome-flashback/libdesktop/gf-utils.c
@@ -106,25 +106,6 @@ get_app_info_for_uri (const gchar  *uri,
   return app_info;
 }
 
-char *
-gf_build_attributes_list (const char *first,
-                          ...)
-{
-  GString *attributes;
-  va_list args;
-  const char *attribute;
-
-  attributes = g_string_new (first);
-  va_start (args, first);
-
-  while ((attribute = va_arg (args, const char *)) != NULL)
-    g_string_append_printf (attributes, ",%s", attribute);
-
-  va_end (args);
-
-  return g_string_free (attributes, FALSE);
-}
-
 gboolean
 gf_launch_desktop_file (const char  *desktop_file,
                         GError     **error)
diff --git a/gnome-flashback/libdesktop/gf-utils.h b/gnome-flashback/libdesktop/gf-utils.h
index f79334b..e07e91a 100644
--- a/gnome-flashback/libdesktop/gf-utils.h
+++ b/gnome-flashback/libdesktop/gf-utils.h
@@ -22,14 +22,11 @@
 
 G_BEGIN_DECLS
 
-char     *gf_build_attributes_list (const char  *first,
-                                     ...);
+gboolean gf_launch_desktop_file (const char  *desktop_file,
+                                 GError     **error);
 
-gboolean  gf_launch_desktop_file   (const char  *desktop_file,
-                                    GError     **error);
-
-gboolean  gf_launch_uri            (const char  *uri,
-                                    GError     **error);
+gboolean gf_launch_uri          (const char  *uri,
+                                 GError     **error);
 
 G_END_DECLS
 


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