From 34cf1434015e2eaa7ae3f8104dbb8715f3b02e9e Mon Sep 17 00:00:00 2001
From: Andrea Zagli <a.zagli@comune.scandicci.fi.it>
Date: Fri, 3 Apr 2015 08:54:55 +0200
Subject: [PATCH] nautilus: nuovo pacchetto WIP.

---
 packages/mingw-w64-nautilus/001-win.patch | 203 ++++++++++++++++++++++
 1 file changed, 203 insertions(+)
 create mode 100644 packages/mingw-w64-nautilus/001-win.patch

diff --git a/packages/mingw-w64-nautilus/001-win.patch b/packages/mingw-w64-nautilus/001-win.patch
new file mode 100644
index 0000000..b90c6d5
--- /dev/null
+++ b/packages/mingw-w64-nautilus/001-win.patch
@@ -0,0 +1,203 @@
+--- ./configure.ac.orig	2015-03-27 09:14:07.734048000 +0100
++++ ./configure.ac	2015-03-27 09:22:58.935295900 +0100
+@@ -256,9 +256,7 @@
+ dnl common libs (eel, nautilus)
+ PKG_CHECK_MODULES(COMMON, [
+ 	gail-3.0
+-	gnome-desktop-3.0 >= gnome_desktop_minver
+ 	libxml-2.0 >= xml_minver
+-	x11
+ ])
+ 
+ dnl additional nautilus libs
+@@ -266,13 +264,9 @@
+ 	gthread-2.0 >= glib_minver
+ 	gmodule-no-export-2.0 >= glib_minver
+ 	gio-2.0 >= glib_minver
+-	gio-unix-2.0 >= glib_minver
+ 	gsettings-desktop-schemas >= schemas_minver
+ ])
+ 
+-dnl Multimedia keys
+-AC_CHECK_HEADERS([X11/XF86keysym.h])
+-
+ ##################################################
+ # Check for introspection
+ ##################################################
+--- ./eel/eel-gdk-extensions.c.orig	2015-03-27 09:51:14.372326000 +0100
++++ ./eel/eel-gdk-extensions.c	2015-03-27 09:52:05.503100900 +0100
+@@ -30,7 +30,6 @@
+ #include "eel-string.h"
+ #include <gdk-pixbuf/gdk-pixbuf.h>
+ #include <gdk/gdk.h>
+-#include <gdk/gdkx.h>
+ #include <stdlib.h>
+ #include <pango/pango.h>
+ 
+@@ -38,7 +37,6 @@
+ eel_gdk_parse_geometry (const char *string, int *x_return, int *y_return,
+ 			     guint *width_return, guint *height_return)
+ {
+-	int x11_flags;
+ 	EelGdkGeometryFlags gdk_flags;
+ 
+ 	g_return_val_if_fail (string != NULL, EEL_GDK_NO_VALUE);
+@@ -47,28 +45,7 @@
+ 	g_return_val_if_fail (width_return != NULL, EEL_GDK_NO_VALUE);
+ 	g_return_val_if_fail (height_return != NULL, EEL_GDK_NO_VALUE);
+ 
+-	x11_flags = XParseGeometry (string, x_return, y_return,
+-				    width_return, height_return);
+-
+ 	gdk_flags = EEL_GDK_NO_VALUE;
+-	if (x11_flags & XValue) {
+-		gdk_flags |= EEL_GDK_X_VALUE;
+-	}
+-	if (x11_flags & YValue) {
+-		gdk_flags |= EEL_GDK_Y_VALUE;
+-	}
+-	if (x11_flags & WidthValue) {
+-		gdk_flags |= EEL_GDK_WIDTH_VALUE;
+-	}
+-	if (x11_flags & HeightValue) {
+-		gdk_flags |= EEL_GDK_HEIGHT_VALUE;
+-	}
+-	if (x11_flags & XNegative) {
+-		gdk_flags |= EEL_GDK_X_NEGATIVE;
+-	}
+-	if (x11_flags & YNegative) {
+-		gdk_flags |= EEL_GDK_Y_NEGATIVE;
+-	}
+ 
+ 	return gdk_flags;
+ }
+--- ./eel/eel-gtk-extensions.c.orig	2015-03-27 09:52:27.219999600 +0100
++++ ./eel/eel-gtk-extensions.c	2015-03-27 09:53:46.379969000 +0100
+@@ -36,7 +36,6 @@
+ #include <X11/Xatom.h>
+ #include <gdk/gdk.h>
+ #include <gdk/gdkprivate.h>
+-#include <gdk/gdkx.h>
+ #include <gtk/gtk.h>
+ #include <glib/gi18n-lib.h>
+ #include <math.h>
+--- ./libnautilus-extension/Makefile.am.orig	2015-03-27 09:56:54.503173400 +0100
++++ ./libnautilus-extension/Makefile.am	2015-03-27 09:56:57.548326300 +0100
+@@ -63,6 +63,7 @@
+ INTROSPECTION_GIRS =
+ INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
++INTROSPECTION_SCANNER_ENV = CC="$(CC)"
+ 
+ if HAVE_INTROSPECTION
+ introspection_files =					\
+--- ./libnautilus-private/nautilus-canvas-container.c.orig	2015-03-27 10:17:31.508706700 +0100
++++ ./libnautilus-private/nautilus-canvas-container.c	2015-03-27 10:19:12.570950100 +0100
+@@ -25,7 +25,6 @@
+ */
+ 
+ #include <config.h>
+-#include <X11/Xlib.h>
+ #include <X11/Xatom.h>
+ #include <math.h>
+ #include "nautilus-canvas-container.h"
+@@ -43,7 +42,6 @@
+ 
+ #include <gdk/gdkkeysyms.h>
+ #include <gtk/gtk.h>
+-#include <gdk/gdkx.h>
+ #include <glib/gi18n.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -2356,60 +2354,12 @@
+                   GdkRGBA *bgcolor,
+                   GdkRGBA *bordercolor)
+ {
+-	Atom         real_type;
+ 	gint         result = -1;
+ 	gint         real_format;
+ 	gulong       items_read = 0;
+ 	gulong       items_left = 0;
+ 	gchar       *colors;
+-	Atom         representative_colors_atom;
+-	Display     *display;
+ 
+-	if (nautilus_canvas_container_get_is_desktop (container)) {
+-		representative_colors_atom = gdk_x11_get_xatom_by_name ("_GNOME_BACKGROUND_REPRESENTATIVE_COLORS");
+-		display = gdk_x11_display_get_xdisplay (gdk_display_get_default ());
+-
+-		gdk_error_trap_push ();
+-		result = XGetWindowProperty (display,
+-		                             GDK_ROOT_WINDOW (),
+-		                             representative_colors_atom,
+-		                             0L,
+-		                             G_MAXLONG,
+-		                             False,
+-		                             XA_STRING,
+-		                             &real_type,
+-		                             &real_format,
+-		                             &items_read,
+-		                             &items_left,
+-		                             (guchar **) &colors);
+-		gdk_error_trap_pop_ignored ();
+-	}
+-
+-	if (result == Success && items_read) {
+-		/* by treating the result as a nul-terminated string, we
+-		 * select the first colour in the list.
+-		 */
+-		GdkRGBA read;
+-		gdouble shade;
+-
+-		gdk_rgba_parse (&read, colors);
+-		XFree (colors);
+-
+-		/* Border
+-		 *
+-		 * We shade darker colours to be slightly lighter and
+-		 * lighter ones to be slightly darker.
+-		 */
+-		shade = read.green < 0.5 ? 1.1 : 0.9;
+-		bordercolor->red = read.red * shade;
+-		bordercolor->green = read.green * shade;
+-		bordercolor->blue = read.blue * shade;
+-		bordercolor->alpha = 1.0;
+-
+-		/* Background */
+-		*bgcolor = read;
+-		bgcolor->alpha = 0.6;
+-	} else {
+ 		/* Fallback to the style context if we can't get the Atom */
+ 		GtkStyleContext *context;
+ 
+@@ -2422,7 +2372,6 @@
+ 
+ 		gtk_style_context_restore (context);
+ 	}
+-}
+ 
+ static void
+ start_rubberbanding (NautilusCanvasContainer *container,
+--- ./libnautilus-private/nautilus-canvas-dnd.c.orig	2015-03-27 10:19:35.960311800 +0100
++++ ./libnautilus-private/nautilus-canvas-dnd.c	2015-03-27 10:19:40.068494900 +0100
+@@ -48,7 +48,6 @@
+ #include <eel/eel-string.h>
+ #include <eel/eel-vfs-extensions.h>
+ #include <gdk/gdkkeysyms.h>
+-#include <gdk/gdkx.h>
+ #include <gtk/gtk.h>
+ #include <glib/gi18n.h>
+ 
+--- ./libnautilus-private/nautilus-file-operations.c.orig	2015-03-27 10:29:25.139240500 +0100
++++ ./libnautilus-private/nautilus-file-operations.c	2015-03-27 10:29:31.038976200 +0100
+@@ -3087,8 +3087,8 @@
+ 	if (!dir)
+ 		return max_length;
+ 
+-	max_path = pathconf (dir, _PC_PATH_MAX);
+-	max_name = pathconf (dir, _PC_NAME_MAX);
++	max_path = pathconf (dir, 260);
++	max_name = pathconf (dir, 32000 - 260);
+ 
+ 	if (max_name == -1 && max_path == -1) {
+ 		max_length = -1;
-- 
2.49.0