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
1497d96c
Commit
1497d96c
authored
Feb 14, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: the Add button on playlist panel is gone
parent
0c323ab0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
54 deletions
+4
-54
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+4
-52
modules/gui/qt4/components/playlist/standardpanel.hpp
modules/gui/qt4/components/playlist/standardpanel.hpp
+0
-2
No files found.
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
1497d96c
...
@@ -77,12 +77,12 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
...
@@ -77,12 +77,12 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
locationBar
=
new
LocationBar
(
model
);
locationBar
=
new
LocationBar
(
model
);
locationBar
->
setSizePolicy
(
QSizePolicy
::
Maximum
,
QSizePolicy
::
Preferred
);
locationBar
->
setSizePolicy
(
QSizePolicy
::
Maximum
,
QSizePolicy
::
Preferred
);
layout
->
addWidget
(
locationBar
,
0
,
1
);
layout
->
addWidget
(
locationBar
,
0
,
0
);
layout
->
setColumnStretch
(
1
,
100
);
layout
->
setColumnStretch
(
0
,
100
);
CONNECT
(
locationBar
,
invoked
(
const
QModelIndex
&
),
CONNECT
(
locationBar
,
invoked
(
const
QModelIndex
&
),
this
,
browseInto
(
const
QModelIndex
&
)
);
this
,
browseInto
(
const
QModelIndex
&
)
);
layout
->
setColumnStretch
(
2
,
1
);
layout
->
setColumnStretch
(
1
,
1
);
searchEdit
=
new
SearchLineEdit
(
this
);
searchEdit
=
new
SearchLineEdit
(
this
);
searchEdit
->
setMaximumWidth
(
250
);
searchEdit
->
setMaximumWidth
(
250
);
...
@@ -92,17 +92,10 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
...
@@ -92,17 +92,10 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
this
,
search
(
const
QString
&
)
);
this
,
search
(
const
QString
&
)
);
layout
->
setColumnStretch
(
3
,
50
);
layout
->
setColumnStretch
(
3
,
50
);
/* Add item to the playlist button */
addButton
=
new
QToolButton
;
addButton
->
setIcon
(
QIcon
(
":/buttons/playlist/playlist_add"
)
);
addButton
->
setMaximumWidth
(
30
);
BUTTONACT
(
addButton
,
popupAdd
()
);
layout
->
addWidget
(
addButton
,
0
,
0
);
/* Button to switch views */
/* Button to switch views */
QToolButton
*
viewButton
=
new
QToolButton
(
this
);
QToolButton
*
viewButton
=
new
QToolButton
(
this
);
viewButton
->
setIcon
(
style
()
->
standardIcon
(
QStyle
::
SP_FileDialogDetailedView
)
);
viewButton
->
setIcon
(
style
()
->
standardIcon
(
QStyle
::
SP_FileDialogDetailedView
)
);
layout
->
addWidget
(
viewButton
,
0
,
4
);
layout
->
addWidget
(
viewButton
,
0
,
2
);
/* View selection menu */
/* View selection menu */
viewSelectionMapper
=
new
QSignalMapper
(
this
);
viewSelectionMapper
=
new
QSignalMapper
(
this
);
...
@@ -168,48 +161,7 @@ void StandardPLPanel::handleExpansion( const QModelIndex& index )
...
@@ -168,48 +161,7 @@ void StandardPLPanel::handleExpansion( const QModelIndex& index )
void
StandardPLPanel
::
handleRootChange
()
void
StandardPLPanel
::
handleRootChange
()
{
{
/* needed for popupAdd() */
PLItem
*
root
=
model
->
getItem
(
QModelIndex
()
);
currentRootId
=
root
->
id
();
browseInto
();
browseInto
();
/* enable/disable adding */
if
(
currentRootId
==
THEPL
->
p_playing
->
i_id
)
{
addButton
->
setEnabled
(
true
);
addButton
->
setToolTip
(
qtr
(
I_PL_ADDPL
)
);
}
else
if
(
THEPL
->
p_media_library
&&
currentRootId
==
THEPL
->
p_media_library
->
i_id
)
{
addButton
->
setEnabled
(
true
);
addButton
->
setToolTip
(
qtr
(
I_PL_ADDML
)
);
}
else
addButton
->
setEnabled
(
false
);
}
/* PopupAdd Menu for the Add Menu */
void
StandardPLPanel
::
popupAdd
()
{
QMenu
popup
;
if
(
currentRootId
==
THEPL
->
p_playing
->
i_id
)
{
popup
.
addAction
(
qtr
(
I_PL_ADDF
),
THEDP
,
SLOT
(
simplePLAppendDialog
())
);
popup
.
addAction
(
qtr
(
I_PL_ADDDIR
),
THEDP
,
SLOT
(
PLAppendDir
())
);
popup
.
addAction
(
qtr
(
I_OP_ADVOP
),
THEDP
,
SLOT
(
PLAppendDialog
())
);
}
else
if
(
THEPL
->
p_media_library
&&
currentRootId
==
THEPL
->
p_media_library
->
i_id
)
{
popup
.
addAction
(
qtr
(
I_PL_ADDF
),
THEDP
,
SLOT
(
simpleMLAppendDialog
())
);
popup
.
addAction
(
qtr
(
I_PL_ADDDIR
),
THEDP
,
SLOT
(
MLAppendDir
()
)
);
popup
.
addAction
(
qtr
(
I_OP_ADVOP
),
THEDP
,
SLOT
(
MLAppendDialog
()
)
);
}
popup
.
exec
(
QCursor
::
pos
()
-
addButton
->
mapFromGlobal
(
QCursor
::
pos
()
)
+
QPoint
(
0
,
addButton
->
height
()
)
);
}
}
void
StandardPLPanel
::
popupPlView
(
const
QPoint
&
point
)
void
StandardPLPanel
::
popupPlView
(
const
QPoint
&
point
)
...
...
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
1497d96c
...
@@ -74,7 +74,6 @@ private:
...
@@ -74,7 +74,6 @@ private:
QWidget
*
parent
;
QWidget
*
parent
;
QLabel
*
title
;
QLabel
*
title
;
QToolButton
*
addButton
;
QGridLayout
*
layout
;
QGridLayout
*
layout
;
LocationBar
*
locationBar
;
LocationBar
*
locationBar
;
SearchLineEdit
*
searchEdit
;
SearchLineEdit
*
searchEdit
;
...
@@ -109,7 +108,6 @@ private slots:
...
@@ -109,7 +108,6 @@ private slots:
void
handleRootChange
();
void
handleRootChange
();
void
gotoPlayingItem
();
void
gotoPlayingItem
();
void
search
(
const
QString
&
searchText
);
void
search
(
const
QString
&
searchText
);
void
popupAdd
();
void
popupSelectColumn
(
QPoint
);
void
popupSelectColumn
(
QPoint
);
void
popupPlView
(
const
QPoint
&
);
void
popupPlView
(
const
QPoint
&
);
void
toggleColumnShown
(
int
);
void
toggleColumnShown
(
int
);
...
...
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