changeset 1811:a6a248bfafc3 trunk

[svn] - create the windows during skin load process after the skin.hints has been loaded
author nenolod
date Wed, 04 Oct 2006 23:16:49 -0700
parents df23110701d0
children 3be14eb7b44e
files ChangeLog audacious/main.c audacious/widgets/skin.c
diffstat 3 files changed, 22 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 04 23:11:06 2006 -0700
+++ b/ChangeLog	Wed Oct 04 23:16:49 2006 -0700
@@ -1,3 +1,11 @@
+2006-10-05 06:11:06 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2577]
+  - load skins before creating the UI
+  
+  trunk/audacious/main.c |   10 +++++-----
+  1 file changed, 5 insertions(+), 5 deletions(-)
+
+
 2006-10-05 06:09:40 +0000  William Pitcock <nenolod@nenolod.net>
   revision [2575]
   - more hardcoded values removed
--- a/audacious/main.c	Wed Oct 04 23:11:06 2006 -0700
+++ b/audacious/main.c	Wed Oct 04 23:16:49 2006 -0700
@@ -1076,11 +1076,6 @@
             exit(EXIT_FAILURE);
         }
 
-        mainwin_create();
-
-        playlistwin_create();
-        equalizerwin_create();
-
         GDK_THREADS_ENTER();
     }
 
--- a/audacious/widgets/skin.c	Wed Oct 04 23:11:06 2006 -0700
+++ b/audacious/widgets/skin.c	Wed Oct 04 23:16:49 2006 -0700
@@ -310,6 +310,14 @@
     width = gdk_pixbuf_get_width(pixbuf);
     height = gdk_pixbuf_get_height(pixbuf);
 
+    /* create the windows if they haven't been created yet, needed for bootstrapping */
+    if (mainwin == NULL)
+    {
+        mainwin_create();
+        equalizerwin_create();
+        playlistwin_create();
+    }
+
     if (!(pixmap = gdk_pixmap_new(mainwin->window, width, height,
                                   gdk_rgb_get_visual()->depth))) {
         g_object_unref(pixbuf);
@@ -1318,12 +1326,12 @@
     skin->path = g_strdup(path);
 
     if (!file_is_archive(path)) {
+        /* Parse the hints for this skin. */
+        skin_parse_hints(skin, NULL);
+
         skin_load_pixmaps(skin, path);
         skin_load_cursor(skin, path);
 
-        /* Parse the hints for this skin. */
-        skin_parse_hints(skin, NULL);
-
         return TRUE;
     }
 
@@ -1332,12 +1340,12 @@
         return FALSE;
     }
 
+    /* Parse the hints for this skin. */
+    skin_parse_hints(skin, cpath);
+
     skin_load_pixmaps(skin, cpath);
     skin_load_cursor(skin, cpath);
 
-    /* Parse the hints for this skin. */
-    skin_parse_hints(skin, cpath);
-
     del_directory(cpath);
     g_free(cpath);