diff options
author | Jonathon Jongsma <jjongsma@redhat.com> | 2015-03-19 10:20:06 -0500 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@redhat.com> | 2015-03-23 10:11:51 -0500 |
commit | b368761ea1ed461e175af175ba4d5b268debc9a8 (patch) | |
tree | 8cd0bcaf002dcd21ddf619db53128d0bfd15dadc /src/virt-viewer-app.c | |
parent | 3b8be76459518b8b3f730e8acf4798154d51b253 (diff) | |
download | virt-viewer-b368761ea1ed461e175af175ba4d5b268debc9a8.tar.gz virt-viewer-b368761ea1ed461e175af175ba4d5b268debc9a8.tar.xz virt-viewer-b368761ea1ed461e175af175ba4d5b268debc9a8.zip |
Use 'constructed' vfunc instead of 'constructor'
We don't need the added complexity of 'constructor', since we only want
to do some final initializing after all of the properties have been set,
etc. So just use the simpler 'constructed'.
Diffstat (limited to 'src/virt-viewer-app.c')
-rw-r--r-- | src/virt-viewer-app.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c index c8c379d..c2a8284 100644 --- a/src/virt-viewer-app.c +++ b/src/virt-viewer-app.c @@ -1814,16 +1814,10 @@ virt_viewer_update_smartcard_accels(VirtViewerApp *self) } } -static GObject * -virt_viewer_app_constructor (GType gtype, - guint n_properties, - GObjectConstructParam *properties) +static void +virt_viewer_app_constructed(GObject *object) { - GObject *obj; - VirtViewerApp *self; - - obj = G_OBJECT_CLASS (virt_viewer_app_parent_class)->constructor (gtype, n_properties, properties); - self = VIRT_VIEWER_APP(obj); + VirtViewerApp *self = VIRT_VIEWER_APP(object); self->priv->main_window = virt_viewer_app_window_new(self, virt_viewer_app_get_first_monitor(self)); @@ -1843,8 +1837,6 @@ virt_viewer_app_constructor (GType gtype, virt_viewer_app_set_fullscreen(self, opt_fullscreen); virt_viewer_app_set_hotkeys(self, opt_hotkeys); virt_viewer_app_set_kiosk(self, opt_kiosk); - - return obj; } static void @@ -1854,7 +1846,7 @@ virt_viewer_app_class_init (VirtViewerAppClass *klass) g_type_class_add_private (klass, sizeof (VirtViewerAppPrivate)); - object_class->constructor = virt_viewer_app_constructor; + object_class->constructed = virt_viewer_app_constructed; object_class->get_property = virt_viewer_app_get_property; object_class->set_property = virt_viewer_app_set_property; object_class->dispose = virt_viewer_app_dispose; |