[gnome-calculator/wip-gtk4-port] Use focus event instead of click event on function popover



commit 68e26106d9c667effbdafe39181e92ed8712cc19
Author: Robert Roth <robert roth off gmail com>
Date:   Fri Oct 1 11:01:02 2021 +0300

    Use focus event instead of click event on function popover

 src/math-function-popover.vala  | 2 +-
 src/ui/math-function-popover.ui | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/math-function-popover.vala b/src/math-function-popover.vala
index 7d5ace17..989e61c4 100644
--- a/src/math-function-popover.vala
+++ b/src/math-function-popover.vala
@@ -74,7 +74,7 @@ public class MathFunctionPopover : Gtk.Popover
     }
 
     [GtkCallback]
-    private bool function_name_mouse_click_cb (Gtk.Widget widget, Gdk.EventButton event)
+    private bool function_name_focus_cb (Gtk.Widget widget, Gtk.DirectionType direction)
     {
         if (!this.function_name_entry_placeholder_reseted)
         {
diff --git a/src/ui/math-function-popover.ui b/src/ui/math-function-popover.ui
index e38150de..6142dd41 100644
--- a/src/ui/math-function-popover.ui
+++ b/src/ui/math-function-popover.ui
@@ -32,7 +32,7 @@
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="placeholder_text" translatable="yes">New function</property>
-            <signal name="button_press_event" handler="function_name_mouse_click_cb" swapped="no"/>
+            <signal name="focus" handler="function_name_focus_cb" swapped="no"/>
             <signal name="changed" handler="function_name_entry_changed_cb" swapped="no"/>
             <signal name="activate" handler="add_function_cb" swapped="no"/>
           </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]