From b2eef29ed635e4995213fca8cf9bead6e20f3ba7 Mon Sep 17 00:00:00 2001 From: Julien Ozog Date: Mon, 28 Jul 2014 15:57:05 +0200 Subject: [PATCH 1/5] Port to Gnome 3.12 --- extension.js | 31 ++++++++++++---------- metadata.json | 4 +-- search.js | 71 +++++++++++++++++++++------------------------------ 3 files changed, 49 insertions(+), 57 deletions(-) diff --git a/extension.js b/extension.js index 6130d5e..1d7f555 100644 --- a/extension.js +++ b/extension.js @@ -72,7 +72,12 @@ const ConnectionManager = new Lang.Class({ this._searchProvider = null; this._sshList = []; this._searchProvider = new Search.SshSearchProvider('CONNECTION MANAGER'); - Main.overview.addSearchProvider(this._searchProvider); + if(typeof Main.overview.viewSelector === "object" && + typeof Main.overview.viewSelector._searchResults === "object" && + typeof Main.overview.viewSelector._searchResults._searchSystem === "object" && + typeof Main.overview.viewSelector._searchResults._searchSystem.addProvider === "function") { + Main.overview.viewSelector._searchResults._searchSystem.addProvider(this._searchProvider); + } this._readConf(); }, @@ -181,12 +186,12 @@ const ConnectionManager = new Lang.Class({ // Add ssh entry in search array this._sshList.push( - [ - child.Type, - this.TermCmd.get_terminal(), - child.Name+' - '+child.Host, - command - ] + { + 'type': child.Type, + 'terminal': this.TermCmd.get_terminal(), + 'name': child.Name+' - '+child.Host, + 'command': command + } ); } @@ -223,12 +228,12 @@ const ConnectionManager = new Lang.Class({ // Add ssh entry in search array this._sshList.push( - [ - child.Type, - this.TermCmd.get_terminal(), - child.Name+' - '+child.Host, - command - ] + { + 'type': child.Type, + 'terminal': this.TermCmd.get_terminal(), + 'name': child.Name+' - '+child.Host, + 'command': command + } ); } diff --git a/metadata.json b/metadata.json index fbbde72..022d7ce 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { - "shell-version": ["3.10"], - "version": "0.8.2", + "shell-version": ["3.12"], + "version": "0.8.3", "uuid": "connectionmanager2@ciancio.net", "name": "Connection Manager", "description": "Simple GUI app for Gnome 3 that provides a menu for initiating SSH/Telnet/Custom Apps connections.", diff --git a/search.js b/search.js index 24f03d9..64a7e6a 100644 --- a/search.js +++ b/search.js @@ -27,8 +27,7 @@ const SshSearchProvider = new Lang.Class({ Name: 'SshSearchProvider', _init: function(title) { - this.title = title; - this.searchSystem = null; + this.id = title; this.sshNames = []; }, @@ -45,69 +44,57 @@ const SshSearchProvider = new Lang.Class({ return null; }, - getInitialResultSet: function(terms) { + getInitialResultSet: function(terms, callback) { let searching = []; for (var i=0; i Date: Wed, 15 Oct 2014 11:07:21 +0200 Subject: [PATCH 2/5] Gnome 3.14 support --- extension.js | 11 +++++++---- metadata.json | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/extension.js b/extension.js index 0c82dac..da33738 100644 --- a/extension.js +++ b/extension.js @@ -74,11 +74,14 @@ const ConnectionManager = new Lang.Class({ this._searchProvider = new Search.SshSearchProvider('CONNECTION MANAGER'); if( typeof Main.overview.viewSelector === "object" && - typeof Main.overview.viewSelector._searchResults === "object" && - typeof Main.overview.viewSelector._searchResults._searchSystem === "object" && - typeof Main.overview.viewSelector._searchResults._searchSystem.addProvider === "function") { + typeof Main.overview.viewSelector._searchResults === "object") { + if(typeof Main.overview.viewSelector._searchResults._registerProvider === "function") { //3.14 + Main.overview.viewSelector._searchResults._registerProvider(this._searchProvider); + } else if(typeof Main.overview.viewSelector._searchResults._searchSystem === "object" && + typeof Main.overview.viewSelector._searchResults._searchSystem.addProvider === "function") { //3.12 Main.overview.viewSelector._searchResults._searchSystem.addProvider(this._searchProvider); - } + } + } this._readConf(); }, diff --git a/metadata.json b/metadata.json index 022d7ce..2c07258 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { - "shell-version": ["3.12"], - "version": "0.8.3", + "shell-version": ["3.12", "3.14"], + "version": "0.8.4", "uuid": "connectionmanager2@ciancio.net", "name": "Connection Manager", "description": "Simple GUI app for Gnome 3 that provides a menu for initiating SSH/Telnet/Custom Apps connections.", From 9041b1f5a2f946a9eb87efb5db848276d01185c8 Mon Sep 17 00:00:00 2001 From: Julien Ozog Date: Thu, 16 Oct 2014 10:22:21 +0200 Subject: [PATCH 3/5] Remove search provider on disable to avoid duplicated search provider on each session lock/unlock --- extension.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extension.js b/extension.js index da33738..bba1b11 100644 --- a/extension.js +++ b/extension.js @@ -331,6 +331,11 @@ function enable() { } function disable() { + if(cm._searchProvider!=null) { + Main.overview.removeSearchProvider(cm._searchProvider); + cm._searchProvider = null; + } + cm.monitor.cancel(); cm.destroy(); } From cf2afa83048384656b91cb745988ed34943fedcd Mon Sep 17 00:00:00 2001 From: Dario Lesca Date: Thu, 21 May 2015 10:39:14 +0200 Subject: [PATCH 4/5] Update metadata.json Add support to Gnome 3.14/3.16 --- metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata.json b/metadata.json index 022d7ce..0a3ba77 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { - "shell-version": ["3.12"], - "version": "0.8.3", + "shell-version": ["3.12", "3.14", "3.16"], + "version": "0.8.4", "uuid": "connectionmanager2@ciancio.net", "name": "Connection Manager", "description": "Simple GUI app for Gnome 3 that provides a menu for initiating SSH/Telnet/Custom Apps connections.", From 4f87806949d7a2d9cef7c8d2e9fc268dac68470a Mon Sep 17 00:00:00 2001 From: Udi Oron Date: Mon, 2 Nov 2015 00:08:47 +0200 Subject: [PATCH 5/5] updated to gnome 3.18 --- metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata.json b/metadata.json index 0a3ba77..f5b3372 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { - "shell-version": ["3.12", "3.14", "3.16"], - "version": "0.8.4", + "shell-version": ["3.12", "3.14", "3.16", "3.18"], + "version": "0.8.5", "uuid": "connectionmanager2@ciancio.net", "name": "Connection Manager", "description": "Simple GUI app for Gnome 3 that provides a menu for initiating SSH/Telnet/Custom Apps connections.",