Commit a251a03c authored by Pierre d'Herbemont's avatar 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.
parent bc169be4
......@@ -150,7 +150,6 @@
BOOL b_hotkeyChanged;
id o_currentlyShownCategoryView;
NSToolbar *o_sprefs_toolbar;
NSOpenPanel *o_selectFolderPanel;
NSArray *o_hotkeyDescriptions;
NSArray *o_hotkeysNonUseableKeys;
......
......@@ -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];
}
......
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