+Mon Oct 1 14:07:02 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): change
+ scroll_to_cell delayed code to happen in size_allocate.
+
+ * gtk/gtkstyle.c (gtk_default_draw_expander): change
+ prelight/normal arrow drawing.
+
+ * gtk/gtktreedatalist.c: Change compare func to use g_utf8_collate
+
+ * gtk/gtktreestore.c: refactor.
+
Sun Sep 30 22:15:52 2001 Manish Singh <yosh@gimp.org>
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): Applied
+Mon Oct 1 14:07:02 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): change
+ scroll_to_cell delayed code to happen in size_allocate.
+
+ * gtk/gtkstyle.c (gtk_default_draw_expander): change
+ prelight/normal arrow drawing.
+
+ * gtk/gtktreedatalist.c: Change compare func to use g_utf8_collate
+
+ * gtk/gtktreestore.c: refactor.
+
Sun Sep 30 22:15:52 2001 Manish Singh <yosh@gimp.org>
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): Applied
+Mon Oct 1 14:07:02 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): change
+ scroll_to_cell delayed code to happen in size_allocate.
+
+ * gtk/gtkstyle.c (gtk_default_draw_expander): change
+ prelight/normal arrow drawing.
+
+ * gtk/gtktreedatalist.c: Change compare func to use g_utf8_collate
+
+ * gtk/gtktreestore.c: refactor.
+
Sun Sep 30 22:15:52 2001 Manish Singh <yosh@gimp.org>
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): Applied
+Mon Oct 1 14:07:02 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): change
+ scroll_to_cell delayed code to happen in size_allocate.
+
+ * gtk/gtkstyle.c (gtk_default_draw_expander): change
+ prelight/normal arrow drawing.
+
+ * gtk/gtktreedatalist.c: Change compare func to use g_utf8_collate
+
+ * gtk/gtktreestore.c: refactor.
+
Sun Sep 30 22:15:52 2001 Manish Singh <yosh@gimp.org>
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): Applied
+Mon Oct 1 14:07:02 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): change
+ scroll_to_cell delayed code to happen in size_allocate.
+
+ * gtk/gtkstyle.c (gtk_default_draw_expander): change
+ prelight/normal arrow drawing.
+
+ * gtk/gtktreedatalist.c: Change compare func to use g_utf8_collate
+
+ * gtk/gtktreestore.c: refactor.
+
Sun Sep 30 22:15:52 2001 Manish Singh <yosh@gimp.org>
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): Applied
+Mon Oct 1 14:07:02 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): change
+ scroll_to_cell delayed code to happen in size_allocate.
+
+ * gtk/gtkstyle.c (gtk_default_draw_expander): change
+ prelight/normal arrow drawing.
+
+ * gtk/gtktreedatalist.c: Change compare func to use g_utf8_collate
+
+ * gtk/gtktreestore.c: refactor.
+
Sun Sep 30 22:15:52 2001 Manish Singh <yosh@gimp.org>
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): Applied
+Mon Oct 1 14:07:02 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): change
+ scroll_to_cell delayed code to happen in size_allocate.
+
+ * gtk/gtkstyle.c (gtk_default_draw_expander): change
+ prelight/normal arrow drawing.
+
+ * gtk/gtktreedatalist.c: Change compare func to use g_utf8_collate
+
+ * gtk/gtktreestore.c: refactor.
+
Sun Sep 30 22:15:52 2001 Manish Singh <yosh@gimp.org>
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): Applied
@arg1:
@arg2:
+<!-- ##### SIGNAL GtkTreeView::select-all ##### -->
+<para>
+
+</para>
+
+@treeview: the object which received the signal.
+
<!-- ##### SIGNAL GtkTreeView::select-cursor-parent ##### -->
<para>
</para>
@treeview: the object which received the signal.
+@arg1:
<!-- ##### SIGNAL GtkTreeView::set-scroll-adjustments ##### -->
<para>
}
tmp_tree = tree->parent_tree;
-
+ tmp_node = tree->parent_node;
_gtk_rbtree_free (tree);
if (gtk_debug_flags & GTK_DEBUG_TREE)
if (state_type == GTK_STATE_PRELIGHT)
{
- gdk_draw_polygon (window, style->base_gc[GTK_STATE_NORMAL],
- TRUE, points, 3);
gdk_draw_polygon (window, style->fg_gc[GTK_STATE_NORMAL],
- FALSE, points, 3);
+ TRUE, points, 3);
}
else if (state_type == GTK_STATE_ACTIVE)
{
}
else
{
- gdk_draw_polygon (window, style->fg_gc[GTK_STATE_NORMAL],
+ gdk_draw_polygon (window, style->base_gc[GTK_STATE_NORMAL],
TRUE, points, 3);
+ gdk_draw_polygon (window, style->fg_gc[GTK_STATE_NORMAL],
+ FALSE, points, 3);
}
if (area)
{
case G_TYPE_STRING:
stra = g_value_get_string (&a_value);
strb = g_value_get_string (&b_value);
- if (stra == NULL)
- stra = "";
- if (strb == NULL)
- strb = "";
- retval = strcmp (stra, strb);
+ if (stra == NULL) stra = "";
+ if (strb == NULL) strb = "";
+ retval = g_utf8_collate (stra, strb);
break;
case G_TYPE_POINTER:
case G_TYPE_BOXED:
{
GtkTreeRowReference *reference = tmp_list->data;
- if (reference->path)
+ if (reference->path == NULL)
+ goto done;
+
+ if (reference->path->depth >= path->depth)
{
- gint depth = gtk_tree_path_get_depth (path);
- gint ref_depth = gtk_tree_path_get_depth (reference->path);
+ gint i;
+ gboolean ancestor = TRUE;
- if (ref_depth >= depth)
+ for (i = 0; i < path->depth - 1; i ++)
{
- gint *indices = gtk_tree_path_get_indices (path);
- gint *ref_indices = gtk_tree_path_get_indices (reference->path);
- gint i;
-
- /* This is the depth that might affect us. */
- i = depth - 1;
-
- if (indices[i] <= ref_indices[i])
- ref_indices[i] += 1;
+ if (path->indices[i] != reference->path->indices[i])
+ {
+ ancestor = FALSE;
+ break;
+ }
}
- }
+ if (ancestor == FALSE)
+ goto done;
+ if (path->indices[path->depth-1] <= reference->path->indices[path->depth-1])
+ reference->path->indices[path->depth-1] += 1;
+ }
+ done:
tmp_list = g_slist_next (tmp_list);
}
}
if (reference->path)
{
- gint depth = gtk_tree_path_get_depth (path);
- gint ref_depth = gtk_tree_path_get_depth (reference->path);
-
- if (ref_depth >= depth)
+ if (gtk_tree_path_is_ancestor (path, reference->path))
{
- /* Need to adjust path upward */
- gint *indices = gtk_tree_path_get_indices (path);
- gint *ref_indices = gtk_tree_path_get_indices (reference->path);
- gint i;
-
- i = depth - 1;
- if (indices[i] < ref_indices[i])
- ref_indices[i] -= 1;
- else if (indices[i] == ref_indices[i])
- {
- /* the referenced node itself, or its parent, was
- * deleted, mark invalid
- */
-
- gtk_tree_path_free (reference->path);
- reference->path = NULL;
- }
+ reference->path->indices[path->depth-1]-=1;
+ }
+ else if (gtk_tree_path_compare (path, reference->path) == 0)
+ {
+ gtk_tree_path_free (reference->path);
+ reference->path = NULL;
}
-
}
tmp_list = g_slist_next (tmp_list);
}
if (parent_node->children == NULL)
{
GtkTreePath *path;
-
+
iter->stamp = tree_store->stamp;
iter->user_data = g_node_new (NULL);
g_node_prepend (parent_node, iter->user_data);
+ path = gtk_tree_store_get_path (GTK_TREE_MODEL (tree_store), iter);
+ gtk_tree_model_row_inserted (GTK_TREE_MODEL (tree_store), path, iter);
+
if (parent_node != tree_store->root)
{
- path = gtk_tree_store_get_path (GTK_TREE_MODEL (tree_store), parent);
+ gtk_tree_path_up (path);
gtk_tree_model_row_has_child_toggled (GTK_TREE_MODEL (tree_store), path, parent);
- gtk_tree_path_append_index (path, 0);
}
- else
- {
- path = gtk_tree_store_get_path (GTK_TREE_MODEL (tree_store), iter);
- }
- gtk_tree_model_row_inserted (GTK_TREE_MODEL (tree_store), path, iter);
gtk_tree_path_free (path);
}
else
g_node_append (parent_node, G_NODE (iter->user_data));
+ path = gtk_tree_store_get_path (GTK_TREE_MODEL (tree_store), iter);
+ gtk_tree_model_row_inserted (GTK_TREE_MODEL (tree_store), path, iter);
+
if (parent_node != tree_store->root)
{
- path = gtk_tree_store_get_path (GTK_TREE_MODEL (tree_store), parent);
+ gtk_tree_path_up (path);
gtk_tree_model_row_has_child_toggled (GTK_TREE_MODEL (tree_store), path, parent);
- gtk_tree_path_append_index (path, 0);
- }
- else
- {
- path = gtk_tree_store_get_path (GTK_TREE_MODEL (tree_store), iter);
}
-
- gtk_tree_model_row_inserted (GTK_TREE_MODEL (tree_store), path, iter);
gtk_tree_path_free (path);
}
else
_gtk_tree_view_update_size (GTK_TREE_VIEW (widget));
- if (tree_view->priv->scroll_to_path != NULL ||
- tree_view->priv->scroll_to_column != NULL)
- {
- gtk_tree_view_scroll_to_cell (tree_view,
- tree_view->priv->scroll_to_path,
- tree_view->priv->scroll_to_column,
- tree_view->priv->scroll_to_use_align,
- tree_view->priv->scroll_to_row_align,
- tree_view->priv->scroll_to_col_align);
- if (tree_view->priv->scroll_to_path)
- {
- gtk_tree_path_free (tree_view->priv->scroll_to_path);
- tree_view->priv->scroll_to_path = NULL;
- }
- tree_view->priv->scroll_to_column = NULL;
- }
-
- if (GTK_WIDGET_CLASS (parent_class)->map)
+if (GTK_WIDGET_CLASS (parent_class)->map)
(* GTK_WIDGET_CLASS (parent_class)->map) (widget);
}
gtk_signal_emit_by_name (GTK_OBJECT (tree_view->priv->vadjustment), "changed");
+ if (tree_view->priv->scroll_to_path != NULL ||
+ tree_view->priv->scroll_to_column != NULL)
+ {
+ gtk_tree_view_scroll_to_cell (tree_view,
+ tree_view->priv->scroll_to_path,
+ tree_view->priv->scroll_to_column,
+ tree_view->priv->scroll_to_use_align,
+ tree_view->priv->scroll_to_row_align,
+ tree_view->priv->scroll_to_col_align);
+ if (tree_view->priv->scroll_to_path)
+ {
+ gtk_tree_path_free (tree_view->priv->scroll_to_path);
+ tree_view->priv->scroll_to_path = NULL;
+ }
+ tree_view->priv->scroll_to_column = NULL;
+ }
+
}
static gboolean
/* Update all row-references */
gtk_tree_row_reference_inserted (G_OBJECT (data), path);
-
depth = gtk_tree_path_get_depth (path);
indices = gtk_tree_path_get_indices (path);
if (cursor_path == NULL)
return;
+ gtk_widget_grab_focus (GTK_WIDGET (tree_view));
+ gtk_tree_view_queue_draw_path (tree_view, cursor_path, NULL);
+
if (expand)
gtk_tree_view_expand_row (tree_view, cursor_path, open_all);
else
gtk_tree_view_collapse_row (tree_view, cursor_path);
- gtk_widget_grab_focus (GTK_WIDGET (tree_view));
- gtk_tree_view_queue_draw_path (tree_view, cursor_path, NULL);
gtk_tree_path_free (cursor_path);
}
GtkTreeIter temp;
gboolean expand;
+
if (node->children)
return TRUE;
}
g_signal_emit (G_OBJECT (tree_view), tree_view_signals[ROW_EXPANDED], 0, &iter, path);
-
return TRUE;
}
* @tree_view: A #GtkTreeView
* @path: A pointer to be filled with the current cursor path, or %NULL
* @focus_column: A pointer to be filled with the current focus column, or %NULL
- *
+ *
* Fills in @path and @focus_column with the current path and focus column. If
* the cursor isn't currently set, then *path will be %NULL. If no column
* currently has focus, then *focus_column will be %NULL.
* @search_equal_func: the compare function to use during the search
* @search_user_data: user data to pass to @search_equal_func, or %NULL
* @search_destroy: Destroy notifier for @search_user_data, or %NULL
- *
+ *
* Sets the compare function for the interactive search capabilities.
**/
void