author | zautrix <zautrix> | 2005-02-18 09:36:33 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-18 09:36:33 (UTC) |
commit | 59a00e603e2ba14885e81c09daf3bb89859ff176 (patch) (unidiff) | |
tree | e257e5b0e338675c5448f9d4c57eadf68ed5e76b | |
parent | b1e885da3b0a083121f940485d9c0eea53ff5139 (diff) | |
download | kdepimpi-59a00e603e2ba14885e81c09daf3bb89859ff176.zip kdepimpi-59a00e603e2ba14885e81c09daf3bb89859ff176.tar.gz kdepimpi-59a00e603e2ba14885e81c09daf3bb89859ff176.tar.bz2 |
recur fixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 8 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 6 | ||||
-rw-r--r-- | libkcal/recurrence.cpp | 12 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 8 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 8 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmview.cpp | 2 |
6 files changed, 29 insertions, 15 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index ab6d220..58be545 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1263,30 +1263,38 @@ | |||
1263 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1263 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1264 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1264 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1265 | { "Writing file to disk...","Speichere Datei..." }, | 1265 | { "Writing file to disk...","Speichere Datei..." }, |
1266 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1266 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1267 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1267 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1268 | { "Synchronize!","Synchronisiere!" }, | 1268 | { "Synchronize!","Synchronisiere!" }, |
1269 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1269 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1270 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1270 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1271 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, | 1271 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, |
1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1274 | { "List week view","Listenwochenansicht" }, | 1274 | { "List week view","Listenwochenansicht" }, |
1275 | { "List week","Listenwochenansicht" }, | 1275 | { "List week","Listenwochenansicht" }, |
1276 | { "Next Week","Nächste Woche" }, | 1276 | { "Next Week","Nächste Woche" }, |
1277 | { "Previous Week","Vorherige Woche" }, | 1277 | { "Previous Week","Vorherige Woche" }, |
1278 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, | 1278 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, |
1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1280 | { "Details","Details" }, | 1280 | { "Details","Details" }, |
1281 | { "Created time","Erstellt Zeit" }, | 1281 | { "Created time","Erstellt Zeit" }, |
1282 | { "Last modified time","Geändert Zeit" }, | 1282 | { "Last modified time","Geändert Zeit" }, |
1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1284 | { "View Options","Anzeige Optionen" }, | 1284 | { "View Options","Anzeige Optionen" }, |
1285 | { "<b>Created: ","<b>Erstellt am: " }, | 1285 | { "<b>Created: ","<b>Erstellt am: " }, |
1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1287 | { "Journal: ","Journal: " }, | ||
1288 | { "yearly","jährlich" }, | ||
1289 | { "(%1) ","%1-" }, | ||
1290 | { "","" }, | ||
1291 | { "","" }, | ||
1292 | { "","" }, | ||
1293 | { "","" }, | ||
1294 | { "","" }, | ||
1287 | { "","" }, | 1295 | { "","" }, |
1288 | { "","" }, | 1296 | { "","" }, |
1289 | { "","" }, | 1297 | { "","" }, |
1290 | { "","" }, | 1298 | { "","" }, |
1291 | { "","" }, | 1299 | { "","" }, |
1292 | 1300 | ||
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 1f5afc0..4a6e17d 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -120,102 +120,102 @@ bool ListItemVisitor::visit(Event *e) | |||
120 | mItem->setText(2,e->dtStartTimeStr()); | 120 | mItem->setText(2,e->dtStartTimeStr()); |
121 | mItem->setText(3,end); | 121 | mItem->setText(3,end); |
122 | mItem->setText(4,e->dtEndTimeStr()); | 122 | mItem->setText(4,e->dtEndTimeStr()); |
123 | mItem->setText(5,e->isAlarmEnabled() ? i18n("Yes") : i18n("No")); | 123 | mItem->setText(5,e->isAlarmEnabled() ? i18n("Yes") : i18n("No")); |
124 | mItem->setText(6, e->recurrence()->recurrenceText()); | 124 | mItem->setText(6, e->recurrence()->recurrenceText()); |
125 | mItem->setText(7,"---"); | 125 | mItem->setText(7,"---"); |
126 | mItem->setText(8,"---"); | 126 | mItem->setText(8,"---"); |
127 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); | 127 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); |
128 | mItem->setText(10,e->categoriesStr()); | 128 | mItem->setText(10,e->categoriesStr()); |
129 | 129 | ||
130 | QString key; | 130 | QString key; |
131 | QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); | 131 | QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); |
132 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); | 132 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); |
133 | mItem->setSortKey(1,key); | 133 | mItem->setSortKey(1,key); |
134 | 134 | ||
135 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); | 135 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); |
136 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); | 136 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); |
137 | mItem->setSortKey(3,key); | 137 | mItem->setSortKey(3,key); |
138 | 138 | ||
139 | return true; | 139 | return true; |
140 | } | 140 | } |
141 | 141 | ||
142 | bool ListItemVisitor::visit(Todo *t) | 142 | bool ListItemVisitor::visit(Todo *t) |
143 | { | 143 | { |
144 | mItem->setText(0,i18n("To-Do: %1").arg(t->summary())); | 144 | mItem->setText(0,i18n("Todo: %1").arg(t->summary())); |
145 | if (t->hasStartDate()) { | 145 | if (t->hasStartDate()) { |
146 | mItem->setText(1,t->dtStartDateStr()); | 146 | mItem->setText(1,t->dtStartDateStr()); |
147 | if (t->doesFloat()) { | 147 | if (t->doesFloat()) { |
148 | mItem->setText(2,"---"); | 148 | mItem->setText(2,"---"); |
149 | } else { | 149 | } else { |
150 | mItem->setText(2,t->dtStartTimeStr()); | 150 | mItem->setText(2,t->dtStartTimeStr()); |
151 | } | 151 | } |
152 | } else { | 152 | } else { |
153 | mItem->setText(1,"---"); | 153 | mItem->setText(1,"---"); |
154 | mItem->setText(2,"---"); | 154 | mItem->setText(2,"---"); |
155 | } | 155 | } |
156 | mItem->setText(3,"---"); | 156 | mItem->setText(3,"---"); |
157 | mItem->setText(4,"---"); | 157 | mItem->setText(4,"---"); |
158 | mItem->setText(5,t->isAlarmEnabled() ? i18n("Yes") : i18n("No")); | 158 | mItem->setText(5,t->isAlarmEnabled() ? i18n("Yes") : i18n("No")); |
159 | mItem->setText(6, t->recurrence()->recurrenceText()); | 159 | mItem->setText(6, t->recurrence()->recurrenceText()); |
160 | if (t->hasDueDate()) { | 160 | if (t->hasDueDate()) { |
161 | mItem->setText(7,t->dtDueDateStr()); | 161 | mItem->setText(7,t->dtDueDateStr()); |
162 | if (t->doesFloat()) { | 162 | if (t->doesFloat()) { |
163 | mItem->setText(8,"---"); | 163 | mItem->setText(8,"---"); |
164 | } else { | 164 | } else { |
165 | mItem->setText(8,t->dtDueTimeStr()); | 165 | mItem->setText(8,t->dtDueTimeStr()); |
166 | } | 166 | } |
167 | } else { | 167 | } else { |
168 | mItem->setText(7,"---"); | 168 | mItem->setText(7,"---"); |
169 | mItem->setText(8,"---"); | 169 | mItem->setText(8,"---"); |
170 | } | 170 | } |
171 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); | 171 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); |
172 | mItem->setText(10,t->categoriesStr()); | 172 | mItem->setText(10,t->categoriesStr()); |
173 | 173 | ||
174 | QString key; | 174 | QString key; |
175 | QDate d; | 175 | QDate d; |
176 | if (t->hasDueDate()) { | 176 | if (t->hasDueDate()) { |
177 | d = t->dtDue().date(); | 177 | d = t->dtDue().date(); |
178 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); | 178 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); |
179 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 179 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
180 | mItem->setSortKey(7,key); | 180 | mItem->setSortKey(7,key); |
181 | } | 181 | } |
182 | if ( t->hasStartDate() ) { | 182 | if ( t->hasStartDate() ) { |
183 | d = t->dtStart().date(); | 183 | d = t->dtStart().date(); |
184 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); | 184 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); |
185 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 185 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
186 | mItem->setSortKey(1,key); | 186 | mItem->setSortKey(1,key); |
187 | } | 187 | } |
188 | return true; | 188 | return true; |
189 | } | 189 | } |
190 | 190 | ||
191 | bool ListItemVisitor::visit(Journal * j) | 191 | bool ListItemVisitor::visit(Journal * j) |
192 | { | 192 | { |
193 | QString des = j->description().left(50); | 193 | QString des = j->description().left(30); |
194 | des = des.simplifyWhiteSpace (); | 194 | des = des.simplifyWhiteSpace (); |
195 | des.replace (QRegExp ("\\n"),"" ); | 195 | des.replace (QRegExp ("\\n"),"" ); |
196 | des.replace (QRegExp ("\\r"),"" ); | 196 | des.replace (QRegExp ("\\r"),"" ); |
197 | mItem->setText(0,i18n("Journal")+": "+des.left(25)); | 197 | mItem->setText(0,i18n("Journal: ")+des.left(25)); |
198 | mItem->setText(1,j->dtStartDateStr()); | 198 | mItem->setText(1,j->dtStartDateStr()); |
199 | mItem->setText(2,"---"); | 199 | mItem->setText(2,"---"); |
200 | mItem->setText(3,"---"); | 200 | mItem->setText(3,"---"); |
201 | mItem->setText(4,"---"); | 201 | mItem->setText(4,"---"); |
202 | mItem->setText(5,"---"); | 202 | mItem->setText(5,"---"); |
203 | mItem->setText(6,"---"); | 203 | mItem->setText(6,"---"); |
204 | mItem->setText(7,j->dtStartDateStr()); | 204 | mItem->setText(7,j->dtStartDateStr()); |
205 | mItem->setText(8,"---"); | 205 | mItem->setText(8,"---"); |
206 | mItem->setText(9,"---"); | 206 | mItem->setText(9,"---"); |
207 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); | 207 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); |
208 | 208 | ||
209 | QString key; | 209 | QString key; |
210 | QDate d = j->dtStart().date(); | 210 | QDate d = j->dtStart().date(); |
211 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 211 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
212 | mItem->setSortKey(1,key); | 212 | mItem->setSortKey(1,key); |
213 | mItem->setSortKey(7,key); | 213 | mItem->setSortKey(7,key); |
214 | 214 | ||
215 | return true; | 215 | return true; |
216 | } | 216 | } |
217 | 217 | ||
218 | KOListView::KOListView(Calendar *calendar, QWidget *parent, | 218 | KOListView::KOListView(Calendar *calendar, QWidget *parent, |
219 | const char *name) | 219 | const char *name) |
220 | : KOEventView(calendar, parent, name) | 220 | : KOEventView(calendar, parent, name) |
221 | { | 221 | { |
diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp index 5181eaf..8a175c9 100644 --- a/libkcal/recurrence.cpp +++ b/libkcal/recurrence.cpp | |||
@@ -170,67 +170,73 @@ bool Recurrence::operator==( const Recurrence& r2 ) const | |||
170 | case rMinutely: | 170 | case rMinutely: |
171 | case rHourly: | 171 | case rHourly: |
172 | case rDaily: | 172 | case rDaily: |
173 | default: | 173 | default: |
174 | return true; | 174 | return true; |
175 | } | 175 | } |
176 | } | 176 | } |
177 | /* | 177 | /* |
178 | bool Recurrence::compareLists( const QPtrList<int> &l1 ,const QPtrList<int> &l2) | 178 | bool Recurrence::compareLists( const QPtrList<int> &l1 ,const QPtrList<int> &l2) |
179 | { | 179 | { |
180 | if ( l1.count() != l2.count() ) | 180 | if ( l1.count() != l2.count() ) |
181 | return false; | 181 | return false; |
182 | int count = l1.count(); | 182 | int count = l1.count(); |
183 | int i; | 183 | int i; |
184 | for ( i = 0; i < count ; ++i ) { | 184 | for ( i = 0; i < count ; ++i ) { |
185 | // if ( l1.at(i) != l2.at(i) ) | 185 | // if ( l1.at(i) != l2.at(i) ) |
186 | return false; | 186 | return false; |
187 | qDebug("compüare "); | 187 | qDebug("compüare "); |
188 | } | 188 | } |
189 | return true; | 189 | return true; |
190 | } | 190 | } |
191 | */ | 191 | */ |
192 | QString Recurrence::recurrenceText() const | 192 | QString Recurrence::recurrenceText() const |
193 | { | 193 | { |
194 | QString recurText = i18n("No"); | 194 | QString recurText; |
195 | if ( recurs == Recurrence::rMinutely ) | 195 | if ( recurs == Recurrence::rMinutely ) |
196 | recurText = i18n("minutely"); | 196 | recurText = i18n("minutely"); |
197 | else if ( recurs == Recurrence::rHourly ) | 197 | else if ( recurs == Recurrence::rHourly ) |
198 | recurText = i18n("hourly"); | 198 | recurText = i18n("hourly"); |
199 | else if ( recurs == Recurrence::rDaily ) | 199 | else if ( recurs == Recurrence::rDaily ) |
200 | recurText = i18n("daily"); | 200 | recurText = i18n("daily"); |
201 | else if ( recurs == Recurrence::rWeekly ) | 201 | else if ( recurs == Recurrence::rWeekly ) |
202 | recurText = i18n("weekly"); | 202 | recurText = i18n("weekly"); |
203 | else if ( recurs == Recurrence::rMonthlyPos ) | 203 | else if ( recurs == Recurrence::rMonthlyPos ) |
204 | recurText = i18n("monthly"); | 204 | recurText = i18n("monthly"); |
205 | else if ( recurs == Recurrence::rMonthlyDay ) | 205 | else if ( recurs == Recurrence::rMonthlyDay ) |
206 | recurText = i18n("day-monthly"); | 206 | recurText = i18n("monthly"); |
207 | else if ( recurs == Recurrence::rYearlyMonth ) | 207 | else if ( recurs == Recurrence::rYearlyMonth ) |
208 | recurText = i18n("month-yearly"); | 208 | recurText = i18n("yearly"); |
209 | else if ( recurs == Recurrence::rYearlyDay ) | 209 | else if ( recurs == Recurrence::rYearlyDay ) |
210 | recurText = i18n("day-yearly"); | 210 | recurText = i18n("day-yearly"); |
211 | else if ( recurs == Recurrence::rYearlyPos ) | 211 | else if ( recurs == Recurrence::rYearlyPos ) |
212 | recurText = i18n("position-yearly"); | 212 | recurText = i18n("position-yearly"); |
213 | if ( !recurText.isEmpty() ) { | ||
214 | if ( rFreq > 1 ){ | ||
215 | recurText = i18n("(%1) ").arg(rFreq ) + recurText; | ||
216 | } | ||
217 | } else | ||
218 | recurText = i18n("No"); | ||
213 | return recurText; | 219 | return recurText; |
214 | } | 220 | } |
215 | 221 | ||
216 | void Recurrence::setCompatVersion(int version) | 222 | void Recurrence::setCompatVersion(int version) |
217 | { | 223 | { |
218 | mCompatVersion = version ? version : INT_MAX; | 224 | mCompatVersion = version ? version : INT_MAX; |
219 | } | 225 | } |
220 | 226 | ||
221 | ushort Recurrence::doesRecur() const | 227 | ushort Recurrence::doesRecur() const |
222 | { | 228 | { |
223 | return recurs; | 229 | return recurs; |
224 | } | 230 | } |
225 | 231 | ||
226 | bool Recurrence::recursOnPure(const QDate &qd) const | 232 | bool Recurrence::recursOnPure(const QDate &qd) const |
227 | { | 233 | { |
228 | switch(recurs) { | 234 | switch(recurs) { |
229 | case rMinutely: | 235 | case rMinutely: |
230 | return recursSecondly(qd, rFreq*60); | 236 | return recursSecondly(qd, rFreq*60); |
231 | case rHourly: | 237 | case rHourly: |
232 | return recursSecondly(qd, rFreq*3600); | 238 | return recursSecondly(qd, rFreq*3600); |
233 | case rDaily: | 239 | case rDaily: |
234 | return recursDaily(qd); | 240 | return recursDaily(qd); |
235 | case rWeekly: | 241 | case rWeekly: |
236 | return recursWeekly(qd); | 242 | return recursWeekly(qd); |
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index 083e6d1..48257ef 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -176,49 +176,49 @@ PwM::PwM(PwMInit *_init, PwMDoc *doc, | |||
176 | , forceQuit (false) | 176 | , forceQuit (false) |
177 | , forceMinimizeToTray (false) | 177 | , forceMinimizeToTray (false) |
178 | { | 178 | { |
179 | syncManager = 0; | 179 | syncManager = 0; |
180 | virgin = !virginity; | 180 | virgin = !virginity; |
181 | init = _init; | 181 | init = _init; |
182 | connect(doc, SIGNAL(docClosed(PwMDoc *)), | 182 | connect(doc, SIGNAL(docClosed(PwMDoc *)), |
183 | this, SLOT(docClosed(PwMDoc *))); | 183 | this, SLOT(docClosed(PwMDoc *))); |
184 | initMenubar(); | 184 | initMenubar(); |
185 | initToolbar(); | 185 | initToolbar(); |
186 | initMetrics(); | 186 | initMetrics(); |
187 | setVirgin(virginity); | 187 | setVirgin(virginity); |
188 | setFocusPolicy(QWidget::WheelFocus); | 188 | setFocusPolicy(QWidget::WheelFocus); |
189 | #ifndef PWM_EMBEDDED | 189 | #ifndef PWM_EMBEDDED |
190 | statusBar()->show(); | 190 | statusBar()->show(); |
191 | #endif | 191 | #endif |
192 | view = makeNewListView(doc); | 192 | view = makeNewListView(doc); |
193 | setCentralWidget(view); | 193 | setCentralWidget(view); |
194 | updateCaption(); | 194 | updateCaption(); |
195 | showStatMsg(i18n("Ready.")); | 195 | showStatMsg(i18n("Ready.")); |
196 | } | 196 | } |
197 | 197 | ||
198 | PwM::~PwM() | 198 | PwM::~PwM() |
199 | { | 199 | { |
200 | qDebug("PwM::~PwM() %x", this); | 200 | //qDebug("PwM::~PwM() %x", this); |
201 | disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), | 201 | disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), |
202 | this, SLOT(docClosed(PwMDoc *))); | 202 | this, SLOT(docClosed(PwMDoc *))); |
203 | conf()->confWndMainWndSize(size()); | 203 | conf()->confWndMainWndSize(size()); |
204 | //LR closing of windows changed | 204 | //LR closing of windows changed |
205 | //needed for fastload option on PDA | 205 | //needed for fastload option on PDA |
206 | //emit closed(this); | 206 | //emit closed(this); |
207 | //qDebug("PwM::~PwM() emited closed(this)"); | 207 | //qDebug("PwM::~PwM() emited closed(this)"); |
208 | delete view; | 208 | delete view; |
209 | delete syncManager; | 209 | delete syncManager; |
210 | } | 210 | } |
211 | 211 | ||
212 | void PwM::initMenubar() | 212 | void PwM::initMenubar() |
213 | { | 213 | { |
214 | KIconLoader* picons; | 214 | KIconLoader* picons; |
215 | #ifndef PWM_EMBEDDED | 215 | #ifndef PWM_EMBEDDED |
216 | KIconLoader icons; | 216 | KIconLoader icons; |
217 | picons = &icons; | 217 | picons = &icons; |
218 | #else | 218 | #else |
219 | picons = KGlobal::iconLoader(); | 219 | picons = KGlobal::iconLoader(); |
220 | 220 | ||
221 | 221 | ||
222 | syncPopup = new KPopupMenu(this); | 222 | syncPopup = new KPopupMenu(this); |
223 | 223 | ||
224 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::PWMPI, PWMPrefs::instance(), syncPopup); | 224 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::PWMPI, PWMPrefs::instance(), syncPopup); |
@@ -878,57 +878,57 @@ void PwM::config_slot() | |||
878 | end2 = ml->end(); | 878 | end2 = ml->end(); |
879 | #else | 879 | #else |
880 | QValueList<PwM *>::ConstIterator i2 = ml->begin(), | 880 | QValueList<PwM *>::ConstIterator i2 = ml->begin(), |
881 | end2 = ml->end(); | 881 | end2 = ml->end(); |
882 | #endif | 882 | #endif |
883 | PwM *pwm; | 883 | PwM *pwm; |
884 | while (i2 != end2) { | 884 | while (i2 != end2) { |
885 | pwm = *i2; | 885 | pwm = *i2; |
886 | // reinitialize the window style. | 886 | // reinitialize the window style. |
887 | if (oldStyle != newStyle) | 887 | if (oldStyle != newStyle) |
888 | pwm->curView()->initStyle(newStyle); | 888 | pwm->curView()->initStyle(newStyle); |
889 | // set the new font | 889 | // set the new font |
890 | pwm->curView()->setFont(conf()->confGlobEntryFont()); | 890 | pwm->curView()->setFont(conf()->confGlobEntryFont()); |
891 | ++i2; | 891 | ++i2; |
892 | } | 892 | } |
893 | } | 893 | } |
894 | 894 | ||
895 | void PwM::activateMpButton(bool activate) | 895 | void PwM::activateMpButton(bool activate) |
896 | { | 896 | { |
897 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate); | 897 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate); |
898 | } | 898 | } |
899 | 899 | ||
900 | void PwM::closeEvent(QCloseEvent *e) | 900 | void PwM::closeEvent(QCloseEvent *e) |
901 | { | 901 | { |
902 | qDebug("PwM::closeEvent "); | 902 | //qDebug("PwM::closeEvent "); |
903 | emit closed( this ); | 903 | emit closed( this ); |
904 | return; | 904 | return; |
905 | e->accept(); | 905 | e->accept(); |
906 | } | 906 | } |
907 | 907 | ||
908 | void PwM::docClosed(PwMDoc *doc) | 908 | void PwM::docClosed(PwMDoc *doc) |
909 | { | 909 | { |
910 | qDebug("PwM::docClosed "); | 910 | //qDebug("PwM::docClosed "); |
911 | PARAM_UNUSED(doc); | 911 | PARAM_UNUSED(doc); |
912 | PWM_ASSERT(doc == curDoc()); | 912 | PWM_ASSERT(doc == curDoc()); |
913 | close(); | 913 | close(); |
914 | } | 914 | } |
915 | 915 | ||
916 | void PwM::find_slot() | 916 | void PwM::find_slot() |
917 | { | 917 | { |
918 | PWM_ASSERT(curDoc()); | 918 | PWM_ASSERT(curDoc()); |
919 | if (curDoc()->isDocEmpty()) | 919 | if (curDoc()->isDocEmpty()) |
920 | return; | 920 | return; |
921 | if (curDoc()->isDeepLocked()) | 921 | if (curDoc()->isDeepLocked()) |
922 | return; | 922 | return; |
923 | curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); | 923 | curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); |
924 | FindWndImpl findWnd(view); | 924 | FindWndImpl findWnd(view); |
925 | findWnd.exec(); | 925 | findWnd.exec(); |
926 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); | 926 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); |
927 | } | 927 | } |
928 | 928 | ||
929 | void PwM::exportToText() | 929 | void PwM::exportToText() |
930 | { | 930 | { |
931 | PWM_ASSERT(curDoc()); | 931 | PWM_ASSERT(curDoc()); |
932 | if (curDoc()->isDocEmpty()) { | 932 | if (curDoc()->isDocEmpty()) { |
933 | KMessageBox::information(this, | 933 | KMessageBox::information(this, |
934 | i18n | 934 | i18n |
@@ -1363,49 +1363,49 @@ void PwM::goToURL_slot() | |||
1363 | else | 1363 | else |
1364 | showStatMsg(i18n("ERROR: Couldn't start browser! Maybe invalid URL?")); | 1364 | showStatMsg(i18n("ERROR: Couldn't start browser! Maybe invalid URL?")); |
1365 | } | 1365 | } |
1366 | 1366 | ||
1367 | void PwM::copyToClipboard(const QString &s) | 1367 | void PwM::copyToClipboard(const QString &s) |
1368 | { | 1368 | { |
1369 | QClipboard *cb = QApplication::clipboard(); | 1369 | QClipboard *cb = QApplication::clipboard(); |
1370 | #ifndef PWM_EMBEDDED | 1370 | #ifndef PWM_EMBEDDED |
1371 | if (cb->supportsSelection()) | 1371 | if (cb->supportsSelection()) |
1372 | cb->setText(s, QClipboard::Selection); | 1372 | cb->setText(s, QClipboard::Selection); |
1373 | cb->setText(s, QClipboard::Clipboard); | 1373 | cb->setText(s, QClipboard::Clipboard); |
1374 | #else | 1374 | #else |
1375 | cb->setText(s); | 1375 | cb->setText(s); |
1376 | 1376 | ||
1377 | #endif | 1377 | #endif |
1378 | 1378 | ||
1379 | } | 1379 | } |
1380 | 1380 | ||
1381 | 1381 | ||
1382 | void PwM::showStatMsg(const QString &msg) | 1382 | void PwM::showStatMsg(const QString &msg) |
1383 | { | 1383 | { |
1384 | #ifdef DESKTOP_VERSION | 1384 | #ifdef DESKTOP_VERSION |
1385 | statusBar()->message(msg, STATUSBAR_MSG_TIMEOUT * 1000); | 1385 | statusBar()->message(msg, STATUSBAR_MSG_TIMEOUT * 1000); |
1386 | #else | 1386 | #else |
1387 | qDebug("Statusbar : %s",msg.latin1()); | 1387 | //qDebug("Statusbar : %s",msg.latin1()); |
1388 | Global::statusMessage(msg); | 1388 | Global::statusMessage(msg); |
1389 | #endif | 1389 | #endif |
1390 | } | 1390 | } |
1391 | 1391 | ||
1392 | void PwM::focusInEvent(QFocusEvent *e) | 1392 | void PwM::focusInEvent(QFocusEvent *e) |
1393 | { | 1393 | { |
1394 | if (e->gotFocus()) { | 1394 | if (e->gotFocus()) { |
1395 | emit gotFocus(this); | 1395 | emit gotFocus(this); |
1396 | } else if (e->lostFocus()) { | 1396 | } else if (e->lostFocus()) { |
1397 | emit lostFocus(this); | 1397 | emit lostFocus(this); |
1398 | } | 1398 | } |
1399 | } | 1399 | } |
1400 | 1400 | ||
1401 | 1401 | ||
1402 | #ifdef PWM_EMBEDDED | 1402 | #ifdef PWM_EMBEDDED |
1403 | 1403 | ||
1404 | void PwM::category_slot() | 1404 | void PwM::category_slot() |
1405 | { | 1405 | { |
1406 | PwMDoc *doc = curDoc(); | 1406 | PwMDoc *doc = curDoc(); |
1407 | PWM_ASSERT(doc); | 1407 | PWM_ASSERT(doc); |
1408 | doc->timer()->getLock(DocTimer::id_autoLockTimer); | 1408 | doc->timer()->getLock(DocTimer::id_autoLockTimer); |
1409 | 1409 | ||
1410 | editCategoryWnd w(doc, this, "editcategory"); | 1410 | editCategoryWnd w(doc, this, "editcategory"); |
1411 | /* | 1411 | /* |
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp index 0cf248c..d59d4d8 100644 --- a/pwmanager/pwmanager/pwminit.cpp +++ b/pwmanager/pwmanager/pwminit.cpp | |||
@@ -67,49 +67,49 @@ static NOREGPARM void sig_handler(int signum) | |||
67 | sig_init_pointer->shutdownApp(20 + signum); | 67 | sig_init_pointer->shutdownApp(20 + signum); |
68 | break; | 68 | break; |
69 | default: | 69 | default: |
70 | printDebug(string("unhandled signal ") | 70 | printDebug(string("unhandled signal ") |
71 | + tostr(signum)); | 71 | + tostr(signum)); |
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | 75 | ||
76 | 76 | ||
77 | PwMInit::PwMInit(PwMApplication *_app) | 77 | PwMInit::PwMInit(PwMApplication *_app) |
78 | : runStatus (unknown) | 78 | : runStatus (unknown) |
79 | , _curWidget (0) | 79 | , _curWidget (0) |
80 | , _dcopClient (0) | 80 | , _dcopClient (0) |
81 | , _kwalletEmu (0) | 81 | , _kwalletEmu (0) |
82 | , _keycard (0) | 82 | , _keycard (0) |
83 | , _tray (0) | 83 | , _tray (0) |
84 | { | 84 | { |
85 | sig_init_pointer = this; | 85 | sig_init_pointer = this; |
86 | app = _app; | 86 | app = _app; |
87 | } | 87 | } |
88 | 88 | ||
89 | PwMInit::~PwMInit() | 89 | PwMInit::~PwMInit() |
90 | { | 90 | { |
91 | qDebug("PwMInit::~PwMInit() "); | 91 | //qDebug("PwMInit::~PwMInit() "); |
92 | #ifndef PWM_EMBEDDED | 92 | #ifndef PWM_EMBEDDED |
93 | SelfTest::cancel(); | 93 | SelfTest::cancel(); |
94 | // close all open mainwnds | 94 | // close all open mainwnds |
95 | QValueList<PwM *>::iterator i = _mainWndList.begin(), | 95 | QValueList<PwM *>::iterator i = _mainWndList.begin(), |
96 | end = _mainWndList.end(); | 96 | end = _mainWndList.end(); |
97 | 97 | ||
98 | #else | 98 | #else |
99 | // close all open mainwnds | 99 | // close all open mainwnds |
100 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), | 100 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), |
101 | end = _mainWndList.end(); | 101 | end = _mainWndList.end(); |
102 | #endif | 102 | #endif |
103 | while (i != end) { | 103 | while (i != end) { |
104 | disconnect(*i, SIGNAL(closed(PwM *)), | 104 | disconnect(*i, SIGNAL(closed(PwM *)), |
105 | this, SLOT(mainWndClosed(PwM *))); | 105 | this, SLOT(mainWndClosed(PwM *))); |
106 | delete *i; | 106 | delete *i; |
107 | ++i; | 107 | ++i; |
108 | } | 108 | } |
109 | _mainWndList.clear(); | 109 | _mainWndList.clear(); |
110 | // close all remaining open documents | 110 | // close all remaining open documents |
111 | PwMDocList *_dl = PwMDoc::getOpenDocList(); | 111 | PwMDocList *_dl = PwMDoc::getOpenDocList(); |
112 | vector<PwMDocList::listItem> dl = *(_dl->getList()); | 112 | vector<PwMDocList::listItem> dl = *(_dl->getList()); |
113 | vector<PwMDocList::listItem>::iterator i2 = dl.begin(), | 113 | vector<PwMDocList::listItem>::iterator i2 = dl.begin(), |
114 | end2 = dl.end(); | 114 | end2 = dl.end(); |
115 | while (i2 != end2) { | 115 | while (i2 != end2) { |
@@ -134,49 +134,49 @@ PwMInit::~PwMInit() | |||
134 | void PwMInit::initializeApp() | 134 | void PwMInit::initializeApp() |
135 | { | 135 | { |
136 | //qDebug("PwMInit::initializeApp() "); | 136 | //qDebug("PwMInit::initializeApp() "); |
137 | PWM_ASSERT(runStatus == unknown); | 137 | PWM_ASSERT(runStatus == unknown); |
138 | runStatus = init; | 138 | runStatus = init; |
139 | initPosixSignalHandler(); | 139 | initPosixSignalHandler(); |
140 | Randomizer::init(); | 140 | Randomizer::init(); |
141 | #ifndef PWM_EMBEDDED | 141 | #ifndef PWM_EMBEDDED |
142 | Configuration::init(); | 142 | Configuration::init(); |
143 | #endif | 143 | #endif |
144 | initDCOP(); | 144 | initDCOP(); |
145 | initKWalletEmu(); | 145 | initKWalletEmu(); |
146 | initKeycard(); | 146 | initKeycard(); |
147 | initTray(); | 147 | initTray(); |
148 | handleCmdLineArgs(); | 148 | handleCmdLineArgs(); |
149 | bool openDeeplocked = false; | 149 | bool openDeeplocked = false; |
150 | if (conf()->confGlobAutostartDeepLocked() || | 150 | if (conf()->confGlobAutostartDeepLocked() || |
151 | savedCmd.open_deeplocked) | 151 | savedCmd.open_deeplocked) |
152 | openDeeplocked = true; | 152 | openDeeplocked = true; |
153 | if ( false ){ | 153 | if ( false ){ |
154 | // LR is not working | 154 | // LR is not working |
155 | //if (conf()->confWndAutoMinimizeOnStart() || | 155 | //if (conf()->confWndAutoMinimizeOnStart() || |
156 | // savedCmd.minToTray) { | 156 | // savedCmd.minToTray) { |
157 | PwMDoc *newDoc = createDoc(); | 157 | PwMDoc *newDoc = createDoc(); |
158 | qDebug(" createDoc()"); | 158 | //qDebug(" createDoc()"); |
159 | if (!newDoc->openDocUi(newDoc, | 159 | if (!newDoc->openDocUi(newDoc, |
160 | conf()->confGlobAutoStart(), | 160 | conf()->confGlobAutoStart(), |
161 | openDeeplocked)) { | 161 | openDeeplocked)) { |
162 | delete newDoc; | 162 | delete newDoc; |
163 | } | 163 | } |
164 | 164 | ||
165 | //US ENH for embedded devices: in the case of failure, open a document the default way | 165 | //US ENH for embedded devices: in the case of failure, open a document the default way |
166 | createMainWnd(conf()->confGlobAutoStart(), | 166 | createMainWnd(conf()->confGlobAutoStart(), |
167 | openDeeplocked, | 167 | openDeeplocked, |
168 | true, | 168 | true, |
169 | 0, | 169 | 0, |
170 | savedCmd.minimized); | 170 | savedCmd.minimized); |
171 | 171 | ||
172 | 172 | ||
173 | 173 | ||
174 | 174 | ||
175 | //} | 175 | //} |
176 | } else { | 176 | } else { |
177 | createMainWnd(conf()->confGlobAutoStart(), | 177 | createMainWnd(conf()->confGlobAutoStart(), |
178 | openDeeplocked, | 178 | openDeeplocked, |
179 | true, | 179 | true, |
180 | 0, | 180 | 0, |
181 | savedCmd.minimized); | 181 | savedCmd.minimized); |
182 | } | 182 | } |
@@ -378,65 +378,65 @@ again: | |||
378 | /* This should not happen! If we set forceMinimizeToTray , | 378 | /* This should not happen! If we set forceMinimizeToTray , |
379 | * we must be sure that _tray exists. | 379 | * we must be sure that _tray exists. |
380 | */ | 380 | */ |
381 | BUG(); | 381 | BUG(); |
382 | wnd->setForceMinimizeToTray(false); | 382 | wnd->setForceMinimizeToTray(false); |
383 | goto again; | 383 | goto again; |
384 | } | 384 | } |
385 | doMinimizeToTray = true; | 385 | doMinimizeToTray = true; |
386 | } else { | 386 | } else { |
387 | // Ask to minimize to tray. If not, delete doc. | 387 | // Ask to minimize to tray. If not, delete doc. |
388 | if (_tray && | 388 | if (_tray && |
389 | runStatus != shutdown && | 389 | runStatus != shutdown && |
390 | !wnd->isForceQuit() && | 390 | !wnd->isForceQuit() && |
391 | !wnd->curDoc()->isDeleted()) { | 391 | !wnd->curDoc()->isDeleted()) { |
392 | if (conf()->confWndClose()) | 392 | if (conf()->confWndClose()) |
393 | doDeleteDoc = true; | 393 | doDeleteDoc = true; |
394 | else | 394 | else |
395 | doMinimizeToTray = true; | 395 | doMinimizeToTray = true; |
396 | } else { | 396 | } else { |
397 | doDeleteDoc = true; | 397 | doDeleteDoc = true; |
398 | } | 398 | } |
399 | } | 399 | } |
400 | 400 | ||
401 | if (doMinimizeToTray) { | 401 | if (doMinimizeToTray) { |
402 | qDebug("doMinimizeToTray "); | 402 | //qDebug("doMinimizeToTray "); |
403 | PWM_ASSERT(_tray); | 403 | PWM_ASSERT(_tray); |
404 | int mmlock = conf()->confGlobMinimizeLock(); | 404 | int mmlock = conf()->confGlobMinimizeLock(); |
405 | switch (mmlock) { | 405 | switch (mmlock) { |
406 | case 0: // don't lock anything | 406 | case 0: // don't lock anything |
407 | break; | 407 | break; |
408 | case 1: // normal lock | 408 | case 1: // normal lock |
409 | wnd->curDoc()->lockAll(true); | 409 | wnd->curDoc()->lockAll(true); |
410 | break; | 410 | break; |
411 | case 2: // deep-lock | 411 | case 2: // deep-lock |
412 | wnd->curDoc()->deepLock(); | 412 | wnd->curDoc()->deepLock(); |
413 | break; | 413 | break; |
414 | default: | 414 | default: |
415 | WARN(); | 415 | WARN(); |
416 | } | 416 | } |
417 | } else if (doDeleteDoc) { | 417 | } else if (doDeleteDoc) { |
418 | qDebug("doDeleteDoc "); | 418 | //qDebug("doDeleteDoc "); |
419 | if (!wnd->curDoc()->tryDelete()) { | 419 | if (!wnd->curDoc()->tryDelete()) { |
420 | /* We failed deleting the doc, | 420 | /* We failed deleting the doc, |
421 | * so open a new window with it, again. | 421 | * so open a new window with it, again. |
422 | */ | 422 | */ |
423 | createMainWnd(QString::null, false, | 423 | createMainWnd(QString::null, false, |
424 | false, wnd->curDoc()); | 424 | false, wnd->curDoc()); |
425 | } | 425 | } |
426 | } | 426 | } |
427 | #ifndef PWM_EMBEDDED | 427 | #ifndef PWM_EMBEDDED |
428 | // find the closed window in the "mainWndList" and delete it. | 428 | // find the closed window in the "mainWndList" and delete it. |
429 | QValueList<PwM *>::iterator i = _mainWndList.begin(), | 429 | QValueList<PwM *>::iterator i = _mainWndList.begin(), |
430 | end = _mainWndList.end(); | 430 | end = _mainWndList.end(); |
431 | #else | 431 | #else |
432 | // find the closed window in the "mainWndList" and delete it. | 432 | // find the closed window in the "mainWndList" and delete it. |
433 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), | 433 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), |
434 | end = _mainWndList.end(); | 434 | end = _mainWndList.end(); |
435 | #endif | 435 | #endif |
436 | while (i != end) { | 436 | while (i != end) { |
437 | //qDebug("iii %x end %x wnd %x", (*i), (*end), wnd); | 437 | //qDebug("iii %x end %x wnd %x", (*i), (*end), wnd); |
438 | if (*i == wnd) { | 438 | if (*i == wnd) { |
439 | #ifndef PWM_EMBEDDED | 439 | #ifndef PWM_EMBEDDED |
440 | _mainWndList.erase(i); | 440 | _mainWndList.erase(i); |
441 | #else | 441 | #else |
442 | _mainWndList.remove(i); | 442 | _mainWndList.remove(i); |
diff --git a/pwmanager/pwmanager/pwmview.cpp b/pwmanager/pwmanager/pwmview.cpp index cd816e5..8c4d9cc 100644 --- a/pwmanager/pwmanager/pwmview.cpp +++ b/pwmanager/pwmanager/pwmview.cpp | |||
@@ -184,49 +184,49 @@ void PwMView::handleToggle(QListViewItem *item) | |||
184 | return; // this is just a click somewhere on the entry | 184 | return; // this is just a click somewhere on the entry |
185 | if (doc->isDeepLocked()) { | 185 | if (doc->isDeepLocked()) { |
186 | PwMerror ret; | 186 | PwMerror ret; |
187 | ret = doc->deepLock(false); | 187 | ret = doc->deepLock(false); |
188 | if (ret != e_success) | 188 | if (ret != e_success) |
189 | clItem->setOn(false); | 189 | clItem->setOn(false); |
190 | return; | 190 | return; |
191 | } | 191 | } |
192 | doc->lockAt(curCat, curEntryDocIndex, !clItem->isOn()); | 192 | doc->lockAt(curCat, curEntryDocIndex, !clItem->isOn()); |
193 | } | 193 | } |
194 | 194 | ||
195 | void PwMView::handleRightClick(QListViewItem *item, const QPoint &point, int) | 195 | void PwMView::handleRightClick(QListViewItem *item, const QPoint &point, int) |
196 | { | 196 | { |
197 | if (!item) | 197 | if (!item) |
198 | return; | 198 | return; |
199 | ctxMenu->move(point); | 199 | ctxMenu->move(point); |
200 | /* don't use ctxMenu->exec() here, as it generates race conditions | 200 | /* don't use ctxMenu->exec() here, as it generates race conditions |
201 | * with the card interface code. Believe it or not. :) | 201 | * with the card interface code. Believe it or not. :) |
202 | */ | 202 | */ |
203 | ctxMenu->show(); | 203 | ctxMenu->show(); |
204 | } | 204 | } |
205 | 205 | ||
206 | void PwMView::updateCategories() | 206 | void PwMView::updateCategories() |
207 | { | 207 | { |
208 | qDebug("PwMView::updateCategories() "); | 208 | //qDebug("PwMView::updateCategories() "); |
209 | QString oldSel(getCurrentCategory()); | 209 | QString oldSel(getCurrentCategory()); |
210 | delAllCategories(); | 210 | delAllCategories(); |
211 | QStringList catList; | 211 | QStringList catList; |
212 | document()->getCategoryList(&catList); | 212 | document()->getCategoryList(&catList); |
213 | catList.sort(); | 213 | catList.sort(); |
214 | #ifndef PWM_EMBEDDED | 214 | #ifndef PWM_EMBEDDED |
215 | QStringList::iterator i = catList.begin(), | 215 | QStringList::iterator i = catList.begin(), |
216 | end = catList.end(); | 216 | end = catList.end(); |
217 | #else | 217 | #else |
218 | QStringList::Iterator i = catList.begin(), | 218 | QStringList::Iterator i = catList.begin(), |
219 | end = catList.end(); | 219 | end = catList.end(); |
220 | #endif | 220 | #endif |
221 | while (i != end) { | 221 | while (i != end) { |
222 | addCategory(*i); | 222 | addCategory(*i); |
223 | ++i; | 223 | ++i; |
224 | } | 224 | } |
225 | selectCategory(oldSel); | 225 | selectCategory(oldSel); |
226 | } | 226 | } |
227 | 227 | ||
228 | void PwMView::shiftToView() | 228 | void PwMView::shiftToView() |
229 | { | 229 | { |
230 | int cX = lv->contentsX(); | 230 | int cX = lv->contentsX(); |
231 | int cY = lv->contentsY(); | 231 | int cY = lv->contentsY(); |
232 | commentBox->clear(); | 232 | commentBox->clear(); |