summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp10
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/kodialogmanager.cpp28
-rw-r--r--korganizer/kodialogmanager.h1
-rw-r--r--korganizer/koprefsdialog.cpp28
-rw-r--r--korganizer/mainwindow.cpp9
6 files changed, 54 insertions, 23 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 7c7466b..4794414 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2520,13 +2520,12 @@ void CalendarView::edit_paste()
2520 2520
2521 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); 2521 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED );
2522} 2522}
2523 2523void CalendarView::edit_global_options()
2524void CalendarView::edit_options()
2525{ 2524{
2526 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; 2525 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId;
2527 emit save(); 2526 emit save();
2528 emit saveStopTimer(); 2527 emit saveStopTimer();
2529 mDialogManager->showOptionsDialog(); 2528 mDialogManager->showGlobalOptionsDialog();
2530 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { 2529 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) {
2531 emit saveStopTimer(); 2530 emit saveStopTimer();
2532 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), 2531 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"),
@@ -2540,7 +2539,10 @@ void CalendarView::edit_options()
2540 } 2539 }
2541 else 2540 else
2542 qDebug("KO: No tz change "); 2541 qDebug("KO: No tz change ");
2543 2542}
2543void CalendarView::edit_options()
2544{
2545 mDialogManager->showOptionsDialog();
2544} 2546}
2545 2547
2546 2548
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 4600090..1215a99 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -349,6 +349,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
349 349
350 /** edit viewing and configuration options. */ 350 /** edit viewing and configuration options. */
351 void edit_options(); 351 void edit_options();
352 void edit_global_options();
352 /** 353 /**
353 Functions for printing, previewing a print, and setting up printing 354 Functions for printing, previewing a print, and setting up printing
354 parameters. 355 parameters.
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index c927b37..aa30c52 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -88,17 +88,32 @@ void KODialogManager::createOutgoingDialog()
88 } 88 }
89} 89}
90 90
91void KODialogManager::showGlobalOptionsDialog( bool showSync )
92{
93 if (!mOptionsDialog) {
94 mOptionsDialog = new KOPrefsDialog(0);
95 connect(mOptionsDialog,SIGNAL(configChanged()),
96 mMainView,SLOT(updateConfig()));
97 }
98 mOptionsDialog->readConfig();
99#ifndef DESKTOP_VERSION
100 mOptionsDialog->showMaximized();
101#else
102 mOptionsDialog->show();
103#endif
104 if ( showSync )
105 mOptionsDialog->showSyncPage();
106 mOptionsDialog->exec();
107 delete mOptionsDialog;
108 mOptionsDialog = 0;
109}
91void KODialogManager::showOptionsDialog( bool showSync ) 110void KODialogManager::showOptionsDialog( bool showSync )
92{ 111{
93 112
94 if (!mOptionsDialog) { 113 if (!mOptionsDialog) {
95 mOptionsDialog = new KOPrefsDialog(mMainView); 114 mOptionsDialog = new KOPrefsDialog(mMainView);
96 //mOptionsDialog->readConfig();
97 connect(mOptionsDialog,SIGNAL(configChanged()), 115 connect(mOptionsDialog,SIGNAL(configChanged()),
98 mMainView,SLOT(updateConfig())); 116 mMainView,SLOT(updateConfig()));
99 //connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()),
100 // mOptionsDialog,SLOT(updateCategories()));
101
102 } 117 }
103 mOptionsDialog->readConfig(); 118 mOptionsDialog->readConfig();
104#ifndef DESKTOP_VERSION 119#ifndef DESKTOP_VERSION
@@ -109,11 +124,12 @@ void KODialogManager::showOptionsDialog( bool showSync )
109 if ( showSync ) 124 if ( showSync )
110 mOptionsDialog->showSyncPage(); 125 mOptionsDialog->showSyncPage();
111 mOptionsDialog->exec(); 126 mOptionsDialog->exec();
112 127 delete mOptionsDialog;
128 mOptionsDialog = 0;
113} 129}
114void KODialogManager::showSyncOptions() 130void KODialogManager::showSyncOptions()
115{ 131{
116 showOptionsDialog( true ); 132 showGlobalOptionsDialog( true );
117 133
118} 134}
119void KODialogManager::showOutgoingDialog() 135void KODialogManager::showOutgoingDialog()
diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h
index a6cc621..b68ddc2 100644
--- a/korganizer/kodialogmanager.h
+++ b/korganizer/kodialogmanager.h
@@ -71,6 +71,7 @@ class KODialogManager : public QObject
71 71
72 public slots: 72 public slots:
73 void showOptionsDialog( bool showSync = false); 73 void showOptionsDialog( bool showSync = false);
74 void showGlobalOptionsDialog(bool showSync = false);
74 void showSyncOptions(); 75 void showSyncOptions();
75 void showIncomingDialog(); 76 void showIncomingDialog();
76 void showOutgoingDialog(); 77 void showOutgoingDialog();
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index c9477e3..4b5b66a 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -86,8 +86,10 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
86 if ( QApplication::desktop()->height() == 480 ) 86 if ( QApplication::desktop()->height() == 480 )
87 hideButtons(); 87 hideButtons();
88#endif 88#endif
89 89 kdelibcfg = 0;
90 if ( !parent )
90 setupGlobalTab(); 91 setupGlobalTab();
92 else {
91 setupMainTab(); 93 setupMainTab();
92 // setupLocaleTab(); 94 // setupLocaleTab();
93 //setupTimeZoneTab(); 95 //setupTimeZoneTab();
@@ -101,7 +103,7 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
101 //setupPrinterTab(); 103 //setupPrinterTab();
102 //setupGroupSchedulingTab(); 104 //setupGroupSchedulingTab();
103 //setupGroupAutomationTab(); 105 //setupGroupAutomationTab();
104 106 }
105 107
106} 108}
107 109
@@ -111,10 +113,10 @@ KOPrefsDialog::~KOPrefsDialog()
111} 113}
112void KOPrefsDialog::setupGlobalTab() 114void KOPrefsDialog::setupGlobalTab()
113{ 115{
114 QFrame *topFrame = addPage(i18n("Global"),0,0); 116 //QFrame *topFrame = addPage(i18n("Global"),0,0);
115 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); 117 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), this, "KCMKdeLibConfig" );
116 QVBoxLayout *topLayout = new QVBoxLayout(topFrame); 118 setMainWidget( kdelibcfg );
117 topLayout->addWidget( kdelibcfg ); 119 setCaption( i18n("KDE-Pim Global Settings"));
118 120
119 121
120} 122}
@@ -240,7 +242,7 @@ void KOPrefsDialog::setupLocaleTab()
240} 242}
241void KOPrefsDialog::showSyncPage() 243void KOPrefsDialog::showSyncPage()
242{ 244{
243 showPage ( 0 ) ; 245 // showPage ( 0 ) ;
244 kdelibcfg->showTimeZoneTab() ; 246 kdelibcfg->showTimeZoneTab() ;
245 247
246} 248}
@@ -1458,7 +1460,9 @@ void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text,
1458 1460
1459void KOPrefsDialog::usrReadConfig() 1461void KOPrefsDialog::usrReadConfig()
1460{ 1462{
1461 kdelibcfg->readConfig(); 1463 if ( kdelibcfg )
1464 kdelibcfg->readConfig();
1465 else {
1462 mNameEdit->setText(KOPrefs::instance()->fullName()); 1466 mNameEdit->setText(KOPrefs::instance()->fullName());
1463 mEmailEdit->setText(KOPrefs::instance()->email()); 1467 mEmailEdit->setText(KOPrefs::instance()->email());
1464 1468
@@ -1502,13 +1506,15 @@ void KOPrefsDialog::usrReadConfig()
1502 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); 1506 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
1503 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); 1507 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
1504 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); 1508 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
1509 }
1505} 1510}
1506 1511
1507 1512
1508void KOPrefsDialog::usrWriteConfig() 1513void KOPrefsDialog::usrWriteConfig()
1509{ 1514{
1510 1515 if ( kdelibcfg )
1511 kdelibcfg->writeConfig(); 1516 kdelibcfg->writeConfig();
1517 else {
1512 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); 1518 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text();
1513 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); 1519 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text();
1514 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); 1520 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text();
@@ -1566,7 +1572,7 @@ void KOPrefsDialog::usrWriteConfig()
1566 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; 1572 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
1567 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; 1573 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
1568 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; 1574 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
1569 1575 }
1570} 1576}
1571 1577
1572void KOPrefsDialog::updateCategories() 1578void KOPrefsDialog::updateCategories()
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 25e76ee..2c04852 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -724,10 +724,15 @@ void MainWindow::initActions()
724 this, SLOT( showConfigureAgenda( ) ) ); 724 this, SLOT( showConfigureAgenda( ) ) );
725 725
726 icon = loadPixmap( pathString + "configure" ); 726 icon = loadPixmap( pathString + "configure" );
727 action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); 727 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
728 action->addTo( actionMenu ); 728 action->addTo( actionMenu );
729 connect( action, SIGNAL( activated() ), 729 connect( action, SIGNAL( activated() ),
730 mView, SLOT( edit_options() ) ); 730 mView, SLOT( edit_options() ) );
731 icon = loadPixmap( pathString + "configure" );
732 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
733 action->addTo( actionMenu );
734 connect( action, SIGNAL( activated() ),
735 mView, SLOT( edit_global_options() ) );
731 actionMenu->insertSeparator(); 736 actionMenu->insertSeparator();
732 737
733 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 738 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );