Re: [Lazarus] New menu designer

2016-01-22 Thread Juha Manninen
On Sun, Jan 17, 2016 at 8:40 PM, Howard  wrote:
> On 17/01/2016 13:00, Juha Manninen wrote:
>> Howard, for curiosity, your patch has: LCLVersion = '1.6.0.2' The menu
>> editor is developed in trunk 1.7. Are you using a fixex_1_6 version for
>> editing? Juha
>
> Yes, the code I worked on was the latest trunk (well perhaps it was from the
> day before). The IDE I used was 1.6.0. Does this matter?

I forgot to answer this earlier.
No it does not matter. It only means that you must open 2 different
IDE versions, one for editing and one for testing your changes.
I personally use the same binary where I did my changes. Usually it
works well enough. Sometimes rarely I break it badly and then I use a
backup binary which I have copied to another name.

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-21 Thread Mattias Gaertner
On Thu, 21 Jan 2016 13:21:57 +
Howard Page-Clark  wrote:

>[...]
> I don't know anything about the translation process, or at what stage in 
> the IDE initialization captions are replaced with translated 
> resourcestrings.
> Is there a standard notification, or other means to respond to a 
> different-length translated string and force a repaint?

It is not only translated strings, but other themes as well.
In general all labels should use AutoSize:=true.
See here:
http://wiki.lazarus.freepascal.org/LCL_AutoSizing

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-21 Thread Howard Page-Clark

On 20/01/16 17:30, Péter Gábor wrote:

Width of the designed menu must be calculated using the length of
captions including the lenght of actual translation of "Add menuitem"...
Otherwise if the menu captions are too short the command's caption will
not fit.
See the attached screenshot.
Yes, in the original code the minimum length was based on the (English) 
resourcestring length.
I don't know anything about the translation process, or at what stage in 
the IDE initialization captions are replaced with translated 
resourcestrings.
Is there a standard notification, or other means to respond to a 
different-length translated string and force a repaint?
Ondrej introduced an overridden TextChanged method, but this seems not 
to be called at the moment it is needed for the translated strings, 
because for this it clearly has no effect.


Howard

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-21 Thread Howard Page-Clark

On 21/01/16 13:29, Mattias Gaertner wrote:

On Thu, 21 Jan 2016 13:21:57 +
Howard Page-Clark  wrote:


[...]
I don't know anything about the translation process, or at what stage in
the IDE initialization captions are replaced with translated
resourcestrings.
Is there a standard notification, or other means to respond to a
different-length translated string and force a repaint?

It is not only translated strings, but other themes as well.
In general all labels should use AutoSize:=true.
See here:
http://wiki.lazarus.freepascal.org/LCL_AutoSizing

Mattias
OK. I've submitted a small patch (29468) which I hope will resolve this 
particular issue.


Howard

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-20 Thread Péter Gábor
Width of the designed menu must be calculated using the length of
captions including the lenght of actual translation of "Add menuitem"...
Otherwise if the menu captions are too short the command's caption will
not fit.
See the attached screenshot.

-- 
Péter Gábor
p...@freemail.hu

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-20 Thread Maxim Ganetsky


20.01.2016 17:15, Howard Page-Clark пишет:
> On 17/01/16 23:22, Maxim Ganetsky wrote:
>> 16.01.2016 1:19, Howard пишет:
>>> I have submitted a patch (29411) which I hope addresses these issues,
>>> except for the issue:
>>> 'String "composing" is still present ... in main menu creation form in
>>> "add menu item" fields captions'
>>>
>>> I am not clear about which string(s) you are identifying here. Can you
>>> give a specific line number in the source that exemplifies the problem
>>> you see?
>>
>> Please see attached screenshots.
> 
> I think a recent revision by Ondrej resolved this.

Yes.

-- 
Best regards,
 Maxim Ganetsky  mailto:gan...@narod.ru

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-20 Thread Howard Page-Clark

On 17/01/16 23:22, Maxim Ganetsky wrote:

16.01.2016 1:19, Howard пишет:

I have submitted a patch (29411) which I hope addresses these issues,
except for the issue:
'String "composing" is still present ... in main menu creation form in
"add menu item" fields captions'

I am not clear about which string(s) you are identifying here. Can you
give a specific line number in the source that exemplifies the problem
you see?


Please see attached screenshots.


I think a recent revision by Ondrej resolved this.

Howard

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-18 Thread Bart
On 1/18/16, Lukasz Sokol  wrote:

> I'm with Howard here (and Matthias). It should be a default No if a change
> can not be reversed by just Ctrl-Z or Undo.

Obey widgetset behaviour.

> if a change
> can not be reversed by just Ctrl-Z or Undo.

Implement Undo for the menu-desgner will be on the wish list then.

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-18 Thread Lukasz Sokol
On 18/01/16 10:36, Ondrej Pokorny wrote:
> On 18.01.2016 10:42, Lukasz Sokol wrote:
>> Then maybe make the 'No' answer default here?
> 
> No. If I hit delete, I want to delete the button. The prompt is OK
> there but the default action should always be what you want to do ->
> "yes". Don't assume that people are dumb :)
> 
I am not...

However seeing that I am perfectly able to slip a finger off my Enter key
on MY keyboard and/or hit 'del' key and then Enter in one move,puts some 
perspective here ;)
(https://www.google.com/search?q=dell+rt7D50+keyboard)
(that actually happened to me, I do not always look at my keyboard while typing 
fast ;) )

Also, no, people are not dumb, their ability to invent new ways to cut corners 
is a fast moving target ;)
(especially if they think software is slowing them down)


> Btw. Howard had the "No" button default but I changed it.
> 
I'm with Howard here (and Matthias). It should be a default No if a change can 
not be reversed by just Ctrl-Z or Undo.

> Ondrej



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-18 Thread Ondrej Pokorny

On 18.01.2016 14:03, Lukasz Sokol wrote:

Btw. Howard had the "No" button default but I changed it.


I'm with Howard here (and Matthias


As far as I understood Mattias' email, he did not say the dialog should 
default to "Yes".


Btw. I checked when deleting files in the default file manager (with DEL 
and also with SHIFT+DEL for permanent delete) and the results are the 
following:


Windows 10: default is "Yes" for both actions.
Kubuntu: DEL - no prompt by default, you can enamble the prompt, then it 
defaults to "Yes".

SHIFT+DEL - default is "Yes".
--
Mac OSX 10.8 (a little bit different): no prompt for move to trash.
When permanently deleting the files from trash, the prompt dialog also 
defaults to "Empty Trash"/"Yes".


So all OS I tested are pretty consistent, the default action is always 
the destructive one.



). It should be a default No if a change can not be reversed by just Ctrl-Z or 
Undo.


What if you accidetially hit delete then right-arrow and then enter? 
It's the same problem. You can play this all the time :(


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-18 Thread Mattias Gaertner
On Mon, 18 Jan 2016 11:36:57 +0100
Ondrej Pokorny  wrote:

> On 18.01.2016 10:42, Lukasz Sokol wrote:
> > Then maybe make the 'No' answer default here?
> 
> No. If I hit delete, I want to delete the button. The prompt is OK there 
> but the default action should always be what you want to do -> "yes".

Actually the default button depends on the OS/widgetset. For example on
OS X the default for a destructive action should be "No".
On Windows the default is typically Yes/Ok.
Same for button order.

> Don't assume that people are dumb :)

People are creatures of habit.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-18 Thread Ondrej Pokorny

On 18.01.2016 10:42, Lukasz Sokol wrote:

Then maybe make the 'No' answer default here?


No. If I hit delete, I want to delete the button. The prompt is OK there 
but the default action should always be what you want to do -> "yes".

Don't assume that people are dumb :)

Btw. Howard had the "No" button default but I changed it.

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-18 Thread Lukasz Sokol
On 16/01/16 23:11, Howard wrote:
[...]
> In this particular instance of deleting a submenu (not just a single
> item) my motivation was not to make it overly complicated (though I
> appreciate it may seem so). It is quite possible a user may have
> spent 10 minutes designing a submenu with half a dozen items, and
> then hits the delete key accidentally. With a simple Yes/No dialog
> (especially if the the default button is Yes) it is all to easy to
> hit the wrong button and lose the last few minutes' work; [...]

Then maybe make the 'No' answer default here?

Long sentences are not always a good enough incentive to stop people
from accidentally pressing ENTER ...

But if someone actively pressed TAB to change to yes, then enter,
or used their mouse to click Yes, you can safely assume, that yes they meant it 
;)


> 
> Howard
> 
el es


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-18 Thread Lukasz Sokol
On 18/01/16 15:20, Ondrej Pokorny wrote:
> On 18.01.2016 14:03, Lukasz Sokol wrote:
>>> Btw. Howard had the "No" button default but I changed it.
>>> 
>> I'm with Howard here (and Matthias
> 
> As far as I understood Mattias' email, he did not say the dialog
> should default to "Yes".

Heh you're right, he did not.

[...]

> So all OS I tested are pretty consistent, the default action is
> always the destructive one.
> 
OK. 

