summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt2
-rw-r--r--kabc/stdaddressbook.cpp5
-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, 38 insertions, 12 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
@@ -803,18 +803,18 @@
{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" },
{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." },
{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" },
{ "Writing back file ...","Schreibe Datei zurück..." },
{ "Sending back file ...","Sende Datei zurück..." },
{ "Eeek, there I am ticklish!","Huch, da bin ich kitzlig!" },
{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" },
{ "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" },
{ "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" },
{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." },
{ "Import this contact?","Importiere diesen Kontakt?" },
{ "Import all!","Importiere alle!" },
-{ "","" },
+{ "Loading addressbook data ... please wait","Lade Adressbuchdaten ... bitte warten" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" }, \ No newline at end of file
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp
index f17f366..a14ae20 100644
--- a/kabc/stdaddressbook.cpp
+++ b/kabc/stdaddressbook.cpp
@@ -104,32 +104,33 @@ StdAddressBook *StdAddressBook::self( bool onlyFastResources )
#else //KAB_EMBEDDED
addressBookDeleter.setObject( mSelf, new StdAddressBook( onlyFastResources ) );
#endif //KAB_EMBEDDED
KStandardDirs::setAppDir( appdir );
}
return mSelf;
}
StdAddressBook::StdAddressBook()
: AddressBook( "kabcrc" )
{
- init( false );
+ //init( false );
}
StdAddressBook::StdAddressBook( bool onlyFastResources )
: AddressBook( "kabcrc" )
{
- init( onlyFastResources );
+ if ( onlyFastResources )
+ init( onlyFastResources );
}
StdAddressBook::~StdAddressBook()
{
if ( mAutomaticSave )
save();
}
void StdAddressBook::init( bool )
{
KRES::Manager<Resource> *manager = resourceManager();
KRES::Manager<Resource>::ActiveIterator it;
diff --git a/kabc/stdaddressbook.h b/kabc/stdaddressbook.h
index 9ec53b0..cf130b3 100644
--- a/kabc/stdaddressbook.h
+++ b/kabc/stdaddressbook.h
@@ -125,27 +125,27 @@ class StdAddressBook : public AddressBook
Returns the contact, that is associated with the owner of the
address book. This contact should be used by other programs
to access user specific data.
*/
Addressee whoAmI();
/**
Sets the users contact. See @ref whoAmI() for more information.
@param uid The uid of the users contact.
*/
void setWhoAmI( const Addressee &addr );
+ void init( bool onlyFastResources );
protected:
StdAddressBook();
StdAddressBook( bool onlyFastResources );
- void init( bool onlyFastResources );
private:
static QString setTempAppDir();
static StdAddressBook *mSelf;
static bool mAutomaticSave;
};
}
#endif
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index b9830b1..c670b1f 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -394,27 +394,50 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
mMessageTimer = new QTimer( this );
connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
mEditorDialog = 0;
createAddresseeEditorDialog( this );
setModified( false );
mBRdisabled = false;
#ifndef DESKTOP_VERSION
infrared = 0;
#endif
//toggleBeamReceive( );
mMainWindow->toolBar()->show();
// we have a toolbar repainting error on the Zaurus when starting KA/Pi
- QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
+ //QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
+ QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() ));
+}
+void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data )
+{
+ qDebug("KO: QCOP start message received: %s ", cmsg.data() );
+ mCStringMess = cmsg;
+ mByteData = data;
}
+void KABCore::loadDataAfterStart()
+{
+ qDebug("KABCore::loadDataAfterStart() ");
+ ((StdAddressBook*)mAddressBook)->init( true );
+ mViewManager->refreshView();
+
+#ifndef DESKTOP_VERSION
+ disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & )));
+
+ QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
+ if ( !mCStringMess.isEmpty() )
+ ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData );
+#endif
+ QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
+ setCaptionBack();
+}
void KABCore::updateToolBar()
{
static int iii = 0;
++iii;
mMainWindow->toolBar()->repaintMe();
if ( iii < 4 )
QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar()));
}
KABCore::~KABCore()
{
// save();
//saveSettings();
@@ -2436,25 +2459,24 @@ void KABCore::removeVoice()
if ( !dlg.exec() )
return;
mAddressBook->setUntagged();
dlg.tagSelected();
message(i18n("Removing voice..."), false );
KABC::AddressBook::Iterator it;
for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
if ( (*it).tagged() ) {
(*it).removeVoice();
}
}
message(i18n("Refreshing view...") );
- qApp->processEvents();
mViewManager->refreshView( "" );
Addressee add;
mDetails->setAddressee( add );
message(i18n("Remove voice completed!") );
}
void KABCore::setFormattedName()
{
KABFormatPrefs setpref;
@@ -2468,45 +2490,43 @@ void KABCore::setFormattedName()
dlg.tagSelected();
int count = 0;
KABC::AddressBook::Iterator it;
bool modified = false;
for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
if ( (*it).tagged() ) {
if ( (*it).uid().left( 2 ) == "la" )
if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") )
continue;
++count;
if ( count %10 == 0 )
message(i18n("Changing contact #%1").arg( count ) );
- qApp->processEvents();
QString fName;
if ( setpref.simple->isChecked() )
fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName );
else if ( setpref.full->isChecked() )
fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName );
else if ( setpref.reverse->isChecked() )
fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName );
else
fName = (*it).organization();
if ( setpref.setCompany->isChecked() )
if ( fName.isEmpty() || fName =="," )
fName = (*it).organization();
(*it).setFormattedName( fName );
(*it).setChanged( true );
modified = true;
(*it).setRevision( QDateTime::currentDateTime() );
}
}
message(i18n("Refreshing view...") );
- qApp->processEvents();
if ( modified )
setModified( true );
Addressee add;
mDetails->setAddressee( add );
if ( count == 0 )
message(i18n("No contact changed!") );
else
message(i18n("%1 contacts changed!").arg( count ) );
}
void KABCore::clipboardDataChanged()
{
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index ceeeda7..42b7709 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -345,36 +345,38 @@ class KABCore : public QWidget, public KSyncInterface
*/
void addGUIClient( KXMLGUIClient *client );
void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid);
void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid);
void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid);
signals:
void contactSelected( const QString &name );
void contactSelected( const QPixmap &pixmap );
public slots:
+ void loadDataAfterStart();
void recieve(QString cmsg );
void getFile( bool success );
void syncFileRequest();
void setDetailsVisible( bool visible );
void setDetailsToState();
void saveSettings();
private slots:
void updateToolBar();
void updateMainWindow();
void receive( const QCString& cmsg, const QByteArray& data );
+ void receiveStart( const QCString& cmsg, const QByteArray& data );
void toggleBeamReceive( );
void disableBR(bool);
void setJumpButtonBarVisible( bool visible );
void setJumpButtonBar( bool visible );
void setCaptionBack();
void resizeAndCallContactdialog();
void callContactdialog();
void doRingSync();
void importFromOL();
void extensionModified( const KABC::Addressee::List &list );
void extensionChanged( int id );
@@ -383,24 +385,26 @@ class KABCore : public QWidget, public KSyncInterface
void configureKeyBindings();
void removeVoice();
void setFormattedName();
#ifdef KAB_EMBEDDED
void configureResources();
#endif //KAB_EMBEDDED
void slotEditorDestroyed( const QString &uid );
void configurationChanged();
void addressBookChanged();
private:
+ QCString mCStringMess;
+ QByteArray mByteData;
QString mEmailSourceChannel;
QString mEmailSourceUID;
void resizeEvent(QResizeEvent* e );
bool mBRdisabled;
#ifndef DESKTOP_VERSION
QCopChannel* infrared;
#endif
QTimer *mMessageTimer;
void initGUI();
void initActions();
QString getPhoneFile();
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index 519dc92..8fe3ee0 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -74,26 +74,28 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW
setCentralWidget( mCore );
//US statusBar()->show();
#ifndef KAB_EMBEDDED
setStandardToolBarMenuEnabled(true);
createGUI( "kaddressbookui.rc", false );
#endif //KAB_EMBEDDED
setAutoSaveSettings();
- qApp->processEvents();
mCore->restoreSettings();
+#ifndef DESKTOP_VERSION
+ QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & )));
+#endif
}
KAddressBookMain::~KAddressBookMain()
{
// mCore->saveSettings();
}
void KAddressBookMain::showMinimized ()
{
QWidget::showMinimized () ;
}
void KAddressBookMain::addEmail( QString addr )
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 93ba53c..2f3531d 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -70,36 +70,35 @@ int main( int argc, char **argv )
QString fileName ;
fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
QApplication::addLibraryPath ( qApp->applicationDirPath () );
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
// init language
KPimGlobalPrefs::instance()->setGlobalConfig();
QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
KAddressBookMain m ;
//US MainWindow m;
-#ifndef DESKTOP_VERSION
- QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
-#endif
+
#ifndef DESKTOP_VERSION
a.showMainWidget( &m );
#else
a.setMainWidget( &m );
m.show();
#endif
+ m.setCaption(i18n("Loading addressbook data ... please wait" ));
a.exec();
#ifdef DESKTOP_VERSION
KConfig *config = KABPrefs::instance()->getConfig();
config->setGroup("WidgetLayout");
QStringList list ;//= config->readListEntry("MainLayout");
int x,y,w,h;
QWidget* wid;
wid = &m;
x = wid->geometry().x();
y = wid->geometry().y();
w = wid->width();
h = wid->height();