gtk+ r22053 - in branches/gtk-2-14: . gtk
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r22053 - in branches/gtk-2-14: . gtk
- Date: Sat, 3 Jan 2009 07:17:09 +0000 (UTC)
Author: matthiasc
Date: Sat Jan 3 07:17:09 2009
New Revision: 22053
URL: http://svn.gnome.org/viewvc/gtk+?rev=22053&view=rev
Log:
* gtk/gtktreemodelsort.c: Don't assert when using the "unsorted"
sort column id.
Modified:
branches/gtk-2-14/ChangeLog
branches/gtk-2-14/gtk/gtktreemodelsort.c
Modified: branches/gtk-2-14/gtk/gtktreemodelsort.c
==============================================================================
--- branches/gtk-2-14/gtk/gtktreemodelsort.c (original)
+++ branches/gtk-2-14/gtk/gtktreemodelsort.c Sat Jan 3 07:17:09 2009
@@ -1318,29 +1318,32 @@
{
GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *)sortable;
- if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
+ if (sort_column_id != GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID)
{
- GtkTreeDataSortHeader *header = NULL;
+ if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
+ {
+ GtkTreeDataSortHeader *header = NULL;
- header = _gtk_tree_data_list_get_header (tree_model_sort->sort_list,
- sort_column_id);
+ header = _gtk_tree_data_list_get_header (tree_model_sort->sort_list,
+ sort_column_id);
- /* we want to make sure that we have a function */
- g_return_if_fail (header != NULL);
- g_return_if_fail (header->func != NULL);
- }
- else
- g_return_if_fail (tree_model_sort->default_sort_func != NULL);
+ /* we want to make sure that we have a function */
+ g_return_if_fail (header != NULL);
+ g_return_if_fail (header->func != NULL);
+ }
+ else
+ g_return_if_fail (tree_model_sort->default_sort_func != NULL);
- if (tree_model_sort->sort_column_id == sort_column_id)
- {
- if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
- {
- if (tree_model_sort->order == order)
+ if (tree_model_sort->sort_column_id == sort_column_id)
+ {
+ if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
+ {
+ if (tree_model_sort->order == order)
+ return;
+ }
+ else
return;
- }
- else
- return;
+ }
}
tree_model_sort->sort_column_id = sort_column_id;
@@ -1696,6 +1699,9 @@
static void
gtk_tree_model_sort_sort (GtkTreeModelSort *tree_model_sort)
{
+ if (tree_model_sort->sort_column_id == GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID)
+ return;
+
if (!tree_model_sort->root)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]