changeset 3864:6cbb1a20b10b

minor cleanup
author mf0102 <0102@gmx.at>
date Sun, 28 Oct 2007 19:36:16 +0100
parents dd5c459c5f2d
children 97b6075a7590
files src/audacious/skin.c
diffstat 1 files changed, 8 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/skin.c	Sun Oct 28 09:19:29 2007 -0500
+++ b/src/audacious/skin.c	Sun Oct 28 19:36:16 2007 +0100
@@ -1464,11 +1464,13 @@
 }
 
 static void
-skin_set_gtk_theme(GtkSettings * settings, Skin * skin, gboolean tmp_clean)
+skin_set_gtk_theme(GtkSettings * settings, Skin * skin)
 {
     if (original_gtk_theme == NULL)
          g_object_get(settings, "gtk-theme-name", &original_gtk_theme, NULL);
 
+    /* the way GTK does things can be very broken. --nenolod */
+
     gchar *tmp = g_strdup_printf("%s/.themes/aud-%s", g_get_home_dir(),
                                  basename(skin->path));
 
@@ -1479,14 +1481,7 @@
     symlink(skin->path, tmp);
     gtk_settings_set_string_property(settings, "gtk-theme-name",
                                      basename(tmp), "audacious");
-
-#if 0
-    if (tmp_clean)
-    {
-        unlink(tmp);
-        g_free(tmp);
-    }
-#endif
+    g_free(tmp);
 }
 
 static gboolean
@@ -1532,12 +1527,8 @@
 
 #ifndef _WIN32
         gtkrcpath = find_path_recursively(skin->path, "gtkrc");
-
-        /* the way GTK does things can be very broken. --nenolod */
-        if (gtkrcpath != NULL) {
-            skin_set_gtk_theme(settings, skin, FALSE);
-        }
-
+        if (gtkrcpath != NULL)
+            skin_set_gtk_theme(settings, skin);
         g_free(gtkrcpath);
 #endif
 
@@ -1563,12 +1554,8 @@
 
 #ifndef _WIN32
     gtkrcpath = find_path_recursively(skin->path, "gtkrc");
-
-    /* the way GTK does things can be very broken. --nenolod */
-    if (gtkrcpath != NULL) {
-        skin_set_gtk_theme(settings, skin, TRUE);
-    }
-
+    if (gtkrcpath != NULL)
+        skin_set_gtk_theme(settings, skin);
     g_free(gtkrcpath);
 #endif