~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/print/print-page-layout.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GIMP - The GNU Image Manipulation Program
 
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 */
 
18
 
 
19
#include "config.h"
 
20
 
 
21
#include <string.h>
 
22
 
 
23
#include <libgimp/gimp.h>
 
24
#include <libgimp/gimpui.h>
 
25
 
 
26
#include "print.h"
 
27
#include "print-page-layout.h"
 
28
 
 
29
#include "libgimp/stdplugins-intl.h"
 
30
 
 
31
 
 
32
typedef struct
 
33
{
 
34
  PrintData       *data;
 
35
  gint             image_width;
 
36
  gint             image_height;
 
37
  GimpSizeEntry   *size_entry;
 
38
  GimpSizeEntry   *resolution_entry;
 
39
  GimpChainButton *chain;
 
40
  GtkWidget       *area_label;
 
41
} PrintSizeInfo;
 
42
 
 
43
 
 
44
static void        run_page_setup_dialog              (GtkWidget     *widget,
 
45
                                                       PrintData     *data);
 
46
 
 
47
static GtkWidget * print_size_frame                   (PrintData     *data);
 
48
 
 
49
static void        print_size_info_size_changed       (GtkWidget     *widget);
 
50
static void        print_size_info_resolution_changed (GtkWidget     *widget);
 
51
static void        print_size_info_unit_changed       (GtkWidget     *widget);
 
52
static void        print_size_info_chain_toggled      (GtkWidget     *widget);
 
53
 
 
54
static void        print_size_info_set_size           (PrintSizeInfo *info,
 
55
                                                       gdouble        width,
 
56
                                                       gdouble        height);
 
57
 
 
58
static void        print_size_info_set_resolution     (PrintSizeInfo *info,
 
59
                                                       gdouble        xres,
 
60
                                                       gdouble        yres);
 
61
 
 
62
 
 
63
static void        print_size_info_set_page_setup     (PrintSizeInfo *info);
 
64
 
 
65
 
 
66
static PrintSizeInfo  info;
 
67
 
 
68
 
 
69
GtkWidget *
 
70
print_page_layout_gui (PrintData *data)
 
71
{
 
72
  GtkWidget *main_vbox;
 
73
  GtkWidget *hbox;
 
74
  GtkWidget *button;
 
75
  GtkWidget *label;
 
76
  GtkWidget *frame;
 
77
 
 
78
  memset (&info, 0, sizeof (PrintSizeInfo));
 
79
 
 
80
  info.data         = data;
 
81
  info.image_width  = gimp_image_width (data->image_id);
 
82
  info.image_height = gimp_image_height (data->image_id);
 
83
 
 
84
  main_vbox = gtk_vbox_new (FALSE, 12);
 
85
  gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
 
86
 
 
87
  hbox = gtk_hbox_new (FALSE, 0);
 
88
  gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
 
89
  gtk_widget_show (hbox);
 
90
 
 
91
  button = gtk_button_new_with_mnemonic (_("_Adjust Page Size "
 
92
                                           "and Orientation"));
 
93
  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
 
94
  g_signal_connect (G_OBJECT (button), "clicked",
 
95
                    G_CALLBACK (run_page_setup_dialog),
 
96
                    data);
 
97
  gtk_widget_show (button);
 
98
 
 
99
#if 0
 
100
  /* Commented out until the header becomes a little more configurable
 
101
   * and we can provide a user interface to include/exclude information.
 
102
   */
 
103
  button = gtk_check_button_new_with_label ("Print image header");
 
104
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
 
105
                                data->show_info_header);
 
106
  gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
 
107
  g_signal_connect (G_OBJECT (button), "toggled",
 
108
                    G_CALLBACK (gimp_toggle_button_update),
 
109
                    &data->show_info_header);
 
110
  gtk_widget_show (button);
 
111
#endif
 
112
 
 
113
  /* label for the printable area */
 
114
 
 
115
  hbox = gtk_hbox_new (FALSE, 6);
 
116
  gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
 
117
  gtk_widget_show (hbox);
 
118
 
 
119
  label = gtk_label_new (_("Printable area:"));
 
120
  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
 
121
  gtk_widget_show (label);
 
122
 
 
123
  label = gtk_label_new (NULL);
 
124
  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
 
