{"action":"created","comment":{"url":"https://api.github.com/repos/redox-os/orbtk/pulls/comments/154801549","pull_request_review_id":81019879,"id":154801549,"diff_hunk":"@@ -30,9 +35,21 @@ impl Theme {\n         }\n     }\n \n+    pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Theme, String> {\n+        let file = try!(File::open(path).map_err(|err| format!(\"failed to open css: {}\", err)));\n+        let mut reader = BufReader::new(file);\n+        let mut css = String::new();\n+        let res = reader.read_to_string(&mut css).map_err(|err| format!(\"failed to read css: {}\", err));\n+        match res {\n+            Ok(_) => Ok(Theme::parse(&css)),\n+            Err(err) => Err(err),\n+        }\n+    }\n+\n     fn all_rules(&self) -> Vec<Rule> {\n         if let Some(ref parent) = self.parent {\n-            parent.rules.iter().chain(self.rules.iter()).cloned().collect()\n+            self.rules.iter().chain(parent.rules.iter()).cloned().collect()\n+            //parent.rules.iter().chain(self.rules.iter()).cloned().collect()","path":"src/theme.rs","position":31,"original_position":31,"commit_id":"ddfe50c8b4fcc08deab53f097852bb04087f5528","original_commit_id":"ddfe50c8b4fcc08deab53f097852bb04087f5528","user":{"login":"jackpot51","id":7741236,"avatar_url":"https://avatars0.githubusercontent.com/u/7741236?v=4","gravatar_id":"","url":"https://api.github.com/users/jackpot51","html_url":"https://github.com/jackpot51","followers_url":"https://api.github.com/users/jackpot51/followers","following_url":"https://api.github.com/users/jackpot51/following{/other_user}","gists_url":"https://api.github.com/users/jackpot51/gists{/gist_id}","starred_url":"https://api.github.com/users/jackpot51/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackpot51/subscriptions","organizations_url":"https://api.github.com/users/jackpot51/orgs","repos_url":"https://api.github.com/users/jackpot51/repos","events_url":"https://api.github.com/users/jackpot51/events{/privacy}","received_events_url":"https://api.github.com/users/jackpot51/received_events","type":"User","site_admin":false},"body":"You can remove this comment.","created_at":"2017-12-04T23:00:43Z","updated_at":"2017-12-04T23:00:43Z","html_url":"https://github.com/redox-os/orbtk/pull/61#discussion_r154801549","pull_request_url":"https://api.github.com/repos/redox-os/orbtk/pulls/61","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/redox-os/orbtk/pulls/comments/154801549"},"html":{"href":"https://github.com/redox-os/orbtk/pull/61#discussion_r154801549"},"pull_request":{"href":"https://api.github.com/repos/redox-os/orbtk/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/redox-os/orbtk/pulls/61","id":156307075,"html_url":"https://github.com/redox-os/orbtk/pull/61","diff_url":"https://github.com/redox-os/orbtk/pull/61.diff","patch_url":"https://github.com/redox-os/orbtk/pull/61.patch","issue_url":"https://api.github.com/repos/redox-os/orbtk/issues/61","number":61,"state":"open","locked":false,"title":"Allow the user to specify a theme","user":{"login":"jsalzbergedu","id":25715167,"avatar_url":"https://avatars2.githubusercontent.com/u/25715167?v=4","gravatar_id":"","url":"https://api.github.com/users/jsalzbergedu","html_url":"https://github.com/jsalzbergedu","followers_url":"https://api.github.com/users/jsalzbergedu/followers","following_url":"https://api.github.com/users/jsalzbergedu/following{/other_user}","gists_url":"https://api.github.com/users/jsalzbergedu/gists{/gist_id}","starred_url":"https://api.github.com/users/jsalzbergedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsalzbergedu/subscriptions","organizations_url":"https://api.github.com/users/jsalzbergedu/orgs","repos_url":"https://api.github.com/users/jsalzbergedu/repos","events_url":"https://api.github.com/users/jsalzbergedu/events{/privacy}","received_events_url":"https://api.github.com/users/jsalzbergedu/received_events","type":"User","site_admin":false},"body":"Some changes necessary to allow the user to specify a theme. Most of it is simple, obvious stuff that would have eventually been put in (like `from_file` constructors). Also added a `WindowBuilder` to allow the user to optionally specify theme etc.","created_at":"2017-12-04T21:11:24Z","updated_at":"2017-12-04T23:00:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e43c08037795c2f346e1d5b1da43b2e8af38bc34","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/redox-os/orbtk/pulls/61/commits","review_comments_url":"https://api.github.com/repos/redox-os/orbtk/pulls/61/comments","review_comment_url":"https://api.github.com/repos/redox-os/orbtk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/redox-os/orbtk/issues/61/comments","statuses_url":"https://api.github.com/repos/redox-os/orbtk/statuses/ddfe50c8b4fcc08deab53f097852bb04087f5528","head":{"label":"jsalzbergedu:theme","ref":"theme","sha":"ddfe50c8b4fcc08deab53f097852bb04087f5528","user":{"login":"jsalzbergedu","id":25715167,"avatar_url":"https://avatars2.githubusercontent.com/u/25715167?v=4","gravatar_id":"","url":"https://api.github.com/users/jsalzbergedu","html_url":"https://github.com/jsalzbergedu","followers_url":"https://api.github.com/users/jsalzbergedu/followers","following_url":"https://api.github.com/users/jsalzbergedu/following{/other_user}","gists_url":"https://api.github.com/users/jsalzbergedu/gists{/gist_id}","starred_url":"https://api.github.com/users/jsalzbergedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsalzbergedu/subscriptions","organizations_url":"https://api.github.com/users/jsalzbergedu/orgs","repos_url":"https://api.github.com/users/jsalzbergedu/repos","events_url":"https://api.github.com/users/jsalzbergedu/events{/privacy}","received_events_url":"https://api.github.com/users/jsalzbergedu/received_events","type":"User","site_admin":false},"repo":{"id":95319036,"name":"orbtk","full_name":"jsalzbergedu/orbtk","owner":{"login":"jsalzbergedu","id":25715167,"avatar_url":"https://avatars2.githubusercontent.com/u/25715167?v=4","gravatar_id":"","url":"https://api.github.com/users/jsalzbergedu","html_url":"https://github.com/jsalzbergedu","followers_url":"https://api.github.com/users/jsalzbergedu/followers","following_url":"https://api.github.com/users/jsalzbergedu/following{/other_user}","gists_url":"https://api.github.com/users/jsalzbergedu/gists{/gist_id}","starred_url":"https://api.github.com/users/jsalzbergedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsalzbergedu/subscriptions","organizations_url":"https://api.github.com/users/jsalzbergedu/orgs","repos_url":"https://api.github.com/users/jsalzbergedu/repos","events_url":"https://api.github.com/users/jsalzbergedu/events{/privacy}","received_events_url":"https://api.github.com/users/jsalzbergedu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jsalzbergedu/orbtk","description":"The Orbital Widget Toolkit. Compatible with Redox and SDL2.","fork":true,"url":"https://api.github.com/repos/jsalzbergedu/orbtk","forks_url":"https://api.github.com/repos/jsalzbergedu/orbtk/forks","keys_url":"https://api.github.com/repos/jsalzbergedu/orbtk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsalzbergedu/orbtk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsalzbergedu/orbtk/teams","hooks_url":"https://api.github.com/repos/jsalzbergedu/orbtk/hooks","issue_events_url":"https://api.github.com/repos/jsalzbergedu/orbtk/issues/events{/number}","events_url":"https://api.github.com/repos/jsalzbergedu/orbtk/events","assignees_url":"https://api.github.com/repos/jsalzbergedu/orbtk/assignees{/user}","branches_url":"https://api.github.com/repos/jsalzbergedu/orbtk/branches{/branch}","tags_url":"https://api.github.com/repos/jsalzbergedu/orbtk/tags","blobs_url":"https://api.github.com/repos/jsalzbergedu/orbtk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsalzbergedu/orbtk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsalzbergedu/orbtk/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsalzbergedu/orbtk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsalzbergedu/orbtk/statuses/{sha}","languages_url":"https://api.github.com/repos/jsalzbergedu/orbtk/languages","stargazers_url":"https://api.github.com/repos/jsalzbergedu/orbtk/stargazers","contributors_url":"https://api.github.com/repos/jsalzbergedu/orbtk/contributors","subscribers_url":"https://api.github.com/repos/jsalzbergedu/orbtk/subscribers","subscription_url":"https://api.github.com/repos/jsalzbergedu/orbtk/subscription","commits_url":"https://api.github.com/repos/jsalzbergedu/orbtk/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsalzbergedu/orbtk/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsalzbergedu/orbtk/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsalzbergedu/orbtk/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsalzbergedu/orbtk/contents/{+path}","compare_url":"https://api.github.com/repos/jsalzbergedu/orbtk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsalzbergedu/orbtk/merges","archive_url":"https://api.github.com/repos/jsalzbergedu/orbtk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsalzbergedu/orbtk/downloads","issues_url":"https://api.github.com/repos/jsalzbergedu/orbtk/issues{/number}","pulls_url":"https://api.github.com/repos/jsalzbergedu/orbtk/pulls{/number}","milestones_url":"https://api.github.com/repos/jsalzbergedu/orbtk/milestones{/number}","notifications_url":"https://api.github.com/repos/jsalzbergedu/orbtk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsalzbergedu/orbtk/labels{/name}","releases_url":"https://api.github.com/repos/jsalzbergedu/orbtk/releases{/id}","deployments_url":"https://api.github.com/repos/jsalzbergedu/orbtk/deployments","created_at":"2017-06-24T19:44:31Z","updated_at":"2017-06-24T19:44:32Z","pushed_at":"2017-12-04T21:01:43Z","git_url":"git://github.com/jsalzbergedu/orbtk.git","ssh_url":"git@github.com:jsalzbergedu/orbtk.git","clone_url":"https://github.com/jsalzbergedu/orbtk.git","svn_url":"https://github.com/jsalzbergedu/orbtk","homepage":"","size":3503,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"redox-os:master","ref":"master","sha":"7d04798cbbec0d6720cba1a6283343aac92264b2","user":{"login":"redox-os","id":14909902,"avatar_url":"https://avatars3.githubusercontent.com/u/14909902?v=4","gravatar_id":"","url":"https://api.github.com/users/redox-os","html_url":"https://github.com/redox-os","followers_url":"https://api.github.com/users/redox-os/followers","following_url":"https://api.github.com/users/redox-os/following{/other_user}","gists_url":"https://api.github.com/users/redox-os/gists{/gist_id}","starred_url":"https://api.github.com/users/redox-os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redox-os/subscriptions","organizations_url":"https://api.github.com/users/redox-os/orgs","repos_url":"https://api.github.com/users/redox-os/repos","events_url":"https://api.github.com/users/redox-os/events{/privacy}","received_events_url":"https://api.github.com/users/redox-os/received_events","type":"Organization","site_admin":false},"repo":{"id":47995932,"name":"orbtk","full_name":"redox-os/orbtk","owner":{"login":"redox-os","id":14909902,"avatar_url":"https://avatars3.githubusercontent.com/u/14909902?v=4","gravatar_id":"","url":"https://api.github.com/users/redox-os","html_url":"https://github.com/redox-os","followers_url":"https://api.github.com/users/redox-os/followers","following_url":"https://api.github.com/users/redox-os/following{/other_user}","gists_url":"https://api.github.com/users/redox-os/gists{/gist_id}","starred_url":"https://api.github.com/users/redox-os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redox-os/subscriptions","organizations_url":"https://api.github.com/users/redox-os/orgs","repos_url":"https://api.github.com/users/redox-os/repos","events_url":"https://api.github.com/users/redox-os/events{/privacy}","received_events_url":"https://api.github.com/users/redox-os/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/redox-os/orbtk","description":"The Orbital Widget Toolkit. Compatible with Redox and SDL2.","fork":false,"url":"https://api.github.com/repos/redox-os/orbtk","forks_url":"https://api.github.com/repos/redox-os/orbtk/forks","keys_url":"https://api.github.com/repos/redox-os/orbtk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redox-os/orbtk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redox-os/orbtk/teams","hooks_url":"https://api.github.com/repos/redox-os/orbtk/hooks","issue_events_url":"https://api.github.com/repos/redox-os/orbtk/issues/events{/number}","events_url":"https://api.github.com/repos/redox-os/orbtk/events","assignees_url":"https://api.github.com/repos/redox-os/orbtk/assignees{/user}","branches_url":"https://api.github.com/repos/redox-os/orbtk/branches{/branch}","tags_url":"https://api.github.com/repos/redox-os/orbtk/tags","blobs_url":"https://api.github.com/repos/redox-os/orbtk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redox-os/orbtk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redox-os/orbtk/git/refs{/sha}","trees_url":"https://api.github.com/repos/redox-os/orbtk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redox-os/orbtk/statuses/{sha}","languages_url":"https://api.github.com/repos/redox-os/orbtk/languages","stargazers_url":"https://api.github.com/repos/redox-os/orbtk/stargazers","contributors_url":"https://api.github.com/repos/redox-os/orbtk/contributors","subscribers_url":"https://api.github.com/repos/redox-os/orbtk/subscribers","subscription_url":"https://api.github.com/repos/redox-os/orbtk/subscription","commits_url":"https://api.github.com/repos/redox-os/orbtk/commits{/sha}","git_commits_url":"https://api.github.com/repos/redox-os/orbtk/git/commits{/sha}","comments_url":"https://api.github.com/repos/redox-os/orbtk/comments{/number}","issue_comment_url":"https://api.github.com/repos/redox-os/orbtk/issues/comments{/number}","contents_url":"https://api.github.com/repos/redox-os/orbtk/contents/{+path}","compare_url":"https://api.github.com/repos/redox-os/orbtk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redox-os/orbtk/merges","archive_url":"https://api.github.com/repos/redox-os/orbtk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redox-os/orbtk/downloads","issues_url":"https://api.github.com/repos/redox-os/orbtk/issues{/number}","pulls_url":"https://api.github.com/repos/redox-os/orbtk/pulls{/number}","milestones_url":"https://api.github.com/repos/redox-os/orbtk/milestones{/number}","notifications_url":"https://api.github.com/repos/redox-os/orbtk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redox-os/orbtk/labels{/name}","releases_url":"https://api.github.com/repos/redox-os/orbtk/releases{/id}","deployments_url":"https://api.github.com/repos/redox-os/orbtk/deployments","created_at":"2015-12-14T19:17:13Z","updated_at":"2017-11-29T22:46:01Z","pushed_at":"2017-12-04T21:11:24Z","git_url":"git://github.com/redox-os/orbtk.git","ssh_url":"git@github.com:redox-os/orbtk.git","clone_url":"https://github.com/redox-os/orbtk.git","svn_url":"https://github.com/redox-os/orbtk","homepage":"","size":3500,"stargazers_count":80,"watchers_count":80,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":27,"open_issues":16,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/redox-os/orbtk/pulls/61"},"html":{"href":"https://github.com/redox-os/orbtk/pull/61"},"issue":{"href":"https://api.github.com/repos/redox-os/orbtk/issues/61"},"comments":{"href":"https://api.github.com/repos/redox-os/orbtk/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/redox-os/orbtk/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/redox-os/orbtk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/redox-os/orbtk/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/redox-os/orbtk/statuses/ddfe50c8b4fcc08deab53f097852bb04087f5528"}},"author_association":"NONE"}}
{"actor":{"display_login":"jackpot51"}}