Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
815b2ce8
Commit
815b2ce8
authored
Apr 09, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: save the expanded/collapsed state of the sidebar items (close #6389)
parent
1bb938e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
26 deletions
+39
-26
extras/package/macosx/Resources/English.lproj/MainMenu.xib
extras/package/macosx/Resources/English.lproj/MainMenu.xib
+7
-23
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+1
-0
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+31
-3
No files found.
extras/package/macosx/Resources/English.lproj/MainMenu.xib
View file @
815b2ce8
...
...
@@ -21,16 +21,16 @@
</object>
<object
class=
"NSMutableArray"
key=
"IBDocument.EditedObjectIDs"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<integer
value=
"4850"
/>
<integer
value=
"2770"
/>
<integer
value=
"4596"
/>
<integer
value=
"1617"
/>
<integer
value=
"29"
/>
<integer
value=
"2730"
/>
<integer
value=
"915"
/>
<integer
value=
"4722"
/>
<integer
value=
"4948"
/>
<integer
value=
"915"
/>
<integer
value=
"2730"
/>
<integer
value=
"21"
/>
<integer
value=
"4596"
/>
<integer
value=
"4713"
/>
<integer
value=
"29"
/>
<integer
value=
"4850"
/>
<integer
value=
"1617"
/>
</object>
<object
class=
"NSArray"
key=
"IBDocument.PluginDependencies"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
...
...
@@ -7405,22 +7405,6 @@ LCAuLi4</string>
</object>
<int
key=
"connectionID"
>
4704
</int>
</object>
<object
class=
"IBConnectionRecord"
>
<object
class=
"IBOutletConnection"
key=
"connection"
>
<string
key=
"label"
>
dataSource
</string>
<reference
key=
"source"
ref=
"1064884668"
/>
<reference
key=
"destination"
ref=
"498338108"
/>
</object>
<int
key=
"connectionID"
>
4719
</int>
</object>
<object
class=
"IBConnectionRecord"
>
<object
class=
"IBOutletConnection"
key=
"connection"
>
<string
key=
"label"
>
delegate
</string>
<reference
key=
"source"
ref=
"1064884668"
/>
<reference
key=
"destination"
ref=
"498338108"
/>
</object>
<int
key=
"connectionID"
>
4720
</int>
</object>
<object
class=
"IBConnectionRecord"
>
<object
class=
"IBOutletConnection"
key=
"connection"
>
<string
key=
"label"
>
o_sidebar_view
</string>
...
...
modules/gui/macosx/MainWindow.h
View file @
815b2ce8
...
...
@@ -27,6 +27,7 @@
#import <Cocoa/Cocoa.h>
#import "CompatibilityFixes.h"
#import "PXSourceList.h"
#import "PXSourceListDataSource.h"
#import <vlc_input.h>
#import "misc.h"
#import "fspanel.h"
...
...
modules/gui/macosx/MainWindow.m
View file @
815b2ce8
...
...
@@ -442,13 +442,16 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_sidebaritems
addObject
:
internetItem
];
[
o_sidebar_view
reloadData
];
NSUInteger
i_sidebaritem_count
=
[
o_sidebaritems
count
];
for
(
NSUInteger
x
=
0
;
x
<
i_sidebaritem_count
;
x
++
)
[
o_sidebar_view
expandItem
:
[
o_sidebaritems
objectAtIndex
:
x
]
expandChildren
:
YES
];
[
o_sidebar_view
expandItem
:
libraryItem
expandChildren
:
YES
];
[
o_sidebar_view
selectRowIndexes
:[
NSIndexSet
indexSetWithIndex
:
1
]
byExtendingSelection
:
NO
];
[
o_sidebar_view
setDropItem
:
playlistItem
dropChildIndex
:
NSOutlineViewDropOnItemIndex
];
[
o_sidebar_view
registerForDraggedTypes
:[
NSArray
arrayWithObjects
:
NSFilenamesPboardType
,
@"VLCPlaylistItemPboardType"
,
nil
]];
[
o_sidebar_view
setAutosaveName
:
@"mainwindow-sidebar"
];
[(
PXSourceList
*
)
o_sidebar_view
setDataSource
:
self
];
[
o_sidebar_view
setDelegate
:
self
];
[
o_sidebar_view
setAutosaveExpandedItems
:
YES
];
if
(
b_dark_interface
)
{
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
windowResizedOrMoved
:
)
name
:
NSWindowDidResizeNotification
object
:
nil
];
...
...
@@ -2307,6 +2310,31 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
return
NO
;
}
-
(
id
)
sourceList
:(
PXSourceList
*
)
aSourceList
persistentObjectForItem
:(
id
)
item
{
return
[
item
identifier
];
}
-
(
id
)
sourceList
:(
PXSourceList
*
)
aSourceList
itemForPersistentObject
:(
id
)
object
{
/* the following code assumes for sakes of simplicity that only the top level
* items are allowed to have children */
NSArray
*
array
=
[
NSArray
arrayWithArray
:
o_sidebaritems
];
// read-only arrays are noticebly faster
NSUInteger
count
=
[
array
count
];
if
(
count
<
1
)
return
nil
;
for
(
NSUInteger
x
=
0
;
x
<
count
;
x
++
)
{
id
item
=
[
array
objectAtIndex
:
x
];
// save one objc selector call
if
([[
item
identifier
]
isEqualToString
:
object
])
return
item
;
}
return
nil
;
}
@end
@implementation
VLCDetachedVideoWindow
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment