[vlc-devel] [vlc-commits] macosx: refactor main class object life management and main menu

Felix Paul Kühne fkuehne at videolan.org
Tue Jul 21 20:13:54 CEST 2015


On 21 Jul 2015, at 18:47, David Fuhrmann <david.fuhrmann at gmail.com> wrote:
> 
>> 
>> Am 21.07.2015 um 17:52 schrieb Felix Paul Kühne <git at videolan.org>:
>> 
>> vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Jul 21 17:50:49 2015 +0200| [f450457875207163ddb4f435e0bb5dc868e35ee8] | committer: Felix Paul Kühne
>> 
>> macosx: refactor main class object life management and main menu
>> 
>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f450457875207163ddb4f435e0bb5dc868e35ee8
>> ---
>> 
>> .../macosx/Resources/English.lproj/MainMenu.xib    |10096 +++-----------------
>> .../package/macosx/vlc.xcodeproj/project.pbxproj   |    8 -
>> modules/gui/macosx/ControlsBar.m                   |    4 +-
>> modules/gui/macosx/CoreInteraction.h               |    2 +
>> modules/gui/macosx/CoreInteraction.m               |   46 +-
>> modules/gui/macosx/MainMenu.h                      |  456 +-
>> modules/gui/macosx/MainMenu.m                      | 1338 +--
>> modules/gui/macosx/MainWindow.m                    |    6 +-
>> modules/gui/macosx/Makefile.am                     |    1 -
>> modules/gui/macosx/VideoView.m                     |    6 +-
>> modules/gui/macosx/controls.h                      |   70 -
>> modules/gui/macosx/controls.m                      |  255 -
>> modules/gui/macosx/intf.h                          |    4 -
>> modules/gui/macosx/intf.m                          |   82 +-
>> modules/gui/macosx/misc.m                          |    6 +-
>> modules/gui/macosx/playlist.m                      |    1 -
>> 16 files changed, 2175 insertions(+), 10206 deletions(-)
>> 
> 
>> -        [NSBundle loadNibNamed:@"MainMenu" owner:NSApp];
>> -        [NSBundle loadNibNamed:@"MainWindow" owner:[VLCMain sharedInstance]];
>> -
>> -        [[[VLCMain sharedInstance] mainWindow] makeKeyAndOrderFront:nil];
>> -
> 
> Hi Felix,
> 
> This is wrong and reverts 9434662c9228278ccd18fd649e71fa809745a576. As explained in the commit log already, there should be no performance improvement if you move stuff to application:willFinishLaunching.
> 
> Additionally, initialization needs to be done in OpenIntf() (there might be still missing), not moved outside. Otherwise the vout might get created before init is complete.

Can you be more precise on what you think really needs to be initialized in OpenIntf()? Note that loading the MainWindow xib currently loads VLCPlaylist, VLCMainWindow and VLCMainWindowControlsBar, which will not be the case anymore by the end of the week. Then, loading the xib will load the UI representation stored in the xib and that’s about it. This smells like a dependency magically resolved by loading some xib (which is exactly how the entire interface used to work until today).

Best regards,

Felix


More information about the vlc-devel mailing list