I need to hook into load_desktop_file for my own plugin, in order
to read some custom keys there (I'm basically using a single .so file
to provide the code, and configure the functionality in desktop files).

Currently, I have a hack that seems to "work", but it fails when plugin
is loaded, unloaded and loaded once more. The hack in question is:

...

G_DEFINE_DYNAMIC_TYPE_EXTENDED (ProxyHomePlugin, proxy_home_plugin,
HD_TYPE_HOME_PLUGIN_ITEM, 0,
                                  G_IMPLEMENT_INTERFACE (HD_TYPE_PLUGIN_ITEM,

proxy_home_plugin_item_init_plugin_item));

HD_PLUGIN_MODULE_SYMBOLS_CODE (proxy_home_plugin, {}, {});

...

static void
proxy_home_plugin_item_init_plugin_item (HDPluginItemIface *iface)
{
  iface->load_desktop_file = proxy_home_plugin_item_load_desktop_file;

  return;
}


Note that I'm using this instead of the standard

HD_DEFINE_PLUGIN_MODULE (ExampleHomeApplet, example_home_applet,
HD_TYPE_HOME_PLUGIN_ITEM);

(As I understand it, using this wouldn't allow me to override
load_dekstop_file).

This way, my proxy_home_plugin_item_load_desktop_file() function gets
called. But indeed it
appears this is not working fine for unloading & loading.

Is there another way to get at HDPluginItemIface from my
HDHomePluginItem subclass?

-- 
Ville M. Vainio
http://tinyurl.com/vainio
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to