summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-29 16:14:46 (UTC)
committer zautrix <zautrix>2005-06-29 16:14:46 (UTC)
commit77aa480c9891a90c9b492618ebfd2b20f2d0727a (patch) (side-by-side diff)
tree4f2c278d016fe21f280f8ee6abbca34685aada96
parente0fa858c284dddf0d47146e666c4ece7158487be (diff)
downloadkdepimpi-77aa480c9891a90c9b492618ebfd2b20f2d0727a.zip
kdepimpi-77aa480c9891a90c9b492618ebfd2b20f2d0727a.tar.gz
kdepimpi-77aa480c9891a90c9b492618ebfd2b20f2d0727a.tar.bz2
many sync fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt4
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--kaddressbook/addresseeeditorwidget.cpp6
-rw-r--r--kaddressbook/kabcore.cpp5
-rw-r--r--kaddressbook/kabcore.h1
-rw-r--r--korganizer/mainwindow.cpp23
-rw-r--r--korganizer/mainwindow.h1
-rw-r--r--libkdepim/externalapphandler.cpp12
-rw-r--r--libkdepim/externalapphandler.h1
-rw-r--r--libkdepim/ksyncmanager.cpp18
11 files changed, 55 insertions, 23 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 54376a0..10778ac 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,35 +1,40 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.1.11 ************
KO/Pi:
Because we can have many calendars now in KO/Pi we can have more than one journal entry per day.
Added features to handle (and add ) more than one journal entry per day.
Added option for a journal title.
Added info about the calendar, the item belongs to, to the event/todo/journal viewer.
+
+Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet.
+
+Added KA/Pi multi sync to the multi sync called from the alarm applet.
+
********** VERSION 2.1.10 ************
KO/Pi:
Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file.
When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted.
Fixed a bug in searching for a small timerange, i.e. one day.
KA/Pi:
Fixed two problems in csv export.
Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi.
********** VERSION 2.1.9 ************
KO/Pi:
Fixed some problems of the new search options in the search dialog.
Fixed some problems in the new resource config options.
Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page.
Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup.
Fixed a problem in recurrence range in syncing with DTM.
KA/Pi:
Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...)
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 515161f..c18a241 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -236,54 +236,54 @@
{ "Local file ABook:","Lokale Datei ABuch:" },
{ "Local file PWMgr:","Lokale Datei PWMgr:" },
{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
{ "Calendar:","Kalender:" },
{ "AddressBook:","AdressBuch:" },
{ "PWManager:","PWManager:" },
{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
{ "ssh/scp","ssh/scp" },
{ "ftp","ftp" },
{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
-{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
+{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen "Multi-Syncen"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
{ "KDE-Pim Sync","KDE-Pim Sync" },
{ "Multiple profiles","Multi-Sync Profile" },
{ "Device: ","Gerät: " },
{ "Multiple sync started.","Multi-Sync gestartet." },
-{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
+{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile selektiert für Multi-Sync" },
{ "KDE-Pim sync config","KDE-Pim Sync Konfig" },
{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein, z.B.:\n" },
{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Modell\nautomatisch\erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
{ "Edit Address Book Filters","Editiere Addressbuch Filter" },
{ "&Add...","Hinzufügen..." },
{ "&Edit...","B&earbeiten..." },
{ "&Remove","Entfe&rne" },
{ "Modify View: ","Ansicht ändern: " },
{ "Fields","Felder" },
{ "Select Fields to Display","Wähle anzuzeigende Felder" },
{ "All","Alles" },
{ "Frequent","Frequent" },
{ "Address","Adresse" },
{ "Email","E-Mail" },
{ "Personal","Persönl." },
{ "Organization","Organisation" },
{ "Custom","Benutzerdefiniert" },
{ "&Selected\nfields:","&Selektierte\nFelder:" },
{ "Formatted Name","Format. Name" },
{ "Additional Names","Mittelname" },
{ "Honorific Prefixes","Namensprefix" },
{ "Honorific Suffixes","Namenssuffix" },
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 510f4bf..792cb91 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -947,49 +947,49 @@
{ "Local file ABook:","Lokale Datei ABuch:" },
{ "Local file PWMgr:","Lokale Datei PWMgr:" },
{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
{ "Calendar:","Kalender:" },
{ "AddressBook:","AdressBuch:" },
{ "PWManager:","PWManager:" },
{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
{ "ssh/scp","ssh/scp" },
{ "ftp","ftp" },
{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
-{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
+{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen "Multi-Syncen"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
{ "KDE-Pim Sync","KDE-Pim Sync" },
{ "Multiple profiles","Multi-Sync Profile" },
{ "Device: ","Gerät: " },
{ "Multiple sync started.","Multi-Sync gestartet." },
{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
{ "Turn filter on","Schalte Filter an" },
{ "Turn filter off","Schalte Filter aus" },
{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" },
{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" },
{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" },
{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" },
{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" },
{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" },
{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" },
{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" },
{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" },
{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" },
{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" },
{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" },
{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" },
{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" },
{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" },
{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" },
{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" },
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp
index bd32859..5334a0e 100644
--- a/kaddressbook/addresseeeditorwidget.cpp
+++ b/kaddressbook/addresseeeditorwidget.cpp
@@ -638,71 +638,71 @@ void AddresseeEditorWidget::setupTab2()
++iii;
label = new QLabel( i18n( "Spouse's name:" ), tab2 );
layout->addWidget( label, iii, 1 );
mSpouseEdit = new KLineEdit( tab2 );
connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ),
SLOT( textChanged( const QString& ) ) );
label->setBuddy( mSpouseEdit );
layout->addWidget( mSpouseEdit, iii, 2 );
++iii;
}
label = new QLabel( i18n( "Children's names:" ), tab2 );
layout->addWidget( label, iii, 1 );
mChildEdit = new KLineEdit( tab2 );
connect( mChildEdit, SIGNAL( textChanged( const QString& ) ),
SLOT( textChanged( const QString& ) ) );
label->setBuddy( mChildEdit );
layout->addWidget( mChildEdit, iii, 2 );
++iii;
if ( QApplication::desktop()->width() == 640 ) {
QHBox * nbox = new QHBox ( tab2 );
label = new QLabel( i18n( "Birthday:" )+" ", nbox );
mBirthdayPicker = new KDateEdit( nbox );
- mBirthdayPicker->toggleDateFormat();
+ //mBirthdayPicker->toggleDateFormat();
mBirthdayPicker->setHandleInvalid( true );
connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ),
SLOT( dateChanged( QDate ) ) );
label->setBuddy( mBirthdayPicker );
label = new QLabel( " "+i18n( "Anniversary:" )+" ", nbox );
mAnniversaryPicker = new KDateEdit( nbox );
mAnniversaryPicker->setHandleInvalid( true );
connect( mAnniversaryPicker, SIGNAL( dateChanged( QDate ) ),
SLOT( dateChanged( QDate ) ) );
label->setBuddy( mAnniversaryPicker );
layout->addMultiCellWidget( nbox, iii, iii, 1, 2 );
++iii;
} else {
label = new QLabel( i18n( "Birthday:" ), tab2 );
layout->addWidget( label, iii, 1 );
mBirthdayPicker = new KDateEdit( tab2 );
- mBirthdayPicker->toggleDateFormat();
+ //mBirthdayPicker->toggleDateFormat();
mBirthdayPicker->setHandleInvalid( true );
connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ),
SLOT( dateChanged( QDate ) ) );
label->setBuddy( mBirthdayPicker );
layout->addWidget( mBirthdayPicker, iii, 2 );
++iii;
label = new QLabel( i18n( "Anniversary:" ), tab2 );
layout->addWidget( label, iii, 1 );
mAnniversaryPicker = new KDateEdit( tab2 );
mAnniversaryPicker->setHandleInvalid( true );
connect( mAnniversaryPicker, SIGNAL( dateChanged( QDate ) ),
SLOT( dateChanged( QDate ) ) );
label->setBuddy( mAnniversaryPicker );
layout->addWidget( mAnniversaryPicker, iii, 2 );
++iii;
}
label = new QLabel( i18n( "Gender:" ), tab2 );
layout->addWidget( label, iii, 1 );
mGenderBox = new QComboBox ( tab2 );
@@ -1058,50 +1058,48 @@ void AddresseeEditorWidget::load()
else if ( gen == "male" )
mGenderBox->setCurrentItem ( 2 );
else
mGenderBox->setCurrentItem ( 0 );
blockSignals( block );
mBlockSignals = false;
mDirty = false;
}
void AddresseeEditorWidget::save()
{
if ( !dirty() ) {
return;
}
mAddressee.setRevision( QDateTime::currentDateTime() );
mAddressee.setRole( mRoleEdit->text() );
mAddressee.setOrganization( mOrgEdit->text() );
mAddressee.setUrl( KURL( mURLEdit->text() ) );
mAddressee.setNote( mNoteEdit->text() );
if ( mBirthdayPicker->inputIsValid() ) {
QDate da = mBirthdayPicker->date();
- if ( da > QDate::currentDate() )
- da.setYMD(da.year()-100, da.month(), da.day() );
mAddressee.setBirthday( QDateTime( da ) );
//qDebug("bday %s ",da.toString().latin1());
}
else {
mAddressee.setBirthday( QDateTime() );
mBirthdayPicker->clear();
}
mAddressee.setNickName( mNicknameEdit->text() );
mAddressee.setCategories( QStringList::split( ",", mCategoryEdit->text() ) );
mAddressee.setGeo( mGeoWidget->geo() );
mAddressee.setPhoto( mImageWidget->photo() );
mAddressee.setLogo( mImageWidget->logo() );
mAddressee.setKeys( mKeyWidget->keys() );
#ifndef KAB_EMBEDDED
mAddressee.setSound( mSoundWidget->sound() );
#else //KAB_EMBEDDED
//US qDebug("AddresseeEditorWidget::save sound not supported");
#endif //KAB_EMBEDDED
mAddressee.setSecrecy( mSecrecyWidget->secrecy() );
// save custom fields
mAddressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", mIMAddressEdit->text() );
mAddressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", mSpouseEdit->text() );
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 3715786..046cb63 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -354,48 +354,49 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
connect( mViewManager, SIGNAL( deleteRequest( ) ),
SLOT( deleteContacts( ) ) );
connect( mViewManager, SIGNAL( modified() ),
SLOT( setModified() ) );
connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) );
connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) );
connect( mXXPortManager, SIGNAL( modified() ),
SLOT( setModified() ) );
connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
SLOT( incrementalSearchJump( const QString& ) ) );
connect( mIncSearchWidget, SIGNAL( fieldChanged() ),
mJumpButtonBar, SLOT( recreateButtons() ) );
connect( mDetails, SIGNAL( sendEmail( const QString& ) ),
SLOT( sendMail( const QString& ) ) );
connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&)));
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&)));
connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
+ connect( ExternalAppHandler::instance(), SIGNAL (doRingSync()),this, SLOT( doRingSync()));
connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog()));
#ifndef KAB_EMBEDDED
connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
mXXPortManager, SLOT( importVCard( const KURL& ) ) );
connect( mDetails, SIGNAL( browse( const QString& ) ),
SLOT( browse( const QString& ) ) );
mAddressBookService = new KAddressBookService( this );
#endif //KAB_EMBEDDED
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
@@ -2559,48 +2560,52 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
message( i18n("Resizing, please wait...") );
mMainWindow->showMinimized();
/*
{
QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
}
*/
QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) );
return;
}
} else {
qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid ");
}
callContactdialog();
//QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
#endif
}
void KABCore::resizeAndCallContactdialog()
{
updateMainWindow();
QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
}
+void KABCore::doRingSync()
+{
+ syncManager->multiSync( false );
+}
void KABCore::callContactdialog()
{
static bool running = false;
if (running) return;
running = true;
QStringList nameList;
QStringList emailList;
QStringList uidList;
qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() );
KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
uint i=0;
for (i=0; i < list.count(); i++)
{
nameList.append(list[i].realName());
emailList.append(list[i].preferredEmail());
uidList.append(list[i].uid());
}
QString uid = mEmailSourceUID;
//qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
running = false;
}
/* this method will be called through the QCop interface from Ko/Pi to select birthdays
* to put them into the calendar.
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 6479a58..ceeeda7 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -352,48 +352,49 @@ class KABCore : public QWidget, public KSyncInterface
signals:
void contactSelected( const QString &name );
void contactSelected( const QPixmap &pixmap );
public slots:
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 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 );
void clipboardDataChanged();
void updateActionMenu();
void configureKeyBindings();
void removeVoice();
void setFormattedName();
#ifdef KAB_EMBEDDED
void configureResources();
#endif //KAB_EMBEDDED
void slotEditorDestroyed( const QString &uid );
void configurationChanged();
void addressBookChanged();
private:
QString mEmailSourceChannel;
QString mEmailSourceUID;
void resizeEvent(QResizeEvent* e );
bool mBRdisabled;
#ifndef DESKTOP_VERSION
QCopChannel* infrared;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 68233e8..d8373a6 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -544,103 +544,116 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
// mView->viewManager()->showWhatsNextView();
mCalendar->checkAlarmForIncidence( 0, true);
//showMaximized();
//raise();
hide();
return;
}
if ( cmsg == "-newCountdown" ) {
qDebug("newCountdown ");
}
QString msg ;
QString allmsg = cmsg;
while ( allmsg.length() > 0 ) {
int nextC = allmsg.find( "-", 1 );
if ( nextC == -1 ) {
msg = allmsg;
allmsg = "";
} else{
msg = allmsg.left( nextC );
allmsg = allmsg.mid( nextC, allmsg.length()-nextC );
}
//qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() );
if ( msg == "-newEvent" ) {
- mView->newEvent();
+ QTimer::singleShot( 0, mView, SLOT ( newEvent()));
}
if ( msg == "-newTodo" ) {
- mView->newTodo();
-
+ QTimer::singleShot( 0, mView, SLOT ( newTodo()));
}
if ( msg == "-showWN" ) {
mView->viewManager()->showWhatsNextView();
}
if ( msg == "-showTodo" ) {
mView->viewManager()->showTodoView();
}
if ( msg == "-showList" ) {
mView->viewManager()->showListView();
}
else if ( msg == "-showDay" ) {
mView->viewManager()->showDayView();
}
else if ( msg == "-showWWeek" ) {
mView->viewManager()->showWorkWeekView();
}
else if ( msg == "-ringSync" ) {
- mSyncManager->multiSync( false );
+ QTimer::singleShot( 0, this, SLOT (startMultiSync()));
}
else if ( msg == "-showWeek" ) {
mView->viewManager()->showWeekView();
}
else if ( msg == "-showTodo" ) {
mView->viewManager()->showTodoView();
}
else if ( msg == "-showJournal" ) {
mView->dateNavigator()->selectDates( 1 );
mView->dateNavigator()->selectToday();
mView->viewManager()->showJournalView();
}
else if ( msg == "-showKO" ) {
mView->viewManager()->showNextXView();
}
else if ( msg == "-showWNext" ) {
mView->viewManager()->showWhatsNextView();
}
else if ( msg == "nextView()" ) {
mView->viewManager()->showNextView();
}
else if ( msg == "-showNextXView" ) {
mView->viewManager()->showNextXView();
}
}
showMaximized();
raise();
}
-
+void MainWindow::startMultiSync()
+{
+ QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
+ if ( QMessageBox::information( this, i18n("KDE-Pim Sync"),
+ question,
+ i18n("Yes"), i18n("No"),
+ 0, 0 ) != 0 ) {
+ setCaption(i18n("Aborted! Nothing synced!"));
+ return;
+ }
+ mSyncManager->multiSync( false );
+#ifndef DESKTOP_VERSION
+ QCopEnvelope e("QPE/Application/kapi", "doRingSync");
+#endif
+}
QPixmap MainWindow::loadPixmap( QString name )
{
return SmallIcon( name );
}
void MainWindow::setUsesBigPixmaps ( bool b )
{
qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
if ( b )
qDebug("KO: BigPixmaps are not supported ");
}
void MainWindow::initActions()
{
//KOPrefs::instance()->mShowFullMenu
iconToolBar->clear();
KOPrefs *p = KOPrefs::instance();
//QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
QPopupMenu *viewMenu = new QPopupMenu( this );
QPopupMenu *actionMenu = new QPopupMenu( this );
QPopupMenu *importMenu = new QPopupMenu( this );
QPopupMenu *importMenu_X = new QPopupMenu( this );
QPopupMenu *exportMenu_X = new QPopupMenu( this );
QPopupMenu *beamMenu_X = new QPopupMenu( this );
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index c9817c3..a4d0523 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -31,48 +31,49 @@ class CalendarLocal;
}
using namespace KCal;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow( QWidget *parent = 0, const char *name = 0, QString command = "");
~MainWindow();
bool beamReceiveEnabled();
static QString defaultFileName();
static QString syncFileName();
static QString resourcePath();
public slots:
void setUsesBigPixmaps ( bool );
void setCaption ( const QString & );
void updateWeekNum(const KCal::DateList &);
void updateWeek(QDate);
void updateFilterToolbar();
virtual void showMaximized ();
void configureAgenda( int );
void recieve( const QCString& msg, const QByteArray& data );
protected slots:
+ void startMultiSync();
void setCaptionToDates();
void weekAction();
void about();
void licence();
void faq();
void usertrans();
void features();
void synchowto();
void storagehowto();
void timetrackinghowto();
void kdesynchowto();
void multisynchowto();
void whatsNew();
void keyBindings();
void aboutAutoSaving();;
void aboutKnownBugs();
void processIncidenceSelection( Incidence * );
void importQtopia();
void importBday();
void importOL();
void importIcal();
void importFile( QString, bool );
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index 0e9c5e5..2ce6926 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -9,48 +9,49 @@
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
/*
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <stdlib.h>
#include <qfile.h>
+#include <qtimer.h>
#include <qmap.h>
#include <qregexp.h>
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#include <qtopia/qcopenvelope_qws.h>
#else
#include <qapplication.h>
#endif
#include <kstaticdeleter.h>
#include <kmessagebox.h>
#include "externalapphandler.h"
#include "kpimglobalprefs.h"
//uncomment line to get debug output
//#define DEBUG_EXT_APP_HANDLER
/*********************************************************************************
*
********************************************************************************/
@@ -1108,57 +1109,62 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete
useValMap = true;
}
else
{
// qDebug("pass parameter << %s", key.latin1());
(*e) << key;
}
}
if (useValMap == true)
(*e) << valmap;
#endif
}
/**************************************************************************
*
**************************************************************************/
void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data )
{
-
+ qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this);
if ( cmsg == "nextView()" ) {
qDebug("nextView()");
- emit nextView();
+ QTimer::singleShot( 0, this, SIGNAL ( nextView() ));
return;
}
if ( cmsg == "callContactdialog()" ) {
qDebug("callContactdialog()");
- emit callContactdialog();
+ QTimer::singleShot( 0, this, SIGNAL ( callContactdialog() ));
+ return;
+ }
+ if ( cmsg == "doRingSync" ) {
+ qDebug("doRingSync");
+ QTimer::singleShot( 0, this, SIGNAL ( doRingSync() ));
return;
}
bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data );
if (!res)
res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data );
if (!res)
res = mDisplayDetails->appMessage( cmsg, data );
// if (!res)
// res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data );
}
bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid)
{
mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel);
// maybe we are sending to KA/Pi fom a different worldd...
// it may be that the QAplication::desktop()->width() values in KA/Pi are not the same as in our application
// for that reason we send the current QApplication::desktop()->width() to KA/Pi
//qDebug("UID %s ", sessionuid.latin1());
//return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(QString::number ( QApplication::desktop()->width() ));
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index 097f306..b899ad7 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -214,48 +214,49 @@ class ExternalAppHandler : public QObject
bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid);
bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid);
bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid,
const QStringList& birthdayList, const QStringList& anniversaryList,
const QStringList& realNameList, const QStringList& emailList,
const QStringList& assembledNameList, const QStringList& uidList);
//loadConfig clears the cache and checks again if the applications are available or not
void loadConfig();
QList<DefaultAppItem> getAvailableDefaultItems(Types);
DefaultAppItem* getDefaultItem(Types, int);
public slots:
void appMessage( const QCString& msg, const QByteArray& data );
signals:
void callContactdialog();
void nextView();
+ void doRingSync();
// Emmitted when the target app receives a request from the source app
void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid);
// Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi
// The first parameter is a uniqueid. It can be used to identify the event
void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList);
void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email);
void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList);
void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid);
// Emmitted when the target app receives a request from the source app
void requestForBirthdayList(const QString& sourceChannel, const QString& uid);
// Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi
// The first parameter is a uniqueid. It can be used to identify the event
void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList,
const QStringList& anniversaryList, const QStringList& realNameList,
const QStringList& emailList, const QStringList& assembledNameList,
const QStringList& uidList);
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index db815d6..038e032 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -500,56 +500,58 @@ bool KSyncManager::syncWithFile( QString fn , bool quick )
if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) )
mParent->topLevelWidget()->setCaption( i18n("Synchronization successful") );
else
mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") );
if ( ! quick )
mPrefs->mLastSyncedLocalFile = fn;
}
return ret;
}
void KSyncManager::quickSyncLocalFile()
{
if ( syncWithFile( mPrefs->mLastSyncedLocalFile, true ) ) {
qDebug("KSM::quick syncLocalFile() successful ");
}
}
void KSyncManager::multiSync( bool askforPrefs )
{
if (blockSave())
return;
setBlockSave(true);
- QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
- if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"),
- question,
- i18n("Yes"), i18n("No"),
- 0, 0 ) != 0 ) {
- setBlockSave(false);
- mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!"));
- return;
+ if ( askforPrefs ) {
+ QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
+ if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"),
+ question,
+ i18n("Yes"), i18n("No"),
+ 0, 0 ) != 0 ) {
+ setBlockSave(false);
+ mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!"));
+ return;
+ }
}
mCurrentSyncDevice = i18n("Multiple profiles") ;
mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs;
if ( askforPrefs ) {
if ( !edit_sync_options()) {
mParent->topLevelWidget()->setCaption( i18n("Syncing aborted.") );
return;
}
mPrefs->mRingSyncAlgoPrefs = mSyncAlgoPrefs;
}
mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") );
qApp->processEvents();
int num = ringSync() ;
if ( num > 1 )
ringSync();
setBlockSave(false);
if ( num )
emit save();
if ( num )
mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) );
else
mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!"));
return;
}