From 1b0e240d97ff5cc89d5728aadba3852d521e56a5 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 4 Nov 2002 18:53:06 +0000 Subject: Removed. (impl_finalize): New. (class_init): Install finalize handler, not * e-shell-about-box.c (impl_destroy): Removed. (impl_finalize): New. (class_init): Install finalize handler, not destroy. * e-shell-view-menu.c (command_about_box): Use a GtkWindow again. Set the GTK_WINDOW_TYPE_HINT_DIALOG hint. * e-shell-about-box.c (e_shell_about_box_construct): Removed. svn path=/trunk/; revision=18534 --- shell/e-shell-about-box.c | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) (limited to 'shell/e-shell-about-box.c') diff --git a/shell/e-shell-about-box.c b/shell/e-shell-about-box.c index 22dd0a7829..49382cdf99 100644 --- a/shell/e-shell-about-box.c +++ b/shell/e-shell-about-box.c @@ -206,10 +206,10 @@ timeout_callback (void *data) } -/* GtkObject methods. */ +/* GObject methods. */ static void -impl_destroy (GtkObject *object) +impl_finalize (GObject *object) { EShellAboutBox *about_box; EShellAboutBoxPrivate *priv; @@ -217,31 +217,23 @@ impl_destroy (GtkObject *object) about_box = E_SHELL_ABOUT_BOX (object); priv = about_box->priv; - if (priv->pixmap != NULL) { + if (priv->pixmap != NULL) gdk_pixmap_unref (priv->pixmap); - priv->pixmap = NULL; - } - if (priv->text_background_pixmap != NULL) { + if (priv->text_background_pixmap != NULL) gdk_pixmap_unref (priv->text_background_pixmap); - priv->text_background_pixmap = NULL; - } - if (priv->clipped_gc != NULL) { + if (priv->clipped_gc != NULL) gdk_gc_unref (priv->clipped_gc); - priv->clipped_gc = NULL; - } - if (priv->timeout_id != -1) { + if (priv->timeout_id != -1) g_source_remove (priv->timeout_id); - priv->timeout_id = -1; - } g_free (priv->permuted_text); g_free (priv); - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + (* G_OBJECT_CLASS (parent_class)->finalize) (object); } @@ -349,13 +341,13 @@ impl_expose_event (GtkWidget *widget, static void -class_init (GtkObjectClass *object_class) +class_init (GObjectClass *object_class) { GtkWidgetClass *widget_class; parent_class = gtk_type_class (PARENT_TYPE); - object_class->destroy = impl_destroy; + object_class->finalize = impl_finalize; widget_class = GTK_WIDGET_CLASS (object_class); widget_class->size_request = impl_size_request; @@ -388,22 +380,12 @@ init (EShellAboutBox *shell_about_box) } -void -e_shell_about_box_construct (EShellAboutBox *about_box) -{ - g_return_if_fail (about_box != NULL); - g_return_if_fail (E_IS_SHELL_ABOUT_BOX (about_box)); - - /* Nothing to do here. */ -} - GtkWidget * e_shell_about_box_new (void) { EShellAboutBox *about_box; about_box = gtk_type_new (e_shell_about_box_get_type ()); - e_shell_about_box_construct (about_box); return GTK_WIDGET (about_box); } -- cgit v1.2.3