Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 50a04ea..5c94f62 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp | |||
@@ -158,9 +158,8 @@ void KOEditorGeneral::showCatPopup() | |||
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]); |
@@ -172,9 +171,9 @@ void KOEditorGeneral::selectedCatPopup( int index ) | |||
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 | { |
@@ -397,8 +396,10 @@ void KOEditorGeneral::alarmDisable(bool disable) | |||
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) |