{"action":"created","comment":{"url":"https://api.github.com/repos/sugarlabs/sugar/pulls/comments/70424896","id":70424896,"diff_hunk":"@@ -282,17 +400,70 @@ def _setup_secondary_view(self):\n         self._secondary_view.pack_end(self._detail_view, True, True, 0)\n         self._detail_view.show()\n \n+    def _key_press_add_new_entry_cb(self, window, event):\n+        keyname = Gdk.keyval_name(event.keyval)\n+        if keyname == 'Return':\n+            self._add_new_button_clicked_cb(None, None)\n+\n+        return False\n+\n+    def _add_new_button_clicked_cb(self, button, event):\n+        if self.get_list_view().get_projects_view_active():\n+            logging.debug('[GSoC]for project title %r' %self.get_entry().props.text)\n+            initialize_journal_object(title= self.get_entry().props.text,\n+                                      bundle_id=PROJECT_BUNDLE_ID,\n+                                      activity_id=None,\n+                                      project_metadata=None)\n+        elif self.project_metadata is not None:\n+            chooser = ActivityChooser()\n+            text = _(\"Choose an activity to start '%s' with\" %self._entry_project.props.text)\n+            chooser.set_title(text)\n+            chooser.connect('activity-selected',self.__activity_selected_cb)\n+            chooser.show_all()\n+\n+    def __activity_selected_cb(self, widget, bundle_id, activity_id):\n+        initialize_journal_object(title = _(self._entry_project.props.text),\n+                                        bundle_id=bundle_id, \n+                                        activity_id=activity_id,\n+                                        project_metadata=self.project_metadata)\n+\n     def _key_press_event_cb(self, widget, event):\n-        if not self._main_toolbox.search_entry.has_focus():\n-            self._main_toolbox.search_entry.grab_focus()\n+        #if not self._main_toolbox.search_entry.has_focus():\n+        #self._main_toolbox.search_entry.grab_focus()\n \n         keyname = Gdk.keyval_name(event.keyval)\n         if keyname == 'Escape':\n             self._main_toolbox.clear_query()\n             self.show_main_view()\n \n+    def __choose_project_cb(self, tree_view, metadata_to_copy):\n+        project_chooser = ObjectChooser()\n+        project_chooser.show_all()\n+        project_chooser.connect('response', self.__project_chooser_response_cb,\n+                                metadata_to_copy)\n+        project_chooser._toolbar._proj_list_button_clicked_cb(None)\n+        logging.debug('__choose_project_cb')\n+\n+    def __project_chooser_response_cb(self, project_chooser, reponse_value,\n+                                    metadata_to_copy):\n+        object_id = project_chooser.get_selected_object_id()\n+        metadata = model.get(object_id)\n+        title = metadata_to_copy.get('title', None)\n+        activity = metadata_to_copy.get('activity', None)\n+        activity_id = metadata_to_copy.get('activity_id', None)\n+        logging.debug('metadata_to_copy %r'%metadata_to_copy)\n+        initialize_journal_object(title=title, bundle_id=activity, ","path":"src/jarabe/journal/journalactivity.py","position":287,"original_position":289,"commit_id":"1df9b82c9d5faf965436ab0557bec71bf76b8bad","original_commit_id":"de034482cc42cbada1474c8d06c8f86b98ca43a0","user":{"login":"AbrahmAB","id":16541261,"avatar_url":"https://avatars.githubusercontent.com/u/16541261?v=3","gravatar_id":"","url":"https://api.github.com/users/AbrahmAB","html_url":"https://github.com/AbrahmAB","followers_url":"https://api.github.com/users/AbrahmAB/followers","following_url":"https://api.github.com/users/AbrahmAB/following{/other_user}","gists_url":"https://api.github.com/users/AbrahmAB/gists{/gist_id}","starred_url":"https://api.github.com/users/AbrahmAB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbrahmAB/subscriptions","organizations_url":"https://api.github.com/users/AbrahmAB/orgs","repos_url":"https://api.github.com/users/AbrahmAB/repos","events_url":"https://api.github.com/users/AbrahmAB/events{/privacy}","received_events_url":"https://api.github.com/users/AbrahmAB/received_events","type":"User","site_admin":false},"body":"So are you suggesting me to implement 'Send to Project' instead of 'Copy to project'?","created_at":"2016-07-12T12:04:54Z","updated_at":"2016-07-12T12:04:54Z","html_url":"https://github.com/sugarlabs/sugar/pull/697#discussion_r70424896","pull_request_url":"https://api.github.com/repos/sugarlabs/sugar/pulls/697","_links":{"self":{"href":"https://api.github.com/repos/sugarlabs/sugar/pulls/comments/70424896"},"html":{"href":"https://github.com/sugarlabs/sugar/pull/697#discussion_r70424896"},"pull_request":{"href":"https://api.github.com/repos/sugarlabs/sugar/pulls/697"}}},"pull_request":{"url":"https://api.github.com/repos/sugarlabs/sugar/pulls/697","id":76745567,"html_url":"https://github.com/sugarlabs/sugar/pull/697","diff_url":"https://github.com/sugarlabs/sugar/pull/697.diff","patch_url":"https://github.com/sugarlabs/sugar/pull/697.patch","issue_url":"https://api.github.com/repos/sugarlabs/sugar/issues/697","number":697,"state":"open","locked":false,"title":"WIP Journal Project View #GSoC2016","user":{"login":"samdroid-apps","id":6022042,"avatar_url":"https://avatars.githubusercontent.com/u/6022042?v=3","gravatar_id":"","url":"https://api.github.com/users/samdroid-apps","html_url":"https://github.com/samdroid-apps","followers_url":"https://api.github.com/users/samdroid-apps/followers","following_url":"https://api.github.com/users/samdroid-apps/following{/other_user}","gists_url":"https://api.github.com/users/samdroid-apps/gists{/gist_id}","starred_url":"https://api.github.com/users/samdroid-apps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdroid-apps/subscriptions","organizations_url":"https://api.github.com/users/samdroid-apps/orgs","repos_url":"https://api.github.com/users/samdroid-apps/repos","events_url":"https://api.github.com/users/samdroid-apps/events{/privacy}","received_events_url":"https://api.github.com/users/samdroid-apps/received_events","type":"User","site_admin":false},"body":"@AbrahmAB Journal Project View GSoC project\r\n\r\nIMHO, improvements that could be made are:\r\n\r\n* [ ] Remove black icon in the \"add new\" entry (what is that icon?)\r\n* [ ] Don't show in the project jobject in the project view's list (as per discussed previously)\r\n* [ ] \"Choose an activity\" popup - autofocus the search entry\r\n* [ ] \"Choose an activity\" popup - make search entry full popup width (entry.props.hexpand = True??)\r\n* [ ] \"Choose an activity\" popup - pressing enter should launch top activity\r\n* [ ] the icon to switch to the project view should be a radiotoolbutton (so that when you are in the project view, it has a lighter background it indicate it is toggled)\r\n\r\nProbably a few more things, but it is looking great!","created_at":"2016-07-08T12:32:31Z","updated_at":"2016-07-12T12:04:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6755265986b12bdd4409221b0eabddce42c1b7ab","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sugarlabs/sugar/pulls/697/commits","review_comments_url":"https://api.github.com/repos/sugarlabs/sugar/pulls/697/comments","review_comment_url":"https://api.github.com/repos/sugarlabs/sugar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sugarlabs/sugar/issues/697/comments","statuses_url":"https://api.github.com/repos/sugarlabs/sugar/statuses/1df9b82c9d5faf965436ab0557bec71bf76b8bad","head":{"label":"AbrahmAB:explore-conflict","ref":"explore-conflict","sha":"1df9b82c9d5faf965436ab0557bec71bf76b8bad","user":{"login":"AbrahmAB","id":16541261,"avatar_url":"https://avatars.githubusercontent.com/u/16541261?v=3","gravatar_id":"","url":"https://api.github.com/users/AbrahmAB","html_url":"https://github.com/AbrahmAB","followers_url":"https://api.github.com/users/AbrahmAB/followers","following_url":"https://api.github.com/users/AbrahmAB/following{/other_user}","gists_url":"https://api.github.com/users/AbrahmAB/gists{/gist_id}","starred_url":"https://api.github.com/users/AbrahmAB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbrahmAB/subscriptions","organizations_url":"https://api.github.com/users/AbrahmAB/orgs","repos_url":"https://api.github.com/users/AbrahmAB/repos","events_url":"https://api.github.com/users/AbrahmAB/events{/privacy}","received_events_url":"https://api.github.com/users/AbrahmAB/received_events","type":"User","site_admin":false},"repo":{"id":52202449,"name":"sugar","full_name":"AbrahmAB/sugar","owner":{"login":"AbrahmAB","id":16541261,"avatar_url":"https://avatars.githubusercontent.com/u/16541261?v=3","gravatar_id":"","url":"https://api.github.com/users/AbrahmAB","html_url":"https://github.com/AbrahmAB","followers_url":"https://api.github.com/users/AbrahmAB/followers","following_url":"https://api.github.com/users/AbrahmAB/following{/other_user}","gists_url":"https://api.github.com/users/AbrahmAB/gists{/gist_id}","starred_url":"https://api.github.com/users/AbrahmAB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbrahmAB/subscriptions","organizations_url":"https://api.github.com/users/AbrahmAB/orgs","repos_url":"https://api.github.com/users/AbrahmAB/repos","events_url":"https://api.github.com/users/AbrahmAB/events{/privacy}","received_events_url":"https://api.github.com/users/AbrahmAB/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AbrahmAB/sugar","description":"Sugar GTK shell","fork":true,"url":"https://api.github.com/repos/AbrahmAB/sugar","forks_url":"https://api.github.com/repos/AbrahmAB/sugar/forks","keys_url":"https://api.github.com/repos/AbrahmAB/sugar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AbrahmAB/sugar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AbrahmAB/sugar/teams","hooks_url":"https://api.github.com/repos/AbrahmAB/sugar/hooks","issue_events_url":"https://api.github.com/repos/AbrahmAB/sugar/issues/events{/number}","events_url":"https://api.github.com/repos/AbrahmAB/sugar/events","assignees_url":"https://api.github.com/repos/AbrahmAB/sugar/assignees{/user}","branches_url":"https://api.github.com/repos/AbrahmAB/sugar/branches{/branch}","tags_url":"https://api.github.com/repos/AbrahmAB/sugar/tags","blobs_url":"https://api.github.com/repos/AbrahmAB/sugar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AbrahmAB/sugar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AbrahmAB/sugar/git/refs{/sha}","trees_url":"https://api.github.com/repos/AbrahmAB/sugar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AbrahmAB/sugar/statuses/{sha}","languages_url":"https://api.github.com/repos/AbrahmAB/sugar/languages","stargazers_url":"https://api.github.com/repos/AbrahmAB/sugar/stargazers","contributors_url":"https://api.github.com/repos/AbrahmAB/sugar/contributors","subscribers_url":"https://api.github.com/repos/AbrahmAB/sugar/subscribers","subscription_url":"https://api.github.com/repos/AbrahmAB/sugar/subscription","commits_url":"https://api.github.com/repos/AbrahmAB/sugar/commits{/sha}","git_commits_url":"https://api.github.com/repos/AbrahmAB/sugar/git/commits{/sha}","comments_url":"https://api.github.com/repos/AbrahmAB/sugar/comments{/number}","issue_comment_url":"https://api.github.com/repos/AbrahmAB/sugar/issues/comments{/number}","contents_url":"https://api.github.com/repos/AbrahmAB/sugar/contents/{+path}","compare_url":"https://api.github.com/repos/AbrahmAB/sugar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AbrahmAB/sugar/merges","archive_url":"https://api.github.com/repos/AbrahmAB/sugar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AbrahmAB/sugar/downloads","issues_url":"https://api.github.com/repos/AbrahmAB/sugar/issues{/number}","pulls_url":"https://api.github.com/repos/AbrahmAB/sugar/pulls{/number}","milestones_url":"https://api.github.com/repos/AbrahmAB/sugar/milestones{/number}","notifications_url":"https://api.github.com/repos/AbrahmAB/sugar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AbrahmAB/sugar/labels{/name}","releases_url":"https://api.github.com/repos/AbrahmAB/sugar/releases{/id}","deployments_url":"https://api.github.com/repos/AbrahmAB/sugar/deployments","created_at":"2016-02-21T11:01:09Z","updated_at":"2016-02-21T11:01:12Z","pushed_at":"2016-07-12T11:59:30Z","git_url":"git://github.com/AbrahmAB/sugar.git","ssh_url":"git@github.com:AbrahmAB/sugar.git","clone_url":"https://github.com/AbrahmAB/sugar.git","svn_url":"https://github.com/AbrahmAB/sugar","homepage":"","size":28037,"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":"sugarlabs:master","ref":"master","sha":"0e474f90bb8fd0ab224253a0889e927702ed4706","user":{"login":"sugarlabs","id":3996398,"avatar_url":"https://avatars.githubusercontent.com/u/3996398?v=3","gravatar_id":"","url":"https://api.github.com/users/sugarlabs","html_url":"https://github.com/sugarlabs","followers_url":"https://api.github.com/users/sugarlabs/followers","following_url":"https://api.github.com/users/sugarlabs/following{/other_user}","gists_url":"https://api.github.com/users/sugarlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/sugarlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sugarlabs/subscriptions","organizations_url":"https://api.github.com/users/sugarlabs/orgs","repos_url":"https://api.github.com/users/sugarlabs/repos","events_url":"https://api.github.com/users/sugarlabs/events{/privacy}","received_events_url":"https://api.github.com/users/sugarlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":10601176,"name":"sugar","full_name":"sugarlabs/sugar","owner":{"login":"sugarlabs","id":3996398,"avatar_url":"https://avatars.githubusercontent.com/u/3996398?v=3","gravatar_id":"","url":"https://api.github.com/users/sugarlabs","html_url":"https://github.com/sugarlabs","followers_url":"https://api.github.com/users/sugarlabs/followers","following_url":"https://api.github.com/users/sugarlabs/following{/other_user}","gists_url":"https://api.github.com/users/sugarlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/sugarlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sugarlabs/subscriptions","organizations_url":"https://api.github.com/users/sugarlabs/orgs","repos_url":"https://api.github.com/users/sugarlabs/repos","events_url":"https://api.github.com/users/sugarlabs/events{/privacy}","received_events_url":"https://api.github.com/users/sugarlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sugarlabs/sugar","description":"Sugar GTK shell","fork":false,"url":"https://api.github.com/repos/sugarlabs/sugar","forks_url":"https://api.github.com/repos/sugarlabs/sugar/forks","keys_url":"https://api.github.com/repos/sugarlabs/sugar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sugarlabs/sugar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sugarlabs/sugar/teams","hooks_url":"https://api.github.com/repos/sugarlabs/sugar/hooks","issue_events_url":"https://api.github.com/repos/sugarlabs/sugar/issues/events{/number}","events_url":"https://api.github.com/repos/sugarlabs/sugar/events","assignees_url":"https://api.github.com/repos/sugarlabs/sugar/assignees{/user}","branches_url":"https://api.github.com/repos/sugarlabs/sugar/branches{/branch}","tags_url":"https://api.github.com/repos/sugarlabs/sugar/tags","blobs_url":"https://api.github.com/repos/sugarlabs/sugar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sugarlabs/sugar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sugarlabs/sugar/git/refs{/sha}","trees_url":"https://api.github.com/repos/sugarlabs/sugar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sugarlabs/sugar/statuses/{sha}","languages_url":"https://api.github.com/repos/sugarlabs/sugar/languages","stargazers_url":"https://api.github.com/repos/sugarlabs/sugar/stargazers","contributors_url":"https://api.github.com/repos/sugarlabs/sugar/contributors","subscribers_url":"https://api.github.com/repos/sugarlabs/sugar/subscribers","subscription_url":"https://api.github.com/repos/sugarlabs/sugar/subscription","commits_url":"https://api.github.com/repos/sugarlabs/sugar/commits{/sha}","git_commits_url":"https://api.github.com/repos/sugarlabs/sugar/git/commits{/sha}","comments_url":"https://api.github.com/repos/sugarlabs/sugar/comments{/number}","issue_comment_url":"https://api.github.com/repos/sugarlabs/sugar/issues/comments{/number}","contents_url":"https://api.github.com/repos/sugarlabs/sugar/contents/{+path}","compare_url":"https://api.github.com/repos/sugarlabs/sugar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sugarlabs/sugar/merges","archive_url":"https://api.github.com/repos/sugarlabs/sugar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sugarlabs/sugar/downloads","issues_url":"https://api.github.com/repos/sugarlabs/sugar/issues{/number}","pulls_url":"https://api.github.com/repos/sugarlabs/sugar/pulls{/number}","milestones_url":"https://api.github.com/repos/sugarlabs/sugar/milestones{/number}","notifications_url":"https://api.github.com/repos/sugarlabs/sugar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sugarlabs/sugar/labels{/name}","releases_url":"https://api.github.com/repos/sugarlabs/sugar/releases{/id}","deployments_url":"https://api.github.com/repos/sugarlabs/sugar/deployments","created_at":"2013-06-10T13:49:20Z","updated_at":"2016-07-11T16:41:20Z","pushed_at":"2016-07-12T11:59:30Z","git_url":"git://github.com/sugarlabs/sugar.git","ssh_url":"git@github.com:sugarlabs/sugar.git","clone_url":"https://github.com/sugarlabs/sugar.git","svn_url":"https://github.com/sugarlabs/sugar","homepage":"","size":29267,"stargazers_count":41,"watchers_count":41,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":101,"mirror_url":null,"open_issues_count":15,"forks":101,"open_issues":15,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sugarlabs/sugar/pulls/697"},"html":{"href":"https://github.com/sugarlabs/sugar/pull/697"},"issue":{"href":"https://api.github.com/repos/sugarlabs/sugar/issues/697"},"comments":{"href":"https://api.github.com/repos/sugarlabs/sugar/issues/697/comments"},"review_comments":{"href":"https://api.github.com/repos/sugarlabs/sugar/pulls/697/comments"},"review_comment":{"href":"https://api.github.com/repos/sugarlabs/sugar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sugarlabs/sugar/pulls/697/commits"},"statuses":{"href":"https://api.github.com/repos/sugarlabs/sugar/statuses/1df9b82c9d5faf965436ab0557bec71bf76b8bad"}}}}
{"actor":{"display_login":"AbrahmAB"}}