author | zautrix <zautrix> | 2005-07-08 23:55:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-08 23:55:16 (UTC) |
commit | 1e11d41ecb6a912c4c0a2747eb1fa26626fdcca2 (patch) (unidiff) | |
tree | 922c8080f9b9cc863e7d5637a5d9d775ee8c0355 | |
parent | 3e94cf2e8a14c7d40aea28a0fe5538abcd211746 (diff) | |
download | kdepimpi-1e11d41ecb6a912c4c0a2747eb1fa26626fdcca2.zip kdepimpi-1e11d41ecb6a912c4c0a2747eb1fa26626fdcca2.tar.gz kdepimpi-1e11d41ecb6a912c4c0a2747eb1fa26626fdcca2.tar.bz2 |
fixxx
-rw-r--r-- | bin/kdepim/kaddressbook/germantranslation.txt | 20 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 22 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 97 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.h | 6 |
5 files changed, 125 insertions, 22 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index f64bfda..4a5122f 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt | |||
@@ -788,2 +788,22 @@ | |||
788 | { "Search:","Suche:" }, | 788 | { "Search:","Suche:" }, |
789 | { "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, | ||
790 | { "Pi-Sync Port Error","Pi-Sync Port Fehler" }, | ||
791 | { "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, | ||
792 | { "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, | ||
793 | { "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, | ||
794 | { "Pi-Sync Error","Pi-Sync Fehler" }, | ||
795 | { "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, | ||
796 | { "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, | ||
797 | { "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, | ||
798 | { "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, | ||
799 | { "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, | ||
800 | { "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, | ||
801 | { "Receiving file from remote...","Empfange entfernte Datei..." }, | ||
802 | { "Sending back synced file...","Sende synchronisierte Datei zurück..." }, | ||
803 | { "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, | ||
804 | { "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" }, | ||
805 | { "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, | ||
806 | { "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, | ||
807 | { "Writing back file ...","Schreibe Datei zurück..." }, | ||
808 | { "Sending back file ...","Sende Datei zurück..." }, | ||
789 | { "","" }, | 809 | { "","" }, |
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 34e9b7f..ff5e095 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -959,3 +959,2 @@ | |||
959 | { "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" }, | 959 | { "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" }, |
960 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, | ||
961 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 960 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
@@ -1508,3 +1507,22 @@ | |||
1508 | { "No problem!","Null Problemo!" }, | 1507 | { "No problem!","Null Problemo!" }, |
1509 | { "","" }, | 1508 | { "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, |
1509 | { "Pi-Sync Port Error","Pi-Sync Port Fehler" }, | ||
1510 | { "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, | ||
1511 | { "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, | ||
1512 | { "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, | ||
1513 | { "Pi-Sync Error","Pi-Sync Fehler" }, | ||
1514 | { "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, | ||
1515 | { "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, | ||
1516 | { "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, | ||
1517 | { "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, | ||
1518 | { "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, | ||
1519 | { "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, | ||
1520 | { "Receiving file from remote...","Empfange entfernte Datei..." }, | ||
1521 | { "Sending back synced file...","Sende synchronisierte Datei zurück..." }, | ||
1522 | { "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, | ||
1523 | { "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" }, | ||
1524 | { "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, | ||
1525 | { "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, | ||
1526 | { "Writing back file ...","Schreibe Datei zurück..." }, | ||
1527 | { "Sending back file ...","Sende Datei zurück..." }, | ||
1510 | { "","" }, | 1528 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 68d1bc6..940ea91 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -450,3 +450,3 @@ void CalendarView::init() | |||
450 | #ifdef DESKTOP_VERSION | 450 | #ifdef DESKTOP_VERSION |
451 | mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this ); | 451 | mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this ); |
452 | topLayout->addWidget( mDateScrollBar ); | 452 | topLayout->addWidget( mDateScrollBar ); |
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index fc0ac6b..f2ee0ab 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -355,3 +355,3 @@ void KSyncManager::enableQuick( bool ask ) | |||
355 | int po = 9197+mTargetApp; | 355 | int po = 9197+mTargetApp; |
356 | QLabel label ( i18n("Port number (Default: %1)").arg(po), &dia ); | 356 | QLabel label ( i18n("Port number (Default: %1)\nValid range from 1 to 65535").arg(po), &dia ); |
357 | lay.addWidget( &label); | 357 | lay.addWidget( &label); |
@@ -417,7 +417,9 @@ void KSyncManager::enableQuick( bool ask ) | |||
417 | mPrefs->mPassiveSyncAutoStart = false; | 417 | mPrefs->mPassiveSyncAutoStart = false; |
418 | Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok); | 418 | Q_UINT32 port_t = mPrefs->mPassiveSyncPort.toUInt(&ok); |
419 | if ( ! ok ) { | 419 | qDebug("%d ", port_t); |
420 | KMessageBox::information( 0, i18n("No valid port")); | 420 | if ( ! ok || port_t > 65535 ) { |
421 | KMessageBox::information( 0, i18n("No valid port number:\n%1").arg ( mPrefs->mPassiveSyncPort ), i18n("Pi-Sync Port Error")); | ||
421 | return; | 422 | return; |
422 | } | 423 | } |
424 | Q_UINT16 port = port_t; | ||
423 | //qDebug("port %d ", port); | 425 | //qDebug("port %d ", port); |
@@ -426,3 +428,3 @@ void KSyncManager::enableQuick( bool ask ) | |||
426 | if ( !mServerSocket->ok() ) { | 428 | if ( !mServerSocket->ok() ) { |
427 | KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!")); | 429 | QTimer::singleShot( 2000, this, SLOT ( displayErrorPort() ) ); |
428 | delete mServerSocket; | 430 | delete mServerSocket; |
@@ -438,3 +440,6 @@ void KSyncManager::enableQuick( bool ask ) | |||
438 | } | 440 | } |
439 | 441 | void KSyncManager::displayErrorPort() | |
442 | { | ||
443 | KMessageBox::information( 0, i18n("<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?").arg( mPrefs->mPassiveSyncPort) , i18n("Pi-Sync Port Error")); | ||
444 | } | ||
440 | void KSyncManager::syncLocalFile() | 445 | void KSyncManager::syncLocalFile() |
@@ -798,3 +803,3 @@ bool KSyncManager::edit_pisync_options() | |||
798 | lay.addWidget( &le2 ); | 803 | lay.addWidget( &le2 ); |
799 | QLabel lab3 ( i18n("Remote port number:"), &dia); | 804 | QLabel lab3 ( i18n("Remote port number:\n(May be: 1 - 65535)"), &dia); |
800 | lay.addWidget( &lab3 ); | 805 | lay.addWidget( &lab3 ); |
@@ -1190,4 +1195,6 @@ void KSyncManager::readFileFromSocket() | |||
1190 | connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); | 1195 | connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); |
1191 | if ( mWriteBackFile && syncOK ) | 1196 | if ( mWriteBackFile && syncOK ) { |
1197 | mParent->topLevelWidget()->setCaption( i18n("Sending back file ...") ); | ||
1192 | commandSocket->writeFile( fileName ); | 1198 | commandSocket->writeFile( fileName ); |
1199 | } | ||
1193 | else { | 1200 | else { |
@@ -1294,3 +1301,3 @@ void KServerSocket::displayErrorMessage() | |||
1294 | if ( mErrorMessage == 1 ) { | 1301 | if ( mErrorMessage == 1 ) { |
1295 | KMessageBox::error( 0, i18n("Got send file request\nwith invalid password")); | 1302 | KMessageBox::error( 0, i18n("Got send file request\nwith invalid password"), i18n("Pi-Sync Error")); |
1296 | mErrorMessage = 0; | 1303 | mErrorMessage = 0; |
@@ -1298,3 +1305,3 @@ void KServerSocket::displayErrorMessage() | |||
1298 | else if ( mErrorMessage == 2 ) { | 1305 | else if ( mErrorMessage == 2 ) { |
1299 | KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password")); | 1306 | KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password"), i18n("Pi-Sync Error")); |
1300 | mErrorMessage = 0; | 1307 | mErrorMessage = 0; |
@@ -1468,3 +1475,6 @@ KCommandSocket::KCommandSocket ( QString password, Q_UINT16 port, QString host, | |||
1468 | mTimerSocket = new QTimer ( this ); | 1475 | mTimerSocket = new QTimer ( this ); |
1469 | connect( mTimerSocket, SIGNAL ( timeout () ), this, SLOT ( deleteSocket() ) ); | 1476 | connect( mTimerSocket, SIGNAL ( timeout () ), this, SLOT ( updateConnectDialog() ) ); |
1477 | mConnectProgress.setCaption( i18n("Pi-Sync") ); | ||
1478 | connect( &mConnectProgress, SIGNAL ( cancelled () ), this, SLOT ( deleteSocket() ) ); | ||
1479 | mConnectCount = -1; | ||
1470 | } | 1480 | } |
@@ -1474,3 +1484,6 @@ void KCommandSocket::sendFileRequest() | |||
1474 | tlw->setCaption( i18n("Connected! Sending request for remote file ...") ); | 1484 | tlw->setCaption( i18n("Connected! Sending request for remote file ...") ); |
1475 | mTimerSocket->start( 300000 ); | 1485 | mConnectProgress.hide(); |
1486 | mConnectCount = 300;mConnectMax = 300; | ||
1487 | mConnectProgress.setCaption( i18n("Pi-Sync: Connected!") ); | ||
1488 | mTimerSocket->start( 100, true ); | ||
1476 | QTextStream os( mSocket ); | 1489 | QTextStream os( mSocket ); |
@@ -1495,3 +1508,4 @@ void KCommandSocket::readFile( QString fn ) | |||
1495 | tlw->setCaption( i18n("Trying to connect to remote...") ); | 1508 | tlw->setCaption( i18n("Trying to connect to remote...") ); |
1496 | mTimerSocket->start( 20000 ); | 1509 | mConnectCount = 30;mConnectMax = 30; |
1510 | mTimerSocket->start( 1000, true ); | ||
1497 | mSocket->connectToHost( mHost, mPort ); | 1511 | mSocket->connectToHost( mHost, mPort ); |
@@ -1499,3 +1513,21 @@ void KCommandSocket::readFile( QString fn ) | |||
1499 | } | 1513 | } |
1500 | 1514 | void KCommandSocket::updateConnectDialog() | |
1515 | { | ||
1516 | |||
1517 | if ( mConnectCount == mConnectMax ) { | ||
1518 | //qDebug("MAXX %d", mConnectMax); | ||
1519 | mConnectProgress.setTotalSteps ( 30 ); | ||
1520 | mConnectProgress.show(); | ||
1521 | mConnectProgress.setLabelText( i18n("Trying to connect to remote...") ); | ||
1522 | } | ||
1523 | //qDebug("updateConnectDialog() %d", mConnectCount); | ||
1524 | mConnectProgress.raise(); | ||
1525 | mConnectProgress.setProgress( (mConnectMax - mConnectCount)%30 ); | ||
1526 | --mConnectCount; | ||
1527 | if ( mConnectCount > 0 ) | ||
1528 | mTimerSocket->start( 1000, true ); | ||
1529 | else | ||
1530 | deleteSocket(); | ||
1531 | |||
1532 | } | ||
1501 | void KCommandSocket::writeFile( QString fileName ) | 1533 | void KCommandSocket::writeFile( QString fileName ) |
@@ -1508,3 +1540,4 @@ void KCommandSocket::writeFile( QString fileName ) | |||
1508 | mFileName = fileName ; | 1540 | mFileName = fileName ; |
1509 | mTimerSocket->start( 20000 ); | 1541 | mConnectCount = 30;mConnectMax = 30; |
1542 | mTimerSocket->start( 1000, true ); | ||
1510 | mSocket->connectToHost( mHost, mPort ); | 1543 | mSocket->connectToHost( mHost, mPort ); |
@@ -1516,2 +1549,4 @@ void KCommandSocket::writeFileToSocket() | |||
1516 | if (!file2.open( IO_ReadOnly ) ) { | 1549 | if (!file2.open( IO_ReadOnly ) ) { |
1550 | mConnectProgress.hide(); | ||
1551 | mConnectCount = -1; | ||
1517 | mRetVal= errorW; | 1552 | mRetVal= errorW; |
@@ -1522,2 +1557,8 @@ void KCommandSocket::writeFileToSocket() | |||
1522 | } | 1557 | } |
1558 | mConnectProgress.setTotalSteps ( file2.size() ); | ||
1559 | mConnectProgress.show(); | ||
1560 | int count = 0; | ||
1561 | mConnectProgress.setLabelText( i18n("Sending back synced file...") ); | ||
1562 | mConnectProgress.setProgress( count ); | ||
1563 | mConnectProgress.blockSignals( true ); | ||
1523 | QTextStream ts2( &file2 ); | 1564 | QTextStream ts2( &file2 ); |
@@ -1528,7 +1569,13 @@ void KCommandSocket::writeFileToSocket() | |||
1528 | while ( ! ts2.atEnd() ) { | 1569 | while ( ! ts2.atEnd() ) { |
1529 | os2 << ts2.readLine() << "\r\n"; | 1570 | qApp->processEvents(); |
1571 | mConnectProgress.setProgress( count ); | ||
1572 | QString temp = ts2.readLine(); | ||
1573 | count += temp.length(); | ||
1574 | os2 << temp << "\r\n"; | ||
1530 | } | 1575 | } |
1576 | file2.close(); | ||
1577 | mConnectProgress.hide(); | ||
1578 | mConnectCount = -1; | ||
1531 | os2 << "\r\n"; | 1579 | os2 << "\r\n"; |
1532 | mRetVal= successW; | 1580 | mRetVal= successW; |
1533 | file2.close(); | ||
1534 | mSocket->close(); | 1581 | mSocket->close(); |
@@ -1536,2 +1583,3 @@ void KCommandSocket::writeFileToSocket() | |||
1536 | QTimer::singleShot( 10, this , SLOT ( deleteSocket())); | 1583 | QTimer::singleShot( 10, this , SLOT ( deleteSocket())); |
1584 | mConnectProgress.blockSignals( false ); | ||
1537 | } | 1585 | } |
@@ -1556,4 +1604,4 @@ void KCommandSocket::startReadFileFromSocket() | |||
1556 | return; | 1604 | return; |
1605 | mConnectProgress.setLabelText( i18n("Receiving file from remote...") ); | ||
1557 | mFirst = false; | 1606 | mFirst = false; |
1558 | mTimerSocket->stop(); | ||
1559 | mFileString = ""; | 1607 | mFileString = ""; |
@@ -1573,2 +1621,4 @@ void KCommandSocket::readFileFromSocket() | |||
1573 | if ( line.left( 6 ) == "ERROR_" ) { | 1621 | if ( line.left( 6 ) == "ERROR_" ) { |
1622 | mTimerSocket->stop(); | ||
1623 | mConnectCount = -1; | ||
1574 | if ( line.left( 8 ) == "ERROR_PW" ) { | 1624 | if ( line.left( 8 ) == "ERROR_PW" ) { |
@@ -1607,2 +1657,5 @@ void KCommandSocket::readFileFromSocket() | |||
1607 | } | 1657 | } |
1658 | mTimerSocket->stop(); | ||
1659 | mConnectCount = -1; | ||
1660 | mConnectProgress.hide(); | ||
1608 | QString fileName = mFileName; | 1661 | QString fileName = mFileName; |
@@ -1634,3 +1687,5 @@ void KCommandSocket::deleteSocket() | |||
1634 | //qDebug("KCommandSocket::deleteSocket() "); | 1687 | //qDebug("KCommandSocket::deleteSocket() "); |
1635 | if ( mTimerSocket->isActive () ) { | 1688 | mConnectProgress.hide(); |
1689 | |||
1690 | if ( mConnectCount >= 0 ) { | ||
1636 | mTimerSocket->stop(); | 1691 | mTimerSocket->stop(); |
@@ -1645,3 +1700,6 @@ void KCommandSocket::deleteSocket() | |||
1645 | } | 1700 | } |
1701 | if ( mConnectCount == 0 ) | ||
1646 | KMessageBox::error( 0, i18n("Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?")); | 1702 | KMessageBox::error( 0, i18n("Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?")); |
1703 | else if ( tlw ) | ||
1704 | tlw->setCaption( i18n("Connection to remote host cancelled!") ); | ||
1647 | emit commandFinished( this, mRetVal ); | 1705 | emit commandFinished( this, mRetVal ); |
@@ -1653,2 +1711,3 @@ void KCommandSocket::deleteSocket() | |||
1653 | mSocket = 0; | 1711 | mSocket = 0; |
1712 | qDebug("commandFinished "); | ||
1654 | emit commandFinished( this, mRetVal ); | 1713 | emit commandFinished( this, mRetVal ); |
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 30ec1e6..e6738b6 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h | |||
@@ -31,2 +31,3 @@ | |||
31 | #include <qregexp.h> | 31 | #include <qregexp.h> |
32 | #include <qprogressdialog.h> | ||
32 | 33 | ||
@@ -88,2 +89,3 @@ class KCommandSocket : public QObject | |||
88 | void sendFileRequest(); | 89 | void sendFileRequest(); |
90 | void updateConnectDialog(); | ||
89 | 91 | ||
@@ -97,2 +99,5 @@ class KCommandSocket : public QObject | |||
97 | private : | 99 | private : |
100 | int mConnectCount; | ||
101 | int mConnectMax; | ||
102 | QProgressDialog mConnectProgress; | ||
98 | QWidget* tlw; | 103 | QWidget* tlw; |
@@ -207,2 +212,3 @@ class KSyncManager : public QObject | |||
207 | private slots: | 212 | private slots: |
213 | void displayErrorPort(); | ||
208 | void confSync(); | 214 | void confSync(); |