js: Stop using Gio._LocalFilePrototype
gjs now supports overriding interface methods, so promisify() works on Gio.File itself, not just the LocalFilePrototype cludge. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2174>
This commit is contained in:
parent
55a37ac992
commit
928f3288e9
@ -101,7 +101,7 @@ const LoginManager = imports.misc.loginManager;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
Gio._promisify(Gio._LocalFilePrototype, 'query_info_async', 'query_info_finish');
|
Gio._promisify(Gio.File.prototype, 'query_info_async', 'query_info_finish');
|
||||||
|
|
||||||
var DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
|
var DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
|
||||||
|
|
||||||
|
@ -372,10 +372,10 @@ function init() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Gio._LocalFilePrototype.touch_async = function (callback) {
|
Gio.File.prototype.touch_async = function (callback) {
|
||||||
Shell.util_touch_file_async(this, callback);
|
Shell.util_touch_file_async(this, callback);
|
||||||
};
|
};
|
||||||
Gio._LocalFilePrototype.touch_finish = function (result) {
|
Gio.File.prototype.touch_finish = function (result) {
|
||||||
return Shell.util_touch_file_finish(this, result);
|
return Shell.util_touch_file_finish(this, result);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -100,8 +100,8 @@ let _themeResource = null;
|
|||||||
let _oskResource = null;
|
let _oskResource = null;
|
||||||
let _iconResource = null;
|
let _iconResource = null;
|
||||||
|
|
||||||
Gio._promisify(Gio._LocalFilePrototype, 'delete_async', 'delete_finish');
|
Gio._promisify(Gio.File.prototype, 'delete_async', 'delete_finish');
|
||||||
Gio._promisify(Gio._LocalFilePrototype, 'touch_async', 'touch_finish');
|
Gio._promisify(Gio.File.prototype, 'touch_async', 'touch_finish');
|
||||||
|
|
||||||
let _remoteAccessInhibited = false;
|
let _remoteAccessInhibited = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user