[fpc-devel] BUG: gtk2 unit and GtkFileChooserDialog
nc-gaertnma at netcologne.de
Fri Jun 10 02:29:08 CEST 2005
On Thu, 9 Jun 2005 16:51:27 +0200
Federico Lox Lucignano <federico.lox at gmail.com> wrote:
> >Mattias Gaertner wrote:
> >I see no problem with that.
> Well the problem is that you cannot find a word about this "setting" in
> any readme or web-page, the problem is that someone that doesn't know
> about it could loose hours trying to find why GtkFileChooserDialog is
> unavailable although there's an entire array of files with it's name.
The documentation is a further problem. See below.
We need a better solution for the binary releases anyway.
> After I've found the "guilty" $define GTK2_2 I've started to wonder if
> there are other "hidden" settings like this one in the other units. O_o (
> okok I'm starting to be a bit obsessed :-D )
> > 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.
> Sorry, I'm not talking about the binary release, I'm talking about the
> sources available through both the website and Subversion ;-)
> 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?
This is already done by compile_with_fpc_under_linux.sh.
It compiles a small pascal program, which prints the current gtk version and
then the script sets the -d flags accordingly. The problem is here: It would
be nice, to ship some precompiled gtk2 bindings and the Lazarus IDE does not
have the flags, so find declaration does not find filechoose and friends.
So, it was merely a hack, and therefore undocumented.
Peter's idea would solve it, so I see no problem with that.
Then users can decide, what gtk versions they want to support. And this
should be documented.
More information about the fpc-devel