View Single Post
Old 15th September 2019, 12:45   #531  |  Link
hubblec4
Matroska find' ich toll
 
Join Date: Apr 2008
Posts: 1,377
chapterEditor(cE) rev1.19 is available.
Windows
Linux


New function: start chapterEditor only once

I first had to read a little bit, because there are a few different approaches.
Much was synonymous only for Windows and much out with it.

If possible, the new feature should not interfere with normal operation if it is disabled.
In addition, the sending of the parameters should be done quickly.
But it seemed that you always have to start the new instance first.

After looking for something in the Lazarus forum, I found a good solution with which only the parameters are sent.
No start (and then stop) the new instance more necessary.

The 1st instance is brought to the foreground. However, this only works 100% under Linux.
With a small workaround it also works under Windows, except that the form gets the actual focus.

For the activation of the function I have decided for a rather untypical way.
In the settings you have only one checkbox on / off hook. A file is created / deleted in the cE folder -> 1.ce
Querying if a file exists is super fast and requires no query any parameters.
Of course, the file "1.ce" can also be manually deleted / created.

Code:
Change chapterEditor

added    &
fixed    *
improved #
changed  %


rev1.19 2019-09-15
// chapterEditor
& Start chapterEditor only once (settings)
   - Parameters of further instances are sent to the 1st instance
   - cE is placed in the foreground


// Chapternaming
& Change all and exit (Matroska Chapters only)
  - change name + languages + countries

* Success messages were not displayed correctly in the status bar

% Captions of two buttons have changed
hubblec4 is offline   Reply With Quote