[gimp] app: implement GObject::constructed() instead of ::constructor()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: implement GObject::constructed() instead of ::constructor()
- Date: Fri, 14 Jan 2011 08:39:29 +0000 (UTC)
commit 202124c438435ed543a035505a8bc83b603458cb
Author: Michael Natterer <mitch gimp org>
Date: Fri Jan 14 09:38:11 2011 +0100
app: implement GObject::constructed() instead of ::constructor()
app/widgets/gimpactiongroup.c | 46 ++++------
app/widgets/gimpbrusheditor.c | 19 +---
app/widgets/gimpbrushselect.c | 72 ++++++--------
app/widgets/gimpchanneltreeview.c | 57 +++++-------
app/widgets/gimpcolormapeditor.c | 22 ++---
app/widgets/gimpcombotagentry.c | 24 ++----
app/widgets/gimpcontainericonview.c | 30 ++----
app/widgets/gimpcontainertreestore.c | 52 ++++------
app/widgets/gimpcontainertreeview.c | 30 ++----
app/widgets/gimpcontrollereditor.c | 74 +++++++--------
app/widgets/gimpcontrollerkeyboard.c | 19 +---
app/widgets/gimpcontrollerlist.c | 53 ++++------
app/widgets/gimpcontrollerwheel.c | 19 +---
app/widgets/gimpdataeditor.c | 90 ++++++++----------
app/widgets/gimpdeviceeditor.c | 85 +++++++---------
app/widgets/gimpdeviceinfo.c | 46 ++++------
app/widgets/gimpdeviceinfoeditor.c | 85 ++++++++---------
app/widgets/gimpdevicestatus.c | 22 ++---
app/widgets/gimpdockwindow.c | 119 +++++++++++------------
app/widgets/gimpdrawabletreeview.c | 28 ++----
app/widgets/gimpdynamicseditor.c | 19 +---
app/widgets/gimpdynamicsoutputeditor.c | 82 ++++++++--------
app/widgets/gimpeditor.c | 88 ++++++++---------
app/widgets/gimperrorconsole.c | 22 ++---
app/widgets/gimpfilleditor.c | 40 +++-----
app/widgets/gimpfontselect.c | 22 ++---
app/widgets/gimpgradienteditor.c | 22 ++---
app/widgets/gimpgradientselect.c | 58 +++++-------
app/widgets/gimpgrideditor.c | 165 +++++++++++++++-----------------
app/widgets/gimpimageparasiteview.c | 116 +++++++++++------------
app/widgets/gimpimagepropview.c | 92 ++++++++----------
app/widgets/gimpitemtreeview.c | 31 ++----
app/widgets/gimplanguageentry.c | 22 ++---
app/widgets/gimplanguagestore.c | 33 +++----
app/widgets/gimplayertreeview.c | 27 ++----
app/widgets/gimpmessagebox.c | 62 +++++-------
app/widgets/gimppaletteeditor.c | 22 ++---
app/widgets/gimppaletteselect.c | 22 ++---
app/widgets/gimppatternselect.c | 22 ++---
app/widgets/gimppdbdialog.c | 62 +++++-------
app/widgets/gimpprofilechooserdialog.c | 25 ++----
app/widgets/gimpsamplepointeditor.c | 48 ++++------
app/widgets/gimpselectioneditor.c | 22 ++---
app/widgets/gimpsettingsbox.c | 22 ++---
app/widgets/gimpsettingseditor.c | 74 +++++++--------
app/widgets/gimpsizebox.c | 54 ++++------
app/widgets/gimpstrokeeditor.c | 126 +++++++++++-------------
app/widgets/gimptagpopup.c | 135 ++++++++++++--------------
app/widgets/gimptemplateeditor.c | 22 ++---
app/widgets/gimptextbuffer.c | 32 +++----
app/widgets/gimptextstyleeditor.c | 22 ++---
app/widgets/gimptooloptionseditor.c | 38 +++-----
app/widgets/gimptoolpreseteditor.c | 43 ++++-----
app/widgets/gimptranslationstore.c | 33 +++----
app/widgets/gimpuimanager.c | 22 ++---
app/widgets/gimpundoeditor.c | 58 +++++-------
app/widgets/gimpvectorstreeview.c | 31 ++----
57 files changed, 1176 insertions(+), 1652 deletions(-)
---
diff --git a/app/widgets/gimpactiongroup.c b/app/widgets/gimpactiongroup.c
index 8aaeffe..de28bc8 100644
--- a/app/widgets/gimpactiongroup.c
+++ b/app/widgets/gimpactiongroup.c
@@ -50,19 +50,17 @@ enum
};
-static GObject * gimp_action_group_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_action_group_dispose (GObject *object);
-static void gimp_action_group_finalize (GObject *object);
-static void gimp_action_group_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_action_group_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
+static void gimp_action_group_constructed (GObject *object);
+static void gimp_action_group_dispose (GObject *object);
+static void gimp_action_group_finalize (GObject *object);
+static void gimp_action_group_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_action_group_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
G_DEFINE_TYPE (GimpActionGroup, gimp_action_group, GTK_TYPE_ACTION_GROUP)
@@ -75,7 +73,7 @@ gimp_action_group_class_init (GimpActionGroupClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_action_group_constructor;
+ object_class->constructed = gimp_action_group_constructed;
object_class->dispose = gimp_action_group_dispose;
object_class->finalize = gimp_action_group_finalize;
object_class->set_property = gimp_action_group_set_property;
@@ -110,18 +108,14 @@ gimp_action_group_init (GimpActionGroup *group)
{
}
-static GObject *
-gimp_action_group_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_action_group_constructed (GObject *object)
{
- GObject *object;
- GimpActionGroup *group;
+ GimpActionGroup *group = GIMP_ACTION_GROUP (object);
const gchar *name;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- group = GIMP_ACTION_GROUP (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (group->gimp));
@@ -141,16 +135,12 @@ gimp_action_group_constructor (GType type,
g_hash_table_replace (group_class->groups,
g_strdup (name), list);
}
-
- return object;
}
static void
gimp_action_group_dispose (GObject *object)
{
- const gchar *name;
-
- name = gtk_action_group_get_name (GTK_ACTION_GROUP (object));
+ const gchar *name = gtk_action_group_get_name (GTK_ACTION_GROUP (object));
if (name)
{
diff --git a/app/widgets/gimpbrusheditor.c b/app/widgets/gimpbrusheditor.c
index 88875ca..481a39d 100644
--- a/app/widgets/gimpbrusheditor.c
+++ b/app/widgets/gimpbrusheditor.c
@@ -48,9 +48,7 @@
static void gimp_brush_editor_docked_iface_init (GimpDockedInterface *face);
-static GObject * gimp_brush_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_brush_editor_constructed (GObject *object);
static void gimp_brush_editor_set_data (GimpDataEditor *editor,
GimpData *data);
@@ -83,7 +81,7 @@ gimp_brush_editor_class_init (GimpBrushEditorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpDataEditorClass *editor_class = GIMP_DATA_EDITOR_CLASS (klass);
- object_class->constructor = gimp_brush_editor_constructor;
+ object_class->constructed = gimp_brush_editor_constructed;
editor_class->set_data = gimp_brush_editor_set_data;
editor_class->title = _("Brush Editor");
@@ -228,18 +226,13 @@ gimp_brush_editor_init (GimpBrushEditor *editor)
editor);
}
-static GObject *
-gimp_brush_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_brush_editor_constructed (GObject *object)
{
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_docked_set_show_button_bar (GIMP_DOCKED (object), FALSE);
-
- return object;
}
static void
diff --git a/app/widgets/gimpbrushselect.c b/app/widgets/gimpbrushselect.c
index 99097aa..df650c2 100644
--- a/app/widgets/gimpbrushselect.c
+++ b/app/widgets/gimpbrushselect.c
@@ -52,33 +52,30 @@ enum
};
-static GObject * gimp_brush_select_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_brush_select_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-
-static GValueArray *
- gimp_brush_select_run_callback (GimpPdbDialog *dialog,
- GimpObject *object,
- gboolean closing,
- GError **error);
-
-static void gimp_brush_select_opacity_changed (GimpContext *context,
- gdouble opacity,
- GimpBrushSelect *select);
-static void gimp_brush_select_mode_changed (GimpContext *context,
- GimpLayerModeEffects paint_mode,
- GimpBrushSelect *select);
-
-static void gimp_brush_select_opacity_update (GtkAdjustment *adj,
- GimpBrushSelect *select);
-static void gimp_brush_select_mode_update (GtkWidget *widget,
- GimpBrushSelect *select);
-static void gimp_brush_select_spacing_update (GtkAdjustment *adj,
- GimpBrushSelect *select);
+static void gimp_brush_select_constructed (GObject *object);
+static void gimp_brush_select_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+
+static GValueArray * gimp_brush_select_run_callback (GimpPdbDialog *dialog,
+ GimpObject *object,
+ gboolean closing,
+ GError **error);
+
+static void gimp_brush_select_opacity_changed (GimpContext *context,
+ gdouble opacity,
+ GimpBrushSelect *select);
+static void gimp_brush_select_mode_changed (GimpContext *context,
+ GimpLayerModeEffects paint_mode,
+ GimpBrushSelect *select);
+
+static void gimp_brush_select_opacity_update (GtkAdjustment *adj,
+ GimpBrushSelect *select);
+static void gimp_brush_select_mode_update (GtkWidget *widget,
+ GimpBrushSelect *select);
+static void gimp_brush_select_spacing_update (GtkAdjustment *adj,
+ GimpBrushSelect *select);
G_DEFINE_TYPE (GimpBrushSelect, gimp_brush_select, GIMP_TYPE_PDB_DIALOG)
@@ -92,7 +89,7 @@ gimp_brush_select_class_init (GimpBrushSelectClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpPdbDialogClass *pdb_class = GIMP_PDB_DIALOG_CLASS (klass);
- object_class->constructor = gimp_brush_select_constructor;
+ object_class->constructed = gimp_brush_select_constructed;
object_class->set_property = gimp_brush_select_set_property;
pdb_class->run_callback = gimp_brush_select_run_callback;
@@ -124,22 +121,17 @@ gimp_brush_select_init (GimpBrushSelect *select)
{
}
-static GObject *
-gimp_brush_select_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_brush_select_constructed (GObject *object)
{
- GObject *object;
- GimpPdbDialog *dialog;
- GimpBrushSelect *select;
+ GimpPdbDialog *dialog = GIMP_PDB_DIALOG (object);
+ GimpBrushSelect *select = GIMP_BRUSH_SELECT (object);
GtkWidget *content_area;
GtkWidget *table;
GtkAdjustment *spacing_adj;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- dialog = GIMP_PDB_DIALOG (object);
- select = GIMP_BRUSH_SELECT (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_context_set_opacity (dialog->context, select->initial_opacity);
gimp_context_set_paint_mode (dialog->context, select->initial_mode);
@@ -209,8 +201,6 @@ gimp_brush_select_constructor (GType type,
select);
gtk_widget_show (table);
-
- return object;
}
static void
diff --git a/app/widgets/gimpchanneltreeview.c b/app/widgets/gimpchanneltreeview.c
index f0bbc27..521d070 100644
--- a/app/widgets/gimpchanneltreeview.c
+++ b/app/widgets/gimpchanneltreeview.c
@@ -59,25 +59,24 @@ struct _GimpChannelTreeViewPriv
static void gimp_channel_tree_view_view_iface_init (GimpContainerViewInterface *iface);
-static GObject * gimp_channel_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_channel_tree_view_drop_viewable (GimpContainerTreeView *view,
- GimpViewable *src_viewable,
- GimpViewable *dest_viewable,
+static void gimp_channel_tree_view_constructed (GObject *object);
+
+static void gimp_channel_tree_view_drop_viewable (GimpContainerTreeView *view,
+ GimpViewable *src_viewable,
+ GimpViewable *dest_viewable,
+ GtkTreeViewDropPosition drop_pos);
+static void gimp_channel_tree_view_drop_component (GimpContainerTreeView *tree_view,
+ GimpImage *image,
+ GimpChannelType component,
+ GimpViewable *dest_viewable,
GtkTreeViewDropPosition drop_pos);
-static void gimp_channel_tree_view_drop_component (GimpContainerTreeView *tree_view,
- GimpImage *image,
- GimpChannelType component,
- GimpViewable *dest_viewable,
- GtkTreeViewDropPosition drop_pos);
-static void gimp_channel_tree_view_set_image (GimpItemTreeView *item_view,
- GimpImage *image);
-static GimpItem * gimp_channel_tree_view_item_new (GimpImage *image);
+static void gimp_channel_tree_view_set_image (GimpItemTreeView *item_view,
+ GimpImage *image);
+static GimpItem * gimp_channel_tree_view_item_new (GimpImage *image);
-static void gimp_channel_tree_view_set_context (GimpContainerView *view,
- GimpContext *context);
-static void gimp_channel_tree_view_set_view_size (GimpContainerView *view);
+static void gimp_channel_tree_view_set_context (GimpContainerView *view,
+ GimpContext *context);
+static void gimp_channel_tree_view_set_view_size (GimpContainerView *view);
G_DEFINE_TYPE_WITH_CODE (GimpChannelTreeView, gimp_channel_tree_view,
@@ -97,7 +96,7 @@ gimp_channel_tree_view_class_init (GimpChannelTreeViewClass *klass)
GimpContainerTreeViewClass *view_class = GIMP_CONTAINER_TREE_VIEW_CLASS (klass);
GimpItemTreeViewClass *iv_class = GIMP_ITEM_TREE_VIEW_CLASS (klass);
- object_class->constructor = gimp_channel_tree_view_constructor;
+ object_class->constructed = gimp_channel_tree_view_constructed;
view_class->drop_viewable = gimp_channel_tree_view_drop_viewable;
view_class->drop_component = gimp_channel_tree_view_drop_component;
@@ -149,21 +148,15 @@ gimp_channel_tree_view_init (GimpChannelTreeView *view)
view->priv->toselection_button = NULL;
}
-static GObject *
-gimp_channel_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_channel_tree_view_constructed (GObject *object)
{
- GObject *object;
- GimpEditor *editor;
- GimpChannelTreeView *view;
- GimpContainerTreeView *tree_view;
+ GimpEditor *editor = GIMP_EDITOR (object);
+ GimpChannelTreeView *view = GIMP_CHANNEL_TREE_VIEW (object);
+ GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (object);
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_EDITOR (object);
- view = GIMP_CHANNEL_TREE_VIEW (object);
- tree_view = GIMP_CONTAINER_TREE_VIEW (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_dnd_viewable_dest_add (GTK_WIDGET (tree_view->view), GIMP_TYPE_LAYER,
NULL, tree_view);
@@ -187,8 +180,6 @@ gimp_channel_tree_view_constructor (GType type,
GIMP_TYPE_CHANNEL);
gtk_box_reorder_child (GTK_BOX (GIMP_EDITOR (view)->button_box),
view->priv->toselection_button, 5);
-
- return object;
}
diff --git a/app/widgets/gimpcolormapeditor.c b/app/widgets/gimpcolormapeditor.c
index e98b4c0..bf75e81 100644
--- a/app/widgets/gimpcolormapeditor.c
+++ b/app/widgets/gimpcolormapeditor.c
@@ -56,9 +56,7 @@
static void gimp_colormap_editor_docked_iface_init (GimpDockedInterface *face);
-static GObject * gimp_colormap_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_colormap_editor_constructed (GObject *object);
static void gimp_colormap_editor_dispose (GObject *object);
static void gimp_colormap_editor_finalize (GObject *object);
@@ -126,7 +124,7 @@ gimp_colormap_editor_class_init (GimpColormapEditorClass* klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GimpImageEditorClass *image_editor_class = GIMP_IMAGE_EDITOR_CLASS (klass);
- object_class->constructor = gimp_colormap_editor_constructor;
+ object_class->constructed = gimp_colormap_editor_constructed;
object_class->dispose = gimp_colormap_editor_dispose;
object_class->finalize = gimp_colormap_editor_finalize;
@@ -216,17 +214,13 @@ gimp_colormap_editor_init (GimpColormapEditor *editor)
editor);
}
-static GObject *
-gimp_colormap_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_colormap_editor_constructed (GObject *object)
{
- GObject *object;
- GimpColormapEditor *editor;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (object);
- editor = GIMP_COLORMAP_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_editor_add_action_button (GIMP_EDITOR (editor), "colormap",
"colormap-edit-color",
@@ -237,8 +231,6 @@ gimp_colormap_editor_constructor (GType type,
"colormap-add-color-from-bg",
GDK_CONTROL_MASK,
NULL);
-
- return object;
}
static void
diff --git a/app/widgets/gimpcombotagentry.c b/app/widgets/gimpcombotagentry.c
index 771ec60..ac06bc0 100644
--- a/app/widgets/gimpcombotagentry.c
+++ b/app/widgets/gimpcombotagentry.c
@@ -38,9 +38,7 @@
#include "gimpcombotagentry.h"
-static GObject* gimp_combo_tag_entry_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_combo_tag_entry_constructed (GObject *object);
static void gimp_combo_tag_entry_dispose (GObject *object);
static gboolean gimp_combo_tag_entry_expose (GtkWidget *widget,
@@ -72,7 +70,7 @@ gimp_combo_tag_entry_class_init (GimpComboTagEntryClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->constructor = gimp_combo_tag_entry_constructor;
+ object_class->constructed = gimp_combo_tag_entry_constructed;
object_class->dispose = gimp_combo_tag_entry_dispose;
widget_class->expose_event = gimp_combo_tag_entry_expose;
@@ -100,26 +98,18 @@ gimp_combo_tag_entry_init (GimpComboTagEntry *entry)
NULL);
}
-static GObject *
-gimp_combo_tag_entry_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_combo_tag_entry_constructed (GObject *object)
{
- GObject *object;
- GimpComboTagEntry *entry;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type,
- n_params,
- params);
+ GimpComboTagEntry *entry = GIMP_COMBO_TAG_ENTRY (object);
- entry = GIMP_COMBO_TAG_ENTRY (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_signal_connect_object (GIMP_TAG_ENTRY (entry)->container,
"tag-count-changed",
G_CALLBACK (gimp_combo_tag_entry_tag_count_changed),
entry, 0);
-
- return object;
}
static void
diff --git a/app/widgets/gimpcontainericonview.c b/app/widgets/gimpcontainericonview.c
index 656616a..5821e80 100644
--- a/app/widgets/gimpcontainericonview.c
+++ b/app/widgets/gimpcontainericonview.c
@@ -49,11 +49,9 @@ struct _GimpContainerIconViewPriv
static void gimp_container_icon_view_view_iface_init (GimpContainerViewInterface *iface);
-static GObject * gimp_container_icon_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-
+static void gimp_container_icon_view_constructed (GObject *object);
static void gimp_container_icon_view_finalize (GObject *object);
+
static void gimp_container_icon_view_unmap (GtkWidget *widget);
static gboolean gimp_container_icon_view_popup_menu (GtkWidget *widget);
@@ -123,7 +121,7 @@ gimp_container_icon_view_class_init (GimpContainerIconViewClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->constructor = gimp_container_icon_view_constructor;
+ object_class->constructed = gimp_container_icon_view_constructed;
object_class->finalize = gimp_container_icon_view_finalize;
widget_class->unmap = gimp_container_icon_view_unmap;
@@ -173,21 +171,15 @@ gimp_container_icon_view_init (GimpContainerIconView *icon_view)
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
}
-static GObject *
-gimp_container_icon_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_container_icon_view_constructed (GObject *object)
{
- GimpContainerIconView *icon_view;
- GimpContainerView *view;
- GimpContainerBox *box;
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpContainerIconView *icon_view = GIMP_CONTAINER_ICON_VIEW (object);
+ GimpContainerView *view = GIMP_CONTAINER_VIEW (object);
+ GimpContainerBox *box = GIMP_CONTAINER_BOX (object);
- icon_view = GIMP_CONTAINER_ICON_VIEW (object);
- view = GIMP_CONTAINER_VIEW (object);
- box = GIMP_CONTAINER_BOX (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
icon_view->model = gimp_container_tree_store_new (view,
icon_view->n_model_columns,
@@ -230,8 +222,6 @@ gimp_container_icon_view_constructor (GType type,
g_signal_connect (icon_view->view, "query-tooltip",
G_CALLBACK (gimp_container_icon_view_tooltip),
icon_view);
-
- return object;
}
static void
diff --git a/app/widgets/gimpcontainertreestore.c b/app/widgets/gimpcontainertreestore.c
index 39d564a..16b43b8 100644
--- a/app/widgets/gimpcontainertreestore.c
+++ b/app/widgets/gimpcontainertreestore.c
@@ -58,24 +58,22 @@ struct _GimpContainerTreeStorePrivate
GimpContainerTreeStorePrivate)
-static GObject * gimp_container_tree_store_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_container_tree_store_finalize (GObject *object);
-static void gimp_container_tree_store_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_container_tree_store_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gimp_container_tree_store_set (GimpContainerTreeStore *store,
- GtkTreeIter *iter,
- GimpViewable *viewable);
-static void gimp_container_tree_store_renderer_update (GimpViewRenderer *renderer,
- GimpContainerTreeStore *store);
+static void gimp_container_tree_store_constructed (GObject *object);
+static void gimp_container_tree_store_finalize (GObject *object);
+static void gimp_container_tree_store_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_container_tree_store_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_container_tree_store_set (GimpContainerTreeStore *store,
+ GtkTreeIter *iter,
+ GimpViewable *viewable);
+static void gimp_container_tree_store_renderer_update (GimpViewRenderer *renderer,
+ GimpContainerTreeStore *store);
G_DEFINE_TYPE (GimpContainerTreeStore, gimp_container_tree_store,
@@ -89,7 +87,7 @@ gimp_container_tree_store_class_init (GimpContainerTreeStoreClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_container_tree_store_constructor;
+ object_class->constructed = gimp_container_tree_store_constructed;
object_class->finalize = gimp_container_tree_store_finalize;
object_class->set_property = gimp_container_tree_store_set_property;
object_class->get_property = gimp_container_tree_store_get_property;
@@ -115,19 +113,11 @@ gimp_container_tree_store_init (GimpContainerTreeStore *store)
{
}
-static GObject *
-gimp_container_tree_store_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_container_tree_store_constructed (GObject *object)
{
- GimpContainerTreeStore *store;
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- store = GIMP_CONTAINER_TREE_STORE (object);
-
- return object;
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
}
static void
diff --git a/app/widgets/gimpcontainertreeview.c b/app/widgets/gimpcontainertreeview.c
index 51d75fe..b3adffe 100644
--- a/app/widgets/gimpcontainertreeview.c
+++ b/app/widgets/gimpcontainertreeview.c
@@ -46,11 +46,9 @@
static void gimp_container_tree_view_view_iface_init (GimpContainerViewInterface *iface);
-static GObject * gimp_container_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-
+static void gimp_container_tree_view_constructed (GObject *object);
static void gimp_container_tree_view_finalize (GObject *object);
+
static void gimp_container_tree_view_unmap (GtkWidget *widget);
static gboolean gimp_container_tree_view_popup_menu (GtkWidget *widget);
@@ -123,7 +121,7 @@ gimp_container_tree_view_class_init (GimpContainerTreeViewClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->constructor = gimp_container_tree_view_constructor;
+ object_class->constructed = gimp_container_tree_view_constructed;
object_class->finalize = gimp_container_tree_view_finalize;
widget_class->unmap = gimp_container_tree_view_unmap;
@@ -181,21 +179,15 @@ gimp_container_tree_view_init (GimpContainerTreeView *tree_view)
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
}
-static GObject *
-gimp_container_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_container_tree_view_constructed (GObject *object)
{
- GimpContainerTreeView *tree_view;
- GimpContainerView *view;
- GimpContainerBox *box;
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (object);
+ GimpContainerView *view = GIMP_CONTAINER_VIEW (object);
+ GimpContainerBox *box = GIMP_CONTAINER_BOX (object);
- tree_view = GIMP_CONTAINER_TREE_VIEW (object);
- view = GIMP_CONTAINER_VIEW (object);
- box = GIMP_CONTAINER_BOX (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
tree_view->model = gimp_container_tree_store_new (view,
tree_view->n_model_columns,
@@ -275,8 +267,6 @@ gimp_container_tree_view_constructor (GType type,
g_signal_connect (tree_view->view, "query-tooltip",
G_CALLBACK (gimp_container_tree_view_tooltip),
tree_view);
-
- return object;
}
static void
diff --git a/app/widgets/gimpcontrollereditor.c b/app/widgets/gimpcontrollereditor.c
index bb1f1b4..04ac246 100644
--- a/app/widgets/gimpcontrollereditor.c
+++ b/app/widgets/gimpcontrollereditor.c
@@ -62,9 +62,8 @@ enum
};
-static GObject * gimp_controller_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_controller_editor_constructed (GObject *object);
+static void gimp_controller_editor_finalize (GObject *object);
static void gimp_controller_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -74,7 +73,6 @@ static void gimp_controller_editor_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
-static void gimp_controller_editor_finalize (GObject *object);
static void gimp_controller_editor_unmap (GtkWidget *widget);
@@ -118,10 +116,10 @@ gimp_controller_editor_class_init (GimpControllerEditorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->constructor = gimp_controller_editor_constructor;
+ object_class->constructed = gimp_controller_editor_constructed;
+ object_class->finalize = gimp_controller_editor_finalize;
object_class->set_property = gimp_controller_editor_set_property;
object_class->get_property = gimp_controller_editor_get_property;
- object_class->finalize = gimp_controller_editor_finalize;
widget_class->unmap = gimp_controller_editor_unmap;
@@ -150,13 +148,10 @@ gimp_controller_editor_init (GimpControllerEditor *editor)
editor->info = NULL;
}
-static GObject *
-gimp_controller_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_controller_editor_constructed (GObject *object)
{
- GObject *object;
- GimpControllerEditor *editor;
+ GimpControllerEditor *editor = GIMP_CONTROLLER_EDITOR (object);
GimpControllerInfo *info;
GimpController *controller;
GimpControllerClass *controller_class;
@@ -178,9 +173,8 @@ gimp_controller_editor_constructor (GType type,
gint row;
gint i;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_CONTROLLER_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_CONTROLLER_INFO (editor->info));
@@ -394,8 +388,31 @@ gimp_controller_editor_constructor (GType type,
gtk_widget_set_sensitive (editor->edit_button, FALSE);
gtk_widget_set_sensitive (editor->delete_button, FALSE);
+}
+
+static void
+gimp_controller_editor_finalize (GObject *object)
+{
+ GimpControllerEditor *editor = GIMP_CONTROLLER_EDITOR (object);
+
+ if (editor->info)
+ {
+ gimp_controller_info_set_event_snooper (editor->info, NULL, NULL);
+
+ g_object_unref (editor->info);
+ editor->info = NULL;
+ }
+
+ if (editor->context)
+ {
+ g_object_unref (editor->context);
+ editor->context = NULL;
+ }
+
+ if (editor->edit_dialog)
+ gtk_widget_destroy (editor->edit_dialog);
- return object;
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
@@ -447,31 +464,6 @@ gimp_controller_editor_get_property (GObject *object,
}
static void
-gimp_controller_editor_finalize (GObject *object)
-{
- GimpControllerEditor *editor = GIMP_CONTROLLER_EDITOR (object);
-
- if (editor->info)
- {
- gimp_controller_info_set_event_snooper (editor->info, NULL, NULL);
-
- g_object_unref (editor->info);
- editor->info = NULL;
- }
-
- if (editor->context)
- {
- g_object_unref (editor->context);
- editor->context = NULL;
- }
-
- if (editor->edit_dialog)
- gtk_widget_destroy (editor->edit_dialog);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
gimp_controller_editor_unmap (GtkWidget *widget)
{
GimpControllerEditor *editor = GIMP_CONTROLLER_EDITOR (widget);
diff --git a/app/widgets/gimpcontrollerkeyboard.c b/app/widgets/gimpcontrollerkeyboard.c
index b24869b..450cbdd 100644
--- a/app/widgets/gimpcontrollerkeyboard.c
+++ b/app/widgets/gimpcontrollerkeyboard.c
@@ -45,9 +45,7 @@ struct _KeyboardEvent
};
-static GObject * gimp_controller_keyboard_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_controller_keyboard_constructed (GObject *object);
static gint gimp_controller_keyboard_get_n_events (GimpController *controller);
static const gchar * gimp_controller_keyboard_get_event_name (GimpController *controller,
@@ -172,7 +170,7 @@ gimp_controller_keyboard_class_init (GimpControllerKeyboardClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpControllerClass *controller_class = GIMP_CONTROLLER_CLASS (klass);
- object_class->constructor = gimp_controller_keyboard_constructor;
+ object_class->constructed = gimp_controller_keyboard_constructed;
controller_class->name = _("Keyboard");
controller_class->help_id = GIMP_HELP_CONTROLLER_KEYBOARD;
@@ -208,21 +206,16 @@ gimp_controller_keyboard_init (GimpControllerKeyboard *keyboard)
}
}
-static GObject *
-gimp_controller_keyboard_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_controller_keyboard_constructed (GObject *object)
{
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_object_set (object,
"name", _("Keyboard Events"),
"state", _("Ready"),
NULL);
-
- return object;
}
static gint
diff --git a/app/widgets/gimpcontrollerlist.c b/app/widgets/gimpcontrollerlist.c
index 7e878c1..08f3b8e 100644
--- a/app/widgets/gimpcontrollerlist.c
+++ b/app/widgets/gimpcontrollerlist.c
@@ -68,9 +68,8 @@ enum
};
-static GObject * gimp_controller_list_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_controller_list_constructed (GObject *object);
+static void gimp_controller_list_finalize (GObject *object);
static void gimp_controller_list_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -80,8 +79,6 @@ static void gimp_controller_list_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
-static void gimp_controller_list_finalize (GObject *object);
-
static void gimp_controller_list_src_sel_changed (GtkTreeSelection *sel,
GimpControllerList *list);
static void gimp_controller_list_row_activated (GtkTreeView *tv,
@@ -123,10 +120,10 @@ gimp_controller_list_class_init (GimpControllerListClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_controller_list_constructor;
+ object_class->constructed = gimp_controller_list_constructed;
+ object_class->finalize = gimp_controller_list_finalize;
object_class->set_property = gimp_controller_list_set_property;
object_class->get_property = gimp_controller_list_get_property;
- object_class->finalize = gimp_controller_list_finalize;
g_object_class_install_property (object_class, PROP_GIMP,
g_param_spec_object ("gimp",
@@ -316,17 +313,13 @@ gimp_controller_list_init (GimpControllerList *list)
gtk_widget_set_sensitive (list->down_button, FALSE);
}
-static GObject *
-gimp_controller_list_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_controller_list_constructed (GObject *object)
{
- GObject *object;
- GimpControllerList *list;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpControllerList *list = GIMP_CONTROLLER_LIST (object);
- list = GIMP_CONTROLLER_LIST (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (list->gimp));
@@ -335,8 +328,20 @@ gimp_controller_list_constructor (GType type,
gimp_container_view_set_context (GIMP_CONTAINER_VIEW (list->dest),
gimp_get_user_context (list->gimp));
+}
- return object;
+static void
+gimp_controller_list_finalize (GObject *object)
+{
+ GimpControllerList *list = GIMP_CONTROLLER_LIST (object);
+
+ if (list->gimp)
+ {
+ g_object_unref (list->gimp);
+ list->gimp = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
@@ -379,20 +384,6 @@ gimp_controller_list_get_property (GObject *object,
}
}
-static void
-gimp_controller_list_finalize (GObject *object)
-{
- GimpControllerList *list = GIMP_CONTROLLER_LIST (object);
-
- if (list->gimp)
- {
- g_object_unref (list->gimp);
- list->gimp = NULL;
- }
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
/* public functions */
diff --git a/app/widgets/gimpcontrollerwheel.c b/app/widgets/gimpcontrollerwheel.c
index a2a35fa..3ea81bd 100644
--- a/app/widgets/gimpcontrollerwheel.c
+++ b/app/widgets/gimpcontrollerwheel.c
@@ -47,9 +47,7 @@ struct _WheelEvent
};
-static GObject * gimp_controller_wheel_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_controller_wheel_constructed (GObject *object);
static gint gimp_controller_wheel_get_n_events (GimpController *controller);
static const gchar * gimp_controller_wheel_get_event_name (GimpController *controller,
@@ -174,7 +172,7 @@ gimp_controller_wheel_class_init (GimpControllerWheelClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpControllerClass *controller_class = GIMP_CONTROLLER_CLASS (klass);
- object_class->constructor = gimp_controller_wheel_constructor;
+ object_class->constructed = gimp_controller_wheel_constructed;
controller_class->name = _("Mouse Wheel");
controller_class->help_id = GIMP_HELP_CONTROLLER_WHEEL;
@@ -210,21 +208,16 @@ gimp_controller_wheel_init (GimpControllerWheel *wheel)
}
}
-static GObject *
-gimp_controller_wheel_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_controller_wheel_constructed (GObject *object)
{
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_object_set (object,
"name", _("Mouse Wheel Events"),
"state", _("Ready"),
NULL);
-
- return object;
}
static gint
diff --git a/app/widgets/gimpdataeditor.c b/app/widgets/gimpdataeditor.c
index 0ef818a..381cc8e 100644
--- a/app/widgets/gimpdataeditor.c
+++ b/app/widgets/gimpdataeditor.c
@@ -58,9 +58,8 @@ enum
static void gimp_data_editor_docked_iface_init (GimpDockedInterface *iface);
-static GObject * gimp_data_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_data_editor_constructed (GObject *object);
+static void gimp_data_editor_dispose (GObject *object);
static void gimp_data_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -69,7 +68,6 @@ static void gimp_data_editor_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void gimp_data_editor_dispose (GObject *object);
static void gimp_data_editor_style_set (GtkWidget *widget,
GtkStyle *prev_style);
@@ -121,10 +119,10 @@ gimp_data_editor_class_init (GimpDataEditorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->constructor = gimp_data_editor_constructor;
+ object_class->constructed = gimp_data_editor_constructed;
+ object_class->dispose = gimp_data_editor_dispose;
object_class->set_property = gimp_data_editor_set_property;
object_class->get_property = gimp_data_editor_get_property;
- object_class->dispose = gimp_data_editor_dispose;
widget_class->style_set = gimp_data_editor_style_set;
@@ -160,6 +158,20 @@ gimp_data_editor_class_init (GimpDataEditorClass *klass)
}
static void
+gimp_data_editor_docked_iface_init (GimpDockedInterface *iface)
+{
+ parent_docked_iface = g_type_interface_peek_parent (iface);
+
+ if (! parent_docked_iface)
+ parent_docked_iface = g_type_default_interface_peek (GIMP_TYPE_DOCKED);
+
+ iface->set_context = gimp_data_editor_set_context;
+ iface->set_aux_info = gimp_data_editor_set_aux_info;
+ iface->get_aux_info = gimp_data_editor_get_aux_info;
+ iface->get_title = gimp_data_editor_get_title;
+}
+
+static void
gimp_data_editor_init (GimpDataEditor *editor)
{
editor->data_factory = NULL;
@@ -185,30 +197,12 @@ gimp_data_editor_init (GimpDataEditor *editor)
}
static void
-gimp_data_editor_docked_iface_init (GimpDockedInterface *iface)
+gimp_data_editor_constructed (GObject *object)
{
- parent_docked_iface = g_type_interface_peek_parent (iface);
-
- if (! parent_docked_iface)
- parent_docked_iface = g_type_default_interface_peek (GIMP_TYPE_DOCKED);
-
- iface->set_context = gimp_data_editor_set_context;
- iface->set_aux_info = gimp_data_editor_set_aux_info;
- iface->get_aux_info = gimp_data_editor_get_aux_info;
- iface->get_title = gimp_data_editor_get_title;
-}
-
-static GObject *
-gimp_data_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
-{
- GObject *object;
- GimpDataEditor *editor;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpDataEditor *editor = GIMP_DATA_EDITOR (object);
- editor = GIMP_DATA_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_DATA_FACTORY (editor->data_factory));
g_assert (GIMP_IS_CONTEXT (editor->context));
@@ -230,12 +224,26 @@ gimp_data_editor_constructor (GType type,
G_CALLBACK (gimp_data_editor_revert_clicked),
NULL,
editor);
- /*
- * Set insensitive because revert buttons are not yet implemented.
- */
+ /* Set insensitive because revert buttons are not yet implemented */
gtk_widget_set_sensitive (editor->revert_button, FALSE);
+}
- return object;
+static void
+gimp_data_editor_dispose (GObject *object)
+{
+ GimpDataEditor *editor = GIMP_DATA_EDITOR (object);
+
+ if (editor->data)
+ {
+ /* Save dirty data before we clear out */
+ gimp_data_editor_save_dirty (editor);
+ gimp_data_editor_set_data (editor, NULL);
+ }
+
+ if (editor->context)
+ gimp_docked_set_context (GIMP_DOCKED (editor), NULL);
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
@@ -290,24 +298,6 @@ gimp_data_editor_get_property (GObject *object,
}
static void
-gimp_data_editor_dispose (GObject *object)
-{
- GimpDataEditor *editor = GIMP_DATA_EDITOR (object);
-
- if (editor->data)
- {
- /* Save dirty data before we clear out */
- gimp_data_editor_save_dirty (editor);
- gimp_data_editor_set_data (editor, NULL);
- }
-
- if (editor->context)
- gimp_docked_set_context (GIMP_DOCKED (editor), NULL);
-
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
gimp_data_editor_style_set (GtkWidget *widget,
GtkStyle *prev_style)
{
diff --git a/app/widgets/gimpdeviceeditor.c b/app/widgets/gimpdeviceeditor.c
index 9c32ec4..48387a5 100644
--- a/app/widgets/gimpdeviceeditor.c
+++ b/app/widgets/gimpdeviceeditor.c
@@ -74,39 +74,37 @@ struct _GimpDeviceEditorPrivate
GimpDeviceEditorPrivate)
-static GObject * gimp_device_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_device_editor_dispose (GObject *object);
-static void gimp_device_editor_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_device_editor_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gimp_device_editor_add_device (GimpContainer *container,
- GimpDeviceInfo *info,
- GimpDeviceEditor *editor);
-static void gimp_device_editor_remove_device (GimpContainer *container,
- GimpDeviceInfo *info,
- GimpDeviceEditor *editor);
-static void gimp_device_editor_device_changed (GimpDeviceInfo *info,
- GimpDeviceEditor *editor);
-
-static void gimp_device_editor_select_device (GimpContainerView *view,
- GimpViewable *viewable,
- gpointer insert_data,
- GimpDeviceEditor *editor);
-
-static void gimp_device_editor_switch_page (GtkNotebook *notebook,
- gpointer page,
- guint page_num,
- GimpDeviceEditor *editor);
-static void gimp_device_editor_delete_clicked (GtkWidget *button,
- GimpDeviceEditor *editor);
+static void gimp_device_editor_constructed (GObject *object);
+static void gimp_device_editor_dispose (GObject *object);
+static void gimp_device_editor_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_device_editor_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_device_editor_add_device (GimpContainer *container,
+ GimpDeviceInfo *info,
+ GimpDeviceEditor *editor);
+static void gimp_device_editor_remove_device (GimpContainer *container,
+ GimpDeviceInfo *info,
+ GimpDeviceEditor *editor);
+static void gimp_device_editor_device_changed (GimpDeviceInfo *info,
+ GimpDeviceEditor *editor);
+
+static void gimp_device_editor_select_device (GimpContainerView *view,
+ GimpViewable *viewable,
+ gpointer insert_data,
+ GimpDeviceEditor *editor);
+
+static void gimp_device_editor_switch_page (GtkNotebook *notebook,
+ gpointer page,
+ guint page_num,
+ GimpDeviceEditor *editor);
+static void gimp_device_editor_delete_clicked (GtkWidget *button,
+ GimpDeviceEditor *editor);
G_DEFINE_TYPE (GimpDeviceEditor, gimp_device_editor, GTK_TYPE_BOX)
@@ -119,7 +117,7 @@ gimp_device_editor_class_init (GimpDeviceEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_device_editor_constructor;
+ object_class->constructed = gimp_device_editor_constructed;
object_class->dispose = gimp_device_editor_dispose;
object_class->set_property = gimp_device_editor_set_property;
object_class->get_property = gimp_device_editor_get_property;
@@ -212,21 +210,16 @@ gimp_device_editor_init (GimpDeviceEditor *editor)
editor);
}
-static GObject *
-gimp_device_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_device_editor_constructed (GObject *object)
{
- GObject *object;
- GimpDeviceEditor *editor;
- GimpDeviceEditorPrivate *private;
+ GimpDeviceEditor *editor = GIMP_DEVICE_EDITOR (object);
+ GimpDeviceEditorPrivate *private = GIMP_DEVICE_EDITOR_GET_PRIVATE (editor);
GimpContainer *devices;
GList *list;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_DEVICE_EDITOR (object);
- private = GIMP_DEVICE_EDITOR_GET_PRIVATE (editor);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (private->gimp));
@@ -260,8 +253,6 @@ gimp_device_editor_constructor (GType type,
{
gimp_device_editor_add_device (devices, list->data, editor);
}
-
- return object;
}
static void
diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c
index 4a463b4..6bb4f2e 100644
--- a/app/widgets/gimpdeviceinfo.c
+++ b/app/widgets/gimpdeviceinfo.c
@@ -61,20 +61,18 @@ enum
/* local function prototypes */
-static GObject * gimp_device_info_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_device_info_finalize (GObject *object);
-static void gimp_device_info_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_device_info_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gimp_device_info_guess_icon (GimpDeviceInfo *info);
+static void gimp_device_info_constructed (GObject *object);
+static void gimp_device_info_finalize (GObject *object);
+static void gimp_device_info_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_device_info_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_device_info_guess_icon (GimpDeviceInfo *info);
G_DEFINE_TYPE (GimpDeviceInfo, gimp_device_info, GIMP_TYPE_CONTEXT)
@@ -100,7 +98,7 @@ gimp_device_info_class_init (GimpDeviceInfoClass *klass)
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- object_class->constructor = gimp_device_info_constructor;
+ object_class->constructed = gimp_device_info_constructed;
object_class->finalize = gimp_device_info_finalize;
object_class->set_property = gimp_device_info_set_property;
object_class->get_property = gimp_device_info_get_property;
@@ -175,26 +173,20 @@ gimp_device_info_init (GimpDeviceInfo *info)
NULL);
}
-static GObject *
-gimp_device_info_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_device_info_constructed (GObject *object)
{
- GObject *object;
- GimpDeviceInfo *info;
+ GimpDeviceInfo *info = GIMP_DEVICE_INFO (object);
Gimp *gimp;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- info = GIMP_DEVICE_INFO (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert ((info->device == NULL && info->display == NULL) ||
(GDK_IS_DEVICE (info->device) && GDK_IS_DISPLAY (info->display)));
gimp = GIMP_CONTEXT (object)->gimp;
- g_assert (GIMP_IS_GIMP (gimp));
-
if (info->device)
{
g_object_set_data (G_OBJECT (info->device), GIMP_DEVICE_INFO_DATA_KEY,
@@ -238,8 +230,6 @@ gimp_device_info_constructor (GType type,
g_signal_connect (object, "gradient-changed",
G_CALLBACK (gimp_device_info_changed),
NULL);
-
- return object;
}
static void
diff --git a/app/widgets/gimpdeviceinfoeditor.c b/app/widgets/gimpdeviceinfoeditor.c
index 4915ea5..f5eeb89 100644
--- a/app/widgets/gimpdeviceinfoeditor.c
+++ b/app/widgets/gimpdeviceinfoeditor.c
@@ -94,40 +94,38 @@ struct _GimpDeviceInfoEditorPrivate
GimpDeviceInfoEditorPrivate)
-static GObject * gimp_device_info_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_device_info_editor_finalize (GObject *object);
-static void gimp_device_info_editor_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_device_info_editor_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gimp_device_info_editor_set_axes (GimpDeviceInfoEditor *editor);
-
-static void gimp_device_info_editor_axis_changed (GtkCellRendererCombo *combo,
- const gchar *path_string,
- GtkTreeIter *new_iter,
- GimpDeviceInfoEditor *editor);
-static void gimp_device_info_editor_axis_selected (GtkTreeSelection *selection,
- GimpDeviceInfoEditor *editor);
-
-static void gimp_device_info_editor_key_edited (GtkCellRendererAccel *accel,
- const char *path_string,
- guint accel_key,
- GdkModifierType accel_mask,
- guint hardware_keycode,
- GimpDeviceInfoEditor *editor);
-static void gimp_device_info_editor_key_cleared (GtkCellRendererAccel *accel,
- const char *path_string,
- GimpDeviceInfoEditor *editor);
-
-static void gimp_device_info_editor_curve_reset (GtkWidget *button,
- GimpCurve *curve);
+static void gimp_device_info_editor_constructed (GObject *object);
+static void gimp_device_info_editor_finalize (GObject *object);
+static void gimp_device_info_editor_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_device_info_editor_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_device_info_editor_set_axes (GimpDeviceInfoEditor *editor);
+
+static void gimp_device_info_editor_axis_changed (GtkCellRendererCombo *combo,
+ const gchar *path_string,
+ GtkTreeIter *new_iter,
+ GimpDeviceInfoEditor *editor);
+static void gimp_device_info_editor_axis_selected (GtkTreeSelection *selection,
+ GimpDeviceInfoEditor *editor);
+
+static void gimp_device_info_editor_key_edited (GtkCellRendererAccel *accel,
+ const char *path_string,
+ guint accel_key,
+ GdkModifierType accel_mask,
+ guint hardware_keycode,
+ GimpDeviceInfoEditor *editor);
+static void gimp_device_info_editor_key_cleared (GtkCellRendererAccel *accel,
+ const char *path_string,
+ GimpDeviceInfoEditor *editor);
+
+static void gimp_device_info_editor_curve_reset (GtkWidget *button,
+ GimpCurve *curve);
G_DEFINE_TYPE (GimpDeviceInfoEditor, gimp_device_info_editor, GTK_TYPE_BOX)
@@ -151,7 +149,7 @@ gimp_device_info_editor_class_init (GimpDeviceInfoEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_device_info_editor_constructor;
+ object_class->constructed = gimp_device_info_editor_constructed;
object_class->finalize = gimp_device_info_editor_finalize;
object_class->set_property = gimp_device_info_editor_set_property;
object_class->get_property = gimp_device_info_editor_get_property;
@@ -317,13 +315,10 @@ gimp_device_info_editor_init (GimpDeviceInfoEditor *editor)
gtk_widget_show (key_view);
}
-static GObject *
-gimp_device_info_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_device_info_editor_constructed (GObject *object)
{
- GObject *object;
- GimpDeviceInfoEditor *editor;
+ GimpDeviceInfoEditor *editor = GIMP_DEVICE_INFO_EDITOR (object);
GimpDeviceInfoEditorPrivate *private;
GtkWidget *hbox;
GtkWidget *label;
@@ -332,11 +327,11 @@ gimp_device_info_editor_constructor (GType type,
gint n_keys;
gint i;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_DEVICE_INFO_EDITOR (object);
private = GIMP_DEVICE_INFO_EDITOR_GET_PRIVATE (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
+
g_assert (GIMP_IS_DEVICE_INFO (private->info));
/* the mode menu */
@@ -494,8 +489,6 @@ gimp_device_info_editor_constructor (GType type,
gtk_widget_show (label);
}
}
-
- return object;
}
static void
diff --git a/app/widgets/gimpdevicestatus.c b/app/widgets/gimpdevicestatus.c
index 153a6ca..d8a5222 100644
--- a/app/widgets/gimpdevicestatus.c
+++ b/app/widgets/gimpdevicestatus.c
@@ -74,9 +74,7 @@ struct _GimpDeviceStatusEntry
};
-static GObject *gimp_device_status_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_device_status_constructed (GObject *object);
static void gimp_device_status_dispose (GObject *object);
static void gimp_device_status_set_property (GObject *object,
guint property_id,
@@ -109,7 +107,7 @@ gimp_device_status_class_init (GimpDeviceStatusClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_device_status_constructor;
+ object_class->constructed = gimp_device_status_constructed;
object_class->dispose = gimp_device_status_dispose;
object_class->set_property = gimp_device_status_set_property;
@@ -139,19 +137,15 @@ gimp_device_status_init (GimpDeviceStatus *status)
status);
}
-static GObject *
-gimp_device_status_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_device_status_constructed (GObject *object)
{
- GObject *object;
- GimpDeviceStatus *status;
+ GimpDeviceStatus *status = GIMP_DEVICE_STATUS (object);
GimpContainer *devices;
GList *list;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- status = GIMP_DEVICE_STATUS (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (status->gimp));
@@ -168,8 +162,6 @@ gimp_device_status_constructor (GType type,
status, 0);
gimp_device_status_update (status);
-
- return object;
}
static void
diff --git a/app/widgets/gimpdockwindow.c b/app/widgets/gimpdockwindow.c
index d1bc041..4477934 100644
--- a/app/widgets/gimpdockwindow.c
+++ b/app/widgets/gimpdockwindow.c
@@ -67,8 +67,6 @@
#define AUX_INFO_FOLLOW_ACTIVE_IMAGE "follow-active-image"
-
-
enum
{
PROP_0,
@@ -109,48 +107,49 @@ struct _GimpDockWindowPrivate
GtkWidget *auto_button;
};
-static GObject * gimp_dock_window_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_dock_window_dispose (GObject *object);
-static void gimp_dock_window_finalize (GObject *object);
-static void gimp_dock_window_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_dock_window_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-static void gimp_dock_window_style_set (GtkWidget *widget,
- GtkStyle *prev_style);
-static gboolean gimp_dock_window_delete_event (GtkWidget *widget,
- GdkEventAny *event);
-static gboolean gimp_dock_window_should_add_to_recent (GimpDockWindow *dock_window);
-static void gimp_dock_window_display_changed (GimpDockWindow *dock_window,
- GimpObject *display,
- GimpContext *context);
-static void gimp_dock_window_image_changed (GimpDockWindow *dock_window,
- GimpImage *image,
- GimpContext *context);
-static void gimp_dock_window_image_flush (GimpImage *image,
- gboolean invalidate_preview,
- GimpDockWindow *dock_window);
-static void gimp_dock_window_update_title (GimpDockWindow *dock_window);
-static gboolean gimp_dock_window_update_title_idle (GimpDockWindow *dock_window);
-static gchar * gimp_dock_window_get_description (GimpDockWindow *dock_window,
- gboolean complete);
-static void gimp_dock_window_dock_removed (GimpDockWindow *dock_window,
- GimpDock *dock,
- GimpDockColumns *dock_columns);
-static void gimp_dock_window_factory_display_changed (GimpContext *context,
- GimpObject *display,
- GimpDock *dock);
-static void gimp_dock_window_factory_image_changed (GimpContext *context,
- GimpImage *image,
- GimpDock *dock);
-static void gimp_dock_window_auto_clicked (GtkWidget *widget,
- GimpDock *dock);
+
+static void gimp_dock_window_constructed (GObject *object);
+static void gimp_dock_window_dispose (GObject *object);
+static void gimp_dock_window_finalize (GObject *object);
+static void gimp_dock_window_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_dock_window_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_dock_window_style_set (GtkWidget *widget,
+ GtkStyle *prev_style);
+static gboolean gimp_dock_window_delete_event (GtkWidget *widget,
+ GdkEventAny *event);
+
+static gboolean gimp_dock_window_should_add_to_recent (GimpDockWindow *dock_window);
+static void gimp_dock_window_display_changed (GimpDockWindow *dock_window,
+ GimpObject *display,
+ GimpContext *context);
+static void gimp_dock_window_image_changed (GimpDockWindow *dock_window,
+ GimpImage *image,
+ GimpContext *context);
+static void gimp_dock_window_image_flush (GimpImage *image,
+ gboolean invalidate_preview,
+ GimpDockWindow *dock_window);
+static void gimp_dock_window_update_title (GimpDockWindow *dock_window);
+static gboolean gimp_dock_window_update_title_idle (GimpDockWindow *dock_window);
+static gchar * gimp_dock_window_get_description (GimpDockWindow *dock_window,
+ gboolean complete);
+static void gimp_dock_window_dock_removed (GimpDockWindow *dock_window,
+ GimpDock *dock,
+ GimpDockColumns *dock_columns);
+static void gimp_dock_window_factory_display_changed (GimpContext *context,
+ GimpObject *display,
+ GimpDock *dock);
+static void gimp_dock_window_factory_image_changed (GimpContext *context,
+ GimpImage *image,
+ GimpDock *dock);
+static void gimp_dock_window_auto_clicked (GtkWidget *widget,
+ GimpDock *dock);
G_DEFINE_TYPE (GimpDockWindow, gimp_dock_window, GIMP_TYPE_WINDOW)
@@ -163,7 +162,7 @@ gimp_dock_window_class_init (GimpDockWindowClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->constructor = gimp_dock_window_constructor;
+ object_class->constructed = gimp_dock_window_constructed;
object_class->dispose = gimp_dock_window_dispose;
object_class->finalize = gimp_dock_window_finalize;
object_class->set_property = gimp_dock_window_set_property;
@@ -254,25 +253,22 @@ gimp_dock_window_init (GimpDockWindow *dock_window)
gtk_window_set_focus_on_map (GTK_WINDOW (dock_window), FALSE);
}
-static GObject *
-gimp_dock_window_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_dock_window_constructed (GObject *object)
{
- GObject *object = NULL;
- GimpDockWindow *dock_window = NULL;
- GimpGuiConfig *config = NULL;
- GtkAccelGroup *accel_group = NULL;
- Gimp *gimp = NULL;
- GtkSettings *settings = NULL;
+ GimpDockWindow *dock_window = GIMP_DOCK_WINDOW (object);
+ GimpGuiConfig *config;
+ GtkAccelGroup *accel_group;
+ Gimp *gimp;
+ GtkSettings *settings;
gint menu_view_width = -1;
gint menu_view_height = -1;
- /* Init */
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
- dock_window = GIMP_DOCK_WINDOW (object);
- gimp = GIMP (dock_window->p->context->gimp);
- config = GIMP_GUI_CONFIG (gimp->config);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
+
+ gimp = GIMP (dock_window->p->context->gimp);
+ config = GIMP_GUI_CONFIG (gimp->config);
/* Create a separate context per dock so that docks can be bound to
* a specific image and does not necessarily have to follow the
@@ -439,9 +435,6 @@ gimp_dock_window_constructor (GType type,
dock_window->p->context,
GIMP_CONTEXT_PROP_IMAGE);
}
-
- /* Done! */
- return object;
}
static void
diff --git a/app/widgets/gimpdrawabletreeview.c b/app/widgets/gimpdrawabletreeview.c
index 2bb5882..29bcd94 100644
--- a/app/widgets/gimpdrawabletreeview.c
+++ b/app/widgets/gimpdrawabletreeview.c
@@ -45,9 +45,7 @@
static void gimp_drawable_tree_view_view_iface_init (GimpContainerViewInterface *iface);
-static GObject * gimp_drawable_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_drawable_tree_view_constructed (GObject *object);
static gboolean gimp_drawable_tree_view_select_item (GimpContainerView *view,
GimpViewable *item,
@@ -112,7 +110,7 @@ gimp_drawable_tree_view_class_init (GimpDrawableTreeViewClass *klass)
tree_view_class = GIMP_CONTAINER_TREE_VIEW_CLASS (klass);
item_view_class = GIMP_ITEM_TREE_VIEW_CLASS (klass);
- object_class->constructor = gimp_drawable_tree_view_constructor;
+ object_class->constructed = gimp_drawable_tree_view_constructed;
tree_view_class->drop_possible = gimp_drawable_tree_view_drop_possible;
tree_view_class->drop_viewable = gimp_drawable_tree_view_drop_viewable;
@@ -137,21 +135,17 @@ gimp_drawable_tree_view_init (GimpDrawableTreeView *view)
{
}
-static GObject *
-gimp_drawable_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_drawable_tree_view_constructed (GObject *object)
{
- GimpContainerTreeView *tree_view;
- GimpItemTreeView *item_view;
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (object);
+ GimpItemTreeView *item_view = GIMP_ITEM_TREE_VIEW (object);
- tree_view = GIMP_CONTAINER_TREE_VIEW (object);
- item_view = GIMP_ITEM_TREE_VIEW (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
- gimp_dnd_viewable_dest_add (gimp_item_tree_view_get_new_button (item_view), GIMP_TYPE_PATTERN,
+ gimp_dnd_viewable_dest_add (gimp_item_tree_view_get_new_button (item_view),
+ GIMP_TYPE_PATTERN,
gimp_drawable_tree_view_new_pattern_dropped,
item_view);
gimp_dnd_color_dest_add (gimp_item_tree_view_get_new_button (item_view),
@@ -162,8 +156,6 @@ gimp_drawable_tree_view_constructor (GType type,
NULL, tree_view);
gimp_dnd_viewable_dest_add (GTK_WIDGET (tree_view->view), GIMP_TYPE_PATTERN,
NULL, tree_view);
-
- return object;
}
diff --git a/app/widgets/gimpdynamicseditor.c b/app/widgets/gimpdynamicseditor.c
index e8efade..9352dbd 100644
--- a/app/widgets/gimpdynamicseditor.c
+++ b/app/widgets/gimpdynamicseditor.c
@@ -40,9 +40,7 @@
/* local function prototypes */
-static GObject * gimp_dynamics_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_dynamics_editor_constructed (GObject *object);
static void gimp_dynamics_editor_finalize (GObject *object);
static void gimp_dynamics_editor_set_data (GimpDataEditor *editor,
@@ -87,7 +85,7 @@ gimp_dynamics_editor_class_init (GimpDynamicsEditorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpDataEditorClass *editor_class = GIMP_DATA_EDITOR_CLASS (klass);
- object_class->constructor = gimp_dynamics_editor_constructor;
+ object_class->constructed = gimp_dynamics_editor_constructed;
object_class->finalize = gimp_dynamics_editor_finalize;
editor_class->set_data = gimp_dynamics_editor_set_data;
@@ -160,18 +158,13 @@ gimp_dynamics_editor_init (GimpDynamicsEditor *editor)
}
}
-static GObject *
-gimp_dynamics_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_dynamics_editor_constructed (GObject *object)
{
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_docked_set_show_button_bar (GIMP_DOCKED (object), FALSE);
-
- return object;
}
static void
diff --git a/app/widgets/gimpdynamicsoutputeditor.c b/app/widgets/gimpdynamicsoutputeditor.c
index 42ae642..e540fa8 100644
--- a/app/widgets/gimpdynamicsoutputeditor.c
+++ b/app/widgets/gimpdynamicsoutputeditor.c
@@ -91,51 +91,51 @@ struct _GimpDynamicsOutputEditorPrivate
GimpDynamicsOutputEditorPrivate)
-static GObject * gimp_dynamics_output_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_dynamics_output_editor_finalize (GObject *object);
-static void gimp_dynamics_output_editor_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_dynamics_output_editor_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gimp_dynamics_output_editor_curve_reset (GtkWidget *button,
- GimpDynamicsOutputEditor *editor);
-
-static void gimp_dynamics_output_editor_input_selected (GtkTreeSelection *selection,
- GimpDynamicsOutputEditor *editor);
-
-static void gimp_dynamics_output_editor_input_toggled (GtkCellRenderer *cell,
- gchar *path,
- GimpDynamicsOutputEditor *editor);
-
-static void gimp_dynamics_output_editor_activate_input (gint input,
- GimpDynamicsOutputEditor *editor);
-
-static void gimp_dynamics_output_editor_use_input (gint input,
- gboolean value,
- GimpDynamicsOutputEditor *editor);
-
-static void gimp_dynamics_output_editor_notify_output (GimpDynamicsOutput *output,
- const GParamSpec *pspec,
- GimpDynamicsOutputEditor *editor);
+static void gimp_dynamics_output_editor_constructed (GObject *object);
+static void gimp_dynamics_output_editor_finalize (GObject *object);
+static void gimp_dynamics_output_editor_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_dynamics_output_editor_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_dynamics_output_editor_curve_reset (GtkWidget *button,
+ GimpDynamicsOutputEditor *editor);
+
+static void gimp_dynamics_output_editor_input_selected (GtkTreeSelection *selection,
+ GimpDynamicsOutputEditor *editor);
+
+static void gimp_dynamics_output_editor_input_toggled (GtkCellRenderer *cell,
+ gchar *path,
+ GimpDynamicsOutputEditor *editor);
+
+static void gimp_dynamics_output_editor_activate_input (gint input,
+ GimpDynamicsOutputEditor *editor);
+
+static void gimp_dynamics_output_editor_use_input (gint input,
+ gboolean value,
+ GimpDynamicsOutputEditor *editor);
+
+static void gimp_dynamics_output_editor_notify_output (GimpDynamicsOutput *output,
+ const GParamSpec *pspec,
+ GimpDynamicsOutputEditor *editor);
+
G_DEFINE_TYPE (GimpDynamicsOutputEditor, gimp_dynamics_output_editor,
GTK_TYPE_BOX)
#define parent_class gimp_dynamics_output_editor_parent_class
+
static void
gimp_dynamics_output_editor_class_init (GimpDynamicsOutputEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_dynamics_output_editor_constructor;
+ object_class->constructed = gimp_dynamics_output_editor_constructed;
object_class->finalize = gimp_dynamics_output_editor_finalize;
object_class->set_property = gimp_dynamics_output_editor_set_property;
object_class->get_property = gimp_dynamics_output_editor_get_property;
@@ -159,12 +159,9 @@ gimp_dynamics_output_editor_init (GimpDynamicsOutputEditor *editor)
gtk_box_set_spacing (GTK_BOX (editor), 6);
}
-static GObject *
-gimp_dynamics_output_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_dynamics_output_editor_constructed (GObject *object)
{
- GObject *object;
GimpDynamicsOutputEditor *editor;
GimpDynamicsOutputEditorPrivate *private;
GtkWidget *view;
@@ -173,11 +170,12 @@ gimp_dynamics_output_editor_constructor (GType type,
GtkTreeSelection *tree_sel;
GtkTreeIter iter = {0};
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
editor = GIMP_DYNAMICS_OUTPUT_EDITOR (object);
private = GIMP_DYNAMICS_OUTPUT_EDITOR_GET_PRIVATE (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
+
g_assert (GIMP_IS_DYNAMICS_OUTPUT (private->output));
private->curve_view = gimp_curve_view_new ();
@@ -303,8 +301,6 @@ gimp_dynamics_output_editor_constructor (GType type,
g_signal_connect (private->output, "notify",
G_CALLBACK (gimp_dynamics_output_editor_notify_output),
editor);
-
- return object;
}
static void
diff --git a/app/widgets/gimpeditor.c b/app/widgets/gimpeditor.c
index 3a6fa63..2a2e9eb 100644
--- a/app/widgets/gimpeditor.c
+++ b/app/widgets/gimpeditor.c
@@ -54,34 +54,32 @@ enum
};
-static void gimp_editor_docked_iface_init (GimpDockedInterface *iface);
-
-static GObject * gimp_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_editor_dispose (GObject *object);
-static void gimp_editor_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_editor_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gimp_editor_style_set (GtkWidget *widget,
- GtkStyle *prev_style);
-
-static GimpUIManager * gimp_editor_get_menu (GimpDocked *docked,
- const gchar **ui_path,
- gpointer *popup_data);
-static gboolean gimp_editor_has_button_bar (GimpDocked *docked);
-static void gimp_editor_set_show_button_bar (GimpDocked *docked,
- gboolean show);
-static gboolean gimp_editor_get_show_button_bar (GimpDocked *docked);
-
-static GtkIconSize gimp_editor_ensure_button_box (GimpEditor *editor,
- GtkReliefStyle *button_relief);
+static void gimp_editor_docked_iface_init (GimpDockedInterface *iface);
+
+static void gimp_editor_constructed (GObject *object);
+static void gimp_editor_dispose (GObject *object);
+static void gimp_editor_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_editor_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_editor_style_set (GtkWidget *widget,
+ GtkStyle *prev_style);
+
+static GimpUIManager * gimp_editor_get_menu (GimpDocked *docked,
+ const gchar **ui_path,
+ gpointer *popup_data);
+static gboolean gimp_editor_has_button_bar (GimpDocked *docked);
+static void gimp_editor_set_show_button_bar (GimpDocked *docked,
+ gboolean show);
+static gboolean gimp_editor_get_show_button_bar (GimpDocked *docked);
+
+static GtkIconSize gimp_editor_ensure_button_box (GimpEditor *editor,
+ GtkReliefStyle *button_relief);
G_DEFINE_TYPE_WITH_CODE (GimpEditor, gimp_editor, GTK_TYPE_BOX,
@@ -97,7 +95,7 @@ gimp_editor_class_init (GimpEditorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->constructor = gimp_editor_constructor;
+ object_class->constructed = gimp_editor_constructed;
object_class->dispose = gimp_editor_dispose;
object_class->set_property = gimp_editor_set_property;
object_class->get_property = gimp_editor_get_property;
@@ -176,6 +174,15 @@ gimp_editor_class_init (GimpEditorClass *klass)
}
static void
+gimp_editor_docked_iface_init (GimpDockedInterface *iface)
+{
+ iface->get_menu = gimp_editor_get_menu;
+ iface->has_button_bar = gimp_editor_has_button_bar;
+ iface->set_show_button_bar = gimp_editor_set_show_button_bar;
+ iface->get_show_button_bar = gimp_editor_get_show_button_bar;
+}
+
+static void
gimp_editor_init (GimpEditor *editor)
{
gtk_orientable_set_orientation (GTK_ORIENTABLE (editor),
@@ -201,25 +208,12 @@ gimp_editor_init (GimpEditor *editor)
}
static void
-gimp_editor_docked_iface_init (GimpDockedInterface *iface)
+gimp_editor_constructed (GObject *object)
{
- iface->get_menu = gimp_editor_get_menu;
- iface->has_button_bar = gimp_editor_has_button_bar;
- iface->set_show_button_bar = gimp_editor_set_show_button_bar;
- iface->get_show_button_bar = gimp_editor_get_show_button_bar;
-}
-
-static GObject *
-gimp_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
-{
- GObject *object;
- GimpEditor *editor;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpEditor *editor = GIMP_EDITOR (object);
- editor = GIMP_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
if (! editor->popup_data)
editor->popup_data = editor;
@@ -232,8 +226,6 @@ gimp_editor_constructor (GType type,
editor->popup_data,
FALSE);
}
-
- return object;
}
static void
diff --git a/app/widgets/gimperrorconsole.c b/app/widgets/gimperrorconsole.c
index 4461bc8..1f800e7 100644
--- a/app/widgets/gimperrorconsole.c
+++ b/app/widgets/gimperrorconsole.c
@@ -40,9 +40,7 @@
#include "gimp-intl.h"
-static GObject * gimp_error_console_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_error_console_constructed (GObject *object);
static void gimp_error_console_dispose (GObject *object);
static void gimp_error_console_unmap (GtkWidget *widget);
@@ -63,7 +61,7 @@ gimp_error_console_class_init (GimpErrorConsoleClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->constructor = gimp_error_console_constructor;
+ object_class->constructed = gimp_error_console_constructed;
object_class->dispose = gimp_error_console_dispose;
widget_class->unmap = gimp_error_console_unmap;
@@ -106,17 +104,13 @@ gimp_error_console_init (GimpErrorConsole *console)
console->file_dialog = NULL;
}
-static GObject *
-gimp_error_console_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_error_console_constructed (GObject *object)
{
- GObject *object;
- GimpErrorConsole *console;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpErrorConsole *console = GIMP_ERROR_CONSOLE (object);
- console = GIMP_ERROR_CONSOLE (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
console->clear_button =
gimp_editor_add_action_button (GIMP_EDITOR (console), "error-console",
@@ -128,8 +122,6 @@ gimp_error_console_constructor (GType type,
"error-console-save-selection",
GDK_SHIFT_MASK,
NULL);
-
- return object;
}
static void
diff --git a/app/widgets/gimpfilleditor.c b/app/widgets/gimpfilleditor.c
index c099dc2..e6cf3c3 100644
--- a/app/widgets/gimpfilleditor.c
+++ b/app/widgets/gimpfilleditor.c
@@ -46,18 +46,16 @@ enum
};
-static GObject * gimp_fill_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_fill_editor_finalize (GObject *object);
-static void gimp_fill_editor_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_fill_editor_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
+static void gimp_fill_editor_constructed (GObject *object);
+static void gimp_fill_editor_finalize (GObject *object);
+static void gimp_fill_editor_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_fill_editor_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
G_DEFINE_TYPE (GimpFillEditor, gimp_fill_editor, GTK_TYPE_BOX)
@@ -70,7 +68,7 @@ gimp_fill_editor_class_init (GimpFillEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_fill_editor_constructor;
+ object_class->constructed = gimp_fill_editor_constructed;
object_class->finalize = gimp_fill_editor_finalize;
object_class->set_property = gimp_fill_editor_set_property;
object_class->get_property = gimp_fill_editor_get_property;
@@ -99,19 +97,15 @@ gimp_fill_editor_init (GimpFillEditor *editor)
gtk_box_set_spacing (GTK_BOX (editor), 6);
}
-static GObject *
-gimp_fill_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_fill_editor_constructed (GObject *object)
{
- GObject *object;
- GimpFillEditor *editor;
+ GimpFillEditor *editor = GIMP_FILL_EDITOR (object);
GtkWidget *box;
GtkWidget *button;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_FILL_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_FILL_OPTIONS (editor->options));
@@ -149,8 +143,6 @@ gimp_fill_editor_constructor (GType type,
_("_Antialiasing"));
gtk_box_pack_start (GTK_BOX (editor), button, FALSE, FALSE, 0);
gtk_widget_show (button);
-
- return object;
}
static void
diff --git a/app/widgets/gimpfontselect.c b/app/widgets/gimpfontselect.c
index 47074da..d012ff2 100644
--- a/app/widgets/gimpfontselect.c
+++ b/app/widgets/gimpfontselect.c
@@ -39,9 +39,7 @@
#include "gimpfontview.h"
-static GObject * gimp_font_select_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_font_select_constructed (GObject *object);
static GValueArray * gimp_font_select_run_callback (GimpPdbDialog *dialog,
GimpObject *object,
@@ -60,7 +58,7 @@ gimp_font_select_class_init (GimpFontSelectClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpPdbDialogClass *pdb_class = GIMP_PDB_DIALOG_CLASS (klass);
- object_class->constructor = gimp_font_select_constructor;
+ object_class->constructed = gimp_font_select_constructed;
pdb_class->run_callback = gimp_font_select_run_callback;
}
@@ -70,18 +68,14 @@ gimp_font_select_init (GimpFontSelect *select)
{
}
-static GObject *
-gimp_font_select_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_font_select_constructed (GObject *object)
{
- GObject *object;
- GimpPdbDialog *dialog;
+ GimpPdbDialog *dialog = GIMP_PDB_DIALOG (object);
GtkWidget *content_area;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- dialog = GIMP_PDB_DIALOG (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
dialog->view = gimp_font_view_new (GIMP_VIEW_TYPE_LIST,
dialog->context->gimp->fonts,
@@ -98,8 +92,6 @@ gimp_font_select_constructor (GType type,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_box_pack_start (GTK_BOX (content_area), dialog->view, TRUE, TRUE, 0);
gtk_widget_show (dialog->view);
-
- return object;
}
static GValueArray *
diff --git a/app/widgets/gimpgradienteditor.c b/app/widgets/gimpgradienteditor.c
index 7f48d42..c4bc24d 100644
--- a/app/widgets/gimpgradienteditor.c
+++ b/app/widgets/gimpgradienteditor.c
@@ -105,9 +105,7 @@
static void gimp_gradient_editor_docked_iface_init (GimpDockedInterface *face);
-static GObject * gimp_gradient_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_gradient_editor_constructed (GObject *object);
static void gimp_gradient_editor_dispose (GObject *object);
static void gimp_gradient_editor_unmap (GtkWidget *widget);
@@ -262,7 +260,7 @@ gimp_gradient_editor_class_init (GimpGradientEditorClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GimpDataEditorClass *editor_class = GIMP_DATA_EDITOR_CLASS (klass);
- object_class->constructor = gimp_gradient_editor_constructor;
+ object_class->constructed = gimp_gradient_editor_constructed;
object_class->dispose = gimp_gradient_editor_dispose;
widget_class->unmap = gimp_gradient_editor_unmap;
@@ -433,17 +431,13 @@ gimp_gradient_editor_init (GimpGradientEditor *editor)
gimp_rgba_set (&editor->saved_colors[9], 1.0, 0.0, 1.0, GIMP_OPACITY_OPAQUE);
}
-static GObject *
-gimp_gradient_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_gradient_editor_constructed (GObject *object)
{
- GObject *object;
- GimpGradientEditor *editor;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (object);
- editor = GIMP_GRADIENT_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_editor_add_action_button (GIMP_EDITOR (editor), "gradient-editor",
"gradient-editor-zoom-out", NULL);
@@ -453,8 +447,6 @@ gimp_gradient_editor_constructor (GType type,
gimp_editor_add_action_button (GIMP_EDITOR (editor), "gradient-editor",
"gradient-editor-zoom-all", NULL);
-
- return object;
}
static void
diff --git a/app/widgets/gimpgradientselect.c b/app/widgets/gimpgradientselect.c
index 1b67ae2..edb9fea 100644
--- a/app/widgets/gimpgradientselect.c
+++ b/app/widgets/gimpgradientselect.c
@@ -45,9 +45,7 @@ enum
};
-static GObject * gimp_gradient_select_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_gradient_select_constructed (GObject *object);
static void gimp_gradient_select_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -71,7 +69,7 @@ gimp_gradient_select_class_init (GimpGradientSelectClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpPdbDialogClass *pdb_class = GIMP_PDB_DIALOG_CLASS (klass);
- object_class->constructor = gimp_gradient_select_constructor;
+ object_class->constructed = gimp_gradient_select_constructed;
object_class->set_property = gimp_gradient_select_set_property;
pdb_class->run_callback = gimp_gradient_select_run_callback;
@@ -88,18 +86,14 @@ gimp_gradient_select_init (GimpGradientSelect *select)
{
}
-static GObject *
-gimp_gradient_select_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_gradient_select_constructed (GObject *object)
{
- GObject *object;
- GimpPdbDialog *dialog;
+ GimpPdbDialog *dialog = GIMP_PDB_DIALOG (object);
GtkWidget *content_area;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- dialog = GIMP_PDB_DIALOG (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
dialog->view =
gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
@@ -119,8 +113,25 @@ gimp_gradient_select_constructor (GType type,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_box_pack_start (GTK_BOX (content_area), dialog->view, TRUE, TRUE, 0);
gtk_widget_show (dialog->view);
+}
+
+static void
+gimp_gradient_select_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GimpGradientSelect *select = GIMP_GRADIENT_SELECT (object);
- return object;
+ switch (property_id)
+ {
+ case PROP_SAMPLE_SIZE:
+ select->sample_size = g_value_get_int (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
}
static GValueArray *
@@ -179,22 +190,3 @@ gimp_gradient_select_run_callback (GimpPdbDialog *dialog,
return return_vals;
}
-
-static void
-gimp_gradient_select_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GimpGradientSelect *select = GIMP_GRADIENT_SELECT (object);
-
- switch (property_id)
- {
- case PROP_SAMPLE_SIZE:
- select->sample_size = g_value_get_int (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
diff --git a/app/widgets/gimpgrideditor.c b/app/widgets/gimpgrideditor.c
index 2475f9c..a8c291d 100644
--- a/app/widgets/gimpgrideditor.c
+++ b/app/widgets/gimpgrideditor.c
@@ -39,7 +39,6 @@
#define GRID_EDITOR_DEFAULT_RESOLUTION 72.0
-
#define GRID_EDITOR_COLOR_BUTTON_WIDTH 60
#define GRID_EDITOR_COLOR_BUTTON_HEIGHT 24
@@ -54,18 +53,16 @@ enum
};
-static GObject * gimp_grid_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_grid_editor_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_grid_editor_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-static void gimp_grid_editor_finalize (GObject *object);
+static void gimp_grid_editor_constructed (GObject *object);
+static void gimp_grid_editor_finalize (GObject *object);
+static void gimp_grid_editor_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_grid_editor_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
G_DEFINE_TYPE (GimpGridEditor, gimp_grid_editor, GTK_TYPE_BOX)
@@ -78,7 +75,7 @@ gimp_grid_editor_class_init (GimpGridEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_grid_editor_constructor;
+ object_class->constructed = gimp_grid_editor_constructed;
object_class->set_property = gimp_grid_editor_set_property;
object_class->get_property = gimp_grid_editor_get_property;
object_class->finalize = gimp_grid_editor_finalize;
@@ -119,76 +116,9 @@ gimp_grid_editor_init (GimpGridEditor *editor)
}
static void
-gimp_grid_editor_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
+gimp_grid_editor_constructed (GObject *object)
{
GimpGridEditor *editor = GIMP_GRID_EDITOR (object);
-
- switch (property_id)
- {
- case PROP_GRID:
- editor->grid = g_value_dup_object (value);
- break;
-
- case PROP_CONTEXT:
- editor->context = g_value_dup_object (value);
- break;
-
- case PROP_XRESOLUTION:
- editor->xresolution = g_value_get_double (value);
- break;
-
- case PROP_YRESOLUTION:
- editor->yresolution = g_value_get_double (value);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-gimp_grid_editor_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GimpGridEditor *editor = GIMP_GRID_EDITOR (object);
-
- switch (property_id)
- {
- case PROP_GRID:
- g_value_set_object (value, editor->grid);
- break;
-
- case PROP_CONTEXT:
- g_value_set_object (value, editor->context);
- break;
-
- case PROP_XRESOLUTION:
- g_value_set_double (value, editor->xresolution);
- break;
-
- case PROP_YRESOLUTION:
- g_value_set_double (value, editor->yresolution);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static GObject *
-gimp_grid_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
-{
- GimpGridEditor *editor;
- GObject *object;
GtkWidget *frame;
GtkWidget *hbox;
GtkWidget *table;
@@ -196,9 +126,8 @@ gimp_grid_editor_constructor (GType type,
GtkWidget *color_button;
GtkWidget *sizeentry;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_GRID_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (editor->grid != NULL);
@@ -305,8 +234,6 @@ gimp_grid_editor_constructor (GType type,
gtk_widget_show (sizeentry);
gtk_widget_show (hbox);
-
- return object;
}
static void
@@ -329,6 +256,70 @@ gimp_grid_editor_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
+static void
+gimp_grid_editor_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GimpGridEditor *editor = GIMP_GRID_EDITOR (object);
+
+ switch (property_id)
+ {
+ case PROP_GRID:
+ editor->grid = g_value_dup_object (value);
+ break;
+
+ case PROP_CONTEXT:
+ editor->context = g_value_dup_object (value);
+ break;
+
+ case PROP_XRESOLUTION:
+ editor->xresolution = g_value_get_double (value);
+ break;
+
+ case PROP_YRESOLUTION:
+ editor->yresolution = g_value_get_double (value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gimp_grid_editor_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GimpGridEditor *editor = GIMP_GRID_EDITOR (object);
+
+ switch (property_id)
+ {
+ case PROP_GRID:
+ g_value_set_object (value, editor->grid);
+ break;
+
+ case PROP_CONTEXT:
+ g_value_set_object (value, editor->context);
+ break;
+
+ case PROP_XRESOLUTION:
+ g_value_set_double (value, editor->xresolution);
+ break;
+
+ case PROP_YRESOLUTION:
+ g_value_set_double (value, editor->yresolution);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
GtkWidget *
gimp_grid_editor_new (GimpGrid *grid,
GimpContext *context,
diff --git a/app/widgets/gimpimageparasiteview.c b/app/widgets/gimpimageparasiteview.c
index ff2d84f..28fb6f4 100644
--- a/app/widgets/gimpimageparasiteview.c
+++ b/app/widgets/gimpimageparasiteview.c
@@ -51,22 +51,20 @@ enum
};
-static GObject * gimp_image_parasite_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_image_parasite_view_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_image_parasite_view_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-static void gimp_image_parasite_view_finalize (GObject *object);
-
-static void gimp_image_parasite_view_parasite_changed (GimpImageParasiteView *view,
- const gchar *name);
-static void gimp_image_parasite_view_update (GimpImageParasiteView *view);
+static void gimp_image_parasite_view_constructed (GObject *object);
+static void gimp_image_parasite_view_finalize (GObject *object);
+static void gimp_image_parasite_view_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_image_parasite_view_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_image_parasite_view_parasite_changed (GimpImageParasiteView *view,
+ const gchar *name);
+static void gimp_image_parasite_view_update (GimpImageParasiteView *view);
G_DEFINE_TYPE (GimpImageParasiteView, gimp_image_parasite_view, GTK_TYPE_BOX)
@@ -90,10 +88,10 @@ gimp_image_parasite_view_class_init (GimpImageParasiteViewClass *klass)
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- object_class->constructor = gimp_image_parasite_view_constructor;
+ object_class->constructed = gimp_image_parasite_view_constructed;
+ object_class->finalize = gimp_image_parasite_view_finalize;
object_class->set_property = gimp_image_parasite_view_set_property;
object_class->get_property = gimp_image_parasite_view_get_property;
- object_class->finalize = gimp_image_parasite_view_finalize;
klass->update = NULL;
@@ -119,6 +117,44 @@ gimp_image_parasite_view_init (GimpImageParasiteView *view)
}
static void
+gimp_image_parasite_view_constructed (GObject *object)
+{
+ GimpImageParasiteView *view = GIMP_IMAGE_PARASITE_VIEW (object);
+
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
+
+ g_assert (view->parasite != NULL);
+ g_assert (view->image != NULL);
+
+ g_signal_connect_object (view->image, "parasite-attached",
+ G_CALLBACK (gimp_image_parasite_view_parasite_changed),
+ G_OBJECT (view),
+ G_CONNECT_SWAPPED);
+ g_signal_connect_object (view->image, "parasite-detached",
+ G_CALLBACK (gimp_image_parasite_view_parasite_changed),
+ G_OBJECT (view),
+ G_CONNECT_SWAPPED);
+
+ gimp_image_parasite_view_update (view);
+}
+
+static void
+gimp_image_parasite_view_finalize (GObject *object)
+{
+ GimpImageParasiteView *view = GIMP_IMAGE_PARASITE_VIEW (object);
+
+ if (view->parasite)
+ {
+ g_free (view->parasite);
+ view->parasite = NULL;
+
+ }
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
gimp_image_parasite_view_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -162,50 +198,6 @@ gimp_image_parasite_view_get_property (GObject *object,
}
}
-static GObject *
-gimp_image_parasite_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
-{
- GimpImageParasiteView *view;
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- view = GIMP_IMAGE_PARASITE_VIEW (object);
-
- g_assert (view->parasite != NULL);
- g_assert (view->image != NULL);
-
- g_signal_connect_object (view->image, "parasite-attached",
- G_CALLBACK (gimp_image_parasite_view_parasite_changed),
- G_OBJECT (view),
- G_CONNECT_SWAPPED);
- g_signal_connect_object (view->image, "parasite-detached",
- G_CALLBACK (gimp_image_parasite_view_parasite_changed),
- G_OBJECT (view),
- G_CONNECT_SWAPPED);
-
- gimp_image_parasite_view_update (view);
-
- return object;
-}
-
-static void
-gimp_image_parasite_view_finalize (GObject *object)
-{
- GimpImageParasiteView *view = GIMP_IMAGE_PARASITE_VIEW (object);
-
- if (view->parasite)
- {
- g_free (view->parasite);
- view->parasite = NULL;
-
- }
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
GtkWidget *
gimp_image_parasite_view_new (GimpImage *image,
const gchar *parasite)
diff --git a/app/widgets/gimpimagepropview.c b/app/widgets/gimpimagepropview.c
index 7e7ee6c..607b67a 100644
--- a/app/widgets/gimpimagepropview.c
+++ b/app/widgets/gimpimagepropview.c
@@ -63,9 +63,7 @@ enum
};
-static GObject * gimp_image_prop_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_image_prop_view_constructed (GObject *object);
static void gimp_image_prop_view_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -96,7 +94,7 @@ gimp_image_prop_view_class_init (GimpImagePropViewClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_image_prop_view_constructor;
+ object_class->constructed = gimp_image_prop_view_constructed;
object_class->set_property = gimp_image_prop_view_set_property;
object_class->get_property = gimp_image_prop_view_get_property;
@@ -172,54 +170,12 @@ gimp_image_prop_view_init (GimpImagePropView *view)
}
static void
-gimp_image_prop_view_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
+gimp_image_prop_view_constructed (GObject *object)
{
GimpImagePropView *view = GIMP_IMAGE_PROP_VIEW (object);
- switch (property_id)
- {
- case PROP_IMAGE:
- view->image = g_value_get_object (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-gimp_image_prop_view_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GimpImagePropView *view = GIMP_IMAGE_PROP_VIEW (object);
-
- switch (property_id)
- {
- case PROP_IMAGE:
- g_value_set_object (value, view->image);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static GObject *
-gimp_image_prop_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
-{
- GimpImagePropView *view;
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- view = GIMP_IMAGE_PROP_VIEW (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (view->image != NULL);
@@ -251,8 +207,44 @@ gimp_image_prop_view_constructor (GType type,
gimp_image_prop_view_update (view);
gimp_image_prop_view_file_update (view);
+}
+
+static void
+gimp_image_prop_view_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GimpImagePropView *view = GIMP_IMAGE_PROP_VIEW (object);
- return object;
+ switch (property_id)
+ {
+ case PROP_IMAGE:
+ view->image = g_value_get_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gimp_image_prop_view_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GimpImagePropView *view = GIMP_IMAGE_PROP_VIEW (object);
+
+ switch (property_id)
+ {
+ case PROP_IMAGE:
+ g_value_set_object (value, view->image);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
}
diff --git a/app/widgets/gimpitemtreeview.c b/app/widgets/gimpitemtreeview.c
index dcb7f81..07cc594 100644
--- a/app/widgets/gimpitemtreeview.c
+++ b/app/widgets/gimpitemtreeview.c
@@ -97,9 +97,7 @@ struct _GimpItemTreeViewPriv
static void gimp_item_tree_view_view_iface_init (GimpContainerViewInterface *view_iface);
static void gimp_item_tree_view_docked_iface_init (GimpDockedInterface *docked_iface);
-static GObject * gimp_item_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_item_tree_view_constructed (GObject *object);
static void gimp_item_tree_view_dispose (GObject *object);
static void gimp_item_tree_view_style_set (GtkWidget *widget,
@@ -236,7 +234,7 @@ gimp_item_tree_view_class_init (GimpItemTreeViewClass *klass)
G_TYPE_NONE, 1,
GIMP_TYPE_OBJECT);
- object_class->constructor = gimp_item_tree_view_constructor;
+ object_class->constructed = gimp_item_tree_view_constructed;
object_class->dispose = gimp_item_tree_view_dispose;
widget_class->style_set = gimp_item_tree_view_style_set;
@@ -318,27 +316,20 @@ gimp_item_tree_view_init (GimpItemTreeView *view)
view->priv->image = NULL;
}
-static GObject *
-gimp_item_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_item_tree_view_constructed (GObject *object)
{
- GimpItemTreeViewClass *item_view_class;
- GimpEditor *editor;
- GimpContainerTreeView *tree_view;
- GimpItemTreeView *item_view;
- GObject *object;
+ GimpItemTreeViewClass *item_view_class = GIMP_ITEM_TREE_VIEW_GET_CLASS (object);
+ GimpEditor *editor = GIMP_EDITOR (object);
+ GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (object);
+ GimpItemTreeView *item_view = GIMP_ITEM_TREE_VIEW (object);
GtkTreeViewColumn *column;
GtkWidget *hbox;
GtkWidget *image;
GtkIconSize icon_size;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_EDITOR (object);
- tree_view = GIMP_CONTAINER_TREE_VIEW (object);
- item_view = GIMP_ITEM_TREE_VIEW (object);
- item_view_class = GIMP_ITEM_TREE_VIEW_GET_CLASS (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_container_tree_view_connect_name_edited (tree_view,
G_CALLBACK (gimp_item_tree_view_name_edited),
@@ -480,8 +471,6 @@ gimp_item_tree_view_constructor (GType type,
gtk_container_add (GTK_CONTAINER (item_view->priv->lock_content_toggle),
image);
gtk_widget_show (image);
-
- return object;
}
static void
diff --git a/app/widgets/gimplanguageentry.c b/app/widgets/gimplanguageentry.c
index b3ecde2..278916e 100644
--- a/app/widgets/gimplanguageentry.c
+++ b/app/widgets/gimplanguageentry.c
@@ -50,10 +50,7 @@ struct _GimpLanguageEntry
};
-static GObject * gimp_language_entry_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-
+static void gimp_language_entry_constructed (GObject *object);
static void gimp_language_entry_finalize (GObject *object);
static void gimp_language_entry_set_property (GObject *object,
guint property_id,
@@ -80,7 +77,7 @@ gimp_language_entry_class_init (GimpLanguageEntryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_language_entry_constructor;
+ object_class->constructed = gimp_language_entry_constructed;
object_class->finalize = gimp_language_entry_finalize;
object_class->set_property = gimp_language_entry_set_property;
object_class->get_property = gimp_language_entry_get_property;
@@ -97,16 +94,13 @@ gimp_language_entry_init (GimpLanguageEntry *entry)
{
}
-static GObject *
-gimp_language_entry_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_language_entry_constructed (GObject *object)
{
- GimpLanguageEntry *entry;
- GObject *object;
+ GimpLanguageEntry *entry = GIMP_LANGUAGE_ENTRY (object);
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
- entry = GIMP_LANGUAGE_ENTRY (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
if (entry->store)
{
@@ -130,8 +124,6 @@ gimp_language_entry_constructor (GType type,
G_CALLBACK (gimp_language_entry_language_selected),
entry);
}
-
- return object;
}
static void
diff --git a/app/widgets/gimplanguagestore.c b/app/widgets/gimplanguagestore.c
index b579465..d092416 100644
--- a/app/widgets/gimplanguagestore.c
+++ b/app/widgets/gimplanguagestore.c
@@ -30,18 +30,16 @@
#include "gimplanguagestore-parser.h"
-static GObject * gimp_language_store_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_language_store_constructed (GObject *object);
-static void gimp_language_store_real_add (GimpLanguageStore *store,
- const gchar *label,
- const gchar *code);
+static void gimp_language_store_real_add (GimpLanguageStore *store,
+ const gchar *label,
+ const gchar *code);
-static gint gimp_language_store_sort (GtkTreeModel *model,
- GtkTreeIter *a,
- GtkTreeIter *b,
- gpointer userdata);
+static gint gimp_language_store_sort (GtkTreeModel *model,
+ GtkTreeIter *a,
+ GtkTreeIter *b,
+ gpointer userdata);
G_DEFINE_TYPE (GimpLanguageStore, gimp_language_store, GTK_TYPE_LIST_STORE)
@@ -54,7 +52,7 @@ gimp_language_store_class_init (GimpLanguageStoreClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_language_store_constructor;
+ object_class->constructed = gimp_language_store_constructed;
klass->add = gimp_language_store_real_add;
}
@@ -75,18 +73,13 @@ gimp_language_store_init (GimpLanguageStore *store)
GTK_SORT_ASCENDING);
}
-static GObject *
-gimp_language_store_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_language_store_constructed (GObject *object)
{
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_language_store_parse_iso_codes (GIMP_LANGUAGE_STORE (object), NULL);
-
- return object;
}
static void
diff --git a/app/widgets/gimplayertreeview.c b/app/widgets/gimplayertreeview.c
index 0421680..1d1543b 100644
--- a/app/widgets/gimplayertreeview.c
+++ b/app/widgets/gimplayertreeview.c
@@ -82,10 +82,10 @@ struct _GimpLayerTreeViewPriv
static void gimp_layer_tree_view_view_iface_init (GimpContainerViewInterface *iface);
-static GObject * gimp_layer_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+
+static void gimp_layer_tree_view_constructed (GObject *object);
static void gimp_layer_tree_view_finalize (GObject *object);
+
static void gimp_layer_tree_view_set_container (GimpContainerView *view,
GimpContainer *container);
static void gimp_layer_tree_view_set_context (GimpContainerView *view,
@@ -186,7 +186,7 @@ gimp_layer_tree_view_class_init (GimpLayerTreeViewClass *klass)
tree_view_class = GIMP_CONTAINER_TREE_VIEW_CLASS (klass);
item_view_class = GIMP_ITEM_TREE_VIEW_CLASS (klass);
- object_class->constructor = gimp_layer_tree_view_constructor;
+ object_class->constructed = gimp_layer_tree_view_constructed;
object_class->finalize = gimp_layer_tree_view_finalize;
tree_view_class->drop_possible = gimp_layer_tree_view_drop_possible;
@@ -330,20 +330,15 @@ gimp_layer_tree_view_init (GimpLayerTreeView *view)
pango_attr_list_insert (view->priv->bold_attrs, attr);
}
-static GObject *
-gimp_layer_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_layer_tree_view_constructed (GObject *object)
{
- GimpContainerTreeView *tree_view;
- GimpLayerTreeView *layer_view;
+ GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (object);
+ GimpLayerTreeView *layer_view = GIMP_LAYER_TREE_VIEW (object);
GtkWidget *button;
- GObject *object;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- tree_view = GIMP_CONTAINER_TREE_VIEW (object);
- layer_view = GIMP_LAYER_TREE_VIEW (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
layer_view->priv->mask_cell = gimp_cell_renderer_viewable_new ();
gtk_tree_view_column_pack_start (tree_view->main_column,
@@ -393,8 +388,6 @@ gimp_layer_tree_view_constructor (GType type,
GIMP_TYPE_LAYER);
gtk_box_reorder_child (GTK_BOX (GIMP_EDITOR (layer_view)->button_box),
button, 6);
-
- return object;
}
static void
diff --git a/app/widgets/gimpmessagebox.c b/app/widgets/gimpmessagebox.c
index 927e31b..5bdad4a 100644
--- a/app/widgets/gimpmessagebox.c
+++ b/app/widgets/gimpmessagebox.c
@@ -41,29 +41,27 @@ enum
};
-static GObject * gimp_message_box_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_message_box_dispose (GObject *object);
-static void gimp_message_box_finalize (GObject *object);
-static void gimp_message_box_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_message_box_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gimp_message_box_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data);
-
-static void gimp_message_box_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void gimp_message_box_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
+static void gimp_message_box_constructed (GObject *object);
+static void gimp_message_box_dispose (GObject *object);
+static void gimp_message_box_finalize (GObject *object);
+static void gimp_message_box_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_message_box_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_message_box_forall (GtkContainer *container,
+ gboolean include_internals,
+ GtkCallback callback,
+ gpointer callback_data);
+
+static void gimp_message_box_size_request (GtkWidget *widget,
+ GtkRequisition *requisition);
+static void gimp_message_box_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation);
G_DEFINE_TYPE (GimpMessageBox, gimp_message_box, GTK_TYPE_BOX)
@@ -78,7 +76,7 @@ gimp_message_box_class_init (GimpMessageBoxClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
- object_class->constructor = gimp_message_box_constructor;
+ object_class->constructed = gimp_message_box_constructed;
object_class->dispose = gimp_message_box_dispose;
object_class->finalize = gimp_message_box_finalize;
object_class->set_property = gimp_message_box_set_property;
@@ -138,17 +136,13 @@ gimp_message_box_init (GimpMessageBox *box)
box->label[2] = NULL;
}
-static GObject *
-gimp_message_box_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_message_box_constructed (GObject *object)
{
- GObject *object;
- GimpMessageBox *box;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpMessageBox *box = GIMP_MESSAGE_BOX (object);
- box = GIMP_MESSAGE_BOX (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
if (box->stock_id)
{
@@ -161,8 +155,6 @@ gimp_message_box_constructor (GType type,
gtk_widget_set_parent (box->image, GTK_WIDGET (box));
gtk_widget_show (box->image);
}
-
- return object;
}
static void
diff --git a/app/widgets/gimppaletteeditor.c b/app/widgets/gimppaletteeditor.c
index fa1e439..0f397a8 100644
--- a/app/widgets/gimppaletteeditor.c
+++ b/app/widgets/gimppaletteeditor.c
@@ -61,9 +61,7 @@
static void gimp_palette_editor_docked_iface_init (GimpDockedInterface *face);
-static GObject * gimp_palette_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_palette_editor_constructed (GObject *object);
static void gimp_palette_editor_dispose (GObject *object);
static void gimp_palette_editor_unmap (GtkWidget *widget);
@@ -136,7 +134,7 @@ gimp_palette_editor_class_init (GimpPaletteEditorClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GimpDataEditorClass *editor_class = GIMP_DATA_EDITOR_CLASS (klass);
- object_class->constructor = gimp_palette_editor_constructor;
+ object_class->constructed = gimp_palette_editor_constructed;
object_class->dispose = gimp_palette_editor_dispose;
widget_class->unmap = gimp_palette_editor_unmap;
@@ -247,17 +245,13 @@ gimp_palette_editor_init (GimpPaletteEditor *editor)
editor);
}
-static GObject *
-gimp_palette_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_palette_editor_constructed (GObject *object)
{
- GObject *object;
- GimpPaletteEditor *editor;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (object);
- editor = GIMP_PALETTE_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_editor_add_action_button (GIMP_EDITOR (editor), "palette-editor",
"palette-editor-edit-color", NULL);
@@ -279,8 +273,6 @@ gimp_palette_editor_constructor (GType type,
gimp_editor_add_action_button (GIMP_EDITOR (editor), "palette-editor",
"palette-editor-zoom-all", NULL);
-
- return object;
}
static void
diff --git a/app/widgets/gimppaletteselect.c b/app/widgets/gimppaletteselect.c
index 213ba4b..9503a70 100644
--- a/app/widgets/gimppaletteselect.c
+++ b/app/widgets/gimppaletteselect.c
@@ -38,9 +38,7 @@
#include "gimppaletteselect.h"
-static GObject * gimp_palette_select_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_palette_select_constructed (GObject *object);
static GValueArray * gimp_palette_select_run_callback (GimpPdbDialog *dialog,
GimpObject *object,
@@ -59,7 +57,7 @@ gimp_palette_select_class_init (GimpPaletteSelectClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpPdbDialogClass *pdb_class = GIMP_PDB_DIALOG_CLASS (klass);
- object_class->constructor = gimp_palette_select_constructor;
+ object_class->constructed = gimp_palette_select_constructed;
pdb_class->run_callback = gimp_palette_select_run_callback;
}
@@ -69,18 +67,14 @@ gimp_palette_select_init (GimpPaletteSelect *dialog)
{
}
-static GObject *
-gimp_palette_select_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_palette_select_constructed (GObject *object)
{
- GObject *object;
- GimpPdbDialog *dialog;
+ GimpPdbDialog *dialog = GIMP_PDB_DIALOG (object);
GtkWidget *content_area;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- dialog = GIMP_PDB_DIALOG (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
dialog->view =
gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
@@ -100,8 +94,6 @@ gimp_palette_select_constructor (GType type,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_box_pack_start (GTK_BOX (content_area), dialog->view, TRUE, TRUE, 0);
gtk_widget_show (dialog->view);
-
- return object;
}
static GValueArray *
diff --git a/app/widgets/gimppatternselect.c b/app/widgets/gimppatternselect.c
index 153d91c..40b27e9 100644
--- a/app/widgets/gimppatternselect.c
+++ b/app/widgets/gimppatternselect.c
@@ -40,9 +40,7 @@
#include "gimppatternselect.h"
-static GObject * gimp_pattern_select_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_pattern_select_constructed (GObject *object);
static GValueArray * gimp_pattern_select_run_callback (GimpPdbDialog *dialog,
GimpObject *object,
@@ -61,7 +59,7 @@ gimp_pattern_select_class_init (GimpPatternSelectClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpPdbDialogClass *pdb_class = GIMP_PDB_DIALOG_CLASS (klass);
- object_class->constructor = gimp_pattern_select_constructor;
+ object_class->constructed = gimp_pattern_select_constructed;
pdb_class->run_callback = gimp_pattern_select_run_callback;
}
@@ -71,18 +69,14 @@ gimp_pattern_select_init (GimpPatternSelect *select)
{
}
-static GObject *
-gimp_pattern_select_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_pattern_select_constructed (GObject *object)
{
- GObject *object;
- GimpPdbDialog *dialog;
+ GimpPdbDialog *dialog = GIMP_PDB_DIALOG (object);
GtkWidget *content_area;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- dialog = GIMP_PDB_DIALOG (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
dialog->view =
gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_GRID,
@@ -100,8 +94,6 @@ gimp_pattern_select_constructor (GType type,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_box_pack_start (GTK_BOX (content_area), dialog->view, TRUE, TRUE, 0);
gtk_widget_show (dialog->view);
-
- return object;
}
static GValueArray *
diff --git a/app/widgets/gimppdbdialog.c b/app/widgets/gimppdbdialog.c
index f061705..4755372 100644
--- a/app/widgets/gimppdbdialog.c
+++ b/app/widgets/gimppdbdialog.c
@@ -52,28 +52,26 @@ enum
};
-static void gimp_pdb_dialog_class_init (GimpPdbDialogClass *klass);
-static void gimp_pdb_dialog_init (GimpPdbDialog *dialog,
- GimpPdbDialogClass *klass);
-
-static GObject * gimp_pdb_dialog_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_pdb_dialog_dispose (GObject *object);
-static void gimp_pdb_dialog_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-
-static void gimp_pdb_dialog_response (GtkDialog *dialog,
- gint response_id);
-
-static void gimp_pdb_dialog_context_changed (GimpContext *context,
- GimpObject *object,
- GimpPdbDialog *dialog);
-static void gimp_pdb_dialog_plug_in_closed (GimpPlugInManager *manager,
- GimpPlugIn *plug_in,
- GimpPdbDialog *dialog);
+static void gimp_pdb_dialog_class_init (GimpPdbDialogClass *klass);
+static void gimp_pdb_dialog_init (GimpPdbDialog *dialog,
+ GimpPdbDialogClass *klass);
+
+static void gimp_pdb_dialog_constructed (GObject *object);
+static void gimp_pdb_dialog_dispose (GObject *object);
+static void gimp_pdb_dialog_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_pdb_dialog_response (GtkDialog *dialog,
+ gint response_id);
+
+static void gimp_pdb_dialog_context_changed (GimpContext *context,
+ GimpObject *object,
+ GimpPdbDialog *dialog);
+static void gimp_pdb_dialog_plug_in_closed (GimpPlugInManager *manager,
+ GimpPlugIn *plug_in,
+ GimpPdbDialog *dialog);
static GimpDialogClass *parent_class = NULL;
@@ -116,7 +114,7 @@ gimp_pdb_dialog_class_init (GimpPdbDialogClass *klass)
parent_class = g_type_class_peek_parent (klass);
- object_class->constructor = gimp_pdb_dialog_constructor;
+ object_class->constructed = gimp_pdb_dialog_constructed;
object_class->dispose = gimp_pdb_dialog_dispose;
object_class->set_property = gimp_pdb_dialog_set_property;
object_class->set_property = gimp_pdb_dialog_set_property;
@@ -176,25 +174,21 @@ gimp_pdb_dialog_init (GimpPdbDialog *dialog,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
}
-static GObject *
-gimp_pdb_dialog_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_pdb_dialog_constructed (GObject *object)
{
- GObject *object;
- GimpPdbDialog *dialog;
+ GimpPdbDialog *dialog = GIMP_PDB_DIALOG (object);
const gchar *signal_name;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- dialog = GIMP_PDB_DIALOG (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_PDB (dialog->pdb));
g_assert (GIMP_IS_CONTEXT (dialog->caller_context));
g_assert (g_type_is_a (dialog->select_type, GIMP_TYPE_OBJECT));
dialog->context = gimp_context_new (dialog->caller_context->gimp,
- g_type_name (type),
+ G_OBJECT_TYPE_NAME (object),
NULL);
gimp_context_set_by_type (dialog->context, dialog->select_type,
@@ -211,8 +205,6 @@ gimp_pdb_dialog_constructor (GType type,
"plug-in-closed",
G_CALLBACK (gimp_pdb_dialog_plug_in_closed),
dialog, 0);
-
- return object;
}
static void
diff --git a/app/widgets/gimpprofilechooserdialog.c b/app/widgets/gimpprofilechooserdialog.c
index 74b0edf..79e408d 100644
--- a/app/widgets/gimpprofilechooserdialog.c
+++ b/app/widgets/gimpprofilechooserdialog.c
@@ -42,12 +42,7 @@ enum
};
-static void gimp_profile_chooser_dialog_class_init (GimpProfileChooserDialogClass *klass);
-static void gimp_profile_chooser_dialog_init (GimpProfileChooserDialog *dialog);
-static GObject * gimp_profile_chooser_dialog_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-
+static void gimp_profile_chooser_dialog_constructed (GObject *object);
static void gimp_profile_chooser_dialog_dispose (GObject *object);
static void gimp_profile_chooser_dialog_finalize (GObject *object);
static void gimp_profile_chooser_dialog_set_property (GObject *object,
@@ -77,7 +72,7 @@ gimp_profile_chooser_dialog_class_init (GimpProfileChooserDialogClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_profile_chooser_dialog_constructor;
+ object_class->constructed = gimp_profile_chooser_dialog_constructed;
object_class->dispose = gimp_profile_chooser_dialog_dispose;
object_class->finalize = gimp_profile_chooser_dialog_finalize;
object_class->get_property = gimp_profile_chooser_dialog_get_property;
@@ -98,18 +93,14 @@ gimp_profile_chooser_dialog_init (GimpProfileChooserDialog *dialog)
dialog->buffer = gtk_text_buffer_new (NULL);
}
-static GObject *
-gimp_profile_chooser_dialog_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_profile_chooser_dialog_constructed (GObject *object)
{
- GObject *object;
- GimpProfileChooserDialog *dialog;
+ GimpProfileChooserDialog *dialog = GIMP_PROFILE_CHOOSER_DIALOG (object);
GtkFileFilter *filter;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- dialog = GIMP_PROFILE_CHOOSER_DIALOG (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gtk_window_set_role (GTK_WINDOW (dialog), "gimp-profile-chooser-dialog");
@@ -146,8 +137,6 @@ gimp_profile_chooser_dialog_constructor (GType type,
g_signal_connect (dialog, "update-preview",
G_CALLBACK (gimp_profile_chooser_dialog_update_preview),
NULL);
-
- return object;
}
static void
diff --git a/app/widgets/gimpsamplepointeditor.c b/app/widgets/gimpsamplepointeditor.c
index a9c4543..54069de 100644
--- a/app/widgets/gimpsamplepointeditor.c
+++ b/app/widgets/gimpsamplepointeditor.c
@@ -48,9 +48,8 @@ enum
};
-static GObject * gimp_sample_point_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_sample_point_editor_constructed (GObject *object);
+static void gimp_sample_point_editor_dispose (GObject *object);
static void gimp_sample_point_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -59,7 +58,6 @@ static void gimp_sample_point_editor_get_property (GObject *ob
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void gimp_sample_point_editor_dispose (GObject *object);
static void gimp_sample_point_editor_style_set (GtkWidget *widget,
GtkStyle *prev_style);
@@ -101,10 +99,10 @@ gimp_sample_point_editor_class_init (GimpSamplePointEditorClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GimpImageEditorClass *image_editor_class = GIMP_IMAGE_EDITOR_CLASS (klass);
- object_class->constructor = gimp_sample_point_editor_constructor;
+ object_class->constructed = gimp_sample_point_editor_constructed;
+ object_class->dispose = gimp_sample_point_editor_dispose;
object_class->get_property = gimp_sample_point_editor_get_property;
object_class->set_property = gimp_sample_point_editor_set_property;
- object_class->dispose = gimp_sample_point_editor_dispose;
widget_class->style_set = gimp_sample_point_editor_style_set;
@@ -167,19 +165,25 @@ gimp_sample_point_editor_init (GimpSamplePointEditor *editor)
}
}
-static GObject *
-gimp_sample_point_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_sample_point_editor_constructed (GObject *object)
{
- GObject *object;
- GimpSamplePointEditor *editor;
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
+}
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+static void
+gimp_sample_point_editor_dispose (GObject *object)
+{
+ GimpSamplePointEditor *editor = GIMP_SAMPLE_POINT_EDITOR (object);
- editor = GIMP_SAMPLE_POINT_EDITOR (object);
+ if (editor->dirty_idle_id)
+ {
+ g_source_remove (editor->dirty_idle_id);
+ editor->dirty_idle_id = 0;
+ }
- return object;
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
@@ -222,20 +226,6 @@ gimp_sample_point_editor_get_property (GObject *object,
}
static void
-gimp_sample_point_editor_dispose (GObject *object)
-{
- GimpSamplePointEditor *editor = GIMP_SAMPLE_POINT_EDITOR (object);
-
- if (editor->dirty_idle_id)
- {
- g_source_remove (editor->dirty_idle_id);
- editor->dirty_idle_id = 0;
- }
-
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
gimp_sample_point_editor_style_set (GtkWidget *widget,
GtkStyle *prev_style)
{
diff --git a/app/widgets/gimpselectioneditor.c b/app/widgets/gimpselectioneditor.c
index 8910aa9..81bc3e3 100644
--- a/app/widgets/gimpselectioneditor.c
+++ b/app/widgets/gimpselectioneditor.c
@@ -53,9 +53,7 @@
static void gimp_selection_editor_docked_iface_init (GimpDockedInterface *iface);
-static GObject * gimp_selection_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_selection_editor_constructed (GObject *object);
static void gimp_selection_editor_set_image (GimpImageEditor *editor,
GimpImage *image);
@@ -92,7 +90,7 @@ gimp_selection_editor_class_init (GimpSelectionEditorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpImageEditorClass *image_editor_class = GIMP_IMAGE_EDITOR_CLASS (klass);
- object_class->constructor = gimp_selection_editor_constructor;
+ object_class->constructed = gimp_selection_editor_constructed;
image_editor_class->set_image = gimp_selection_editor_set_image;
}
@@ -142,17 +140,13 @@ gimp_selection_editor_init (GimpSelectionEditor *editor)
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
}
-static GObject *
-gimp_selection_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_selection_editor_constructed (GObject *object)
{
- GObject *object;
- GimpSelectionEditor *editor;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpSelectionEditor *editor = GIMP_SELECTION_EDITOR (object);
- editor = GIMP_SELECTION_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
editor->all_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "select",
@@ -183,8 +177,6 @@ gimp_selection_editor_constructor (GType type,
"select-stroke-last-values",
GDK_SHIFT_MASK,
NULL);
-
- return object;
}
static void
diff --git a/app/widgets/gimpsettingsbox.c b/app/widgets/gimpsettingsbox.c
index 859c943..0517250 100644
--- a/app/widgets/gimpsettingsbox.c
+++ b/app/widgets/gimpsettingsbox.c
@@ -60,9 +60,7 @@ enum
};
-static GObject * gimp_settings_box_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_settings_box_constructed (GObject *object);
static void gimp_settings_box_finalize (GObject *object);
static void gimp_settings_box_set_property (GObject *object,
guint property_id,
@@ -161,7 +159,7 @@ gimp_settings_box_class_init (GimpSettingsBoxClass *klass)
G_TYPE_BOOLEAN, 1,
G_TYPE_STRING);
- object_class->constructor = gimp_settings_box_constructor;
+ object_class->constructed = gimp_settings_box_constructed;
object_class->finalize = gimp_settings_box_finalize;
object_class->set_property = gimp_settings_box_set_property;
object_class->get_property = gimp_settings_box_get_property;
@@ -208,21 +206,17 @@ gimp_settings_box_init (GimpSettingsBox *box)
gtk_box_set_spacing (GTK_BOX (box), 6);
}
-static GObject *
-gimp_settings_box_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_settings_box_constructed (GObject *object)
{
- GObject *object;
- GimpSettingsBox *box;
+ GimpSettingsBox *box = GIMP_SETTINGS_BOX (object);
GtkWidget *hbox2;
GtkWidget *button;
GtkWidget *image;
GtkWidget *arrow;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- box = GIMP_SETTINGS_BOX (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (box->gimp));
g_assert (GIMP_IS_CONFIG (box->config));
@@ -305,8 +299,6 @@ gimp_settings_box_constructor (GType type,
GTK_STOCK_EDIT,
_("_Manage Settings..."),
G_CALLBACK (gimp_settings_box_manage_activate));
-
- return object;
}
static void
diff --git a/app/widgets/gimpsettingseditor.c b/app/widgets/gimpsettingseditor.c
index b772387..b806b07 100644
--- a/app/widgets/gimpsettingseditor.c
+++ b/app/widgets/gimpsettingseditor.c
@@ -54,37 +54,35 @@ enum
};
-static GObject * gimp_settings_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_settings_editor_finalize (GObject *object);
-static void gimp_settings_editor_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_settings_editor_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
+static void gimp_settings_editor_constructed (GObject *object);
+static void gimp_settings_editor_finalize (GObject *object);
+static void gimp_settings_editor_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_settings_editor_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
static gboolean
- gimp_settings_editor_row_separator_func (GtkTreeModel *model,
- GtkTreeIter *iter,
- gpointer data);
-static void gimp_settings_editor_select_item (GimpContainerView *view,
- GimpViewable *viewable,
- gpointer insert_data,
- GimpSettingsEditor *editor);
-static void gimp_settings_editor_import_clicked (GtkWidget *widget,
- GimpSettingsEditor *editor);
-static void gimp_settings_editor_export_clicked (GtkWidget *widget,
- GimpSettingsEditor *editor);
-static void gimp_settings_editor_delete_clicked (GtkWidget *widget,
- GimpSettingsEditor *editor);
-static void gimp_settings_editor_name_edited (GtkCellRendererText *cell,
- const gchar *path_str,
- const gchar *new_name,
- GimpSettingsEditor *editor);
+ gimp_settings_editor_row_separator_func (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data);
+static void gimp_settings_editor_select_item (GimpContainerView *view,
+ GimpViewable *viewable,
+ gpointer insert_data,
+ GimpSettingsEditor *editor);
+static void gimp_settings_editor_import_clicked (GtkWidget *widget,
+ GimpSettingsEditor *editor);
+static void gimp_settings_editor_export_clicked (GtkWidget *widget,
+ GimpSettingsEditor *editor);
+static void gimp_settings_editor_delete_clicked (GtkWidget *widget,
+ GimpSettingsEditor *editor);
+static void gimp_settings_editor_name_edited (GtkCellRendererText *cell,
+ const gchar *path_str,
+ const gchar *new_name,
+ GimpSettingsEditor *editor);
G_DEFINE_TYPE (GimpSettingsEditor, gimp_settings_editor, GTK_TYPE_BOX)
@@ -97,7 +95,7 @@ gimp_settings_editor_class_init (GimpSettingsEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_settings_editor_constructor;
+ object_class->constructed = gimp_settings_editor_constructed;
object_class->finalize = gimp_settings_editor_finalize;
object_class->set_property = gimp_settings_editor_set_property;
object_class->get_property = gimp_settings_editor_get_property;
@@ -133,18 +131,14 @@ gimp_settings_editor_init (GimpSettingsEditor *editor)
gtk_box_set_spacing (GTK_BOX (editor), 6);
}
-static GObject *
-gimp_settings_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_settings_editor_constructed (GObject *object)
{
- GObject *object;
- GimpSettingsEditor *editor;
+ GimpSettingsEditor *editor = GIMP_SETTINGS_EDITOR (object);
GimpContainerTreeView *tree_view;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_SETTINGS_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (editor->gimp));
g_assert (GIMP_IS_CONFIG (editor->config));
@@ -199,8 +193,6 @@ gimp_settings_editor_constructor (GType type,
editor);
gtk_widget_set_sensitive (editor->delete_button, FALSE);
-
- return object;
}
static void
diff --git a/app/widgets/gimpsizebox.c b/app/widgets/gimpsizebox.c
index e17e51b..cb89954 100644
--- a/app/widgets/gimpsizebox.c
+++ b/app/widgets/gimpsizebox.c
@@ -66,24 +66,21 @@ struct _GimpSizeBoxPrivate
};
-static GObject * gimp_size_box_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-
-static void gimp_size_box_dispose (GObject *object);
-static void gimp_size_box_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_size_box_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gimp_size_box_update_size (GimpSizeBox *box);
-static void gimp_size_box_update_resolution (GimpSizeBox *box);
-static void gimp_size_box_chain_toggled (GimpChainButton *button,
- GimpSizeBox *box);
+static void gimp_size_box_constructed (GObject *object);
+static void gimp_size_box_dispose (GObject *object);
+static void gimp_size_box_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_size_box_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_size_box_update_size (GimpSizeBox *box);
+static void gimp_size_box_update_resolution (GimpSizeBox *box);
+static void gimp_size_box_chain_toggled (GimpChainButton *button,
+ GimpSizeBox *box);
G_DEFINE_TYPE (GimpSizeBox, gimp_size_box, GTK_TYPE_BOX)
@@ -96,7 +93,7 @@ gimp_size_box_class_init (GimpSizeBoxClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_size_box_constructor;
+ object_class->constructed = gimp_size_box_constructed;
object_class->dispose = gimp_size_box_dispose;
object_class->set_property = gimp_size_box_set_property;
object_class->get_property = gimp_size_box_get_property;
@@ -170,14 +167,11 @@ gimp_size_box_init (GimpSizeBox *box)
box->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
}
-static GObject *
-gimp_size_box_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_size_box_constructed (GObject *object)
{
- GObject *object;
- GimpSizeBox *box;
- GimpSizeBoxPrivate *priv;
+ GimpSizeBox *box = GIMP_SIZE_BOX (object);
+ GimpSizeBoxPrivate *priv = GIMP_SIZE_BOX_GET_PRIVATE (box);
GtkWidget *vbox;
GtkWidget *entry;
GtkWidget *hbox;
@@ -185,10 +179,8 @@ gimp_size_box_constructor (GType type,
GList *children;
GList *list;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- box = GIMP_SIZE_BOX (object);
- priv = GIMP_SIZE_BOX_GET_PRIVATE (box);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 0);
@@ -298,8 +290,6 @@ gimp_size_box_constructor (GType type,
gimp_size_box_update_size (box);
gimp_size_box_update_resolution (box);
-
- return object;
}
static void
diff --git a/app/widgets/gimpstrokeeditor.c b/app/widgets/gimpstrokeeditor.c
index e24b40b..9646de7 100644
--- a/app/widgets/gimpstrokeeditor.c
+++ b/app/widgets/gimpstrokeeditor.c
@@ -42,9 +42,7 @@ enum
};
-static GObject * gimp_stroke_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_stroke_editor_constructed (GObject *object);
static void gimp_stroke_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -53,6 +51,7 @@ static void gimp_stroke_editor_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
+
static gboolean gimp_stroke_editor_paint_button (GtkWidget *widget,
GdkEventExpose *event,
gpointer data);
@@ -73,7 +72,7 @@ gimp_stroke_editor_class_init (GimpStrokeEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_stroke_editor_constructor;
+ object_class->constructed = gimp_stroke_editor_constructed;
object_class->set_property = gimp_stroke_editor_set_property;
object_class->get_property = gimp_stroke_editor_get_property;
@@ -98,65 +97,10 @@ gimp_stroke_editor_init (GimpStrokeEditor *editor)
}
static void
-gimp_stroke_editor_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GimpFillEditor *fill_editor = GIMP_FILL_EDITOR (object);
- GimpStrokeEditor *editor = GIMP_STROKE_EDITOR (object);
-
- switch (property_id)
- {
- case PROP_OPTIONS:
- if (fill_editor->options)
- g_object_unref (fill_editor->options);
- fill_editor->options = g_value_dup_object (value);
- break;
-
- case PROP_RESOLUTION:
- editor->resolution = g_value_get_double (value);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-gimp_stroke_editor_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GimpFillEditor *fill_editor = GIMP_FILL_EDITOR (object);
- GimpStrokeEditor *editor = GIMP_STROKE_EDITOR (object);
-
- switch (property_id)
- {
- case PROP_OPTIONS:
- g_value_set_object (value, fill_editor->options);
- break;
-
- case PROP_RESOLUTION:
- g_value_set_double (value, editor->resolution);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static GObject *
-gimp_stroke_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+gimp_stroke_editor_constructed (GObject *object)
{
- GObject *object;
- GimpFillEditor *fill_editor;
- GimpStrokeEditor *editor;
+ GimpFillEditor *fill_editor = GIMP_FILL_EDITOR (object);
+ GimpStrokeEditor *editor = GIMP_STROKE_EDITOR (object);
GimpStrokeOptions *options;
GimpEnumStore *store;
GEnumValue *value;
@@ -171,10 +115,8 @@ gimp_stroke_editor_constructor (GType type,
GtkCellRenderer *cell;
gint row = 0;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- fill_editor = GIMP_FILL_EDITOR (object);
- editor = GIMP_STROKE_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_STROKE_OPTIONS (fill_editor->options));
@@ -314,8 +256,58 @@ gimp_stroke_editor_constructor (GType type,
g_signal_connect_object (options, "dash-info-changed",
G_CALLBACK (gimp_int_combo_box_set_active),
box, G_CONNECT_SWAPPED);
+}
+
+static void
+gimp_stroke_editor_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GimpFillEditor *fill_editor = GIMP_FILL_EDITOR (object);
+ GimpStrokeEditor *editor = GIMP_STROKE_EDITOR (object);
+
+ switch (property_id)
+ {
+ case PROP_OPTIONS:
+ if (fill_editor->options)
+ g_object_unref (fill_editor->options);
+ fill_editor->options = g_value_dup_object (value);
+ break;
+
+ case PROP_RESOLUTION:
+ editor->resolution = g_value_get_double (value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gimp_stroke_editor_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GimpFillEditor *fill_editor = GIMP_FILL_EDITOR (object);
+ GimpStrokeEditor *editor = GIMP_STROKE_EDITOR (object);
+
+ switch (property_id)
+ {
+ case PROP_OPTIONS:
+ g_value_set_object (value, fill_editor->options);
+ break;
- return object;
+ case PROP_RESOLUTION:
+ g_value_set_double (value, editor->resolution);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
}
GtkWidget *
diff --git a/app/widgets/gimptagpopup.c b/app/widgets/gimptagpopup.c
index 11ea794..888e876 100644
--- a/app/widgets/gimptagpopup.c
+++ b/app/widgets/gimptagpopup.c
@@ -65,65 +65,63 @@ struct _PopupTagData
};
-static GObject* gimp_tag_popup_constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params);
-static void gimp_tag_popup_dispose (GObject *object);
-static void gimp_tag_popup_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_tag_popup_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-
-static gboolean gimp_tag_popup_border_expose (GtkWidget *widget,
- GdkEventExpose *event,
- GimpTagPopup *popup);
-static gboolean gimp_tag_popup_list_expose (GtkWidget *widget,
- GdkEventExpose *event,
- GimpTagPopup *popup);
-static gboolean gimp_tag_popup_border_event (GtkWidget *widget,
- GdkEvent *event);
-static gboolean gimp_tag_popup_list_event (GtkWidget *widget,
- GdkEvent *event,
- GimpTagPopup *popup);
-static gboolean gimp_tag_popup_is_in_tag (PopupTagData *tag_data,
- gint x,
- gint y);
-static void gimp_tag_popup_queue_draw_tag (GimpTagPopup *widget,
- PopupTagData *tag_data);
-static void gimp_tag_popup_toggle_tag (GimpTagPopup *popup,
- PopupTagData *tag_data);
-static void gimp_tag_popup_check_can_toggle (GimpTagged *tagged,
- GimpTagPopup *popup);
-static gint gimp_tag_popup_layout_tags (GimpTagPopup *popup,
- gint width);
-static gboolean gimp_tag_popup_scroll_timeout (gpointer data);
-static void gimp_tag_popup_remove_scroll_timeout (GimpTagPopup *popup);
-static gboolean gimp_tag_popup_scroll_timeout_initial (gpointer data);
-static void gimp_tag_popup_start_scrolling (GimpTagPopup *popup);
-static void gimp_tag_popup_stop_scrolling (GimpTagPopup *popup);
-static void gimp_tag_popup_scroll_by (GimpTagPopup *popup,
- gint step);
-static void gimp_tag_popup_handle_scrolling (GimpTagPopup *popup,
- gint x,
- gint y,
- gboolean enter,
- gboolean motion);
-
-static gboolean gimp_tag_popup_button_scroll (GimpTagPopup *popup,
- GdkEventButton *event);
-
-static void get_arrows_visible_area (GimpTagPopup *combo_entry,
- GdkRectangle *border,
- GdkRectangle *upper,
- GdkRectangle *lower,
- gint *arrow_space);
-static void get_arrows_sensitive_area (GimpTagPopup *popup,
- GdkRectangle *upper,
- GdkRectangle *lower);
+static void gimp_tag_popup_constructed (GObject *object);
+static void gimp_tag_popup_dispose (GObject *object);
+static void gimp_tag_popup_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_tag_popup_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static gboolean gimp_tag_popup_border_expose (GtkWidget *widget,
+ GdkEventExpose *event,
+ GimpTagPopup *popup);
+static gboolean gimp_tag_popup_list_expose (GtkWidget *widget,
+ GdkEventExpose *event,
+ GimpTagPopup *popup);
+static gboolean gimp_tag_popup_border_event (GtkWidget *widget,
+ GdkEvent *event);
+static gboolean gimp_tag_popup_list_event (GtkWidget *widget,
+ GdkEvent *event,
+ GimpTagPopup *popup);
+static gboolean gimp_tag_popup_is_in_tag (PopupTagData *tag_data,
+ gint x,
+ gint y);
+static void gimp_tag_popup_queue_draw_tag (GimpTagPopup *widget,
+ PopupTagData *tag_data);
+static void gimp_tag_popup_toggle_tag (GimpTagPopup *popup,
+ PopupTagData *tag_data);
+static void gimp_tag_popup_check_can_toggle (GimpTagged *tagged,
+ GimpTagPopup *popup);
+static gint gimp_tag_popup_layout_tags (GimpTagPopup *popup,
+ gint width);
+static gboolean gimp_tag_popup_scroll_timeout (gpointer data);
+static void gimp_tag_popup_remove_scroll_timeout (GimpTagPopup *popup);
+static gboolean gimp_tag_popup_scroll_timeout_initial (gpointer data);
+static void gimp_tag_popup_start_scrolling (GimpTagPopup *popup);
+static void gimp_tag_popup_stop_scrolling (GimpTagPopup *popup);
+static void gimp_tag_popup_scroll_by (GimpTagPopup *popup,
+ gint step);
+static void gimp_tag_popup_handle_scrolling (GimpTagPopup *popup,
+ gint x,
+ gint y,
+ gboolean enter,
+ gboolean motion);
+
+static gboolean gimp_tag_popup_button_scroll (GimpTagPopup *popup,
+ GdkEventButton *event);
+
+static void get_arrows_visible_area (GimpTagPopup *combo_entry,
+ GdkRectangle *border,
+ GdkRectangle *upper,
+ GdkRectangle *lower,
+ gint *arrow_space);
+static void get_arrows_sensitive_area (GimpTagPopup *popup,
+ GdkRectangle *upper,
+ GdkRectangle *lower);
G_DEFINE_TYPE (GimpTagPopup, gimp_tag_popup, GTK_TYPE_WINDOW);
@@ -136,7 +134,7 @@ gimp_tag_popup_class_init (GimpTagPopupClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_tag_popup_constructor;
+ object_class->constructed = gimp_tag_popup_constructed;
object_class->dispose = gimp_tag_popup_dispose;
object_class->set_property = gimp_tag_popup_set_property;
object_class->get_property = gimp_tag_popup_get_property;
@@ -194,13 +192,10 @@ gimp_tag_popup_init (GimpTagPopup *popup)
popup);
}
-static GObject *
-gimp_tag_popup_constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+gimp_tag_popup_constructed (GObject *object)
{
- GObject *object;
- GimpTagPopup *popup;
+ GimpTagPopup *popup = GIMP_TAG_POPUP (object);
GimpFilteredContainer *container;
GtkWidget *entry;
GtkAllocation entry_allocation;
@@ -223,10 +218,8 @@ gimp_tag_popup_constructor (GType type,
GdkRectangle popup_rects[2]; /* variants of popup placement */
GdkRectangle popup_rect; /* best popup rect in screen coordinates */
- object = G_OBJECT_CLASS (parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- popup = GIMP_TAG_POPUP (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
entry = GTK_WIDGET (popup->combo_entry);
@@ -367,8 +360,6 @@ gimp_tag_popup_constructor (GType type,
gtk_window_move (GTK_WINDOW (popup), popup_rect.x, popup_rect.y);
gtk_window_resize (GTK_WINDOW (popup), popup_rect.width, popup_rect.height);
-
- return object;
}
static void
diff --git a/app/widgets/gimptemplateeditor.c b/app/widgets/gimptemplateeditor.c
index 9ba1ae2..d423891 100644
--- a/app/widgets/gimptemplateeditor.c
+++ b/app/widgets/gimptemplateeditor.c
@@ -49,9 +49,7 @@ enum
};
-static GObject *gimp_template_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_template_editor_constructed (GObject *object);
static void gimp_template_editor_finalize (GObject *object);
static void gimp_template_editor_set_property (GObject *object,
guint property_id,
@@ -82,7 +80,7 @@ gimp_template_editor_class_init (GimpTemplateEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_template_editor_constructor;
+ object_class->constructed = gimp_template_editor_constructed;
object_class->finalize = gimp_template_editor_finalize;
object_class->set_property = gimp_template_editor_set_property;
object_class->get_property = gimp_template_editor_get_property;
@@ -105,13 +103,10 @@ gimp_template_editor_init (GimpTemplateEditor *editor)
editor->template = NULL;
}
-static GObject *
-gimp_template_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_template_editor_constructed (GObject *object)
{
- GimpTemplateEditor *editor;
- GObject *object;
+ GimpTemplateEditor *editor = GIMP_TEMPLATE_EDITOR (object);
GtkWidget *aspect_box;
GtkWidget *frame;
GtkWidget *hbox;
@@ -131,9 +126,8 @@ gimp_template_editor_constructor (GType type,
GList *focus_chain = NULL;
gchar *text;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_TEMPLATE_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (editor->template != NULL);
@@ -398,8 +392,6 @@ gimp_template_editor_constructor (GType type,
/* call the notify callback once to get the labels set initially */
gimp_template_editor_template_notify (editor->template, NULL, editor);
-
- return object;
}
static void
diff --git a/app/widgets/gimptextbuffer.c b/app/widgets/gimptextbuffer.c
index 9dd257f..24eb9cb 100644
--- a/app/widgets/gimptextbuffer.c
+++ b/app/widgets/gimptextbuffer.c
@@ -56,15 +56,13 @@
/* local function prototypes */
-static GObject * gimp_text_buffer_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_text_buffer_dispose (GObject *object);
-static void gimp_text_buffer_finalize (GObject *object);
+static void gimp_text_buffer_constructed (GObject *object);
+static void gimp_text_buffer_dispose (GObject *object);
+static void gimp_text_buffer_finalize (GObject *object);
-static void gimp_text_buffer_mark_set (GtkTextBuffer *buffer,
- const GtkTextIter *location,
- GtkTextMark *mark);
+static void gimp_text_buffer_mark_set (GtkTextBuffer *buffer,
+ const GtkTextIter *location,
+ GtkTextMark *mark);
G_DEFINE_TYPE (GimpTextBuffer, gimp_text_buffer, GTK_TYPE_TEXT_BUFFER)
@@ -78,7 +76,7 @@ gimp_text_buffer_class_init (GimpTextBufferClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkTextBufferClass *buffer_class = GTK_TEXT_BUFFER_CLASS (klass);
- object_class->constructor = gimp_text_buffer_constructor;
+ object_class->constructed = gimp_text_buffer_constructed;
object_class->dispose = gimp_text_buffer_dispose;
object_class->finalize = gimp_text_buffer_finalize;
@@ -100,17 +98,13 @@ gimp_text_buffer_init (GimpTextBuffer *buffer)
NULL, NULL);
}
-static GObject *
-gimp_text_buffer_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_text_buffer_constructed (GObject *object)
{
- GObject *object;
- GimpTextBuffer *buffer;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpTextBuffer *buffer = GIMP_TEXT_BUFFER (object);
- buffer = GIMP_TEXT_BUFFER (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gtk_text_buffer_set_text (GTK_TEXT_BUFFER (buffer), "", -1);
@@ -133,8 +127,6 @@ gimp_text_buffer_constructor (GType type,
"strikethrough",
"strikethrough", TRUE,
NULL);
-
- return object;
}
static void
diff --git a/app/widgets/gimptextstyleeditor.c b/app/widgets/gimptextstyleeditor.c
index 2246243..e1f413c 100644
--- a/app/widgets/gimptextstyleeditor.c
+++ b/app/widgets/gimptextstyleeditor.c
@@ -55,9 +55,7 @@ enum
};
-static GObject * gimp_text_style_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_text_style_editor_constructed (GObject *object);
static void gimp_text_style_editor_dispose (GObject *object);
static void gimp_text_style_editor_finalize (GObject *object);
static void gimp_text_style_editor_set_property (GObject *object,
@@ -123,7 +121,7 @@ gimp_text_style_editor_class_init (GimpTextStyleEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_text_style_editor_constructor;
+ object_class->constructed = gimp_text_style_editor_constructed;
object_class->dispose = gimp_text_style_editor_dispose;
object_class->finalize = gimp_text_style_editor_finalize;
object_class->set_property = gimp_text_style_editor_set_property;
@@ -275,17 +273,13 @@ gimp_text_style_editor_init (GimpTextStyleEditor *editor)
editor);
}
-static GObject *
-gimp_text_style_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_text_style_editor_constructed (GObject *object)
{
- GObject *object;
- GimpTextStyleEditor *editor;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpTextStyleEditor *editor = GIMP_TEXT_STYLE_EDITOR (object);
- editor = GIMP_TEXT_STYLE_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (editor->gimp));
g_assert (GIMP_IS_FONT_LIST (editor->fonts));
@@ -331,8 +325,6 @@ gimp_text_style_editor_constructor (GType type,
G_CALLBACK (gimp_text_style_editor_update),
editor, 0,
G_CONNECT_AFTER | G_CONNECT_SWAPPED);
-
- return object;
}
static void
diff --git a/app/widgets/gimptooloptionseditor.c b/app/widgets/gimptooloptionseditor.c
index f999c88..6ab8dd1 100644
--- a/app/widgets/gimptooloptionseditor.c
+++ b/app/widgets/gimptooloptionseditor.c
@@ -73,9 +73,7 @@ struct _GimpToolOptionsEditorPrivate
static void gimp_tool_options_editor_docked_iface_init (GimpDockedInterface *iface);
-static GObject * gimp_tool_options_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_tool_options_editor_constructed (GObject *object);
static void gimp_tool_options_editor_dispose (GObject *object);
static void gimp_tool_options_editor_set_property (GObject *object,
guint property_id,
@@ -125,7 +123,7 @@ gimp_tool_options_editor_class_init (GimpToolOptionsEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gimp_tool_options_editor_constructor;
+ object_class->constructed = gimp_tool_options_editor_constructed;
object_class->dispose = gimp_tool_options_editor_dispose;
object_class->set_property = gimp_tool_options_editor_set_property;
object_class->get_property = gimp_tool_options_editor_get_property;
@@ -141,6 +139,14 @@ gimp_tool_options_editor_class_init (GimpToolOptionsEditorClass *klass)
}
static void
+gimp_tool_options_editor_docked_iface_init (GimpDockedInterface *docked_iface)
+{
+ docked_iface->get_preview = gimp_tool_options_editor_get_preview;
+ docked_iface->get_title = gimp_tool_options_editor_get_title;
+ docked_iface->get_prefer_icon = gimp_tool_options_editor_get_prefer_icon;
+}
+
+static void
gimp_tool_options_editor_init (GimpToolOptionsEditor *editor)
{
GtkScrolledWindow *scrolled_window;
@@ -194,25 +200,13 @@ gimp_tool_options_editor_init (GimpToolOptionsEditor *editor)
}
static void
-gimp_tool_options_editor_docked_iface_init (GimpDockedInterface *docked_iface)
+gimp_tool_options_editor_constructed (GObject *object)
{
- docked_iface->get_preview = gimp_tool_options_editor_get_preview;
- docked_iface->get_title = gimp_tool_options_editor_get_title;
- docked_iface->get_prefer_icon = gimp_tool_options_editor_get_prefer_icon;
-}
-
-static GObject *
-gimp_tool_options_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
-{
- GObject *object = NULL;
- GimpToolOptionsEditor *editor = NULL;
- GimpContext *user_context = NULL;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpToolOptionsEditor *editor = GIMP_TOOL_OPTIONS_EDITOR (object);
+ GimpContext *user_context;
- editor = GIMP_TOOL_OPTIONS_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
editor->p->save_button =
gimp_editor_add_button (GIMP_EDITOR (editor), GTK_STOCK_SAVE,
@@ -255,8 +249,6 @@ gimp_tool_options_editor_constructor (GType type,
gimp_tool_options_editor_tool_changed (user_context,
gimp_context_get_tool (user_context),
editor);
-
- return object;
}
static void
diff --git a/app/widgets/gimptoolpreseteditor.c b/app/widgets/gimptoolpreseteditor.c
index 8a5d13d..1fd82e9 100644
--- a/app/widgets/gimptoolpreseteditor.c
+++ b/app/widgets/gimptoolpreseteditor.c
@@ -38,20 +38,18 @@
/* local function prototypes */
-static GObject * gimp_tool_preset_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_tool_preset_editor_finalize (GObject *object);
+static void gimp_tool_preset_editor_constructed (GObject *object);
+static void gimp_tool_preset_editor_finalize (GObject *object);
-static void gimp_tool_preset_editor_set_data (GimpDataEditor *editor,
- GimpData *data);
+static void gimp_tool_preset_editor_set_data (GimpDataEditor *editor,
+ GimpData *data);
-static void gimp_tool_preset_editor_notify_model (GimpToolPreset *options,
- const GParamSpec *pspec,
- GimpToolPresetEditor *editor);
-static void gimp_tool_preset_editor_notify_data (GimpToolPreset *options,
- const GParamSpec *pspec,
- GimpToolPresetEditor *editor);
+static void gimp_tool_preset_editor_notify_model (GimpToolPreset *options,
+ const GParamSpec *pspec,
+ GimpToolPresetEditor *editor);
+static void gimp_tool_preset_editor_notify_data (GimpToolPreset *options,
+ const GParamSpec *pspec,
+ GimpToolPresetEditor *editor);
@@ -68,7 +66,7 @@ gimp_tool_preset_editor_class_init (GimpToolPresetEditorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpDataEditorClass *editor_class = GIMP_DATA_EDITOR_CLASS (klass);
- object_class->constructor = gimp_tool_preset_editor_constructor;
+ object_class->constructed = gimp_tool_preset_editor_constructed;
object_class->finalize = gimp_tool_preset_editor_finalize;
editor_class->set_data = gimp_tool_preset_editor_set_data;
@@ -81,21 +79,16 @@ gimp_tool_preset_editor_init (GimpToolPresetEditor *editor)
}
-static GObject *
-gimp_tool_preset_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_tool_preset_editor_constructed (GObject *object)
{
- GObject *object;
- GimpToolPresetEditor *editor;
- GimpDataEditor *data_editor;
+ GimpToolPresetEditor *editor = GIMP_TOOL_PRESET_EDITOR (object);
+ GimpDataEditor *data_editor = GIMP_DATA_EDITOR (editor);
GimpToolPreset *preset;
GtkWidget *button;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_TOOL_PRESET_EDITOR (object);
- data_editor = GIMP_DATA_EDITOR (editor);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
preset = editor->tool_preset_model = g_object_new (GIMP_TYPE_TOOL_PRESET,
"gimp", data_editor->context->gimp,
@@ -146,8 +139,6 @@ gimp_tool_preset_editor_constructor (GType type,
gtk_box_pack_start (GTK_BOX (data_editor), button,
FALSE, FALSE, 0);
gtk_widget_show (button);
-
- return object;
}
static void
diff --git a/app/widgets/gimptranslationstore.c b/app/widgets/gimptranslationstore.c
index f56c10b..1c01ff1 100644
--- a/app/widgets/gimptranslationstore.c
+++ b/app/widgets/gimptranslationstore.c
@@ -46,19 +46,17 @@ struct _GimpTranslationStore
};
-static GObject * gimp_translation_store_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_translation_store_constructed (GObject *object);
-static void gimp_translation_store_add (GimpLanguageStore *store,
- const gchar *lang,
- const gchar *code);
+static void gimp_translation_store_add (GimpLanguageStore *store,
+ const gchar *lang,
+ const gchar *code);
-static void gimp_translation_store_populate (GimpTranslationStore *store);
+static void gimp_translation_store_populate (GimpTranslationStore *store);
-G_DEFINE_TYPE (GimpTranslationStore,
- gimp_translation_store, GIMP_TYPE_LANGUAGE_STORE)
+G_DEFINE_TYPE (GimpTranslationStore, gimp_translation_store,
+ GIMP_TYPE_LANGUAGE_STORE)
#define parent_class gimp_translation_store_parent_class
@@ -69,7 +67,7 @@ gimp_translation_store_class_init (GimpTranslationStoreClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpLanguageStoreClass *store_class = GIMP_LANGUAGE_STORE_CLASS (klass);
- object_class->constructor = gimp_translation_store_constructor;
+ object_class->constructed = gimp_translation_store_constructed;
store_class->add = gimp_translation_store_add;
}
@@ -82,17 +80,14 @@ gimp_translation_store_init (GimpTranslationStore *store)
(GDestroyNotify) g_free);
}
-static GObject *
-gimp_translation_store_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_translation_store_constructed (GObject *object)
{
- GimpTranslationStore *store;
- GObject *object;
+ GimpTranslationStore *store = GIMP_TRANSLATION_STORE (object);
gchar *label;
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
- store = GIMP_TRANSLATION_STORE (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_translation_store_populate (store);
@@ -108,8 +103,6 @@ gimp_translation_store_constructor (GType type,
GIMP_LANGUAGE_STORE_CLASS (parent_class)->add (GIMP_LANGUAGE_STORE (store),
label, "en_US");
g_free (label);
-
- return object;
}
static const gchar *
diff --git a/app/widgets/gimpuimanager.c b/app/widgets/gimpuimanager.c
index 65737a7..55bb8de 100644
--- a/app/widgets/gimpuimanager.c
+++ b/app/widgets/gimpuimanager.c
@@ -59,9 +59,7 @@ enum
};
-static GObject * gimp_ui_manager_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_ui_manager_constructed (GObject *object);
static void gimp_ui_manager_dispose (GObject *object);
static void gimp_ui_manager_finalize (GObject *object);
static void gimp_ui_manager_set_property (GObject *object,
@@ -128,7 +126,7 @@ gimp_ui_manager_class_init (GimpUIManagerClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkUIManagerClass *manager_class = GTK_UI_MANAGER_CLASS (klass);
- object_class->constructor = gimp_ui_manager_constructor;
+ object_class->constructed = gimp_ui_manager_constructed;
object_class->dispose = gimp_ui_manager_dispose;
object_class->finalize = gimp_ui_manager_finalize;
object_class->set_property = gimp_ui_manager_set_property;
@@ -195,17 +193,13 @@ gimp_ui_manager_init (GimpUIManager *manager)
manager->gimp = NULL;
}
-static GObject *
-gimp_ui_manager_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_ui_manager_constructed (GObject *object)
{
- GObject *object;
- GimpUIManager *manager;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpUIManager *manager = GIMP_UI_MANAGER (object);
- manager = GIMP_UI_MANAGER (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
if (manager->name)
{
@@ -221,8 +215,6 @@ gimp_ui_manager_constructor (GType type,
g_hash_table_replace (manager_class->managers,
g_strdup (manager->name), list);
}
-
- return object;
}
static void
diff --git a/app/widgets/gimpundoeditor.c b/app/widgets/gimpundoeditor.c
index 435a5a2..0b6baa0 100644
--- a/app/widgets/gimpundoeditor.c
+++ b/app/widgets/gimpundoeditor.c
@@ -51,32 +51,30 @@ enum
static void gimp_undo_editor_docked_iface_init (GimpDockedInterface *iface);
-static GObject * gimp_undo_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
-static void gimp_undo_editor_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
+static void gimp_undo_editor_constructed (GObject *object);
+static void gimp_undo_editor_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
-static void gimp_undo_editor_set_image (GimpImageEditor *editor,
- GimpImage *image);
+static void gimp_undo_editor_set_image (GimpImageEditor *editor,
+ GimpImage *image);
-static void gimp_undo_editor_set_context (GimpDocked *docked,
- GimpContext *context);
+static void gimp_undo_editor_set_context (GimpDocked *docked,
+ GimpContext *context);
-static void gimp_undo_editor_fill (GimpUndoEditor *editor);
-static void gimp_undo_editor_clear (GimpUndoEditor *editor);
+static void gimp_undo_editor_fill (GimpUndoEditor *editor);
+static void gimp_undo_editor_clear (GimpUndoEditor *editor);
-static void gimp_undo_editor_undo_event (GimpImage *image,
- GimpUndoEvent event,
- GimpUndo *undo,
- GimpUndoEditor *editor);
+static void gimp_undo_editor_undo_event (GimpImage *image,
+ GimpUndoEvent event,
+ GimpUndo *undo,
+ GimpUndoEditor *editor);
-static void gimp_undo_editor_select_item (GimpContainerView *view,
- GimpUndo *undo,
- gpointer insert_data,
- GimpUndoEditor *editor);
+static void gimp_undo_editor_select_item (GimpContainerView *view,
+ GimpUndo *undo,
+ gpointer insert_data,
+ GimpUndoEditor *editor);
G_DEFINE_TYPE_WITH_CODE (GimpUndoEditor, gimp_undo_editor,
@@ -95,7 +93,7 @@ gimp_undo_editor_class_init (GimpUndoEditorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpImageEditorClass *image_editor_class = GIMP_IMAGE_EDITOR_CLASS (klass);
- object_class->constructor = gimp_undo_editor_constructor;
+ object_class->constructed = gimp_undo_editor_constructed;
object_class->set_property = gimp_undo_editor_set_property;
image_editor_class->set_image = gimp_undo_editor_set_image;
@@ -125,17 +123,13 @@ gimp_undo_editor_init (GimpUndoEditor *undo_editor)
{
}
-static GObject *
-gimp_undo_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_undo_editor_constructed (GObject *object)
{
- GimpUndoEditor *undo_editor;
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ GimpUndoEditor *undo_editor = GIMP_UNDO_EDITOR (object);
- undo_editor = GIMP_UNDO_EDITOR (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
undo_editor->view = gimp_container_tree_view_new (NULL, NULL,
undo_editor->view_size,
@@ -159,8 +153,6 @@ gimp_undo_editor_constructor (GType type,
undo_editor->clear_button =
gimp_editor_add_action_button (GIMP_EDITOR (undo_editor), "edit",
"edit-undo-clear", NULL);
-
- return object;
}
static void
diff --git a/app/widgets/gimpvectorstreeview.c b/app/widgets/gimpvectorstreeview.c
index 56df880..0e943b5 100644
--- a/app/widgets/gimpvectorstreeview.c
+++ b/app/widgets/gimpvectorstreeview.c
@@ -50,9 +50,8 @@
static void gimp_vectors_tree_view_view_iface_init (GimpContainerViewInterface *iface);
-static GObject * gimp_vectors_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
+static void gimp_vectors_tree_view_constructed (GObject *object);
+
static void gimp_vectors_tree_view_set_container (GimpContainerView *view,
GimpContainer *container);
static void gimp_vectors_tree_view_drop_svg (GimpContainerTreeView *tree_view,
@@ -61,7 +60,7 @@ static void gimp_vectors_tree_view_drop_svg (GimpContainerTreeView
GimpViewable *dest_viewable,
GtkTreeViewDropPosition drop_pos);
static GimpItem * gimp_vectors_tree_view_item_new (GimpImage *image);
-static guchar * gimp_vectors_tree_view_drag_svg (GtkWidget *widget,
+static guchar * gimp_vectors_tree_view_drag_svg (GtkWidget *widget,
gsize *svg_data_len,
gpointer data);
@@ -83,7 +82,7 @@ gimp_vectors_tree_view_class_init (GimpVectorsTreeViewClass *klass)
GimpContainerTreeViewClass *view_class = GIMP_CONTAINER_TREE_VIEW_CLASS (klass);
GimpItemTreeViewClass *iv_class = GIMP_ITEM_TREE_VIEW_CLASS (klass);
- object_class->constructor = gimp_vectors_tree_view_constructor;
+ object_class->constructed = gimp_vectors_tree_view_constructed;
view_class->drop_svg = gimp_vectors_tree_view_drop_svg;
@@ -125,21 +124,15 @@ gimp_vectors_tree_view_init (GimpVectorsTreeView *view)
{
}
-static GObject *
-gimp_vectors_tree_view_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
+static void
+gimp_vectors_tree_view_constructed (GObject *object)
{
- GObject *object;
- GimpEditor *editor;
- GimpContainerTreeView *tree_view;
- GimpVectorsTreeView *view;
+ GimpEditor *editor = GIMP_EDITOR (object);
+ GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (object);
+ GimpVectorsTreeView *view = GIMP_VECTORS_TREE_VIEW (object);
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- editor = GIMP_EDITOR (object);
- tree_view = GIMP_CONTAINER_TREE_VIEW (object);
- view = GIMP_VECTORS_TREE_VIEW (object);
+ if (G_OBJECT_CLASS (parent_class)->constructed)
+ G_OBJECT_CLASS (parent_class)->constructed (object);
/* hide basically useless edit button */
gtk_widget_hide (gimp_item_tree_view_get_edit_button (GIMP_ITEM_TREE_VIEW (view)));
@@ -182,8 +175,6 @@ gimp_vectors_tree_view_constructor (GType type,
view->stroke_button, 7);
gimp_dnd_svg_dest_add (GTK_WIDGET (tree_view->view), NULL, view);
-
- return object;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]