[gnome-documents] Use G_FILE_QUERY_INFO_NONE instead of 0



commit 9e69f0c39397a3e4eb452a038636588e7e5b5c08
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Apr 18 13:25:14 2017 +0200

    Use G_FILE_QUERY_INFO_NONE instead of 0
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781451

 src/documents.js           |    8 ++++++--
 src/lib/gd-metadata.c      |    2 +-
 src/shellSearchProvider.js |    2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index 8c43e08..ac17f85 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -496,7 +496,9 @@ const DocCommon = new Lang.Class({
 
         this._file = Gio.file_new_for_uri(this.uri);
         this._file.query_info_async(Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH,
-                                    0, GLib.PRIORITY_DEFAULT, null,
+                                    Gio.FileQueryInfoFlags.NONE,
+                                    GLib.PRIORITY_DEFAULT,
+                                    null,
                                     Lang.bind(this, this._onFileQueryInfo));
     },
 
@@ -528,7 +530,9 @@ const DocCommon = new Lang.Class({
 
         // get the new thumbnail path
         this._file.query_info_async(Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH,
-                                    0, GLib.PRIORITY_DEFAULT, null,
+                                    Gio.FileQueryInfoFlags.NONE,
+                                    GLib.PRIORITY_DEFAULT,
+                                    null,
                                     Lang.bind(this, this._onThumbnailPathInfo));
     },
 
diff --git a/src/lib/gd-metadata.c b/src/lib/gd-metadata.c
index c366c41..f27c8b0 100644
--- a/src/lib/gd-metadata.c
+++ b/src/lib/gd-metadata.c
@@ -90,7 +90,7 @@ gd_metadata_load (GdMetadata *metadata)
   gint       i;
   GError    *error = NULL;
 
-  info = g_file_query_info (metadata->file, "metadata::*", 0, NULL, &error);
+  info = g_file_query_info (metadata->file, "metadata::*", G_FILE_QUERY_INFO_NONE, NULL, &error);
   if (!info)
     {
       g_warning ("%s", error->message);
diff --git a/src/shellSearchProvider.js b/src/shellSearchProvider.js
index ee4f082..68ccb7c 100644
--- a/src/shellSearchProvider.js
+++ b/src/shellSearchProvider.js
@@ -77,7 +77,7 @@ function _createThumbnailIcon(uri) {
 
     try {
         let info = file.query_info(Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH,
-                                   0, null);
+                                   Gio.FileQueryInfoFlags.NONE, null);
         let path = info.get_attribute_byte_string(Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH);
         if (path)
             return new Gio.FileIcon({ file: Gio.file_new_for_path(path) });


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