Rearranged the POP account dialog to unclutter and fit smaller resolutions. Also changed the inputbox to enter the port to be a

KNumInputBox.

svn path=/trunk/KDE/kdepim/; revision=819088
wilder-work
Michael Leupold 18 years ago
parent 494fa7c232
commit d90ccb143b
  1. 13
      accountdialog.cpp
  2. 424
      popsettings.ui

@ -367,7 +367,6 @@ void AccountDialog::makePopAccountPage()
// only letters, digits, '-', '.', ':' (IPv6) and '_' (for Windows
// compatibility) are allowed
mPop.ui.hostEdit->setValidator( mValidator );
mPop.ui.portEdit->setValidator( new QIntValidator(this) );
connect( mPop.ui.leaveOnServerCheck, SIGNAL( clicked() ),
this, SLOT( slotLeaveOnServerClicked() ) );
@ -566,7 +565,7 @@ void AccountDialog::setupSettings()
mPop.ui.loginEdit->setText( ap.login() );
mPop.ui.passwordEdit->setText( ap.passwd());
mPop.ui.hostEdit->setText( ap.host() );
mPop.ui.portEdit->setText( QString("%1").arg( ap.port() ) );
mPop.ui.portEdit->setValue( ap.port() );
mPop.ui.usePipeliningCheck->setChecked( ap.usePipelining() );
mPop.ui.storePasswordCheck->setChecked( ap.storePasswd() );
mPop.ui.leaveOnServerCheck->setChecked( ap.leaveOnServer() );
@ -863,8 +862,8 @@ void AccountDialog::slotPopEncryptionChanged( int id )
{
kDebug(5006) << "ID:" << id;
// adjust port
if ( id == Transport::EnumEncryption::SSL || mPop.ui.portEdit->text() == "995" )
mPop.ui.portEdit->setText( ( id == Transport::EnumEncryption::SSL ) ? "995" : "110" );
if ( id == Transport::EnumEncryption::SSL || mPop.ui.portEdit->value() == 995 )
mPop.ui.portEdit->setValue( ( id == Transport::EnumEncryption::SSL ) ? 995 : 110 );
enablePopFeatures();
const QAbstractButton *old = mPop.authButtonGroup->checkedButton();
@ -896,7 +895,7 @@ void AccountDialog::slotImapEncryptionChanged( int id )
void AccountDialog::slotCheckPopCapabilities()
{
if ( mPop.ui.hostEdit->text().isEmpty() || mPop.ui.portEdit->text().isEmpty() )
if ( mPop.ui.hostEdit->text().isEmpty() )
{
KMessageBox::sorry( this, i18n( "Please specify a server and port on "
"the General tab first." ) );
@ -909,7 +908,7 @@ void AccountDialog::slotCheckPopCapabilities()
encryptionType = Transport::EnumEncryption::SSL;
else
encryptionType = Transport::EnumEncryption::None;
mServerTest->setPort( encryptionType, mPop.ui.portEdit->text().toInt() );
mServerTest->setPort( encryptionType, mPop.ui.portEdit->value() );
mServerTest->setServer( mPop.ui.hostEdit->text() );
mServerTest->setProtocol( "pop" );
connect( mServerTest, SIGNAL( finished(QList<int>) ),
@ -1499,7 +1498,7 @@ void AccountDialog::initAccountForConnect()
if ( type == KAccount::Pop ) {
na.setHost( mPop.ui.hostEdit->text().trimmed() );
na.setPort( mPop.ui.portEdit->text().toInt() );
na.setPort( mPop.ui.portEdit->value() );
na.setLogin( mPop.ui.loginEdit->text().trimmed() );
na.setStorePasswd( mPop.ui.storePasswordCheck->isChecked() );
na.setPasswd( mPop.ui.passwordEdit->text(), na.storePasswd() );

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>506</width>
<height>611</height>
<width>465</width>
<height>444</height>
</rect>
</property>
<property name="windowTitle" >
@ -31,6 +31,12 @@
</item>
<item>
<widget class="QTabWidget" name="tabWidget" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex" >
<number>0</number>
</property>
@ -39,14 +45,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>486</width>
<height>536</height>
<width>445</width>
<height>370</height>
</rect>
</property>
<attribute name="title" >
<string>Gene&amp;ral</string>
</attribute>
<layout class="QGridLayout" name="gridLayout" >
<layout class="QGridLayout" name="gridLayout_3" >
<item row="0" column="0" >
<widget class="QLabel" name="label_2" >
<property name="whatsThis" >
@ -117,7 +123,14 @@
</widget>
</item>
<item row="4" column="1" >
<widget class="KLineEdit" name="portEdit" />
<widget class="KIntNumInput" name="portEdit" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>65535</number>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2" >
<widget class="QCheckBox" name="storePasswordCheck" >
@ -127,156 +140,20 @@
</widget>
</item>
<item row="6" column="0" colspan="2" >
<widget class="QCheckBox" name="leaveOnServerCheck" >
<property name="text" >
<string>Lea&amp;ve fetched messages on the server</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2" >
<layout class="QHBoxLayout" name="horizontalLayout_3" >
<item>
<widget class="QCheckBox" name="leaveOnServerDaysCheck" >
<property name="text" >
<string>Leave messages on the server for</string>
</property>
</widget>
</item>
<item>
<widget class="KIntNumInput" name="leaveOnServerDaysSpin" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="value" >
<number>1</number>
</property>
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>365</number>
</property>
<property name="suffix" >
<string> days</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="0" colspan="2" >
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<widget class="QCheckBox" name="leaveOnServerCountCheck" >
<property name="text" >
<string>Keep onl&amp;y the last</string>
</property>
</widget>
</item>
<item>
<widget class="KIntNumInput" name="leaveOnServerCountSpin" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="value" >
<number>100</number>
</property>
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>999999</number>
</property>
<property name="suffix" >
<string> messages</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="9" column="0" colspan="2" >
<layout class="QHBoxLayout" name="horizontalLayout_2" >
<item>
<widget class="QCheckBox" name="leaveOnServerSizeCheck" >
<property name="text" >
<string>Keep only the last</string>
</property>
</widget>
</item>
<item>
<widget class="KIntNumInput" name="leaveOnServerSizeSpin" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="value" >
<number>10</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>999999</number>
</property>
<property name="suffix" >
<string> MB</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="10" column="0" colspan="2" >
<widget class="QCheckBox" name="includeInCheck" >
<property name="text" >
<string>Include in man&amp;ual mail check</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="2" >
<layout class="QHBoxLayout" name="horizontalLayout_4" >
<item>
<widget class="QCheckBox" name="filterOnServerCheck" >
<property name="whatsThis" >
<string>If you select this option, POP Filters will be used to decide what to do with messages. You can then select to download, delete or keep them on the server.</string>
</property>
<property name="text" >
<string>&amp;Filter messages if they are greater than</string>
</property>
</widget>
</item>
<item>
<widget class="KIntNumInput" name="filterOnServerSizeSpin" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="whatsThis" >
<string>If you select this option, POP Filters will be used to decide what to do with messages. You can then select to download, delete or keep them on the server.</string>
</property>
<property name="value" >
<number>50000</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>10000000</number>
</property>
<property name="referencePoint" >
<number>100</number>
</property>
<property name="suffix" >
<string> bytes</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="12" column="0" colspan="2" >
<item row="7" column="0" colspan="2" >
<widget class="QCheckBox" name="intervalCheck" >
<property name="text" >
<string>Enable &amp;interval mail checking</string>
</property>
</widget>
</item>
<item row="13" column="0" >
<item row="8" column="0" >
<widget class="QLabel" name="intervalLabel" >
<property name="text" >
<string>Chec&amp;k interval:</string>
@ -286,7 +163,7 @@
</property>
</widget>
</item>
<item row="13" column="1" >
<item row="8" column="1" >
<widget class="KIntNumInput" name="intervalSpin" >
<property name="minimum" >
<number>0</number>
@ -296,58 +173,240 @@
</property>
</widget>
</item>
<item row="14" column="0" >
<widget class="QLabel" name="label_8" >
<item row="9" column="0" >
<spacer name="verticalSpacer_2" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="page2" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>445</width>
<height>370</height>
</rect>
</property>
<attribute name="title" >
<string>&amp;Advanced</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2" >
<property name="horizontalSpacing" >
<number>12</number>
</property>
<item row="0" column="0" colspan="2" >
<widget class="QCheckBox" name="leaveOnServerCheck" >
<property name="text" >
<string>Des&amp;tination folder:</string>
<string>Lea&amp;ve fetched messages on the server</string>
</property>
<property name="buddy" >
<cstring>folderCombo</cstring>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="leaveOnServerDaysCheck" >
<property name="text" >
<string>Leave messages on the server for</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="KIntNumInput" name="leaveOnServerDaysSpin" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="value" >
<number>1</number>
</property>
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>365</number>
</property>
<property name="suffix" >
<string> days</string>
</property>
</widget>
</item>
<item row="14" column="1" >
<widget class="QComboBox" name="folderCombo" />
<item row="2" column="0" >
<widget class="QCheckBox" name="leaveOnServerCountCheck" >
<property name="text" >
<string>Keep onl&amp;y the last</string>
</property>
</widget>
</item>
<item row="15" column="0" >
<widget class="QLabel" name="label_9" >
<item row="2" column="1" >
<widget class="KIntNumInput" name="leaveOnServerCountSpin" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="value" >
<number>100</number>
</property>
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>999999</number>
</property>
<property name="suffix" >
<string> messages</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="leaveOnServerSizeCheck" >
<property name="text" >
<string>Pre-com&amp;mand:</string>
<string>Keep only the last</string>
</property>
<property name="buddy" >
<cstring>precommand</cstring>
</widget>
</item>
<item row="3" column="1" >
<widget class="KIntNumInput" name="leaveOnServerSizeSpin" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="value" >
<number>10</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>999999</number>
</property>
<property name="suffix" >
<string> MB</string>
</property>
</widget>
</item>
<item row="15" column="1" >
<widget class="KLineEdit" name="precommand" />
<item row="4" column="0" >
<widget class="QCheckBox" name="filterOnServerCheck" >
<property name="whatsThis" >
<string>If you select this option, POP Filters will be used to decide what to do with messages. You can then select to download, delete or keep them on the server.</string>
</property>
<property name="text" >
<string>&amp;Filter messages if they are greater than</string>
</property>
</widget>
</item>
<item row="16" column="0" >
<spacer name="verticalSpacer_2" >
<item row="4" column="1" >
<widget class="KIntNumInput" name="filterOnServerSizeSpin" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="whatsThis" >
<string>If you select this option, POP Filters will be used to decide what to do with messages. You can then select to download, delete or keep them on the server.</string>
</property>
<property name="value" >
<number>50000</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>10000000</number>
</property>
<property name="referencePoint" >
<number>100</number>
</property>
<property name="suffix" >
<string> bytes</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2" >
<layout class="QGridLayout" name="gridLayout" >
<property name="sizeConstraint" >
<enum>QLayout::SetMinimumSize</enum>
</property>
<property name="spacing" >
<number>4</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="label_8" >
<property name="text" >
<string>Des&amp;tination folder:</string>
</property>
<property name="buddy" >
<cstring>folderCombo</cstring>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="folderCombo" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<string>Pre-com&amp;mand:</string>
</property>
<property name="buddy" >
<cstring>precommand</cstring>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="KLineEdit" name="precommand" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="0" colspan="2" >
<spacer name="verticalSpacer_3" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0" colspan="2" >
<widget class="QCheckBox" name="usePipeliningCheck" >
<property name="text" >
<string>&amp;Use pipelining for faster mail download</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page2" >
<widget class="QWidget" name="page3" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>486</width>
<height>536</height>
<width>426</width>
<height>370</height>
</rect>
</property>
<attribute name="title" >
<string>&amp;Extras</string>
<string>S&amp;ecurity</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4" >
<item>
@ -422,57 +481,57 @@
<property name="title" >
<string>Authentication Method</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<layout class="QGridLayout" name="gridLayout_4" >
<item row="0" column="0" >
<widget class="QRadioButton" name="authUser" >
<property name="text" >
<string>Clear te&amp;xt</string>
</property>
</widget>
</item>
<item>
<item row="1" column="0" >
<widget class="QRadioButton" name="authLogin" >
<property name="text" >
<string>&amp;LOGIN</string>
</property>
</widget>
</item>
<item>
<item row="2" column="0" >
<widget class="QRadioButton" name="authPlain" >
<property name="text" >
<string>&amp;PLAIN</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="authCRAM_MD5" >
<item row="5" column="0" >
<widget class="QRadioButton" name="authNTLM" >
<property name="text" >
<string>CRAM-MD&amp;5</string>
<string>NTL&amp;M</string>
</property>
</widget>
</item>
<item>
<item row="0" column="1" >
<widget class="QRadioButton" name="authDigestMd5" >
<property name="text" >
<string>&amp;DIGEST-MD5</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="authNTLM" >
<item row="1" column="1" >
<widget class="QRadioButton" name="authCRAM_MD5" >
<property name="text" >
<string>NTL&amp;M</string>
<string>CRAM-MD&amp;5</string>
</property>
</widget>
</item>
<item>
<item row="2" column="1" >
<widget class="QRadioButton" name="authGSSAPI" >
<property name="text" >
<string>&amp;GSSAPI</string>
</property>
</widget>
</item>
<item>
<item row="5" column="1" >
<widget class="QRadioButton" name="authAPOP" >
<property name="text" >
<string>&amp;APOP</string>
@ -482,13 +541,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="usePipeliningCheck" >
<property name="text" >
<string>&amp;Use pipelining for faster mail download</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer" >
<property name="orientation" >

Loading…
Cancel
Save