Some adjustments to the picker according to the input from relevantive:

- Don't close the picker on pressing any "add to" button
  - Consequenty, Replace "OK" and "Cancel" by "Close"
  - Remove current selection after click

Both the new and the old behavior will be tested today.

CCMAIL:ellen@relevantive.de

svn path=/trunk/kdepim/; revision=382257
wilder-work
Daniel Molkentin 21 years ago
parent 784f2bafd1
commit f8999fa3ef
  1. 28
      recipientspicker.cpp
  2. 1
      recipientspicker.h

@ -228,18 +228,11 @@ RecipientsPicker::RecipientsPicker( QWidget *parent )
buttonLayout->addWidget( mBccButton );
connect( mBccButton, SIGNAL( clicked() ), SLOT( slotBccClicked() ) );
// BCC isn't commonly used, so hide it for now
mBccButton->hide();
//mBccButton->hide();
QPushButton *okButton = new QPushButton( i18n("&OK"), this );
buttonLayout->addWidget( okButton );
connect( okButton, SIGNAL( clicked() ), SLOT( slotOk() ) );
// It might be confusing to have "Add As ..." in addition to "Ok", so we might
// want to hide this button.
// okButton->hide();
QPushButton *cancelButton = new QPushButton( i18n("&Cancel"), this );
buttonLayout->addWidget( cancelButton );
connect( cancelButton, SIGNAL( clicked() ), SLOT( close() ) );
QPushButton *closeButton = new QPushButton( i18n("&Close"), this );
buttonLayout->addWidget( closeButton );
connect( closeButton, SIGNAL( clicked() ), SLOT( close() ) );
initCollections();
@ -253,9 +246,7 @@ RecipientsPicker::RecipientsPicker( QWidget *parent )
setTabOrder( mCollectionCombo, mSearchLine );
setTabOrder( mSearchLine, mRecipientList );
setTabOrder( mRecipientList, okButton );
setTabOrder( okButton, cancelButton );
setTabOrder( cancelButton, mCollectionCombo );
setTabOrder( closeButton, mCollectionCombo );
}
RecipientsPicker::~RecipientsPicker()
@ -415,11 +406,6 @@ void RecipientsPicker::slotBccClicked()
pick( Recipient::Bcc );
}
void RecipientsPicker::slotOk()
{
pick( Recipient::Undefined );
}
void RecipientsPicker::slotPicked( QListViewItem *viewItem )
{
kdDebug() << "RecipientsPicker::slotPicked()" << endl;
@ -429,7 +415,7 @@ void RecipientsPicker::slotPicked( QListViewItem *viewItem )
RecipientItem *i = item->recipientItem();
emit pickedRecipient( Recipient( i->recipient(), Recipient::Undefined ) );
}
close();
mRecipientList->clearSelection();
}
void RecipientsPicker::pick( Recipient::Type type )
@ -447,7 +433,7 @@ void RecipientsPicker::pick( Recipient::Type type )
}
}
}
close();
mRecipientList->clearSelection();
}
void RecipientsPicker::keyPressEvent( QKeyEvent *ev )

@ -141,7 +141,6 @@ class RecipientsPicker : public QWidget
void slotToClicked();
void slotCcClicked();
void slotBccClicked();
void slotOk();
void slotPicked( QListViewItem * );
void setFocusList();

Loading…
Cancel
Save