[vlc-devel] commit: macosx: Fix toolbar usage in simple_prefs, and fix a double release on toolbar. (Pierre d'Herbemont )

git version control git at videolan.org
Thu Aug 14 18:39:54 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Thu Aug 14 18:35:27 2008 +0200| [a251a03cbfcf9d7ecd555fb82f0e35b8077a815b] | committer: Pierre d'Herbemont 

macosx: Fix toolbar usage in simple_prefs, and fix a double release on toolbar.

Fix a crash when exiting with simple pref open.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a251a03cbfcf9d7ecd555fb82f0e35b8077a815b
---

 modules/gui/macosx/simple_prefs.h |    1 -
 modules/gui/macosx/simple_prefs.m |    7 +++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/simple_prefs.h b/modules/gui/macosx/simple_prefs.h
index b37adcb..20c0918 100644
--- a/modules/gui/macosx/simple_prefs.h
+++ b/modules/gui/macosx/simple_prefs.h
@@ -150,7 +150,6 @@
     BOOL b_hotkeyChanged;
     id o_currentlyShownCategoryView;
 
-    NSToolbar *o_sprefs_toolbar;
     NSOpenPanel *o_selectFolderPanel;
     NSArray *o_hotkeyDescriptions;
     NSArray *o_hotkeysNonUseableKeys;
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 7a388f3..31aa5ab 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -59,7 +59,6 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
 - (void)dealloc
 {
     [o_currentlyShownCategoryView release];
-    [o_sprefs_toolbar release];
 
     [o_hotkeySettings release];
     [o_hotkeyDescriptions release];
@@ -96,7 +95,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
     [self initStrings];
     
     /* setup the toolbar */
-    o_sprefs_toolbar = [[[NSToolbar alloc] initWithIdentifier: VLCSPrefsToolbarIdentifier] autorelease];
+    NSToolbar * o_sprefs_toolbar = [[[NSToolbar alloc] initWithIdentifier: VLCSPrefsToolbarIdentifier] autorelease];
     [o_sprefs_toolbar setAllowsUserCustomization: NO];
     [o_sprefs_toolbar setAutosavesConfiguration: NO];
     [o_sprefs_toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
@@ -596,9 +595,9 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
 - (void)showSimplePrefs
 {
     /* we want to show the interface settings, if no category was chosen */
-    if( [o_sprefs_toolbar selectedItemIdentifier] == nil )
+    if( [[o_sprefs_win toolbar] selectedItemIdentifier] == nil )
     {
-        [o_sprefs_toolbar setSelectedItemIdentifier: VLCIntfSettingToolbarIdentifier];
+        [[o_sprefs_win toolbar] setSelectedItemIdentifier: VLCIntfSettingToolbarIdentifier];
         [self showInterfaceSettings];
     }
     




More information about the vlc-devel mailing list