Skip to content

Commit 1f64be6

Browse files
committed
Replace String by Virtual_String
1 parent 2966156 commit 1f64be6

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

common/ui/src/histories.adb

+3-4
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,8 @@ package body Histories is
493493
Clear_Combo : Boolean := True;
494494
Prepend : Boolean := False;
495495
Col : Gint := 0;
496-
Filter : access function (Item : String) return Boolean := null)
496+
Filter : access
497+
function (Item : VSS.Strings.Virtual_String) return Boolean := null)
497498
is
498499
List : constant Gtk_List_Store := -Get_Model (Combo);
499500
Value : constant VSS.String_Vectors.Virtual_String_Vector :=
@@ -514,9 +515,7 @@ package body Histories is
514515
-- restore the contents of the entry, but shouldn't appear in the
515516
-- list.
516517
if not V.Is_Empty
517-
and then (Filter = null
518-
or else Filter
519-
(VSS.Strings.Conversions.To_UTF_8_String (V)))
518+
and then (Filter = null or else Filter (V))
520519
then
521520
-- Do not add the item directly, in case there was already a
522521
-- similar entry in the list if it wasn't cleared

common/ui/src/histories.ads

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
-- It also provides a way to save the current value for check buttons from one
2222
-- session of GNAT Studio to the other.
2323

24-
with GNAT.Strings;
24+
private with GNAT.Strings;
2525
with GNATCOLL.VFS;
2626

2727
with VSS.String_Vectors;
28+
with VSS.Strings;
2829

2930
with Glib;
3031
with Gtk.Check_Menu_Item;
@@ -132,7 +133,8 @@ package Histories is
132133
Clear_Combo : Boolean := True;
133134
Prepend : Boolean := False;
134135
Col : Glib.Gint := 0;
135-
Filter : access function (Item : String) return Boolean := null);
136+
Filter : access
137+
function (Item : VSS.Strings.Virtual_String) return Boolean := null);
136138
-- Set the contents of the combo to the list of strings associated with
137139
-- Key.
138140
-- If Clear_Combo is False, then the previous contents of the combo is kept

0 commit comments

Comments
 (0)