Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-29 Thread Graeme Geldenhuys
2009/10/28 Hans-Peter Diettrich drdiettri...@aol.com:

 '-- all --' would automatically sort as the first entry, also indicating
 that it is a synthetic entry.

I though that is exactly what 'all' and 'none' does as well. Was
the non-english translations done correctly?  Do the translations also
include the '' and '' characters? Those extra characters are meant
as an indicator that they are not actual classes in the unit.


-- 
Regards,
  - Graeme -


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

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


Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-29 Thread Raistware

Graeme Geldenhuys escribió:

2009/10/28 Hans-Peter Diettrich drdiettri...@aol.com:
  

'-- all --' would automatically sort as the first entry, also indicating
that it is a synthetic entry.



I though that is exactly what 'all' and 'none' does as well. Was
the non-english translations done correctly?  Do the translations also
include the '' and '' characters? Those extra characters are meant
as an indicator that they are not actual classes in the unit.
  


Spanish tranlation are : 'None' - 'Ninguno' (wrong translation, 
should be 'Ninguno'), 'All' - 'Todo'. But they are sorted as if 
they didn't have the '' character. For instance:

Ninguno
TEquipment
Todo
TPlayer

If you want that the sort where:
Todo
Ninguno (after correct translation)
TEquipment
TPlayer

Then the easiest process to accomplish that is inserting 'All' and 
'None' after the classes methods, and before that disable sorting.


Cheers,
Raul Ferriz
I don't have that patch, for me the order of All and None is irrelevant, 
because my units tend to have very little methods. The only must have to 
me was selecting All by default at my local language, and that was 
easily achieved.





__ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 4553 (20091028) __

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



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


Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-29 Thread Raistware

Martin escribió:
A much better idea (imho)  would be, to add all and none *after 
sorting finished.


that way you would not rely on the name of them or anything like that.

 cbObjects.Sorted := true;
 cbObjects.Sorted := false;
 cbObjects.Items.Insert(0, lisPListAll);
 cbObjects.Items.Insert(1, lisPListNone);


Oops, see this message after sending my own :D.
But yes that is the solution if you want that first items All and None.


__ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 4553 (20091028) __

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



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


Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-29 Thread Graeme Geldenhuys
On 29/10/2009, Raistware raistw...@gmail.com wrote:

  Spanish tranlation are : 'None' - 'Ninguno' (wrong translation, should

OK, that is a translation problem then and needs to be fixed.


 be 'Ninguno'), 'All' - 'Todo'. But they are sorted as if they didn't
 have the '' character. For instance:

This seems like a bug in sorting algorithm. I'll double check what
Unicode.org says about sorting with '' characters and language text.
I'll raise this issue as a new topic in Lazarus mailing list as well.


 was selecting All by default at my local language, and that was easily
 achieved.

OK, what I am going to is create a new patch. My original intention
was that All and None are the first to options in the combobox. (I
completely forgot about possible translation issue at the time I
implemented it) So I will add all classes and sort them. Then only
insert All and None items at the beginning. This should then work
for all languages.

I'll submit the patch later today, so hopefully soon it will be in
Lazarus repository.


-- 
Regards,
  - Graeme -


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

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


Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-29 Thread Graeme Geldenhuys
On 29/10/2009, Jürgen Hestermann juergen.hesterm...@gmx.de wrote:

  That's only a tedious workaround but if you later add something to your
 list you would have to remove the first element, set Sorted true and back
 to false, then add the first element again. Not an elegant solution.

That should never be an issue. Every time you use Procedure List, the
combobox is populated from scratch using information retrieved from
CodeTools. If the Procedure List window is close, everything is
cleared and free.

So where exactly would adding things later occur?


-- 
Regards,
  - Graeme -


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

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


Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-28 Thread Raistware

Could anyone check this code and apply to SVN?

---
diff --git a/ide/procedurelist.pas b/ide/procedurelist.pas
index 9e578af..96d8ba9 100644
--- a/ide/procedurelist.pas
+++ b/ide/procedurelist.pas
@@ -431,7 +431,8 @@ begin
  end;
end;
  finally
-cbObjects.ItemIndex := 0;   // select All as the default
+{ select All as the default }
+cbObjects.ItemIndex := cbObjects.Items.IndexOf(lisPListAll);
if cbObjects.Text = '' then
  cbObjects.ItemIndex := 1;
  end;

