[epiphany] Fix popup display on paste & go



commit 0f2785a1a0983b432d0ea9c54cc4e737ee784b83
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Sun Nov 25 12:39:07 2018 +0100

    Fix popup display on paste & go
    
    This fix adds the remaining block/unblock wrapper for gtk_entry_set_text () calls
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/581

 lib/widgets/ephy-location-entry.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 1e14ed870..a63f2b983 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -545,7 +545,9 @@ entry_clear_activate_cb (GtkMenuItem       *item,
                          EphyLocationEntry *entry)
 {
   entry->block_update = TRUE;
+  g_signal_handlers_block_by_func (entry->url_entry, G_CALLBACK (editable_changed_cb), entry);
   gtk_entry_set_text (GTK_ENTRY (entry->url_entry), "");
+  g_signal_handlers_unblock_by_func (entry->url_entry, G_CALLBACK (editable_changed_cb), entry);
   entry->block_update = FALSE;
   entry->user_changed = TRUE;
 }
@@ -556,8 +558,10 @@ paste_received (GtkClipboard      *clipboard,
                 EphyLocationEntry *entry)
 {
   if (text) {
+    g_signal_handlers_block_by_func (entry->url_entry, G_CALLBACK (editable_changed_cb), entry);
     gtk_entry_set_text (GTK_ENTRY (entry->url_entry), text);
     ephy_location_entry_activate (entry);
+    g_signal_handlers_unblock_by_func (entry->url_entry, G_CALLBACK (editable_changed_cb), entry);
   }
 }
 
@@ -984,7 +988,9 @@ ephy_location_entry_reset_internal (EphyLocationEntry *entry,
 void
 ephy_location_entry_undo_reset (EphyLocationEntry *entry)
 {
+  g_signal_handlers_block_by_func (entry->url_entry, G_CALLBACK (editable_changed_cb), entry);
   gtk_entry_set_text (GTK_ENTRY (entry->url_entry), entry->saved_text);
+  g_signal_handlers_unblock_by_func (entry->url_entry, G_CALLBACK (editable_changed_cb), entry);
   entry->can_redo = FALSE;
   entry->user_changed = TRUE;
 }


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