summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-30 11:54:09 (UTC)
committer zautrix <zautrix>2005-06-30 11:54:09 (UTC)
commit13eb32c82e736b033435e596111b7b0f3fe75608 (patch) (side-by-side diff)
treeeef906423ff08d368b6a803e6d8ae4b919936ca3
parentb03b54ce54c1391db8979db0df1369e1c68656fa (diff)
downloadkdepimpi-13eb32c82e736b033435e596111b7b0f3fe75608.zip
kdepimpi-13eb32c82e736b033435e596111b7b0f3fe75608.tar.gz
kdepimpi-13eb32c82e736b033435e596111b7b0f3fe75608.tar.bz2
fixx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--korganizer/koeditorgeneral.cpp5
-rw-r--r--korganizer/kolistview.cpp11
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 @@
{ "Manager","Manager" },
{ "Secrecy","Sichtbar" },
{ "male","männlich" },
{ "female","weiblich" },
{ "Hide!","Verbergen!" },
{ "Show!","Anzeigen!" },
{ "Details","Details" },
{ "Profession","Beruf" },
{ "Children","Kinder" },
{ "Department","Abteilung" },
{ "Backup cancelled","Backup abgebrochen" },
{ "Backup globally disabled","Backup global abgeschaltet" },
{ "Backup succesfully finished","Backup erfolgreich beendet" },
{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" },
{ "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" },
{ "Birthdays","Geburtstage" },
{ "KO/Pi import information!","KO/Pi Import Information!" },
{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" },
{ "Cancel - do not start"," Abbrechen - Todo nicht starten" },
{ "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?"" },
{ "Reload","Neu laden" },
{ "Timezone settings","Zeitzoneneinstellung" },
{ "Title: ","Titel: " },
{ "Journal from: ","Journal vom: " },
-{ "","" },
-{ "","" },
+{ "Journal: %1 from ","Journal: %1 vom " },
+{ "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" },
{ "","" },
{ "","" },
{ "","" },
{ "","" }, \ 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()
connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &)));
//KOGlobals::fitDialogToScreen( csd );
csd->setColorEnabled();
csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) );
csd->exec();
delete csd;
}
void KOEditorGeneral::showCatPopup()
{
mCatPopup->clear();
QStringList checkedCategories = QStringList::split (",", mCategoriesLabel->text());
int index = 0;
for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
it != KOPrefs::instance()->mCustomCategories.end ();
++it) {
mCatPopup->insertItem (*it, index );
//mCategory[index] = *it;
if (checkedCategories.find (*it) != checkedCategories.end ()) mCatPopup->setItemChecked (index, true);
++index;
}
}
void KOEditorGeneral::selectedCatPopup( int index )
{
- qDebug("i %d c %d ", index, KOPrefs::instance()->mCustomCategories.count());
QStringList categories = QStringList::split (",", mCategoriesLabel->text());
QString colcat = categories.first();
if (categories.find (KOPrefs::instance()->mCustomCategories[index]) != categories.end ())
categories.remove (KOPrefs::instance()->mCustomCategories[index]);
else
categories.insert (categories.end(), KOPrefs::instance()->mCustomCategories[index]);
categories.sort ();
if ( !colcat.isEmpty() ) {
if ( categories.find ( colcat ) != categories.end () ) {
categories.remove( colcat );
categories.prepend( colcat );
}
}
- mCategoriesLabel->setText( categories.join(",") );
+ setCategories( categories.join(",") );
}
void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout)
{
QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout );
mCatPopup = new QPopupMenu ( parent );
mCatPopup->setCheckable (true);
connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup()));
connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int )));
mCategoriesButton = new QPushButton(parent);
mCategoriesButton->setText(i18n("Categories"));
//connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() ));
categoriesLayout->addWidget(mCategoriesButton);
mCategoriesButton->setPopup( mCatPopup );
mCategoriesLabel = new QPushButton(parent);//new QLabel(parent);
mCategoriesLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
connect(mCategoriesLabel,SIGNAL(clicked()),this, SLOT(editCategories() ));
//mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken);
categoriesLayout->addWidget(mCategoriesLabel,1);
}
void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout)
{
QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout );
@@ -377,48 +376,50 @@ void KOEditorGeneral::disableAlarmEdit(bool disable)
void KOEditorGeneral::enableAlarm( bool enable )
{
enableAlarmEdit( enable );
}
void KOEditorGeneral::alarmDisable(bool disable)
{
if (!disable) {
//mAlarmBell->setEnabled(true);
mAlarmButton->setEnabled(true);
} else {
//mAlarmBell->setEnabled(false);
mAlarmButton->setEnabled(false);
mAlarmButton->setChecked(false);
mAlarmTimeEdit->setEnabled(false);
mAlarmSoundButton->setEnabled(false);
mAlarmProgramButton->setEnabled(false);
mAlarmIncrCombo->setEnabled(false);
}
}
void KOEditorGeneral::setCategories(const QString &str)
{
+ QString tt = str;
+ QToolTip::add( mCategoriesLabel, i18n("<b>Click here to edit categories: </b>") +"<em>"+tt.replace( QRegExp(","),", ")+"</em>");
mCategoriesLabel->setText(str);
}
void KOEditorGeneral::setDefaults(bool allDay)
{
#if 0
mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName());
#endif
mAlarmMessage = i18n("Edit new item");
enableAlarmEdit( !allDay );
// TODO: Implement a KPrefsComboItem to solve this in a clean way.
int alarmTime;
int a[] = { 1,5,10,15,30,60,180, 1440 };
int index = KOPrefs::instance()->mAlarmTime;
if (index < 0 || index > 7) {
alarmTime = 15;
} else {
alarmTime = a[index];
}
mAlarmButton ->setChecked( false );
mAlarmTimeEdit->setValue(alarmTime);
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()
if ( fn == "" )
return;
QFileInfo info;
info.setFile( fn );
QString mes;
bool createbup = true;
if ( info. exists() ) {
mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
i18n("Overwrite!"), i18n("Cancel"), 0,
0, 1 );
if ( result != 0 ) {
createbup = false;
}
}
if ( createbup ) {
QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") +
KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false);
Incidence *incidence = delSel.first();
icount = 0;
while ( incidence ) {
if ( incidence->typeID() == journalID ) {
text += "\n************************************\n";
- text += i18n("Journal from: ") +incidence->dtStartDateStr( false );
+ if ( !incidence->summary().isEmpty() )
+ text += i18n("Journal: %1 from ").arg( incidence->summary() ) +incidence->dtStartDateStr( false );
+ else
+ text += i18n("Journal from: ") +incidence->dtStartDateStr( false );
+ if ( !incidence->location().isEmpty() )
+ text +="\n(" + i18n("Location: ") + incidence->location()+ ")";
text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false);
text +="\n" + i18n("Description: ") + "\n"+ incidence->description();
++icount;
} else {
if ( !incidence->description().isEmpty() ) {
text += "\n************************************\n";
if ( incidence->typeID() == todoID )
text += i18n("To-Do: ");
text += incidence->summary();
+ if ( !incidence->location().isEmpty() )
+ text +="\n(" + i18n("Location: ") + incidence->location()+ ")";
if ( incidence->hasStartDate() )
text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false );
text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false);
- if ( !incidence->location().isEmpty() )
- text += "\n" +i18n("Location: ") + incidence->location();
text += "\n" + i18n("Description: ") + "\n" + incidence->description();
++icount;
}
}
incidence = delSel.next();
}
QFile file( fn );
if (!file.open( IO_WriteOnly ) ) {
topLevelWidget()->setCaption(i18n("File open error - nothing saved!") );
return;
}
QTextStream ts( &file );
ts << text;
file.close();
//qDebug("%s ", text.latin1());
mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount );
KOPrefs::instance()->mLastSaveFile = fn;
topLevelWidget()->setCaption(mes);
}
}
}
void KOListView::saveToFileVCS()
{