[vlmc-devel] commit: Settings: Avoid naming each categorie "empty" in the settings widget. (Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Sun Mar 14 23:42:44 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Sun Mar 14 23:40:41 2010 +0100| [73ddb678bf23ee248f01a76b3e5ea8f9bebc81a9] | committer: Hugo Beauzee-Luyssen 

Settings: Avoid naming each categorie "empty" in the settings widget.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=73ddb678bf23ee248f01a76b3e5ea8f9bebc81a9
---

 src/Gui/settings/PreferenceWidget.cpp |    8 ++++++++
 src/Gui/settings/PreferenceWidget.h   |    1 +
 src/Gui/settings/Settings.cpp         |    2 +-
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/Gui/settings/PreferenceWidget.cpp b/src/Gui/settings/PreferenceWidget.cpp
index 1502028..7e026dc 100644
--- a/src/Gui/settings/PreferenceWidget.cpp
+++ b/src/Gui/settings/PreferenceWidget.cpp
@@ -56,6 +56,8 @@ PreferenceWidget::PreferenceWidget( const QString &categorie, SettingsManager::T
         m_settings.push_back( widget );
     }
     setLayout( layout );
+    m_categorie[0] = m_categorie[0].toUpper();
+
 }
 
 ISettingsCategorieWidget*
@@ -84,3 +86,9 @@ PreferenceWidget::save()
     foreach ( ISettingsCategorieWidget* w, m_settings )
         w->save();
 }
+
+const QString&
+PreferenceWidget::categorie() const
+{
+    return m_categorie;
+}
diff --git a/src/Gui/settings/PreferenceWidget.h b/src/Gui/settings/PreferenceWidget.h
index 0a1b897..99657b7 100644
--- a/src/Gui/settings/PreferenceWidget.h
+++ b/src/Gui/settings/PreferenceWidget.h
@@ -42,6 +42,7 @@ class   PreferenceWidget : public QWidget
         virtual ~PreferenceWidget() {}
 
         virtual void    save();
+        const QString   &categorie() const;
     private:
         ISettingsCategorieWidget        *widgetFactory( SettingValue* s );
 
diff --git a/src/Gui/settings/Settings.cpp b/src/Gui/settings/Settings.cpp
index fd8e1a5..74f4878 100644
--- a/src/Gui/settings/Settings.cpp
+++ b/src/Gui/settings/Settings.cpp
@@ -165,7 +165,7 @@ void    Settings::switchWidget( int index )
     // This should never happen
     if ( !pWidget )
         return;
-
+    m_title->setText( pWidget->categorie() );
     // If there is already a widget into the QScrollArea take it
     // to avoid its deletion.
     if ( m_configPanel->widget() )



More information about the Vlmc-devel mailing list