]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkmodifierstyle.c
filechooserbutton: Test that the expected filename is shown
[~andy/gtk] / gtk / gtkmodifierstyle.c
index efb1008111d2b12015665d60bcf07238a7c1ae55..4d3cc35194a7afa6b0e0a49ddd6e6e94d7408704 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
@@ -83,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,
@@ -131,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)
 {
@@ -146,23 +133,32 @@ gtk_modifier_style_provider_get_color (GtkStyleProviderPrivate *provider,
 
 static void
 gtk_modifier_style_provider_lookup (GtkStyleProviderPrivate *provider,
-                                    GtkWidgetPath           *path,
-                                    GtkStateFlags            state,
+                                    const GtkCssMatcher     *matcher,
                                     GtkCssLookup            *lookup)
 {
   GtkModifierStyle *style = GTK_MODIFIER_STYLE (provider);
 
   _gtk_style_provider_private_lookup (GTK_STYLE_PROVIDER_PRIVATE (style->priv->style),
-                                      path,
-                                      state,
+                                      matcher,
                                       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
@@ -203,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
@@ -243,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
@@ -258,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
@@ -305,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));
 }