# HG changeset patch # User mf0102 <0102@gmx.at> # Date 1193596576 -3600 # Node ID 6cbb1a20b10beaaf924483a975c86f9e15c333c2 # Parent dd5c459c5f2d8ceeb315b5aa26a3152bbfccce54 minor cleanup diff -r dd5c459c5f2d -r 6cbb1a20b10b src/audacious/skin.c --- 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