Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
708f5f01
Commit
708f5f01
authored
Jul 13, 2014
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: reload sidebar if the user un-/installs an SD using the addon manager
parent
63e5c291
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
107 deletions
+138
-107
modules/gui/macosx/AddonManager.m
modules/gui/macosx/AddonManager.m
+16
-4
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+2
-0
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+120
-103
No files found.
modules/gui/macosx/AddonManager.m
View file @
708f5f01
...
...
@@ -25,6 +25,7 @@
#import "AddonManager.h"
#import "intf.h"
#import "MainWindow.h"
#import "AddonListDataSource.h"
@interface
VLCAddonManager
()
...
...
@@ -32,6 +33,7 @@
addons_manager_t
*
_manager
;
NSMutableArray
*
_addons
;
NSArray
*
_displayedAddons
;
BOOL
_shouldRefreshSideBarOnAddonChange
;
}
-
(
void
)
addAddon
:(
NSValue
*
)
o_value
;
...
...
@@ -161,7 +163,7 @@ static VLCAddonManager *_o_sharedInstance = nil;
return
;
VLCAddon
*
currentAddon
=
[
_displayedAddons
objectAtIndex
:
selectedRow
];
[
self
_installAddonWithID
:[
currentAddon
uuid
]];
[
self
_installAddonWithID
:[
currentAddon
uuid
]
type
:[
currentAddon
type
]
];
[
_installButton
setEnabled
:
NO
];
}
...
...
@@ -173,7 +175,7 @@ static VLCAddonManager *_o_sharedInstance = nil;
return
;
VLCAddon
*
currentAddon
=
[
_displayedAddons
objectAtIndex
:
selectedRow
];
[
self
_removeAddonWithID
:[
currentAddon
uuid
]];
[
self
_removeAddonWithID
:[
currentAddon
uuid
]
type
:[
currentAddon
type
]
];
[
_installButton
setEnabled
:
NO
];
}
...
...
@@ -248,6 +250,10 @@ static VLCAddonManager *_o_sharedInstance = nil;
-
(
void
)
addonChanged
:(
NSValue
*
)
o_value
{
[
self
_refactorDataModel
];
if
(
_shouldRefreshSideBarOnAddonChange
)
{
[[
VLCMainWindow
sharedInstance
]
performSelector
:
@selector
(
reloadSidebar
)
withObject
:
nil
afterDelay
:
0
.
5
];
_shouldRefreshSideBarOnAddonChange
=
NO
;
}
}
#pragma mark - helpers
...
...
@@ -309,19 +315,25 @@ static VLCAddonManager *_o_sharedInstance = nil;
[
self
performSelectorOnMainThread
:
@selector
(
_refactorDataModel
)
withObject
:
nil
waitUntilDone
:
NO
];
}
-
(
void
)
_installAddonWithID
:(
NSData
*
)
o_data
-
(
void
)
_installAddonWithID
:(
NSData
*
)
o_data
type
:(
addon_type_t
)
type
{
addon_uuid_t
uuid
;
[
o_data
getBytes
:
uuid
length
:
sizeof
(
uuid
)];
if
(
type
==
ADDON_SERVICE_DISCOVERY
)
_shouldRefreshSideBarOnAddonChange
=
YES
;
addons_manager_Install
(
_manager
,
uuid
);
}
-
(
void
)
_removeAddonWithID
:(
NSData
*
)
o_data
-
(
void
)
_removeAddonWithID
:(
NSData
*
)
o_data
type
:(
addon_type_t
)
type
{
addon_uuid_t
uuid
;
[
o_data
getBytes
:
uuid
length
:
sizeof
(
uuid
)];
if
(
type
==
ADDON_SERVICE_DISCOVERY
)
_shouldRefreshSideBarOnAddonChange
=
YES
;
addons_manager_Remove
(
_manager
,
uuid
);
}
...
...
modules/gui/macosx/MainWindow.h
View file @
708f5f01
...
...
@@ -122,6 +122,8 @@ typedef enum {
-
(
void
)
windowResizedOrMoved
:(
NSNotification
*
)
notification
;
-
(
void
)
reloadSidebar
;
-
(
void
)
toggleLeftSubSplitView
;
-
(
void
)
showDropZone
;
-
(
void
)
hideDropZone
;
...
...
modules/gui/macosx/MainWindow.m
View file @
708f5f01
This diff is collapsed.
Click to expand it.
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