[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdepim/akregator/src
From: Frank Osterfeld <frank.osterfeld () kdemail ! net>
Date: 2005-07-31 19:07:47
Message-ID: 1122836867.145249.20791.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 441723 by osterfeld:
tag properties dialog: disable OK/Apply when lineedit is empty
for new tags, set name to "New Tag" instead of ""
M +1 -1 akregator_view.cpp
M +11 -0 tagpropertiesdialog.cpp
M +1 -2 tagpropertiesdialog.h
--- branches/KDE/3.5/kdepim/akregator/src/akregator_view.cpp #441722:441723
@@ -1087,7 +1087,7 @@
void View::slotNewTag()
{
TagPropertiesDialog* dlg = new TagPropertiesDialog(0);
- Tag tag(KApplication::randomString(8), "");
+ Tag tag(KApplication::randomString(8), i18n("New Tag"));
dlg->setTag(tag);
if (dlg->exec())
Kernel::self()->tagSet()->insert(tag);
--- branches/KDE/3.5/kdepim/akregator/src/tagpropertiesdialog.cpp #441722:441723
@@ -45,6 +45,9 @@
d->widget = new TagPropertiesWidgetBase(this);
setMainWidget(d->widget);
d->widget->le_title->setFocus();
+ enableButtonOK(false);
+ enableButtonApply(false);
+ connect(d->widget->le_title, SIGNAL(textChanged(const QString&)), this, \
SLOT(slotTextChanged(const QString& ))); }
TagPropertiesDialog::~TagPropertiesDialog()
@@ -58,6 +61,8 @@
d->tag = tag;
d->widget->le_title->setText(tag.name());
d->widget->iconButton->setIcon(tag.icon());
+ enableButtonOK(!tag.name().isEmpty());
+ enableButtonApply(!tag.name().isEmpty());
}
void TagPropertiesDialog::slotOk()
@@ -67,6 +72,12 @@
KDialogBase::slotOk();
}
+void TagPropertiesDialog::slotTextChanged(const QString& text)
+{
+ enableButtonOK(!text.isEmpty());
+ enableButtonApply(!text.isEmpty());
+}
+
void TagPropertiesDialog::slotApply()
{
d->tag.setName(d->widget->le_title->text());
--- branches/KDE/3.5/kdepim/akregator/src/tagpropertiesdialog.h #441722:441723
@@ -27,8 +27,6 @@
#include <kdialogbase.h>
-#include "tagpropertieswidgetbase.h"
-
namespace Akregator {
class Tag;
@@ -48,6 +46,7 @@
virtual void slotOk();
virtual void slotApply();
+ virtual void slotTextChanged(const QString& text);
private:
class TagPropertiesDialogPrivate;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic