Mercurial > audlegacy
comparison src/audacious/skin.c @ 3774:12d1d2969a1a
more gtk+ suckery. :(
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Wed, 17 Oct 2007 06:05:39 -0500 |
parents | 1c8746b4b8ab |
children | 462f391ee02b |
comparison
equal
deleted
inserted
replaced
3771:1c8746b4b8ab | 3774:12d1d2969a1a |
---|---|
1495 /* the way GTK does things can be very broken. --nenolod */ | 1495 /* the way GTK does things can be very broken. --nenolod */ |
1496 if (gtkrcpath != NULL) { | 1496 if (gtkrcpath != NULL) { |
1497 GtkSettings *settings = gtk_settings_get_default(); | 1497 GtkSettings *settings = gtk_settings_get_default(); |
1498 gchar *tmp = g_strdup_printf("%s/.themes/aud-%s", g_get_home_dir(), basename(skin->path)); | 1498 gchar *tmp = g_strdup_printf("%s/.themes/aud-%s", g_get_home_dir(), basename(skin->path)); |
1499 | 1499 |
1500 gchar *troot = g_strdup_printf("%s/.themes"); | 1500 gchar *troot = g_strdup_printf("%s/.themes", g_get_home_dir()); |
1501 g_mkdir_with_parents(troot, 0755); | 1501 g_mkdir_with_parents(troot, 0755); |
1502 g_free(troot); | 1502 g_free(troot); |
1503 | 1503 |
1504 symlink(skin->path, tmp); | 1504 symlink(skin->path, tmp); |
1505 gtk_settings_set_string_property (settings, "gtk-theme-name", basename(skin->path), "audacious"); | 1505 gtk_settings_set_string_property (settings, "gtk-theme-name", basename(tmp), "audacious"); |
1506 | 1506 |
1507 #if 0 | |
1507 unlink(tmp); | 1508 unlink(tmp); |
1508 g_free(tmp); | 1509 g_free(tmp); |
1510 #endif | |
1509 } | 1511 } |
1510 #endif | 1512 #endif |
1511 | 1513 |
1512 return TRUE; | 1514 return TRUE; |
1513 } | 1515 } |
1535 /* the way GTK does things can be very broken. --nenolod */ | 1537 /* the way GTK does things can be very broken. --nenolod */ |
1536 if (gtkrcpath != NULL) { | 1538 if (gtkrcpath != NULL) { |
1537 GtkSettings *settings = gtk_settings_get_default(); | 1539 GtkSettings *settings = gtk_settings_get_default(); |
1538 gchar *tmp = g_strdup_printf("%s/.themes/aud-%s", g_get_home_dir(), basename(skin->path)); | 1540 gchar *tmp = g_strdup_printf("%s/.themes/aud-%s", g_get_home_dir(), basename(skin->path)); |
1539 | 1541 |
1540 gchar *troot = g_strdup_printf("%s/.themes"); | 1542 gchar *troot = g_strdup_printf("%s/.themes", g_get_home_dir()); |
1541 g_mkdir_with_parents(troot, 0755); | 1543 g_mkdir_with_parents(troot, 0755); |
1542 g_free(troot); | 1544 g_free(troot); |
1543 | 1545 |
1544 symlink(skin->path, tmp); | 1546 symlink(skin->path, tmp); |
1545 gtk_settings_set_string_property (settings, "gtk-theme-name", basename(skin->path), "audacious"); | 1547 gtk_settings_set_string_property (settings, "gtk-theme-name", basename(tmp), "audacious"); |
1546 | 1548 |
1547 unlink(tmp); | 1549 unlink(tmp); |
1548 g_free(tmp); | 1550 g_free(tmp); |
1549 } | 1551 } |
1550 #endif | 1552 #endif |