-rw-r--r-- | bin/kdepim/korganizer/howtoSYNC.txt | 19 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 58 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.h | 1 |
3 files changed, 64 insertions, 14 deletions
diff --git a/bin/kdepim/korganizer/howtoSYNC.txt b/bin/kdepim/korganizer/howtoSYNC.txt index d3046de..c4e80f5 100644 --- a/bin/kdepim/korganizer/howtoSYNC.txt +++ b/bin/kdepim/korganizer/howtoSYNC.txt | |||
@@ -117,3 +117,8 @@ c) Include in multiple sync: | |||
117 | d) Ask for preferences before sync: | 117 | d) Ask for preferences before sync: |
118 | Check this to be asked for sync settings before each sync. | 118 | Check this to be asked for sync preferences settings before each sync. |
119 | If the profile kind is "Pi-Sync" you will be asked to confirm | ||
120 | the "Pi-Sync" specific settings (Password,IP address, port number) | ||
121 | as well. That makes it possible to use that profile for a | ||
122 | device that is connected via DHCP to the network and gets different | ||
123 | IP addresses when connection to the network. | ||
119 | e) Sync preferences: | 124 | e) Sync preferences: |
@@ -268,3 +273,13 @@ b) Pi-Sync (direct Kx/Pi to Kx/Pi sync) | |||
268 | Menu Synchronize-Disable Pi-Sync. | 273 | Menu Synchronize-Disable Pi-Sync. |
269 | 274 | ||
275 | Note: If you want to sync with a remote device that gets different | ||
276 | IPaddresses each time connected to the network | ||
277 | (this may be the case, if you use DHCP for connection | ||
278 | of the remote device to the network) simply enable | ||
279 | "Ask for preferences before sync". | ||
280 | Then you will be asked to confirm the | ||
281 | "Pi-Sync" specific settings | ||
282 | (Password,IP address, port number) | ||
283 | and you can easily change the IP address before each sync. | ||
284 | |||
270 | On your local device, create a new profile and choose | 285 | On your local device, create a new profile and choose |
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index b3e266a..0faa24d 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -611,7 +611,37 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) | |||
611 | } | 611 | } |
612 | 612 | void KSyncManager::edit_pisync_options() | |
613 | { | ||
614 | QDialog dia( mParent, "dia", true ); | ||
615 | dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice ); | ||
616 | QVBoxLayout lay ( &dia ); | ||
617 | lay.setSpacing( 5 ); | ||
618 | lay.setMargin( 3 ); | ||
619 | QLabel lab1 ( i18n("Password for remote access:"), &dia); | ||
620 | lay.addWidget( &lab1 ); | ||
621 | QLineEdit le1 (&dia ); | ||
622 | lay.addWidget( &le1 ); | ||
623 | QLabel lab2 ( i18n("Remote IP address:"), &dia); | ||
624 | lay.addWidget( &lab2 ); | ||
625 | QLineEdit le2 (&dia ); | ||
626 | lay.addWidget( &le2 ); | ||
627 | QLabel lab3 ( i18n("Remote port number:"), &dia); | ||
628 | lay.addWidget( &lab3 ); | ||
629 | QLineEdit le3 (&dia ); | ||
630 | lay.addWidget( &le3 ); | ||
631 | QPushButton pb ( "OK", &dia); | ||
632 | lay.addWidget( &pb ); | ||
633 | connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); | ||
634 | le1.setText( mPassWordPiSync ); | ||
635 | le2.setText( mActiveSyncIP ); | ||
636 | le3.setText( mActiveSyncPort ); | ||
637 | if ( dia.exec() ) { | ||
638 | mPassWordPiSync = le1.text(); | ||
639 | mActiveSyncPort = le3.text(); | ||
640 | mActiveSyncIP = le2.text(); | ||
641 | } | ||
642 | |||
643 | } | ||
613 | void KSyncManager::edit_sync_options() | 644 | void KSyncManager::edit_sync_options() |
614 | { | 645 | { |
615 | //mDialogManager->showSyncOptions(); | 646 | |
616 | //mSyncAlgoPrefs | ||
617 | QDialog dia( mParent, "dia", true ); | 647 | QDialog dia( mParent, "dia", true ); |
@@ -787,3 +817,2 @@ QString KSyncManager::syncFileName() | |||
787 | 817 | ||
788 | |||
789 | void KSyncManager::syncPi() | 818 | void KSyncManager::syncPi() |
@@ -791,2 +820,4 @@ void KSyncManager::syncPi() | |||
791 | qApp->processEvents(); | 820 | qApp->processEvents(); |
821 | if ( mAskForPreferences ) | ||
822 | edit_pisync_options(); | ||
792 | bool ok; | 823 | bool ok; |
@@ -899,3 +930,3 @@ void KServerSocket::readClient() | |||
899 | else { | 930 | else { |
900 | KMessageBox::information( 0, i18n("ERROR:\nGot send file request\nwith invalid password")); | 931 | KMessageBox::error( 0, i18n("Got send file request\nwith invalid password")); |
901 | qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); | 932 | qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); |
@@ -910,3 +941,3 @@ void KServerSocket::readClient() | |||
910 | else { | 941 | else { |
911 | KMessageBox::information( 0, i18n("ERROR:\nGot receive file request\nwith invalid password")); | 942 | KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password")); |
912 | qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); | 943 | qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); |
@@ -1157,2 +1188,3 @@ void KCommandSocket::deleteSocket() | |||
1157 | { | 1188 | { |
1189 | //qDebug("KCommandSocket::deleteSocket() "); | ||
1158 | if ( mTimerSocket->isActive () ) { | 1190 | if ( mTimerSocket->isActive () ) { |
@@ -1160,8 +1192,13 @@ void KCommandSocket::deleteSocket() | |||
1160 | mRetVal = errorTO; | 1192 | mRetVal = errorTO; |
1193 | qDebug("Connection to remote host timed out"); | ||
1161 | if ( mSocket ) { | 1194 | if ( mSocket ) { |
1162 | mSocket->close(); | 1195 | mSocket->close(); |
1163 | if ( mSocket->state() == QSocket::Idle ) | 1196 | //if ( mSocket->state() == QSocket::Idle ) |
1164 | deleteSocket(); | 1197 | // deleteSocket(); |
1165 | return; | 1198 | delete mSocket; |
1199 | mSocket = 0; | ||
1166 | } | 1200 | } |
1201 | KMessageBox::error( 0, i18n("Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host? ")); | ||
1202 | emit commandFinished( this, mRetVal ); | ||
1203 | return; | ||
1167 | } | 1204 | } |
@@ -1171,5 +1208,2 @@ void KCommandSocket::deleteSocket() | |||
1171 | mSocket = 0; | 1208 | mSocket = 0; |
1172 | if ( mRetVal == errorTO) | ||
1173 | KMessageBox::information( 0, i18n("ERROR:\nConnection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host? ")); | ||
1174 | |||
1175 | emit commandFinished( this, mRetVal ); | 1209 | emit commandFinished( this, mRetVal ); |
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 1f7c7e7..5b05383 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h | |||
@@ -175,2 +175,3 @@ class KSyncManager : public QObject | |||
175 | void edit_sync_options(); | 175 | void edit_sync_options(); |
176 | void edit_pisync_options(); | ||
176 | int ringSync(); | 177 | int ringSync(); |