{"action":"created","issue":{"url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/7389","repository_url":"https://api.github.com/repos/linuxmint/Cinnamon","labels_url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/7389/labels{/name}","comments_url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/7389/comments","events_url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/7389/events","html_url":"https://github.com/linuxmint/Cinnamon/pull/7389","id":308042028,"number":7389,"title":"Applet, desklets: switch to class syntax, remove try-catch blocks","user":{"login":"jaszhix","id":6859057,"avatar_url":"https://avatars3.githubusercontent.com/u/6859057?v=4","gravatar_id":"","url":"https://api.github.com/users/jaszhix","html_url":"https://github.com/jaszhix","followers_url":"https://api.github.com/users/jaszhix/followers","following_url":"https://api.github.com/users/jaszhix/following{/other_user}","gists_url":"https://api.github.com/users/jaszhix/gists{/gist_id}","starred_url":"https://api.github.com/users/jaszhix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaszhix/subscriptions","organizations_url":"https://api.github.com/users/jaszhix/orgs","repos_url":"https://api.github.com/users/jaszhix/repos","events_url":"https://api.github.com/users/jaszhix/events{/privacy}","received_events_url":"https://api.github.com/users/jaszhix/received_events","type":"User","site_admin":false},"labels":[{"id":816165793,"url":"https://api.github.com/repos/linuxmint/Cinnamon/labels/In%20Progress","name":"In Progress","color":"e6e6e6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-23T14:05:11Z","updated_at":"2018-03-23T18:23:47Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/linuxmint/Cinnamon/pulls/7389","html_url":"https://github.com/linuxmint/Cinnamon/pull/7389","diff_url":"https://github.com/linuxmint/Cinnamon/pull/7389.diff","patch_url":"https://github.com/linuxmint/Cinnamon/pull/7389.patch"},"body":"- Updates stock xlets with class syntax. `_init` needed to be replaced with `constructor` for cases where multiple levels of classes are subclassed for this to work, and the usage was adapted everywhere else for consistency. `constructor` is the equivalent of `function MyApplet(...) {...}` and `super` is the equivalent of `Applet.Applet.prototype.call(this, ...)`. Super calls the parent object.\r\n\r\n- Remove large try-catch blocks found in _init methods and a couple other spots. This was done because there are already two or more levels of try-catch blocks wrapping xlet execution. Try-catch isn't free performance-wise, and can make debugging more difficult. Xlet exceptions are always caught by either an xlet manager, extension.js, or fileUtils.js.\r\n\r\n- In the files where a lot of lines were already changed and the indentation looked rough, I ran [prettier-eslint](https://github.com/prettier/prettier-eslint) on the file. This auto-formats the code using the .eslintrc.json file in the Cinnamon repo.\r\n\r\n- Updated fileUtils.js so classes can be imported from the xlet importer easily, for the Calendar applet. This cannot currently be done in non-xlet Cinnamon files without lexical scope warnings occurring from GJS' module implementation.\r\n\r\n- Made the TooltipBase class a subclass-able object since it is being used that way in the window list applet - doesn't work with class syntax otherwise.\r\n\r\n- Fixed SystemButton from the menu applet subclassing PopupSubMenuMenuItem and intializing with PopupBaseMenuItem, for class support. PopupSubMenuMenuItem inherits PopupBaseMenuItem.\r\n\r\n- Excluded the network applet because of its complexity and outstanding PRs still open. Don't mind rebasing if other conflicting PRs get merged.\r\n\r\n- Gives xlet constructors unique names so extensions are recognizable with `global.dump_gjs_stack`."},"comment":{"url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/comments/375758315","html_url":"https://github.com/linuxmint/Cinnamon/pull/7389#issuecomment-375758315","issue_url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/7389","id":375758315,"user":{"login":"brownsr","id":6322481,"avatar_url":"https://avatars2.githubusercontent.com/u/6322481?v=4","gravatar_id":"","url":"https://api.github.com/users/brownsr","html_url":"https://github.com/brownsr","followers_url":"https://api.github.com/users/brownsr/followers","following_url":"https://api.github.com/users/brownsr/following{/other_user}","gists_url":"https://api.github.com/users/brownsr/gists{/gist_id}","starred_url":"https://api.github.com/users/brownsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brownsr/subscriptions","organizations_url":"https://api.github.com/users/brownsr/orgs","repos_url":"https://api.github.com/users/brownsr/repos","events_url":"https://api.github.com/users/brownsr/events{/privacy}","received_events_url":"https://api.github.com/users/brownsr/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T18:23:47Z","updated_at":"2018-03-23T18:23:47Z","author_association":"MEMBER","body":"Ah ... cinnamon process was up to 600mb a couple of hours later, way more than I normally see. Might want to check for memory leaks."}}
{"actor":{"display_login":"brownsr"}}