[vlmc-devel] commit: Do not reset the library title, when retranslateUI is called. ( Ludovic Fauvet )

git at videolan.org git at videolan.org
Mon Mar 29 17:11:21 CEST 2010


vlmc | branch: master | Ludovic Fauvet <etix at l0cal.com> | Mon Mar 29 17:10:09 2010 +0200| [ed51bd51fdf726f352349d5729edd14391be424c] | committer: Ludovic Fauvet 

Do not reset the library title, when retranslateUI is called.

This is a quick and dirty hack.

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

 src/Gui/library/StackViewNavController.cpp |    4 ++++
 src/Gui/library/StackViewNavController.h   |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/Gui/library/StackViewNavController.cpp b/src/Gui/library/StackViewNavController.cpp
index 17f1679..7f09d74 100644
--- a/src/Gui/library/StackViewNavController.cpp
+++ b/src/Gui/library/StackViewNavController.cpp
@@ -21,6 +21,9 @@ void StackViewNavController::changeEvent( QEvent *e )
     {
     case QEvent::LanguageChange:
         m_ui->retranslateUi( this );
+        // This is a quick and dirty fix.
+        // But the title won't be translated anyway.
+        setTitle( m_title );
         break;
     default:
         break;
@@ -29,6 +32,7 @@ void StackViewNavController::changeEvent( QEvent *e )
 
 void    StackViewNavController::setTitle( const QString& title )
 {
+    m_title = title;
     m_ui->title->setText( title );
 }
 
diff --git a/src/Gui/library/StackViewNavController.h b/src/Gui/library/StackViewNavController.h
index 66791c3..db7e421 100644
--- a/src/Gui/library/StackViewNavController.h
+++ b/src/Gui/library/StackViewNavController.h
@@ -24,6 +24,7 @@ protected:
 
 private:
     Ui::StackViewNavController *m_ui;
+    QString m_title;
 };
 
 #endif // STACKVIEWNAVCONTROLLER_H



More information about the Vlmc-devel mailing list