summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneral.cpp5
-rw-r--r--korganizer/kolistview.cpp11
2 files changed, 11 insertions, 5 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 50a04ea..5c94f62 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -150,39 +150,38 @@ void KOEditorGeneral::showCatPopup()
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() ));
@@ -389,24 +388,26 @@ void KOEditorGeneral::alarmDisable(bool disable)
//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 );
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 0c1ac7a..8f17e6e 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -658,40 +658,45 @@ void KOListView::saveDescriptionToFile()
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;
}