summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-08 10:31:33 (UTC)
committer zautrix <zautrix>2004-10-08 10:31:33 (UTC)
commit98987418d89d1334c0c2961ca4d6bc295d6fb021 (patch) (side-by-side diff)
tree2562272904bcd82eab7e6d185f3f7f0abfac48c3
parent309df8e8df3a17602f948025b7951b21ec5c3fed (diff)
downloadkdepimpi-98987418d89d1334c0c2961ca4d6bc295d6fb021.zip
kdepimpi-98987418d89d1334c0c2961ca4d6bc295d6fb021.tar.gz
kdepimpi-98987418d89d1334c0c2961ca4d6bc295d6fb021.tar.bz2
Sync fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/howtoSYNC.txt17
-rw-r--r--libkdepim/ksyncmanager.cpp56
-rw-r--r--libkdepim/ksyncmanager.h1
3 files changed, 62 insertions, 12 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:
d) Ask for preferences before sync:
- Check this to be asked for sync settings before each sync.
+ Check this to be asked for sync preferences settings before each sync.
+ If the profile kind is "Pi-Sync" you will be asked to confirm
+ the "Pi-Sync" specific settings (Password,IP address, port number)
+ as well. That makes it possible to use that profile for a
+ device that is connected via DHCP to the network and gets different
+ IP addresses when connection to the network.
e) Sync preferences:
@@ -269,2 +274,12 @@ b) Pi-Sync (direct Kx/Pi to Kx/Pi sync)
+ Note: If you want to sync with a remote device that gets different
+ IPaddresses each time connected to the network
+ (this may be the case, if you use DHCP for connection
+ of the remote device to the network) simply enable
+ "Ask for preferences before sync".
+ Then you will be asked to confirm the
+ "Pi-Sync" specific settings
+ (Password,IP address, port number)
+ and you can easily change the IP address before each sync.
+
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)
}
+void KSyncManager::edit_pisync_options()
+{
+ QDialog dia( mParent, "dia", true );
+ dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice );
+ QVBoxLayout lay ( &dia );
+ lay.setSpacing( 5 );
+ lay.setMargin( 3 );
+ QLabel lab1 ( i18n("Password for remote access:"), &dia);
+ lay.addWidget( &lab1 );
+ QLineEdit le1 (&dia );
+ lay.addWidget( &le1 );
+ QLabel lab2 ( i18n("Remote IP address:"), &dia);
+ lay.addWidget( &lab2 );
+ QLineEdit le2 (&dia );
+ lay.addWidget( &le2 );
+ QLabel lab3 ( i18n("Remote port number:"), &dia);
+ lay.addWidget( &lab3 );
+ QLineEdit le3 (&dia );
+ lay.addWidget( &le3 );
+ QPushButton pb ( "OK", &dia);
+ lay.addWidget( &pb );
+ connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
+ le1.setText( mPassWordPiSync );
+ le2.setText( mActiveSyncIP );
+ le3.setText( mActiveSyncPort );
+ if ( dia.exec() ) {
+ mPassWordPiSync = le1.text();
+ mActiveSyncPort = le3.text();
+ mActiveSyncIP = le2.text();
+ }
+}
void KSyncManager::edit_sync_options()
{
- //mDialogManager->showSyncOptions();
- //mSyncAlgoPrefs
+
QDialog dia( mParent, "dia", true );
@@ -787,3 +817,2 @@ QString KSyncManager::syncFileName()
-
void KSyncManager::syncPi()
@@ -791,2 +820,4 @@ void KSyncManager::syncPi()
qApp->processEvents();
+ if ( mAskForPreferences )
+ edit_pisync_options();
bool ok;
@@ -899,3 +930,3 @@ void KServerSocket::readClient()
else {
- KMessageBox::information( 0, i18n("ERROR:\nGot send file request\nwith invalid password"));
+ KMessageBox::error( 0, i18n("Got send file request\nwith invalid password"));
qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() );
@@ -910,3 +941,3 @@ void KServerSocket::readClient()
else {
- KMessageBox::information( 0, i18n("ERROR:\nGot receive file request\nwith invalid password"));
+ KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password"));
qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() );
@@ -1157,2 +1188,3 @@ void KCommandSocket::deleteSocket()
{
+ //qDebug("KCommandSocket::deleteSocket() ");
if ( mTimerSocket->isActive () ) {
@@ -1160,8 +1192,13 @@ void KCommandSocket::deleteSocket()
mRetVal = errorTO;
+ qDebug("Connection to remote host timed out");
if ( mSocket ) {
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
- deleteSocket();
- return;
+ //if ( mSocket->state() == QSocket::Idle )
+ // deleteSocket();
+ delete mSocket;
+ mSocket = 0;
}
+ KMessageBox::error( 0, i18n("Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host? "));
+ emit commandFinished( this, mRetVal );
+ return;
}
@@ -1171,5 +1208,2 @@ void KCommandSocket::deleteSocket()
mSocket = 0;
- if ( mRetVal == errorTO)
- KMessageBox::information( 0, i18n("ERROR:\nConnection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host? "));
-
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
void edit_sync_options();
+ void edit_pisync_options();
int ringSync();