Commit 202124c4 authored by Michael Natterer's avatar Michael Natterer 😴

app: implement GObject::constructed() instead of ::constructor()

parent 0a1a2915
......@@ -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)
{
......
......@@ -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
......
......@@ -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
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -446,31 +463,6 @@ gimp_controller_editor_get_property (GObject *object,
</