>> ). It should be a default No if a change can not be reversed by
>> just Ctrl-Z or Undo.
> 
> What if you accidetially hit delete then right-arrow and then enter?
> It's the same problem. You can play this all the time :(
> 
> Ondrej
> 

In development, maybe you're right. All is fair in software development ;)

I just happen to have a system here, where I have to log users actions.
But no amount of 'breadcrumbs' (action logging) is going to stop people
from complaining about default actions taken by just pressing 'yes' or enter 
all the time... that they
perceive as 'wrong answer'.

Their supervisors tend to tell us then, 'you should have stopped them from 
blindly selecting the wrong answer by default'...

We (still) get complaints that it's slowing them down, but then, it's now 'by 
design'.

At some point we resorted to disabling the default button mappings to keyboard,
so they HAVE to click buttons by mouse.

And they aren't 'dumb' people, oh no.

el es


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-18 Thread Ondrej Pokorny

On 18.01.2016 15:51, Bart wrote:

Implement Undo for the menu-desgner will be on the wish list then.


+1. Changing properties in OI and deleting components already are 
supported by the Undo function. The menu editor should support it as well.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-17 Thread Howard

On 17/01/2016 12:33, Péter Gábor wrote:

I found some Format calls that seems to be unneded: the first parameter
for them contains only formatting symbols and the second an array of
resourcestrings.

If no one else is currently working on the resourcestrings issue I will
try to finish my patch and post it on mantis...
This is more simpler than writing a lot of letter about what and how to
fix to be translation friendly.

Do you agree?

2016-01-15 23:19 keltezéssel, Howard írta:

On 14/01/2016 23:27, Maxim Ganetsky wrote:

String "composing" is still present e. g. in "Insert from template"
dialog ("Choose template to ..." groupbox caption) and in main menu
creation form in "add menu item" fields captions.

Also lismenueditororclickheadertosortbythatcolumn string looks
suspicious from this POV.

As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try
to align text with buttons this way. It won't work with other than
Windows' fonts/font sizes (e.g. on Linux) and other languages. Better
change this string to regular caption like "Menu Item actions".

Also I noticed that e. g. "Insert from template" dialog is not
resizable. It is better to have resizable dialogs in order to fit
longer translation captions (e. g. combobox caption in this case).

I have submitted a patch (29411) which I hope addresses these issues,
except for the issue:
'String "composing" is still present ... in main menu creation form in
"add menu item" fields captions'

I am not clear about which string(s) you are identifying here. Can you
give a specific line number in the source that exemplifies the problem
you see?

Howard


Sure, fine by me. Go ahead.

Howard

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-17 Thread Péter Gábor
I think we can use one resourcestring ('')
instead of three:

'';
'';
'';

Yes or No?


2016-01-17 17:33 keltezéssel, Péter Gábor írta:
> 
> 2016-01-17 14:00 keltezéssel, Juha Manninen írta:
>> There is a patch from Howard:
>>   http://bugs.freepascal.org/view.php?id=29411
> 
> I did not notice it yet.
> 
>> Péter, can you please look at it and maybe attach your improved patch
>> to the same report.
> 
> Okay, now I'm working on it...
> 

-- 
Péter Gábor
p...@freemail.hu


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-17 Thread Howard

On 17/01/2016 13:00, Juha Manninen wrote:
...
Howard, for curiosity, your patch has: LCLVersion = '1.6.0.2' The menu 
editor is developed in trunk 1.7. Are you using a fixex_1_6 version 
for editing? Juha


Yes, the code I worked on was the latest trunk (well perhaps it was from 
the day before). The IDE I used was 1.6.0. Does this matter?


Howard


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-17 Thread Howard

On 17/01/2016 18:40, Péter Gábor wrote:

I think we can use one resourcestring ('')
instead of three:

'';
'';
'';

Yes or No?


Yes, I agree with you.

Howard

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-17 Thread Maxim Ganetsky

16.01.2016 1:19, Howard пишет:

I have submitted a patch (29411) which I hope addresses these issues,
except for the issue:
'String "composing" is still present ... in main menu creation form in
"add menu item" fields captions'

I am not clear about which string(s) you are identifying here. Can you
give a specific line number in the source that exemplifies the problem
you see?


Please see attached screenshots.

--
Best regards,
 Maxim Ganetsky  mailto:gan...@narod.ru
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-17 Thread Ondrej Pokorny

On 17.01.2016 0:11, Howard wrote:
In this particular instance of deleting a submenu (not just a single 
item) my motivation was not to make it overly complicated (though I 
appreciate it may seem so).
It is quite possible a user may have spent 10 minutes designing a 
submenu with half a dozen items, and then hits the delete key 
accidentally. With a simple Yes/No dialog (especially if the the 
default button is Yes) it is all to easy to hit the wrong button and 
lose the last few minutes' work; and there is no undo facility 
implemented.
I may have written that dialog clumsily, but I wanted to avoid the 
possibility of an 'automatic' response which was disastrous. I quite 
agree a straightforward Yes/No dialog is simpler and more elegant, but 
it may not give a hurried user sufficient 'pause' to avoid 
accidentally losing valuable work.


IMO we shouldn't think people don't know what they are doing. If I hit 
DELETE on a menu item, I usually want to delete it :)



You'll realise I'm on a learning curve. This is my first significant 
code contribution to an open source project. I actually never thought 
I had the skill to offer a new menueditor. It was a forum comment by 
the late BigChimp some years ago about the previous menueditor which 
first got me thinking about its shortcomings, why it was so difficult 
to improve/maintain, and how a replacement might be designed to be 
better in that respect; and several developers said a complete rewrite 
was the only way forward. Months became years and no one as far as I 
could see was working on a replacement. So I decided to bite the 
bullet, and started to look at relevant bits of the IDE code (much of 
which I still don't understand). I've been learning on the job, as you 
plainly see...


I agree! +1.

Ondrej
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-17 Thread Juha Manninen
On Sun, Jan 17, 2016 at 1:11 AM, Howard  wrote:

> You'll realise I'm on a learning curve. This is my first significant code
> contribution to an open source project. I actually never thought I had the
> skill to offer a new menueditor. It was a forum comment by the late
> BigChimp some years ago about the previous menueditor which first got me
> thinking about its shortcomings, why it was so difficult to
> improve/maintain, and how a replacement might be designed to be better in
> that respect; and several developers said a complete rewrite was the only
> way forward. Months became years and no one as far as I could see was
> working on a replacement. So I decided to bite the bullet, and started to
> look at relevant bits of the IDE code (much of which I still don't
> understand). I've been learning on the job, as you plainly see...
>

Talking about BigChimp, there is an open bug report from him:
  http://bugs.freepascal.org/view.php?id=25457
I think it can be resolved already. He may have confused Name and Caption.
The visible property is Caption and the WYSIWYG editor must modify it,
which it now does. Other properties should be left for Object Inspector.
The KISS principle applies here, too.

Anyway we have a good situation now as many people work on the menu
designer. At least its structure allows it to be modified. The old menu
designer was weird. Many people tried to improve it but finally gave up and
noted that it should be rewritten. Usually I can refactor code to make it
more modular and easier to maintain but with that code I didn't know how.
So yes, this had to be done. I believe after some initial pain we get a
good menu designer.

Juha
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-17 Thread Péter Gábor
I found some Format calls that seems to be unneded: the first parameter
for them contains only formatting symbols and the second an array of
resourcestrings.

If no one else is currently working on the resourcestrings issue I will
try to finish my patch and post it on mantis...
This is more simpler than writing a lot of letter about what and how to
fix to be translation friendly.

Do you agree?

2016-01-15 23:19 keltezéssel, Howard írta:
> On 14/01/2016 23:27, Maxim Ganetsky wrote:
>> String "composing" is still present e. g. in "Insert from template"
>> dialog ("Choose template to ..." groupbox caption) and in main menu
>> creation form in "add menu item" fields captions.
>>
>> Also lismenueditororclickheadertosortbythatcolumn string looks
>> suspicious from this POV.
>>
>> As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try
>> to align text with buttons this way. It won't work with other than
>> Windows' fonts/font sizes (e.g. on Linux) and other languages. Better
>> change this string to regular caption like "Menu Item actions".
>>
>> Also I noticed that e. g. "Insert from template" dialog is not
>> resizable. It is better to have resizable dialogs in order to fit
>> longer translation captions (e. g. combobox caption in this case).
> 
> I have submitted a patch (29411) which I hope addresses these issues,
> except for the issue:
> 'String "composing" is still present ... in main menu creation form in
> "add menu item" fields captions'
> 
> I am not clear about which string(s) you are identifying here. Can you
> give a specific line number in the source that exemplifies the problem
> you see?
> 
> Howard
> 
> 
> 
> -- 
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> 
> 

-- 
Péter Gábor
p...@freemail.hu



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-17 Thread Juha Manninen
On Sun, Jan 17, 2016 at 2:33 PM, Péter Gábor  wrote:
> If no one else is currently working on the resourcestrings issue I will
> try to finish my patch and post it on mantis...
> This is more simpler than writing a lot of letter about what and how to
> fix to be translation friendly.
>
> Do you agree?

There is a patch from Howard:
  http://bugs.freepascal.org/view.php?id=29411
Actually I thought somebody else will take care of it. Now I assigned
it to myself.
Péter, can you please look at it and maybe attach your improved patch
to the same report.

Howard, for curiosity, your patch has:
  LCLVersion = '1.6.0.2'
The menu editor is developed in trunk 1.7. Are you using a fixex_1_6
version for editing?

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-17 Thread Péter Gábor

2016-01-17 14:00 keltezéssel, Juha Manninen írta:
> There is a patch from Howard:
>   http://bugs.freepascal.org/view.php?id=29411

I did not notice it yet.

> Péter, can you please look at it and maybe attach your improved patch
> to the same report.

Okay, now I'm working on it...

-- 
Péter Gábor
p...@freemail.hu


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-16 Thread taazz

On 23/12/2015 19:19 μμ, Juha Manninen wrote:

On Wed, Dec 23, 2015 at 9:26 AM, taazz  wrote:

stop f...ing with my system

Actually we are f...ing with Lazarus trunk, not with your system.
If you want a stable Lazarus, you should use the fixes_1_6 branch instead.
It is starting to look very good!


Using fsstayontop you are f...ing with my system! never mind I'll 
extend the old designer as a package to do what I want and disable the 
build in one.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-16 Thread Ondrej Pokorny

On 16.01.2016 16:55, taazz wrote:

Actually we are f...ing with Lazarus trunk, not with your system.
If you want a stable Lazarus, you should use the fixes_1_6 branch 
instead.

It is starting to look very good!


Using fsstayontop you are f...ing with my system! never mind I'll 
extend the old designer as a package to do what I want and disable the 
build in one.


:D

Me and you were wrong. fsStayOnTop in Lazarus is different from 
fsStayOnTop in Delphi. See: 
http://lazarus-ccr.sourceforge.net/docs/lcl/controls/tformstyle.html


Yes, there were bugs in fsStayOnTop (accross different WS) in Lazarus 
that made me (and probably also you) think that fsStayOnTop is 
system-wide - because it appeared so. But it isn't. And most of the bugs 
have been already solved, so you can use fsStayOnTop also pretty safely 
(PopupParent has also its bugs, so it is now about 50:50 depending what 
you want).


Nevertheless, the new designer DOES NOT use fsStayOnTop any more. You 
could easily check it by yourself if you had taken the time.


Please stop crying that "we are f...ing with your system!" We are 
not. And if you don't like something, you can easily suggest changes and 
send patches.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-16 Thread taazz

On 23/12/2015 12:21 μμ, Ondrej Pokorny wrote:

On 23.12.2015 08:54, taazz wrote:
I know that Delphi behaves the same but then we need some FormStyle 
that makes the window stay only on top of its application windows 
and not system-wide.




No it does not, delphi's 2007 menu designer never stays on top 
outside the application it self and never looses its position 
regardless of how many times you change between delphi and other 
applications.


I was talking about FormStyle=fsStayOnTop and not about delphi's 2007 
menu designer. fsStayOnTop in Delphi behaves the same as in Lazarus - 
it tries to keep the form above all forms system-wide.


Its a windows thing yes, it only has 2 groups of windows, normal and on 
top, each group can handle its own z-order. As you say you should never 
use it especialy when there is a working alternative that does the job 
far better.


No, you are wrong. pmAuto selects the active form as PopupParent not 
application's main form. See


  TPopupMode = (
pmNone, // default behavior - popup to mainform/taskbar window
pmAuto, *// popup to active form and same as pmNone if no active form*
pmExplicit  // popup to PopupParent and same as pmNone if not exists
  );

or the widgetset code, e.g. for Qt:

procedure TQtMainWindow.UpdateParent;
var
  NewParent: QWidgetH;
begin
  NewParent := nil;
  case FPopupMode of
pmNone: ;// no popup parent
pmAuto:
  // active form is parent
  if Screen.ActiveForm <> nil then
NewParent := TQtWidget(Screen.ActiveForm.Handle).Widget;
//...

Again, you are wrong. pmAuto doesn't have anything to do with the main 
form.


Ondrej

True sorry it seems my knowledge is outdated on this subject but I 
believe on being specific when it comes to programming, make sure that 
the popuform is set to the correct window my self and all that.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-16 Thread Ondrej Pokorny

On 15.01.2016 23:30, Howard wrote:

Sorry, my apologies - I missed that you didn't try it.


Yes working fine for me (Windows 7 32bit and Linux 64 bit).
I'm relieved that such a simple change has had such a good effect, and 
that no further tinkering with TShadowMenu size and positioning code 
was required; and that my poorly implemented scrolling code can 
therefore be dumped entirely.


Yes, you must have wasted a lot of time on the extra scrolling code :(
+ Could you take a look also at this one?: 
http://mantis.freepascal.org/view.php?id=29399
Basically you should use a simple parented TEdit and not a modal dialog. 
Take a look at grids in-place editor.


To me it seems that you have taken hard and complicated routes at a lot 
of places in the new menu editor, which are very bug-prone, hard to 
maintain and hard to understand - instead of using easy and simple ways. 
As a result, you wasted your time and also mine and others that tried to 
understand what's going wrong in the unnecessary code and tried to fix it.


This is also the case of resource strings. Take a look e.g. at r51249 
and r51305. Why was the dialog so complicated with duplicate strings? 
Yes and No as answers are clear enough.

It stated:
"Deleting this item will delete all subitems too.
Delete this item and its subitems?"
You use the word delete three times, (sub)items 2+2 times. Why? (And I 
don't count the dialog title and former buttons.)
Why not only the second line?: "Delete this item and its subitems?" -> 
again it is clear enough. Furthermore, using the same words and phrases 
over and over again is stylistically wrong.


Honestly, the new menu editor is a translator's nightmare. Although I do 
like what the new designer does, I don't really like how it is written 
:( I tried to fix some code but I am somehow already tired to go through 
all the issues.


Please don't get me wrong - I don't want to offend you in any way. I 
just want to explain that you should use the KISS-principle whereever 
possible. It will not only save everybody's time but also lead to better 
code. (I know, I also have hard time to apply KISS.)


Ondrej

PS: Just for comparison:
BEFORE:


AFTER:


Even as a user, I need much more time to understand what's going on in 
the first dialog...
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-16 Thread Howard

On 16/01/2016 21:08, Ondrej Pokorny wrote:

On 15.01.2016 23:30, Howard wrote:

Sorry, my apologies - I missed that you didn't try it.


Yes working fine for me (Windows 7 32bit and Linux 64 bit).
I'm relieved that such a simple change has had such a good effect, 
and that no further tinkering with TShadowMenu size and positioning 
code was required; and that my poorly implemented scrolling code can 
therefore be dumped entirely.


Yes, you must have wasted a lot of time on the extra scrolling code :(
+ Could you take a look also at this one?: 
http://mantis.freepascal.org/view.php?id=29399
Basically you should use a simple parented TEdit and not a modal 
dialog. Take a look at grids in-place editor.


I'll have a look later next week.


To me it seems that you have taken hard and complicated routes at a 
lot of places in the new menu editor, which are very bug-prone, hard 
to maintain and hard to understand - instead of using easy and simple 
ways. As a result, you wasted your time and also mine and others that 
tried to understand what's going wrong in the unnecessary code and 
tried to fix it.


This is also the case of resource strings. Take a look e.g. at r51249 
and r51305. Why was the dialog so complicated with duplicate strings? 
Yes and No as answers are clear enough.

It stated:
"Deleting this item will delete all subitems too.
Delete this item and its subitems?"
You use the word delete three times, (sub)items 2+2 times. Why? (And I 
don't count the dialog title and former buttons.)
Why not only the second line?: "Delete this item and its subitems?" -> 
again it is clear enough. Furthermore, using the same words and 
phrases over and over again is stylistically wrong.
In this particular instance of deleting a submenu (not just a single 
item) my motivation was not to make it overly complicated (though I 
appreciate it may seem so).
It is quite possible a user may have spent 10 minutes designing a 
submenu with half a dozen items, and then hits the delete key 
accidentally. With a simple Yes/No dialog (especially if the the default 
button is Yes) it is all to easy to hit the wrong button and lose the 
last few minutes' work; and there is no undo facility implemented.
I may have written that dialog clumsily, but I wanted to avoid the 
possibility of an 'automatic' response which was disastrous. I quite 
agree a straightforward Yes/No dialog is simpler and more elegant, but 
it may not give a hurried user sufficient 'pause' to avoid accidentally 
losing valuable work.


Honestly, the new menu editor is a translator's nightmare. Although I 
do like what the new designer does, I don't really like how it is 
written :( I tried to fix some code but I am somehow already tired to 
go through all the issues.


Please don't get me wrong - I don't want to offend you in any way. I 
just want to explain that you should use the KISS-principle whereever 
possible. It will not only save everybody's time but also lead to 
better code. (I know, I also have hard time to apply KISS.)


Ondrej

PS: Just for comparison:
BEFORE:


AFTER:


Even as a user, I need much more time to understand what's going on in 
the first dialog...
No offence taken. I appreciate you taking the time to give constructive 
feedback, as well as tracing through code you find poorly written in 
order to improve it.


You'll realise I'm on a learning curve. This is my first significant 
code contribution to an open source project. I actually never thought I 
had the skill to offer a new menueditor. It was a forum comment by the 
late BigChimp some years ago about the previous menueditor which first 
got me thinking about its shortcomings, why it was so difficult to 
improve/maintain, and how a replacement might be designed to be better 
in that respect; and several developers said a complete rewrite was the 
only way forward. Months became years and no one as far as I could see 
was working on a replacement. So I decided to bite the bullet, and 
started to look at relevant bits of the IDE code (much of which I still 
don't understand). I've been learning on the job, as you plainly see...


Howard
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-16 Thread taazz

On 16/01/2016 18:39 μμ, Ondrej Pokorny wrote:

On 16.01.2016 16:55, taazz wrote:

Actually we are f...ing with Lazarus trunk, not with your system.
If you want a stable Lazarus, you should use the fixes_1_6 branch 
instead.

It is starting to look very good!


Using fsstayontop you are f...ing with my system! never mind I'll 
extend the old designer as a package to do what I want and disable 
the build in one.


:D

Me and you were wrong. fsStayOnTop in Lazarus is different from 
fsStayOnTop in Delphi. See: 
http://lazarus-ccr.sourceforge.net/docs/lcl/controls/tformstyle.html


Yes, there were bugs in fsStayOnTop (accross different WS) in Lazarus 
that made me (and probably also you) think that fsStayOnTop is 
system-wide - because it appeared so. But it isn't. And most of the 
bugs have been already solved, so you can use fsStayOnTop also pretty 
safely (PopupParent has also its bugs, so it is now about 50:50 
depending what you want).


Nevertheless, the new designer DOES NOT use fsStayOnTop any more. You 
could easily check it by yourself if you had taken the time.


Well I'm stuck on lazarus 1.4.4 for the foreseeable future mostly 
because 1.6 made a pretty aggressive jump to utf8 and I do not have the 
time nor the inclination to retest every line of code that I have based 
on unicodestring and widestring and partly because testing new lazarus 
versions gets longer and longer each year. So I'm going to change the 
old one to fit my needs, although I like the look and feel of the new one.
As for the fsStayontop even if it works as advertised aka stays on top 
of all application windows only, it is still a bad GUI design, for 
example if I double click the menu item to write an onclick event I do 
expect the designer to not obscure my code editor nor the object 
inspector or other designers that might be open. If I select the form 
designer I do expect to see the menu designer and not search for it, so 
yeah fsStayontop is not my cup of tea sorry, then again I do not like 
nor use the docked form designer either, I prefer the free floating one.


I am trying to clear some disk space to allow for a trunk installation 
but It will probably not happen any time soon (aka no testing for the 
time being). for some reason I have ended with too many IDEs installed.


Please stop crying that "we are f...ing with your system!" We are 
not. And if you don't like something, you can easily suggest changes 
and send patches.


Its not crying, is clarifying what I mend (not elegantly I admit). I had 
too many people "pouting words in my mouth" lately and its a sensitive spot.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-15 Thread Péter Gábor


2016-01-15 00:27 keltezéssel, Maxim Ganetsky írta:
> String "composing" is still present e. g. in "Insert from template"
> dialog ("Choose template to ..." groupbox caption) and in main menu
> creation form in "add menu item" fields captions.
> 
> Also lismenueditororclickheadertosortbythatcolumn string looks
> suspicious from this POV.
> 
> As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try to
> align text with buttons this way. It won't work with other than Windows'
> fonts/font sizes (e.g. on Linux) and other languages. Better change this
> string to regular caption like "Menu Item actions".
> 
> Also I noticed that e. g. "Insert from template" dialog is not
> resizable. It is better to have resizable dialogs in order to fit longer
> translation captions (e. g. combobox caption in this case).
> 
I started typing about this when your message landed here :)

Another problem I found is that sometimes if I click in the designer
area it scrolls the content and the bottom scrollbar is fully covered.
Scrolling down with the scrollbar on the side will slowly reveal the
bottom scrollbar. Linux/GTK2 screenshot attached...

-- 
Péter Gábor
p...@freemail.hu

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-15 Thread Ondrej Pokorny

On 11.01.2016 21:36, Howard wrote:

On 11/01/2016 16:07, Anthony Walter wrote:

Very nice. I like the new design.

Side note: Who wrote that FScroller for the new menu editor? It acts 
very erratic for me on Gtk2. I don't know about on other widget sets. 
See issue 29369. Why not use TScrollBox or make TShadowMenu a 
TScrollingWinControl?


I wrote it. It is definitely the weakest part of the new designer. I 
hate to reinvent the wheel. However, I could not get a TScrollBox 
container to work correctly for TShadowMenu, perhaps because its size 
calculation and painting is rather non-standard. Whatever the reason I 
was unable to get a TScrollBox container to respond correctly to 
TShadowMenu size changes when there were more than a screenful of 
menuitems.
I'm honestly not sure if the best approach to sorting it out is to 
mend (or rewrite) FScroller, or to figure out a way for TScrollBox to 
parent TShadowMenu correctly. I did not try making TShadowMenu a 
TScrollingWinControl descendant. Perhaps that would be a better 
option. What would others advise?


What were your problems? In r51298 I removed all the Scroller code and 
simply used TScrollBox for TShadowMenu and it works without any problems 
- much better than your Scroller experiment. I tested win32 and Linux+Gtk2.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-15 Thread Ondrej Pokorny

On 15.01.2016 11:32, Ondrej Pokorny wrote:
What were your problems? In r51298 I removed all the Scroller code and 
simply used TScrollBox for TShadowMenu and it works without any 
problems - much better than your Scroller experiment. I tested win32 
and Linux+Gtk2.


Forgot to say, please test :)

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-15 Thread Ondrej Pokorny

On 15.01.2016 11:32, Ondrej Pokorny wrote:
I did not try making TShadowMenu a TScrollingWinControl descendant. 
Perhaps that would be a better option. What would others advise?


What were your problems? In r51298 I removed all the Scroller code and 
simply used TScrollBox for TShadowMenu and it works without any 
problems - much better than your Scroller experiment. I tested win32 
and Linux+Gtk2.


Sorry, my apologies - I missed that you didn't try it.

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-15 Thread Péter Gábor


2016-01-15 08:50 keltezéssel, Péter Gábor írta:
> 
> 
> 2016-01-15 00:27 keltezéssel, Maxim Ganetsky írta:
>> String "composing" is still present e. g. in "Insert from template"
>> dialog ("Choose template to ..." groupbox caption) and in main menu
>> creation form in "add menu item" fields captions.
>>
>> Also lismenueditororclickheadertosortbythatcolumn string looks
>> suspicious from this POV.
>>
>> As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try to
>> align text with buttons this way. It won't work with other than Windows'
>> fonts/font sizes (e.g. on Linux) and other languages. Better change this
>> string to regular caption like "Menu Item actions".
>>
>> Also I noticed that e. g. "Insert from template" dialog is not
>> resizable. It is better to have resizable dialogs in order to fit longer
>> translation captions (e. g. combobox caption in this case).
>>
> I started typing about this when your message landed here :)
> 
> Another problem I found is that sometimes if I click in the designer
> area it scrolls the content and the bottom scrollbar is fully covered.
> Scrolling down with the scrollbar on the side will slowly reveal the
> bottom scrollbar. Linux/GTK2 screenshot attached...
> 
Also when I drag the bottom scrollbar the content will cover/reveal the
scrollbar on the side of the designer...

-- 
Péter Gábor
p...@freemail.hu


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-15 Thread Howard

On 14/01/2016 23:27, Maxim Ganetsky wrote:
String "composing" is still present e. g. in "Insert from template" 
dialog ("Choose template to ..." groupbox caption) and in main menu 
creation form in "add menu item" fields captions.


Also lismenueditororclickheadertosortbythatcolumn string looks 
suspicious from this POV.


As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try 
to align text with buttons this way. It won't work with other than 
Windows' fonts/font sizes (e.g. on Linux) and other languages. Better 
change this string to regular caption like "Menu Item actions".


Also I noticed that e. g. "Insert from template" dialog is not 
resizable. It is better to have resizable dialogs in order to fit 
longer translation captions (e. g. combobox caption in this case).


I have submitted a patch (29411) which I hope addresses these issues, 
except for the issue:
'String "composing" is still present ... in main menu creation form in 
"add menu item" fields captions'


I am not clear about which string(s) you are identifying here. Can you 
give a specific line number in the source that exemplifies the problem 
you see?


Howard



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-15 Thread Howard



On 15/01/2016 11:04, Ondrej Pokorny wrote:

On 15.01.2016 11:32, Ondrej Pokorny wrote:
I did not try making TShadowMenu a TScrollingWinControl descendant. 
Perhaps that would be a better option. What would others advise?


What were your problems? In r51298 I removed all the Scroller code 
and simply used TScrollBox for TShadowMenu and it works without any 
problems - much better than your Scroller experiment. I tested win32 
and Linux+Gtk2.


Sorry, my apologies - I missed that you didn't try it.


Yes working fine for me (Windows 7 32bit and Linux 64 bit).
I'm relieved that such a simple change has had such a good effect, and 
that no further tinkering with TShadowMenu size and positioning code was 
required; and that my poorly implemented scrolling code can therefore be 
dumped entirely.


Howard

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-14 Thread Maxim Ganetsky

12.01.2016 22:17, Howard пишет:

On 12/01/2016 14:37, Péter Gábor wrote:


2016-01-12 15:26 keltezéssel, Howard írta:

OK, point taken. I will amend the offending resourcestrings in a patch.
I'm not a linguist nor a translator, so did not appreciate that this
would cause difficulty.
My motive was simply to reduce the overall number of resourcestrings
required

I know :) and thanks for your work!


I have attached a third small patch to issue 29205, to address the
infelicity in some menu editor resourcestrings identified by Péter.
Could Ondrej or Juha review this?


String "composing" is still present e. g. in "Insert from template" 
dialog ("Choose template to ..." groupbox caption) and in main menu 
creation form in "add menu item" fields captions.


Also lismenueditororclickheadertosortbythatcolumn string looks 
suspicious from this POV.


As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try to 
align text with buttons this way. It won't work with other than Windows' 
fonts/font sizes (e.g. on Linux) and other languages. Better change this 
string to regular caption like "Menu Item actions".


Also I noticed that e. g. "Insert from template" dialog is not 
resizable. It is better to have resizable dialogs in order to fit longer 
translation captions (e. g. combobox caption in this case).


--
Best regards,
 Maxim Ganetsky  mailto:gan...@narod.ru

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-12 Thread Howard



On 11/01/2016 21:51, Anthony Walter wrote:
Howard, good job on the new menu designer. It's working very nicely 
right now. I'll take a look at modifying TShadowMenu to be a scrolling 
control without the need for a TScrollBox.


Thanks. Yes, Ondrej's introduction of TSiblingFake and TFirstFake are a 
neat improvement.


Howard


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-12 Thread Ondrej Pokorny

On 12.01.2016 9:39, Howard wrote:
Yes, Ondrej's introduction of TSiblingFake and TFirstFake are a neat 
improvement.


Thanks! You did a nice job with the menu designer!

I would ask you to omit the with statement, though. IIRC there are even 
nested with statements in the code.


Withs can easily be sources of unnecessary bugs and errors.

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-12 Thread Howard

On 12/01/2016 13:44, Péter Gábor wrote:
Please use complete sentences as much as possible and avoid storing > of partial sentences in resourcestrings. I mean don't compose > 
complete sentences in run/compile time from words or partial > 
sentences. Such resourcestrings makes localization harder or > 
completely impossible in languages that have different grammar: word > 
order, system of prefixes/suffixes, agglutination, inflection, and > 
other things that I can't imagine. > An example of how NOT to fragment 
sentences: msgid " conflicts%s" msgid " remain>" msgid " 
to resolve>" Also fragments can > have different meaning and 
translations depending on that they are > used combined or not.


OK, point taken. I will amend the offending resourcestrings in a patch.
I'm not a linguist nor a translator, so did not appreciate that this 
would cause difficulty.
My motive was simply to reduce the overall number of resourcestrings 
required by reuse of phrase "atoms", which I see now works 
satisfactorily only if a single language is ever employed.


Howard
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-12 Thread Péter Gábor


2015-12-26 20:37 keltezéssel, Howard Page-Clark írta:
> I was waiting for more feedback about the design/functionality, and for
> responses to settle into some sort of consensus about what needs to be
> changed/improved/removed. 
> The resourcestrings, for instance, need the attention Peter
> indicated, plus more.

Please use complete sentences as much as possible and avoid storing of
partial sentences in resourcestrings.
I mean don't compose complete sentences in run/compile time from words
or partial sentences. Such resourcestrings makes localization harder or
completely impossible in languages that have different grammar: word
order, system of prefixes/suffixes, agglutination, inflection, and other
things that I can't imagine.

An example of how NOT to fragment sentences:

msgid ""
msgid " to resolve>"

Also fragments can have different meaning and translations depending on
that they are used combined or not.

-- 
Péter Gábor
p...@freemail.hu


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-12 Thread Howard

On 12/01/2016 14:37, Péter Gábor wrote:


2016-01-12 15:26 keltezéssel, Howard írta:

OK, point taken. I will amend the offending resourcestrings in a patch.
I'm not a linguist nor a translator, so did not appreciate that this
would cause difficulty.
My motive was simply to reduce the overall number of resourcestrings
required

I know :) and thanks for your work!


I have attached a third small patch to issue 29205, to address the 
infelicity in some menu editor resourcestrings identified by Péter.

Could Ondrej or Juha review this?

Howard

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-12 Thread Corpsman
Hello i testet SVN Revision 51256 of the Menu designer and it looks
really cool.

But i miss the Feature

"If you doubleclick on the Menu Entry the IDE Jumps to the corresponding
OnCLick Event"

Which worked in the old version e.g. 50469

Could you please reactivate this ?

Corpsman

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-12 Thread Péter Gábor


2016-01-12 15:26 keltezéssel, Howard írta:
> OK, point taken. I will amend the offending resourcestrings in a patch.
> I'm not a linguist nor a translator, so did not appreciate that this
> would cause difficulty.
> My motive was simply to reduce the overall number of resourcestrings
> required 
I know :) and thanks for your work!

-- 
Péter Gábor
p...@freemail.hu


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Anthony Walter
Howard, good job on the new menu designer. It's working very nicely right
now. I'll take a look at modifying TShadowMenu to be a scrolling control
without the need for a TScrollBox.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 10:09, Anthony Walter wrote:
No matter where I click it always shows the same pattern: ugly blue 
check board below, ugly aliased triangles to the right.


Can you please define "ugly" in an objective way?

I can say the same about your approach: "/No matter where I click it 
always shows the same pattern: ugly slanted gray lines below and the 
same to the right./"



The pattern inside the rectangle make no difference. It's purely a 
distraction which will probably have people wondering why it's even 
being drawn differently.


IMO, it is very clear, again:
- Arrows: new submenu item.
- Squares: new sibling menu item.

You have the same pattern for both submenu and siblings. If you don't 
like the current patterns, propose 2 different patterns (or images) for 
submenu/sibling as well.


Ondrej
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 4:33, Dmitry Boyarintsev wrote:

The bottom one. It's more "calm". Doesn't look like a circus.​


I prefer the old one (top) :) The arrows/squares are very neat and show 
what you are going to do.


If you think it looks like a circus, what about using a less agressive 
colour for the arrows?


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 9:35, Ondrej Pokorny wrote:
I prefer the old one (top) :) The arrows/squares are very neat and 
show what you are going to do.


Arrows: new submenu item.
Squares: new sibling menu item.

Very neat, IMO. Not to be removed, please :)

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Anthony Walter
In my opinion the top one is kind of terrible. Just look at this video:

http://cache.getlazarus.org/videos/menu-arrows.mp4

No matter where I click it always shows the same pattern: ugly blue check
board below, ugly aliased triangles to the right.

I can tell the item is going to be inserted below, because there is a
rectangle below.
I can tell the items are inserted to the right, because there is a
rectangle to the right.

The pattern inside the rectangle make no difference. It's purely a
distraction which will probably have people wondering why it's even being
drawn differently.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread JuuS
The top one.

I find there is room for beauty (ugly?) and personality in programming.
I find straight forward utilitarian to be ugly. I like things to be
interesting.

Any way to make the pattern settable? Win-Win!

On 01/11/2016 10:34 AM, Anthony Walter wrote:
> The point is, on a TPopupMenu if the pattern to the right is always
> alias arrows, and the pattern below is always check board, then it's
> entirely superfluous, nonessential, redundant, and unneeded.
> 
> 
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Graeme Geldenhuys
On 2016-01-11 03:33, Dmitry Boyarintsev wrote:
> The bottom one. It's more "calm". Doesn't look like a circus.​

+1



Regards,
  - Graeme -


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Anthony Walter
The point is, on a TPopupMenu if the pattern to the right is always alias
arrows, and the pattern below is always check board, then it's entirely
superfluous, nonessential, redundant, and unneeded.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Graeme Geldenhuys
On 2016-01-11 09:21, Ondrej Pokorny wrote:
> IMO, it is very clear, again:
> - Arrows: new submenu item.
> - Squares: new sibling menu item.

As a programmer the bottom image is equally clear to me. I simply find
the bottom one more pleasing to the eye - less distracting.

If the arrows and squares must stay, then please switch to anti-aliased
drawing. Why is LCL still defaulting to aliased drawing [read as really
ugly and so early 90's] in this day an age.


Regards,
  - Graeme -


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Howard



On 11/01/2016 16:07, Anthony Walter wrote:

Very nice. I like the new design.

Side note: Who wrote that FScroller for the new menu editor? It acts 
very erratic for me on Gtk2. I don't know about on other widget sets. 
See issue 29369. Why not use TScrollBox or make TShadowMenu a 
TScrollingWinControl?


I wrote it. It is definitely the weakest part of the new designer. I 
hate to reinvent the wheel. However, I could not get a TScrollBox 
container to work correctly for TShadowMenu, perhaps because its size 
calculation and painting is rather non-standard. Whatever the reason I 
was unable to get a TScrollBox container to respond correctly to 
TShadowMenu size changes when there were more than a screenful of menuitems.
I'm honestly not sure if the best approach to sorting it out is to mend 
(or rewrite) FScroller, or to figure out a way for TScrollBox to parent 
TShadowMenu correctly. I did not try making TShadowMenu a 
TScrollingWinControl descendant. Perhaps that would be a better option. 
What would others advise?


Howard

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Anthony Walter
On my system suddenly all is well with the new menu editor. Nice work :)

