# HG changeset patch # User Tomasz Mon # Date 1208080801 -7200 # Node ID 5125b5910d0e4ed6e490a41b1223b202583d155b # Parent a7bf5b979a05e6cc43ab194422d270baed0fe730 add checkbox to make it possible to load broken skins diff -r a7bf5b979a05 -r 5125b5910d0e src/audacious/audconfig.c --- a/src/audacious/audconfig.c Sun Apr 13 07:15:07 2008 +0300 +++ b/src/audacious/audconfig.c Sun Apr 13 12:00:01 2008 +0200 @@ -95,6 +95,7 @@ FALSE, /* use fontsets */ TRUE, /* use bitmap font for mainwin */ TRUE, /* use custom cursors */ + FALSE, /* allow broken skins */ TRUE, /* close dialog on open */ TRUE, /* close dialog on add */ 0.0, /* equalizer preamp */ @@ -259,6 +260,7 @@ {"eq_extra_filtering", &cfg.eq_extra_filtering, TRUE}, {"analyzer_peaks", &cfg.analyzer_peaks, TRUE}, {"custom_cursors", &cfg.custom_cursors, TRUE}, + {"allow_broken_skins", &cfg.allow_broken_skins, TRUE}, {"close_dialog_open", &cfg.close_dialog_open, TRUE}, {"close_dialog_add", &cfg.close_dialog_add, TRUE}, {"resume_playback_on_startup", &cfg.resume_playback_on_startup, TRUE}, diff -r a7bf5b979a05 -r 5125b5910d0e src/audacious/audconfig.h --- a/src/audacious/audconfig.h Sun Apr 13 07:15:07 2008 +0300 +++ b/src/audacious/audconfig.h Sun Apr 13 12:00:01 2008 +0200 @@ -60,6 +60,7 @@ gboolean use_fontsets; gboolean mainwin_use_bitmapfont; gboolean custom_cursors; + gboolean allow_broken_skins; gboolean close_dialog_open; gboolean close_dialog_add; gfloat equalizer_preamp, equalizer_bands[10]; diff -r a7bf5b979a05 -r 5125b5910d0e src/audacious/skin.c --- a/src/audacious/skin.c Sun Apr 13 07:15:07 2008 +0300 +++ b/src/audacious/skin.c Sun Apr 13 12:00:01 2008 +0200 @@ -1433,7 +1433,7 @@ AUDDBG("Loading pixmaps in %s\n", path); for (i = 0; i < SKIN_PIXMAP_COUNT; i++) - if (!skin_load_pixmap_id(skin, i, path)) + if (!skin_load_pixmap_id(skin, i, path) && !cfg.allow_broken_skins) return FALSE; text_pb = skin->pixmaps[SKIN_TEXT].pixbuf; @@ -1549,7 +1549,7 @@ } // Check if skin path has all necessary files. - if (!skin_check_pixmaps(skin, skin_path)) { + if (!cfg.allow_broken_skins && !skin_check_pixmaps(skin, skin_path)) { if(archive) del_directory(skin_path); g_free(skin_path); AUDDBG("Skin path (%s) doesn't have all wanted pixmaps\n", skin_path); diff -r a7bf5b979a05 -r 5125b5910d0e src/audacious/ui_preferences.c --- a/src/audacious/ui_preferences.c Sun Apr 13 07:15:07 2008 +0300 +++ b/src/audacious/ui_preferences.c Sun Apr 13 12:00:01 2008 +0200 @@ -213,6 +213,8 @@ {WIDGET_CHK_BTN, N_("Use two-way text scroller"), &cfg.twoway_scroll, NULL, N_("If selected, the file information text in the main window will scroll back and forth. If not selected, the text will only scroll in one direction."), FALSE}, {WIDGET_CHK_BTN, N_("Disable inline gtk theme"), &cfg.disable_inline_gtk, NULL, NULL, FALSE}, + {WIDGET_CHK_BTN, N_("Allow loading incomplete skins"), &cfg.allow_broken_skins, NULL, + N_("If selected, audacious won't refuse loading broken skins. Use only if your favourite skin doesn't work"), FALSE}, }; static PreferencesWidget audio_page_widgets[] = {