Qt4 - Don't use html tags in strings ... This breaks all the i18n thing.
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 4 Apr 2007 23:10:28 +0000 (23:10 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 4 Apr 2007 23:10:28 +0000 (23:10 +0000)
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/ui/sprefs_interface.ui

index 9e034b4..5e79448 100644 (file)
@@ -27,6 +27,7 @@
 #include <QFont>
 #include <QToolButton>
 #include <QButtonGroup>
+#include <QUrl>
 
 #include "components/simple_preferences.hpp"
 #include "components/preferences_widgets.hpp"
@@ -154,6 +155,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
     title_line->setFrameShape(QFrame::HLine);
     title_line->setFrameShadow(QFrame::Sunken);
 
+    QFont italicFont = QApplication::font( static_cast<QWidget*>(0) );
+    italicFont.setItalic( true );
+
     switch( number )
     {
         /* Video Panel Implementation */
@@ -248,7 +252,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 
         /* Interface Panel */
         START_SPREFS_CAT( Interface, "Interface settings" );
-            
+            ui.defaultLabel->setFont( italicFont );
+            ui.skinsLabel->setFont( italicFont );
+
             CONFIG_GENERIC( "language", StringList, NULL, language );//FIXME
 #if !defined( WIN32 ) && !defined( HAVE_DBUS_3 )
             ui.OneInterfaceBox->hide();
index 5a77afb..f3648f6 100644 (file)
@@ -39,7 +39,7 @@
        </widget>
       </item>
       <item row="3" column="1" colspan="2" >
-       <widget class="QLabel" name="label_3" >
+       <widget class="QLabel" name="skinsLabel" >
         <property name="sizePolicy" >
          <sizepolicy>
           <hsizetype>5</hsizetype>
          <enum>QFrame::NoFrame</enum>
         </property>
         <property name="text" >
-         <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
-p, li { white-space: pre-wrap; }
-&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
-&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-style:italic;">This is VLC's skinnable interface. You can download skins at &lt;/span>&lt;a href="http://www.videolan.org/">&lt;span style=" font-style:italic; text-decoration: underline; color:#0000ff;">http://www.videolan.org/vlc/skins.php&lt;/span>&lt;/a>&lt;span style=" font-style:italic;"> to customize your player.&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+         <string>This is VLC's skinnable interface. You can download skins at http://www.videolan.org/vlc/skins.php to customize your player.</string>
+        </property>
+        <property name="textFormat" >
+         <enum>Qt::PlainText</enum>
         </property>
         <property name="alignment" >
          <set>Qt::AlignBottom|Qt::AlignJustify</set>
@@ -89,15 +89,15 @@ p, li { white-space: pre-wrap; }
        <widget class="QLineEdit" name="fileSkin" />
       </item>
       <item row="0" column="1" colspan="2" >
-       <widget class="QLabel" name="label_2" >
+       <widget class="QLabel" name="defaultLabel" >
         <property name="frameShape" >
          <enum>QFrame::NoFrame</enum>
         </property>
         <property name="text" >
-         <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
-p, li { white-space: pre-wrap; }
-&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
-&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-style:italic;">This is VLC's default interface, with a native look and feel.&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+         <string>This is VLC's default interface, with a native look and feel.</string>
+        </property>
+        <property name="textFormat" >
+         <enum>Qt::RichText</enum>
         </property>
         <property name="wordWrap" >
          <bool>true</bool>