summaryrefslogtreecommitdiff
path: root/core/launcher/taskbar.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/taskbar.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/taskbar.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 91e2f20..86e0d0d 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -1,86 +1,89 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** 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 "inputmethods.h"
#include "runningappbar.h"
#include "systray.h"
#include "wait.h"
#include "appicons.h"
#include "taskbar.h"
#include "server.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <qtopia/config.h>
#include <qtopia/qpeapplication.h>
#ifdef QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
#include <qtopia/global.h>
-//#include <qtopia/custom.h>
+using namespace Opie::Core;
+/* QT */
#include <qlabel.h>
#include <qlayout.h>
#include <qtimer.h>
#ifdef QWS
#include <qwindowsystem_qws.h>
#endif
#include <qwidgetstack.h>
#if defined( Q_WS_QWS )
#include <qwsdisplay_qws.h>
#include <qgfx_qws.h>
#endif
static bool initNumLock()
{
#ifdef QPE_INITIAL_NUMLOCK_STATE
QPE_INITIAL_NUMLOCK_STATE
#endif
return FALSE;
}
//---------------------------------------------------------------------------
class SafeMode : public QWidget
{
Q_OBJECT
public:
SafeMode( QWidget *parent ) : QWidget( parent ), menu(0)
{
message = tr("Safe Mode");
QFont f( font() );
f.setWeight( QFont::Bold );
setFont( f );
}
void mousePressEvent( QMouseEvent *);
QSize sizeHint() const;
void paintEvent( QPaintEvent* );
private slots:
void action(int i);
private:
QString message;
QPopupMenu *menu;
};
@@ -240,97 +243,97 @@ void TaskBar::setStatusMessage( const QString &text )
}
}
void TaskBar::clearStatusBar()
{
label->clear();
stack->raiseWidget(runningAppBar);
if ( sysTray )
sysTray->show();
// stack->raiseWidget( mru );
}
void TaskBar::startWait()
{
waitIcon->setWaiting( true );
// a catchall stop after 10 seconds...
waitTimer->start( 10 * 1000, true );
}
void TaskBar::stopWait(const QString&)
{
waitTimer->stop();
waitIcon->setWaiting( false );
}
void TaskBar::stopWait()
{
waitTimer->stop();
waitIcon->setWaiting( false );
}
/*
* This resizeEvent will be captured by
* the ServerInterface and it'll layout
* and calc rect. Now if we go from bigger
* to smaller screen the SysTray is out of
* bounds and repaint() won't trigger an Event
*/
void TaskBar::resizeEvent( QResizeEvent *e )
{
if ( sysTray )
sysTray->hide();
QHBox::resizeEvent( e );
if ( sysTray )
sysTray->show();
- qWarning("TaskBar::resize event");
+ owarn << "TaskBar::resize event" << oendl;
}
void TaskBar::styleChange( QStyle &s )
{
QHBox::styleChange( s );
calcMaxWindowRect();
}
void TaskBar::calcMaxWindowRect()
{
if ( resizeRunningApp )
{
#if defined(Q_WS_QWS)
QRect wr;
int displayWidth = qApp->desktop()->width();
QRect ir = inputMethods->inputRect();
if ( ir.isValid() ) {
wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 );
} else {
wr.setCoords( 0, 0, displayWidth-1, y()-1 );
}
#if QT_VERSION < 0x030000
QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,QSize(qt_screen->width(),qt_screen->height())) );
#else
QWSServer::setMaxWindowRect( wr );
#endif
#endif
}
}
void TaskBar::receive( const QCString &msg, const QByteArray &data )
{
QDataStream stream( data, IO_ReadOnly );
if ( msg == "message(QString)" ) {
QString text;
stream >> text;
setStatusMessage( text );
} else if ( msg == "hideInputMethod()" ) {
inputMethods->hideInputMethod();
} else if ( msg == "showInputMethod()" ) {
inputMethods->showInputMethod();
} else if ( msg == "showInputMethod(QString)" ) {
QString name;
stream >> name;
inputMethods->showInputMethod(name);
} else if ( msg == "reloadInputMethods()" ) {
inputMethods->loadInputMethods();
} else if ( msg == "reloadApplets()" ) {