---

It solved the default item selected on bug on Procedure List. Default 
selection should be 'All' at local language, but before this change, the 
selection was allways the first item at list, at english is not a 
problem, because 'All' usually is the first item at list, but at other 
languages, like spanish: 'Todo' usually isn't the first item at list.
With this modification the default item will be allways 'All' in local 
language, solving that bug.


Cheers,
  Raul Ferriz




__ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 4550 (20091028) __

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



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


Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-28 Thread Flávio Etrusco
(...)

 It solved the default item selected on bug on Procedure List. Default
 selection should be 'All' at local language, but before this change, the
 selection was allways the first item at list, at english is not a problem,
 because 'All' usually is the first item at list, but at other languages,
 like spanish: 'Todo' usually isn't the first item at list.
 With this modification the default item will be allways 'All' in local
 language, solving that bug.

 Cheers,
  Raul Ferriz


Wouldn't the proper fix be always inserting All at the first position?

-Flávio

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


Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-28 Thread Raistware

Flávio Etrusco escribió:

(...)
  

It solved the default item selected on bug on Procedure List. Default
selection should be 'All' at local language, but before this change, the
selection was allways the first item at list, at english is not a problem,
because 'All' usually is the first item at list, but at other languages,
like spanish: 'Todo' usually isn't the first item at list.
With this modification the default item will be allways 'All' in local
language, solving that bug.

Cheers,
 Raul Ferriz




Wouldn't the proper fix be always inserting All at the first position?

-Flávio



  


I see no other fix applied ... wich revision?.
The list is sorted, and this is important and desirable while searching 
for the proper class. So 'All' in all languages aren't at first position.


Anyone can think that disable sorting after inserted all classes and 
then insert at first positions 'All' and 'None' ... well, that gives lot 
of more work, and I don't like that solution.



__ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 4551 (20091028) __

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



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


Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-28 Thread Vincent Snijders

Raistware schreef:


Wouldn't the proper fix be always inserting All at the first position?

-Flávio



  


I see no other fix applied ... wich revision?.


It has not yet been applied. There is no clear consension about the solution 
yet ;-)

The list is sorted, and this is important and desirable while searching 
for the proper class. So 'All' in all languages aren't at first position.


Anyone can think that disable sorting after inserted all classes and 
then insert at first positions 'All' and 'None' ... well, that gives lot 
of more work, and I don't like that solution.


Vincent

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


Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-28 Thread Hans-Peter Diettrich

Raistware schrieb:

Anyone can think that disable sorting after inserted all classes and 
then insert at first positions 'All' and 'None' ... well, that gives lot 
of more work, and I don't like that solution.


'-- all --' would automatically sort as the first entry, also indicating 
that it is a synthetic entry.


DoDi


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


Re: [Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

2009-10-28 Thread Martin
A much better idea (imho)  would be, to add all and none *after 
sorting finished.


that way you would not rely on the name of them or anything like that.

 cbObjects.Sorted := true;
 cbObjects.Sorted := false;
 cbObjects.Items.Insert(0, lisPListAll);
 cbObjects.Items.Insert(1, lisPListNone);



Raistware wrote:

Could anyone check this code and apply to SVN?

---
diff --git a/ide/procedurelist.pas b/ide/procedurelist.pas
index 9e578af..96d8ba9 100644
--- a/ide/procedurelist.pas
+++ b/ide/procedurelist.pas
@@ -431,7 +431,8 @@ begin
  end;
end;
  finally
-cbObjects.ItemIndex := 0;   // select All as the default
+{ select All as the default }
+cbObjects.ItemIndex := cbObjects.Items.IndexOf(lisPListAll);
if cbObjects.Text = '' then
  cbObjects.ItemIndex := 1;
  end;

---

It solved the default item selected on bug on Procedure List. Default 
selection should be 'All' at local language, but before this change, 
the selection was allways the first item at list, at english is not a 
problem, because 'All' usually is the first item at list, but at other 
languages, like spanish: 'Todo' usually isn't the first item at list.
With this modification the default item will be allways 'All' in local 
language, solving that bug.


Cheers,
  Raul Ferriz




__ Información de ESET NOD32 Antivirus, versión de la base de 
firmas de virus 4550 (20091028) __


ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



--
___
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