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
f2f7fd69
Commit
f2f7fd69
authored
May 18, 2014
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: add a new class helper to open files
parent
643b9dbc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
modules/gui/qt4/recents.cpp
modules/gui/qt4/recents.cpp
+16
-0
modules/gui/qt4/recents.hpp
modules/gui/qt4/recents.hpp
+9
-0
No files found.
modules/gui/qt4/recents.cpp
View file @
f2f7fd69
...
...
@@ -22,6 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "qt4.hpp"
#include "recents.hpp"
#include "dialogs_provider.hpp"
#include "menus.hpp"
...
...
@@ -161,3 +162,18 @@ playlist_item_t *RecentsMRL::toPlaylist(int length)
return
p_node_recent
;
}
void
Open
::
openMRL
(
intf_thread_t
*
p_intf
,
const
QString
&
mrl
,
bool
b_start
,
bool
b_playlist
)
{
playlist_Add
(
THEPL
,
qtu
(
mrl
),
NULL
,
PLAYLIST_APPEND
|
(
b_start
?
PLAYLIST_GO
:
PLAYLIST_PREPARSE
),
PLAYLIST_END
,
b_playlist
,
pl_Unlocked
);
if
(
b_start
&&
b_playlist
)
RecentsMRL
::
getInstance
(
p_intf
)
->
addRecent
(
mrl
);
}
modules/gui/qt4/recents.hpp
View file @
f2f7fd69
...
...
@@ -35,6 +35,15 @@ class QSignalMapper;
#define RECENTS_LIST_SIZE 10
class
Open
{
public:
void
static
openMRL
(
intf_thread_t
*
,
const
QString
&
,
bool
b_start
=
true
,
bool
b_playlist
=
true
);
};
class
RecentsMRL
:
public
QObject
,
public
Singleton
<
RecentsMRL
>
{
Q_OBJECT
...
...
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