From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed3-b.proxad.net!nnrp1-1.free.fr!not-for-mail Subject: Re: GtkAda question Newsgroups: comp.lang.ada References: <6074bf6b$0$3702$426a74cc@news.free.fr> From: DrPi <314@drpi.fr> Date: Tue, 13 Apr 2021 13:07:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Message-ID: <60757b84$0$3240$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 13 Apr 2021 13:07:48 CEST NNTP-Posting-Host: 82.65.30.55 X-Trace: 1618312068 news-3.free.fr 3240 82.65.30.55:64130 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:61779 List-Id: Le 13/04/2021 à 11:53, Blady a écrit : > Le 12/04/2021 à 23:45, DrPi a écrit : >> Hi, >> >> Anyone using Glib.Key_File package ? >> I have not been able to use it successfully. >> Looking at the package source code, there are missing functions. >> Save_To_File() is one of them. Hard to save parameters without this >> function ;) >> >> Note : I'm using Community GtkAda 2020. > > Hello Nicolas, > > You may use this code proposal: > >   function Save_To_File >     (Key_File : G_Key_File; >      File     : String; >      Error    : Glib.Error.GError := null) >      return Boolean; > >   function Save_To_File >     (Key_File : G_Key_File; >      File     : String; >      Error    : Glib.Error.GError := null) >      return Boolean >   is >      function Internal >        (Key_File : G_Key_File; >         File     : String; >         Error    : Glib.Error.GError) >         return Gboolean; >      pragma Import (C, Internal, "g_key_file_save_to_file"); >   begin >      return Boolean'Val (Internal (Key_File, File & ASCII.NUL, Error)); >   end Save_To_File; > That's what I've written (and use). However, I think the use of Error is incorrect in all Key_File functions. I will investigate further. > If ok you even may send a pull request to AdaCore: > https://github.com/AdaCore/gtkada/pulls > or an issue: > https://github.com/AdaCore/gtkada/issues > Sure. Will do when finished. Thanks, Nicolas HTH, Pascal. > > >