]> saetta.ns0.it Git - msys2/commitdiff
nautilus: compilato e funzionante (eccetto le cose tolte).
authorAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Thu, 6 Aug 2015 07:57:25 +0000 (09:57 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 21 Apr 2018 13:15:16 +0000 (15:15 +0200)
packages/mingw-w64-nautilus/001-win.patch
packages/mingw-w64-nautilus/PKGBUILD

index b90c6d583260ecda911d69a328d61159be899f2a..56bfe4153aca6a572ebd76d7f63577fed1dae1a5 100644 (file)
@@ -1,5 +1,5 @@
---- ./configure.ac.orig        2015-03-27 09:14:07.734048000 +0100
-+++ ./configure.ac     2015-03-27 09:22:58.935295900 +0100
+--- ./configure.ac.orig        2015-05-13 19:27:09.000000000 +0200
++++ ./configure.ac     2015-08-06 09:15:46.287566500 +0200
 @@ -256,9 +256,7 @@
  dnl common libs (eel, nautilus)
  PKG_CHECK_MODULES(COMMON, [
@@ -24,8 +24,8 @@
  ##################################################
  # 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
+--- ./eel/eel-gdk-extensions.c.orig    2015-03-11 16:40:05.000000000 +0100
++++ ./eel/eel-gdk-extensions.c 2015-08-06 09:15:46.318587600 +0200
 @@ -30,7 +30,6 @@
  #include "eel-string.h"
  #include <gdk-pixbuf/gdk-pixbuf.h>
@@ -71,8 +71,8 @@
  
        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
+--- ./eel/eel-gtk-extensions.c.orig    2015-03-11 16:40:05.000000000 +0100
++++ ./eel/eel-gtk-extensions.c 2015-08-06 09:15:46.341603000 +0200
 @@ -36,7 +36,6 @@
  #include <X11/Xatom.h>
  #include <gdk/gdk.h>
@@ -81,8 +81,8 @@
  #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
+--- ./libnautilus-extension/Makefile.am.orig   2015-03-11 16:40:05.000000000 +0100
++++ ./libnautilus-extension/Makefile.am        2015-08-06 09:15:46.350609800 +0200
 @@ -63,6 +63,7 @@
  INTROSPECTION_GIRS =
  INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
@@ -91,8 +91,8 @@
  
  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
+--- ./libnautilus-private/nautilus-canvas-container.c.orig     2015-05-13 19:24:43.000000000 +0200
++++ ./libnautilus-private/nautilus-canvas-container.c  2015-08-06 09:15:46.360615600 +0200
 @@ -25,7 +25,6 @@
  */
  
  
  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
+--- ./libnautilus-private/nautilus-canvas-dnd.c.orig   2015-05-13 14:12:56.000000000 +0200
++++ ./libnautilus-private/nautilus-canvas-dnd.c        2015-08-06 09:15:46.395723000 +0200
 @@ -48,7 +48,6 @@
  #include <eel/eel-string.h>
  #include <eel/eel-vfs-extensions.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
+--- ./libnautilus-private/nautilus-file-operations.c.orig      2015-05-13 19:24:43.000000000 +0200
++++ ./libnautilus-private/nautilus-file-operations.c   2015-08-06 09:15:46.407730500 +0200
+@@ -2197,7 +2197,7 @@
+       list = NULL;
+       
+       if (g_file_is_native (root)) {
+-              relpath = g_strdup_printf (".Trash/%d", getuid ());
++              relpath = g_strdup_printf (".Trash");
+               trash = g_file_resolve_relative_path (root, relpath);
+               g_free (relpath);
+@@ -2206,7 +2206,7 @@
+               
+               g_object_unref (trash);
+               
+-              relpath = g_strdup_printf (".Trash-%d", getuid ());
++              relpath = g_strdup_printf (".Trash");
+               trash = g_file_get_child (root, relpath);
+               g_free (relpath);
 @@ -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);
++      max_path = 0;
++      max_name = 0;
  
        if (max_name == -1 && max_path == -1) {
                max_length = -1;
+--- ./libnautilus-private/nautilus-file.c.orig 2015-05-13 14:12:56.000000000 +0200
++++ ./libnautilus-private/nautilus-file.c      2015-08-06 09:35:04.365331400 +0200
+@@ -51,7 +51,6 @@
+ #include <eel/eel-gtk-extensions.h>
+ #include <eel/eel-vfs-extensions.h>
+ #include <eel/eel-string.h>
+-#include <grp.h>
+ #include <gtk/gtk.h>
+ #include <glib/gi18n.h>
+ #include <glib/gstdio.h>
+@@ -61,7 +60,6 @@
+ #include <libnautilus-extension/nautilus-file-info.h>
+ #include <libnautilus-extension/nautilus-extension-private.h>
+ #include <libxml/parser.h>
+-#include <pwd.h>
+ #include <stdlib.h>
+ #include <sys/time.h>
+ #include <time.h>
+@@ -5172,32 +5170,9 @@
+ gboolean
+ nautilus_file_can_set_permissions (NautilusFile *file)
+ {
+-      uid_t user_id;
+-
+-      if (file->details->uid != -1 &&
+-          nautilus_file_is_local (file)) {
+-              /* Check the user. */
+-              user_id = geteuid();
+-
+-              /* Owner is allowed to set permissions. */
+-              if (user_id == (uid_t) file->details->uid) {
+-                      return TRUE;
+-              }
+-
+-              /* Root is also allowed to set permissions. */
+-              if (user_id == 0) {
+-                      return TRUE;
+-              }
+-
+-              /* Nobody else is allowed. */
+               return FALSE;
+       }
+-      /* pretend to have full chmod rights when no info is available, relevant when
+-       * the FS can't provide ownership info, for instance for FTP */
+-      return TRUE;
+-}
+-
+ guint
+ nautilus_file_get_permissions (NautilusFile *file)
+ {
+@@ -5368,72 +5343,6 @@
+       return real_name;
+ }
+-static gboolean
+-get_group_id_from_group_name (const char *group_name, uid_t *gid)
+-{
+-      struct group *group;
+-
+-      g_assert (gid != NULL);
+-
+-      group = getgrnam (group_name);
+-
+-      if (group == NULL) {
+-              return FALSE;
+-      }
+-
+-      *gid = group->gr_gid;
+-
+-      return TRUE;
+-}
+-
+-static gboolean
+-get_ids_from_user_name (const char *user_name, uid_t *uid, uid_t *gid)
+-{
+-      struct passwd *password_info;
+-
+-      g_assert (uid != NULL || gid != NULL);
+-
+-      password_info = getpwnam (user_name);
+-
+-      if (password_info == NULL) {
+-              return FALSE;
+-      }
+-
+-      if (uid != NULL) {
+-              *uid = password_info->pw_uid;
+-      }
+-
+-      if (gid != NULL) {
+-              *gid = password_info->pw_gid;
+-      }
+-
+-      return TRUE;
+-}
+-
+-static gboolean
+-get_user_id_from_user_name (const char *user_name, uid_t *id)
+-{
+-      return get_ids_from_user_name (user_name, id, NULL);
+-}
+-
+-static gboolean
+-get_id_from_digit_string (const char *digit_string, uid_t *id)
+-{
+-      long scanned_id;
+-      char c;
+-
+-      g_assert (id != NULL);
+-
+-      /* Only accept string if it has one integer with nothing
+-       * afterwards.
+-       */
+-      if (sscanf (digit_string, "%ld%c", &scanned_id, &c) != 1) {
+-              return FALSE;
+-      }
+-      *id = scanned_id;
+-      return TRUE;
+-}
+-
+ /**
+  * nautilus_file_can_get_owner:
+  * 
+@@ -5492,7 +5401,7 @@
+       }
+       /* Only root is also allowed to set the owner. */
+-      return geteuid() == 0;
++      return FALSE;
+ }
+ /**
+@@ -5515,70 +5424,6 @@
+                        NautilusFileOperationCallback callback,
+                        gpointer callback_data)
+ {
+-      GError *error;
+-      GFileInfo *info;
+-      uid_t new_id;
+-
+-      if (!nautilus_file_can_set_owner (file)) {
+-              /* Claim that something changed even if the permission
+-               * change failed. This makes it easier for some
+-               * clients who see the "reverting" to the old owner as
+-               * "changing back".
+-               */
+-              nautilus_file_changed (file);
+-              error = g_error_new (G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+-                                   _("Not allowed to set owner"));
+-              (* callback) (file, NULL, error, callback_data);
+-              g_error_free (error);
+-              return;
+-      }
+-
+-      /* If no match treating user_name_or_id as name, try treating
+-       * it as id.
+-       */
+-      if (!get_user_id_from_user_name (user_name_or_id, &new_id)
+-          && !get_id_from_digit_string (user_name_or_id, &new_id)) {
+-              /* Claim that something changed even if the permission
+-               * change failed. This makes it easier for some
+-               * clients who see the "reverting" to the old owner as
+-               * "changing back".
+-               */
+-              nautilus_file_changed (file);
+-              error = g_error_new (G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+-                                   _("Specified owner '%s' doesn't exist"), user_name_or_id);
+-              (* callback) (file, NULL, error, callback_data);
+-              g_error_free (error);
+-              return;         
+-      }
+-
+-      /* Test the owner-hasn't-changed case explicitly because we
+-       * don't want to send the file-changed signal if nothing
+-       * changed.
+-       */
+-      if (new_id == (uid_t) file->details->uid) {
+-              (* callback) (file, NULL, NULL, callback_data);
+-              return;
+-      }
+-      
+-      if (!nautilus_file_undo_manager_pop_flag ()) {
+-              NautilusFileUndoInfo *undo_info;
+-              char* current_owner;
+-
+-              current_owner = nautilus_file_get_owner_as_string (file, FALSE);
+-
+-              undo_info = nautilus_file_undo_info_ownership_new (NAUTILUS_FILE_UNDO_OP_CHANGE_OWNER,
+-                                                                 nautilus_file_get_location (file),
+-                                                                 current_owner,
+-                                                                 user_name_or_id);
+-              nautilus_file_undo_manager_set_action (undo_info);
+-
+-              g_free (current_owner);
+-      }
+-
+-      info = g_file_info_new ();
+-      g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_UID, new_id);
+-      nautilus_file_set_attributes (file, info, callback, callback_data);
+-      g_object_unref (info);
+ }
+ /**
+@@ -5592,28 +5437,7 @@
+ GList *
+ nautilus_get_user_names (void)
+ {
+-      GList *list;
+-      char *real_name, *name;
+-      struct passwd *user;
+-
+-      list = NULL;
+-      
+-      setpwent ();
+-
+-      while ((user = getpwent ()) != NULL) {
+-              real_name = get_real_name (user->pw_name, user->pw_gecos);
+-              if (real_name != NULL) {
+-                      name = g_strconcat (user->pw_name, "\n", real_name, NULL);
+-              } else {
+-                      name = g_strdup (user->pw_name);
+-              }
+-              g_free (real_name);
+-              list = g_list_prepend (list, name);
+-      }
+-
+-      endpwent ();
+-
+-      return g_list_sort (list, (GCompareFunc) g_utf8_collate);
++      return NULL;
+ }
+ /**
+@@ -5665,30 +5489,6 @@
+ gboolean
+ nautilus_file_can_set_group (NautilusFile *file)
+ {
+-      uid_t user_id;
+-
+-      /* Not allowed to set the permissions if we can't
+-       * even read them. This can happen on non-UNIX file
+-       * systems.
+-       */
+-      if (!nautilus_file_can_get_group (file)) {
+-              return FALSE;
+-      }
+-
+-      /* Check the user. */
+-      user_id = geteuid();
+-
+-      /* Owner is allowed to set group (with restrictions). */
+-      if (user_id == (uid_t) file->details->uid) {
+-              return TRUE;
+-      }
+-
+-      /* Root is also allowed to set group. */
+-      if (user_id == 0) {
+-              return TRUE;
+-      }
+-
+-      /* Nobody else is allowed. */
+       return FALSE;
+ }
+@@ -5699,24 +5499,7 @@
+ static GList *
+ nautilus_get_group_names_for_user (void)
+ {
+-      GList *list;
+-      struct group *group;
+-      int count, i;
+-      gid_t gid_list[NGROUPS_MAX + 1];
+-      
+-
+-      list = NULL;
+-
+-      count = getgroups (NGROUPS_MAX + 1, gid_list);
+-      for (i = 0; i < count; i++) {
+-              group = getgrgid (gid_list[i]);
+-              if (group == NULL)
+-                      break;
+-              
+-              list = g_list_prepend (list, g_strdup (group->gr_name));
+-      }
+-
+-      return g_list_sort (list, (GCompareFunc) g_utf8_collate);
++      return NULL;
+ }
+ /**
+@@ -5727,19 +5510,7 @@
+ GList *
+ nautilus_get_all_group_names (void)
+ {
+-      GList *list;
+-      struct group *group;
+-      
+-      list = NULL;
+-
+-      setgrent ();
+-      
+-      while ((group = getgrent ()) != NULL)
+-              list = g_list_prepend (list, g_strdup (group->gr_name));
+-      
+-      endgrent ();
+-      
+-      return g_list_sort (list, (GCompareFunc) g_utf8_collate);
++      return NULL;
+ }
+ /**
+@@ -5753,30 +5524,9 @@
+ GList *
+ nautilus_file_get_settable_group_names (NautilusFile *file)
+ {
+-      uid_t user_id;
+-      GList *result;
+-
+-      if (!nautilus_file_can_set_group (file)) {
+               return NULL;
+       }       
+-      /* Check the user. */
+-      user_id = geteuid();
+-
+-      if (user_id == 0) {
+-              /* Root is allowed to set group to anything. */
+-              result = nautilus_get_all_group_names ();
+-      } else if (user_id == (uid_t) file->details->uid) {
+-              /* Owner is allowed to set group to any that owner is member of. */
+-              result = nautilus_get_group_names_for_user ();
+-      } else {
+-              g_warning ("unhandled case in nautilus_get_settable_group_names");
+-              result = NULL;
+-      }
+-
+-      return result;
+-}
+-
+ /**
+  * nautilus_file_set_group:
+  * 
+@@ -5797,65 +5547,6 @@
+                        NautilusFileOperationCallback callback,
+                        gpointer callback_data)
+ {
+-      GError *error;
+-      GFileInfo *info;
+-      uid_t new_id;
+-
+-      if (!nautilus_file_can_set_group (file)) {
+-              /* Claim that something changed even if the group
+-               * change failed. This makes it easier for some
+-               * clients who see the "reverting" to the old group as
+-               * "changing back".
+-               */
+-              nautilus_file_changed (file);
+-              error = g_error_new (G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+-                                   _("Not allowed to set group"));
+-              (* callback) (file, NULL, error, callback_data);
+-              g_error_free (error);
+-              return;
+-      }
+-
+-      /* If no match treating group_name_or_id as name, try treating
+-       * it as id.
+-       */
+-      if (!get_group_id_from_group_name (group_name_or_id, &new_id)
+-          && !get_id_from_digit_string (group_name_or_id, &new_id)) {
+-              /* Claim that something changed even if the group
+-               * change failed. This makes it easier for some
+-               * clients who see the "reverting" to the old group as
+-               * "changing back".
+-               */
+-              nautilus_file_changed (file);
+-              error = g_error_new (G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+-                                   _("Specified group '%s' doesn't exist"), group_name_or_id);
+-              (* callback) (file, NULL, error, callback_data);
+-              g_error_free (error);
+-              return;         
+-      }
+-
+-      if (new_id == (gid_t) file->details->gid) {
+-              (* callback) (file, NULL, NULL, callback_data);
+-              return;
+-      }
+-
+-      if (!nautilus_file_undo_manager_pop_flag ()) {
+-              NautilusFileUndoInfo *undo_info;
+-              char *current_group;
+-
+-              current_group = nautilus_file_get_group_name (file);
+-              undo_info = nautilus_file_undo_info_ownership_new (NAUTILUS_FILE_UNDO_OP_CHANGE_GROUP,
+-                                                                 nautilus_file_get_location (file),
+-                                                                 current_group,
+-                                                                 group_name_or_id);
+-              nautilus_file_undo_manager_set_action (undo_info);
+-
+-              g_free (current_group);
+-      }
+-
+-      info = g_file_info_new ();
+-      g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_GID, new_id);
+-      nautilus_file_set_attributes (file, info, callback, callback_data);
+-      g_object_unref (info);
+ }
+ /**
+@@ -5912,28 +5603,7 @@
+       is_directory = nautilus_file_is_directory (file);
+       is_link = nautilus_file_is_symbolic_link (file);
+-      /* We use ls conventions for displaying these three obscure flags */
+-      suid = permissions & S_ISUID;
+-      sgid = permissions & S_ISGID;
+-      sticky = permissions & S_ISVTX;
+-
+-      return g_strdup_printf ("%c%c%c%c%c%c%c%c%c%c",
+-                               is_link ? 'l' : is_directory ? 'd' : '-',
+-                               permissions & S_IRUSR ? 'r' : '-',
+-                               permissions & S_IWUSR ? 'w' : '-',
+-                               permissions & S_IXUSR 
+-                                      ? (suid ? 's' : 'x') 
+-                                      : (suid ? 'S' : '-'),
+-                               permissions & S_IRGRP ? 'r' : '-',
+-                               permissions & S_IWGRP ? 'w' : '-',
+-                               permissions & S_IXGRP
+-                                      ? (sgid ? 's' : 'x') 
+-                                      : (sgid ? 'S' : '-'),           
+-                               permissions & S_IROTH ? 'r' : '-',
+-                               permissions & S_IWOTH ? 'w' : '-',
+-                               permissions & S_IXOTH
+-                                      ? (sticky ? 't' : 'x') 
+-                                      : (sticky ? 'T' : '-'));
++      return NULL;
+ }
+ /**
+@@ -5959,8 +5629,7 @@
+               return NULL;
+       }
+-      if (include_real_name &&
+-          file->details->uid == getuid ()) {
++      if (include_real_name) {
+               /* Translators: "Me" is used to indicate the file is owned by me (the current user) */
+               user_name = g_strdup (_("Me"));
+       } else if (file->details->owner_real == NULL) {
+--- ./libnautilus-private/nautilus-program-choosing.c.orig     2015-03-11 16:40:05.000000000 +0100
++++ ./libnautilus-private/nautilus-program-choosing.c  2015-08-06 09:15:46.485160000 +0200
+@@ -34,11 +34,9 @@
+ #include <gtk/gtk.h>
+ #include <glib/gi18n.h>
+ #include <gio/gio.h>
+-#include <gio/gdesktopappinfo.h>
+ #include <stdlib.h>
+ #include <gdk/gdk.h>
+-#include <gdk/gdkx.h>
+ void
+ nautilus_launch_application_for_mount (GAppInfo *app_info,
+@@ -296,7 +294,7 @@
+       GList *files;
+       int total, count;
+       GFile *file, *desktop_file;
+-      GDesktopAppInfo *app_info;
++      GAppInfo *app_info;
+       GdkAppLaunchContext *context;
+       /* Don't allow command execution from remote locations
+@@ -318,7 +316,10 @@
+       }
+       g_object_unref (desktop_file);
+-      app_info = g_desktop_app_info_new_from_filename (desktop_file_path);
++      app_info = g_app_info_create_from_commandline (g_file_get_uri (desktop_file),
++                                                     NULL,
++                                                                                                 G_APP_INFO_CREATE_NONE,
++                                                                                                 NULL);
+       g_free (desktop_file_path);
+       if (app_info == NULL) {
+               eel_show_error_dialog
+--- ./libnautilus-private/nautilus-thumbnails.c.orig   2015-03-11 16:40:05.000000000 +0100
++++ ./libnautilus-private/nautilus-thumbnails.c        2015-08-06 09:15:46.519829800 +0200
+@@ -39,10 +39,8 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <pthread.h>
+-#include <sys/wait.h>
+ #include <unistd.h>
+ #include <signal.h>
+-#include <libgnome-desktop/gnome-desktop-thumbnail.h>
+ #include "nautilus-file-private.h"
+@@ -95,8 +93,6 @@
+  * to avoid adding it again. Lock thumbnails_mutex when accessing this. */
+ static NautilusThumbnailInfo *currently_thumbnailing = NULL;
+-static GnomeDesktopThumbnailFactory *thumbnail_factory = NULL;
+-
+ static gboolean
+ get_file_mtime (const char *file_uri, time_t* mtime)
+ {
+@@ -130,16 +126,9 @@
+       g_free (info);
+ }
+-static GnomeDesktopThumbnailFactory *
++static void
+ get_thumbnail_factory (void)
+ {
+-      static GnomeDesktopThumbnailFactory *thumbnail_factory = NULL;
+-
+-      if (thumbnail_factory == NULL) {
+-              thumbnail_factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_LARGE);
+-      }
+-
+-      return thumbnail_factory;
+ }
+@@ -154,9 +143,6 @@
+       pthread_t thumbnail_thread;
+       /* Don't do this in thread, since g_object_ref is not threadsafe */
+-      if (thumbnail_factory == NULL) {
+-              thumbnail_factory = get_thumbnail_factory ();
+-      }
+       /* We create the thread in the detached state, as we don't need/want
+          to join with it at any point. */
+@@ -348,7 +334,6 @@
+ gboolean
+ nautilus_can_thumbnail (NautilusFile *file)
+ {
+-      GnomeDesktopThumbnailFactory *factory;
+       gboolean res;
+       char *uri;
+       time_t mtime;
+@@ -358,11 +343,6 @@
+       mime_type = nautilus_file_get_mime_type (file);
+       mtime = nautilus_file_get_mtime (file);
+       
+-      factory = get_thumbnail_factory ();
+-      res = gnome_desktop_thumbnail_factory_can_thumbnail (factory,
+-                                                           uri,
+-                                                           mime_type,
+-                                                           mtime);
+       g_free (mime_type);
+       g_free (uri);
+@@ -541,28 +521,17 @@
+                          info->image_uri);
+ #endif
+-              pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (thumbnail_factory,
+-                                                                           info->image_uri,
+-                                                                           info->mime_type);
+-
+               if (pixbuf) {
+ #ifdef DEBUG_THUMBNAILS
+                       g_message ("(Thumbnail Thread) Saving thumbnail: %s\n",
+                                  info->image_uri);
+ #endif
+-                      gnome_desktop_thumbnail_factory_save_thumbnail (thumbnail_factory,
+-                                                                      pixbuf,
+-                                                                      info->image_uri,
+-                                                                      current_orig_mtime);
+                       g_object_unref (pixbuf);
+               } else {
+ #ifdef DEBUG_THUMBNAILS
+                       g_message ("(Thumbnail Thread) Thumbnail failed: %s\n",
+                                  info->image_uri);
+ #endif
+-                      gnome_desktop_thumbnail_factory_create_failed_thumbnail (thumbnail_factory, 
+-                                                                               info->image_uri,
+-                                                                               current_orig_mtime);
+               }
+               /* We need to call nautilus_file_changed(), but I don't think that is
+                  thread safe. So add an idle handler and do it from the main loop. */
+--- ./src/nautilus-application.c.orig  2015-05-13 19:24:43.000000000 +0200
++++ ./src/nautilus-application.c       2015-08-06 09:15:46.529836300 +0200
+@@ -64,7 +64,6 @@
+ #include <gio/gio.h>
+ #include <eel/eel-gtk-extensions.h>
+ #include <eel/eel-stock-dialogs.h>
+-#include <gdk/gdkx.h>
+ #include <gtk/gtk.h>
+ G_DEFINE_TYPE (NautilusApplication, nautilus_application, GTK_TYPE_APPLICATION);
+--- ./src/nautilus-canvas-view.c.orig  2015-05-13 19:24:43.000000000 +0200
++++ ./src/nautilus-canvas-view.c       2015-08-06 09:15:46.539843100 +0200
+@@ -58,7 +58,6 @@
+ #include <signal.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+-#include <sys/wait.h>
+ #include <unistd.h>
+ enum 
+--- ./src/nautilus-desktop-canvas-view.c.orig  2015-05-13 14:12:56.000000000 +0200
++++ ./src/nautilus-desktop-canvas-view.c       2015-08-06 09:15:46.573048300 +0200
+@@ -31,13 +31,11 @@
+ #include "nautilus-canvas-view-container.h"
+ #include "nautilus-view.h"
+-#include <X11/Xatom.h>
+ #include <gtk/gtk.h>
+ #include <eel/eel-glib-extensions.h>
+ #include <eel/eel-gtk-extensions.h>
+ #include <eel/eel-vfs-extensions.h>
+ #include <fcntl.h>
+-#include <gdk/gdkx.h>
+ #include <glib/gi18n.h>
+ #include <libnautilus-private/nautilus-desktop-icon-file.h>
+ #include <libnautilus-private/nautilus-directory-notify.h>
+@@ -142,21 +140,6 @@
+        * elements in the workareas array describing
+        * x,y,width,height) */
+       gdk_error_trap_push ();
+-      if (!gdk_property_get (window,
+-                             gdk_atom_intern ("_NET_NUMBER_OF_DESKTOPS", FALSE),
+-                             gdk_x11_xatom_to_atom (XA_CARDINAL),
+-                             0, 4, FALSE,
+-                             &type_returned,
+-                             &format_returned,
+-                             &length_returned,
+-                             (guchar **) &nworkareas)) {
+-              g_warning("Can not calculate _NET_NUMBER_OF_DESKTOPS");
+-      }
+-      if (gdk_error_trap_pop()
+-          || nworkareas == NULL
+-          || type_returned != gdk_x11_xatom_to_atom (XA_CARDINAL)
+-          || format_returned != 32)
+-              g_warning("Can not calculate _NET_NUMBER_OF_DESKTOPS");
+       
+       /* Note : gdk_property_get() is broken (API documents admit
+        * this).  As a length argument, it expects the number of
+@@ -169,33 +152,11 @@
+        * back, and is the reason for the workaround below.
+        */ 
+       gdk_error_trap_push ();
+-      if (nworkareas == NULL || (*nworkareas < 1) 
+-          || !gdk_property_get (window,
+-                                gdk_atom_intern ("_NET_WORKAREA", FALSE),
+-                                gdk_x11_xatom_to_atom (XA_CARDINAL),
+-                                0, ((*nworkareas) * 4 * 4), FALSE,
+-                                &type_returned,
+-                                &format_returned,
+-                                &length_returned,
+-                                (guchar **) &workareas)) {
+-              g_warning("Can not get _NET_WORKAREA");
+-              workareas = NULL;
+-      }
+-      if (gdk_error_trap_pop ()
+-          || workareas == NULL
+-          || type_returned != gdk_x11_xatom_to_atom (XA_CARDINAL)
+-          || ((*nworkareas) * 4 * sizeof(long)) != length_returned
+-          || format_returned != 32) {
+-              g_warning("Can not determine workarea, guessing at layout");
+-              nautilus_canvas_container_set_margins (canvas_container,
+-                                                   0, 0, 0, 0);
+-      } else {
+               screen = gdk_window_get_screen (window);
+               canvas_container_set_workarea
+                       (canvas_container, screen, workareas, length_returned / sizeof (long));
+-      }
+       if (nworkareas != NULL)
+               g_free (nworkareas);
+@@ -209,20 +170,6 @@
+                                  GdkEvent *event,
+                                  gpointer data)
+ {
+-      XEvent *xevent = gdk_xevent;
+-      NautilusDesktopCanvasView *canvas_view;
+-
+-      canvas_view = NAUTILUS_DESKTOP_CANVAS_VIEW (data);
+-  
+-      switch (xevent->type) {
+-      case PropertyNotify:
+-              if (xevent->xproperty.atom == gdk_x11_get_xatom_by_name ("_NET_WORKAREA"))
+-                      net_workarea_changed (canvas_view, event->any.window);
+-              break;
+-      default:
+-              break;
+-      }
+-
+       return GDK_FILTER_CONTINUE;
+ }
+--- ./src/nautilus-desktop-window.c.orig       2015-05-13 14:12:56.000000000 +0200
++++ ./src/nautilus-desktop-window.c    2015-08-06 09:15:46.582055100 +0200
+@@ -25,8 +25,6 @@
+ #include "nautilus-desktop-window.h"
+ #include "nautilus-window.h"
+-#include <X11/Xatom.h>
+-#include <gdk/gdkx.h>
+ #include <gtk/gtk.h>
+ #include <gio/gio.h>
+ #include <glib/gi18n.h>
+@@ -114,48 +112,6 @@
+ static void
+ nautilus_desktop_window_init_selection (NautilusDesktopWindow *window)
+ {
+-      char selection_name[32];
+-      GdkAtom selection_atom;
+-      Window selection_owner;
+-      GdkDisplay *display;
+-      GtkWidget *selection_widget;
+-      GdkScreen *screen;
+-
+-      screen = gdk_screen_get_default ();
+-
+-      g_snprintf (selection_name, sizeof (selection_name),
+-                  "_NET_DESKTOP_MANAGER_S%d", gdk_screen_get_number (screen));
+-      selection_atom = gdk_atom_intern (selection_name, FALSE);
+-      display = gdk_screen_get_display (screen);
+-
+-      selection_owner = XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (display),
+-                                            gdk_x11_atom_to_xatom_for_display (display,
+-                                                                               selection_atom));
+-      if (selection_owner != None) {
+-              g_critical ("Another desktop manager in use; desktop window won't be created");
+-              return;
+-      }
+-
+-      selection_widget = gtk_invisible_new_for_screen (screen);
+-      /* We need this for gdk_x11_get_server_time() */
+-      gtk_widget_add_events (selection_widget, GDK_PROPERTY_CHANGE_MASK);
+-
+-      if (!gtk_selection_owner_set_for_display (display,
+-                                                selection_widget,
+-                                                selection_atom,
+-                                                gdk_x11_get_server_time (gtk_widget_get_window (selection_widget)))) {
+-              gtk_widget_destroy (selection_widget);
+-              g_critical ("Can't set ourselves as selection owner for desktop manager; "
+-                          "desktop window won't be created");
+-              return;
+-      }
+-
+-      g_signal_connect (selection_widget, "selection-get",
+-                        G_CALLBACK (selection_get_cb), window);
+-      g_signal_connect (selection_widget, "selection-clear-event",
+-                        G_CALLBACK (selection_clear_event_cb), window);
+-
+-      window->details->desktop_selection = selection_widget;
+ }
+ static void
+@@ -318,11 +274,6 @@
+       GdkAtom atom;
+       atom = gdk_atom_intern ("_NET_WM_WINDOW_TYPE_DESKTOP", FALSE);
+-        
+-      gdk_property_change (window,
+-                           gdk_atom_intern ("_NET_WM_WINDOW_TYPE", FALSE),
+-                           gdk_x11_xatom_to_atom (XA_ATOM), 32,
+-                           GDK_PROP_MODE_REPLACE, (guchar *) &atom, 1);
+ }
+ static void
+--- ./src/nautilus-main.c.orig 2015-03-11 16:40:05.000000000 +0100
++++ ./src/nautilus-main.c      2015-08-06 09:15:46.590067700 +0200
+@@ -36,7 +36,6 @@
+ #include <glib/gi18n.h>
+ #include <gtk/gtk.h>
+-#include <gio/gdesktopappinfo.h>
+ #include <libxml/parser.h>
+@@ -75,7 +74,6 @@
+ #endif
+       /* This will be done by gtk+ later, but for now, force it to GNOME */
+-      g_desktop_app_info_set_desktop_env ("GNOME");
+       if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
+               eel_make_warnings_and_criticals_stop_in_debugger ();
+--- ./src/nautilus-mime-actions.c.orig 2015-03-11 16:40:05.000000000 +0100
++++ ./src/nautilus-mime-actions.c      2015-08-06 09:15:46.612271600 +0200
+@@ -33,7 +33,6 @@
+ #include <glib/gi18n.h>
+ #include <glib/gstdio.h>
+ #include <string.h>
+-#include <gdk/gdkx.h>
+ #include <libnautilus-private/nautilus-file-attributes.h>
+ #include <libnautilus-private/nautilus-file.h>
+@@ -1310,7 +1309,7 @@
+       /* 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;
+--- ./src/nautilus-properties-window.c.orig    2015-05-13 14:12:56.000000000 +0200
++++ ./src/nautilus-properties-window.c 2015-08-06 09:15:46.623278100 +0200
+@@ -37,7 +37,6 @@
+ #include <cairo.h>
+ #define GNOME_DESKTOP_USE_UNSTABLE_API
+-#include <libgnome-desktop/gnome-desktop-thumbnail.h>
+ #include <eel/eel-accessibility.h>
+ #include <eel/eel-glib-extensions.h>
+@@ -3424,24 +3423,6 @@
+       return check_button;
+ }
+-enum {
+-      UNIX_PERM_SUID = S_ISUID,
+-      UNIX_PERM_SGID = S_ISGID,       
+-      UNIX_PERM_STICKY = 01000,       /* S_ISVTX not defined on all systems */
+-      UNIX_PERM_USER_READ = S_IRUSR,
+-      UNIX_PERM_USER_WRITE = S_IWUSR,
+-      UNIX_PERM_USER_EXEC = S_IXUSR,
+-      UNIX_PERM_USER_ALL = S_IRUSR | S_IWUSR | S_IXUSR,
+-      UNIX_PERM_GROUP_READ = S_IRGRP,
+-      UNIX_PERM_GROUP_WRITE = S_IWGRP,
+-      UNIX_PERM_GROUP_EXEC = S_IXGRP,
+-      UNIX_PERM_GROUP_ALL = S_IRGRP | S_IWGRP | S_IXGRP,
+-      UNIX_PERM_OTHER_READ = S_IROTH,
+-      UNIX_PERM_OTHER_WRITE = S_IWOTH,
+-      UNIX_PERM_OTHER_EXEC = S_IXOTH,
+-      UNIX_PERM_OTHER_ALL = S_IROTH | S_IWOTH | S_IXOTH
+-};
+-
+ typedef enum {
+       PERMISSION_READ  = (1<<0),
+       PERMISSION_WRITE = (1<<1),
+@@ -3455,9 +3436,9 @@
+ } PermissionType;
+ static guint32 vfs_perms[3][3] = {
+-      {UNIX_PERM_USER_READ, UNIX_PERM_USER_WRITE, UNIX_PERM_USER_EXEC},
+-      {UNIX_PERM_GROUP_READ, UNIX_PERM_GROUP_WRITE, UNIX_PERM_GROUP_EXEC},
+-      {UNIX_PERM_OTHER_READ, UNIX_PERM_OTHER_WRITE, UNIX_PERM_OTHER_EXEC},
++      {0, 0, 0},
++      {0, 0, 0},
++      {0, 0, 0},
+ };
+ static guint32 
+@@ -3995,11 +3976,6 @@
+               append_blank_slim_row (page_grid);
+               execute_label = attach_title_field (page_grid, _("Execute:"));
+-              add_execute_checkbox_with_label (window, page_grid,
+-                                               GTK_WIDGET (execute_label),
+-                                               _("Allow _executing file as program"),
+-                                               UNIX_PERM_USER_EXEC|UNIX_PERM_GROUP_EXEC|UNIX_PERM_OTHER_EXEC,
+-                                               execute_label, FALSE);
+       }
+ }
+@@ -5091,10 +5067,6 @@
+                       scale = (double)gdk_pixbuf_get_height (pixbuf) /
+                               gdk_pixbuf_get_width (pixbuf);
+-                      scaled_pixbuf = gnome_desktop_thumbnail_scale_down_pixbuf
+-                              (pixbuf,
+-                               PREVIEW_IMAGE_WIDTH,
+-                               scale * PREVIEW_IMAGE_WIDTH);
+                       g_object_unref (pixbuf);
+                       pixbuf = scaled_pixbuf;
+               }
+--- ./src/nautilus-shell-search-provider.c.orig        2015-05-13 14:12:56.000000000 +0200
++++ ./src/nautilus-shell-search-provider.c     2015-08-06 09:15:46.654491200 +0200
+@@ -26,7 +26,6 @@
+ #include <gio/gio.h>
+ #include <string.h>
+ #include <glib/gi18n.h>
+-#include <gdk/gdkx.h>
+ #include <libnautilus-private/nautilus-file.h>
+ #include <libnautilus-private/nautilus-file-utilities.h>
+--- ./src/nautilus-view.c.orig 2015-05-13 19:24:43.000000000 +0200
++++ ./src/nautilus-view.c      2015-08-06 09:15:46.685772300 +0200
+@@ -43,7 +43,6 @@
+ #include "nautilus-empty-view.h"
+ #endif
+-#include <gdk/gdkx.h>
+ #include <gdk/gdkkeysyms.h>
+ #include <gtk/gtk.h>
+ #include <glib/gi18n.h>
+@@ -839,7 +838,6 @@
+       uri = nautilus_file_get_uri (files->data);
+       toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view));
+-      xid = gdk_x11_window_get_xid (gtk_widget_get_window (toplevel));
+       nautilus_previewer_call_show_file (uri, xid, TRUE);
+       g_free (uri);
+--- ./src/nautilus-window.c.orig       2015-05-13 19:24:43.000000000 +0200
++++ ./src/nautilus-window.c    2015-08-06 09:15:46.713000100 +0200
+@@ -47,7 +47,6 @@
+ #include <eel/eel-gtk-extensions.h>
+ #include <eel/eel-stock-dialogs.h>
+ #include <gdk-pixbuf/gdk-pixbuf.h>
+-#include <gdk/gdkx.h>
+ #include <gdk/gdkkeysyms.h>
+ #include <gtk/gtk.h>
+ #include <glib/gi18n.h>
+@@ -1229,7 +1228,6 @@
+       g_assert (volume != NULL && G_IS_VOLUME (volume));
+       device_identifier = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+-      xid = (gint) gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (window)));
+       xid_string = g_strdup_printf ("%d", xid);
+       cmdline = g_strconcat ("gnome-disks ",
index e16771314e4c6797f907670c6d75248d655a72a0..02782b7efaeb3254d106800e17fb3ba0d0f8fc8e 100644 (file)
@@ -2,14 +2,16 @@
 
 _realname=nautilus
 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
-pkgver=3.16.0
+pkgver=3.16.2
 pkgrel=1
 arch=('any')
-pkgdesc="GNOME PO files editor (mingw-w64)"
+pkgdesc="GNOME file manager (mingw-w64)"
 options=(strip staticlibs)
 depends=("${MINGW_PACKAGE_PREFIX}-glib2"
          "${MINGW_PACKAGE_PREFIX}-gtk3"
-         "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas")
+         "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas"
+         "${MINGW_PACKAGE_PREFIX}-libexif"
+         "${MINGW_PACKAGE_PREFIX}-libxml2")
 makedepends=("${MINGW_PACKAGE_PREFIX}-pkg-config"
              "${MINGW_PACKAGE_PREFIX}-vala"
              "${MINGW_PACKAGE_PREFIX}-gobject-introspection"
@@ -17,10 +19,10 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-pkg-config"
 license=("LGPL 2.1")
 url="http://www.gnome.org"
 install=${_realname}-${CARCH}.install
-source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz
+source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz
         001-win.patch)
