]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkcssstringvalue.c
filechooserbutton: Don't ever use gtk_file_chooser_get_files()
[~andy/gtk] / gtk / gtkcssstringvalue.c
index ec58ed99a68ece219097607af1f94a76ec0042c6..82e7c37b6ed59edb163e939a87b4787f1c9ed50d 100644 (file)
@@ -29,9 +29,21 @@ struct _GtkCssValue {
 static void
 gtk_css_value_string_free (GtkCssValue *value)
 {
+  g_free (value->string);
   g_slice_free (GtkCssValue, value);
 }
 
+static GtkCssValue *
+gtk_css_value_string_compute (GtkCssValue             *value,
+                              guint                    property_id,
+                              GtkStyleProviderPrivate *provider,
+                              GtkCssComputedValues    *values,
+                              GtkCssComputedValues    *parent_values,
+                              GtkCssDependencies      *dependencies)
+{
+  return _gtk_css_value_ref (value);
+}
+
 static gboolean
 gtk_css_value_string_equal (const GtkCssValue *value1,
                             const GtkCssValue *value2)
@@ -42,6 +54,7 @@ gtk_css_value_string_equal (const GtkCssValue *value1,
 static GtkCssValue *
 gtk_css_value_string_transition (GtkCssValue *start,
                                  GtkCssValue *end,
+                                 guint        property_id,
                                  double       progress)
 {
   return NULL;
@@ -54,6 +67,12 @@ gtk_css_value_string_print (const GtkCssValue *value,
   char *string = value->string;
   gsize len;
 
+  if (string == NULL)
+    {
+      g_string_append (str, "none");
+      return;
+    }
+
   g_string_append_c (str, '"');
 
   do {
@@ -130,6 +149,7 @@ gtk_css_value_ident_print (const GtkCssValue *value,
 
 static const GtkCssValueClass GTK_CSS_VALUE_STRING = {
   gtk_css_value_string_free,
+  gtk_css_value_string_compute,
   gtk_css_value_string_equal,
   gtk_css_value_string_transition,
   gtk_css_value_string_print
@@ -137,6 +157,7 @@ static const GtkCssValueClass GTK_CSS_VALUE_STRING = {
 
 static const GtkCssValueClass GTK_CSS_VALUE_IDENT = {
   gtk_css_value_string_free,
+  gtk_css_value_string_compute,
   gtk_css_value_string_equal,
   gtk_css_value_string_transition,
   gtk_css_value_ident_print