125
  gimp_label_set_attributes (GTK_LABEL (label),
 
126
                             PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
 
127
                             -1);
 
128
  info.area_label = label;
 
129
 
 
130
  gtk_box_pack_start (GTK_BOX (hbox), info.area_label, FALSE, FALSE, 0);
 
131
  gtk_widget_show (info.area_label);
 
132
 
 
133
  /* size entry area for the image's print size */
 
134
 
 
135
  hbox = gtk_hbox_new (FALSE, 0);
 
136
  gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
 
137
  gtk_widget_show (hbox);
 
138
 
 
139
  frame = print_size_frame (data);
 
140
  gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
 
141
  gtk_widget_show (frame);
 
142
 
 
143
  print_size_info_set_page_setup (&info);
 
144
 
 
145
  return main_vbox;
 
146
}
 
147
 
 
148
static void
 
149
run_page_setup_dialog (GtkWidget *widget,
 
150
                       PrintData *data)
 
151
{
 
152
  GtkPrintOperation *operation;
 
153
  GtkPrintSettings  *settings;
 
154
  GtkPageSetup      *page_setup;
 
155
  GtkWidget         *toplevel;
 
156
 
 
157
  operation = data->operation;
 
158
 
 
159
  /* find a transient parent if possible */
 
160
  toplevel = gtk_widget_get_toplevel (widget);
 
161
  if (! GTK_WIDGET_TOPLEVEL (toplevel))
 
162
    toplevel = NULL;
 
163
 
 
164
  settings = gtk_print_operation_get_print_settings (operation);
 
165
  if (! settings)
 
166
    settings = gtk_print_settings_new ();
 
167
 
 
168
  page_setup = gtk_print_operation_get_default_page_setup (operation);
 
169
 
 
170
  page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (toplevel),
 
171
                                                page_setup, settings);
 
172
 
 
173
  gtk_print_operation_set_default_page_setup (operation, page_setup);
 
174
 
 
175
  print_size_info_set_page_setup (&info);
 
176
}
 
177
 
 
178
#define SB_WIDTH 8
 
179
 
 
180
 
 
181
static GtkWidget *
 
182
print_size_frame (PrintData *data)
 
183
{
 
184
  GtkWidget    *entry;
 
185
  GtkWidget    *height;
 
186
  GtkWidget    *vbox;
 
187
  GtkWidget    *hbox;
 
188
  GtkWidget    *chain;
 
189
  GtkWidget    *frame;
 
190
  GtkWidget    *label;
 
191
  GtkSizeGroup *label_group;
 
192
  GtkSizeGroup *entry_group;
 
193
  GtkObject    *adj;
 
194
  gdouble       image_width;
 
195
  gdouble       image_height;
 
196
 
 
197
  image_width  = (info.image_width *
 
198
                  gimp_unit_get_factor (data->unit) / data->xres);
 
199
  image_height = (info.image_height *
 
200
                  gimp_unit_get_factor (data->unit) / data->yres);
 
201
 
 
202
  frame = gimp_frame_new (_("Image Size"));
 
203
 
 
204
  vbox = gtk_vbox_new (FALSE, 12);
 
205
  gtk_container_add (GTK_CONTAINER (frame), vbox);
 
206
  gtk_widget_show (vbox);
 
207
 
 
208
  label_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
209
  entry_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
210
 
 
211
  /*  the print size entry  */
 
212
 
 
213
  hbox = gtk_hbox_new (FALSE, 0);
 
214
  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
215
  gtk_widget_show (hbox);
 
216
 
 
217
  entry = gimp_size_entry_new (1, data->unit, "%p",
 
218
                               FALSE, FALSE, FALSE, SB_WIDTH,
 
219
                               GIMP_SIZE_ENTRY_UPDATE_NONE);
 
220
  gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
 
221
  gtk_widget_show (entry);
 
222
 
 
223
  info.size_entry = GIMP_SIZE_ENTRY (entry);
 
224
 
 
225
  gtk_table_set_row_spacings (GTK_TABLE (entry), 2);
 
226
  gtk_table_set_col_spacing (GTK_TABLE (entry), 0, 6);
 
227
  gtk_table_set_col_spacing (GTK_TABLE (entry), 2, 6);
 
228
 
 
229
  height = gimp_spin_button_new (&adj, 1, 1, 1, 1, 10, 0, 1, 2);
 
230
  gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
 
231
                             GTK_SPIN_BUTTON (height), NULL);
 
