Commit 77fbebca authored by David Fuhrmann's avatar David Fuhrmann

macosx: addons manager: restructure UI and fix some problems

- remove the + and - buttons, and add a single install button
  instead. Current implementation of uninstall / install has a
  toggle behaviour, so having two buttons was misleading.
- add a fetch button, to load the online repository on request only,
  as done in the qt interface.
parent 13b25f22
......@@ -2,10 +2,10 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">12F45</string>
<string key="IBDocument.SystemVersion">13D65</string>
<string key="IBDocument.InterfaceBuilderVersion">851</string>
<string key="IBDocument.AppKitVersion">1187.40</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<string key="IBDocument.AppKitVersion">1265.20</string>
<string key="IBDocument.HIToolboxVersion">698.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">851</string>
......@@ -56,7 +56,7 @@
<object class="NSTableView" id="162216870">
<reference key="NSNextResponder" ref="1066761389"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{278, 231}</string>
<string key="NSFrameSize">{258, 203}</string>
<reference key="NSSuperview" ref="1066761389"/>
<reference key="NSNextKeyView" ref="776493752"/>
<bool key="NSEnabled">YES</bool>
......@@ -65,14 +65,14 @@
<object class="NSTableHeaderView" key="NSHeaderView" id="569410700">
<reference key="NSNextResponder" ref="776493752"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{278, 17}</string>
<string key="NSFrameSize">{258, 17}</string>
<reference key="NSSuperview" ref="776493752"/>
<reference key="NSNextKeyView" ref="1066761389"/>
<reference key="NSTableView" ref="162216870"/>
</object>
<object class="_NSCornerView" key="NSCornerView">
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrameSize">{15, 20}</string>
</object>
<array class="NSMutableArray" key="NSTableColumns">
......@@ -139,7 +139,7 @@
</object>
<object class="NSTableColumn" id="208639819">
<string key="NSIdentifier">name</string>
<double key="NSWidth">212.26953125</double>
<double key="NSWidth">191.76953125</double>
<double key="NSMinWidth">40</double>
<double key="NSMaxWidth">1000</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
......@@ -191,7 +191,7 @@
<int key="NSTableViewGroupRowStyle">1</int>
</object>
</array>
<string key="NSFrame">{{1, 17}, {278, 231}}</string>
<string key="NSFrame">{{1, 17}, {258, 203}}</string>
<reference key="NSSuperview" ref="1067841408"/>
<reference key="NSNextKeyView" ref="162216870"/>
<reference key="NSDocView" ref="162216870"/>
......@@ -204,36 +204,38 @@
<array class="NSMutableArray" key="NSSubviews">
<reference ref="569410700"/>
</array>
<string key="NSFrame">{{1, 0}, {278, 17}}</string>
<string key="NSFrame">{{1, 0}, {258, 17}}</string>
<reference key="NSSuperview" ref="1067841408"/>
<reference key="NSNextKeyView" ref="569410700"/>
<reference key="NSDocView" ref="569410700"/>
<reference key="NSBGColor" ref="601030471"/>
<int key="NScvFlags">4</int>
</object>
<object class="NSScroller" id="674809192">
<object class="NSScroller" id="759639068">
<reference key="NSNextResponder" ref="1067841408"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{1, 232}, {278, 16}}</string>
<string key="NSFrame">{{224, 17}, {15, 102}}</string>
<reference key="NSSuperview" ref="1067841408"/>
<reference key="NSNextKeyView" ref="126651340"/>
<reference key="NSNextKeyView" ref="674809192"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="1067841408"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.93506493506493504</double>
</object>
<object class="NSScroller" id="759639068">
<object class="NSScroller" id="674809192">
<reference key="NSNextResponder" ref="1067841408"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{224, 17}, {15, 102}}</string>
<string key="NSFrame">{{1, 233}, {261.7578125, 15}}</string>
<reference key="NSSuperview" ref="1067841408"/>
<reference key="NSNextKeyView" ref="674809192"/>
<reference key="NSNextKeyView" ref="126651340"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="1067841408"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.99809885931558939</double>
</object>
</array>
<string key="NSFrame">{{0, 20}, {280, 249}}</string>
<string key="NSFrame">{{20, 48}, {260, 221}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSNextKeyView" ref="1066761389"/>
<int key="NSsFlags">133682</int>
......@@ -249,7 +251,7 @@
<object class="NSPopUpButton" id="946926957">
<reference key="NSNextResponder" ref="868374226"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 279}, {245, 26}}</string>
<string key="NSFrame">{{18, 279}, {265, 26}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSNextKeyView" ref="1067841408"/>
<bool key="NSEnabled">YES</bool>
......@@ -329,16 +331,16 @@
</object>
<object class="NSButton" id="383895102">
<reference key="NSNextResponder" ref="868374226"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{68, 0}, {210, 20}}</string>
<int key="NSvFlags">-2147483380</int>
<string key="NSFrame">{{18, 22}, {210, 20}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSNextKeyView" ref="217361644"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="634048922">
<int key="NSCellFlags">-2080374784</int>
<int key="NSCellFlags2">131072</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Check</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSSupport" ref="519993212"/>
<reference key="NSControlView" ref="383895102"/>
<int key="NSButtonFlags">1211912448</int>
<int key="NSButtonFlags2">2</int>
......@@ -361,92 +363,11 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{124, 128}, {32, 32}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSNextKeyView" ref="1019598407"/>
<reference key="NSNextKeyView"/>
<string key="NSHuggingPriority">{750, 750}</string>
<int key="NSpiFlags">28686</int>
<double key="NSMaxValue">100</double>
</object>
<object class="NSButton" id="1019598407">
<reference key="NSNextResponder" ref="868374226"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{0, -1}, {21, 23}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSNextKeyView" ref="5143301"/>
<string key="NSHuggingPriority">{250, 750}</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="522742576">
<int key="NSCellFlags">-2080374784</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="519993212"/>
<reference key="NSControlView" ref="1019598407"/>
<int key="NSButtonFlags">-2033434624</int>
<int key="NSButtonFlags2">162</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSRefreshTemplate</string>
</object>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="5143301">
<reference key="NSNextResponder" ref="868374226"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{21, -1}, {21, 23}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSNextKeyView" ref="861360291"/>
<string key="NSHuggingPriority">{250, 750}</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1030989726">
<int key="NSCellFlags">-2080374784</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="519993212"/>
<reference key="NSControlView" ref="5143301"/>
<int key="NSButtonFlags">-2033434624</int>
<int key="NSButtonFlags2">162</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSAddTemplate</string>
</object>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="861360291">
<reference key="NSNextResponder" ref="868374226"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{42, -1}, {21, 23}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSNextKeyView" ref="383895102"/>
<string key="NSHuggingPriority">{250, 750}</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="507398582">
<int key="NSCellFlags">-2080374784</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="519993212"/>
<reference key="NSControlView" ref="861360291"/>
<int key="NSButtonFlags">-2033434624</int>
<int key="NSButtonFlags2">162</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSRemoveTemplate</string>
</object>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSBox" id="217361644">
<reference key="NSNextResponder" ref="868374226"/>
<int key="NSvFlags">12</int>
......@@ -458,7 +379,7 @@
<object class="NSTextField" id="619442065">
<reference key="NSNextResponder" ref="42699324"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 259}, {254, 17}}</string>
<string key="NSFrame">{{15, 259}, {233.41796875, 17}}</string>
<reference key="NSSuperview" ref="42699324"/>
<reference key="NSNextKeyView" ref="934631775"/>
<string key="NSHuggingPriority">{251, 750}</string>
......@@ -482,11 +403,12 @@
<reference key="NSTextColor" ref="671097713"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSTextField" id="934631775">
<reference key="NSNextResponder" ref="42699324"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 234}, {254, 17}}</string>
<string key="NSFrame">{{15, 234}, {233.41796875, 17}}</string>
<reference key="NSSuperview" ref="42699324"/>
<reference key="NSNextKeyView" ref="928729361"/>
<string key="NSHuggingPriority">{251, 750}</string>
......@@ -501,11 +423,12 @@
<reference key="NSTextColor" ref="671097713"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSTextField" id="928729361">
<reference key="NSNextResponder" ref="42699324"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 209}, {254, 17}}</string>
<string key="NSFrame">{{15, 209}, {233.41796875, 17}}</string>
<reference key="NSSuperview" ref="42699324"/>
<reference key="NSNextKeyView" ref="667463558"/>
<string key="NSHuggingPriority">{251, 750}</string>
......@@ -520,6 +443,7 @@
<reference key="NSTextColor" ref="671097713"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSScrollView" id="667463558">
<reference key="NSNextResponder" ref="42699324"/>
......@@ -532,7 +456,7 @@
<object class="NSTextView" id="355978986">
<reference key="NSNextResponder" ref="631481288"/>
<int key="NSvFlags">2322</int>
<string key="NSFrameSize">{254, 187}</string>
<string key="NSFrameSize">{239, 147}</string>
<reference key="NSSuperview" ref="631481288"/>
<reference key="NSNextKeyView" ref="774675501"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
......@@ -601,7 +525,7 @@ ZQ</bytes>
<nil key="NSDelegate"/>
</object>
<reference key="NSTextView" ref="355978986"/>
<double key="NSWidth">254</double>
<double key="NSWidth">239</double>
<int key="NSTCFlags">1</int>
</object>
<object class="NSTextViewSharedData" key="NSSharedData">
......@@ -641,10 +565,12 @@ ZQ</bytes>
</object>
<int key="NSTVFlags">6</int>
<string key="NSMaxSize">{463, 10000000}</string>
<string key="NSMinize">{227.5, 147}</string>
<nil key="NSDelegate"/>
</object>
</array>
<string key="NSFrameSize">{254, 187}</string>
<string key="NSFrameSize">{227.5, 147}</string>
<string key="NSBounds">{{5, 0}, {227.5, 147}}</string>
<reference key="NSSuperview" ref="667463558"/>
<reference key="NSNextKeyView" ref="355978986"/>
<string key="NSReuseIdentifierKey">_NS:11</string>
......@@ -679,7 +605,7 @@ ZQ</bytes>
<object class="NSScroller" id="324719597">
<reference key="NSNextResponder" ref="667463558"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{238, 0}, {16, 187}}</string>
<string key="NSFrame">{{211.41796875, 0}, {16, 147}}</string>
<reference key="NSSuperview" ref="667463558"/>
<string key="NSReuseIdentifierKey">_NS:83</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
......@@ -695,6 +621,7 @@ ZQ</bytes>
<reference key="NSSuperview" ref="667463558"/>
<reference key="NSNextKeyView" ref="631481288"/>
<string key="NSReuseIdentifierKey">_NS:33</string>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="667463558"/>
......@@ -703,11 +630,11 @@ ZQ</bytes>
<double key="NSPercent">0.94565218687057495</double>
</object>
</array>
<string key="NSFrame">{{12, 14}, {254, 187}}</string>
<string key="NSFrame">{{18, 54}, {227.41796875, 147}}</string>
<reference key="NSSuperview" ref="42699324"/>
<reference key="NSNextKeyView" ref="631481288"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSsFlags">133136</int>
<int key="NSsFlags">133264</int>
<reference key="NSVScroller" ref="324719597"/>
<reference key="NSHScroller" ref="774675501"/>
<reference key="NSContentView" ref="631481288"/>
......@@ -715,13 +642,36 @@ ZQ</bytes>
<double key="NSMaxMagnification">4</double>
<double key="NSMagnification">1</double>
</object>
<object class="NSButton" id="308859318">
<reference key="NSNextResponder" ref="42699324"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{12, 6}, {113.328125, 32}}</string>
<reference key="NSSuperview" ref="42699324"/>
<string key="NSReuseIdentifierKey">_NS:610</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1021834461">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Install</string>
<reference key="NSSupport" ref="519993212"/>
<string key="NSCellIdentifier">_NS:610</string>
<reference key="NSControlView" ref="308859318"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
</array>
<string key="NSFrame">{{1, 1}, {284, 287}}</string>
<string key="NSFrame">{{1, 1}, {263, 287}}</string>
<reference key="NSSuperview" ref="217361644"/>
<reference key="NSNextKeyView" ref="619442065"/>
</object>
</array>
<string key="NSFrame">{{285, 16}, {286, 289}}</string>
<string key="NSFrame">{{285, 16}, {265.41796875, 289}}</string>
<reference key="NSSuperview" ref="868374226"/>
<reference key="NSNextKeyView" ref="42699324"/>
<string key="NSOffsets">{0, 0}</string>
......@@ -747,6 +697,29 @@ ZQ</bytes>
<int key="NSTitlePosition">0</int>
<bool key="NSTransparent">NO</bool>
</object>
<object class="NSButton" id="326462144">
<reference key="NSNextResponder" ref="868374226"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 15}, {243.9453125, 32}}</string>
<reference key="NSSuperview" ref="868374226"/>
<string key="NSReuseIdentifierKey">_NS:610</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="627379601">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Find more addons online</string>
<reference key="NSSupport" ref="519993212"/>
<string key="NSCellIdentifier">_NS:610</string>
<reference key="NSControlView" ref="326462144"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
</array>
<string key="NSFrameSize">{568, 316}</string>
<reference key="NSSuperview"/>
......@@ -835,22 +808,6 @@ ZQ</bytes>
</object>
<int key="connectionID">91</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">installSelection:</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="5143301"/>
</object>
<int key="connectionID">92</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">refresh:</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="1019598407"/>
</object>
<int key="connectionID">93</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">switchType:</string>
......@@ -867,14 +824,6 @@ ZQ</bytes>
</object>
<int key="connectionID">95</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">uninstallSelection:</string>
<reference key="source" ref="341439621"/>
<reference key="destination" ref="861360291"/>
</object>
<int key="connectionID">96</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">dataSource</string>
......@@ -891,6 +840,38 @@ ZQ</bytes>
</object>
<int key="connectionID">98</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"/>
</object>
<int key="connectionID">103</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"/>
</object>
<int key="connectionID">104</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"/>
</object>
<int key="connectionID">105</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>
<int key="connectionID">106</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
......@@ -931,13 +912,11 @@ ZQ</bytes>
<reference key="object" ref="868374226"/>
<array class="NSMutableArray" key="children">
<reference ref="217361644"/>
<reference ref="861360291"/>
<reference ref="5143301"/>
<reference ref="1019598407"/>
<reference ref="126651340"/>
<reference ref="383895102"/>
<reference ref="946926957"/>
<reference ref="1067841408"/>
<reference ref="383895102"/>
<reference ref="326462144"/>
</array>
<reference key="parent" ref="1027075699"/>
</object>
......@@ -945,34 +924,11 @@ ZQ</bytes>
<int key="objectID">3</int>
<reference key="object" ref="217361644"/>
<array class="NSMutableArray" key="children">
<reference ref="667463558"/>
<reference ref="928729361"/>
<reference ref="934631775"/>
<reference ref="619442065"/>
</array>
<reference key="parent" ref="868374226"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="861360291"/>
<array class="NSMutableArray" key="children">
<reference ref="507398582"/>
</array>
<reference key="parent" ref="868374226"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">5</int>
<reference key="object" ref="5143301"/>
<array class="NSMutableArray" key="children">
<reference ref="1030989726"/>
</array>
<reference key="parent" ref="868374226"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="1019598407"/>
<array class="NSMutableArray" key="children">
<reference ref="522742576"/>
<reference ref="667463558"/>
<reference ref="308859318"/>
</array>
<reference key="parent" ref="868374226"/>
</object>
......@@ -1096,21 +1052,6 @@ ZQ</bytes>
<reference key="object" ref="634048922"/>
<reference key="parent" ref="383895102"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">25</int>
<reference key="object" ref="522742576"/>
<reference key="parent" ref="1019598407"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">26</int>
<reference key="object" ref="1030989726"/>
<reference key="parent" ref="5143301"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">27</int>
<reference key="object" ref="507398582"/>
<reference key="parent" ref="861360291"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">28</int>
<reference key="object" ref="667463558"/>
......@@ -1180,17 +1121,43 @@ ZQ</bytes>
<reference key="object" ref="341439621"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">99</int>
<reference key="object" ref="308859318"/>
<array class="NSMutableArray" key="children">
<reference ref="1021834461"/>
</array>
<reference key="parent" ref="217361644"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100</int>
<reference key="object" ref="1021834461"/>
<reference key="parent" ref="308859318"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">101</int>
<reference key="object" ref="326462144"/>
<array class="NSMutableArray" key="children">
<reference ref="627379601"/>
</array>
<reference key="parent" ref="868374226"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">102</int>
<reference key="object" ref="627379601"/>
<reference key="parent" ref="326462144"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1.IBEditorWindowLastContentRect">{{0, 418}, {568, 316}}</string>
<string key="1.IBEditorWindowLastContentRect">{{373, 392}, {568, 316}}</string>
<boolean value="NO" key="1.IBNSWindowAutoPositionCentersHorizontal"/>
<boolean value="NO" key="1.IBNSWindowAutoPositionCentersVertical"/>
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1.IBWindowTemplateEditedContentRect">{{0, 418}, {568, 316}}</string>
<string key="1.IBWindowTemplateEditedContentRect">{{373, 392}, {568, 316}}</string>
<boolean value="YES" key="1.NSWindowTemplate.visibleAtLaunch"/>
<boolean value="NO" key="1.showNotes"/>
<boolean value="YES" key="1.windowTemplate.hasMaxSize"/>
......@@ -1200,6 +1167,12 @@ ZQ</bytes>
<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="10.IBUserGuides" ref="0"/>
<boolean value="NO" key="10.showNotes"/>
<string key="100.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="101.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="101.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAADBAAAAwiwAAA</bytes>
</object>
<string key="102.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="11.IBNSControlSetsMaxLayoutWidthAtFirstLayoutMetadataKey"/>
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="11.IBUserGuides" ref="0"/>
......@@ -1238,16 +1211,16 @@ ZQ</bytes>
<boolean value="NO" key="23.showNotes"/>
<string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="24.showNotes"/>
<string key="25.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="25.showNotes"/>
<string key="26.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="26.showNotes"/>
<string key="27.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="27.showNotes"/>
<string key="28.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="28.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAADCggAAw0cAAA</bytes>
</object>
<boolean value="NO" key="29.IBNSControlSetsMaxLayoutWidthAtFirstLayoutMetadataKey"/>
<string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="29.IBUserGuides" ref="0"/>
<object class="NSAffineTransform" key="29.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBcAAAw2AAAA</bytes>
</object>
<boolean value="NO" key="29.showNotes"/>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="3.IBUserGuides" ref="0"/>
......@@ -1269,56 +1242,100 @@ ZQ</bytes>
<string key="35.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="36.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="37.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="4.IBNSControlSetsMaxLayoutWidthAtFirstLayoutMetadataKey"/>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="4.IBUserGuides" ref="0"/>
<boolean value="NO" key="4.showNotes"/>
<boolean value="NO" key="5.IBNSControlSetsMaxLayoutWidthAtFirstLayoutMetadataKey"/>
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="5.IBUserGuides" ref="0"/>
<boolean value="NO" key="5.showNotes"/>
<boolean value="NO" key="6.IBNSControlSetsMaxLayoutWidthAtFirstLayoutMetadataKey"/>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="6.IBUserGuides" ref="0"/>
<boolean value="NO" key="6.showNotes"/>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="7.IBUserGuides" ref="0"/>
<boolean value="NO" key="7.showNotes"/>
<boolean value="NO" key="8.IBNSControlSetsMaxLayoutWidthAtFirstLayoutMetadataKey"/>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="8.IBUserGuides" ref="0"/>
<object class="NSAffineTransform" key="8.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCiAAAwZAAAA</bytes>
</object>
<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"/>
<boolean value="NO" key="9.showNotes"/>
<string key="99.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="99.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBQAAAwhAAAA</bytes>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">98</int>
<int key="maxID">106</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../modules/gui/macosx/applescript.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../modules/gui/macosx/AppleRemote.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../modules/gui/macosx/PXSourceListDelegate.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../modules/gui/macosx/SPInvocationGrabbing.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../modules/gui/macosx/SPMediaKeyTap.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../modules/gui/macosx/misc.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../modules/gui/macosx/CompatibilityFixes.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLCAddonManager</string>
<string key="superclassName">NSObject</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="downloadCatalog:">id</string>
<string key="installSelection:">id</string>
<string key="refresh:">id</string>
<string key="switchType:">id</string>
<string key="toggleLocalCheckbox:">id</string>
<string key="uninstallSelection:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="installSelection:">
<string key="name">installSelection:</string>
<object class="IBActionInfo" key="downloadCatalog:">
<string key="name">downloadCatalog:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="refresh:">
<string key="name">refresh:</string>
<object class="IBActionInfo" key="installSelection:">
<string key="name">installSelection:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="switchType:">
......@@ -1338,6 +1355,8 @@ ZQ</bytes>
<string key="_addonsTable">NSTableView</string>
<string key="_author">NSTextField</string>
<string key="_description">NSTextView</string>
<string key="_downloadCatalogButton">NSButton</string>
<string key="_installButton">NSButton</string>
<string key="_localAddonsOnlyCheckbox">NSButton</string>
<string key="_name">NSTextField</string>
<string key="_spinner">NSProgressIndicator</string>
......@@ -1358,6 +1377,14 @@ ZQ</bytes>
<string key="name">_description</string>
<string key="candidateClassName">NSTextView</string>
</object>
<object class="IBToOneOutletInfo" key="_downloadCatalogButton">
<string key="name">_downloadCatalogButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="_installButton">
<string key="name">_installButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="_localAddonsOnlyCheckbox">
<string key="name">_localAddonsOnlyCheckbox</string>
<string key="candidateClassName">NSButton</string>
......@@ -1384,8 +1411,8 @@ ZQ</bytes>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBDocumentRelativeSource</string>
<string key="minorKey">videolan/gits/vlc/modules/gui/macosx/AddonManager.h</string>
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../modules/gui/macosx/AddonManager.h</string>
</object>
</object>
</array>
......@@ -1397,14 +1424,11 @@ ZQ</bytes>
<real value="3200" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
<string key="IBDocument.LastKnownRelativeProjectPath">../../vlc.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NSAddTemplate">{8, 8}</string>
<string key="NSMenuCheckmark">{11, 11}</string>
<string key="NSMenuMixedState">{10, 3}</string>
<string key="NSRefreshTemplate">{10, 12}</string>
<string key="NSRemoveTemplate">{8, 8}</string>
<string key="NSSwitch">{15, 15}</string>
</dictionary>
</data>
......
......@@ -26,20 +26,24 @@
IBOutlet NSWindow *_window;
IBOutlet NSPopUpButton *_typeSwitcher;
IBOutlet NSButton *_localAddonsOnlyCheckbox;
IBOutlet NSButton *_downloadCatalogButton;
IBOutlet NSTableView *_addonsTable;
IBOutlet NSProgressIndicator *_spinner;
IBOutlet NSTextField *_name;
IBOutlet NSTextField *_author;
IBOutlet NSTextField *_version;
IBOutlet NSTextView *_description;
IBOutlet NSButton *_installButton;
}
+ (VLCAddonManager *)sharedInstance;
- (void)showWindow;
- (IBAction)switchType:(id)sender;
- (IBAction)toggleLocalCheckbox:(id)sender;
- (IBAction)downloadCatalog:(id)sender;
- (IBAction)installSelection:(id)sender;
- (IBAction)uninstallSelection:(id)sender;
- (IBAction)refresh:(id)sender;
@end
\ No newline at end of file
......@@ -102,6 +102,9 @@ static VLCAddonManager *_o_sharedInstance = nil;
[_localAddonsOnlyCheckbox setState:NSOffState];
[_spinner setUsesThreadedAnimation:YES];
[self updateInstallButton:NO];
[_installButton setHidden:YES];
[_name setStringValue:@""];
[_author setStringValue:@""];
[_version setStringValue:@""];
......@@ -122,13 +125,12 @@ static VLCAddonManager *_o_sharedInstance = nil;
vlc_event_attach(p_em, vlc_AddonFound, addonsEventsCallback, self);
vlc_event_attach(p_em, vlc_AddonsDiscoveryEnded, addonsEventsCallback, self);
vlc_event_attach(p_em, vlc_AddonChanged, addonsEventsCallback, self);
[self _findInstalled];
}
- (void)showWindow
{
[self _findInstalled];
[self _findNewAddons];
[_window makeKeyAndOrderFront:nil];
}
......@@ -142,6 +144,13 @@ static VLCAddonManager *_o_sharedInstance = nil;
[self _refactorDataModel];
}
- (IBAction)downloadCatalog:(id)sender
{
[self _findNewAddons];
[_downloadCatalogButton setHidden:YES];
[_localAddonsOnlyCheckbox setHidden:NO];
}
- (IBAction)installSelection:(id)sender
{
NSInteger selectedRow = [_addonsTable selectedRow];
......@@ -150,6 +159,8 @@ static VLCAddonManager *_o_sharedInstance = nil;
VLCAddon *currentAddon = [_displayedAddons objectAtIndex:selectedRow];
[self _installAddonWithID:[currentAddon uuid]];
[_installButton setEnabled:NO];
}
- (IBAction)uninstallSelection:(id)sender
......@@ -160,11 +171,22 @@ static VLCAddonManager *_o_sharedInstance = nil;
VLCAddon *currentAddon = [_displayedAddons objectAtIndex:selectedRow];
[self _removeAddonWithID:[currentAddon uuid]];
[_installButton setEnabled:NO];
}
- (IBAction)refresh:(id)sender
- (void)updateInstallButton:(BOOL)b_is_installed
{
[self _findNewAddons];
[_installButton setHidden:NO];
[_installButton setEnabled:YES];
if (b_is_installed) {
[_installButton setTitle:_NS("Uninstall")];
[_installButton setAction:@selector(uninstallSelection:)];
} else {
[_installButton setTitle:_NS("Install")];
[_installButton setAction:@selector(installSelection:)];
}
}
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
......@@ -180,6 +202,7 @@ static VLCAddonManager *_o_sharedInstance = nil;
[_author setStringValue:@""];
[_version setStringValue:@""];
[_description setString:@""];
[_installButton setHidden:YES];
return;
}
......@@ -188,6 +211,8 @@ static VLCAddonManager *_o_sharedInstance = nil;
[_author setStringValue:[currentItem author]];
[_version setStringValue:[currentItem version]];
[_description setString:[currentItem description]];
[self updateInstallButton:[currentItem isInstalled]];
}
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
......@@ -206,7 +231,6 @@ static VLCAddonManager *_o_sharedInstance = nil;
- (void)addAddon:(addon_entry_t *)p_entry
{
@autoreleasepool {
/* no skin support on OS X so far */
if (p_entry->e_type != ADDON_SKIN2)
[_addons addObject:[[[VLCAddon alloc] initWithAddon:p_entry] autorelease]];
......@@ -257,7 +281,10 @@ static VLCAddonManager *_o_sharedInstance = nil;
_displayedAddons = [NSArray arrayWithArray:filteredItems];
[_displayedAddons retain];
[filteredItems release];
// update ui
[_addonsTable reloadData];
[self tableViewSelectionDidChange:nil];
}
- (void)_findNewAddons
......@@ -275,6 +302,7 @@ static VLCAddonManager *_o_sharedInstance = nil;
- (void)_findInstalled
{
addons_manager_LoadCatalog(_manager);
[self _refactorDataModel];
}
- (void)_installAddonWithID:(NSData *)o_data
......
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