summarylogtreecommitdiffstats
path: root/patch-gtkada-search_entry.adb
diff options
context:
space:
mode:
authorRod Kay2021-07-22 08:22:43 +1000
committerRod Kay2021-07-22 08:22:43 +1000
commit2d295af4322de05ffc966f4f4a396e99d69346c1 (patch)
tree6fafbf8141c102d35cb4b99ecc722860825a110c /patch-gtkada-search_entry.adb
parentd01d85dec133dfdc03c0b5cc2e313fe70d55ce20 (diff)
downloadaur-2d295af4322de05ffc966f4f4a396e99d69346c1.tar.gz
Update to 2021 release.
Diffstat (limited to 'patch-gtkada-search_entry.adb')
-rw-r--r--patch-gtkada-search_entry.adb54
1 files changed, 54 insertions, 0 deletions
diff --git a/patch-gtkada-search_entry.adb b/patch-gtkada-search_entry.adb
new file mode 100644
index 000000000000..3929fcd06e2b
--- /dev/null
+++ b/patch-gtkada-search_entry.adb
@@ -0,0 +1,54 @@
+--- gps-2021-20210701-19B6B-src-pristine/kernel/src/gtkada-search_entry.adb
++++ gps-2021-20210701-19B6B-src/kernel/src/gtkada-search_entry.adb
+@@ -21,13 +21,13 @@
+ with Gtk.Widget; use Gtk.Widget;
+ with Gtkada.Handlers; use Gtkada.Handlers;
+ with GPS.Intl; use GPS.Intl;
++with Gtk.Main;
+
+ package body Gtkada.Search_Entry is
+
+ procedure On_Clear_Entry
+- (Self : access Gtk_Entry_Record'Class;
+- Pos : Gtk_Entry_Icon_Position;
+- Event : Gdk_Event);
++ (Self : access Gtk_Entry_Record'Class;
++ Pos : Gtk_Entry_Icon_Position);
+ -- Called when the user presses the "clear" icon
+
+ procedure On_Changed (Self : access Gtk_Widget_Record'Class);
+@@ -39,14 +39,14 @@
+
+ function Get_Icon_Position
+ (Self : access Gtkada_Search_Entry_Record'Class;
+- Event : Gdk_Event_Button) return Gtk_Entry_Icon_Position
++ Event : Gdk_Event) return Gtk_Entry_Icon_Position
+ is
+ Alloc : Gtk_Allocation;
+ Rect : Gdk_Rectangle;
+ X, Y : Gint;
+ begin
+ Self.Get_Allocation (Alloc);
+- Get_Position (Event.Window, X, Y);
++ Get_Position (Get_Window (Event), X, Y);
+
+ Self.Get_Icon_Area (Gtk_Entry_Icon_Primary, Rect);
+
+@@ -62,13 +62,12 @@
+ --------------------
+
+ procedure On_Clear_Entry
+- (Self : access Gtk_Entry_Record'Class;
+- Pos : Gtk_Entry_Icon_Position;
+- Event : Gdk_Event)
++ (Self : access Gtk_Entry_Record'Class;
++ Pos : Gtk_Entry_Icon_Position)
+ is
+ pragma Unreferenced (Pos); -- unreliable with gtk+ 3.8
+ begin
+- if Gtkada_Search_Entry (Self).Get_Icon_Position (Event.Button) =
++ if Gtkada_Search_Entry (Self).Get_Icon_Position (Gtk.Main.Get_Current_Event) =
+ Gtk_Entry_Icon_Secondary
+ then
+ Self.Set_Text ("");
+