author | zautrix <zautrix> | 2005-04-22 17:32:45 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-22 17:32:45 (UTC) |
commit | e6feb1ca0c45397ba7b922198c87fe9b95b7d872 (patch) (unidiff) | |
tree | 61b56d5a17f3eba87fef958d264e2da679496bda | |
parent | 81158fa914f6d0f3aeb049d28d2ecfb5f5c0e261 (diff) | |
download | kdepimpi-e6feb1ca0c45397ba7b922198c87fe9b95b7d872.zip kdepimpi-e6feb1ca0c45397ba7b922198c87fe9b95b7d872.tar.gz kdepimpi-e6feb1ca0c45397ba7b922198c87fe9b95b7d872.tar.bz2 |
fixxxx
-rw-r--r-- | kaddressbook/kabcore.cpp | 38 | ||||
-rw-r--r-- | korganizer/kodaymatrix.cpp | 2 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 8 |
3 files changed, 42 insertions, 6 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 9c40142..a4f3579 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -528,68 +528,102 @@ void KABCore::restoreSettings() | |||
528 | #ifdef DESKTOP_VERSION | 528 | #ifdef DESKTOP_VERSION |
529 | int wid = width(); | 529 | int wid = width(); |
530 | if ( wid < 10 ) | 530 | if ( wid < 10 ) |
531 | wid = 400; | 531 | wid = 400; |
532 | #else | 532 | #else |
533 | int wid = QApplication::desktop()->width(); | 533 | int wid = QApplication::desktop()->width(); |
534 | if ( wid < 640 ) | 534 | if ( wid < 640 ) |
535 | wid = QApplication::desktop()->height(); | 535 | wid = QApplication::desktop()->height(); |
536 | #endif | 536 | #endif |
537 | QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; | 537 | QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; |
538 | if ( true /*splitterSize.count() == 0*/ ) { | 538 | if ( true /*splitterSize.count() == 0*/ ) { |
539 | splitterSize.append( wid / 2 ); | 539 | splitterSize.append( wid / 2 ); |
540 | splitterSize.append( wid / 2 ); | 540 | splitterSize.append( wid / 2 ); |
541 | } | 541 | } |
542 | mMiniSplitter->setSizes( splitterSize ); | 542 | mMiniSplitter->setSizes( splitterSize ); |
543 | if ( mExtensionBarSplitter ) { | 543 | if ( mExtensionBarSplitter ) { |
544 | //splitterSize = KABPrefs::instance()->mExtensionsSplitter; | 544 | //splitterSize = KABPrefs::instance()->mExtensionsSplitter; |
545 | if ( true /*splitterSize.count() == 0*/ ) { | 545 | if ( true /*splitterSize.count() == 0*/ ) { |
546 | splitterSize.append( wid / 2 ); | 546 | splitterSize.append( wid / 2 ); |
547 | splitterSize.append( wid / 2 ); | 547 | splitterSize.append( wid / 2 ); |
548 | } | 548 | } |
549 | mExtensionBarSplitter->setSizes( splitterSize ); | 549 | mExtensionBarSplitter->setSizes( splitterSize ); |
550 | 550 | ||
551 | } | 551 | } |
552 | 552 | #ifdef DESKTOP_VERSION | |
553 | 553 | KConfig *config = KABPrefs::instance()->getConfig(); | |
554 | config->setGroup("WidgetLayout"); | ||
555 | QStringList list; | ||
556 | list = config->readListEntry("MainLayout"); | ||
557 | int x,y,w,h; | ||
558 | if ( ! list.isEmpty() ) { | ||
559 | x = list[0].toInt(); | ||
560 | y = list[1].toInt(); | ||
561 | w = list[2].toInt(); | ||
562 | h = list[3].toInt(); | ||
563 | KApplication::testCoords( &x,&y,&w,&h ); | ||
564 | topLevelWidget()->setGeometry(x,y,w,h); | ||
565 | |||
566 | } else { | ||
567 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); | ||
568 | } | ||
569 | #endif | ||
554 | } | 570 | } |
555 | 571 | ||
556 | void KABCore::saveSettings() | 572 | void KABCore::saveSettings() |
557 | { | 573 | { |
558 | KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); | 574 | KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); |
559 | if ( mExtensionBarSplitter ) | 575 | if ( mExtensionBarSplitter ) |
560 | KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); | 576 | KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); |
561 | KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); | 577 | KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); |
562 | KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); | 578 | KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); |
563 | #ifndef KAB_EMBEDDED | 579 | #ifndef KAB_EMBEDDED |
564 | 580 | ||
565 | KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); | 581 | KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); |
566 | KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); | 582 | KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); |
567 | #endif //KAB_EMBEDDED | 583 | #endif //KAB_EMBEDDED |
568 | mExtensionManager->saveSettings(); | 584 | mExtensionManager->saveSettings(); |
569 | mViewManager->saveSettings(); | 585 | mViewManager->saveSettings(); |
570 | 586 | ||
571 | KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); | 587 | KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); |
588 | #ifdef DESKTOP_VERSION | ||
589 | KConfig *config = KABPrefs::instance()->getConfig(); | ||
590 | config->setGroup("WidgetLayout"); | ||
591 | QStringList list ;//= config->readListEntry("MainLayout"); | ||
592 | int x,y,w,h; | ||
593 | QWidget* wid; | ||
594 | wid = topLevelWidget(); | ||
595 | x = wid->geometry().x(); | ||
596 | y = wid->geometry().y(); | ||
597 | w = wid->width(); | ||
598 | h = wid->height(); | ||
599 | list.clear(); | ||
600 | list << QString::number( x ); | ||
601 | list << QString::number( y ); | ||
602 | list << QString::number( w ); | ||
603 | list << QString::number( h ); | ||
604 | config->writeEntry("MainLayout",list ); | ||
605 | #endif | ||
572 | KABPrefs::instance()->writeConfig(); | 606 | KABPrefs::instance()->writeConfig(); |
573 | qDebug("KA: KABCore::saveSettings() "); | 607 | qDebug("KA: KABCore::saveSettings() "); |
574 | } | 608 | } |
575 | 609 | ||
576 | KABC::AddressBook *KABCore::addressBook() const | 610 | KABC::AddressBook *KABCore::addressBook() const |
577 | { | 611 | { |
578 | return mAddressBook; | 612 | return mAddressBook; |
579 | } | 613 | } |
580 | 614 | ||
581 | KConfig *KABCore::config() | 615 | KConfig *KABCore::config() |
582 | { | 616 | { |
583 | #ifndef KAB_EMBEDDED | 617 | #ifndef KAB_EMBEDDED |
584 | return KABPrefs::instance()->config(); | 618 | return KABPrefs::instance()->config(); |
585 | #else //KAB_EMBEDDED | 619 | #else //KAB_EMBEDDED |
586 | return KABPrefs::instance()->getConfig(); | 620 | return KABPrefs::instance()->getConfig(); |
587 | #endif //KAB_EMBEDDED | 621 | #endif //KAB_EMBEDDED |
588 | } | 622 | } |
589 | 623 | ||
590 | KActionCollection *KABCore::actionCollection() const | 624 | KActionCollection *KABCore::actionCollection() const |
591 | { | 625 | { |
592 | return mGUIClient->actionCollection(); | 626 | return mGUIClient->actionCollection(); |
593 | } | 627 | } |
594 | 628 | ||
595 | KABC::Field *KABCore::currentSearchField() const | 629 | KABC::Field *KABCore::currentSearchField() const |
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 4366265..30efbf6 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -182,64 +182,64 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) | |||
182 | if ( mDate == event->dtStart().date () ) | 182 | if ( mDate == event->dtStart().date () ) |
183 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; | 183 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; |
184 | else if ( mDate == event->dtEnd().date () ) | 184 | else if ( mDate == event->dtEnd().date () ) |
185 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; | 185 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; |
186 | 186 | ||
187 | } | 187 | } |
188 | text = time + event->summary(); | 188 | text = time + event->summary(); |
189 | mToolTipText += prefix + text; | 189 | mToolTipText += prefix + text; |
190 | } else { | 190 | } else { |
191 | if (event->doesFloat()) { | 191 | if (event->doesFloat()) { |
192 | text = event->summary(); | 192 | text = event->summary(); |
193 | mToolTipText += text; | 193 | mToolTipText += text; |
194 | } | 194 | } |
195 | else { | 195 | else { |
196 | text = KGlobal::locale()->formatTime(event->dtStart().time()); | 196 | text = KGlobal::locale()->formatTime(event->dtStart().time()); |
197 | text += " " + event->summary(); | 197 | text += " " + event->summary(); |
198 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); | 198 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); |
199 | } | 199 | } |
200 | } | 200 | } |
201 | if ( !event->location().isEmpty() ) | 201 | if ( !event->location().isEmpty() ) |
202 | mToolTipText += " (" + event->location() + ")"; | 202 | mToolTipText += " (" + event->location() + ")"; |
203 | //qDebug("TTT: %s ", mToolTipText.latin1()); | 203 | //qDebug("TTT: %s ", mToolTipText.latin1()); |
204 | mToolTip.append( deTag( mToolTipText ) ); | 204 | mToolTip.append( deTag( mToolTipText ) ); |
205 | } | 205 | } |
206 | mToolTip.sort(); | ||
206 | if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { | 207 | if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { |
207 | QPtrList<Todo> todolist = mCalendar->todos(mDate); | 208 | QPtrList<Todo> todolist = mCalendar->todos(mDate); |
208 | Todo *todo; | 209 | Todo *todo; |
209 | for(todo=todolist.first();todo != 0;todo=todolist.next()) { | 210 | for(todo=todolist.first();todo != 0;todo=todolist.next()) { |
210 | QString mToolTipText; | 211 | QString mToolTipText; |
211 | if ( !todo->doesFloat() ) | 212 | if ( !todo->doesFloat() ) |
212 | mToolTipText += KGlobal::locale()->formatTime(todo->dtDue().time())+" "; | 213 | mToolTipText += KGlobal::locale()->formatTime(todo->dtDue().time())+" "; |
213 | mToolTipText += todo->summary(); | 214 | mToolTipText += todo->summary(); |
214 | if ( !todo->location().isEmpty() ) | 215 | if ( !todo->location().isEmpty() ) |
215 | mToolTipText += " (" + todo->location() + ")"; | 216 | mToolTipText += " (" + todo->location() + ")"; |
216 | mToolTipText = deTag( mToolTipText); | 217 | mToolTipText = deTag( mToolTipText); |
217 | mToolTipText = "<b>" + i18n("Todo: ") + "</b>"+ mToolTipText; | 218 | mToolTipText = "<b>" + i18n("Todo: ") + "</b>"+ mToolTipText; |
218 | mToolTip.append( mToolTipText ); | 219 | mToolTip.append( mToolTipText ); |
219 | } | 220 | } |
220 | } | 221 | } |
221 | mToolTip.sort(); | ||
222 | if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { | 222 | if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { |
223 | Journal *j = mCalendar->journal( mDate ); | 223 | Journal *j = mCalendar->journal( mDate ); |
224 | if ( j ) { | 224 | if ( j ) { |
225 | QString mToolTipText = j->description().left(100); | 225 | QString mToolTipText = j->description().left(100); |
226 | if ( j->description().length() > 100 ) | 226 | if ( j->description().length() > 100 ) |
227 | mToolTipText += " ..."; | 227 | mToolTipText += " ..."; |
228 | mToolTipText = deTag( mToolTipText); | 228 | mToolTipText = deTag( mToolTipText); |
229 | mToolTipText = "<b>" + i18n("Journal: ") + "</b>"+ mToolTipText; | 229 | mToolTipText = "<b>" + i18n("Journal: ") + "</b>"+ mToolTipText; |
230 | mToolTip.append( mToolTipText ); | 230 | mToolTip.append( mToolTipText ); |
231 | } | 231 | } |
232 | } | 232 | } |
233 | return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); | 233 | return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); |
234 | } | 234 | } |
235 | 235 | ||
236 | 236 | ||
237 | QString KODayMatrix::deTag( QString mToolTipText ) | 237 | QString KODayMatrix::deTag( QString mToolTipText ) |
238 | { | 238 | { |
239 | 239 | ||
240 | #if QT_VERSION >= 0x030000 | 240 | #if QT_VERSION >= 0x030000 |
241 | mToolTipText.replace( '<' , "<" ); | 241 | mToolTipText.replace( '<' , "<" ); |
242 | mToolTipText.replace( '>' , ">" ); | 242 | mToolTipText.replace( '>' , ">" ); |
243 | #else | 243 | #else |
244 | if ( mToolTipText.find ('<') >= 0 ) { | 244 | if ( mToolTipText.find ('<') >= 0 ) { |
245 | mToolTipText.replace( QRegExp("<") , "<" ); | 245 | mToolTipText.replace( QRegExp("<") , "<" ); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index eed023c..3c0259f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -166,49 +166,49 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
166 | globalFlagBlockStartup = 1; | 166 | globalFlagBlockStartup = 1; |
167 | iconToolBar = new QPEToolBar( this ); | 167 | iconToolBar = new QPEToolBar( this ); |
168 | addToolBar (iconToolBar , tbd ); | 168 | addToolBar (iconToolBar , tbd ); |
169 | 169 | ||
170 | #ifdef DESKTOP_VERSION | 170 | #ifdef DESKTOP_VERSION |
171 | if ( KOPrefs::instance()->mShowIconFilter ) | 171 | if ( KOPrefs::instance()->mShowIconFilter ) |
172 | #else | 172 | #else |
173 | if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) | 173 | if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) |
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | { | 176 | { |
177 | if ( p->mToolBarHorF ) { | 177 | if ( p->mToolBarHorF ) { |
178 | if ( p->mToolBarUpF ) | 178 | if ( p->mToolBarUpF ) |
179 | tbd = Bottom; | 179 | tbd = Bottom; |
180 | else | 180 | else |
181 | tbd = Top; | 181 | tbd = Top; |
182 | } | 182 | } |
183 | else { | 183 | else { |
184 | if ( p->mToolBarUpF ) | 184 | if ( p->mToolBarUpF ) |
185 | tbd = Right; | 185 | tbd = Right; |
186 | else | 186 | else |
187 | tbd = Left; | 187 | tbd = Left; |
188 | } | 188 | } |
189 | filterToolBar = new QPEToolBar ( this ); | 189 | filterToolBar = new QPEToolBar ( this ); |
190 | filterMenubar = new QMenuBar( filterToolBar ); | 190 | filterMenubar = new QMenuBar( 0 ); |
191 | QFontMetrics fm ( filterMenubar->font() ); | 191 | QFontMetrics fm ( filterMenubar->font() ); |
192 | 192 | ||
193 | filterPopupMenu = new QPopupMenu( this ); | 193 | filterPopupMenu = new QPopupMenu( this ); |
194 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 194 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
195 | QString addTest = "A"; | 195 | QString addTest = "A"; |
196 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); | 196 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); |
197 | #ifdef DESKTOP_VERSION | 197 | #ifdef DESKTOP_VERSION |
198 | addTest = "AAABBBCCCx"; | 198 | addTest = "AAABBBCCCx"; |
199 | #else | 199 | #else |
200 | addTest = "AAx"; | 200 | addTest = "AAx"; |
201 | #endif | 201 | #endif |
202 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); | 202 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); |
203 | addToolBar (filterToolBar , tbd ); | 203 | addToolBar (filterToolBar , tbd ); |
204 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); | 204 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); |
205 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); | 205 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); |
206 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) | 206 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) |
207 | filterToolBar->hide(); | 207 | filterToolBar->hide(); |
208 | } else { | 208 | } else { |
209 | filterToolBar = 0; | 209 | filterToolBar = 0; |
210 | filterMenubar = 0; | 210 | filterMenubar = 0; |
211 | filterPopupMenu = 0; | 211 | filterPopupMenu = 0; |
212 | } | 212 | } |
213 | if ( p->mShowIconOnetoolbar ) { | 213 | if ( p->mShowIconOnetoolbar ) { |
214 | viewToolBar = iconToolBar ; | 214 | viewToolBar = iconToolBar ; |
@@ -1259,50 +1259,52 @@ void MainWindow::initActions() | |||
1259 | configureToolBarMenu->setItemChecked( 300, true ); | 1259 | configureToolBarMenu->setItemChecked( 300, true ); |
1260 | if (p-> mShowIconWeekNum) | 1260 | if (p-> mShowIconWeekNum) |
1261 | configureToolBarMenu->setItemChecked( 400, true ); | 1261 | configureToolBarMenu->setItemChecked( 400, true ); |
1262 | if (!p-> mShowIconStretch) { | 1262 | if (!p-> mShowIconStretch) { |
1263 | QLabel* dummy = new QLabel( iconToolBar ); | 1263 | QLabel* dummy = new QLabel( iconToolBar ); |
1264 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1264 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1265 | dummy->setMinimumWidth( 0 ); | 1265 | dummy->setMinimumWidth( 0 ); |
1266 | iconToolBar->setStretchableWidget ( dummy ) ; | 1266 | iconToolBar->setStretchableWidget ( dummy ) ; |
1267 | } | 1267 | } |
1268 | else { | 1268 | else { |
1269 | iconToolBar->setHorizontalStretchable (true ); | 1269 | iconToolBar->setHorizontalStretchable (true ); |
1270 | viewToolBar->setHorizontalStretchable (true ); | 1270 | viewToolBar->setHorizontalStretchable (true ); |
1271 | navigatorToolBar->setHorizontalStretchable (true ); | 1271 | navigatorToolBar->setHorizontalStretchable (true ); |
1272 | iconToolBar->setVerticalStretchable (true ); | 1272 | iconToolBar->setVerticalStretchable (true ); |
1273 | viewToolBar->setVerticalStretchable (true ); | 1273 | viewToolBar->setVerticalStretchable (true ); |
1274 | navigatorToolBar->setVerticalStretchable (true ); | 1274 | navigatorToolBar->setVerticalStretchable (true ); |
1275 | configureToolBarMenu->setItemChecked( 5, true ); | 1275 | configureToolBarMenu->setItemChecked( 5, true ); |
1276 | } | 1276 | } |
1277 | if (p-> mShowIconFilter) | 1277 | if (p-> mShowIconFilter) |
1278 | configureToolBarMenu->setItemChecked( 7, true ); | 1278 | configureToolBarMenu->setItemChecked( 7, true ); |
1279 | if (p-> mShowIconOnetoolbar) | 1279 | if (p-> mShowIconOnetoolbar) |
1280 | configureToolBarMenu->setItemChecked( 6, true ); | 1280 | configureToolBarMenu->setItemChecked( 6, true ); |
1281 | 1281 | ||
1282 | 1282 | ||
1283 | if ( filterMenubar ) | 1283 | if ( filterMenubar ) { |
1284 | connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); | 1284 | filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); |
1285 | connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); | ||
1286 | } | ||
1285 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1287 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
1286 | configureAgenda( p->mHourSize ); | 1288 | configureAgenda( p->mHourSize ); |
1287 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 1289 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
1288 | } | 1290 | } |
1289 | 1291 | ||
1290 | void MainWindow::exportToPhone( int mode ) | 1292 | void MainWindow::exportToPhone( int mode ) |
1291 | { | 1293 | { |
1292 | 1294 | ||
1293 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1295 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1294 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1296 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1295 | KOex2phonePrefs ex2phone; | 1297 | KOex2phonePrefs ex2phone; |
1296 | 1298 | ||
1297 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 1299 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
1298 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 1300 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
1299 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1301 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1300 | if ( mode == 1 ) | 1302 | if ( mode == 1 ) |
1301 | ex2phone.setCaption(i18n("Export complete calendar")); | 1303 | ex2phone.setCaption(i18n("Export complete calendar")); |
1302 | if ( mode == 2 ) | 1304 | if ( mode == 2 ) |
1303 | ex2phone.setCaption(i18n("Export filtered calendar")); | 1305 | ex2phone.setCaption(i18n("Export filtered calendar")); |
1304 | 1306 | ||
1305 | if ( !ex2phone.exec() ) { | 1307 | if ( !ex2phone.exec() ) { |
1306 | return; | 1308 | return; |
1307 | } | 1309 | } |
1308 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 1310 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |