[gtkada] Problem with File_Chooser in Windows

Michael González Harbour mgh at unican.es
Thu Nov 18 14:29:15 CET 2010


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
-----------------------------------------------------------------------




More information about the gtkada mailing list