diff options
author | Bastien Nocera <hadess@hadess.net> | 2022-02-21 10:34:46 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-02-21 11:20:22 +0100 |
commit | 449d6a2a94ce0ae592c40620c3c0fb14815e016a (patch) | |
tree | a1a46b92939af0ebd42e341b7ee141c227bf7985 /src/plugins/vimeo | |
parent | 4cc7ba9ed3f85e047772fa5b268f73f7702166c8 (diff) | |
download | totem-449d6a2a94ce0ae592c40620c3c0fb14815e016a.tar.gz |
vimeo: Stop using intermediate private struct
Diffstat (limited to 'src/plugins/vimeo')
-rw-r--r-- | src/plugins/vimeo/totem-vimeo.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/plugins/vimeo/totem-vimeo.c b/src/plugins/vimeo/totem-vimeo.c index b7074e9d8..5f3cea4da 100644 --- a/src/plugins/vimeo/totem-vimeo.c +++ b/src/plugins/vimeo/totem-vimeo.c @@ -38,9 +38,11 @@ #define TOTEM_VIMEO_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TOTEM_TYPE_VIMEO_PLUGIN, TotemVimeoPlugin)) typedef struct { + PeasExtensionBase parent; + guint signal_id; TotemObject *totem; -} TotemVimeoPluginPrivate; +} TotemVimeoPlugin; TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_VIMEO_PLUGIN, TotemVimeoPlugin, totem_vimeo_plugin) @@ -59,8 +61,8 @@ impl_activate (PeasActivatable *plugin) { TotemVimeoPlugin *pi = TOTEM_VIMEO_PLUGIN (plugin); - pi->priv->totem = g_object_ref (g_object_get_data (G_OBJECT (plugin), "object")); - pi->priv->signal_id = g_signal_connect (G_OBJECT (pi->priv->totem), "get-user-agent", + pi->totem = g_object_ref (g_object_get_data (G_OBJECT (plugin), "object")); + pi->signal_id = g_signal_connect (G_OBJECT (pi->totem), "get-user-agent", G_CALLBACK (get_user_agent_cb), NULL); } @@ -69,13 +71,13 @@ impl_deactivate (PeasActivatable *plugin) { TotemVimeoPlugin *pi = TOTEM_VIMEO_PLUGIN (plugin); - if (pi->priv->signal_id) { - g_signal_handler_disconnect (pi->priv->totem, pi->priv->signal_id); - pi->priv->signal_id = 0; + if (pi->signal_id) { + g_signal_handler_disconnect (pi->totem, pi->signal_id); + pi->signal_id = 0; } - if (pi->priv->totem) { - g_object_unref (pi->priv->totem); - pi->priv->totem = NULL; + if (pi->totem) { + g_object_unref (pi->totem); + pi->totem = NULL; } } |