Commit 7c12d707 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* replaced all NSLog-calls by msg_***

* changed the button order in DIALOG_YES_NO_CANCEL. (the order is now: Cancel, No, Yes; which is more Mac-like IMO, but feel free to change it again)
parent 2f684f47
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
@interface VLCInteraction : NSObject @interface VLCInteraction : NSObject
{ {
interaction_dialog_t *p_dialog; interaction_dialog_t *p_dialog;
intf_thread_t * p_intf;
} }
-(id)initDialog: (interaction_dialog_t *)_p_dialog; -(id)initDialog: (interaction_dialog_t *)_p_dialog;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*****************************************************************************/ *****************************************************************************/
#include "intf.h" #include "intf.h"
#import <interaction.h> #import "interaction.h"
/***************************************************************************** /*****************************************************************************
* VLCInteractionList implementation * VLCInteractionList implementation
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
-(id)initDialog: (interaction_dialog_t *)_p_dialog -(id)initDialog: (interaction_dialog_t *)_p_dialog
{ {
p_intf = VLCIntf;
[super init]; [super init];
p_dialog = _p_dialog; p_dialog = _p_dialog;
return self; return self;
...@@ -111,7 +112,7 @@ ...@@ -111,7 +112,7 @@
int i = 0; int i = 0;
id o_window = NULL; id o_window = NULL;
if( !p_dialog ) if( !p_dialog )
NSLog( @"serious issue" ); msg_Err( p_intf, "serious issue (p_dialog == nil)" );
NSString *o_title = [NSString stringWithUTF8String:p_dialog->psz_title ? p_dialog->psz_title : "title"]; NSString *o_title = [NSString stringWithUTF8String:p_dialog->psz_title ? p_dialog->psz_title : "title"];
NSString *o_description = [NSString stringWithUTF8String:p_dialog->psz_description ? p_dialog->psz_description : ""]; NSString *o_description = [NSString stringWithUTF8String:p_dialog->psz_description ? p_dialog->psz_description : ""];
...@@ -136,20 +137,20 @@ ...@@ -136,20 +137,20 @@
o_window = [NSApp mainWindow]; o_window = [NSApp mainWindow];
} }
NSLog( @"Title: %@", o_title ); msg_Dbg( p_intf, "Title: %s", [o_title UTF8String] );
NSLog( @"Description: %@", o_description ); msg_Dbg( p_intf, "Description: %s", [o_description UTF8String] );
if( p_dialog->i_id == DIALOG_ERRORS ) if( p_dialog->i_id == DIALOG_ERRORS )
{ {
for( i = 0; i < p_dialog->i_widgets; i++ ) for( i = 0; i < p_dialog->i_widgets; i++ )
{ {
NSLog( @"Error: %@", [NSString stringWithUTF8String: p_dialog->pp_widgets[i]->psz_text] ); msg_Err( p_intf, "Error: %s", p_dialog->pp_widgets[i]->psz_text );
} }
} }
else else
{ {
for( i = 0; i < p_dialog->i_widgets; i++ ) for( i = 0; i < p_dialog->i_widgets; i++ )
{ {
NSLog( @"widget: %@", [NSString stringWithUTF8String: p_dialog->pp_widgets[i]->psz_text] ); msg_Dbg( p_intf, "widget: %s", p_dialog->pp_widgets[i]->psz_text );
o_description = [o_description stringByAppendingString: o_description = [o_description stringByAppendingString:
[NSString stringWithUTF8String: p_dialog->pp_widgets[i]->psz_text]]; [NSString stringWithUTF8String: p_dialog->pp_widgets[i]->psz_text]];
} }
...@@ -160,11 +161,11 @@ ...@@ -160,11 +161,11 @@
} }
else if( p_dialog->i_flags & DIALOG_YES_NO_CANCEL ) else if( p_dialog->i_flags & DIALOG_YES_NO_CANCEL )
{ {
NSBeginInformationalAlertSheet( o_title, @"Yes" , @"No", @"Cancel", o_window, self, NSBeginInformationalAlertSheet( o_title, @"Yes", @"Cancel", @"No", o_window, self,
@selector(sheetDidEnd: returnCode: contextInfo:), NULL, nil, o_description ); @selector(sheetDidEnd: returnCode: contextInfo:), NULL, nil, o_description );
} }
else else
NSLog( @"not implemented yet" ); msg_Dbg( p_intf, "requested dialog type not implemented yet" );
} }
} }
...@@ -194,17 +195,17 @@ ...@@ -194,17 +195,17 @@
-(void)updateDialog -(void)updateDialog
{ {
NSLog( @"update event" ); msg_Dbg( p_intf, "update event" );
} }
-(void)hideDialog -(void)hideDialog
{ {
NSLog( @"hide event" ); msg_Dbg( p_intf, "hide event" );
} }
-(void)destroyDialog -(void)destroyDialog
{ {
NSLog( @"destroy event" ); msg_Dbg( p_intf, "destroy event" );
} }
-(void)dealloc -(void)dealloc
......
Markdown is supported
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