openbsd-ports/x11/gnome/nautilus/patches/patch-src_nautilus-window_c
2011-09-12 07:28:52 +00:00

48 lines
1.4 KiB
Plaintext

$OpenBSD: patch-src_nautilus-window_c,v 1.1 2011/09/12 07:28:53 jasper Exp $
From 3caf41765453c3c4cf9a73aae87b185d099598f9 Mon Sep 17 00:00:00 2001
From: Antoine Jacoutot <ajacoutot@openbsd.org>
Date: Mon, 20 Jun 2011 16:34:47 +0000
Subject: Turn nautilus_window_close() into a virtual method.
--- src/nautilus-window.c.orig Mon May 23 22:56:59 2011
+++ src/nautilus-window.c Tue Jul 26 08:55:15 2011
@@ -868,11 +868,7 @@ nautilus_window_save_geometry (NautilusWindow *window)
void
nautilus_window_close (NautilusWindow *window)
{
- g_return_if_fail (NAUTILUS_IS_WINDOW (window));
-
- nautilus_window_save_geometry (window);
-
- gtk_widget_destroy (GTK_WIDGET (window));
+ NAUTILUS_WINDOW_CLASS (G_OBJECT_GET_CLASS (window))->close (window);
}
NautilusWindowSlot *
@@ -2064,6 +2060,16 @@ real_get_icon (NautilusWindow *window,
}
static void
+real_window_close (NautilusWindow *window)
+{
+ g_return_if_fail (NAUTILUS_IS_WINDOW (window));
+
+ nautilus_window_save_geometry (window);
+
+ gtk_widget_destroy (GTK_WIDGET (window));
+}
+
+static void
nautilus_window_class_init (NautilusWindowClass *class)
{
GtkBindingSet *binding_set;
@@ -2087,6 +2093,7 @@ nautilus_window_class_init (NautilusWindowClass *class
class->window_type = NAUTILUS_WINDOW_NAVIGATION;
class->bookmarks_placeholder = MENU_PATH_BOOKMARKS_PLACEHOLDER;
class->get_icon = real_get_icon;
+ class->close = real_window_close;
properties[PROP_APP] =
g_param_spec_object ("app",