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
2d46240c
Commit
2d46240c
authored
Jan 29, 2010
by
Jean-Philippe André
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extensions/Qt: listen to input-change events
Forward messages to the extensions manager
parent
32ec9c1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
modules/gui/qt4/extensions_manager.cpp
modules/gui/qt4/extensions_manager.cpp
+24
-0
modules/gui/qt4/extensions_manager.hpp
modules/gui/qt4/extensions_manager.hpp
+1
-0
No files found.
modules/gui/qt4/extensions_manager.cpp
View file @
2d46240c
...
...
@@ -22,6 +22,7 @@
*****************************************************************************/
#include "extensions_manager.hpp"
#include "input_manager.hpp"
#include "dialogs/extensions.hpp"
#include "assert.h"
...
...
@@ -46,6 +47,8 @@ ExtensionsManager::ExtensionsManager( intf_thread_t *_p_intf, QObject *parent )
menuMapper
=
new
QSignalMapper
(
this
);
CONNECT
(
menuMapper
,
mapped
(
int
),
this
,
triggerMenu
(
int
)
);
CONNECT
(
THEMIM
,
inputChanged
(
input_thread_t
*
),
this
,
inputChanged
(
input_thread_t
*
)
);
b_unloading
=
false
;
b_failed
=
false
;
}
...
...
@@ -243,3 +246,24 @@ void ExtensionsManager::triggerMenu( int id )
extension_TriggerMenu
(
p_extensions_manager
,
p_ext
,
i_action
);
}
}
void
ExtensionsManager
::
inputChanged
(
input_thread_t
*
p_input
)
{
if
(
p_input
)
vlc_object_hold
(
p_input
);
vlc_mutex_lock
(
&
p_extensions_manager
->
lock
);
extension_t
*
p_ext
;
FOREACH_ARRAY
(
p_ext
,
p_extensions_manager
->
extensions
)
{
if
(
extension_IsActivated
(
p_extensions_manager
,
p_ext
)
)
{
extension_SetInput
(
p_extensions_manager
,
p_ext
,
p_input
);
}
}
FOREACH_END
()
vlc_mutex_unlock
(
&
p_extensions_manager
->
lock
);
if
(
p_input
)
vlc_object_release
(
p_input
);
}
modules/gui/qt4/extensions_manager.hpp
View file @
2d46240c
...
...
@@ -78,6 +78,7 @@ public slots:
private
slots
:
void
triggerMenu
(
int
id
);
void
inputChanged
(
input_thread_t
*
p_input
);
private:
static
ExtensionsManager
*
instance
;
...
...
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