{"action":"created","comment":{"url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/comments/34425208","id":34425208,"diff_hunk":"@@ -75,71 +73,64 @@ def disable_gtg_autostart():\n         os.remove(AUTOSTART_PATH)\n \n \n-class PreferencesDialog(object):\n-    \"\"\" Show preference dialog \"\"\"\n+class PreferencesWindow(object):\n+    \"\"\" Show preference window \"\"\"\n+\n+    PREFERENCES_UI_FILE = os.path.join(UI_DIR, \"preferences.ui\")\n \n     def __init__(self, req, vmanager):\n         self.req = req\n         self.config = self.req.get_config('browser')\n         builder = Gtk.Builder()\n-        builder.add_from_file(ViewConfig.PREFERENCES_UI_FILE)\n-\n-        self.dialog = builder.get_object(\"PreferencesDialog\")\n-        self.dialog.set_title(_(\"Preferences - %s\" % info.NAME))\n-        self.pref_autostart = builder.get_object(\"pref_autostart\")\n-        self.pref_show_preview = builder.get_object(\"pref_show_preview\")\n-        self.bg_color_enable = builder.get_object(\"bg_color_enable\")\n-        self.hbox1 = builder.get_object(\"hbox1\")\n+        builder.add_from_file(self.PREFERENCES_UI_FILE)\n+\n+        self.window = builder.get_object(\"MainWindow\")\n+        self.autostart_button = builder.get_object(\"autostart_button\")\n+        self.preview_button = builder.get_object(\"preview_button\")\n+        self.bg_color_button = builder.get_object(\"bg_color_button\")\n         self.shortcut_button = builder.get_object(\"shortcut_button\")\n+        self.font_button = builder.get_object(\"font_button\")\n \n         self.shortcut = ShortcutWidget(builder)\n-        help.add_help_shortcut(self.dialog, \"preferences\")\n \n-        self.fontbutton = builder.get_object(\"fontbutton\")\n         self.timer = vmanager.timer\n         self.color_invalid = Color(50000, 0, 0)\n-        self.refresh_hour = builder.get_object(\"hour\")\n-        self.refresh_mins = builder.get_object(\"min\")\n+        self.refresh_hour = builder.get_object(\"hour_entry\")\n+        self.refresh_mins = builder.get_object(\"minute_entry\")\n         editor_font = self.config.get(\"font_name\")\n         if editor_font == \"\":\n-            font = self.dialog.get_style_context().get_font(\n+            font = self.window.get_style_context().get_font(\n                 Gtk.StateFlags.NORMAL)\n             editor_font = font.to_string()\n-        self.fontbutton.set_font_name(editor_font)\n+        self.font_button.set_font_name(editor_font)\n \n         builder.connect_signals({","path":"GTG/gtk/preferences.py","position":63,"original_position":63,"commit_id":"cbb2989680bc61b145c25ed6c6ad4ec4bdb51a54","original_commit_id":"726bd8c5c318d1ef5230517dbc41c73eca4b45f2","user":{"login":"izidormatusov","id":98588,"avatar_url":"https://avatars.githubusercontent.com/u/98588?v=3","gravatar_id":"","url":"https://api.github.com/users/izidormatusov","html_url":"https://github.com/izidormatusov","followers_url":"https://api.github.com/users/izidormatusov/followers","following_url":"https://api.github.com/users/izidormatusov/following{/other_user}","gists_url":"https://api.github.com/users/izidormatusov/gists{/gist_id}","starred_url":"https://api.github.com/users/izidormatusov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izidormatusov/subscriptions","organizations_url":"https://api.github.com/users/izidormatusov/orgs","repos_url":"https://api.github.com/users/izidormatusov/repos","events_url":"https://api.github.com/users/izidormatusov/events{/privacy}","received_events_url":"https://api.github.com/users/izidormatusov/received_events","type":"User","site_admin":false},"body":"For now, create a method `on_shortcut_toggled` that calles self.shortcut.on_shortcut_toggled. We should minimize what has access to Gtk internals. (In my opinion, ShortcutWidget should be reimplemented)\r\n\r\nBuilder ask for a dictionary and self provides self.__dict__ that has the map of name of the functions => the functions themselves. It's a pretty standard way how to implement it in python. There is one less place to define new callbacks","created_at":"2015-07-12T20:21:40Z","updated_at":"2015-07-12T20:21:40Z","html_url":"https://github.com/getting-things-gnome/gtg/pull/153#discussion_r34425208","pull_request_url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/153","_links":{"self":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/comments/34425208"},"html":{"href":"https://github.com/getting-things-gnome/gtg/pull/153#discussion_r34425208"},"pull_request":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/153"}}},"pull_request":{"url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/153","id":39665158,"html_url":"https://github.com/getting-things-gnome/gtg/pull/153","diff_url":"https://github.com/getting-things-gnome/gtg/pull/153.diff","patch_url":"https://github.com/getting-things-gnome/gtg/pull/153.patch","issue_url":"https://api.github.com/repos/getting-things-gnome/gtg/issues/153","number":153,"state":"open","locked":false,"title":"Introduce new preferences window","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":"In this PR, I'm doing the first step towards putting all individual settings dialogs of GTG into one, unified window for simpler user experience.\r\n\r\n##### The preferences window features 3 main parts:\r\n* General\r\n* Plugins\r\n* Synchronisation Services\r\n\r\nUnder each of these sections, user will be able to easily set their preferences without the need to actually open several separate dialog windows.\r\nOnce done, this feature will lead also to simplification in the GTG Task Browser. I will remove unnecessary Plugins and Synchronisation Services buttons once they are implemented to the new Preferences.\r\n\r\n![screen shot 2015-07-10 at 10 58 55](https://cloud.githubusercontent.com/assets/2866323/8615429/c86d0d76-26f2-11e5-806c-64b11baaa6b3.png)\r\n![screen shot 2015-07-10 at 10 59 02](https://cloud.githubusercontent.com/assets/2866323/8615431/c9101430-26f2-11e5-8260-bde5d0775e0b.png)\r\n![screen shot 2015-07-10 at 10 59 05](https://cloud.githubusercontent.com/assets/2866323/8615430/c896918c-26f2-11e5-8544-2c4a003ad056.png)\r\n\r\n\r\n##### ISSUE:\r\n* On each GTG start, preferences window shows up only once, second time you try to open it, you get only a blank window without any widgets. You have to quit the entire GTG and start again to view preferences. Weird.\r\nAny suggestions welcome here, should be pretty easy to fix.","created_at":"2015-07-10T09:06:44Z","updated_at":"2015-07-12T20:21:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad752149c6e4ec4202b77be99e8413785009dde7","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":43,"closed_issues":22,"state":"open","created_at":"2014-03-20T03:22:36Z","updated_at":"2015-07-10T19:18:51Z","due_on":"2015-09-26T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/153/commits","review_comments_url":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/153/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/153/comments","statuses_url":"https://api.github.com/repos/getting-things-gnome/gtg/statuses/cbb2989680bc61b145c25ed6c6ad4ec4bdb51a54","head":{"label":"jakubbrindza:preferences","ref":"preferences","sha":"cbb2989680bc61b145c25ed6c6ad4ec4bdb51a54","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-12T16:12:19Z","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":47642,"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":"0c3d3ec0023675f93f862ee64a32cf382ebcaa92","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-12T16:12:19Z","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":49380,"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":67,"forks":47,"open_issues":67,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/153"},"html":{"href":"https://github.com/getting-things-gnome/gtg/pull/153"},"issue":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/issues/153"},"comments":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/issues/153/comments"},"review_comments":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/pulls/153/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/153/commits"},"statuses":{"href":"https://api.github.com/repos/getting-things-gnome/gtg/statuses/cbb2989680bc61b145c25ed6c6ad4ec4bdb51a54"}}}}