[gtkada] Problem with File_Chooser in Windows

Paul Cass cassp41 at yahoo.com.au
Fri Nov 19 05:40:07 CET 2010


Thanks - that will be useful when I implement the save callbacks in my 
Soduku program ( a hobby project).  Did you find a solution for the error 
loading the theme icon 'gtk-save'?  I detected that particular problem some time 
ago but was unable to find a solution. 

Cheers
Paul



________________________________
From: Michael González Harbour <mgh at unican.es>
To: gtkada at lists.adacore.com
Sent: Fri, 19 November, 2010 12:29:15 AM
Subject: Re: [gtkada] Problem with File_Chooser in Windows

Hello,

Some days ago I reported a problem with the Gtk_File_Chooser_Dialog 
widget in Windows. The widget, when configured with the "Save" Action, 
seemed to ignore the "Save" button when it was pressed, but reacted 
correctly to the "Cancel" button. The behaviour in Linux was fine.

I have been investigating a bit to find out a solution, and I found a 
workaround. I am reporting it here in case it is useful to somebody.

In the File_Chooser_Dialog callbacks, the File_Chooser_Save_Pressed 
callback, associated with the "Pressed" signal in the "Save" button had 
this body:

    Response(My_File_Chooser_Dialog,Gtk_Response_OK);

Although the callback was being invoked, this value, Gtk_Response_OK, 
had no apparent effect on the widget. I noticed that for the other 
"Cancel" button, the value Gtk_Response_Close worked fine. I wonder if 
there is some kind of filtering inside the widget. I tried other values 
with no success, until I used the value "0", which worked fine. So my 
new body for the "Save" "pressed" callback is:

    Response(My_File_Chooser_Dialog,0);

This value also worked in Linux.

I suppose that there is some internal bug in the implementation of this 
widget in Windows.

Best regards,

Michael Gonzalez.

On 15/11/2010 14:05, Michael González Harbour wrote:
> Hello:
>
> I am using GtkAda 2.14.1. with Gnat-GPL-2010.
>
> I have written an aplication that uses a File_Chooser widget for "Open"
> and "Save" actions. It works fine in Linux, but in Windows the widget
> ignores the "Save" button (while I get the warning message "Error
> loading theme icon 'gtk-save' for stock: Icon 'gtk-save' not present in
> Theme")....

-----------------------------------------------------------------------
Michael Gonzalez Harbour                  E-mail: mgh at unican.es
Grupo de Computadores y Tiempo Real      URL: http://www.ctr.unican.es
Facultad de Ciencias                      Phone : +34-942-201483
Universidad de Cantabria                  Fax  : +34-942-201402
Avda. de los Castros s/n
E-39005 Santander
SPAIN
-----------------------------------------------------------------------

_______________________________________________
gtkada mailing list
gtkada at lists.adacore.com
http://lists.adacore.com/mailman/listinfo/gtkada



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/gtkada/attachments/20101118/cbd4f8b4/attachment.htm 


More information about the gtkada mailing list