From: Felix Paul Kühne Date: Fri, 18 Dec 2009 07:24:17 +0000 (+0100) Subject: macosx: fixed compilation if VLM is not enabled X-Git-Tag: 1.1.0-ff~1903 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2c15069fc16c1965266f4cb789780057d3bcc70c;p=vlc macosx: fixed compilation if VLM is not enabled --- diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h index 6a1d4823a7..6e509855d6 100644 --- a/modules/gui/macosx/intf.h +++ b/modules/gui/macosx/intf.h @@ -106,7 +106,9 @@ struct intf_sys_t id o_wizard; /* VLCWizard */ id o_extended; /* VLCExtended */ id o_bookmarks; /* VLCBookmarks */ +#ifdef ENABLE_VLM id o_vlm; /* VLCVLMController */ +#endif id o_embedded_list; /* VLCEmbeddedList*/ id o_coredialogs; /* VLCCoreDialogProvider */ VLCInformation * o_info; /* VLCInformation */ @@ -119,7 +121,9 @@ struct intf_sys_t BOOL nib_bookmarks_loaded; /* bookmarks nibfile */ BOOL nib_prefs_loaded; /* preferences nibfile */ BOOL nib_info_loaded; /* information panel nibfile */ +#ifdef ENABLE_VLM BOOL nib_vlm_loaded; /* VLM Panel nibfile */ +#endif BOOL nib_coredialogs_loaded; /* CoreDialogs nibfile */ IBOutlet VLCControllerWindow * o_window; /* main window */ diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index d099e761cf..2d44438d11 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -52,7 +52,9 @@ #import "AppleRemote.h" #import "eyetv.h" #import "simple_prefs.h" +#ifdef ENABLE_VLM #import "vlm.h" +#endif #import /* for crashlog send mechanism */ #import /* for the media key support */ @@ -352,7 +354,9 @@ static VLCMain *_o_sharedMainInstance = nil; o_prefs = nil; o_open = [[VLCOpen alloc] init]; o_wizard = [[VLCWizard alloc] init]; +#ifdef ENABLE_VLM o_vlm = [[VLCVLMController alloc] init]; +#endif o_extended = nil; o_bookmarks = [[VLCBookmarks alloc] init]; o_embedded_list = [[VLCEmbeddedList alloc] init]; @@ -1445,10 +1449,12 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key ) return nil; } +#ifdef ENABLE_VLM - (id)vlm { return o_vlm; } +#endif - (id)bookmarks { @@ -2191,10 +2197,16 @@ end: - (IBAction)showVLM:(id)sender { +#ifdef ENABLE_VLM if( !nib_vlm_loaded ) nib_vlm_loaded = [NSBundle loadNibNamed:@"VLM" owner: NSApp]; [o_vlm showVLMWindow]; +#else + NSAlert *theAlert; + theAlert = [NSAlert alertWithMessageText:_NS("VLM not available") defaultButton:_NS("OK") alternateButton:nil otherButton:nil informativeTextWithFormat:_NS("The VideoLAN Manager was not enabled in this version of VLC.")]; + [theAlert runModal]; +#endif } - (IBAction)showExtended:(id)sender