@@ -30,6 +30,7 @@ with GNATCOLL.Traces; use GNATCOLL.Traces;
30
30
with GNATCOLL.VFS ; use GNATCOLL.VFS;
31
31
with GNATCOLL.VFS_Utils ; use GNATCOLL.VFS_Utils;
32
32
33
+ with VSS.Characters.Latin ; use VSS.Characters.Latin;
33
34
with VSS.Command_Line ;
34
35
with VSS.Strings.Conversions ;
35
36
with VSS.Strings.Formatters.Strings ; use VSS.Strings.Formatters.Strings;
@@ -1695,27 +1696,23 @@ procedure GPS.Main is
1695
1696
-- messages, so that these are visible
1696
1697
1697
1698
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
+
1702
1707
begin
1703
- if About_Contents = null then
1704
- About_Contents := new String'(" " );
1705
- end if ;
1706
1708
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))));
1719
1716
end ;
1720
1717
1721
1718
-- Apply the preferences to the MDI. In particular, we want to set the
0 commit comments