Commit 8f2dc554 authored by Rafaël Carré's avatar Rafaël Carré

qt4: fix the use of HTTP in open dialog

parent 0a90b9b0
...@@ -423,6 +423,8 @@ void NetOpenPanel::updateMRL() { ...@@ -423,6 +423,8 @@ void NetOpenPanel::updateMRL() {
switch( proto ) { switch( proto ) {
case 0: case 0:
mrl = "http://" + addr; mrl = "http://" + addr;
emit methodChanged("http-caching");
break;
case 1: case 1:
mrl = "https://" + addr; mrl = "https://" + addr;
emit methodChanged("http-caching"); emit methodChanged("http-caching");
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "ui/sprefs_interface.h" #include "ui/sprefs_interface.h"
#include <vlc_config_cat.h> #include <vlc_config_cat.h>
#include "vlc_control.h"
#include <QString> #include <QString>
#include <QFont> #include <QFont>
...@@ -243,6 +244,18 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -243,6 +244,18 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_GENERIC_NO_BOOL( "norm-max-level" , Float , NULL, CONFIG_GENERIC_NO_BOOL( "norm-max-level" , Float , NULL,
volNormalizer ); volNormalizer );
CONFIG_GENERIC( "audio-visual" , Module , NULL, visualisation); 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; END_SPREFS_CAT;
/* Input and Codecs Panel Implementation */ /* Input and Codecs Panel Implementation */
...@@ -375,3 +388,10 @@ void SPrefsPanel::apply() ...@@ -375,3 +388,10 @@ void SPrefsPanel::apply()
void SPrefsPanel::clean() 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" );
}
...@@ -82,6 +82,7 @@ private: ...@@ -82,6 +82,7 @@ private:
/* Display only the options for the selected audio output */ /* Display only the options for the selected audio output */
private slots: private slots:
void AudioDeviceChanged(); void AudioDeviceChanged();
void lastfm_Changed( int );
}; };
#endif #endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>461</width> <width>461</width>
<height>554</height> <height>682</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
...@@ -243,6 +243,46 @@ ...@@ -243,6 +243,46 @@
</layout> </layout>
</widget> </widget>
</item> </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> </layout>
</widget> </widget>
<tabstops> <tabstops>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment