Applet does not work in Linux Mint 18.1

Issue #1 resolved
Mike created an issue

The applet does not work anymore in 18.1.

Comments (11)

  1. Mike reporter

    With trial & error I found a working solution. Here's my diff, but it may be imperfect:

    index e16721d..19c107e 100644
    --- a/sshlauncher@sumo/applet.js
    +++ b/sshlauncher@stoffld/applet.js
    @@ -9,19 +9,6 @@ const Main = imports.ui.main;
     const MessageTray = imports.ui.messageTray;
     const Gio = imports.gi.Gio;
    
    -function MyMenu(launcher, orientation) {
    -  this._init(launcher, orientation);
    -}
    -MyMenu.prototype = {
    -  __proto__: PopupMenu.PopupMenu.prototype,
    -  _init: function(launcher, orientation) {
    -    this._launcher = launcher;
    -    PopupMenu.PopupMenu.prototype._init.call(this, launcher.actor, 0.0, orientation, 0);
    -    Main.uiGroup.add_actor(this.actor);
    -    this.actor.hide();
    -  }
    -}
    -
     function MyApplet(metadata, orientation) {
       this._init(metadata, orientation);
     };
    @@ -29,13 +16,13 @@ function MyApplet(metadata, orientation) {
     MyApplet.prototype = {
       __proto__: Applet.IconApplet.prototype,
    
    -  _init: function(metadata, orientation) {
    -    Applet.IconApplet.prototype._init.call(this, orientation);
    +  _init: function(metadata, orientation, panel_height, instance_id) {
    +    Applet.IconApplet.prototype._init.call(this, orientation, panel_height, instance_id);
    
         try {
           this.set_applet_icon_name("network");
           this.menuManager = new PopupMenu.PopupMenuManager(this);
    -      this.menu = new MyMenu(this, orientation);
    +      this.menu = new Applet.AppletPopupMenu(this, orientation);
           this.menuManager.addMenu(this.menu);
           this.appletPath = metadata.path;
           this.gsettings = Gio.Settings.new("org.gnome.desktop.default-applications.terminal");
    @@ -124,7 +111,7 @@ MyApplet.prototype = {
       }
     };
    
    -function main(metadata, orientation) {
    -  let myApplet = new MyApplet(metadata, orientation);
    +function main(metadata, orientation, panel_height, instance_id) {
    +  let myApplet = new MyApplet(metadata, orientation, panel_height, instance_id);
       return myApplet;
     }
    
  2. Sumit Raja repo owner

    Merged and checked in. I've tested on an upgrade 18.1. @mikehaertl and @kickertom any chance you can test before I upload?

  3. Mike reporter

    There's one thing left: There's still a warning in the applet manager, that this applet uses system calls that may affect system performance (german for me). Not sure what's causing this, but maybe this can also be fixed?

    Update: Sorry, forget this comment. I've updated too early as it showed that an update is available. But it really just reset my modified version to the original disfunctional version. Waiting for the official release now.

  4. Mike reporter

    @sumitraja I hope, it's not false alarm again, but when I try to install the applet from the applet manager I get this error:

    Details: [Errno 2] File or directory not found: '/tmp/tmpmAgbCT/metadata.json'

  5. Log in to comment