issue-#155 Cleanups in the sources of HostDialog

issue-#155 Cleanups in the sources of HostDialog

Postby Josef Templ » Wed Aug 23, 2017 1:49 pm

https://redmine.blackboxframework.org/issues/155 has been created by Ivan some time ago.
I have narrowed it towards cleanups in HostDialog, because this seems meaningful and simple.
I have also changed it from Infrastructure to Documentation. Infrastructure would refer to the build process but
this is a regular module part of the distribution and it is neither a feature nor a bug.

See the diffs at https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=2d526b5da13be6bfebea492eb57b0fc128f7422e&rev_to=7ee4ded8c62f8384496cb27c274658982824bd7b.

Please note: I have also reordered some statements in order to keep similar things together (registry, hooks).
As far as I see this does not introduce any difference in the behavior.

Code: Select all
      HostRegistry.ReadBool("noStatus", b, res); Dialog.showsStatus := (res # 0) OR ~b;
      HostRegistry.ReadBool("memStatus", b, res); HostWindows.memInStatus := (res = 0) & b;
      HostRegistry.ReadBool("thickCaret", b, res); IF res = 0 THEN Dialog.thickCaret := b END;
      HostRegistry.ReadInt("caretPeriod", n, res); IF res = 0 THEN Dialog.caretPeriod := n END;
      HostRegistry.ReadBool("beep", b, res); IF res = 0 THEN Dialog.beep := b END;
      HostRegistry.ReadBool("serverMode", b, res); IF res = 0 THEN Dialog.serverMode := b END;

      NEW(wineHook); Dialog.SetWineHook(wineHook); (* << reordered *)
      NEW(showHook); Dialog.SetShowHook(showHook);
      NEW(dialogHook); Dialog.SetGetHook(dialogHook);
      NEW(getSpecHook); Views.SetGetSpecHook(getSpecHook);
      NEW(datesHook); Dates.SetHook(datesHook);
      NEW(languageHook); Dialog.SetLanguageHook(languageHook);
      NEW(extCallHook); Dialog.SetExtCallHook(extCallHook);

      HostFiles.MapParamString := Dialog.MapParamString; (* << reordered *)
      Dialog.ResetLanguage; (* << reordered *)
      hideExtRunWindow := FALSE


- Josef
Josef Templ
 
Posts: 1757
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#155 Cleanups in the sources of HostDialog

Postby Zinn » Thu Aug 24, 2017 1:56 pm

About cleanups in HostDialog:

There are two identical procedures Append and SAppend.
SAppend should be deleted and called Append instead.

- Helmut
Zinn
 
Posts: 428
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main

Re: issue-#155 Cleanups in the sources of HostDialog

Postby Josef Templ » Fri Aug 25, 2017 9:07 pm

SAppend is now removed, i.e. merged with Append.
In addition, several more commented code sections are now removed and some
header comments have been moved in front of the respective procedure.

See diffs at https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=ee21a9a4e587b6125fd6241c50e24e13e156137c&rev_to=2d526b5da13be6bfebea492eb57b0fc128f7422e.

- Josef
Josef Templ
 
Posts: 1757
Joined: Tue Sep 17, 2013 6:50 am


Return to Resolved (Documentation)

Who is online

Users browsing this forum: No registered users and 0 guests

cron