-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 4 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 5 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 11 |
3 files changed, 13 insertions, 7 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 2977795..3daf215 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1443,30 +1443,30 @@ | |||
1443 | { "Manager","Manager" }, | 1443 | { "Manager","Manager" }, |
1444 | { "Secrecy","Sichtbar" }, | 1444 | { "Secrecy","Sichtbar" }, |
1445 | { "male","männlich" }, | 1445 | { "male","männlich" }, |
1446 | { "female","weiblich" }, | 1446 | { "female","weiblich" }, |
1447 | { "Hide!","Verbergen!" }, | 1447 | { "Hide!","Verbergen!" }, |
1448 | { "Show!","Anzeigen!" }, | 1448 | { "Show!","Anzeigen!" }, |
1449 | { "Details","Details" }, | 1449 | { "Details","Details" }, |
1450 | { "Profession","Beruf" }, | 1450 | { "Profession","Beruf" }, |
1451 | { "Children","Kinder" }, | 1451 | { "Children","Kinder" }, |
1452 | { "Department","Abteilung" }, | 1452 | { "Department","Abteilung" }, |
1453 | { "Backup cancelled","Backup abgebrochen" }, | 1453 | { "Backup cancelled","Backup abgebrochen" }, |
1454 | { "Backup globally disabled","Backup global abgeschaltet" }, | 1454 | { "Backup globally disabled","Backup global abgeschaltet" }, |
1455 | { "Backup succesfully finished","Backup erfolgreich beendet" }, | 1455 | { "Backup succesfully finished","Backup erfolgreich beendet" }, |
1456 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, | 1456 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, |
1457 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, | 1457 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, |
1458 | { "Birthdays","Geburtstage" }, | 1458 | { "Birthdays","Geburtstage" }, |
1459 | { "KO/Pi import information!","KO/Pi Import Information!" }, | 1459 | { "KO/Pi import information!","KO/Pi Import Information!" }, |
1460 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, | 1460 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, |
1461 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, | 1461 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, |
1462 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, | 1462 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, |
1463 | { "Reload","Neu laden" }, | 1463 | { "Reload","Neu laden" }, |
1464 | { "Timezone settings","Zeitzoneneinstellung" }, | 1464 | { "Timezone settings","Zeitzoneneinstellung" }, |
1465 | { "Title: ","Titel: " }, | 1465 | { "Title: ","Titel: " }, |
1466 | { "Journal from: ","Journal vom: " }, | 1466 | { "Journal from: ","Journal vom: " }, |
1467 | { "","" }, | 1467 | { "Journal: %1 from ","Journal: %1 vom " }, |
1468 | { "","" }, | 1468 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, |
1469 | { "","" }, | 1469 | { "","" }, |
1470 | { "","" }, | 1470 | { "","" }, |
1471 | { "","" }, | 1471 | { "","" }, |
1472 | { "","" }, \ No newline at end of file | 1472 | { "","" }, \ No newline at end of file |
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 50a04ea..5c94f62 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp | |||
@@ -138,63 +138,62 @@ void KOEditorGeneral::editCategories() | |||
138 | connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &))); | 138 | connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &))); |
139 | //KOGlobals::fitDialogToScreen( csd ); | 139 | //KOGlobals::fitDialogToScreen( csd ); |
140 | csd->setColorEnabled(); | 140 | csd->setColorEnabled(); |
141 | csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) ); | 141 | csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) ); |
142 | csd->exec(); | 142 | csd->exec(); |
143 | delete csd; | 143 | delete csd; |
144 | } | 144 | } |
145 | 145 | ||
146 | void KOEditorGeneral::showCatPopup() | 146 | void KOEditorGeneral::showCatPopup() |
147 | { | 147 | { |
148 | mCatPopup->clear(); | 148 | mCatPopup->clear(); |
149 | QStringList checkedCategories = QStringList::split (",", mCategoriesLabel->text()); | 149 | QStringList checkedCategories = QStringList::split (",", mCategoriesLabel->text()); |
150 | int index = 0; | 150 | int index = 0; |
151 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 151 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
152 | it != KOPrefs::instance()->mCustomCategories.end (); | 152 | it != KOPrefs::instance()->mCustomCategories.end (); |
153 | ++it) { | 153 | ++it) { |
154 | mCatPopup->insertItem (*it, index ); | 154 | mCatPopup->insertItem (*it, index ); |
155 | //mCategory[index] = *it; | 155 | //mCategory[index] = *it; |
156 | if (checkedCategories.find (*it) != checkedCategories.end ()) mCatPopup->setItemChecked (index, true); | 156 | if (checkedCategories.find (*it) != checkedCategories.end ()) mCatPopup->setItemChecked (index, true); |
157 | ++index; | 157 | ++index; |
158 | } | 158 | } |
159 | } | 159 | } |
160 | void KOEditorGeneral::selectedCatPopup( int index ) | 160 | void KOEditorGeneral::selectedCatPopup( int index ) |
161 | { | 161 | { |
162 | qDebug("i %d c %d ", index, KOPrefs::instance()->mCustomCategories.count()); | ||
163 | QStringList categories = QStringList::split (",", mCategoriesLabel->text()); | 162 | QStringList categories = QStringList::split (",", mCategoriesLabel->text()); |
164 | QString colcat = categories.first(); | 163 | QString colcat = categories.first(); |
165 | if (categories.find (KOPrefs::instance()->mCustomCategories[index]) != categories.end ()) | 164 | if (categories.find (KOPrefs::instance()->mCustomCategories[index]) != categories.end ()) |
166 | categories.remove (KOPrefs::instance()->mCustomCategories[index]); | 165 | categories.remove (KOPrefs::instance()->mCustomCategories[index]); |
167 | else | 166 | else |
168 | categories.insert (categories.end(), KOPrefs::instance()->mCustomCategories[index]); | 167 | categories.insert (categories.end(), KOPrefs::instance()->mCustomCategories[index]); |
169 | categories.sort (); | 168 | categories.sort (); |
170 | if ( !colcat.isEmpty() ) { | 169 | if ( !colcat.isEmpty() ) { |
171 | if ( categories.find ( colcat ) != categories.end () ) { | 170 | if ( categories.find ( colcat ) != categories.end () ) { |
172 | categories.remove( colcat ); | 171 | categories.remove( colcat ); |
173 | categories.prepend( colcat ); | 172 | categories.prepend( colcat ); |
174 | } | 173 | } |
175 | } | 174 | } |
176 | mCategoriesLabel->setText( categories.join(",") ); | 175 | setCategories( categories.join(",") ); |
177 | } | 176 | } |
178 | 177 | ||
179 | void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout) | 178 | void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout) |
180 | { | 179 | { |
181 | QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout ); | 180 | QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout ); |
182 | mCatPopup = new QPopupMenu ( parent ); | 181 | mCatPopup = new QPopupMenu ( parent ); |
183 | mCatPopup->setCheckable (true); | 182 | mCatPopup->setCheckable (true); |
184 | connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup())); | 183 | connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup())); |
185 | connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int ))); | 184 | connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int ))); |
186 | mCategoriesButton = new QPushButton(parent); | 185 | mCategoriesButton = new QPushButton(parent); |
187 | mCategoriesButton->setText(i18n("Categories")); | 186 | mCategoriesButton->setText(i18n("Categories")); |
188 | //connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() )); | 187 | //connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() )); |
189 | categoriesLayout->addWidget(mCategoriesButton); | 188 | categoriesLayout->addWidget(mCategoriesButton); |
190 | mCategoriesButton->setPopup( mCatPopup ); | 189 | mCategoriesButton->setPopup( mCatPopup ); |
191 | mCategoriesLabel = new QPushButton(parent);//new QLabel(parent); | 190 | mCategoriesLabel = new QPushButton(parent);//new QLabel(parent); |
192 | mCategoriesLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); | 191 | mCategoriesLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); |
193 | connect(mCategoriesLabel,SIGNAL(clicked()),this, SLOT(editCategories() )); | 192 | connect(mCategoriesLabel,SIGNAL(clicked()),this, SLOT(editCategories() )); |
194 | //mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken); | 193 | //mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken); |
195 | categoriesLayout->addWidget(mCategoriesLabel,1); | 194 | categoriesLayout->addWidget(mCategoriesLabel,1); |
196 | } | 195 | } |
197 | 196 | ||
198 | void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) | 197 | void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) |
199 | { | 198 | { |
200 | QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout ); | 199 | QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout ); |
@@ -377,48 +376,50 @@ void KOEditorGeneral::disableAlarmEdit(bool disable) | |||
377 | 376 | ||
378 | void KOEditorGeneral::enableAlarm( bool enable ) | 377 | void KOEditorGeneral::enableAlarm( bool enable ) |
379 | { | 378 | { |
380 | enableAlarmEdit( enable ); | 379 | enableAlarmEdit( enable ); |
381 | } | 380 | } |
382 | 381 | ||
383 | void KOEditorGeneral::alarmDisable(bool disable) | 382 | void KOEditorGeneral::alarmDisable(bool disable) |
384 | { | 383 | { |
385 | if (!disable) { | 384 | if (!disable) { |
386 | //mAlarmBell->setEnabled(true); | 385 | //mAlarmBell->setEnabled(true); |
387 | mAlarmButton->setEnabled(true); | 386 | mAlarmButton->setEnabled(true); |
388 | } else { | 387 | } else { |
389 | //mAlarmBell->setEnabled(false); | 388 | //mAlarmBell->setEnabled(false); |
390 | mAlarmButton->setEnabled(false); | 389 | mAlarmButton->setEnabled(false); |
391 | mAlarmButton->setChecked(false); | 390 | mAlarmButton->setChecked(false); |
392 | mAlarmTimeEdit->setEnabled(false); | 391 | mAlarmTimeEdit->setEnabled(false); |
393 | mAlarmSoundButton->setEnabled(false); | 392 | mAlarmSoundButton->setEnabled(false); |
394 | mAlarmProgramButton->setEnabled(false); | 393 | mAlarmProgramButton->setEnabled(false); |
395 | mAlarmIncrCombo->setEnabled(false); | 394 | mAlarmIncrCombo->setEnabled(false); |
396 | } | 395 | } |
397 | } | 396 | } |
398 | 397 | ||
399 | void KOEditorGeneral::setCategories(const QString &str) | 398 | void KOEditorGeneral::setCategories(const QString &str) |
400 | { | 399 | { |
400 | QString tt = str; | ||
401 | QToolTip::add( mCategoriesLabel, i18n("<b>Click here to edit categories: </b>") +"<em>"+tt.replace( QRegExp(","),", ")+"</em>"); | ||
401 | mCategoriesLabel->setText(str); | 402 | mCategoriesLabel->setText(str); |
402 | } | 403 | } |
403 | 404 | ||
404 | void KOEditorGeneral::setDefaults(bool allDay) | 405 | void KOEditorGeneral::setDefaults(bool allDay) |
405 | { | 406 | { |
406 | #if 0 | 407 | #if 0 |
407 | mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName()); | 408 | mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName()); |
408 | #endif | 409 | #endif |
409 | 410 | ||
410 | mAlarmMessage = i18n("Edit new item"); | 411 | mAlarmMessage = i18n("Edit new item"); |
411 | enableAlarmEdit( !allDay ); | 412 | enableAlarmEdit( !allDay ); |
412 | 413 | ||
413 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. | 414 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. |
414 | int alarmTime; | 415 | int alarmTime; |
415 | int a[] = { 1,5,10,15,30,60,180, 1440 }; | 416 | int a[] = { 1,5,10,15,30,60,180, 1440 }; |
416 | int index = KOPrefs::instance()->mAlarmTime; | 417 | int index = KOPrefs::instance()->mAlarmTime; |
417 | if (index < 0 || index > 7) { | 418 | if (index < 0 || index > 7) { |
418 | alarmTime = 15; | 419 | alarmTime = 15; |
419 | } else { | 420 | } else { |
420 | alarmTime = a[index]; | 421 | alarmTime = a[index]; |
421 | } | 422 | } |
422 | mAlarmButton ->setChecked( false ); | 423 | mAlarmButton ->setChecked( false ); |
423 | mAlarmTimeEdit->setValue(alarmTime); | 424 | mAlarmTimeEdit->setValue(alarmTime); |
424 | mAlarmIncrCombo->setCurrentItem(0); | 425 | mAlarmIncrCombo->setCurrentItem(0); |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 0c1ac7a..8f17e6e 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -646,64 +646,69 @@ void KOListView::saveDescriptionToFile() | |||
646 | 646 | ||
647 | if ( fn == "" ) | 647 | if ( fn == "" ) |
648 | return; | 648 | return; |
649 | QFileInfo info; | 649 | QFileInfo info; |
650 | info.setFile( fn ); | 650 | info.setFile( fn ); |
651 | QString mes; | 651 | QString mes; |
652 | bool createbup = true; | 652 | bool createbup = true; |
653 | if ( info. exists() ) { | 653 | if ( info. exists() ) { |
654 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 654 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
655 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 655 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
656 | i18n("Overwrite!"), i18n("Cancel"), 0, | 656 | i18n("Overwrite!"), i18n("Cancel"), 0, |
657 | 0, 1 ); | 657 | 0, 1 ); |
658 | if ( result != 0 ) { | 658 | if ( result != 0 ) { |
659 | createbup = false; | 659 | createbup = false; |
660 | } | 660 | } |
661 | } | 661 | } |
662 | if ( createbup ) { | 662 | if ( createbup ) { |
663 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + | 663 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + |
664 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); | 664 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); |
665 | Incidence *incidence = delSel.first(); | 665 | Incidence *incidence = delSel.first(); |
666 | icount = 0; | 666 | icount = 0; |
667 | while ( incidence ) { | 667 | while ( incidence ) { |
668 | if ( incidence->typeID() == journalID ) { | 668 | if ( incidence->typeID() == journalID ) { |
669 | text += "\n************************************\n"; | 669 | text += "\n************************************\n"; |
670 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); | 670 | if ( !incidence->summary().isEmpty() ) |
671 | text += i18n("Journal: %1 from ").arg( incidence->summary() ) +incidence->dtStartDateStr( false ); | ||
672 | else | ||
673 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); | ||
674 | if ( !incidence->location().isEmpty() ) | ||
675 | text +="\n(" + i18n("Location: ") + incidence->location()+ ")"; | ||
671 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 676 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
672 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); | 677 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); |
673 | ++icount; | 678 | ++icount; |
674 | 679 | ||
675 | } else { | 680 | } else { |
676 | if ( !incidence->description().isEmpty() ) { | 681 | if ( !incidence->description().isEmpty() ) { |
677 | text += "\n************************************\n"; | 682 | text += "\n************************************\n"; |
678 | if ( incidence->typeID() == todoID ) | 683 | if ( incidence->typeID() == todoID ) |
679 | text += i18n("To-Do: "); | 684 | text += i18n("To-Do: "); |
680 | text += incidence->summary(); | 685 | text += incidence->summary(); |
686 | if ( !incidence->location().isEmpty() ) | ||
687 | text +="\n(" + i18n("Location: ") + incidence->location()+ ")"; | ||
681 | if ( incidence->hasStartDate() ) | 688 | if ( incidence->hasStartDate() ) |
682 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); | 689 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); |
683 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 690 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
684 | if ( !incidence->location().isEmpty() ) | ||
685 | text += "\n" +i18n("Location: ") + incidence->location(); | ||
686 | text += "\n" + i18n("Description: ") + "\n" + incidence->description(); | 691 | text += "\n" + i18n("Description: ") + "\n" + incidence->description(); |
687 | ++icount; | 692 | ++icount; |
688 | 693 | ||
689 | } | 694 | } |
690 | } | 695 | } |
691 | incidence = delSel.next(); | 696 | incidence = delSel.next(); |
692 | } | 697 | } |
693 | QFile file( fn ); | 698 | QFile file( fn ); |
694 | if (!file.open( IO_WriteOnly ) ) { | 699 | if (!file.open( IO_WriteOnly ) ) { |
695 | topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); | 700 | topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); |
696 | return; | 701 | return; |
697 | } | 702 | } |
698 | QTextStream ts( &file ); | 703 | QTextStream ts( &file ); |
699 | ts << text; | 704 | ts << text; |
700 | file.close(); | 705 | file.close(); |
701 | //qDebug("%s ", text.latin1()); | 706 | //qDebug("%s ", text.latin1()); |
702 | mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); | 707 | mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); |
703 | KOPrefs::instance()->mLastSaveFile = fn; | 708 | KOPrefs::instance()->mLastSaveFile = fn; |
704 | topLevelWidget()->setCaption(mes); | 709 | topLevelWidget()->setCaption(mes); |
705 | } | 710 | } |
706 | } | 711 | } |
707 | } | 712 | } |
708 | void KOListView::saveToFileVCS() | 713 | void KOListView::saveToFileVCS() |
709 | { | 714 | { |