summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2002-01-15 20:17:20 +0000
committerDarin Adler <darin@src.gnome.org>2002-01-15 20:17:20 +0000
commit10d829132102fe34cc32a27d5867caa366f8356b (patch)
treed62b6b78526c7511444d85ddbe6ede797264325a
parent79c3c2e7dec88477f73aff6db24964f947d5636f (diff)
downloadnautilus-10d829132102fe34cc32a27d5867caa366f8356b.tar.gz
Fix another of those double-destroy problems by turning a destroy into a
* src/nautilus-desktop-window.c: (finalize), (nautilus_desktop_window_class_init): Fix another of those double-destroy problems by turning a destroy into a finalize.
-rw-r--r--ChangeLog7
-rw-r--r--src/nautilus-desktop-window.c42
2 files changed, 25 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 1257c5646..6de1056ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2002-01-15 Darin Adler <darin@bentspoon.com>
+ * src/nautilus-desktop-window.c: (finalize),
+ (nautilus_desktop_window_class_init):
+ Fix another of those double-destroy problems by turning a destroy
+ into a finalize.
+
+2002-01-15 Darin Adler <darin@bentspoon.com>
+
Inspired by a patch from Jacob Berkman <jacob@ximian.com>, got
rid of all the Makefile.am hackery so that everything ends up in
the tarball.
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index 0e67ec2c4..b793ef023 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -28,17 +28,17 @@
#include <config.h>
#include "nautilus-desktop-window.h"
+#include <X11/Xatom.h>
+#include <eel/eel-gtk-extensions.h>
+#include <eel/eel-gtk-macros.h>
+#include <gdk/gdkx.h>
+#include <gtk/gtklayout.h>
#include <libgnome/gnome-i18n.h>
#include <libgnomevfs/gnome-vfs-find-directory.h>
#include <libgnomevfs/gnome-vfs-uri.h>
#include <libgnomevfs/gnome-vfs-utils.h>
-#include <eel/eel-gtk-macros.h>
-#include <eel/eel-gtk-extensions.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-link.h>
-#include <X11/Xatom.h>
-#include <gdk/gdkx.h>
-#include <gtk/gtklayout.h>
struct NautilusDesktopWindowDetails {
GList *unref_list;
@@ -46,27 +46,11 @@ struct NautilusDesktopWindowDetails {
static void nautilus_desktop_window_class_init (NautilusDesktopWindowClass *klass);
static void nautilus_desktop_window_init (NautilusDesktopWindow *window);
-static void destroy (GtkObject *object);
-static void realize (GtkWidget *widget);
-static void map (GtkWidget *widget);
-static void real_add_current_location_to_history_list (NautilusWindow *window);
-
-
-static void set_wmspec_desktop_hint (GdkWindow *window);
+static void set_wmspec_desktop_hint (GdkWindow *window);
EEL_CLASS_BOILERPLATE (NautilusDesktopWindow, nautilus_desktop_window, NAUTILUS_TYPE_WINDOW)
static void
-nautilus_desktop_window_class_init (NautilusDesktopWindowClass *klass)
-{
- GTK_OBJECT_CLASS (klass)->destroy = destroy;
- GTK_WIDGET_CLASS (klass)->realize = realize;
- GTK_WIDGET_CLASS (klass)->map = map;
- NAUTILUS_WINDOW_CLASS (klass)->add_current_location_to_history_list
- = real_add_current_location_to_history_list;
-}
-
-static void
nautilus_desktop_window_init (NautilusDesktopWindow *window)
{
window->details = g_new0 (NautilusDesktopWindowDetails, 1);
@@ -148,7 +132,7 @@ nautilus_desktop_window_new (NautilusApplication *application)
}
static void
-destroy (GtkObject *object)
+finalize (GObject *object)
{
NautilusDesktopWindow *window;
@@ -159,7 +143,7 @@ destroy (GtkObject *object)
eel_gtk_object_list_free (window->details->unref_list);
g_free (window->details);
- EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
+ EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
}
static void
@@ -318,3 +302,13 @@ set_wmspec_desktop_hint (GdkWindow *window)
XA_ATOM, 32, PropModeReplace,
(guchar *)&atom, 1);
}
+
+static void
+nautilus_desktop_window_class_init (NautilusDesktopWindowClass *klass)
+{
+ G_OBJECT_CLASS (klass)->finalize = finalize;
+ GTK_WIDGET_CLASS (klass)->realize = realize;
+ GTK_WIDGET_CLASS (klass)->map = map;
+ NAUTILUS_WINDOW_CLASS (klass)->add_current_location_to_history_list
+ = real_add_current_location_to_history_list;
+}