Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e316d37cb | ||
|
|
28dbb47937 | ||
|
|
619de9d5ee | ||
|
|
561b8aeb03 |
8
NEWS
8
NEWS
@@ -1,3 +1,11 @@
|
||||
40.3
|
||||
====
|
||||
* drive-menu: Improve detection of network mounts [Florian; !27]
|
||||
* Misc. bug fixes [Florian; #340]
|
||||
|
||||
Contributors:
|
||||
Florian Müllner
|
||||
|
||||
40.2
|
||||
====
|
||||
* window-list: Extend reactive area of minimap to screen edges [Adam; !171]
|
||||
|
||||
@@ -54,7 +54,21 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||
super.destroy();
|
||||
}
|
||||
|
||||
_isInteresting() {
|
||||
_fsIsRemote(root) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const attr = Gio.FILE_ATTRIBUTE_FILESYSTEM_REMOTE;
|
||||
root.query_filesystem_info_async(attr, null, (o, res) => {
|
||||
try {
|
||||
const info = root.query_filesystem_info_finish(res);
|
||||
resolve(!info.get_attribute_boolean(attr));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async _isInteresting() {
|
||||
if (!this.mount.can_eject() && !this.mount.can_unmount())
|
||||
return false;
|
||||
if (this.mount.is_shadowed())
|
||||
@@ -62,17 +76,23 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||
|
||||
let volume = this.mount.get_volume();
|
||||
|
||||
if (!volume) {
|
||||
// probably a GDaemonMount, could be network or
|
||||
// local, but we can't tell; assume it's local for now
|
||||
return true;
|
||||
if (volume)
|
||||
return volume.get_identifier('class') !== 'network';
|
||||
|
||||
const root = this.mount.get_root();
|
||||
|
||||
try {
|
||||
return await this._fsIsRemote(root);
|
||||
} catch (e) {
|
||||
log(`Failed to query filesystem: ${e.message}`);
|
||||
}
|
||||
|
||||
return volume.get_identifier('class') !== 'network';
|
||||
// Hack, fall back to looking at GType
|
||||
return Gio._LocalFilePrototype.isPrototypeOf(root);
|
||||
}
|
||||
|
||||
_syncVisibility() {
|
||||
this.visible = this._isInteresting();
|
||||
async _syncVisibility() {
|
||||
this.visible = await this._isInteresting();
|
||||
}
|
||||
|
||||
_eject() {
|
||||
|
||||
@@ -1105,6 +1105,8 @@ class WindowList extends St.Widget {
|
||||
|
||||
class Extension {
|
||||
constructor() {
|
||||
ExtensionUtils.initTranslations();
|
||||
|
||||
this._windowLists = null;
|
||||
this._hideOverviewOrig = Main.overview.hide;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
project('gnome-shell-extensions',
|
||||
version: '40.2',
|
||||
version: '40.3',
|
||||
meson_version: '>= 0.44.0',
|
||||
license: 'GPL2+'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user