summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2016-10-23 17:39:31 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2016-10-23 18:23:59 +0200
commitdb8369de1fafb2da945b39992759471fe5a5d43f (patch)
treedc2b9bb48e5a718e529f1c04e923c91894d4996f /gtk
parent502e63eddc6c8c705edbc89c26572a443baa6e26 (diff)
downloadgtk+-db8369de1fafb2da945b39992759471fe5a5d43f.tar.gz
cellrenderertoggle: Remove deprecated indicator-size property
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcellrenderertoggle.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c
index a6e94bdc71..221cb19d4b 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;