summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-04 22:55:48 (UTC)
committer zautrix <zautrix>2005-02-04 22:55:48 (UTC)
commit53099ae3a9ef02549536dab3dd6870b7a2874284 (patch) (unidiff)
treed3b46b4a7ecd8c7071533957e4eee50aa75d893b
parent936b4b2aa37e699052a2517dc2d928d717398cf6 (diff)
downloadkdepimpi-53099ae3a9ef02549536dab3dd6870b7a2874284.zip
kdepimpi-53099ae3a9ef02549536dab3dd6870b7a2874284.tar.gz
kdepimpi-53099ae3a9ef02549536dab3dd6870b7a2874284.tar.bz2
fixxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt3
-rw-r--r--korganizer/kolistview.cpp11
-rw-r--r--korganizer/kolistview.h2
3 files changed, 10 insertions, 6 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 5a5b73e..8f63d1c 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1115,111 +1115,110 @@
1115{ "Filter enabled","Filter angeschaltet" }, 1115{ "Filter enabled","Filter angeschaltet" },
1116{ "Edit Filters","Ändere Filter" }, 1116{ "Edit Filters","Ändere Filter" },
1117{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1117{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1118{ "Agenda","Agenda" }, 1118{ "Agenda","Agenda" },
1119{ " ("," (" }, 1119{ " ("," (" },
1120{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1120{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1121{ "Print","Print" }, 1121{ "Print","Print" },
1122{ "&Setup Printer...","Drucker &Setup..." }, 1122{ "&Setup Printer...","Drucker &Setup..." },
1123{ "View Type","Zeige Typ" }, 1123{ "View Type","Zeige Typ" },
1124{ "Page &orientation:","Seiten Ausrichtung:" }, 1124{ "Page &orientation:","Seiten Ausrichtung:" },
1125{ "Use Default of Selected Style","Default des selektierten Stils" }, 1125{ "Use Default of Selected Style","Default des selektierten Stils" },
1126{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1126{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1127{ "Portrait","Portrait" }, 1127{ "Portrait","Portrait" },
1128{ "Landscape","Landschaft" }, 1128{ "Landscape","Landschaft" },
1129{ "Print day","Drucke Tag" }, 1129{ "Print day","Drucke Tag" },
1130{ "CalPrintDay_Base","CalPrintDay_Base" }, 1130{ "CalPrintDay_Base","CalPrintDay_Base" },
1131{ "Date && Time Range","Datum && Zeitspanne" }, 1131{ "Date && Time Range","Datum && Zeitspanne" },
1132{ "&End date:","&Enddatum:" }, 1132{ "&End date:","&Enddatum:" },
1133{ "&Start date:","&Startdatum:" }, 1133{ "&Start date:","&Startdatum:" },
1134{ "Start &time:","Startzeit:" }, 1134{ "Start &time:","Startzeit:" },
1135{ "End ti&me:","Endzeit:" }, 1135{ "End ti&me:","Endzeit:" },
1136{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1136{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1137{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1137{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1138{ "Alt+D","Alt+D" }, 1138{ "Alt+D","Alt+D" },
1139{ "&Use colors","Nutze Farben" }, 1139{ "&Use colors","Nutze Farben" },
1140{ "Alt+U","Alt+U" }, 1140{ "Alt+U","Alt+U" },
1141{ "Print week","Drucke Woche" }, 1141{ "Print week","Drucke Woche" },
1142{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1142{ "CalPrintWeek_Base","CalPrintWeek_Base" },
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{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1207{ "Default todo done color:","Standard Todo erledigt Farbe" },
1208{ "Select week %1-%2","Selektiere Woche %1-%2" }, 1208{ "Select week %1-%2","Selektiere Woche %1-%2" },
1209{ "Select Week","Selektiere Woche" }, 1209{ "Select Week","Selektiere Woche" },
1210{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1210{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1211{ "Set reminder offset to:","Setze Alarm Offset auf:" },
1212{ "Set Alarm!","Setze Alarm!" }, 1211{ "Set Alarm!","Setze Alarm!" },
1213{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1212{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1214{ " and "," und " }, 1213{ " and "," und " },
1215{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1214{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1216{ "Mail to selected","Mail an Ausgewählte" }, 1215{ "Mail to selected","Mail an Ausgewählte" },
1217{ "Mail to all","Mail an Alle" }, 1216{ "Mail to all","Mail an Alle" },
1218{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1217{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1219{ "","" }, 1218{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1220{ "","" }, 1219{ "","" },
1221{ "","" }, 1220{ "","" },
1222{ "","" }, 1221{ "","" },
1223{ "","" }, 1222{ "","" },
1224{ "","" }, 1223{ "","" },
1225{ "","" }, 1224{ "","" },
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index d4d9c0f..d0dbb47 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -263,237 +263,242 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
263 SLOT(clearSelection()),true); 263 SLOT(clearSelection()),true);
264 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 264 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
265 i18n("Delete all selected"),this, 265 i18n("Delete all selected"),this,
266 SLOT(deleteAll()),true); 266 SLOT(deleteAll()),true);
267 mPopupMenu->insertSeparator(); 267 mPopupMenu->insertSeparator();
268 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 268 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
269 i18n("Save selected to file..."),this, 269 i18n("Save selected to file..."),this,
270 SLOT(saveToFile()),true); 270 SLOT(saveToFile()),true);
271 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 271 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
272 i18n("Save Journal/Description..."),this, 272 i18n("Save Journal/Description..."),this,
273 SLOT(saveDescriptionToFile()),true); 273 SLOT(saveDescriptionToFile()),true);
274 // mPopupMenu->insertSeparator(); 274 // mPopupMenu->insertSeparator();
275 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 275 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
276 i18n("Add Categ. to selected..."),this, 276 i18n("Add Categ. to selected..."),this,
277 SLOT(addCat()),true); 277 SLOT(addCat()),true);
278 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 278 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
279 i18n("Set Categ. for selected..."),this, 279 i18n("Set Categ. for selected..."),this,
280 SLOT(setCat()),true); 280 SLOT(setCat()),true);
281 //mPopupMenu->insertSeparator(); 281 //mPopupMenu->insertSeparator();
282 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 282 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
283 i18n("Set alarm for selected..."),this, 283 i18n("Set alarm for selected..."),this,
284 SLOT(setAlarm()),true); 284 SLOT(setAlarm()),true);
285 285
286 286
287#ifndef DESKTOP_VERSION 287#ifndef DESKTOP_VERSION
288 mPopupMenu->insertSeparator(); 288 mPopupMenu->insertSeparator();
289 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 289 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
290 i18n("Beam selected via IR"),this, 290 i18n("Beam selected via IR"),this,
291 SLOT(beamSelected()),true); 291 SLOT(beamSelected()),true);
292#endif 292#endif
293 /* 293 /*
294 mPopupMenu = new QPopupMenu; 294 mPopupMenu = new QPopupMenu;
295 mPopupMenu->insertItem(i18n("Edit Event"), this, 295 mPopupMenu->insertItem(i18n("Edit Event"), this,
296 SLOT (editEvent())); 296 SLOT (editEvent()));
297 mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, 297 mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this,
298 SLOT (deleteEvent())); 298 SLOT (deleteEvent()));
299 mPopupMenu->insertSeparator(); 299 mPopupMenu->insertSeparator();
300 mPopupMenu->insertItem(i18n("Show Dates"), this, 300 mPopupMenu->insertItem(i18n("Show Dates"), this,
301 SLOT(showDates())); 301 SLOT(showDates()));
302 mPopupMenu->insertItem(i18n("Hide Dates"), this, 302 mPopupMenu->insertItem(i18n("Hide Dates"), this,
303 SLOT(hideDates())); 303 SLOT(hideDates()));
304 */ 304 */
305 QObject::connect(mListView,SIGNAL( newEvent()), 305 QObject::connect(mListView,SIGNAL( newEvent()),
306 this,SIGNAL(signalNewEvent())); 306 this,SIGNAL(signalNewEvent()));
307 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), 307 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)),
308 this,SLOT(defaultItemAction(QListViewItem *))); 308 this,SLOT(defaultItemAction(QListViewItem *)));
309 QObject::connect(mListView,SIGNAL(rightButtonClicked ( QListViewItem *, 309 QObject::connect(mListView,SIGNAL(rightButtonClicked ( QListViewItem *,
310 const QPoint &, int )), 310 const QPoint &, int )),
311 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); 311 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int)));
312 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), 312 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)),
313 SLOT(processSelectionChange(QListViewItem *))); 313 SLOT(processSelectionChange(QListViewItem *)));
314 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), 314 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)),
315 SIGNAL(showIncidenceSignal(Incidence *)) ); 315 SIGNAL(showIncidenceSignal(Incidence *)) );
316 316
317 readSettings(KOGlobals::config(),"KOListView Layout"); 317 readSettings(KOGlobals::config(),"KOListView Layout");
318} 318}
319 319
320KOListView::~KOListView() 320KOListView::~KOListView()
321{ 321{
322 delete mPopupMenu; 322 delete mPopupMenu;
323} 323}
324QString KOListView::getWhatsThisText(QPoint p) 324QString KOListView::getWhatsThisText(QPoint p)
325{ 325{
326 KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); 326 KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p );
327 if ( item ) 327 if ( item )
328 return KIncidenceFormatter::instance()->getFormattedText( item->data() ); 328 return KIncidenceFormatter::instance()->getFormattedText( item->data() );
329 return i18n("That is the list view" ); 329 return i18n("That is the list view" );
330 330
331} 331}
332 332
333void KOListView::updateList() 333void KOListView::updateList()
334{ 334{
335 // qDebug(" KOListView::updateList() "); 335 // qDebug(" KOListView::updateList() ");
336 336
337} 337}
338 338
339void KOListView::addCat( ) 339void KOListView::addCat( )
340{ 340{
341 setCategories( false ); 341 setCategories( false );
342} 342}
343void KOListView::setCat() 343void KOListView::setCat()
344{ 344{
345 setCategories( true ); 345 setCategories( true );
346} 346}
347void KOListView::setAlarm() 347void KOListView::setAlarm()
348{ 348{
349 KOAlarmPrefs kap( this); 349 KOAlarmPrefs kap( this);
350 if ( !kap.exec() ) 350 if ( !kap.exec() )
351 return; 351 return;
352 352
353 353
354 QStringList itemList; 354 QStringList itemList;
355 QPtrList<KOListViewItem> sel ; 355 QPtrList<KOListViewItem> sel ;
356 QListViewItem *qitem = mListView->firstChild (); 356 QListViewItem *qitem = mListView->firstChild ();
357 while ( qitem ) { 357 while ( qitem ) {
358 if ( qitem->isSelected() ) { 358 if ( qitem->isSelected() ) {
359 sel.append(((KOListViewItem *)qitem)); 359 Incidence* inc = ((KOListViewItem *) qitem)->data();
360 if ( inc->type() != "Journal" ) {
361 if ( inc->type() == "Todo" ) {
362 if ( ((Todo*)inc)->hasDueDate() )
363 sel.append(((KOListViewItem *)qitem));
364 } else
365 sel.append(((KOListViewItem *)qitem));
366 }
360 } 367 }
361 qitem = qitem->nextSibling(); 368 qitem = qitem->nextSibling();
362 } 369 }
363 int count = 0; 370 int count = 0;
364 KOListViewItem * item, *temp; 371 KOListViewItem * item, *temp;
365 item = sel.first(); 372 item = sel.first();
366 Incidence* inc; 373 Incidence* inc;
367 while ( item ) { 374 while ( item ) {
368 inc = item->data(); 375 inc = item->data();
369 if ( inc->type() != "Journal" ) {
370 ++count; 376 ++count;
371 if (kap.mAlarmButton->isChecked()) { 377 if (kap.mAlarmButton->isChecked()) {
372 if (inc->alarms().count() == 0) 378 if (inc->alarms().count() == 0)
373 inc->newAlarm(); 379 inc->newAlarm();
374 QPtrList<Alarm> alarms = inc->alarms(); 380 QPtrList<Alarm> alarms = inc->alarms();
375 Alarm *alarm; 381 Alarm *alarm;
376 for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { 382 for (alarm = alarms.first(); alarm; alarm = alarms.next() ) {
377 alarm->setEnabled(true); 383 alarm->setEnabled(true);
378 int j = kap.mAlarmTimeEdit->value()* -60; 384 int j = kap.mAlarmTimeEdit->value()* -60;
379 if (kap.mAlarmIncrCombo->currentItem() == 1) 385 if (kap.mAlarmIncrCombo->currentItem() == 1)
380 j = j * 60; 386 j = j * 60;
381 else if (kap.mAlarmIncrCombo->currentItem() == 2) 387 else if (kap.mAlarmIncrCombo->currentItem() == 2)
382 j = j * (60 * 24); 388 j = j * (60 * 24);
383 alarm->setStartOffset( j ); 389 alarm->setStartOffset( j );
384 390
385 if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { 391 if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) {
386 alarm->setProcedureAlarm(kap.mAlarmProgram); 392 alarm->setProcedureAlarm(kap.mAlarmProgram);
387 } 393 }
388 else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) 394 else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn())
389 alarm->setAudioAlarm(kap.mAlarmSound); 395 alarm->setAudioAlarm(kap.mAlarmSound);
390 else 396 else
391 alarm->setType(Alarm::Invalid); 397 alarm->setType(Alarm::Invalid);
392 //alarm->setAudioAlarm("default"); 398 //alarm->setAudioAlarm("default");
393 // TODO: Deal with multiple alarms 399 // TODO: Deal with multiple alarms
394 break; // For now, stop after the first alarm 400 break; // For now, stop after the first alarm
395 } 401 }
396 } else { 402 } else {
397 Alarm* alarm = inc->alarms().first(); 403 Alarm* alarm = inc->alarms().first();
398 if ( alarm ) { 404 if ( alarm ) {
399 alarm->setEnabled(false); 405 alarm->setEnabled(false);
400 alarm->setType(Alarm::Invalid); 406 alarm->setType(Alarm::Invalid);
401 } 407 }
402 } 408 }
403 }
404 temp = item; 409 temp = item;
405 item = sel.next(); 410 item = sel.next();
406 mUidDict.remove( inc->uid() ); 411 mUidDict.remove( inc->uid() );
407 delete temp;; 412 delete temp;;
408 addIncidence( inc ); 413 addIncidence( inc );
409 } 414 }
410 topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) ); 415 topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) );
411 qDebug("KO: Set alarm for %d items", count); 416 qDebug("KO: Set alarm for %d items", count);
412 calendar()->reInitAlarmSettings(); 417 calendar()->reInitAlarmSettings();
413} 418}
414void KOListView::setCategories( bool removeOld ) 419void KOListView::setCategories( bool removeOld )
415{ 420{
416 421
417 KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); 422 KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 );
418 if (! csd->exec()) { 423 if (! csd->exec()) {
419 delete csd; 424 delete csd;
420 return; 425 return;
421 } 426 }
422 QStringList catList = csd->selectedCategories(); 427 QStringList catList = csd->selectedCategories();
423 delete csd; 428 delete csd;
424 // if ( catList.count() == 0 ) 429 // if ( catList.count() == 0 )
425 // return; 430 // return;
426 catList.sort(); 431 catList.sort();
427 QString categoriesStr = catList.join(","); 432 QString categoriesStr = catList.join(",");
428 int i; 433 int i;
429 QStringList itemList; 434 QStringList itemList;
430 QPtrList<KOListViewItem> sel ; 435 QPtrList<KOListViewItem> sel ;
431 QListViewItem *qitem = mListView->firstChild (); 436 QListViewItem *qitem = mListView->firstChild ();
432 while ( qitem ) { 437 while ( qitem ) {
433 if ( qitem->isSelected() ) { 438 if ( qitem->isSelected() ) {
434 sel.append(((KOListViewItem *)qitem)); 439 sel.append(((KOListViewItem *)qitem));
435 } 440 }
436 qitem = qitem->nextSibling(); 441 qitem = qitem->nextSibling();
437 } 442 }
438 KOListViewItem * item, *temp; 443 KOListViewItem * item, *temp;
439 item = sel.first(); 444 item = sel.first();
440 Incidence* inc; 445 Incidence* inc;
441 while ( item ) { 446 while ( item ) {
442 inc = item->data(); 447 inc = item->data();
443 if ( removeOld ) { 448 if ( removeOld ) {
444 inc->setCategories( categoriesStr ); 449 inc->setCategories( categoriesStr );
445 } else { 450 } else {
446 itemList = QStringList::split (",", inc->categoriesStr() ); 451 itemList = QStringList::split (",", inc->categoriesStr() );
447 for( i = 0; i< catList.count(); ++i ) { 452 for( i = 0; i< catList.count(); ++i ) {
448 if ( !itemList.contains (catList[i])) 453 if ( !itemList.contains (catList[i]))
449 itemList.append( catList[i] ); 454 itemList.append( catList[i] );
450 } 455 }
451 itemList.sort(); 456 itemList.sort();
452 inc->setCategories( itemList.join(",") ); 457 inc->setCategories( itemList.join(",") );
453 } 458 }
454 temp = item; 459 temp = item;
455 item = sel.next(); 460 item = sel.next();
456 mUidDict.remove( inc->uid() ); 461 mUidDict.remove( inc->uid() );
457 delete temp;; 462 delete temp;;
458 addIncidence( inc ); 463 addIncidence( inc );
459 } 464 }
460} 465}
461 466
462void KOListView::beamSelected() 467void KOListView::beamSelected()
463{ 468{
464 int icount = 0; 469 int icount = 0;
465 QPtrList<Incidence> delSel ; 470 QPtrList<Incidence> delSel ;
466 QListViewItem *item = mListView->firstChild (); 471 QListViewItem *item = mListView->firstChild ();
467 while ( item ) { 472 while ( item ) {
468 if ( item->isSelected() ) { 473 if ( item->isSelected() ) {
469 delSel.append(((KOListViewItem *)item)->data()); 474 delSel.append(((KOListViewItem *)item)->data());
470 ++icount; 475 ++icount;
471 } 476 }
472 477
473 item = item->nextSibling(); 478 item = item->nextSibling();
474 } 479 }
475 if ( icount ) { 480 if ( icount ) {
476 emit beamIncidenceList( delSel ); 481 emit beamIncidenceList( delSel );
477 return; 482 return;
478 QString fn ; 483 QString fn ;
479 fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; 484 fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs";
480 QString mes; 485 QString mes;
481 bool createbup = true; 486 bool createbup = true;
482 if ( createbup ) { 487 if ( createbup ) {
483 QString description = "\n"; 488 QString description = "\n";
484 CalendarLocal* cal = new CalendarLocal(); 489 CalendarLocal* cal = new CalendarLocal();
485 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 490 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
486 Incidence *incidence = delSel.first(); 491 Incidence *incidence = delSel.first();
487 while ( incidence ) { 492 while ( incidence ) {
488 Incidence *in = incidence->clone(); 493 Incidence *in = incidence->clone();
489 description += in->summary() + "\n"; 494 description += in->summary() + "\n";
490 cal->addIncidence( in ); 495 cal->addIncidence( in );
491 incidence = delSel.next(); 496 incidence = delSel.next();
492 } 497 }
493 FileStorage storage( cal, fn, new VCalFormat ); 498 FileStorage storage( cal, fn, new VCalFormat );
494 storage.save(); 499 storage.save();
495 delete cal; 500 delete cal;
496 mes = i18n("KO/Pi: Ready for beaming"); 501 mes = i18n("KO/Pi: Ready for beaming");
497 topLevelWidget()->setCaption(mes); 502 topLevelWidget()->setCaption(mes);
498 503
499#ifndef DESKTOP_VERSION 504#ifndef DESKTOP_VERSION
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index 78004fe..bd5bd12 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -1,167 +1,167 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 1999 Preston Brown 3 Copyright (c) 1999 Preston Brown
4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or 8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24#ifndef _KOLISTVIEW_H 24#ifndef _KOLISTVIEW_H
25#define _KOLISTVIEW_H 25#define _KOLISTVIEW_H
26 26
27#include <qlistview.h> 27#include <qlistview.h>
28#include <qmap.h> 28#include <qmap.h>
29#include <qdict.h> 29#include <qdict.h>
30 30
31#include <klistview.h> 31#include <klistview.h>
32 32
33#ifndef DESKTOP_VERSION 33#ifndef DESKTOP_VERSION
34#include <qtopia/ir.h> 34#include <qtopia/ir.h>
35#else 35#else
36#define Ir char 36#define Ir char
37#endif 37#endif
38#include <libkcal/incidence.h> 38#include <libkcal/incidence.h>
39 39
40#include "koeventview.h" 40#include "koeventview.h"
41#include "customlistviewitem.h" 41#include "customlistviewitem.h"
42 42
43using namespace KCal; 43using namespace KCal;
44 44
45 45
46 46
47#include <qpushbutton.h> 47#include <qpushbutton.h>
48#include <qlayout.h> 48#include <qlayout.h>
49#include <qdialog.h> 49#include <qdialog.h>
50#include <qcombobox.h> 50#include <qcombobox.h>
51#include <qspinbox.h> 51#include <qspinbox.h>
52#include <qtooltip.h> 52#include <qtooltip.h>
53#include <qcheckbox.h> 53#include <qcheckbox.h>
54#include <qhbox.h> 54#include <qhbox.h>
55#include <qlabel.h> 55#include <qlabel.h>
56#include <kiconloader.h> 56#include <kiconloader.h>
57#include "kfiledialog.h" 57#include "kfiledialog.h"
58#include "koprefs.h" 58#include "koprefs.h"
59class KOAlarmPrefs : public QDialog 59class KOAlarmPrefs : public QDialog
60{ 60{
61 Q_OBJECT 61 Q_OBJECT
62 public: 62 public:
63 KOAlarmPrefs( QWidget *par=0, const char *name=0 ) : 63 KOAlarmPrefs( QWidget *par=0, const char *name=0 ) :
64 QDialog( par, name, true ) 64 QDialog( par, name, true )
65 { 65 {
66 setCaption( i18n("Alarm Options") ); 66 setCaption( i18n("Alarm Options") );
67 QVBoxLayout* alarmLayout = new QVBoxLayout( this ); 67 QVBoxLayout* alarmLayout = new QVBoxLayout( this );
68 alarmLayout->setSpacing( 3 ); 68 alarmLayout->setSpacing( 3 );
69 alarmLayout->setMargin( 3 ); 69 alarmLayout->setMargin( 3 );
70 QWidget *parent = this; 70 QWidget *parent = this;
71 mAlarmButton = new QCheckBox(i18n("Set reminder offset to:"),parent); 71 mAlarmButton = new QCheckBox(i18n("Set reminder ON with offset to:"),parent);
72 alarmLayout->addWidget(mAlarmButton); 72 alarmLayout->addWidget(mAlarmButton);
73 mAlarmTimeEdit = new QSpinBox ( 0, 9999, 1, parent, "mAlarmTimeEdit " ) ; 73 mAlarmTimeEdit = new QSpinBox ( 0, 9999, 1, parent, "mAlarmTimeEdit " ) ;
74 mAlarmTimeEdit->setValue( 15 ); 74 mAlarmTimeEdit->setValue( 15 );
75 alarmLayout->addWidget(mAlarmTimeEdit); 75 alarmLayout->addWidget(mAlarmTimeEdit);
76 mAlarmIncrCombo = new QComboBox(false, parent); 76 mAlarmIncrCombo = new QComboBox(false, parent);
77 mAlarmIncrCombo->insertItem(i18n("minute(s)")); 77 mAlarmIncrCombo->insertItem(i18n("minute(s)"));
78 mAlarmIncrCombo->insertItem(i18n("hour(s)")); 78 mAlarmIncrCombo->insertItem(i18n("hour(s)"));
79 mAlarmIncrCombo->insertItem(i18n("day(s)")); 79 mAlarmIncrCombo->insertItem(i18n("day(s)"));
80 alarmLayout->addWidget(mAlarmIncrCombo); 80 alarmLayout->addWidget(mAlarmIncrCombo);
81 QHBox * hb = new QHBox ( parent ); 81 QHBox * hb = new QHBox ( parent );
82 alarmLayout->addWidget(hb); 82 alarmLayout->addWidget(hb);
83 mAlarmSoundButton = new QPushButton(hb); 83 mAlarmSoundButton = new QPushButton(hb);
84 mAlarmSoundButton->setPixmap(SmallIcon("playsound")); 84 mAlarmSoundButton->setPixmap(SmallIcon("playsound"));
85 mAlarmSoundButton->setToggleButton(true); 85 mAlarmSoundButton->setToggleButton(true);
86 connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound())); 86 connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound()));
87 mAlarmProgramButton = new QPushButton(hb); 87 mAlarmProgramButton = new QPushButton(hb);
88 mAlarmProgramButton->setPixmap(SmallIcon("run")); 88 mAlarmProgramButton->setPixmap(SmallIcon("run"));
89 mAlarmProgramButton->setToggleButton(true); 89 mAlarmProgramButton->setToggleButton(true);
90 connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram())); 90 connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram()));
91 mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 ); 91 mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 );
92 mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 ); 92 mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 );
93 mAlarmLabel = new QLabel( this ); 93 mAlarmLabel = new QLabel( this );
94 alarmLayout->addWidget( mAlarmLabel ); 94 alarmLayout->addWidget( mAlarmLabel );
95 mAlarmLabel->setText( "..."+KOPrefs::instance()->mDefaultAlarmFile.right( 30 ) ); 95 mAlarmLabel->setText( "..."+KOPrefs::instance()->mDefaultAlarmFile.right( 30 ) );
96 mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; 96 mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile;
97 mAlarmSoundButton->setOn( true ); 97 mAlarmSoundButton->setOn( true );
98 QPushButton * ok = new QPushButton( i18n("Set Alarm!"), this ); 98 QPushButton * ok = new QPushButton( i18n("Set Alarm!"), this );
99 alarmLayout->addWidget( ok ); 99 alarmLayout->addWidget( ok );
100 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 100 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
101 alarmLayout->addWidget( cancel ); 101 alarmLayout->addWidget( cancel );
102 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 102 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
103 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 103 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
104 resize( 200, 200 ); 104 resize( 200, 200 );
105 105
106 } 106 }
107 107
108 108
109 109
110 QString mAlarmSound, mAlarmProgram ; 110 QString mAlarmSound, mAlarmProgram ;
111 QCheckBox* mAlarmButton; 111 QCheckBox* mAlarmButton;
112 QSpinBox* mAlarmTimeEdit; 112 QSpinBox* mAlarmTimeEdit;
113 QLabel* mAlarmLabel; 113 QLabel* mAlarmLabel;
114 QComboBox* mAlarmIncrCombo ; 114 QComboBox* mAlarmIncrCombo ;
115 QPushButton* mAlarmSoundButton ,*mAlarmProgramButton; 115 QPushButton* mAlarmSoundButton ,*mAlarmProgramButton;
116private slots: 116private slots:
117 117
118void pickAlarmSound() 118void pickAlarmSound()
119{ 119{
120 //QString prefix = mAlarmSound; 120 //QString prefix = mAlarmSound;
121 if (!mAlarmSoundButton->isOn()) { 121 if (!mAlarmSoundButton->isOn()) {
122 //mAlarmSound = ""; 122 //mAlarmSound = "";
123 QToolTip::remove(mAlarmSoundButton); 123 QToolTip::remove(mAlarmSoundButton);
124 QToolTip::add(mAlarmSoundButton, i18n("No sound set")); 124 QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
125 mAlarmProgramButton->setOn(true); 125 mAlarmProgramButton->setOn(true);
126 mAlarmSoundButton->setOn(false); 126 mAlarmSoundButton->setOn(false);
127 } else { 127 } else {
128 QString fileName(KFileDialog::getOpenFileName(mAlarmSound, 128 QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
129 i18n("*.wav|Wav Files"), 0)); 129 i18n("*.wav|Wav Files"), 0));
130 if (!fileName.isEmpty()) { 130 if (!fileName.isEmpty()) {
131 mAlarmSound = fileName; 131 mAlarmSound = fileName;
132 mAlarmLabel->setText( "..."+fileName.right( 30 ) ); 132 mAlarmLabel->setText( "..."+fileName.right( 30 ) );
133 QToolTip::remove(mAlarmSoundButton); 133 QToolTip::remove(mAlarmSoundButton);
134 QString dispStr = i18n("Playing '%1'").arg(fileName); 134 QString dispStr = i18n("Playing '%1'").arg(fileName);
135 QToolTip::add(mAlarmSoundButton, dispStr); 135 QToolTip::add(mAlarmSoundButton, dispStr);
136 mAlarmProgramButton->setOn(false); 136 mAlarmProgramButton->setOn(false);
137 mAlarmSoundButton->setOn(true); 137 mAlarmSoundButton->setOn(true);
138 } else { 138 } else {
139 mAlarmProgramButton->setOn(true); 139 mAlarmProgramButton->setOn(true);
140 mAlarmSoundButton->setOn(false); 140 mAlarmSoundButton->setOn(false);
141 141
142 } 142 }
143 } 143 }
144}; 144};
145 145
146void pickAlarmProgram() 146void pickAlarmProgram()
147{ 147{
148 if (!mAlarmProgramButton->isOn()) { 148 if (!mAlarmProgramButton->isOn()) {
149 //mAlarmProgram = ""; 149 //mAlarmProgram = "";
150 QToolTip::remove(mAlarmProgramButton); 150 QToolTip::remove(mAlarmProgramButton);
151 QToolTip::add(mAlarmProgramButton, i18n("No program set")); 151 QToolTip::add(mAlarmProgramButton, i18n("No program set"));
152 mAlarmProgramButton->setOn(false); 152 mAlarmProgramButton->setOn(false);
153 mAlarmSoundButton->setOn(true); 153 mAlarmSoundButton->setOn(true);
154 } else { 154 } else {
155 QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); 155 QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0));
156 if (!fileName.isEmpty()) { 156 if (!fileName.isEmpty()) {
157 mAlarmProgram = fileName; 157 mAlarmProgram = fileName;
158 mAlarmLabel->setText( "..."+fileName.right( 30 ) ); 158 mAlarmLabel->setText( "..."+fileName.right( 30 ) );
159 QToolTip::remove(mAlarmProgramButton); 159 QToolTip::remove(mAlarmProgramButton);
160 QString dispStr = i18n("Running '%1'").arg(fileName); 160 QString dispStr = i18n("Running '%1'").arg(fileName);
161 QToolTip::add(mAlarmProgramButton, dispStr); 161 QToolTip::add(mAlarmProgramButton, dispStr);
162 mAlarmSoundButton->setOn(false); 162 mAlarmSoundButton->setOn(false);
163 mAlarmProgramButton->setOn(true); 163 mAlarmProgramButton->setOn(true);
164 } else { 164 } else {
165 mAlarmProgramButton->setOn(false); 165 mAlarmProgramButton->setOn(false);
166 mAlarmSoundButton->setOn(true); 166 mAlarmSoundButton->setOn(true);
167 } 167 }