Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
141dd1d8
Commit
141dd1d8
authored
Oct 08, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove visual button, put back in the menu
parent
b8bc19e5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
42 deletions
+22
-42
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+0
-3
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+9
-27
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+1
-0
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+10
-3
modules/gui/qt4/menus.hpp
modules/gui/qt4/menus.hpp
+2
-2
modules/gui/qt4/ui/main_interface.ui
modules/gui/qt4/ui/main_interface.ui
+0
-7
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
141dd1d8
...
@@ -78,7 +78,6 @@ VideoWidget::~VideoWidget()
...
@@ -78,7 +78,6 @@ VideoWidget::~VideoWidget()
QSize
VideoWidget
::
sizeHint
()
const
QSize
VideoWidget
::
sizeHint
()
const
{
{
fprintf
(
stderr
,
"Video Size %ix%i
\n
"
,
widgetSize
.
width
(),
widgetSize
.
height
()
);
return
widgetSize
;
return
widgetSize
;
}
}
...
@@ -132,7 +131,6 @@ BackgroundWidget::~BackgroundWidget()
...
@@ -132,7 +131,6 @@ BackgroundWidget::~BackgroundWidget()
QSize
BackgroundWidget
::
sizeHint
()
const
QSize
BackgroundWidget
::
sizeHint
()
const
{
{
fprintf
(
stderr
,
"BG %ix%i
\n
"
,
widgetSize
.
width
(),
widgetSize
.
height
()
);
return
widgetSize
;
return
widgetSize
;
}
}
...
@@ -318,7 +316,6 @@ void PlaylistWidget::setArt( QString url )
...
@@ -318,7 +316,6 @@ void PlaylistWidget::setArt( QString url )
{
{
if
(
prevArt
!=
url
)
if
(
prevArt
!=
url
)
{
{
fprintf
(
stderr
,
"Display %s
\n
"
,
qta
(
url
)
);
art
->
setPixmap
(
QPixmap
(
url
)
);
art
->
setPixmap
(
QPixmap
(
url
)
);
prevArt
=
url
;
prevArt
=
url
;
}
}
...
...
modules/gui/qt4/main_interface.cpp
View file @
141dd1d8
...
@@ -100,12 +100,13 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
...
@@ -100,12 +100,13 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
playlistEmbeddedFlag
=
settings
->
value
(
"playlist-embedded"
,
true
).
playlistEmbeddedFlag
=
settings
->
value
(
"playlist-embedded"
,
true
).
toBool
();
toBool
();
advControlsEnabled
=
settings
->
value
(
"adv-controls"
,
false
).
toBool
();
advControlsEnabled
=
settings
->
value
(
"adv-controls"
,
false
).
toBool
();
visualSelectorEnabled
=
settings
->
value
(
"visual-selector"
,
false
).
toBool
();
setWindowTitle
(
QString
::
fromUtf8
(
_
(
"VLC media player"
)
)
);
setWindowTitle
(
QString
::
fromUtf8
(
_
(
"VLC media player"
)
)
);
handleMainUi
(
settings
);
handleMainUi
(
settings
);
QVLCMenu
::
createMenuBar
(
this
,
p_intf
,
playlistEmbeddedFlag
,
QVLCMenu
::
createMenuBar
(
this
,
p_intf
,
playlistEmbeddedFlag
,
advControlsEnabled
);
advControlsEnabled
,
visualSelectorEnabled
);
/* Status bar */
/* Status bar */
timeLabel
=
new
QLabel
(
0
);
timeLabel
=
new
QLabel
(
0
);
...
@@ -165,8 +166,6 @@ void MainInterface::handleMainUi( QSettings *settings )
...
@@ -165,8 +166,6 @@ void MainInterface::handleMainUi( QSettings *settings )
BUTTON_SET_ACT_I
(
ui
.
nextButton
,
""
,
next
.
png
,
qtr
(
"Next"
),
next
()
);
BUTTON_SET_ACT_I
(
ui
.
nextButton
,
""
,
next
.
png
,
qtr
(
"Next"
),
next
()
);
BUTTON_SET_ACT_I
(
ui
.
playButton
,
""
,
play
.
png
,
qtr
(
"Play"
),
play
()
);
BUTTON_SET_ACT_I
(
ui
.
playButton
,
""
,
play
.
png
,
qtr
(
"Play"
),
play
()
);
BUTTON_SET_ACT_I
(
ui
.
stopButton
,
""
,
stop
.
png
,
qtr
(
"Stop"
),
stop
()
);
BUTTON_SET_ACT_I
(
ui
.
stopButton
,
""
,
stop
.
png
,
qtr
(
"Stop"
),
stop
()
);
BUTTON_SET_ACT_I
(
ui
.
visualButton
,
""
,
stop
.
png
,
qtr
(
"Audio visualizations"
),
visual
()
);
/* Volume */
/* Volume */
ui
.
volMuteLabel
->
setPixmap
(
QPixmap
(
":/pixmaps/volume-low.png"
)
);
ui
.
volMuteLabel
->
setPixmap
(
QPixmap
(
":/pixmaps/volume-low.png"
)
);
...
@@ -236,13 +235,11 @@ void MainInterface::calculateInterfaceSize()
...
@@ -236,13 +235,11 @@ void MainInterface::calculateInterfaceSize()
{
{
width
=
playlistWidget
->
widgetSize
.
width
();
width
=
playlistWidget
->
widgetSize
.
width
();
height
=
playlistWidget
->
widgetSize
.
height
();
height
=
playlistWidget
->
widgetSize
.
height
();
fprintf
(
stderr
,
"Have %ix%i playlist
\n
"
,
width
,
height
);
}
}
else
if
(
videoIsActive
)
else
if
(
videoIsActive
)
{
{
width
=
videoWidget
->
widgetSize
.
width
()
;
width
=
videoWidget
->
widgetSize
.
width
()
;
height
=
videoWidget
->
widgetSize
.
height
();
height
=
videoWidget
->
widgetSize
.
height
();
fprintf
(
stderr
,
"Video Size %ix%i
\n
"
,
DS
(
videoWidget
->
widgetSize
)
);
}
}
else
else
{
{
...
@@ -251,23 +248,15 @@ void MainInterface::calculateInterfaceSize()
...
@@ -251,23 +248,15 @@ void MainInterface::calculateInterfaceSize()
}
}
if
(
VISIBLE
(
visualSelector
)
)
if
(
VISIBLE
(
visualSelector
)
)
height
+=
visualSelector
->
height
();
height
+=
visualSelector
->
height
();
fprintf
(
stderr
,
"Adv %p - visible %i
\n
"
,
advControls
,
advControls
->
isVisible
()
);
if
(
VISIBLE
(
advControls
)
)
if
(
VISIBLE
(
advControls
)
)
{
{
fprintf
(
stderr
,
"visible
\n
"
);
height
+=
advControls
->
sizeHint
().
height
();
height
+=
advControls
->
sizeHint
().
height
();
}
}
fprintf
(
stderr
,
"Adv height %i
\n
"
,
advControls
->
sizeHint
().
height
()
);
fprintf
(
stderr
,
"Setting to %ix%i
\n
"
,
width
+
addSize
.
width
()
,
height
+
addSize
.
height
()
);
mainSize
=
QSize
(
width
+
addSize
.
width
(),
height
+
addSize
.
height
()
);
mainSize
=
QSize
(
width
+
addSize
.
width
(),
height
+
addSize
.
height
()
);
}
}
void
MainInterface
::
resizeEvent
(
QResizeEvent
*
e
)
void
MainInterface
::
resizeEvent
(
QResizeEvent
*
e
)
{
{
fprintf
(
stderr
,
"Resize event to %ix%i
\n
"
,
DS
(
e
->
size
()
)
);
videoWidget
->
widgetSize
.
setWidth
(
e
->
size
().
width
()
-
addSize
.
width
()
);
videoWidget
->
widgetSize
.
setWidth
(
e
->
size
().
width
()
-
addSize
.
width
()
);
if
(
videoWidget
&&
videoIsActive
&&
videoWidget
->
widgetSize
.
height
()
>
1
)
if
(
videoWidget
&&
videoIsActive
&&
videoWidget
->
widgetSize
.
height
()
>
1
)
{
{
...
@@ -392,11 +381,13 @@ void MainInterface::visual()
...
@@ -392,11 +381,13 @@ void MainInterface::visual()
{
{
/* Show the background widget */
/* Show the background widget */
}
}
visualSelectorEnabled
=
true
;
}
}
else
else
{
{
/* Stop any currently running visualization */
/* Stop any currently running visualization */
visualSelector
->
hide
();
visualSelector
->
hide
();
visualSelectorEnabled
=
false
;
}
}
doComponentsUpdate
();
doComponentsUpdate
();
}
}
...
@@ -468,7 +459,8 @@ void MainInterface::undockPlaylist()
...
@@ -468,7 +459,8 @@ void MainInterface::undockPlaylist()
playlistEmbeddedFlag
=
false
;
playlistEmbeddedFlag
=
false
;
menuBar
()
->
clear
();
menuBar
()
->
clear
();
QVLCMenu
::
createMenuBar
(
this
,
p_intf
,
false
,
advControlsEnabled
);
QVLCMenu
::
createMenuBar
(
this
,
p_intf
,
false
,
advControlsEnabled
,
visualSelectorEnabled
);
if
(
videoIsActive
)
if
(
videoIsActive
)
{
{
...
@@ -489,7 +481,8 @@ void MainInterface::customEvent( QEvent *event )
...
@@ -489,7 +481,8 @@ void MainInterface::customEvent( QEvent *event )
PlaylistDialog
::
killInstance
();
PlaylistDialog
::
killInstance
();
playlistEmbeddedFlag
=
true
;
playlistEmbeddedFlag
=
true
;
menuBar
()
->
clear
();
menuBar
()
->
clear
();
QVLCMenu
::
createMenuBar
(
this
,
p_intf
,
true
,
advControlsEnabled
);
QVLCMenu
::
createMenuBar
(
this
,
p_intf
,
true
,
advControlsEnabled
,
visualSelectorEnabled
);
playlist
();
playlist
();
}
}
}
}
...
@@ -560,18 +553,7 @@ static bool b_my_volume;
...
@@ -560,18 +553,7 @@ static bool b_my_volume;
void
MainInterface
::
updateOnTimer
()
void
MainInterface
::
updateOnTimer
()
{
{
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
vlc_object_find
(
p_intf
,
/* \todo Make this event-driven */
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
/* Todo: make this event-driven */
if
(
p_aout
)
{
ui
.
visualButton
->
setEnabled
(
true
);
vlc_object_release
(
p_aout
);
}
else
ui
.
visualButton
->
setEnabled
(
false
);
/* And this too */
advControls
->
enableInput
(
THEMIM
->
getIM
()
->
hasInput
()
);
advControls
->
enableInput
(
THEMIM
->
getIM
()
->
hasInput
()
);
advControls
->
enableVideo
(
THEMIM
->
getIM
()
->
hasVideo
()
);
advControls
->
enableVideo
(
THEMIM
->
getIM
()
->
hasVideo
()
);
...
...
modules/gui/qt4/main_interface.hpp
View file @
141dd1d8
...
@@ -82,6 +82,7 @@ private:
...
@@ -82,6 +82,7 @@ private:
bool
videoEmbeddedFlag
;
bool
videoEmbeddedFlag
;
bool
alwaysVideoFlag
;
bool
alwaysVideoFlag
;
bool
advControlsEnabled
;
bool
advControlsEnabled
;
bool
visualSelectorEnabled
;
InputManager
*
main_input_manager
;
InputManager
*
main_input_manager
;
InputSlider
*
slider
;
InputSlider
*
slider
;
...
...
modules/gui/qt4/menus.cpp
View file @
141dd1d8
...
@@ -120,7 +120,8 @@ static int AudioAutoMenuBuilder( vlc_object_t *p_object,
...
@@ -120,7 +120,8 @@ static int AudioAutoMenuBuilder( vlc_object_t *p_object,
THEDP->menusUpdateMapper->setMapping( menu, f ); }
THEDP->menusUpdateMapper->setMapping( menu, f ); }
void
QVLCMenu
::
createMenuBar
(
MainInterface
*
mi
,
intf_thread_t
*
p_intf
,
void
QVLCMenu
::
createMenuBar
(
MainInterface
*
mi
,
intf_thread_t
*
p_intf
,
bool
playlist
,
bool
adv_controls_enabled
)
bool
playlist
,
bool
adv_controls_enabled
,
bool
visual_selector_enabled
)
{
{
QMenuBar
*
bar
=
mi
->
menuBar
();
QMenuBar
*
bar
=
mi
->
menuBar
();
BAR_ADD
(
FileMenu
(),
qtr
(
"Media"
)
);
BAR_ADD
(
FileMenu
(),
qtr
(
"Media"
)
);
...
@@ -128,7 +129,8 @@ void QVLCMenu::createMenuBar( MainInterface *mi, intf_thread_t *p_intf,
...
@@ -128,7 +129,8 @@ void QVLCMenu::createMenuBar( MainInterface *mi, intf_thread_t *p_intf,
{
{
BAR_ADD
(
PlaylistMenu
(
mi
,
p_intf
),
qtr
(
"Playlist"
)
);
BAR_ADD
(
PlaylistMenu
(
mi
,
p_intf
),
qtr
(
"Playlist"
)
);
}
}
BAR_ADD
(
ToolsMenu
(
p_intf
,
mi
,
adv_controls_enabled
),
qtr
(
"Tools"
)
);
BAR_ADD
(
ToolsMenu
(
p_intf
,
mi
,
adv_controls_enabled
,
visual_selector_enabled
),
qtr
(
"Tools"
)
);
BAR_DADD
(
VideoMenu
(
p_intf
,
NULL
),
qtr
(
"Video"
),
1
);
BAR_DADD
(
VideoMenu
(
p_intf
,
NULL
),
qtr
(
"Video"
),
1
);
BAR_DADD
(
AudioMenu
(
p_intf
,
NULL
),
qtr
(
"Audio"
),
2
);
BAR_DADD
(
AudioMenu
(
p_intf
,
NULL
),
qtr
(
"Audio"
),
2
);
BAR_DADD
(
NavigMenu
(
p_intf
,
NULL
),
qtr
(
"Navigation"
),
3
);
BAR_DADD
(
NavigMenu
(
p_intf
,
NULL
),
qtr
(
"Navigation"
),
3
);
...
@@ -162,7 +164,8 @@ QMenu *QVLCMenu::PlaylistMenu( MainInterface *mi, intf_thread_t *p_intf )
...
@@ -162,7 +164,8 @@ QMenu *QVLCMenu::PlaylistMenu( MainInterface *mi, intf_thread_t *p_intf )
}
}
QMenu
*
QVLCMenu
::
ToolsMenu
(
intf_thread_t
*
p_intf
,
MainInterface
*
mi
,
QMenu
*
QVLCMenu
::
ToolsMenu
(
intf_thread_t
*
p_intf
,
MainInterface
*
mi
,
bool
adv_controls_enabled
,
bool
with_intf
)
bool
adv_controls_enabled
,
bool
visual_selector_enabled
,
bool
with_intf
)
{
{
QMenu
*
menu
=
new
QMenu
();
QMenu
*
menu
=
new
QMenu
();
if
(
with_intf
)
if
(
with_intf
)
...
@@ -183,6 +186,10 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, MainInterface *mi,
...
@@ -183,6 +186,10 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, MainInterface *mi,
mi
,
SLOT
(
advanced
()
)
);
mi
,
SLOT
(
advanced
()
)
);
adv
->
setCheckable
(
true
);
adv
->
setCheckable
(
true
);
if
(
adv_controls_enabled
)
adv
->
setChecked
(
true
);
if
(
adv_controls_enabled
)
adv
->
setChecked
(
true
);
adv
=
menu
->
addAction
(
qtr
(
"Visualizations selector"
),
mi
,
SLOT
(
visual
()
)
);
adv
->
setCheckable
(
true
);
if
(
visual_selector_enabled
)
adv
->
setChecked
(
true
);
}
}
menu
->
addSeparator
();
menu
->
addSeparator
();
DP_SADD
(
qtr
(
"Preferences"
),
""
,
""
,
prefsDialog
()
);
DP_SADD
(
qtr
(
"Preferences"
),
""
,
""
,
prefsDialog
()
);
...
...
modules/gui/qt4/menus.hpp
View file @
141dd1d8
...
@@ -58,13 +58,13 @@ class QVLCMenu : public QObject
...
@@ -58,13 +58,13 @@ class QVLCMenu : public QObject
{
{
Q_OBJECT
;
Q_OBJECT
;
public:
public:
static
void
createMenuBar
(
MainInterface
*
mi
,
intf_thread_t
*
,
bool
,
bool
);
static
void
createMenuBar
(
MainInterface
*
mi
,
intf_thread_t
*
,
bool
,
bool
,
bool
);
/* Menus */
/* Menus */
static
QMenu
*
FileMenu
();
static
QMenu
*
FileMenu
();
static
QMenu
*
SDMenu
(
intf_thread_t
*
);
static
QMenu
*
SDMenu
(
intf_thread_t
*
);
static
QMenu
*
PlaylistMenu
(
MainInterface
*
,
intf_thread_t
*
);
static
QMenu
*
PlaylistMenu
(
MainInterface
*
,
intf_thread_t
*
);
static
QMenu
*
ToolsMenu
(
intf_thread_t
*
,
MainInterface
*
,
bool
,
static
QMenu
*
ToolsMenu
(
intf_thread_t
*
,
MainInterface
*
,
bool
,
bool
,
bool
with
=
true
);
bool
with
=
true
);
static
QMenu
*
NavigMenu
(
intf_thread_t
*
,
QMenu
*
);
static
QMenu
*
NavigMenu
(
intf_thread_t
*
,
QMenu
*
);
static
QMenu
*
VideoMenu
(
intf_thread_t
*
,
QMenu
*
);
static
QMenu
*
VideoMenu
(
intf_thread_t
*
,
QMenu
*
);
...
...
modules/gui/qt4/ui/main_interface.ui
View file @
141dd1d8
...
@@ -209,13 +209,6 @@
...
@@ -209,13 +209,6 @@
</property>
</property>
</widget>
</widget>
</item>
</item>
<item>
<widget class="QPushButton" name="visualButton" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item>
<item>
<widget class="QPushButton" name="playlistButton" >
<widget class="QPushButton" name="playlistButton" >
<property name="text" >
<property name="text" >
...
...
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