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
346b6cdf
Commit
346b6cdf
authored
Sep 12, 2009
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4: refactor, remove nonsense & re-enable popup-adding items to playlist
parent
5ce7c2e0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
39 deletions
+29
-39
modules/gui/qt4/components/playlist/panels.hpp
modules/gui/qt4/components/playlist/panels.hpp
+0
-1
modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.cpp
+1
-7
modules/gui/qt4/components/playlist/playlist.hpp
modules/gui/qt4/components/playlist/playlist.hpp
+0
-3
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+28
-28
No files found.
modules/gui/qt4/components/playlist/panels.hpp
View file @
346b6cdf
...
@@ -90,7 +90,6 @@ private slots:
...
@@ -90,7 +90,6 @@ private slots:
void
gotoPlayingItem
();
void
gotoPlayingItem
();
void
doPopup
(
QModelIndex
index
,
QPoint
point
);
void
doPopup
(
QModelIndex
index
,
QPoint
point
);
void
search
(
const
QString
&
searchText
);
void
search
(
const
QString
&
searchText
);
void
setCurrentRootId
(
playlist_item_t
*
);
void
popupAdd
();
void
popupAdd
();
void
popupSelectColumn
(
QPoint
);
void
popupSelectColumn
(
QPoint
);
void
toggleColumnShown
(
int
);
void
toggleColumnShown
(
int
);
...
...
modules/gui/qt4/components/playlist/playlist.cpp
View file @
346b6cdf
...
@@ -80,13 +80,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i ) : p_intf ( _p_i )
...
@@ -80,13 +80,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i ) : p_intf ( _p_i )
CONNECT
(
selector
,
activated
(
playlist_item_t
*
),
CONNECT
(
selector
,
activated
(
playlist_item_t
*
),
rightPanel
,
setRoot
(
playlist_item_t
*
)
);
rightPanel
,
setRoot
(
playlist_item_t
*
)
);
/* Connect the activated() to the rootChanged() signal
rightPanel
->
setRoot
(
p_root
);
This will be used by StandardPLPanel to setCurrentRootId, that will
change the label of the addButton */
connect
(
selector
,
SIGNAL
(
activated
(
playlist_item_t
*
)
),
this
,
SIGNAL
(
rootChanged
(
playlist_item_t
*
)
)
);
emit
rootChanged
(
p_root
);
/* Add the two sides of the QSplitter */
/* Add the two sides of the QSplitter */
addWidget
(
leftW
);
addWidget
(
leftW
);
...
...
modules/gui/qt4/components/playlist/playlist.hpp
View file @
346b6cdf
...
@@ -60,9 +60,6 @@ protected:
...
@@ -60,9 +60,6 @@ protected:
virtual
void
dropEvent
(
QDropEvent
*
);
virtual
void
dropEvent
(
QDropEvent
*
);
virtual
void
dragEnterEvent
(
QDragEnterEvent
*
);
virtual
void
dragEnterEvent
(
QDragEnterEvent
*
);
virtual
void
closeEvent
(
QCloseEvent
*
);
virtual
void
closeEvent
(
QCloseEvent
*
);
signals:
void
rootChanged
(
playlist_item_t
*
);
};
};
class
ArtLabel
:
public
CoverArtLabel
class
ArtLabel
:
public
CoverArtLabel
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
346b6cdf
...
@@ -107,8 +107,6 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
...
@@ -107,8 +107,6 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
this
,
handleExpansion
(
const
QModelIndex
&
)
);
this
,
handleExpansion
(
const
QModelIndex
&
)
);
currentRootId
=
-
1
;
currentRootId
=
-
1
;
CONNECT
(
parent
,
rootChanged
(
playlist_item_t
*
),
this
,
setCurrentRootId
(
playlist_item_t
*
)
);
/* Buttons configuration */
/* Buttons configuration */
QHBoxLayout
*
buttons
=
new
QHBoxLayout
;
QHBoxLayout
*
buttons
=
new
QHBoxLayout
;
...
@@ -228,31 +226,6 @@ void StandardPLPanel::handleExpansion( const QModelIndex& index )
...
@@ -228,31 +226,6 @@ void StandardPLPanel::handleExpansion( const QModelIndex& index )
view
->
scrollTo
(
index
);
view
->
scrollTo
(
index
);
}
}
void
StandardPLPanel
::
setCurrentRootId
(
playlist_item_t
*
p_item
)
{
if
(
p_item
==
THEPL
->
p_local_category
||
p_item
==
THEPL
->
p_local_onelevel
)
{
addButton
->
setEnabled
(
true
);
addButton
->
setToolTip
(
qtr
(
I_PL_ADDPL
)
);
}
else
if
(
(
THEPL
->
p_ml_category
&&
p_item
==
THEPL
->
p_ml_category
)
||
(
THEPL
->
p_ml_onelevel
&&
p_item
==
THEPL
->
p_ml_onelevel
)
)
{
addButton
->
setEnabled
(
true
);
addButton
->
setToolTip
(
qtr
(
I_PL_ADDML
)
);
}
else
addButton
->
setEnabled
(
false
);
/* <jleben> do we need to lock here? */
playlist_Lock
(
THEPL
);
char
*
psz_title
=
input_item_GetName
(
p_item
->
p_input
);
title
->
setText
(
psz_title
);
free
(
psz_title
);
playlist_Unlock
(
THEPL
);
}
/* PopupAdd Menu for the Add Menu */
/* PopupAdd Menu for the Add Menu */
void
StandardPLPanel
::
popupAdd
()
void
StandardPLPanel
::
popupAdd
()
{
{
...
@@ -320,11 +293,38 @@ void StandardPLPanel::doPopup( QModelIndex index, QPoint point )
...
@@ -320,11 +293,38 @@ void StandardPLPanel::doPopup( QModelIndex index, QPoint point )
void
StandardPLPanel
::
setRoot
(
playlist_item_t
*
p_item
)
void
StandardPLPanel
::
setRoot
(
playlist_item_t
*
p_item
)
{
{
QPL_LOCK
;
QPL_LOCK
;
p_item
=
playlist_GetPreferredNode
(
THEPL
,
p_item
);
assert
(
p_item
);
assert
(
p_item
);
p_item
=
playlist_GetPreferredNode
(
THEPL
,
p_item
);
/* needed for popupAdd() */
currentRootId
=
p_item
->
i_id
;
/* cosmetics, ..still need playlist locking.. */
char
*
psz_title
=
input_item_GetName
(
p_item
->
p_input
);
title
->
setText
(
psz_title
);
free
(
psz_title
);
QPL_UNLOCK
;
QPL_UNLOCK
;
/* do THE job */
model
->
rebuild
(
p_item
);
model
->
rebuild
(
p_item
);
/* enable/disable adding */
if
(
p_item
==
THEPL
->
p_local_category
||
p_item
==
THEPL
->
p_local_onelevel
)
{
addButton
->
setEnabled
(
true
);
addButton
->
setToolTip
(
qtr
(
I_PL_ADDPL
)
);
}
else
if
(
(
THEPL
->
p_ml_category
&&
p_item
==
THEPL
->
p_ml_category
)
||
(
THEPL
->
p_ml_onelevel
&&
p_item
==
THEPL
->
p_ml_onelevel
)
)
{
addButton
->
setEnabled
(
true
);
addButton
->
setToolTip
(
qtr
(
I_PL_ADDML
)
);
}
else
addButton
->
setEnabled
(
false
);
}
}
void
StandardPLPanel
::
removeItem
(
int
i_id
)
void
StandardPLPanel
::
removeItem
(
int
i_id
)
...
...
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