Sign in Join

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

Mailing lists / lazarus / 2009-05

Buggy menus in GTK 2

7 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt

Hi,

I'm writing about the TMainMenu component for the lazarus book, and I ran into some strange things and bugs.

1. The shortcut keys for menus don't work. If I have a menu &File, I expect the Alt-F key combination to activate the file menu, as in windows. It does not.

2. The underlined letter in submenus don't work. In Delphi, pressing the underlined letter activates the menu. for a menu &File - &New, pressing Alt-F, N will activate the &New menu item.

3. I have a menu with a list of radio button menus, say item 1 - item 3. (all with GroupIndex=1, RadioItem=True, Autocheck=False)

When Item 1 is checked, and I click item 2, then I get first an onclick event for item 1 and then an onclick event for item 2.

This is very counter-intuitive, different from Delphi behaviour, and IMHO plain wrong, since I only clicked item 2, so I don't expect to get an event for item 1...

4. Again for radio button menus:
In Lazarus, the check mark is set or moved automatically, regardless of AutoCheck. In Delphi, it is not set unless AutoCheck is set to true.

While I think there is nothing wrong with the Lazarus behaviour an sich, it is different from Delphi and therefore incompatible.

I tested all this with today's SVN, linux, GTK2, 64-bit.

Should I file bugreports for all 4 items ?

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote 7 lines
I'm writing about the TMainMenu component for the lazarus book, and I ran into some strange things and bugs. 1. The shortcut keys for menus don't work. If I have a menu &File, ? I expect the Alt-F key combination to activate the file menu, ? as in windows. It does not.

This works with other GTK2 applications (non Lazarus based), so yes this is a bug in LCL.

2. The underlined letter in submenus don't work. In Delphi, pressing ? the underlined letter activates the menu. for a menu &File - &New, ? pressing Alt-F, N will activate the &New menu item.

Also works in pure GTK2 applications so again is a bug in LCL.

Show quoted text 9 lines
3. I have a menu with a list of radio button menus, say item 1 - item 3. ? (all with GroupIndex=1, RadioItem=True, Autocheck=False) ? When Item 1 is checked, and I click item 2, then I get first an onclick ? event for item 1 and then an onclick event for item 2. ? This is very counter-intuitive, different from Delphi behaviour, and IMHO ? plain wrong, since I only clicked item 2, so I don't expect to get an event ? for item 1...

3 years ago, when our company still used LCL, we experienced plenty of this between GTK1 & Win32 widgetsets. The behavior was very different under the two platforms and often event order firing was different as well. So yes, I would say this is a bug too.

4. Again for radio button menus: ? In Lazarus, the check mark is set or moved automatically, regardless of AutoCheck. ? In Delphi, it is not set unless AutoCheck is set to true.

Sounds like a bug - considering LCL is trying to be VCL compatible.

Should I file bugreports for all 4 items ?

I believe so, yes.

Regards,
- Graeme -

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

Reply by email

Graeme Geldenhuys
to Paul Ishenin
Paul Ishenin wrote
I believe you are late with your suggest - everything is already reported and fixed :)

You guys are good! :-)
3 years ago, I should have mentioned I am writing a Lazarus book as well. Bugs would have been fixed in 2 days and I would never have started fpGUI project. ;-)

Regards,
- Graeme -

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

Reply by email

Joost van der Sluis
to Graeme Geldenhuys

Op maandag 18-05-2009 om 09:53 uur [tijdzone +0200], schreef Graeme Geldenhuys:

Show quoted text 9 lines
On Mon, May 18, 2009 at 9:24 AM, Paul Ishenin wrote: > > I believe you are late with your suggest - everything is already reported > and fixed :) You guys are good! :-) 3 years ago, I should have mentioned I am writing a Lazarus book as well. Bugs would have been fixed in 2 days and I would never have started fpGUI project. ;-)

Sorry, but we did tell you that three years ago.

That it's better to help improve the LCL then design your own cross-platform widgetset. But you kept telling that it was impossible with the LCL design to make it behave exactly the same on all widgetsets, because of the fact that different widgetsets are used.

Maybe true, maybe not, but that was your reason to start fpgui.

Joost

Reply by email

Graeme Geldenhuys
to Joost van der Sluis

2009/5/24 Joost van der Sluis :

Maybe true, maybe not, but that was your reason to start fpgui.

You did see the smiley face right? Either way, I am glad I'm working on fpGUI. I learned such a lot and fpGUI still works wonders for us. Maybe when I start working on the LCL-fpGUI widgetset, then I'll switch to using LCL again.

Regards,
- Graeme -

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

Reply by email

Felipe Monteiro de Carvalho
to Joost van der Sluis: Op maandag 18-05-2009 om 09:53 uur [tijdzone +0200], schreef Graeme Geldenhuys: Sorry,…

Yes, lcl-fpgui is strategical for Lazarus in the long run. It's less important now that Qt became LGPL, because we can have a very coherent cross-platform development with lcl-Qt, but it's still strategical and maybe one day lcl-fpgui will be like lcl-qt but without the need for an external library.

Felipe Monteiro de Carvalho

Reply by email