author | eilers <eilers> | 2003-08-01 12:30:16 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-08-01 12:30:16 (UTC) |
commit | 6c715b67a8f0e32a4edca5be91332622834c8d91 (patch) (unidiff) | |
tree | ae2d660e1fd9c990c2d725c075ce6c42480b0af8 /libopie2/opiepim/ui/opimmainwindow.cpp | |
parent | cb45aa10043fdd6fddcab42ef0e07ddafc3d506d (diff) | |
download | opie-6c715b67a8f0e32a4edca5be91332622834c8d91.zip opie-6c715b67a8f0e32a4edca5be91332622834c8d91.tar.gz opie-6c715b67a8f0e32a4edca5be91332622834c8d91.tar.bz2 |
Merging changes from BRANCH_1_0 to HEAD
Diffstat (limited to 'libopie2/opiepim/ui/opimmainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/ui/opimmainwindow.cpp | 14 |
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 @@ | |||
4 | 4 | ||
5 | #include <qpe/sound.h> | 5 | #include <qpe/sound.h> |
6 | #include <qpe/qcopenvelope_qws.h> | 6 | #include <qpe/qcopenvelope_qws.h> |
7 | #include <qpe/qpeapplication.h> | ||
7 | 8 | ||
8 | #include "opimresolver.h" | 9 | #include "opimresolver.h" |
9 | #include "opimmainwindow.h" | 10 | #include "opimmainwindow.h" |
@@ -38,30 +39,37 @@ void OPimMainWindow::doSetDocument( const QString& ) { | |||
38 | 39 | ||
39 | } | 40 | } |
40 | void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) { | 41 | void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) { |
42 | bool needShow = false; | ||
41 | /* | 43 | /* |
42 | * create demands to create | 44 | * create demands to create |
43 | * a new record... | 45 | * a new record... |
44 | */ | 46 | */ |
45 | QDataStream stream(array, IO_ReadOnly); | 47 | QDataStream stream(array, IO_ReadOnly); |
46 | if ( cmd == "create()" ) { | 48 | if ( cmd == "create()" ) { |
49 | raise(); | ||
47 | int uid = create(); | 50 | int uid = create(); |
48 | QCopEnvelope e(m_str, "created(int)" ); | 51 | QCopEnvelope e(m_str, "created(int)" ); |
49 | e << uid; | 52 | e << uid; |
53 | needShow = true; | ||
50 | }else if ( cmd == "remove(int)" ) { | 54 | }else if ( cmd == "remove(int)" ) { |
51 | int uid; | 55 | int uid; |
52 | stream >> uid; | 56 | stream >> uid; |
53 | bool rem = remove( uid ); | 57 | bool rem = remove( uid ); |
54 | QCopEnvelope e(m_str, "removed(bool)" ); | 58 | QCopEnvelope e(m_str, "removed(bool)" ); |
55 | e << rem; | 59 | e << rem; |
60 | needShow = true; | ||
56 | }else if ( cmd == "beam(int)" ) { | 61 | }else if ( cmd == "beam(int)" ) { |
57 | int uid; | 62 | int uid; |
58 | stream >> uid; | 63 | stream >> uid; |
59 | beam( uid); | 64 | beam( uid); |
60 | }else if ( cmd == "show(int)" ) { | 65 | }else if ( cmd == "show(int)" ) { |
66 | raise(); | ||
61 | int uid; | 67 | int uid; |
62 | stream >> uid; | 68 | stream >> uid; |
63 | show( uid ); | 69 | show( uid ); |
70 | needShow = true; | ||
64 | }else if ( cmd == "edit(int)" ) { | 71 | }else if ( cmd == "edit(int)" ) { |
72 | raise(); | ||
65 | int uid; | 73 | int uid; |
66 | stream >> uid; | 74 | stream >> uid; |
67 | edit( uid ); | 75 | edit( uid ); |
@@ -75,6 +83,7 @@ void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) | |||
75 | add( *m_fallBack ); | 83 | add( *m_fallBack ); |
76 | delete m_fallBack; | 84 | delete m_fallBack; |
77 | }else if ( cmd == "alarm(QDateTime,int)" ) { | 85 | }else if ( cmd == "alarm(QDateTime,int)" ) { |
86 | raise(); | ||
78 | QDateTime dt; int uid; | 87 | QDateTime dt; int uid; |
79 | stream >> dt; | 88 | stream >> dt; |
80 | stream >> uid; | 89 | stream >> uid; |
@@ -83,8 +92,11 @@ void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) | |||
83 | if ( current.time().hour() != dt.time().hour() && current.time().minute() != dt.time().minute() ) | 92 | if ( current.time().hour() != dt.time().hour() && current.time().minute() != dt.time().minute() ) |
84 | return; | 93 | return; |
85 | doAlarm( dt, uid ); | 94 | doAlarm( dt, uid ); |
86 | 95 | needShow = true; | |
87 | } | 96 | } |
97 | |||
98 | if (needShow ) | ||
99 | QPEApplication::setKeepRunning(); | ||
88 | } | 100 | } |
89 | /* implement the url scripting here */ | 101 | /* implement the url scripting here */ |
90 | void OPimMainWindow::setDocument( const QString& str) { | 102 | void OPimMainWindow::setDocument( const QString& str) { |