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
c5f0506c
Commit
c5f0506c
authored
Nov 29, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: make sure the random buttons states are consistent
with the core and between themselves
parent
faa1a71b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+2
-0
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+18
-0
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+2
-0
No files found.
modules/gui/qt4/components/controller.cpp
View file @
c5f0506c
...
...
@@ -363,6 +363,8 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
case
RANDOM_BUTTON
:
{
NORMAL_BUTTON
(
RANDOM
);
RANDOMButton
->
setCheckable
(
true
);
CONNECT
(
THEMIM
,
randomChanged
(
bool
),
RANDOMButton
,
setChecked
(
bool
)
);
}
break
;
default:
...
...
modules/gui/qt4/input_manager.cpp
View file @
c5f0506c
...
...
@@ -46,6 +46,10 @@ static int PLItemRemoved( vlc_object_t *, const char *,
static
int
VolumeChanged
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
RandomChanged
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
InputEvent
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
VbiEvent
(
vlc_object_t
*
,
const
char
*
,
...
...
@@ -888,6 +892,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
var_AddCallback
(
THEPL
,
"activity"
,
PLItemChanged
,
this
);
var_AddCallback
(
THEPL
,
"playlist-item-append"
,
PLItemAppended
,
this
);
var_AddCallback
(
THEPL
,
"playlist-item-deleted"
,
PLItemRemoved
,
this
);
var_AddCallback
(
THEPL
,
"random"
,
RandomChanged
,
this
);
var_AddCallback
(
p_intf
->
p_libvlc
,
"volume-change"
,
VolumeChanged
,
this
);
...
...
@@ -959,6 +964,9 @@ void MainInputManager::customEvent( QEvent *event )
plEv
=
static_cast
<
PLEvent
*>
(
event
);
emit
playlistItemRemoved
(
plEv
->
i_item
);
return
;
case
RandomChanged_Type
:
emit
randomChanged
(
var_GetBool
(
THEPL
,
"random"
)
);
return
;
default:
if
(
type
!=
ItemChanged_Type
)
return
;
}
...
...
@@ -1079,3 +1087,13 @@ static int PLItemRemoved
QApplication
::
postEvent
(
mim
,
event
);
return
VLC_SUCCESS
;
}
static
int
RandomChanged
(
vlc_object_t
*
obj
,
const
char
*
var
,
vlc_value_t
old
,
vlc_value_t
cur
,
void
*
data
)
{
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
IMEvent
*
event
=
new
IMEvent
(
RandomChanged_Type
);
QApplication
::
postEvent
(
mim
,
event
);
return
VLC_SUCCESS
;
}
modules/gui/qt4/input_manager.hpp
View file @
c5f0506c
...
...
@@ -57,6 +57,7 @@ enum {
BookmarksChanged_Type
,
RecordingEvent_Type
,
ProgramChanged_Type
,
RandomChanged_Type
,
/* SignalChanged_Type, */
FullscreenControlToggle_Type
=
QEvent
::
User
+
IMEventType
+
20
,
...
...
@@ -269,6 +270,7 @@ signals:
void
volumeChanged
();
void
playlistItemAppended
(
int
itemId
,
int
parentId
);
void
playlistItemRemoved
(
int
itemId
);
void
randomChanged
(
bool
);
};
#endif
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