[gnome-software] trivial: Move two functions around



commit 020d5b0e1c51ed7e9dad5e037ee1f62c6c0df9d5
Author: Kalev Lember <klember redhat com>
Date:   Wed Jun 24 16:31:41 2015 +0200

    trivial: Move two functions around
    
    ... in preparation for the next commit. This just moves the functions,
    no actual code changes.

 src/gs-app.c |   68 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 34 insertions(+), 34 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 8a37f2a..1350845 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -827,6 +827,40 @@ gs_app_is_addon_id_kind (GsApp *app)
        return TRUE;
 }
 
+static GtkIconTheme    *icon_theme_singleton;
+static GMutex           icon_theme_lock;
+static GHashTable      *icon_theme_paths;
+
+/**
+ * icon_theme_get:
+ */
+static GtkIconTheme *
+icon_theme_get (void)
+{
+       if (icon_theme_singleton == NULL)
+               icon_theme_singleton = gtk_icon_theme_new ();
+
+       return icon_theme_singleton;
+}
+
+/**
+ * icon_theme_add_path:
+ */
+static void
+icon_theme_add_path (const gchar *path)
+{
+       if (path == NULL)
+               return;
+
+       if (icon_theme_paths == NULL)
+               icon_theme_paths = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+
+       if (!g_hash_table_contains (icon_theme_paths, path)) {
+               gtk_icon_theme_prepend_search_path (icon_theme_get (), path);
+               g_hash_table_add (icon_theme_paths, g_strdup (path));
+       }
+}
+
 /**
  * gs_app_get_pixbuf:
  */
@@ -906,40 +940,6 @@ gs_app_set_icon (GsApp *app, AsIcon *icon)
                APP_PRIV (app)->icon = g_object_ref (icon);
 }
 
-static GtkIconTheme *icon_theme_singleton;
-static GMutex  icon_theme_lock;
-static GHashTable   *icon_theme_paths;
-
-/**
- * icon_theme_get:
- */
-static GtkIconTheme *
-icon_theme_get (void)
-{
-       if (icon_theme_singleton == NULL)
-               icon_theme_singleton = gtk_icon_theme_new ();
-
-       return icon_theme_singleton;
-}
-
-/**
- * icon_theme_add_path:
- */
-static void
-icon_theme_add_path (const gchar *path)
-{
-       if (path == NULL)
-               return;
-
-       if (icon_theme_paths == NULL)
-               icon_theme_paths = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
-
-       if (!g_hash_table_contains (icon_theme_paths, path)) {
-               gtk_icon_theme_prepend_search_path (icon_theme_get (), path);
-               g_hash_table_add (icon_theme_paths, g_strdup (path));
-       }
-}
-
 /**
  * gs_app_load_icon:
  */


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