{"action":"created","comment":{"url":"https://api.github.com/repos/metabrainz/picard/pulls/comments/172022466","pull_request_review_id":100980373,"id":172022466,"diff_hunk":"@@ -30,6 +32,36 @@ def __init__(self, parent=None):\n         super().__init__(parent, self.flags)\n \n \n+class SaveGeometry(object):","path":"picard/ui/__init__.py","position":14,"original_position":14,"commit_id":"b3044c0a38dfb748e426607636a993ac9bca3b79","original_commit_id":"b3044c0a38dfb748e426607636a993ac9bca3b79","user":{"login":"sambhav","id":16130816,"avatar_url":"https://avatars1.githubusercontent.com/u/16130816?v=4","gravatar_id":"","url":"https://api.github.com/users/sambhav","html_url":"https://github.com/sambhav","followers_url":"https://api.github.com/users/sambhav/followers","following_url":"https://api.github.com/users/sambhav/following{/other_user}","gists_url":"https://api.github.com/users/sambhav/gists{/gist_id}","starred_url":"https://api.github.com/users/sambhav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sambhav/subscriptions","organizations_url":"https://api.github.com/users/sambhav/orgs","repos_url":"https://api.github.com/users/sambhav/repos","events_url":"https://api.github.com/users/sambhav/events{/privacy}","received_events_url":"https://api.github.com/users/sambhav/received_events","type":"User","site_admin":false},"body":"Infact, I dont find a single PicardDialog (You missed a couple in ui/passworddialog that can also be included to inherit from this) that doesn't implement this functionality. Seems like we can merge this code with PicardDialog and inherit from a single class.","created_at":"2018-03-03T17:09:20Z","updated_at":"2018-03-03T17:09:58Z","html_url":"https://github.com/metabrainz/picard/pull/857#discussion_r172022466","pull_request_url":"https://api.github.com/repos/metabrainz/picard/pulls/857","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/comments/172022466"},"html":{"href":"https://github.com/metabrainz/picard/pull/857#discussion_r172022466"},"pull_request":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/857"}},"in_reply_to_id":172022171},"pull_request":{"url":"https://api.github.com/repos/metabrainz/picard/pulls/857","id":172670577,"html_url":"https://github.com/metabrainz/picard/pull/857","diff_url":"https://github.com/metabrainz/picard/pull/857.diff","patch_url":"https://github.com/metabrainz/picard/pull/857.patch","issue_url":"https://api.github.com/repos/metabrainz/picard/issues/857","number":857,"state":"open","locked":false,"title":"Generic class to save/restore dialog geometry, code simplification","user":{"login":"zas","id":151042,"avatar_url":"https://avatars2.githubusercontent.com/u/151042?v=4","gravatar_id":"","url":"https://api.github.com/users/zas","html_url":"https://github.com/zas","followers_url":"https://api.github.com/users/zas/followers","following_url":"https://api.github.com/users/zas/following{/other_user}","gists_url":"https://api.github.com/users/zas/gists{/gist_id}","starred_url":"https://api.github.com/users/zas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zas/subscriptions","organizations_url":"https://api.github.com/users/zas/orgs","repos_url":"https://api.github.com/users/zas/repos","events_url":"https://api.github.com/users/zas/events{/privacy}","received_events_url":"https://api.github.com/users/zas/received_events","type":"User","site_admin":false},"body":"<!--\r\n    Hello! Thanks for submitting a pull request to MusicBrainz Picard. We\r\n    appreciate your time and interest in helping our project!\r\n\r\n    Use this template to help us review your change. Not everything is required,\r\n    depending on your change. Keep or delete what is relevant for your change.\r\n    Remember that it helps us review if you give more helpful info for us to\r\n    understand your change.\r\n\r\n    Ensure that you've read through and followed the Contributing Guidelines, in\r\n    [CONTRIBUTING.md](https://github.com/metabrainz/picard/blob/master/CONTRIBUTING.md).\r\n-->\r\n\r\n# Summary\r\n\r\n<!--\r\n    Update the checkbox with an [x] for the type of contribution you are making.\r\n-->\r\n\r\n* This is a…\r\n    * [ ] Bug fix\r\n    * [x] Feature addition\r\n    * [x] Refactoring\r\n    * [ ] Minor / simple change (like a typo)\r\n    * [ ] Other\r\n* **Describe this change in 1-2 sentences**:\r\n\r\nSimplify save/restoration of dialog geometry, using standard Qt saveGeometry() and restoreGeometry()\r\n\r\n# Problem\r\n\r\nA lot of code duplication, lack of checks for valid positions and/or sizes, plus various small issues.\r\n\r\n<!--\r\n    Anything that helps us understand why you are making this change goes here.\r\n    What problem are you trying to fix? What does this change address?\r\n-->\r\n\r\n* JIRA ticket (_optional_): [PICARD-1093](https://tickets.metabrainz.org/browse/PICARD-1093)\r\n<!--\r\n    Please make sure you prefix your pull request title with 'PICARD-XXX' in order\r\n    for our ticket tracker to link your pull request to the relevant ticket.\r\n-->\r\n\r\n\r\n\r\n# Solution\r\n\r\nImplement a generic class managing most of it.\r\nhttp://doc.qt.io/qt-5/restoring-geometry.html\r\n\r\n\r\n<!--\r\n    Other than merging your change, do you want / need us to do anything else\r\n    with your change? This could include reviewing a specific part of your PR.\r\n-->\r\n\r\n","created_at":"2018-03-03T14:52:36Z","updated_at":"2018-03-03T17:09:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79a8a455fa9f64a826004d88cf0285ace9da53cb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/metabrainz/picard/pulls/857/commits","review_comments_url":"https://api.github.com/repos/metabrainz/picard/pulls/857/comments","review_comment_url":"https://api.github.com/repos/metabrainz/picard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metabrainz/picard/issues/857/comments","statuses_url":"https://api.github.com/repos/metabrainz/picard/statuses/b3044c0a38dfb748e426607636a993ac9bca3b79","head":{"label":"zas:saverestore","ref":"saverestore","sha":"b3044c0a38dfb748e426607636a993ac9bca3b79","user":{"login":"zas","id":151042,"avatar_url":"https://avatars2.githubusercontent.com/u/151042?v=4","gravatar_id":"","url":"https://api.github.com/users/zas","html_url":"https://github.com/zas","followers_url":"https://api.github.com/users/zas/followers","following_url":"https://api.github.com/users/zas/following{/other_user}","gists_url":"https://api.github.com/users/zas/gists{/gist_id}","starred_url":"https://api.github.com/users/zas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zas/subscriptions","organizations_url":"https://api.github.com/users/zas/orgs","repos_url":"https://api.github.com/users/zas/repos","events_url":"https://api.github.com/users/zas/events{/privacy}","received_events_url":"https://api.github.com/users/zas/received_events","type":"User","site_admin":false},"repo":{"id":7479305,"name":"picard","full_name":"zas/picard","owner":{"login":"zas","id":151042,"avatar_url":"https://avatars2.githubusercontent.com/u/151042?v=4","gravatar_id":"","url":"https://api.github.com/users/zas","html_url":"https://github.com/zas","followers_url":"https://api.github.com/users/zas/followers","following_url":"https://api.github.com/users/zas/following{/other_user}","gists_url":"https://api.github.com/users/zas/gists{/gist_id}","starred_url":"https://api.github.com/users/zas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zas/subscriptions","organizations_url":"https://api.github.com/users/zas/orgs","repos_url":"https://api.github.com/users/zas/repos","events_url":"https://api.github.com/users/zas/events{/privacy}","received_events_url":"https://api.github.com/users/zas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zas/picard","description":"MusicBrainz Picard","fork":true,"url":"https://api.github.com/repos/zas/picard","forks_url":"https://api.github.com/repos/zas/picard/forks","keys_url":"https://api.github.com/repos/zas/picard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zas/picard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zas/picard/teams","hooks_url":"https://api.github.com/repos/zas/picard/hooks","issue_events_url":"https://api.github.com/repos/zas/picard/issues/events{/number}","events_url":"https://api.github.com/repos/zas/picard/events","assignees_url":"https://api.github.com/repos/zas/picard/assignees{/user}","branches_url":"https://api.github.com/repos/zas/picard/branches{/branch}","tags_url":"https://api.github.com/repos/zas/picard/tags","blobs_url":"https://api.github.com/repos/zas/picard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zas/picard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zas/picard/git/refs{/sha}","trees_url":"https://api.github.com/repos/zas/picard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zas/picard/statuses/{sha}","languages_url":"https://api.github.com/repos/zas/picard/languages","stargazers_url":"https://api.github.com/repos/zas/picard/stargazers","contributors_url":"https://api.github.com/repos/zas/picard/contributors","subscribers_url":"https://api.github.com/repos/zas/picard/subscribers","subscription_url":"https://api.github.com/repos/zas/picard/subscription","commits_url":"https://api.github.com/repos/zas/picard/commits{/sha}","git_commits_url":"https://api.github.com/repos/zas/picard/git/commits{/sha}","comments_url":"https://api.github.com/repos/zas/picard/comments{/number}","issue_comment_url":"https://api.github.com/repos/zas/picard/issues/comments{/number}","contents_url":"https://api.github.com/repos/zas/picard/contents/{+path}","compare_url":"https://api.github.com/repos/zas/picard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zas/picard/merges","archive_url":"https://api.github.com/repos/zas/picard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zas/picard/downloads","issues_url":"https://api.github.com/repos/zas/picard/issues{/number}","pulls_url":"https://api.github.com/repos/zas/picard/pulls{/number}","milestones_url":"https://api.github.com/repos/zas/picard/milestones{/number}","notifications_url":"https://api.github.com/repos/zas/picard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zas/picard/labels{/name}","releases_url":"https://api.github.com/repos/zas/picard/releases{/id}","deployments_url":"https://api.github.com/repos/zas/picard/deployments","created_at":"2013-01-07T08:45:26Z","updated_at":"2018-01-23T00:09:11Z","pushed_at":"2018-03-03T16:31:21Z","git_url":"git://github.com/zas/picard.git","ssh_url":"git@github.com:zas/picard.git","clone_url":"https://github.com/zas/picard.git","svn_url":"https://github.com/zas/picard","homepage":"http://musicbrainz.org/doc/MusicBrainz_Picard","size":26225,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"metabrainz:master","ref":"master","sha":"5d4f4c82e816518c393e44965848af4489f026c7","user":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars2.githubusercontent.com/u/293421?v=4","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"repo":{"id":2218679,"name":"picard","full_name":"metabrainz/picard","owner":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars2.githubusercontent.com/u/293421?v=4","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabrainz/picard","description":"MusicBrainz Picard","fork":false,"url":"https://api.github.com/repos/metabrainz/picard","forks_url":"https://api.github.com/repos/metabrainz/picard/forks","keys_url":"https://api.github.com/repos/metabrainz/picard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabrainz/picard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabrainz/picard/teams","hooks_url":"https://api.github.com/repos/metabrainz/picard/hooks","issue_events_url":"https://api.github.com/repos/metabrainz/picard/issues/events{/number}","events_url":"https://api.github.com/repos/metabrainz/picard/events","assignees_url":"https://api.github.com/repos/metabrainz/picard/assignees{/user}","branches_url":"https://api.github.com/repos/metabrainz/picard/branches{/branch}","tags_url":"https://api.github.com/repos/metabrainz/picard/tags","blobs_url":"https://api.github.com/repos/metabrainz/picard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabrainz/picard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabrainz/picard/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabrainz/picard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabrainz/picard/statuses/{sha}","languages_url":"https://api.github.com/repos/metabrainz/picard/languages","stargazers_url":"https://api.github.com/repos/metabrainz/picard/stargazers","contributors_url":"https://api.github.com/repos/metabrainz/picard/contributors","subscribers_url":"https://api.github.com/repos/metabrainz/picard/subscribers","subscription_url":"https://api.github.com/repos/metabrainz/picard/subscription","commits_url":"https://api.github.com/repos/metabrainz/picard/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabrainz/picard/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabrainz/picard/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabrainz/picard/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabrainz/picard/contents/{+path}","compare_url":"https://api.github.com/repos/metabrainz/picard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabrainz/picard/merges","archive_url":"https://api.github.com/repos/metabrainz/picard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabrainz/picard/downloads","issues_url":"https://api.github.com/repos/metabrainz/picard/issues{/number}","pulls_url":"https://api.github.com/repos/metabrainz/picard/pulls{/number}","milestones_url":"https://api.github.com/repos/metabrainz/picard/milestones{/number}","notifications_url":"https://api.github.com/repos/metabrainz/picard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabrainz/picard/labels{/name}","releases_url":"https://api.github.com/repos/metabrainz/picard/releases{/id}","deployments_url":"https://api.github.com/repos/metabrainz/picard/deployments","created_at":"2011-08-16T22:30:23Z","updated_at":"2018-03-02T05:28:16Z","pushed_at":"2018-03-03T16:31:22Z","git_url":"git://github.com/metabrainz/picard.git","ssh_url":"git@github.com:metabrainz/picard.git","clone_url":"https://github.com/metabrainz/picard.git","svn_url":"https://github.com/metabrainz/picard","homepage":"https://picard.musicbrainz.org","size":26012,"stargazers_count":1340,"watchers_count":1340,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":226,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":226,"open_issues":6,"watchers":1340,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/857"},"html":{"href":"https://github.com/metabrainz/picard/pull/857"},"issue":{"href":"https://api.github.com/repos/metabrainz/picard/issues/857"},"comments":{"href":"https://api.github.com/repos/metabrainz/picard/issues/857/comments"},"review_comments":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/857/comments"},"review_comment":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/857/commits"},"statuses":{"href":"https://api.github.com/repos/metabrainz/picard/statuses/b3044c0a38dfb748e426607636a993ac9bca3b79"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"sambhav"}}