The docked form designer still has the issue where it's not being
realigned/repainted when a TMainMenu is placed on it. Issue 29370.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Howard



On 11/01/2016 12:35, Ondrej Pokorny wrote:

On 11.01.2016 13:31, Howard wrote:
The latest trunk accepts a patch which adopts Bart's suggestion of 
identifying the purpose of the dummy menuitem by displaying a 
self-descriptive text. The background is no longer patterned. Of 
course this can be further changed.


Where is the patch?

It is the second patch submitted on issue 29205

Howard

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 14:20, Bart wrote:

In the image below, which style do you prefer. The top or bottom?

The bottom one.


Looks like I have been outvoted :) No problem.


On 11.01.2016 10:09, Anthony Walter wrote:

ugly aliased triangles

On 11.01.2016 11:25, Graeme Geldenhuys wrote:

If the arrows and squares must stay, then please switch to anti-aliased
drawing.


Just a technical remark: if I see correctly, Anthony doesn't use 
anti-aliasing either :)


Still, no problem, do whatever you want with the pattern. There are more 
important things in Lazarus. The user experience won't be very different 
with whatever pattern.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Bart
On 1/11/16, Anthony Walter  wrote:

> In the image below, which style do you prefer. The top or bottom?

Suggestion: can you put the buttons in a grid like container?
With at least vertical lines between the different groups.

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Juha Manninen
On Mon, Jan 11, 2016 at 3:38 PM, Howard  wrote:
> It is the second patch submitted on issue 29205

Oops, I failed to notice it. Should it be applied?
I am happy if the issue is assigned to somebody else. Bart? Ondrej?
I have some other issues to look at.

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 14:51, Juha Manninen wrote:

Oops, I failed to notice it. Should it be applied?


I'll apply it manually. The patch won't apply because I fixed some 
issues recently.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Juha Manninen
On Mon, Jan 11, 2016 at 4:18 PM, Ondrej Pokorny  wrote:
> I'll apply it manually. The patch won't apply because I fixed some issues
> recently.

Assigned the issue to you. Thanks. :)

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 13:31, Howard wrote:
The latest trunk accepts a patch which adopts Bart's suggestion of 
identifying the purpose of the dummy menuitem by displaying a 
self-descriptive text. The background is no longer patterned. Of 
course this can be further changed.


Where is the patch?

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Bart
On 1/11/16, Anthony Walter  wrote:

> In the image below, which style do you prefer. The top or bottom?

The bottom one.
Please add a text to it so one knows what it does.

Keep up the good work !!!

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Howard

On 11/01/2016 09:34, Anthony Walter wrote:
The point is, on a TPopupMenu if the pattern to the right is always 
alias arrows, and the pattern below is always check board, then it's 
entirely superfluous, nonessential, redundant, and unneeded.


The latest trunk accepts a patch which adopts Bart's suggestion of 
identifying the purpose of the dummy menuitem by displaying a 
self-descriptive text. The background is no longer patterned. Of course 
this can be further changed.


Howard


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] new menu designer: dblClick should show assigned code?!!

2016-01-11 Thread John Landmesser

dblClick does not actually show assignde Code?!!

just svn-updated lazarus:

Lazarus 1.7 r1.5 FPC 2.6.4 x86_64-linux-gtk 2

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Anthony Walter
Very nice. I like the new design.

Side note: Who wrote that FScroller for the new menu editor? It acts very
erratic for me on Gtk2. I don't know about on other widget sets. See
issue 29369. Why not use TScrollBox or make TShadowMenu a
TScrollingWinControl?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 14:38, Howard wrote:

It is the second patch submitted on issue 29205


Applied. IMO the discussion about the pattern is now solved :)

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] new menu designer: dblClick should show assigned code?!!

2016-01-11 Thread John Landmesser

Am 11.01.2016 um 18:26 schrieb John Landmesser:

dblClick does not actually show assignde Code?!!

just svn-updated lazarus:

Lazarus 1.7 r1.5 FPC 2.6.4 x86_64-linux-gtk 2

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



just saw it: Revision 51256 ... but ...  r1.5 ( see above )

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-11 Thread Ondrej Pokorny

On 11.01.2016 17:07, Anthony Walter wrote:
Side note: Who wrote that FScroller for the new menu editor? It acts 
very erratic for me on Gtk2. I don't know about on other widget sets. 
See issue 29369.


You can easily check by yourself in the SVN history. I don't know.



Why not use TScrollBox or make TShadowMenu a TScrollingWinControl?


Yes, it behaves strangely on win32 as well. You are welcome to create a 
patch.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] New menu designer. which style do you prefer?

2016-01-10 Thread Anthony Walter
In the image below, which style do you prefer. The top or bottom?

http://cache.getlazarus.org/images/menu-patterns.gif
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer. which style do you prefer?

2016-01-10 Thread Dmitry Boyarintsev
The bottom one. It's more "calm". Doesn't look like a circus.​
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-04 Thread Bart
On 12/22/15, Juha Manninen  wrote:
> Hello
>
> I committed a new Menu Designer by Howard Page-Clark in r50992.
> See:
>   http://bugs.freepascal.org/view.php?id=29205

Can we implement it so that adding a sumnenu to a Separator (a
menuItem with '-' as caption) will either be disallowed, or a warning
will be shown because several widgetsets crash on that.
(Same for setting Caption to '-' of an existing item with a submenu.)

See http://bugs.freepascal.org/view.php?id=24476

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-04 Thread Howard Page-Clark

On 04/01/2016 14:24, Bart wrote:

On 12/22/15, Juha Manninen  wrote:

Hello

I committed a new Menu Designer by Howard Page-Clark in r50992.
See:
   http://bugs.freepascal.org/view.php?id=29205


Can we implement it so that adding a sumnenu to a Separator (a
menuItem with '-' as caption) will either be disallowed, or a warning
will be shown because several widgetsets crash on that.
(Same for setting Caption to '-' of an existing item with a submenu.)


In the new menu editor adding a submenu to a separator is already 
disallowed (popup menu option/toolbutton is disabled if a separator is 
highlighted). Do you not find this?

However, the rename Caption function presently ignores this loophole.
I will close this loophole in the patch I am working on (and hope to 
submit later this week).


Howard


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-04 Thread Bart
On 1/4/16, Bart  wrote:

>> In the new menu editor adding a submenu to a separator is already
>> disallowed (popup menu option/toolbutton is disabled if a separator is
>> highlighted). Do you not find this?
>
> Shamefully admits: I did not check that.

Checked it. Fine.

Can I make a suggestion about the "colored space" right and below menu-items.
I found out (by chance) that clicking on it would create a submenu.
That is awesome!
A text inside the space saying so, would be a nice feature IMO.

Another suggestion: the button that deletes an item: the icon could be
changed to a trashcan (we have at least one icon of a trashcan about
somewhere). I suggest this because the minus-sign to me also suggests
adding a separator (since that means setting caption to '-').

About the "renaming caption to '-' loophole": maybe this should be
forbidden for all cases. If user tries to, then show a message saying:
"use insert separator instead", or something alike.



Overall first impression: very nice improvement (I dons'use docking).

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2016-01-04 Thread Bart
On 1/4/16, Howard Page-Clark  wrote:


> In the new menu editor adding a submenu to a separator is already
> disallowed (popup menu option/toolbutton is disabled if a separator is
> highlighted). Do you not find this?

Shamefully admits: I did not check that.

> However, the rename Caption function presently ignores this loophole.
> I will close this loophole in the patch I am working on (and hope to
> submit later this week).

Nice.

Thanks,

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-27 Thread Howard Page-Clark

On 26/12/2015 23:27, Juha Manninen wrote:

Howard, as the author you also have voting power over the GUI.
Besides GUI design is difficult, there is never a "right" solution
that everybody would agree upon.

Yes, dictatorship is far more efficient than democracy.


Yet I feel some things should be changed. All settings that duplicate
OI properties should either be moved to a bottom section of a popup
menu, or they should be removed completely.
Then the remaing GroupIndex feature from "Checkmark and radioitem
properties" dialog could be moved to the main window of menu designer
and the dialog then removed completely.
OK, I will work on a suitable patch that addresses these and the other 
issues that e.g. Péter and Maxim raised.


There are other usability issues, too.

Namely...?


From Kostas:
Since the menu editor is redesigned, why not do it like in Windows Forms
and NetBeans with the "inline editor" which is part of the form editor?


Good idea but how to implement it? It may not be a trivial task. We
can plan a future third iteration of menu designer to be an "inline
editor".
I'm not familiar either with Windows Forms or Netbeans. I'll do some 
research on this idea next year.


Howard


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-27 Thread Juha Manninen
On Sun, Dec 27, 2015 at 1:34 PM, Howard Page-Clark  wrote:
> Yes, dictatorship is far more efficient than democracy.

True, but this is neither dictatorship nor democracy. This is more
like meritocracy. :)

