issue-#155 Cleanups in the sources of HostDialog

Post Reply
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

issue-#155 Cleanups in the sources of HostDialog

Post by Josef Templ »

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/p ... 982824bd7b.

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
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

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

Post by Zinn »

About cleanups in HostDialog:

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

- Helmut
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

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

Post by Josef Templ »

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/p ... c128f7422e.

- Josef
Post Reply