{"action":"created","comment":{"url":"https://api.github.com/repos/feross/webtorrent-app/pulls/comments/55947702","id":55947702,"diff_hunk":"@@ -113,6 +117,21 @@ function showOpenTorrentFile () {\n   })\n }\n \n+// Open the preferences window\n+function showPreferencesWindow () {\n+  windows.createPreferencesWindow()\n+}\n+\n+function showSelectDownloadDirectory() {\n+  electron.dialog.showOpenDialog(windows.preferences, {\n+    title: 'Select a directory to save in.',","path":"main/menu.js","position":32,"original_position":32,"commit_id":"c51709ce9523eff7eeea014b84c97ff26921389a","original_commit_id":"c51709ce9523eff7eeea014b84c97ff26921389a","user":{"login":"dcposch","id":169280,"avatar_url":"https://avatars.githubusercontent.com/u/169280?v=3","gravatar_id":"","url":"https://api.github.com/users/dcposch","html_url":"https://github.com/dcposch","followers_url":"https://api.github.com/users/dcposch/followers","following_url":"https://api.github.com/users/dcposch/following{/other_user}","gists_url":"https://api.github.com/users/dcposch/gists{/gist_id}","starred_url":"https://api.github.com/users/dcposch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcposch/subscriptions","organizations_url":"https://api.github.com/users/dcposch/orgs","repos_url":"https://api.github.com/users/dcposch/repos","events_url":"https://api.github.com/users/dcposch/events{/privacy}","received_events_url":"https://api.github.com/users/dcposch/received_events","type":"User","site_admin":false},"body":"This looks like the right place for `showSelectDownloadDirectory`. I'd delete the other copy of this function down in `renderer/preferences.js`","created_at":"2016-03-14T01:04:52Z","updated_at":"2016-03-14T01:04:52Z","html_url":"https://github.com/feross/webtorrent-app/pull/144#discussion_r55947702","pull_request_url":"https://api.github.com/repos/feross/webtorrent-app/pulls/144","_links":{"self":{"href":"https://api.github.com/repos/feross/webtorrent-app/pulls/comments/55947702"},"html":{"href":"https://github.com/feross/webtorrent-app/pull/144#discussion_r55947702"},"pull_request":{"href":"https://api.github.com/repos/feross/webtorrent-app/pulls/144"}}},"pull_request":{"url":"https://api.github.com/repos/feross/webtorrent-app/pulls/144","id":62659714,"html_url":"https://github.com/feross/webtorrent-app/pull/144","diff_url":"https://github.com/feross/webtorrent-app/pull/144.diff","patch_url":"https://github.com/feross/webtorrent-app/pull/144.patch","issue_url":"https://api.github.com/repos/feross/webtorrent-app/issues/144","number":144,"state":"open","locked":false,"title":"Code Review: Basis for preferences window","user":{"login":"ChrisMorrisOrg","id":2949020,"avatar_url":"https://avatars.githubusercontent.com/u/2949020?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisMorrisOrg","html_url":"https://github.com/ChrisMorrisOrg","followers_url":"https://api.github.com/users/ChrisMorrisOrg/followers","following_url":"https://api.github.com/users/ChrisMorrisOrg/following{/other_user}","gists_url":"https://api.github.com/users/ChrisMorrisOrg/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisMorrisOrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisMorrisOrg/subscriptions","organizations_url":"https://api.github.com/users/ChrisMorrisOrg/orgs","repos_url":"https://api.github.com/users/ChrisMorrisOrg/repos","events_url":"https://api.github.com/users/ChrisMorrisOrg/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisMorrisOrg/received_events","type":"User","site_admin":false},"body":"Just wanting feedback on what I've written so far. This isn't ready for a merge.\r\n\r\nAny review/suggestions would be great. Currently it doesn't seem to update the downloadPath, gotta look into that. Secondly, it doesn't currently display the existing downloadPath because I'm not sure what the best way to handle that is. I've tried to mimic the pattern used in the main app, which involved putting the dialogue box call in menu.js, not sure how I feel about that, but it's a central point that has access to windows.js. I figured there's a reason not to include windows.js within the preferences.js file itself.","created_at":"2016-03-13T02:45:59Z","updated_at":"2016-03-14T01:04:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7fb4cae3ac67c23ddc9a86c378593375c6e61ac","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/feross/webtorrent-app/pulls/144/commits","review_comments_url":"https://api.github.com/repos/feross/webtorrent-app/pulls/144/comments","review_comment_url":"https://api.github.com/repos/feross/webtorrent-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/feross/webtorrent-app/issues/144/comments","statuses_url":"https://api.github.com/repos/feross/webtorrent-app/statuses/c51709ce9523eff7eeea014b84c97ff26921389a","head":{"label":"ChrisMorrisOrg:chrismorris-preferences","ref":"chrismorris-preferences","sha":"c51709ce9523eff7eeea014b84c97ff26921389a","user":{"login":"ChrisMorrisOrg","id":2949020,"avatar_url":"https://avatars.githubusercontent.com/u/2949020?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisMorrisOrg","html_url":"https://github.com/ChrisMorrisOrg","followers_url":"https://api.github.com/users/ChrisMorrisOrg/followers","following_url":"https://api.github.com/users/ChrisMorrisOrg/following{/other_user}","gists_url":"https://api.github.com/users/ChrisMorrisOrg/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisMorrisOrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisMorrisOrg/subscriptions","organizations_url":"https://api.github.com/users/ChrisMorrisOrg/orgs","repos_url":"https://api.github.com/users/ChrisMorrisOrg/repos","events_url":"https://api.github.com/users/ChrisMorrisOrg/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisMorrisOrg/received_events","type":"User","site_admin":false},"repo":{"id":53701390,"name":"webtorrent-app","full_name":"ChrisMorrisOrg/webtorrent-app","owner":{"login":"ChrisMorrisOrg","id":2949020,"avatar_url":"https://avatars.githubusercontent.com/u/2949020?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisMorrisOrg","html_url":"https://github.com/ChrisMorrisOrg","followers_url":"https://api.github.com/users/ChrisMorrisOrg/followers","following_url":"https://api.github.com/users/ChrisMorrisOrg/following{/other_user}","gists_url":"https://api.github.com/users/ChrisMorrisOrg/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisMorrisOrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisMorrisOrg/subscriptions","organizations_url":"https://api.github.com/users/ChrisMorrisOrg/orgs","repos_url":"https://api.github.com/users/ChrisMorrisOrg/repos","events_url":"https://api.github.com/users/ChrisMorrisOrg/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisMorrisOrg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChrisMorrisOrg/webtorrent-app","description":"WebTorrent, the streaming torrent client. For OS X, Windows, and Linux.","fork":true,"url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app","forks_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/forks","keys_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/teams","hooks_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/hooks","issue_events_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/issues/events{/number}","events_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/events","assignees_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/assignees{/user}","branches_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/branches{/branch}","tags_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/tags","blobs_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/statuses/{sha}","languages_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/languages","stargazers_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/stargazers","contributors_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/contributors","subscribers_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/subscribers","subscription_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/subscription","commits_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/contents/{+path}","compare_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/merges","archive_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/downloads","issues_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/issues{/number}","pulls_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/pulls{/number}","milestones_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/milestones{/number}","notifications_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/labels{/name}","releases_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/releases{/id}","deployments_url":"https://api.github.com/repos/ChrisMorrisOrg/webtorrent-app/deployments","created_at":"2016-03-11T22:49:01Z","updated_at":"2016-03-11T22:49:02Z","pushed_at":"2016-03-13T01:37:59Z","git_url":"git://github.com/ChrisMorrisOrg/webtorrent-app.git","ssh_url":"git@github.com:ChrisMorrisOrg/webtorrent-app.git","clone_url":"https://github.com/ChrisMorrisOrg/webtorrent-app.git","svn_url":"https://github.com/ChrisMorrisOrg/webtorrent-app","homepage":"","size":4346,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"feross:master","ref":"master","sha":"6ba0d65daf8d767d500faf8829650839df6b2339","user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"repo":{"id":35015575,"name":"webtorrent-app","full_name":"feross/webtorrent-app","owner":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/feross/webtorrent-app","description":"WebTorrent, the streaming torrent client. For OS X, Windows, and Linux.","fork":false,"url":"https://api.github.com/repos/feross/webtorrent-app","forks_url":"https://api.github.com/repos/feross/webtorrent-app/forks","keys_url":"https://api.github.com/repos/feross/webtorrent-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feross/webtorrent-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feross/webtorrent-app/teams","hooks_url":"https://api.github.com/repos/feross/webtorrent-app/hooks","issue_events_url":"https://api.github.com/repos/feross/webtorrent-app/issues/events{/number}","events_url":"https://api.github.com/repos/feross/webtorrent-app/events","assignees_url":"https://api.github.com/repos/feross/webtorrent-app/assignees{/user}","branches_url":"https://api.github.com/repos/feross/webtorrent-app/branches{/branch}","tags_url":"https://api.github.com/repos/feross/webtorrent-app/tags","blobs_url":"https://api.github.com/repos/feross/webtorrent-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feross/webtorrent-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feross/webtorrent-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/feross/webtorrent-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feross/webtorrent-app/statuses/{sha}","languages_url":"https://api.github.com/repos/feross/webtorrent-app/languages","stargazers_url":"https://api.github.com/repos/feross/webtorrent-app/stargazers","contributors_url":"https://api.github.com/repos/feross/webtorrent-app/contributors","subscribers_url":"https://api.github.com/repos/feross/webtorrent-app/subscribers","subscription_url":"https://api.github.com/repos/feross/webtorrent-app/subscription","commits_url":"https://api.github.com/repos/feross/webtorrent-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/feross/webtorrent-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/feross/webtorrent-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/feross/webtorrent-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/feross/webtorrent-app/contents/{+path}","compare_url":"https://api.github.com/repos/feross/webtorrent-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feross/webtorrent-app/merges","archive_url":"https://api.github.com/repos/feross/webtorrent-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feross/webtorrent-app/downloads","issues_url":"https://api.github.com/repos/feross/webtorrent-app/issues{/number}","pulls_url":"https://api.github.com/repos/feross/webtorrent-app/pulls{/number}","milestones_url":"https://api.github.com/repos/feross/webtorrent-app/milestones{/number}","notifications_url":"https://api.github.com/repos/feross/webtorrent-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feross/webtorrent-app/labels{/name}","releases_url":"https://api.github.com/repos/feross/webtorrent-app/releases{/id}","deployments_url":"https://api.github.com/repos/feross/webtorrent-app/deployments","created_at":"2015-05-04T05:21:35Z","updated_at":"2016-03-13T21:29:53Z","pushed_at":"2016-03-14T00:52:16Z","git_url":"git://github.com/feross/webtorrent-app.git","ssh_url":"git@github.com:feross/webtorrent-app.git","clone_url":"https://github.com/feross/webtorrent-app.git","svn_url":"https://github.com/feross/webtorrent-app","homepage":"","size":4349,"stargazers_count":181,"watchers_count":181,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":22,"forks":11,"open_issues":22,"watchers":181,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/feross/webtorrent-app/pulls/144"},"html":{"href":"https://github.com/feross/webtorrent-app/pull/144"},"issue":{"href":"https://api.github.com/repos/feross/webtorrent-app/issues/144"},"comments":{"href":"https://api.github.com/repos/feross/webtorrent-app/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/feross/webtorrent-app/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/feross/webtorrent-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/feross/webtorrent-app/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/feross/webtorrent-app/statuses/c51709ce9523eff7eeea014b84c97ff26921389a"}}}}