File amarok-FrameworkVersion.diff of Package amarok

diff -Naur amarok-1.4.7.org/amarok/src/engine/xine/xine-engine.cpp amarok-1.4.7/amarok/src/engine/xine/xine-engine.cpp
--- amarok-1.4.7.org/amarok/src/engine/xine/xine-engine.cpp	2007-08-20 14:06:33.000000000 +0200
+++ amarok-1.4.7/amarok/src/engine/xine/xine-engine.cpp	2007-08-20 14:14:06.000000000 +0200
@@ -78,6 +78,9 @@
         , m_fadeOutRunning ( false )
         , m_equalizerEnabled( false )
 {
+    int major,minor,sub;
+    xine_get_version(&major,&minor,&sub);
+    addPluginProperty( "FrameworkVersion", QString("%1.%2.%3").arg(major).arg(minor).arg(sub));
     addPluginProperty( "HasConfigure", "true" );
     addPluginProperty( "HasEqualizer", "true" );
     #ifndef __NetBSD__  // NetBSD does not offer audio mixing
diff -Naur amarok-1.4.7.org/amarok/src/enginecontroller.cpp amarok-1.4.7/amarok/src/enginecontroller.cpp
--- amarok-1.4.7.org/amarok/src/enginecontroller.cpp	2007-08-20 14:06:33.000000000 +0200
+++ amarok-1.4.7/amarok/src/enginecontroller.cpp	2007-08-20 15:31:17.000000000 +0200
@@ -35,6 +35,7 @@
 #include <kio/job.h>
 #include <kmessagebox.h>
 #include <krun.h>
+#include <kmacroexpander.h>
 
 #include <cstdlib>
 
@@ -277,6 +278,11 @@
             , KStdGuiItem::no()
             , "codecInstallWarning" ) == KMessageBox::Yes )
             {
+ 		    QMap<QString,QString> map;
+		    if(hasEngineProperty("FrameworkVersion")){
+			map.insert("FrameworkVersion",engineProperty("FrameworkVersion"));
+		    }
+		    installScript = KMacroExpander::expandMacros(installScript, map);	
                     KRun::runCommand(installScript);
                     return true;
             }
openSUSE Build Service is sponsored by