From: Rafaël Carré Date: Fri, 19 Oct 2007 10:30:34 +0000 (+0000) Subject: qt4: fix the use of HTTP in open dialog X-Git-Tag: 0.9.0-test0~4945 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=8f2dc55470a22af908c8b4070e85ce5e27d37f01;p=vlc qt4: fix the use of HTTP in open dialog --- diff --git a/modules/gui/qt4/components/open.cpp b/modules/gui/qt4/components/open.cpp index fdf3909cb2..dfc819803e 100644 --- a/modules/gui/qt4/components/open.cpp +++ b/modules/gui/qt4/components/open.cpp @@ -423,6 +423,8 @@ void NetOpenPanel::updateMRL() { switch( proto ) { case 0: mrl = "http://" + addr; + emit methodChanged("http-caching"); + break; case 1: mrl = "https://" + addr; emit methodChanged("http-caching"); diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp index 2d35fb1bde..1ae8b82b0f 100644 --- a/modules/gui/qt4/components/simple_preferences.cpp +++ b/modules/gui/qt4/components/simple_preferences.cpp @@ -34,6 +34,7 @@ #include "ui/sprefs_interface.h" #include +#include "vlc_control.h" #include #include @@ -243,6 +244,18 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, 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 */ @@ -375,3 +388,10 @@ void SPrefsPanel::apply() 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" ); +} diff --git a/modules/gui/qt4/components/simple_preferences.hpp b/modules/gui/qt4/components/simple_preferences.hpp index ef8c479941..bc739e25d9 100644 --- a/modules/gui/qt4/components/simple_preferences.hpp +++ b/modules/gui/qt4/components/simple_preferences.hpp @@ -82,6 +82,7 @@ private: /* Display only the options for the selected audio output */ private slots: void AudioDeviceChanged(); + void lastfm_Changed( int ); }; #endif diff --git a/modules/gui/qt4/ui/sprefs_audio.ui b/modules/gui/qt4/ui/sprefs_audio.ui index ad9fb9f33d..a6fd4bb1c9 100644 --- a/modules/gui/qt4/ui/sprefs_audio.ui +++ b/modules/gui/qt4/ui/sprefs_audio.ui @@ -7,7 +7,7 @@ 0 0 461 - 554 + 682 @@ -243,6 +243,46 @@ + + + + _("Last.fm") + + + + + + _("Enable") + + + + + + + + + + _("Username") + + + + + + + _("Password") + + + + + + + QLineEdit::PasswordEchoOnEdit + + + + + +