[Xfce4-commits] <midori:master> Cancel completion if we don't have an entry

Christian Dywan noreply at xfce.org
Sat Mar 6 19:20:02 CET 2010


Updating branch refs/heads/master
         to e69ee84b6b8ecfce66b4caa51e118fc576c26190 (commit)
       from e7005abd55d8d3f54a08dda2ad2d1532e8822179 (commit)

commit e69ee84b6b8ecfce66b4caa51e118fc576c26190
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Mar 6 19:18:09 2010 +0100

    Cancel completion if we don't have an entry

 midori/midori-locationaction.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index d053b7f..87eb568 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -343,10 +343,10 @@ midori_location_action_popup_timeout_cb (gpointer data)
     static sqlite3_stmt* stmt;
     const gchar* sqlcmd;
     gint matches, searches, height, screen_height, browser_height, sep;
-    MidoriBrowser* browser = midori_browser_get_for_widget (action->entry);
+    MidoriBrowser* browser;
     GtkStyle* style;
 
-    if (!gtk_widget_has_focus (action->entry) || !action->history)
+    if (!action->entry || !gtk_widget_has_focus (action->entry) || !action->history)
         return FALSE;
 
     if (!(action->key && *action->key))
@@ -495,6 +495,7 @@ midori_location_action_popup_timeout_cb (gpointer data)
         gtk_tree_view_columns_autosize (GTK_TREE_VIEW (action->treeview));
     }
 
+    browser = midori_browser_get_for_widget (action->entry);
     column = gtk_tree_view_get_column (GTK_TREE_VIEW (action->treeview), 0);
     gtk_tree_view_column_cell_get_size (column, NULL, NULL, NULL, NULL, &height);
     screen_height = gdk_screen_get_height (gtk_widget_get_screen (action->popup));



More information about the Xfce4-commits mailing list