Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-03

GTK2 issue with multiple file select in TOpenDialog

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

C Western

When using TOpenDialog with multiple file select on in GTK2 I get a warning about an invalid argument to
gtk_file_chooser_set_select_multiple and a crash. I can fix both with the following trivial patch:

--- lazarus/lcl/interfaces/gtk2/gtk2wsdialogs.pp 2008-01-02 13:56:11.000000000 +0000
+++ /dos/fpc/lazarus.w/lcl/interfaces/gtk2/gtk2wsdialogs.pp 2008-03-05 22:32:11.000000000 +0000
@@ -327,7 +327,7 @@

   end;
   if ofAllowMultiSelect in OpenDialog.Options then
-    gtk_file_chooser_set_select_multiple(FileSelWidget, True);
+    gtk_file_chooser_set_select_multiple(FileSelWidget, LongBool(gTrue));
   // History List - a frame with an option menu
   CreateOpenDialogHistory(OpenDialog, FileSelWidget);

but this seems rather a round about method - the compiler doesn't like gtk_file_chooser_set_select_multiple(FileSelWidget, gTrue); Should gTrue be defined as type gboolean, or am I missing something? (Latest lazarus SVN; recent fpc SVN)

Colin

Reply by email