View Issue Details

IDProjectCategoryView StatusLast Update
0014923PatchesIDEpublic2011-12-01 11:22
ReporterGraeme GeldenhuysAssigned ToVincent Snijders 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86OSUbuntu LinuxOS Version8.04.2
Product Version0.9.29 (SVN)Product Buildlatest revision 
Target VersionFixed in Version0.9.29 (SVN) 
Summary0014923: Patch to fixe Procedure List for non-English languages
DescriptionWith non-English languages to Class dropdown box as problems because the "<All>" string was always assumed to be item 0, which it is not.

The supplied patch fixes this by using the translated text to auto-select the "<All>" string.
TagsNo tags attached.
Fixed in Revision22674
LazTarget-
Widgetset
Attached Files
  • procedure_list.patch (445 bytes)
    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;
    
    procedure_list.patch (445 bytes)
  • procedurelist2.patch (919 bytes)
    diff --git a/ide/procedurelist.pas b/ide/procedurelist.pas
    index 9e578af..e2734a2 100644
    --- a/ide/procedurelist.pas
    +++ b/ide/procedurelist.pas
    @@ -391,8 +391,6 @@ var
       lNodeText: string;
     begin
       cbObjects.Items.Clear;
    -  cbObjects.Items.Add(lisPListAll);
    -  cbObjects.Items.Add(lisPListNone);
       try
         { get active source editor }
         lSrcEditor := SourceEditorWindow.ActiveEditor;
    @@ -430,10 +428,14 @@ begin
             lNode := lNode.NextBrother;
           end;
         end;
    +    cbObjects.Sorted := true;
    +    cbObjects.Sorted := false;
    +    cbObjects.Items.Insert(0, lisPListAll);
    +    cbObjects.Items.Insert(1, lisPListNone);
       finally
         cbObjects.ItemIndex := 0;   // select <All> as the default
    -    if cbObjects.Text = '' then
    -      cbObjects.ItemIndex := 1;
    +    if cbObjects.Text = '' then  // some widgetsets have issues here so we do this
    +      cbObjects.Text := cbObjects.Items[0];
       end;
     end;
     
    
    procedurelist2.patch (919 bytes)

Relationships

related to 0014860 closedVincent Snijders Lazarus In the "procedure list" dialog "<None>" is selected by default 

Activities

2009-10-28 09:03

 

procedure_list.patch (445 bytes)
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;
procedure_list.patch (445 bytes)

2009-10-29 09:05

 

procedurelist2.patch (919 bytes)
diff --git a/ide/procedurelist.pas b/ide/procedurelist.pas
index 9e578af..e2734a2 100644
--- a/ide/procedurelist.pas
+++ b/ide/procedurelist.pas
@@ -391,8 +391,6 @@ var
   lNodeText: string;
 begin
   cbObjects.Items.Clear;
-  cbObjects.Items.Add(lisPListAll);
-  cbObjects.Items.Add(lisPListNone);
   try
     { get active source editor }
     lSrcEditor := SourceEditorWindow.ActiveEditor;
@@ -430,10 +428,14 @@ begin
         lNode := lNode.NextBrother;
       end;
     end;
+    cbObjects.Sorted := true;
+    cbObjects.Sorted := false;
+    cbObjects.Items.Insert(0, lisPListAll);
+    cbObjects.Items.Insert(1, lisPListNone);
   finally
     cbObjects.ItemIndex := 0;   // select <All> as the default
-    if cbObjects.Text = '' then
-      cbObjects.ItemIndex := 1;
+    if cbObjects.Text = '' then  // some widgetsets have issues here so we do this
+      cbObjects.Text := cbObjects.Items[0];
   end;
 end;
 
procedurelist2.patch (919 bytes)

Graeme Geldenhuys

2009-10-29 09:06

reporter   ~0031782

Consensus has been reached as to what the correct fix should be. Attached is a new patch (procedurelist2.patch) which is now the final fix.

Please ignore the first patch submitted.

Vincent Snijders

2009-11-18 21:41

manager   ~0032274

Thanks for the patch.

Issue History

Date Modified Username Field Change
2009-10-28 09:03 Graeme Geldenhuys New Issue
2009-10-28 09:03 Graeme Geldenhuys File Added: procedure_list.patch
2009-10-28 09:08 Vincent Snijders Relationship added related to 0014860
2009-10-29 09:05 Graeme Geldenhuys File Added: procedurelist2.patch
2009-10-29 09:06 Graeme Geldenhuys Note Added: 0031782
2009-11-17 20:41 Vincent Snijders Status new => assigned
2009-11-17 20:41 Vincent Snijders Assigned To => Vincent Snijders
2009-11-18 21:41 Vincent Snijders Fixed in Revision => 22674
2009-11-18 21:41 Vincent Snijders LazTarget => -
2009-11-18 21:41 Vincent Snijders Status assigned => resolved
2009-11-18 21:41 Vincent Snijders Fixed in Version => 0.9.29 (SVN)
2009-11-18 21:41 Vincent Snijders Resolution open => fixed
2009-11-18 21:41 Vincent Snijders Note Added: 0032274
2011-12-01 11:22 Marc Weustink Status resolved => closed