1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 15:47:38 +02:00

Try to make xmppconfigdialog more friendly to user joe

This commit is contained in:
Dominik Schmidt
2013-01-24 00:21:06 +01:00
parent 643dda78dc
commit 21897ef024
3 changed files with 311 additions and 258 deletions

View File

@@ -49,6 +49,8 @@ XmppConfigWidget::XmppConfigWidget( XmppAccount* account, QWidget *parent )
m_ui->xmppEnforceSecureCheckbox->setChecked( account->configuration().contains( "enforcesecure" ) ? account->configuration()[ "enforcesecure" ].toBool() : false); m_ui->xmppEnforceSecureCheckbox->setChecked( account->configuration().contains( "enforcesecure" ) ? account->configuration()[ "enforcesecure" ].toBool() : false);
m_ui->jidExistsLabel->hide(); m_ui->jidExistsLabel->hide();
m_ui->tabWidget->setCurrentIndex( 0 );
connect( m_ui->xmppUsername, SIGNAL( textChanged( QString ) ), SLOT( onCheckJidExists( QString ) ) ); connect( m_ui->xmppUsername, SIGNAL( textChanged( QString ) ), SLOT( onCheckJidExists( QString ) ) );
} }

View File

@@ -1,18 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>XmppConfigWidget</class> <class>XmppConfigWidget</class>
<widget class="QWidget" name="XmppConfig"> <widget class="QWidget" name="XmppConfigWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>451</width> <width>461</width>
<height>335</height> <height>384</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Xmpp Configuration</string> <string>Xmpp Configuration</string>
</property> </property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
@@ -69,7 +72,30 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <widget class="QTabWidget" name="tabWidget">
<property name="tabPosition">
<enum>QTabWidget::North</enum>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="general">
<attribute name="title">
<string>General</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>&lt;b&gt;Login&lt;/b&gt;</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<spacer name="horizontalSpacer_3"> <spacer name="horizontalSpacer_3">
<property name="orientation"> <property name="orientation">
@@ -105,12 +131,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Login Information</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
@@ -192,24 +212,68 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
<zorder>verticalSpacer_2</zorder>
<zorder>jidExistsLabel</zorder>
<zorder>label_3</zorder>
</widget>
<widget class="QWidget" name="advancedPage">
<attribute name="title">
<string>Advanced</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;b&gt;Privacy&lt;/b&gt;</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupBoxXmppAdvanced"> <widget class="QCheckBox" name="xmppPublishTracksCheckbox">
<property name="enabled"> <property name="toolTip">
<bool>true</bool> <string>Lots of servers don't support this (e.g. GTalk, jabber.org)</string>
</property> </property>
<property name="sizePolicy"> <property name="text">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <string>Publish currently playing track</string>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="title"> </widget>
<string>Advanced Xmpp Settings</string> </item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="serverSettings">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Server&lt;/span&gt; (don't change if you don't have to)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
@@ -220,17 +284,8 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Server:</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Host:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
<property name="buddy"> <property name="buddy">
<cstring>xmppServer</cstring> <cstring>xmppServer</cstring>
@@ -252,9 +307,6 @@
<property name="text"> <property name="text">
<string>Port:</string> <string>Port:</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@@ -293,16 +345,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QCheckBox" name="xmppPublishTracksCheckbox">
<property name="toolTip">
<string>Lots of servers don't support this (e.g. GTalk, jabber.org)</string>
</property>
<property name="text">
<string>Publish currently playing track</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QCheckBox" name="xmppEnforceSecureCheckbox"> <widget class="QCheckBox" name="xmppEnforceSecureCheckbox">
<property name="text"> <property name="text">
@@ -311,23 +353,26 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>5</height> <height>40</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget>
</item>
</layout>
</widget>
<resources> <resources>
<include location="resources.qrc"/> <include location="resources.qrc"/>
</resources> </resources>

View File

@@ -93,7 +93,13 @@ GoogleWrapper::GoogleWrapper ( const QString& pluginID )
config->m_ui->logoLabel->setPixmap( QPixmap( ":/gmail-logo.png" ) ); config->m_ui->logoLabel->setPixmap( QPixmap( ":/gmail-logo.png" ) );
config->m_ui->xmppServer->setText( "talk.google.com" ); config->m_ui->xmppServer->setText( "talk.google.com" );
config->m_ui->xmppPort->setValue( 5222 ); config->m_ui->xmppPort->setValue( 5222 );
config->m_ui->groupBoxXmppAdvanced->hide();
// hide server settings
QLayoutItem *child;
while ( ( child = config->m_ui->serverSettings->takeAt( 0 ) ) != 0) {
if( child->widget() )
child->widget()->hide();
}
m_onlinePixmap = QPixmap( ":/gmail-logo.png" ); m_onlinePixmap = QPixmap( ":/gmail-logo.png" );
m_offlinePixmap = QPixmap( ":/gmail-offline-logo.png" ); m_offlinePixmap = QPixmap( ":/gmail-offline-logo.png" );