Commit 146cc35a authored by hartman's avatar hartman
Browse files

* loadNibNamed:withOwner calls awakeFromNib on owner. Therefore opening panels...

* loadNibNamed:withOwner calls awakeFromNib on owner. Therefore opening panels resulted in reinitializing some of VLCMain's stuff. This included evalutation of p_intf->b_play, which triggered an unintended call to playlist_Play().
  this fixes #323
parent 4754d7cc
...@@ -94,6 +94,7 @@ struct intf_sys_t ...@@ -94,6 +94,7 @@ struct intf_sys_t
id o_extended; /* VLCExtended */ id o_extended; /* VLCExtended */
id o_bookmarks; /* VLCBookmarks */ id o_bookmarks; /* VLCBookmarks */
id o_update; /* VLCUpdate */ id o_update; /* VLCUpdate */
BOOL nib_main_loaded; /* reference to the main-nib */
BOOL nib_open_loaded; /* reference to the open-nib */ BOOL nib_open_loaded; /* reference to the open-nib */
BOOL nib_about_loaded; /* reference to the about-nib */ BOOL nib_about_loaded; /* reference to the about-nib */
BOOL nib_wizard_loaded; /* reference to the wizard-nib */ BOOL nib_wizard_loaded; /* reference to the wizard-nib */
......
...@@ -323,6 +323,9 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -323,6 +323,9 @@ static VLCMain *_o_sharedMainInstance = nil;
playlist_t *p_playlist; playlist_t *p_playlist;
vlc_value_t val; vlc_value_t val;
/* Check if we already did this once. Opening the other nibs calls it too, because VLCMain is the owner */
if( nib_main_loaded ) return;
[self initStrings]; [self initStrings];
[o_window setExcludedFromWindowsMenu: TRUE]; [o_window setExcludedFromWindowsMenu: TRUE];
[o_msgs_panel setExcludedFromWindowsMenu: TRUE]; [o_msgs_panel setExcludedFromWindowsMenu: TRUE];
...@@ -426,6 +429,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -426,6 +429,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_btn_fullscreen setState: ( var_Get( p_playlist, "fullscreen", &val )>=0 && val.b_bool )]; [o_btn_fullscreen setState: ( var_Get( p_playlist, "fullscreen", &val )>=0 && val.b_bool )];
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
nib_main_loaded = TRUE;
} }
- (void)dealloc - (void)dealloc
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment