- if ( USE_VLC_CONFIG_FILE )
- {
- // main window size and position
- int i_width = config_GetInt( p_intf, "beos-intf-width" ),
- i_height = config_GetInt( p_intf, "beos-intf-height" ),
- i_xpos = config_GetInt( p_intf, "beos-intf-xpos" ),
- i_ypos = config_GetInt( p_intf, "beos-intf-ypos" );
- if( i_width > 20 && i_height > 20 && i_xpos >= 0 && i_ypos >= 0 )
- {
- BRect r( i_xpos, i_ypos, i_xpos + i_width, i_ypos + i_height );
- set_window_pos( this, r );
- }
- // playlist window size and position
- i_width = config_GetInt( p_intf, "beos-playlist-width" ),
- i_height = config_GetInt( p_intf, "beos-playlist-height" ),
- i_xpos = config_GetInt( p_intf, "beos-playlist-xpos" ),
- i_ypos = config_GetInt( p_intf, "beos-playlist-ypos" );
- if( i_width > 20 && i_height > 20 && i_xpos >= 0 && i_ypos >= 0 )
- {
- BRect r( i_xpos, i_ypos, i_xpos + i_width, i_ypos + i_height );
- set_window_pos( fPlaylistWindow, r );
- }
- // playlist showing
- launch_window( fPlaylistWindow, config_GetInt( p_intf, "beos-playlist-show" ) );
- // messages window size and position
- i_width = config_GetInt( p_intf, "beos-messages-width" ),
- i_height = config_GetInt( p_intf, "beos-messages-height" ),
- i_xpos = config_GetInt( p_intf, "beos-messages-xpos" ),
- i_ypos = config_GetInt( p_intf, "beos-messages-ypos" );
- if( i_width > 20 && i_height > 20 && i_xpos >= 0 && i_ypos >= 0 )
- {
- BRect r( i_xpos, i_ypos, i_xpos + i_width, i_ypos + i_height );
- set_window_pos( fMessagesWindow, r );
- }
- // messages showing
- launch_window( fMessagesWindow, config_GetInt( p_intf, "beos-messages-show" ) );
-
- // messages window size and position
- i_width = config_GetInt( p_intf, "beos-settings-width" ),
- i_height = config_GetInt( p_intf, "beos-settings-height" ),
- i_xpos = config_GetInt( p_intf, "beos-settings-xpos" ),
- i_ypos = config_GetInt( p_intf, "beos-settings-ypos" );
- if( i_width > 20 && i_height > 20 && i_xpos >= 0 && i_ypos >= 0 )
- {
- BRect r( i_xpos, i_ypos, i_xpos + i_width, i_ypos + i_height );
- set_window_pos( fPreferencesWindow, r );
- }
- // settings showing
- launch_window( fPreferencesWindow, config_GetInt( p_intf, "beos-settings-show" ) );
- }
- else
- {
- if ( load_settings( fSettings, "interface_settings", "VideoLAN Client" ) == B_OK )
- {
- BRect frame;
- if ( fSettings->FindRect( "main frame", &frame ) == B_OK )
- set_window_pos( this, frame );
- if (fSettings->FindRect( "playlist frame", &frame ) == B_OK )
- set_window_pos( fPlaylistWindow, frame );
- if (fSettings->FindRect( "messages frame", &frame ) == B_OK )
- set_window_pos( fMessagesWindow, frame );
- if (fSettings->FindRect( "settings frame", &frame ) == B_OK )
- set_window_pos( fPreferencesWindow, frame );
-
- bool showing;
- if ( fSettings->FindBool( "playlist showing", &showing ) == B_OK )
- launch_window( fPlaylistWindow, showing );
- if ( fSettings->FindBool( "messages showing", &showing ) == B_OK )
- launch_window( fMessagesWindow, showing );
- if ( fSettings->FindBool( "settings showing", &showing ) == B_OK )
- launch_window( fPreferencesWindow, showing );
-
- uint32 displayMode;
- if ( fSettings->FindInt32( "playlist display mode", (int32*)&displayMode ) == B_OK )
- fPlaylistWindow->SetDisplayMode( displayMode );
- }
- }
+ if ( load_settings( fSettings, "interface_settings", "VideoLAN Client" ) == B_OK )
+ {
+ BRect frame;
+ if ( fSettings->FindRect( "main frame", &frame ) == B_OK )
+ set_window_pos( this, frame );
+#if 0
+ if (fSettings->FindRect( "playlist frame", &frame ) == B_OK )
+ set_window_pos( fPlaylistWindow, frame );
+#endif
+ if (fSettings->FindRect( "messages frame", &frame ) == B_OK )
+ set_window_pos( fMessagesWindow, frame );
+ if (fSettings->FindRect( "settings frame", &frame ) == B_OK )
+ {
+ /* FIXME: Preferences resizing doesn't work correctly yet */
+ frame.right = frame.left + fPreferencesWindow->Frame().Width();
+ frame.bottom = frame.top + fPreferencesWindow->Frame().Height();
+ set_window_pos( fPreferencesWindow, frame );
+ }
+
+ bool showing;
+#if 0
+ if ( fSettings->FindBool( "playlist showing", &showing ) == B_OK )
+ launch_window( fPlaylistWindow, showing );
+#endif
+ if ( fSettings->FindBool( "messages showing", &showing ) == B_OK )
+ launch_window( fMessagesWindow, showing );
+ if ( fSettings->FindBool( "settings showing", &showing ) == B_OK )
+ launch_window( fPreferencesWindow, showing );
+#if 0
+ uint32 displayMode;
+ if ( fSettings->FindInt32( "playlist display mode", (int32*)&displayMode ) == B_OK )
+ fPlaylistWindow->SetDisplayMode( displayMode );
+#endif
+ }