[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdemultimedia/noatun/library
From: Stefan Gehn <sgehn () gmx ! net>
Date: 2004-06-04 21:50:47
Message-ID: 20040604215047.0DE6D9908 () office ! kde ! org
[Download RAW message or body]
CVS commit by metz:
Make noatun hide in systray instead of exiting if the last mainwindow is closed (as \
written in the KDE User Interface Guidelines). Patch by Igor Gilitschenski \
<igor@gilitschenski.org> thanks a lot for it.
M +19 -6 pluginloader.cpp 1.47
--- kdemultimedia/noatun/library/pluginloader.cpp #1.46:1.47
@@ -230,11 +230,9 @@ void LibraryLoader::setModules(const QSt
bool LibraryLoader::remove(const QString& spec, bool terminateOnLastUI)
{
- removeNow(spec);
- if ( !terminateOnLastUI )
- return true;
+ bool SystrayPluginEnabled=false;
NoatunLibraryInfo info = getInfo(spec);
// exit if this is the last UI
- if (info.type=="userinterface")
+ if (info.type=="userinterface" && terminateOnLastUI)
{
QValueList<NoatunLibraryInfo> l=loaded();
@@ -247,11 +245,25 @@ bool LibraryLoader::remove(const QString
{
// Good, we don't have to exit
+ removeNow(spec);
return true;
}
+ else if((*i).type=="systray") // Is there a Systray plugin?
+ {
+ SystrayPluginEnabled=true;
+ }
}
+ // Don't terminate, when there is a systray plugin.
+ if(SystrayPluginEnabled)
+ {
+ napp->toggleInterfaces();
+ return true;
+ }
+ else
+ {
// No other UIs, terminate
kapp->exit();
}
+ }
else if (info.type=="playlist")
{
@@ -260,4 +272,5 @@ bool LibraryLoader::remove(const QString
}
+ removeNow(spec);
return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic