[gimp] app: implement GObject::dispose() instead of GtkObject::destroy()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: implement GObject::dispose() instead of GtkObject::destroy()
- Date: Fri, 15 Oct 2010 12:08:52 +0000 (UTC)
commit b69eea8cd6f37a9895553c28d188f30ee6b0fe8f
Author: Michael Natterer <mitch gimp org>
Date: Fri Oct 15 14:08:36 2010 +0200
app: implement GObject::dispose() instead of GtkObject::destroy()
app/widgets/gimpdock.c | 33 +++++++-------
app/widgets/gimpdockable.c | 91 +++++++++++++++++++-------------------
app/widgets/gimpeditor.c | 75 +++++++++++++++----------------
app/widgets/gimperrorconsole.c | 14 +++---
app/widgets/gimpfgbgeditor.c | 56 +++++++++++------------
app/widgets/gimpfgbgview.c | 32 ++++++-------
app/widgets/gimpfiledialog.c | 11 +++--
app/widgets/gimpgradienteditor.c | 16 +++----
app/widgets/gimpimageeditor.c | 12 +++--
app/widgets/gimpitemtreeview.c | 15 +++----
10 files changed, 174 insertions(+), 181 deletions(-)
---
diff --git a/app/widgets/gimpdock.c b/app/widgets/gimpdock.c
index 1226f90..c317420 100644
--- a/app/widgets/gimpdock.c
+++ b/app/widgets/gimpdock.c
@@ -70,9 +70,10 @@ struct _GimpDockPrivate
};
+static void gimp_dock_dispose (GObject *object);
+
static void gimp_dock_style_set (GtkWidget *widget,
GtkStyle *prev_style);
-static void gimp_dock_destroy (GtkObject *object);
static gchar * gimp_dock_real_get_description (GimpDock *dock,
gboolean complete);
static void gimp_dock_real_book_added (GimpDock *dock,
@@ -96,8 +97,8 @@ static guint dock_signals[LAST_SIGNAL] = { 0 };
static void
gimp_dock_class_init (GimpDockClass *klass)
{
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
dock_signals[BOOK_ADDED] =
g_signal_new ("book-added",
@@ -137,7 +138,7 @@ gimp_dock_class_init (GimpDockClass *klass)
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- gtk_object_class->destroy = gimp_dock_destroy;
+ object_class->dispose = gimp_dock_dispose;
widget_class->style_set = gimp_dock_style_set;
@@ -177,7 +178,7 @@ gimp_dock_init (GimpDock *dock)
dock->p->temp_vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (dock), dock->p->temp_vbox);
/* Never show it */
-
+
dock->p->main_vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (dock), dock->p->main_vbox);
gtk_widget_show (dock->p->main_vbox);
@@ -191,6 +192,17 @@ gimp_dock_init (GimpDock *dock)
}
static void
+gimp_dock_dispose (GObject *object)
+{
+ GimpDock *dock = GIMP_DOCK (object);
+
+ while (dock->p->dockbooks)
+ gimp_dock_remove_book (dock, GIMP_DOCKBOOK (dock->p->dockbooks->data));
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
gimp_dock_style_set (GtkWidget *widget,
GtkStyle *prev_style)
{
@@ -239,17 +251,6 @@ gimp_dock_style_set (GtkWidget *widget,
}
}
-static void
-gimp_dock_destroy (GtkObject *object)
-{
- GimpDock *dock = GIMP_DOCK (object);
-
- while (dock->p->dockbooks)
- gimp_dock_remove_book (dock, GIMP_DOCKBOOK (dock->p->dockbooks->data));
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
static gchar *
gimp_dock_real_get_description (GimpDock *dock,
gboolean complete)
diff --git a/app/widgets/gimpdockable.c b/app/widgets/gimpdockable.c
index 5b8facf..f31c1be 100644
--- a/app/widgets/gimpdockable.c
+++ b/app/widgets/gimpdockable.c
@@ -80,6 +80,7 @@ struct _GimpDockablePrivate
};
+static void gimp_dockable_dispose (GObject *object);
static void gimp_dockable_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -88,7 +89,7 @@ static void gimp_dockable_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void gimp_dockable_destroy (GtkObject *object);
+
static void gimp_dockable_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gimp_dockable_size_allocate (GtkWidget *widget,
@@ -129,16 +130,14 @@ static const GtkTargetEntry dialog_target_table[] = { GIMP_TARGET_DIALOG };
static void
gimp_dockable_class_init (GimpDockableClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
+ object_class->dispose = gimp_dockable_dispose;
object_class->set_property = gimp_dockable_set_property;
object_class->get_property = gimp_dockable_get_property;
- gtk_object_class->destroy = gimp_dockable_destroy;
-
widget_class->size_request = gimp_dockable_size_request;
widget_class->size_allocate = gimp_dockable_size_allocate;
widget_class->style_set = gimp_dockable_style_set;
@@ -183,6 +182,45 @@ gimp_dockable_init (GimpDockable *dockable)
}
static void
+gimp_dockable_dispose (GObject *object)
+{
+ GimpDockable *dockable = GIMP_DOCKABLE (object);
+
+ gimp_dockable_blink_cancel (dockable);
+
+ if (dockable->p->context)
+ gimp_dockable_set_context (dockable, NULL);
+
+ if (dockable->p->blurb)
+ {
+ if (dockable->p->blurb != dockable->p->name)
+ g_free (dockable->p->blurb);
+
+ dockable->p->blurb = NULL;
+ }
+
+ if (dockable->p->name)
+ {
+ g_free (dockable->p->name);
+ dockable->p->name = NULL;
+ }
+
+ if (dockable->p->stock_id)
+ {
+ g_free (dockable->p->stock_id);
+ dockable->p->stock_id = NULL;
+ }
+
+ if (dockable->p->help_id)
+ {
+ g_free (dockable->p->help_id);
+ dockable->p->help_id = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
gimp_dockable_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -221,45 +259,6 @@ gimp_dockable_get_property (GObject *object,
}
static void
-gimp_dockable_destroy (GtkObject *object)
-{
- GimpDockable *dockable = GIMP_DOCKABLE (object);
-
- gimp_dockable_blink_cancel (dockable);
-
- if (dockable->p->context)
- gimp_dockable_set_context (dockable, NULL);
-
- if (dockable->p->blurb)
- {
- if (dockable->p->blurb != dockable->p->name)
- g_free (dockable->p->blurb);
-
- dockable->p->blurb = NULL;
- }
-
- if (dockable->p->name)
- {
- g_free (dockable->p->name);
- dockable->p->name = NULL;
- }
-
- if (dockable->p->stock_id)
- {
- g_free (dockable->p->stock_id);
- dockable->p->stock_id = NULL;
- }
-
- if (dockable->p->help_id)
- {
- g_free (dockable->p->help_id);
- dockable->p->help_id = NULL;
- }
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-static void
gimp_dockable_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
diff --git a/app/widgets/gimpeditor.c b/app/widgets/gimpeditor.c
index 027a36d..3f20ef3 100644
--- a/app/widgets/gimpeditor.c
+++ b/app/widgets/gimpeditor.c
@@ -59,6 +59,7 @@ 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,
@@ -67,7 +68,7 @@ static void gimp_editor_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void gimp_editor_destroy (GtkObject *object);
+
static void gimp_editor_style_set (GtkWidget *widget,
GtkStyle *prev_style);
@@ -93,16 +94,14 @@ G_DEFINE_TYPE_WITH_CODE (GimpEditor, gimp_editor, GTK_TYPE_VBOX,
static void
gimp_editor_class_init (GimpEditorClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->constructor = gimp_editor_constructor;
+ object_class->dispose = gimp_editor_dispose;
object_class->set_property = gimp_editor_set_property;
object_class->get_property = gimp_editor_get_property;
- gtk_object_class->destroy = gimp_editor_destroy;
-
widget_class->style_set = gimp_editor_style_set;
g_object_class_install_property (object_class, PROP_MENU_FACTORY,
@@ -235,6 +234,38 @@ gimp_editor_constructor (GType type,
}
static void
+gimp_editor_dispose (GObject *object)
+{
+ GimpEditor *editor = GIMP_EDITOR (object);
+
+ if (editor->menu_factory)
+ {
+ g_object_unref (editor->menu_factory);
+ editor->menu_factory = NULL;
+ }
+
+ if (editor->menu_identifier)
+ {
+ g_free (editor->menu_identifier);
+ editor->menu_identifier = NULL;
+ }
+
+ if (editor->ui_manager)
+ {
+ g_object_unref (editor->ui_manager);
+ editor->ui_manager = NULL;
+ }
+
+ if (editor->ui_path)
+ {
+ g_free (editor->ui_path);
+ editor->ui_path = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
gimp_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -311,38 +342,6 @@ gimp_editor_get_property (GObject *object,
}
static void
-gimp_editor_destroy (GtkObject *object)
-{
- GimpEditor *editor = GIMP_EDITOR (object);
-
- if (editor->menu_factory)
- {
- g_object_unref (editor->menu_factory);
- editor->menu_factory = NULL;
- }
-
- if (editor->menu_identifier)
- {
- g_free (editor->menu_identifier);
- editor->menu_identifier = NULL;
- }
-
- if (editor->ui_manager)
- {
- g_object_unref (editor->ui_manager);
- editor->ui_manager = NULL;
- }
-
- if (editor->ui_path)
- {
- g_free (editor->ui_path);
- editor->ui_path = NULL;
- }
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-static void
gimp_editor_style_set (GtkWidget *widget,
GtkStyle *prev_style)
{
diff --git a/app/widgets/gimperrorconsole.c b/app/widgets/gimperrorconsole.c
index d55ba7f..429667a 100644
--- a/app/widgets/gimperrorconsole.c
+++ b/app/widgets/gimperrorconsole.c
@@ -43,8 +43,8 @@
static GObject * gimp_error_console_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
+static void gimp_error_console_dispose (GObject *object);
-static void gimp_error_console_destroy (GtkObject *object);
static void gimp_error_console_unmap (GtkWidget *widget);
static gboolean gimp_error_console_button_press (GtkWidget *widget,
@@ -60,12 +60,12 @@ G_DEFINE_TYPE (GimpErrorConsole, gimp_error_console, GIMP_TYPE_EDITOR)
static void
gimp_error_console_class_init (GimpErrorConsoleClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->constructor = gimp_error_console_constructor;
- gtk_object_class->destroy = gimp_error_console_destroy;
+ object_class->dispose = gimp_error_console_dispose;
+
widget_class->unmap = gimp_error_console_unmap;
}
@@ -133,7 +133,7 @@ gimp_error_console_constructor (GType type,
}
static void
-gimp_error_console_destroy (GtkObject *object)
+gimp_error_console_dispose (GObject *object)
{
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (object);
@@ -142,7 +142,7 @@ gimp_error_console_destroy (GtkObject *object)
console->gimp->message_handler = GIMP_MESSAGE_BOX;
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
diff --git a/app/widgets/gimpfgbgeditor.c b/app/widgets/gimpfgbgeditor.c
index ae5c6b9..bf49aed 100644
--- a/app/widgets/gimpfgbgeditor.c
+++ b/app/widgets/gimpfgbgeditor.c
@@ -59,6 +59,7 @@ typedef enum
} FgBgTarget;
+static void gimp_fg_bg_editor_dispose (GObject *object);
static void gimp_fg_bg_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -68,7 +69,6 @@ static void gimp_fg_bg_editor_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
-static void gimp_fg_bg_editor_destroy (GtkObject *object);
static gboolean gimp_fg_bg_editor_expose (GtkWidget *widget,
GdkEventExpose *eevent);
static gboolean gimp_fg_bg_editor_button_press (GtkWidget *widget,
@@ -101,9 +101,8 @@ static guint editor_signals[LAST_SIGNAL] = { 0 };
static void
gimp_fg_bg_editor_class_init (GimpFgBgEditorClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
editor_signals[COLOR_CLICKED] =
g_signal_new ("color-clicked",
@@ -115,11 +114,10 @@ gimp_fg_bg_editor_class_init (GimpFgBgEditorClass *klass)
G_TYPE_NONE, 1,
GIMP_TYPE_ACTIVE_COLOR);
+ object_class->dispose = gimp_fg_bg_editor_dispose;
object_class->set_property = gimp_fg_bg_editor_set_property;
object_class->get_property = gimp_fg_bg_editor_get_property;
- gtk_object_class->destroy = gimp_fg_bg_editor_destroy;
-
widget_class->expose_event = gimp_fg_bg_editor_expose;
widget_class->button_press_event = gimp_fg_bg_editor_button_press;
widget_class->button_release_event = gimp_fg_bg_editor_button_release;
@@ -156,6 +154,29 @@ gimp_fg_bg_editor_init (GimpFgBgEditor *editor)
}
static void
+gimp_fg_bg_editor_dispose (GObject *object)
+{
+ GimpFgBgEditor *editor = GIMP_FG_BG_EDITOR (object);
+
+ if (editor->context)
+ gimp_fg_bg_editor_set_context (editor, NULL);
+
+ if (editor->default_icon)
+ {
+ g_object_unref (editor->default_icon);
+ editor->default_icon = NULL;
+ }
+
+ if (editor->swap_icon)
+ {
+ g_object_unref (editor->swap_icon);
+ editor->swap_icon = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
gimp_fg_bg_editor_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -199,29 +220,6 @@ gimp_fg_bg_editor_get_property (GObject *object,
}
}
-static void
-gimp_fg_bg_editor_destroy (GtkObject *object)
-{
- GimpFgBgEditor *editor = GIMP_FG_BG_EDITOR (object);
-
- if (editor->context)
- gimp_fg_bg_editor_set_context (editor, NULL);
-
- if (editor->default_icon)
- {
- g_object_unref (editor->default_icon);
- editor->default_icon = NULL;
- }
-
- if (editor->swap_icon)
- {
- g_object_unref (editor->swap_icon);
- editor->swap_icon = NULL;
- }
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
static gboolean
gimp_fg_bg_editor_expose (GtkWidget *widget,
GdkEventExpose *eevent)
diff --git a/app/widgets/gimpfgbgview.c b/app/widgets/gimpfgbgview.c
index 686ac1d..34c83f1 100644
--- a/app/widgets/gimpfgbgview.c
+++ b/app/widgets/gimpfgbgview.c
@@ -43,6 +43,7 @@ enum
};
+static void gimp_fg_bg_view_dispose (GObject *object);
static void gimp_fg_bg_view_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -52,7 +53,6 @@ static void gimp_fg_bg_view_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
-static void gimp_fg_bg_view_destroy (GtkObject *object);
static gboolean gimp_fg_bg_view_expose (GtkWidget *widget,
GdkEventExpose *eevent);
@@ -65,15 +65,13 @@ G_DEFINE_TYPE (GimpFgBgView, gimp_fg_bg_view, GTK_TYPE_WIDGET)
static void
gimp_fg_bg_view_class_init (GimpFgBgViewClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ object_class->dispose = gimp_fg_bg_view_dispose;
object_class->set_property = gimp_fg_bg_view_set_property;
object_class->get_property = gimp_fg_bg_view_get_property;
- gtk_object_class->destroy = gimp_fg_bg_view_destroy;
-
widget_class->expose_event = gimp_fg_bg_view_expose;
g_object_class_install_property (object_class, PROP_CONTEXT,
@@ -92,6 +90,17 @@ gimp_fg_bg_view_init (GimpFgBgView *view)
}
static void
+gimp_fg_bg_view_dispose (GObject *object)
+{
+ GimpFgBgView *view = GIMP_FG_BG_VIEW (object);
+
+ if (view->context)
+ gimp_fg_bg_view_set_context (view, NULL);
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
gimp_fg_bg_view_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -131,17 +140,6 @@ gimp_fg_bg_view_get_property (GObject *object,
}
}
-static void
-gimp_fg_bg_view_destroy (GtkObject *object)
-{
- GimpFgBgView *view = GIMP_FG_BG_VIEW (object);
-
- if (view->context)
- gimp_fg_bg_view_set_context (view, NULL);
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
static gboolean
gimp_fg_bg_view_expose (GtkWidget *widget,
GdkEventExpose *eevent)
diff --git a/app/widgets/gimpfiledialog.c b/app/widgets/gimpfiledialog.c
index 554c35b..fae91d7 100644
--- a/app/widgets/gimpfiledialog.c
+++ b/app/widgets/gimpfiledialog.c
@@ -68,7 +68,8 @@ struct _GimpFileDialogState
static void gimp_file_dialog_progress_iface_init (GimpProgressInterface *iface);
-static void gimp_file_dialog_destroy (GtkObject *object);
+static void gimp_file_dialog_dispose (GObject *object);
+
static gboolean gimp_file_dialog_delete_event (GtkWidget *widget,
GdkEventAny *event);
static void gimp_file_dialog_response (GtkDialog *dialog,
@@ -135,11 +136,11 @@ G_DEFINE_TYPE_WITH_CODE (GimpFileDialog, gimp_file_dialog,
static void
gimp_file_dialog_class_init (GimpFileDialogClass *klass)
{
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkDialogClass *dialog_class = GTK_DIALOG_CLASS (klass);
- object_class->destroy = gimp_file_dialog_destroy;
+ object_class->dispose = gimp_file_dialog_dispose;
widget_class->delete_event = gimp_file_dialog_delete_event;
@@ -165,11 +166,11 @@ gimp_file_dialog_progress_iface_init (GimpProgressInterface *iface)
}
static void
-gimp_file_dialog_destroy (GtkObject *object)
+gimp_file_dialog_dispose (GObject *object)
{
GimpFileDialog *dialog = GIMP_FILE_DIALOG (object);
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
dialog->progress = NULL;
}
diff --git a/app/widgets/gimpgradienteditor.c b/app/widgets/gimpgradienteditor.c
index ae02370..a5fe306 100644
--- a/app/widgets/gimpgradienteditor.c
+++ b/app/widgets/gimpgradienteditor.c
@@ -108,8 +108,8 @@ 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_dispose (GObject *object);
-static void gimp_gradient_editor_destroy (GtkObject *object);
static void gimp_gradient_editor_unmap (GtkWidget *widget);
static void gimp_gradient_editor_set_data (GimpDataEditor *editor,
GimpData *data);
@@ -260,14 +260,12 @@ static GimpDockedInterface *parent_docked_iface = NULL;
static void
gimp_gradient_editor_class_init (GimpGradientEditorClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- GimpDataEditorClass *editor_class = GIMP_DATA_EDITOR_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GimpDataEditorClass *editor_class = GIMP_DATA_EDITOR_CLASS (klass);
object_class->constructor = gimp_gradient_editor_constructor;
-
- gtk_object_class->destroy = gimp_gradient_editor_destroy;
+ object_class->dispose = gimp_gradient_editor_dispose;
widget_class->unmap = gimp_gradient_editor_unmap;
@@ -473,7 +471,7 @@ gimp_gradient_editor_constructor (GType type,
}
static void
-gimp_gradient_editor_destroy (GtkObject *object)
+gimp_gradient_editor_dispose (GObject *object)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (object);
@@ -481,7 +479,7 @@ gimp_gradient_editor_destroy (GtkObject *object)
gtk_dialog_response (GTK_DIALOG (editor->color_dialog),
GTK_RESPONSE_CANCEL);
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
diff --git a/app/widgets/gimpimageeditor.c b/app/widgets/gimpimageeditor.c
index bc17fb3..4f6bb9e 100644
--- a/app/widgets/gimpimageeditor.c
+++ b/app/widgets/gimpimageeditor.c
@@ -34,7 +34,9 @@ static void gimp_image_editor_docked_iface_init (GimpDockedInterface *iface);
static void gimp_image_editor_set_context (GimpDocked *docked,
GimpContext *context);
-static void gimp_image_editor_destroy (GtkObject *object);
+
+static void gimp_image_editor_dispose (GObject *object);
+
static void gimp_image_editor_real_set_image (GimpImageEditor *editor,
GimpImage *image);
static void gimp_image_editor_image_flush (GimpImage *image,
@@ -52,9 +54,9 @@ G_DEFINE_TYPE_WITH_CODE (GimpImageEditor, gimp_image_editor, GIMP_TYPE_EDITOR,
static void
gimp_image_editor_class_init (GimpImageEditorClass *klass)
{
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->destroy = gimp_image_editor_destroy;
+ object_class->dispose = gimp_image_editor_dispose;
klass->set_image = gimp_image_editor_real_set_image;
}
@@ -100,14 +102,14 @@ gimp_image_editor_set_context (GimpDocked *docked,
}
static void
-gimp_image_editor_destroy (GtkObject *object)
+gimp_image_editor_dispose (GObject *object)
{
GimpImageEditor *editor = GIMP_IMAGE_EDITOR (object);
if (editor->image)
gimp_image_editor_set_image (editor, NULL);
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
diff --git a/app/widgets/gimpitemtreeview.c b/app/widgets/gimpitemtreeview.c
index cb941d0..dcb7f81 100644
--- a/app/widgets/gimpitemtreeview.c
+++ b/app/widgets/gimpitemtreeview.c
@@ -100,8 +100,7 @@ static void gimp_item_tree_view_docked_iface_init (GimpDockedInterface *docked
static GObject * gimp_item_tree_view_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
-
-static void gimp_item_tree_view_destroy (GtkObject *object);
+static void gimp_item_tree_view_dispose (GObject *object);
static void gimp_item_tree_view_style_set (GtkWidget *widget,
GtkStyle *prev_style);
@@ -221,9 +220,8 @@ static guint view_signals[LAST_SIGNAL] = { 0 };
static void
gimp_item_tree_view_class_init (GimpItemTreeViewClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GimpContainerTreeViewClass *tree_view_class;
tree_view_class = GIMP_CONTAINER_TREE_VIEW_CLASS (klass);
@@ -239,8 +237,7 @@ gimp_item_tree_view_class_init (GimpItemTreeViewClass *klass)
GIMP_TYPE_OBJECT);
object_class->constructor = gimp_item_tree_view_constructor;
-
- gtk_object_class->destroy = gimp_item_tree_view_destroy;
+ object_class->dispose = gimp_item_tree_view_dispose;
widget_class->style_set = gimp_item_tree_view_style_set;
@@ -488,14 +485,14 @@ gimp_item_tree_view_constructor (GType type,
}
static void
-gimp_item_tree_view_destroy (GtkObject *object)
+gimp_item_tree_view_dispose (GObject *object)
{
GimpItemTreeView *view = GIMP_ITEM_TREE_VIEW (object);
if (view->priv->image)
gimp_item_tree_view_set_image (view, NULL);
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]