|
|
@ -4,6 +4,8 @@ const Gio = imports.gi.Gio;
|
|
|
|
const Extension = imports.misc.extensionUtils.getCurrentExtension();
|
|
|
|
const Extension = imports.misc.extensionUtils.getCurrentExtension();
|
|
|
|
const Dialog = Extension.imports.dialog;
|
|
|
|
const Dialog = Extension.imports.dialog;
|
|
|
|
const Menu = Extension.imports.menu;
|
|
|
|
const Menu = Extension.imports.menu;
|
|
|
|
|
|
|
|
const ConnectionMonitor = Extension.imports.cmonitor;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
function init() {
|
|
|
|
return new FirewallSupport();
|
|
|
|
return new FirewallSupport();
|
|
|
@ -14,6 +16,7 @@ const FirewallSupport = new Lang.Class({
|
|
|
|
|
|
|
|
|
|
|
|
_init: function() {
|
|
|
|
_init: function() {
|
|
|
|
this.menu = new Menu.FirewallMenu();
|
|
|
|
this.menu = new Menu.FirewallMenu();
|
|
|
|
|
|
|
|
this.cmon = new ConnectionMonitor.ConnectionMonitor();
|
|
|
|
this.handler = null;
|
|
|
|
this.handler = null;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -26,10 +29,12 @@ const FirewallSupport = new Lang.Class({
|
|
|
|
enable: function() {
|
|
|
|
enable: function() {
|
|
|
|
this._destroyHandler();
|
|
|
|
this._destroyHandler();
|
|
|
|
this.handler = new FirewallPromptHandler();
|
|
|
|
this.handler = new FirewallPromptHandler();
|
|
|
|
|
|
|
|
this.cmon.install();
|
|
|
|
this.menu.install();
|
|
|
|
this.menu.install();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
disable: function() {
|
|
|
|
disable: function() {
|
|
|
|
this.menu.destroy();
|
|
|
|
this.menu.destroy();
|
|
|
|
|
|
|
|
this.cmon.remove();
|
|
|
|
this._destroyHandler();
|
|
|
|
this._destroyHandler();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|