Skip to content

Commit 4629fc1

Browse files
committed
Remove load of about.txt files, its content was ignored.
1 parent 7ddcfca commit 4629fc1

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

gnatstudio/src/gps-main.adb

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ with GNATCOLL.Traces; use GNATCOLL.Traces;
3030
with GNATCOLL.VFS; use GNATCOLL.VFS;
3131
with GNATCOLL.VFS_Utils; use GNATCOLL.VFS_Utils;
3232

33+
with VSS.Characters.Latin; use VSS.Characters.Latin;
3334
with VSS.Command_Line;
3435
with VSS.Strings.Conversions;
3536
with VSS.Strings.Formatters.Strings; use VSS.Strings.Formatters.Strings;
@@ -1695,27 +1696,23 @@ procedure GPS.Main is
16951696
-- messages, so that these are visible
16961697

16971698
declare
1698-
About_File : constant Virtual_File :=
1699-
Create_From_Dir (Prefix_Dir, "share/gnatstudio/about.txt");
1700-
About_Contents : GPS.Globals.String_Access :=
1701-
(if About_File.Is_Regular_File then About_File.Read_File else null);
1699+
use type VSS.Strings.Virtual_String;
1700+
1701+
Template : constant Virtual_String_Template :=
1702+
-("Welcome to GNAT Studio {} ({}) hosted on {}"
1703+
& Line_Feed
1704+
& "(c) 2001-{} AdaCore"
1705+
& Line_Feed);
1706+
17021707
begin
1703-
if About_Contents = null then
1704-
About_Contents := new String'("");
1705-
end if;
17061708
GPS_Main.Kernel.Insert
1707-
(-"Welcome to GNAT Studio "
1708-
& VSS.Strings.Conversions.To_UTF_8_String (Config.Version)
1709-
& " ("
1710-
& VSS.Strings.Conversions.To_UTF_8_String (Config.Source_Date)
1711-
& (-") hosted on ")
1712-
& VSS.Strings.Conversions.To_UTF_8_String (Config.Target)
1713-
& ASCII.LF
1714-
& "(c) 2001-"
1715-
& VSS.Strings.Conversions.To_UTF_8_String (Config.Current_Year)
1716-
& " AdaCore"
1717-
& ASCII.LF);
1718-
Free (About_Contents);
1709+
(VSS.Strings.Conversions.To_UTF_8_String
1710+
(Template.Format
1711+
(VSS.Strings.Formatters.Strings.Image (Config.Version),
1712+
VSS.Strings.Formatters.Strings.Image (Config.Source_Date),
1713+
VSS.Strings.Formatters.Strings.Image (Config.Target),
1714+
VSS.Strings.Formatters.Strings.Image
1715+
(Config.Current_Year))));
17191716
end;
17201717

17211718
-- Apply the preferences to the MDI. In particular, we want to set the

0 commit comments

Comments
 (0)