tags 331042 + patch
thanks

The problem in #331042 is due to the fact that the default skin is not
saved in the config file. If the default skin is selected, the config
entry is simply omitted, causing cfg.skin to be NULL. However,
xmms/1.2.10+cvs20050809-3 added a patch with the following:

-       load_skin(cfg.skin);
+       if(cfg.skin == NULL) {
+               load_skin("/usr/share/xmms/Skins/debfskin.tar.gz");
+       } else {
+               load_skin(cfg.skin);
+       }

So every time XMMS starts and there is no skin setting in the config
file (meaning the XMMS default skin should be used), that patch
overrides it and selects the Debian skin. However, the user kan still
switch to the default skin afterwards (but can't save the setting).

This is both confusing and annoying for people who like the default skin
better than the Debian one. I believe the only way to please everyone
here is to only set the default skin if there is no existing xmms
config. The config is saved the first time you exit XMMS, and afterwards
there is no way to know if the user has explicitly chosen the default
skin or not.

I have attached a patch that should fix the problem. It selects the
Debian skin the first time XMMS is run, and leaves the settings alone
afterwards.

I tried just patching the sources, but then the patches in
debian/patches conflicted with the changes. I just added my patch in
there as well, so the conflicting patches were applied first. I have no
clue whether that was correct or not, but at least it builds now ;-)

-- 
Knut Auvor Grythe
diff -Nur xmms-1.2.10+cvs20050809/debian/patches/00list 
xmms-1.2.10+cvs20050809.patched/debian/patches/00list
--- xmms-1.2.10+cvs20050809/debian/patches/00list       2005-10-03 
01:49:35.755692968 +0200
+++ xmms-1.2.10+cvs20050809.patched/debian/patches/00list       2005-10-03 
01:51:58.090054856 +0200
@@ -22,6 +22,7 @@
 26_all_mpg123-id3v2edit
 27_all_mpg123-vorbis-ssl
 28_all_diskwriter-effect
+29_all_default_skin_fix
 50_ipv6_fixes
 51_race_cond
 97_libtool
diff -Nur xmms-1.2.10+cvs20050809/debian/patches/29_all_default_skin_fix 
xmms-1.2.10+cvs20050809.patched/debian/patches/29_all_default_skin_fix
--- xmms-1.2.10+cvs20050809/debian/patches/29_all_default_skin_fix      
1970-01-01 01:00:00.000000000 +0100
+++ xmms-1.2.10+cvs20050809.patched/debian/patches/29_all_default_skin_fix      
2005-10-03 01:54:19.460563272 +0200
@@ -0,0 +1,45 @@
+#! /bin/sh -e
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Set debian skin as default -- This time properly
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1;;
+esac
+
+exit 0
+
[EMAIL PROTECTED]@
+diff -ur xmms-1.2.10+cvs20050809/xmms/main.c 
xmms-1.2.10+cvs20050809.patched/xmms/main.c
+--- xmms-1.2.10+cvs20050809/xmms/main.c        2005-10-03 01:49:47.666882192 
+0200
++++ xmms-1.2.10+cvs20050809.patched/xmms/main.c        2005-10-03 
01:51:04.265237472 +0200
+@@ -534,6 +534,8 @@
+               gchar *temp;
+               temp = g_strconcat(g_get_home_dir(), "/.xmms/Skins", NULL);
+               cfg.skin_dirs = g_list_append(cfg.skin_dirs, temp);
++              cfg.skin_dirs = g_list_append(cfg.skin_dirs, 
"/usr/share/xmms/Skins");
++              cfg.skin = g_strdup("/usr/share/xmms/Skins/debfskin.tar.gz");
+       }
+ 
+       if (cfg.playlist_font && strlen(cfg.playlist_font) == 0)
+@@ -4007,11 +4009,7 @@
+       playlistwin_create();
+       equalizerwin_create();
+       init_skins();
+-      if(cfg.skin == NULL) {
+-              load_skin("/usr/share/xmms/Skins/debfskin.tar.gz");
+-      } else {
+-              load_skin(cfg.skin);
+-      }
++      load_skin(cfg.skin);
+       create_popups();
+       create_prefs_window();
+       util_read_menu_rc();

Reply via email to