232
  gtk_table_attach_defaults (GTK_TABLE (entry), height, 1, 2, 0, 1);
 
233
  gtk_widget_show (height);
 
234
 
 
235
  gtk_size_group_add_widget (entry_group, height);
 
236
  g_object_unref (entry_group);
 
237
 
 
238
  gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
 
239
                                _("_Width:"), 0, 0, 0.0);
 
240
  label = gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
 
241
                                        _("_Height:"), 1, 0, 0.0);
 
242
 
 
243
  gtk_size_group_add_widget (label_group, label);
 
244
  g_object_unref (label_group);
 
245
 
 
246
  gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (entry), 0,
 
247
                                  data->xres, FALSE);
 
248
  gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (entry), 1,
 
249
                                  data->yres, FALSE);
 
250
 
 
251
  gimp_size_entry_set_value (GIMP_SIZE_ENTRY (entry), 0, image_width);
 
252
  gimp_size_entry_set_value (GIMP_SIZE_ENTRY (entry), 1, image_height);
 
253
 
 
254
  /*  the resolution entry  */
 
255
 
 
256
  hbox = gtk_hbox_new (FALSE, 0);
 
257
  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
258
  gtk_widget_show (hbox);
 
259
 
 
260
  entry = gimp_size_entry_new (1, gimp_image_get_unit (data->image_id),
 
261
                               _("pixels/%a"),
 
262
                               FALSE, FALSE, FALSE, SB_WIDTH,
 
263
                               GIMP_SIZE_ENTRY_UPDATE_RESOLUTION);
 
264
  gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
 
265
  gtk_widget_show (entry);
 
266
 
 
267
  info.resolution_entry = GIMP_SIZE_ENTRY (entry);
 
268
 
 
269
  gtk_table_set_row_spacings (GTK_TABLE (entry), 2);
 
270
  gtk_table_set_col_spacing (GTK_TABLE (entry), 0, 6);
 
271
  gtk_table_set_col_spacing (GTK_TABLE (entry), 2, 6);
 
272
 
 
273
  height = gimp_spin_button_new (&adj, 1, 1, 1, 1, 10, 0, 1, 2);
 
274
  gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
 
275
                             GTK_SPIN_BUTTON (height), NULL);
 
276
  gtk_table_attach_defaults (GTK_TABLE (entry), height, 1, 2, 0, 1);
 
277
  gtk_widget_show (height);
 
278
 
 
279
  gtk_size_group_add_widget (entry_group, height);
 
280
 
 
281
  gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
 
282
                                _("_X resolution:"), 0, 0, 0.0);
 
283
  label = gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
 
284
                                        _("_Y resolution:"), 1, 0, 0.0);
 
285
 
 
286
  gtk_size_group_add_widget (label_group, label);
 
287
 
 
288
  gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (entry), 0,
 
289
                                         GIMP_MIN_RESOLUTION,
 
290
                                         GIMP_MAX_RESOLUTION);
 
291
  gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (entry), 1,
 
292
                                         GIMP_MIN_RESOLUTION,
 
293
                                         GIMP_MAX_RESOLUTION);
 
294
 
 
295
  gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (entry), 0, data->xres);
 
296
  gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (entry), 1, data->yres);
 
297
 
 
298
  chain = gimp_chain_button_new (GIMP_CHAIN_RIGHT);
 
299
  gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chain), TRUE);
 
300
  gtk_table_attach (GTK_TABLE (entry), chain, 2, 3, 0, 2,
 
301
                    GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
302
  gtk_widget_show (chain);
 
303
 
 
304
  info.chain = GIMP_CHAIN_BUTTON (chain);
 
305
 
 
306
  g_signal_connect (info.size_entry, "value-changed",
 
307
                    G_CALLBACK (print_size_info_size_changed),
 
308
                    NULL);
 
309
  g_signal_connect (info.resolution_entry, "value-changed",
 
310
                    G_CALLBACK (print_size_info_resolution_changed),
 
311
                    NULL);
 
312
  g_signal_connect (info.size_entry, "unit-changed",
 
313
                    G_CALLBACK (print_size_info_unit_changed),
 
314
                    NULL);
 
315
  g_signal_connect (info.chain, "toggled",
 
316
                    G_CALLBACK (print_size_info_chain_toggled),
 
317
                    NULL);
 
318
 
 
319
  return frame;
 
320
}
 
