-rw-r--r-- | korganizer/koprefs.cpp | 4 | ||||
-rw-r--r-- | korganizer/koprefs.h | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 25 |
3 files changed, 13 insertions, 19 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 716a125..84e3d00 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -76,16 +76,12 @@ KOPrefs::KOPrefs() : mEditBoxFont = QFont("helvetica",12); mJornalViewFont = QFont("helvetica",12); KPrefs::setCurrentGroup("General"); - addItemString("Ex2PhoneDevice",&mEx2PhoneDevice,"/dev/ircomm"); - addItemString("Ex2PhoneConnection",&mEx2PhoneConnection,"irda"); - addItemString("Ex2PhoneModel",&mEx2PhoneModel,"6310i"); - addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); addItemBool("ShowIconSearch",&mShowIconSearch,true); addItemBool("ShowIconList",&mShowIconList,true); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index a1ba8b3..d9ac851 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -207,15 +207,12 @@ class KOPrefs : public KPimPrefs QString mRemotePassWd; QString mRemoteFile; QString mLocalTempFile; QString mPhoneDevice; QString mPhoneConnection; QString mPhoneModel; - QString mEx2PhoneDevice; - QString mEx2PhoneConnection; - QString mEx2PhoneModel; int mLastSyncTime; int mSyncAlgoPrefs; int mRingSyncAlgoPrefs; QStringList mSyncProfileNames; QStringList mExternSyncProfiles; diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index bd14fbf..2f286e0 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -100,13 +100,13 @@ class KOex2phonePrefs : public QDialog lay->addWidget( mWriteBackFuture ); temphb = new QHBox( this ); new QLabel( i18n("Max. weeks in future: ") , temphb ); mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); mWriteBackFutureWeeks->setValue( 8 ); lay->addWidget( temphb ); - lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\n todo/calendar data on phone!"), this ) ); + lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); lab->setAlignment (AlignHCenter ); QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); lay->addWidget( ok ); QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); lay->addWidget( cancel ); connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); @@ -1168,30 +1168,31 @@ void MainWindow::slotSyncMenu( int action ) } delete temp; mBlockSaveFlag = false; } void MainWindow::exportToPhone( int mode ) { - + //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); - KOex2phonePrefs ex2phone; - ex2phone.mPhoneConnection->setText( KOPrefs::instance()->mEx2PhoneConnection ); - ex2phone.mPhoneDevice->setText( KOPrefs::instance()->mEx2PhoneDevice ); - ex2phone.mPhoneModel->setText( KOPrefs::instance()->mEx2PhoneModel ); + KOex2phonePrefs ex2phone; + + ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); + ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); + ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); if ( mode == 1 ) ex2phone.setCaption(i18n("Export complete calendar")); if ( mode == 2 ) ex2phone.setCaption(i18n("Export filtered calendar")); if ( !ex2phone.exec() ) { return; } - KOPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); - KOPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); - KOPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); + KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); + KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); + KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); int inFuture = 0; if ( ex2phone.mWriteBackFuture->isChecked() ) inFuture = ex2phone.mWriteBackFutureWeeks->value(); QPtrList<Incidence> delSel; if ( mode == 1 ) @@ -1229,15 +1230,15 @@ void MainWindow::exportToPhone( int mode ) Incidence *in = incidence->clone(); cal->addIncidence( in ); } } incidence = delSel.next(); } - PhoneFormat::writeConfig( KOPrefs::instance()->mEx2PhoneDevice, - KOPrefs::instance()->mEx2PhoneConnection, - KOPrefs::instance()->mEx2PhoneModel ); + PhoneFormat::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, + KPimGlobalPrefs::instance()->mEx2PhoneConnection, + KPimGlobalPrefs::instance()->mEx2PhoneModel ); setCaption( i18n("Writing to phone...")); if ( PhoneFormat::writeToPhone( cal ) ) setCaption( i18n("Export to phone successful!")); else setCaption( i18n("Error exporting to phone!")); |