{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/32892730","id":32892730,"diff_hunk":"@@ -311,23 +313,66 @@ void RPCConsole::setClientModel(ClientModel *model)\n         ui->peerWidget->setColumnWidth(PeerTableModel::Address, ADDRESS_COLUMN_WIDTH);\n         ui->peerWidget->setColumnWidth(PeerTableModel::Subversion, SUBVERSION_COLUMN_WIDTH);\n         ui->peerWidget->setColumnWidth(PeerTableModel::Ping, PING_COLUMN_WIDTH);\n+        ui->peerWidget->horizontalHeader()->setStretchLastSection(true);\n \n         // create context menu actions\n-        QAction* disconnectAction = new QAction(tr(\"&Disconnect Node\"), this);\n+        QAction* disconnectAction   = new QAction(tr(\"&Disconnect Node\"), this);\n+        QAction* banAction1h        = new QAction(tr(\"&Ban Node for\") + \" \" + tr(\"&1 hour\"), this);\n+        QAction* banAction24h       = new QAction(tr(\"&Ban Node for\") + \" \" + tr(\"&24 hours\"), this);\n+        QAction* banAction7d        = new QAction(tr(\"&Ban Node for\") + \" \" + tr(\"&7 days\"), this);\n+        QAction* banAction365d      = new QAction(tr(\"&Ban Node for\") + \" \" + tr(\"&1 year\"), this);\n \n         // create context menu\n-        contextMenu = new QMenu();\n-        contextMenu->addAction(disconnectAction);\n+        peersTableContextMenu = new QMenu();\n+        peersTableContextMenu->addAction(disconnectAction);\n+        peersTableContextMenu->addAction(banAction1h);\n+        peersTableContextMenu->addAction(banAction24h);\n+        peersTableContextMenu->addAction(banAction7d);\n+        peersTableContextMenu->addAction(banAction365d);\n \n         // context menu signals\n-        connect(ui->peerWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showMenu(const QPoint&)));\n+        connect(ui->peerWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showPeersTableContextMenu(const QPoint&)));\n         connect(disconnectAction, SIGNAL(triggered()), this, SLOT(disconnectSelectedNode()));\n \n+        //add a signal mapping to allow a dynamic argument","path":"src/qt/rpcconsole.cpp","position":47,"original_position":47,"commit_id":"114c72213da9496a7126b41562bd91efd438ecf2","original_commit_id":"114c72213da9496a7126b41562bd91efd438ecf2","user":{"login":"Diapolo","id":1419649,"avatar_url":"https://avatars.githubusercontent.com/u/1419649?v=3","gravatar_id":"","url":"https://api.github.com/users/Diapolo","html_url":"https://github.com/Diapolo","followers_url":"https://api.github.com/users/Diapolo/followers","following_url":"https://api.github.com/users/Diapolo/following{/other_user}","gists_url":"https://api.github.com/users/Diapolo/gists{/gist_id}","starred_url":"https://api.github.com/users/Diapolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Diapolo/subscriptions","organizations_url":"https://api.github.com/users/Diapolo/orgs","repos_url":"https://api.github.com/users/Diapolo/repos","events_url":"https://api.github.com/users/Diapolo/events{/privacy}","received_events_url":"https://api.github.com/users/Diapolo/received_events","type":"User","site_admin":false},"body":"Nit: These comments are missing a whitespace at the front.","created_at":"2015-06-21T11:25:32Z","updated_at":"2015-06-21T11:25:32Z","html_url":"https://github.com/bitcoin/bitcoin/pull/6315#discussion_r32892730","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6315","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/32892730"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/6315#discussion_r32892730"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6315"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6315","id":38173405,"html_url":"https://github.com/bitcoin/bitcoin/pull/6315","diff_url":"https://github.com/bitcoin/bitcoin/pull/6315.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/6315.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6315","number":6315,"state":"open","locked":false,"title":"[Qt] allow banning and unbanning over UI->peers table","user":{"login":"jonasschnelli","id":178464,"avatar_url":"https://avatars.githubusercontent.com/u/178464?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasschnelli","html_url":"https://github.com/jonasschnelli","followers_url":"https://api.github.com/users/jonasschnelli/followers","following_url":"https://api.github.com/users/jonasschnelli/following{/other_user}","gists_url":"https://api.github.com/users/jonasschnelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasschnelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasschnelli/subscriptions","organizations_url":"https://api.github.com/users/jonasschnelli/orgs","repos_url":"https://api.github.com/users/jonasschnelli/repos","events_url":"https://api.github.com/users/jonasschnelli/events{/privacy}","received_events_url":"https://api.github.com/users/jonasschnelli/received_events","type":"User","site_admin":false},"body":"This adds 4 ban options to the peers tables context menu (1h, 24h, 7d, 365d). If there are active bans, a table with banned subnets will be shown.\r\nSync between the rpc bans and the ui bans are guaranteed over a new `uiInterface` signal.\r\n\r\nScreenshots:\r\n![bildschirmfoto-2015-06-20-um-21 58 44](https://cloud.githubusercontent.com/assets/178464/8269026/ac00e74e-1797-11e5-8018-fa8b447292de.png)\r\n![bildschirmfoto-2015-06-20-um-21 58 59](https://cloud.githubusercontent.com/assets/178464/8269027/ac287b24-1797-11e5-92b3-9d6c17d00fde.png)\r\n","created_at":"2015-06-20T19:59:58Z","updated_at":"2015-06-21T11:25:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5936467ececb4efd38457dfcedafbda48644d2da","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6315/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6315/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6315/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/114c72213da9496a7126b41562bd91efd438ecf2","head":{"label":"jonasschnelli:2015/06/qt_ban","ref":"2015/06/qt_ban","sha":"114c72213da9496a7126b41562bd91efd438ecf2","user":{"login":"jonasschnelli","id":178464,"avatar_url":"https://avatars.githubusercontent.com/u/178464?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasschnelli","html_url":"https://github.com/jonasschnelli","followers_url":"https://api.github.com/users/jonasschnelli/followers","following_url":"https://api.github.com/users/jonasschnelli/following{/other_user}","gists_url":"https://api.github.com/users/jonasschnelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasschnelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasschnelli/subscriptions","organizations_url":"https://api.github.com/users/jonasschnelli/orgs","repos_url":"https://api.github.com/users/jonasschnelli/repos","events_url":"https://api.github.com/users/jonasschnelli/events{/privacy}","received_events_url":"https://api.github.com/users/jonasschnelli/received_events","type":"User","site_admin":false},"repo":{"id":9264454,"name":"bitcoin","full_name":"jonasschnelli/bitcoin","owner":{"login":"jonasschnelli","id":178464,"avatar_url":"https://avatars.githubusercontent.com/u/178464?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasschnelli","html_url":"https://github.com/jonasschnelli","followers_url":"https://api.github.com/users/jonasschnelli/followers","following_url":"https://api.github.com/users/jonasschnelli/following{/other_user}","gists_url":"https://api.github.com/users/jonasschnelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasschnelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasschnelli/subscriptions","organizations_url":"https://api.github.com/users/jonasschnelli/orgs","repos_url":"https://api.github.com/users/jonasschnelli/repos","events_url":"https://api.github.com/users/jonasschnelli/events{/privacy}","received_events_url":"https://api.github.com/users/jonasschnelli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonasschnelli/bitcoin","description":"Bitcoin integration/staging tree","fork":true,"url":"https://api.github.com/repos/jonasschnelli/bitcoin","forks_url":"https://api.github.com/repos/jonasschnelli/bitcoin/forks","keys_url":"https://api.github.com/repos/jonasschnelli/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonasschnelli/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonasschnelli/bitcoin/teams","hooks_url":"https://api.github.com/repos/jonasschnelli/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/jonasschnelli/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/jonasschnelli/bitcoin/events","assignees_url":"https://api.github.com/repos/jonasschnelli/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/jonasschnelli/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/jonasschnelli/bitcoin/tags","blobs_url":"https://api.github.com/repos/jonasschnelli/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonasschnelli/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonasschnelli/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonasschnelli/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonasschnelli/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/jonasschnelli/bitcoin/languages","stargazers_url":"https://api.github.com/repos/jonasschnelli/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/jonasschnelli/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/jonasschnelli/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/jonasschnelli/bitcoin/subscription","commits_url":"https://api.github.com/repos/jonasschnelli/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonasschnelli/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonasschnelli/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonasschnelli/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonasschnelli/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/jonasschnelli/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonasschnelli/bitcoin/merges","archive_url":"https://api.github.com/repos/jonasschnelli/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonasschnelli/bitcoin/downloads","issues_url":"https://api.github.com/repos/jonasschnelli/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/jonasschnelli/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/jonasschnelli/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/jonasschnelli/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonasschnelli/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/jonasschnelli/bitcoin/releases{/id}","created_at":"2013-04-06T18:21:51Z","updated_at":"2015-04-28T12:20:21Z","pushed_at":"2015-06-21T08:44:53Z","git_url":"git://github.com/jonasschnelli/bitcoin.git","ssh_url":"git@github.com:jonasschnelli/bitcoin.git","clone_url":"https://github.com/jonasschnelli/bitcoin.git","svn_url":"https://github.com/jonasschnelli/bitcoin","homepage":"http://www.bitcoin.org","size":55550,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"bitcoin:master","ref":"master","sha":"247b91449ad7d041c6af5d2abf5660ab00be0fb4","user":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars.githubusercontent.com/u/528860?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoin","html_url":"https://github.com/bitcoin","followers_url":"https://api.github.com/users/bitcoin/followers","following_url":"https://api.github.com/users/bitcoin/following{/other_user}","gists_url":"https://api.github.com/users/bitcoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoin/subscriptions","organizations_url":"https://api.github.com/users/bitcoin/orgs","repos_url":"https://api.github.com/users/bitcoin/repos","events_url":"https://api.github.com/users/bitcoin/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoin/received_events","type":"Organization","site_admin":false},"repo":{"id":1181927,"name":"bitcoin","full_name":"bitcoin/bitcoin","owner":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars.githubusercontent.com/u/528860?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoin","html_url":"https://github.com/bitcoin","followers_url":"https://api.github.com/users/bitcoin/followers","following_url":"https://api.github.com/users/bitcoin/following{/other_user}","gists_url":"https://api.github.com/users/bitcoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoin/subscriptions","organizations_url":"https://api.github.com/users/bitcoin/orgs","repos_url":"https://api.github.com/users/bitcoin/repos","events_url":"https://api.github.com/users/bitcoin/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitcoin/bitcoin","description":"Bitcoin Core integration/staging tree","fork":false,"url":"https://api.github.com/repos/bitcoin/bitcoin","forks_url":"https://api.github.com/repos/bitcoin/bitcoin/forks","keys_url":"https://api.github.com/repos/bitcoin/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitcoin/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitcoin/bitcoin/teams","hooks_url":"https://api.github.com/repos/bitcoin/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/bitcoin/bitcoin/events","assignees_url":"https://api.github.com/repos/bitcoin/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/bitcoin/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/bitcoin/bitcoin/tags","blobs_url":"https://api.github.com/repos/bitcoin/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitcoin/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitcoin/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitcoin/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/bitcoin/bitcoin/languages","stargazers_url":"https://api.github.com/repos/bitcoin/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/bitcoin/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/bitcoin/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/bitcoin/bitcoin/subscription","commits_url":"https://api.github.com/repos/bitcoin/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitcoin/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitcoin/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/bitcoin/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitcoin/bitcoin/merges","archive_url":"https://api.github.com/repos/bitcoin/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitcoin/bitcoin/downloads","issues_url":"https://api.github.com/repos/bitcoin/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/bitcoin/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/bitcoin/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/bitcoin/bitcoin/releases{/id}","created_at":"2010-12-19T15:16:43Z","updated_at":"2015-06-21T09:21:29Z","pushed_at":"2015-06-21T11:11:16Z","git_url":"git://github.com/bitcoin/bitcoin.git","ssh_url":"git@github.com:bitcoin/bitcoin.git","clone_url":"https://github.com/bitcoin/bitcoin.git","svn_url":"https://github.com/bitcoin/bitcoin","homepage":"https://bitcoin.org/en/download","size":127548,"stargazers_count":7040,"watchers_count":7040,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":4900,"mirror_url":null,"open_issues_count":422,"forks":4900,"open_issues":422,"watchers":7040,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6315"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/6315"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/6315"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/6315/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6315/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6315/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/114c72213da9496a7126b41562bd91efd438ecf2"}}}}