{"action":"created","issue":{"url":"https://api.github.com/repos/fariza/matplotlib/issues/6","labels_url":"https://api.github.com/repos/fariza/matplotlib/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/fariza/matplotlib/issues/6/comments","events_url":"https://api.github.com/repos/fariza/matplotlib/issues/6/events","html_url":"https://github.com/fariza/matplotlib/pull/6","id":56930638,"number":6,"title":"Moved tooltriggerevents into the tool, and found and fixed a related bug...","user":{"login":"OceanWolf","id":3758703,"avatar_url":"https://avatars.githubusercontent.com/u/3758703?v=3","gravatar_id":"","url":"https://api.github.com/users/OceanWolf","html_url":"https://github.com/OceanWolf","followers_url":"https://api.github.com/users/OceanWolf/followers","following_url":"https://api.github.com/users/OceanWolf/following{/other_user}","gists_url":"https://api.github.com/users/OceanWolf/gists{/gist_id}","starred_url":"https://api.github.com/users/OceanWolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OceanWolf/subscriptions","organizations_url":"https://api.github.com/users/OceanWolf/orgs","repos_url":"https://api.github.com/users/OceanWolf/repos","events_url":"https://api.github.com/users/OceanWolf/events{/privacy}","received_events_url":"https://api.github.com/users/OceanWolf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-07T23:27:37Z","updated_at":"2015-02-12T19:00:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fariza/matplotlib/pulls/6","html_url":"https://github.com/fariza/matplotlib/pull/6","diff_url":"https://github.com/fariza/matplotlib/pull/6.diff","patch_url":"https://github.com/fariza/matplotlib/pull/6.patch"},"body":"With this PR, we let the tool tell us about its state changes, i.e. it's triggering.  This gets rid of a unique event type dedicated to each tool, as we now register directly with the tool.\r\n\r\nThis PR also fixes a bug in the ``remove_tool`` function, when a currently toggled tool gets removed from ``Navigation``."},"comment":{"url":"https://api.github.com/repos/fariza/matplotlib/issues/comments/74130218","html_url":"https://github.com/fariza/matplotlib/pull/6#issuecomment-74130218","issue_url":"https://api.github.com/repos/fariza/matplotlib/issues/6","id":74130218,"user":{"login":"OceanWolf","id":3758703,"avatar_url":"https://avatars.githubusercontent.com/u/3758703?v=3","gravatar_id":"","url":"https://api.github.com/users/OceanWolf","html_url":"https://github.com/OceanWolf","followers_url":"https://api.github.com/users/OceanWolf/followers","following_url":"https://api.github.com/users/OceanWolf/following{/other_user}","gists_url":"https://api.github.com/users/OceanWolf/gists{/gist_id}","starred_url":"https://api.github.com/users/OceanWolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OceanWolf/subscriptions","organizations_url":"https://api.github.com/users/OceanWolf/orgs","repos_url":"https://api.github.com/users/OceanWolf/repos","events_url":"https://api.github.com/users/OceanWolf/events{/privacy}","received_events_url":"https://api.github.com/users/OceanWolf/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T19:00:21Z","updated_at":"2015-02-12T19:00:21Z","body":"Okay, I have rebased, and it looks good to me :).\r\n\r\nI think that oddness has disappeared with the function renaming and simplification of functions.  In terms of adding a convenience method to ``NavigationBase``, I don't think it really saves much in typing, just:\r\n\r\n```python\r\nself.get_tool(tool).tool_connect(s, func)\r\nself.add_trigger_cbk(tool, s, func)\r\n```\r\n\r\nwhere self would obviously get replaced by ``fig.canvas.navigation`` or whatever, and s replaced by ``tool_triggered``, but of course it makes no difference in comparing code length, but same in both cases, unless I put that in the convenience method.  What do you think?"}}