gplugin/gplugin

76d43734c071
Add a desired-state property to GPlugin.Plugin

This allows us to track what state the user wanted a plugin to be in. The use
case here is, I want to disable a plugin, but the plugin can't be cleanly
unloaded. The plugin returns FALSE from its unload function with an error
stating as such.

For a GPlugin consuming application this creates a dilema where the user can't
actually disable this plugin, because as far as everyone knows, that plugin
should be loaded. With this new property, the consuming application can then
check if the desired state is set to loaded before saving it to a list of
plugins to that should be loaded at the next launch.

Testing Done:
Updated the loader unit tests to make sure that the property is being set properly by `GPluginLoader`.

Reviewed at https://reviews.imfreedom.org/r/1200/
<?xml version="1.0" encoding="UTF-8"?>
<glade-catalog name="gplugin-gtk"
version="@GPLUGIN_VERSION@"
library="gplugin-gtk3"
domain="gplugin"
depends="gtk+"
book="GPlugin">
<glade-widget-classes>
<!-- the get-type-function's are needed due to gplugin's weirdo namespace.
Without them, Glade is going to look for g_plugin_*_get_type and not
gplugin_*_get_type.
-->
<glade-widget-class
name="GPluginGtkPluginInfo"
generic-name="plugininfo"
title="Plugin Info"
get-type-function="gplugin_gtk_plugin_info_get_type"/>
<glade-widget-class
name="GPluginGtkView"
generic-name="pluginview"
title="Plugin View"
get-type-function="gplugin_gtk_view_get_type"/>
<glade-widget-class
name="GPluginGtkStore"
generic-name="pluginstore"
title="Plugin Store"
get-type-function="gplugin_gtk_store_get_type"
toplevel="True"/>
</glade-widget-classes>
<glade-widget-group name="gplugin-gtk" title="GPlugin Gtk Widgets">
<glade-widget-class-ref name="GPluginGtkPluginInfo"/>
<glade-widget-class-ref name="GPluginGtkView"/>
<glade-widget-class-ref name="GPluginGtkStore"/>
</glade-widget-group>
</glade-catalog>