[vlc-commits] Open: remove the possibility to change the font and the alignment.

Jean-Baptiste Kempf git at videolan.org
Tue Apr 26 00:27:55 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Apr 26 00:26:55 2011 +0200| [04d990b1b048b2a8d5c1b1f4b2bf033224d686dd] | committer: Jean-Baptiste Kempf

Open: remove the possibility to change the font and the alignment.

This is almost useless when you open...
Maybe add the encoding?

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04d990b1b048b2a8d5c1b1f4b2bf033224d686dd
---

 modules/gui/qt4/components/open_panels.cpp |   13 ----
 modules/gui/qt4/dialogs/open.cpp           |    2 +-
 modules/gui/qt4/ui/open_file.ui            |   96 ++-------------------------
 3 files changed, 9 insertions(+), 102 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 08cfd48..a70bd18 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -106,11 +106,6 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /* Subtitles */
     /* Deactivate the subtitles control by default. */
     ui.subFrame->setEnabled( false );
-    /* Build the subs size combo box */
-    setfillVLCConfigCombo( "freetype-rel-fontsize" , p_intf,
-                            ui.sizeSubComboBox );
-    /* Build the subs align combo box */
-    setfillVLCConfigCombo( "subsdec-align", p_intf, ui.alignSubComboBox );
 
     /* Connects  */
     BUTTONACT( ui.fileBrowseButton, browseFile() );
@@ -121,8 +116,6 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
 
     CONNECT( ui.fileListWidg, itemChanged( QListWidgetItem * ), this, updateMRL() );
     CONNECT( ui.subInput, textChanged( const QString& ), this, updateMRL() );
-    CONNECT( ui.alignSubComboBox, currentIndexChanged( int ), this, updateMRL() );
-    CONNECT( ui.sizeSubComboBox, currentIndexChanged( int ), this, updateMRL() );
     updateButtons();
 }
 
@@ -294,12 +287,6 @@ void FileOpenPanel::updateMRL()
     /* Options */
     if( ui.subCheckBox->isChecked() &&  !ui.subInput->text().isEmpty() ) {
         mrl.append( " :sub-file=" + colon_escape( ui.subInput->text() ) );
-        int align = ui.alignSubComboBox->itemData(
-                    ui.alignSubComboBox->currentIndex() ).toInt();
-        mrl.append( " :subsdec-align=" + QString().setNum( align ) );
-        int size = ui.sizeSubComboBox->itemData(
-                   ui.sizeSubComboBox->currentIndex() ).toInt();
-        mrl.append( " :freetype-rel-fontsize=" + QString().setNum( size ) );
     }
 
     emit mrlUpdated( fileList, mrl );
diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp
index 3d1b9bc..3db7109 100644
--- a/modules/gui/qt4/dialogs/open.cpp
+++ b/modules/gui/qt4/dialogs/open.cpp
@@ -181,7 +181,7 @@ OpenDialog::OpenDialog( QWidget *parent,
 
     setMinimumSize( sizeHint() );
     setMaximumWidth( 900 );
-    resize( getSettings()->value( "opendialog-size", QSize( 500, 490 ) ).toSize() );
+    resize( getSettings()->value( "opendialog-size", QSize( 500, 400 ) ).toSize() );
 }
 
 OpenDialog::~OpenDialog()
diff --git a/modules/gui/qt4/ui/open_file.ui b/modules/gui/qt4/ui/open_file.ui
index f4b2d83..b1413ff 100644
--- a/modules/gui/qt4/ui/open_file.ui
+++ b/modules/gui/qt4/ui/open_file.ui
@@ -7,8 +7,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>566</width>
-    <height>344</height>
+    <width>564</width>
+    <height>258</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -67,10 +67,10 @@
         <property name="text">
          <string>Add...</string>
         </property>
-	<property name="icon">
+        <property name="icon">
          <iconset>
           <normaloff>:/playlist_add</normaloff>:/playlist_add</iconset>
-        </property>	
+        </property>
        </widget>
       </item>
       <item row="2" column="2">
@@ -78,10 +78,6 @@
         <property name="enabled">
          <bool>false</bool>
         </property>
-	<property name="icon">
-         <iconset>
-          <normaloff>:/playlist_remove</normaloff>:/playlist_remove</iconset>
-        </property>
         <property name="sizePolicy">
          <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
           <horstretch>0</horstretch>
@@ -91,6 +87,10 @@
         <property name="text">
          <string>Remove</string>
         </property>
+        <property name="icon">
+         <iconset>
+          <normaloff>:/playlist_remove</normaloff>:/playlist_remove</iconset>
+        </property>
        </widget>
       </item>
      </layout>
@@ -146,86 +146,6 @@
         </layout>
        </widget>
       </item>
-      <item>
-       <widget class="QWidget" name="widget_2" native="true">
-        <layout class="QGridLayout" name="gridLayout_2">
-         <item row="0" column="0">
-          <widget class="QLabel" name="sizeSubLabel">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="layoutDirection">
-            <enum>Qt::LeftToRight</enum>
-           </property>
-           <property name="text">
-            <string>Font size:</string>
-           </property>
-           <property name="alignment">
-            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-           </property>
-           <property name="buddy">
-            <cstring>sizeSubComboBox</cstring>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="0">
-          <widget class="QLabel" name="alignSubLabel">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text">
-            <string>Text alignment:</string>
-           </property>
-           <property name="alignment">
-            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-           </property>
-           <property name="buddy">
-            <cstring>alignSubComboBox</cstring>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="2">
-          <spacer name="horizontalSpacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item row="1" column="1">
-          <widget class="QComboBox" name="alignSubComboBox">
-           <property name="minimumSize">
-            <size>
-             <width>100</width>
-             <height>0</height>
-            </size>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1">
-          <widget class="QComboBox" name="sizeSubComboBox">
-           <property name="minimumSize">
-            <size>
-             <width>100</width>
-             <height>0</height>
-            </size>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </widget>
-      </item>
      </layout>
     </widget>
    </item>



More information about the vlc-commits mailing list