[gnome-characters/bilelmoussaoui/gtk4: 17/71] drop not used initEnv function




commit 72f92252ab2efea5497396e1b60ddcbde7916840
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date:   Fri Nov 19 16:56:16 2021 +0100

    drop not used initEnv function

 src/main.js    |  8 --------
 src/service.js |  8 --------
 src/util.js    | 32 --------------------------------
 3 files changed, 48 deletions(-)
---
diff --git a/src/main.js b/src/main.js
index 6d803dc..77c13b6 100644
--- a/src/main.js
+++ b/src/main.js
@@ -44,12 +44,6 @@ const Window = imports.window;
 var settings = null;
 var application_id = pkg.name;
 
-function initEnvironment() {
-    window.getApp = function() {
-        return Gio.Application.get_default();
-    };
-}
-
 var MyApplication = GObject.registerClass({
 },class MyApplication extends Adw.Application {
     _init () {
@@ -110,7 +104,5 @@ var MyApplication = GObject.registerClass({
 });
 
 function main(argv) {
-    initEnvironment();
-
     return (new MyApplication()).run(argv);
 }
diff --git a/src/service.js b/src/service.js
index 087d86d..94da7d4 100644
--- a/src/service.js
+++ b/src/service.js
@@ -34,12 +34,6 @@ const SearchProvider = imports.searchProvider;
 
 var application_id = pkg.name;
 
-function initEnvironment() {
-    window.getApp = function() {
-        return Gio.Application.get_default();
-    };
-}
-
 const BackgroundService = GObject.registerClass({
     // This needs to be a Gtk.Application instead of Gio.Application,
     // to get Gtk.Clipboard working.
@@ -88,7 +82,5 @@ const BackgroundService = GObject.registerClass({
 });
 
 function main(argv) {
-    initEnvironment();
-
     return (new BackgroundService()).run(argv);
 }
diff --git a/src/util.js b/src/util.js
index b2bc7dd..922b61f 100644
--- a/src/util.js
+++ b/src/util.js
@@ -30,18 +30,6 @@ const Lang = imports.lang;
 const Params = imports.params;
 const System = imports.system;
 
-function loadUI(resourcePath, objects) {
-    let ui = new Gtk.Builder();
-
-    if (objects) {
-        for (let o in objects)
-            ui.expose_object(o, objects[o]);
-    }
-
-    ui.add_from_resource(resourcePath);
-    return ui;
-}
-
 function initActions(actionMap, simpleActionEntries, context) {
     simpleActionEntries.forEach(function(entry) {
         let filtered = Params.filter(entry, { activate: null,
@@ -59,16 +47,6 @@ function initActions(actionMap, simpleActionEntries, context) {
     });
 }
 
-function arrayEqual(one, two) {
-    if (one.length != two.length)
-        return false;
-
-    for (let i = 0; i < one.length; i++)
-        if (one[i] != two[i])
-            return false;
-
-    return true;
-}
 
 function getSettings(schemaId, path) {
     const GioSSS = Gio.SettingsSchemaSource;
@@ -96,16 +74,6 @@ function getSettings(schemaId, path) {
                                   path: path });
 }
 
-function assertEqual(one, two) {
-    if (one != two)
-        throw Error('Assertion failed: ' + one + ' != ' + two);
-}
-
-function assertNotEqual(one, two) {
-    if (one == two)
-        throw Error('Assertion failed: ' + one + ' == ' + two);
-}
-
 function capitalizeWord(w) {
     if (w.length > 0)
         return w[0].toUpperCase() + w.slice(1).toLowerCase()


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