Commit 8861bc52 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx/bookmarks: remove object from xib file

parent 1ca35e8e
......@@ -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">14E46</string>
<string key="IBDocument.InterfaceBuilderVersion">7706</string>
<string key="IBDocument.AppKitVersion">1348.17</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">7706</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>NSButton</string>
......@@ -33,7 +33,7 @@
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="894285478">
<object class="NSCustomObject" id="33654090">
<string key="NSClassName">NSObject</string>
<string key="NSClassName">VLCBookmarks</string>
</object>
<object class="NSCustomObject" id="222688530">
<string key="NSClassName">FirstResponder</string>
......@@ -41,9 +41,6 @@
<object class="NSCustomObject" id="901686818">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomObject" id="269740084">
<string key="NSClassName">VLCBookmarks</string>
</object>
<object class="NSWindowTemplate" id="483319126">
<int key="NSWindowStyleMask">8223</int>
<int key="NSWindowBacking">2</int>
......@@ -432,7 +429,7 @@
<reference key="NSNextKeyView" ref="923291537"/>
<string key="NSReuseIdentifierKey">_NS:93</string>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSScreenRect">{{0, 0}, {2560, 1417}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<string key="NSFrameAutosaveName">bookmarks</string>
<bool key="NSWindowIsRestorable">NO</bool>
......@@ -447,7 +444,7 @@
<nil key="NSViewClass"/>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="350014962">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSTextField" id="749910442">
......@@ -455,6 +452,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{74, 83}, {204, 22}}</string>
<reference key="NSSuperview" ref="350014962"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:76</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="744738909">
......@@ -475,6 +473,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{74, 51}, {204, 22}}</string>
<reference key="NSSuperview" ref="350014962"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:76</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1071274495">
......@@ -495,6 +494,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{180, 18}, {98, 19}}</string>
<reference key="NSSuperview" ref="350014962"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:125</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="504886597">
......@@ -519,6 +519,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{74, 18}, {98, 19}}</string>
<reference key="NSSuperview" ref="350014962"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:125</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="826635909">
......@@ -543,6 +544,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 85}, {52, 17}}</string>
<reference key="NSSuperview" ref="350014962"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:637</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="593608671">
......@@ -568,6 +570,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 53}, {52, 17}}</string>
<reference key="NSSuperview" ref="350014962"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:637</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="18448839">
......@@ -585,9 +588,11 @@
</object>
</array>
<string key="NSFrameSize">{298, 125}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:93</string>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSScreenRect">{{0, 0}, {2560, 1417}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">NO</bool>
</object>
......@@ -596,195 +601,171 @@
<array key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_btn_add</string>
<reference key="source" ref="269740084"/>
<string key="label">addButton</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="923291537"/>
</object>
<int key="connectionID">118</int>
<int key="connectionID">163</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_btn_clear</string>
<reference key="source" ref="269740084"/>
<reference key="destination" ref="136520628"/>
</object>
<int key="connectionID">119</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_btn_edit</string>
<reference key="source" ref="269740084"/>
<reference key="destination" ref="185425397"/>
</object>
<int key="connectionID">120</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_btn_extract</string>
<reference key="source" ref="269740084"/>
<reference key="destination" ref="865621523"/>
<string key="label">bookmarksWindow</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="483319126"/>
</object>
<int key="connectionID">121</int>
<int key="connectionID">164</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_btn_rm</string>
<reference key="source" ref="269740084"/>
<reference key="destination" ref="990537356"/>
<string key="label">clearButton</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="136520628"/>
</object>
<int key="connectionID">122</int>
<int key="connectionID">165</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_tbl_dataTable</string>
<reference key="source" ref="269740084"/>
<string key="label">dataTable</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="360561587"/>
</object>
<int key="connectionID">124</int>
<int key="connectionID">166</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">add:</string>
<reference key="source" ref="269740084"/>
<reference key="destination" ref="923291537"/>
</object>
<int key="connectionID">127</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">clear:</string>
<reference key="source" ref="269740084"/>
<reference key="destination" ref="136520628"/>
</object>
<int key="connectionID">128</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">edit:</string>
<reference key="source" ref="269740084"/>
<object class="IBOutletConnection" key="connection">
<string key="label">editButton</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="185425397"/>
</object>
<int key="connectionID">129</int>
<int key="connectionID">167</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">extract:</string>
<reference key="source" ref="269740084"/>
<object class="IBOutletConnection" key="connection">
<string key="label">extractButton</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="865621523"/>
</object>
<int key="connectionID">130</int>
<int key="connectionID">168</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">goToBookmark:</string>
<reference key="source" ref="269740084"/>
<reference key="destination" ref="360561587"/>
<object class="IBOutletConnection" key="connection">
<string key="label">removeButton</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="990537356"/>
</object>
<int key="connectionID">131</int>
<int key="connectionID">169</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">remove:</string>
<reference key="source" ref="269740084"/>
<reference key="destination" ref="990537356"/>
<object class="IBOutletConnection" key="connection">
<string key="label">editBookmarksWindow</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="233169904"/>
</object>
<int key="connectionID">132</int>
<int key="connectionID">170</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_edit_btn_cancel</string>
<reference key="source" ref="269740084"/>
<string key="label">editCancelButton</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="44348677"/>
</object>
<int key="connectionID">151</int>
<int key="connectionID">171</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_edit_btn_ok</string>
<reference key="source" ref="269740084"/>
<string key="label">editOKButton</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="965200594"/>
</object>
<int key="connectionID">152</int>
<int key="connectionID">172</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_edit_fld_name</string>
<reference key="source" ref="269740084"/>
<string key="label">editNameTextField</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="749910442"/>
</object>
<int key="connectionID">154</int>
<int key="connectionID">173</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_edit_fld_time</string>
<reference key="source" ref="269740084"/>
<string key="label">editTimeTextField</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="741026146"/>
</object>
<int key="connectionID">155</int>
<int key="connectionID">174</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_edit_lbl_name</string>
<reference key="source" ref="269740084"/>
<string key="label">editNameLabel</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="219133204"/>
</object>
<int key="connectionID">157</int>
<int key="connectionID">175</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_edit_lbl_time</string>
<reference key="source" ref="269740084"/>
<string key="label">editTimeLabel</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="879550076"/>
</object>
<int key="connectionID">158</int>
<int key="connectionID">176</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_edit_window</string>
<reference key="source" ref="269740084"/>
<reference key="destination" ref="233169904"/>
<object class="IBActionConnection" key="connection">
<string key="label">add:</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="923291537"/>
</object>
<int key="connectionID">177</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">clear:</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="136520628"/>
</object>
<int key="connectionID">159</int>
<int key="connectionID">178</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">edit:</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="185425397"/>
</object>
<int key="connectionID">179</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">edit_cancel:</string>
<reference key="source" ref="269740084"/>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="44348677"/>
</object>
<int key="connectionID">160</int>
<int key="connectionID">180</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">edit_ok:</string>
<reference key="source" ref="269740084"/>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="965200594"/>
</object>
<int key="connectionID">161</int>
<int key="connectionID">181</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_bookmarks_window</string>
<reference key="source" ref="269740084"/>
<reference key="destination" ref="483319126"/>
</object>
<int key="connectionID">162</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="360561587"/>
<reference key="destination" ref="269740084"/>
<object class="IBActionConnection" key="connection">
<string key="label">extract:</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="865621523"/>
</object>
<int key="connectionID">125</int>
<int key="connectionID">182</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="360561587"/>
<reference key="destination" ref="269740084"/>
<object class="IBActionConnection" key="connection">
<string key="label">remove:</string>
<reference key="source" ref="33654090"/>
<reference key="destination" ref="990537356"/>
</object>
<int key="connectionID">126</int>
<int key="connectionID">183</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
......@@ -807,12 +788,6 @@
<reference key="parent" ref="0"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">17</int>
<reference key="object" ref="269740084"/>
<reference key="parent" ref="0"/>
<string key="objectName">VLCBookmarks</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="901686818"/>
......@@ -1248,7 +1223,6 @@
</object>
<string key="147.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="148.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="17.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="84.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="84.IBWindowTemplateEditedContentRect">{{622, 244}, {540, 307}}</string>
<boolean value="NO" key="84.NSWindowTemplate.visibleAtLaunch"/>
......@@ -1343,7 +1317,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">162</int>
<int key="maxID">183</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
......@@ -1395,77 +1369,77 @@
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="o_bookmarks_window">id</string>
<string key="o_btn_add">id</string>
<string key="o_btn_clear">id</string>
<string key="o_btn_edit">id</string>
<string key="o_btn_extract">id</string>
<string key="o_btn_rm">id</string>
<string key="o_edit_btn_cancel">id</string>
<string key="o_edit_btn_ok">id</string>
<string key="o_edit_fld_name">id</string>
<string key="o_edit_fld_time">id</string>
<string key="o_edit_lbl_name">id</string>
<string key="o_edit_lbl_time">id</string>
<string key="o_edit_window">id</string>
<string key="o_tbl_dataTable">id</string>
<string key="addButton">NSButton</string>
<string key="bookmarksWindow">NSWindow</string>
<string key="clearButton">NSButton</string>
<string key="dataTable">NSTableView</string>
<string key="editBookmarksWindow">NSWindow</string>
<string key="editButton">NSButton</string>
<string key="editCancelButton">NSButton</string>
<string key="editNameLabel">NSTextField</string>
<string key="editNameTextField">NSTextField</string>
<string key="editOKButton">NSButton</string>
<string key="editTimeLabel">NSTextField</string>
<string key="editTimeTextField">NSTextField</string>
<string key="extractButton">NSButton</string>
<string key="removeButton">NSButton</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="o_bookmarks_window">
<string key="name">o_bookmarks_window</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="addButton">
<string key="name">addButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="o_btn_add">
<string key="name">o_btn_add</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="bookmarksWindow">
<string key="name">bookmarksWindow</string>
<string key="candidateClassName">NSWindow</string>
</object>
<object class="IBToOneOutletInfo" key="o_btn_clear">
<string key="name">o_btn_clear</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="clearButton">
<string key="name">clearButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="o_btn_edit">
<string key="name">o_btn_edit</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="dataTable">
<string key="name">dataTable</string>
<string key="candidateClassName">NSTableView</string>
</object>
<object class="IBToOneOutletInfo" key="o_btn_extract">
<string key="name">o_btn_extract</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="editBookmarksWindow">
<string key="name">editBookmarksWindow</string>
<string key="candidateClassName">NSWindow</string>
</object>
<object class="IBToOneOutletInfo" key="o_btn_rm">
<string key="name">o_btn_rm</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="editButton">
<string key="name">editButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="o_edit_btn_cancel">
<string key="name">o_edit_btn_cancel</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="editCancelButton">
<string key="name">editCancelButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="o_edit_btn_ok">
<string key="name">o_edit_btn_ok</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="editNameLabel">
<string key="name">editNameLabel</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo" key="o_edit_fld_name">
<string key="name">o_edit_fld_name</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="editNameTextField">
<string key="name">editNameTextField</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo" key="o_edit_fld_time">
<string key="name">o_edit_fld_time</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="editOKButton">
<string key="name">editOKButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="o_edit_lbl_name">
<string key="name">o_edit_lbl_name</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="editTimeLabel">
<string key="name">editTimeLabel</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo" key="o_edit_lbl_time">
<string key="name">o_edit_lbl_time</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="editTimeTextField">
<string key="name">editTimeTextField</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo" key="o_edit_window">
<string key="name">o_edit_window</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="extractButton">
<string key="name">extractButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="o_tbl_dataTable">
<string key="name">o_tbl_dataTable</string>
<string key="candidateClassName">id</string>
<object class="IBToOneOutletInfo" key="removeButton">
<string key="name">removeButton</string>
<string key="candidateClassName">NSButton</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
......@@ -1614,6 +1588,14 @@
<string key="minorKey">AppKit.framework/Headers/NSTableHeaderView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSTableView</string>
<string key="superclassName">NSControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSTableView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSTextField</string>
<string key="superclassName">NSControl</string>
......
/*****************************************************************************
* bookmarks.h: MacOS X Bookmarks window
*****************************************************************************
* Copyright (C) 2005, 2007 VLC authors and VideoLAN
* Copyright (C) 2005, 2007, 2015 VLC authors and VideoLAN
* $Id$
*
* Authors: Felix Kühne <fkuehne at videolan dot org>
......@@ -26,27 +26,27 @@
#import <vlc_common.h>
@interface VLCBookmarks : NSObject
{
/* main window */
IBOutlet id o_bookmarks_window;
IBOutlet id o_btn_add;
IBOutlet id o_btn_clear;
IBOutlet id o_btn_edit;
IBOutlet id o_btn_extract;
IBOutlet id o_btn_rm;
IBOutlet id o_tbl_dataTable;
/* edit window */
IBOutlet id o_edit_window;
IBOutlet id o_edit_btn_ok;
IBOutlet id o_edit_btn_cancel;
IBOutlet id o_edit_lbl_name;
IBOutlet id o_edit_lbl_time;
IBOutlet id o_edit_fld_name;
IBOutlet id o_edit_fld_time;
}
+ (VLCBookmarks *)sharedInstance;
/* main window */
@property (readwrite, weak) IBOutlet NSWindow *bookmarksWindow;
@property (readwrite, weak) IBOutlet NSButton *addButton;
@property (readwrite, weak) IBOutlet NSButton *clearButton;
@property (readwrite, weak) IBOutlet NSButton *editButton;
@property (readwrite, weak) IBOutlet NSButton *extractButton;
@property (readwrite, weak) IBOutlet NSButton *removeButton;
@property (readwrite, weak) IBOutlet NSTableView *dataTable;
/* edit window */
@property (readwrite, weak) IBOutlet NSWindow *editBookmarksWindow;
@property (readwrite, weak) IBOutlet NSButton *editOKButton;
@property (readwrite, weak) IBOutlet NSButton *editCancelButton;
@property (readwrite, weak) IBOutlet NSTextField *editNameLabel;
@property (readwrite, weak) IBOutlet NSTextField *editTimeLabel;
@property (readwrite, weak) IBOutlet NSTextField *editNameTextField;
@property (readwrite, weak) IBOutlet NSTextField *editTimeTextField;
- (void)updateCocoaWindowLevel:(NSInteger)i_level;
- (IBAction)add:(id)sender;
......
/*****************************************************************************
* bookmarks.m: MacOS X Bookmarks window
*****************************************************************************
* Copyright (C) 2005 - 2012 VLC authors and VideoLAN
* Copyright (C) 2005 - 2015 VLC authors and VideoLAN
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne at videolan dot org>
......@@ -38,11 +38,10 @@
#import "wizard.h"
#import "CompatibilityFixes.h"
@interface VLCBookmarks()
@interface VLCBookmarks() <NSTableViewDataSource, NSTableViewDelegate>
{
input_thread_t *p_old_input;
}
- (void)initStrings;
@end
@implementation VLCBookmarks
......@@ -66,9 +65,30 @@
- (void)awakeFromNib
{
if (!OSX_SNOW_LEOPARD)
[o_bookmarks_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[_bookmarksWindow setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self initStrings];
_dataTable.dataSource = self;
_dataTable.delegate = self;
_dataTable.action = @selector(goToBookmark:);
_dataTable.target = self;
/* main window */
[_bookmarksWindow setTitle: _NS("Bookmarks")];
[_addButton setTitle: _NS("Add")];
[_clearButton setTitle: _NS("Clear")];
[_editButton setTitle: _NS("Edit")];
[_extractButton setTitle: _NS("Extract")];
[_removeButton setTitle: _NS("Remove")];
[[[_dataTable tableColumnWithIdentifier:@"description"] headerCell]
setStringValue: _NS("Description")];
[[[_dataTable tableColumnWithIdentifier:@"time_offset"] headerCell]
setStringValue: _NS("Time")];
/* edit window */
[_editOKButton setTitle: _NS("OK")];
[_editCancelButton setTitle: _NS("Cancel")];
[_editNameLabel setStringValue: _NS("Name")];
[_editTimeLabel setStringValue: _NS("Time")];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(inputChangedEvent:)
......@@ -84,46 +104,23 @@
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)initStrings
{
/* localise the items */
/* main window */
[o_bookmarks_window setTitle: _NS("Bookmarks")];
[o_btn_add setTitle: _NS("Add")];
[o_btn_clear setTitle: _NS("Clear")];
[o_btn_edit setTitle: _NS("Edit")];
[o_btn_extract setTitle: _NS("Extract")];
[o_btn_rm setTitle: _NS("Remove")];
[[[o_tbl_dataTable tableColumnWithIdentifier:@"description"] headerCell]
setStringValue: _NS("Description")];
[[[o_tbl_dataTable tableColumnWithIdentifier:@"time_offset"] headerCell]
setStringValue: _NS("Time")];
/* edit window */
[o_edit_btn_ok setTitle: _NS("OK")];
[o_edit_btn_cancel setTitle: _NS("Cancel")];
[o_edit_lbl_name setStringValue: _NS("Name")];
[o_edit_lbl_time setStringValue: _NS("Time")];
}
- (void)updateCocoaWindowLevel:(NSInteger)i_level
{
if (o_bookmarks_window && [o_bookmarks_window isVisible] && [o_bookmarks_window level] != i_level)
[o_bookmarks_window setLevel: i_level];
if (_bookmarksWindow && [_bookmarksWindow isVisible] && [_bookmarksWindow level] != i_level)
[_bookmarksWindow setLevel: i_level];
}
- (void)showBookmarks
{
/* show the window, called from intf.m */
[o_bookmarks_window displayIfNeeded];
[o_bookmarks_window setLevel: [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]];
[o_bookmarks_window makeKeyAndOrderFront:nil];
[_bookmarksWindow displayIfNeeded];
[_bookmarksWindow setLevel: [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]];
[_bookmarksWindow makeKeyAndOrderFront:nil];
}
-(void)inputChangedEvent:(NSNotification *)o_notification
{
[o_tbl_dataTable reloadData];
[_dataTable reloadData];
}
- (IBAction)add:(id)sender
......@@ -143,7 +140,7 @@
vlc_object_release(p_input);
[o_tbl_dataTable reloadData];
[_dataTable reloadData];
}
- (IBAction)clear:(id)sender
......@@ -158,7 +155,7 @@
vlc_object_release(p_input);
[o_tbl_dataTable reloadData];
[_dataTable reloadData];
}
- (IBAction)edit:(id)sender
......@@ -170,7 +167,7 @@
seekpoint_t **pp_bookmarks;
int i_bookmarks;
int row;
row = [o_tbl_dataTable selectedRow];
row = [_dataTable selectedRow];
if (!p_input)
return;
......@@ -185,12 +182,12 @@
return;
}
[o_edit_fld_name setStringValue: toNSStr(pp_bookmarks[row]->psz_name)];
[_editNameTextField setStringValue: toNSStr(pp_bookmarks[row]->psz_name)];
int total = pp_bookmarks[row]->i_time_offset/ 1000000;
int hour = total / (60*60);
int min = (total - hour*60*60) / 60;
int sec = total - hour*60*60 - min*60;
[o_edit_fld_time setStringValue: [NSString stringWithFormat:@"%02d:%02d:%02d", hour, min, sec]];
[_editTimeTextField setStringValue: [NSString stringWithFormat:@"%02d:%02d:%02d", hour, min, sec]];
/* Just keep the pointer value to check if it
* changes. Note, we don't need to keep a reference to the object.
......@@ -198,7 +195,7 @@
p_old_input = p_input;
vlc_object_release(p_input);
[NSApp beginSheet: o_edit_window modalForWindow: o_bookmarks_window modalDelegate: o_edit_window didEndSelector: nil contextInfo: nil];
[NSApp beginSheet: _editBookmarksWindow modalForWindow: _bookmarksWindow modalDelegate: _editBookmarksWindow didEndSelector: nil contextInfo: nil];
// Clear the bookmark list
for (int i = 0; i < i_bookmarks; i++)
......@@ -209,8 +206,8 @@
- (IBAction)edit_cancel:(id)sender
{
/* close sheet */
[NSApp endSheet:o_edit_window];
[o_edit_window close];
[NSApp endSheet:_editBookmarksWindow];
[_editBookmarksWindow close];
}
- (IBAction)edit_ok:(id)sender
......@@ -221,11 +218,11 @@
input_thread_t * p_input = pl_CurrentInput(VLCIntf);
if (!p_input) {
NSBeginCriticalAlertSheet(_NS("No input"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, @"%@",_NS("No input found. A stream must be playing or paused for bookmarks to work."));
NSBeginCriticalAlertSheet(_NS("No input"), _NS("OK"), @"", @"", _bookmarksWindow, nil, nil, nil, nil, @"%@",_NS("No input found. A stream must be playing or paused for bookmarks to work."));
return;
}
if (p_old_input != p_input) {
NSBeginCriticalAlertSheet(_NS("Input has changed"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, @"%@",_NS("Input has changed, unable to save bookmark. Suspending playback with \"Pause\" while editing bookmarks to ensure to keep the same input."));
NSBeginCriticalAlertSheet(_NS("Input has changed"), _NS("OK"), @"", @"", _bookmarksWindow, nil, nil, nil, nil, @"%@",_NS("Input has changed, unable to save bookmark. Suspending playback with \"Pause\" while editing bookmarks to ensure to keep the same input."));
vlc_object_release(p_input);
return;
}
......@@ -235,13 +232,13 @@
return;
}
i = [o_tbl_dataTable selectedRow];
i = [_dataTable selectedRow];
free(pp_bookmarks[i]->psz_name);
pp_bookmarks[i]->psz_name = strdup([[o_edit_fld_name stringValue] UTF8String]);
pp_bookmarks[i]->psz_name = strdup([[_editNameTextField stringValue] UTF8String]);
NSArray * components = [[o_edit_fld_time stringValue] componentsSeparatedByString:@":"];
NSArray * components = [[_editTimeTextField stringValue] componentsSeparatedByString:@":"];
NSUInteger componentCount = [components count];
if (componentCount == 1)
pp_bookmarks[i]->i_time_offset = 1000000LL * ([[components objectAtIndex:0] longLongValue]);
......@@ -259,11 +256,11 @@
goto clear;
}
[o_tbl_dataTable reloadData];
[_dataTable reloadData];
vlc_object_release(p_input);
[NSApp endSheet: o_edit_window];
[o_edit_window close];
[NSApp endSheet: _editBookmarksWindow];
[_editBookmarksWindow close];
clear:
// Clear the bookmark list
......@@ -274,13 +271,13 @@ clear:
- (IBAction)extract:(id)sender
{
if ([o_tbl_dataTable numberOfSelectedRows] < 2) {
NSBeginAlertSheet(_NS("Invalid selection"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, @"%@",_NS("Two bookmarks have to be selected."));
if ([_dataTable numberOfSelectedRows] < 2) {
NSBeginAlertSheet(_NS("Invalid selection"), _NS("OK"), @"", @"", _bookmarksWindow, nil, nil, nil, nil, @"%@",_NS("Two bookmarks have to be selected."));
return;
}
input_thread_t * p_input = pl_CurrentInput(VLCIntf);
if (!p_input) {
NSBeginCriticalAlertSheet(_NS("No input found"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, @"%@",_NS("The stream must be playing or paused for bookmarks to work."));
NSBeginCriticalAlertSheet(_NS("No input found"), _NS("OK"), @"", @"", _bookmarksWindow, nil, nil, nil, nil, @"%@",_NS("The stream must be playing or paused for bookmarks to work."));
return;
}
......@@ -290,7 +287,7 @@ clear:
int i_second = -1;
int c = 0;
for (NSUInteger x = 0; c != 2; x++) {
if ([o_tbl_dataTable isRowSelected:x]) {
if ([_dataTable isRowSelected:x]) {
if (i_first == -1) {
i_first = x;
c = 1;
......@@ -325,7 +322,7 @@ clear:
if (!p_input)
return;
input_Control(p_input, INPUT_SET_BOOKMARK, [o_tbl_dataTable selectedRow]);
input_Control(p_input, INPUT_SET_BOOKMARK, [_dataTable selectedRow]);
vlc_object_release(p_input);
}
......@@ -337,14 +334,14 @@ clear:
if (!p_input)
return;
int i_focused = [o_tbl_dataTable selectedRow];
int i_focused = [_dataTable selectedRow];
if (i_focused >= 0)
input_Control(p_input, INPUT_DEL_BOOKMARK, i_focused);
vlc_object_release(p_input);
[o_tbl_dataTable reloadData];
[_dataTable reloadData];
}
/*****************************************************************************
......@@ -416,17 +413,17 @@ clear:
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
{
/* check whether a row is selected and en-/disable the edit/remove buttons */
if ([o_tbl_dataTable selectedRow] == -1) {
if ([_dataTable selectedRow] == -1) {
/* no row is selected */
[o_btn_edit setEnabled: NO];
[o_btn_rm setEnabled: NO];
[o_btn_extract setEnabled: NO];
[_editButton setEnabled: NO];
[_removeButton setEnabled: NO];
[_extractButton setEnabled: NO];
} else {
/* a row is selected */
[o_btn_edit setEnabled: YES];
[o_btn_rm setEnabled: YES];
if ([o_tbl_dataTable numberOfSelectedRows] == 2)
[o_btn_extract setEnabled: YES];
[_editButton setEnabled: YES];
[_removeButton setEnabled: YES];
if ([_dataTable numberOfSelectedRows] == 2)
[_extractButton setEnabled: YES];
}
}
......
......@@ -1276,7 +1276,7 @@ audio_output_t *getAout(void)
o_bookmarks = [[VLCBookmarks alloc] init];
if (!nib_bookmarks_loaded)
nib_bookmarks_loaded = [NSBundle loadNibNamed:@"Bookmarks" owner: NSApp];
nib_bookmarks_loaded = [NSBundle loadNibNamed:@"Bookmarks" owner:o_bookmarks];
return o_bookmarks;
}
......
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