[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/akonadi/resources/microblog
From: Sebastian Kügler <sebas () kde ! org>
Date: 2009-04-04 14:53:12
Message-ID: 1238856792.137756.25123.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 949137 by sebas:
Polishing the config dialog a bit
- test button is only enabled when there's something in the username field
- rearrange widgets a bit, and make it quicker to understand
M +10 -4 configdialog.cpp
M +1 -0 configdialog.h
M +24 -3 microblogconfig.ui
--- trunk/KDE/kdepim/akonadi/resources/microblog/configdialog.cpp #949136:949137
@@ -46,8 +46,10 @@
ui.kcfg_Name->setText( usersName );
}
setButtons( KDialog::Ok | KDialog::Cancel );
+ ui.testButton->setEnabled(false);
connect( ui.testButton, SIGNAL( clicked() ), SLOT( slotTestClicked() ) );
- connect( ui.welcomelabel, SIGNAL( linkActivated ( const QString & ) ), SLOT( \
slotLinkClicked() ) ); + connect( ui.kcfg_UserName, SIGNAL(textChanged(const \
QString&)), SLOT(slotTextChanged(const QString&))); + connect( ui.openidLabel, \
SIGNAL( linkActivated ( const QString & ) ), SLOT( slotLinkClicked() ) ); }
ConfigDialog::~ConfigDialog()
@@ -59,7 +61,6 @@
{
kDebug() << "Test request" << ui.kcfg_Service->currentIndex()
<< ui.kcfg_UserName->text() << ui.password->text();
-
setCursor( Qt::BusyCursor );
ui.statusLabel->setText( i18n( "Checking..." ) );
ui.testButton->setEnabled( false );
@@ -68,8 +69,13 @@
m_comm->checkAuth();
}
-void ConfigDialog::slotButtonClicked( int button )
+void ConfigDialog::slotTextChanged(const QString &text)
{
+ ui.testButton->setEnabled(!text.isEmpty());
+}
+
+void ConfigDialog::slotButtonClicked( int button )
+{
if (button == KDialog::Ok) {
Settings::self()->setPassword( ui.password->text() );
mManager->updateSettings();
@@ -97,7 +103,7 @@
ui.testButton->setEnabled( true );
}
-void ConfigDialog::slotLinkClicked()
+void ConfigDialog::slotLinkClicked()
{
QWhatsThis::showText( QCursor::pos(), i18n( "OpenId users must first setup a \
password in "
"the settings on the webpage. We can not use OpenId unfortunately." ), this \
);
--- trunk/KDE/kdepim/akonadi/resources/microblog/configdialog.h #949136:949137
@@ -42,6 +42,7 @@
void slotAuthOk();
void slotAuthFailed( const QString& );
void slotLinkClicked();
+ void slotTextChanged(const QString &text);
private:
Ui::ConfigDialog ui;
--- trunk/KDE/kdepim/akonadi/resources/microblog/microblogconfig.ui #949136:949137
@@ -6,15 +6,25 @@
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
- <height>223</height>
+ <width>280</width>
+ <height>250</height>
</rect>
</property>
+ <property name="minimumSize">
+ <size>
+ <width>280</width>
+ <height>250</height>
+ </size>
+ </property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="welcomelabel">
<property name="text">
- <string>This is where you can setup your account. <a \
href="whatsthis">Note for OpenId users</a></string> + \
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> \
+<html><head><meta name="qrichtext" content="1" \
/><style type="text/css"> +p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Liberation Sans'; \
font-size:9pt; font-weight:400; font-style:normal;"> +<p \
align="center" style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;"><span style=" font-weight:600;">Account \
Details</span></p></body></html></string> </property>
<property name="wordWrap">
<bool>true</bool>
@@ -131,6 +141,17 @@
</layout>
</item>
<item>
+ <widget class="QLabel" name="openidLabel">
+ <property name="text">
+ <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> \
+<html><head><meta name="qrichtext" content="1" \
/><style type="text/css"> +p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Liberation Sans'; \
font-size:9pt; font-weight:400; font-style:normal;"> +<p \
align="right" style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;"><a href="tomaistheking"><span \
style=" text-decoration: underline; color:#0000ff;">Using \
OpenID?</span></a></p></body></html></string> + \
</property> + </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic