summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-09 16:17:14 (UTC)
committer zautrix <zautrix>2005-06-09 16:17:14 (UTC)
commit89c5159208fd982f527117e49d67ea1f90553dbe (patch) (unidiff)
treeb6b72ca9e0668e871a6969b25654945747015d0f
parentad88eadf0bdb34cb4a93639b50a5566a06470c22 (diff)
downloadkdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.zip
kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.tar.gz
kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.tar.bz2
dialog fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-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
7 files changed, 56 insertions, 25 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 6b62d4e..bb3a00d 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1357,35 +1357,35 @@
1357{ "Use standard backup dir","Standard Backupverzeichnis" }, 1357{ "Use standard backup dir","Standard Backupverzeichnis" },
1358{ "Number of Backups:","Anzahl der Backups" }, 1358{ "Number of Backups:","Anzahl der Backups" },
1359{ "Make backup every ","Mache ein Backup alle " }, 1359{ "Make backup every ","Mache ein Backup alle " },
1360{ " days"," Tage" }, 1360{ " days"," Tage" },
1361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, 1361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
1362{ "Backup Failed!","Backup Problem!" }, 1362{ "Backup Failed!","Backup Problem!" },
1363{ "Try again now","Versuche jetzt nochmal" }, 1363{ "Try again now","Versuche jetzt nochmal" },
1364{ "Try again later","Versuche später nochmal" }, 1364{ "Try again later","Versuche später nochmal" },
1365{ "Try again tomorrow","Versuche morgen nochmal" }, 1365{ "Try again tomorrow","Versuche morgen nochmal" },
1366{ "Disable backup","Schalte Backup ab" }, 1366{ "Disable backup","Schalte Backup ab" },
1367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 1367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
1368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 1368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
1369{ "Choose action","Wähle Aktion" }, 1369{ "Choose action","Wähle Aktion" },
1370{ "Comment for todo:","Kommentar zum Todo:" }, 1370{ "Comment for todo:","Kommentar zum Todo:" },
1371{ "Stop+note","Stop+Notiz" }, 1371{ "Stop+note","Stop+Notiz" },
1372{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, 1372{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" },
1373{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, 1373{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" },
1374{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, 1374{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" },
1375{ "Print complete list","Drucke komplette Liste" }, 1375{ "Print complete list","Drucke komplette Liste" },
1376{ "Hide all selected","Verstecke Selektierte" }, 1376{ "Hide all selected","Verstecke Selektierte" },
1377{ "Add items","hinzufügen" }, 1377{ "Add items","hinzufügen" },
1378{ "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, 1378{ "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" },
1379{ "Print List View...","Drucke Listenansicht..." }, 1379{ "Print List View...","Drucke Listenansicht..." },
1380{ "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, 1380{ "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." },
1381{ "","" }, 1381{ "Configure KO/Pi...","Konfiguriere KO/Pi..." },
1382{ "","" }, 1382{ "Global Settings...","Globale Einstellungen..." },
1383{ "","" }, 1383{ "","" },
1384{ "","" }, 1384{ "","" },
1385{ "","" }, 1385{ "","" },
1386{ "","" }, 1386{ "","" },
1387{ "","" }, 1387{ "","" },
1388{ "","" }, 1388{ "","" },
1389{ "","" }, 1389{ "","" },
1390{ "","" }, 1390{ "","" },
1391{ "","" }, \ No newline at end of file 1391{ "","" }, \ No newline at end of file
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 7c7466b..4794414 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2499,69 +2499,71 @@ void CalendarView::edit_copy()
2499 2499
2500 if (mViewManager->currentView()->isEventView()) { 2500 if (mViewManager->currentView()->isEventView()) {
2501 if ( incidence && incidence->typeID() == eventID ) { 2501 if ( incidence && incidence->typeID() == eventID ) {
2502 anEvent = static_cast<Event *>(incidence); 2502 anEvent = static_cast<Event *>(incidence);
2503 } 2503 }
2504 } 2504 }
2505 2505
2506 if (!anEvent) { 2506 if (!anEvent) {
2507 KNotifyClient::beep(); 2507 KNotifyClient::beep();
2508 return; 2508 return;
2509 } 2509 }
2510 DndFactory factory( mCalendar ); 2510 DndFactory factory( mCalendar );
2511 factory.copyIncidence(anEvent); 2511 factory.copyIncidence(anEvent);
2512} 2512}
2513 2513
2514void CalendarView::edit_paste() 2514void CalendarView::edit_paste()
2515{ 2515{
2516 QDate date = mNavigator->selectedDates().first(); 2516 QDate date = mNavigator->selectedDates().first();
2517 2517
2518 DndFactory factory( mCalendar ); 2518 DndFactory factory( mCalendar );
2519 Event *pastedEvent = (Event *)factory.pasteIncidence( date ); 2519 Event *pastedEvent = (Event *)factory.pasteIncidence( date );
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!"),
2533 i18n("Timezone settings"),i18n("Reload"))) { 2532 i18n("Timezone settings"),i18n("Reload"))) {
2534 qDebug("KO: TZ reload cancelled "); 2533 qDebug("KO: TZ reload cancelled ");
2535 return; 2534 return;
2536 } 2535 }
2537 qDebug("KO: Timezone change "); 2536 qDebug("KO: Timezone change ");
2538 openCalendar( MainWindow::defaultFileName() ); 2537 openCalendar( MainWindow::defaultFileName() );
2539 setModified(true); 2538 setModified(true);
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
2547void CalendarView::slotSelectPickerDate( QDate d) 2549void CalendarView::slotSelectPickerDate( QDate d)
2548{ 2550{
2549 mDateFrame->hide(); 2551 mDateFrame->hide();
2550 if ( mDatePickerMode == 1 ) { 2552 if ( mDatePickerMode == 1 ) {
2551 mNavigator->slotDaySelect( d ); 2553 mNavigator->slotDaySelect( d );
2552 } else if ( mDatePickerMode == 2 ) { 2554 } else if ( mDatePickerMode == 2 ) {
2553 if ( mMoveIncidence->typeID() == todoID ) { 2555 if ( mMoveIncidence->typeID() == todoID ) {
2554 Todo * to = (Todo *) mMoveIncidence; 2556 Todo * to = (Todo *) mMoveIncidence;
2555 QTime tim; 2557 QTime tim;
2556 int len = 0; 2558 int len = 0;
2557 if ( to->hasStartDate() && to->hasDueDate() ) 2559 if ( to->hasStartDate() && to->hasDueDate() )
2558 len = to->dtStart().secsTo( to->dtDue()); 2560 len = to->dtStart().secsTo( to->dtDue());
2559 if ( to->hasDueDate() ) 2561 if ( to->hasDueDate() )
2560 tim = to->dtDue().time(); 2562 tim = to->dtDue().time();
2561 else { 2563 else {
2562 tim = QTime ( 0,0,0 ); 2564 tim = QTime ( 0,0,0 );
2563 to->setFloats( true ); 2565 to->setFloats( true );
2564 to->setHasDueDate( true ); 2566 to->setHasDueDate( true );
2565 } 2567 }
2566 QDateTime dt ( d,tim ); 2568 QDateTime dt ( d,tim );
2567 to->setDtDue( dt ); 2569 to->setDtDue( dt );
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 4600090..1215a99 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -328,48 +328,49 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
328 void todoChanged(Todo *); 328 void todoChanged(Todo *);
329 void todoToBeDeleted(Todo *); 329 void todoToBeDeleted(Todo *);
330 void todoDeleted(); 330 void todoDeleted();
331 331
332 void updateView(const QDate &start, const QDate &end); 332 void updateView(const QDate &start, const QDate &end);
333 void updateView(); 333 void updateView();
334 void clearAllViews(); 334 void clearAllViews();
335 335
336 /** Full update of visible todo views */ 336 /** Full update of visible todo views */
337 void updateTodoViews(); 337 void updateTodoViews();
338 338
339 void updateUnmanagedViews(); 339 void updateUnmanagedViews();
340 340
341 /** cut the current appointment to the clipboard */ 341 /** cut the current appointment to the clipboard */
342 void edit_cut(); 342 void edit_cut();
343 343
344 /** copy the current appointment(s) to the clipboard */ 344 /** copy the current appointment(s) to the clipboard */
345 void edit_copy(); 345 void edit_copy();
346 346
347 /** paste the current vobject(s) in the clipboard buffer into calendar */ 347 /** paste the current vobject(s) in the clipboard buffer into calendar */
348 void edit_paste(); 348 void edit_paste();
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.
355 */ 356 */
356 void print(); 357 void print();
357 void printSetup(); 358 void printSetup();
358 void printPreview(); 359 void printPreview();
359 360
360 /** Export as iCalendar file */ 361 /** Export as iCalendar file */
361 void exportICalendar(); 362 void exportICalendar();
362 363
363 /** Export as vCalendar file */ 364 /** Export as vCalendar file */
364 bool exportVCalendar( QString fn); 365 bool exportVCalendar( QString fn);
365 366
366 /** pop up a dialog to show an existing appointment. */ 367 /** pop up a dialog to show an existing appointment. */
367 void appointment_show(); 368 void appointment_show();
368 /** 369 /**
369 * pop up an Appointment Dialog to edit an existing appointment.Get 370 * pop up an Appointment Dialog to edit an existing appointment.Get
370 * information on the appointment from the list of unique IDs that is 371 * information on the appointment from the list of unique IDs that is
371 * currently in the View, called currIds. 372 * currently in the View, called currIds.
372 */ 373 */
373 void appointment_edit(); 374 void appointment_edit();
374 /** 375 /**
375 * pop up dialog confirming deletion of currently selected event in the 376 * pop up dialog confirming deletion of currently selected event in the
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index c927b37..aa30c52 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -67,74 +67,90 @@ KODialogManager::~KODialogManager()
67 delete mArchiveDialog; 67 delete mArchiveDialog;
68#endif 68#endif
69 delete mFilterEditDialog; 69 delete mFilterEditDialog;
70#ifndef KORG_NOPLUGINS 70#ifndef KORG_NOPLUGINS
71 delete mPluginDialog; 71 delete mPluginDialog;
72#endif 72#endif
73} 73}
74 74
75OutgoingDialog *KODialogManager::outgoingDialog() 75OutgoingDialog *KODialogManager::outgoingDialog()
76{ 76{
77 createOutgoingDialog(); 77 createOutgoingDialog();
78 return mOutgoingDialog; 78 return mOutgoingDialog;
79} 79}
80 80
81void KODialogManager::createOutgoingDialog() 81void KODialogManager::createOutgoingDialog()
82{ 82{
83 if (!mOutgoingDialog) { 83 if (!mOutgoingDialog) {
84 mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView); 84 mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView);
85 if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog); 85 if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog);
86 connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)), 86 connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)),
87 mMainView,SIGNAL(numOutgoingChanged(int))); 87 mMainView,SIGNAL(numOutgoingChanged(int)));
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
105 mOptionsDialog->showMaximized(); 120 mOptionsDialog->showMaximized();
106#else 121#else
107 mOptionsDialog->show(); 122 mOptionsDialog->show();
108#endif 123#endif
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()
120{ 136{
121 createOutgoingDialog(); 137 createOutgoingDialog();
122 mOutgoingDialog->show(); 138 mOutgoingDialog->show();
123 mOutgoingDialog->raise(); 139 mOutgoingDialog->raise();
124} 140}
125 141
126IncomingDialog *KODialogManager::incomingDialog() 142IncomingDialog *KODialogManager::incomingDialog()
127{ 143{
128 createOutgoingDialog(); 144 createOutgoingDialog();
129 if (!mIncomingDialog) { 145 if (!mIncomingDialog) {
130 mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); 146 mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView);
131 connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), 147 connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)),
132 mMainView,SIGNAL(numIncomingChanged(int))); 148 mMainView,SIGNAL(numIncomingChanged(int)));
133 connect(mIncomingDialog,SIGNAL(calendarUpdated()), 149 connect(mIncomingDialog,SIGNAL(calendarUpdated()),
134 mMainView,SLOT(updateView())); 150 mMainView,SLOT(updateView()));
135 } 151 }
136 return mIncomingDialog; 152 return mIncomingDialog;
137} 153}
138 154
139void KODialogManager::createIncomingDialog() 155void KODialogManager::createIncomingDialog()
140{ 156{
diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h
index a6cc621..b68ddc2 100644
--- a/korganizer/kodialogmanager.h
+++ b/korganizer/kodialogmanager.h
@@ -50,48 +50,49 @@ using namespace KCal;
50*/ 50*/
51class KODialogManager : public QObject 51class KODialogManager : public QObject
52{ 52{
53 Q_OBJECT 53 Q_OBJECT
54 public: 54 public:
55 KODialogManager( CalendarView * ); 55 KODialogManager( CalendarView * );
56 virtual ~KODialogManager(); 56 virtual ~KODialogManager();
57 57
58 /** Get an editor dialog for an Event. */ 58 /** Get an editor dialog for an Event. */
59 KOEventEditor *getEventEditor(); 59 KOEventEditor *getEventEditor();
60 60
61 /** Get an editor dialog for a Todo. */ 61 /** Get an editor dialog for a Todo. */
62 KOTodoEditor *getTodoEditor(); 62 KOTodoEditor *getTodoEditor();
63 63
64 OutgoingDialog *outgoingDialog(); 64 OutgoingDialog *outgoingDialog();
65 65
66 IncomingDialog *incomingDialog(); 66 IncomingDialog *incomingDialog();
67 void writeSettings( KConfig *config); 67 void writeSettings( KConfig *config);
68 void updateSearchDialog(); 68 void updateSearchDialog();
69 SearchDialog * getSearchDialog(); 69 SearchDialog * getSearchDialog();
70 void setDocumentId( const QString &id ); 70 void setDocumentId( const QString &id );
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();
77 // void showCategoryEditDialog(); 78 // void showCategoryEditDialog();
78 void showSearchDialog(); 79 void showSearchDialog();
79 void showArchiveDialog(); 80 void showArchiveDialog();
80 void showFilterEditDialog(QPtrList<CalFilter> *filters); 81 void showFilterEditDialog(QPtrList<CalFilter> *filters);
81 void showPluginDialog(); 82 void showPluginDialog();
82 void hideSearchDialog(); 83 void hideSearchDialog();
83 84
84 private: 85 private:
85 void createOutgoingDialog(); 86 void createOutgoingDialog();
86 void createIncomingDialog(); 87 void createIncomingDialog();
87 88
88 CalendarView *mMainView; 89 CalendarView *mMainView;
89 90
90 OutgoingDialog *mOutgoingDialog; 91 OutgoingDialog *mOutgoingDialog;
91 IncomingDialog *mIncomingDialog; 92 IncomingDialog *mIncomingDialog;
92 KOPrefsDialog *mOptionsDialog; 93 KOPrefsDialog *mOptionsDialog;
93 // KPIM::CategoryEditDialog *mCategoryEditDialog; 94 // KPIM::CategoryEditDialog *mCategoryEditDialog;
94 SearchDialog *mSearchDialog; 95 SearchDialog *mSearchDialog;
95 ArchiveDialog *mArchiveDialog; 96 ArchiveDialog *mArchiveDialog;
96 FilterEditDialog *mFilterEditDialog; 97 FilterEditDialog *mFilterEditDialog;
97 PluginDialog *mPluginDialog; 98 PluginDialog *mPluginDialog;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index c9477e3..4b5b66a 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -65,77 +65,79 @@
65#define INITFILE "/etc/default/init" 65#define INITFILE "/etc/default/init"
66#endif 66#endif
67 67
68#include "koprefs.h" 68#include "koprefs.h"
69 69
70#include "koprefsdialog.h" 70#include "koprefsdialog.h"
71#include "kpimglobalprefs.h" 71#include "kpimglobalprefs.h"
72 72
73 73
74KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 74KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
75 KPrefsDialog(KOPrefs::instance(),parent,name,true) 75 KPrefsDialog(KOPrefs::instance(),parent,name,true)
76{ 76{
77 77
78 setFont( KGlobalSettings::generalMaxFont() ); 78 setFont( KGlobalSettings::generalMaxFont() );
79 setCaption( i18n("Preferences - some settings need a restart (nr)")); 79 setCaption( i18n("Preferences - some settings need a restart (nr)"));
80 mCategoryDict.setAutoDelete(true); 80 mCategoryDict.setAutoDelete(true);
81 81
82 KGlobal::locale()->insertCatalogue("timezones"); 82 KGlobal::locale()->insertCatalogue("timezones");
83 mSpacingHint = spacingHintSmall(); 83 mSpacingHint = spacingHintSmall();
84 mMarginHint = marginHintSmall(); 84 mMarginHint = marginHintSmall();
85#ifndef DESKTOP_VERSION 85#ifndef DESKTOP_VERSION
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();
94 setupTimeTab(); 96 setupTimeTab();
95 //setupLocaleDateTab(); 97 //setupLocaleDateTab();
96 setupFontsTab(); 98 setupFontsTab();
97 setupColorsTab(); 99 setupColorsTab();
98 setupViewsTab(); 100 setupViewsTab();
99 //setupSyncTab(); 101 //setupSyncTab();
100 //setupSyncAlgTab(); 102 //setupSyncAlgTab();
101 //setupPrinterTab(); 103 //setupPrinterTab();
102 //setupGroupSchedulingTab(); 104 //setupGroupSchedulingTab();
103 //setupGroupAutomationTab(); 105 //setupGroupAutomationTab();
104 106 }
105 107
106} 108}
107 109
108 110
109KOPrefsDialog::~KOPrefsDialog() 111KOPrefsDialog::~KOPrefsDialog()
110{ 112{
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}
121void KOPrefsDialog::setupLocaleDateTab() 123void KOPrefsDialog::setupLocaleDateTab()
122{ 124{
123#if 0 125#if 0
124QFrame *topFrame = addPage(i18n("Date Format"),0,0); 126QFrame *topFrame = addPage(i18n("Date Format"),0,0);
125 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 127 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
126 topLayout->setSpacing(mSpacingHint); 128 topLayout->setSpacing(mSpacingHint);
127 topLayout->setMargin(mMarginHint); 129 topLayout->setMargin(mMarginHint);
128 int iii = 0; 130 int iii = 0;
129 131
130 132
131 KPrefsDialogWidRadios *syncPrefsGroup = 133 KPrefsDialogWidRadios *syncPrefsGroup =
132 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 134 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
133 QString format; 135 QString format;
134 if ( QApplication::desktop()->width() < 480 ) 136 if ( QApplication::desktop()->width() < 480 )
135 format = "(%d.%m.%Y)"; 137 format = "(%d.%m.%Y)";
136 else 138 else
137 format = "(%d.%m.%Y|%A %d %B %Y)"; 139 format = "(%d.%m.%Y|%A %d %B %Y)";
138 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 140 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
139 if ( QApplication::desktop()->width() < 480 ) 141 if ( QApplication::desktop()->width() < 480 )
140 format = "(%m.%d.%Y)"; 142 format = "(%m.%d.%Y)";
141 else 143 else
@@ -219,49 +221,49 @@ void KOPrefsDialog::setupLocaleTab()
219 QHBoxLayout *hbLayout = new QHBoxLayout(hb); 221 QHBoxLayout *hbLayout = new QHBoxLayout(hb);
220 sb = 222 sb =
221 addWidBool(i18n("Week starts on Sunday"), 223 addWidBool(i18n("Week starts on Sunday"),
222 &(KOPrefs::instance()->mWeekStartsOnSunday),hb); 224 &(KOPrefs::instance()->mWeekStartsOnSunday),hb);
223 hbLayout->addWidget(sb->checkBox() ); 225 hbLayout->addWidget(sb->checkBox() );
224 sb = 226 sb =
225 addWidBool(i18n("Use short date in (WN/E) view"), 227 addWidBool(i18n("Use short date in (WN/E) view"),
226 &(KOPrefs::instance()->mShortDateInViewer),hb); 228 &(KOPrefs::instance()->mShortDateInViewer),hb);
227 hbLayout->addWidget(sb->checkBox() ); 229 hbLayout->addWidget(sb->checkBox() );
228 topLayout->addMultiCellWidget(hb, iii,iii,0,1); 230 topLayout->addMultiCellWidget(hb, iii,iii,0,1);
229 231
230 } 232 }
231 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION 233 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION
232#if 0 234#if 0
233 ++iii; 235 ++iii;
234 sb = 236 sb =
235 addWidBool(i18n("Quick load/save (w/o Unicode)"), 237 addWidBool(i18n("Quick load/save (w/o Unicode)"),
236 &(KOPrefs::instance()->mUseQuicksave),topFrame); 238 &(KOPrefs::instance()->mUseQuicksave),topFrame);
237 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 239 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
238#endif 240#endif
239#endif 241#endif
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}
247void KOPrefsDialog::setupSyncAlgTab() 249void KOPrefsDialog::setupSyncAlgTab()
248{ 250{
249#if 0 251#if 0
250 QLabel * lab; 252 QLabel * lab;
251 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); 253 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
252 mSetupSyncAlgTab = topFrame; 254 mSetupSyncAlgTab = topFrame;
253 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 255 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
254 topLayout->setSpacing(mSpacingHint); 256 topLayout->setSpacing(mSpacingHint);
255 topLayout->setMargin(mMarginHint); 257 topLayout->setMargin(mMarginHint);
256 int iii = 0; 258 int iii = 0;
257 259
258 KPrefsDialogWidBool *sb = 260 KPrefsDialogWidBool *sb =
259 addWidBool(i18n("Ask for preferences before syncing"), 261 addWidBool(i18n("Ask for preferences before syncing"),
260 &(KOPrefs::instance()->mAskForPreferences),topFrame); 262 &(KOPrefs::instance()->mAskForPreferences),topFrame);
261 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 263 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
262 264
263 ++iii; 265 ++iii;
264 266
265 KPrefsDialogWidRadios *syncPrefsGroup = 267 KPrefsDialogWidRadios *syncPrefsGroup =
266 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), 268 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
267 topFrame); 269 topFrame);
@@ -1437,99 +1439,103 @@ void KOPrefsDialog::setupGroupAutomationTab()
1437void KOPrefsDialog::showPrinterTab() 1439void KOPrefsDialog::showPrinterTab()
1438{ 1440{
1439 showPage(pageIndex(mPrinterTab)); 1441 showPage(pageIndex(mPrinterTab));
1440} 1442}
1441 1443
1442 1444
1443void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, 1445void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text,
1444 const QStringList *tags) 1446 const QStringList *tags)
1445{ 1447{
1446 if (tags) { 1448 if (tags) {
1447 int i = tags->findIndex(text); 1449 int i = tags->findIndex(text);
1448 if (i > 0) combo->setCurrentItem(i); 1450 if (i > 0) combo->setCurrentItem(i);
1449 } else { 1451 } else {
1450 for(int i=0;i<combo->count();++i) { 1452 for(int i=0;i<combo->count();++i) {
1451 if (combo->text(i) == text) { 1453 if (combo->text(i) == text) {
1452 combo->setCurrentItem(i); 1454 combo->setCurrentItem(i);
1453 break; 1455 break;
1454 } 1456 }
1455 } 1457 }
1456 } 1458 }
1457} 1459}
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
1465 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); 1469 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval);
1466 // QDate current ( 2001, 1,1); 1470 // QDate current ( 2001, 1,1);
1467 //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1471 //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1468 //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1472 //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1469 //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); 1473 //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId));
1470 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1474 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1471 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); 1475 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime);
1472 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); 1476 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration);
1473 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); 1477 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime);
1474 // if (KOPrefs::instance()->mAllDaySize > 47 ) 1478 // if (KOPrefs::instance()->mAllDaySize > 47 )
1475 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; 1479 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2;
1476 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); 1480 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize);
1477 1481
1478 mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); 1482 mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays);
1479 mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); 1483 mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays);
1480 mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); 1484 mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios);
1481 // mAMails->clear(); 1485 // mAMails->clear();
1482 // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); 1486 // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin();
1483// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { 1487// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) {
1484// QListViewItem *item = new QListViewItem(mAMails); 1488// QListViewItem *item = new QListViewItem(mAMails);
1485// item->setText(0,*it); 1489// item->setText(0,*it);
1486// mAMails->insertItem(item); 1490// mAMails->insertItem(item);
1487// } 1491// }
1488 1492
1489 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); 1493 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP);
1490 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); 1494 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser);
1491 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); 1495 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd);
1492 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); 1496 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile);
1493 1497
1494 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); 1498 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile);
1495 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); 1499 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile);
1496 //QString dummy = KOPrefs::instance()->mUserDateFormatLong; 1500 //QString dummy = KOPrefs::instance()->mUserDateFormatLong;
1497 //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); 1501 //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
1498 //dummy = KOPrefs::instance()->mUserDateFormatShort; 1502 //dummy = KOPrefs::instance()->mUserDateFormatShort;
1499 //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); 1503 //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
1500 updateCategories(); 1504 updateCategories();
1501 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); 1505 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps );
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();
1515 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); 1521 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text();
1516 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); 1522 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text();
1517 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); 1523 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
1518 1524
1519 //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); 1525 //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
1520 //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); 1526 //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
1521 KOPrefs::instance()->setFullName(mNameEdit->text()); 1527 KOPrefs::instance()->setFullName(mNameEdit->text());
1522 KOPrefs::instance()->setEmail(mEmailEdit->text()); 1528 KOPrefs::instance()->setEmail(mEmailEdit->text());
1523 1529
1524 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); 1530 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value();
1525 1531
1526 // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); 1532 // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText();
1527 //QDate date; 1533 //QDate date;
1528 //date = mStartDateSavingEdit->date(); 1534 //date = mStartDateSavingEdit->date();
1529 //int sub = 0; 1535 //int sub = 0;
1530 //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1536 //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1531 // sub = 1; 1537 // sub = 1;
1532// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; 1538// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub;
1533// date = mEndDateSavingEdit->date(); 1539// date = mEndDateSavingEdit->date();
1534// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1540// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1535// sub = 1; 1541// sub = 1;
@@ -1545,49 +1551,49 @@ void KOPrefsDialog::usrWriteConfig()
1545 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); 1551 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value();
1546 1552
1547 QDictIterator<QColor> it(mCategoryDict); 1553 QDictIterator<QColor> it(mCategoryDict);
1548 while (it.current()) { 1554 while (it.current()) {
1549 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); 1555 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
1550 ++it; 1556 ++it;
1551 } 1557 }
1552 1558
1553 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); 1559 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value();
1554 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); 1560 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value();
1555 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); 1561 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value();
1556 1562
1557 KOPrefs::instance()->mAdditionalMails.clear(); 1563 KOPrefs::instance()->mAdditionalMails.clear();
1558 // QListViewItem *item; 1564 // QListViewItem *item;
1559 // item = mAMails->firstChild(); 1565 // item = mAMails->firstChild();
1560 // while (item) 1566 // while (item)
1561 // { 1567 // {
1562 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); 1568 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) );
1563 // item = item->nextSibling(); 1569 // item = item->nextSibling();
1564 // } 1570 // }
1565 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); 1571 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value();
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()
1573{ 1579{
1574 mCategoryCombo->clear(); 1580 mCategoryCombo->clear();
1575 mCategoryDict.clear(); 1581 mCategoryDict.clear();
1576 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1582 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1577 updateCategoryColor(); 1583 updateCategoryColor();
1578} 1584}
1579 1585
1580void KOPrefsDialog::warningGroupScheduling() 1586void KOPrefsDialog::warningGroupScheduling()
1581{ 1587{
1582 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); 1588 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked());
1583} 1589}
1584 1590
1585void KOPrefsDialog::warningProjectView() 1591void KOPrefsDialog::warningProjectView()
1586{ 1592{
1587 warningExperimental(mEnableProjectView->checkBox()->isChecked()); 1593 warningExperimental(mEnableProjectView->checkBox()->isChecked());
1588} 1594}
1589 1595
1590void KOPrefsDialog::warningExperimental(bool on) 1596void KOPrefsDialog::warningExperimental(bool on)
1591{ 1597{
1592 if (on) { 1598 if (on) {
1593 KMessageBox::information(this,i18n("This is an experimental feature. " 1599 KMessageBox::information(this,i18n("This is an experimental feature. "
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 25e76ee..2c04852 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -703,52 +703,57 @@ void MainWindow::initActions()
703 actionFilterMenuTB->addTo( iconToolBar ); 703 actionFilterMenuTB->addTo( iconToolBar );
704 selectFilterMenuTB = new QPopupMenu( this ); 704 selectFilterMenuTB = new QPopupMenu( this );
705 selectFilterMenuTB->setCheckable( true ); 705 selectFilterMenuTB->setCheckable( true );
706 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 706 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
707 } 707 }
708 708
709 //#endif 709 //#endif
710 // ****************** 710 // ******************
711 QAction *action; 711 QAction *action;
712 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 712 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
713 configureToolBarMenu->setCheckable( true ); 713 configureToolBarMenu->setCheckable( true );
714 714
715 715
716 configureAgendaMenu->setCheckable( true ); 716 configureAgendaMenu->setCheckable( true );
717 int iii ; 717 int iii ;
718 for ( iii = 1;iii<= 10 ;++iii ){ 718 for ( iii = 1;iii<= 10 ;++iii ){
719 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 719 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
720 } 720 }
721 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 721 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
722 722
723 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 723 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
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 );
734 action->addTo( actionMenu ); 739 action->addTo( actionMenu );
735 connect( action, SIGNAL( activated() ), 740 connect( action, SIGNAL( activated() ),
736 mView, SLOT( undo_delete() ) ); 741 mView, SLOT( undo_delete() ) );
737 actionMenu->insertSeparator(); 742 actionMenu->insertSeparator();
738 743
739 icon = loadPixmap( pathString + "newevent" ); 744 icon = loadPixmap( pathString + "newevent" );
740 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 745 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
741 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); 746 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
742 configureToolBarMenu->insertSeparator(); 747 configureToolBarMenu->insertSeparator();
743 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); 748 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
744 configureToolBarMenu->insertSeparator(); 749 configureToolBarMenu->insertSeparator();
745 configureToolBarMenu->insertItem(i18n("Week Number"), 400); 750 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
746 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 751 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
747 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 752 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
748 ne_action->addTo( actionMenu ); 753 ne_action->addTo( actionMenu );
749 connect( ne_action, SIGNAL( activated() ), 754 connect( ne_action, SIGNAL( activated() ),
750 mView, SLOT( newEvent() ) ); 755 mView, SLOT( newEvent() ) );
751 icon = loadPixmap( pathString + "newtodo" ); 756 icon = loadPixmap( pathString + "newtodo" );
752 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 757 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
753 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 758 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
754 nt_action->addTo( actionMenu ); 759 nt_action->addTo( actionMenu );