author | zautrix <zautrix> | 2004-10-27 22:35:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-27 22:35:41 (UTC) |
commit | 5afbc6ae0908ce12fd5abb1c4eadf9c61a01503c (patch) (unidiff) | |
tree | 914ce70d7e5a1afcd2da0c2fda34b959d65d0462 | |
parent | 9c88346fc757fd1dc54b3fca151a2a610159d8cf (diff) | |
download | kdepimpi-5afbc6ae0908ce12fd5abb1c4eadf9c61a01503c.zip kdepimpi-5afbc6ae0908ce12fd5abb1c4eadf9c61a01503c.tar.gz kdepimpi-5afbc6ae0908ce12fd5abb1c4eadf9c61a01503c.tar.bz2 |
pwm close fix
-rw-r--r-- | kaddressbook/kabcore.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 1 | ||||
-rw-r--r-- | libkdepim/externalapphandler.cpp | 6 | ||||
-rw-r--r-- | libkdepim/externalapphandler.h | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 10 |
5 files changed, 24 insertions, 0 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 4964a6c..d1dcb6e 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -265,64 +265,65 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
265 | 265 | ||
266 | mIncSearchWidget->setFocus(); | 266 | mIncSearchWidget->setFocus(); |
267 | 267 | ||
268 | 268 | ||
269 | connect( mViewManager, SIGNAL( selected( const QString& ) ), | 269 | connect( mViewManager, SIGNAL( selected( const QString& ) ), |
270 | SLOT( setContactSelected( const QString& ) ) ); | 270 | SLOT( setContactSelected( const QString& ) ) ); |
271 | connect( mViewManager, SIGNAL( executed( const QString& ) ), | 271 | connect( mViewManager, SIGNAL( executed( const QString& ) ), |
272 | SLOT( executeContact( const QString& ) ) ); | 272 | SLOT( executeContact( const QString& ) ) ); |
273 | 273 | ||
274 | connect( mViewManager, SIGNAL( deleteRequest( ) ), | 274 | connect( mViewManager, SIGNAL( deleteRequest( ) ), |
275 | SLOT( deleteContacts( ) ) ); | 275 | SLOT( deleteContacts( ) ) ); |
276 | connect( mViewManager, SIGNAL( modified() ), | 276 | connect( mViewManager, SIGNAL( modified() ), |
277 | SLOT( setModified() ) ); | 277 | SLOT( setModified() ) ); |
278 | 278 | ||
279 | connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); | 279 | connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); |
280 | connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); | 280 | connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); |
281 | 281 | ||
282 | connect( mXXPortManager, SIGNAL( modified() ), | 282 | connect( mXXPortManager, SIGNAL( modified() ), |
283 | SLOT( setModified() ) ); | 283 | SLOT( setModified() ) ); |
284 | 284 | ||
285 | connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), | 285 | connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), |
286 | SLOT( incrementalSearch( const QString& ) ) ); | 286 | SLOT( incrementalSearch( const QString& ) ) ); |
287 | connect( mIncSearchWidget, SIGNAL( fieldChanged() ), | 287 | connect( mIncSearchWidget, SIGNAL( fieldChanged() ), |
288 | mJumpButtonBar, SLOT( recreateButtons() ) ); | 288 | mJumpButtonBar, SLOT( recreateButtons() ) ); |
289 | 289 | ||
290 | connect( mDetails, SIGNAL( sendEmail( const QString& ) ), | 290 | connect( mDetails, SIGNAL( sendEmail( const QString& ) ), |
291 | SLOT( sendMail( const QString& ) ) ); | 291 | SLOT( sendMail( const QString& ) ) ); |
292 | 292 | ||
293 | 293 | ||
294 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); | 294 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); |
295 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); | 295 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); |
296 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); | 296 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); |
297 | connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); | ||
297 | 298 | ||
298 | 299 | ||
299 | #ifndef KAB_EMBEDDED | 300 | #ifndef KAB_EMBEDDED |
300 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), | 301 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), |
301 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); | 302 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); |
302 | 303 | ||
303 | connect( mDetails, SIGNAL( browse( const QString& ) ), | 304 | connect( mDetails, SIGNAL( browse( const QString& ) ), |
304 | SLOT( browse( const QString& ) ) ); | 305 | SLOT( browse( const QString& ) ) ); |
305 | 306 | ||
306 | 307 | ||
307 | mAddressBookService = new KAddressBookService( this ); | 308 | mAddressBookService = new KAddressBookService( this ); |
308 | 309 | ||
309 | #endif //KAB_EMBEDDED | 310 | #endif //KAB_EMBEDDED |
310 | 311 | ||
311 | mMessageTimer = new QTimer( this ); | 312 | mMessageTimer = new QTimer( this ); |
312 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); | 313 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); |
313 | mEditorDialog = 0; | 314 | mEditorDialog = 0; |
314 | createAddresseeEditorDialog( this ); | 315 | createAddresseeEditorDialog( this ); |
315 | setModified( false ); | 316 | setModified( false ); |
316 | mBRdisabled = false; | 317 | mBRdisabled = false; |
317 | #ifndef DESKTOP_VERSION | 318 | #ifndef DESKTOP_VERSION |
318 | infrared = 0; | 319 | infrared = 0; |
319 | #endif | 320 | #endif |
320 | //toggleBeamReceive( ); | 321 | //toggleBeamReceive( ); |
321 | } | 322 | } |
322 | 323 | ||
323 | KABCore::~KABCore() | 324 | KABCore::~KABCore() |
324 | { | 325 | { |
325 | // save(); | 326 | // save(); |
326 | //saveSettings(); | 327 | //saveSettings(); |
327 | //KABPrefs::instance()->writeConfig(); | 328 | //KABPrefs::instance()->writeConfig(); |
328 | delete AddresseeConfig::instance(); | 329 | delete AddresseeConfig::instance(); |
@@ -1257,64 +1258,69 @@ void KABCore::redo() | |||
1257 | 1258 | ||
1258 | void KABCore::setJumpButtonBarVisible( bool visible ) | 1259 | void KABCore::setJumpButtonBarVisible( bool visible ) |
1259 | { | 1260 | { |
1260 | if (mMultipleViewsAtOnce) | 1261 | if (mMultipleViewsAtOnce) |
1261 | { | 1262 | { |
1262 | if ( visible ) | 1263 | if ( visible ) |
1263 | mJumpButtonBar->show(); | 1264 | mJumpButtonBar->show(); |
1264 | else | 1265 | else |
1265 | mJumpButtonBar->hide(); | 1266 | mJumpButtonBar->hide(); |
1266 | } | 1267 | } |
1267 | else | 1268 | else |
1268 | { | 1269 | { |
1269 | // show the jumpbar only if "the details are hidden" == "viewmanager are shown" | 1270 | // show the jumpbar only if "the details are hidden" == "viewmanager are shown" |
1270 | if (mViewManager->isVisible()) | 1271 | if (mViewManager->isVisible()) |
1271 | { | 1272 | { |
1272 | if ( visible ) | 1273 | if ( visible ) |
1273 | mJumpButtonBar->show(); | 1274 | mJumpButtonBar->show(); |
1274 | else | 1275 | else |
1275 | mJumpButtonBar->hide(); | 1276 | mJumpButtonBar->hide(); |
1276 | } | 1277 | } |
1277 | else | 1278 | else |
1278 | { | 1279 | { |
1279 | mJumpButtonBar->hide(); | 1280 | mJumpButtonBar->hide(); |
1280 | } | 1281 | } |
1281 | } | 1282 | } |
1282 | } | 1283 | } |
1283 | 1284 | ||
1284 | 1285 | ||
1285 | void KABCore::setDetailsToState() | 1286 | void KABCore::setDetailsToState() |
1286 | { | 1287 | { |
1287 | setDetailsVisible( mActionDetails->isChecked() ); | 1288 | setDetailsVisible( mActionDetails->isChecked() ); |
1288 | } | 1289 | } |
1290 | void KABCore::setDetailsToggle() | ||
1291 | { | ||
1292 | mActionDetails->setChecked( !mActionDetails->isChecked() ); | ||
1293 | setDetailsToState(); | ||
1294 | } | ||
1289 | 1295 | ||
1290 | 1296 | ||
1291 | 1297 | ||
1292 | void KABCore::setDetailsVisible( bool visible ) | 1298 | void KABCore::setDetailsVisible( bool visible ) |
1293 | { | 1299 | { |
1294 | if (visible && mDetails->isHidden()) | 1300 | if (visible && mDetails->isHidden()) |
1295 | { | 1301 | { |
1296 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); | 1302 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); |
1297 | if ( addrList.count() > 0 ) | 1303 | if ( addrList.count() > 0 ) |
1298 | mDetails->setAddressee( addrList[ 0 ] ); | 1304 | mDetails->setAddressee( addrList[ 0 ] ); |
1299 | } | 1305 | } |
1300 | 1306 | ||
1301 | // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between | 1307 | // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between |
1302 | // the listview and the detailview. We do that by changing the splitbar size. | 1308 | // the listview and the detailview. We do that by changing the splitbar size. |
1303 | if (mMultipleViewsAtOnce) | 1309 | if (mMultipleViewsAtOnce) |
1304 | { | 1310 | { |
1305 | if ( visible ) | 1311 | if ( visible ) |
1306 | mDetails->show(); | 1312 | mDetails->show(); |
1307 | else | 1313 | else |
1308 | mDetails->hide(); | 1314 | mDetails->hide(); |
1309 | } | 1315 | } |
1310 | else | 1316 | else |
1311 | { | 1317 | { |
1312 | if ( visible ) { | 1318 | if ( visible ) { |
1313 | mViewManager->hide(); | 1319 | mViewManager->hide(); |
1314 | mDetails->show(); | 1320 | mDetails->show(); |
1315 | mIncSearchWidget->setFocus(); | 1321 | mIncSearchWidget->setFocus(); |
1316 | } | 1322 | } |
1317 | else { | 1323 | else { |
1318 | mViewManager->show(); | 1324 | mViewManager->show(); |
1319 | mDetails->hide(); | 1325 | mDetails->hide(); |
1320 | mViewManager->setFocusAV(); | 1326 | mViewManager->setFocusAV(); |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index a288505..6831ec9 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -117,64 +117,65 @@ class KABCore : public QWidget, public KSyncInterface | |||
117 | KActionCollection *actionCollection() const; | 117 | KActionCollection *actionCollection() const; |
118 | 118 | ||
119 | /** | 119 | /** |
120 | Returns the current search field of the Incremental Search Widget. | 120 | Returns the current search field of the Incremental Search Widget. |
121 | */ | 121 | */ |
122 | KABC::Field *currentSearchField() const; | 122 | KABC::Field *currentSearchField() const; |
123 | 123 | ||
124 | /** | 124 | /** |
125 | Returns the uid list of the currently selected contacts. | 125 | Returns the uid list of the currently selected contacts. |
126 | */ | 126 | */ |
127 | QStringList selectedUIDs() const; | 127 | QStringList selectedUIDs() const; |
128 | 128 | ||
129 | /** | 129 | /** |
130 | Displays the ResourceSelectDialog and returns the selected | 130 | Displays the ResourceSelectDialog and returns the selected |
131 | resource or a null pointer if no resource was selected by | 131 | resource or a null pointer if no resource was selected by |
132 | the user. | 132 | the user. |
133 | */ | 133 | */ |
134 | KABC::Resource *requestResource( QWidget *parent ); | 134 | KABC::Resource *requestResource( QWidget *parent ); |
135 | 135 | ||
136 | #ifndef KAB_EMBEDDED | 136 | #ifndef KAB_EMBEDDED |
137 | static KAboutData *createAboutData(); | 137 | static KAboutData *createAboutData(); |
138 | #endif //KAB_EMBEDDED | 138 | #endif //KAB_EMBEDDED |
139 | 139 | ||
140 | #ifdef KAB_EMBEDDED | 140 | #ifdef KAB_EMBEDDED |
141 | inline QPopupMenu* getImportMenu() { return ImportMenu;} | 141 | inline QPopupMenu* getImportMenu() { return ImportMenu;} |
142 | inline QPopupMenu* getExportMenu() { return ExportMenu;} | 142 | inline QPopupMenu* getExportMenu() { return ExportMenu;} |
143 | #endif //KAB_EMBEDDED | 143 | #endif //KAB_EMBEDDED |
144 | 144 | ||
145 | public slots: | 145 | public slots: |
146 | #ifdef KAB_EMBEDDED | 146 | #ifdef KAB_EMBEDDED |
147 | void createAboutData(); | 147 | void createAboutData(); |
148 | #endif //KAB_EMBEDDED | 148 | #endif //KAB_EMBEDDED |
149 | void setDetailsToggle(); | ||
149 | 150 | ||
150 | void showLicence(); | 151 | void showLicence(); |
151 | void faq(); | 152 | void faq(); |
152 | void whatsnew() ; | 153 | void whatsnew() ; |
153 | void synchowto() ; | 154 | void synchowto() ; |
154 | void writeToPhone(); | 155 | void writeToPhone(); |
155 | 156 | ||
156 | /** | 157 | /** |
157 | Is called whenever a contact is selected in the view. | 158 | Is called whenever a contact is selected in the view. |
158 | */ | 159 | */ |
159 | void setContactSelected( const QString &uid ); | 160 | void setContactSelected( const QString &uid ); |
160 | 161 | ||
161 | /** | 162 | /** |
162 | Opens the preferred mail composer with all selected contacts as | 163 | Opens the preferred mail composer with all selected contacts as |
163 | arguments. | 164 | arguments. |
164 | */ | 165 | */ |
165 | void sendMail(); | 166 | void sendMail(); |
166 | 167 | ||
167 | /** | 168 | /** |
168 | Opens the preferred mail composer with the given contacts as | 169 | Opens the preferred mail composer with the given contacts as |
169 | arguments. | 170 | arguments. |
170 | */ | 171 | */ |
171 | void sendMail( const QString& email ); | 172 | void sendMail( const QString& email ); |
172 | 173 | ||
173 | 174 | ||
174 | void mailVCard(); | 175 | void mailVCard(); |
175 | void mailVCard(const QStringList& uids); | 176 | void mailVCard(const QStringList& uids); |
176 | 177 | ||
177 | /** | 178 | /** |
178 | Beams the "WhoAmI contact. | 179 | Beams the "WhoAmI contact. |
179 | */ | 180 | */ |
180 | void beamMySelf(); | 181 | void beamMySelf(); |
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index 9085673..9f12152 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp | |||
@@ -1087,64 +1087,70 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete | |||
1087 | 1087 | ||
1088 | if(it2 != keyvallist.end()) | 1088 | if(it2 != keyvallist.end()) |
1089 | { | 1089 | { |
1090 | QString value = (*it2); | 1090 | QString value = (*it2); |
1091 | value = value.replace( QRegExp("%1"), param1 ); | 1091 | value = value.replace( QRegExp("%1"), param1 ); |
1092 | value = value.replace( QRegExp("%2"), param2 ); | 1092 | value = value.replace( QRegExp("%2"), param2 ); |
1093 | 1093 | ||
1094 | valmap.insert(key, value); | 1094 | valmap.insert(key, value); |
1095 | useValMap = true; | 1095 | useValMap = true; |
1096 | } | 1096 | } |
1097 | else | 1097 | else |
1098 | { | 1098 | { |
1099 | // qDebug("pass parameter << %s", key.latin1()); | 1099 | // qDebug("pass parameter << %s", key.latin1()); |
1100 | (*e) << key; | 1100 | (*e) << key; |
1101 | } | 1101 | } |
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | if (useValMap == true) | 1104 | if (useValMap == true) |
1105 | (*e) << valmap; | 1105 | (*e) << valmap; |
1106 | 1106 | ||
1107 | #endif | 1107 | #endif |
1108 | 1108 | ||
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | 1111 | ||
1112 | 1112 | ||
1113 | /************************************************************************** | 1113 | /************************************************************************** |
1114 | * | 1114 | * |
1115 | **************************************************************************/ | 1115 | **************************************************************************/ |
1116 | 1116 | ||
1117 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) | 1117 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) |
1118 | { | 1118 | { |
1119 | |||
1120 | if ( cmsg == "nextView()" ) { | ||
1121 | emit nextView(); | ||
1122 | return; | ||
1123 | } | ||
1124 | |||
1119 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1125 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1120 | if (!res) | 1126 | if (!res) |
1121 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); | 1127 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); |
1122 | 1128 | ||
1123 | if (!res) | 1129 | if (!res) |
1124 | res = mDisplayDetails->appMessage( cmsg, data ); | 1130 | res = mDisplayDetails->appMessage( cmsg, data ); |
1125 | 1131 | ||
1126 | // if (!res) | 1132 | // if (!res) |
1127 | // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1133 | // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1128 | } | 1134 | } |
1129 | 1135 | ||
1130 | 1136 | ||
1131 | 1137 | ||
1132 | bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) | 1138 | bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) |
1133 | { | 1139 | { |
1134 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1140 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1135 | return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); | 1141 | return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); |
1136 | } | 1142 | } |
1137 | 1143 | ||
1138 | bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) | 1144 | bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) |
1139 | { | 1145 | { |
1140 | QStringList list4, list5, list6; | 1146 | QStringList list4, list5, list6; |
1141 | 1147 | ||
1142 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1148 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1143 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); | 1149 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1144 | } | 1150 | } |
1145 | 1151 | ||
1146 | bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) | 1152 | bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) |
1147 | { | 1153 | { |
1148 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); | 1154 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); |
1149 | return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); | 1155 | return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); |
1150 | } | 1156 | } |
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h index 6f5d345..52a64e1 100644 --- a/libkdepim/externalapphandler.h +++ b/libkdepim/externalapphandler.h | |||
@@ -204,64 +204,65 @@ class ExternalAppHandler : public QObject | |||
204 | //Call this method on the source when you want to select names from the addressbook by using QCop | 204 | //Call this method on the source when you want to select names from the addressbook by using QCop |
205 | bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid); | 205 | bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid); |
206 | //Call this method on the target when you want to return the name/email map to the source (client). | 206 | //Call this method on the target when you want to return the name/email map to the source (client). |
207 | bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); | 207 | bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); |
208 | 208 | ||
209 | 209 | ||
210 | 210 | ||
211 | bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email); | 211 | bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email); |
212 | bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); | 212 | bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); |
213 | 213 | ||
214 | bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); | 214 | bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); |
215 | 215 | ||
216 | 216 | ||
217 | 217 | ||
218 | bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid); | 218 | bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid); |
219 | bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, | 219 | bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, |
220 | const QStringList& birthdayList, const QStringList& anniversaryList, | 220 | const QStringList& birthdayList, const QStringList& anniversaryList, |
221 | const QStringList& realNameList, const QStringList& emailList, | 221 | const QStringList& realNameList, const QStringList& emailList, |
222 | const QStringList& assembledNameList, const QStringList& uidList); | 222 | const QStringList& assembledNameList, const QStringList& uidList); |
223 | 223 | ||
224 | 224 | ||
225 | //loadConfig clears the cache and checks again if the applications are available or not | 225 | //loadConfig clears the cache and checks again if the applications are available or not |
226 | void loadConfig(); | 226 | void loadConfig(); |
227 | 227 | ||
228 | QList<DefaultAppItem> getAvailableDefaultItems(Types); | 228 | QList<DefaultAppItem> getAvailableDefaultItems(Types); |
229 | DefaultAppItem* getDefaultItem(Types, int); | 229 | DefaultAppItem* getDefaultItem(Types, int); |
230 | 230 | ||
231 | public slots: | 231 | public slots: |
232 | void appMessage( const QCString& msg, const QByteArray& data ); | 232 | void appMessage( const QCString& msg, const QByteArray& data ); |
233 | 233 | ||
234 | 234 | ||
235 | signals: | 235 | signals: |
236 | void nextView(); | ||
236 | // Emmitted when the target app receives a request from the source app | 237 | // Emmitted when the target app receives a request from the source app |
237 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); | 238 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); |
238 | 239 | ||
239 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi | 240 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi |
240 | // The first parameter is a uniqueid. It can be used to identify the event | 241 | // The first parameter is a uniqueid. It can be used to identify the event |
241 | void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); | 242 | void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); |
242 | 243 | ||
243 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); | 244 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); |
244 | void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); | 245 | void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); |
245 | 246 | ||
246 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | 247 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); |
247 | 248 | ||
248 | 249 | ||
249 | // Emmitted when the target app receives a request from the source app | 250 | // Emmitted when the target app receives a request from the source app |
250 | void requestForBirthdayList(const QString& sourceChannel, const QString& uid); | 251 | void requestForBirthdayList(const QString& sourceChannel, const QString& uid); |
251 | 252 | ||
252 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi | 253 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi |
253 | // The first parameter is a uniqueid. It can be used to identify the event | 254 | // The first parameter is a uniqueid. It can be used to identify the event |
254 | void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList, | 255 | void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList, |
255 | const QStringList& anniversaryList, const QStringList& realNameList, | 256 | const QStringList& anniversaryList, const QStringList& realNameList, |
256 | const QStringList& emailList, const QStringList& assembledNameList, | 257 | const QStringList& emailList, const QStringList& assembledNameList, |
257 | const QStringList& uidList); | 258 | const QStringList& uidList); |
258 | 259 | ||
259 | 260 | ||
260 | private: | 261 | private: |
261 | ExternalAppHandler(); | 262 | ExternalAppHandler(); |
262 | QList<DefaultAppItem> mDefaultItems; | 263 | QList<DefaultAppItem> mDefaultItems; |
263 | 264 | ||
264 | Availability mEmailAppAvailable; | 265 | Availability mEmailAppAvailable; |
265 | Availability mPhoneAppAvailable; | 266 | Availability mPhoneAppAvailable; |
266 | Availability mFaxAppAvailable; | 267 | Availability mFaxAppAvailable; |
267 | Availability mSMSAppAvailable; | 268 | Availability mSMSAppAvailable; |
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp index fbd17a7..68f3637 100644 --- a/pwmanager/pwmanager/pwminit.cpp +++ b/pwmanager/pwmanager/pwminit.cpp | |||
@@ -156,64 +156,73 @@ void PwMInit::initializeApp() | |||
156 | // savedCmd.minToTray) { | 156 | // savedCmd.minToTray) { |
157 | PwMDoc *newDoc = createDoc(); | 157 | PwMDoc *newDoc = createDoc(); |
158 | qDebug(" createDoc()"); | 158 | qDebug(" createDoc()"); |
159 | if (!newDoc->openDocUi(newDoc, | 159 | if (!newDoc->openDocUi(newDoc, |
160 | conf()->confGlobAutoStart(), | 160 | conf()->confGlobAutoStart(), |
161 | openDeeplocked)) { | 161 | openDeeplocked)) { |
162 | delete newDoc; | 162 | delete newDoc; |
163 | } | 163 | } |
164 | 164 | ||
165 | //US ENH for embedded devices: in the case of failure, open a document the default way | 165 | //US ENH for embedded devices: in the case of failure, open a document the default way |
166 | createMainWnd(conf()->confGlobAutoStart(), | 166 | createMainWnd(conf()->confGlobAutoStart(), |
167 | openDeeplocked, | 167 | openDeeplocked, |
168 | true, | 168 | true, |
169 | 0, | 169 | 0, |
170 | savedCmd.minimized); | 170 | savedCmd.minimized); |
171 | 171 | ||
172 | 172 | ||
173 | 173 | ||
174 | 174 | ||
175 | //} | 175 | //} |
176 | } else { | 176 | } else { |
177 | createMainWnd(conf()->confGlobAutoStart(), | 177 | createMainWnd(conf()->confGlobAutoStart(), |
178 | openDeeplocked, | 178 | openDeeplocked, |
179 | true, | 179 | true, |
180 | 0, | 180 | 0, |
181 | savedCmd.minimized); | 181 | savedCmd.minimized); |
182 | } | 182 | } |
183 | runStatus = running; | 183 | runStatus = running; |
184 | } | 184 | } |
185 | 185 | ||
186 | void PwMInit::shutdownApp(int exitStatus) | 186 | void PwMInit::shutdownApp(int exitStatus) |
187 | { | 187 | { |
188 | |||
189 | |||
190 | PwM * iii; | ||
191 | while ( iii = _mainWndList.first() ) { | ||
192 | disconnect(iii, SIGNAL(closed(PwM *)), | ||
193 | this, SLOT(mainWndClosed(PwM *))); | ||
194 | mainWndClosed((iii)); | ||
195 | } | ||
196 | |||
188 | printDebug(string("PwMInit::shutdownApp(") | 197 | printDebug(string("PwMInit::shutdownApp(") |
189 | + tostr(exitStatus) + ") called."); | 198 | + tostr(exitStatus) + ") called."); |
190 | PWM_ASSERT((runStatus == running) || (runStatus == init)); | 199 | PWM_ASSERT((runStatus == running) || (runStatus == init)); |
191 | runStatus = shutdown; | 200 | runStatus = shutdown; |
192 | QApplication::exit(exitStatus); | 201 | QApplication::exit(exitStatus); |
193 | /* The destructor of PwMInit is called when control | 202 | /* The destructor of PwMInit is called when control |
194 | * leaves main() | 203 | * leaves main() |
195 | */ | 204 | */ |
196 | } | 205 | } |
197 | 206 | ||
198 | void PwMInit::initPosixSignalHandler() | 207 | void PwMInit::initPosixSignalHandler() |
199 | { | 208 | { |
200 | signal(SIGINT, sig_handler); | 209 | signal(SIGINT, sig_handler); |
201 | signal(SIGTERM, sig_handler); | 210 | signal(SIGTERM, sig_handler); |
202 | } | 211 | } |
203 | 212 | ||
204 | void PwMInit::initDCOP() | 213 | void PwMInit::initDCOP() |
205 | { | 214 | { |
206 | #ifndef PWM_EMBEDDED | 215 | #ifndef PWM_EMBEDDED |
207 | _dcopClient = app->dcopClient(); | 216 | _dcopClient = app->dcopClient(); |
208 | _dcopClient->setNotifications(true); | 217 | _dcopClient->setNotifications(true); |
209 | #endif | 218 | #endif |
210 | 219 | ||
211 | } | 220 | } |
212 | 221 | ||
213 | void PwMInit::initKWalletEmu(bool forceDisable, bool forceReload) | 222 | void PwMInit::initKWalletEmu(bool forceDisable, bool forceReload) |
214 | { | 223 | { |
215 | #ifdef CONFIG_KWALLETIF | 224 | #ifdef CONFIG_KWALLETIF |
216 | if (!conf()->confGlobKwalletEmu() || | 225 | if (!conf()->confGlobKwalletEmu() || |
217 | forceDisable) { | 226 | forceDisable) { |
218 | delete_ifnot_null(_kwalletEmu); | 227 | delete_ifnot_null(_kwalletEmu); |
219 | return; | 228 | return; |
@@ -395,64 +404,65 @@ again: | |||
395 | switch (mmlock) { | 404 | switch (mmlock) { |
396 | case 0: // don't lock anything | 405 | case 0: // don't lock anything |
397 | break; | 406 | break; |
398 | case 1: // normal lock | 407 | case 1: // normal lock |
399 | wnd->curDoc()->lockAll(true); | 408 | wnd->curDoc()->lockAll(true); |
400 | break; | 409 | break; |
401 | case 2: // deep-lock | 410 | case 2: // deep-lock |
402 | wnd->curDoc()->deepLock(); | 411 | wnd->curDoc()->deepLock(); |
403 | break; | 412 | break; |
404 | default: | 413 | default: |
405 | WARN(); | 414 | WARN(); |
406 | } | 415 | } |
407 | } else if (doDeleteDoc) { | 416 | } else if (doDeleteDoc) { |
408 | qDebug("doDeleteDoc "); | 417 | qDebug("doDeleteDoc "); |
409 | if (!wnd->curDoc()->tryDelete()) { | 418 | if (!wnd->curDoc()->tryDelete()) { |
410 | /* We failed deleting the doc, | 419 | /* We failed deleting the doc, |
411 | * so open a new window with it, again. | 420 | * so open a new window with it, again. |
412 | */ | 421 | */ |
413 | createMainWnd(QString::null, false, | 422 | createMainWnd(QString::null, false, |
414 | false, wnd->curDoc()); | 423 | false, wnd->curDoc()); |
415 | } | 424 | } |
416 | } | 425 | } |
417 | #ifndef PWM_EMBEDDED | 426 | #ifndef PWM_EMBEDDED |
418 | // find the closed window in the "mainWndList" and delete it. | 427 | // find the closed window in the "mainWndList" and delete it. |
419 | QValueList<PwM *>::iterator i = _mainWndList.begin(), | 428 | QValueList<PwM *>::iterator i = _mainWndList.begin(), |
420 | end = _mainWndList.end(); | 429 | end = _mainWndList.end(); |
421 | #else | 430 | #else |
422 | // find the closed window in the "mainWndList" and delete it. | 431 | // find the closed window in the "mainWndList" and delete it. |
423 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), | 432 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), |
424 | end = _mainWndList.end(); | 433 | end = _mainWndList.end(); |
425 | #endif | 434 | #endif |
426 | while (i != end) { | 435 | while (i != end) { |
436 | //qDebug("iii %x end %x wnd %x", (*i), (*end), wnd); | ||
427 | if (*i == wnd) { | 437 | if (*i == wnd) { |
428 | #ifndef PWM_EMBEDDED | 438 | #ifndef PWM_EMBEDDED |
429 | _mainWndList.erase(i); | 439 | _mainWndList.erase(i); |
430 | #else | 440 | #else |
431 | _mainWndList.remove(i); | 441 | _mainWndList.remove(i); |
432 | #endif | 442 | #endif |
433 | 443 | ||
434 | if ( app->mainWidget() == wnd ) { | 444 | if ( app->mainWidget() == wnd ) { |
435 | if ( _mainWndList.count() ) { | 445 | if ( _mainWndList.count() ) { |
436 | #ifndef DESKTOP_VERSION | 446 | #ifndef DESKTOP_VERSION |
437 | app->showMainWidget(_mainWndList.first() ); | 447 | app->showMainWidget(_mainWndList.first() ); |
438 | #endif //DESKTOP_VERSION | 448 | #endif //DESKTOP_VERSION |
439 | 449 | ||
440 | } | 450 | } |
441 | } | 451 | } |
442 | delete wnd; | 452 | delete wnd; |
443 | goto out_success; | 453 | goto out_success; |
444 | } | 454 | } |
445 | ++i; | 455 | ++i; |
446 | } | 456 | } |
447 | BUG(); | 457 | BUG(); |
448 | out_success: | 458 | out_success: |
449 | #ifndef PWM_EMBEDDED | 459 | #ifndef PWM_EMBEDDED |
450 | if (!_mainWndList.size()) | 460 | if (!_mainWndList.size()) |
451 | #else | 461 | #else |
452 | if (!_mainWndList.count()) | 462 | if (!_mainWndList.count()) |
453 | #endif | 463 | #endif |
454 | 464 | ||
455 | { | 465 | { |
456 | /* If there's no main window and no tray icon | 466 | /* If there's no main window and no tray icon |
457 | * left, we have no user interface, so we can | 467 | * left, we have no user interface, so we can |
458 | * shut down the application. | 468 | * shut down the application. |