[gedit] View: in ::constructed, chain-up to parent vfunc as first instruction



commit dbffbed2ed098b33edd5eca283101cd1f7dc39ba
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Apr 12 16:39:47 2020 +0200

    View: in ::constructed, chain-up to parent vfunc as first instruction
    
    For ::constructed it's better to first construct the object from the
    parent classes and then to the child classes.

 gedit/gedit-view.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-view.c b/gedit/gedit-view.c
index d64efff32..df522abc3 100644
--- a/gedit/gedit-view.c
+++ b/gedit/gedit-view.c
@@ -194,6 +194,8 @@ gedit_view_constructed (GObject *object)
        GSettings *editor_settings;
        gboolean use_default_font;
 
+       G_OBJECT_CLASS (gedit_view_parent_class)->constructed (object);
+
        settings = _gedit_settings_get_singleton ();
        editor_settings = _gedit_settings_peek_editor_settings (settings);
 
@@ -251,8 +253,6 @@ gedit_view_constructed (GObject *object)
        g_settings_bind (editor_settings, GEDIT_SETTINGS_SMART_HOME_END,
                         view, "smart-home-end",
                         G_SETTINGS_BIND_GET);
-
-       G_OBJECT_CLASS (gedit_view_parent_class)->constructed (object);
 }
 
 static GdkAtom


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