[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: osnabrueck_branch: kdepim/kaddressbook/features
From: Tobias Koenig <tokoe () kde ! org>
Date: 2004-01-08 13:47:32
Message-ID: 20040108134732.95B5D35CC () office ! kde ! org
[Download RAW message or body]
CVS commit by tokoe:
Add an additional radio button 'Preferred Address' to the email selection
dialog, that should increase the usability a bit and fixes #71915.
The patch is commited to osnabrueck_branch for now, because it introduces
a new string which hurts the current string freeze. It will be merged back
after KDE 3.2 will be released.
CCMAIL:71915-done@bugs.kde.org
M +10 -6 distributionlistwidget.cpp 1.20.2.2
M +4 -3 distributionlistwidget.h 1.12.2.1
--- kdepim/kaddressbook/features/distributionlistwidget.cpp #1.20.2.1:1.20.2.2
@@ -437,18 +437,22 @@ EmailSelector::EmailSelector( const QStr
topLayout->addWidget( mButtonGroup );
+ QRadioButton *button = new QRadioButton( i18n("Preferred Address"), mButtonGroup );
+ button->setDown( true );
+ mEmailMap.insert( mButtonGroup->id( button ), "" );
+
QStringList::ConstIterator it;
- for( it = emails.begin(); it != emails.end(); ++it ) {
- QRadioButton *button = new QRadioButton( *it, mButtonGroup );
- if ( (*it) == current ) {
+ for ( it = emails.begin(); it != emails.end(); ++it ) {
+ button = new QRadioButton( *it, mButtonGroup );
+ mEmailMap.insert( mButtonGroup->id( button ), *it );
+ if ( (*it) == current )
button->setDown( true );
}
- }
}
-QString EmailSelector::selected()
+QString EmailSelector::selected() const
{
QButton *button = mButtonGroup->selected();
if ( button )
- return button->text();
+ return mEmailMap[ mButtonGroup->id( button ) ];
return QString::null;
--- kdepim/kaddressbook/features/distributionlistwidget.h #1.12:1.12.2.1
@@ -117,5 +117,5 @@ class EmailSelector : public KDialogBase
QWidget *parent );
- QString selected();
+ QString selected() const;
static QString getEmail( const QStringList &emails, const QString ¤t,
@@ -124,4 +124,5 @@ class EmailSelector : public KDialogBase
private:
QButtonGroup *mButtonGroup;
+ QMap<int, QString> mEmailMap;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic