Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JuK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
Multimedia
JuK
Commits
913b4130
Commit
913b4130
authored
Aug 10, 2003
by
Scott Wheeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to turn the history on and off -- defaulting to off.
svn path=/trunk/kdemultimedia/juk/; revision=241969
parent
4a1c1c65
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
72 additions
and
30 deletions
+72
-30
juk.cpp
juk.cpp
+9
-0
juk.h
juk.h
+1
-0
jukui.rc
jukui.rc
+1
-0
playlist.cpp
playlist.cpp
+2
-2
playlistbox.cpp
playlistbox.cpp
+36
-21
playlistbox.h
playlistbox.h
+6
-1
playlistsplitter.cpp
playlistsplitter.cpp
+16
-5
playlistsplitter.h
playlistsplitter.h
+1
-1
No files found.
juk.cpp
View file @
913b4130
...
...
@@ -341,6 +341,8 @@ void JuK::setupActions()
0
,
actionCollection
(),
"showSearch"
);
m_showEditorAction
=
new
KToggleAction
(
i18n
(
"Show &Tag Editor"
),
"edit"
,
0
,
actionCollection
(),
"showEditor"
);
m_showHistoryAction
=
new
KToggleAction
(
i18n
(
"Show &History Editor"
),
"history"
,
0
,
actionCollection
(),
"showHistory"
);
createSplitterAction
(
i18n
(
"Refresh Items"
),
SLOT
(
slotRefresh
()),
"refresh"
,
"reload"
);
...
...
@@ -464,6 +466,8 @@ void JuK::setupSplitterConnections()
m_splitter
,
SLOT
(
slotSetSearchVisible
(
bool
)));
connect
(
m_showEditorAction
,
SIGNAL
(
toggled
(
bool
)),
m_splitter
,
SLOT
(
slotSetEditorVisible
(
bool
)));
connect
(
m_showHistoryAction
,
SIGNAL
(
toggled
(
bool
)),
m_splitter
,
SLOT
(
slotSetHistoryVisible
(
bool
)));
connect
(
this
,
SIGNAL
(
dockWindowPositionChanged
(
QDockWindow
*
)),
m_sliderAction
,
SLOT
(
slotUpdateOrientation
(
QDockWindow
*
)));
connect
(
m_splitter
,
SIGNAL
(
signalPlaylistChanged
()),
...
...
@@ -611,6 +615,10 @@ void JuK::readConfig()
bool
showEditor
=
config
->
readBoolEntry
(
"ShowEditor"
,
false
);
m_showEditorAction
->
setChecked
(
showEditor
);
m_splitter
->
slotSetEditorVisible
(
showEditor
);
bool
showHistory
=
config
->
readBoolEntry
(
"ShowHistory"
,
false
);
m_showHistoryAction
->
setChecked
(
showHistory
);
m_splitter
->
slotSetHistoryVisible
(
showHistory
);
}
{
// general settings
KConfigGroupSaver
saver
(
config
,
"Settings"
);
...
...
@@ -648,6 +656,7 @@ void JuK::saveConfig()
config
->
writeEntry
(
"ShowEditor"
,
m_showEditorAction
->
isChecked
());
config
->
writeEntry
(
"ShowSearch"
,
m_showSearchAction
->
isChecked
());
config
->
writeEntry
(
"ShowHistory"
,
m_showHistoryAction
->
isChecked
());
}
{
// general settings
KConfigGroupSaver
saver
(
config
,
"Settings"
);
...
...
juk.h
View file @
913b4130
...
...
@@ -188,6 +188,7 @@ private:
// actions
KToggleAction
*
m_showSearchAction
;
KToggleAction
*
m_showEditorAction
;
KToggleAction
*
m_showHistoryAction
;
SliderAction
*
m_sliderAction
;
KToggleAction
*
m_randomPlayAction
;
KToggleAction
*
m_toggleSystemTrayAction
;
...
...
jukui.rc
View file @
913b4130
...
...
@@ -29,6 +29,7 @@
<Menu
name=
"view"
noMerge=
"1"
><text>
&
View
</text>
<Action
name=
"showSearch"
/>
<Action
name=
"showEditor"
/>
<Action
name=
"showHistory"
/>
<Action
name=
"showColumns"
/>
<Separator/>
...
...
playlist.cpp
View file @
913b4130
...
...
@@ -823,8 +823,8 @@ void Playlist::polish()
// hide some columns by default
//////////////////////////////////////////////////
hideColumn
(
PlaylistItem
::
CommentColumn
);
hideColumn
(
PlaylistItem
::
FileNameColumn
);
hideColumn
(
PlaylistItem
::
CommentColumn
+
columnOffset
()
);
hideColumn
(
PlaylistItem
::
FileNameColumn
+
columnOffset
()
);
connect
(
this
,
SIGNAL
(
selectionChanged
()),
this
,
SLOT
(
slotEmitSelected
()));
...
...
playlistbox.cpp
View file @
913b4130
...
...
@@ -276,7 +276,20 @@ void PlaylistBox::duplicate(Item *item)
}
}
void
PlaylistBox
::
deleteItems
(
const
ItemList
&
items
)
void
PlaylistBox
::
deleteItem
(
Playlist
*
playlist
)
{
Item
*
i
=
m_playlistDict
.
find
(
playlist
);
if
(
!
i
)
return
;
ItemList
l
;
l
.
append
(
i
);
deleteItems
(
l
,
false
);
}
void
PlaylistBox
::
deleteItems
(
const
ItemList
&
items
,
bool
confirm
)
{
if
(
items
.
isEmpty
())
return
;
...
...
@@ -288,29 +301,31 @@ void PlaylistBox::deleteItems(const ItemList &items)
files
.
append
((
*
it
)
->
playlist
()
->
fileName
());
}
if
(
!
files
.
isEmpty
())
{
int
remove
=
KMessageBox
::
warningYesNoCancelList
(
this
,
i18n
(
"Do you want to delete these files from the disk as well?"
),
files
);
if
(
confirm
)
{
if
(
!
files
.
isEmpty
())
{
int
remove
=
KMessageBox
::
warningYesNoCancelList
(
this
,
i18n
(
"Do you want to delete these files from the disk as well?"
),
files
);
if
(
remove
==
KMessageBox
::
Yes
)
{
QStringList
couldNotDelete
;
for
(
QStringList
::
ConstIterator
it
=
files
.
begin
();
it
!=
files
.
end
();
++
it
)
{
if
(
!
QFile
::
remove
(
*
it
))
couldNotDelete
.
append
(
*
it
);
if
(
remove
==
KMessageBox
::
Yes
)
{
QStringList
couldNotDelete
;
for
(
QStringList
::
ConstIterator
it
=
files
.
begin
();
it
!=
files
.
end
();
++
it
)
{
if
(
!
QFile
::
remove
(
*
it
))
couldNotDelete
.
append
(
*
it
);
}
// Would be nice if there were a KMessageBox::sorryList() to use with
// couldNotDelete.
if
(
!
couldNotDelete
.
isEmpty
())
KMessageBox
::
sorry
(
this
,
i18n
(
"Could not delete all of the specified files."
));
}
// Would be nice if there were a KMessageBox::sorryList() to use with
// couldNotDelete.
if
(
!
couldNotDelete
.
isEmpty
()
)
KMessageBox
::
sorry
(
this
,
i18n
(
"Could not delete all of the specified files."
))
;
else
if
(
remove
==
KMessageBox
::
Cancel
)
return
;
}
else
{
if
(
KMessageBox
::
warningYesNo
(
this
,
i18n
(
"Are you sure you want to remove these items?"
))
==
KMessageBox
::
No
)
return
;
}
else
if
(
remove
==
KMessageBox
::
Cancel
)
return
;
}
else
{
if
(
KMessageBox
::
warningYesNo
(
this
,
i18n
(
"Are you sure you want to remove these items?"
))
==
KMessageBox
::
No
)
return
;
}
QValueList
<
QPair
<
Item
*
,
Playlist
*>
>
removeQueue
;
...
...
playlistbox.h
View file @
913b4130
...
...
@@ -67,6 +67,11 @@ public:
void
saveAs
();
void
rename
();
void
duplicate
();
/**
* Delete the item associated with \a playlist.
*/
void
deleteItem
(
Playlist
*
playlist
);
void
deleteItems
()
{
deleteItems
(
selectedItems
());
}
bool
hasSelection
()
const
{
return
m_hasSelection
;
}
...
...
@@ -99,7 +104,7 @@ private:
void
saveAs
(
Item
*
item
);
void
rename
(
Item
*
item
);
void
duplicate
(
Item
*
item
);
void
deleteItems
(
const
QValueList
<
Item
*>
&
items
);
void
deleteItems
(
const
QValueList
<
Item
*>
&
items
,
bool
confirm
=
true
);
virtual
void
decode
(
QMimeSource
*
s
,
Item
*
item
);
virtual
void
contentsDropEvent
(
QDropEvent
*
e
);
...
...
playlistsplitter.cpp
View file @
913b4130
...
...
@@ -51,8 +51,8 @@ void processEvents()
PlaylistSplitter
::
PlaylistSplitter
(
QWidget
*
parent
,
const
char
*
name
)
:
QSplitter
(
Qt
::
Horizontal
,
parent
,
name
),
m_playingItem
(
0
),
m_searchWidget
(
0
),
m_
dynamicList
(
0
),
m_nextPlaylistItem
(
0
)
m_playingItem
(
0
),
m_searchWidget
(
0
),
m_
history
(
0
),
m_
dynamicList
(
0
),
m_
nextPlaylistItem
(
0
)
{
#ifndef NO_DEBUG
m_restore
=
KCmdLineArgs
::
parsedArgs
()
->
isSet
(
"restore"
);
...
...
@@ -402,6 +402,20 @@ void PlaylistSplitter::slotSetSearchVisible(bool visible)
redisplaySearch
();
}
void
PlaylistSplitter
::
slotSetHistoryVisible
(
bool
visible
)
{
if
(
visible
&&
!
m_history
)
{
m_history
=
new
HistoryPlaylist
(
m_playlistStack
);
setupPlaylist
(
m_history
,
false
,
"history"
,
true
);
return
;
}
if
(
!
visible
&&
m_history
)
{
m_playlistBox
->
deleteItem
(
m_history
);
m_history
=
0
;
}
}
void
PlaylistSplitter
::
slotAdvancedSearch
()
{
AdvancedSearchDialog
*
d
=
...
...
@@ -476,9 +490,6 @@ void PlaylistSplitter::setupLayout()
setupPlaylist
(
m_collection
,
true
,
"folder_sound"
,
true
);
connect
(
m_collection
,
SIGNAL
(
signalCollectionChanged
()),
m_editor
,
SLOT
(
slotUpdateCollection
()));
m_history
=
new
HistoryPlaylist
(
m_playlistStack
);
setupPlaylist
(
m_history
,
false
,
"history"
,
true
);
// Create the search widget -- this must be done after the CollectionList is created.
m_searchWidget
=
new
SearchWidget
(
editorSplitter
,
"searchWidget"
);
editorSplitter
->
moveToFirst
(
m_searchWidget
);
...
...
playlistsplitter.h
View file @
913b4130
...
...
@@ -242,7 +242,7 @@ public slots:
void
slotSetEditorVisible
(
bool
visible
)
{
m_editor
->
setShown
(
visible
);
}
void
slotSetSearchVisible
(
bool
visible
);
void
slotSetHistoryVisible
(
bool
visible
);
void
slotAdvancedSearch
();
/**
...
...
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