gplugin/gplugin

Implement enable switch in GTK4 viewer

2021-12-16, Elliott Sales de Andrade
f03eee6f9596
Implement enable switch in GTK4 viewer

This adds a `state-set` signal on the plugin row, which merely re-broadcasts the signal from the switch. This enables the view to watch for the signal and pass along the desired state to the manager.

The plugin row sets the display of the enable switch whenever the plugin state refreshes. I'm not entirely sure if all states are displayed in the way we want.

Testing Done:
Start viewer and see that auto-loaded plugins are actually enabled, and that others can be enabled/disabled.

Reviewed at https://reviews.imfreedom.org/r/1193/
<?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>