summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-02-21 10:32:53 +0100
committerBastien Nocera <hadess@hadess.net>2022-02-21 11:20:21 +0100
commit80018aa000eb8ff6f543a117ba7ad50d4592009b (patch)
tree4817a5a9096dd76e3c37ab43d601a06985c4fac9 /src
parentf94dc689cf71126d74d48c1ba21035b36d8da99c (diff)
downloadtotem-80018aa000eb8ff6f543a117ba7ad50d4592009b.tar.gz
apple-trailers: Stop using intermediate private struct
Diffstat (limited to 'src')
-rw-r--r--src/plugins/apple-trailers/totem-apple-trailers.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/plugins/apple-trailers/totem-apple-trailers.c b/src/plugins/apple-trailers/totem-apple-trailers.c
index 503f7d74f..1b69e2e28 100644
--- a/src/plugins/apple-trailers/totem-apple-trailers.c
+++ b/src/plugins/apple-trailers/totem-apple-trailers.c
@@ -38,9 +38,11 @@
#define TOTEM_APPLE_TRAILERS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TOTEM_TYPE_APPLE_TRAILERS_PLUGIN, TotemAppleTrailersPlugin))
typedef struct {
+ PeasExtensionBase parent;
+
guint signal_id;
TotemObject *totem;
-} TotemAppleTrailersPluginPrivate;
+} TotemAppleTrailersPlugin;
TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_APPLE_TRAILERS_PLUGIN, TotemAppleTrailersPlugin, totem_apple_trailers_plugin)
@@ -59,8 +61,8 @@ impl_activate (PeasActivatable *plugin)
{
TotemAppleTrailersPlugin *pi = TOTEM_APPLE_TRAILERS_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)
{
TotemAppleTrailersPlugin *pi = TOTEM_APPLE_TRAILERS_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;
}
}