Check-in [3072d771a0]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Expanded plans: add an about dialog, and set up a thread to keep track of tasks, and execute them.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3072d771a0f36447e9b71a7e75b7fdb5294f4365
User & Date: tinus 2015-11-23 20:36:49.826
Context
2015-11-24
20:34
Added about box. Updated version info in all projects. check-in: 69982cf9aa user: tinus tags: trunk
2015-11-23
20:36
Expanded plans: add an about dialog, and set up a thread to keep track of tasks, and execute them. check-in: 3072d771a0 user: tinus tags: trunk
2015-11-21
01:46
Use ExtractIcon to read an executable's icon. check-in: 7af134b435 user: tinus tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to todo.md.
18
19
20
21
22
23
24














25
26
27
28
29
30
31
  - `IOTAEditorNotifier`: Modifying or saving a source file, or switching files
    in the editor
  - `IOTAModuleNotifier`: Changing, saving, or renaming a module
  - ⇒ whenever a file changes, check the file cache and then the repo cache,
    and if we've changed repo, we should switch our buttons' displayed info to
    the appropriate repo. If that repo's info is out of date, it should be
    refreshed first.















Architecture:
------------
* Split cached info in two parts:
  - final pathname of a file's dir => final pathname of the repo's root dir
    (if the root dir is empty, that would mean we know it's not a repo)
  - final pathname of the repo's root dir => repository info







>
>
>
>
>
>
>
>
>
>
>
>
>
>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  - `IOTAEditorNotifier`: Modifying or saving a source file, or switching files
    in the editor
  - `IOTAModuleNotifier`: Changing, saving, or renaming a module
  - ⇒ whenever a file changes, check the file cache and then the repo cache,
    and if we've changed repo, we should switch our buttons' displayed info to
    the appropriate repo. If that repo's info is out of date, it should be
    refreshed first.
* Add an about box (see [this post by Thomas Mueller](https://plus.google.com/108684844040122144755/posts/LEYZMFqax9G))

<pre>    if Supports(BorlandIDEServices, IOTAAboutBoxServices,
        AboutBoxServices) then begin
      bmSplashScreen := LoadBitmap(HInstance, 'SplashScreenBitMap');
      Result := AboutBoxServices.AddPluginInfo(
            'GExperts',
            'GExperts is [...]'#13#10
            + '(c) by Erik Berry and the GExperts Team'#13#10
            + 'http://www.gexperts.org',
            bmSplashScreen,
            False,
            GetVersionStr);
    end;</pre>

Architecture:
------------
* Split cached info in two parts:
  - final pathname of a file's dir => final pathname of the repo's root dir
    (if the root dir is empty, that would mean we know it's not a repo)
  - final pathname of the repo's root dir => repository info
46
47
48
49
50
51
52








53
54
55
56
57
58
59
  - pass it an anonymous method that will be executed upon completion
    (or ideally three: success, error, and complete).
  - it should be possible to cancel the task. Since an external request could
    hang, ideal would be to tell that thread to free itself on termination,
    and not do anything on completion except cleanup. Any new tasks would then
    have to be performed by a newly created thread.
  - We can't use Delphi's parallels library as long as we support XE5... Or can it be backported?









VCS info required:
-----------------
* For a certain path, figure out if it's a repo, and if so, what is its root
  - IsRepo(const Path: string; out RootPath: string): boolean;
  - `hg -yq root`
  - `fossil info`, then extract the line starting with `local-root:`







>
>
>
>
>
>
>
>







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  - pass it an anonymous method that will be executed upon completion
    (or ideally three: success, error, and complete).
  - it should be possible to cancel the task. Since an external request could
    hang, ideal would be to tell that thread to free itself on termination,
    and not do anything on completion except cleanup. Any new tasks would then
    have to be performed by a newly created thread.
  - We can't use Delphi's parallels library as long as we support XE5... Or can it be backported?
  - Set up task list;
    - the worker thread starts, and sleeps for a second (interruptible?), then checks
      if there's a task waiting in the task list. If there is none, wait again until
      terminated or a task is present.
	- if there is a task, execute it in a new thread; now wait for that thread to be
	  done, or the worker thread to be terminated.
	- if the worker thread is terminated, stop immediately, free and terminate.
	- if the other thread is finished, resume waiting for a new task.

VCS info required:
-----------------
* For a certain path, figure out if it's a repo, and if so, what is its root
  - IsRepo(const Path: string; out RootPath: string): boolean;
  - `hg -yq root`
  - `fossil info`, then extract the line starting with `local-root:`