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
c7014883
Commit
c7014883
authored
Apr 21, 2011
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Apr 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4: Allow the title to be configured.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
96443b23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
23 deletions
+7
-23
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+7
-23
No files found.
modules/gui/qt4/input_manager.cpp
View file @
c7014883
...
...
@@ -32,6 +32,7 @@
#include "input_manager.hpp"
#include <vlc_keys.h>
#include <vlc_url.h>
#include <vlc_strings.h>
#include <QApplication>
...
...
@@ -457,35 +458,18 @@ void InputManager::UpdateName()
/* Update text, name and nowplaying */
QString
text
;
/* Try to get the Title, then the Name */
char
*
psz_name
=
input_item_GetTitleFbName
(
input_GetItem
(
p_input
)
);
/* Try to get the nowplaying */
char
*
psz_nowplaying
=
input_item_GetNowPlaying
(
input_GetItem
(
p_input
)
);
if
(
!
EMPTY_STR
(
psz_nowplaying
)
)
{
text
.
sprintf
(
"%s - %s"
,
psz_nowplaying
,
psz_name
);
}
else
/* Do it ourself */
{
char
*
psz_artist
=
input_item_GetArtist
(
input_GetItem
(
p_input
)
);
if
(
!
EMPTY_STR
(
psz_artist
)
)
text
.
sprintf
(
"%s - %s"
,
psz_artist
,
psz_name
);
else
text
.
sprintf
(
"%s"
,
psz_name
);
free
(
psz_artist
);
}
char
*
format
=
var_InheritString
(
p_intf
,
"input-title-format"
);
char
*
formated
=
str_format_meta
(
p_input
,
format
);
text
=
formated
;
/* Free everything */
free
(
psz_name
);
free
(
psz_nowplaying
);
free
(
format
);
free
(
formated
);
/* If we have Nothing */
if
(
text
.
isEmpty
()
)
{
psz_name
=
input_item_GetURI
(
input_GetItem
(
p_input
)
);
char
*
psz_name
=
input_item_GetURI
(
input_GetItem
(
p_input
)
);
text
.
sprintf
(
"%s"
,
psz_name
);
text
=
text
.
remove
(
0
,
text
.
lastIndexOf
(
DIR_SEP
)
+
1
);
free
(
psz_name
);
...
...
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