#include <config.h>
#include <string.h>
#include <gobject/gvaluecollector.h>
-#include "gtkalias.h"
#include "gtktreemodel.h"
#include "gtkliststore.h"
#include "gtktreedatalist.h"
#include "gtktreednd.h"
#include "gtksequence.h"
+#include "gtkalias.h"
#define GTK_LIST_STORE_IS_SORTED(list) (GTK_LIST_STORE (list)->sort_column_id != GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID)
#define VALID_ITER(iter, list_store) ((iter)!= NULL && (iter)->user_data != NULL && list_store->stamp == (iter)->stamp && !_gtk_sequence_ptr_is_end ((iter)->user_data) && _gtk_sequence_ptr_get_sequence ((iter)->user_data) == list_store->seq)
gint column,
GType type);
+static void gtk_list_store_increment_stamp (GtkListStore *list_store);
+
/* Drag and Drop */
static gboolean real_gtk_list_store_row_draggable (GtkTreeDragSource *drag_source,
list_store = GTK_LIST_STORE (tree_model);
- if (_gtk_sequence_get_length (list_store->seq) == 0)
+ if (_gtk_sequence_get_length (list_store->seq) > 0)
{
iter->stamp = list_store->stamp;
iter->user_data = _gtk_sequence_get_begin_ptr (list_store->seq);
gtk_list_store_insert (list_store, iter, _gtk_sequence_get_length (list_store->seq));
}
+static void
+gtk_list_store_increment_stamp (GtkListStore *list_store)
+{
+ do
+ {
+ list_store->stamp++;
+ }
+ while (list_store->stamp == 0);
+}
+
/**
* gtk_list_store_clear:
* @list_store: a #GtkListStore.
iter.user_data = _gtk_sequence_get_begin_ptr (list_store->seq);
gtk_list_store_remove (list_store, &iter);
}
+
+ gtk_list_store_increment_stamp (list_store);
}
/**
* @values: an array of GValues
* @n_values: the length of the @columns and @values arrays
*
- * A variant of gtk_list_Store_insert_with_values() which
+ * A variant of gtk_list_store_insert_with_values() which
* takes the columns and values as two arrays, instead of
* varargs. This function is mainly intended for
* language-bindings.
gtk_tree_model_row_inserted (GTK_TREE_MODEL (list_store), path, iter);
gtk_tree_path_free (path);
}
+
+#define __GTK_LIST_STORE_C__
+#include "gtkaliasdef.c"