[retro-gtk/core-view-sensitive-binding] retro-core-view: Don't store the sensitivity binding



commit c95a5ab52e1da0e295aba797258bc8efb13a05f5
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sat Jan 11 13:58:16 2020 +0100

    retro-core-view: Don't store the sensitivity binding
    
    Storing it serves no point as we shouldn't destroy it manually. This
    prevents a warning when destroying a RetroCoreView.

 retro-gtk/retro-core-view.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/retro-gtk/retro-core-view.c b/retro-gtk/retro-core-view.c
index e94eca7..9300ef1 100644
--- a/retro-gtk/retro-core-view.c
+++ b/retro-gtk/retro-core-view.c
@@ -15,7 +15,6 @@ struct _RetroCoreView
   GtkEventBox parent_instance;
   RetroCore *core;
   RetroGLDisplay *display;
-  GBinding *sensitive_binding;
   RetroPaPlayer *audio_player;
   gboolean can_grab_pointer;
   gboolean snap_pointer_to_borders;
@@ -366,7 +365,6 @@ retro_core_view_finalize (GObject *object)
 
   g_clear_object (&self->core);
   g_object_unref (self->display);
-  g_object_unref (self->sensitive_binding);
   g_object_unref (self->audio_player);
   g_hash_table_unref (self->key_state);
   g_hash_table_unref (self->keyval_state);
@@ -480,11 +478,10 @@ retro_core_view_init (RetroCoreView *self)
   g_object_set (GTK_WIDGET (self->display), "can-focus", FALSE, NULL);
   gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->display));
 
-  self->sensitive_binding =
-    g_object_bind_property (G_OBJECT (self), "sensitive",
-                            G_OBJECT (self->display), "sensitive",
-                            G_BINDING_BIDIRECTIONAL |
-                            G_BINDING_SYNC_CREATE);
+  g_object_bind_property (G_OBJECT (self), "sensitive",
+                          G_OBJECT (self->display), "sensitive",
+                          G_BINDING_BIDIRECTIONAL |
+                          G_BINDING_SYNC_CREATE);
 
   self->audio_player = retro_pa_player_new ();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]