GtkTreeViewColumn: Use G_PARAM_EXPLICIT_NOTIFY

This commit is contained in:
Matthias Clasen 2014-06-09 11:50:22 -04:00
parent fe31f87bf0
commit 785e4d376e

View File

@ -247,7 +247,7 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
P_("Visible"), P_("Visible"),
P_("Whether to display the column"), P_("Whether to display the column"),
TRUE, TRUE,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_RESIZABLE, PROP_RESIZABLE,
@ -255,7 +255,7 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
P_("Resizable"), P_("Resizable"),
P_("Column is user-resizable"), P_("Column is user-resizable"),
FALSE, FALSE,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_X_OFFSET, PROP_X_OFFSET,
@ -284,7 +284,7 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
0, 0,
G_MAXINT, G_MAXINT,
0, 0,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_SIZING, PROP_SIZING,
g_param_spec_enum ("sizing", g_param_spec_enum ("sizing",
@ -292,37 +292,31 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
P_("Resize mode of the column"), P_("Resize mode of the column"),
GTK_TYPE_TREE_VIEW_COLUMN_SIZING, GTK_TYPE_TREE_VIEW_COLUMN_SIZING,
GTK_TREE_VIEW_COLUMN_GROW_ONLY, GTK_TREE_VIEW_COLUMN_GROW_ONLY,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_FIXED_WIDTH, PROP_FIXED_WIDTH,
g_param_spec_int ("fixed-width", g_param_spec_int ("fixed-width",
P_("Fixed Width"), P_("Fixed Width"),
P_("Current fixed width of the column"), P_("Current fixed width of the column"),
-1, -1, G_MAXINT, -1,
G_MAXINT, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
-1,
GTK_PARAM_READWRITE));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_MIN_WIDTH, PROP_MIN_WIDTH,
g_param_spec_int ("min-width", g_param_spec_int ("min-width",
P_("Minimum Width"), P_("Minimum Width"),
P_("Minimum allowed width of the column"), P_("Minimum allowed width of the column"),
-1, -1, G_MAXINT, -1,
G_MAXINT, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
-1,
GTK_PARAM_READWRITE));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_MAX_WIDTH, PROP_MAX_WIDTH,
g_param_spec_int ("max-width", g_param_spec_int ("max-width",
P_("Maximum Width"), P_("Maximum Width"),
P_("Maximum allowed width of the column"), P_("Maximum allowed width of the column"),
-1, -1, G_MAXINT, -1,
G_MAXINT, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
-1,
GTK_PARAM_READWRITE));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_TITLE, PROP_TITLE,
@ -338,7 +332,7 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
P_("Expand"), P_("Expand"),
P_("Column gets share of extra width allocated to the widget"), P_("Column gets share of extra width allocated to the widget"),
FALSE, FALSE,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_CLICKABLE, PROP_CLICKABLE,
@ -346,7 +340,7 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
P_("Clickable"), P_("Clickable"),
P_("Whether the header can be clicked"), P_("Whether the header can be clicked"),
FALSE, FALSE,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
@ -362,10 +356,8 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
g_param_spec_float ("alignment", g_param_spec_float ("alignment",
P_("Alignment"), P_("Alignment"),
P_("X Alignment of the column header text or widget"), P_("X Alignment of the column header text or widget"),
0.0, 0.0, 1.0, 0.0,
1.0, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
0.0,
GTK_PARAM_READWRITE));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_REORDERABLE, PROP_REORDERABLE,
@ -373,7 +365,7 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
P_("Reorderable"), P_("Reorderable"),
P_("Whether the column can be reordered around the headers"), P_("Whether the column can be reordered around the headers"),
FALSE, FALSE,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_SORT_INDICATOR, PROP_SORT_INDICATOR,
@ -381,7 +373,7 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
P_("Sort indicator"), P_("Sort indicator"),
P_("Whether to show a sort indicator"), P_("Whether to show a sort indicator"),
FALSE, FALSE,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_SORT_ORDER, PROP_SORT_ORDER,
@ -390,7 +382,7 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
P_("Sort direction the sort indicator should indicate"), P_("Sort direction the sort indicator should indicate"),
GTK_TYPE_SORT_TYPE, GTK_TYPE_SORT_TYPE,
GTK_SORT_ASCENDING, GTK_SORT_ASCENDING,
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/** /**
* GtkTreeViewColumn:sort-column-id: * GtkTreeViewColumn:sort-column-id:
@ -405,10 +397,8 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
g_param_spec_int ("sort-column-id", g_param_spec_int ("sort-column-id",
P_("Sort column ID"), P_("Sort column ID"),
P_("Logical sort column ID this column sorts on when selected for sorting"), P_("Logical sort column ID this column sorts on when selected for sorting"),
-1, -1, G_MAXINT, -1,
G_MAXINT, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
-1,
GTK_PARAM_READWRITE));
/** /**
* GtkTreeViewColumn:cell-area: * GtkTreeViewColumn:cell-area:
@ -1881,10 +1871,13 @@ gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column,
priv = tree_column->priv; priv = tree_column->priv;
gtk_cell_area_box_set_spacing (GTK_CELL_AREA_BOX (priv->cell_area), if (gtk_cell_area_box_get_spacing (GTK_CELL_AREA_BOX (priv->cell_area)) != spacing)
spacing); {
if (priv->tree_view) gtk_cell_area_box_set_spacing (GTK_CELL_AREA_BOX (priv->cell_area), spacing);
_gtk_tree_view_column_cell_set_dirty (tree_column, TRUE); if (priv->tree_view)
_gtk_tree_view_column_cell_set_dirty (tree_column, TRUE);
g_object_notify (G_OBJECT (tree_column), "spacing");
}
} }
/** /**
@ -2210,16 +2203,16 @@ gtk_tree_view_column_set_fixed_width (GtkTreeViewColumn *tree_column,
priv = tree_column->priv; priv = tree_column->priv;
priv->fixed_width = fixed_width; if (priv->fixed_width != fixed_width)
if (priv->visible &&
priv->tree_view != NULL &&
gtk_widget_get_realized (priv->tree_view))
{ {
gtk_widget_queue_resize (priv->tree_view); priv->fixed_width = fixed_width;
} if (priv->visible &&
priv->tree_view != NULL &&
gtk_widget_get_realized (priv->tree_view))
gtk_widget_queue_resize (priv->tree_view);
g_object_notify (G_OBJECT (tree_column), "fixed-width"); g_object_notify (G_OBJECT (tree_column), "fixed-width");
}
} }
/** /**