[fpc-devel] BUG: gtk2 unit and GtkFileChooserDialog

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jun 9 10:58:21 CEST 2005


On Thu, 9 Jun 2005 10:28:31 +0200 (CEST)
"Peter Vreman" <peter at freepascal.org> wrote:

> >> > 2)Although it is declared in gtkfilechooserdialog.inc the
> >> > PGtkFileChooserDialog symbol doesn't seem to be usable (i.e. the
> >> compiler
> >> > doesn't find it at compile time, and yes, I've included the right
> >> "uses"
> >> > statements).
> >>
> >> GTK 2.2 is supported. gtkfilechooserdialog is only included if the unit
> >> is
> >> recompiled with GTK 2.4 support
> >
> > Yes, I found the $define  directive about 5 minutes ago (for those that
> > don't
> > know it is in yoursrcdir/packages/extra/gtk2/gtk+/gtk/gtk2.pas and can
> > have
> > the following values: GTK2_2, GTK2_4, GTK2_6, you have to set it in the
> > source ;-)), but I've searched for it for almost 1 hour O_O, this thing
> > should be more visible, for example what about putting it in something
> > like a
> > configuration file or even better finding a way to make it choose the
> > libgtk2
> > version dinamically at unit-compile-time accordingly to what is
> > available on
> > the system?
> 
> That is not possible. The gtk2 unit is already delivered precompiled with
> a release. So it can't detect the gtk version installed at your machine.
> 
> The only possible solution i see is to add multiple units gtk2_2, gtk2_4
> and gtk2_6 that provide the functions for each gtk release. But that needs
> to be decided with the original gtk2 for pascal maintainers.

I see no problem with that.


Mattias




More information about the fpc-devel mailing list