From 912145c81bafb94ee2c5e893151247797dd494e6 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 20 Oct 2022 12:23:13 +0100 Subject: [PATCH] Mark GtkCellRenderer-related types as deprecated The docblock for the type needs a Deprecated annotation, and we can use it to point to the appropriate replacement. --- gtk/deprecated/gtkcellarea.c | 11 +++-- gtk/deprecated/gtkcellareabox.c | 9 ++-- gtk/deprecated/gtkcellareaboxcontext.c | 22 ++++----- gtk/deprecated/gtkcelleditable.c | 3 ++ gtk/deprecated/gtkcelllayout.c | 19 ++++---- gtk/deprecated/gtkcellrenderer.c | 57 +++++++++++++----------- gtk/deprecated/gtkcellrendereraccel.c | 26 ++++++----- gtk/deprecated/gtkcellrenderercombo.c | 47 ++++++++++--------- gtk/deprecated/gtkcellrendererpixbuf.c | 19 ++++---- gtk/deprecated/gtkcellrendererprogress.c | 3 ++ gtk/deprecated/gtkcellrendererspin.c | 11 ++--- gtk/deprecated/gtkcellrendererspinner.c | 3 ++ gtk/deprecated/gtkcellrenderertext.c | 51 +++++++++++---------- gtk/deprecated/gtkcellrenderertoggle.c | 21 +++++---- gtk/deprecated/gtkcellview.c | 35 ++++++++------- 15 files changed, 189 insertions(+), 148 deletions(-) diff --git a/gtk/deprecated/gtkcellarea.c b/gtk/deprecated/gtkcellarea.c index 992172ef80..6e73d08ca5 100644 --- a/gtk/deprecated/gtkcellarea.c +++ b/gtk/deprecated/gtkcellarea.c @@ -35,7 +35,7 @@ * Usually users dont have to interact with the `GtkCellArea` directly * unless they are implementing a cell-layouting widget themselves. * - * # Requesting area sizes + * ## Requesting area sizes * * As outlined in * [GtkWidget’s geometry management section](class.Widget.html#height-for-width-geometry-management), @@ -186,7 +186,7 @@ * values while more and more height is required for the row heights * that are calculated in the background. * - * # Rendering Areas + * ## Rendering Areas * * Once area sizes have been acquired at least for the rows in the * visible area of the layouting widget they can be rendered at @@ -227,7 +227,7 @@ * would make sense to calculate the allocation for each row at * the time the widget is allocated using [func@Gtk.distribute_natural_allocation]. * - * # Handling Events and Driving Keyboard Focus + * ## Handling Events and Driving Keyboard Focus * * Passing events to the area is as simple as handling events on any * normal widget and then passing them to the [method@Gtk.CellArea.event] @@ -316,7 +316,7 @@ * Note that the layouting widget is responsible for matching the * `GtkDirectionType` values to the way it lays out its cells. * - * # Cell Properties + * ## Cell Properties * * The `GtkCellArea` introduces cell properties for `GtkCellRenderer`s. * This provides some general interfaces for defining the relationship @@ -335,6 +335,9 @@ * [method@Gtk.CellArea.cell_set] or [method@Gtk.CellArea.cell_set_valist]. To obtain * the value of a cell property, use [method@Gtk.CellArea.cell_get_property] * [method@Gtk.CellArea.cell_get] or [method@Gtk.CellArea.cell_get_valist]. + * + * Deprecated: 4.10: List views use widgets for displaying their + * contents */ #include "config.h" diff --git a/gtk/deprecated/gtkcellareabox.c b/gtk/deprecated/gtkcellareabox.c index 4ac2f80a53..2808184b5a 100644 --- a/gtk/deprecated/gtkcellareabox.c +++ b/gtk/deprecated/gtkcellareabox.c @@ -42,6 +42,9 @@ * configured by configuring the `GtkCellAreaBox` align child cell property * with gtk_cell_area_cell_set_property() or by specifying the "align" * argument to gtk_cell_area_box_pack_start() and gtk_cell_area_box_pack_end(). + * + * Deprecated: 4.10: List views use widgets for displaying their + * contents */ #include "config.h" @@ -502,7 +505,7 @@ cell_groups_rebuild (GtkCellAreaBox *box) CellInfo *info = l->data; /* A new group starts with any aligned cell, or - * at the beginning and end of a fixed size cell. + * at the beginning and end of a fixed size cell. * the first group is implied */ if ((info->align || info->fixed || last_cell_fixed) && l != cells) { @@ -892,7 +895,7 @@ get_allocated_cells (GtkCellAreaBox *box, if (visible_cells == 0) continue; - /* If were not aligned, place the cell after the last cell + /* If were not aligned, place the cell after the last cell * and eat up the extra space */ if (group->align) @@ -2086,7 +2089,7 @@ _gtk_cell_area_box_group_visible (GtkCellAreaBox *box, { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); CellGroup *group; - + g_assert (group_idx >= 0 && group_idx < priv->groups->len); group = &g_array_index (priv->groups, CellGroup, group_idx); diff --git a/gtk/deprecated/gtkcellareaboxcontext.c b/gtk/deprecated/gtkcellareaboxcontext.c index 5bf0dd1238..9a06c2bf0a 100644 --- a/gtk/deprecated/gtkcellareaboxcontext.c +++ b/gtk/deprecated/gtkcellareaboxcontext.c @@ -139,7 +139,7 @@ get_array (GtkCellAreaBoxContext *context, return array; } -static gboolean +static gboolean group_expands (GtkCellAreaBoxContext *context, int group_idx) { @@ -161,7 +161,7 @@ count_expand_groups (GtkCellAreaBoxContext *context) if (priv->expand[i]) expand++; } - + return expand; } @@ -182,7 +182,7 @@ _gtk_cell_area_box_context_init (GtkCellAreaBoxContext *box_context) NULL, (GDestroyNotify)free_cache_array); } -static void +static void _gtk_cell_area_box_context_class_init (GtkCellAreaBoxContextClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); @@ -267,11 +267,11 @@ _gtk_cell_area_box_context_sum (GtkCellAreaBoxContext *context, box_orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (area)); array = get_array (context, orientation, for_size); - /* Get the last visible aligned group + /* Get the last visible aligned group * (we need to get space at least up till this group) */ for (i = array->len - 1; i >= 0; i--) { - if (priv->align[i] && + if (priv->align[i] && _gtk_cell_area_box_group_visible (area, i)) break; } @@ -326,7 +326,7 @@ _gtk_cell_area_box_context_get_preferred_height_for_width (GtkCellAreaContext *c int *minimum_height, int *natural_height) { - _gtk_cell_area_box_context_sum (GTK_CELL_AREA_BOX_CONTEXT (context), GTK_ORIENTATION_VERTICAL, + _gtk_cell_area_box_context_sum (GTK_CELL_AREA_BOX_CONTEXT (context), GTK_ORIENTATION_VERTICAL, width, minimum_height, natural_height); } @@ -336,7 +336,7 @@ _gtk_cell_area_box_context_get_preferred_width_for_height (GtkCellAreaContext *c int *minimum_width, int *natural_width) { - _gtk_cell_area_box_context_sum (GTK_CELL_AREA_BOX_CONTEXT (context), GTK_ORIENTATION_HORIZONTAL, + _gtk_cell_area_box_context_sum (GTK_CELL_AREA_BOX_CONTEXT (context), GTK_ORIENTATION_HORIZONTAL, height, minimum_width, natural_width); } @@ -686,11 +686,11 @@ _gtk_cell_area_box_context_get_requests (GtkCellAreaBoxContext *box_context, int last_aligned_group_idx = 0; int i, j; - /* Get the last visible aligned group + /* Get the last visible aligned group * (we need to get space at least up till this group) */ for (i = priv->base_widths->len - 1; i >= 0; i--) { - if (priv->align[i] && + if (priv->align[i] && _gtk_cell_area_box_group_visible (area, i)) break; } @@ -846,11 +846,11 @@ _gtk_cell_area_box_context_get_orientation_allocs (GtkCellAreaBoxContext *contex gtk_cell_area_context_get_allocation (ctx, &width, &height); if (orientation == GTK_ORIENTATION_HORIZONTAL && width > 0) - allocs = allocate_for_orientation (context, area, orientation, + allocs = allocate_for_orientation (context, area, orientation, spacing, width, height, &alloc_count); else if (orientation == GTK_ORIENTATION_VERTICAL && height > 0) - allocs = allocate_for_orientation (context, area, orientation, + allocs = allocate_for_orientation (context, area, orientation, spacing, height, width, &alloc_count); diff --git a/gtk/deprecated/gtkcelleditable.c b/gtk/deprecated/gtkcelleditable.c index 719c328030..62bea90764 100644 --- a/gtk/deprecated/gtkcelleditable.c +++ b/gtk/deprecated/gtkcelleditable.c @@ -23,6 +23,9 @@ * The `GtkCellEditable` interface must be implemented for widgets to be usable * to edit the contents of a `GtkTreeView` cell. It provides a way to specify how * temporary widgets should be configured for editing, get the new value, etc. + * + * Deprecated: 4.10: List views use widgets for displaying their + * contents. See [iface@Gtk.Editable] for editable text widgets */ #include "config.h" diff --git a/gtk/deprecated/gtkcelllayout.c b/gtk/deprecated/gtkcelllayout.c index 417e4b4e75..71d9c49174 100644 --- a/gtk/deprecated/gtkcelllayout.c +++ b/gtk/deprecated/gtkcelllayout.c @@ -24,7 +24,7 @@ * want to provide a `GtkTreeViewColumn` like API for packing cells, * setting attributes and data funcs. * - * One of the notable features provided by implementations of + * One of the notable features provided by implementations of * `GtkCellLayout` are attributes. Attributes let you set the properties * in flexible ways. They can just be set to constant values like regular * properties. But they can also be mapped to a column of the underlying @@ -34,7 +34,7 @@ * gtk_cell_layout_set_cell_data_func() that is called to determine the * value of the attribute for each cell that is rendered. * - * # GtkCellLayouts as GtkBuildable + * ## GtkCellLayouts as GtkBuildable * * Implementations of GtkCellLayout which also implement the GtkBuildable * interface (`GtkCellView`, `GtkIconView`, `GtkComboBox`, @@ -78,7 +78,7 @@ * * ``` * - * # Subclassing GtkCellLayout implementations + * ## Subclassing GtkCellLayout implementations * * When subclassing a widget that implements `GtkCellLayout` like * `GtkIconView` or `GtkComboBox`, there are some considerations related @@ -126,6 +126,9 @@ * to support alternative cell areas, you can do so by moving the * problematic calls out of `init()` and into a `constructor()` * for your class. + * + * Deprecated: 4.10: List views use widgets to display their contents. + * See [class@Gtk.LayoutManager] for layout manager delegate objects */ #include "config.h" @@ -281,8 +284,8 @@ gtk_cell_layout_default_set_cell_data_func (GtkCellLayout *cell_layout, area = iface->get_area (cell_layout); if (area) - _gtk_cell_area_set_cell_data_func_with_proxy (area, cell, - (GFunc)func, func_data, destroy, + _gtk_cell_area_set_cell_data_func_with_proxy (area, cell, + (GFunc)func, func_data, destroy, cell_layout); else warn_no_cell_area ("GtkCellLayoutIface->set_cell_data_func()"); @@ -446,7 +449,7 @@ gtk_cell_layout_set_attributesv (GtkCellLayout *cell_layout, * @cell: a `GtkCellRenderer` * @...: a %NULL-terminated list of attributes * - * Sets the attributes in the parameter list as the attributes + * Sets the attributes in the parameter list as the attributes * of @cell_layout. * * See [method@Gtk.CellLayout.add_attribute] for more details. @@ -531,7 +534,7 @@ gtk_cell_layout_set_cell_data_func (GtkCellLayout *cell_layout, g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout)); g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); - GTK_CELL_LAYOUT_GET_IFACE + GTK_CELL_LAYOUT_GET_IFACE (cell_layout)->set_cell_data_func (cell_layout, cell, func, func_data, destroy); } @@ -619,7 +622,7 @@ gtk_cell_layout_get_area (GtkCellLayout *cell_layout) g_return_val_if_fail (GTK_IS_CELL_LAYOUT (cell_layout), NULL); - iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout); + iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout); if (iface->get_area) return iface->get_area (cell_layout); diff --git a/gtk/deprecated/gtkcellrenderer.c b/gtk/deprecated/gtkcellrenderer.c index a0254f8a64..c5427c304e 100644 --- a/gtk/deprecated/gtkcellrenderer.c +++ b/gtk/deprecated/gtkcellrenderer.c @@ -68,6 +68,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * corresponding “set” property, e.g. “cell-background-set” corresponds * to “cell-background”. These “set” properties reflect whether a property * has been set or not. You should not set them independently. + * + * Deprecated: 4.10: List views use widgets for displaying their + * contents */ @@ -213,7 +216,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class) * * This signal gets emitted when the user cancels the process of editing a * cell. For example, an editable cell renderer could be written to cancel - * editing when the user presses Escape. + * editing when the user presses Escape. * * See also: gtk_cell_renderer_stop_editing(). */ @@ -251,12 +254,12 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class) * const char *path, * gpointer data) * { - * if (GTK_IS_ENTRY (editable)) + * if (GTK_IS_ENTRY (editable)) * { * GtkEntry *entry = GTK_ENTRY (editable); - * + * * // ... create a GtkEntryCompletion - * + * * gtk_entry_set_completion (entry, completion); * } * } @@ -628,7 +631,7 @@ set_cell_bg_color (GtkCellRenderer *cell, * @cell: a `GtkCellRenderer` * @snapshot: a `GtkSnapshot` to draw to * @widget: the widget owning @window - * @background_area: entire cell area (including tree expanders and maybe + * @background_area: entire cell area (including tree expanders and maybe * padding on the sides) * @cell_area: area normally rendered by a cell renderer * @flags: flags that affect rendering @@ -802,7 +805,7 @@ gtk_cell_renderer_start_editing (GtkCellRenderer *cell, gtk_widget_add_css_class (GTK_WIDGET (editable), "cell"); - g_signal_emit (cell, + g_signal_emit (cell, cell_renderer_signals[EDITING_STARTED], 0, editable, path); @@ -1196,7 +1199,7 @@ gtk_cell_renderer_real_get_preferred_size (GtkCellRenderer *cell, } } -static GtkSizeRequestMode +static GtkSizeRequestMode gtk_cell_renderer_real_get_request_mode (GtkCellRenderer *cell) { /* By default cell renderers are height-for-width. */ @@ -1209,7 +1212,7 @@ gtk_cell_renderer_real_get_preferred_width (GtkCellRenderer *cell, int *minimum_size, int *natural_size) { - gtk_cell_renderer_real_get_preferred_size (cell, widget, GTK_ORIENTATION_HORIZONTAL, + gtk_cell_renderer_real_get_preferred_size (cell, widget, GTK_ORIENTATION_HORIZONTAL, minimum_size, natural_size); } @@ -1219,7 +1222,7 @@ gtk_cell_renderer_real_get_preferred_height (GtkCellRenderer *cell, int *minimum_size, int *natural_size) { - gtk_cell_renderer_real_get_preferred_size (cell, widget, GTK_ORIENTATION_VERTICAL, + gtk_cell_renderer_real_get_preferred_size (cell, widget, GTK_ORIENTATION_VERTICAL, minimum_size, natural_size); } @@ -1268,35 +1271,35 @@ gtk_cell_renderer_real_get_aligned_area (GtkCellRenderer *cell, /* Trim up the aligned size */ if (gtk_cell_renderer_get_request_mode (cell) == GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH) { - gtk_cell_renderer_get_preferred_width (cell, widget, + gtk_cell_renderer_get_preferred_width (cell, widget, NULL, &natural_size); aligned_area->width = MIN (aligned_area->width, natural_size); - gtk_cell_renderer_get_preferred_height_for_width (cell, widget, - aligned_area->width, + gtk_cell_renderer_get_preferred_height_for_width (cell, widget, + aligned_area->width, NULL, &opposite_size); aligned_area->height = MIN (opposite_size, aligned_area->height); } else { - gtk_cell_renderer_get_preferred_height (cell, widget, + gtk_cell_renderer_get_preferred_height (cell, widget, NULL, &natural_size); aligned_area->height = MIN (aligned_area->width, natural_size); - gtk_cell_renderer_get_preferred_width_for_height (cell, widget, - aligned_area->height, + gtk_cell_renderer_get_preferred_width_for_height (cell, widget, + aligned_area->height, NULL, &opposite_size); aligned_area->width = MIN (opposite_size, aligned_area->width); } /* offset the cell position */ - _gtk_cell_renderer_calc_offset (cell, cell_area, + _gtk_cell_renderer_calc_offset (cell, cell_area, gtk_widget_get_direction (widget), - aligned_area->width, + aligned_area->width, aligned_area->height, &x_offset, &y_offset); @@ -1319,7 +1322,7 @@ _gtk_cell_renderer_calc_offset (GtkCellRenderer *cell, int height, int *x_offset, int *y_offset) -{ +{ GtkCellRendererPrivate *priv; g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); @@ -1331,7 +1334,7 @@ _gtk_cell_renderer_calc_offset (GtkCellRenderer *cell, if (x_offset) { *x_offset = (((direction == GTK_TEXT_DIR_RTL) ? - (1.0 - priv->xalign) : priv->xalign) * + (1.0 - priv->xalign) : priv->xalign) * (cell_area->width - width)); *x_offset = MAX (*x_offset, 0); } @@ -1403,8 +1406,8 @@ gtk_cell_renderer_get_preferred_width (GtkCellRenderer *cell, #if DEBUG_CELL_SIZE_REQUEST g_message ("%s returning minimum width: %d and natural width: %d", - G_OBJECT_TYPE_NAME (cell), - minimum_size ? *minimum_size : 20000, + G_OBJECT_TYPE_NAME (cell), + minimum_size ? *minimum_size : 20000, natural_size ? *natural_size : 20000); #endif } @@ -1451,8 +1454,8 @@ gtk_cell_renderer_get_preferred_height (GtkCellRenderer *cell, #if DEBUG_CELL_SIZE_REQUEST g_message ("%s returning minimum height: %d and natural height: %d", - G_OBJECT_TYPE_NAME (cell), - minimum_size ? *minimum_size : 20000, + G_OBJECT_TYPE_NAME (cell), + minimum_size ? *minimum_size : 20000, natural_size ? *natural_size : 20000); #endif } @@ -1466,7 +1469,7 @@ gtk_cell_renderer_get_preferred_height (GtkCellRenderer *cell, * @minimum_width: (out) (optional): location for storing the minimum size * @natural_width: (out) (optional): location for storing the preferred size * - * Retrieves a cell renderers’s minimum and natural width if it were rendered to + * Retrieves a cell renderers’s minimum and natural width if it were rendered to * @widget with the specified @height. * * Deprecated: 4.10 @@ -1503,7 +1506,7 @@ gtk_cell_renderer_get_preferred_width_for_height (GtkCellRenderer *cell, #if DEBUG_CELL_SIZE_REQUEST g_message ("%s width for height: %d is minimum %d and natural: %d", G_OBJECT_TYPE_NAME (cell), height, - minimum_width ? *minimum_width : 20000, + minimum_width ? *minimum_width : 20000, natural_width ? *natural_width : 20000); #endif } @@ -1516,7 +1519,7 @@ gtk_cell_renderer_get_preferred_width_for_height (GtkCellRenderer *cell, * @minimum_height: (out) (optional): location for storing the minimum size * @natural_height: (out) (optional): location for storing the preferred size * - * Retrieves a cell renderers’s minimum and natural height if it were rendered to + * Retrieves a cell renderers’s minimum and natural height if it were rendered to * @widget with the specified @width. * * Deprecated: 4.10 @@ -1553,7 +1556,7 @@ gtk_cell_renderer_get_preferred_height_for_width (GtkCellRenderer *cell, #if DEBUG_CELL_SIZE_REQUEST g_message ("%s height for width: %d is minimum %d and natural: %d", G_OBJECT_TYPE_NAME (cell), width, - minimum_height ? *minimum_height : 20000, + minimum_height ? *minimum_height : 20000, natural_height ? *natural_height : 20000); #endif } diff --git a/gtk/deprecated/gtkcellrendereraccel.c b/gtk/deprecated/gtkcellrendereraccel.c index 34c5e329c9..ccb2365746 100644 --- a/gtk/deprecated/gtkcellrendereraccel.c +++ b/gtk/deprecated/gtkcellrendereraccel.c @@ -41,6 +41,10 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * `GtkCellRendererAccel` displays a keyboard accelerator (i.e. a key * combination like `Control + a`). If the cell renderer is editable, * the accelerator can be changed by simply typing the new combination. + * + * Deprecated: 4.10: Applications editing keyboard accelerators should + * provide their own implementation according to platform design + * guidelines */ @@ -52,7 +56,7 @@ static void gtk_cell_renderer_accel_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec); -static void gtk_cell_renderer_accel_get_preferred_width +static void gtk_cell_renderer_accel_get_preferred_width (GtkCellRenderer *cell, GtkWidget *widget, int *minimum_size, @@ -177,7 +181,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class) G_MAXINT, 0, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); - + /** * GtkCellRendererAccel:accel-mods: * @@ -196,7 +200,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class) * The hardware keycode of the accelerator. Note that the hardware keycode is * only relevant if the key does not have a keyval. Normally, the keyboard * configuration should assign keyvals to all keys. - */ + */ g_object_class_install_property (object_class, PROP_KEYCODE, g_param_spec_uint ("keycode", NULL, NULL, @@ -219,7 +223,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class) GTK_TYPE_CELL_RENDERER_ACCEL_MODE, GTK_CELL_RENDERER_ACCEL_MODE_GTK, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); - + /** * GtkCellRendererAccel::accel-edited: * @accel: the object reveiving the signal @@ -264,7 +268,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class) * gtk_cell_renderer_accel_new: * * Creates a new `GtkCellRendererAccel`. - * + * * Returns: the new cell renderer * * Deprecated: 4.10 @@ -288,7 +292,7 @@ convert_keysym_state_to_string (GtkCellRendererAccel *accel, * a disabled accelerator key combination. */ return g_strdup (C_("Accelerator", "Disabled")); - else + else { if (priv->accel_mode == GTK_CELL_RENDERER_ACCEL_MODE_GTK) { @@ -301,7 +305,7 @@ convert_keysym_state_to_string (GtkCellRendererAccel *accel, return gtk_accelerator_get_label (keysym, mask); } - else + else { char *name; @@ -402,7 +406,7 @@ gtk_cell_renderer_accel_set_property (GObject *object, g_object_notify (object, "accel-mode"); } break; - + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); } @@ -537,7 +541,7 @@ key_controller_key_pressed (GtkEventControllerKey *key, event = gtk_event_controller_get_current_event (GTK_EVENT_CONTROLLER (key)); if (!gdk_key_event_get_match (event, &accel_key, &accel_mods)) return FALSE; - + if (accel_mods == 0) { switch (keyval) @@ -579,8 +583,8 @@ static void gtk_cell_editable_widget_unrealize (GtkWidget *widget) { gtk_grab_remove (widget); - - GTK_WIDGET_CLASS (gtk_cell_editable_widget_parent_class)->unrealize (widget); + + GTK_WIDGET_CLASS (gtk_cell_editable_widget_parent_class)->unrealize (widget); } static void diff --git a/gtk/deprecated/gtkcellrenderercombo.c b/gtk/deprecated/gtkcellrenderercombo.c index 73bb66f102..09f8f4a8bb 100644 --- a/gtk/deprecated/gtkcellrenderercombo.c +++ b/gtk/deprecated/gtkcellrenderercombo.c @@ -43,6 +43,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * box and sets it to display the column specified by its * `GtkCellRendererCombo`:text-column property. Further properties of the combo box * can be set in a handler for the `GtkCellRenderer::editing-started` signal. + * + * Deprecated: 4.10: List views use widgets to display their contents. You + * should use [class@Gtk.DropDown] instead */ typedef struct _GtkCellRendererComboPrivate GtkCellRendererComboPrivate; @@ -125,7 +128,7 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass) /** * GtkCellRendererCombo:model: * - * Holds a tree model containing the possible values for the combo box. + * Holds a tree model containing the possible values for the combo box. * Use the text_column property to specify the column holding the values. */ g_object_class_install_property (object_class, @@ -137,14 +140,14 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass) /** * GtkCellRendererCombo:text-column: * - * Specifies the model column which holds the possible values for the - * combo box. + * Specifies the model column which holds the possible values for the + * combo box. * - * Note that this refers to the model specified in the model property, - * not the model backing the tree view to which + * Note that this refers to the model specified in the model property, + * not the model backing the tree view to which * this cell renderer is attached. - * - * `GtkCellRendererCombo` automatically adds a text cell renderer for + * + * `GtkCellRendererCombo` automatically adds a text cell renderer for * this column to its combo box. */ g_object_class_install_property (object_class, @@ -155,11 +158,11 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass) -1, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); - /** + /** * GtkCellRendererCombo:has-entry: * - * If %TRUE, the cell renderer will include an entry and allow to enter - * values other than the ones in the popup list. + * If %TRUE, the cell renderer will include an entry and allow to enter + * values other than the ones in the popup list. */ g_object_class_install_property (object_class, PROP_HAS_ENTRY, @@ -232,7 +235,7 @@ gtk_cell_renderer_combo_init (GtkCellRendererCombo *self) GtkCellRenderer * gtk_cell_renderer_combo_new (void) { - return g_object_new (GTK_TYPE_CELL_RENDERER_COMBO, NULL); + return g_object_new (GTK_TYPE_CELL_RENDERER_COMBO, NULL); } static void @@ -240,13 +243,13 @@ gtk_cell_renderer_combo_finalize (GObject *object) { GtkCellRendererCombo *cell = GTK_CELL_RENDERER_COMBO (object); GtkCellRendererComboPrivate *priv = gtk_cell_renderer_combo_get_instance_private (cell); - + if (priv->model) { g_object_unref (priv->model); priv->model = NULL; } - + G_OBJECT_CLASS (gtk_cell_renderer_combo_parent_class)->finalize (object); } @@ -263,7 +266,7 @@ gtk_cell_renderer_combo_get_property (GObject *object, { case PROP_MODEL: g_value_set_object (value, priv->model); - break; + break; case PROP_TEXT_COLUMN: g_value_set_int (value, priv->text_column); break; @@ -369,7 +372,7 @@ gtk_cell_renderer_combo_editing_done (GtkCellEditable *combo, entry = GTK_ENTRY (gtk_combo_box_get_child (GTK_COMBO_BOX (combo))); new_text = g_strdup (gtk_editable_get_text (GTK_EDITABLE (entry))); } - else + else { model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo)); @@ -395,17 +398,17 @@ gtk_cell_renderer_combo_focus_change (GtkWidget *widget, gtk_cell_renderer_combo_editing_done (GTK_CELL_EDITABLE (widget), data); } -typedef struct +typedef struct { GtkCellRendererCombo *cell; gboolean found; GtkTreeIter iter; } SearchData; -static gboolean -find_text (GtkTreeModel *model, - GtkTreePath *path, - GtkTreeIter *iter, +static gboolean +find_text (GtkTreeModel *model, + GtkTreePath *path, + GtkTreeIter *iter, gpointer data) { SearchData *search_data = (SearchData *)data; @@ -424,7 +427,7 @@ find_text (GtkTreeModel *model, g_free (cell_text); g_free (text); - + return search_data->found; } @@ -474,7 +477,7 @@ gtk_cell_renderer_combo_start_editing (GtkCellRenderer *cell, gtk_combo_box_set_model (GTK_COMBO_BOX (combo), priv->model); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); - gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, "text", priv->text_column, NULL); diff --git a/gtk/deprecated/gtkcellrendererpixbuf.c b/gtk/deprecated/gtkcellrendererpixbuf.c index ff62bd976e..994acf61af 100644 --- a/gtk/deprecated/gtkcellrendererpixbuf.c +++ b/gtk/deprecated/gtkcellrendererpixbuf.c @@ -48,6 +48,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * renders that pixbuf, if the `GtkCellRenderer:is-expanded` property is %FALSE * and the `GtkCellRendererPixbuf:pixbuf-expander-closed` property is set to a * pixbuf, it renders that one. + * + * Deprecated: 4.10: List views use widgets to display their contents. You + * should use [class@Gtk.Image] for icons, and [class@Gtk.Picture] for images */ @@ -321,13 +324,13 @@ take_image_definition (GtkCellRendererPixbuf *cellpixbuf, { GtkCellRendererPixbufPrivate *priv = gtk_cell_renderer_pixbuf_get_instance_private (cellpixbuf); GtkImageType old_storage_type, new_storage_type; - + if (def == NULL) def = gtk_image_definition_new_empty (); old_storage_type = gtk_image_definition_get_storage_type (priv->image_def); new_storage_type = gtk_image_definition_get_storage_type (def); - + if (new_storage_type != old_storage_type) notify_storage_type (cellpixbuf, old_storage_type); @@ -401,7 +404,7 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object, /** * gtk_cell_renderer_pixbuf_new: - * + * * Creates a new `GtkCellRendererPixbuf`. Adjust rendering * parameters using object properties. Object properties can be set * globally (with g_object_set()). Also, with `GtkTreeViewColumn`, you @@ -409,7 +412,7 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object, * can bind the “pixbuf” property on the cell renderer to a pixbuf value * in the model, thus rendering a different image in each row of the * `GtkTreeView`. - * + * * Returns: the new cell renderer * * Deprecated: 4.10 @@ -469,7 +472,7 @@ gtk_cell_renderer_pixbuf_get_size (GtkCellRendererPixbuf *self, pixbuf_height = gdk_paintable_get_intrinsic_height (paintable); } else - pixbuf_width = pixbuf_height = gtk_icon_helper_get_size (icon_helper); + pixbuf_width = pixbuf_height = gtk_icon_helper_get_size (icon_helper); g_object_unref (icon_helper); gtk_style_context_restore (context); @@ -488,7 +491,7 @@ gtk_cell_renderer_pixbuf_get_size (GtkCellRendererPixbuf *self, gtk_cell_renderer_get_padding (cell, &xpad, &ypad); calc_width = (int) xpad * 2 + pixbuf_width; calc_height = (int) ypad * 2 + pixbuf_height; - + if (cell_area && pixbuf_width > 0 && pixbuf_height > 0) { float xalign, yalign; @@ -516,7 +519,7 @@ gtk_cell_renderer_pixbuf_get_size (GtkCellRendererPixbuf *self, if (width) *width = calc_width; - + if (height) *height = calc_height; } @@ -540,7 +543,7 @@ gtk_cell_renderer_pixbuf_snapshot (GtkCellRenderer *cell, gtk_cell_renderer_pixbuf_get_size (cellpixbuf, widget, cell_area, - &pix_rect.x, + &pix_rect.x, &pix_rect.y, &pix_rect.width, &pix_rect.height); diff --git a/gtk/deprecated/gtkcellrendererprogress.c b/gtk/deprecated/gtkcellrendererprogress.c index 9ecb3c792b..a399044b84 100644 --- a/gtk/deprecated/gtkcellrendererprogress.c +++ b/gtk/deprecated/gtkcellrendererprogress.c @@ -42,6 +42,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * * `GtkCellRendererProgress` renders a numeric value as a progress par in a cell. * Additionally, it can display a text on top of the progress bar. + * + * Deprecated: 4.10: List views use widgets to display their contents. + * You should use [class@Gtk.ProgressBar] instead */ diff --git a/gtk/deprecated/gtkcellrendererspin.c b/gtk/deprecated/gtkcellrendererspin.c index 60c878726e..60b90f0449 100644 --- a/gtk/deprecated/gtkcellrendererspin.c +++ b/gtk/deprecated/gtkcellrendererspin.c @@ -47,7 +47,8 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * of `GtkCellRendererSpin:digits` to display. Other `GtkSpinButton` properties * can be set in a handler for the `GtkCellRenderer::editing-started` signal. * - * The `GtkCellRendererSpin` cell renderer was added in GTK 2.10. + * Deprecated: 4.10: List views use widgets to display their contents. + * You should use [class@Gtk.SpinButton] instead */ typedef struct _GtkCellRendererSpinClass GtkCellRendererSpinClass; @@ -122,7 +123,7 @@ gtk_cell_renderer_spin_class_init (GtkCellRendererSpinClass *klass) /** * GtkCellRendererSpin:adjustment: * - * The adjustment that holds the value of the spinbutton. + * The adjustment that holds the value of the spinbutton. * This must be non-%NULL for the cell renderer to be editable. */ g_object_class_install_property (object_class, @@ -141,7 +142,7 @@ gtk_cell_renderer_spin_class_init (GtkCellRendererSpinClass *klass) PROP_CLIMB_RATE, g_param_spec_double ("climb-rate", NULL, NULL, 0.0, G_MAXDOUBLE, 0.0, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE)); /** * GtkCellRendererSpin:digits: * @@ -151,7 +152,7 @@ gtk_cell_renderer_spin_class_init (GtkCellRendererSpinClass *klass) PROP_DIGITS, g_param_spec_uint ("digits", NULL, NULL, 0, 20, 0, - GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); + GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); } static void @@ -366,7 +367,7 @@ gtk_cell_renderer_spin_start_editing (GtkCellRenderer *cell, /** * gtk_cell_renderer_spin_new: * - * Creates a new `GtkCellRendererSpin`. + * Creates a new `GtkCellRendererSpin`. * * Returns: a new `GtkCellRendererSpin` * diff --git a/gtk/deprecated/gtkcellrendererspinner.c b/gtk/deprecated/gtkcellrendererspinner.c index c32a09e294..7cd60ee310 100644 --- a/gtk/deprecated/gtkcellrendererspinner.c +++ b/gtk/deprecated/gtkcellrendererspinner.c @@ -54,6 +54,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * at regular intervals. The usual way to set the cell renderer properties * for each cell is to bind them to columns in your tree model using e.g. * gtk_tree_view_column_add_attribute(). + * + * Deprecated: 4.10: List views use widgets to display their contents. + * You should use [class@Gtk.Spinner] instead */ diff --git a/gtk/deprecated/gtkcellrenderertext.c b/gtk/deprecated/gtkcellrenderertext.c index 6de4ac1e21..6ee6c557a5 100644 --- a/gtk/deprecated/gtkcellrenderertext.c +++ b/gtk/deprecated/gtkcellrenderertext.c @@ -45,6 +45,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * * If the `GtkCellRenderer:mode` is %GTK_CELL_RENDERER_MODE_EDITABLE, * the `GtkCellRendererText` allows to edit its text using an entry. + * + * Deprecated: 4.10: List views use widgets to display their contents. + * You should use [class@Gtk.Inscription] or [class@Gtk.Label] instead */ @@ -238,7 +241,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class) GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class); object_class->finalize = gtk_cell_renderer_text_finalize; - + object_class->get_property = gtk_cell_renderer_text_get_property; object_class->set_property = gtk_cell_renderer_text_set_property; @@ -623,7 +626,7 @@ gtk_cell_renderer_text_get_property (GObject *object, case PROP_FONT: g_value_take_string (value, pango_font_description_to_string (priv->font)); break; - + case PROP_FONT_DESC: g_value_set_boxed (value, priv->font); break; @@ -659,7 +662,7 @@ gtk_cell_renderer_text_get_property (GObject *object, case PROP_SCALE: g_value_set_double (value, priv->font_scale); break; - + case PROP_EDITABLE: g_value_set_boolean (value, priv->editable); break; @@ -674,7 +677,7 @@ gtk_cell_renderer_text_get_property (GObject *object, case PROP_RISE: g_value_set_int (value, priv->rise); - break; + break; case PROP_LANGUAGE: g_value_set_static_string (value, pango_language_to_string (priv->language)); @@ -683,7 +686,7 @@ gtk_cell_renderer_text_get_property (GObject *object, case PROP_ELLIPSIZE: g_value_set_enum (value, priv->ellipsize); break; - + case PROP_WRAP_MODE: g_value_set_enum (value, priv->wrap_mode); break; @@ -691,7 +694,7 @@ gtk_cell_renderer_text_get_property (GObject *object, case PROP_WRAP_WIDTH: g_value_set_int (value, priv->wrap_width); break; - + case PROP_ALIGN: g_value_set_enum (value, priv->align); break; @@ -713,14 +716,14 @@ gtk_cell_renderer_text_get_property (GObject *object, { PangoFontMask mask = get_property_font_set_mask (param_id); g_value_set_boolean (value, (pango_font_description_get_set_fields (priv->font) & mask) != 0); - + break; } case PROP_SCALE_SET: g_value_set_boolean (value, priv->scale_set); break; - + case PROP_EDITABLE_SET: g_value_set_boolean (value, priv->editable_set); break; @@ -748,14 +751,14 @@ gtk_cell_renderer_text_get_property (GObject *object, case PROP_ALIGN_SET: g_value_set_boolean (value, priv->align_set); break; - + case PROP_WIDTH_CHARS: g_value_set_int (value, priv->width_chars); - break; + break; case PROP_MAX_WIDTH_CHARS: g_value_set_int (value, priv->max_width_chars); - break; + break; case PROP_PLACEHOLDER_TEXT: g_value_set_string (value, priv->placeholder_text); @@ -828,7 +831,7 @@ set_font_desc_fields (PangoFontDescription *desc, PangoFontMask to_set) { PangoFontMask changed_mask = 0; - + if (to_set & PANGO_FONT_MASK_FAMILY) { const char *family = pango_font_description_get_family (desc); @@ -856,7 +859,7 @@ set_font_desc_fields (PangoFontDescription *desc, size = 10 * PANGO_SCALE; changed_mask |= PANGO_FONT_MASK_SIZE; } - + pango_font_description_set_size (desc, size); } @@ -1290,7 +1293,7 @@ gtk_cell_renderer_text_set_property (GObject *object, /** * gtk_cell_renderer_text_new: - * + * * Creates a new `GtkCellRendererText`. Adjust how text is drawn using * object properties. Object properties can be * set globally (with g_object_set()). Also, with `GtkTreeViewColumn`, @@ -1298,7 +1301,7 @@ gtk_cell_renderer_text_set_property (GObject *object, * you can bind the “text” property on the cell renderer to a string * value in the model, thus rendering a different string in each row * of the `GtkTreeView`. - * + * * Returns: the new cell renderer * * Deprecated: 4.10 @@ -1324,7 +1327,7 @@ add_attr (PangoAttrList *attr_list, { attr->start_index = 0; attr->end_index = G_MAXINT; - + pango_attr_list_insert (attr_list, attr); } @@ -1356,11 +1359,11 @@ get_layout (GtkCellRendererText *celltext, if (!placeholder_layout && cell_area) { /* Add options that affect appearance but not size */ - + /* note that background doesn't go here, since it affects * background_area not the PangoLayout area */ - + if (priv->foreground_set && (flags & GTK_CELL_RENDERER_SELECTED) == 0) { @@ -1497,7 +1500,7 @@ get_layout (GtkCellRendererText *celltext, pango_layout_set_alignment (layout, align); } - + return layout; } @@ -1554,7 +1557,7 @@ get_size (GtkCellRenderer *cell, gtk_cell_renderer_set_fixed_size (cell, cell_width, 2 * ypad + priv->fixed_height_rows * PANGO_PIXELS (row_height)); - + if (height) { *height = cell_height; @@ -1731,7 +1734,7 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell, if (priv->text) gtk_editable_set_text (GTK_EDITABLE (priv->entry), priv->text); g_object_set_data_full (G_OBJECT (priv->entry), I_(GTK_CELL_RENDERER_TEXT_PATH), g_strdup (path), g_free); - + gtk_editable_select_region (GTK_EDITABLE (priv->entry), 0, -1); priv->in_entry_menu = FALSE; @@ -1754,7 +1757,7 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell, * gtk_cell_renderer_text_set_fixed_height_from_font: * @renderer: A `GtkCellRendererText` * @number_of_rows: Number of rows of text each cell renderer is allocated, or -1 - * + * * Sets the height of a renderer to explicitly be determined by the “font” and * “y_pad” property set on it. Further changes in these properties do not * affect the height, so they must be accompanied by a subsequent call to this @@ -1859,7 +1862,7 @@ gtk_cell_renderer_text_get_preferred_width (GtkCellRenderer *cell, if (priv->max_width_chars > 0) { int max_width = xpad * 2 + PANGO_PIXELS (char_width) * priv->max_width_chars; - + min_width = MIN (min_width, max_width); nat_width = MIN (nat_width, max_width); } @@ -1931,7 +1934,7 @@ gtk_cell_renderer_text_get_aligned_area (GtkCellRenderer *cell, int y_offset = 0; layout = get_layout (celltext, widget, cell_area, flags); - get_size (cell, widget, cell_area, layout, &x_offset, &y_offset, + get_size (cell, widget, cell_area, layout, &x_offset, &y_offset, &aligned_area->width, &aligned_area->height); aligned_area->x = cell_area->x + x_offset; diff --git a/gtk/deprecated/gtkcellrenderertoggle.c b/gtk/deprecated/gtkcellrenderertoggle.c index 4586c1646f..a182b4dcb1 100644 --- a/gtk/deprecated/gtkcellrenderertoggle.c +++ b/gtk/deprecated/gtkcellrenderertoggle.c @@ -42,6 +42,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * button is drawn as a radio or a checkbutton, depending on the * `GtkCellRendererToggle:radio` property. * When activated, it emits the `GtkCellRendererToggle::toggled` signal. + * + * Deprecated: 4.10: List views use widgets to display their contents. + * You should use [class@Gtk.ToggleButton] instead */ @@ -190,7 +193,7 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class) cell_class->get_preferred_height = gtk_cell_renderer_toggle_get_preferred_height; cell_class->snapshot = gtk_cell_renderer_toggle_snapshot; cell_class->activate = gtk_cell_renderer_toggle_activate; - + g_object_class_install_property (object_class, PROP_ACTIVE, g_param_spec_boolean ("active", NULL, NULL, @@ -202,7 +205,7 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class) g_param_spec_boolean ("inconsistent", NULL, NULL, FALSE, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); - + g_object_class_install_property (object_class, PROP_ACTIVATABLE, g_param_spec_boolean ("activatable", NULL, NULL, @@ -215,14 +218,14 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class) FALSE, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); - + /** * GtkCellRendererToggle::toggled: * @cell_renderer: the object which received the signal - * @path: string representation of `GtkTreePath` describing the + * @path: string representation of `GtkTreePath` describing the * event location * - * The ::toggled signal is emitted when the cell is toggled. + * The ::toggled signal is emitted when the cell is toggled. * * It is the responsibility of the application to update the model * with the correct value to store at @path. Often this is simply the @@ -467,7 +470,7 @@ gtk_cell_renderer_toggle_snapshot (GtkCellRenderer *cell, if (priv->inconsistent) state |= GTK_STATE_FLAG_INCONSISTENT; - + if (priv->active) state |= GTK_STATE_FLAG_CHECKED; @@ -528,7 +531,7 @@ gtk_cell_renderer_toggle_activate (GtkCellRenderer *cell, * gtk_cell_renderer_toggle_set_radio: * @toggle: a `GtkCellRendererToggle` * @radio: %TRUE to make the toggle look like a radio button - * + * * If @radio is %TRUE, the cell renderer renders a radio toggle * (i.e. a toggle in a group of mutually-exclusive toggles). * If %FALSE, it renders a check toggle (a standalone boolean option). @@ -554,8 +557,8 @@ gtk_cell_renderer_toggle_set_radio (GtkCellRendererToggle *toggle, * gtk_cell_renderer_toggle_get_radio: * @toggle: a `GtkCellRendererToggle` * - * Returns whether we’re rendering radio toggles rather than checkboxes. - * + * Returns whether we’re rendering radio toggles rather than checkboxes. + * * Returns: %TRUE if we’re rendering radio toggles rather than checkboxes * * Deprecated: 4.10 diff --git a/gtk/deprecated/gtkcellview.c b/gtk/deprecated/gtkcellview.c index 395baa5ad0..be497572f2 100644 --- a/gtk/deprecated/gtkcellview.c +++ b/gtk/deprecated/gtkcellview.c @@ -40,7 +40,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * A widget displaying a single row of a GtkTreeModel * * A `GtkCellView` displays a single row of a `GtkTreeModel` using a `GtkCellArea` - * and `GtkCellAreaContext`. A `GtkCellAreaContext` can be provided to the + * and `GtkCellAreaContext`. A `GtkCellAreaContext` can be provided to the * `GtkCellView` at construction time in order to keep the cellview in context * of a group of cell views, this ensures that the renderers displayed will * be properly aligned with each other (like the aligned cells in the menus @@ -53,9 +53,12 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * individual heights (left-to-right menus should be allocated vertically since * they all share the same height but may have variable widths). * - * # CSS nodes + * ## CSS nodes * * GtkCellView has a single CSS node with name cellview. + * + * Deprecated: 4.10: List views use widgets to display their contents. + * You can use [class@Gtk.Box] instead */ static void gtk_cell_view_constructed (GObject *object); @@ -206,7 +209,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass) * * The `GtkCellArea` rendering cells * - * If no area is specified when creating the cell view with gtk_cell_view_new_with_context() + * If no area is specified when creating the cell view with gtk_cell_view_new_with_context() * a horizontally oriented `GtkCellArea`Box will be used. * * since 3.0 @@ -524,19 +527,19 @@ gtk_cell_view_request_model (GtkCellView *cellview, if (orientation == GTK_ORIENTATION_HORIZONTAL) { if (for_size < 0) - gtk_cell_area_get_preferred_width (priv->area, priv->context, + gtk_cell_area_get_preferred_width (priv->area, priv->context, GTK_WIDGET (cellview), &min, &nat); else - gtk_cell_area_get_preferred_width_for_height (priv->area, priv->context, + gtk_cell_area_get_preferred_width_for_height (priv->area, priv->context, GTK_WIDGET (cellview), for_size, &min, &nat); } else { if (for_size < 0) - gtk_cell_area_get_preferred_height (priv->area, priv->context, + gtk_cell_area_get_preferred_height (priv->area, priv->context, GTK_WIDGET (cellview), &min, &nat); else - gtk_cell_area_get_preferred_height_for_width (priv->area, priv->context, + gtk_cell_area_get_preferred_height_for_width (priv->area, priv->context, GTK_WIDGET (cellview), for_size, &min, &nat); } @@ -550,7 +553,7 @@ gtk_cell_view_request_model (GtkCellView *cellview, } } -static GtkSizeRequestMode +static GtkSizeRequestMode gtk_cell_view_get_request_mode (GtkWidget *widget) { GtkCellView *cellview = GTK_CELL_VIEW (widget); @@ -698,13 +701,13 @@ gtk_cell_view_set_cell_data (GtkCellView *cell_view) gtk_tree_model_get_iter (priv->model, &iter, path); gtk_tree_path_free (path); - gtk_cell_area_apply_attributes (priv->area, - priv->model, + gtk_cell_area_apply_attributes (priv->area, + priv->model, &iter, FALSE, FALSE); if (priv->draw_sensitive) { - GList *l, *cells = + GList *l, *cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (priv->area)); for (l = cells; l; l = l->next) @@ -846,7 +849,7 @@ gtk_cell_view_new_with_context (GtkCellArea *area, g_return_val_if_fail (GTK_IS_CELL_AREA (area), NULL); g_return_val_if_fail (context == NULL || GTK_IS_CELL_AREA_CONTEXT (context), NULL); - return (GtkWidget *)g_object_new (GTK_TYPE_CELL_VIEW, + return (GtkWidget *)g_object_new (GTK_TYPE_CELL_VIEW, "cell-area", area, "cell-area-context", context, NULL); @@ -955,7 +958,7 @@ gtk_cell_view_new_with_texture (GdkTexture *texture) * @renderer: one of the renderers of @cell_view * @property: the name of the property of @renderer to set * @value: the new value to set the property to - * + * * Sets a property of a cell renderer of @cell_view, and * makes sure the display of @cell_view is updated. * @@ -1012,7 +1015,7 @@ gtk_cell_view_set_model (GtkCellView *cell_view, { g_object_ref (priv->model); - priv->row_changed_id = + priv->row_changed_id = g_signal_connect (priv->model, "row-changed", G_CALLBACK (row_changed_cb), cell_view); } @@ -1079,8 +1082,8 @@ gtk_cell_view_set_displayed_row (GtkCellView *cell_view, * gtk_cell_view_get_displayed_row: * @cell_view: a `GtkCellView` * - * Returns a `GtkTreePath` referring to the currently - * displayed row. If no row is currently displayed, + * Returns a `GtkTreePath` referring to the currently + * displayed row. If no row is currently displayed, * %NULL is returned. * * Returns: (nullable) (transfer full): the currently displayed row -- 2.30.2