[gnome-books/wip/hadess/sandboxed-miner: 1/3] application: Make isSandboxed() helper public
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-books/wip/hadess/sandboxed-miner: 1/3] application: Make isSandboxed() helper public
- Date: Wed, 24 Mar 2021 14:07:33 +0000 (UTC)
commit 5bd3be75d9b9bf874ffad70ea3ce7d39e49147bd
Author: Bastien Nocera <hadess hadess net>
Date: Wed Mar 24 14:46:41 2021 +0100
application: Make isSandboxed() helper public
src/application.js | 7 +------
src/utils.js | 5 +++++
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 7d7493d4..476cf1a4 100644
--- a/src/application.js
+++ b/src/application.js
@@ -161,11 +161,6 @@ var Application = new Lang.Class({
}
},
- _isSandboxed: function() {
- file = Gio.File.new_for_path("/.flatpak-info");
- return file.query_exists(null);
- },
-
vfunc_startup: function() {
this.parent();
String.prototype.format = Format.format;
@@ -191,7 +186,7 @@ var Application = new Lang.Class({
return;
}
- if (this._isSandboxed()) {
+ if (Utils.isSandboxed()) {
// if the daemon is not available, run our own copy (for the sandboxed case)
trackerMinerService = this.get_application_id() + '.Tracker3.Miner.Files';
} else {
diff --git a/src/utils.js b/src/utils.js
index bb45adfd..5ea2e8c2 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -119,6 +119,11 @@ function actionToggleCallback(action) {
action.change_state(GLib.Variant.new('b', !state.get_boolean()));
}
+function isSandboxed() {
+ file = Gio.File.new_for_path("/.flatpak-info");
+ return file.query_exists(null);
+}
+
function populateActionGroup(actionGroup, actionEntries, prefix) {
actionEntries.forEach(function(actionEntry) {
let settingsKey = actionEntry.settingsKey;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]