-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 10 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 6 |
5 files changed, 18 insertions, 2 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index eec0b38..00f5c28 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1143,70 +1143,70 @@ | |||
1143 | { "Use &colors","Nutze Farben" }, | 1143 | { "Use &colors","Nutze Farben" }, |
1144 | { "Type of View","Typ der Ansicht" }, | 1144 | { "Type of View","Typ der Ansicht" }, |
1145 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1145 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1146 | { "Alt+F","Alt+F" }, | 1146 | { "Alt+F","Alt+F" }, |
1147 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1147 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1148 | { "Alt+T","Alt+T" }, | 1148 | { "Alt+T","Alt+T" }, |
1149 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1149 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1150 | { "Print month","Drucke Monat" }, | 1150 | { "Print month","Drucke Monat" }, |
1151 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1151 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1152 | { "&Start month:","&Startmonat:" }, | 1152 | { "&Start month:","&Startmonat:" }, |
1153 | { "&End month:","&Endmonat:" }, | 1153 | { "&End month:","&Endmonat:" }, |
1154 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1154 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1155 | { "Print todos","Drucke Todos" }, | 1155 | { "Print todos","Drucke Todos" }, |
1156 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1156 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1157 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1157 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1158 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1158 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1159 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1159 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1160 | { "Items to Print","Zu druckende Items" }, | 1160 | { "Items to Print","Zu druckende Items" }, |
1161 | { "&From:","Von:" }, | 1161 | { "&From:","Von:" }, |
1162 | { "&To:","Bis:" }, | 1162 | { "&To:","Bis:" }, |
1163 | { "Print &all todo items","Drucke alle Todo Items" }, | 1163 | { "Print &all todo items","Drucke alle Todo Items" }, |
1164 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1164 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1165 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1165 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1166 | { "Todo List","Todo Liste" }, | 1166 | { "Todo List","Todo Liste" }, |
1167 | { "&Title:","&Titel:" }, | 1167 | { "&Title:","&Titel:" }, |
1168 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, | 1168 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, |
1169 | { "Todo list","Todo Liste" }, | 1169 | { "Todo list","Todo Liste" }, |
1170 | { "&Print...","Drucke..." }, | 1170 | { "&Print...","Drucke..." }, |
1171 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1171 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1172 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1172 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1173 | { "OK","OK" }, | 1173 | { "OK","OK" }, |
1174 | { "FilterEditor","FilterEditor" }, | 1174 | { "FilterEditor","FilterEditor" }, |
1175 | { "Include","Inclusive" }, | 1175 | { "Include","Inclusive" }, |
1176 | { "Exclude","Exclusive" }, | 1176 | { "Exclude","Exclusive" }, |
1177 | { "Edit Selection...","Editiere Auswahl" }, | 1177 | { "Edit Selection...","Editiere Auswahl" }, |
1178 | { "recurring events","wiederholende Termine" }, | 1178 | { "recurring events","wiederholende Termine" }, |
1179 | { "recurr. events","wiederh.Termine" }, | 1179 | { "recurr. events","wiederh.Termine" }, |
1180 | { "completed to-dos","erledigte Todos" }, | 1180 | { "completed to-dos","erledigte Todos" }, |
1181 | { "events","Termine" }, | 1181 | { "events","Termine" }, |
1182 | { "todos","Todos" }, | 1182 | { "todos","Todos" }, |
1183 | { "journals","Journale" }, | 1183 | { "journals","Journale" }, |
1184 | { "public","öffentl." }, | 1184 | { "public","öffentl." }, |
1185 | { "private","privat" }, | 1185 | { "private","privat" }, |
1186 | { "confidential","vertraul." }, | 1186 | { "confidential","vertraul." }, |
1187 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, | 1187 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, |
1188 | { "Yesterday","Gestern" }, | 1188 | { "Yesterday","Gestern" }, |
1189 | { "Day after tomorrow","Übermorgen" }, | 1189 | { "Day after tomorrow","Übermorgen" }, |
1190 | { "Tomorrow","Morgen" }, | 1190 | { "Tomorrow","Morgen" }, |
1191 | { "Day before yesterday","Vorgestern" }, | 1191 | { "Day before yesterday","Vorgestern" }, |
1192 | { "Size %1","Größe %1" }, | 1192 | { "Size %1","Größe %1" }, |
1193 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1193 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1194 | { " (%1 y.)"," (%1 J.)" }, | 1194 | { " (%1 y.)"," (%1 J.)" }, |
1195 | { "Allday:","Ganztägig:" }, | 1195 | { "Allday:","Ganztägig:" }, |
1196 | { "compl.todos","erled.Todos" }, | 1196 | { "compl.todos","erled.Todos" }, |
1197 | { "Day view","Tagesansicht" }, | 1197 | { "Day view","Tagesansicht" }, |
1198 | { "Next days","Nächste Tage" }, | 1198 | { "Next days","Nächste Tage" }, |
1199 | { "Next week","Nächste Woche" }, | 1199 | { "Next week","Nächste Woche" }, |
1200 | { "Next two weeks","Nächste zwei Wochen" }, | 1200 | { "Next two weeks","Nächste zwei Wochen" }, |
1201 | { "Next month","Nächster Monat" }, | 1201 | { "Next month","Nächster Monat" }, |
1202 | { "Journal view","Journal" }, | 1202 | { "Journal view","Journal" }, |
1203 | { "Display all opened","Zeige alle geöffnet" }, | 1203 | { "Display all opened","Zeige alle geöffnet" }, |
1204 | { "Display all closed","Zeige alle geschlossen" }, | 1204 | { "Display all closed","Zeige alle geschlossen" }, |
1205 | { "Display all flat","Zeige alle flach" }, | 1205 | { "Display all flat","Zeige alle flach" }, |
1206 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1206 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1207 | { "","" }, | 1207 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1208 | { "","" }, | 1208 | { "","" }, |
1209 | { "","" }, | 1209 | { "","" }, |
1210 | { "","" }, | 1210 | { "","" }, |
1211 | { "","" }, | 1211 | { "","" }, |
1212 | { "","" }, | 1212 | { "","" }, |
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index ee9f39a..a05c60e 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -33,132 +33,140 @@ | |||
33 | #include <klocale.h> | 33 | #include <klocale.h> |
34 | #ifndef DESKTOP_VERSION | 34 | #ifndef DESKTOP_VERSION |
35 | #include <qpe/qpeapplication.h> | 35 | #include <qpe/qpeapplication.h> |
36 | #define AGENDA_ICON_SIZE 5 | 36 | #define AGENDA_ICON_SIZE 5 |
37 | #else | 37 | #else |
38 | #define AGENDA_ICON_SIZE 7 | 38 | #define AGENDA_ICON_SIZE 7 |
39 | #endif | 39 | #endif |
40 | #include <libkcal/icaldrag.h> | 40 | #include <libkcal/icaldrag.h> |
41 | #include <libkcal/vcaldrag.h> | 41 | #include <libkcal/vcaldrag.h> |
42 | #include <libkcal/kincidenceformatter.h> | 42 | #include <libkcal/kincidenceformatter.h> |
43 | extern int globalFlagBlockAgenda; | 43 | extern int globalFlagBlockAgenda; |
44 | extern int globalFlagBlockAgendaItemPaint; | 44 | extern int globalFlagBlockAgendaItemPaint; |
45 | extern int globalFlagBlockAgendaItemUpdate; | 45 | extern int globalFlagBlockAgendaItemUpdate; |
46 | 46 | ||
47 | #include "koprefs.h" | 47 | #include "koprefs.h" |
48 | 48 | ||
49 | #include "koagendaitem.h" | 49 | #include "koagendaitem.h" |
50 | //#include "koagendaitem.moc" | 50 | //#include "koagendaitem.moc" |
51 | 51 | ||
52 | 52 | ||
53 | //-------------------------------------------------------------------------- | 53 | //-------------------------------------------------------------------------- |
54 | 54 | ||
55 | QToolTipGroup *KOAgendaItem::mToolTipGroup = 0; | 55 | QToolTipGroup *KOAgendaItem::mToolTipGroup = 0; |
56 | 56 | ||
57 | //-------------------------------------------------------------------------- | 57 | //-------------------------------------------------------------------------- |
58 | 58 | ||
59 | KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday, | 59 | KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday, |
60 | const char *name,WFlags) : | 60 | const char *name,WFlags) : |
61 | QWidget(parent, name), mIncidence(incidence), mDate(qd) | 61 | QWidget(parent, name), mIncidence(incidence), mDate(qd) |
62 | { | 62 | { |
63 | #ifndef DESKTOP_VERSION | 63 | #ifndef DESKTOP_VERSION |
64 | QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); | 64 | QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); |
65 | #endif | 65 | #endif |
66 | int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase | 66 | int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase |
67 | setWFlags ( wflags); | 67 | setWFlags ( wflags); |
68 | mAllDay = allday; | 68 | mAllDay = allday; |
69 | init ( incidence, qd ); | 69 | init ( incidence, qd ); |
70 | setMouseTracking(true); | 70 | setMouseTracking(true); |
71 | //setAcceptDrops(true); | 71 | //setAcceptDrops(true); |
72 | xPaintCoord = -1; | 72 | xPaintCoord = -1; |
73 | yPaintCoord = -1; | 73 | yPaintCoord = -1; |
74 | } | 74 | } |
75 | 75 | ||
76 | void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | 76 | void KOAgendaItem::init ( Incidence *incidence, QDate qd ) |
77 | { | 77 | { |
78 | mIncidence = incidence; | 78 | mIncidence = incidence; |
79 | mDate = qd; | 79 | mDate = qd; |
80 | mFirstMultiItem = 0; | 80 | mFirstMultiItem = 0; |
81 | mNextMultiItem = 0; | 81 | mNextMultiItem = 0; |
82 | mLastMultiItem = 0; | 82 | mLastMultiItem = 0; |
83 | computeText(); | 83 | computeText(); |
84 | 84 | ||
85 | if ( (incidence->type() == "Todo") && | 85 | if ( (incidence->type() == "Todo") && |
86 | ( !((static_cast<Todo*>(incidence))->isCompleted()) && | 86 | ( !((static_cast<Todo*>(incidence))->isCompleted()) && |
87 | ((static_cast<Todo*>(incidence))->dtDue().date() <= QDate::currentDate()) ) ) { | 87 | ((static_cast<Todo*>(incidence))->dtDue().date() <= QDate::currentDate()) ) ) { |
88 | if ( (static_cast<Todo*>(incidence))->dtDue() < QDateTime::currentDateTime().date()) | 88 | if ( (static_cast<Todo*>(incidence))->dtDue() < QDateTime::currentDateTime().date()) |
89 | mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ; | 89 | mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ; |
90 | else | 90 | else |
91 | mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor; | 91 | mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor; |
92 | } | 92 | } |
93 | else { | 93 | else { |
94 | QStringList categories = mIncidence->categories(); | 94 | QStringList categories = mIncidence->categories(); |
95 | QString cat = categories.first(); | 95 | QString cat = categories.first(); |
96 | if (cat.isEmpty()) { | 96 | if (cat.isEmpty()) { |
97 | mBackgroundColor =KOPrefs::instance()->mEventColor; | 97 | if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) |
98 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; | ||
99 | else | ||
100 | mBackgroundColor =KOPrefs::instance()->mEventColor; | ||
98 | } else { | 101 | } else { |
99 | mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); | 102 | mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); |
103 | if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) { | ||
104 | if ( mBackgroundColor == KOPrefs::instance()->mEventColor ) | ||
105 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; | ||
106 | } | ||
100 | } | 107 | } |
108 | |||
101 | } | 109 | } |
102 | mColorGroup = QColorGroup( mBackgroundColor.light(), | 110 | mColorGroup = QColorGroup( mBackgroundColor.light(), |
103 | mBackgroundColor.dark(),mBackgroundColor.light(), | 111 | mBackgroundColor.dark(),mBackgroundColor.light(), |
104 | mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ; | 112 | mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ; |
105 | setBackgroundColor( mBackgroundColor ); | 113 | setBackgroundColor( mBackgroundColor ); |
106 | 114 | ||
107 | setCellXY(0,0,1); | 115 | setCellXY(0,0,1); |
108 | setCellXWidth(0); | 116 | setCellXWidth(0); |
109 | setSubCell(0); | 117 | setSubCell(0); |
110 | setSubCells(1); | 118 | setSubCells(1); |
111 | setMultiItem(0,0,0); | 119 | setMultiItem(0,0,0); |
112 | startMove(); | 120 | startMove(); |
113 | mSelected = true; | 121 | mSelected = true; |
114 | select(false); | 122 | select(false); |
115 | QFontMetrics fontinf(KOPrefs::instance()->mAgendaViewFont); | 123 | QFontMetrics fontinf(KOPrefs::instance()->mAgendaViewFont); |
116 | mFontPixelSize = fontinf.height();; | 124 | mFontPixelSize = fontinf.height();; |
117 | hide(); | 125 | hide(); |
118 | xPaintCoord = -1; | 126 | xPaintCoord = -1; |
119 | yPaintCoord = -1; | 127 | yPaintCoord = -1; |
120 | } | 128 | } |
121 | 129 | ||
122 | 130 | ||
123 | KOAgendaItem::~KOAgendaItem() | 131 | KOAgendaItem::~KOAgendaItem() |
124 | { | 132 | { |
125 | // qDebug("deleteKOAgendaItem::~KOAgendaItem( "); | 133 | // qDebug("deleteKOAgendaItem::~KOAgendaItem( "); |
126 | 134 | ||
127 | } | 135 | } |
128 | 136 | ||
129 | void KOAgendaItem::recreateIncidence() | 137 | void KOAgendaItem::recreateIncidence() |
130 | { | 138 | { |
131 | #if 0 | 139 | #if 0 |
132 | Incidence* newInc = mIncidence->clone(); | 140 | Incidence* newInc = mIncidence->clone(); |
133 | newInc->recreate(); | 141 | newInc->recreate(); |
134 | if ( mIncidence->doesRecur() ) { | 142 | if ( mIncidence->doesRecur() ) { |
135 | mIncidence->addExDate( mDate ); | 143 | mIncidence->addExDate( mDate ); |
136 | newInc->recurrence()->unsetRecurs(); | 144 | newInc->recurrence()->unsetRecurs(); |
137 | int len = mIncidence->dtStart().secsTo( ((Event*)mIncidence)->dtEnd()); | 145 | int len = mIncidence->dtStart().secsTo( ((Event*)mIncidence)->dtEnd()); |
138 | QTime tim = mIncidence->dtStart().time(); | 146 | QTime tim = mIncidence->dtStart().time(); |
139 | newInc->setDtStart( QDateTime(mDate, tim) ); | 147 | newInc->setDtStart( QDateTime(mDate, tim) ); |
140 | ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); | 148 | ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); |
141 | } | 149 | } |
142 | #endif | 150 | #endif |
143 | mIncidence = mIncidence->recreateCloneException( mDate ); | 151 | mIncidence = mIncidence->recreateCloneException( mDate ); |
144 | } | 152 | } |
145 | bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) | 153 | bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) |
146 | { | 154 | { |
147 | int size = AGENDA_ICON_SIZE; | 155 | int size = AGENDA_ICON_SIZE; |
148 | 156 | ||
149 | int yOff = 0; | 157 | int yOff = 0; |
150 | int xOff = 0; | 158 | int xOff = 0; |
151 | int x = pos().x() +3; | 159 | int x = pos().x() +3; |
152 | int y; | 160 | int y; |
153 | if ( mAllDay ) | 161 | if ( mAllDay ) |
154 | y = pos().y()+3; | 162 | y = pos().y()+3; |
155 | else | 163 | else |
156 | y = mCellYTop * ( height() / cellHeight() ) +3; | 164 | y = mCellYTop * ( height() / cellHeight() ) +3; |
157 | if (mIncidence->cancelled()) { | 165 | if (mIncidence->cancelled()) { |
158 | int xpos = xOff*( 1 +AGENDA_ICON_SIZE )+x; | 166 | int xpos = xOff*( 1 +AGENDA_ICON_SIZE )+x; |
159 | int ypos = yOff*( 1 +AGENDA_ICON_SIZE)+y; | 167 | int ypos = yOff*( 1 +AGENDA_ICON_SIZE)+y; |
160 | p->drawLine( xpos, ypos, xpos+AGENDA_ICON_SIZE-1, ypos+AGENDA_ICON_SIZE-1 ); | 168 | p->drawLine( xpos, ypos, xpos+AGENDA_ICON_SIZE-1, ypos+AGENDA_ICON_SIZE-1 ); |
161 | p->drawLine( xpos, ypos+AGENDA_ICON_SIZE-1, xpos+AGENDA_ICON_SIZE-1, ypos ); | 169 | p->drawLine( xpos, ypos+AGENDA_ICON_SIZE-1, xpos+AGENDA_ICON_SIZE-1, ypos ); |
162 | if ( horLayout ) | 170 | if ( horLayout ) |
163 | ++xOff; | 171 | ++xOff; |
164 | else | 172 | else |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 32cc291..0548f14 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -136,128 +136,129 @@ KOPrefs::KOPrefs() : | |||
136 | addItemInt("Mail Client",&mMailClient,MailClientKMail); | 136 | addItemInt("Mail Client",&mMailClient,MailClientKMail); |
137 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); | 137 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); |
138 | addItemBool("Bcc",&mBcc,false); | 138 | addItemBool("Bcc",&mBcc,false); |
139 | 139 | ||
140 | KPrefs::setCurrentGroup("Time & Date"); | 140 | KPrefs::setCurrentGroup("Time & Date"); |
141 | 141 | ||
142 | 142 | ||
143 | addItemInt("Default Start Time",&mStartTime,10); | 143 | addItemInt("Default Start Time",&mStartTime,10); |
144 | addItemInt("Default Duration",&mDefaultDuration,2); | 144 | addItemInt("Default Duration",&mDefaultDuration,2); |
145 | addItemInt("Default Alarm Time",&mAlarmTime,3); | 145 | addItemInt("Default Alarm Time",&mAlarmTime,3); |
146 | KPrefs::setCurrentGroup("AlarmSettings"); | 146 | KPrefs::setCurrentGroup("AlarmSettings"); |
147 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); | 147 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); |
148 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); | 148 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); |
149 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); | 149 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); |
150 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); | 150 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); |
151 | 151 | ||
152 | 152 | ||
153 | KPrefs::setCurrentGroup("Calendar"); | 153 | KPrefs::setCurrentGroup("Calendar"); |
154 | 154 | ||
155 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); | 155 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); |
156 | 156 | ||
157 | KPrefs::setCurrentGroup("Fonts"); | 157 | KPrefs::setCurrentGroup("Fonts"); |
158 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); | 158 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); |
159 | addItemFont("TimeBar Font",&mTimeBarFont); | 159 | addItemFont("TimeBar Font",&mTimeBarFont); |
160 | addItemFont("MonthView Font",&mMonthViewFont); | 160 | addItemFont("MonthView Font",&mMonthViewFont); |
161 | addItemFont("AgendaView Font",&mAgendaViewFont); | 161 | addItemFont("AgendaView Font",&mAgendaViewFont); |
162 | addItemFont("MarcusBains Font",&mMarcusBainsFont); | 162 | addItemFont("MarcusBains Font",&mMarcusBainsFont); |
163 | addItemFont("TimeLabels Font",&mTimeLabelsFont); | 163 | addItemFont("TimeLabels Font",&mTimeLabelsFont); |
164 | addItemFont("TodoView Font",&mTodoViewFont); | 164 | addItemFont("TodoView Font",&mTodoViewFont); |
165 | addItemFont("ListView Font",&mListViewFont); | 165 | addItemFont("ListView Font",&mListViewFont); |
166 | addItemFont("DateNavigator Font",&mDateNavigatorFont); | 166 | addItemFont("DateNavigator Font",&mDateNavigatorFont); |
167 | addItemFont("EditBox Font",&mEditBoxFont); | 167 | addItemFont("EditBox Font",&mEditBoxFont); |
168 | addItemFont("JournalView Font",&mJornalViewFont); | 168 | addItemFont("JournalView Font",&mJornalViewFont); |
169 | addItemFont("WhatsNextView Font",&mWhatsNextFont); | 169 | addItemFont("WhatsNextView Font",&mWhatsNextFont); |
170 | addItemFont("EventView Font",&mEventViewFont); | 170 | addItemFont("EventView Font",&mEventViewFont); |
171 | 171 | ||
172 | KPrefs::setCurrentGroup("RemoteSyncing"); | 172 | KPrefs::setCurrentGroup("RemoteSyncing"); |
173 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); | 173 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); |
174 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); | 174 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); |
175 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); | 175 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); |
176 | addItemInt("LastSyncTime",&mLastSyncTime,0); | 176 | addItemInt("LastSyncTime",&mLastSyncTime,0); |
177 | 177 | ||
178 | #ifdef _WIN32_ | 178 | #ifdef _WIN32_ |
179 | QString hdp= locateLocal("data","korganizer")+"\\\\"; | 179 | QString hdp= locateLocal("data","korganizer")+"\\\\"; |
180 | #else | 180 | #else |
181 | QString hdp= locateLocal("data","korganizer")+"/"; | 181 | QString hdp= locateLocal("data","korganizer")+"/"; |
182 | #endif | 182 | #endif |
183 | 183 | ||
184 | KPrefs::setCurrentGroup("LoadSaveFileNames"); | 184 | KPrefs::setCurrentGroup("LoadSaveFileNames"); |
185 | 185 | ||
186 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); | 186 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); |
187 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); | 187 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); |
188 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); | 188 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); |
189 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); | 189 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); |
190 | 190 | ||
191 | 191 | ||
192 | KPrefs::setCurrentGroup("Locale"); | 192 | KPrefs::setCurrentGroup("Locale"); |
193 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 193 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
194 | 194 | ||
195 | 195 | ||
196 | KPrefs::setCurrentGroup("Colors"); | 196 | KPrefs::setCurrentGroup("Colors"); |
197 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); | 197 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); |
198 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); | 198 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); |
199 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); | 199 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); |
200 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); | ||
200 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); | 201 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); |
201 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); | 202 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); |
202 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); | 203 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); |
203 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); | 204 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); |
204 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); | 205 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); |
205 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); | 206 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); |
206 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); | 207 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); |
207 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); | 208 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); |
208 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); | 209 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); |
209 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); | 210 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); |
210 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); | 211 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); |
211 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); | 212 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); |
212 | addItemBool("UseAppColors",&mUseAppColors,false); | 213 | addItemBool("UseAppColors",&mUseAppColors,false); |
213 | 214 | ||
214 | 215 | ||
215 | 216 | ||
216 | KPrefs::setCurrentGroup("Views"); | 217 | KPrefs::setCurrentGroup("Views"); |
217 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); | 218 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); |
218 | addItemInt("Hour Size",&mHourSize,8); | 219 | addItemInt("Hour Size",&mHourSize,8); |
219 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); | 220 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); |
220 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); | 221 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); |
221 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); | 222 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); |
222 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); | 223 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); |
223 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); | 224 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); |
224 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); | 225 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); |
225 | #ifdef DESKTOP_VERION | 226 | #ifdef DESKTOP_VERION |
226 | addItemBool("Enable ToolTips",&mEnableToolTips,true); | 227 | addItemBool("Enable ToolTips",&mEnableToolTips,true); |
227 | #else | 228 | #else |
228 | addItemBool("Enable ToolTips",&mEnableToolTips,false); | 229 | addItemBool("Enable ToolTips",&mEnableToolTips,false); |
229 | #endif | 230 | #endif |
230 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); | 231 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); |
231 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); | 232 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); |
232 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); | 233 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); |
233 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); | 234 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); |
234 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); | 235 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); |
235 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); | 236 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); |
236 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); | 237 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); |
237 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); | 238 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); |
238 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); | 239 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); |
239 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; | 240 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; |
240 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); | 241 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); |
241 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); | 242 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); |
242 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); | 243 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); |
243 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); | 244 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); |
244 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); | 245 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); |
245 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); | 246 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); |
246 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false); | 247 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false); |
247 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); | 248 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); |
248 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); | 249 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); |
249 | #ifdef DESKTOP_VERSION | 250 | #ifdef DESKTOP_VERSION |
250 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); | 251 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); |
251 | #else | 252 | #else |
252 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); | 253 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); |
253 | #endif | 254 | #endif |
254 | addItemInt("Day Begins",&mDayBegins,7); | 255 | addItemInt("Day Begins",&mDayBegins,7); |
255 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); | 256 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); |
256 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); | 257 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); |
257 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); | 258 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); |
258 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); | 259 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); |
259 | 260 | ||
260 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); | 261 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); |
261 | addItemBool("Full View Month",&mFullViewMonth,true); | 262 | addItemBool("Full View Month",&mFullViewMonth,true); |
262 | addItemBool("Full View Todo",&mFullViewTodo,true); | 263 | addItemBool("Full View Todo",&mFullViewTodo,true); |
263 | addItemBool("Quick Todo",&mEnableQuickTodo,false); | 264 | addItemBool("Quick Todo",&mEnableQuickTodo,false); |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index b3acda7..8b849fa 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -62,128 +62,129 @@ class KOPrefs : public KPimPrefs | |||
62 | void setTimeZoneIdDefault(); | 62 | void setTimeZoneIdDefault(); |
63 | 63 | ||
64 | /** Fill empty mail fields with default values. */ | 64 | /** Fill empty mail fields with default values. */ |
65 | void fillMailDefaults(); | 65 | void fillMailDefaults(); |
66 | 66 | ||
67 | private: | 67 | private: |
68 | /** Constructor disabled for public. Use instance() to create a KOPrefs | 68 | /** Constructor disabled for public. Use instance() to create a KOPrefs |
69 | object. */ | 69 | object. */ |
70 | KOPrefs(); | 70 | KOPrefs(); |
71 | 71 | ||
72 | static KOPrefs *mInstance; | 72 | static KOPrefs *mInstance; |
73 | QStringList getDefaultList(); | 73 | QStringList getDefaultList(); |
74 | public: | 74 | public: |
75 | // preferences data | 75 | // preferences data |
76 | KConfig* getConfig(); | 76 | KConfig* getConfig(); |
77 | void setFullName(const QString &); | 77 | void setFullName(const QString &); |
78 | QString fullName(); | 78 | QString fullName(); |
79 | void setEmail(const QString &); | 79 | void setEmail(const QString &); |
80 | QString email(); | 80 | QString email(); |
81 | 81 | ||
82 | QString mAdditional; | 82 | QString mAdditional; |
83 | 83 | ||
84 | bool mEmailControlCenter; | 84 | bool mEmailControlCenter; |
85 | 85 | ||
86 | bool mBcc; | 86 | bool mBcc; |
87 | bool mAutoSave; | 87 | bool mAutoSave; |
88 | int mAutoSaveInterval; | 88 | int mAutoSaveInterval; |
89 | bool mConfirm; | 89 | bool mConfirm; |
90 | 90 | ||
91 | bool mEnableGroupScheduling; | 91 | bool mEnableGroupScheduling; |
92 | bool mEnableProjectView; | 92 | bool mEnableProjectView; |
93 | 93 | ||
94 | int mDefaultFormat; | 94 | int mDefaultFormat; |
95 | int mMailClient; | 95 | int mMailClient; |
96 | 96 | ||
97 | int mStartTime; | 97 | int mStartTime; |
98 | int mDefaultDuration; | 98 | int mDefaultDuration; |
99 | int mAlarmTime; | 99 | int mAlarmTime; |
100 | 100 | ||
101 | int mWorkingHoursStart; | 101 | int mWorkingHoursStart; |
102 | int mWorkingHoursEnd; | 102 | int mWorkingHoursEnd; |
103 | bool mExcludeHolidays; | 103 | bool mExcludeHolidays; |
104 | bool mExcludeSaturdays; | 104 | bool mExcludeSaturdays; |
105 | bool mMarcusBainsShowSeconds; | 105 | bool mMarcusBainsShowSeconds; |
106 | 106 | ||
107 | QFont mTimeBarFont; | 107 | QFont mTimeBarFont; |
108 | QFont mMonthViewFont; | 108 | QFont mMonthViewFont; |
109 | QFont mAgendaViewFont; | 109 | QFont mAgendaViewFont; |
110 | QFont mMarcusBainsFont; | 110 | QFont mMarcusBainsFont; |
111 | QFont mTimeLabelsFont; | 111 | QFont mTimeLabelsFont; |
112 | QFont mTodoViewFont; | 112 | QFont mTodoViewFont; |
113 | QFont mListViewFont; | 113 | QFont mListViewFont; |
114 | QFont mDateNavigatorFont; | 114 | QFont mDateNavigatorFont; |
115 | QFont mEditBoxFont; | 115 | QFont mEditBoxFont; |
116 | QFont mJornalViewFont; | 116 | QFont mJornalViewFont; |
117 | QFont mWhatsNextFont; | 117 | QFont mWhatsNextFont; |
118 | QFont mEventViewFont; | 118 | QFont mEventViewFont; |
119 | 119 | ||
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | QColor mHolidayColor; | 123 | QColor mHolidayColor; |
124 | QColor mHighlightColor; | 124 | QColor mHighlightColor; |
125 | QColor mEventColor; | 125 | QColor mEventColor; |
126 | QColor mTodoDoneColor; | ||
126 | QColor mAgendaBgColor; | 127 | QColor mAgendaBgColor; |
127 | QColor mWorkingHoursColor; | 128 | QColor mWorkingHoursColor; |
128 | QColor mTodoDueTodayColor; | 129 | QColor mTodoDueTodayColor; |
129 | QColor mTodoOverdueColor; | 130 | QColor mTodoOverdueColor; |
130 | QColor mMonthViewEvenColor; | 131 | QColor mMonthViewEvenColor; |
131 | QColor mMonthViewOddColor; | 132 | QColor mMonthViewOddColor; |
132 | QColor mMonthViewHolidayColor; | 133 | QColor mMonthViewHolidayColor; |
133 | bool mMonthViewUsesDayColors; | 134 | bool mMonthViewUsesDayColors; |
134 | bool mMonthViewSatSunTog; | 135 | bool mMonthViewSatSunTog; |
135 | QColor mAppColor1; | 136 | QColor mAppColor1; |
136 | QColor mAppColor2; | 137 | QColor mAppColor2; |
137 | bool mUseAppColors; | 138 | bool mUseAppColors; |
138 | 139 | ||
139 | int mDayBegins; | 140 | int mDayBegins; |
140 | int mHourSize; | 141 | int mHourSize; |
141 | int mAllDaySize; | 142 | int mAllDaySize; |
142 | bool mShowFullMenu; | 143 | bool mShowFullMenu; |
143 | bool mDailyRecur; | 144 | bool mDailyRecur; |
144 | bool mWeeklyRecur; | 145 | bool mWeeklyRecur; |
145 | bool mMonthDailyRecur; | 146 | bool mMonthDailyRecur; |
146 | bool mMonthWeeklyRecur; | 147 | bool mMonthWeeklyRecur; |
147 | bool mMonthShowIcons; | 148 | bool mMonthShowIcons; |
148 | bool mMonthShowShort; | 149 | bool mMonthShowShort; |
149 | bool mEnableToolTips; | 150 | bool mEnableToolTips; |
150 | bool mEnableMonthScroll; | 151 | bool mEnableMonthScroll; |
151 | bool mFullViewMonth; | 152 | bool mFullViewMonth; |
152 | bool mMonthViewUsesCategoryColor; | 153 | bool mMonthViewUsesCategoryColor; |
153 | bool mFullViewTodo; | 154 | bool mFullViewTodo; |
154 | bool mShowCompletedTodo; | 155 | bool mShowCompletedTodo; |
155 | bool mMarcusBainsEnabled; | 156 | bool mMarcusBainsEnabled; |
156 | int mNextXDays; | 157 | int mNextXDays; |
157 | int mWhatsNextDays; | 158 | int mWhatsNextDays; |
158 | int mWhatsNextPrios; | 159 | int mWhatsNextPrios; |
159 | bool mEnableQuickTodo; | 160 | bool mEnableQuickTodo; |
160 | 161 | ||
161 | bool mCompactDialogs; | 162 | bool mCompactDialogs; |
162 | bool mVerticalScreen; | 163 | bool mVerticalScreen; |
163 | 164 | ||
164 | bool mShowIconNewTodo; | 165 | bool mShowIconNewTodo; |
165 | bool mShowIconNewEvent; | 166 | bool mShowIconNewEvent; |
166 | bool mShowIconSearch; | 167 | bool mShowIconSearch; |
167 | bool mShowIconList; | 168 | bool mShowIconList; |
168 | bool mShowIconDay1; | 169 | bool mShowIconDay1; |
169 | bool mShowIconDay5; | 170 | bool mShowIconDay5; |
170 | bool mShowIconDay7; | 171 | bool mShowIconDay7; |
171 | bool mShowIconMonth; | 172 | bool mShowIconMonth; |
172 | bool mShowIconTodoview; | 173 | bool mShowIconTodoview; |
173 | bool mShowIconBackFast; | 174 | bool mShowIconBackFast; |
174 | bool mShowIconBack; | 175 | bool mShowIconBack; |
175 | bool mShowIconToday; | 176 | bool mShowIconToday; |
176 | bool mShowIconForward; | 177 | bool mShowIconForward; |
177 | bool mShowIconForwardFast; | 178 | bool mShowIconForwardFast; |
178 | bool mShowIconWhatsThis; | 179 | bool mShowIconWhatsThis; |
179 | bool mShowIconNextDays; | 180 | bool mShowIconNextDays; |
180 | bool mShowIconNext; | 181 | bool mShowIconNext; |
181 | bool mShowIconJournal; | 182 | bool mShowIconJournal; |
182 | 183 | ||
183 | bool mShowIconStretch; | 184 | bool mShowIconStretch; |
184 | 185 | ||
185 | bool mToolBarHor; | 186 | bool mToolBarHor; |
186 | bool mToolBarUp; | 187 | bool mToolBarUp; |
187 | bool mToolBarMiniIcons; | 188 | bool mToolBarMiniIcons; |
188 | 189 | ||
189 | bool mAskForQuit; | 190 | bool mAskForQuit; |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 1b24f56..580dff2 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -1115,128 +1115,134 @@ void KOPrefsDialog::setupFontsTab() | |||
1115 | topLayout->addWidget(tVFont->preview(),i,1); | 1115 | topLayout->addWidget(tVFont->preview(),i,1); |
1116 | topLayout->addWidget(tVFont->button(),i,2); | 1116 | topLayout->addWidget(tVFont->button(),i,2); |
1117 | ++i; | 1117 | ++i; |
1118 | 1118 | ||
1119 | 1119 | ||
1120 | 1120 | ||
1121 | 1121 | ||
1122 | topLayout->setColStretch(1,1); | 1122 | topLayout->setColStretch(1,1); |
1123 | topLayout->setRowStretch(4,1); | 1123 | topLayout->setRowStretch(4,1); |
1124 | 1124 | ||
1125 | 1125 | ||
1126 | 1126 | ||
1127 | 1127 | ||
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | void KOPrefsDialog::setupColorsTab() | 1130 | void KOPrefsDialog::setupColorsTab() |
1131 | { | 1131 | { |
1132 | QFrame *topFrame = addPage(i18n("Colors"),0,0); | 1132 | QFrame *topFrame = addPage(i18n("Colors"),0,0); |
1133 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1133 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1134 | 1134 | ||
1135 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1135 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1136 | // topLayout->setSpacing(spacingHint()); | 1136 | // topLayout->setSpacing(spacingHint()); |
1137 | // topLayout->setMargin(marginHint()); | 1137 | // topLayout->setMargin(marginHint()); |
1138 | 1138 | ||
1139 | topLayout->setSpacing(2); | 1139 | topLayout->setSpacing(2); |
1140 | topLayout->setMargin(3); | 1140 | topLayout->setMargin(3); |
1141 | 1141 | ||
1142 | int ii = 1; | 1142 | int ii = 1; |
1143 | QGroupBox *categoryGroup ; | 1143 | QGroupBox *categoryGroup ; |
1144 | 1144 | ||
1145 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), | 1145 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), |
1146 | topFrame); | 1146 | topFrame); |
1147 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); | 1147 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); |
1148 | 1148 | ||
1149 | mCategoryCombo = new QComboBox(categoryGroup); | 1149 | mCategoryCombo = new QComboBox(categoryGroup); |
1150 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1150 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1151 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); | 1151 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); |
1152 | 1152 | ||
1153 | mCategoryButton = new KColorButton(categoryGroup); | 1153 | mCategoryButton = new KColorButton(categoryGroup); |
1154 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); | 1154 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); |
1155 | updateCategoryColor(); | 1155 | updateCategoryColor(); |
1156 | 1156 | ||
1157 | 1157 | ||
1158 | // Holiday Color | 1158 | // Holiday Color |
1159 | 1159 | ||
1160 | KPrefsDialogWidColor *holidayColor = | 1160 | KPrefsDialogWidColor *holidayColor = |
1161 | addWidColor(i18n("Holiday color:"), | 1161 | addWidColor(i18n("Holiday color:"), |
1162 | &(KOPrefs::instance()->mHolidayColor),topFrame); | 1162 | &(KOPrefs::instance()->mHolidayColor),topFrame); |
1163 | topLayout->addWidget(holidayColor->label(),ii,0); | 1163 | topLayout->addWidget(holidayColor->label(),ii,0); |
1164 | topLayout->addWidget(holidayColor->button(),ii++,1); | 1164 | topLayout->addWidget(holidayColor->button(),ii++,1); |
1165 | 1165 | ||
1166 | // Highlight Color | 1166 | // Highlight Color |
1167 | KPrefsDialogWidColor *highlightColor = | 1167 | KPrefsDialogWidColor *highlightColor = |
1168 | addWidColor(i18n("Highlight color:"), | 1168 | addWidColor(i18n("Highlight color:"), |
1169 | &(KOPrefs::instance()->mHighlightColor),topFrame); | 1169 | &(KOPrefs::instance()->mHighlightColor),topFrame); |
1170 | topLayout->addWidget(highlightColor->label(),ii,0); | 1170 | topLayout->addWidget(highlightColor->label(),ii,0); |
1171 | topLayout->addWidget(highlightColor->button(),ii++,1); | 1171 | topLayout->addWidget(highlightColor->button(),ii++,1); |
1172 | 1172 | ||
1173 | // Event color | 1173 | // Event color |
1174 | KPrefsDialogWidColor *eventColor = | 1174 | KPrefsDialogWidColor *eventColor = |
1175 | addWidColor(i18n("Default event color:"), | 1175 | addWidColor(i18n("Default event color:"), |
1176 | &(KOPrefs::instance()->mEventColor),topFrame); | 1176 | &(KOPrefs::instance()->mEventColor),topFrame); |
1177 | topLayout->addWidget(eventColor->label(),ii,0); | 1177 | topLayout->addWidget(eventColor->label(),ii,0); |
1178 | topLayout->addWidget(eventColor->button(),ii++,1); | 1178 | topLayout->addWidget(eventColor->button(),ii++,1); |
1179 | eventColor = | ||
1180 | addWidColor(i18n("Default todo done color:"), | ||
1181 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); | ||
1182 | topLayout->addWidget(eventColor->label(),ii,0); | ||
1183 | topLayout->addWidget(eventColor->button(),ii++,1); | ||
1184 | |||
1179 | 1185 | ||
1180 | // agenda view background color | 1186 | // agenda view background color |
1181 | KPrefsDialogWidColor *agendaBgColor = | 1187 | KPrefsDialogWidColor *agendaBgColor = |
1182 | addWidColor(i18n("Agenda view background color:"), | 1188 | addWidColor(i18n("Agenda view background color:"), |
1183 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); | 1189 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); |
1184 | topLayout->addWidget(agendaBgColor->label(),ii,0); | 1190 | topLayout->addWidget(agendaBgColor->label(),ii,0); |
1185 | topLayout->addWidget(agendaBgColor->button(),ii++,1); | 1191 | topLayout->addWidget(agendaBgColor->button(),ii++,1); |
1186 | 1192 | ||
1187 | // working hours color | 1193 | // working hours color |
1188 | KPrefsDialogWidColor *workingHoursColor = | 1194 | KPrefsDialogWidColor *workingHoursColor = |
1189 | addWidColor(i18n("Working hours color:"), | 1195 | addWidColor(i18n("Working hours color:"), |
1190 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); | 1196 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); |
1191 | topLayout->addWidget(workingHoursColor->label(),ii,0); | 1197 | topLayout->addWidget(workingHoursColor->label(),ii,0); |
1192 | topLayout->addWidget(workingHoursColor->button(),ii++,1); | 1198 | topLayout->addWidget(workingHoursColor->button(),ii++,1); |
1193 | 1199 | ||
1194 | KPrefsDialogWidBool *sb = | 1200 | KPrefsDialogWidBool *sb = |
1195 | addWidBool(i18n("Use colors for application:"), | 1201 | addWidBool(i18n("Use colors for application:"), |
1196 | &(KOPrefs::instance()->mUseAppColors),topFrame); | 1202 | &(KOPrefs::instance()->mUseAppColors),topFrame); |
1197 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); | 1203 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); |
1198 | 1204 | ||
1199 | ii++; | 1205 | ii++; |
1200 | KPrefsDialogWidColor * workingHoursColor1 = | 1206 | KPrefsDialogWidColor * workingHoursColor1 = |
1201 | addWidColor(i18n("Buttons, menus, etc.:"), | 1207 | addWidColor(i18n("Buttons, menus, etc.:"), |
1202 | &(KOPrefs::instance()->mAppColor1),topFrame); | 1208 | &(KOPrefs::instance()->mAppColor1),topFrame); |
1203 | topLayout->addWidget(workingHoursColor1->label(),ii,0); | 1209 | topLayout->addWidget(workingHoursColor1->label(),ii,0); |
1204 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); | 1210 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); |
1205 | 1211 | ||
1206 | KPrefsDialogWidColor * workingHoursColor2 = | 1212 | KPrefsDialogWidColor * workingHoursColor2 = |
1207 | addWidColor(i18n("Frames, labels, etc.:"), | 1213 | addWidColor(i18n("Frames, labels, etc.:"), |
1208 | &(KOPrefs::instance()->mAppColor2),topFrame); | 1214 | &(KOPrefs::instance()->mAppColor2),topFrame); |
1209 | topLayout->addWidget(workingHoursColor2->label(),ii,0); | 1215 | topLayout->addWidget(workingHoursColor2->label(),ii,0); |
1210 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); | 1216 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); |
1211 | 1217 | ||
1212 | 1218 | ||
1213 | 1219 | ||
1214 | } | 1220 | } |
1215 | 1221 | ||
1216 | void KOPrefsDialog::setCategoryColor() | 1222 | void KOPrefsDialog::setCategoryColor() |
1217 | { | 1223 | { |
1218 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); | 1224 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); |
1219 | } | 1225 | } |
1220 | 1226 | ||
1221 | void KOPrefsDialog::updateCategoryColor() | 1227 | void KOPrefsDialog::updateCategoryColor() |
1222 | { | 1228 | { |
1223 | QString cat = mCategoryCombo->currentText(); | 1229 | QString cat = mCategoryCombo->currentText(); |
1224 | QColor *color = mCategoryDict.find(cat); | 1230 | QColor *color = mCategoryDict.find(cat); |
1225 | if (!color) { | 1231 | if (!color) { |
1226 | color = KOPrefs::instance()->categoryColor(cat); | 1232 | color = KOPrefs::instance()->categoryColor(cat); |
1227 | } | 1233 | } |
1228 | if (color) { | 1234 | if (color) { |
1229 | mCategoryButton->setColor(*color); | 1235 | mCategoryButton->setColor(*color); |
1230 | } | 1236 | } |
1231 | } | 1237 | } |
1232 | 1238 | ||
1233 | void KOPrefsDialog::setupPrinterTab() | 1239 | void KOPrefsDialog::setupPrinterTab() |
1234 | { | 1240 | { |
1235 | mPrinterTab = addPage(i18n("Printing"),0, | 1241 | mPrinterTab = addPage(i18n("Printing"),0, |
1236 | DesktopIcon("fileprint",KIcon::SizeMedium)); | 1242 | DesktopIcon("fileprint",KIcon::SizeMedium)); |
1237 | 1243 | ||
1238 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); | 1244 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); |
1239 | topLayout->setSpacing(spacingHint()); | 1245 | topLayout->setSpacing(spacingHint()); |
1240 | topLayout->setMargin(marginHint()); | 1246 | topLayout->setMargin(marginHint()); |
1241 | 1247 | ||
1242 | topLayout->setRowStretch(4,1); | 1248 | topLayout->setRowStretch(4,1); |