Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
JuK
Commits
64081847
Commit
64081847
authored
May 02, 2006
by
Stephan Kulow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deprecated
svn path=/trunk/KDE/kdemultimedia/juk/; revision=536733
parent
4d301462
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
39 additions
and
33 deletions
+39
-33
artsplayer.h
artsplayer.h
+1
-1
filerenamer.cpp
filerenamer.cpp
+2
-2
gstreamerplayer.h
gstreamerplayer.h
+1
-1
ktrm.h
ktrm.h
+1
-1
playermanager.cpp
playermanager.cpp
+5
-5
playlistcollection.cpp
playlistcollection.cpp
+1
-1
playlistitem.cpp
playlistitem.cpp
+3
-3
playlistsearch.cpp
playlistsearch.cpp
+3
-3
searchwidget.cpp
searchwidget.cpp
+4
-2
slideraction.cpp
slideraction.cpp
+1
-1
tag.cpp
tag.cpp
+2
-2
tageditor.cpp
tageditor.cpp
+8
-4
tagguesser.cpp
tagguesser.cpp
+5
-5
viewmode.cpp
viewmode.cpp
+2
-2
No files found.
artsplayer.h
View file @
64081847
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include <config.h>
#include <config.h>
#if HAVE_ARTS
#if
def
HAVE_ARTS
#include "player.h"
#include "player.h"
...
...
filerenamer.cpp
View file @
64081847
...
@@ -274,7 +274,7 @@ void FileRenamerWidget::loadConfig()
...
@@ -274,7 +274,7 @@ void FileRenamerWidget::loadConfig()
checkedSeparators
=
config
.
readEntry
(
"CheckedDirSeparators"
,
QList
<
int
>
());
checkedSeparators
=
config
.
readEntry
(
"CheckedDirSeparators"
,
QList
<
int
>
());
for
(
QList
<
int
>::
ConstIterator
it
=
checkedSeparators
.
begin
();
for
(
QList
<
int
>::
ConstIterator
it
=
checkedSeparators
.
begin
();
it
!=
checkedSeparators
.
end
();
++
it
)
it
!=
checkedSeparators
.
end
();
++
it
)
{
{
...
@@ -947,7 +947,7 @@ void FileRenamer::setFolderIcon(const KUrl &dst, const PlaylistItem *item)
...
@@ -947,7 +947,7 @@ void FileRenamer::setFolderIcon(const KUrl &dst, const PlaylistItem *item)
path
.
append
(
"/"
+
(
*
it
));
path
.
append
(
"/"
+
(
*
it
));
kDebug
()
<<
"Checking path: "
<<
path
<<
endl
;
kDebug
()
<<
"Checking path: "
<<
path
<<
endl
;
if
((
*
it
).
f
in
d
(
item
->
file
().
tag
()
->
album
())
!=
-
1
&&
if
((
*
it
).
conta
in
s
(
item
->
file
().
tag
()
->
album
()
)
&&
!
QFile
::
exists
(
path
+
"/.directory"
))
!
QFile
::
exists
(
path
+
"/.directory"
))
{
{
// Seems to be a match, let's set the folder icon for the current
// Seems to be a match, let's set the folder icon for the current
...
...
gstreamerplayer.h
View file @
64081847
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
#include "config.h"
#include "config.h"
#if HAVE_GSTREAMER
#if
def
HAVE_GSTREAMER
#include <gst/gst.h>
#include <gst/gst.h>
#include <qstring.h>
#include <qstring.h>
...
...
ktrm.h
View file @
64081847
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include <config.h>
#include <config.h>
#if HAVE_TUNEPIMP
#if
def
HAVE_TUNEPIMP
#include <qstring.h>
#include <qstring.h>
#include <q3valuelist.h>
#include <q3valuelist.h>
...
...
playermanager.cpp
View file @
64081847
...
@@ -66,18 +66,18 @@ static Player *createPlayer(int system = ArtsBackend)
...
@@ -66,18 +66,18 @@ static Player *createPlayer(int system = ArtsBackend)
p
=
new
aKodePlayer
;
p
=
new
aKodePlayer
;
break
;
break
;
#endif
#endif
#if HAVE_ARTS
#if
def
HAVE_ARTS
case
ArtsBackend
:
case
ArtsBackend
:
p
=
new
ArtsPlayer
;
p
=
new
ArtsPlayer
;
break
;
break
;
#endif
#endif
#if HAVE_GSTREAMER
#if
def
HAVE_GSTREAMER
case
GStreamerBackend
:
case
GStreamerBackend
:
p
=
new
GStreamerPlayer
;
p
=
new
GStreamerPlayer
;
break
;
break
;
#endif
#endif
default:
default:
#if HAVE_ARTS
#if
def
HAVE_ARTS
p
=
new
ArtsPlayer
;
p
=
new
ArtsPlayer
;
#elif HAVE_GSTREAMER
#elif HAVE_GSTREAMER
p
=
new
GStreamerPlayer
;
p
=
new
GStreamerPlayer
;
...
@@ -247,10 +247,10 @@ KSelectAction *PlayerManager::playerSelectAction() // static
...
@@ -247,10 +247,10 @@ KSelectAction *PlayerManager::playerSelectAction() // static
new
KSelectAction
(
i18n
(
"&Output To"
),
ActionCollection
::
actions
(),
"outputSelect"
);
new
KSelectAction
(
i18n
(
"&Output To"
),
ActionCollection
::
actions
(),
"outputSelect"
);
QStringList
l
;
QStringList
l
;
#if HAVE_ARTS
#if
def
HAVE_ARTS
l
.
append
(
i18n
(
"aRts"
));
l
.
append
(
i18n
(
"aRts"
));
#endif
#endif
#if HAVE_GSTREAMER
#if
def
HAVE_GSTREAMER
l
.
append
(
i18n
(
"GStreamer"
));
l
.
append
(
i18n
(
"GStreamer"
));
#endif
#endif
#ifdef HAVE_AKODE
#ifdef HAVE_AKODE
...
...
playlistcollection.cpp
View file @
64081847
...
@@ -509,7 +509,7 @@ void PlaylistCollection::createFolderPlaylist()
...
@@ -509,7 +509,7 @@ void PlaylistCollection::createFolderPlaylist()
if
(
folder
.
isEmpty
())
if
(
folder
.
isEmpty
())
return
;
return
;
QString
name
=
uniquePlaylistName
(
folder
.
mid
(
folder
.
findRev
(
'/'
)
+
1
));
QString
name
=
uniquePlaylistName
(
folder
.
mid
(
folder
.
lastIndexOf
(
'/'
)
+
1
));
name
=
playlistNameDialog
(
i18n
(
"Create Folder Playlist"
),
name
);
name
=
playlistNameDialog
(
i18n
(
"Create Folder Playlist"
),
name
);
if
(
!
name
.
isNull
())
if
(
!
name
.
isNull
())
...
...
playlistitem.cpp
View file @
64081847
...
@@ -275,10 +275,10 @@ void PlaylistItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int
...
@@ -275,10 +275,10 @@ void PlaylistItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int
if
(
!
m_playingItems
.
contains
(
this
))
if
(
!
m_playingItems
.
contains
(
this
))
return
K3ListViewItem
::
paintCell
(
p
,
cg
,
column
,
width
,
align
);
return
K3ListViewItem
::
paintCell
(
p
,
cg
,
column
,
width
,
align
);
Q
ColorGroup
colorGroup
=
cg
;
Q
Palette
colorGroup
=
cg
;
QColor
base
=
colorGroup
.
b
ase
(
);
QColor
base
=
colorGroup
.
color
(
QPalette
::
B
ase
);
QColor
selection
=
colorGroup
.
h
ighlight
(
);
QColor
selection
=
colorGroup
.
color
(
QPalette
::
H
ighlight
);
int
r
=
(
base
.
red
()
+
selection
.
red
())
/
2
;
int
r
=
(
base
.
red
()
+
selection
.
red
())
/
2
;
int
b
=
(
base
.
blue
()
+
selection
.
blue
())
/
2
;
int
b
=
(
base
.
blue
()
+
selection
.
blue
())
/
2
;
...
...
playlistsearch.cpp
View file @
64081847
...
@@ -197,7 +197,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
...
@@ -197,7 +197,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
for
(
ColumnList
::
Iterator
it
=
m_columns
.
begin
();
it
!=
m_columns
.
end
();
++
it
)
{
for
(
ColumnList
::
Iterator
it
=
m_columns
.
begin
();
it
!=
m_columns
.
end
();
++
it
)
{
if
(
m_re
)
{
if
(
m_re
)
{
if
(
item
->
text
(
*
it
).
f
in
d
(
m_queryRe
)
>
-
1
)
if
(
item
->
text
(
*
it
).
conta
in
s
(
m_queryRe
))
return
true
;
return
true
;
else
else
break
;
break
;
...
@@ -205,7 +205,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
...
@@ -205,7 +205,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
switch
(
m_mode
)
{
switch
(
m_mode
)
{
case
Contains
:
case
Contains
:
if
(
item
->
text
(
*
it
).
f
in
d
(
m_query
,
0
,
m_caseSensitive
)
>
-
1
)
if
(
item
->
text
(
*
it
).
conta
in
s
(
m_query
,
m_caseSensitive
?
Qt
::
CaseSensitive
:
Qt
::
CaseInsensitive
)
)
return
true
;
return
true
;
break
;
break
;
case
Exact
:
case
Exact
:
...
@@ -221,7 +221,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
...
@@ -221,7 +221,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
case
ContainsWord
:
case
ContainsWord
:
{
{
QString
s
=
item
->
text
(
*
it
);
QString
s
=
item
->
text
(
*
it
);
int
i
=
s
.
f
ind
(
m_query
,
0
,
m_caseSensitive
);
int
i
=
s
.
ind
exOf
(
m_query
,
0
,
m_caseSensitive
?
Qt
::
CaseSensitive
:
Qt
::
CaseInsensitive
);
if
(
i
>=
0
)
{
if
(
i
>=
0
)
{
...
...
searchwidget.cpp
View file @
64081847
...
@@ -273,9 +273,11 @@ void SearchWidget::setupLayout()
...
@@ -273,9 +273,11 @@ void SearchWidget::setupLayout()
clearSearchButton
->
setTextLabel
(
i18n
(
"Clear Search"
),
true
);
clearSearchButton
->
setTextLabel
(
i18n
(
"Clear Search"
),
true
);
clearSearchButton
->
setIconSet
(
SmallIconSet
(
"locationbar_erase"
));
clearSearchButton
->
setIconSet
(
SmallIconSet
(
"locationbar_erase"
));
QLabel
*
label
=
new
QLabel
(
i18n
(
"Search:"
),
this
,
"kde toolbar widget"
);
QLabel
*
label
=
new
QLabel
(
i18n
(
"Search:"
),
this
);
label
->
setObjectName
(
"kde toolbar widget"
);
m_searchLine
=
new
SearchLine
(
this
,
true
,
"kde toolbar widget"
);
m_searchLine
=
new
SearchLine
(
this
,
true
);
m_searchLine
->
setObjectName
(
"kde toolbar widget"
);
label
->
setBuddy
(
m_searchLine
);
label
->
setBuddy
(
m_searchLine
);
...
...
slideraction.cpp
View file @
64081847
...
@@ -223,7 +223,7 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base
...
@@ -223,7 +223,7 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base
{
{
if
(
parent
)
{
if
(
parent
)
{
QWidget
*
base
=
new
QWidget
(
parent
);
QWidget
*
base
=
new
QWidget
(
parent
);
base
->
setBackground
Mod
e
(
parent
->
background
Mod
e
());
base
->
setBackground
Rol
e
(
parent
->
background
Rol
e
());
base
->
setName
(
"kde toolbar widget"
);
base
->
setName
(
"kde toolbar widget"
);
KToolBar
*
toolBar
=
dynamic_cast
<
KToolBar
*>
(
parent
);
KToolBar
*
toolBar
=
dynamic_cast
<
KToolBar
*>
(
parent
);
...
...
tag.cpp
View file @
64081847
...
@@ -245,8 +245,8 @@ void Tag::setup(TagLib::File *file)
...
@@ -245,8 +245,8 @@ void Tag::setup(TagLib::File *file)
m_lengthString
=
QString
::
number
(
minutes
)
+
(
seconds
>=
10
?
":"
:
":0"
)
+
QString
::
number
(
seconds
);
m_lengthString
=
QString
::
number
(
minutes
)
+
(
seconds
>=
10
?
":"
:
":0"
)
+
QString
::
number
(
seconds
);
if
(
m_title
.
isEmpty
())
{
if
(
m_title
.
isEmpty
())
{
int
i
=
m_fileName
.
findRev
(
'/'
);
int
i
=
m_fileName
.
lastIndexOf
(
'/'
);
int
j
=
m_fileName
.
findRev
(
'.'
);
int
j
=
m_fileName
.
lastIndexOf
(
'.'
);
m_title
=
i
>
0
?
m_fileName
.
mid
(
i
+
1
,
j
-
i
-
1
)
:
m_fileName
;
m_title
=
i
>
0
?
m_fileName
.
mid
(
i
+
1
,
j
-
i
-
1
)
:
m_fileName
;
}
}
...
...
tageditor.cpp
View file @
64081847
...
@@ -67,7 +67,7 @@ public:
...
@@ -67,7 +67,7 @@ public:
virtual
State
validate
(
QString
&
s
,
int
&
)
const
virtual
State
validate
(
QString
&
s
,
int
&
)
const
{
{
if
(
s
.
f
in
d
(
'/'
)
!=
-
1
)
if
(
s
.
conta
in
s
(
'/'
))
return
Invalid
;
return
Invalid
;
return
Acceptable
;
return
Acceptable
;
}
}
...
@@ -546,7 +546,9 @@ void TagEditor::setupLayout()
...
@@ -546,7 +546,9 @@ void TagEditor::setupLayout()
QLabel
*
fileNameIcon
=
new
QLabel
(
this
);
QLabel
*
fileNameIcon
=
new
QLabel
(
this
);
fileNameIcon
->
setPixmap
(
SmallIcon
(
"sound"
));
fileNameIcon
->
setPixmap
(
SmallIcon
(
"sound"
));
QWidget
*
fileNameLabel
=
addHidden
(
new
QLabel
(
m_fileNameBox
,
i18n
(
"&File name:"
),
this
));
QLabel
*
tmp
=
new
QLabel
(
i18n
(
"&File name:"
),
this
);
tmp
->
setBuddy
(
m_fileNameBox
);
QWidget
*
fileNameLabel
=
addHidden
(
tmp
);
fileNameLayout
->
addWidget
(
addHidden
(
fileNameIcon
));
fileNameLayout
->
addWidget
(
addHidden
(
fileNameIcon
));
fileNameLayout
->
addWidget
(
fileNameLabel
);
fileNameLayout
->
addWidget
(
fileNameLabel
);
...
@@ -739,8 +741,10 @@ void TagEditor::addItem(const QString &text, QWidget *item, QBoxLayout *layout,
...
@@ -739,8 +741,10 @@ void TagEditor::addItem(const QString &text, QWidget *item, QBoxLayout *layout,
if
(
!
item
||
!
layout
)
if
(
!
item
||
!
layout
)
return
;
return
;
QLabel
*
label
=
new
QLabel
(
item
,
text
,
this
);
QLabel
*
label
=
new
QLabel
(
text
,
this
);
QLabel
*
iconLabel
=
new
QLabel
(
item
,
0
,
this
);
label
->
setBuddy
(
item
);
QLabel
*
iconLabel
=
new
QLabel
(
0
,
this
);
iconLabel
->
setBuddy
(
item
);
if
(
!
iconName
.
isNull
())
if
(
!
iconName
.
isNull
())
iconLabel
->
setPixmap
(
SmallIcon
(
iconName
));
iconLabel
->
setPixmap
(
SmallIcon
(
iconName
));
...
...
tagguesser.cpp
View file @
64081847
...
@@ -24,7 +24,7 @@ FileNameScheme::FileNameScheme(const QString &s)
...
@@ -24,7 +24,7 @@ FileNameScheme::FileNameScheme(const QString &s)
m_commentField
(
-
1
)
m_commentField
(
-
1
)
{
{
int
fieldNumber
=
1
;
int
fieldNumber
=
1
;
int
i
=
s
.
f
ind
(
'%'
);
int
i
=
s
.
ind
exOf
(
'%'
);
while
(
i
>
-
1
)
{
while
(
i
>
-
1
)
{
switch
(
s
[
i
+
1
].
toLatin1
())
{
switch
(
s
[
i
+
1
].
toLatin1
())
{
case
't'
:
m_titleField
=
fieldNumber
++
;
case
't'
:
m_titleField
=
fieldNumber
++
;
...
@@ -40,7 +40,7 @@ FileNameScheme::FileNameScheme(const QString &s)
...
@@ -40,7 +40,7 @@ FileNameScheme::FileNameScheme(const QString &s)
default:
default:
break
;
break
;
}
}
i
=
s
.
f
ind
(
'%'
,
i
+
1
);
i
=
s
.
ind
exOf
(
'%'
,
i
+
1
);
}
}
m_regExp
.
setPattern
(
composeRegExp
(
s
));
m_regExp
.
setPattern
(
composeRegExp
(
s
));
}
}
...
@@ -51,7 +51,7 @@ bool FileNameScheme::matches(const QString &fileName) const
...
@@ -51,7 +51,7 @@ bool FileNameScheme::matches(const QString &fileName) const
* does not work as a separator.
* does not work as a separator.
*/
*/
QString
stripped
=
fileName
;
QString
stripped
=
fileName
;
stripped
.
truncate
(
stripped
.
findRev
(
'.'
));
stripped
.
truncate
(
stripped
.
lastIndexOf
(
'.'
));
return
m_regExp
.
exactMatch
(
stripped
);
return
m_regExp
.
exactMatch
(
stripped
);
}
}
...
@@ -205,10 +205,10 @@ QString TagGuesser::capitalizeWords(const QString &s)
...
@@ -205,10 +205,10 @@ QString TagGuesser::capitalizeWords(const QString &s)
result
[
0
]
=
result
[
0
].
upper
();
result
[
0
]
=
result
[
0
].
upper
();
const
QRegExp
wordRegExp
(
"
\\
s
\\
w"
);
const
QRegExp
wordRegExp
(
"
\\
s
\\
w"
);
int
i
=
result
.
f
ind
(
wordRegExp
);
int
i
=
result
.
ind
exOf
(
wordRegExp
);
while
(
i
>
-
1
)
{
while
(
i
>
-
1
)
{
result
[
i
+
1
]
=
result
[
i
+
1
].
upper
();
result
[
i
+
1
]
=
result
[
i
+
1
].
upper
();
i
=
result
.
f
ind
(
wordRegExp
,
++
i
);
i
=
result
.
ind
exOf
(
wordRegExp
,
++
i
);
}
}
return
result
;
return
result
;
...
...
viewmode.cpp
View file @
64081847
...
@@ -84,7 +84,7 @@ void ViewMode::paintCell(PlaylistBox::Item *item,
...
@@ -84,7 +84,7 @@ void ViewMode::paintCell(PlaylistBox::Item *item,
painter
->
fillRect
(
border
,
border
,
width
-
border
*
2
,
item
->
height
()
-
border
*
2
+
1
,
painter
->
fillRect
(
border
,
border
,
width
-
border
*
2
,
item
->
height
()
-
border
*
2
+
1
,
colorGroup
.
brush
(
QPalette
::
Highlight
));
colorGroup
.
brush
(
QPalette
::
Highlight
));
painter
->
setPen
(
colorGroup
.
h
ighlightedText
(
));
painter
->
setPen
(
colorGroup
.
color
(
QPalette
::
H
ighlightedText
));
}
}
else
else
painter
->
eraseRect
(
0
,
0
,
width
,
item
->
height
());
painter
->
eraseRect
(
0
,
0
,
width
,
item
->
height
());
...
@@ -199,7 +199,7 @@ QStringList ViewMode::lines(const PlaylistBox::Item *item,
...
@@ -199,7 +199,7 @@ QStringList ViewMode::lines(const PlaylistBox::Item *item,
fm
.
width
(
line
.
mid
(
0
,
textLength
).
stripWhiteSpace
())
+
fm
.
width
(
line
.
mid
(
0
,
textLength
).
stripWhiteSpace
())
+
item
->
listView
()
->
itemMargin
()
*
2
>
width
)
item
->
listView
()
->
itemMargin
()
*
2
>
width
)
{
{
int
i
=
line
.
findRev
(
QRegExp
(
"
\\
W"
),
textLength
-
1
);
int
i
=
line
.
lastIndexOf
(
QRegExp
(
"
\\
W"
),
textLength
-
1
);
if
(
i
>
0
)
if
(
i
>
0
)
textLength
=
i
;
textLength
=
i
;
else
else
...
...
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