]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/preferences_widgets.cpp
A bunch of various fixes (encoding, refcount, layout)
[vlc] / modules / gui / qt4 / components / preferences_widgets.cpp
index 7818f0f18da84f912167c1a87596acd65ff98ede..dc2960e6984b5b16c34cd73ce871fb012be52a22 100644 (file)
@@ -31,7 +31,7 @@
  */
 
 #include "components/preferences_widgets.hpp"
-
+#include "qt4.hpp"
 #include <QLineEdit>
 #include <QString>
 #include <QSpinBox>
@@ -82,10 +82,10 @@ StringConfigControl::StringConfigControl( vlc_object_t *_p_this,
                      module_config_t *p_item, QWidget *_parent, bool pwd )
                            : VStringConfigControl( _p_this, p_item, _parent )
 {
-    QLabel *label = new QLabel( p_item->psz_text );
-    text = new QLineEdit( p_item->psz_value );
-    text->setToolTip( p_item->psz_longtext );
-    label->setToolTip( p_item->psz_longtext );
+    QLabel *label = new QLabel( qfu(p_item->psz_text) );
+    text = new QLineEdit( qfu(p_item->psz_value) );
+    text->setToolTip( qfu(p_item->psz_longtext) );
+    label->setToolTip( qfu(p_item->psz_longtext) );
 
     QHBoxLayout *layout = new QHBoxLayout();
     layout->addWidget( label, 0 ); layout->addWidget( text, 1 );
@@ -105,13 +105,13 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *_p_this,
     vlc_list_t *p_list;
     module_t *p_parser;
 
-    QLabel *label = new QLabel( p_item->psz_text );
+    QLabel *label = new QLabel( qfu(p_item->psz_text) );
     combo = new QComboBox();
     combo->setEditable( false );
 
     /* build a list of available modules */
     p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
-    combo->addItem( "Default" );
+    combo->addItem( qtr("Default") );
     for( int i_index = 0; i_index < p_list->i_count; i_index++ )
     {
         p_parser = (module_t *)p_list->p_values[i_index].p_object ;
@@ -126,7 +126,7 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *_p_this,
                 /* Hack: required subcategory is stored in i_min */
                 if( p_config->i_type == CONFIG_SUBCATEGORY &&
                     p_config->i_value == p_item->i_min )
-                    combo->addItem( p_parser->psz_longname,
+                    combo->addItem( qfu(p_parser->psz_longname),
                                     QVariant( p_parser->psz_object_name ) );
                 if( p_item->psz_value && !strcmp( p_item->psz_value,
                                                   p_parser->psz_object_name) )
@@ -135,7 +135,7 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *_p_this,
         }
         else if( !strcmp( p_parser->psz_capability, p_item->psz_type ) )
         {
-            combo->addItem( p_parser->psz_longname,
+            combo->addItem( qfu(p_parser->psz_longname),
                             QVariant( p_parser->psz_object_name ) );
             if( p_item->psz_value && !strcmp( p_item->psz_value,
                                               p_parser->psz_object_name) )
@@ -143,8 +143,8 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *_p_this,
         }
     }
     vlc_list_release( p_list );
-    combo->setToolTip( p_item->psz_longtext );
-    label->setToolTip( p_item->psz_longtext );
+    combo->setToolTip( qfu(p_item->psz_longtext) );
+    label->setToolTip( qfu(p_item->psz_longtext) );
 
     QHBoxLayout *layout = new QHBoxLayout();
     layout->addWidget( label ); layout->addWidget( combo );