>> There are other usability issues, too.
> Namely...?

Top level menuitems in a MainMenu can be selected but there is no
indication about it. Other items get a blue rectancle.

There is a graph at right and bottom side of a selected item. A new
item gets created when it is clicked. It happens so easily that items
will be created by accident. Maybe a new item could become "real" only
after some property is changed. On the other hand the accidental item
is easy to delete.
The graph itself looks interesting and maybe too strong. It is a
matter of opinion of course.

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-27 Thread Ondrej Pokorny

On 22.12.2015 23:42, Anthony Walter wrote:
Stay on top is needed because the a menu designer is typically a 
separate non docking window (a dialog). For all users menu editing 
invariably consists of:


1. Creating a menu (or sub menu) item using the menu editor dialog
2. Then editing the menu item properties using the object inspector 
(setting the name/caption, possibly creating a click event stub)

3. Go back to step 1


In the undocked IDE there is absolutely no problem when the menu 
designer is not stay-on-top. You can switch from OI to ME there and back 
without any problems.

-> Stay on top is not needed. IMO on the contrary it is bad.

On 23.12.2015 00:39, Juha Manninen wrote:

Correct, and this becomes more important when AnchorDocking is used.
Some other windows, namely Actionlisteditor and Collectionitem have
the same issue.
Forum user Soner A. had a valid point here:
  
http://forum.lazarus.freepascal.org/index.php/topic,30663.msg195989.html#msg195989

I was already planning to check the behavior of those windows and ask
for opinions.


I added PopupParent to Actionlisteditor and Collectionitem as well. But 
only in the docked IDE. r51051, r51052.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-27 Thread Howard Page-Clark

On 27/12/2015 13:25, Ondrej Pokorny wrote:

On 27.12.2015 14:21, Juha Manninen wrote:

On Sun, Dec 27, 2015 at 2:46 PM, Ondrej Pokorny
wrote:

>Highlighting works fine on Windows. It doesn't work on Linux. I haven't
>checked OSX.

Strange. I have tested with GTK2 and QT on Linux and the Windows
version using Wine. They all behave identically in this respect.


Don't forget that Linux+Wine is not Windows+win32 :)


The LCL implementation of themes (based on the work of Mike Lischke) for 
mainmenu highlighting in GTK2 and QT appears to work differently from 
the Windows implementation.
I will work on providing a custom-drawn mainmenu highlight across the 
board, and not depend on themeservices to display this, whether the 
needed highlight is for a main menu or a popupmenu, as a workaround in 
this case of the menu editor.


A better long term solution would be to make the highlight theming for 
TMainMenu and TPopupMenu fully consistent across all widgetsets. 
However, that is a task beyond me.


Howard


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-27 Thread Ondrej Pokorny

On 27.12.2015 13:10, Juha Manninen wrote:

Top level menuitems in a MainMenu can be selected but there is no
indication about it. Other items get a blue rectancle.


Highlighting works fine on Windows. It doesn't work on Linux. I haven't 
checked OSX.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-27 Thread Juha Manninen
On Sun, Dec 27, 2015 at 2:46 PM, Ondrej Pokorny  wrote:
> Highlighting works fine on Windows. It doesn't work on Linux. I haven't
> checked OSX.

Strange. I have tested with GTK2 and QT on Linux and the Windows
version using Wine. They all behave identically in this respect.

There was talk about the left sidebar. I don't see a problem having
it. Its usability can be fine-tuned of course.
We have space to use. The GroupIndex feature should fit there, too.

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-27 Thread Ondrej Pokorny

On 27.12.2015 14:21, Juha Manninen wrote:

On Sun, Dec 27, 2015 at 2:46 PM, Ondrej Pokorny  wrote:

>Highlighting works fine on Windows. It doesn't work on Linux. I haven't
>checked OSX.

Strange. I have tested with GTK2 and QT on Linux and the Windows
version using Wine. They all behave identically in this respect.


Don't forget that Linux+Wine is not Windows+win32 :)

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-26 Thread Juha Manninen
On Sat, Dec 26, 2015 at 1:09 PM, Péter Gábor  wrote:
> Some examples of resourcestrings that can/must be merged
> ...

Yes, I didn't even notice that.


> Also a question: can this (new) menu designer implemented as a
> separate/installable package to allow the usage of old one?

No, my idea was to replace the old menu designer with a new one.
Something is wrong with the design of the old one. Everybody who has
modified and improved it says the same. Some improvements just feel
impossible without a complete rewrite.
So, this was the rewrite we were asking for.

I was hoping the author Howard Page-Clark would participate in the
discussion and improve his designer based on feedback. Maintenance is
always an important part of any code.
I have not studied details of the code yet but I plan to do it soon.
In any case, if I will be a sole maintainer of this code then I am
disappointed. I was hoping for a shared effort.

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-26 Thread Howard Page-Clark

On 26/12/2015 19:06, Juha Manninen wrote:

On Sat, Dec 26, 2015 at 1:09 PM, Péter Gábor  wrote:

Some examples of resourcestrings that can/must be merged



No, my idea was to replace the old menu designer with a new one.
Something is wrong with the design of the old one. Everybody who has
modified and improved it says the same. Some improvements just feel
impossible without a complete rewrite.
So, this was the rewrite we were asking for.

I was hoping the author Howard Page-Clark would participate in the
discussion and improve his designer based on feedback. Maintenance is
always an important part of any code.
I have not studied details of the code yet but I plan to do it soon.
In any case, if I will be a sole maintainer of this code then I am
disappointed. I was hoping for a shared effort.


I was waiting for more feedback about the design/functionality, and for 
responses to settle into some sort of consensus about what needs to be 
changed/improved/removed. (I had nothing to add to the fsStayOnTop 
discussion). I am perfectly happy to amend the code in line with what is 
agreed here. The resourcestrings, for instance, need the attention Peter 
indicated, plus more. This was a clear oversight on my part.


However, if functionality is to be removed, the pruning of the 
resourcestrings would be more drastic. Is it agreed to remove the 
RadioItem/CheckMark dialog? Is the left panel not needed at all?
The redundancy of duplicated items in that panel was part of the design, 
a bit of hand-holding for beginners, but perhaps it out of place.


The opening mini-wizard-style question when dropping a new menu on a 
form could be handled differently, or additionally have a section in the 
main IDE Options dialog, for instance that provided a default, and a 
choice of whether the wizard were ever shown.


I certainly expect to share in the maintainance of anything I 
contribute. However, you will realize that I am a hobbyist, not a 
professional programmer, and so my skills are limited compared to most 
of those who read this list, and I am hampered by little experience of 
operating systems other than Windows variants.


If there are reproducible crashes arising from the new editor, that 
certainly requires diagnosis and attention. I don't get them here, but 
if others do...


yours

Howard




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-26 Thread Péter Gábor
Hi!

2015-12-23 12:31 keltezéssel, Maxim Ganetsky írta:
> BTW, from localizer POV 150-180 extra resource strings that were added
> with this patch (which is a VERY bug number) point to likely
> functionality duplication. :)

Some examples of resourcestrings that can/must be merged

Editing %s.%s - no menu item selected
Editing %s.%s - no menuitem selected





Resolved conflicts: %d
Resolved conflicts: 0

Shortcut items: %d
Shortcut items: n/a

%s: Shortcuts & accelerator keys
%s: Shortcuts and accelerator keys

.. and there may be a lot more.

Also a question: can this (new) menu designer implemented as a
separate/installable package to allow the usage of old one?

(an example of what I'm talking about is Sparta Docked Form Editor in
components/sparta/)

-- 
Péter Gábor
p...@freemail.hu



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-26 Thread Juha Manninen
Howard, as the author you also have voting power over the GUI.
Besides GUI design is difficult, there is never a "right" solution
that everybody would agree upon.
Yet I feel some things should be changed. All settings that duplicate
OI properties should either be moved to a bottom section of a popup
menu, or they should be removed completely.
Then the remaing GroupIndex feature from "Checkmark and radioitem
properties" dialog could be moved to the main window of menu designer
and the dialog then removed completely.

There are other usability issues, too.

I haven't seen crashes either. How to reproduce?

>From Kostas:
> Since the menu editor is redesigned, why not do it like in Windows Forms
> and NetBeans with the "inline editor" which is part of the form editor?

Good idea but how to implement it? It may not be a trivial task. We
can plan a future third iteration of menu designer to be an "inline
editor".

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-24 Thread Ondrej Pokorny

On 23.12.2015 22:46, Dmitry Boyarintsev wrote:

Did you try restoring thumbnail mode for Alt-tab?


It works well in thumbnail mode. The fsStayOnTop-window gets correctly 
hidden behind the new external (Thunderbird, whatever) window when 
switched to it with Alt+Tab.


