{"action":"created","comment":{"url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/comments/34973622","id":34973622,"diff_hunk":"@@ -572,18 +573,38 @@ def inserttag_clicked(self, widget):\n \n     def on_parent_select(self, widget):\n         parents = self.task.get_parents()\n+\n         if len(parents) == 1:\n-            self.vmanager.open_task(parents[0])\n-        elif len(self.task.get_parents()) > 1:\n-            '''\n-            TODO (jakubbrindza): If there is more than 1 parent,open a popover\n-            with their names and allow choosing which one to open.\n-            '''\n-            pass\n+            self.open_parent_clicked(None, parents[0])\n+        elif len(parents) > 1:\n+            self.show_multiple_parent_popover(parents)\n+\n+    def show_multiple_parent_popover(self, parent_ids):\n+        parent_box = Gtk.Box.new(Gtk.Orientation.VERTICAL, 0)\n+        for parent in parent_ids:\n+            parent_name = self.req.get_task(parent).get_title()\n+            button = Gtk.ToolButton.new(None, parent_name)\n+            button.connect(\"clicked\", self.open_parent_clicked, parent)\n+            parent_box.add(button)\n+\n+        self.parent_popover = Gtk.Popover.new(self.parent_button)\n+        self.parent_popover.add(parent_box)\n+        self.parent_popover.set_property(\"border-width\", 0)\n+        self.parent_popover.set_position(Gtk.PositionType.BOTTOM)\n+        self.parent_popover.set_transitions_enabled(True)\n+        self.parent_popover.show_all()\n \n     # On click handler for open_parent_button's menu items\n-    def open_parent(self, widget, tid):\n-        self.vmanager.open_task(tid)\n+    def open_parent_clicked(self, widget, parent_id):\n+        parents = self.task.get_parents()\n+\n+        if len(parents) == 1:\n+            self.vmanager.open_task(parent_id)","path":"GTG/gtk/editor/editor.py","position":56,"original_position":56,"commit_id":"b71cd0f16c41a77a69845d42533dc0eccc57dee7","original_commit_id":"b71cd0f16c41a77a69845d42533dc0eccc57dee7","user":{"login":"jakubbrindza","id":2866323,"avatar_url":"https://avatars.githubusercontent.com/u/2866323?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubbrindza","html_url":"https://github.com/jakubbrindza","followers_url":"https://api.github.com/users/jakubbrindza/followers","following_url":"https://api.github.com/users/jakubbrindza/following{/other_user}","gists_url":"https://api.github.com/users/jakubbrindza/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubbrindza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubbrindza/subscriptions","organizations_url":"https://api.github.com/users/jakubbrindza/orgs","repos_url":"https://api.github.com/users/jakubbrindza/repos","events_url":"https://api.github.com/users/jakubbrindza/events{/privacy}","received_events_url":"https://api.github.com/users/jakubbrindza/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2015-07-20T07:55:15Z","updated_at":"2015-07-20T07:55:15Z","html_url":"https://github.com/getting-things-gnome/gtg/pull/156#discussion_r34973622","pull_request_url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/156","_links":{"self":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/comments/34973622"},"html":{"href":"https://github.com/getting-things-gnome/gtg/pull/156#discussion_r34973622"},"pull_request":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/156"}}},"pull_request":{"url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/156","id":40139171,"html_url":"https://github.com/getting-things-gnome/gtg/pull/156","diff_url":"https://github.com/getting-things-gnome/gtg/pull/156.diff","patch_url":"https://github.com/getting-things-gnome/gtg/pull/156.patch","issue_url":"https://api.github.com/repos/getting-things-gnome/gtg/issues/156","number":156,"state":"open","locked":false,"title":"Implement open_parent feature","user":{"login":"jakubbrindza","id":2866323,"avatar_url":"https://avatars.githubusercontent.com/u/2866323?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubbrindza","html_url":"https://github.com/jakubbrindza","followers_url":"https://api.github.com/users/jakubbrindza/followers","following_url":"https://api.github.com/users/jakubbrindza/following{/other_user}","gists_url":"https://api.github.com/users/jakubbrindza/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubbrindza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubbrindza/subscriptions","organizations_url":"https://api.github.com/users/jakubbrindza/orgs","repos_url":"https://api.github.com/users/jakubbrindza/repos","events_url":"https://api.github.com/users/jakubbrindza/events{/privacy}","received_events_url":"https://api.github.com/users/jakubbrindza/received_events","type":"User","site_admin":false},"body":"This PR is a follow-up of #146. Finally opening a parent from the task editor is fully functional.\r\n\r\nIf a task has one parent, it is opened immediately. If it has more immediate parents, a popover shows with the option to choose the one user wants.\r\n##### The parent selection is viewed in a popover\r\n![screen shot 2015-07-16 at 16 51 19](https://cloud.githubusercontent.com/assets/2866323/8726715/3488df56-2bdc-11e5-9fb9-c27ac4961d44.png)\r\n\r\n##### You decide which parent to open and open it from the popover\r\n![screen shot 2015-07-16 at 16 51 25](https://cloud.githubusercontent.com/assets/2866323/8726509/fa0996dc-2bda-11e5-98a7-57572afa9a7c.png)\r\n\r\n","created_at":"2015-07-16T15:04:47Z","updated_at":"2015-07-20T07:55:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"742ec15a6f28a27ee0f04f53b2ab1004137cc139","assignee":{"login":"jakubbrindza","id":2866323,"avatar_url":"https://avatars.githubusercontent.com/u/2866323?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubbrindza","html_url":"https://github.com/jakubbrindza","followers_url":"https://api.github.com/users/jakubbrindza/followers","following_url":"https://api.github.com/users/jakubbrindza/following{/other_user}","gists_url":"https://api.github.com/users/jakubbrindza/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubbrindza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubbrindza/subscriptions","organizations_url":"https://api.github.com/users/jakubbrindza/orgs","repos_url":"https://api.github.com/users/jakubbrindza/repos","events_url":"https://api.github.com/users/jakubbrindza/events{/privacy}","received_events_url":"https://api.github.com/users/jakubbrindza/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/getting-things-gnome/gtg/milestones/2","html_url":"https://github.com/getting-things-gnome/gtg/milestones/0.4","labels_url":"https://api.github.com/repos/getting-things-gnome/gtg/milestones/2/labels","id":603410,"number":2,"title":"0.4","description":"Features in this release\r\n\r\n - use Gtk3 & Python3\r\n - use the modern practices for GNOME 3 environment\r\n - improve speed performance\r\n - various other fixes","creator":{"login":"NimitS1","id":1091563,"avatar_url":"https://avatars.githubusercontent.com/u/1091563?v=3","gravatar_id":"","url":"https://api.github.com/users/NimitS1","html_url":"https://github.com/NimitS1","followers_url":"https://api.github.com/users/NimitS1/followers","following_url":"https://api.github.com/users/NimitS1/following{/other_user}","gists_url":"https://api.github.com/users/NimitS1/gists{/gist_id}","starred_url":"https://api.github.com/users/NimitS1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NimitS1/subscriptions","organizations_url":"https://api.github.com/users/NimitS1/orgs","repos_url":"https://api.github.com/users/NimitS1/repos","events_url":"https://api.github.com/users/NimitS1/events{/privacy}","received_events_url":"https://api.github.com/users/NimitS1/received_events","type":"User","site_admin":false},"open_issues":45,"closed_issues":22,"state":"open","created_at":"2014-03-20T03:22:36Z","updated_at":"2015-07-19T11:38:44Z","due_on":"2015-09-26T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/156/commits","review_comments_url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/156/comments","review_comment_url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getting-things-gnome/gtg/issues/156/comments","statuses_url":"https://api.github.com/repos/getting-things-gnome/gtg/statuses/b71cd0f16c41a77a69845d42533dc0eccc57dee7","head":{"label":"jakubbrindza:editor","ref":"editor","sha":"b71cd0f16c41a77a69845d42533dc0eccc57dee7","user":{"login":"jakubbrindza","id":2866323,"avatar_url":"https://avatars.githubusercontent.com/u/2866323?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubbrindza","html_url":"https://github.com/jakubbrindza","followers_url":"https://api.github.com/users/jakubbrindza/followers","following_url":"https://api.github.com/users/jakubbrindza/following{/other_user}","gists_url":"https://api.github.com/users/jakubbrindza/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubbrindza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubbrindza/subscriptions","organizations_url":"https://api.github.com/users/jakubbrindza/orgs","repos_url":"https://api.github.com/users/jakubbrindza/repos","events_url":"https://api.github.com/users/jakubbrindza/events{/privacy}","received_events_url":"https://api.github.com/users/jakubbrindza/received_events","type":"User","site_admin":false},"repo":{"id":31970114,"name":"gtg","full_name":"jakubbrindza/gtg","owner":{"login":"jakubbrindza","id":2866323,"avatar_url":"https://avatars.githubusercontent.com/u/2866323?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubbrindza","html_url":"https://github.com/jakubbrindza","followers_url":"https://api.github.com/users/jakubbrindza/followers","following_url":"https://api.github.com/users/jakubbrindza/following{/other_user}","gists_url":"https://api.github.com/users/jakubbrindza/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubbrindza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubbrindza/subscriptions","organizations_url":"https://api.github.com/users/jakubbrindza/orgs","repos_url":"https://api.github.com/users/jakubbrindza/repos","events_url":"https://api.github.com/users/jakubbrindza/events{/privacy}","received_events_url":"https://api.github.com/users/jakubbrindza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakubbrindza/gtg","description":"Getting Things GNOME! trunk","fork":true,"url":"https://api.github.com/repos/jakubbrindza/gtg","forks_url":"https://api.github.com/repos/jakubbrindza/gtg/forks","keys_url":"https://api.github.com/repos/jakubbrindza/gtg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakubbrindza/gtg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakubbrindza/gtg/teams","hooks_url":"https://api.github.com/repos/jakubbrindza/gtg/hooks","issue_events_url":"https://api.github.com/repos/jakubbrindza/gtg/issues/events{/number}","events_url":"https://api.github.com/repos/jakubbrindza/gtg/events","assignees_url":"https://api.github.com/repos/jakubbrindza/gtg/assignees{/user}","branches_url":"https://api.github.com/repos/jakubbrindza/gtg/branches{/branch}","tags_url":"https://api.github.com/repos/jakubbrindza/gtg/tags","blobs_url":"https://api.github.com/repos/jakubbrindza/gtg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakubbrindza/gtg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakubbrindza/gtg/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakubbrindza/gtg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakubbrindza/gtg/statuses/{sha}","languages_url":"https://api.github.com/repos/jakubbrindza/gtg/languages","stargazers_url":"https://api.github.com/repos/jakubbrindza/gtg/stargazers","contributors_url":"https://api.github.com/repos/jakubbrindza/gtg/contributors","subscribers_url":"https://api.github.com/repos/jakubbrindza/gtg/subscribers","subscription_url":"https://api.github.com/repos/jakubbrindza/gtg/subscription","commits_url":"https://api.github.com/repos/jakubbrindza/gtg/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakubbrindza/gtg/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakubbrindza/gtg/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakubbrindza/gtg/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakubbrindza/gtg/contents/{+path}","compare_url":"https://api.github.com/repos/jakubbrindza/gtg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakubbrindza/gtg/merges","archive_url":"https://api.github.com/repos/jakubbrindza/gtg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakubbrindza/gtg/downloads","issues_url":"https://api.github.com/repos/jakubbrindza/gtg/issues{/number}","pulls_url":"https://api.github.com/repos/jakubbrindza/gtg/pulls{/number}","milestones_url":"https://api.github.com/repos/jakubbrindza/gtg/milestones{/number}","notifications_url":"https://api.github.com/repos/jakubbrindza/gtg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakubbrindza/gtg/labels{/name}","releases_url":"https://api.github.com/repos/jakubbrindza/gtg/releases{/id}","created_at":"2015-03-10T17:02:31Z","updated_at":"2015-03-15T19:11:43Z","pushed_at":"2015-07-17T14:01:43Z","git_url":"git://github.com/jakubbrindza/gtg.git","ssh_url":"git@github.com:jakubbrindza/gtg.git","clone_url":"https://github.com/jakubbrindza/gtg.git","svn_url":"https://github.com/jakubbrindza/gtg","homepage":"http://gtgnome.net","size":47667,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"getting-things-gnome:master","ref":"master","sha":"c51603634933222f4dfe77f685b255bba0dfef44","user":{"login":"getting-things-gnome","id":6959065,"avatar_url":"https://avatars.githubusercontent.com/u/6959065?v=3","gravatar_id":"","url":"https://api.github.com/users/getting-things-gnome","html_url":"https://github.com/getting-things-gnome","followers_url":"https://api.github.com/users/getting-things-gnome/followers","following_url":"https://api.github.com/users/getting-things-gnome/following{/other_user}","gists_url":"https://api.github.com/users/getting-things-gnome/gists{/gist_id}","starred_url":"https://api.github.com/users/getting-things-gnome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getting-things-gnome/subscriptions","organizations_url":"https://api.github.com/users/getting-things-gnome/orgs","repos_url":"https://api.github.com/users/getting-things-gnome/repos","events_url":"https://api.github.com/users/getting-things-gnome/events{/privacy}","received_events_url":"https://api.github.com/users/getting-things-gnome/received_events","type":"Organization","site_admin":false},"repo":{"id":17773756,"name":"gtg","full_name":"getting-things-gnome/gtg","owner":{"login":"getting-things-gnome","id":6959065,"avatar_url":"https://avatars.githubusercontent.com/u/6959065?v=3","gravatar_id":"","url":"https://api.github.com/users/getting-things-gnome","html_url":"https://github.com/getting-things-gnome","followers_url":"https://api.github.com/users/getting-things-gnome/followers","following_url":"https://api.github.com/users/getting-things-gnome/following{/other_user}","gists_url":"https://api.github.com/users/getting-things-gnome/gists{/gist_id}","starred_url":"https://api.github.com/users/getting-things-gnome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getting-things-gnome/subscriptions","organizations_url":"https://api.github.com/users/getting-things-gnome/orgs","repos_url":"https://api.github.com/users/getting-things-gnome/repos","events_url":"https://api.github.com/users/getting-things-gnome/events{/privacy}","received_events_url":"https://api.github.com/users/getting-things-gnome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getting-things-gnome/gtg","description":"Getting Things GNOME! trunk","fork":false,"url":"https://api.github.com/repos/getting-things-gnome/gtg","forks_url":"https://api.github.com/repos/getting-things-gnome/gtg/forks","keys_url":"https://api.github.com/repos/getting-things-gnome/gtg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getting-things-gnome/gtg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getting-things-gnome/gtg/teams","hooks_url":"https://api.github.com/repos/getting-things-gnome/gtg/hooks","issue_events_url":"https://api.github.com/repos/getting-things-gnome/gtg/issues/events{/number}","events_url":"https://api.github.com/repos/getting-things-gnome/gtg/events","assignees_url":"https://api.github.com/repos/getting-things-gnome/gtg/assignees{/user}","branches_url":"https://api.github.com/repos/getting-things-gnome/gtg/branches{/branch}","tags_url":"https://api.github.com/repos/getting-things-gnome/gtg/tags","blobs_url":"https://api.github.com/repos/getting-things-gnome/gtg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getting-things-gnome/gtg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getting-things-gnome/gtg/git/refs{/sha}","trees_url":"https://api.github.com/repos/getting-things-gnome/gtg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getting-things-gnome/gtg/statuses/{sha}","languages_url":"https://api.github.com/repos/getting-things-gnome/gtg/languages","stargazers_url":"https://api.github.com/repos/getting-things-gnome/gtg/stargazers","contributors_url":"https://api.github.com/repos/getting-things-gnome/gtg/contributors","subscribers_url":"https://api.github.com/repos/getting-things-gnome/gtg/subscribers","subscription_url":"https://api.github.com/repos/getting-things-gnome/gtg/subscription","commits_url":"https://api.github.com/repos/getting-things-gnome/gtg/commits{/sha}","git_commits_url":"https://api.github.com/repos/getting-things-gnome/gtg/git/commits{/sha}","comments_url":"https://api.github.com/repos/getting-things-gnome/gtg/comments{/number}","issue_comment_url":"https://api.github.com/repos/getting-things-gnome/gtg/issues/comments{/number}","contents_url":"https://api.github.com/repos/getting-things-gnome/gtg/contents/{+path}","compare_url":"https://api.github.com/repos/getting-things-gnome/gtg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getting-things-gnome/gtg/merges","archive_url":"https://api.github.com/repos/getting-things-gnome/gtg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getting-things-gnome/gtg/downloads","issues_url":"https://api.github.com/repos/getting-things-gnome/gtg/issues{/number}","pulls_url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls{/number}","milestones_url":"https://api.github.com/repos/getting-things-gnome/gtg/milestones{/number}","notifications_url":"https://api.github.com/repos/getting-things-gnome/gtg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getting-things-gnome/gtg/labels{/name}","releases_url":"https://api.github.com/repos/getting-things-gnome/gtg/releases{/id}","created_at":"2014-03-15T11:16:19Z","updated_at":"2015-07-02T17:18:20Z","pushed_at":"2015-07-17T14:01:44Z","git_url":"git://github.com/getting-things-gnome/gtg.git","ssh_url":"git@github.com:getting-things-gnome/gtg.git","clone_url":"https://github.com/getting-things-gnome/gtg.git","svn_url":"https://github.com/getting-things-gnome/gtg","homepage":"http://gtgnome.net","size":49709,"stargazers_count":42,"watchers_count":42,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":69,"forks":47,"open_issues":69,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/156"},"html":{"href":"https://github.com/getting-things-gnome/gtg/pull/156"},"issue":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/issues/156"},"comments":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/issues/156/comments"},"review_comments":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/156/comments"},"review_comment":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/156/commits"},"statuses":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/statuses/b71cd0f16c41a77a69845d42533dc0eccc57dee7"}}}}