diff options
author | Diego Escalante Urrelo <diegoe@src.gnome.org> | 2008-08-14 19:43:23 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <diegoe@src.gnome.org> | 2008-08-14 19:43:23 +0800 |
commit | 82a8ea1c5dbe7e892763d1f7395fe7d69c7a485d (patch) | |
tree | b46ff6c8b750137edc08340b526b1b73a2bf5203 /lib | |
parent | c3463bf64ddd607326384f6134fc38b9710887b8 (diff) | |
download | gsoc2013-epiphany-82a8ea1c5dbe7e892763d1f7395fe7d69c7a485d.tar gsoc2013-epiphany-82a8ea1c5dbe7e892763d1f7395fe7d69c7a485d.tar.gz gsoc2013-epiphany-82a8ea1c5dbe7e892763d1f7395fe7d69c7a485d.tar.bz2 gsoc2013-epiphany-82a8ea1c5dbe7e892763d1f7395fe7d69c7a485d.tar.lz gsoc2013-epiphany-82a8ea1c5dbe7e892763d1f7395fe7d69c7a485d.tar.xz gsoc2013-epiphany-82a8ea1c5dbe7e892763d1f7395fe7d69c7a485d.tar.zst gsoc2013-epiphany-82a8ea1c5dbe7e892763d1f7395fe7d69c7a485d.zip |
Remove the sort_func for the location entry.
It is not really needed, since the values in comparison are simple numbers that
don't need any thought on top.
svn path=/trunk/; revision=8416
Diffstat (limited to 'lib')
-rw-r--r-- | lib/widgets/ephy-location-entry.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 53b28338b..5773ddaf5 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -920,23 +920,6 @@ ephy_location_entry_new (void) return GTK_WIDGET (g_object_new (EPHY_TYPE_LOCATION_ENTRY, NULL)); } -static gint -sort_func (GtkTreeModel *model, - GtkTreeIter *a, - GtkTreeIter *b, - gpointer data) -{ - gint valuea, valueb; - EphyLocationEntry *le = EPHY_LOCATION_ENTRY (data); - - gtk_tree_model_get (model, a, - le->priv->relevance_col, &valuea, -1); - gtk_tree_model_get (model, b, - le->priv->relevance_col, &valueb, -1); - - return valueb - valuea; -} - static gboolean cursor_on_match_cb (GtkEntryCompletion *completion, GtkTreeModel *model, @@ -1025,10 +1008,12 @@ ephy_location_entry_set_completion (EphyLocationEntry *le, le->priv->favicon_col = favicon_col; sort_model = gtk_tree_model_sort_new_with_model (model); + g_object_unref (model); - gtk_tree_sortable_set_default_sort_func - (GTK_TREE_SORTABLE (sort_model), - sort_func, le, NULL); + gtk_tree_sortable_set_sort_column_id + (GTK_TREE_SORTABLE (sort_model), + le->priv->relevance_col, + GTK_SORT_DESCENDING); completion = gtk_entry_completion_new (); gtk_entry_completion_set_model (completion, sort_model); |