[gtk+/wip/ricotz/deprecated: 6/7] cellrenderertoggle: Remove deprecated indicator-size property
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/ricotz/deprecated: 6/7] cellrenderertoggle: Remove deprecated indicator-size property
- Date: Sun, 23 Oct 2016 16:24:51 +0000 (UTC)
commit db8369de1fafb2da945b39992759471fe5a5d43f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Oct 23 17:39:31 2016 +0200
cellrenderertoggle: Remove deprecated indicator-size property
gtk/gtkcellrenderertoggle.c | 35 ++---------------------------------
1 files changed, 2 insertions(+), 33 deletions(-)
---
diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c
index a6e94bd..221cb19 100644
--- a/gtk/gtkcellrenderertoggle.c
+++ b/gtk/gtkcellrenderertoggle.c
@@ -78,8 +78,7 @@ enum {
PROP_ACTIVATABLE,
PROP_ACTIVE,
PROP_RADIO,
- PROP_INCONSISTENT,
- PROP_INDICATOR_SIZE
+ PROP_INCONSISTENT
};
#define TOGGLE_WIDTH 16
@@ -88,8 +87,6 @@ static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
struct _GtkCellRendererTogglePrivate
{
- gint indicator_size;
-
guint active : 1;
guint activatable : 1;
guint inconsistent : 1;
@@ -115,7 +112,6 @@ gtk_cell_renderer_toggle_init (GtkCellRendererToggle *celltoggle)
g_object_set (celltoggle, "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
gtk_cell_renderer_set_padding (GTK_CELL_RENDERER (celltoggle), 2, 2);
- priv->indicator_size = 0;
priv->inconsistent = FALSE;
}
@@ -164,16 +160,6 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
- g_object_class_install_property (object_class,
- PROP_INDICATOR_SIZE,
- g_param_spec_int ("indicator-size",
- P_("Indicator size"),
- P_("Size of check or radio indicator"),
- 0,
- G_MAXINT,
- 0,
-
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED));
-
/**
* GtkCellRendererToggle::toggled:
@@ -223,9 +209,6 @@ gtk_cell_renderer_toggle_get_property (GObject *object,
case PROP_RADIO:
g_value_set_boolean (value, priv->radio);
break;
- case PROP_INDICATOR_SIZE:
- g_value_set_int (value, priv->indicator_size);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
break;
@@ -272,13 +255,6 @@ gtk_cell_renderer_toggle_set_property (GObject *object,
g_object_notify_by_pspec (object, pspec);
}
break;
- case PROP_INDICATOR_SIZE:
- if (priv->indicator_size != g_value_get_int (value))
- {
- priv->indicator_size = g_value_get_int (value);
- g_object_notify_by_pspec (object, pspec);
- }
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
break;
@@ -324,16 +300,9 @@ gtk_cell_renderer_toggle_save_context (GtkCellRenderer *cell,
static void
calc_indicator_size (GtkStyleContext *context,
- gint indicator_size,
gint *width,
gint *height)
{
- if (indicator_size != 0)
- {
- *width = *height = indicator_size;
- return;
- }
-
gtk_style_context_get (context,
"min-width", width,
"min-height", height,
@@ -369,7 +338,7 @@ gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
gtk_style_context_get_padding (context, &padding);
gtk_style_context_get_border (context, &border);
- calc_indicator_size (context, priv->indicator_size, &calc_width, &calc_height);
+ calc_indicator_size (context, &calc_width, &calc_height);
calc_width += xpad * 2 + padding.left + padding.right + border.left + border.right;
calc_height += ypad * 2 + padding.top + padding.bottom + border.top + border.bottom;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]