]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/open.cpp
Removes trailing spaces. Removes tabs.
[vlc] / modules / gui / qt4 / components / open.cpp
index d01b15f16e780bf5bad8550b927c0c328348a9e8..f91ff544706038fdd9e08f54deea4650783eb1a9 100644 (file)
@@ -63,6 +63,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     // Make this QFileDialog a child of tempWidget from the ui.
     dialogBox = new FileOpenBox( ui.tempWidget, NULL,
             qfu( p_intf->p_libvlc->psz_homedir ), fileTypes );
+
     dialogBox->setFileMode( QFileDialog::ExistingFiles );
     dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
 
@@ -70,7 +71,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     char *psz_filepath = config_GetPsz( p_intf, "qt-filedialog-path" );
     if( psz_filepath )
     {
-        dialogBox->setDirectory( QString::fromUtf8( psz_filepath ) );
+        dialogBox->setDirectory( qfu( psz_filepath ) );
         delete psz_filepath;
     }
 
@@ -95,7 +96,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
 #else
     lineFileEdit = findChildren<QLineEdit*>()[3];
 #endif
-    lineFileEdit->hide();
+//    lineFileEdit->hide();
 
     /* Make a list of QLabel inside the QFileDialog to access the good ones */
     QList<QLabel *> listLabel = findChildren<QLabel*>();
@@ -105,6 +106,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /* Change the text that was uncool in the usual box */
     listLabel[5]->setText( qtr( "Filter:" ) );
 
+
     QListView *fileListView = findChildren<QListView*>().first();
 #if WIN32
     /* QFileDialog is quite buggy make it brerable on win32 by tweaking
@@ -353,7 +355,6 @@ void DiscOpenPanel::updateMRL()
 }
 
 
-
 /**************************************************************************
  * Open Network streams and URL pages                                     *
  **************************************************************************/
@@ -389,10 +390,10 @@ void NetOpenPanel::updateProtocol( int idx ) {
     QString addr = ui.addressText->text();
     QString proto = ui.protocolCombo->itemData( idx ).toString();
 
-    ui.timeShift->setEnabled( idx >= 4 );
-    ui.ipv6->setEnabled( idx == 4 );
-    ui.addressText->setEnabled( idx != 4 );
-    ui.portSpin->setEnabled( idx >= 4 );
+    ui.timeShift->setEnabled( idx >= 5 );
+    ui.ipv6->setEnabled( idx == 5 );
+    ui.addressText->setEnabled( idx != 5 );
+    ui.portSpin->setEnabled( idx >= 5 );
 
     /* If we already have a protocol in the address, replace it */
     if( addr.contains( "://")) {
@@ -412,13 +413,14 @@ void NetOpenPanel::updateMRL() {
     QString addr = ui.addressText->text();
     int proto = ui.protocolCombo->currentIndex();
 
-    if( addr.contains( "://") && proto != 4 ) {
+    if( addr.contains( "://") && proto != 5 ) {
         mrl = addr;
     } else {
         switch( proto ) {
         case 0:
-        case 1:
             mrl = "http://" + addr;
+        case 1:
+            mrl = "https://" + addr;
             emit methodChanged("http-caching");
             break;
         case 3:
@@ -545,7 +547,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     jackDevLayout->addWidget( jackChannels, 1, 1 );
 
     /* Jack Props panel */
-    
     /* Selected ports */
     QLabel *jackPortsLabel = new QLabel( qtr( "Selected ports :" ) );
     jackPropLayout->addWidget( jackPortsLabel, 0 , 0 );
@@ -553,7 +555,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     jackPortsSelected = new QLineEdit( qtr( ".*") );
     jackPortsSelected->setAlignment( Qt::AlignRight );
     jackPropLayout->addWidget( jackPortsSelected, 0, 1 );
-    
     /* Caching */
     QLabel *jackCachingLabel = new QLabel( qtr( "Input caching :" ) );
     jackPropLayout->addWidget( jackCachingLabel, 1 , 0 );
@@ -563,15 +565,15 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     jackCaching->setValue(1000);
     jackCaching->setAlignment( Qt::AlignRight );
     jackPropLayout->addWidget( jackCaching, 1 , 1 );
-    
     /* Pace */
     jackPace = new QCheckBox(qtr( "Use VLC pace" ));
     jackPropLayout->addWidget( jackPace, 2, 1 );
-    
     /* Auto Connect */
     jackConnect = new QCheckBox( qtr( "Auto connnection" ));
     jackPropLayout->addWidget( jackConnect, 3, 1 );
-    
     /* Jack CONNECTs */
     CuMRL( jackChannels, valueChanged( int ) );
     CuMRL( jackCaching, valueChanged( int ) );
@@ -793,14 +795,12 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /**********
      * Screen *
      **********/
-
     addModuleAndLayouts( SCREEN_DEVICE, screen, "Desktop" );
     QLabel *screenLabel = new QLabel( "This option will open your own "
             "desktop in order to save or stream it.");
     screenLabel->setWordWrap( true );
     screenDevLayout->addWidget( screenLabel, 0, 0 );
 
-
     /* General connects */
     connect( ui.deviceCombo, SIGNAL( activated( int ) ),
                      stackedDevLayout, SLOT( setCurrentIndex( int ) ) );
@@ -823,7 +823,6 @@ void CaptureOpenPanel::updateMRL()
     QString mrl = "";
     int i_devicetype = ui.deviceCombo->itemData(
             ui.deviceCombo->currentIndex() ).toInt();
-    msg_Dbg( p_intf, "Capture Type: %i", i_devicetype );
     switch( i_devicetype )
     {
     case V4L_DEVICE:
@@ -887,7 +886,7 @@ void CaptureOpenPanel::updateMRL()
 }
 
 /**
- * Update the Buttons (show/hide) for the GUI as all device type don't 
+ * Update the Buttons (show/hide) for the GUI as all device type don't
  * use the same ui. elements.
  **/
 void CaptureOpenPanel::updateButtons()