Sign in Join

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

Mailing lists / lazarus / 2008-11

malformed ifdef in gtkdefines.inc

17 messages · 11 people · –

Reply by email Subscribe to this list Your subscription

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

Felipe Monteiro de Carvalho
to ik
ik wrote
Can I change the location of the define statements ?

I assume that by activating the ifdef our minimum Gtk version will go up, and in that case no, don't change the ifdef.

On Linux you will usually have the gtk library which comes with the system, and installing a newer pre-compiled one will usually be impossible because that would also require updating glibc, which would require a complex update of the entire system (to the point of being less work formatting the / partition and installing a newer version of your distro).

So, it's a very big hassle for linux users requiring newer versions of anything. The constant upgrade in Qt versions is already a big problem for me, and I wouldn't like gtk to join in.

On Windows you just distribute the .dll with your program, so it's easy to guarantee that the correct gtk will be in place.

Felipe Monteiro de Carvalho

Reply by email

ik
to Felipe Monteiro de Carvalho

I have a code for bidi that I wrote a while ago that uses the define of GTK_2_8 but it was broken when someone moved the defines to a non unix IFDEF !
The moving of the define broke code. and the BiDi code uses GTK 2.8 based functions (that prior to that versions we had different functions that are depercated).
So I must have this define, or we should extract the functions regardless of the GTK_2_8 symbol, and then we will not require the define.

Ido

Felipe Monteiro de Carvalho wrote 27 lines
On Fri, Nov 7, 2008 at 9:42 PM, ik wrote: > Can I change the location of the define statements ? I assume that by activating the ifdef our minimum Gtk version will go up, and in that case no, don't change the ifdef. On Linux you will usually have the gtk library which comes with the system, and installing a newer pre-compiled one will usually be impossible because that would also require updating glibc, which would require a complex update of the entire system (to the point of being less work formatting the / partition and installing a newer version of your distro). So, it's a very big hassle for linux users requiring newer versions of anything. The constant upgrade in Qt versions is already a big problem for me, and I wouldn't like gtk to join in. On Windows you just distribute the .dll with your program, so it's easy to guarantee that the correct gtk will be in place. -- Felipe Monteiro de Carvalho _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Paul Ishenin
to ik
ik wrote 10 lines
I have a code for bidi that I wrote a while ago that uses the define of GTK_2_8 but it was broken when someone moved the defines to a non unix IFDEF ! The moving of the define broke code. and the BiDi code uses GTK 2.8 based functions (that prior to that versions we had different functions that are depercated). So I must have this define, or we should extract the functions regardless of the GTK_2_8 symbol, and then we will not require the define.

Sorry, you are probably wrong. GTK_2_8 was never defined for unixes (or it was ocasional).

But maybe you passed -dGTK_2_8 to compile LCL before?

Best regards,
Paul Ishenin.

Reply by email

ik
to Paul Ishenin
Paul Ishenin wrote 15 lines
ik wrote: > I have a code for bidi that I wrote a while ago that uses the define > of GTK_2_8 but it was broken when someone moved the defines to a non > unix IFDEF ! > The moving of the define broke code. and the BiDi code uses GTK 2.8 > based functions (that prior to that versions we had different > functions that are depercated). > So I must have this define, or we should extract the functions > regardless of the GTK_2_8 symbol, and then we will not require the > define. > Sorry, you are probably wrong. GTK_2_8 was never defined for unixes (or it was ocasional). But maybe you passed -dGTK_2_8 to compile LCL before?

I guess, but I can't find it.
So what can we do in order to make it work with GTK_2_8 symbol other then adding the -dGTK_2_8 ?

Show quoted text 8 lines
Best regards, Paul Ishenin. _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Ido

Reply by email

Felipe Monteiro de Carvalho
to ik
ik wrote
I guess, but I can't find it. So what can we do in order to make it work with GTK_2_8 symbol other then adding the -dGTK_2_8 ?

Isn't that enougth?

The default is 2.6+

If you wish to use 2.8 specific features then compile LCL with the define

Felipe Monteiro de Carvalho

Reply by email

ik
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 10 lines
On Sat, Nov 8, 2008 at 2:55 PM, ik wrote: > I guess, but I can't find it. > So what can we do in order to make it work with GTK_2_8 symbol other > then adding the -dGTK_2_8 ? Isn't that enougth? The default is 2.6+ If you wish to use 2.8 specific features then compile LCL with the define

You are missing the point (And 2.6 is very old version of GTK. GTK 2.14 is the latest).
The point is that in order for BiDi to work with Lazarus (specially with menus) we must have the define enabled by default. I'm trying to make Lazarus to support Bi-Directional UI, and this is a blocker (if I need to tell everyone who needs it to recompile lazarus and LCL with such define) and I'm very frustrated from Lazarus after seeing that it is not simple enough to achieve such tasks.
Please note that for now Lazarus is not useful for BiDi support at all.

Show quoted text 8 lines
-- Felipe Monteiro de Carvalho _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Ido

Reply by email

