]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkmodifierstyle.c
GtkIconTheme: fix regression from 0db32f0632ef4675bfcfc9ec201f7af157a48ab0
[~andy/gtk] / gtk / gtkmodifierstyle.c
index c16a051c445206a562645de8c0d822665c981fb3..4d3cc35194a7afa6b0e0a49ddd6e6e94d7408704 100644 (file)
@@ -81,16 +81,6 @@ _gtk_modifier_style_init (GtkModifierStyle *modifier_style)
   priv->style = gtk_style_properties_new ();
 }
 
-static GtkStyleProperties *
-gtk_modifier_style_get_style (GtkStyleProvider *provider,
-                              GtkWidgetPath    *path)
-{
-  GtkModifierStylePrivate *priv;
-
-  priv = GTK_MODIFIER_STYLE (provider)->priv;
-  return g_object_ref (priv->style);
-}
-
 static gboolean
 gtk_modifier_style_get_style_property (GtkStyleProvider *provider,
                                        GtkWidgetPath    *path,
@@ -129,11 +119,10 @@ gtk_modifier_style_get_style_property (GtkStyleProvider *provider,
 static void
 gtk_modifier_style_provider_init (GtkStyleProviderIface *iface)
 {
-  iface->get_style = gtk_modifier_style_get_style;
   iface->get_style_property = gtk_modifier_style_get_style_property;
 }
 
-static GtkSymbolicColor *
+static GtkCssValue *
 gtk_modifier_style_provider_get_color (GtkStyleProviderPrivate *provider,
                                        const char              *name)
 {
@@ -154,11 +143,22 @@ gtk_modifier_style_provider_lookup (GtkStyleProviderPrivate *provider,
                                       lookup);
 }
 
+static GtkCssChange
+gtk_modifier_style_provider_get_change (GtkStyleProviderPrivate *provider,
+                                        const GtkCssMatcher     *matcher)
+{
+  GtkModifierStyle *style = GTK_MODIFIER_STYLE (provider);
+
+  return _gtk_style_provider_private_get_change (GTK_STYLE_PROVIDER_PRIVATE (style->priv->style),
+                                                 matcher);
+}
+
 static void
 gtk_modifier_style_provider_private_init (GtkStyleProviderPrivateInterface *iface)
 {
   iface->get_color = gtk_modifier_style_provider_get_color;
   iface->lookup = gtk_modifier_style_provider_lookup;
+  iface->get_change = gtk_modifier_style_provider_get_change;
 }
 
 static void
@@ -199,6 +199,7 @@ modifier_style_set_color (GtkModifierStyle *style,
     gtk_style_properties_unset_property (priv->style, prop, state);
 
   g_signal_emit (style, signals[CHANGED], 0);
+  _gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (style));
 }
 
 void
@@ -239,6 +240,7 @@ _gtk_modifier_style_set_font (GtkModifierStyle           *style,
     gtk_style_properties_unset_property (priv->style, "font", 0);
 
   g_signal_emit (style, signals[CHANGED], 0);
+  _gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (style));
 }
 
 void
@@ -254,13 +256,18 @@ _gtk_modifier_style_map_color (GtkModifierStyle *style,
 
   priv = style->priv;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
   if (color)
     symbolic_color = gtk_symbolic_color_new_literal (color);
 
   gtk_style_properties_map_color (priv->style,
                                   name, symbolic_color);
 
+  G_GNUC_END_IGNORE_DEPRECATIONS;
+
   g_signal_emit (style, signals[CHANGED], 0);
+  _gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (style));
 }
 
 void
@@ -301,4 +308,5 @@ _gtk_modifier_style_set_color_property (GtkModifierStyle *style,
     }
 
   g_signal_emit (style, signals[CHANGED], 0);
+  _gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (style));
 }