]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkprinter.c
- Treat enums like enums and not values - Avoid invalid free, in case of
[~andy/gtk] / gtk / gtkprinter.c
index 3da9434a2a4515385250a9fd70605501842d2c80..15c866f8a110bafb8096d8efdf188f359c382e02 100644 (file)
@@ -118,7 +118,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
                                    g_param_spec_string ("name",
                                                        P_("Name"),
                                                        P_("Name of the printer"),
-                                                       NULL,
+                                                       "",
                                                        GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
   g_object_class_install_property (G_OBJECT_CLASS (class),
                                    PROP_BACKEND,
@@ -153,21 +153,21 @@ gtk_printer_class_init (GtkPrinterClass *class)
                                    g_param_spec_string ("state-message",
                                                        P_("State Message"),
                                                        P_("String giving the current state of the printer"),
-                                                       NULL,
+                                                       "",
                                                        GTK_PARAM_READABLE));
   g_object_class_install_property (G_OBJECT_CLASS (class),
                                    PROP_LOCATION,
                                    g_param_spec_string ("location",
                                                        P_("Location"),
                                                        P_("The location of the printer"),
-                                                       NULL,
+                                                       "",
                                                        GTK_PARAM_READABLE));
   g_object_class_install_property (G_OBJECT_CLASS (class),
                                    PROP_ICON_NAME,
                                    g_param_spec_string ("icon-name",
                                                        P_("Icon Name"),
                                                        P_("The icon name to use for the printer"),
-                                                       NULL,
+                                                       "",
                                                        GTK_PARAM_READABLE));
   g_object_class_install_property (G_OBJECT_CLASS (class),
                                    PROP_JOB_COUNT,
@@ -292,7 +292,7 @@ gtk_printer_get_property (GObject    *object,
       if (priv->name)
        g_value_set_string (value, priv->name);
       else
-       g_value_set_string (value, "");
+       g_value_set_static_string (value, "");
       break;
     case PROP_BACKEND:
       g_value_set_object (value, priv->backend);
@@ -301,19 +301,19 @@ gtk_printer_get_property (GObject    *object,
       if (priv->state_message)
        g_value_set_string (value, priv->state_message);
       else
-       g_value_set_string (value, "");
+       g_value_set_static_string (value, "");
       break;
     case PROP_LOCATION:
       if (priv->location)
        g_value_set_string (value, priv->location);
       else
-       g_value_set_string (value, "");
+       g_value_set_static_string (value, "");
       break;
     case PROP_ICON_NAME:
       if (priv->icon_name)
        g_value_set_string (value, priv->icon_name);
       else
-       g_value_set_string (value, "");
+       g_value_set_static_string (value, "");
       break;
     case PROP_JOB_COUNT:
       g_value_set_int (value, priv->job_count);
@@ -511,7 +511,7 @@ gtk_printer_set_location (GtkPrinter  *printer,
   return TRUE;
 }
 
-**
+/**
  * gtk_printer_get_icon_name:
  * @printer: a #GtkPrinter
  * 
@@ -811,7 +811,7 @@ _gtk_printer_create_cairo_surface (GtkPrinter       *printer,
 
 /**
  * gtk_printer_list_papers:
- * @printer:
+ * @printer: a #GtkPrinter
  * 
  * Lists all the paper sizes @printer supports.
  * This will return and empty list unless the printer's details are 
@@ -1086,6 +1086,7 @@ gtk_print_capabilities_get_type (void)
         { GTK_PRINT_CAPABILITY_GENERATE_PDF, "GTK_PRINT_CAPABILITY_GENERATE_PDF", "generate-pdf" },
         { GTK_PRINT_CAPABILITY_GENERATE_PS, "GTK_PRINT_CAPABILITY_GENERATE_PS", "generate-ps" },
         { GTK_PRINT_CAPABILITY_PREVIEW, "GTK_PRINT_CAPABILITY_PREVIEW", "preview" },
+       { GTK_PRINT_CAPABILITY_NUMBER_UP, "GTK_PRINT_CAPABILITY_NUMBER_UP", "number-up"},
         { 0, NULL, NULL }
       };