summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtkenums.h4
-rw-r--r--gtk/gtkpapersize.c16
-rw-r--r--gtk/gtkprintcontext.c4
-rw-r--r--gtk/gtkprintoperation.c4
-rw-r--r--gtk/gtkprintutils.c2
5 files changed, 15 insertions, 15 deletions
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index a24ac26f77..e409d79c7e 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -753,12 +753,14 @@ typedef enum
typedef enum
{
- GTK_UNIT_PIXEL,
+ GTK_UNIT_NONE,
GTK_UNIT_POINTS,
GTK_UNIT_INCH,
GTK_UNIT_MM
} GtkUnit;
+#define GTK_UNIT_PIXEL GTK_UNIT_NONE
+
/**
* GtkTreeViewGridLines:
* @GTK_TREE_VIEW_GRID_LINES_NONE: No grid lines.
diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c
index deb4ea3175..c4e7e0cd85 100644
--- a/gtk/gtkpapersize.c
+++ b/gtk/gtkpapersize.c
@@ -348,7 +348,7 @@ gtk_paper_size_new_from_ppd (const gchar *ppd_name,
* @display_name: the human-readable name
* @width: the paper width, in units of @unit
* @height: the paper height, in units of @unit
- * @unit: the unit for @width and @height
+ * @unit: the unit for @width and @height. not %GTK_UNIT_NONE.
*
* Creates a new #GtkPaperSize object with the
* given parameters.
@@ -367,7 +367,7 @@ gtk_paper_size_new_custom (const gchar *name,
{
GtkPaperSize *size;
g_return_val_if_fail (name != NULL, NULL);
- g_return_val_if_fail (unit != GTK_UNIT_PIXEL, NULL);
+ g_return_val_if_fail (unit != GTK_UNIT_NONE, NULL);
size = g_slice_new0 (GtkPaperSize);
@@ -570,7 +570,7 @@ gtk_paper_size_get_ppd_name (GtkPaperSize *size)
/**
* gtk_paper_size_get_width:
* @size: a #GtkPaperSize object
- * @unit: the unit for the return value
+ * @unit: the unit for the return value, not %GTK_UNIT_NONE
*
* Gets the paper width of the #GtkPaperSize, in
* units of @unit.
@@ -589,7 +589,7 @@ gtk_paper_size_get_width (GtkPaperSize *size,
/**
* gtk_paper_size_get_height:
* @size: a #GtkPaperSize object
- * @unit: the unit for the return value
+ * @unit: the unit for the return value, not %GTK_UNIT_NONE
*
* Gets the paper height of the #GtkPaperSize, in
* units of @unit.
@@ -717,7 +717,7 @@ gtk_paper_size_get_default (void)
/**
* gtk_paper_size_get_default_top_margin:
* @size: a #GtkPaperSize object
- * @unit: the unit for the return value
+ * @unit: the unit for the return value, not %GTK_UNIT_NONE
*
* Gets the default top margin for the #GtkPaperSize.
*
@@ -738,7 +738,7 @@ gtk_paper_size_get_default_top_margin (GtkPaperSize *size,
/**
* gtk_paper_size_get_default_bottom_margin:
* @size: a #GtkPaperSize object
- * @unit: the unit for the return value
+ * @unit: the unit for the return value, not %GTK_UNIT_NONE
*
* Gets the default bottom margin for the #GtkPaperSize.
*
@@ -767,7 +767,7 @@ gtk_paper_size_get_default_bottom_margin (GtkPaperSize *size,
/**
* gtk_paper_size_get_default_left_margin:
* @size: a #GtkPaperSize object
- * @unit: the unit for the return value
+ * @unit: the unit for the return value, not %GTK_UNIT_NONE
*
* Gets the default left margin for the #GtkPaperSize.
*
@@ -788,7 +788,7 @@ gtk_paper_size_get_default_left_margin (GtkPaperSize *size,
/**
* gtk_paper_size_get_default_right_margin:
* @size: a #GtkPaperSize object
- * @unit: the unit for the return value
+ * @unit: the unit for the return value, not %GTK_UNIT_NONE
*
* Gets the default right margin for the #GtkPaperSize.
*
diff --git a/gtk/gtkprintcontext.c b/gtk/gtkprintcontext.c
index 3c604fa9b7..1de8f0c33f 100644
--- a/gtk/gtkprintcontext.c
+++ b/gtk/gtkprintcontext.c
@@ -214,7 +214,7 @@ gtk_print_context_set_cairo_context (GtkPrintContext *context,
switch (context->op->priv->unit)
{
default:
- case GTK_UNIT_PIXEL:
+ case GTK_UNIT_NONE:
/* Do nothing, this is the cairo default unit */
context->pixels_per_unit_x = 1.0;
context->pixels_per_unit_y = 1.0;
@@ -292,7 +292,7 @@ _gtk_print_context_translate_into_margin (GtkPrintContext *context)
g_return_if_fail (GTK_IS_PRINT_CONTEXT (context));
- /* We do it this way to also handle GTK_UNIT_PIXELS */
+ /* We do it this way to also handle GTK_UNIT_NONE */
left = gtk_page_setup_get_left_margin (context->page_setup, GTK_UNIT_INCH);
top = gtk_page_setup_get_top_margin (context->page_setup, GTK_UNIT_INCH);
diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c
index 75212214e6..90b8d8ab5f 100644
--- a/gtk/gtkprintoperation.c
+++ b/gtk/gtkprintoperation.c
@@ -248,7 +248,7 @@ gtk_print_operation_init (GtkPrintOperation *operation)
priv->page_drawing_state = GTK_PAGE_DRAWING_STATE_READY;
priv->rloop = NULL;
- priv->unit = GTK_UNIT_PIXEL;
+ priv->unit = GTK_UNIT_NONE;
appname = g_get_application_name ();
if (appname == NULL)
@@ -1233,7 +1233,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
P_("Unit"),
P_("The unit in which distances can be measured in the context"),
GTK_TYPE_UNIT,
- GTK_UNIT_PIXEL,
+ GTK_UNIT_NONE,
GTK_PARAM_READWRITE));
diff --git a/gtk/gtkprintutils.c b/gtk/gtkprintutils.c
index 07a50ba6c4..35affcf6e9 100644
--- a/gtk/gtkprintutils.c
+++ b/gtk/gtkprintutils.c
@@ -30,7 +30,6 @@ _gtk_print_convert_to_mm (gdouble len,
case GTK_UNIT_INCH:
return len * MM_PER_INCH;
default:
- case GTK_UNIT_PIXEL:
g_warning ("Unsupported unit");
/* Fall through */
case GTK_UNIT_POINTS:
@@ -50,7 +49,6 @@ _gtk_print_convert_from_mm (gdouble len,
case GTK_UNIT_INCH:
return len / MM_PER_INCH;
default:
- case GTK_UNIT_PIXEL:
g_warning ("Unsupported unit");
/* Fall through */
case GTK_UNIT_POINTS: