[gnome-build-meta/jjardon/wayland_only: 11/11] nautilus: apply patch to compile in only-wayland system



commit 2cea3420c5ea93afc3b6b3d895f8916a70d20708
Author: Javier Jardón <jjardon gnome org>
Date:   Sun Nov 24 21:34:59 2019 +0900

    nautilus: apply patch to compile in only-wayland system

 elements/core/nautilus.bst                         |   2 +
 ...ded-includes-so-It-s-possible-to-compile-.patch | 180 +++++++++++++++++++++
 2 files changed, 182 insertions(+)
---
diff --git a/elements/core/nautilus.bst b/elements/core/nautilus.bst
index 3f5cb997..ef4469fd 100644
--- a/elements/core/nautilus.bst
+++ b/elements/core/nautilus.bst
@@ -7,6 +7,8 @@ sources:
     subprojects/libgd:
       checkout: true
       url: gitlab_gnome_org:GNOME/libgd.git
+- kind: patch
+  path: files/nautilus/0001-Remove-unneded-includes-so-It-s-possible-to-compile-.patch
 build-depends:
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
 depends:
diff --git a/files/nautilus/0001-Remove-unneded-includes-so-It-s-possible-to-compile-.patch 
b/files/nautilus/0001-Remove-unneded-includes-so-It-s-possible-to-compile-.patch
new file mode 100644
index 00000000..dc671687
--- /dev/null
+++ b/files/nautilus/0001-Remove-unneded-includes-so-It-s-possible-to-compile-.patch
@@ -0,0 +1,180 @@
+From 1ffa9bc26e9a132dbe743b5fcc5cdca095744720 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Javier=20Jard=C3=B3n?= <jjardon gnome org>
+Date: Sun, 24 Nov 2019 21:33:25 +0900
+Subject: [PATCH] Remove unneded includes so It's possible to compile on
+ wayland-only system
+
+---
+ eel/eel-gtk-extensions.c             |  3 --
+ src/nautilus-application.c           |  2 +-
+ src/nautilus-canvas-container.c      |  4 +--
+ src/nautilus-canvas-dnd.c            |  2 +-
+ src/nautilus-files-view.c            |  2 +-
+ src/nautilus-mime-actions.c          | 48 ++++++++++++++++------------
+ src/nautilus-shell-search-provider.c |  2 +-
+ 7 files changed, 32 insertions(+), 31 deletions(-)
+
+diff --git a/eel/eel-gtk-extensions.c b/eel/eel-gtk-extensions.c
+index f95eaa3d6..45b072db3 100644
+--- a/eel/eel-gtk-extensions.c
++++ b/eel/eel-gtk-extensions.c
+@@ -29,10 +29,7 @@
+ #include "eel-glib-extensions.h"
+ #include "eel-string.h"
+ 
+-#include <X11/Xlib.h>
+-#include <X11/Xatom.h>
+ #include <gdk/gdk.h>
+-#include <gdk/gdkx.h>
+ #include <gtk/gtk.h>
+ #include <glib/gi18n-lib.h>
+ #include <math.h>
+diff --git a/src/nautilus-application.c b/src/nautilus-application.c
+index fb2833372..17f1da59a 100644
+--- a/src/nautilus-application.c
++++ b/src/nautilus-application.c
+@@ -29,7 +29,7 @@
+ #include <eel/eel-gtk-extensions.h>
+ #include <eel/eel-stock-dialogs.h>
+ #include <fcntl.h>
+-#include <gdk/gdkx.h>
++#include <gdk/gdk.h>
+ #include <gio/gio.h>
+ #include <glib/gi18n.h>
+ #include <glib/gstdio.h>
+diff --git a/src/nautilus-canvas-container.c b/src/nautilus-canvas-container.c
+index 1035fa2b8..932439ffe 100644
+--- a/src/nautilus-canvas-container.c
++++ b/src/nautilus-canvas-container.c
+@@ -29,14 +29,12 @@
+ #include <eel/eel-gtk-extensions.h>
+ #include <eel/eel-vfs-extensions.h>
+ #include <gdk/gdkkeysyms.h>
+-#include <gdk/gdkx.h>
++#include <gdk/gdk.h>
+ #include <glib/gi18n.h>
+ #include <gtk/gtk.h>
+ #include <math.h>
+ #include <stdio.h>
+ #include <string.h>
+-#include <X11/Xlib.h>
+-#include <X11/Xatom.h>
+ 
+ #define DEBUG_FLAG NAUTILUS_DEBUG_CANVAS_CONTAINER
+ #include "nautilus-debug.h"
+diff --git a/src/nautilus-canvas-dnd.c b/src/nautilus-canvas-dnd.c
+index c5a51bca5..9d5a5c67b 100644
+--- a/src/nautilus-canvas-dnd.c
++++ b/src/nautilus-canvas-dnd.c
+@@ -45,7 +45,7 @@
+ #include <eel/eel-string.h>
+ #include <eel/eel-vfs-extensions.h>
+ #include <gdk/gdkkeysyms.h>
+-#include <gdk/gdkx.h>
++#include <gdk/gdk.h>
+ #include <gtk/gtk.h>
+ #include <glib/gi18n.h>
+ 
+diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
+index 1a1089ac6..db84bd191 100644
+--- a/src/nautilus-files-view.c
++++ b/src/nautilus-files-view.c
+@@ -33,7 +33,7 @@
+ #include <fcntl.h>
+ #include <gdesktop-enums.h>
+ #include <gdk/gdkkeysyms.h>
+-#include <gdk/gdkx.h>
++#include <gdk/gdk.h>
+ #include <gio/gio.h>
+ #include <glib/gi18n.h>
+ #include <glib/gstdio.h>
+diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
+index 83c66044e..b626bc4b1 100644
+--- a/src/nautilus-mime-actions.c
++++ b/src/nautilus-mime-actions.c
+@@ -23,7 +23,9 @@
+ 
+ #include <eel/eel-stock-dialogs.h>
+ #include <eel/eel-string.h>
++#ifdef GDK_WINDOWING_X11
+ #include <gdk/gdkx.h>
++#endif
+ #include <glib.h>
+ #include <glib/gi18n.h>
+ #include <glib/gstdio.h>
+@@ -1198,34 +1200,38 @@ static void
+ search_for_application_mime_type (ActivateParametersInstall *parameters_install,
+                                   const gchar               *mime_type)
+ {
++#ifdef GDK_WINDOWING_X11
+     GdkWindow *window;
+     guint xid = 0;
+     const char *mime_types[2];
+ 
+-    g_assert (parameters_install->proxy != NULL);
+-
+-    /* get XID from parent window */
+-    window = gtk_widget_get_window (GTK_WIDGET (parameters_install->parent_window));
+-    if (window != NULL)
++    if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
+     {
+-        xid = GDK_WINDOW_XID (window);
+-    }
+-
+-    mime_types[0] = mime_type;
+-    mime_types[1] = NULL;
++        g_assert (parameters_install->proxy != NULL);
+ 
+-    g_dbus_proxy_call (parameters_install->proxy,
+-                       "InstallMimeTypes",
+-                       g_variant_new ("(u^ass)",
+-                                      xid,
+-                                      mime_types,
+-                                      "hide-confirm-search"),
+-                       G_DBUS_CALL_FLAGS_NONE,
+-                       G_MAXINT /* no timeout */,
+-                       NULL /* cancellable */,
+-                       (GAsyncReadyCallback) search_for_application_dbus_call_notify_cb,
+-                       parameters_install);
++        /* get XID from parent window */
++        window = gtk_widget_get_window (GTK_WIDGET (parameters_install->parent_window));
++        if (window != NULL)
++        {
++            xid = GDK_WINDOW_XID (window);
++        }
+ 
++        mime_types[0] = mime_type;
++        mime_types[1] = NULL;
++
++        g_dbus_proxy_call (parameters_install->proxy,
++                           "InstallMimeTypes",
++                           g_variant_new ("(u^ass)",
++                                          xid,
++                                          mime_types,
++                                          "hide-confirm-search"),
++                           G_DBUS_CALL_FLAGS_NONE,
++                           G_MAXINT /* no timeout */,
++                           NULL /* cancellable */,
++                           (GAsyncReadyCallback) search_for_application_dbus_call_notify_cb,
++                           parameters_install);
++    }
++#endif
+     DEBUG ("InstallMimeType method invoked for %s", mime_type);
+ }
+ 
+diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
+index 056737478..e9cd5003b 100644
+--- a/src/nautilus-shell-search-provider.c
++++ b/src/nautilus-shell-search-provider.c
+@@ -26,7 +26,7 @@
+ #include <gio/gio.h>
+ #include <string.h>
+ #include <glib/gi18n.h>
+-#include <gdk/gdkx.h>
++#include <gdk/gdk.h>
+ 
+ #include "nautilus-file.h"
+ #include "nautilus-file-utilities.h"
+-- 
+2.23.0
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]