Commit 35308a0a authored by Scott Wheeler's avatar Scott Wheeler

Adding a simplified version of Klas's patch to make JuK dock in the system

tray by default on close.  I'll have another commit soon that makes this
configurable.

CCMAIL:klas.kalass@gmx.de

svn path=/trunk/kdemultimedia/juk/; revision=211621
parent 9a7bea26
......@@ -22,6 +22,7 @@
#include <kstatusbar.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <qtimer.h>
#include <qlistview.h>
......@@ -108,7 +109,8 @@ void JuK::setupActions()
m_deleteItemPlaylistAction = new KAction(i18n("Remove"), "edittrash", 0, m_splitter, SLOT(slotDeletePlaylist()),
actionCollection(), "deleteItemPlaylist");
KStdAction::quit(this, SLOT(close()), actionCollection());
//KStdAction::quit(this, SLOT(close()), actionCollection());
KStdAction::quit(kapp, SLOT(quit()), actionCollection());
// edit menu
KStdAction::cut(this, SLOT(cut()), actionCollection());
......@@ -307,7 +309,7 @@ void JuK::saveConfig()
}
}
bool JuK::queryClose()
bool JuK::queryExit()
{
slotStop();
delete m_player;
......@@ -317,6 +319,20 @@ bool JuK::queryClose()
return true;
}
bool JuK::queryClose()
{
if(m_systemTray) {
KMessageBox::information(this,
i18n("<qt>Closing the main window will keep JuK running in the system tray. "
"Use Quit from the File menu to quit the application.</qt>"),
i18n("Docking in System Tray"), "hideOnCloseInfo");
hide();
return false;
}
else
return true;
}
void JuK::invokeEditSlot( const char *slotName, const char *slot )
{
QObject *object = focusWidget();
......
......@@ -68,6 +68,7 @@ private:
void readConfig();
void saveConfig();
virtual bool queryExit();
virtual bool queryClose();
void invokeEditSlot(const char *slotName, const char *slot);
......
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