Turn nautilus_window_close() into a virtual method.
This commit is contained in:
parent
a0e3ce4579
commit
000edd694c
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.8 2011/07/25 10:07:43 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.9 2011/07/26 07:04:27 ajacoutot Exp $
|
||||
|
||||
COMMENT= GNOME file manager
|
||||
|
||||
@ -16,7 +16,7 @@ COMMENT= GNOME file manager
|
||||
GNOME_PROJECT= nautilus
|
||||
GNOME_VERSION= 3.0.2
|
||||
|
||||
REVISION= 2
|
||||
REVISION= 3
|
||||
|
||||
SHARED_LIBS += nautilus-extension 3.0 # 5.0
|
||||
|
||||
|
@ -1,25 +1,24 @@
|
||||
$OpenBSD: patch-src_nautilus-application_c,v 1.1 2011/06/16 12:50:49 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_nautilus-application_c,v 1.2 2011/07/26 07:04:27 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=652724
|
||||
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-application.c.orig Thu Jun 16 14:31:06 2011
|
||||
+++ src/nautilus-application.c Thu Jun 16 14:31:20 2011
|
||||
@@ -567,14 +567,16 @@ nautilus_application_close_all_windows (NautilusApplic
|
||||
NautilusWindow *window;
|
||||
|
||||
window = NAUTILUS_WINDOW (l->data);
|
||||
--- src/nautilus-application.c.orig Tue May 24 20:46:25 2011
|
||||
+++ src/nautilus-application.c Tue Jul 26 08:55:15 2011
|
||||
@@ -562,14 +562,6 @@ nautilus_application_close_all_windows (NautilusApplic
|
||||
GList *l;
|
||||
|
||||
list_copy = g_list_copy (gtk_application_get_windows (GTK_APPLICATION (self)));
|
||||
- /* First hide all window to get the feeling of quick response */
|
||||
- for (l = list_copy; l != NULL; l = l->next) {
|
||||
- NautilusWindow *window;
|
||||
-
|
||||
- window = NAUTILUS_WINDOW (l->data);
|
||||
- gtk_widget_hide (GTK_WIDGET (window));
|
||||
+ if (!NAUTILUS_IS_DESKTOP_WINDOW (window))
|
||||
+ gtk_widget_hide (GTK_WIDGET (window));
|
||||
}
|
||||
|
||||
- }
|
||||
-
|
||||
for (l = list_copy; l != NULL; l = l->next) {
|
||||
NautilusWindow *window;
|
||||
|
||||
window = NAUTILUS_WINDOW (l->data);
|
||||
- nautilus_window_close (window);
|
||||
+ if (!NAUTILUS_IS_DESKTOP_WINDOW (window))
|
||||
+ nautilus_window_close (window);
|
||||
}
|
||||
g_list_free (list_copy);
|
||||
}
|
||||
|
@ -0,0 +1,31 @@
|
||||
$OpenBSD: patch-src_nautilus-desktop-window_c,v 1.1 2011/07/26 07:04:27 ajacoutot 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-desktop-window.c.orig Mon Apr 25 19:01:26 2011
|
||||
+++ src/nautilus-desktop-window.c Tue Jul 26 08:55:15 2011
|
||||
@@ -284,6 +284,13 @@ real_sync_title (NautilusWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
+real_window_close (NautilusWindow *window)
|
||||
+{
|
||||
+ /* stub, does nothing */
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
nautilus_desktop_window_class_init (NautilusDesktopWindowClass *klass)
|
||||
{
|
||||
GtkWidgetClass *wclass = GTK_WIDGET_CLASS (klass);
|
||||
@@ -300,6 +307,7 @@ nautilus_desktop_window_class_init (NautilusDesktopWin
|
||||
nclass->window_type = NAUTILUS_WINDOW_DESKTOP;
|
||||
nclass->sync_title = real_sync_title;
|
||||
nclass->get_icon = real_get_icon;
|
||||
+ nclass->close = real_window_close;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (NautilusDesktopWindowDetails));
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
$OpenBSD: patch-src_nautilus-window_c,v 1.1 2011/07/26 07:04:27 ajacoutot 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",
|
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-src_nautilus-window_h,v 1.1 2011/07/26 07:04:27 ajacoutot 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.h.orig Fri Apr 8 22:50:39 2011
|
||||
+++ src/nautilus-window.h Tue Jul 26 08:55:15 2011
|
||||
@@ -94,6 +94,7 @@ typedef struct {
|
||||
NautilusWindowSlot *slot);
|
||||
|
||||
void (* prompt_for_location) (NautilusWindow *window, const char *initial);
|
||||
+ void (* close) (NautilusWindow *window);
|
||||
|
||||
/* Signals used only for keybindings */
|
||||
gboolean (* go_up) (NautilusWindow *window,
|
Loading…
Reference in New Issue
Block a user