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
@@ -1187,39 +1187,38 @@
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
@@ -335,93 +335,98 @@ void KOListView::updateList()
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(",");
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index 78004fe..bd5bd12 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -47,49 +47,49 @@ using namespace KCal;
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 ) );