[epiphany/history-rewrite: 3/13] ephy-location-controller: smoother redraw of the completion popup



commit f500469bb7405e52fbe8a36de7c64469773db4ce
Author: Xan Lopez <xan igalia com>
Date:   Wed Feb 29 17:41:55 2012 +0100

    ephy-location-controller: smoother redraw of the completion popup
    
    Workaround some bugs in entry completion's redraw code. See
    https://bugzilla.gnome.org/show_bug.cgi?id=671074

 src/ephy-location-controller.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/ephy-location-controller.c b/src/ephy-location-controller.c
index 9315ad6..5908967 100644
--- a/src/ephy-location-controller.c
+++ b/src/ephy-location-controller.c
@@ -165,6 +165,18 @@ entry_activate_cb (GtkEntry *entry,
 }
 
 static void
+update_done_cb (EphyHistoryService *service,
+		gboolean success,
+		gpointer result_data,
+		gpointer user_data)
+{
+	/* FIXME: this hack is needed for the completion entry popup
+	 * to resize smoothly. See:
+	 * https://bugzilla.gnome.org/show_bug.cgi?id=671074 */
+	gtk_entry_completion_complete (GTK_ENTRY_COMPLETION (user_data));
+}
+
+static void
 user_changed_cb (GtkWidget *widget, EphyLocationController *controller)
 {
 	const char *address;
@@ -182,7 +194,7 @@ user_changed_cb (GtkWidget *widget, EphyLocationController *controller)
 	model = gtk_entry_completion_get_model (completion);
 
 	ephy_completion_model_update_for_string (EPHY_COMPLETION_MODEL (model), address,
-						 NULL, NULL);
+						 update_done_cb, completion);
 	g_signal_handlers_unblock_by_func (controller, G_CALLBACK (sync_address), widget);
 }
 



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