From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.freedyn.de!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!212.27.60.64.MISMATCH!cleanfeed3-b.proxad.net!nnrp2-1.free.fr!not-for-mail From: Thomas Newsgroups: comp.lang.ada Mail-Copies-To: nobody Subject: Re: Gtk.Image.Gtk_Image References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Date: Thu, 24 Mar 2022 16:14:16 +0100 Message-ID: Organization: Guest of ProXad - France NNTP-Posting-Date: 24 Mar 2022 16:14:16 CET NNTP-Posting-Host: 91.175.52.121 X-Trace: 1648134856 news-2.free.fr 29477 91.175.52.121:12729 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:63624 List-Id: In article , "Dmitry A. Kazakov" wrote: > On 2022-03-24 13:55, Thomas wrote: > > > To display images, I had a Gtk.Pixmap.Gtk_Pixmap in a > > Gtk.Event_Box.Gtk_Event_Box. > > > > Since Gtk.Pixmap is obsolescent, I try to replace it by > > Gtk.Image.Gtk_Image. > > > > > > When I replace Gtk.Pixmap.Gtk_Pixmap by Gtk.Image.Gtk_Image, it doesn't > > work. > > > > Why? What's specific to Gtk_Pixmap or Gtk_Image so it has not the same > > behavior in Gtk_Event_Box? > > > > > > When I replace Gtk.Event_Box.Gtk_Event_Box by Gtk.Image.Gtk_Image, it > > works fine, except the replacement by an other image. > > (I try it using Gtk.Image.Get and Gtk.Image.Set, but it doesn't work.) > > > > Is there an other container, that I should use instead of > > Gtk.Event_Box.Gtk_Event_Box that would work and that I should use > > to replace the image inside? > > I don't know what are you trying to achieve. sorry, sometimes I don't know what to write to be clear. i'm trying to implement these interfaces : http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/tki/mcc _tki/mcc-tki-image.ads?view=markup&pathrev=257 ( https://urlpetite.fr/hfd ) http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/tki/mcc _tki/mcc-tki-widget-picture.ads?view=markup&pathrev=257 ( https://urlpetite.fr/olk ) http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/tki/mcc _tki/mcc-tki-widget-button-picture.ads?view=markup&pathrev=257 ( https://urlpetite.fr/p48 ) it was done with a very old version of gtkada. i'm with gtkada-2.24. it works, but it uses some components that were already Obsolescent in gtkada-2.24, like Gtk.Pixmap. of ourse the goal is to update it to the latest version of gtkada. to make it easier, an intermediate step is to update it properly to gtkada-2.24, without Obsolescent components. > If you want to change a > child of a container, remove the old child and add a new one. i edited the corresponding bodies : http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/peers/G tk/mcc-tki-image.adb?view=markup&pathrev=257 ( https://urlpetite.fr/2uf ) http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/peers/G tk/mcc-tki-widget-picture.adb?view=markup&pathrev=257 ( https://urlpetite.fr/nso ) http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/peers/G tk/mcc-tki-widget-button-picture.adb?view=markup&pathrev=257 ( https://urlpetite.fr/gl3 ) for mcc.tki.Image.External_Image i use Gtk.Image.Gtk_Image. for mcc.tki.Widget.Button.Picture.Picture_Button i keep Gtk.Button.Gtk_Button, and both Create and Set_Image work fine, thanks to Gtk.Button.Set_Image. for mcc.tki.Widget.Picture.Picture, if i keep Gtk.Event_Box.Gtk_Event_Box and I replace Gtk.Pixmap.Gtk_Pixmap by Gtk.Image.Gtk_Image, it seems to be no pb to change the child of the Gtk_Event_Box, but nothing is displayed (including for Create) ! (on the other case, if I replace Gtk.Event_Box.Gtk_Event_Box by Gtk.Image.Gtk_Image, Create works but Set_Image don't.) is it clear enough ? do you need to read my code ? do you need some test code ? -- RAPID maintainer http://savannah.nongnu.org/projects/rapid/