aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--lib/widgets/ephy-node-view.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 09229146e..8d164df2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2006-01-17 Crispin Flowerday <gnome@flowerday.cx>
+ * lib/widgets/ephy-node-view.c (ephy_node_view_add_column):
+
+ When adding a column that can be sorted on, re-create the
+ sort model, so that it sets up the sort method correctly.
+ Fixes bug #320686
+
+2006-01-17 Crispin Flowerday <gnome@flowerday.cx>
+
* embed/ephy-embed-event.c: (ephy_embed_event_get_property):
* embed/ephy-embed-event.h:
* embed/mozilla/mozilla-embed-event.cpp:
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 362c77ccb..cec722019 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -1260,6 +1260,14 @@ ephy_node_view_add_column (EphyNodeView *view,
if (flags & EPHY_NODE_VIEW_SORTABLE)
{
+ /* Now we have created a new column, re-create the
+ * sort model, but ensure that the set_sort function
+ * hasn't been called, see bug #320686 */
+ g_assert (view->priv->sort_column == -1);
+ g_object_unref (view->priv->sortmodel);
+ view->priv->sortmodel = ephy_tree_model_sort_new (view->priv->filtermodel);
+ gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (view->priv->sortmodel));
+
gtk_tree_view_column_set_sort_column_id (gcolumn, column);
}