diff -Nru kde-workspace-4.8.5/debian/changelog kde-workspace-4.8.5/debian/changelog --- kde-workspace-4.8.5/debian/changelog 2012-10-20 13:50:27.000000000 +0100 +++ kde-workspace-4.8.5/debian/changelog 2013-02-13 10:20:24.000000000 +0000 @@ -1,3 +1,9 @@ +kde-workspace (4:4.8.5-0ubuntu0.3) precise; urgency=low + + * Add fix_plasma_init_order.diff to fix plasma init order + + -- Rohan Garg Wed, 13 Feb 2013 10:18:02 +0000 + kde-workspace (4:4.8.5-0ubuntu0.2) precise-proposed; urgency=low * Add fix-powerdevil-profile-generation.patch to ensure powerdevil diff -Nru kde-workspace-4.8.5/debian/patches/fix_plasma_init_order.diff kde-workspace-4.8.5/debian/patches/fix_plasma_init_order.diff --- kde-workspace-4.8.5/debian/patches/fix_plasma_init_order.diff 1970-01-01 01:00:00.000000000 +0100 +++ kde-workspace-4.8.5/debian/patches/fix_plasma_init_order.diff 2013-02-13 09:41:15.000000000 +0000 @@ -0,0 +1,45 @@ +commit a651fff01cfcef8874c5ddcf7a080467edc49d16 +Author: Rohan Garg +Date: Fri Aug 31 15:21:11 2012 +0530 + + Make sure the plasma desktop scripts are sorted in the correct order + + Instead of sorting the scripts according to their absolute paths, + which would cause scripts installed by packages to always end at + the top, scripts should be sorted by their relative path i.e. + plasma scripts from each directory that occurs in the path + should be sorted and then merged together to form a super list + + REVIEWED BY: Marco Martin + +diff --git a/libs/plasmagenericshell/scripting/scriptengine.cpp b/libs/plasmagenericshell/scripting/scriptengine.cpp +index 777a56d..7810ab4 100644 +--- a/libs/plasmagenericshell/scripting/scriptengine.cpp ++++ b/libs/plasmagenericshell/scripting/scriptengine.cpp +@@ -676,8 +676,24 @@ QStringList ScriptEngine::pendingUpdateScripts() + QStringList ScriptEngine::defaultLayoutScripts() + { + const QString appName = KGlobal::activeComponent().aboutData()->appName(); +- QStringList scripts = KGlobal::dirs()->findAllResources("data", appName + "/init/*.js"); +- scripts.sort(); ++ QStringList appNameDirs = KGlobal::dirs()->findDirs("data", appName); ++ QStringList scripts; ++ QDir appDir; ++ QFileInfoList scriptList; ++ ++ foreach (const QString &appNameDir, appNameDirs) { ++ appDir.setPath(appNameDir + QLatin1String("init/")); ++ if (appDir.exists()) { ++ scriptList = appDir.entryInfoList(QStringList("*.js"), ++ QDir::NoFilter, ++ QDir::Name); ++ foreach (const QFileInfo &script, scriptList) { ++ if (script.exists()) { ++ scripts.append(script.absoluteFilePath()); ++ } ++ } ++ } ++ } + + QStringList scriptPaths; + diff -Nru kde-workspace-4.8.5/debian/patches/series kde-workspace-4.8.5/debian/patches/series --- kde-workspace-4.8.5/debian/patches/series 2012-10-16 10:37:55.000000000 +0100 +++ kde-workspace-4.8.5/debian/patches/series 2013-02-13 10:19:36.000000000 +0000 @@ -33,3 +33,4 @@ kubuntu_revert_1554ba408633397066d31c3d565c217b5a385fb8.diff kubuntu_remove_horos_ksplash_theme.diff fix-powerdevil-profile-generation.patch +fix_plasma_init_order.diff