Vincent Snijders
to ik
ik wrote 14 lines
On Sat, Nov 8, 2008 at 8:17 PM, Felipe Monteiro de Carvalho wrote: > On Sat, Nov 8, 2008 at 2:55 PM, ik wrote: >> I guess, but I can't find it. >> So what can we do in order to make it work with GTK_2_8 symbol other >> then adding the -dGTK_2_8 ? > Isn't that enougth? > > The default is 2.6+ > > If you wish to use 2.8 specific features then compile LCL with the define You are missing the point (And 2.6 is very old version of GTK. GTK 2.14 is the latest).

Even debian stable is having 2.8, as far as I can see, so maybe things are changing slowly.

Show quoted text 6 lines
The point is that in order for BiDi to work with Lazarus (specially with menus) we must have the define enabled by default. I'm trying to make Lazarus to support Bi-Directional UI, and this is a blocker (if I need to tell everyone who needs it to recompile lazarus and LCL with such define) and I'm very frustrated from Lazarus after seeing that it is not simple enough to achieve such tasks.

You could try to dynamically load the needed 2.8 functions and turn on bidi support if it 2.8 is not available.

Vincent

Reply by email

Graeme Geldenhuys
to Vincent Snijders: Even debian stable is having 2.8, as far as I can see, so maybe things are changing…
Vincent Snijders wrote 6 lines
> > You are missing the point (And 2.6 is very old version of GTK. GTK > 2.14 is the latest). Even debian stable is having 2.8, as far as I can see, so maybe things are changing slowly.

And Ubuntu 7.10 (2 releases old) comes with 2.12. I don't know what Ubuntu 8.04 or 8.10 ships with.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Henry Vermaak
to Graeme Geldenhuys

2008/11/8 Graeme Geldenhuys :

Show quoted text 11 lines
On Sat, Nov 8, 2008 at 9:59 PM, Vincent Snijders wrote: >> >> You are missing the point (And 2.6 is very old version of GTK. GTK >> 2.14 is the latest). > > Even debian stable is having 2.8, as far as I can see, so maybe things > are changing slowly. And Ubuntu 7.10 (2 releases old) comes with 2.12. I don't know what Ubuntu 8.04 or 8.10 ships with.

8.10 is on 2.14.4.

henry

Reply by email

Mattias Gaertner
to Felipe Monteiro de Carvalho: So you want to increase the minimum default requirement? I agree with 2.8 (let's wait to…
Show quoted text 8 lines
On Sat, Nov 8, 2008 at 5:05 PM, ik wrote: > You are missing the point (And 2.6 is very old version of GTK. GTK > 2.14 is the latest). So you want to increase the minimum default requirement? I agree with 2.8 (let's wait to see if Mattias and Marc also agree), but certainly not with the latest 2.14.

I see no problem with 2.8 as minimum.

Mattias

Reply by email

Brad Campbell
to Mattias Gaertner
Mattias Gaertner wrote 12 lines
On Sat, 8 Nov 2008 19:53:16 -0200 "Felipe Monteiro de Carvalho" wrote: > On Sat, Nov 8, 2008 at 5:05 PM, ik wrote: >> You are missing the point (And 2.6 is very old version of GTK. GTK >> 2.14 is the latest). > So you want to increase the minimum default requirement? > > I agree with 2.8 (let's wait to see if Mattias and Marc also agree), > but certainly not with the latest 2.14. I see no problem with 2.8 as minimum.

I think if we are going to do that, some form of compatibility test on startup with a little message box saying (Your GTK version is x.x and the minimum we require is y.y, please upgrade to use this software) is a good idea. Firefox did this at one point and I found it much more informative than it simply refusing to run or bombing out.

Even if it were implemented as a unit you inserted in the beginning of your uses clause and therefore optional, I _think_ it'd be a good idea. (I have been wrong before though)

Brad

Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish.

Reply by email

Aleš Katona
to Brad Campbell

Please everyone, don't duplicate effort. I've started a "gtkext" unit in packages/gtk2/src/gtkext which adds [all] 2.8+ stuff in a way which can be checked.

It works like this:
Say you got a new calls for componentX in 2.8 and also some other new calls in 2.10. You add these calls as dynamic loadable in a .inc file (named after the component) and add a Available_ComponentName_Version (e.g Available_GtkButton_2_12) function for EACH version in which a new thing is loadable. You also make Load and Free calls for the lib's syms and add those to init/fini of gtk2ext.pp.

I've already added some stuff, so please instead of bickering here, add your missing stuff in and use it from gtkext.

We'll eventually need also a "gdkext" probably tho.

Ale? Katona

Reply by email

Marc Weustink
to Mattias Gaertner: On Sat, 8 Nov 2008 19:53:16 -0200 I see no problem with 2.8 as minimum. Mattias
Mattias Gaertner wrote 12 lines
On Sat, 8 Nov 2008 19:53:16 -0200 "Felipe Monteiro de Carvalho" wrote: > On Sat, Nov 8, 2008 at 5:05 PM, ik wrote: >> You are missing the point (And 2.6 is very old version of GTK. GTK >> 2.14 is the latest). > So you want to increase the minimum default requirement? > > I agree with 2.8 (let's wait to see if Mattias and Marc also agree), > but certainly not with the latest 2.14. I see no problem with 2.8 as minimum.

Me neither.

Marc

Reply by email