treeexpander: Minor formatting changes

This commit is contained in:
Corey Berla 2022-11-27 12:22:30 -08:00
parent 648b38761c
commit 72bc97fff5
2 changed files with 36 additions and 36 deletions

View File

@ -105,9 +105,9 @@ enum
PROP_CHILD, PROP_CHILD,
PROP_HIDE_EXPANDER, PROP_HIDE_EXPANDER,
PROP_INDENT_FOR_DEPTH, PROP_INDENT_FOR_DEPTH,
PROP_INDENT_FOR_ICON,
PROP_ITEM, PROP_ITEM,
PROP_LIST_ROW, PROP_LIST_ROW,
PROP_INDENT_FOR_ICON,
N_PROPS N_PROPS
}; };
@ -413,6 +413,10 @@ gtk_tree_expander_get_property (GObject *object,
g_value_set_boolean (value, gtk_tree_expander_get_indent_for_depth (self)); g_value_set_boolean (value, gtk_tree_expander_get_indent_for_depth (self));
break; break;
case PROP_INDENT_FOR_ICON:
g_value_set_boolean (value, gtk_tree_expander_get_indent_for_icon (self));
break;
case PROP_ITEM: case PROP_ITEM:
g_value_take_object (value, gtk_tree_expander_get_item (self)); g_value_take_object (value, gtk_tree_expander_get_item (self));
break; break;
@ -421,10 +425,6 @@ gtk_tree_expander_get_property (GObject *object,
g_value_set_object (value, self->list_row); g_value_set_object (value, self->list_row);
break; break;
case PROP_INDENT_FOR_ICON:
g_value_set_boolean (value, gtk_tree_expander_get_indent_for_icon (self));
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break; break;
@ -453,14 +453,14 @@ gtk_tree_expander_set_property (GObject *object,
gtk_tree_expander_set_indent_for_depth (self, g_value_get_boolean (value)); gtk_tree_expander_set_indent_for_depth (self, g_value_get_boolean (value));
break; break;
case PROP_LIST_ROW:
gtk_tree_expander_set_list_row (self, g_value_get_object (value));
break;
case PROP_INDENT_FOR_ICON: case PROP_INDENT_FOR_ICON:
gtk_tree_expander_set_indent_for_icon (self, g_value_get_boolean (value)); gtk_tree_expander_set_indent_for_icon (self, g_value_get_boolean (value));
break; break;
case PROP_LIST_ROW:
gtk_tree_expander_set_list_row (self, g_value_get_object (value));
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break; break;
@ -588,6 +588,18 @@ gtk_tree_expander_class_init (GtkTreeExpanderClass *klass)
TRUE, TRUE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY); G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkTreeExpander:indent-for-icon: (attributes org.gtk.Property.get=gtk_tree_expander_get_indent_for_icon org.gtk.Property.set=gtk_tree_expander_set_indent_for_icon)
*
* TreeExpander indents the child by the width of an expander-icon if it is not expandable.
*
* Since: 4.6
*/
properties[PROP_INDENT_FOR_ICON] =
g_param_spec_boolean ("indent-for-icon", NULL, NULL,
TRUE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/** /**
* GtkTreeExpander:item: (attributes org.gtk.Property.get=gtk_tree_expander_get_item) * GtkTreeExpander:item: (attributes org.gtk.Property.get=gtk_tree_expander_get_item)
* *
@ -608,18 +620,6 @@ gtk_tree_expander_class_init (GtkTreeExpanderClass *klass)
GTK_TYPE_TREE_LIST_ROW, GTK_TYPE_TREE_LIST_ROW,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
/**
* GtkTreeExpander:indent-for-icon: (attributes org.gtk.Property.get=gtk_tree_expander_get_indent_for_icon org.gtk.Property.set=gtk_tree_expander_set_indent_for_icon)
*
* TreeExpander indents the child by the width of an expander-icon if it is not expandable.
*
* Since: 4.6
*/
properties[PROP_INDENT_FOR_ICON] =
g_param_spec_boolean ("indent-for-icon", NULL, NULL,
TRUE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (gobject_class, N_PROPS, properties); g_object_class_install_properties (gobject_class, N_PROPS, properties);
/** /**
@ -978,7 +978,7 @@ gtk_tree_expander_get_indent_for_icon (GtkTreeExpander *self)
*/ */
void void
gtk_tree_expander_set_indent_for_icon (GtkTreeExpander *self, gtk_tree_expander_set_indent_for_icon (GtkTreeExpander *self,
gboolean indent_for_icon) gboolean indent_for_icon)
{ {
g_return_if_fail (GTK_IS_TREE_EXPANDER (self)); g_return_if_fail (GTK_IS_TREE_EXPANDER (self));

View File

@ -35,36 +35,36 @@ GDK_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (GtkTreeExpander, gtk_tree_expander, GTK, TREE_EXPANDER, GtkWidget) G_DECLARE_FINAL_TYPE (GtkTreeExpander, gtk_tree_expander, GTK, TREE_EXPANDER, GtkWidget)
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_tree_expander_new (void); GtkWidget * gtk_tree_expander_new (void);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_tree_expander_get_child (GtkTreeExpander *self); GtkWidget * gtk_tree_expander_get_child (GtkTreeExpander *self);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_tree_expander_set_child (GtkTreeExpander *self, void gtk_tree_expander_set_child (GtkTreeExpander *self,
GtkWidget *child); GtkWidget *child);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gpointer gtk_tree_expander_get_item (GtkTreeExpander *self); gpointer gtk_tree_expander_get_item (GtkTreeExpander *self);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GtkTreeListRow * gtk_tree_expander_get_list_row (GtkTreeExpander *self); GtkTreeListRow * gtk_tree_expander_get_list_row (GtkTreeExpander *self);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_tree_expander_set_list_row (GtkTreeExpander *self, void gtk_tree_expander_set_list_row (GtkTreeExpander *self,
GtkTreeListRow *list_row); GtkTreeListRow *list_row);
GDK_AVAILABLE_IN_4_10 GDK_AVAILABLE_IN_4_10
gboolean gtk_tree_expander_get_indent_for_depth (GtkTreeExpander *self); gboolean gtk_tree_expander_get_indent_for_depth (GtkTreeExpander *self);
GDK_AVAILABLE_IN_4_10 GDK_AVAILABLE_IN_4_10
void gtk_tree_expander_set_indent_for_depth (GtkTreeExpander *self, void gtk_tree_expander_set_indent_for_depth (GtkTreeExpander *self,
gboolean indent_for_depth); gboolean indent_for_depth);
GDK_AVAILABLE_IN_4_6 GDK_AVAILABLE_IN_4_6
gboolean gtk_tree_expander_get_indent_for_icon (GtkTreeExpander *self); gboolean gtk_tree_expander_get_indent_for_icon (GtkTreeExpander *self);
GDK_AVAILABLE_IN_4_6 GDK_AVAILABLE_IN_4_6
void gtk_tree_expander_set_indent_for_icon (GtkTreeExpander *self, void gtk_tree_expander_set_indent_for_icon (GtkTreeExpander *self,
gboolean indent_for_icon); gboolean indent_for_icon);
GDK_AVAILABLE_IN_4_10 GDK_AVAILABLE_IN_4_10
gboolean gtk_tree_expander_get_hide_expander (GtkTreeExpander *self); gboolean gtk_tree_expander_get_hide_expander (GtkTreeExpander *self);
GDK_AVAILABLE_IN_4_10 GDK_AVAILABLE_IN_4_10
void gtk_tree_expander_set_hide_expander (GtkTreeExpander *self, void gtk_tree_expander_set_hide_expander (GtkTreeExpander *self,
gboolean hide_expander); gboolean hide_expander);
G_END_DECLS G_END_DECLS