[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/sysadmin/shaman
From:       Lukas Appelhans <l.appelhans () gmx ! de>
Date:       2009-12-25 18:14:28
Message-ID: 1261764868.289123.20185.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1066084 by lappelhans:

Hooks are working again


 M  +16 -1     libshaman/scripting/gui/ScriptGuiPlugin.cpp  
 M  +2 -0      libshaman/scripting/gui/ScriptGuiPlugin.h  
 M  +1 -0      plugins/testguiscript/guitest.py  


--- trunk/playground/sysadmin/shaman/libshaman/scripting/gui/ScriptGuiPlugin.cpp \
#1066083:1066084 @@ -98,6 +98,11 @@
     GuiPlugin::hookMessage(message);
 }
 
+void ScriptGuiPlugin::setHookCompleted(Shaman::CorePlugin::Hook hook, \
Shaman::CorePlugin::HookResult result) +{
+    emit hookCompleted(hook, result);
+}
+
 void ScriptGuiPlugin::preTransactionHook(const Shaman::AbstractPackage::List \
&packages)  {
     if (d->object && d->object->methodNames().contains("preTransactionHook")) {
@@ -105,6 +110,8 @@
         //v.setValue(packages);
         d->object->callMethod("preTransactionHook");
     }
+    else
+        emit hookCompleted(Shaman::CorePlugin::PreTransactionHook, \
Shaman::CorePlugin::Success);  }
 
 void ScriptGuiPlugin::postTransactionHook(const Shaman::AbstractPackage::List \
&packages) @@ -114,6 +121,8 @@
         //v.setValue(packages);
         d->object->callMethod("postTransactionHook");
     }
+    else
+        emit hookCompleted(Shaman::CorePlugin::PostTransactionHook, \
Shaman::CorePlugin::Success);  }
 
 void ScriptGuiPlugin::preUpdateRepositoriesHook(const Shaman::Repository::List \
&repositories) @@ -125,7 +134,9 @@
         QVariant v;
         v.setValue(repos);*/
         d->object->callMethod("preUpdateRepositoriesHook");
-    }
+    }    
+    else
+        emit hookCompleted(Shaman::CorePlugin::PreUpdateRepositoriesHook, \
Shaman::CorePlugin::Success);  }
 
 void ScriptGuiPlugin::postUpdateRepositoriesHook(const Shaman::Repository::List \
&repositories) @@ -135,6 +146,8 @@
         //v.setValue(repositories);
         d->object->callMethod("postUpdateRepositoriesHook");
     }
+    else
+        emit hookCompleted(Shaman::CorePlugin::PostUpdateRepositoriesHook, \
Shaman::CorePlugin::Success);  }
 
 void ScriptGuiPlugin::postBackendReloadedHook()
@@ -142,4 +155,6 @@
     if (d->object && d->object->methodNames().contains("postBackendReloadedHook")) {
         d->object->callMethod("postBackendReloadedHook");
     }
+    else
+        emit hookCompleted(Shaman::CorePlugin::PostBackendReloadedHook, \
Shaman::CorePlugin::Success);  }
--- trunk/playground/sysadmin/shaman/libshaman/scripting/gui/ScriptGuiPlugin.h \
#1066083:1066084 @@ -33,6 +33,8 @@
         void setGuiPluginClass(Kross::Object::Ptr obj);
         
         void hookMessage(const QString &message);
+        
+        void setHookCompleted(Shaman::CorePlugin::Hook hook, \
Shaman::CorePlugin::HookResult result);  
         void preTransactionHook(const Shaman::AbstractPackage::List &packages);
         void postTransactionHook(const Shaman::AbstractPackage::List &packages);
--- trunk/playground/sysadmin/shaman/plugins/testguiscript/guitest.py \
#1066083:1066084 @@ -34,6 +34,7 @@
         print CoreInterface.backend().error()
         #print CoreInterface.backend().packageGroups()
         #print CoreInterface.backend().repositories()
+        GuiPlugin.setHookCompleted(GuiPlugin.PreUpdateRepositoriesHook, \
GuiPlugin.Success)  
 
 #Hint: if we create a QObject here then we may like to provide a valid QObject \
parent


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic