From 3e3aa1f7a377264fe34c5d5ba8df9c8bea5a39bd Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Sun, 12 Feb 2023 13:46:07 -0800 Subject: [PATCH] environment: Define promisify of g_query_info_async in the global scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is something that will be used in other places outside the background code, so let's just define it globally without having to care about the importing order. Co-authored-by: Marco Trevisan (TreviƱo) Part-of: --- js/ui/background.js | 2 -- js/ui/environment.js | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/js/ui/background.js b/js/ui/background.js index 023b1823e..cd97c8946 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -101,8 +101,6 @@ const LoginManager = imports.misc.loginManager; const Main = imports.ui.main; const Params = imports.misc.params; -Gio._promisify(Gio.File.prototype, 'query_info_async'); - var DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff); const BACKGROUND_SCHEMA = 'org.gnome.desktop.background'; diff --git a/js/ui/environment.js b/js/ui/environment.js index 5895031c6..c2088c394 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -55,6 +55,7 @@ Gio._promisify(Gio.DBusConnection.prototype, 'call'); Gio._promisify(Gio.DBusProxy, 'new'); Gio._promisify(Gio.DBusProxy.prototype, 'init_async'); Gio._promisify(Gio.DBusProxy.prototype, 'call_with_unix_fd_list'); +Gio._promisify(Gio.File.prototype, 'query_info_async'); Gio._promisify(Polkit.Permission, 'new'); let _localTimeZone = null;