Blame SOURCES/gnome-boxes-download-on-activate-signal.patch

9196a5
From 376baa1bdfe2dfbe9f4973b33465fa35c102c086 Mon Sep 17 00:00:00 2001
9196a5
From: Felipe Borges
9196a5
 <feborges@ibm-p8-kvm-03-guest-02.virt.pnr.lab.eng.rdu2.redhat.com>
9196a5
Date: Mon, 10 Aug 2020 14:42:22 +0200
9196a5
Subject: [PATCH] downloads-page: Start URL download on ENTER (activate)
9196a5
9196a5
---
9196a5
 src/assistant/downloads-page.vala | 11 +++++++++--
9196a5
 1 file changed, 9 insertions(+), 2 deletions(-)
9196a5
9196a5
diff --git a/src/assistant/downloads-page.vala b/src/assistant/downloads-page.vala
9196a5
index 98086cee..5be638a0 100644
9196a5
--- a/src/assistant/downloads-page.vala
9196a5
+++ b/src/assistant/downloads-page.vala
9196a5
@@ -50,6 +50,7 @@
9196a5
 
9196a5
         // TODO: move this into a UI file
9196a5
         search_entry.search_changed.connect (on_search_changed);
9196a5
+        search_entry.activate.connect (on_search_activated);
9196a5
         search_entry.width_chars = 50;
9196a5
         search_entry.can_focus = true;
9196a5
         search_entry.placeholder_text = _("Search for an OS or enter a download linkā€¦");
9196a5
@@ -103,6 +104,14 @@ private void on_show_more_button_clicked () {
9196a5
     private void on_search_changed () {
9196a5
         var text = search_entry.get_text ();
9196a5
 
9196a5
+        if (text == null)
9196a5
+            return;
9196a5
+
9196a5
+        search.text = text;
9196a5
+    }
9196a5
+
9196a5
+    private void on_search_activated () {
9196a5
+        var text = search_entry.get_text ();
9196a5
         if (text == null)
9196a5
             return;
9196a5
 
9196a5
@@ -113,8 +122,6 @@ private void on_search_changed () {
9196a5
             url_entered ();
9196a5
             return;
9196a5
         }
9196a5
-
9196a5
-        search.text = text;
9196a5
     }
9196a5
 
9196a5
     [GtkCallback]
9196a5
-- 
9196a5
2.26.2
9196a5