#include "ui/sprefs_interface.h"
#include <vlc_config_cat.h>
+#include "vlc_control.h"
#include <QString>
#include <QFont>
CONFIG_GENERIC_NO_BOOL( "norm-max-level" , Float , NULL,
volNormalizer );
CONFIG_GENERIC( "audio-visual" , Module , NULL, visualisation);
+
+
+ if( control_Exists( VLC_OBJECT( p_intf ), "audioscrobbler" ) )
+ ui.lastfm->setCheckState( Qt::Checked );
+ else
+ ui.lastfm->setCheckState( Qt::Unchecked );
+ CONNECT( ui.lastfm, stateChanged( int ), this , lastfm_Changed( int ) );
+
+ CONFIG_GENERIC( "lastfm-username", String, ui.lastfm_user_label,
+ lastfm_user_edit );
+ CONFIG_GENERIC( "lastfm-password", String, ui.lastfm_pass_label,
+ lastfm_pass_edit );
END_SPREFS_CAT;
/* Input and Codecs Panel Implementation */
void SPrefsPanel::clean()
{}
+void SPrefsPanel::lastfm_Changed( int i_state )
+{
+ if( i_state == Qt::Checked )
+ control_Add( VLC_OBJECT( p_intf ), "audioscrobbler" );
+ else if( i_state == Qt::Unchecked )
+ control_Remove( VLC_OBJECT( p_intf ), "audioscrobbler" );
+}
<x>0</x>
<y>0</y>
<width>461</width>
- <height>554</height>
+ <height>682</height>
</rect>
</property>
<property name="windowTitle" >
</layout>
</widget>
</item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_4" >
+ <property name="title" >
+ <string>_("Last.fm")</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" colspan="2" >
+ <widget class="QCheckBox" name="lastfm" >
+ <property name="text" >
+ <string>_("Enable")</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" colspan="2" >
+ <widget class="QLineEdit" name="lastfm_user_edit" />
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="lastfm_user_label" >
+ <property name="text" >
+ <string>_("Username")</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="lastfm_pass_label" >
+ <property name="text" >
+ <string>_("Password")</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="2" >
+ <widget class="QLineEdit" name="lastfm_pass_edit" >
+ <property name="echoMode" >
+ <enum>QLineEdit::PasswordEchoOnEdit</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</widget>
<tabstops>