321
 
 
322
static void
 
323
print_size_info_size_changed (GtkWidget *widget)
 
324
{
 
325
  gdouble width;
 
326
  gdouble height;
 
327
  gdouble xres;
 
328
  gdouble yres;
 
329
  gdouble scale;
 
330
 
 
331
  scale = gimp_unit_get_factor (gimp_size_entry_get_unit (info.size_entry));
 
332
 
 
333
  width  = gimp_size_entry_get_value (info.size_entry, 0);
 
334
  height = gimp_size_entry_get_value (info.size_entry, 1);
 
335
 
 
336
  xres = scale * info.image_width  / MAX (0.0001, width);
 
337
  yres = scale * info.image_height / MAX (0.0001, height);
 
338
 
 
339
  print_size_info_set_resolution (&info, xres, yres);
 
340
}
 
341
 
 
342
static void
 
343
print_size_info_resolution_changed (GtkWidget *widget)
 
344
{
 
345
  GimpSizeEntry *entry = info.resolution_entry;
 
346
  gdouble        xres  = gimp_size_entry_get_refval (entry, 0);
 
347
  gdouble        yres  = gimp_size_entry_get_refval (entry, 1);
 
348
 
 
349
  print_size_info_set_resolution (&info, xres, yres);
 
350
}
 
351
 
 
352
static void
 
353
print_size_info_unit_changed (GtkWidget *widget)
 
354
{
 
355
  PrintData     *data   = info.data;
 
356
  GimpSizeEntry *entry  = info.size_entry;
 
357
  gdouble        factor = gimp_unit_get_factor (data->unit);
 
358
  gdouble        w, h;
 
359
 
 
360
  data->unit = gimp_size_entry_get_unit (entry);
 
361
 
 
362
  factor = gimp_unit_get_factor (data->unit) / factor;
 
363
 
 
364
  w = gimp_size_entry_get_value (entry, 0) * factor;
 
365
  h = gimp_size_entry_get_value (entry, 1) * factor;
 
366
 
 
367
  print_size_info_set_page_setup (&info);
 
368
  print_size_info_set_size (&info, w, h);
 
369
}
 
370
 
 
371
static void
 
372
print_size_info_chain_toggled (GtkWidget *widget)
 
373
{
 
374
  print_size_info_set_page_setup (&info);
 
375
}
 
376
 
 
377
static void
 
378
print_size_info_set_size (PrintSizeInfo *info,
 
379
                          gdouble        width,
 
380
                          gdouble        height)
 
381
{
 
382
  g_signal_handlers_block_by_func (info->size_entry,
 
383
                                   print_size_info_size_changed,
 
384
                                   NULL);
 
385
 
 
386
  gimp_size_entry_set_value (info->size_entry, 0, width);
 
387
  gimp_size_entry_set_value (info->size_entry, 1, height);
 
388
 
 
389
  g_signal_handlers_unblock_by_func (info->size_entry,
 
390
                                     print_size_info_size_changed,
 
391
                                     NULL);
 
392
}
 
393
 
 
394
static void
 
395
print_size_info_set_resolution (PrintSizeInfo *info,
 
396
                                gdouble        xres,
 
397
                                gdouble        yres)
 
