- modules/gui/skins/skin_main.cpp: Try to open the default XML file first
[vlc.git] / modules / gui / skins / src / skin_main.cpp
index d87bae1..70dcfb5 100644 (file)
@@ -2,7 +2,7 @@
  * skin-main.cpp: skins plugin for VLC
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: skin_main.cpp,v 1.1 2003/03/18 02:21:47 ipkiss Exp $
+ * $Id: skin_main.cpp,v 1.5 2003/04/06 17:57:11 ipkiss Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -152,14 +152,22 @@ static void Run( intf_thread_t *p_intf )
     if( skin_last == NULL || ! Loader->Load( skin_last ) )
     {
         // Too bad, it failed. Let's try with the default theme
+#if 0
         if( ! Loader->Load( DEFAULT_SKIN_FILE ) )
+#else
+        string default_dir = (string)p_intf->p_libvlc->psz_vlcpath +
+                             DIRECTORY_SEPARATOR + "skins" +
+                             DIRECTORY_SEPARATOR + "default" +
+                             DIRECTORY_SEPARATOR + "theme.xml";
+        if( ! Loader->Load( default_dir ) )
+#endif
         {
             // Last chance: the user can  select a new theme file
 
             // Initialize file structure
             OpenFileDialog *OpenFile;
-            OpenFile = (OpenFileDialog *)new OSOpenFileDialog( _("Open skin"),
-                false );
+            OpenFile = (OpenFileDialog *)new OSOpenFileDialog( NULL,
+                _("Open skin"), false );
             OpenFile->AddFilter( _("Skin files"), "*.vlt" );
             OpenFile->AddFilter( _("Skin files"), "*.xml" );
             OpenFile->AddFilter( _("All files"), "*.*" );
@@ -223,10 +231,10 @@ vlc_module_begin();
               VLC_FALSE );
     add_bool( "show_in_taskbar", VLC_TRUE, NULL, SKIN_TASKBAR,
               SKIN_TASKBAR_LONG, VLC_FALSE );
-    set_description( _("Skinnable Interface Module") );
+    set_description( _("Skinnable Interface") );
     set_capability( "interface", 30 );
-    set_callbacks( E_(Open), E_(Close) );
-    add_shortcut( "skin" );
+    set_callbacks( Open, Close );
+    add_shortcut( "skins" );
 vlc_module_end();