projects
/
cinaest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Danish translation update (via transifex.net)
[cinaest]
/
src
/
plugin-registrar.vala
diff --git
a/src/plugin-registrar.vala
b/src/plugin-registrar.vala
index
29eed01
..
6dd314d
100644
(file)
--- a/
src/plugin-registrar.vala
+++ b/
src/plugin-registrar.vala
@@
-16,23
+16,23
@@
* along with Cinaest. If not, see <http://www.gnu.org/licenses/>.
*/
* along with Cinaest. If not, see <http://www.gnu.org/licenses/>.
*/
-public class PluginRegistrar<T> : Object {
+public class PluginRegistrar<T> : GLibFix.TypeModule {
public string path { get; construct; }
private Type type;
private Module module;
public string path { get; construct; }
private Type type;
private Module module;
- private delegate Type RegisterPluginFunction ();
+ private delegate Type RegisterPluginFunction (GLibFix.TypeModule module);
construct {
assert (Module.supported ());
}
construct {
assert (Module.supported ());
}
- public PluginRegistrar (string path) {
- this.path = path;
+ public PluginRegistrar (string _path) {
+ Object (path: _path);
}
}
- public bool load () {
+ public override bool load () {
stdout.printf ("Loading plugin with path: '%s'\n", path);
module = Module.open (path, ModuleFlags.BIND_LAZY);
stdout.printf ("Loading plugin with path: '%s'\n", path);
module = Module.open (path, ModuleFlags.BIND_LAZY);
@@
-46,7
+46,7
@@
public class PluginRegistrar<T> : Object {
module.symbol ("register_plugin", out function);
RegisterPluginFunction register_plugin = (RegisterPluginFunction) function;
module.symbol ("register_plugin", out function);
RegisterPluginFunction register_plugin = (RegisterPluginFunction) function;
- type = register_plugin ();
+ type = register_plugin (this);
stdout.printf ("Plugin type: %s\n\n", type.name ());
// So it doesn't vanish as soon as the registar goes
stdout.printf ("Plugin type: %s\n\n", type.name ());
// So it doesn't vanish as soon as the registar goes
@@
-55,6
+55,9
@@
public class PluginRegistrar<T> : Object {
return true;
}
return true;
}
+ public override void unload () {
+ }
+
public T new_object () {
return Object.new (type);
}
public T new_object () {
return Object.new (type);
}