summaryrefslogtreecommitdiff
path: root/core/launcher/systray.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/systray.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/systray.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp
index 3c72d25..d0f1808 100644
--- a/core/launcher/systray.cpp
+++ b/core/launcher/systray.cpp
@@ -76,73 +76,73 @@ void SysTray::clearApplets()
QValueList<TaskbarApplet>::Iterator mit;
for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) {
(*mit).iface->release();
(*mit).library->unload();
delete (*mit).library;
}
#endif
appletList.clear();
if ( layout )
delete layout;
layout = new QHBoxLayout( this, 0, 1 );
layout->setAutoAdd(TRUE);
}
void SysTray::addApplets()
{
hide();
#ifndef QT_NO_COMPONENTS
Config cfg( "Taskbar" );
cfg.setGroup( "Applets" );
QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' );
QString lang = getenv( "LANG" );
- QString path = QPEApplication::qpeDir() + "/plugins/applets";
+ QString path = QPEApplication::qpeDir() + "plugins/applets";
#ifdef Q_OS_MACX
QDir dir( path, "lib*.dylib" );
#else
QDir dir( path, "lib*.so" );
#endif /* Q_OS_MACX */
QStringList list = dir.entryList();
QStringList::Iterator it;
int napplets=0;
TaskbarApplet* *applets = new TaskbarApplet*[list.count()];
for ( it = list.begin(); it != list.end(); ++it ) {
if ( exclude.find( *it ) != exclude.end() )
continue;
owarn << "Found Applet: " << (*it) << "" << oendl;
TaskbarAppletInterface *iface = 0;
QLibrary *lib = new QLibrary( path + "/" + *it );
if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) {
TaskbarApplet *applet = new TaskbarApplet;
applets[napplets++] = applet;
applet->library = lib;
applet->iface = iface;
QTranslator *trans = new QTranslator(qApp);
QString type = (*it).left( (*it).find(".") );
- QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
+ QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
if ( trans->load( tfn ))
qApp->installTranslator( trans );
else
delete trans;
} else {
exclude += *it;
delete lib;
}
}
cfg.writeEntry( "ExcludeApplets", exclude, ',' );
qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions);
while (napplets--) {
TaskbarApplet *applet = applets[napplets];
applet->applet = applet->iface->applet( this );
appletList.append(*applet);
}
delete [] applets;
#else /* ## FIXME single app */
TaskbarApplet * const applet = new TaskbarApplet();
applet->iface = new ClockAppletImpl();
applet->applet = applet->iface->applet( this );
appletList.append( applet );
#endif
show();