Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > a6bc312ce50b5c8d0c51736e58ac32bc > files > 321

kdebase-3.4.2-55mdk.src.rpm

--- kdebase-3.3.2/kcontrol/locale/kcmlocale.cpp.fix_locale_drake_remove_language	2005-02-11 14:43:59.371914408 +0100
+++ kdebase-3.3.2/kcontrol/locale/kcmlocale.cpp	2005-02-11 16:34:46.843352045 +0100
@@ -134,7 +134,7 @@ void KLocaleConfig::slotAddLanguage(cons
 
   m_locale->setLanguage( languageList );
 
-  updateLocaleDrake(true);
+  updateLocaleDrake(true,languageList[ 0 ] );
   emit localeChanged();
   if ( pos == 0 )
     emit languageChanged();
@@ -157,6 +157,7 @@ void KLocaleConfig::slotRemoveLanguage()
       if ( pos == 0 )
         emit languageChanged();
     }
+  updateLocaleDrake(true, languageList[ 0 ]);
 }
 
 void KLocaleConfig::slotLanguageUp()
@@ -179,6 +180,7 @@ void KLocaleConfig::slotLanguageUp()
     if ( pos == 1 ) // at the lang before the top
       emit languageChanged();
   }
+  updateLocaleDrake(true, languageList[ 0 ]);
 }
 
 void KLocaleConfig::slotLanguageDown()
@@ -201,6 +203,7 @@ void KLocaleConfig::slotLanguageDown()
       if ( pos == 0 ) // at the top
         emit languageChanged();
     }
+  updateLocaleDrake(true, languageList[ 0 ]);
 }
 
 void KLocaleConfig::loadLanguageList()
@@ -483,7 +486,7 @@ void KLocaleConfig::changedCountry(const
 }
 
 
-void KLocaleConfig::updateLocaleDrake(bool apply)
+void KLocaleConfig::updateLocaleDrake(bool apply, const QString &newLanguage)
 {
    // /usr/sbin on Mandrake, $PATH allows flexibility for other distributions
    QString path = QString::fromLocal8Bit(getenv("PATH")) + QString::fromLatin1(":/usr/sbin");
@@ -498,7 +501,10 @@ void KLocaleConfig::updateLocaleDrake(bo
     {
       KProcess *proc=new KProcess;
       *proc << exe;
-      *proc << QString::fromLatin1(" --kde_lang=")+ m_addLanguage->current();
+      if ( newLanguage.isEmpty() )
+          *proc << QString::fromLatin1(" --kde_lang=")+ m_addLanguage->current();
+      else
+          *proc << QString::fromLatin1(" --kde_lang=")+ newLanguage;
       *proc << QString::fromLatin1(" --kde_country=")+m_comboCountry->current();
       if( apply)
    *proc << QString::fromLatin1(" --apply");
--- kdebase-3.3.2/kcontrol/locale/kcmlocale.h--	2005-02-11 16:30:32.476003591 +0100
+++ kdebase-3.3.2/kcontrol/locale/kcmlocale.h	2005-02-11 16:30:44.101281640 +0100
@@ -50,7 +50,7 @@ public:
   virtual ~KLocaleConfig( );
 
   void save();
-  void updateLocaleDrake(bool apply);
+  void updateLocaleDrake(bool apply,const QString &newLanguage=QString::null);
 
 public slots:
   /**