Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koprefsdialog.cpp | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index b782bb1..3ee9a22 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -276,24 +276,31 @@ void KOPrefsDialog::setupMainTab() | |||
276 | KPrefsDialogWidBool *verticalScreen = | 276 | KPrefsDialogWidBool *verticalScreen = |
277 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 277 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
278 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 278 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
279 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 279 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
280 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); | 280 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); |
281 | 281 | ||
282 | 282 | ||
283 | int iii = 5; | 283 | int iii = 5; |
284 | widbool = addWidBool(i18n("Block popup until mouse button release"), | 284 | widbool = addWidBool(i18n("Block popup until mouse button release"), |
285 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); | 285 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); |
286 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); | 286 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); |
287 | ++iii; | 287 | ++iii; |
288 | if ( QApplication::desktop()->height() <= 240 ) { | ||
289 | topFrame = addPage(i18n("General") +" 2",0,0); | ||
290 | topLayout = new QGridLayout(topFrame,4,2); | ||
291 | topLayout->setSpacing(2); | ||
292 | topLayout->setMargin(3); | ||
293 | iii = 0; | ||
294 | } | ||
288 | QHBox *dummy = new QHBox(topFrame); | 295 | QHBox *dummy = new QHBox(topFrame); |
289 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 296 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
290 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 297 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
291 | 298 | ||
292 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); | 299 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); |
293 | 300 | ||
294 | ++iii; | 301 | ++iii; |
295 | 302 | ||
296 | 303 | ||
297 | // KPrefsDialogWidBool *bcc = | 304 | // KPrefsDialogWidBool *bcc = |
298 | // addWidBool(i18n("Send copy to owner when mailing events"), | 305 | // addWidBool(i18n("Send copy to owner when mailing events"), |
299 | // &(KOPrefs::instance()->mBcc),topFrame); | 306 | // &(KOPrefs::instance()->mBcc),topFrame); |
@@ -422,30 +429,37 @@ void KOPrefsDialog::setupTimeTab() | |||
422 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); | 429 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); |
423 | mDefaultDurationSpin->setSuffix(":00"); | 430 | mDefaultDurationSpin->setSuffix(":00"); |
424 | topLayout->addWidget(mDefaultDurationSpin,2,1); | 431 | topLayout->addWidget(mDefaultDurationSpin,2,1); |
425 | 432 | ||
426 | QStringList alarmList; | 433 | QStringList alarmList; |
427 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") | 434 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") |
428 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; | 435 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; |
429 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 436 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
430 | 3,0); | 437 | 3,0); |
431 | mAlarmTimeCombo = new QComboBox(topFrame); | 438 | mAlarmTimeCombo = new QComboBox(topFrame); |
432 | mAlarmTimeCombo->insertStringList(alarmList); | 439 | mAlarmTimeCombo->insertStringList(alarmList); |
433 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 440 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
434 | 441 | int iii = 4; | |
442 | if ( QApplication::desktop()->height() <= 240 ) { | ||
443 | topFrame = addPage(i18n("Time") +" 2",0,0); | ||
444 | topLayout = new QGridLayout(topFrame,1,2); | ||
445 | topLayout->setSpacing(2); | ||
446 | topLayout->setMargin(3); | ||
447 | iii = 0; | ||
448 | } | ||
435 | 449 | ||
436 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 450 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, |
437 | i18n("Working Hours"), | 451 | i18n("Working Hours"), |
438 | topFrame); | 452 | topFrame); |
439 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); | 453 | topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1); |
440 | workingHoursGroup->layout()->setSpacing( 0 ); | 454 | workingHoursGroup->layout()->setSpacing( 0 ); |
441 | workingHoursGroup->layout()->setMargin( 4 ); | 455 | workingHoursGroup->layout()->setMargin( 4 ); |
442 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 456 | QHBox *workStartBox = new QHBox(workingHoursGroup); |
443 | // workStartBox->setMargin( 0 ); | 457 | // workStartBox->setMargin( 0 ); |
444 | addWidTime(i18n("Daily starting hour:"), | 458 | addWidTime(i18n("Daily starting hour:"), |
445 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 459 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
446 | 460 | ||
447 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 461 | QHBox *workEndBox = new QHBox(workingHoursGroup); |
448 | //workEndBox->setMargin( 0 ); | 462 | //workEndBox->setMargin( 0 ); |
449 | addWidTime(i18n("Daily ending hour:"), | 463 | addWidTime(i18n("Daily ending hour:"), |
450 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 464 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
451 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 465 | QVBox *excludeBox = new QVBox(workingHoursGroup); |
@@ -693,24 +707,36 @@ void KOPrefsDialog::setupViewsTab() | |||
693 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 707 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
694 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 708 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
695 | 709 | ||
696 | KPrefsDialogWidBool *coloredCategoriesInMonthView = | 710 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
697 | addWidBool(i18n("Month view uses category colors"), | 711 | addWidBool(i18n("Month view uses category colors"), |
698 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 712 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
699 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 713 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
700 | 714 | ||
701 | dummy = | 715 | dummy = |
702 | addWidBool(i18n("Category colors are applied to text"), | 716 | addWidBool(i18n("Category colors are applied to text"), |
703 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 717 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
704 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 718 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
719 | |||
720 | |||
721 | |||
722 | if ( QApplication::desktop()->height() <= 240 ) { | ||
723 | topFrame = addPage(i18n("Month View") +" 2",0,0); | ||
724 | topLayout = new QGridLayout(topFrame,4,1); | ||
725 | topLayout->setSpacing(2); | ||
726 | topLayout->setMargin(1); | ||
727 | ii = 0; | ||
728 | } | ||
729 | |||
730 | |||
705 | coloredCategoriesInMonthView = | 731 | coloredCategoriesInMonthView = |
706 | addWidBool(i18n("Month view uses day colors"), | 732 | addWidBool(i18n("Month view uses day colors"), |
707 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 733 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
708 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 734 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
709 | 735 | ||
710 | KPrefsDialogWidColor *holidayColor = | 736 | KPrefsDialogWidColor *holidayColor = |
711 | addWidColor(i18n("Day color odd months"), | 737 | addWidColor(i18n("Day color odd months"), |
712 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 738 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
713 | topLayout->addWidget(holidayColor->label(),ii,0); | 739 | topLayout->addWidget(holidayColor->label(),ii,0); |
714 | topLayout->addWidget(holidayColor->button(),ii++,1); | 740 | topLayout->addWidget(holidayColor->button(),ii++,1); |
715 | 741 | ||
716 | holidayColor = | 742 | holidayColor = |
@@ -892,27 +918,31 @@ dummy = | |||
892 | topFrame = addPage(i18n("Alarm"),0,0); | 918 | topFrame = addPage(i18n("Alarm"),0,0); |
893 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 919 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
894 | 920 | ||
895 | topLayout = new QGridLayout(topFrame,2,1); | 921 | topLayout = new QGridLayout(topFrame,2,1); |
896 | topLayout->setSpacing(mSpacingHint); | 922 | topLayout->setSpacing(mSpacingHint); |
897 | topLayout->setMargin(mMarginHint); | 923 | topLayout->setMargin(mMarginHint); |
898 | int iii = 0; | 924 | int iii = 0; |
899 | 925 | ||
900 | dummy = | 926 | dummy = |
901 | addWidBool(i18n("Use internal alarm notification"), | 927 | addWidBool(i18n("Use internal alarm notification"), |
902 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 928 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
903 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 929 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
904 | lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); | ||
905 | 930 | ||
906 | topLayout->addWidget(lab ,iii++,0); | 931 | if ( QApplication::desktop()->height() > 240 ) { |
932 | |||
933 | lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); | ||
934 | |||
935 | topLayout->addWidget(lab ,iii++,0); | ||
936 | } | ||
907 | #ifndef DESKTOP_VERSION | 937 | #ifndef DESKTOP_VERSION |
908 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 938 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
909 | #else | 939 | #else |
910 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 940 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
911 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 941 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
912 | #endif | 942 | #endif |
913 | 943 | ||
914 | QHBox* dummyBox = new QHBox(topFrame); | 944 | QHBox* dummyBox = new QHBox(topFrame); |
915 | new QLabel(i18n("Play beeps count:"),dummyBox); | 945 | new QLabel(i18n("Play beeps count:"),dummyBox); |
916 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 946 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
917 | topLayout->addWidget(dummyBox,iii++,0); | 947 | topLayout->addWidget(dummyBox,iii++,0); |
918 | 948 | ||
@@ -1155,24 +1185,36 @@ void KOPrefsDialog::setupColorsTab() | |||
1155 | // Event color | 1185 | // Event color |
1156 | KPrefsDialogWidColor *eventColor = | 1186 | KPrefsDialogWidColor *eventColor = |
1157 | addWidColor(i18n("Default event color:"), | 1187 | addWidColor(i18n("Default event color:"), |
1158 | &(KOPrefs::instance()->mEventColor),topFrame); | 1188 | &(KOPrefs::instance()->mEventColor),topFrame); |
1159 | topLayout->addWidget(eventColor->label(),ii,0); | 1189 | topLayout->addWidget(eventColor->label(),ii,0); |
1160 | topLayout->addWidget(eventColor->button(),ii++,1); | 1190 | topLayout->addWidget(eventColor->button(),ii++,1); |
1161 | eventColor = | 1191 | eventColor = |
1162 | addWidColor(i18n("Default todo done color:"), | 1192 | addWidColor(i18n("Default todo done color:"), |
1163 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); | 1193 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); |
1164 | topLayout->addWidget(eventColor->label(),ii,0); | 1194 | topLayout->addWidget(eventColor->label(),ii,0); |
1165 | topLayout->addWidget(eventColor->button(),ii++,1); | 1195 | topLayout->addWidget(eventColor->button(),ii++,1); |
1166 | 1196 | ||
1197 | if ( QApplication::desktop()->height() <= 240 ) { | ||
1198 | topFrame = addPage(i18n("Colors") +" 2",0,0); | ||
1199 | // DesktopIcon("colorize",KIcon::SizeMedium)); | ||
1200 | |||
1201 | topLayout = new QGridLayout(topFrame,5,2); | ||
1202 | // topLayout->setSpacing(mSpacingHint); | ||
1203 | // topLayout->setMargin(mMarginHint); | ||
1204 | |||
1205 | topLayout->setSpacing(2); | ||
1206 | topLayout->setMargin(3); | ||
1207 | } | ||
1208 | |||
1167 | 1209 | ||
1168 | // agenda view background color | 1210 | // agenda view background color |
1169 | KPrefsDialogWidColor *agendaBgColor = | 1211 | KPrefsDialogWidColor *agendaBgColor = |
1170 | addWidColor(i18n("Agenda view background color:"), | 1212 | addWidColor(i18n("Agenda view background color:"), |
1171 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); | 1213 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); |
1172 | topLayout->addWidget(agendaBgColor->label(),ii,0); | 1214 | topLayout->addWidget(agendaBgColor->label(),ii,0); |
1173 | topLayout->addWidget(agendaBgColor->button(),ii++,1); | 1215 | topLayout->addWidget(agendaBgColor->button(),ii++,1); |
1174 | 1216 | ||
1175 | // working hours color | 1217 | // working hours color |
1176 | KPrefsDialogWidColor *workingHoursColor = | 1218 | KPrefsDialogWidColor *workingHoursColor = |
1177 | addWidColor(i18n("Working hours color:"), | 1219 | addWidColor(i18n("Working hours color:"), |
1178 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); | 1220 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); |