Commit eda81ebf authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: implemented 'dialog-login' and cleaned up most dead code

parent b9537dd6
......@@ -120,9 +120,9 @@ EXTRA_DIST += \
extras/package/macosx/Resources/English.lproj/Update.nib/classes.nib \
extras/package/macosx/Resources/English.lproj/Update.nib/info.nib \
extras/package/macosx/Resources/English.lproj/Update.nib/keyedobjects.nib \
extras/package/macosx/Resources/English.lproj/Interaction.nib/classes.nib \
extras/package/macosx/Resources/English.lproj/Interaction.nib/info.nib \
extras/package/macosx/Resources/English.lproj/Interaction.nib/keyedobjects.nib \
extras/package/macosx/Resources/English.lproj/CoreDialogs.nib/classes.nib \
extras/package/macosx/Resources/English.lproj/CoreDialogs.nib/info.nib \
extras/package/macosx/Resources/English.lproj/CoreDialogs.nib/keyedobjects.nib \
extras/package/macosx/Resources/English.lproj/InteractionErrorPanel.nib/classes.nib \
extras/package/macosx/Resources/English.lproj/InteractionErrorPanel.nib/info.nib \
extras/package/macosx/Resources/English.lproj/InteractionErrorPanel.nib/keyedobjects.nib \
......
{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{
ACTIONS = {cancelAndClose = id; cancelDialog = id; okayAndClose = id; };
CLASS = VLCInteraction;
LANGUAGE = ObjC;
OUTLETS = {
"o_auth_cancel_btn" = id;
"o_auth_description" = id;
"o_auth_login_fld" = id;
"o_auth_login_txt" = id;
"o_auth_ok_btn" = id;
"o_auth_pw_fld" = id;
"o_auth_pw_txt" = id;
"o_auth_title" = id;
"o_auth_win" = id;
"o_input_cancel_btn" = id;
"o_input_description" = id;
"o_input_fld" = id;
"o_input_ok_btn" = id;
"o_input_title" = id;
"o_input_win" = id;
"o_prog_bar" = id;
"o_prog_cancel_btn" = id;
"o_prog_description" = id;
"o_prog_timeToGo" = id;
"o_prog_title" = id;
"o_prog_win" = id;
};
SUPERCLASS = NSObject;
},
{CLASS = VLCInteractionList; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
);
IBVersion = 1;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>97 142 356 240 0 0 1440 878 </string>
<key>IBFramework Version</key>
<string>446.1</string>
<key>IBOpenObjects</key>
<array>
<integer>55</integer>
<integer>79</integer>
<integer>5</integer>
</array>
<key>IBSystem Version</key>
<string>8J135</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBClasses</key>
<array>
<dict>
<key>CLASS</key>
<string>NSApplication</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSResponder</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>cleanupTable</key>
<string>id</string>
<key>showMessages</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCErrorInteractionPanel</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_cleanup_button</key>
<string>id</string>
<key>o_error_table</key>
<string>id</string>
<key>o_messages_btn</key>
<string>id</string>
<key>o_window</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>FirstResponder</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>NSObject</string>
<key>LANGUAGE</key>
<string>ObjC</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
{
IBClasses = (
{
CLASS = FirstResponder;
LANGUAGE = ObjC;
SUPERCLASS = NSObject;
},
{
CLASS = NSApplication;
LANGUAGE = ObjC;
SUPERCLASS = NSResponder;
},
{
CLASS = NSObject;
LANGUAGE = ObjC;
},
{
ACTIONS = {
loginDialogAction = id;
};
CLASS = VLCCoreDialogSupport;
LANGUAGE = ObjC;
OUTLETS = {
"o_auth_cancel_btn" = id;
"o_auth_description_txt" = id;
"o_auth_login_fld" = id;
"o_auth_login_txt" = id;
"o_auth_ok_btn" = id;
"o_auth_pw_fld" = id;
"o_auth_pw_txt" = id;
"o_auth_title_txt" = id;
"o_auth_win" = id;
};
SUPERCLASS = NSObject;
},
{
ACTIONS = {
cleanupTable = id;
showMessages = id;
};
CLASS = VLCErrorPanel;
LANGUAGE = ObjC;
OUTLETS = {
"o_cleanup_button" = id;
"o_error_table" = id;
"o_messages_btn" = id;
"o_window" = id;
};
SUPERCLASS = NSObject;
}
);
IBVersion = 1;
}
\ No newline at end of file
......@@ -2,18 +2,20 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>296 102 421 299 0 0 1280 778 </string>
<key>IBFramework Version</key>
<string>644</string>
<string>489.0</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../../vlc.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>6</integer>
<integer>32</integer>
</array>
<key>IBSystem Version</key>
<string>9C31</string>
<string>9G55</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
......
......@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
CC0FB34C0F8BED1100F057F7 /* CoreDialogs.nib in Resources */ = {isa = PBXBuildFile; fileRef = CC0FB34A0F8BED1100F057F7 /* CoreDialogs.nib */; };
CC402EB00E00ABBB006A4BA4 /* vlc.icns in Resources */ = {isa = PBXBuildFile; fileRef = F74F13DF02C2A53401EE194C /* vlc.icns */; };
CC402EB10E00ABBB006A4BA4 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = F74F13EA02C2A79C01EE194C /* MainMenu.nib */; };
CC402EB20E00ABBB006A4BA4 /* divx.icns in Resources */ = {isa = PBXBuildFile; fileRef = F6E4F90A02D2648B01A80112 /* divx.icns */; };
......@@ -84,7 +85,6 @@
CC402EFB0E00ABBB006A4BA4 /* skip_forward_embedded_blue.png in Resources */ = {isa = PBXBuildFile; fileRef = C2F2A704095AE51600018C74 /* skip_forward_embedded_blue.png */; };
CC402EFC0E00ABBB006A4BA4 /* skip_previous_embedded_blue.png in Resources */ = {isa = PBXBuildFile; fileRef = C2F2A705095AE51600018C74 /* skip_previous_embedded_blue.png */; };
CC402EFD0E00ABBB006A4BA4 /* Update.nib in Resources */ = {isa = PBXBuildFile; fileRef = CC26BF2A09A7A05000E94D62 /* Update.nib */; };
CC402EFE0E00ABBB006A4BA4 /* Interaction.nib in Resources */ = {isa = PBXBuildFile; fileRef = CC1B4B4B09A8CF9E0078AD2E /* Interaction.nib */; };
CC402EFF0E00ABBB006A4BA4 /* InteractionErrorPanel.nib in Resources */ = {isa = PBXBuildFile; fileRef = CC1AC1BA0A7BDA41002478C3 /* InteractionErrorPanel.nib */; };
CC402F000E00ABBB006A4BA4 /* add_embedded_blue.png in Resources */ = {isa = PBXBuildFile; fileRef = CC4ED9AC0ABE07C800CA4CC5 /* add_embedded_blue.png */; };
CC402F010E00ABBB006A4BA4 /* add_embedded.png in Resources */ = {isa = PBXBuildFile; fileRef = CC4ED9AD0ABE07C800CA4CC5 /* add_embedded.png */; };
......@@ -260,9 +260,9 @@
CC0B723A0D54F2B000448E00 /* spref_cone_Interface_64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = spref_cone_Interface_64.png; path = Resources/spref_cone_Interface_64.png; sourceTree = "<group>"; };
CC0B723B0D54F2B000448E00 /* spref_cone_Subtitles_64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = spref_cone_Subtitles_64.png; path = Resources/spref_cone_Subtitles_64.png; sourceTree = "<group>"; };
CC0B723C0D54F2B000448E00 /* spref_cone_Video_64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = spref_cone_Video_64.png; path = Resources/spref_cone_Video_64.png; sourceTree = "<group>"; };
CC0FB34B0F8BED1100F057F7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = Resources/English.lproj/CoreDialogs.nib; sourceTree = "<group>"; };
CC1941240B9C1F8400635F6B /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
CC1AC1BB0A7BDA41002478C3 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = Resources/English.lproj/InteractionErrorPanel.nib; sourceTree = "<group>"; };
CC1B4B4C09A8CF9E0078AD2E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = Resources/English.lproj/Interaction.nib; sourceTree = "<group>"; };
CC1B4C1409A8EC690078AD2E /* interaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interaction.h; path = ../../../modules/gui/macosx/interaction.h; sourceTree = "<group>"; };
CC1B4C1509A8EC690078AD2E /* interaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = interaction.m; path = ../../../modules/gui/macosx/interaction.m; sourceTree = "<group>"; };
CC1C41D00D9BAD7F002728FA /* noart.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = noart.png; path = Resources/noart.png; sourceTree = "<group>"; };
......@@ -755,6 +755,7 @@
DCF358BC077F1236007DB450 /* nibs */ = {
isa = PBXGroup;
children = (
CC0FB34A0F8BED1100F057F7 /* CoreDialogs.nib */,
CCB60A400E6E5E3F00407004 /* VLM.nib */,
CCC896B80D9AA9E8005AE59C /* MediaInfo.nib */,
DCA00AA7075F948800E6BF46 /* About.nib */,
......@@ -765,7 +766,6 @@
DC7F46EB08A183FC0027DB24 /* Extended.nib */,
DCE7BD0308A56C8B007B10AE /* Bookmarks.nib */,
CC26BF2A09A7A05000E94D62 /* Update.nib */,
CC1B4B4B09A8CF9E0078AD2E /* Interaction.nib */,
CC1AC1BA0A7BDA41002478C3 /* InteractionErrorPanel.nib */,
);
name = nibs;
......@@ -891,7 +891,6 @@
CC402EFB0E00ABBB006A4BA4 /* skip_forward_embedded_blue.png in Resources */,
CC402EFC0E00ABBB006A4BA4 /* skip_previous_embedded_blue.png in Resources */,
CC402EFD0E00ABBB006A4BA4 /* Update.nib in Resources */,
CC402EFE0E00ABBB006A4BA4 /* Interaction.nib in Resources */,
CC402EFF0E00ABBB006A4BA4 /* InteractionErrorPanel.nib in Resources */,
CC402F000E00ABBB006A4BA4 /* add_embedded_blue.png in Resources */,
CC402F010E00ABBB006A4BA4 /* add_embedded.png in Resources */,
......@@ -961,6 +960,7 @@
CCD90F4E0E87C86D0034564A /* add_schedule.png in Resources */,
CCD90F4F0E87C86D0034564A /* add_vod.png in Resources */,
CCD90F500E87C86D0034564A /* add_broadcast.png in Resources */,
CC0FB34C0F8BED1100F057F7 /* CoreDialogs.nib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -977,20 +977,20 @@
/* End PBXRezBuildPhase section */
/* Begin PBXVariantGroup section */
CC1AC1BA0A7BDA41002478C3 /* InteractionErrorPanel.nib */ = {
CC0FB34A0F8BED1100F057F7 /* CoreDialogs.nib */ = {
isa = PBXVariantGroup;
children = (
CC1AC1BB0A7BDA41002478C3 /* English */,
CC0FB34B0F8BED1100F057F7 /* English */,
);
name = InteractionErrorPanel.nib;
name = CoreDialogs.nib;
sourceTree = "<group>";
};
CC1B4B4B09A8CF9E0078AD2E /* Interaction.nib */ = {
CC1AC1BA0A7BDA41002478C3 /* InteractionErrorPanel.nib */ = {
isa = PBXVariantGroup;
children = (
CC1B4B4C09A8CF9E0078AD2E /* English */,
CC1AC1BB0A7BDA41002478C3 /* English */,
);
name = Interaction.nib;
name = InteractionErrorPanel.nib;
sourceTree = "<group>";
};
CC26BF2A09A7A05000E94D62 /* Update.nib */ = {
......
......@@ -40,7 +40,7 @@
NSMutableArray * o_errors;
NSMutableArray * o_icons;
BOOL nib_interact_errpanel_loaded;
BOOL nib_loaded;
}
- (IBAction)cleanupTable:(id)sender;
- (IBAction)showMessages:(id)sender;
......@@ -52,67 +52,40 @@
/*****************************************************************************
* VLCCoreDialogSupport interface
* VLCCoreDialogProvider interface
*****************************************************************************/
@interface VLCCoreDialogSupport : NSObject
@interface VLCCoreDialogProvider : NSObject
{
NSMutableArray *o_interaction_list;
VLCErrorPanel *o_error_panel;
}
-(void)newInteractionEvent: (NSNotification *)o_notification;
#if 0
-(void)addInteraction: (interaction_dialog_t *)p_dialog;
-(void)removeInteraction: (VLCInteraction *)p_interaction;
#endif
-(void)showFatalDialog: (NSValue *)o_value;
-(void)showQuestionDialog: (NSValue *)o_value;
-(id)getErrorPanel;
@end
/*****************************************************************************
* VLCInteraction interface
*****************************************************************************/
#if 0
@interface VLCInteraction : NSObject
{
/* progress dialogue */
IBOutlet id o_prog_bar;
IBOutlet id o_prog_cancel_btn;
IBOutlet id o_prog_description;
IBOutlet id o_prog_title;
IBOutlet id o_prog_win;
IBOutlet id o_prog_timeToGo;
/* authentication dialogue */
IBOutlet id o_auth_cancel_btn;
IBOutlet id o_auth_description;
IBOutlet id o_auth_description_txt;
IBOutlet id o_auth_login_fld;
IBOutlet id o_auth_login_txt;
IBOutlet id o_auth_ok_btn;
IBOutlet id o_auth_pw_fld;
IBOutlet id o_auth_pw_txt;
IBOutlet id o_auth_title;
IBOutlet id o_auth_title_txt;
IBOutlet id o_auth_win;
vlc_object_t * p_dialog;
intf_thread_t * p_intf;
NSProgressIndicator * o_mainIntfPgbar;
BOOL nib_interact_loaded;
/* progress dialogue */
IBOutlet id o_prog_bar;
IBOutlet id o_prog_cancel_btn;
IBOutlet id o_prog_description;
IBOutlet id o_prog_title;
IBOutlet id o_prog_win;
IBOutlet id o_prog_timeToGo;
}
+ (VLCCoreDialogProvider *)sharedInstance;
-(void)performDialogEvent: (NSNotification *)o_notification;
- (IBAction)okayAndClose:(id)sender;
- (IBAction)cancelDialog:(id)sender;
-(void)showFatalDialog: (NSValue *)o_value;
-(void)showQuestionDialog: (NSValue *)o_value;
-(void)showLoginDialog: (NSValue *)o_value;
-(IBAction)loginDialogAction:(id)sender;
-(id)initDialog: (vlc_object_t *)_p_dialog;
-(void)runDialog;
-(void)updateDialog;
-(void)hideDialog;
-(void)destroyDialog;
-(id)getErrorPanel;
@end
#endif
@end
\ No newline at end of file
This diff is collapsed.
......@@ -106,7 +106,7 @@ static void MsgCallback( msg_cb_data_t *, msg_item_t *, unsigned );
id o_bookmarks; /* VLCBookmarks */
id o_vlm; /* VLCVLMController */
id o_embedded_list; /* VLCEmbeddedList*/
id o_interaction_list; /* VLCInteractionList*/
id o_coredialogs; /* VLCCoreDialogProvider */
VLCInformation * o_info; /* VLCInformation */
#ifdef UPDATE_CHECK
id o_update; /* VLCUpdate */
......@@ -122,6 +122,7 @@ static void MsgCallback( msg_cb_data_t *, msg_item_t *, unsigned );
BOOL nib_update_loaded; /* update nibfile */
BOOL nib_info_loaded; /* information panel nibfile */
BOOL nib_vlm_loaded; /* VLM Panel nibfile */
BOOL nib_coredialogs_loaded; /* CoreDialogs nibfile */
IBOutlet VLControllerWindow * o_window; /* main window */
IBOutlet NSView * o_playlist_view; /* playlist view */
......@@ -354,7 +355,7 @@ static void MsgCallback( msg_cb_data_t *, msg_item_t *, unsigned );
- (id)getWizard;
- (id)getBookmarks;
- (id)getEmbeddedList;
- (id)getInteractionList;
- (id)getCoreDialogProvider;
- (id)getMainIntfPgbar;
- (id)getControllerWindow;
- (id)getVoutMenu;
......
......@@ -234,7 +234,7 @@ static int DialogCallback( vlc_object_t *p_this, const char *type, vlc_value_t p
NSLog( @"dialog callback triggered; type of dialogue is '%s'", type );
NSValue *o_value = [NSValue valueWithPointer:p_dialog];
[[NSNotificationCenter defaultCenter] postNotificationName: @"VLCNewCoreDialogEventNotification" object:[interface getInteractionList] userInfo:[NSDictionary dictionaryWithObjectsAndKeys: o_value, @"VLCDialogPointer", [NSString stringWithUTF8String: type], @"VLCDialogType", nil]];
[[NSNotificationCenter defaultCenter] postNotificationName: @"VLCNewCoreDialogEventNotification" object:[interface getCoreDialogProvider] userInfo:[NSDictionary dictionaryWithObjectsAndKeys: o_value, @"VLCDialogPointer", [NSString stringWithUTF8String: type], @"VLCDialogType", nil]];
[o_pool release];
return VLC_SUCCESS;
......@@ -285,7 +285,7 @@ static VLCMain *_o_sharedMainInstance = nil;
o_extended = nil;
o_bookmarks = [[VLCBookmarks alloc] init];
o_embedded_list = [[VLCEmbeddedList alloc] init];
o_interaction_list = [[VLCCoreDialogSupport alloc] init];
o_coredialogs = [[VLCCoreDialogProvider alloc] init];
o_info = [[VLCInfo alloc] init];
#ifdef UPDATE_CHECK
o_update = [[VLCUpdate alloc] init];
......@@ -463,6 +463,9 @@ static VLCMain *_o_sharedMainInstance = nil;
pl_Release( p_intf );
/* load our Core Dialogs nib */
nib_coredialogs_loaded = [NSBundle loadNibNamed:@"CoreDialogs" owner: NSApp];
/* subscribe to various interactive dialogues */
var_Create( p_intf, "dialog-fatal", VLC_VAR_ADDRESS );
var_AddCallback( p_intf, "dialog-fatal", DialogCallback, self );
......@@ -792,7 +795,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[crashLogURLConnection release];
[o_embedded_list release];
[o_interaction_list release];
[o_coredialogs release];
[o_eyetv release];
[o_img_pause_pressed release];
......@@ -1388,10 +1391,10 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key )
return nil;
}
- (id)getInteractionList
- (id)getCoreDialogProvider
{
if( o_interaction_list )
return o_interaction_list;
if( o_coredialogs )
return o_coredialogs;
return nil;
}
......@@ -2121,8 +2124,7 @@ end:
- (IBAction)showBookmarks:(id)sender
{
dialog_Question( p_intf, _("Video Settings not saved"),
_("An error occured while saving your settings via SimplePrefs."), "Yes", "No", "Cancel" );
dialog_Fatal( p_intf, "Title", "Message" );
/* we need the wizard-nib for the bookmarks's extract functionality */
if( !nib_wizard_loaded )
......@@ -2431,7 +2433,7 @@ end:
- (IBAction)viewErrorsAndWarnings:(id)sender
{
[[[self getInteractionList] getErrorPanel] showPanel];
[[[self getCoreDialogProvider] getErrorPanel] showPanel];
}
- (IBAction)showMessagesPanel:(id)sender
......
......@@ -141,7 +141,6 @@
- (IBAction)recursiveExpandNode:(id)sender;
- (IBAction)addNode:(id)sender;
- (void)addNodeThreadedly;
- (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
- (void)appendNodeArray:(NSArray*)o_array inNode:(playlist_item_t *)p_node atPos:(int)i_position enqueue:(BOOL)b_enqueue;
......
......@@ -1442,19 +1442,6 @@
- (IBAction)addNode:(id)sender
{
/* we have to create a new thread here because otherwise we would block the
* interface since the interaction-stuff and this code would run in the same
* thread */
[NSThread detachNewThreadSelector: @selector(addNodeThreadedly)
toTarget: self withObject:nil];
[self playlistUpdated];
}
- (void)addNodeThreadedly
{
NSAutoreleasePool * ourPool = [[NSAutoreleasePool alloc] init];
/* simply adds a new node to the end of the playlist */
playlist_t * p_playlist = pl_Hold( VLCIntf );
vlc_thread_set_priority( p_playlist, VLC_THREAD_PRIORITY_LOW );
......@@ -1463,11 +1450,10 @@
p_playlist->p_local_category, 0, NULL );
PL_UNLOCK;
free( psz_name );
pl_Release( VLCIntf );
[ourPool release];
}
[self playlistUpdated];
}
@end
@implementation VLCPlaylist (NSOutlineViewDataSource)
......
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