summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/ui
authoreilers <eilers>2003-08-01 12:30:16 (UTC)
committer eilers <eilers>2003-08-01 12:30:16 (UTC)
commit6c715b67a8f0e32a4edca5be91332622834c8d91 (patch) (side-by-side diff)
treeae2d660e1fd9c990c2d725c075ce6c42480b0af8 /libopie2/opiepim/ui
parentcb45aa10043fdd6fddcab42ef0e07ddafc3d506d (diff)
downloadopie-6c715b67a8f0e32a4edca5be91332622834c8d91.zip
opie-6c715b67a8f0e32a4edca5be91332622834c8d91.tar.gz
opie-6c715b67a8f0e32a4edca5be91332622834c8d91.tar.bz2
Merging changes from BRANCH_1_0 to HEAD
Diffstat (limited to 'libopie2/opiepim/ui') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ui/opimmainwindow.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/libopie2/opiepim/ui/opimmainwindow.cpp b/libopie2/opiepim/ui/opimmainwindow.cpp
index 4044bc1..2739e26 100644
--- a/libopie2/opiepim/ui/opimmainwindow.cpp
+++ b/libopie2/opiepim/ui/opimmainwindow.cpp
@@ -4,6 +4,7 @@
#include <qpe/sound.h>
#include <qpe/qcopenvelope_qws.h>
+#include <qpe/qpeapplication.h>
#include "opimresolver.h"
#include "opimmainwindow.h"
@@ -38,30 +39,37 @@ void OPimMainWindow::doSetDocument( const QString& ) {
}
void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) {
+ bool needShow = false;
/*
* create demands to create
* a new record...
*/
QDataStream stream(array, IO_ReadOnly);
if ( cmd == "create()" ) {
+ raise();
int uid = create();
QCopEnvelope e(m_str, "created(int)" );
e << uid;
+ needShow = true;
}else if ( cmd == "remove(int)" ) {
int uid;
stream >> uid;
bool rem = remove( uid );
QCopEnvelope e(m_str, "removed(bool)" );
e << rem;
+ needShow = true;
}else if ( cmd == "beam(int)" ) {
int uid;
stream >> uid;
beam( uid);
}else if ( cmd == "show(int)" ) {
+ raise();
int uid;
stream >> uid;
show( uid );
+ needShow = true;
}else if ( cmd == "edit(int)" ) {
+ raise();
int uid;
stream >> uid;
edit( uid );
@@ -75,6 +83,7 @@ void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array )
add( *m_fallBack );
delete m_fallBack;
}else if ( cmd == "alarm(QDateTime,int)" ) {
+ raise();
QDateTime dt; int uid;
stream >> dt;
stream >> uid;
@@ -83,8 +92,11 @@ void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array )
if ( current.time().hour() != dt.time().hour() && current.time().minute() != dt.time().minute() )
return;
doAlarm( dt, uid );
-
+ needShow = true;
}
+
+ if (needShow )
+ QPEApplication::setKeepRunning();
}
/* implement the url scripting here */
void OPimMainWindow::setDocument( const QString& str) {