{"action":"opened","number":533,"pull_request":{"url":"https://api.github.com/repos/geany/geany/pulls/533","id":38637006,"html_url":"https://github.com/geany/geany/pull/533","diff_url":"https://github.com/geany/geany/pull/533.diff","patch_url":"https://github.com/geany/geany/pull/533.patch","issue_url":"https://api.github.com/repos/geany/geany/issues/533","number":533,"state":"open","locked":false,"title":"Force disk status document check in some specific cases","user":{"login":"techee","id":713965,"avatar_url":"https://avatars.githubusercontent.com/u/713965?v=3","gravatar_id":"","url":"https://api.github.com/users/techee","html_url":"https://github.com/techee","followers_url":"https://api.github.com/users/techee/followers","following_url":"https://api.github.com/users/techee/following{/other_user}","gists_url":"https://api.github.com/users/techee/gists{/gist_id}","starred_url":"https://api.github.com/users/techee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techee/subscriptions","organizations_url":"https://api.github.com/users/techee/orgs","repos_url":"https://api.github.com/users/techee/repos","events_url":"https://api.github.com/users/techee/events{/privacy}","received_events_url":"https://api.github.com/users/techee/received_events","type":"User","site_admin":false},"body":"The disk status change check behaves sometimes a bit magically in Geany and it takes some time for Geany to realize the document has changed. Of course there are performance reasons for it (it's probably not a good idea to do the full check for every character written) but there are several cases where we can do a force check and show the notification immediately:\r\n\r\n1. When switching tabs - the current code doesn't do a force-check but IMO it's a good idea to perform it to make sure the document is up-to-date (we do a force-check for the final document when switching documents using Ctrl+Tab and this is a similar case).\r\n\r\nMoreover, the part doing the check on idle is obsoleted by\r\n\r\nhttps://github.com/geany/geany/commit/5cc8a96d440274c15f50228ee55461fb557cee3e\r\n\r\nand can be removed.\r\n\r\n(now looking at the linked patch maybe it would be possible to remove the switch_in_progress check from document_check_disk_status() and rather put it into on_notebook1_switch_page_after(). Then on_notebook1_switch_page_after() could be moved to notebook.c where it would have direct access to the switch_in_progress variable and we could eliminate the accessor method. Let me know if you prefer this way.)\r\n\r\n2. When Geany main window becomes active - the most common case is that the document is modified by the user from the outside by editing it in a different editor or running some script in the terminal. This was already done for OS X and the osx-specific part can be removed now.\r\n\r\n3. After building/running because the open document can be some generated output resulting from build/run.\r\n\r\nIt would be nice to do something similar for VTE too but I don't see a way how to tell if the executed command finished (doing it when user presses enter is too early because the command can still be running).","created_at":"2015-06-26T10:38:19Z","updated_at":"2015-06-26T10:38:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/geany/geany/pulls/533/commits","review_comments_url":"https://api.github.com/repos/geany/geany/pulls/533/comments","review_comment_url":"https://api.github.com/repos/geany/geany/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geany/geany/issues/533/comments","statuses_url":"https://api.github.com/repos/geany/geany/statuses/80b46413355ee679bfa742fbc829f380cd0ceba1","head":{"label":"techee:doc_changed","ref":"doc_changed","sha":"80b46413355ee679bfa742fbc829f380cd0ceba1","user":{"login":"techee","id":713965,"avatar_url":"https://avatars.githubusercontent.com/u/713965?v=3","gravatar_id":"","url":"https://api.github.com/users/techee","html_url":"https://github.com/techee","followers_url":"https://api.github.com/users/techee/followers","following_url":"https://api.github.com/users/techee/following{/other_user}","gists_url":"https://api.github.com/users/techee/gists{/gist_id}","starred_url":"https://api.github.com/users/techee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techee/subscriptions","organizations_url":"https://api.github.com/users/techee/orgs","repos_url":"https://api.github.com/users/techee/repos","events_url":"https://api.github.com/users/techee/events{/privacy}","received_events_url":"https://api.github.com/users/techee/received_events","type":"User","site_admin":false},"repo":{"id":24825705,"name":"geany","full_name":"techee/geany","owner":{"login":"techee","id":713965,"avatar_url":"https://avatars.githubusercontent.com/u/713965?v=3","gravatar_id":"","url":"https://api.github.com/users/techee","html_url":"https://github.com/techee","followers_url":"https://api.github.com/users/techee/followers","following_url":"https://api.github.com/users/techee/following{/other_user}","gists_url":"https://api.github.com/users/techee/gists{/gist_id}","starred_url":"https://api.github.com/users/techee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techee/subscriptions","organizations_url":"https://api.github.com/users/techee/orgs","repos_url":"https://api.github.com/users/techee/repos","events_url":"https://api.github.com/users/techee/events{/privacy}","received_events_url":"https://api.github.com/users/techee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/techee/geany","description":"A fast and lightweight IDE","fork":true,"url":"https://api.github.com/repos/techee/geany","forks_url":"https://api.github.com/repos/techee/geany/forks","keys_url":"https://api.github.com/repos/techee/geany/keys{/key_id}","collaborators_url":"https://api.github.com/repos/techee/geany/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/techee/geany/teams","hooks_url":"https://api.github.com/repos/techee/geany/hooks","issue_events_url":"https://api.github.com/repos/techee/geany/issues/events{/number}","events_url":"https://api.github.com/repos/techee/geany/events","assignees_url":"https://api.github.com/repos/techee/geany/assignees{/user}","branches_url":"https://api.github.com/repos/techee/geany/branches{/branch}","tags_url":"https://api.github.com/repos/techee/geany/tags","blobs_url":"https://api.github.com/repos/techee/geany/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/techee/geany/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/techee/geany/git/refs{/sha}","trees_url":"https://api.github.com/repos/techee/geany/git/trees{/sha}","statuses_url":"https://api.github.com/repos/techee/geany/statuses/{sha}","languages_url":"https://api.github.com/repos/techee/geany/languages","stargazers_url":"https://api.github.com/repos/techee/geany/stargazers","contributors_url":"https://api.github.com/repos/techee/geany/contributors","subscribers_url":"https://api.github.com/repos/techee/geany/subscribers","subscription_url":"https://api.github.com/repos/techee/geany/subscription","commits_url":"https://api.github.com/repos/techee/geany/commits{/sha}","git_commits_url":"https://api.github.com/repos/techee/geany/git/commits{/sha}","comments_url":"https://api.github.com/repos/techee/geany/comments{/number}","issue_comment_url":"https://api.github.com/repos/techee/geany/issues/comments{/number}","contents_url":"https://api.github.com/repos/techee/geany/contents/{+path}","compare_url":"https://api.github.com/repos/techee/geany/compare/{base}...{head}","merges_url":"https://api.github.com/repos/techee/geany/merges","archive_url":"https://api.github.com/repos/techee/geany/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/techee/geany/downloads","issues_url":"https://api.github.com/repos/techee/geany/issues{/number}","pulls_url":"https://api.github.com/repos/techee/geany/pulls{/number}","milestones_url":"https://api.github.com/repos/techee/geany/milestones{/number}","notifications_url":"https://api.github.com/repos/techee/geany/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/techee/geany/labels{/name}","releases_url":"https://api.github.com/repos/techee/geany/releases{/id}","created_at":"2014-10-05T20:38:07Z","updated_at":"2015-03-11T21:37:59Z","pushed_at":"2015-06-26T10:32:00Z","git_url":"git://github.com/techee/geany.git","ssh_url":"git@github.com:techee/geany.git","clone_url":"https://github.com/techee/geany.git","svn_url":"https://github.com/techee/geany","homepage":"http://www.geany.org","size":39677,"stargazers_count":0,"watchers_count":0,"language":"Gettext Catalog","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":"geany:master","ref":"master","sha":"46a123d6fe6279896197738d709d4420861df651","user":{"login":"geany","id":1108795,"avatar_url":"https://avatars.githubusercontent.com/u/1108795?v=3","gravatar_id":"","url":"https://api.github.com/users/geany","html_url":"https://github.com/geany","followers_url":"https://api.github.com/users/geany/followers","following_url":"https://api.github.com/users/geany/following{/other_user}","gists_url":"https://api.github.com/users/geany/gists{/gist_id}","starred_url":"https://api.github.com/users/geany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geany/subscriptions","organizations_url":"https://api.github.com/users/geany/orgs","repos_url":"https://api.github.com/users/geany/repos","events_url":"https://api.github.com/users/geany/events{/privacy}","received_events_url":"https://api.github.com/users/geany/received_events","type":"Organization","site_admin":false},"repo":{"id":2532922,"name":"geany","full_name":"geany/geany","owner":{"login":"geany","id":1108795,"avatar_url":"https://avatars.githubusercontent.com/u/1108795?v=3","gravatar_id":"","url":"https://api.github.com/users/geany","html_url":"https://github.com/geany","followers_url":"https://api.github.com/users/geany/followers","following_url":"https://api.github.com/users/geany/following{/other_user}","gists_url":"https://api.github.com/users/geany/gists{/gist_id}","starred_url":"https://api.github.com/users/geany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geany/subscriptions","organizations_url":"https://api.github.com/users/geany/orgs","repos_url":"https://api.github.com/users/geany/repos","events_url":"https://api.github.com/users/geany/events{/privacy}","received_events_url":"https://api.github.com/users/geany/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geany/geany","description":"A fast and lightweight IDE","fork":false,"url":"https://api.github.com/repos/geany/geany","forks_url":"https://api.github.com/repos/geany/geany/forks","keys_url":"https://api.github.com/repos/geany/geany/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geany/geany/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geany/geany/teams","hooks_url":"https://api.github.com/repos/geany/geany/hooks","issue_events_url":"https://api.github.com/repos/geany/geany/issues/events{/number}","events_url":"https://api.github.com/repos/geany/geany/events","assignees_url":"https://api.github.com/repos/geany/geany/assignees{/user}","branches_url":"https://api.github.com/repos/geany/geany/branches{/branch}","tags_url":"https://api.github.com/repos/geany/geany/tags","blobs_url":"https://api.github.com/repos/geany/geany/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geany/geany/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geany/geany/git/refs{/sha}","trees_url":"https://api.github.com/repos/geany/geany/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geany/geany/statuses/{sha}","languages_url":"https://api.github.com/repos/geany/geany/languages","stargazers_url":"https://api.github.com/repos/geany/geany/stargazers","contributors_url":"https://api.github.com/repos/geany/geany/contributors","subscribers_url":"https://api.github.com/repos/geany/geany/subscribers","subscription_url":"https://api.github.com/repos/geany/geany/subscription","commits_url":"https://api.github.com/repos/geany/geany/commits{/sha}","git_commits_url":"https://api.github.com/repos/geany/geany/git/commits{/sha}","comments_url":"https://api.github.com/repos/geany/geany/comments{/number}","issue_comment_url":"https://api.github.com/repos/geany/geany/issues/comments{/number}","contents_url":"https://api.github.com/repos/geany/geany/contents/{+path}","compare_url":"https://api.github.com/repos/geany/geany/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geany/geany/merges","archive_url":"https://api.github.com/repos/geany/geany/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geany/geany/downloads","issues_url":"https://api.github.com/repos/geany/geany/issues{/number}","pulls_url":"https://api.github.com/repos/geany/geany/pulls{/number}","milestones_url":"https://api.github.com/repos/geany/geany/milestones{/number}","notifications_url":"https://api.github.com/repos/geany/geany/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geany/geany/labels{/name}","releases_url":"https://api.github.com/repos/geany/geany/releases{/id}","created_at":"2011-10-07T14:25:32Z","updated_at":"2015-06-26T03:56:49Z","pushed_at":"2015-06-25T20:48:16Z","git_url":"git://github.com/geany/geany.git","ssh_url":"git@github.com:geany/geany.git","clone_url":"https://github.com/geany/geany.git","svn_url":"https://github.com/geany/geany","homepage":"http://www.geany.org","size":49076,"stargazers_count":603,"watchers_count":603,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":219,"mirror_url":null,"open_issues_count":129,"forks":219,"open_issues":129,"watchers":603,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geany/geany/pulls/533"},"html":{"href":"https://github.com/geany/geany/pull/533"},"issue":{"href":"https://api.github.com/repos/geany/geany/issues/533"},"comments":{"href":"https://api.github.com/repos/geany/geany/issues/533/comments"},"review_comments":{"href":"https://api.github.com/repos/geany/geany/pulls/533/comments"},"review_comment":{"href":"https://api.github.com/repos/geany/geany/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geany/geany/pulls/533/commits"},"statuses":{"href":"https://api.github.com/repos/geany/geany/statuses/80b46413355ee679bfa742fbc829f380cd0ceba1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":18,"deletions":21,"changed_files":4}}