{"action":"created","issue":{"url":"https://api.github.com/repos/buttercup-pw/buttercup/issues/29","labels_url":"https://api.github.com/repos/buttercup-pw/buttercup/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/buttercup-pw/buttercup/issues/29/comments","events_url":"https://api.github.com/repos/buttercup-pw/buttercup/issues/29/events","html_url":"https://github.com/buttercup-pw/buttercup/issues/29","id":129902636,"number":29,"title":"Choosing \"quit\" from system menu results in error","user":{"login":"perry-mitchell","id":3869469,"avatar_url":"https://avatars.githubusercontent.com/u/3869469?v=3","gravatar_id":"","url":"https://api.github.com/users/perry-mitchell","html_url":"https://github.com/perry-mitchell","followers_url":"https://api.github.com/users/perry-mitchell/followers","following_url":"https://api.github.com/users/perry-mitchell/following{/other_user}","gists_url":"https://api.github.com/users/perry-mitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/perry-mitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perry-mitchell/subscriptions","organizations_url":"https://api.github.com/users/perry-mitchell/orgs","repos_url":"https://api.github.com/users/perry-mitchell/repos","events_url":"https://api.github.com/users/perry-mitchell/events{/privacy}","received_events_url":"https://api.github.com/users/perry-mitchell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/buttercup-pw/buttercup/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/buttercup-pw/buttercup/labels/os:mac","name":"os:mac","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-29T22:41:21Z","updated_at":"2016-02-01T21:11:50Z","closed_at":null,"body":"A system error occurs when selecting \"Quit\" from the Buttercup system menu on Mac."},"comment":{"url":"https://api.github.com/repos/buttercup-pw/buttercup/issues/comments/178193348","html_url":"https://github.com/buttercup-pw/buttercup/issues/29#issuecomment-178193348","issue_url":"https://api.github.com/repos/buttercup-pw/buttercup/issues/29","id":178193348,"user":{"login":"kbariotis","id":605742,"avatar_url":"https://avatars.githubusercontent.com/u/605742?v=3","gravatar_id":"","url":"https://api.github.com/users/kbariotis","html_url":"https://github.com/kbariotis","followers_url":"https://api.github.com/users/kbariotis/followers","following_url":"https://api.github.com/users/kbariotis/following{/other_user}","gists_url":"https://api.github.com/users/kbariotis/gists{/gist_id}","starred_url":"https://api.github.com/users/kbariotis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbariotis/subscriptions","organizations_url":"https://api.github.com/users/kbariotis/orgs","repos_url":"https://api.github.com/users/kbariotis/repos","events_url":"https://api.github.com/users/kbariotis/events{/privacy}","received_events_url":"https://api.github.com/users/kbariotis/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T21:11:50Z","updated_at":"2016-02-01T21:11:50Z","body":"Hello @perry-mitchell, great project you've putted there. :)\r\n\r\nI played a bit with this issue. It seems like having an Archive window open and the Quit command is clicked, the Archive window will receive the [`Closed`](https://github.com/buttercup-pw/buttercup/blob/master/source/app/events.js#L49) event which will attempt to open an Intro window and this will mess up the quit process.\r\n\r\nI tried to separate the CMD+Q command from when the user close windows. The `window-all-closed` will handle the situation when the user close windows so the CMD+Q command won't try to reopen windows.\r\n\r\nThis will work with the current window strategy. Intro window is open but no Archive windows. When the Intro closes, the app quits. Archive window is open but no Intro window. When the Archive closes, the Intro will reopen.\r\n\r\nThis also got me into thinking that the app must be able to prevent from quitting e.g. when the use is in the middle of adding an entry. But I believe that could go in a separate task."}}