398
{
 
399
  PrintData *data = info->data;
 
400
 
 
401
  xres = CLAMP (xres, GIMP_MIN_RESOLUTION, GIMP_MAX_RESOLUTION);
 
402
  yres = CLAMP (yres, GIMP_MIN_RESOLUTION, GIMP_MAX_RESOLUTION);
 
403
 
 
404
  if (info->chain && gimp_chain_button_get_active (info->chain))
 
405
    {
 
406
      if (xres != data->xres)
 
407
        yres = xres;
 
408
      else
 
409
        xres = yres;
 
410
    }
 
411
 
 
412
  data->xres = xres;
 
413
  data->yres = yres;
 
414
 
 
415
  g_signal_handlers_block_by_func (info->resolution_entry,
 
416
                                   print_size_info_resolution_changed,
 
417
                                   NULL);
 
418
 
 
419
  gimp_size_entry_set_refval (info->resolution_entry, 0, xres);
 
420
  gimp_size_entry_set_refval (info->resolution_entry, 1, yres);
 
421
 
 
422
  g_signal_handlers_unblock_by_func (info->resolution_entry,
 
423
                                     print_size_info_resolution_changed,
 
424
                                     NULL);
 
425
 
 
426
  g_signal_handlers_block_by_func (info->size_entry,
 
427
                                   print_size_info_size_changed,
 
428
                                   NULL);
 
429
 
 
430
  gimp_size_entry_set_value (info->size_entry, 0,
 
431
                             info->image_width *
 
432
                             gimp_unit_get_factor (data->unit) / xres);
 
433
  gimp_size_entry_set_value (info->size_entry, 1,
 
434
                             info->image_height *
 
435
                             gimp_unit_get_factor (data->unit) / yres);
 
436
 
 
437
  g_signal_handlers_unblock_by_func (info->size_entry,
 
438
                                     print_size_info_size_changed,
 
439
                                     NULL);
 
440
}
 
441
 
 
442
static void
 
443
print_size_info_set_page_setup (PrintSizeInfo *info)
 
444
{
 
445
  GtkPageSetup *setup;
 
446
  PrintData    *data = info->data;
 
447
  gchar        *format;
 
448
  gchar        *text;
 
449
  gdouble       page_width;
 
450
  gdouble       page_height;
 
451
  gdouble       x;
 
452
  gdouble       y;
 
453
 
 
454
  setup = gtk_print_operation_get_default_page_setup (data->operation);
 
455
  if (! setup)
 
456
    {
 
457
      setup = gtk_page_setup_new ();
 
458
      gtk_print_operation_set_default_page_setup (data->operation, setup);
 
459
    }
 
460
 
 
461
  page_width  = (gtk_page_setup_get_page_width (setup, GTK_UNIT_INCH) *
 
462
                 gimp_unit_get_factor (data->unit));
 
463
  page_height = (gtk_page_setup_get_page_height (setup, GTK_UNIT_INCH) *
 
464
                 gimp_unit_get_factor (data->unit));
 
465
 
 
466
  format = g_strdup_printf ("%%.%df x %%.%df %s",
 
467
                            gimp_unit_get_digits (data->unit),
 
468
                            gimp_unit_get_digits (data->unit),
 
469
                            gimp_unit_get_plural (data->unit));
 
470
  text = g_strdup_printf (format, page_width, page_height);
 
471
  g_free (format);
 
472
 
 
473
  gtk_label_set_text (GTK_LABEL (info->area_label), text);
 
474
  g_free (text);
 
475
 
 
476
  x = page_width;
 
477
  y = page_height;
 
478
 
 
479
  if (info->chain && gimp_chain_button_get_active (info->chain))
 
480
    {
 
481
      gdouble ratio;
 
482
 
 
483
      ratio = (gdouble) info->image_width / (gdouble) info->image_height;
 
484
 
 
485
      if (ratio < 1.0)
 
486
        x = y * ratio;
 
487
      else
 
488
        y = x / ratio;
 
489
    }
 
490
 
 
491
  gimp_size_entry_set_value_boundaries (info->size_entry, 0, 0.0, x);
 
492
  gimp_size_entry_set_value_boundaries (info->size_entry, 1, 0.0, y);
 
493
 
 
494
  x = info->image_width / page_width;
 
495
  y = info->image_height / page_height;
 
496
 
 
497
  if (info->chain && gimp_chain_button_get_active (info->chain))
 
498
    {
 
499
      gdouble max = MAX (x, y);
 
500
 
 
501
      x = y = max;
 
502
    }
 
503
 
 
504
  gimp_size_entry_set_refval_boundaries (info->resolution_entry, 0,
 
505
                                         x, GIMP_MAX_RESOLUTION);
 
506
  gimp_size_entry_set_refval_boundaries (info->resolution_entry, 1,
 
507
                                         y, GIMP_MAX_RESOLUTION);
 
508
 
 
509
 /* FIXME: is this still needed at all? */
 
510
  data->orientation = gtk_page_setup_get_orientation (setup);
 
511
}