-sha256sums=('d64b5cdf6f42ab8e24b27b038be7f6be699a6ccc944a99995f877d3ef353b879'
-            'df227312645272177563291a44f673a857dac13a6de2445d0169ec2801bbc080')
+sha256sums=('3e7ecdda3a47b6ad03098270940aa506782866fa3602d91e711d99f96741478f'
+            '4290c5a945ec01718a1f0273a7d6678e72e98a8c3892ffe9108473abb83bbb92')
 
 prepare() {
   cd "${srcdir}"/${_realname}-${pkgver}
@@ -31,27 +33,27 @@ prepare() {
 }
 
 build() {
+  [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST}
   mkdir -p build-${MINGW_CHOST}
   cd build-${MINGW_CHOST}
 
-  #mkdir -p docs/reference/gdict/html
-  #cp -rf ../${_realname}-${pkgver}/docs/reference/gdict/html/* docs/reference/gdict/html
-
   ../${_realname}-${pkgver}/configure \
     --host=${MINGW_CHOST} \
     --target=${MINGW_CHOST} \
     --build=${MINGW_CHOST} \
     --prefix=${MINGW_PREFIX} \
-    --libexecdir=${MINGW_PREFIX}/lib
+    --libexecdir=${MINGW_PREFIX}/lib \
+    --enable-xmp=no \
+    --enable-tracker=no
 
   make
 }
 
 package() {
-  cd "$srcdir/build-${MINGW_CHOST}"
-  make DESTDIR=$pkgdir install
+  cd "${srcdir}/build-${MINGW_CHOST}"
+  make DESTDIR=${pkgdir} install
 
   install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
-  install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.docs" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.docs"
-  install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.libs" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.libs"
+  install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.EXTENSIONS" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.EXTENSIONS"
+  install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB"
 }