[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. &lt;a \
href=&quot;whatsthis&quot;&gt;Note for OpenId users&lt;/a&gt;</string> +      \
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; \
&quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; \
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; \
/&gt;&lt;style type=&quot;text/css&quot;&gt; +p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Liberation Sans'; \
font-size:9pt; font-weight:400; font-style:normal;&quot;&gt; +&lt;p \
align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Account \
Details&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>  </property>
      <property name="wordWrap">
       <bool>true</bool>
@@ -131,6 +141,17 @@
     </layout>
    </item>
    <item>
+    <widget class="QLabel" name="openidLabel">
+     <property name="text">
+      <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; \
&quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; \
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; \
/&gt;&lt;style type=&quot;text/css&quot;&gt; +p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Liberation Sans'; \
font-size:9pt; font-weight:400; font-style:normal;&quot;&gt; +&lt;p \
align=&quot;right&quot; style=&quot; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;&quot;&gt;&lt;a href=&quot;tomaistheking&quot;&gt;&lt;span \
style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Using \
OpenID?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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