Commit d7657086 authored by David Fuhrmann's avatar David Fuhrmann

macosx: Transform AddonsManager to NSWindowController subclass

Removes singleton, fixes initialization and deletion. Renames to
AddonsWindowController.
parent 39d906ef
......@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">14B25</string>
<string key="IBDocument.InterfaceBuilderVersion">6254</string>
<string key="IBDocument.AppKitVersion">1343.16</string>
<string key="IBDocument.HIToolboxVersion">755.00</string>
<string key="IBDocument.SystemVersion">14D136</string>
<string key="IBDocument.InterfaceBuilderVersion">7702</string>
<string key="IBDocument.AppKitVersion">1347.57</string>
<string key="IBDocument.HIToolboxVersion">758.70</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">6254</string>
<string key="NS.object.0">7702</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>NSBox</string>
......@@ -40,7 +40,7 @@
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="NSCustomObject" id="1001">
<string key="NSClassName">NSObject</string>
<string key="NSClassName">AddonsWindowController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
......@@ -52,7 +52,7 @@
<int key="NSWindowStyleMask">7</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{196, 194}, {568, 316}}</string>
<int key="NSWTFlags">544736256</int>
<int key="NSWTFlags">1618478080</int>
<string key="NSWindowTitle">Window</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
......@@ -77,7 +77,7 @@
<string key="NSFrameSize">{258, 203}</string>
<reference key="NSSuperview" ref="1066761389"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="776493752"/>
<reference key="NSNextKeyView" ref="759639068"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<bool key="NSControlAllowsExpansionToolTips">YES</bool>
......@@ -189,7 +189,7 @@
</array>
<double key="NSIntercellSpacingWidth">3</double>
<double key="NSIntercellSpacingHeight">2</double>
<reference key="NSBackgroundColor" ref="286474691"/>
<reference key="NSBackgroundColor" ref="601030471"/>
<object class="NSColor" key="NSGridColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
......@@ -250,7 +250,7 @@
<object class="NSScroller" id="674809192">
<reference key="NSNextResponder" ref="1067841408"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{1, 233}, {261.7578125, 15}}</string>
<string key="NSFrame">{{1, 233}, {262, 15}}</string>
<reference key="NSSuperview" ref="1067841408"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="126651340"/>
......@@ -266,7 +266,7 @@
<string key="NSFrame">{{20, 48}, {260, 221}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1066761389"/>
<reference key="NSNextKeyView" ref="776493752"/>
<int key="NSsFlags">133682</int>
<reference key="NSVScroller" ref="759639068"/>
<reference key="NSHScroller" ref="674809192"/>
......@@ -395,6 +395,7 @@
<string key="NSFrame">{{124, 128}, {32, 32}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="326462144"/>
<string key="NSHuggingPriority">{750, 750}</string>
<int key="NSpiFlags">28686</int>
<double key="NSMaxValue">100</double>
......@@ -493,7 +494,7 @@
<string key="NSFrameSize">{239, 147}</string>
<reference key="NSSuperview" ref="631481288"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="774675501"/>
<reference key="NSNextKeyView" ref="324719597"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
<object class="NSTextContainer" key="NSTextContainer" id="797430951">
<object class="NSLayoutManager" key="NSLayoutManager">
......@@ -561,7 +562,7 @@ ZQ</bytes>
<nil key="NSTextFinder"/>
<int key="NSPreferredTextFinderStyle">1</int>
</object>
<int key="NSTVFlags">6</int>
<int key="NSTVFlags">70</int>
<string key="NSMaxSize">{463, 10000000}</string>
<string key="NSMinize">{227, 147}</string>
<nil key="NSDelegate"/>
......@@ -608,6 +609,7 @@ ZQ</bytes>
<string key="NSFrame">{{211, 0}, {16, 147}}</string>
<reference key="NSSuperview" ref="667463558"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="308859318"/>
<string key="NSReuseIdentifierKey">_NS:83</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<string key="NSControlAction">_doScroller:</string>
......@@ -639,7 +641,7 @@ ZQ</bytes>
<string key="NSFrame">{{18, 54}, {227, 147}}</string>
<reference key="NSSuperview" ref="42699324"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="631481288"/>
<reference key="NSNextKeyView" ref="774675501"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSsFlags">133264</int>
<reference key="NSVScroller" ref="324719597"/>
......@@ -715,6 +717,7 @@ ZQ</bytes>
<string key="NSFrame">{{15, 15}, {271, 32}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="383895102"/>
<string key="NSReuseIdentifierKey">_NS:610</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="627379601">
......@@ -744,147 +747,144 @@ ZQ</bytes>
<string key="NSMaxSize">{568, 338}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
<object class="NSCustomObject" id="341439621">
<string key="NSClassName">VLCAddonManager</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="162216870"/>
<reference key="destination" ref="341439621"/>
<object class="IBActionConnection" key="connection">
<string key="label">switchType:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="946926957"/>
</object>
<int key="connectionID">97</int>
<int key="connectionID">110</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="162216870"/>
<reference key="destination" ref="341439621"/>
<string key="label">_typeSwitcher</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="946926957"/>
</object>
<int key="connectionID">98</int>
<int key="connectionID">111</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_addonsTable</string>
<reference key="source" ref="341439621"/>
<reference key="source" ref="1001"/>
<reference key="destination" ref="162216870"/>
</object>
<int key="connectionID">83</int>
<int key="connectionID">114</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_author</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="934631775"/>
<string key="label">_name</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="619442065"/>
</object>
<int key="connectionID">84</int>
<int key="connectionID">115</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_description</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="355978986"/>
<string key="label">_author</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="934631775"/>
</object>
<int key="connectionID">85</int>
<int key="connectionID">116</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_localAddonsOnlyCheckbox</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="383895102"/>
<string key="label">_version</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="928729361"/>
</object>
<int key="connectionID">86</int>
<int key="connectionID">117</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_name</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="619442065"/>
<string key="label">_description</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="355978986"/>
</object>
<int key="connectionID">87</int>
<int key="connectionID">118</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_spinner</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="126651340"/>
<string key="label">_installButton</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="308859318"/>
</object>
<int key="connectionID">88</int>
<int key="connectionID">119</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_typeSwitcher</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="946926957"/>
<object class="IBActionConnection" key="connection">
<string key="label">installSelection:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="308859318"/>
</object>
<int key="connectionID">89</int>
<int key="connectionID">120</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_version</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="928729361"/>
<string key="label">_downloadCatalogButton</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="326462144"/>
</object>
<int key="connectionID">90</int>
<int key="connectionID">121</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">switchType:</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="946926957"/>
<string key="label">downloadCatalog:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="326462144"/>
</object>
<int key="connectionID">94</int>
<int key="connectionID">122</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">toggleLocalCheckbox:</string>
<reference key="source" ref="341439621"/>
<object class="IBOutletConnection" key="connection">
<string key="label">_localAddonsOnlyCheckbox</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="383895102"/>
</object>
<int key="connectionID">95</int>
<int key="connectionID">123</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">installSelection:</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="308859318"/>
<string key="label">toggleLocalCheckbox:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="383895102"/>
</object>
<int key="connectionID">103</int>
<int key="connectionID">124</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_installButton</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="308859318"/>
<string key="label">_spinner</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="126651340"/>
</object>
<int key="connectionID">104</int>
<int key="connectionID">125</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_downloadCatalogButton</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="326462144"/>
<string key="label">window</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1027075699"/>
</object>
<int key="connectionID">105</int>
<int key="connectionID">126</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">downloadCatalog:</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="326462144"/>
<object class="IBOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="162216870"/>
<reference key="destination" ref="1001"/>
</object>
<int key="connectionID">106</int>
<int key="connectionID">112</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_window</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="1027075699"/>
<string key="label">delegate</string>
<reference key="source" ref="162216870"/>
<reference key="destination" ref="1001"/>
</object>
<int key="connectionID">108</int>
<int key="connectionID">113</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
......@@ -1130,11 +1130,6 @@ ZQ</bytes>
<reference key="object" ref="774675501"/>
<reference key="parent" ref="667463558"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">82</int>
<reference key="object" ref="341439621"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">99</int>
<reference key="object" ref="308859318"/>
......@@ -1249,7 +1244,6 @@ ZQ</bytes>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="8.IBUserGuides" ref="0"/>
<boolean value="NO" key="8.showNotes"/>
<string key="82.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="9.IBNSControlSetsMaxLayoutWidthAtFirstLayoutMetadataKey"/>
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="9.IBUserGuides" ref="0"/>
......@@ -1260,13 +1254,13 @@ ZQ</bytes>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">108</int>
<int key="maxID">126</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">VLCAddonManager</string>
<string key="superclassName">NSObject</string>
<string key="className">AddonsWindowController</string>
<string key="superclassName">NSWindowController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="downloadCatalog:">id</string>
<string key="installSelection:">id</string>
......@@ -1307,7 +1301,6 @@ ZQ</bytes>
<string key="_spinner">NSProgressIndicator</string>
<string key="_typeSwitcher">NSPopUpButton</string>
<string key="_version">NSTextField</string>
<string key="_window">NSWindow</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="_addonsTable">
......@@ -1350,18 +1343,14 @@ ZQ</bytes>
<string key="name">_version</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo" key="_window">
<string key="name">_window</string>
<string key="candidateClassName">NSWindow</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../../modules/gui/macosx/AddonManager.h</string>
<string key="minorKey">../../../../modules/gui/macosx/AddonsWindowController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLCAddonManager</string>
<string key="className">AddonsWindowController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="downloadCatalog:">id</string>
<string key="installSelection:">id</string>
......@@ -1393,7 +1382,7 @@ ZQ</bytes>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../../modules/gui/macosx/AddonManager.m</string>
<string key="minorKey">../../../../modules/gui/macosx/AddonsWindowController.m</string>
</object>
</object>
</array>
......@@ -1606,6 +1595,25 @@ ZQ</bytes>
<string key="minorKey">AppKit.framework/Headers/NSWindow.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSWindowController</string>
<string key="superclassName">NSResponder</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">showWindow:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">showWindow:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">showWindow:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSWindowController.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
......
......@@ -347,8 +347,8 @@
1CCB5F521A62A724004C3E90 /* about.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EE1AFA0044465080059A3A7 /* about.m */; };
1CCB5F531A62A724004C3E90 /* AddonListDataSource.h in Sources */ = {isa = PBXBuildFile; fileRef = 7DF0435E1972E26A0022B534 /* AddonListDataSource.h */; };
1CCB5F541A62A724004C3E90 /* AddonListDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF0435F1972E26A0022B534 /* AddonListDataSource.m */; };
1CCB5F551A62A724004C3E90 /* AddonManager.h in Sources */ = {isa = PBXBuildFile; fileRef = 7DB65D5218ABD6380053B874 /* AddonManager.h */; };
1CCB5F561A62A724004C3E90 /* AddonManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DB65D5318ABD6380053B874 /* AddonManager.m */; };
1CCB5F551A62A724004C3E90 /* AddonsWindowController.h in Sources */ = {isa = PBXBuildFile; fileRef = 7DB65D5218ABD6380053B874 /* AddonsWindowController.h */; };
1CCB5F561A62A724004C3E90 /* AddonsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DB65D5318ABD6380053B874 /* AddonsWindowController.m */; };
1CCB5F571A62A724004C3E90 /* applescript.h in Sources */ = {isa = PBXBuildFile; fileRef = 8E6BC6F6041643860059A3A7 /* applescript.h */; };
1CCB5F581A62A724004C3E90 /* applescript.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E6BC6F7041643860059A3A7 /* applescript.m */; };
1CCB5F591A62A724004C3E90 /* AudioEffects.h in Sources */ = {isa = PBXBuildFile; fileRef = CC5560231365CDC700D54038 /* AudioEffects.h */; };
......@@ -1232,8 +1232,8 @@
7D8BB0B61830311300FAE9B7 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/DebugMessageVisualizer.xib; sourceTree = "<group>"; };
7D8BB0B91830367200FAE9B7 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/PlaylistMenu.xib; sourceTree = "<group>"; };
7D8BB0BF1830393300FAE9B7 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/MainWindow.xib; sourceTree = "<group>"; };
7DB65D5218ABD6380053B874 /* AddonManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AddonManager.h; path = ../../../modules/gui/macosx/AddonManager.h; sourceTree = SOURCE_ROOT; };
7DB65D5318ABD6380053B874 /* AddonManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AddonManager.m; path = ../../../modules/gui/macosx/AddonManager.m; sourceTree = SOURCE_ROOT; };
7DB65D5218ABD6380053B874 /* AddonsWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AddonsWindowController.h; path = ../../../modules/gui/macosx/AddonsWindowController.h; sourceTree = SOURCE_ROOT; };
7DB65D5318ABD6380053B874 /* AddonsWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AddonsWindowController.m; path = ../../../modules/gui/macosx/AddonsWindowController.m; sourceTree = SOURCE_ROOT; };
7DB65D5518ABD6490053B874 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/AddonManager.xib; sourceTree = "<group>"; };
7DE88F291831396A00CD9DA2 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/PlaylistAccessoryView.xib; sourceTree = "<group>"; };
7DF0435E1972E26A0022B534 /* AddonListDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AddonListDataSource.h; path = ../../../modules/gui/macosx/AddonListDataSource.h; sourceTree = SOURCE_ROOT; };
......@@ -1811,8 +1811,8 @@
8EE1AFA0044465080059A3A7 /* about.m */,
7DF0435E1972E26A0022B534 /* AddonListDataSource.h */,
7DF0435F1972E26A0022B534 /* AddonListDataSource.m */,
7DB65D5218ABD6380053B874 /* AddonManager.h */,
7DB65D5318ABD6380053B874 /* AddonManager.m */,
7DB65D5218ABD6380053B874 /* AddonsWindowController.h */,
7DB65D5318ABD6380053B874 /* AddonsWindowController.m */,
8E6BC6F6041643860059A3A7 /* applescript.h */,
8E6BC6F7041643860059A3A7 /* applescript.m */,
CC5560231365CDC700D54038 /* AudioEffects.h */,
......@@ -3745,8 +3745,8 @@
1CCB5F521A62A724004C3E90 /* about.m in Sources */,
1CCB5F531A62A724004C3E90 /* AddonListDataSource.h in Sources */,
1CCB5F541A62A724004C3E90 /* AddonListDataSource.m in Sources */,
1CCB5F551A62A724004C3E90 /* AddonManager.h in Sources */,
1CCB5F561A62A724004C3E90 /* AddonManager.m in Sources */,
1CCB5F551A62A724004C3E90 /* AddonsWindowController.h in Sources */,
1CCB5F561A62A724004C3E90 /* AddonsWindowController.m in Sources */,
1CCB5F571A62A724004C3E90 /* applescript.h in Sources */,
1CCB5F581A62A724004C3E90 /* applescript.m in Sources */,
1CCB5F591A62A724004C3E90 /* AudioEffects.h in Sources */,
......
......@@ -21,9 +21,8 @@
#import <Cocoa/Cocoa.h>
@interface VLCAddonManager : NSObject <NSTableViewDataSource, NSTableViewDelegate>
@interface AddonsWindowController : NSWindowController <NSTableViewDataSource, NSTableViewDelegate>
{
IBOutlet NSWindow *_window;
IBOutlet NSPopUpButton *_typeSwitcher;
IBOutlet NSButton *_localAddonsOnlyCheckbox;
IBOutlet NSButton *_downloadCatalogButton;
......@@ -37,9 +36,7 @@
IBOutlet NSButton *_installButton;
}
+ (VLCAddonManager *)sharedInstance;
- (void)showWindow;
- (IBAction)switchType:(id)sender;
- (IBAction)toggleLocalCheckbox:(id)sender;
- (IBAction)downloadCatalog:(id)sender;
......
......@@ -23,12 +23,12 @@
#import <vlc_events.h>
#import <vlc_addons.h>
#import "AddonManager.h"
#import "AddonsWindowController.h"
#import "intf.h"
#import "MainWindow.h"
#import "AddonListDataSource.h"
@interface VLCAddonManager ()
@interface AddonsWindowController()
{
addons_manager_t *_manager;
NSMutableArray *_addons;
......@@ -39,55 +39,50 @@
- (void)addAddon:(NSValue *)o_value;
- (void)discoveryEnded;
- (void)addonChanged:(NSValue *)o_value;
@end
static void addonsEventsCallback( const vlc_event_t *event, void *data )
{
AddonsWindowController *controller = data;
@autoreleasepool {
if (event->type == vlc_AddonFound)
[[VLCAddonManager sharedInstance] performSelectorOnMainThread:@selector(addAddon:) withObject:[NSValue valueWithPointer:event->u.addon_generic_event.p_entry] waitUntilDone:NO];
[controller performSelectorOnMainThread:@selector(addAddon:) withObject:[NSValue valueWithPointer:event->u.addon_generic_event.p_entry] waitUntilDone:NO];
else if (event->type == vlc_AddonsDiscoveryEnded)
[[VLCAddonManager sharedInstance] performSelectorOnMainThread:@selector(discoveryEnded) withObject:nil waitUntilDone:NO];
[controller performSelectorOnMainThread:@selector(discoveryEnded) withObject:nil waitUntilDone:NO];
else if (event->type == vlc_AddonChanged)
[[VLCAddonManager sharedInstance] performSelectorOnMainThread:@selector(addonChanged:) withObject:[NSValue valueWithPointer:event->u.addon_generic_event.p_entry] waitUntilDone:NO];
[controller performSelectorOnMainThread:@selector(addonChanged:) withObject:[NSValue valueWithPointer:event->u.addon_generic_event.p_entry] waitUntilDone:NO];
}
}
@implementation VLCAddonManager
static VLCAddonManager *_o_sharedInstance = nil;
+ (VLCAddonManager *)sharedInstance
{
return _o_sharedInstance ? _o_sharedInstance : [[self alloc] init];
}
@implementation AddonsWindowController
#pragma mark - object handling
- (id)init
{
if (_o_sharedInstance)
[self dealloc];
else {
_o_sharedInstance = [super init];
self = [super initWithWindowNibName:@"AddonManager"];
if (self) {
[self setWindowFrameAutosaveName:@"addons"];
_addons = [[NSMutableArray alloc] init];
}
return _o_sharedInstance;
return self;
}
- (void)dealloc
{
[_addons release];
[_displayedAddons release];
if ( _manager )
if (_manager)
addons_manager_Delete(_manager);
[super dealloc];
}
#pragma mark - UI handling
- (void)awakeFromNib
- (void)windowDidLoad
{
[_typeSwitcher removeAllItems];
[_typeSwitcher addItemWithTitle:_NS("All")];
......@@ -118,8 +113,7 @@ static VLCAddonManager *_o_sharedInstance = nil;
[_author setStringValue:@""];
[_version setStringValue:@""];
[_description setString:@""];
[_window setTitle:_NS("Addons Manager")];
[_window setReleasedWhenClosed:NO];
[[self window] setTitle:_NS("Addons Manager")];
[[[_addonsTable tableColumnWithIdentifier:@"installed"] headerCell] setStringValue:_NS("Installed")];
[[[_addonsTable tableColumnWithIdentifier:@"name"] headerCell] setStringValue:_NS("Name")];
......@@ -138,11 +132,6 @@ static VLCAddonManager *_o_sharedInstance = nil;
[self _findInstalled];
}
- (void)showWindow
{
[_window makeKeyAndOrderFront:nil];
}
- (IBAction)switchType:(id)sender
{
[self _refactorDataModel];
......
......@@ -26,6 +26,7 @@
#import <vlc_interface.h>
@class AboutWindowController;
@class AddonsWindowController;
@class HelpWindowController;
@interface VLCMainMenu : NSObject
......@@ -37,7 +38,6 @@
BOOL b_nib_tracksynchro_loaded;
BOOL b_nib_bookmarks_loaded;
BOOL b_nib_convertandsave_loaded;
BOOL b_nib_addonmanager_loaded;
AboutWindowController *o_about;
HelpWindowController *o_helpWin;
......@@ -46,7 +46,7 @@
id o_trackSynchronization; /* VLCTrackSynchronization */
id o_bookmarks; /* VLCBookmarks */
id o_convertandsave; /* VLCConvertAndSave */
id o_addonManager; /* VLCAddonManager */
AddonsWindowController *o_addonsController;
id o_extMgr; /* Extensions Manager */
......
......@@ -47,7 +47,7 @@
#import "ExtensionsManager.h"
#import "ConvertAndSave.h"
#import "DebugMessageVisualizer.h"
#import "AddonManager.h"
#import "AddonsWindowController.h"
@implementation VLCMainMenu
static VLCMainMenu *_o_sharedInstance = nil;
......@@ -97,6 +97,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
[o_about release];
[o_helpWin release];
[o_addonsController release];
if (b_nib_videoeffects_loaded)
[o_videoeffects release];
......@@ -1172,13 +1174,10 @@ static VLCMainMenu *_o_sharedInstance = nil;
- (IBAction)openAddonManager:(id)sender
{
if (!o_addonManager)
o_addonManager = [[VLCAddonManager alloc] init];
if (!b_nib_addonmanager_loaded)
b_nib_addonmanager_loaded = [NSBundle loadNibNamed:@"AddonManager" owner:NSApp];
if (!o_addonsController)
o_addonsController = [[AddonsWindowController alloc] init];
[o_addonManager showWindow];
[o_addonsController showWindow:self];
}
- (IBAction)showMessagesPanel:(id)showMessagesPanel
......
......@@ -20,8 +20,8 @@ SOURCES_macosx = \
ExtensionsManager.m \
ExtensionsDialogProvider.h \
ExtensionsDialogProvider.m \
AddonManager.h \
AddonManager.m \
AddonsWindowController.h \
AddonsWindowController.m \