Commit 58a90242 authored by Scott Wheeler's avatar Scott Wheeler

Oops. Here's all the stuff that should have been included in the last

commit.  I cleaned up the API but missed a few SIGNAL/SLOT connections.
Also the case statement was missing the break statements.

svn path=/trunk/kdemultimedia/juk/; revision=239950
parent 9cf0c688
......@@ -34,7 +34,7 @@ DynamicPlaylist::DynamicPlaylist(const PlaylistList &playlists, QWidget *parent,
for(PlaylistList::ConstIterator it = m_playlists.begin(); it != m_playlists.end(); ++it) {
if(*it) {
connect(*it, SIGNAL(signalDataChanged()), this, SLOT(slotSetDirty()));
connect(*it, SIGNAL(signalNumberOfItemsChanged(Playlist *)), this, SLOT(slotSetDirty()));
connect(*it, SIGNAL(signalCountChanged(Playlist *)), this, SLOT(slotSetDirty()));
}
else
m_playlists.remove(*it);
......
......@@ -91,6 +91,12 @@ void JuK::startPlayingPlaylist()
play(m_splitter->playFirstFile());
}
void JuK::slotGuessTagInfo(int i)
{
int index = m_guessMenu->popupMenu()->indexOf(i);
m_splitter->slotGuessTagInfo(TagGuesser::Type(index));
}
void JuK::play()
{
if(!m_player)
......@@ -371,25 +377,24 @@ void JuK::setupActions()
// tagger menu
//////////////////////////////////////////////////
createSplitterAction(i18n("&Save"), SLOT(slotSaveTag()),
createSplitterAction(i18n("&Save"), SLOT(slotSaveTag()),
"saveItem", "filesave", "CTRL+t");
createSplitterAction(i18n("&Delete"), SLOT(slotDeleteSelectedItems()),
"removeItem", "editdelete");
KActionMenu *guessMenu = new KActionMenu(i18n("&Guess Tag Information"),
m_guessMenu = new KActionMenu(i18n("&Guess Tag Information"),
QString::null, actionCollection(),
"guessTag");
KAction *a;
a = createSplitterAction(i18n("From &Filename"),
SLOT(slotGuessTagInfoFile()),
"guessTagFile", 0, "CTRL+f");
guessMenu->insert(a);
a = new KAction(i18n("From &Filename"), "CTRL+f", actionCollection(), "guessTagFile");
m_guessMenu->insert(a);
a = new KAction(i18n("From &Internet"), "CTRL+i", actionCollection(), "guessTagInternet");
m_guessMenu->insert(a);
a = createSplitterAction(i18n("From &Internet"), SLOT(slotGuessTagInfoInternet()),
"guessTagInternet", 0, "CTRL+i");
guessMenu->insert(a);
connect(m_guessMenu->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotGuessTagInfo(int)));
// new KAction(i18n("&Rename File"), 0, "CTRL+r", m_splitter, SLOT(slotRenameFile()),
// actionCollection(), "renameFile"); // 4
......@@ -403,7 +408,7 @@ void JuK::setupActions()
setStandardToolBarMenuEnabled(true);
m_toggleSplashAction = new KToggleAction(i18n("Show Splash Screen on Startup"),
m_toggleSplashAction = new KToggleAction(i18n("Show Splash Screen on Startp"),
0, actionCollection(), "showSplashScreen");
m_toggleSystemTrayAction = new KToggleAction(i18n("&Dock in System Tray"),
......
......@@ -182,6 +182,7 @@ private slots:
void slotPlaySelectedFile() { play(m_splitter->playSelectedFile()); }
void startPlayingPlaylist();
void slotToggleMenuBar() { menuBar()->isVisible() ? menuBar()->hide() : menuBar()->show(); }
void slotGuessTagInfo(int i);
private:
// layout objects
......@@ -202,6 +203,7 @@ private:
KToggleAction *m_togglePopupsAction;
KToggleAction *m_toggleSplashAction;
KSelectAction *m_outputSelectAction;
KActionMenu *m_guessMenu;
KToolBarPopupAction *m_backAction;
KToggleAction *m_loopPlaylistAction;
......
......@@ -820,7 +820,7 @@ void Playlist::polish()
m_rmbEditID = m_rmbMenu->insertItem(SmallIconSet("edittool"), i18n("Edit"), this, SLOT(slotRenameTag()));
m_rmbMenu->insertItem(SmallIconSet("reload"), i18n("Refresh Items"), this, SLOT(slotRefresh()));
m_rmbMenu->insertItem(SmallIconSet("editdelete"), i18n("Remove From Disk"), this, SLOT(slotDeleteSelectedItems()));
m_rmbMenu->insertItem(SmallIconSet("editdelete"), i18n("Remove From Disk"), this, SLOT(slotRemoveSelectedItems()));
connect(this, SIGNAL(selectionChanged()),
this, SLOT(slotEmitSelected()));
......
......@@ -21,7 +21,6 @@
#include <kdebug.h>
#include <kapplication.h>
#include "tagguesser.h"
#include "playlistitem.h"
#include "filerenamer.h"
#include "collectionlist.h"
......@@ -99,6 +98,7 @@ void PlaylistItem::guessTagInfo(TagGuesser::Type type)
tag()->save();
slotRefresh();
break;
}
case TagGuesser::MusicBrainz:
{
......@@ -112,6 +112,7 @@ void PlaylistItem::guessTagInfo(TagGuesser::Type type)
win->statusBar(), SLOT(message(const QString &, int)));
query->start();
#endif //add message box telling users musicbrainz is not installed or keep it quiet?
break;
}
}
}
......
......@@ -43,7 +43,7 @@ class TagGuesser
{
public:
enum Type { FileName, MusicBrainz };
enum Type { FileName = 0, MusicBrainz = 1 };
static QStringList schemeStrings();
static void setSchemeStrings(const QStringList &schemes);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment