]> git.sesse.net Git - vlc/commitdiff
* build the subtitle size combo box, instead of hardcoded list
authorYoann Peronneau <yoann@videolan.org>
Mon, 26 Mar 2007 23:17:57 +0000 (23:17 +0000)
committerYoann Peronneau <yoann@videolan.org>
Mon, 26 Mar 2007 23:17:57 +0000 (23:17 +0000)
modules/gui/qt4/components/open.cpp
modules/gui/qt4/ui/open_file.ui

index 1612c68f401cec3334937cf3508e516e2e779c21..426894ba2263d288cf3f27a8ffc23445221597d3 100644 (file)
@@ -89,6 +89,22 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     // Hide the subtitles control by default.
     ui.subFrame->hide();
 
+    /* Build the subs size combo box */
+    module_config_t *p_item =
+        config_FindConfig( VLC_OBJECT(p_intf), "freetype-rel-fontsize" );
+    if( p_item )
+    {
+        for( int i_index = 0; i_index < p_item->i_list; i_index++ )
+        {
+            ui.sizeSubComboBox->addItem(
+                qfu( p_item->ppsz_list_text[i_index] ),
+                QVariant( p_item->pi_list[i_index] ) );
+            if( p_item->value.i == p_item->pi_list[i_index] )
+            {
+                ui.sizeSubComboBox->setCurrentIndex( i_index );
+            }
+        }
+    }
 
     BUTTONACT( ui.subBrowseButton, browseFileSub() );
     BUTTONACT( ui.subCheckBox, toggleSubtitleFrame());
index f96fe4c8c84e1f73ab713602f31dbda502e49f1b..c9c76d11de02614a8429b98e2fb399d7517c6f21 100644 (file)
           <height>0</height>
          </size>
         </property>
-        <item>
-         <property name="text" >
-          <string>Very Small</string>
-         </property>
-        </item>
-        <item>
-         <property name="text" >
-          <string>Small</string>
-         </property>
-        </item>
-        <item>
-         <property name="text" >
-          <string>Normal</string>
-         </property>
-        </item>
-        <item>
-         <property name="text" >
-          <string>Big</string>
-         </property>
-        </item>
-        <item>
-         <property name="text" >
-          <string>Very Big</string>
-         </property>
-        </item>
        </widget>
       </item>
       <item row="1" column="1" >