summaryrefslogtreecommitdiff
path: root/core/launcher/systray.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/systray.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/systray.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp
index 6cc1446..3c72d25 100644
--- a/core/launcher/systray.cpp
+++ b/core/launcher/systray.cpp
@@ -9,42 +9,40 @@
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
+#include "systray.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/qlibrary.h>
#include <qtopia/config.h>
+using namespace Opie::Core;
+/* QT */
#include <qlayout.h>
#include <qdir.h>
-#include "systray.h"
-
+/* STD */
#include <stdlib.h>
-/* ### Single build floppies ### */
-#if 0
-#ifdef QT_NO_COMPONENTS
-#include "../plugins/applets/clockapplet/clockappletimpl.h"
-#endif
-#endif
-
SysTray::SysTray( QWidget *parent ) : QFrame( parent ), layout(0)
{
//setFrameStyle( QFrame::Panel | QFrame::Sunken );
loadApplets();
}
SysTray::~SysTray()
{
clearApplets();
}
static int compareAppletPositions(const void *a, const void *b)
@@ -103,25 +101,25 @@ void SysTray::addApplets()
#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;
- qWarning( "Found Applet: %s", (*it).latin1() );
+ 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";
if ( trans->load( tfn ))