diff options
author | Benjamin Otte <otte@redhat.com> | 2015-01-12 03:57:08 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-01-17 02:25:40 +0100 |
commit | d0ed29d58d53fb0ad18c688f6a8df5664513729e (patch) | |
tree | 1f63e3d1dd18747b1bdfee7c902cda03695b0470 | |
parent | 63f7a36ae0ccd3b9d5ed96defce76de75671b6ec (diff) | |
download | gtk+-d0ed29d58d53fb0ad18c688f6a8df5664513729e.tar.gz |
stylecontext: Remove a bunch of return_if_fail()s
They're gonna be in the way when refactoring and we can live without
them.
-rw-r--r-- | gtk/gtkstylecontext.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 19c2d0ccb8..d47f3fbf65 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -877,7 +877,6 @@ style_values_lookup (GtkStyleContext *context) if (cssnode->values) return cssnode->values; - g_assert (priv->widget != NULL || priv->widget_path != NULL); g_assert (gtk_style_context_is_saved (context)); values = g_hash_table_lookup (priv->style_values, cssnode->decl); @@ -1194,16 +1193,12 @@ GtkCssSection * gtk_style_context_get_section (GtkStyleContext *context, const gchar *property) { - GtkStyleContextPrivate *priv; GtkCssStyle *values; GtkStyleProperty *prop; g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL); g_return_val_if_fail (property != NULL, NULL); - priv = context->priv; - g_return_val_if_fail (priv->widget != NULL || priv->widget_path != NULL, NULL); - prop = _gtk_style_property_lookup (property); if (!GTK_IS_CSS_STYLE_PROPERTY (prop)) return NULL; @@ -2284,15 +2279,11 @@ GtkIconSet * gtk_style_context_lookup_icon_set (GtkStyleContext *context, const gchar *stock_id) { - GtkStyleContextPrivate *priv; GtkIconSet *icon_set; g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL); g_return_val_if_fail (stock_id != NULL, NULL); - priv = context->priv; - g_return_val_if_fail (priv->widget != NULL || priv->widget_path != NULL, NULL); - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; icon_set = gtk_icon_factory_lookup_default (stock_id); @@ -2674,7 +2665,6 @@ gtk_style_context_notify_state_change (GtkStyleContext *context, g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); g_return_if_fail (GDK_IS_WINDOW (window)); g_return_if_fail (state > GTK_STATE_NORMAL && state <= GTK_STATE_FOCUSED); - g_return_if_fail (context->priv->widget != NULL || context->priv->widget_path != NULL); } /** @@ -3356,15 +3346,11 @@ const PangoFontDescription * gtk_style_context_get_font (GtkStyleContext *context, GtkStateFlags state) { - GtkStyleContextPrivate *priv; GHashTable *hash; PangoFontDescription *description, *previous; g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL); - priv = context->priv; - g_return_val_if_fail (priv->widget != NULL || priv->widget_path != NULL, NULL); - /* Yuck, fonts are created on-demand but we don't return a ref. * Do bad things to achieve this requirement */ gtk_style_context_get (context, state, "font", &description, NULL); |