[gnome-terminal] Use constructed instead of constructor
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] Use constructed instead of constructor
- Date: Sun, 17 Aug 2014 06:12:07 +0000 (UTC)
commit e519f54855e31da873c4d1ab1971eccb3ceeb6c8
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Jul 15 16:24:45 2014 +0200
Use constructed instead of constructor
https://bugzilla.gnome.org/show_bug.cgi?id=733204
src/terminal-screen-container.c | 21 ++++++---------------
src/terminal-tab-label.c | 20 ++++++--------------
2 files changed, 12 insertions(+), 29 deletions(-)
---
diff --git a/src/terminal-screen-container.c b/src/terminal-screen-container.c
index d79529a..5a6c252 100644
--- a/src/terminal-screen-container.c
+++ b/src/terminal-screen-container.c
@@ -100,20 +100,13 @@ terminal_screen_container_init (TerminalScreenContainer *container)
priv->vscrollbar_policy = GTK_POLICY_AUTOMATIC;
}
-static GObject *
-terminal_screen_container_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_params)
+static void
+terminal_screen_container_constructed (GObject *object)
{
- GObject *object;
- TerminalScreenContainer *container;
- TerminalScreenContainerPrivate *priv;
-
- object = G_OBJECT_CLASS (terminal_screen_container_parent_class)->constructor
- (type, n_construct_properties, construct_params);
+ TerminalScreenContainer *container = TERMINAL_SCREEN_CONTAINER (object);
+ TerminalScreenContainerPrivate *priv = container->priv;
- container = TERMINAL_SCREEN_CONTAINER (object);
- priv = container->priv;
+ G_OBJECT_CLASS (terminal_screen_container_parent_class)->constructed (object);
g_assert (priv->screen != NULL);
@@ -129,8 +122,6 @@ terminal_screen_container_constructor (GType type,
gtk_widget_show_all (priv->hbox);
_terminal_screen_update_scrollbar (priv->screen);
-
- return object;
}
static void
@@ -194,7 +185,7 @@ terminal_screen_container_class_init (TerminalScreenContainerClass *klass)
g_type_class_add_private (gobject_class, sizeof (TerminalScreenContainerPrivate));
- gobject_class->constructor = terminal_screen_container_constructor;
+ gobject_class->constructed = terminal_screen_container_constructed;
gobject_class->get_property = terminal_screen_container_get_property;
gobject_class->set_property = terminal_screen_container_set_property;
diff --git a/src/terminal-tab-label.c b/src/terminal-tab-label.c
index 6f9b0c5..e060a45 100644
--- a/src/terminal-tab-label.c
+++ b/src/terminal-tab-label.c
@@ -164,22 +164,16 @@ terminal_tab_label_init (TerminalTabLabel *tab_label)
priv->tab_pos = (GtkPositionType) -1; /* invalid */
}
-static GObject *
-terminal_tab_label_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_params)
+static void
+terminal_tab_label_constructed (GObject *object)
{
- GObject *object;
- TerminalTabLabel *tab_label;
- TerminalTabLabelPrivate *priv;
+ TerminalTabLabel *tab_label = TERMINAL_TAB_LABEL (object);
+ TerminalTabLabelPrivate *priv = tab_label->priv;
GtkWidget *hbox, *label, *close_button;
- object = G_OBJECT_CLASS (terminal_tab_label_parent_class)->constructor
- (type, n_construct_properties, construct_params);
+ G_OBJECT_CLASS (terminal_tab_label_parent_class)->constructed (object);
- tab_label = TERMINAL_TAB_LABEL (object);
hbox = GTK_WIDGET (tab_label);
- priv = tab_label->priv;
g_assert (priv->screen != NULL);
@@ -206,8 +200,6 @@ terminal_tab_label_constructor (GType type,
G_CALLBACK (close_button_clicked_cb), tab_label);
gtk_widget_show_all (hbox);
-
- return object;
}
static void
@@ -278,7 +270,7 @@ terminal_tab_label_class_init (TerminalTabLabelClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- gobject_class->constructor = terminal_tab_label_constructor;
+ gobject_class->constructed = terminal_tab_label_constructed;
gobject_class->dispose = terminal_tab_label_dispose;
gobject_class->finalize = terminal_tab_label_finalize;
gobject_class->get_property = terminal_tab_label_get_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]