]> git.sesse.net Git - vlc/commitdiff
* loadNibNamed:withOwner calls awakeFromNib on owner. Therefore opening panels result...
authorDerk-Jan Hartman <hartman@videolan.org>
Mon, 29 Aug 2005 20:10:59 +0000 (20:10 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Mon, 29 Aug 2005 20:10:59 +0000 (20:10 +0000)
  this fixes #323

modules/gui/macosx/intf.h
modules/gui/macosx/intf.m

index 51f457c5c40562ad6d024ca689a5e6fe3ac89fcf..abf4202c596e1fa2e61b4229353cc98f4333d364 100644 (file)
@@ -94,6 +94,7 @@ struct intf_sys_t
     id o_extended;              /* VLCExtended    */
     id o_bookmarks;             /* VLCBookmarks   */
     id o_update;                /* VLCUpdate      */
+    BOOL nib_main_loaded;       /* reference to the main-nib */
     BOOL nib_open_loaded;       /* reference to the open-nib */
     BOOL nib_about_loaded;      /* reference to the about-nib */
     BOOL nib_wizard_loaded;     /* reference to the wizard-nib */
index 82118d90879dd2b7580e849a27d9aa2f6236df62..94fa5ac467833223a8081cd9d4f12635d16e7bf8 100644 (file)
@@ -323,6 +323,9 @@ static VLCMain *_o_sharedMainInstance = nil;
     playlist_t *p_playlist;
     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];
     [o_window setExcludedFromWindowsMenu: TRUE];
     [o_msgs_panel setExcludedFromWindowsMenu: TRUE];
@@ -426,6 +429,7 @@ static VLCMain *_o_sharedMainInstance = nil;
         [o_btn_fullscreen setState: ( var_Get( p_playlist, "fullscreen", &val )>=0 && val.b_bool )];
         vlc_object_release( p_playlist );
     }
+    nib_main_loaded = TRUE;
 }
 
 - (void)dealloc