summaryrefslogtreecommitdiff
path: root/core/launcher/launcher.cpp
authormickeyl <mickeyl>2004-04-07 13:36:16 (UTC)
committer mickeyl <mickeyl>2004-04-07 13:36:16 (UTC)
commit4f1d28a25ce6180850c3d26bac9b638f0f25532b (patch) (side-by-side diff)
tree59b4879b1065086c9a2e28f16f7d48540c8a9456 /core/launcher/launcher.cpp
parent8af35b63a277ec14dcc4a0a6ca5bbe228e276b98 (diff)
downloadopie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.zip
opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.gz
opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.bz2
use Opie debugging framework
Diffstat (limited to 'core/launcher/launcher.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp37
1 files changed, 17 insertions, 20 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 5d0c778..bf2287d 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -9,81 +9,78 @@
** 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 "startmenu.h"
+#include "taskbar.h"
+#include "serverinterface.h"
+#include "launcherview.h"
+#include "launcher.h"
+#include "server.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/global.h>
#ifdef Q_WS_QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
#include <qtopia/resource.h>
#include <qtopia/applnk.h>
#include <qtopia/config.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/mimetype.h>
#include <qtopia/private/categories.h>
-//#include <qtopia/custom.h>
+#define QTOPIA_INTERNAL_FSLP
+#include <qtopia/lnkproperties.h>
+/* QT */
#include <qdir.h>
#ifdef Q_WS_QWS
+#include <qkeyboard_qws.h>
#include <qwindowsystem_qws.h>
#endif
#include <qtimer.h>
#include <qcombobox.h>
#include <qvbox.h>
#include <qlayout.h>
#include <qstyle.h>
#include <qpushbutton.h>
#include <qtabbar.h>
#include <qwidgetstack.h>
#include <qregexp.h>
#include <qmessagebox.h>
#include <qframe.h>
#include <qpainter.h>
#include <qlabel.h>
#include <qtextstream.h>
#include <qpopupmenu.h>
-#include "startmenu.h"
-#include "taskbar.h"
-
-#include "serverinterface.h"
-#include "launcherview.h"
-#include "launcher.h"
-#include "server.h"
-
-#define QTOPIA_INTERNAL_FSLP
-#include <qtopia/lnkproperties.h>
+/* STD */
#include <stdlib.h>
#include <assert.h>
-
#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
#include <unistd.h>
#include <stdio.h>
#include <sys/vfs.h>
#include <mntent.h>
#endif
-#ifdef Q_WS_QWS
-#include <qkeyboard_qws.h>
-#include <qpe/lnkproperties.h>
-#endif
-
static bool isVisibleWindow( int );
//===========================================================================
LauncherTabWidget::LauncherTabWidget( Launcher* parent ) :
QVBox( parent ), docview( 0 )
{
docLoadingWidgetEnabled = false;
docLoadingWidget = 0;
docLoadingWidgetProgress = 0;
launcher = parent;
categoryBar = new LauncherTabBar( this );
@@ -219,25 +216,25 @@ LauncherView* LauncherTabWidget::newView( const QString& id, const QPixmap& pm,
connect( view, SIGNAL(rightPressed(AppLnk*)),
this, SIGNAL(rightPressed(AppLnk*)));
int n = categoryBar->count();
stack->addWidget( view, n );
LauncherTab *tab = new LauncherTab( id, view, pm, label );
categoryBar->insertTab( tab, n-1 );
if ( id == "Documents" )
docview = view;
- qDebug("inserting %s at %d", id.latin1(), n-1 );
+ odebug << "inserting " << id << " at " << n-1 << "" << oendl;
Config cfg("Launcher");
setTabAppearance( tab, cfg );
cfg.setGroup( "GUI" );
view->setBusyIndicatorType( cfg.readEntry( "BusyType", QString::null ) );
return view;
}
LauncherView *LauncherTabWidget::view( const QString &id )
{
@@ -404,25 +401,25 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &
stream >> id;
QString fam;
stream >> fam;
int size;
stream >> size;
int weight;
stream >> weight;
int italic;
stream >> italic;
if ( view(id) ) {
if ( !fam.isEmpty() ) {
view(id)->setViewFont( QFont(fam, size, weight, italic!=0) );
- qDebug( "setFont: %s, %d, %d, %d", fam.latin1(), size, weight, italic );
+ odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl;
} else {
view(id)->clearViewFont();
}
}
}else if ( msg == "setBusyIndicatorType(QString)" ) {
QString type;
stream >> type;
setBusyIndicatorType( type );
}else if ( msg == "home()" ) {
if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) {
if (categoryBar)
categoryBar->nextTab();
@@ -675,25 +672,25 @@ void Launcher::applicationAdded( const QString& type, const AppLnk& app )
qWarning("addAppLnk: No view for type %s. Can't add app %s!",
type.latin1(),app.name().latin1() );
MimeType::registerApp( app );
}
void Launcher::applicationRemoved( const QString& type, const AppLnk& app )
{
LauncherView *view = tabs->view( type );
if ( view )
view->removeLink( app.linkFile() );
else
- qWarning("removeAppLnk: No view for %s!", type.latin1() );
+ owarn << "removeAppLnk: No view for " << type << "!" << oendl;
}
void Launcher::allApplicationsRemoved()
{
MimeType::clear();
for ( QStringList::ConstIterator it=ids.begin(); it!= ids.end(); ++it)
tabs->view( (*it) )->removeAllItems();
}
void Launcher::documentAdded( const DocLnk& doc )
{
tabs->docView()->addItem( new DocLnk( doc ), FALSE );