Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 83ecf8f3cf39318860f0dc9917c84068 > files > 10

kdebase4-workspace-4.6.5-1.4.mga1.src.rpm

Index: plasma/desktop/applets/kickoff/core/models.cpp
===================================================================
--- plasma/desktop/applets/kickoff/core/models.cpp	(révision 1085142)
+++ plasma/desktop/applets/kickoff/core/models.cpp	(copie de travail)
@@ -143,7 +143,21 @@
     QStandardItem *appItem = new QStandardItem;
 
     QString genericName = service->genericName();
+    
     QString appName = service->name();
+    QString fromCustom = i18n( appName.toUtf8() );
+
+    if( ! fromCustom.isEmpty() && appName != fromCustom )
+        appName = fromCustom;
+    if( ! genericName.isEmpty() )
+    {
+        fromCustom = i18n( genericName.toUtf8() );
+        if( ! fromCustom.isEmpty() && genericName != fromCustom )
+            genericName = fromCustom;
+    }
+
+    QString teste = genericName.isEmpty() ? appName : genericName;
+ 
     bool nameFirst = displayOrder == NameBeforeDescription;
     appItem->setText(nameFirst || genericName.isEmpty() ? appName : genericName);
     appItem->setIcon(KIcon(service->icon()));
Index: plasma/desktop/applets/kickoff/core/applicationmodel.cpp
===================================================================
--- plasma/desktop/applets/kickoff/core/applicationmodel.cpp	(révision 1085142)
+++ plasma/desktop/applets/kickoff/core/applicationmodel.cpp	(copie de travail)
@@ -169,10 +169,21 @@
             }
 
             icon = service->icon();
+            
             appName = service->name();
+            QString fromCustom = i18n( appName.toUtf8() );
+            if ( ! appName.isEmpty() && ! fromCustom.isEmpty() && appName != fromCustom ) {
+                appName = fromCustom;
+            }
+            
             genericName = service->genericName();
+
+            fromCustom = i18n( genericName.toUtf8() );
+            if ( ! genericName.isEmpty() && ! fromCustom.isEmpty() && genericName != fromCustom ) {
+                genericName = fromCustom;
+            }
+
             desktopEntry = service->entryPath();
-
             // check for duplicates (eg. KDE 3 and KDE 4 versions of application
             // both present)
             if (duplicatePolicy == ApplicationModel::ShowLatestOnlyPolicy &&
@@ -226,10 +237,18 @@
                 icon = iconNameMap().value(icon);
             }
 
+        appName = serviceGroup->comment();
+        QString fromCustom = i18n( appName.toUtf8() );
+        if( !appName.isEmpty() && ! fromCustom.isEmpty() && appName != fromCustom ) {
+            appName = fromCustom;
+        }
+        genericName = serviceGroup->caption();
+        fromCustom = i18n( genericName.toUtf8() );
+        if( ! fromCustom.isEmpty() && genericName != fromCustom ) {
+            genericName = fromCustom;
+        }
             desktopEntry = serviceGroup->entryPath();
-            genericName = serviceGroup->caption();
             relPath = serviceGroup->relPath();
-            appName = serviceGroup->comment();
             isDir = true;
         } else if (p->isType(KST_KServiceSeparator)) {
             isSeparator = true;