From: Benjamin Pracht Date: Sun, 24 Jul 2005 12:54:08 +0000 (+0000) Subject: Also update the wizard playlist on item addition and deletion. This prevent VLC to... X-Git-Tag: 0.8.4~1176 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=54ee50f3519d3c95ca4c8682067569fe9e74e982;p=vlc Also update the wizard playlist on item addition and deletion. This prevent VLC to crash upon item deletion with the wizard open. --- diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h index 3ef39f1faf..a0dcff6d88 100644 --- a/modules/gui/macosx/intf.h +++ b/modules/gui/macosx/intf.h @@ -261,6 +261,7 @@ struct intf_sys_t - (id)getControls; - (id)getPlaylist; - (id)getInfo; +- (id)getWizard; - (void)terminate; - (NSString *)localizedString:(char *)psz; - (char *)delocalizeString:(NSString *)psz; diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index fa33b2283d..7257f74c96 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -764,7 +764,16 @@ static VLCMain *_o_sharedMainInstance = nil; { return o_info; } - return nil; + return nil; +} + +- (id)getWizard +{ + if ( o_wizard ) + { + return o_wizard; + } + return nil; } - (void)manage diff --git a/modules/gui/macosx/playlist.h b/modules/gui/macosx/playlist.h index 33896febfa..768c22a92f 100644 --- a/modules/gui/macosx/playlist.h +++ b/modules/gui/macosx/playlist.h @@ -67,6 +67,7 @@ @interface VLCPlaylist : VLCPlaylistCommon { IBOutlet id o_controller; + IBOutlet id o_playlist_wizard; IBOutlet id o_btn_playlist; IBOutlet id o_playlist_view; diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index d0629203bb..2711930d0d 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -335,7 +335,12 @@ - (IBAction)reloadOutlineView { - [o_outline_view reloadData]; + /* Only reload the outlineview if the wizard window is open since this can + be quite long on big playlists */ + if( [[o_outline_view window] isVisible] ) + { + [o_outline_view reloadData]; + } } @end @@ -512,6 +517,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ // TODO Find a way to keep the dict size to a minimum //[o_outline_dict removeAllObjects]; [o_outline_view reloadData]; + [[[[VLCMain sharedInstance] getWizard] getPlaylistWizard] reloadOutlineView]; } - (void)playModeUpdated diff --git a/modules/gui/macosx/wizard.h b/modules/gui/macosx/wizard.h index 0f5db0ced7..c2e794956d 100644 --- a/modules/gui/macosx/wizard.h +++ b/modules/gui/macosx/wizard.h @@ -171,4 +171,6 @@ - (void)showSummary; - (void)resetWizard; - (void)createOpts; +- (id)getPlaylistWizard; + @end diff --git a/modules/gui/macosx/wizard.m b/modules/gui/macosx/wizard.m index 745853457d..6e4ed9e4f7 100644 --- a/modules/gui/macosx/wizard.m +++ b/modules/gui/macosx/wizard.m @@ -470,6 +470,11 @@ static VLCWizard *_o_sharedInstance = nil; [o_wizard_window close]; } +- (id)getPlaylistWizard +{ + return o_playlist_wizard; +} + - (IBAction)nextTab:(id)sender { if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: @"Hello"])