summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-23 13:59:59 (UTC)
committer zautrix <zautrix>2005-08-23 13:59:59 (UTC)
commit02fa432f183ad2b18380de0e41399efe3b867dba (patch) (unidiff)
treed13d3941ef4d6abc90790d5b6039a92787ea7987
parent72d600e2c3b3405e5f37615a56560811c0cf9a78 (diff)
downloadkdepimpi-02fa432f183ad2b18380de0e41399efe3b867dba.zip
kdepimpi-02fa432f183ad2b18380de0e41399efe3b867dba.tar.gz
kdepimpi-02fa432f183ad2b18380de0e41399efe3b867dba.tar.bz2
fixx
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt2
-rw-r--r--kabc/stdaddressbook.cpp3
-rw-r--r--kabc/stdaddressbook.h2
-rw-r--r--kaddressbook/kabcore.cpp28
-rw-r--r--kaddressbook/kabcore.h4
-rw-r--r--kaddressbook/kaddressbookmain.cpp4
-rw-r--r--kaddressbook/mainembedded.cpp5
7 files changed, 37 insertions, 11 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 293aaea..ece26d2 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -812,7 +812,7 @@
812{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." }, 812{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." },
813{ "Import this contact?","Importiere diesen Kontakt?" }, 813{ "Import this contact?","Importiere diesen Kontakt?" },
814{ "Import all!","Importiere alle!" }, 814{ "Import all!","Importiere alle!" },
815{ "","" }, 815{ "Loading addressbook data ... please wait","Lade Adressbuchdaten ... bitte warten" },
816{ "","" }, 816{ "","" },
817{ "","" }, 817{ "","" },
818{ "","" }, 818{ "","" },
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp
index f17f366..a14ae20 100644
--- a/kabc/stdaddressbook.cpp
+++ b/kabc/stdaddressbook.cpp
@@ -113,13 +113,14 @@ StdAddressBook::StdAddressBook()
113 : AddressBook( "kabcrc" ) 113 : AddressBook( "kabcrc" )
114{ 114{
115 115
116 init( false ); 116 //init( false );
117} 117}
118 118
119StdAddressBook::StdAddressBook( bool onlyFastResources ) 119StdAddressBook::StdAddressBook( bool onlyFastResources )
120 : AddressBook( "kabcrc" ) 120 : AddressBook( "kabcrc" )
121{ 121{
122 122
123 if ( onlyFastResources )
123 init( onlyFastResources ); 124 init( onlyFastResources );
124} 125}
125 126
diff --git a/kabc/stdaddressbook.h b/kabc/stdaddressbook.h
index 9ec53b0..cf130b3 100644
--- a/kabc/stdaddressbook.h
+++ b/kabc/stdaddressbook.h
@@ -134,12 +134,12 @@ class StdAddressBook : public AddressBook
134 @param uid The uid of the users contact. 134 @param uid The uid of the users contact.
135 */ 135 */
136 void setWhoAmI( const Addressee &addr ); 136 void setWhoAmI( const Addressee &addr );
137 void init( bool onlyFastResources );
137 138
138 protected: 139 protected:
139 StdAddressBook(); 140 StdAddressBook();
140 StdAddressBook( bool onlyFastResources ); 141 StdAddressBook( bool onlyFastResources );
141 142
142 void init( bool onlyFastResources );
143 143
144 private: 144 private:
145 static QString setTempAppDir(); 145 static QString setTempAppDir();
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index b9830b1..c670b1f 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -403,9 +403,32 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
403 //toggleBeamReceive( ); 403 //toggleBeamReceive( );
404 mMainWindow->toolBar()->show(); 404 mMainWindow->toolBar()->show();
405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi 405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
406 QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 406 //QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
407 QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() ));
408}
409void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data )
410{
411 qDebug("KO: QCOP start message received: %s ", cmsg.data() );
412 mCStringMess = cmsg;
413 mByteData = data;
407} 414}
408 415
416void KABCore::loadDataAfterStart()
417{
418 qDebug("KABCore::loadDataAfterStart() ");
419 ((StdAddressBook*)mAddressBook)->init( true );
420 mViewManager->refreshView();
421
422#ifndef DESKTOP_VERSION
423 disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & )));
424
425 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
426 if ( !mCStringMess.isEmpty() )
427 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData );
428#endif
429 QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
430 setCaptionBack();
431}
409void KABCore::updateToolBar() 432void KABCore::updateToolBar()
410{ 433{
411 static int iii = 0; 434 static int iii = 0;
@@ -2445,7 +2468,6 @@ void KABCore::removeVoice()
2445 } 2468 }
2446 } 2469 }
2447 message(i18n("Refreshing view...") ); 2470 message(i18n("Refreshing view...") );
2448 qApp->processEvents();
2449 mViewManager->refreshView( "" ); 2471 mViewManager->refreshView( "" );
2450 Addressee add; 2472 Addressee add;
2451 mDetails->setAddressee( add ); 2473 mDetails->setAddressee( add );
@@ -2477,7 +2499,6 @@ void KABCore::setFormattedName()
2477 ++count; 2499 ++count;
2478 if ( count %10 == 0 ) 2500 if ( count %10 == 0 )
2479 message(i18n("Changing contact #%1").arg( count ) ); 2501 message(i18n("Changing contact #%1").arg( count ) );
2480 qApp->processEvents();
2481 QString fName; 2502 QString fName;
2482 if ( setpref.simple->isChecked() ) 2503 if ( setpref.simple->isChecked() )
2483 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); 2504 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName );
@@ -2497,7 +2518,6 @@ void KABCore::setFormattedName()
2497 } 2518 }
2498 } 2519 }
2499 message(i18n("Refreshing view...") ); 2520 message(i18n("Refreshing view...") );
2500 qApp->processEvents();
2501 if ( modified ) 2521 if ( modified )
2502 setModified( true ); 2522 setModified( true );
2503 Addressee add; 2523 Addressee add;
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index ceeeda7..42b7709 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -354,6 +354,7 @@ class KABCore : public QWidget, public KSyncInterface
354 void contactSelected( const QString &name ); 354 void contactSelected( const QString &name );
355 void contactSelected( const QPixmap &pixmap ); 355 void contactSelected( const QPixmap &pixmap );
356 public slots: 356 public slots:
357 void loadDataAfterStart();
357 void recieve(QString cmsg ); 358 void recieve(QString cmsg );
358 void getFile( bool success ); 359 void getFile( bool success );
359 void syncFileRequest(); 360 void syncFileRequest();
@@ -366,6 +367,7 @@ class KABCore : public QWidget, public KSyncInterface
366 void updateToolBar(); 367 void updateToolBar();
367 void updateMainWindow(); 368 void updateMainWindow();
368 void receive( const QCString& cmsg, const QByteArray& data ); 369 void receive( const QCString& cmsg, const QByteArray& data );
370 void receiveStart( const QCString& cmsg, const QByteArray& data );
369 void toggleBeamReceive( ); 371 void toggleBeamReceive( );
370 void disableBR(bool); 372 void disableBR(bool);
371 void setJumpButtonBarVisible( bool visible ); 373 void setJumpButtonBarVisible( bool visible );
@@ -392,6 +394,8 @@ class KABCore : public QWidget, public KSyncInterface
392 void addressBookChanged(); 394 void addressBookChanged();
393 395
394 private: 396 private:
397 QCString mCStringMess;
398 QByteArray mByteData;
395 QString mEmailSourceChannel; 399 QString mEmailSourceChannel;
396 QString mEmailSourceUID; 400 QString mEmailSourceUID;
397 void resizeEvent(QResizeEvent* e ); 401 void resizeEvent(QResizeEvent* e );
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index 519dc92..8fe3ee0 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -83,8 +83,10 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW
83 83
84#endif //KAB_EMBEDDED 84#endif //KAB_EMBEDDED
85 setAutoSaveSettings(); 85 setAutoSaveSettings();
86 qApp->processEvents();
87 mCore->restoreSettings(); 86 mCore->restoreSettings();
87#ifndef DESKTOP_VERSION
88 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & )));
89#endif
88} 90}
89 91
90KAddressBookMain::~KAddressBookMain() 92KAddressBookMain::~KAddressBookMain()
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 93ba53c..2f3531d 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -79,9 +79,7 @@ int main( int argc, char **argv )
79 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); 79 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
80 KAddressBookMain m ; 80 KAddressBookMain m ;
81//US MainWindow m; 81//US MainWindow m;
82#ifndef DESKTOP_VERSION 82
83 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
84#endif
85 83
86 84
87#ifndef DESKTOP_VERSION 85#ifndef DESKTOP_VERSION
@@ -91,6 +89,7 @@ int main( int argc, char **argv )
91 a.setMainWidget( &m ); 89 a.setMainWidget( &m );
92 m.show(); 90 m.show();
93#endif 91#endif
92 m.setCaption(i18n("Loading addressbook data ... please wait" ));
94 a.exec(); 93 a.exec();
95#ifdef DESKTOP_VERSION 94#ifdef DESKTOP_VERSION
96 KConfig *config = KABPrefs::instance()->getConfig(); 95 KConfig *config = KABPrefs::instance()->getConfig();