[gtk+] tree view: Rename and document element names
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tree view: Rename and document element names
- Date: Fri, 30 Oct 2015 21:39:11 +0000 (UTC)
commit 5b360a479d576a00b6452599e595063db454cfaf
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 30 17:25:43 2015 -0400
tree view: Rename and document element names
The names are now treeview and header.
gtk/gtktreeview.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 80c7eab..8f30a0f 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -123,6 +123,12 @@
* </child>
* </object>
* ]|
+ *
+ * # CSS nodes
+ *
+ * GtkTreeView has a main CSS node with name treeview and style class .view.
+ * It has a subnode with name header, which is the parent for all the column
+ * header widgets' CSS nodes.
*/
enum
@@ -295,7 +301,7 @@ struct _GtkTreeViewPrivate
GtkPixelCache *pixel_cache;
/* CSS nodes */
- GtkCssNode *column_header_node;
+ GtkCssNode *header_node;
/* Scroll position state keeping */
GtkTreeRowReference *top_row;
@@ -1755,6 +1761,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_binding_entry_add_signal (binding_set, GDK_KEY_F, GDK_CONTROL_MASK, "start-interactive-search", 0);
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_TREE_VIEW_ACCESSIBLE);
+ gtk_widget_class_set_css_name (widget_class, "treeview");
}
static void
@@ -1825,11 +1832,11 @@ gtk_tree_view_init (GtkTreeView *tree_view)
GTK_STYLE_CLASS_VIEW);
widget_node = gtk_widget_get_css_node (GTK_WIDGET (tree_view));
- priv->column_header_node = gtk_css_node_new ();
- gtk_css_node_set_name (priv->column_header_node, g_intern_string ("column-header"));
- gtk_css_node_set_parent (priv->column_header_node, widget_node);
- gtk_css_node_set_state (priv->column_header_node, gtk_css_node_get_state (widget_node));
- g_object_unref (priv->column_header_node);
+ priv->header_node = gtk_css_node_new ();
+ gtk_css_node_set_name (priv->header_node, I_("header"));
+ gtk_css_node_set_parent (priv->header_node, widget_node);
+ gtk_css_node_set_state (priv->header_node, gtk_css_node_get_state (widget_node));
+ g_object_unref (priv->header_node);
priv->multipress_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (tree_view));
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->multipress_gesture), 0);
@@ -12014,7 +12021,7 @@ gtk_tree_view_update_button_position (GtkTreeView *tree_view,
column_el = g_list_find (priv->columns, column);
g_return_if_fail (column_el != NULL);
- gtk_css_node_insert_after (priv->column_header_node,
+ gtk_css_node_insert_after (priv->header_node,
gtk_widget_get_css_node (gtk_tree_view_column_get_button (column)),
column_el->prev ? gtk_widget_get_css_node (
gtk_tree_view_column_get_button (column_el->prev->data)) : NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]