summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 6771a66..693e77f 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -1,91 +1,89 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of 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 "desktop.h"
#include "info.h"
#include "launcher.h"
#include "mrulist.h"
#include "qcopbridge.h"
#include "shutdownimpl.h"
#include "startmenu.h"
#include "taskbar.h"
#include "transferserver.h"
#include "irserver.h"
#include "packageslave.h"
#include <qpe/applnk.h>
#include <qpe/mimetype.h>
#include <qpe/password.h>
#include <qpe/config.h>
#include <qpe/power.h>
#include <qpe/timeconversion.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/global.h>
-#ifdef QT_QWS_CUSTOM
-#include "qpe/custom.h"
-#endif
+#include <qpe/custom.h>
#include <qgfx_qws.h>
#include <qmainwindow.h>
#include <qmessagebox.h>
#include <qtimer.h>
#include <qwindowsystem_qws.h>
#include <qvaluelist.h>
#include <stdlib.h>
#include <unistd.h>
class QCopKeyRegister
{
public:
QCopKeyRegister() : keyCode(0) { }
QCopKeyRegister(int k, const QString &c, const QString &m)
: keyCode(k), channel(c), message(m) { }
int getKeyCode() const { return keyCode; }
QString getChannel() const { return channel; }
QString getMessage() const { return message; }
private:
int keyCode;
QString channel, message;
};
typedef QValueList<QCopKeyRegister> KeyRegisterList;
KeyRegisterList keyRegisterList;
static Desktop* qpedesktop = 0;
static int loggedin=0;
static void login(bool at_poweron)
{
if ( !loggedin ) {
Global::terminateBuiltin("calibrate");
Password::authenticate(at_poweron);
loggedin=1;
QCopEnvelope e( "QPE/Desktop", "unlocked()" );
}
}
bool Desktop::screenLocked()
{
return loggedin == 0;
}
@@ -724,69 +722,69 @@ void Desktop::startTransferServer()
}
void Desktop::timerEvent( QTimerEvent *e )
{
killTimer( e->timerId() );
startTransferServer();
}
void Desktop::terminateServers()
{
delete transferServer;
delete qcopBridge;
transferServer = 0;
qcopBridge = 0;
}
void Desktop::rereadVolumes()
{
Config cfg("qpe");
cfg.setGroup("Volume");
touchclick = cfg.readBoolEntry("TouchSound");
keyclick = cfg.readBoolEntry("KeySound");
alarmsound = cfg.readBoolEntry("AlarmSound");
// Config cfg("Sound");
// cfg.setGroup("System");
// touchclick = cfg.readBoolEntry("Touch");
// keyclick = cfg.readBoolEntry("Key");
}
void Desktop::keyClick()
{
#ifdef CUSTOM_SOUND_KEYCLICK
if ( keyclick )
CUSTOM_SOUND_KEYCLICK;
#endif
}
void Desktop::screenClick()
{
#ifdef CUSTOM_SOUND_TOUCH
if ( touchclick )
CUSTOM_SOUND_TOUCH;
#endif
}
void Desktop::soundAlarm()
{
#ifdef CUSTOM_SOUND_ALARM
- if (alarmsound)
+ if (qpedesktop->alarmsound)
CUSTOM_SOUND_ALARM;
#endif
}
bool Desktop::eventFilter( QObject *w, QEvent *ev )
{
if ( ev->type() == QEvent::KeyPress ) {
QKeyEvent *ke = (QKeyEvent *)ev;
if ( ke->key() == Qt::Key_F11 ) { // menu key
QWidget *active = qApp->activeWindow();
if ( active && active->isPopup() ) {
active->close();
}
raiseMenu();
return TRUE;
}
}
return FALSE;
}