{"action":"created","comment":{"url":"https://api.github.com/repos/gtk-rs/examples/pulls/comments/56021708","id":56021708,"diff_hunk":"@@ -0,0 +1,98 @@\n+//! # TreeView Sample\n+//!\n+//! This sample demonstrates how to create a TreeView with either a ListStore.\n+\n+extern crate glib;\n+extern crate gtk;\n+\n+use gtk::prelude::*;\n+use gtk::{\n+    CellRendererText, Label, ListStore, Orientation, TreeView, TreeViewColumn,\n+    Window, WindowPosition, WindowType\n+};\n+\n+fn append_column(tree: &TreeView, id: i32) {\n+    let column = TreeViewColumn::new();\n+    let cell = CellRendererText::new();\n+\n+    column.pack_start(&cell, true);\n+    // Association of the view's column with the model's `id` column.\n+    column.add_attribute(&cell, \"text\", id);\n+    tree.append_column(&column);\n+}\n+\n+fn create_and_fill_model() -> ListStore {\n+    // Creation of a model with two rows.","path":"src/simple_treeview.rs","position":25,"original_position":25,"commit_id":"23610bd9c0464fa509614768ce8db9bd8ec0009f","original_commit_id":"23610bd9c0464fa509614768ce8db9bd8ec0009f","user":{"login":"gkoz","id":4260361,"avatar_url":"https://avatars.githubusercontent.com/u/4260361?v=3","gravatar_id":"","url":"https://api.github.com/users/gkoz","html_url":"https://github.com/gkoz","followers_url":"https://api.github.com/users/gkoz/followers","following_url":"https://api.github.com/users/gkoz/following{/other_user}","gists_url":"https://api.github.com/users/gkoz/gists{/gist_id}","starred_url":"https://api.github.com/users/gkoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkoz/subscriptions","organizations_url":"https://api.github.com/users/gkoz/orgs","repos_url":"https://api.github.com/users/gkoz/repos","events_url":"https://api.github.com/users/gkoz/events{/privacy}","received_events_url":"https://api.github.com/users/gkoz/received_events","type":"User","site_admin":false},"body":"Any embellishments of the most straightforward form \"Create a model...\" make the reader spend more cycles on this line than necessary. If that's the intention, fine.","created_at":"2016-03-14T15:44:54Z","updated_at":"2016-03-14T15:44:54Z","html_url":"https://github.com/gtk-rs/examples/pull/76#discussion_r56021708","pull_request_url":"https://api.github.com/repos/gtk-rs/examples/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/gtk-rs/examples/pulls/comments/56021708"},"html":{"href":"https://github.com/gtk-rs/examples/pull/76#discussion_r56021708"},"pull_request":{"href":"https://api.github.com/repos/gtk-rs/examples/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/gtk-rs/examples/pulls/76","id":62613889,"html_url":"https://github.com/gtk-rs/examples/pull/76","diff_url":"https://github.com/gtk-rs/examples/pull/76.diff","patch_url":"https://github.com/gtk-rs/examples/pull/76.patch","issue_url":"https://api.github.com/repos/gtk-rs/examples/issues/76","number":76,"state":"open","locked":false,"title":"Add more simple treeview example","user":{"login":"GuillaumeGomez","id":3050060,"avatar_url":"https://avatars.githubusercontent.com/u/3050060?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeGomez","html_url":"https://github.com/GuillaumeGomez","followers_url":"https://api.github.com/users/GuillaumeGomez/followers","following_url":"https://api.github.com/users/GuillaumeGomez/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeGomez/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeGomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeGomez/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeGomez/orgs","repos_url":"https://api.github.com/users/GuillaumeGomez/repos","events_url":"https://api.github.com/users/GuillaumeGomez/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeGomez/received_events","type":"User","site_admin":false},"body":"cc @gkoz ","created_at":"2016-03-11T22:44:42Z","updated_at":"2016-03-14T15:44:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"28f4def9c2920d75165da310d04dbbab325e9aef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gtk-rs/examples/pulls/76/commits","review_comments_url":"https://api.github.com/repos/gtk-rs/examples/pulls/76/comments","review_comment_url":"https://api.github.com/repos/gtk-rs/examples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gtk-rs/examples/issues/76/comments","statuses_url":"https://api.github.com/repos/gtk-rs/examples/statuses/23610bd9c0464fa509614768ce8db9bd8ec0009f","head":{"label":"GuillaumeGomez:simpler_treeview","ref":"simpler_treeview","sha":"23610bd9c0464fa509614768ce8db9bd8ec0009f","user":{"login":"GuillaumeGomez","id":3050060,"avatar_url":"https://avatars.githubusercontent.com/u/3050060?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeGomez","html_url":"https://github.com/GuillaumeGomez","followers_url":"https://api.github.com/users/GuillaumeGomez/followers","following_url":"https://api.github.com/users/GuillaumeGomez/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeGomez/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeGomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeGomez/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeGomez/orgs","repos_url":"https://api.github.com/users/GuillaumeGomez/repos","events_url":"https://api.github.com/users/GuillaumeGomez/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeGomez/received_events","type":"User","site_admin":false},"repo":{"id":39299913,"name":"examples","full_name":"GuillaumeGomez/examples","owner":{"login":"GuillaumeGomez","id":3050060,"avatar_url":"https://avatars.githubusercontent.com/u/3050060?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeGomez","html_url":"https://github.com/GuillaumeGomez","followers_url":"https://api.github.com/users/GuillaumeGomez/followers","following_url":"https://api.github.com/users/GuillaumeGomez/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeGomez/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeGomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeGomez/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeGomez/orgs","repos_url":"https://api.github.com/users/GuillaumeGomez/repos","events_url":"https://api.github.com/users/GuillaumeGomez/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeGomez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GuillaumeGomez/examples","description":"rust-gnome examples","fork":true,"url":"https://api.github.com/repos/GuillaumeGomez/examples","forks_url":"https://api.github.com/repos/GuillaumeGomez/examples/forks","keys_url":"https://api.github.com/repos/GuillaumeGomez/examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GuillaumeGomez/examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GuillaumeGomez/examples/teams","hooks_url":"https://api.github.com/repos/GuillaumeGomez/examples/hooks","issue_events_url":"https://api.github.com/repos/GuillaumeGomez/examples/issues/events{/number}","events_url":"https://api.github.com/repos/GuillaumeGomez/examples/events","assignees_url":"https://api.github.com/repos/GuillaumeGomez/examples/assignees{/user}","branches_url":"https://api.github.com/repos/GuillaumeGomez/examples/branches{/branch}","tags_url":"https://api.github.com/repos/GuillaumeGomez/examples/tags","blobs_url":"https://api.github.com/repos/GuillaumeGomez/examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GuillaumeGomez/examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GuillaumeGomez/examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/GuillaumeGomez/examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GuillaumeGomez/examples/statuses/{sha}","languages_url":"https://api.github.com/repos/GuillaumeGomez/examples/languages","stargazers_url":"https://api.github.com/repos/GuillaumeGomez/examples/stargazers","contributors_url":"https://api.github.com/repos/GuillaumeGomez/examples/contributors","subscribers_url":"https://api.github.com/repos/GuillaumeGomez/examples/subscribers","subscription_url":"https://api.github.com/repos/GuillaumeGomez/examples/subscription","commits_url":"https://api.github.com/repos/GuillaumeGomez/examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/GuillaumeGomez/examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/GuillaumeGomez/examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/GuillaumeGomez/examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/GuillaumeGomez/examples/contents/{+path}","compare_url":"https://api.github.com/repos/GuillaumeGomez/examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GuillaumeGomez/examples/merges","archive_url":"https://api.github.com/repos/GuillaumeGomez/examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GuillaumeGomez/examples/downloads","issues_url":"https://api.github.com/repos/GuillaumeGomez/examples/issues{/number}","pulls_url":"https://api.github.com/repos/GuillaumeGomez/examples/pulls{/number}","milestones_url":"https://api.github.com/repos/GuillaumeGomez/examples/milestones{/number}","notifications_url":"https://api.github.com/repos/GuillaumeGomez/examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GuillaumeGomez/examples/labels{/name}","releases_url":"https://api.github.com/repos/GuillaumeGomez/examples/releases{/id}","deployments_url":"https://api.github.com/repos/GuillaumeGomez/examples/deployments","created_at":"2015-07-18T13:56:46Z","updated_at":"2016-01-19T22:29:55Z","pushed_at":"2016-03-13T01:36:29Z","git_url":"git://github.com/GuillaumeGomez/examples.git","ssh_url":"git@github.com:GuillaumeGomez/examples.git","clone_url":"https://github.com/GuillaumeGomez/examples.git","svn_url":"https://github.com/GuillaumeGomez/examples","homepage":null,"size":95,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"gtk-rs:pending","ref":"pending","sha":"8717738a7e2ef7e21984668528e7394672b5bb66","user":{"login":"gtk-rs","id":11757045,"avatar_url":"https://avatars.githubusercontent.com/u/11757045?v=3","gravatar_id":"","url":"https://api.github.com/users/gtk-rs","html_url":"https://github.com/gtk-rs","followers_url":"https://api.github.com/users/gtk-rs/followers","following_url":"https://api.github.com/users/gtk-rs/following{/other_user}","gists_url":"https://api.github.com/users/gtk-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/gtk-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtk-rs/subscriptions","organizations_url":"https://api.github.com/users/gtk-rs/orgs","repos_url":"https://api.github.com/users/gtk-rs/repos","events_url":"https://api.github.com/users/gtk-rs/events{/privacy}","received_events_url":"https://api.github.com/users/gtk-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":34350235,"name":"examples","full_name":"gtk-rs/examples","owner":{"login":"gtk-rs","id":11757045,"avatar_url":"https://avatars.githubusercontent.com/u/11757045?v=3","gravatar_id":"","url":"https://api.github.com/users/gtk-rs","html_url":"https://github.com/gtk-rs","followers_url":"https://api.github.com/users/gtk-rs/followers","following_url":"https://api.github.com/users/gtk-rs/following{/other_user}","gists_url":"https://api.github.com/users/gtk-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/gtk-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtk-rs/subscriptions","organizations_url":"https://api.github.com/users/gtk-rs/orgs","repos_url":"https://api.github.com/users/gtk-rs/repos","events_url":"https://api.github.com/users/gtk-rs/events{/privacy}","received_events_url":"https://api.github.com/users/gtk-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gtk-rs/examples","description":"gtk-rs examples","fork":false,"url":"https://api.github.com/repos/gtk-rs/examples","forks_url":"https://api.github.com/repos/gtk-rs/examples/forks","keys_url":"https://api.github.com/repos/gtk-rs/examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gtk-rs/examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gtk-rs/examples/teams","hooks_url":"https://api.github.com/repos/gtk-rs/examples/hooks","issue_events_url":"https://api.github.com/repos/gtk-rs/examples/issues/events{/number}","events_url":"https://api.github.com/repos/gtk-rs/examples/events","assignees_url":"https://api.github.com/repos/gtk-rs/examples/assignees{/user}","branches_url":"https://api.github.com/repos/gtk-rs/examples/branches{/branch}","tags_url":"https://api.github.com/repos/gtk-rs/examples/tags","blobs_url":"https://api.github.com/repos/gtk-rs/examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gtk-rs/examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gtk-rs/examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/gtk-rs/examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gtk-rs/examples/statuses/{sha}","languages_url":"https://api.github.com/repos/gtk-rs/examples/languages","stargazers_url":"https://api.github.com/repos/gtk-rs/examples/stargazers","contributors_url":"https://api.github.com/repos/gtk-rs/examples/contributors","subscribers_url":"https://api.github.com/repos/gtk-rs/examples/subscribers","subscription_url":"https://api.github.com/repos/gtk-rs/examples/subscription","commits_url":"https://api.github.com/repos/gtk-rs/examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/gtk-rs/examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/gtk-rs/examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/gtk-rs/examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/gtk-rs/examples/contents/{+path}","compare_url":"https://api.github.com/repos/gtk-rs/examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gtk-rs/examples/merges","archive_url":"https://api.github.com/repos/gtk-rs/examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gtk-rs/examples/downloads","issues_url":"https://api.github.com/repos/gtk-rs/examples/issues{/number}","pulls_url":"https://api.github.com/repos/gtk-rs/examples/pulls{/number}","milestones_url":"https://api.github.com/repos/gtk-rs/examples/milestones{/number}","notifications_url":"https://api.github.com/repos/gtk-rs/examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gtk-rs/examples/labels{/name}","releases_url":"https://api.github.com/repos/gtk-rs/examples/releases{/id}","deployments_url":"https://api.github.com/repos/gtk-rs/examples/deployments","created_at":"2015-04-21T20:21:37Z","updated_at":"2016-01-25T21:15:39Z","pushed_at":"2016-03-13T01:36:29Z","git_url":"git://github.com/gtk-rs/examples.git","ssh_url":"git@github.com:gtk-rs/examples.git","clone_url":"https://github.com/gtk-rs/examples.git","svn_url":"https://github.com/gtk-rs/examples","homepage":"","size":124,"stargazers_count":16,"watchers_count":16,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":3,"forks":17,"open_issues":3,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gtk-rs/examples/pulls/76"},"html":{"href":"https://github.com/gtk-rs/examples/pull/76"},"issue":{"href":"https://api.github.com/repos/gtk-rs/examples/issues/76"},"comments":{"href":"https://api.github.com/repos/gtk-rs/examples/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/gtk-rs/examples/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/gtk-rs/examples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gtk-rs/examples/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/gtk-rs/examples/statuses/23610bd9c0464fa509614768ce8db9bd8ec0009f"}}}}