Hello community,

here is the log from the commit of package libyui-qt for openSUSE:Factory 
checked in at 2014-05-22 06:38:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libyui-qt (Old)
 and      /work/SRC/openSUSE:Factory/.libyui-qt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libyui-qt"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libyui-qt/libyui-qt.changes      2014-05-13 
20:45:44.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libyui-qt.new/libyui-qt.changes 2014-05-22 
06:39:25.000000000 +0200
@@ -1,0 +2,12 @@
+Wed May 21 08:21:09 CEST 2014 - [email protected]
+
+- fix last font selection fix (bnc #878859)
+- 2.46.10
+
+-------------------------------------------------------------------
+Mon May 19 15:57:00 CEST 2014 - [email protected]
+
+- load per-language font info and refresh widget fonts (bnc #866705)
+- 2.46.9
+
+-------------------------------------------------------------------

Old:
----
  libyui-qt-2.46.8.tar.bz2

New:
----
  libyui-qt-2.46.10.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libyui-qt-doc.spec ++++++
--- /var/tmp/diff_new_pack.1bntxH/_old  2014-05-22 06:39:26.000000000 +0200
+++ /var/tmp/diff_new_pack.1bntxH/_new  2014-05-22 06:39:26.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           libyui-qt-doc
-Version:        2.46.8
+Version:        2.46.10
 Release:        0
 Source:         libyui-qt-%{version}.tar.bz2
 

++++++ libyui-qt.spec ++++++
--- /var/tmp/diff_new_pack.1bntxH/_old  2014-05-22 06:39:26.000000000 +0200
+++ /var/tmp/diff_new_pack.1bntxH/_new  2014-05-22 06:39:26.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           libyui-qt
-Version:        2.46.8
+Version:        2.46.10
 Release:        0
 Source:         libyui-qt-%{version}.tar.bz2
 

++++++ libyui-qt-2.46.8.tar.bz2 -> libyui-qt-2.46.10.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-qt-2.46.8/ChangeLog 
new/libyui-qt-2.46.10/ChangeLog
--- old/libyui-qt-2.46.8/ChangeLog      2014-05-12 14:30:44.000000000 +0200
+++ new/libyui-qt-2.46.10/ChangeLog     2014-05-21 10:35:20.000000000 +0200
@@ -1,4 +1,16 @@
 -------------------------------------------------------------------
+Wed May 21 08:21:09 CEST 2014 - [email protected]
+
+- fix last font selection fix (bnc #878859)
+- 2.46.10
+
+-------------------------------------------------------------------
+Mon May 19 15:57:00 CEST 2014 - [email protected]
+
+- load per-language font info and refresh widget fonts (bnc #866705)
+- 2.46.9
+
+-------------------------------------------------------------------
 Wed May  7 07:57:07 UTC 2014 - [email protected]
 
 - avoid hiding "Show Relnotes" button when new Wizard window is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-qt-2.46.8/VERSION.cmake 
new/libyui-qt-2.46.10/VERSION.cmake
--- old/libyui-qt-2.46.8/VERSION.cmake  2014-05-12 14:30:44.000000000 +0200
+++ new/libyui-qt-2.46.10/VERSION.cmake 2014-05-21 10:35:20.000000000 +0200
@@ -1,6 +1,6 @@
 SET(VERSION_MAJOR "2")
 SET(VERSION_MINOR "46")
-SET(VERSION_PATCH "8")
+SET(VERSION_PATCH "10")
 SET( VERSION 
"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" )
 
 ##### This is need for the libyui core, ONLY.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-qt-2.46.8/src/YQApplication.cc 
new/libyui-qt-2.46.10/src/YQApplication.cc
--- old/libyui-qt-2.46.8/src/YQApplication.cc   2014-03-11 11:22:35.000000000 
+0100
+++ new/libyui-qt-2.46.10/src/YQApplication.cc  2014-05-21 10:35:20.000000000 
+0200
@@ -205,11 +205,6 @@
 void
 YQApplication::setLangFonts( const std::string & language, const std::string & 
encoding )
 {
-    if ( _fontFamily.isEmpty() )
-        _fontFamily = qApp->font().family();
-
-    QString oldFontFamily = _fontFamily;
-
     if ( ! _langFonts )
     {
        _langFonts = new QSettings( LANG_FONTS_FILE, QSettings::IniFormat );
@@ -229,6 +224,7 @@
        lang += QString( "." ) + encoding.c_str();
 
     QString key;
+    bool reloadFont = false;
 
     if ( ! _langFonts->contains( fontKey( lang ) ) )   // Try with encoding 
("zh_CN.UTF8" etc.)
     {
@@ -240,33 +236,31 @@
 
     if ( _langFonts->contains( fontKey( lang ) ) )
     {
-       _fontFamily = _langFonts->value( fontKey( lang ), _fontFamily 
).toString();
-       yuiMilestone() << fontKey( lang ) << " = \"" << _fontFamily << "\"" << 
std::endl;
-    }
-    else
-    {
-       _fontFamily = _langFonts->value( fontKey( "" ),  _fontFamily 
).toString();
-       yuiMilestone() << "Using fallback for " << lang
-                      << ": font = \"" << _fontFamily << "\""
-                      << std::endl;
+       QStringList fontList =
+           _langFonts->value( fontKey( lang ), "" ).toString().split( "," );
+       for ( int i = 0; i < fontList.size(); ++i )
+       {
+           yuiMilestone() << fontKey( lang ) << " adding " << fontList.at( i ) 
<< std::endl;
+           QFontDatabase::addApplicationFont( fontList.at( i ) );
+       }
+
+       reloadFont = true;
     }
 
     if ( _fontFamily.isEmpty() ) {
         _fontFamily = "Sans Serif";
+       reloadFont = true;
     }
 
-    if ( _fontFamily != oldFontFamily )
-    {
-       yuiMilestone() << "New font family: " << _fontFamily << std::endl;
+    if (reloadFont) {
+
+       yuiMilestone() << "Reloading fonts" << std::endl;
+
+       // update fonts
        deleteFonts();
-        // setting the language loads fonts and we need to tell fontconfig
-        FcInitReinitialize();
 
         foreach ( QWidget *widget, QApplication::allWidgets() )
         {
-            if ( widget->font().family() != oldFontFamily )
-                continue;
-
             QFont wfont( widget->font() );
             wfont.setFamily( _fontFamily );
             widget->setFont( wfont );
@@ -275,7 +269,8 @@
         font.setFamily( _fontFamily );
         qApp->setFont(font);   // font, informWidgets
 
-       yuiMilestone() << "Reloading fonts - now using \"" << font.toString() 
<< "\"" << std::endl;
+       yuiMilestone() << "Removing the key " << lang << std::endl;
+       _langFonts->remove( fontKey( lang ) );
     }
     else
     {

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to