But this is not a solution. The old Alt+Tab dialog is by default used in 
up to Win7 with themes disabled. It also can be set up in Win10 (as I do).
Everybody running Win7 with themes disabled (I know a lot of people) are 
affected by this bug.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-24 Thread Ondrej Pokorny

On 23.12.2015 19:12, Ondrej Pokorny wrote:
I hope Zeljko can find an easy way to do it. It would be a pity if we 
couldn't use PopupParent/PopupMode because it is not supported on 
Qt/Gtk2 :(


Zeljko fixed support of PopupParent/PopupMode in Qt and me in Gtk2 in 
r51022, r51023.
Please test. It works well on my Kubuntu/KDE testing desktop with both 
Qt and Gtk2.


If you confirm that menu designer works on your configuration as well, 
r51008 is the way to go with other dialogs that have to stay on top of 
the object inspector or its form parent in docked environment.


Please don't use fsStayOnTop because it is buggy (doesn't behave as 
documented/intended both on my Win10 and Linux desktop).


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-24 Thread Ondrej Pokorny

On 23.12.2015 18:54, Dmitry Boyarintsev wrote:

To sum things up: using fsStayOnTop in the new menu designer is not bad.


If fsStayOnTop worked as it is documented, I would be all for it.
But
1.) it has issues on Windows.
2.) it completely fails on Linux/KDE.

So, no, it is bad :(

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-23 Thread Ondrej Pokorny

On 23.12.2015 08:54, taazz wrote:
I know that Delphi behaves the same but then we need some FormStyle 
that makes the window stay only on top of its application windows and 
not system-wide.




No it does not, delphi's 2007 menu designer never stays on top outside 
the application it self and never looses its position regardless of 
how many times you change between delphi and other applications.


I was talking about FormStyle=fsStayOnTop and not about delphi's 2007 
menu designer. fsStayOnTop in Delphi behaves the same as in Lazarus - it 
tries to keep the form above all forms system-wide.


On 23.12.2015 08:54, taazz wrote:
E.g. I am writing now this email. I open Menu designer in Lazarus and 
then switch back to my email program - the email program is covered 
by the menu designer from Lazarus, which is absolutely not OK in my 
eyes.


Bad :( The PopupMode should solve the problem. 
No, pmauto will autoselect the applications main form as popupparent 
you need to set the formdesigner as the popupparrent for all the 
component designers (menu, stringgrid, collections etc). This way 
double clicking an event will hide the designers which will be back on 
top when you focus the form designer.


No, you are wrong. pmAuto selects the active form as PopupParent not 
application's main form. See


  TPopupMode = (
pmNone, // default behavior - popup to mainform/taskbar window
pmAuto, *// popup to active form and same as pmNone if no active form*
pmExplicit  // popup to PopupParent and same as pmNone if not exists
  );

or the widgetset code, e.g. for Qt:

procedure TQtMainWindow.UpdateParent;
var
  NewParent: QWidgetH;
begin
  NewParent := nil;
  case FPopupMode of
pmNone: ;// no popup parent
pmAuto:
  // active form is parent
  if Screen.ActiveForm <> nil then
NewParent := TQtWidget(Screen.ActiveForm.Handle).Widget;
//...

On 23.12.2015 08:54, taazz wrote:
On Win32 it works well with PopupMode=pmAuto. On my testing 
Linux/Gtk2 system it works the same with pmNode and pmAuto - it 
correctly shows the "Checkmark and radioitem properties" dialog above 
Menu designer.

What OS/WS are you seeing the problem?

Yes and no depends heavily which is the main form and how it changes 
between versions.




Again, you are wrong. pmAuto doesn't have anything to do with the main form.

Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-23 Thread Maxim Ganetsky


23.12.2015 02:39, Juha Manninen пишет:
> On Wed, Dec 23, 2015 at 12:42 AM, Anthony Walter  wrote:
>> As such, in the case of editor menus, it makes total sense to keep the menu
>> editor on top of other IDE windows until the time when the user closes the
>> menu editor (clicks the X button in the menu editor title bar). Any non stay
>> on top form style for menu editing would driver users crazy.
> 
> Correct, and this becomes more important when AnchorDocking is used.
> Some other windows, namely Actionlisteditor and Collectionitem have
> the same issue.
> Forum user Soner A. had a valid point here:
>  
> http://forum.lazarus.freepascal.org/index.php/topic,30663.msg195989.html#msg195989
> 
> I was already planning to check the behavior of those windows and ask
> for opinions.
> 
> Ondrej, r50993  makes no difference.
> Anyway, I am planning to remove the whole "Checkmark and radioitem
> properties" dialog. Any (strong) objection?

BTW, from localizer POV 150-180 extra resource strings that were added
with this patch (which is a VERY bug number) point to likely
functionality duplication. :)

-- 
Best regards,
 Maxim Ganetsky  mailto:gan...@narod.ru

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-23 Thread Ondrej Pokorny

On 23.12.2015 08:26, taazz wrote:

On 23/12/2015 00:42 πμ, Anthony Walter wrote:

Ondrej,

The old menu designer was stay on top as well.
Why would I need to see the menu designer when I change application to 
anything other than lazarus? The old behavior is why I still design my 
menus in delphi.


Stay on top is needed because the a menu designer is typically a 
separate non docking window (a dialog). For all users menu editing 
invariably consists of:
If you want to make sure it stays on top of the form designer use the 
PopupParent and PopupMode properties


Yes, this is correct. Please test r51008 (also you, Juha).



stop f...ing with my system


Although I am of the same opinion as you regarding fsStayOnTop, I 
strongly encourage you to use a more appropriate language when 
presenting your fixes and ideas.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 2:26 AM, Ondrej Pokorny  wrote:

> What I don't like on fsStayOnTop is the fact that fsStayOnTop-Window wants
> to stay on top of all windows - also those from other applications. This is
> IMO a seriously bad UI design. I know that Delphi behaves the same but then
> we need some FormStyle that makes the window stay only on top of its
> application windows and not system-wide.
>

I thought that
fsStayOnTop - stay on top of all windows within the application
fsSystemStayOnTop - stay on top of all windows within system.

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-23 Thread Juha Manninen
On Wed, Dec 23, 2015 at 9:26 AM, taazz  wrote:
> stop f...ing with my system

Actually we are f...ing with Lazarus trunk, not with your system.
If you want a stable Lazarus, you should use the fixes_1_6 branch instead.
It is starting to look very good!

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-23 Thread Ondrej Pokorny

On 23.12.2015 19:18, Dmitry Boyarintsev wrote:
On Wed, Dec 23, 2015 at 12:11 PM, Ondrej Pokorny > wrote:


No, this is not true. It does bother my email client such as any
other fsStayOnTop window, see attachment - from the Win10 theme
you can recognize that the email client window is focused and
active and is still covered by "Leaks and Traces".

I also have Win10 and Mozilla Thunderbird, cannot reproduce the issue 
(using trunk).

Do you have any local LCL (win32) changes?


No, I have no local changes. I always commit them to trunk :)

Steps to reproduce: use Alt+Tab when switching to Thunderbird.

On Linux/KDE "Leaks and Traces" stays on top of all other application 
windows regardless how you switch to them.


Ondrej
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-23 Thread Dmitry Boyarintsev
On Wed, Dec 23, 2015 at 12:11 PM, Ondrej Pokorny  wrote:

> No, this is not true. It does bother my email client such as any other
> fsStayOnTop window, see attachment - from the Win10 theme you can recognize
> that the email client window is focused and active and is still covered by
> "Leaks and Traces".
>
I also have Win10 and Mozilla Thunderbird, cannot reproduce the issue
(using trunk).
Do you have any local LCL (win32) changes?

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-23 Thread Ondrej Pokorny

On 23.12.2015 17:26, Dmitry Boyarintsev wrote:

fsStayOnTop - stay on top of all windows within the application
fsSystemStayOnTop - stay on top of all windows within system.


For the sake of backwards compatibility the other way round would 
be more appropriate, IMO:


fsAppStayOnTop - stay on top of all windows within the application
fsStayOnTop - stay on top of all windows within system. (current behavior)

Another thing is if fsAppStayOnTop is supported natively by OSs Lazarus 
is targetting or has to be somehow achieved by the LCL itself and how.
As taazz pointed out, for some usage PopupMenu=pmExplicit + PopupParent 
is good enough and maybe even a better solution.


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] New menu designer

2015-12-23 Thread Ondrej Pokorny

On 23.12.2015 17:30, Dmitry Boyarintsev wrote:
On Wed, Dec 23, 2015 at 11:26 AM, Dmitry Boyarintsev 
> wrote:


fsStayOnTop - stay on top of all windows within the application
fsSystemStayOnTop - stay on top of all windows within system.


As an example.
LeakView allows a user to switch between "fsStayOnTop" and "fsNormal".


This is one possibility. But I remember such an option was already 
rejected for some dialogs in the bug tracker, AFAIR. (Sorry for not 
finding the issue in Mantis. If needed I can try harder.)



And it never bothers any other application.


No, this is not true. It does bother my email client such as any other 
fsStayOnTop window, see attachment - from the Win10 theme you can 
recognize that the email client window is focused and active and is 
still covered by "Leaks and Traces".


Ondrej
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


  1   2   >