[totem/wip/hadess/simplify-plugins: 3/14] apple-trailers: Stop using intermediate private struct
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/simplify-plugins: 3/14] apple-trailers: Stop using intermediate private struct
- Date: Mon, 21 Feb 2022 09:35:41 +0000 (UTC)
commit b529c8a4669f23a2a74aef1706bcc34f8036e460
Author: Bastien Nocera <hadess hadess net>
Date: Mon Feb 21 10:32:53 2022 +0100
apple-trailers: Stop using intermediate private struct
src/plugins/apple-trailers/totem-apple-trailers.c | 20 +++++++++++---------
1 file 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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]