1 diff -urN galeon-2.0.7.orig/configure.in galeon-2.0.7/configure.in
2 --- galeon-2.0.7.orig/configure.in 2008-09-27 04:15:11.000000000 +0200
3 +++ galeon-2.0.7/configure.in 2009-02-15 09:39:07.000000000 +0100
7 GNOME_VFS_REQUIRED=2.0.0
11 SCROLLKEEPER_REQUIRED=0.1.4
15 PKG_CHECK_MODULES(GALEON_DEPENDENCY, \
16 gtk+-2.0 >= $GTK_REQUIRED \
17 + gtk+-unix-print-2.0 >= $GTK_REQUIRED \
18 libxml-2.0 >= $LIBXML_REQUIRED \
19 libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED \
20 libbonoboui-2.0 >= $LIBBONOBOUI_REQUIRED \
23 AC_MSG_RESULT([$result])
25 -dnl Printer enumeration was changed in gecko 1.9
26 -dnl https://bugzilla.mozilla.org/show_bug.cgi?id=341313
27 -AC_MSG_CHECKING([for nsIPrintOptions::AvailablePrinters])
28 +AC_MSG_CHECKING([for nsIPrintSettings::SetOutputFormat])
31 - [[#define MOZILLA_INTERNAL_API
32 - #include <nsIPrintOptions.h>]],
33 - [[nsIPrintOptions *p;
34 - nsISimpleEnumerator *s;
35 - p->AvailablePrinters(&s);]]
36 + [[#include <nsIPrintSettings.h>]],
37 + [[nsIPrintSettings *ps;
39 + ps->SetOutputFormat(out);]]
41 + [AC_DEFINE([HAVE_NSIPRINTSETTINGS_SETOUTPUTFORMAT], [1],
42 + [Define if nsIPrintSettings::SetOutputFormat exists]) result=yes],
44 +AC_MSG_RESULT([$result])
46 +AC_MSG_CHECKING([for nsIPrintSettings::SetPaperSize])
49 + [[#include <nsIPrintSettings.h>]],
50 + [[nsIPrintSettings *ps;
52 + ps->SetPaperSize(size);]]
54 - [AC_DEFINE([HAVE_NSIPRINTOPTIONS_AVAILABLEPRINTERS], [1],
55 - [Define if nsIPrintOptions::AvailablePrinters exists]) result=yes],
56 + [AC_DEFINE([HAVE_NSIPRINTSETTINGS_SETPAPERSIZE], [1],
57 + [Define if nsIPrintSettings::SetPaperSize exists]) result=yes],
59 AC_MSG_RESULT([$result])
61 +AC_MSG_CHECKING([for nsIPrintSettings::SetPaperName])
64 + [[#include <nsIPrintSettings.h>]],
65 + [[nsIPrintSettings *ps;
67 + ps->SetPaperName(s);]]
69 + [AC_DEFINE([HAVE_NSIPRINTSETTINGS_SETPAPERNAME], [1],
70 + [Define if nsIPrintSettings::SetPaperName exists]) result=yes],
72 +AC_MSG_RESULT([$result])
73 dnl GetMessage -> GetMessageMoz
74 AC_MSG_CHECKING([for nsIConsoleMessage::GetMessageMoz])
76 diff -urN galeon-2.0.7.orig/embed/galeon-embed.c galeon-2.0.7/embed/galeon-embed.c
77 --- galeon-2.0.7.orig/embed/galeon-embed.c 2008-07-04 18:30:58.000000000 +0200
78 +++ galeon-2.0.7/embed/galeon-embed.c 2009-02-15 09:39:07.000000000 +0100
83 -galeon_embed_print (GaleonEmbed *embed,
84 - EmbedPrintInfo *info)
85 +galeon_embed_print (GaleonEmbed *embed)
87 GaleonEmbedClass *klass = GALEON_EMBED_GET_CLASS (embed);
88 - return klass->print (embed, info);
89 + return klass->print (embed);
93 diff -urN galeon-2.0.7.orig/embed/galeon-embed.h galeon-2.0.7/embed/galeon-embed.h
94 --- galeon-2.0.7.orig/embed/galeon-embed.h 2008-07-04 18:30:58.000000000 +0200
95 +++ galeon-2.0.7/embed/galeon-embed.h 2009-02-15 09:39:07.000000000 +0100
97 EmbedSecurityLevel *level,
100 - gboolean (* print) (GaleonEmbed *embed,
101 - EmbedPrintInfo *info);
102 + gboolean (* print) (GaleonEmbed *embed);
103 void (* print_preview_close) (GaleonEmbed *embed);
104 int (* print_preview_num_pages) (GaleonEmbed *embed);
107 gboolean galeon_embed_has_modified_forms (GaleonEmbed *embed);
110 -gboolean galeon_embed_print (GaleonEmbed *embed,
111 - EmbedPrintInfo *info);
112 +gboolean galeon_embed_print (GaleonEmbed *embed);
114 void galeon_embed_print_preview_close (GaleonEmbed *embed);
116 diff -urN galeon-2.0.7.orig/embed/galeon-embed-shell.c galeon-2.0.7/embed/galeon-embed-shell.c
117 --- galeon-2.0.7.orig/embed/galeon-embed-shell.c 2008-09-03 05:27:06.000000000 +0200
118 +++ galeon-2.0.7/embed/galeon-embed-shell.c 2009-02-15 09:39:07.000000000 +0100
120 #include "galeon-embed-shell.h"
121 #include "galeon-marshal.h"
123 +#include "galeon-config.h"
127 +#define PAGE_SETUP_FILENAME GALEON_DIR "/page-setup-gtk.ini"
128 +#define PRINT_SETTINGS_FILENAME GALEON_DIR "/print-settings.ini"
134 GlobalHistory *global_history;
135 DownloaderView *downloader_view;
136 GaleonJSConsole *js_console;
137 + GtkPageSetup *page_setup;
138 + GtkPrintSettings *print_settings;
143 klass->remove_passwords (shell, passwords, type);
147 -galeon_embed_shell_get_printer_info(GaleonEmbedShell *shell,
148 - gint *defaultPrinter)
150 - GaleonEmbedShellClass *klass = GALEON_EMBED_SHELL_GET_CLASS (shell);
151 - return klass->get_printer_info (shell, defaultPrinter);
154 static GlobalHistory *
155 impl_get_global_history (GaleonEmbedShell *shell)
157 @@ -344,6 +343,121 @@
158 g_list_free (permissions);
162 +galeon_embed_shell_get_page_setup (GaleonEmbedShell *shell)
164 + GaleonEmbedShellPrivate *priv;
166 + g_return_val_if_fail (GALEON_IS_EMBED_SHELL (shell), NULL);
167 + priv = shell->priv;
169 + if (priv->page_setup == NULL)
171 + GError *error = NULL;
174 + path = g_build_filename (g_get_home_dir (), PAGE_SETUP_FILENAME, NULL);
175 + priv->page_setup = gtk_page_setup_new_from_file (path, &error);
179 + g_error_free (error);
182 + /* If that still didn't work, create a new, empty one */
183 + if (priv->page_setup == NULL)
185 + priv->page_setup = gtk_page_setup_new ();
189 + return priv->page_setup;
193 +galeon_embed_shell_set_page_setup (GaleonEmbedShell *shell,
194 + GtkPageSetup *page_setup)
196 + GaleonEmbedShellPrivate *priv;
199 + g_return_if_fail (GALEON_IS_EMBED_SHELL (shell));
200 + priv = shell->priv;
202 + if (page_setup != NULL)
204 + g_object_ref (page_setup);
208 + page_setup = gtk_page_setup_new ();
211 + if (priv->page_setup != NULL)
213 + g_object_unref (priv->page_setup);
216 + priv->page_setup = page_setup;
218 + path = g_build_filename (g_get_home_dir (), PAGE_SETUP_FILENAME, NULL);
219 + gtk_page_setup_to_file (page_setup, path, NULL);
224 +galeon_embed_shell_get_print_settings (GaleonEmbedShell *shell)
226 + GaleonEmbedShellPrivate *priv;
228 + g_return_val_if_fail (GALEON_IS_EMBED_SHELL (shell), NULL);
229 + priv = shell->priv;
231 + if (priv->print_settings == NULL)
233 + GError *error = NULL;
236 + path = g_build_filename (g_get_home_dir (), PRINT_SETTINGS_FILENAME, NULL);
237 + priv->print_settings = gtk_print_settings_new_from_file (path, &error);
240 + if (priv->print_settings == NULL)
242 + priv->print_settings = gtk_print_settings_new ();
246 + return priv->print_settings;
250 +galeon_embed_shell_set_print_settings (GaleonEmbedShell *shell,
251 + GtkPrintSettings *settings)
253 + GaleonEmbedShellPrivate *priv;
256 + g_return_if_fail (GALEON_IS_EMBED_SHELL (shell));
257 + priv = shell->priv;
259 + if (settings != NULL)
261 + g_object_ref (settings);
264 + if (priv->print_settings != NULL)
266 + g_object_unref (priv->print_settings);
269 + priv->print_settings = settings ? settings : gtk_print_settings_new ();
271 + path = g_build_filename (g_get_home_dir (), PRINT_SETTINGS_FILENAME, NULL);
272 + gtk_print_settings_to_file (settings, path, NULL);
277 galeon_embed_shell_free_cookies (GaleonEmbedShell *shell,
279 diff -urN galeon-2.0.7.orig/embed/galeon-embed-shell.h galeon-2.0.7/embed/galeon-embed-shell.h
280 --- galeon-2.0.7.orig/embed/galeon-embed-shell.h 2008-09-03 05:24:28.000000000 +0200
281 +++ galeon-2.0.7/embed/galeon-embed-shell.h 2009-02-15 09:39:07.000000000 +0100
283 #include "galeon-encodings.h"
285 #include <glib-object.h>
287 +#include <gtk/gtk.h>
292 void (* remove_passwords) (GaleonEmbedShell *shell,
295 - GList * (* get_printer_info) (GaleonEmbedShell *shell,
296 - gint *defaultPrinter);
297 + GtkPageSetup * (* get_page_setup) (GaleonEmbedShell *shell);
300 GType galeon_embed_shell_get_type (void);
301 @@ -245,10 +244,13 @@
306 -GList * galeon_embed_shell_get_printer_info (GaleonEmbedShell *shell,
307 - gint *defaultPrinter);
310 +GtkPageSetup* galeon_embed_shell_get_page_setup (GaleonEmbedShell *shell);
311 +void galeon_embed_shell_set_page_setup (GaleonEmbedShell *shell,
312 + GtkPageSetup *page_setup);
313 +GtkPrintSettings* galeon_embed_shell_get_print_settings (GaleonEmbedShell *shell);
314 +void galeon_embed_shell_set_print_settings (GaleonEmbedShell *shell,
315 + GtkPrintSettings *settings);
317 /* accumulator for the new_window signals */
318 gboolean _galeon_embed_new_window_signal_accumulator (GSignalInvocationHint *ihint,
319 diff -urN galeon-2.0.7.orig/embed/Makefile.am galeon-2.0.7/embed/Makefile.am
320 --- galeon-2.0.7.orig/embed/Makefile.am 2008-07-04 18:30:58.000000000 +0200
321 +++ galeon-2.0.7/embed/Makefile.am 2009-02-15 09:39:07.000000000 +0100
323 galeon-embed-find.h \
328 galeon-embed-prefs.h \
329 galeon-embed-helper-list.c \
330 galeon-embed-helper-list.h \
331 diff -urN galeon-2.0.7.orig/galeon.schemas.in galeon-2.0.7/galeon.schemas.in
332 --- galeon-2.0.7.orig/galeon.schemas.in 2008-07-04 18:30:59.000000000 +0200
333 +++ galeon-2.0.7/galeon.schemas.in 2009-02-15 09:39:07.000000000 +0100
334 @@ -856,135 +856,75 @@
335 <long>Group history by hosts.</long>
339 - <key>/schemas/apps/galeon/Print/top_margin</key>
340 - <applyto>/apps/galeon/Print/top_margin</applyto>
341 - <owner>galeon</owner>
343 - <default>0.5</default>
345 - <short>Printing top margin</short>
346 - <long>Printing top margin (in inches).</long>
350 - <key>/schemas/apps/galeon/Print/bottom_margin</key>
351 - <applyto>/apps/galeon/Print/bottom_margin</applyto>
352 - <owner>galeon</owner>
354 - <default>0.5</default>
356 - <short>Printing bottom margin</short>
357 - <long>Printing bottom margin (in inches).</long>
361 - <key>/schemas/apps/galeon/Print/left_margin</key>
362 - <applyto>/apps/galeon/Print/left_margin</applyto>
363 - <owner>galeon</owner>
365 - <default>0.5</default>
367 - <short>Printing left margin</short>
368 - <long>Printing left margin (in inches).</long>
372 - <key>/schemas/apps/galeon/Print/right_margin</key>
373 - <applyto>/apps/galeon/Print/right_margin</applyto>
374 - <owner>galeon</owner>
376 - <default>0.5</default>
378 + <key>/schemas/apps/galeon/Print/print_page_title</key>
379 + <applyto>/apps/galeon/Print/print_page_title</applyto>
380 + <owner>epiphany</owner>
382 + <default>true</default>
384 - <short>Printing right margin</short>
385 - <long>Printing right margin (in inches).</long>
386 + <short>Whether to print the page title in the header</short>
390 - <key>/schemas/apps/galeon/Print/page_title_toggle</key>
391 - <applyto>/apps/galeon/Print/page_title_toggle</applyto>
392 - <owner>galeon</owner>
393 + <key>/schemas/apps/galeon/Print/print_page_url</key>
394 + <applyto>/apps/galeon/Print/print_page_url</applyto>
395 + <owner>epiphany</owner>
397 <default>true</default>
399 - <short>Whether to print the page title in the header.</short>
400 - <long>Whether to print the page title in the header.</long>
401 + <short>Whether to print the page address in the header</short>
405 - <key>/schemas/apps/galeon/Print/page_url_toggle</key>
406 - <applyto>/apps/galeon/Print/page_url_toggle</applyto>
407 - <owner>galeon</owner>
408 + <key>/schemas/apps/galeon/Print/print_date</key>
409 + <applyto>/apps/galeon/Print/print_date</applyto>
410 + <owner>epiphany</owner>
412 <default>true</default>
414 - <short>Whether to print the page URL in the header</short>
415 - <long>Whether to print the page URL in the header</long>
416 + <short>Whether to print the date in the footer</short>
420 - <key>/schemas/apps/galeon/Print/date_toggle</key>
421 - <applyto>/apps/galeon/Print/date_toggle</applyto>
422 - <owner>galeon</owner>
423 + <key>/schemas/apps/galeon/Print/print_background_colors</key>
424 + <applyto>/apps/galeon/Print/print_background_colors</applyto>
425 + <owner>epiphany</owner>
427 - <default>true</default>
428 + <default>false</default>
430 - <short>Whether to print the date in the footer.</short>
431 - <long>Whether to print the date in the footer.</long>
432 + <short>Whether to print the background color</short>
436 - <key>/schemas/apps/galeon/Print/page_numbers_toggle</key>
437 - <applyto>/apps/galeon/Print/page_numbers_toggle</applyto>
438 - <owner>galeon</owner>
440 + <key>/schemas/apps/galeon/Print/print_background_images</key>
441 + <applyto>/apps/galeon/Print/print_background_images</applyto>
442 + <owner>epiphany</owner>
444 <default>true</default>
446 - <short>Whether to print the page numbers (x of total) in the footer.</short>
447 - <long>Whether to print the page numbers (x of total) in the footer.</long>
448 + <short>Whether to print the background images</short>
452 - <key>/schemas/apps/galeon/Print/printer</key>
453 - <applyto>/apps/galeon/Print/printer</applyto>
454 - <owner>galeon</owner>
455 - <type>string</type>
456 - <default>lpr</default>
457 + <key>/schemas/apps/galeon/Print/print_page_numbers</key>
458 + <applyto>/apps/galeon/Print/print_page_numbers</applyto>
459 + <owner>epiphany</owner>
461 + <default>true</default>
463 - <short>Printer name</short>
464 - <long>Printer name.</long>
465 + <short>Whether to print the page numbers (x of total) in the footer</short>
469 - <key>/schemas/apps/galeon/Print/file</key>
470 - <applyto>/apps/galeon/Print/file</applyto>
471 - <owner>galeon</owner>
472 + <key>/schemas/apps/galeon/Print/print_frames</key>
473 + <applyto>/apps/galeon/Print/print_frames</applyto>
474 + <owner>epiphany</owner>
476 + <default>normal</default>
478 - <short>Filename to print to</short>
479 - <long>Filename to print to.</long>
483 - <key>/schemas/apps/galeon/Print/printon</key>
484 - <applyto>/apps/galeon/Print/printon</applyto>
485 - <owner>galeon</owner>
487 - <default>0</default>
489 - <short>Print range</short>
490 - <long>Print range: 0 (all pages), 1 (specific range).</long>
494 - <key>/schemas/apps/galeon/Print/paper</key>
495 - <applyto>/apps/galeon/Print/paper</applyto>
496 - <owner>galeon</owner>
498 - <default>0</default>
500 - <short>Paper type</short>
501 - <long>Paper type: 0 (Letter), 1 (Legal), 2 (Executive), 3 (A4).</long>
502 + <short>How to print frames</short>
503 + <long>How to print pages containing frames. Allowed values are "normal", "separately" and "selected".</long>
507 diff -urN galeon-2.0.7.orig/mozilla/GaleonUtils.cpp galeon-2.0.7/mozilla/GaleonUtils.cpp
508 --- galeon-2.0.7.orig/mozilla/GaleonUtils.cpp 2008-07-04 18:30:58.000000000 +0200
509 +++ galeon-2.0.7/mozilla/GaleonUtils.cpp 2009-02-15 09:39:07.000000000 +0100
516 -GaleonUtils::EmbedPrintInfoToPrintSettings(const EmbedPrintInfo *info,
517 - nsIPrintSettings **aPrintSettings)
519 - nsresult rv = NS_OK;
521 - nsCOMPtr<nsIPrintSettingsService> pss =
522 - do_GetService("@mozilla.org/gfx/printsettings-service;1", &rv);
523 - NS_ENSURE_SUCCESS(rv, rv);
525 - nsCOMPtr<nsIPrintSettings> options;
526 - rv = pss->GetNewPrintSettings(getter_AddRefs(options));
527 - NS_ENSURE_SUCCESS(rv, rv);
529 - GulString printerName (info->name);
530 - rv = pss->InitPrintSettingsFromPrinter (printerName.get(), options);
531 - NS_ENSURE_SUCCESS(rv, rv);
533 - // Name field isn't inited. How dumb can we get?
534 - rv = options->SetPrinterName (printerName.get());
535 - NS_ENSURE_SUCCESS(rv, rv);
537 - const static int frame_types[] = {
538 - nsIPrintSettings::kFramesAsIs,
539 - nsIPrintSettings::kSelectedFrame,
540 - nsIPrintSettings::kEachFrameSep
543 - switch (info->pages)
548 - options->SetPrintRange (nsIPrintSettings::kRangeSpecifiedPageRange);
549 - options->SetStartPageRange (info->from_page);
550 - options->SetEndPageRange (info->to_page);
553 - options->SetPrintRange (nsIPrintSettings::kRangeSelection);
557 - options->SetMarginTop (info->top_margin);
558 - options->SetMarginBottom (info->bottom_margin);
559 - options->SetMarginLeft (info->left_margin);
560 - options->SetMarginRight (info->right_margin);
562 - options->SetHeaderStrLeft(GulString(info->header_left_string).get());
564 - options->SetHeaderStrCenter(GulString(info->header_center_string).get());
566 - options->SetHeaderStrRight(GulString(info->header_right_string).get());
568 - options->SetFooterStrLeft(GulString(info->footer_left_string).get());
570 - options->SetFooterStrCenter(GulString(info->footer_center_string).get());
572 - options->SetFooterStrRight(GulString(info->footer_right_string).get());
574 - options->SetToFileName (GulString(info->file).get());
576 - options->SetPrintCommand (GulString(info->command).get());
579 - * Work around a mozilla bug where paper size & orientation are ignored
580 - * and the specified file is created (containing invalid postscript)
581 - * in print preview mode if we set "print to file" to true.
582 - * See epiphany bug #119818.
586 - options->SetPrintToFile (PR_FALSE);
590 - options->SetPrintToFile (info->print_to_file);
593 - /* native paper size formats. Our dialog does not support custom yet */
594 - options->SetPaperSizeType (nsIPrintSettings::kPaperSizeNativeData);
596 - gchar *paperName = (gchar *)g_ptr_array_index(info->paper_array, info->paper);
597 - options->SetPaperName (GulString (paperName).get());
599 - options->SetPrintInColor (info->print_color);
600 - options->SetOrientation (info->orientation);
601 - options->SetPrintFrameType (frame_types[info->frame_type]);
603 - NS_ADDREF(*aPrintSettings = options);
607 diff -urN galeon-2.0.7.orig/mozilla/GaleonWrapper.cpp galeon-2.0.7/mozilla/GaleonWrapper.cpp
608 --- galeon-2.0.7.orig/mozilla/GaleonWrapper.cpp 2008-09-05 04:31:01.000000000 +0200
609 +++ galeon-2.0.7/mozilla/GaleonWrapper.cpp 2009-02-15 09:39:07.000000000 +0100
617 #include <nsServiceManagerUtils.h>
618 +#include <nsIJSContextStack.h>
620 #include "galeon-embed.h"
621 #include "galeon-debug.h"
623 #include <nsICacheService.h>
624 #include <nsICacheSession.h>
625 #include <nsIDOMLocation.h>
626 +#include <nsIPrintSettings.h>
627 +#include <nsIPrintSettingsService.h>
629 #include <nsITransportSecurityInfo.h>
630 #include <nsIConsoleService.h>
631 @@ -224,26 +229,31 @@
632 return ourDocShell->GetContentViewer(aViewer);
635 -nsresult GaleonWrapper::Print (nsIPrintSettings *options, PRBool preview, GtkWindow *parent)
636 +nsresult GaleonWrapper::Print ()
640 - g_return_val_if_fail (mWebBrowser, NS_ERROR_FAILURE);
641 + NS_ENSURE_TRUE (mWebBrowser, NS_ERROR_FAILURE);
643 nsCOMPtr<nsIWebBrowserPrint> print(do_GetInterface(mWebBrowser));
644 NS_ENSURE_TRUE (print, NS_ERROR_FAILURE);
648 - GPrintListener *listener = new GPrintListener(print, options, parent);
649 - rv = print->Print (options, listener);
653 - rv = print->PrintPreview(options, nsnull, nsnull);
655 + nsCOMPtr<nsIPrintSettingsService> printSettingsService
656 + (do_GetService("@mozilla.org/gfx/printsettings-service;1"));
657 + NS_ENSURE_STATE (printSettingsService);
660 + nsCOMPtr<nsIPrintSettings> settings;
661 + printSettingsService->GetNewPrintSettings (getter_AddRefs (settings));
662 + NS_ENSURE_STATE (settings);
664 + settings->SetTitle (nsnull);
665 + settings->SetDocURL (nsnull);
668 + nsCOMPtr<nsIJSContextStack> mStack = do_GetService ("@mozilla.org/js/xpc/ContextStack;1", &rv);
669 + NS_ENSURE_SUCCESS (rv, rv);
671 + mStack->Push (nsnull);
673 + return print->Print (settings, nsnull);
676 nsresult GaleonWrapper::PrintPreviewClose (void)
677 diff -urN galeon-2.0.7.orig/mozilla/GaleonWrapper.h galeon-2.0.7/mozilla/GaleonWrapper.h
678 --- galeon-2.0.7.orig/mozilla/GaleonWrapper.h 2008-09-05 04:25:39.000000000 +0200
679 +++ galeon-2.0.7/mozilla/GaleonWrapper.h 2009-02-15 09:39:07.000000000 +0100
681 nsresult SetZoom (float aTextZoom);
682 nsresult GetZoom (float *aTextZoom);
684 - nsresult Print (nsIPrintSettings *options, PRBool preview, GtkWindow *parent);
686 nsresult GetPrintSettings (nsIPrintSettings * *options);
687 nsresult PrintPreviewClose (void);
688 nsresult PrintPreviewNumPages (int *numPages);
689 diff -urN galeon-2.0.7.orig/mozilla/GeckoPrintService.cpp galeon-2.0.7/mozilla/GeckoPrintService.cpp
690 --- galeon-2.0.7.orig/mozilla/GeckoPrintService.cpp 1970-01-01 01:00:00.000000000 +0100
691 +++ galeon-2.0.7/mozilla/GeckoPrintService.cpp 2009-02-15 09:39:07.000000000 +0100
694 + * Copyright © 2006, 2007 Christian Persch
696 + * This program is free software; you can redistribute it and/or modify
697 + * it under the terms of the GNU Lesser General Public License as published by
698 + * the Free Software Foundation; either version 2.1, or (at your option)
699 + * any later version.
701 + * This program is distributed in the hope that it will be useful,
702 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
703 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
704 + * GNU Lesser General Public License for more details.
706 + * You should have received a copy of the GNU Lesser General Public License
707 + * along with this program; if not, write to the Free Software
708 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
713 +#include "mozilla-config.h"
716 +#include "src/galeon-shell.h"
717 +#include "utils/eel-gconf-extensions.h"
718 +#include "utils/gul-gui.h"
721 +#include <glib/gi18n.h>
722 +#include <gtk/gtkcheckbutton.h>
723 +#include <gtk/gtkdialog.h>
724 +#include <gtk/gtklabel.h>
725 +#include <gtk/gtkmessagedialog.h>
726 +#include <gtk/gtkprintunixdialog.h>
727 +#include <gtk/gtkstock.h>
728 +#include <gtk/gtkwindow.h>
729 +#include <glade/glade-xml.h>
731 +#include <nsStringAPI.h>
733 +#include <nsCOMPtr.h>
734 +#include <nsIDOMWindow.h>
735 +#include <nsIDOMWindowInternal.h>
737 +#include "GeckoPrintSession.h"
738 +#include "GeckoPrintService.h"
739 +#include "GaleonUtils.h"
741 +/* Some printing keys */
743 +#define CONF_PRINT_BG_COLORS "/apps/galeon/Print/print_background_colors"
744 +#define CONF_PRINT_BG_IMAGES "/apps/galeon/Print/print_background_images"
745 +#define CONF_PRINT_COLOR "/apps/galeon/Print/print_color"
746 +#define CONF_PRINT_DATE "/apps/galeon/Print/print_date"
747 +#define CONF_PRINT_PAGE_NUMBERS "/apps/galeon/Print/print_page_numbers"
748 +#define CONF_PRINT_PAGE_TITLE "/apps/galeon/Print/print_page_title"
749 +#define CONF_PRINT_PAGE_URL "/apps/galeon/Print/print_page_url"
751 +#define LITERAL(s) reinterpret_cast<const nsAString::char_type*>(NS_L(s))
753 +/* From nsIDeviceContext.h */
754 +#define NS_ERROR_GFX_PRINTER_BASE (1) /* adjustable :-) */
755 +#define NS_ERROR_GFX_PRINTER_ACCESS_DENIED \
756 + NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+5)
757 +#define NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND \
758 + NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+4)
760 +NS_IMPL_ISUPPORTS1 (GeckoPrintService,
761 + nsIPrintingPromptService)
763 +GeckoPrintService::GeckoPrintService()
767 +GeckoPrintService::~GeckoPrintService()
771 +/* nsIPrintingPromptService implementation */
773 +/* void showPrintDialog (in nsIDOMWindow parent,
774 + in nsIWebBrowserPrint webBrowserPrint,
775 + in nsIPrintSettings printSettings); */
777 +GeckoPrintService::ShowPrintDialog (nsIDOMWindow *aParent,
778 + nsIWebBrowserPrint *aWebBrowserPrint,
779 + nsIPrintSettings *aSettings)
781 + GaleonEmbedShell *shell;
783 + GeckoPrintSession *session = GeckoPrintSession::FromSettings (aSettings);
784 + NS_ENSURE_TRUE (session, NS_ERROR_INVALID_POINTER);
786 + shell = galeon_shell_get_embed_shell (galeon_shell);
789 + PRBool haveSelection = PR_FALSE;
790 + rv = aSettings->GetPrintOptions(nsIPrintSettings::kEnableSelectionRB, &haveSelection);
791 + NS_ENSURE_SUCCESS (rv, rv);
793 + PRInt16 frameUI = nsIPrintSettings::kFrameEnableAll;
794 + rv = aSettings->GetHowToEnableFrameUI (&frameUI);
795 + NS_ENSURE_SUCCESS (rv, rv);
797 + GtkWindow *parent = GTK_WINDOW (GaleonUtils::FindGtkParent (aParent));
798 + NS_ENSURE_TRUE(parent, NS_ERROR_INVALID_POINTER);
800 + GtkWidget *custom_tab = NULL,
802 + *print_frames_normal = NULL,
803 + *print_frames_selected = NULL,
804 + *print_frames_separately = NULL;
805 + GError *gerror = NULL;
808 + GtkBuilder *builder = gtk_builder_new ();
809 + builder_ret = gtk_builder_add_from_file (builder, SHARE_DIR "/print-tab.xml", &gerror);
811 + /* Build the custom tab */
812 + custom_tab = GTK_WIDGET (gtk_builder_get_object (builder, "custom_tab_container"));
814 + gul_gui_connect_checkbutton_to_gconf (GTK_WIDGET (gtk_builder_get_object (builder, "print_bg_colors_checkbutton")),
815 + CONF_PRINT_BG_COLORS);
816 + gul_gui_connect_checkbutton_to_gconf (GTK_WIDGET (gtk_builder_get_object (builder, "print_bg_images_checkbutton")),
817 + CONF_PRINT_BG_IMAGES);
818 + gul_gui_connect_checkbutton_to_gconf (GTK_WIDGET (gtk_builder_get_object (builder, "print_date_checkbutton")),
820 + gul_gui_connect_checkbutton_to_gconf (GTK_WIDGET (gtk_builder_get_object (builder, "print_page_numbers_checkbutton")),
821 + CONF_PRINT_PAGE_NUMBERS);
822 + gul_gui_connect_checkbutton_to_gconf (GTK_WIDGET (gtk_builder_get_object (builder, "print_page_title_checkbutton")),
823 + CONF_PRINT_PAGE_TITLE);
824 + gul_gui_connect_checkbutton_to_gconf (GTK_WIDGET (gtk_builder_get_object (builder, "print_page_url_checkbutton")),
825 + CONF_PRINT_PAGE_URL);
827 + frame_box = GTK_WIDGET (gtk_builder_get_object (builder, "frame_box"));
828 + print_frames_normal = GTK_WIDGET (gtk_builder_get_object (builder, "print_frames_normal"));
829 + print_frames_selected = GTK_WIDGET (gtk_builder_get_object (builder, "print_frames_selected"));
830 + print_frames_separately = GTK_WIDGET (gtk_builder_get_object (builder, "print_frames_separately"));
832 + /* FIXME: store/load from pref */
833 + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (print_frames_normal), TRUE);
835 + if (frameUI == nsIPrintSettings::kFrameEnableAll) {
836 + /* Allow all frame options */
837 + gtk_widget_set_sensitive (frame_box, TRUE);
838 + } else if (frameUI == nsIPrintSettings::kFrameEnableAsIsAndEach) {
839 + /* Allow all except "selected frame" */
840 + gtk_widget_set_sensitive (frame_box, TRUE);
841 + gtk_widget_set_sensitive (print_frames_selected, FALSE);
842 + /* Preselect this one, since the default above only prints _one page_ ! */
843 + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (print_frames_separately), TRUE);
847 + /* FIXME: this sucks! find some way to do all of this async! */
848 + GtkWidget *dialog = gtk_print_unix_dialog_new (NULL /* FIXME title */,
849 + GTK_WINDOW (parent));
850 + GtkPrintUnixDialog *print_dialog = GTK_PRINT_UNIX_DIALOG (dialog);
852 + GtkPrintCapabilities capabilities =
853 + GtkPrintCapabilities (GTK_PRINT_CAPABILITY_PAGE_SET |
854 + GTK_PRINT_CAPABILITY_COPIES |
855 + GTK_PRINT_CAPABILITY_COLLATE |
856 + GTK_PRINT_CAPABILITY_REVERSE |
857 + GTK_PRINT_CAPABILITY_SCALE |
858 + GTK_PRINT_CAPABILITY_GENERATE_PS);
859 +#ifdef HAVE_GECKO_1_9
860 + capabilities = GtkPrintCapabilities (capabilities | GTK_PRINT_CAPABILITY_GENERATE_PDF);
862 + gtk_print_unix_dialog_set_manual_capabilities (print_dialog, capabilities);
864 + gtk_print_unix_dialog_set_page_setup (print_dialog,
865 + galeon_embed_shell_get_page_setup (shell));
866 + gtk_print_unix_dialog_set_settings (print_dialog,
867 + galeon_embed_shell_get_print_settings (shell));
869 + PRInt16 printFrames = nsIPrintSettings::kNoFrames;
871 + g_object_ref_sink (custom_tab);
872 + gtk_print_unix_dialog_add_custom_tab (print_dialog, custom_tab,
873 + gtk_label_new (_("Options"))); /* FIXME better name! */
875 + g_object_unref (custom_tab);
876 + g_object_unref (builder);
878 + if (frameUI != nsIPrintSettings::kFrameEnableNone) {
879 + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (print_frames_normal))) {
880 + printFrames = nsIPrintSettings::kFramesAsIs;
881 + } else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (print_frames_selected))) {
882 + printFrames = nsIPrintSettings::kSelectedFrame;
883 + } if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (print_frames_separately))) {
884 + printFrames = nsIPrintSettings::kEachFrameSep;
889 + int response = gtk_dialog_run (GTK_DIALOG (dialog));
890 + gtk_widget_hide (dialog);
892 + GtkPrinter *printer = gtk_print_unix_dialog_get_selected_printer (print_dialog);
894 + if (response != GTK_RESPONSE_OK || !printer) {
895 + gtk_widget_destroy (dialog);
897 + return NS_ERROR_ABORT;
900 + GtkPageSetup *pageSetup = gtk_print_unix_dialog_get_page_setup (print_dialog); /* no reference owned */
901 + galeon_embed_shell_set_page_setup (shell, pageSetup);
903 + GtkPrintSettings *settings = gtk_print_unix_dialog_get_settings (print_dialog);
904 + galeon_embed_shell_set_print_settings (shell, settings);
906 + /* We copy the setup and settings so we can modify them to unset
907 + * options handled by gecko.
909 + GtkPageSetup *pageSetupCopy = gtk_page_setup_copy (pageSetup);
910 + pageSetup = pageSetupCopy;
912 + GtkPrintSettings *settingsCopy = gtk_print_settings_copy (settings);
913 + g_object_unref (settings);
914 + settings = settingsCopy;
916 + rv = session->SetSettings (aSettings, settings, pageSetup, printer);
918 + /* Now translate the settings to nsIPrintSettings */
919 + if (NS_SUCCEEDED (rv)) {
920 + nsCString sourceFile;
921 + session->GetSourceFile (sourceFile);
922 + if (!sourceFile.IsEmpty ()) {
923 + rv = TranslateSettings (settings, pageSetup, printer, sourceFile, printFrames, PR_TRUE, aSettings);
925 + rv = NS_ERROR_FAILURE;
929 + gtk_widget_destroy (dialog);
931 + g_object_unref (settings);
932 + g_object_unref (pageSetup);
937 +/* void showProgress (in nsIDOMWindow parent,
938 + in nsIWebBrowserPrint webBrowserPrint,
939 + in nsIPrintSettings printSettings,
940 + in nsIObserver openDialogObserver,
941 + in boolean isForPrinting,
942 + out nsIWebProgressListener webProgressListener,
943 + out nsIPrintProgressParams printProgressParams,
944 + out boolean notifyOnOpen); */
946 +GeckoPrintService::ShowProgress (nsIDOMWindow *aParent,
947 + nsIWebBrowserPrint *aWebBrowserPrint,
948 + nsIPrintSettings *aPrintSettings,
949 + nsIObserver *aOpenDialogObserver,
950 + PRBool aIsForPrinting,
951 + nsIWebProgressListener **_webProgressListener,
952 + nsIPrintProgressParams **_printProgressParams,
953 + PRBool *_notifyOnOpen)
955 + /* Print preview */
956 + if (!aIsForPrinting) {
961 + nsCOMPtr<nsIDOMWindowInternal> domWin (do_QueryInterface (aParent, &rv));
962 + NS_ENSURE_SUCCESS (rv, rv);
964 + nsCOMPtr<nsIPrintSession> session;
965 + rv = aPrintSettings->GetPrintSession (getter_AddRefs (session));
966 + NS_ENSURE_TRUE (NS_SUCCEEDED (rv) && session, nsnull);
968 + nsCOMPtr<nsIPrintProgress> progress (do_QueryInterface (session, &rv));
969 + NS_ENSURE_SUCCESS (rv, rv);
971 + /* Our print session implements those interfaces */
972 + rv = CallQueryInterface (session, _webProgressListener);
973 + rv |= CallQueryInterface (session, _printProgressParams);
974 + NS_ENSURE_SUCCESS (rv, rv);
976 + /* Setting this to PR_FALSE will make gecko immediately start printing
977 + * when we return from this function.
978 + * If we set this to PR_TRUE, we need to call aOpenDialogObserver::Observe
979 + * (topic, subject and data don't matter) when we're ready for printing.
981 + *_notifyOnOpen = PR_FALSE;
983 + return progress->OpenProgressDialog (domWin, nsnull, nsnull, aOpenDialogObserver, _notifyOnOpen);
986 +/* void showPageSetup (in nsIDOMWindow parent,
987 + in nsIPrintSettings printSettings,
988 + in nsIObserver aObs); */
989 +NS_IMETHODIMP GeckoPrintService::ShowPageSetup (nsIDOMWindow *aParent,
990 + nsIPrintSettings *aPrintSettings,
991 + nsIObserver *aObserver)
993 + /* This function is never called from gecko code */
994 + return NS_ERROR_NOT_IMPLEMENTED;
997 +/* void showPrinterProperties (in nsIDOMWindow parent,
998 + in wstring printerName,
999 + in nsIPrintSettings printSettings); */
1001 +GeckoPrintService::ShowPrinterProperties (nsIDOMWindow *aParent,
1002 + const PRUnichar *aPrinterName,
1003 + nsIPrintSettings *aPrintSettings)
1005 + return NS_ERROR_NOT_IMPLEMENTED;
1008 +/* Private methods */
1011 +GeckoPrintService::PrintUnattended (nsIDOMWindow *aParent,
1012 + nsIPrintSettings *aPrintSettings)
1014 + return NS_ERROR_NOT_IMPLEMENTED;
1017 +/* Static methods */
1019 +/* static */ nsresult
1020 +GeckoPrintService::TranslateSettings (GtkPrintSettings *aGtkSettings,
1021 + GtkPageSetup *aPageSetup,
1022 + GtkPrinter *aPrinter,
1023 + const nsACString &aSourceFile,
1024 + PRInt16 aPrintFrames,
1025 + PRBool aIsForPrinting,
1026 + nsIPrintSettings *aSettings)
1028 + NS_ENSURE_ARG (aGtkSettings);
1029 + NS_ENSURE_ARG (aPageSetup);
1031 + GtkPrintCapabilities capabilities = GtkPrintCapabilities (0);
1032 + if (aIsForPrinting) {
1033 + NS_ENSURE_TRUE (aPrinter, NS_ERROR_FAILURE);
1035 + capabilities = gtk_printer_get_capabilities (aPrinter);
1038 + /* Initialisation */
1039 + aSettings->SetIsInitializedFromPrinter (PR_FALSE); /* FIXME: PR_TRUE? */
1040 + aSettings->SetIsInitializedFromPrefs (PR_FALSE); /* FIXME: PR_TRUE? */
1041 + aSettings->SetPrintSilent (PR_FALSE);
1042 + aSettings->SetShowPrintProgress (PR_TRUE);
1044 + /* We always print PS to a file and then hand that off to gtk-print */
1045 + aSettings->SetPrinterName (LITERAL ("PostScript/default"));
1047 + if (aIsForPrinting) {
1048 + aSettings->SetPrintToFile (PR_TRUE);
1050 + nsString sourceFile;
1051 + NS_CStringToUTF16 (aSourceFile,
1052 + NS_CSTRING_ENCODING_NATIVE_FILESYSTEM,
1055 + aSettings->SetToFileName (sourceFile.get ());
1057 + /* Otherwise mozilla will create the file nevertheless and
1058 + * fail since we haven't set a name!
1060 + aSettings->SetPrintToFile (PR_FALSE);
1063 + /* This is the time between printing each page, in ms.
1064 + * It 'gives the user more time to press cancel' !
1065 + * We don't want any of this nonsense, so set this to a low value,
1066 + * just enough to update the print dialogue.
1068 + aSettings->SetPrintPageDelay (50);
1070 + if (aIsForPrinting) {
1071 +#ifdef HAVE_NSIPRINTSETTINGS_SETOUTPUTFORMAT
1072 + NS_ENSURE_TRUE (aPrinter, NS_ERROR_FAILURE);
1074 + const char *format = gtk_print_settings_get (aGtkSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT);
1078 + if (strcmp (format, "pdf") == 0 &&
1079 + gtk_printer_accepts_pdf (aPrinter)) {
1080 + aSettings->SetOutputFormat (nsIPrintSettings::kOutputFormatPDF);
1081 + } else if (strcmp (format, "ps") == 0 &&
1082 + gtk_printer_accepts_ps (aPrinter)) {
1083 + aSettings->SetOutputFormat (nsIPrintSettings::kOutputFormatPS);
1085 + g_warning ("Output format '%s' specified, but printer '%s' does not support it!",
1086 + format, gtk_printer_get_name (aPrinter));
1087 + return NS_ERROR_FAILURE;
1091 + int n_copies = gtk_print_settings_get_n_copies (aGtkSettings);
1092 + if (n_copies <= 0)
1093 + return NS_ERROR_FAILURE;
1094 + if (capabilities & GTK_PRINT_CAPABILITY_COPIES) {
1095 + aSettings->SetNumCopies (1);
1097 + /* We have to copy them ourself */
1098 + aSettings->SetNumCopies (n_copies);
1099 + gtk_print_settings_set_n_copies (aGtkSettings, 1);
1102 + gboolean reverse = gtk_print_settings_get_reverse (aGtkSettings);
1103 + if (capabilities & GTK_PRINT_CAPABILITY_REVERSE) {
1104 + aSettings->SetPrintReversed (PR_FALSE);
1106 + aSettings->SetPrintReversed (reverse);
1107 + gtk_print_settings_set_reverse (aGtkSettings, FALSE);
1110 + GtkPageSet pageSet = gtk_print_settings_get_page_set (aGtkSettings);
1111 + aSettings->SetPrintOptions (nsIPrintSettings::kPrintEvenPages,
1112 + pageSet != GTK_PAGE_SET_ODD);
1113 + aSettings->SetPrintOptions (nsIPrintSettings::kPrintEvenPages,
1114 + pageSet != GTK_PAGE_SET_EVEN);
1116 + GtkPrintPages printPages = gtk_print_settings_get_print_pages (aGtkSettings);
1117 + switch (printPages) {
1118 + case GTK_PRINT_PAGES_RANGES: {
1119 + int numRanges = 0;
1120 + GtkPageRange *pageRanges = gtk_print_settings_get_page_ranges (aGtkSettings, &numRanges);
1121 + if (numRanges > 0) {
1122 + /* FIXME: We can only support one range, ignore more ranges or raise error? */
1123 + aSettings->SetPrintRange (nsIPrintSettings::kRangeSpecifiedPageRange);
1124 + /* Gecko page numbers start at 1, while gtk page numbers start at 0 */
1125 + aSettings->SetStartPageRange (pageRanges[0].start + 1);
1126 + aSettings->SetEndPageRange (pageRanges[0].end + 1);
1128 + g_free (pageRanges);
1131 + /* Fall-through to PAGES_ALL */
1133 + case GTK_PRINT_PAGES_CURRENT:
1134 + /* not supported, fall through */
1135 + case GTK_PRINT_PAGES_ALL:
1136 + aSettings->SetPrintRange (nsIPrintSettings::kRangeAllPages);
1138 + /* FIXME: we need some custom ranges here, "Selection" and "Focused Frame" */
1141 + aSettings->SetPrintOptions (nsIPrintSettings::kPrintEvenPages, PR_TRUE);
1142 + aSettings->SetPrintOptions (nsIPrintSettings::kPrintEvenPages, PR_TRUE);
1143 + aSettings->SetPrintReversed (PR_FALSE);
1144 + aSettings->SetPrintRange (nsIPrintSettings::kRangeAllPages);
1147 + /* And clear those in the settings, so the printer doesn't try to apply them too */
1148 + gtk_print_settings_set_print_pages (aGtkSettings, GTK_PRINT_PAGES_ALL);
1149 + gtk_print_settings_set_page_ranges (aGtkSettings, NULL, 0);
1150 + gtk_print_settings_set_page_set (aGtkSettings, GTK_PAGE_SET_ALL);
1152 + /* We must use the page setup here instead of the print settings, see gtk bug #485685 */
1153 + switch (gtk_page_setup_get_orientation (aPageSetup)) {
1154 + case GTK_PAGE_ORIENTATION_PORTRAIT:
1155 + case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT: /* not supported */
1156 + aSettings->SetOrientation (nsIPrintSettings::kPortraitOrientation);
1158 + case GTK_PAGE_ORIENTATION_LANDSCAPE:
1159 + case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE: /* not supported */
1160 + aSettings->SetOrientation (nsIPrintSettings::kLandscapeOrientation);
1164 + aSettings->SetPrintInColor (gtk_print_settings_get_use_color (aGtkSettings));
1166 + aSettings->SetPaperSizeUnit(nsIPrintSettings::kPaperSizeMillimeters);
1168 +#ifdef HAVE_NSIPRINTSETTINGS_SETPAPERSIZE
1169 + aSettings->SetPaperSize (nsIPrintSettings::kPaperSizeDefined);
1172 + GtkPaperSize *paperSize = gtk_page_setup_get_paper_size (aPageSetup);
1174 + return NS_ERROR_FAILURE;
1177 + aSettings->SetPaperSizeType (nsIPrintSettings::kPaperSizeDefined);
1178 + aSettings->SetPaperWidth (gtk_paper_size_get_width (paperSize, GTK_UNIT_MM));
1179 + aSettings->SetPaperHeight (gtk_paper_size_get_height (paperSize, GTK_UNIT_MM));
1181 +#ifdef HAVE_NSIPRINTSETTINGS_SETPAPERNAME
1182 + aSettings->SetPaperName (NS_ConvertUTF8toUTF16 (gtk_paper_size_get_name (paperSize)).get ());
1185 + /* Mozilla bug https://bugzilla.mozilla.org/show_bug.cgi?id=307404
1186 + * means that we cannot actually use any paper sizes except mozilla's
1187 + * builtin list, and we must refer to them *by name*!
1189 + static const struct {
1190 + const char gtkPaperName[13];
1191 + const char mozPaperName[10];
1192 + } paperTable [] = {
1193 + { GTK_PAPER_NAME_A5, "A5" },
1194 + { GTK_PAPER_NAME_A4, "A4" },
1195 + { GTK_PAPER_NAME_A3, "A3" },
1196 + { GTK_PAPER_NAME_LETTER, "Letter" },
1197 + { GTK_PAPER_NAME_LEGAL, "Legal" },
1198 + { GTK_PAPER_NAME_EXECUTIVE, "Executive" },
1201 + const char *paperName = gtk_paper_size_get_name (paperSize);
1204 + for (i = 0; i < G_N_ELEMENTS (paperTable); i++) {
1205 + if (g_ascii_strcasecmp (paperTable[i].gtkPaperName, paperName) == 0) {
1206 + paperName = paperTable[i].mozPaperName;
1210 + if (i == G_N_ELEMENTS (paperTable)) {
1211 + /* Not in table, fall back to A4 */
1212 + g_warning ("Unknown paper name '%s', falling back to A4", gtk_paper_size_get_name (paperSize));
1213 + paperName = paperTable[1].mozPaperName;
1216 + aSettings->SetPaperName (NS_ConvertUTF8toUTF16 (paperName).get ());
1218 +#endif /* !HAVE_NSIPRINTSETTINGS_SETPAPERNAME */
1220 + /* Sucky mozilla wants margins in inch! */
1221 + aSettings->SetMarginTop (gtk_page_setup_get_top_margin (aPageSetup, GTK_UNIT_INCH));
1222 + aSettings->SetMarginBottom (gtk_page_setup_get_bottom_margin (aPageSetup, GTK_UNIT_INCH));
1223 + aSettings->SetMarginLeft (gtk_page_setup_get_left_margin (aPageSetup, GTK_UNIT_INCH));
1224 + aSettings->SetMarginRight (gtk_page_setup_get_right_margin (aPageSetup, GTK_UNIT_INCH));
1226 + aSettings->SetHeaderStrLeft (eel_gconf_get_boolean (CONF_PRINT_PAGE_TITLE) ? LITERAL ("&T") : LITERAL (""));
1227 + aSettings->SetHeaderStrCenter (LITERAL (""));
1228 + aSettings->SetHeaderStrRight (eel_gconf_get_boolean (CONF_PRINT_PAGE_URL) ? LITERAL ("&U") : LITERAL (""));
1229 + aSettings->SetFooterStrLeft (eel_gconf_get_boolean (CONF_PRINT_PAGE_NUMBERS) ? LITERAL ("&PT") : LITERAL (""));
1230 + aSettings->SetFooterStrCenter (LITERAL (""));
1231 + aSettings->SetFooterStrRight (eel_gconf_get_boolean (CONF_PRINT_DATE) ? LITERAL ("&D") : LITERAL (""));
1233 + aSettings->SetPrintFrameType (aPrintFrames);
1234 + aSettings->SetPrintFrameTypeUsage (nsIPrintSettings::kUseSettingWhenPossible);
1236 + /* FIXME: only if GTK_PRINT_CAPABILITY_SCALE is not set? */
1237 + aSettings->SetScaling (gtk_print_settings_get_scale (aGtkSettings) / 100.0);
1238 + gtk_print_settings_set_scale (aGtkSettings, 1.0);
1240 + aSettings->SetShrinkToFit (PR_FALSE); /* FIXME setting */
1242 + aSettings->SetPrintBGColors (eel_gconf_get_boolean (CONF_PRINT_BG_COLORS) != FALSE);
1243 + aSettings->SetPrintBGImages (eel_gconf_get_boolean (CONF_PRINT_BG_IMAGES) != FALSE);
1245 + /* aSettings->SetPlexName (LITERAL ("default")); */
1246 + /* aSettings->SetColorspace (LITERAL ("default")); */
1247 + /* aSettings->SetResolutionName (LITERAL ("default")); */
1248 + /* aSettings->SetDownloadFonts (PR_TRUE); */
1250 + /* Unset those setting that we can handle, so they don't get applied
1251 + * again for the print job.
1253 + /* gtk_print_settings_set_collate (aGtkSettings, FALSE); not yet */
1254 + /* FIXME: Unset the orientation for the print job? */
1255 + /* gtk_page_setup_set_orientation (aPageSetup, GTK_PAGE_ORIENTATION_PORTRAIT); */
1256 + /* FIXME: unset output format -> "ps" ? */
1260 diff -urN galeon-2.0.7.orig/mozilla/GeckoPrintService.h galeon-2.0.7/mozilla/GeckoPrintService.h
1261 --- galeon-2.0.7.orig/mozilla/GeckoPrintService.h 1970-01-01 01:00:00.000000000 +0100
1262 +++ galeon-2.0.7/mozilla/GeckoPrintService.h 2009-02-15 09:39:07.000000000 +0100
1265 + * Copyright © 2006 Christian Persch
1267 + * This program is free software; you can redistribute it and/or modify
1268 + * it under the terms of the GNU Lesser General Public License as published by
1269 + * the Free Software Foundation; either version 2.1, or (at your option)
1270 + * any later version.
1272 + * This program is distributed in the hope that it will be useful,
1273 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1274 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1275 + * GNU Lesser General Public License for more details.
1277 + * You should have received a copy of the GNU Lesser General Public License
1278 + * along with this program; if not, write to the Free Software
1279 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1284 +#ifndef GECKO_PRINT_SERVICE_H
1285 +#define GECKO_PRINT_SERVICE_H
1287 +#include <gtk/gtkpagesetup.h>
1288 +#include <gtk/gtkprintsettings.h>
1289 +#include <gtk/gtkprinter.h>
1291 +#include <nsIPrintingPromptService.h>
1293 +class nsIPrintSettings;
1295 +/* 6a71ff30-7f4d-4d91-b71a-d5c9764b34be */
1296 +#define GECKO_PRINT_SERVICE_IID \
1297 +{ 0x6a71ff30, 0x7f4d, 0x4d91, \
1298 + { 0xb7, 0x1a, 0xd5, 0xc9, 0x76, 0x4b, 0x34, 0xbe } }
1300 +#define GECKO_PRINT_SERVICE_CLASSNAME "Gecko Print Service"
1302 +class GeckoPrintService : public nsIPrintingPromptService
1306 + NS_DECL_NSIPRINTINGPROMPTSERVICE
1308 + GeckoPrintService();
1309 + virtual ~GeckoPrintService();
1311 + static nsresult TranslateSettings (GtkPrintSettings*, GtkPageSetup *, GtkPrinter *, const nsACString&, PRInt16, PRBool, nsIPrintSettings*);
1314 + nsresult PrintUnattended (nsIDOMWindow *, nsIPrintSettings *);
1317 +#endif /* GECKO_PRINT_SERVICE_H */
1318 diff -urN galeon-2.0.7.orig/mozilla/GeckoPrintSession.cpp galeon-2.0.7/mozilla/GeckoPrintSession.cpp
1319 --- galeon-2.0.7.orig/mozilla/GeckoPrintSession.cpp 1970-01-01 01:00:00.000000000 +0100
1320 +++ galeon-2.0.7/mozilla/GeckoPrintSession.cpp 2009-02-15 09:39:07.000000000 +0100
1323 + * Copyright © 2006 Christian Persch
1325 + * This program is free software; you can redistribute it and/or modify
1326 + * it under the terms of the GNU Lesser General Public License as published by
1327 + * the Free Software Foundation; either version 2.1, or (at your option)
1328 + * any later version.
1330 + * This program is distributed in the hope that it will be useful,
1331 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1332 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1333 + * GNU Lesser General Public License for more details.
1335 + * You should have received a copy of the GNU Lesser General Public License
1336 + * along with this program; if not, write to the Free Software
1337 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1342 +#include "mozilla-config.h"
1343 +#include "config.h"
1345 +#include <unistd.h>
1347 +#include <glib/gi18n.h>
1348 +#include <gtk/gtk.h>
1350 +#include <nsStringAPI.h>
1352 +#include <nsIDOMWindow.h>
1353 +#include <nsIDOMWindowInternal.h>
1354 +#include <nsIPrintSettings.h>
1356 +#include "GeckoPrintSession.h"
1357 +#include "GaleonUtils.h"
1359 +#define MAX_STRING_LENGTH 512
1361 +GeckoPrintSession::GeckoPrintSession ()
1366 +, mProgressDialog(NULL)
1367 +, mTitleLabel(NULL)
1368 +, mProgressBar(NULL)
1369 +, mStartPrintIdleID(0)
1370 +, mSourceFileIsTemp(PR_FALSE)
1372 +, mCancelled(PR_FALSE)
1374 + /* FIXME: connect to "prepare-close" ? */
1377 +GeckoPrintSession::~GeckoPrintSession ()
1379 + NS_ASSERTION (mStartPrintIdleID == 0, "Impossible");
1381 + if (!mDone && !mCancelled) {
1387 + g_object_unref (mSettings);
1390 + g_object_unref (mPageSetup);
1393 + g_object_unref (mPrinter);
1395 + if (mProgressDialog) {
1396 + gtk_widget_destroy (mProgressDialog);
1398 + if (mSourceFileIsTemp) {
1399 + unlink (mSourceFile.get ());
1404 +GeckoPrintSession::GetSourceFile (nsACString &aSource)
1406 + aSource.Assign (mSourceFile);
1410 +GeckoPrintSession::SetSettings (nsIPrintSettings *aPrintSettings,
1411 + GtkPrintSettings *aSettings,
1412 + GtkPageSetup *aPageSetup,
1413 + GtkPrinter *aPrinter)
1415 + NS_ASSERTION (!mPrintSettings && !mSettings && !mPageSetup && !mPrinter, "Already have settings!");
1417 + NS_ENSURE_ARG (aPrintSettings);
1418 + NS_ENSURE_ARG (aSettings);
1420 + mPrintSettings = aPrintSettings;
1421 + mSettings = (GtkPrintSettings *) g_object_ref (aSettings);
1423 + NS_ENSURE_ARG (aPageSetup);
1424 + NS_ENSURE_ARG (aPrinter);
1426 + mPageSetup = (GtkPageSetup *) g_object_ref (aPageSetup);
1427 + mPrinter = (GtkPrinter *) g_object_ref (aPrinter);
1430 + /* Compute the source file name */
1431 + if (gtk_print_settings_get_print_to_file (mSettings)) {
1432 + /* FIXME: support gnome-VFS uris here! */
1433 + const char *fileURI = gtk_print_settings_get (aSettings, "export-uri");
1434 + NS_ENSURE_TRUE (fileURI, NS_ERROR_FAILURE);
1436 + char *fileName = g_filename_from_uri (fileURI, NULL, NULL);
1437 + NS_ENSURE_TRUE (fileURI, NS_ERROR_FAILURE);
1439 + mSourceFile.Assign (fileName);
1440 + g_free (fileName);
1444 + char *tmpl, *tmpName;
1446 + tmpl = g_strdup ("print-XXXXXX.ps");
1448 + tmpName = g_build_filename (g_get_tmp_dir (), tmpl, (const char *) NULL);
1451 + NS_ENSURE_TRUE (tmpName, NS_ERROR_FAILURE);
1452 + mSourceFile.Assign (tmpName);
1455 + mSourceFileIsTemp = PR_TRUE;
1461 +/* static methods */
1463 +/* static */ GeckoPrintSession *
1464 +GeckoPrintSession::FromSettings (nsIPrintSettings *aSettings)
1467 + nsCOMPtr<nsIPrintSession> session;
1468 + rv = aSettings->GetPrintSession (getter_AddRefs (session));
1469 + NS_ENSURE_TRUE (NS_SUCCEEDED (rv) && session, nsnull);
1471 + /* this is ok since the caller holds a ref to the settings which hold a ref to the session */
1472 + nsIPrintSession *sessionPtr = session.get();
1473 + return static_cast<GeckoPrintSession*>(sessionPtr);
1476 +/* static functions */
1479 +ReleaseSession (GeckoPrintSession *aSession)
1481 + NS_RELEASE (aSession);
1485 +ProgressDeleteCallback (GtkDialog *aDialog)
1487 + gtk_dialog_response (aDialog, GTK_RESPONSE_DELETE_EVENT);
1492 +ProgressResponseCallback (GtkDialog *aDialog,
1494 + GeckoPrintSession *aSession)
1496 + aSession->Cancel ();
1500 +StartPrintIdleCallback (GeckoPrintSession *aSession)
1502 + aSession->StartPrinting ();
1508 +JobStatusChangedCallback (GtkPrintJob *aJob,
1509 + GeckoPrintSession *aSession)
1511 + aSession->JobStatusChanged ();
1515 +JobCompletedCallback (GtkPrintJob *aJob,
1516 + GeckoPrintSession *aSession,
1519 + aSession->JobDone ();
1522 + aSession->JobError (aError->message);
1526 +/* Private methods */
1529 +GeckoPrintSession::SetProgress (PRInt32 aCurrent,
1532 + NS_ENSURE_TRUE (mProgressDialog, );
1534 + if (mCancelled) return;
1536 + /* Mozilla is weird */
1537 + if (aCurrent > aMaximum || (aCurrent == 100 && aMaximum == 100)) return;
1539 + double fraction = 0.0;
1540 + if (aMaximum > 0 && aCurrent >= 0) {
1541 + char *text = g_strdup_printf (_("Page %d of %d"), aCurrent, aMaximum);
1542 + gtk_progress_bar_set_text (GTK_PROGRESS_BAR (mProgressBar), text);
1545 + fraction = (double) aCurrent / (double) aMaximum;
1548 + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (mProgressBar), CLAMP (fraction, 0.0, 1.0));
1552 +GeckoPrintSession::SetProgressText (const char *aText)
1554 + NS_ENSURE_TRUE (mProgressDialog, );
1556 + gtk_progress_bar_set_text (GTK_PROGRESS_BAR (mProgressBar), aText);
1560 +GeckoPrintSession::Cancel ()
1562 + SetProcessCanceledByUser (PR_TRUE);
1564 + if (mProgressDialog) {
1565 + gtk_dialog_set_response_sensitive (GTK_DIALOG (mProgressDialog),
1566 + GTK_RESPONSE_CANCEL, FALSE);
1568 + SetProgress (0, 0);
1569 + SetProgressText (_("Cancelling print")); /* FIXME text! */
1573 + /* FIXME: There's no way to cancel mJob! Bug #339323 */
1578 +GeckoPrintSession::StartPrinting ()
1580 + mStartPrintIdleID = 0;
1582 + GError *error = NULL;
1585 + /* FIXME: this could also be a print job to a file which was
1586 + * printed to a temp file and now needs to be uploaded to its
1587 + * final location with gnome-vfs.
1589 + if (gtk_print_settings_get_print_to_file (mSettings)) return;
1592 + NS_ENSURE_TRUE (mSettings && mPageSetup && mPrinter, );
1594 + mJob = gtk_print_job_new (mTitle.get (),
1598 + if (!gtk_print_job_set_source_file (mJob, mSourceFile.get (), &error)) {
1599 + /* FIXME: error dialogue! */
1600 + g_warning ("Couldn't set print job source: %s", error->message);
1601 + g_error_free (error);
1603 + g_object_unref (mJob);
1609 + g_signal_connect (mJob, "status-changed",
1610 + G_CALLBACK (JobStatusChangedCallback), this);
1612 + /* Keep us alive until the job is done! */
1613 + NS_ADDREF_THIS ();
1614 + gtk_print_job_send (mJob,
1615 + (GtkPrintJobCompleteFunc) JobCompletedCallback,
1617 + (GDestroyNotify) ReleaseSession);
1621 +GeckoPrintSession::JobStatusChanged ()
1623 + NS_ENSURE_TRUE (mProgressDialog, );
1625 + /* FIXME: are any other status codes relevant info for the user? */
1626 + if (gtk_print_job_get_status (mJob) == GTK_PRINT_STATUS_SENDING_DATA) {
1627 + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (mProgressBar), 0.75);
1629 + SetProgressText (_("Spooling..."));
1634 +GeckoPrintSession::JobError (const char *aErrorMessage)
1636 + /* FIXME better text */
1637 + GtkWidget *dialog = gtk_message_dialog_new (NULL,
1638 + GtkDialogFlags (0),
1639 + GTK_MESSAGE_ERROR,
1641 + _("Print error"));
1642 + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
1643 + "%s", aErrorMessage);
1644 + g_signal_connect (dialog, "response",
1645 + G_CALLBACK (gtk_widget_destroy), NULL);
1647 + gtk_widget_show (dialog);
1651 +GeckoPrintSession::JobDone ()
1653 + NS_ENSURE_TRUE (mProgressDialog, );
1657 + gtk_widget_hide (mProgressDialog);
1663 +GeckoPrintSession::DestroyJob ()
1665 + if (!mJob) return;
1667 + g_signal_handlers_disconnect_by_func (mJob, (void*) JobStatusChangedCallback, this);
1668 + g_object_unref (mJob);
1673 +GeckoPrintSession::LaunchJobOnIdle ()
1675 + NS_ASSERTION (!mStartPrintIdleID, "Already started printing!");
1677 + /* Don't send the job to the printer if the user cancelled the print */
1678 + if (mCancelled) return;
1680 + /* Keep us alive until the idle handler runs! */
1681 + NS_ADDREF_THIS ();
1682 + mStartPrintIdleID = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
1683 + (GSourceFunc) StartPrintIdleCallback,
1685 + (GDestroyNotify) ReleaseSession);
1688 +/* XPCOM interfaces */
1690 +NS_IMPL_THREADSAFE_ISUPPORTS5 (GeckoPrintSession,
1692 + nsIWebProgressListener,
1694 + nsIPrintProgressParams,
1695 + nsISupportsWeakReference)
1697 +/* nsIPrintSession implementation */
1699 +/* nsIWebProgressListener implementation */
1701 +/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in nsresult aStatus); */
1703 +GeckoPrintSession::OnStateChange (nsIWebProgress *aWebProgress,
1704 + nsIRequest *aRequest,
1705 + PRUint32 aStateFlags,
1708 + if (NS_SUCCEEDED (aStatus) &&
1709 + aStateFlags & nsIWebProgressListener::STATE_IS_DOCUMENT) {
1710 + if (aStateFlags & nsIWebProgressListener::STATE_START) {
1711 + /* Printing starts now */
1712 + SetProgress (0, 0);
1713 + } else if ((aStateFlags & nsIWebProgressListener::STATE_STOP)) {
1714 + /* Printing done, upload to printer */
1715 + LaunchJobOnIdle ();
1722 +/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
1724 +GeckoPrintSession::OnProgressChange (nsIWebProgress *aWebProgress,
1725 + nsIRequest *aRequest,
1726 + PRInt32 aCurSelfProgress,
1727 + PRInt32 aMaxSelfProgress,
1728 + PRInt32 aCurTotalProgress,
1729 + PRInt32 aMaxTotalProgress)
1731 + SetProgress (aCurTotalProgress, aMaxTotalProgress);
1736 +/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI aLocation); */
1738 +GeckoPrintSession::OnLocationChange (nsIWebProgress *aWebProgress,
1739 + nsIRequest *aRequest,
1740 + nsIURI *aLocation)
1742 + NS_ASSERTION (0, "OnLocationChange reached!");
1746 +/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
1748 +GeckoPrintSession::OnStatusChange (nsIWebProgress *aWebProgress,
1749 + nsIRequest *aRequest,
1751 + const PRUnichar *aMessage)
1753 + NS_ASSERTION (0, "OnStatusChange reached!");
1757 +/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aState); */
1759 +GeckoPrintSession::OnSecurityChange (nsIWebProgress *aWebProgress,
1760 + nsIRequest *aRequest,
1763 + NS_ASSERTION (0, "OnSecurityChange reached!");
1767 +/* nsIPrintProgress implementation */
1769 +/* void openProgressDialog (in nsIDOMWindowInternal parent, in string dialogURL, in nsISupports parameters, in nsIObserver openDialogObserver, out boolean notifyOnOpen); */
1771 +GeckoPrintSession::OpenProgressDialog (nsIDOMWindowInternal *aParent,
1772 + const char *aDialogURL,
1773 + nsISupports *aParameters,
1774 + nsIObserver *aOpenDialogObserver,
1775 + PRBool *_notifyOnOpen)
1777 + NS_ENSURE_STATE (!mProgressDialog);
1779 + nsCOMPtr<nsIDOMWindow> domWindow (do_QueryInterface (aParent));
1780 + GtkWidget *parent = GaleonUtils::FindGtkParent (domWindow);
1782 + GtkWidget *vbox, *hbox, *image;
1784 + mProgressDialog = gtk_dialog_new ();
1785 + GtkDialog *dialog = GTK_DIALOG (mProgressDialog);
1787 + gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
1789 + g_signal_connect (dialog, "delete-event",
1790 + G_CALLBACK (ProgressDeleteCallback), NULL);
1791 + g_signal_connect (dialog, "response",
1792 + G_CALLBACK (ProgressResponseCallback), this);
1794 + /* FIXME do we need transient? initially on top should suffice */
1795 + gtk_window_set_transient_for (GTK_WINDOW (dialog),
1796 + GTK_WINDOW (parent));
1798 + gtk_dialog_set_has_separator (dialog, FALSE);
1799 + gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
1800 + gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
1801 + gtk_box_set_spacing (GTK_BOX (dialog->vbox), 14); /* 2 * 5 + 14 = 24 */
1802 + gtk_box_set_spacing (GTK_BOX (dialog->action_area), 5);
1804 + hbox = gtk_hbox_new (FALSE, 12);
1805 + gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
1806 + gtk_container_add (GTK_CONTAINER (dialog->vbox), hbox);
1808 + image = gtk_image_new_from_stock (GTK_STOCK_PRINT, GTK_ICON_SIZE_DIALOG);
1809 + gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
1810 + gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
1812 + vbox = gtk_vbox_new (FALSE, 12);
1813 + gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
1815 + mTitleLabel = gtk_label_new (NULL);
1816 + gtk_label_set_line_wrap (GTK_LABEL (mTitleLabel), TRUE);
1817 + gtk_misc_set_alignment (GTK_MISC (mTitleLabel), 0.0, 0.0);
1818 + gtk_box_pack_start (GTK_BOX (vbox), mTitleLabel, FALSE, FALSE, 0);
1820 + mProgressBar = gtk_progress_bar_new ();
1821 + gtk_box_pack_start (GTK_BOX (vbox), mProgressBar, FALSE, FALSE, 0);
1823 + gtk_widget_show_all (hbox);
1824 + gtk_window_present (GTK_WINDOW (dialog));
1826 + *_notifyOnOpen = PR_FALSE;
1831 +/* void closeProgressDialog (in boolean forceClose); */
1833 +GeckoPrintSession::CloseProgressDialog (PRBool forceClose)
1838 +/* void registerListener (in nsIWebProgressListener listener); */
1840 +GeckoPrintSession::RegisterListener (nsIWebProgressListener *listener)
1845 +/* void unregisterListener (in nsIWebProgressListener listener); */
1847 +GeckoPrintSession::UnregisterListener (nsIWebProgressListener *listener)
1852 +/* void doneIniting (); */
1854 +GeckoPrintSession::DoneIniting()
1859 +/* nsIPrompt getPrompter (); */
1861 +GeckoPrintSession::GetPrompter (nsIPrompt **_retval)
1863 + g_return_val_if_reached (NS_ERROR_NOT_IMPLEMENTED);
1864 + return NS_ERROR_NOT_IMPLEMENTED;
1867 +/* attribute boolean processCanceledByUser; */
1869 +GeckoPrintSession::GetProcessCanceledByUser (PRBool *aProcessCanceledByUser)
1871 + *aProcessCanceledByUser = mCancelled;
1876 +GeckoPrintSession::SetProcessCanceledByUser (PRBool aProcessCanceledByUser)
1878 + mCancelled = aProcessCanceledByUser;
1879 + if (mPrintSettings) {
1880 + mPrintSettings->SetIsCancelled (aProcessCanceledByUser);
1886 +/* nsIPrintProgressParams implementation */
1888 +/* attribute wstring docTitle; */
1890 +GeckoPrintSession::GetDocTitle (PRUnichar * *aDocTitle)
1892 + g_return_val_if_reached (NS_ERROR_NOT_IMPLEMENTED);
1893 + return NS_ERROR_NOT_IMPLEMENTED;
1897 +GeckoPrintSession::SetDocTitle (const PRUnichar * aDocTitle)
1899 + NS_ENSURE_STATE (mProgressDialog);
1902 + if (aDocTitle == nsnull) return NULL;
1904 + /* This depends on the assumption that
1905 + * typeof(PRUnichar) == typeof (gunichar2) == uint16,
1906 + * which should be pretty safe.
1908 + glong n_read = 0, n_written = 0;
1909 + converted = g_utf16_to_utf8 ((gunichar2*) aDocTitle, MAX_STRING_LENGTH,
1910 + &n_read, &n_written, NULL);
1911 + /* FIXME loop from the end while !g_unichar_isspace (char)? */
1915 + g_strdelimit (converted, "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037", ' ');
1918 + mTitle.Assign (converted);
1920 + char *title = g_strdup_printf (_("Printing “%s”"), converted);
1921 + gtk_window_set_title (GTK_WINDOW (mProgressDialog), title);
1922 + gtk_label_set_text (GTK_LABEL (mTitleLabel), title);
1923 + g_free (converted);
1929 +/* attribute wstring docURL; */
1931 +GeckoPrintSession::GetDocURL (PRUnichar * *aDocURL)
1933 + g_return_val_if_reached (NS_ERROR_NOT_IMPLEMENTED);
1934 + return NS_ERROR_NOT_IMPLEMENTED;
1938 +GeckoPrintSession::SetDocURL (const PRUnichar * aDocURL)
1942 diff -urN galeon-2.0.7.orig/mozilla/GeckoPrintSession.h galeon-2.0.7/mozilla/GeckoPrintSession.h
1943 --- galeon-2.0.7.orig/mozilla/GeckoPrintSession.h 1970-01-01 01:00:00.000000000 +0100
1944 +++ galeon-2.0.7/mozilla/GeckoPrintSession.h 2009-02-15 09:39:07.000000000 +0100
1947 + * Copyright © 2006 Christian Persch
1949 + * This program is free software; you can redistribute it and/or modify
1950 + * it under the terms of the GNU Lesser General Public License as published by
1951 + * the Free Software Foundation; either version 2.1, or (at your option)
1952 + * any later version.
1954 + * This program is distributed in the hope that it will be useful,
1955 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1956 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1957 + * GNU Lesser General Public License for more details.
1959 + * You should have received a copy of the GNU Lesser General Public License
1960 + * along with this program; if not, write to the Free Software
1961 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1966 +#ifndef GECKO_PRINT_SESSION_H
1967 +#define GECKO_PRINT_SESSION_H
1969 +#include <nsCOMPtr.h>
1970 +#include <nsIPrintSession.h>
1971 +#include <nsIWebProgressListener.h>
1972 +#include <nsIPrintProgress.h>
1973 +#include <nsIPrintProgressParams.h>
1974 +#include <nsWeakReference.h>
1976 +#include <gtk/gtkwidget.h>
1977 +#include <gtk/gtkprintjob.h>
1978 +#include <gtk/gtkprinter.h>
1979 +#include <gtk/gtkprintjob.h>
1981 +class nsIPrintSettings;
1982 +class nsIDOMWindow;
1984 +/* 0940c973-97e7-476f-a612-4ed9473a0b36 */
1985 +#define GECKO_PRINT_SESSION_IID \
1986 +{ 0x0940c973, 0x97e7, 0x476f, \
1987 + { 0xa6, 0x12, 0x4e, 0xd9, 0x47, 0x3a, 0x0b, 0x36 } }
1989 +#define GECKO_PRINT_SESSION_CLASSNAME "Gecko Print Session"
1991 +class GeckoPrintSession : public nsIPrintSession,
1992 + public nsIPrintProgress,
1993 + public nsIPrintProgressParams,
1994 + public nsSupportsWeakReference
1997 + GeckoPrintSession();
1998 + virtual ~GeckoPrintSession();
2001 + NS_DECL_NSIPRINTSESSION
2002 + NS_DECL_NSIWEBPROGRESSLISTENER
2003 + NS_DECL_NSIPRINTPROGRESS
2004 + NS_DECL_NSIPRINTPROGRESSPARAMS
2006 + nsresult SetSettings (nsIPrintSettings *, GtkPrintSettings*, GtkPageSetup*, GtkPrinter*);
2007 + void GetSourceFile (nsACString&);
2009 + static GeckoPrintSession *FromSettings (nsIPrintSettings *);
2012 + void StartPrinting ();
2013 + void JobStatusChanged ();
2015 + void JobError (const char *);
2018 + nsCOMPtr<nsIPrintSettings> mPrintSettings;
2019 + GtkPrintSettings *mSettings;
2020 + GtkPageSetup *mPageSetup;
2021 + GtkPrinter *mPrinter;
2022 + GtkPrintJob *mJob;
2023 + GtkWidget *mProgressDialog;
2024 + GtkWidget *mTitleLabel;
2025 + GtkWidget *mProgressBar;
2026 + nsCString mSourceFile;
2028 + guint mStartPrintIdleID;
2029 + PRPackedBool mSourceFileIsTemp;
2030 + PRPackedBool mDone;
2031 + PRPackedBool mCancelled;
2033 + void SetProgress (PRInt32, PRInt32);
2034 + void SetProgressText (const char *);
2035 + void LaunchJobOnIdle ();
2036 + void DestroyJob ();
2039 +#endif /* GECKO_PRINT_SESSION_H */
2040 diff -urN galeon-2.0.7.orig/mozilla/Makefile.am galeon-2.0.7/mozilla/Makefile.am
2041 --- galeon-2.0.7.orig/mozilla/Makefile.am 2008-09-03 05:13:36.000000000 +0200
2042 +++ galeon-2.0.7/mozilla/Makefile.am 2009-02-15 09:39:07.000000000 +0100
2043 @@ -127,8 +127,10 @@
2045 MozRegisterComponents.cpp \
2046 MozRegisterComponents.h \
2047 - PrintingPromptService.cpp \
2048 - PrintingPromptService.h \
2049 + GeckoPrintService.cpp \
2050 + GeckoPrintService.h \
2051 + GeckoPrintSession.cpp \
2052 + GeckoPrintSession.h \
2053 PrintProgressListener.cpp \
2054 PrintProgressListener.h \
2055 JSConsoleListener.cpp \
2056 diff -urN galeon-2.0.7.orig/mozilla/mozilla-embed.cpp galeon-2.0.7/mozilla/mozilla-embed.cpp
2057 --- galeon-2.0.7.orig/mozilla/mozilla-embed.cpp 2008-09-05 04:29:53.000000000 +0200
2058 +++ galeon-2.0.7/mozilla/mozilla-embed.cpp 2009-02-15 09:39:07.000000000 +0100
2062 #include <nsServiceManagerUtils.h>
2063 +#include <nsIPrintSettingsService.h>
2064 +#include <nsIPrintSettings.h>
2066 #define MOZILLA_CLIENT
2067 #include "gtkmozembed.h"
2068 @@ -995,33 +997,12 @@
2072 -impl_print (GaleonEmbed *embed,
2073 - EmbedPrintInfo *info)
2074 +impl_print (GaleonEmbed *embed)
2076 GaleonWrapper *wrapper = MOZILLA_EMBED(embed)->priv->wrapper;
2079 - nsCOMPtr<nsIPrintSettings> options;
2080 - result = GaleonUtils::EmbedPrintInfoToPrintSettings(info,
2081 - getter_AddRefs(options));
2082 - if (NS_FAILED (result)) return FALSE;
2086 - string = gtk_moz_embed_get_title (GTK_MOZ_EMBED (embed));
2087 - options->SetTitle (GulString (string).get());
2090 - string = mozilla_embed_get_real_location (MOZILLA_EMBED (embed));
2091 - options->SetDocURL(GulString (string).get());
2094 - options->SetPrintSilent (PR_TRUE);
2096 - result = wrapper->Print(options, info->preview,
2097 - GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed))));
2099 - options->SetPrintSilent (PR_FALSE);
2101 + result = wrapper->Print();
2103 return NS_SUCCEEDED (result) ? TRUE : FALSE;
2105 diff -urN galeon-2.0.7.orig/mozilla/mozilla-embed-shell.cpp galeon-2.0.7/mozilla/mozilla-embed-shell.cpp
2106 --- galeon-2.0.7.orig/mozilla/mozilla-embed-shell.cpp 2008-09-03 06:58:17.000000000 +0200
2107 +++ galeon-2.0.7/mozilla/mozilla-embed-shell.cpp 2009-02-15 09:39:07.000000000 +0100
2108 @@ -1040,14 +1040,6 @@
2113 -impl_get_printer_info(GaleonEmbedShell *shell,
2114 - gint *defaultPrinterIndex)
2116 - return MozillaPrivate::GetPrinterList (defaultPrinterIndex);
2121 mozilla_embed_shell_class_init (MozillaEmbedShellClass *klass)
2123 @@ -1073,7 +1065,6 @@
2124 shell_class->remove_cookies = impl_remove_cookies;
2125 shell_class->list_passwords = impl_list_passwords;
2126 shell_class->remove_passwords = impl_remove_passwords;
2127 - shell_class->get_printer_info = impl_get_printer_info;
2129 g_type_class_add_private (klass, sizeof (MozillaEmbedShellPrivate));
2131 diff -urN galeon-2.0.7.orig/mozilla/MozillaPrivate.cpp galeon-2.0.7/mozilla/MozillaPrivate.cpp
2132 --- galeon-2.0.7.orig/mozilla/MozillaPrivate.cpp 2008-09-05 04:34:37.000000000 +0200
2133 +++ galeon-2.0.7/mozilla/MozillaPrivate.cpp 2009-02-15 09:39:07.000000000 +0100
2135 #include <nsIHTMLDocument.h>
2138 -#include <nsIPrintOptions.h>
2139 #include <nsIDocument.h>
2140 #include <nsIPresShell.h>
2141 #include <nsIStyleSheet.h>
2144 #include "GaleonUtils.h"
2147 -MozillaPrivate::GetPrinterList (gint* defaultPrinterIndex)
2149 - GList *printerList = NULL;
2150 - nsresult rv = NS_OK;
2152 - *defaultPrinterIndex = -1;
2154 - nsCOMPtr<nsIPrintSettingsService> pss =
2155 - do_GetService("@mozilla.org/gfx/printsettings-service;1", &rv);
2156 - NS_ENSURE_SUCCESS(rv, NULL);
2158 - nsCOMPtr<nsIPrintOptions> po = do_QueryInterface(pss, &rv);
2159 - NS_ENSURE_SUCCESS(rv, NULL);
2161 - PRUnichar *uDefaultPrinter;
2162 - rv = pss->GetDefaultPrinterName(&uDefaultPrinter);
2163 - nsAutoString defaultPrinter(uDefaultPrinter);
2164 - NS_Free(uDefaultPrinter);
2165 - NS_ENSURE_SUCCESS(rv, NULL);
2167 -#ifdef HAVE_NSIPRINTOPTIONS_AVAILABLEPRINTERS
2168 - nsCOMPtr<nsISimpleEnumerator> printers;
2169 - rv = po->AvailablePrinters(getter_AddRefs(printers));
2170 - NS_ENSURE_SUCCESS(rv, NULL);
2172 - nsCOMPtr<nsIPrinterEnumerator> pe = do_QueryInterface(pss, &rv);
2173 - NS_ENSURE_SUCCESS(rv, NULL);
2175 - nsCOMPtr<nsIStringEnumerator> printers;
2176 - rv = pe->GetPrinterNameList(getter_AddRefs(printers));
2177 - NS_ENSURE_SUCCESS(rv, NULL);
2180 - PRBool more = PR_FALSE;
2183 -#ifdef HAVE_NSIPRINTOPTIONS_AVAILABLEPRINTERS
2184 - for (printers->HasMoreElements(&more), index = 0;
2186 - printers->HasMoreElements(&more), index++)
2188 - nsCOMPtr<nsISupports> i;
2189 - rv = printers->GetNext(getter_AddRefs(i));
2190 - NS_ENSURE_SUCCESS(rv, NULL);
2192 - nsCOMPtr<nsISupportsString> printer = do_QueryInterface(i, &rv);
2193 - NS_ENSURE_SUCCESS(rv, NULL);
2195 - nsAutoString name;
2196 - rv = printer->GetData(name);
2197 - NS_ENSURE_SUCCESS(rv, NULL);
2199 - for (printers->HasMore(&more), index = 0;
2201 - printers->HasMore(&more), index++)
2203 - nsAutoString name;
2204 - rv = printers->GetNext(name);
2207 - if (defaultPrinter.Equals(name)) *defaultPrinterIndex = index;
2209 - nsCOMPtr<nsIPrintSettings> ps;
2210 - rv = pss->GetNewPrintSettings(getter_AddRefs(ps));
2211 - NS_ENSURE_SUCCESS(rv, NULL);
2213 - rv = pss->InitPrintSettingsFromPrinter(name.get(), ps);
2214 - NS_ENSURE_SUCCESS(rv, NULL);
2216 - // Name field isn't inited. How dumb can we get?
2217 - rv = ps->SetPrinterName(name.get());
2218 - NS_ENSURE_SUCCESS(rv, NULL);
2220 - EmbedPrintInfo *info;
2221 - GaleonUtils::PrintSettingsToEmbedPrintInfo(ps, &info);
2222 - printerList = g_list_append(printerList, info);
2224 -#if HAVE_NSIPRINTOPTIONS_AVAILABLEPRINTERS
2225 - rv = printers->HasMoreElements(&more);
2227 - rv = printers->HasMore(&more);
2229 - NS_ENSURE_SUCCESS(rv, NULL);
2232 - return printerList;
2237 MozillaPrivate::LoadOverrideStyleSheet (nsIDocShell *aDocShell, nsIURI *aUri,
2238 nsIStyleSheet**aStyleSheet)
2239 diff -urN galeon-2.0.7.orig/mozilla/MozRegisterComponents.cpp galeon-2.0.7/mozilla/MozRegisterComponents.cpp
2240 --- galeon-2.0.7.orig/mozilla/MozRegisterComponents.cpp 2008-09-03 05:08:44.000000000 +0200
2241 +++ galeon-2.0.7/mozilla/MozRegisterComponents.cpp 2009-02-15 09:39:07.000000000 +0100
2243 #include "FilePicker.h"
2244 #include "GlobalHistory.h"
2245 #include "MyportalProtocolHandler.h"
2246 -#include "PrintingPromptService.h"
2247 +#include "GeckoPrintService.h"
2248 +#include "GeckoPrintSession.h"
2249 #include "ProgressListener.h"
2250 #include "SideBarProxy.h"
2251 #include "EphyPromptService.h"
2253 NS_GENERIC_FACTORY_CONSTRUCTOR(GFilePicker)
2254 NS_GENERIC_FACTORY_CONSTRUCTOR(GContentHandler)
2255 NS_GENERIC_FACTORY_CONSTRUCTOR(MozGlobalHistory)
2256 -NS_GENERIC_FACTORY_CONSTRUCTOR(GPrintingPromptService)
2257 +NS_GENERIC_FACTORY_CONSTRUCTOR(GeckoPrintService)
2258 +NS_GENERIC_FACTORY_CONSTRUCTOR(GeckoPrintSession)
2259 NS_GENERIC_FACTORY_CONSTRUCTOR(GSidebarProxy)
2260 NS_DECL_CLASSINFO(GSidebarProxy)
2261 NS_GENERIC_FACTORY_CONSTRUCTOR(GCookiePromptService)
2262 @@ -161,11 +163,17 @@
2263 MozGlobalHistoryConstructor
2266 - G_PRINTINGPROMPTSERVICE_CLASSNAME,
2267 - G_PRINTINGPROMPTSERVICE_CID,
2268 - G_PRINTINGPROMPTSERVICE_CONTRACTID,
2269 - GPrintingPromptServiceConstructor
2271 + GECKO_PRINT_SERVICE_CLASSNAME,
2272 + GECKO_PRINT_SERVICE_IID,
2273 + "@mozilla.org/embedcomp/printingprompt-service;1",
2274 + GeckoPrintServiceConstructor
2277 + GECKO_PRINT_SESSION_CLASSNAME,
2278 + GECKO_PRINT_SESSION_IID,
2279 + "@mozilla.org/gfx/printsession;1",
2280 + GeckoPrintSessionConstructor
2283 G_SIDEBAR_CLASSNAME,
2285 diff -urN galeon-2.0.7.orig/src/window-commands.c galeon-2.0.7/src/window-commands.c
2286 --- galeon-2.0.7.orig/src/window-commands.c 2008-07-04 18:30:50.000000000 +0200
2287 +++ galeon-2.0.7/src/window-commands.c 2009-02-15 09:39:07.000000000 +0100
2289 #include "galeon-shell.h"
2290 #include "galeon-config.h"
2291 #include "window-commands.h"
2292 -#include "print-dialog.h"
2293 #include "bookmarks-add-dialog.h"
2294 #include "bookmarks-editor.h"
2295 #include "eel-gconf-extensions.h"
2297 RESPONSE_ADD_TOOLBAR
2302 -print_dialog_preview_cb (PrintDialog *dialog,
2303 - GaleonWindow *window)
2305 - galeon_window_set_chrome (window, EMBED_CHROME_PPVIEWTOOLBARON);
2309 window_cmd_file_print (GtkAction *action,
2310 GaleonWindow *window)
2313 embed = galeon_window_get_active_embed (window);
2314 g_return_if_fail (embed != NULL);
2316 - dialog = print_dialog_new_with_parent (GTK_WIDGET(window),
2318 - g_signal_connect (G_OBJECT(dialog),
2320 - G_CALLBACK (print_dialog_preview_cb),
2322 - galeon_dialog_set_modal (dialog, TRUE);
2323 - galeon_dialog_show (dialog);
2325 + galeon_embed_print (embed);
2329 diff -urN galeon-2.0.7.orig/ui/Makefile.am galeon-2.0.7/ui/Makefile.am
2330 --- galeon-2.0.7.orig/ui/Makefile.am 2008-07-04 18:30:59.000000000 +0200
2331 +++ galeon-2.0.7/ui/Makefile.am 2009-02-15 09:39:07.000000000 +0100
2333 ui_DATA = prefs-dialog.glade \
2336 bookmarks-editor.glade \
2337 bookmarks-editor-small.glade \
2339 diff -urN galeon-2.0.7.orig/ui/print.glade galeon-2.0.7/ui/print.glade
2340 --- galeon-2.0.7.orig/ui/print.glade 2008-07-04 18:30:59.000000000 +0200
2341 +++ galeon-2.0.7/ui/print.glade 2009-02-15 09:39:07.000000000 +0100
2343 -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
2344 -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
2347 -<requires lib="gnome"/>
2349 -<widget class="GtkDialog" id="print_dialog">
2350 - <property name="border_width">7</property>
2351 - <property name="visible">True</property>
2352 - <property name="title" translatable="yes">Print</property>
2353 - <property name="type">GTK_WINDOW_TOPLEVEL</property>
2354 - <property name="window_position">GTK_WIN_POS_NONE</property>
2355 - <property name="modal">False</property>
2356 - <property name="resizable">False</property>
2357 - <property name="destroy_with_parent">False</property>
2358 - <property name="role">galeon-print-dialog</property>
2359 - <property name="decorated">True</property>
2360 - <property name="skip_taskbar_hint">False</property>
2361 - <property name="skip_pager_hint">False</property>
2362 - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
2363 - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
2364 - <property name="has_separator">False</property>
2366 - <child internal-child="vbox">
2367 - <widget class="GtkVBox" id="dialog-vbox8">
2368 - <property name="visible">True</property>
2369 - <property name="homogeneous">False</property>
2370 - <property name="spacing">6</property>
2372 - <child internal-child="action_area">
2373 - <widget class="GtkHButtonBox" id="dialog-action_area8">
2374 - <property name="visible">True</property>
2375 - <property name="layout_style">GTK_BUTTONBOX_END</property>
2378 - <widget class="GtkButton" id="preview_button">
2379 - <property name="visible">True</property>
2380 - <property name="can_default">True</property>
2381 - <property name="can_focus">True</property>
2382 - <property name="label">gtk-print-preview</property>
2383 - <property name="use_stock">True</property>
2384 - <property name="relief">GTK_RELIEF_NORMAL</property>
2385 - <property name="focus_on_click">True</property>
2386 - <property name="response_id">50</property>
2387 - <signal name="clicked" handler="print_preview_button_cb"/>
2392 - <widget class="GtkButton" id="cancel_button">
2393 - <property name="visible">True</property>
2394 - <property name="can_default">True</property>
2395 - <property name="can_focus">True</property>
2396 - <property name="label">gtk-cancel</property>
2397 - <property name="use_stock">True</property>
2398 - <property name="relief">GTK_RELIEF_NORMAL</property>
2399 - <property name="focus_on_click">True</property>
2400 - <property name="response_id">-6</property>
2401 - <signal name="clicked" handler="print_cancel_button_cb"/>
2406 - <widget class="GtkButton" id="print_button">
2407 - <property name="visible">True</property>
2408 - <property name="can_default">True</property>
2409 - <property name="has_default">True</property>
2410 - <property name="can_focus">True</property>
2411 - <property name="label">gtk-print</property>
2412 - <property name="use_stock">True</property>
2413 - <property name="relief">GTK_RELIEF_NORMAL</property>
2414 - <property name="focus_on_click">True</property>
2415 - <property name="response_id">-5</property>
2416 - <signal name="clicked" handler="print_ok_button_cb"/>
2421 - <property name="padding">0</property>
2422 - <property name="expand">False</property>
2423 - <property name="fill">True</property>
2424 - <property name="pack_type">GTK_PACK_END</property>
2429 - <widget class="GtkNotebook" id="print_notebook">
2430 - <property name="border_width">5</property>
2431 - <property name="visible">True</property>
2432 - <property name="can_focus">True</property>
2433 - <property name="show_tabs">True</property>
2434 - <property name="show_border">True</property>
2435 - <property name="tab_pos">GTK_POS_TOP</property>
2436 - <property name="scrollable">False</property>
2437 - <property name="enable_popup">False</property>
2440 - <widget class="GtkVBox" id="vbox127">
2441 - <property name="border_width">12</property>
2442 - <property name="visible">True</property>
2443 - <property name="homogeneous">False</property>
2444 - <property name="spacing">18</property>
2447 - <widget class="GtkVBox" id="vbox128">
2448 - <property name="visible">True</property>
2449 - <property name="homogeneous">False</property>
2450 - <property name="spacing">6</property>
2453 - <widget class="GtkLabel" id="label251">
2454 - <property name="visible">True</property>
2455 - <property name="label" translatable="yes"><b>Printer</b></property>
2456 - <property name="use_underline">False</property>
2457 - <property name="use_markup">True</property>
2458 - <property name="justify">GTK_JUSTIFY_LEFT</property>
2459 - <property name="wrap">False</property>
2460 - <property name="selectable">False</property>
2461 - <property name="xalign">0</property>
2462 - <property name="yalign">0.5</property>
2463 - <property name="xpad">0</property>
2464 - <property name="ypad">0</property>
2467 - <property name="padding">0</property>
2468 - <property name="expand">False</property>
2469 - <property name="fill">False</property>
2474 - <widget class="GtkHBox" id="hbox70">
2475 - <property name="visible">True</property>
2476 - <property name="homogeneous">False</property>
2477 - <property name="spacing">0</property>
2480 - <widget class="GtkLabel" id="label252">
2481 - <property name="visible">True</property>
2482 - <property name="label" translatable="yes"> </property>
2483 - <property name="use_underline">False</property>
2484 - <property name="use_markup">False</property>
2485 - <property name="justify">GTK_JUSTIFY_LEFT</property>
2486 - <property name="wrap">False</property>
2487 - <property name="selectable">False</property>
2488 - <property name="xalign">0.5</property>
2489 - <property name="yalign">0.5</property>
2490 - <property name="xpad">0</property>
2491 - <property name="ypad">0</property>
2494 - <property name="padding">0</property>
2495 - <property name="expand">False</property>
2496 - <property name="fill">False</property>
2501 - <widget class="GtkTable" id="table47">
2502 - <property name="visible">True</property>
2503 - <property name="n_rows">3</property>
2504 - <property name="n_columns">2</property>
2505 - <property name="homogeneous">False</property>
2506 - <property name="row_spacing">6</property>
2507 - <property name="column_spacing">12</property>
2510 - <widget class="GnomeFileEntry" id="print_gnome_file_entry">
2511 - <property name="visible">True</property>
2512 - <property name="max_saved">10</property>
2513 - <property name="browse_dialog_title" translatable="yes">Choose a file to print to</property>
2514 - <property name="directory_entry">False</property>
2515 - <property name="modal">True</property>
2516 - <property name="use_filechooser">True</property>
2517 - <property name="filechooser-action">1</property>
2519 - <child internal-child="entry">
2520 - <widget class="GtkEntry" id="file_entry">
2521 - <property name="visible">True</property>
2522 - <property name="can_focus">True</property>
2523 - <property name="editable">True</property>
2524 - <property name="visibility">True</property>
2525 - <property name="max_length">0</property>
2526 - <property name="text" translatable="yes"></property>
2527 - <property name="has_frame">True</property>
2528 - <property name="invisible_char" translatable="yes">*</property>
2529 - <property name="activates_default">False</property>
2534 - <property name="left_attach">1</property>
2535 - <property name="right_attach">2</property>
2536 - <property name="top_attach">2</property>
2537 - <property name="bottom_attach">3</property>
2538 - <property name="y_options"></property>
2543 - <widget class="GtkCheckButton" id="print_to_file_checkbox">
2544 - <property name="visible">True</property>
2545 - <property name="can_focus">True</property>
2546 - <property name="label" translatable="yes">Print to _file:</property>
2547 - <property name="use_underline">True</property>
2548 - <property name="relief">GTK_RELIEF_NORMAL</property>
2549 - <property name="focus_on_click">True</property>
2550 - <property name="active">False</property>
2551 - <property name="inconsistent">False</property>
2552 - <property name="draw_indicator">True</property>
2553 - <signal name="toggled" handler="print_to_file_toggled_cb" last_modification_time="Sat, 10 Jul 2004 05:06:56 GMT"/>
2556 - <property name="left_attach">0</property>
2557 - <property name="right_attach">1</property>
2558 - <property name="top_attach">2</property>
2559 - <property name="bottom_attach">3</property>
2560 - <property name="x_options">fill</property>
2561 - <property name="y_options"></property>
2566 - <widget class="GtkLabel" id="command_label">
2567 - <property name="visible">True</property>
2568 - <property name="label" translatable="yes">Co_mmand:</property>
2569 - <property name="use_underline">True</property>
2570 - <property name="use_markup">False</property>
2571 - <property name="justify">GTK_JUSTIFY_LEFT</property>
2572 - <property name="wrap">False</property>
2573 - <property name="selectable">False</property>
2574 - <property name="xalign">0</property>
2575 - <property name="yalign">0.5</property>
2576 - <property name="xpad">0</property>
2577 - <property name="ypad">0</property>
2578 - <property name="mnemonic_widget">printer_entry</property>
2581 - <property name="left_attach">0</property>
2582 - <property name="right_attach">1</property>
2583 - <property name="top_attach">1</property>
2584 - <property name="bottom_attach">2</property>
2585 - <property name="x_options">fill</property>
2586 - <property name="y_options"></property>
2591 - <widget class="GtkEntry" id="printer_entry">
2592 - <property name="visible">True</property>
2593 - <property name="can_focus">True</property>
2594 - <property name="editable">True</property>
2595 - <property name="visibility">True</property>
2596 - <property name="max_length">0</property>
2597 - <property name="text" translatable="yes">lpr</property>
2598 - <property name="has_frame">True</property>
2599 - <property name="invisible_char" translatable="yes">*</property>
2600 - <property name="activates_default">False</property>
2603 - <property name="left_attach">1</property>
2604 - <property name="right_attach">2</property>
2605 - <property name="top_attach">1</property>
2606 - <property name="bottom_attach">2</property>
2607 - <property name="y_options"></property>
2612 - <widget class="GtkLabel" id="printer_label">
2613 - <property name="visible">True</property>
2614 - <property name="label" translatable="yes">Print_er:</property>
2615 - <property name="use_underline">True</property>
2616 - <property name="use_markup">False</property>
2617 - <property name="justify">GTK_JUSTIFY_LEFT</property>
2618 - <property name="wrap">False</property>
2619 - <property name="selectable">False</property>
2620 - <property name="xalign">0</property>
2621 - <property name="yalign">0.5</property>
2622 - <property name="xpad">0</property>
2623 - <property name="ypad">0</property>
2626 - <property name="left_attach">0</property>
2627 - <property name="right_attach">1</property>
2628 - <property name="top_attach">0</property>
2629 - <property name="bottom_attach">1</property>
2630 - <property name="x_options">fill</property>
2631 - <property name="y_options"></property>
2636 - <widget class="GtkComboBox" id="printer_name_combobox">
2637 - <property name="visible">True</property>
2638 - <property name="items" translatable="yes">DYNAMIC</property>
2639 - <signal name="changed" handler="print_printer_combo_cb" last_modification_time="Mon, 05 Jul 2004 18:49:50 GMT"/>
2642 - <property name="left_attach">1</property>
2643 - <property name="right_attach">2</property>
2644 - <property name="top_attach">0</property>
2645 - <property name="bottom_attach">1</property>
2646 - <property name="y_options"></property>
2651 - <property name="padding">0</property>
2652 - <property name="expand">False</property>
2653 - <property name="fill">False</property>
2658 - <property name="padding">0</property>
2659 - <property name="expand">True</property>
2660 - <property name="fill">True</property>
2665 - <property name="padding">0</property>
2666 - <property name="expand">False</property>
2667 - <property name="fill">False</property>
2672 - <widget class="GtkVBox" id="vbox145">
2673 - <property name="visible">True</property>
2674 - <property name="homogeneous">False</property>
2675 - <property name="spacing">6</property>
2678 - <widget class="GtkLabel" id="label279">
2679 - <property name="visible">True</property>
2680 - <property name="label" translatable="yes"><b>Paper</b></property>
2681 - <property name="use_underline">False</property>
2682 - <property name="use_markup">True</property>
2683 - <property name="justify">GTK_JUSTIFY_LEFT</property>
2684 - <property name="wrap">False</property>
2685 - <property name="selectable">False</property>
2686 - <property name="xalign">0</property>
2687 - <property name="yalign">0.5</property>
2688 - <property name="xpad">0</property>
2689 - <property name="ypad">0</property>
2692 - <property name="padding">0</property>
2693 - <property name="expand">False</property>
2694 - <property name="fill">False</property>
2699 - <widget class="GtkHBox" id="hbox86">
2700 - <property name="visible">True</property>
2701 - <property name="homogeneous">False</property>
2702 - <property name="spacing">0</property>
2705 - <widget class="GtkLabel" id="label278">
2706 - <property name="visible">True</property>
2707 - <property name="label" translatable="yes"> </property>
2708 - <property name="use_underline">False</property>
2709 - <property name="use_markup">False</property>
2710 - <property name="justify">GTK_JUSTIFY_LEFT</property>
2711 - <property name="wrap">False</property>
2712 - <property name="selectable">False</property>
2713 - <property name="xalign">0.5</property>
2714 - <property name="yalign">0.5</property>
2715 - <property name="xpad">0</property>
2716 - <property name="ypad">0</property>
2719 - <property name="padding">0</property>
2720 - <property name="expand">False</property>
2721 - <property name="fill">False</property>
2726 - <widget class="GtkTable" id="table50">
2727 - <property name="visible">True</property>
2728 - <property name="n_rows">3</property>
2729 - <property name="n_columns">2</property>
2730 - <property name="homogeneous">False</property>
2731 - <property name="row_spacing">6</property>
2732 - <property name="column_spacing">12</property>
2735 - <widget class="GtkLabel" id="size_label">
2736 - <property name="visible">True</property>
2737 - <property name="label" translatable="yes">Si_ze:</property>
2738 - <property name="use_underline">True</property>
2739 - <property name="use_markup">False</property>
2740 - <property name="justify">GTK_JUSTIFY_LEFT</property>
2741 - <property name="wrap">False</property>
2742 - <property name="selectable">False</property>
2743 - <property name="xalign">0</property>
2744 - <property name="yalign">0.5</property>
2745 - <property name="xpad">0</property>
2746 - <property name="ypad">0</property>
2749 - <property name="left_attach">0</property>
2750 - <property name="right_attach">1</property>
2751 - <property name="top_attach">0</property>
2752 - <property name="bottom_attach">1</property>
2753 - <property name="x_options">fill</property>
2754 - <property name="y_options"></property>
2759 - <widget class="GtkLabel" id="orientation_label">
2760 - <property name="visible">True</property>
2761 - <property name="label" translatable="yes">Orientation:</property>
2762 - <property name="use_underline">False</property>
2763 - <property name="use_markup">False</property>
2764 - <property name="justify">GTK_JUSTIFY_LEFT</property>
2765 - <property name="wrap">False</property>
2766 - <property name="selectable">False</property>
2767 - <property name="xalign">0</property>
2768 - <property name="yalign">0.5</property>
2769 - <property name="xpad">0</property>
2770 - <property name="ypad">0</property>
2773 - <property name="left_attach">0</property>
2774 - <property name="right_attach">1</property>
2775 - <property name="top_attach">1</property>
2776 - <property name="bottom_attach">2</property>
2777 - <property name="x_options">fill</property>
2778 - <property name="y_options"></property>
2783 - <widget class="GtkComboBox" id="paper_combobox">
2784 - <property name="visible">True</property>
2785 - <property name="items" translatable="yes">DYNAMIC</property>
2788 - <property name="left_attach">1</property>
2789 - <property name="right_attach">2</property>
2790 - <property name="top_attach">0</property>
2791 - <property name="bottom_attach">1</property>
2792 - <property name="y_options"></property>
2797 - <widget class="GtkRadioButton" id="orient_p_radiobutton">
2798 - <property name="visible">True</property>
2799 - <property name="can_focus">True</property>
2800 - <property name="label" translatable="yes">P_ortrait</property>
2801 - <property name="use_underline">True</property>
2802 - <property name="relief">GTK_RELIEF_NORMAL</property>
2803 - <property name="focus_on_click">True</property>
2804 - <property name="active">False</property>
2805 - <property name="inconsistent">False</property>
2806 - <property name="draw_indicator">True</property>
2809 - <property name="left_attach">1</property>
2810 - <property name="right_attach">2</property>
2811 - <property name="top_attach">1</property>
2812 - <property name="bottom_attach">2</property>
2813 - <property name="y_options"></property>
2818 - <widget class="GtkRadioButton" id="orient_l_radiobutton">
2819 - <property name="visible">True</property>
2820 - <property name="can_focus">True</property>
2821 - <property name="label" translatable="yes">Lan_dscape</property>
2822 - <property name="use_underline">True</property>
2823 - <property name="relief">GTK_RELIEF_NORMAL</property>
2824 - <property name="focus_on_click">True</property>
2825 - <property name="active">False</property>
2826 - <property name="inconsistent">False</property>
2827 - <property name="draw_indicator">True</property>
2828 - <property name="group">orient_p_radiobutton</property>
2831 - <property name="left_attach">1</property>
2832 - <property name="right_attach">2</property>
2833 - <property name="top_attach">2</property>
2834 - <property name="bottom_attach">3</property>
2835 - <property name="y_options"></property>
2840 - <property name="padding">0</property>
2841 - <property name="expand">True</property>
2842 - <property name="fill">True</property>
2847 - <property name="padding">0</property>
2848 - <property name="expand">True</property>
2849 - <property name="fill">True</property>
2854 - <property name="padding">0</property>
2855 - <property name="expand">True</property>
2856 - <property name="fill">True</property>
2861 - <widget class="GtkVBox" id="vbox129">
2862 - <property name="visible">True</property>
2863 - <property name="homogeneous">False</property>
2864 - <property name="spacing">6</property>
2867 - <widget class="GtkLabel" id="label253">
2868 - <property name="visible">True</property>
2869 - <property name="label" translatable="yes"><b>Pages range</b></property>
2870 - <property name="use_underline">False</property>
2871 - <property name="use_markup">True</property>
2872 - <property name="justify">GTK_JUSTIFY_LEFT</property>
2873 - <property name="wrap">False</property>
2874 - <property name="selectable">False</property>
2875 - <property name="xalign">0</property>
2876 - <property name="yalign">0.5</property>
2877 - <property name="xpad">0</property>
2878 - <property name="ypad">0</property>
2881 - <property name="padding">0</property>
2882 - <property name="expand">False</property>
2883 - <property name="fill">False</property>
2888 - <widget class="GtkHBox" id="hbox71">
2889 - <property name="visible">True</property>
2890 - <property name="homogeneous">False</property>
2891 - <property name="spacing">0</property>
2894 - <widget class="GtkLabel" id="label254">
2895 - <property name="visible">True</property>
2896 - <property name="label" translatable="yes"> </property>
2897 - <property name="use_underline">False</property>
2898 - <property name="use_markup">False</property>
2899 - <property name="justify">GTK_JUSTIFY_LEFT</property>
2900 - <property name="wrap">False</property>
2901 - <property name="selectable">False</property>
2902 - <property name="xalign">0.5</property>
2903 - <property name="yalign">0.5</property>
2904 - <property name="xpad">0</property>
2905 - <property name="ypad">0</property>
2908 - <property name="padding">0</property>
2909 - <property name="expand">False</property>
2910 - <property name="fill">False</property>
2915 - <widget class="GtkTable" id="table49">
2916 - <property name="visible">True</property>
2917 - <property name="n_rows">3</property>
2918 - <property name="n_columns">2</property>
2919 - <property name="homogeneous">False</property>
2920 - <property name="row_spacing">6</property>
2921 - <property name="column_spacing">12</property>
2924 - <widget class="GtkRadioButton" id="all_pages_radiobutton">
2925 - <property name="visible">True</property>
2926 - <property name="can_focus">True</property>
2927 - <property name="label" translatable="yes">_All pages</property>
2928 - <property name="use_underline">True</property>
2929 - <property name="relief">GTK_RELIEF_NORMAL</property>
2930 - <property name="focus_on_click">True</property>
2931 - <property name="active">False</property>
2932 - <property name="inconsistent">False</property>
2933 - <property name="draw_indicator">True</property>
2936 - <property name="left_attach">0</property>
2937 - <property name="right_attach">1</property>
2938 - <property name="top_attach">0</property>
2939 - <property name="bottom_attach">1</property>
2940 - <property name="x_options">fill</property>
2941 - <property name="y_options"></property>
2946 - <widget class="GtkRadioButton" id="pages_radiobutton">
2947 - <property name="visible">True</property>
2948 - <property name="can_focus">True</property>
2949 - <property name="label" translatable="yes">Pa_ges</property>
2950 - <property name="use_underline">True</property>
2951 - <property name="relief">GTK_RELIEF_NORMAL</property>
2952 - <property name="focus_on_click">True</property>
2953 - <property name="active">False</property>
2954 - <property name="inconsistent">False</property>
2955 - <property name="draw_indicator">True</property>
2956 - <property name="group">all_pages_radiobutton</property>
2959 - <property name="left_attach">0</property>
2960 - <property name="right_attach">1</property>
2961 - <property name="top_attach">2</property>
2962 - <property name="bottom_attach">3</property>
2963 - <property name="x_options">fill</property>
2964 - <property name="y_options"></property>
2969 - <widget class="GtkHBox" id="hbox49">
2970 - <property name="visible">True</property>
2971 - <property name="homogeneous">False</property>
2972 - <property name="spacing">5</property>
2975 - <widget class="GtkLabel" id="label241">
2976 - <property name="visible">True</property>
2977 - <property name="label" translatable="yes">from:</property>
2978 - <property name="use_underline">False</property>
2979 - <property name="use_markup">False</property>
2980 - <property name="justify">GTK_JUSTIFY_CENTER</property>
2981 - <property name="wrap">False</property>
2982 - <property name="selectable">False</property>
2983 - <property name="xalign">0.5</property>
2984 - <property name="yalign">0.5</property>
2985 - <property name="xpad">0</property>
2986 - <property name="ypad">0</property>
2989 - <property name="padding">0</property>
2990 - <property name="expand">False</property>
2991 - <property name="fill">False</property>
2996 - <widget class="GtkSpinButton" id="from_spinbutton">
2997 - <property name="visible">True</property>
2998 - <property name="can_focus">True</property>
2999 - <property name="climb_rate">1</property>
3000 - <property name="digits">0</property>
3001 - <property name="numeric">False</property>
3002 - <property name="update_policy">GTK_UPDATE_ALWAYS</property>
3003 - <property name="snap_to_ticks">False</property>
3004 - <property name="wrap">False</property>
3005 - <property name="adjustment">1 0 100 1 10 10</property>
3008 - <property name="padding">0</property>
3009 - <property name="expand">False</property>
3010 - <property name="fill">True</property>
3015 - <widget class="GtkLabel" id="label242">
3016 - <property name="visible">True</property>
3017 - <property name="label" translatable="yes">to:</property>
3018 - <property name="use_underline">False</property>
3019 - <property name="use_markup">False</property>
3020 - <property name="justify">GTK_JUSTIFY_CENTER</property>
3021 - <property name="wrap">False</property>
3022 - <property name="selectable">False</property>
3023 - <property name="xalign">0.5</property>
3024 - <property name="yalign">0.5</property>
3025 - <property name="xpad">0</property>
3026 - <property name="ypad">0</property>
3029 - <property name="padding">0</property>
3030 - <property name="expand">False</property>
3031 - <property name="fill">False</property>
3036 - <widget class="GtkSpinButton" id="to_spinbutton">
3037 - <property name="visible">True</property>
3038 - <property name="can_focus">True</property>
3039 - <property name="climb_rate">1</property>
3040 - <property name="digits">0</property>
3041 - <property name="numeric">False</property>
3042 - <property name="update_policy">GTK_UPDATE_ALWAYS</property>
3043 - <property name="snap_to_ticks">False</property>
3044 - <property name="wrap">False</property>
3045 - <property name="adjustment">1 0 100 1 10 10</property>
3048 - <property name="padding">0</property>
3049 - <property name="expand">False</property>
3050 - <property name="fill">True</property>
3055 - <property name="left_attach">1</property>
3056 - <property name="right_attach">2</property>
3057 - <property name="top_attach">2</property>
3058 - <property name="bottom_attach">3</property>
3059 - <property name="y_options">fill</property>
3064 - <widget class="GtkRadioButton" id="selection_radiobutton">
3065 - <property name="visible">True</property>
3066 - <property name="can_focus">True</property>
3067 - <property name="label" translatable="yes">_Selection</property>
3068 - <property name="use_underline">True</property>
3069 - <property name="relief">GTK_RELIEF_NORMAL</property>
3070 - <property name="focus_on_click">True</property>
3071 - <property name="active">False</property>
3072 - <property name="inconsistent">False</property>
3073 - <property name="draw_indicator">True</property>
3074 - <property name="group">all_pages_radiobutton</property>
3077 - <property name="left_attach">0</property>
3078 - <property name="right_attach">1</property>
3079 - <property name="top_attach">1</property>
3080 - <property name="bottom_attach">2</property>
3081 - <property name="x_options">fill</property>
3082 - <property name="y_options"></property>
3087 - <property name="padding">0</property>
3088 - <property name="expand">True</property>
3089 - <property name="fill">True</property>
3094 - <property name="padding">0</property>
3095 - <property name="expand">True</property>
3096 - <property name="fill">True</property>
3101 - <property name="padding">0</property>
3102 - <property name="expand">False</property>
3103 - <property name="fill">True</property>
3108 - <property name="tab_expand">False</property>
3109 - <property name="tab_fill">True</property>
3114 - <widget class="GtkLabel" id="label249">
3115 - <property name="visible">True</property>
3116 - <property name="label" translatable="yes">General</property>
3117 - <property name="use_underline">False</property>
3118 - <property name="use_markup">False</property>
3119 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3120 - <property name="wrap">False</property>
3121 - <property name="selectable">False</property>
3122 - <property name="xalign">0.5</property>
3123 - <property name="yalign">0.5</property>
3124 - <property name="xpad">0</property>
3125 - <property name="ypad">0</property>
3128 - <property name="type">tab</property>
3133 - <widget class="GtkVBox" id="vbox144">
3134 - <property name="border_width">12</property>
3135 - <property name="visible">True</property>
3136 - <property name="homogeneous">False</property>
3137 - <property name="spacing">18</property>
3140 - <widget class="GtkHBox" id="hbox84">
3141 - <property name="visible">True</property>
3142 - <property name="homogeneous">False</property>
3143 - <property name="spacing">18</property>
3146 - <widget class="GtkVBox" id="vbox137">
3147 - <property name="visible">True</property>
3148 - <property name="homogeneous">False</property>
3149 - <property name="spacing">6</property>
3152 - <widget class="GtkLabel" id="label261">
3153 - <property name="visible">True</property>
3154 - <property name="label" translatable="yes"><b>Margins (inches)</b></property>
3155 - <property name="use_underline">False</property>
3156 - <property name="use_markup">True</property>
3157 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3158 - <property name="wrap">False</property>
3159 - <property name="selectable">False</property>
3160 - <property name="xalign">0</property>
3161 - <property name="yalign">0.5</property>
3162 - <property name="xpad">0</property>
3163 - <property name="ypad">0</property>
3166 - <property name="padding">0</property>
3167 - <property name="expand">False</property>
3168 - <property name="fill">False</property>
3173 - <widget class="GtkHBox" id="hbox78">
3174 - <property name="visible">True</property>
3175 - <property name="homogeneous">False</property>
3176 - <property name="spacing">0</property>
3179 - <widget class="GtkLabel" id="label271">
3180 - <property name="visible">True</property>
3181 - <property name="label" translatable="yes"> </property>
3182 - <property name="use_underline">False</property>
3183 - <property name="use_markup">False</property>
3184 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3185 - <property name="wrap">False</property>
3186 - <property name="selectable">False</property>
3187 - <property name="xalign">0.5</property>
3188 - <property name="yalign">0.5</property>
3189 - <property name="xpad">0</property>
3190 - <property name="ypad">0</property>
3193 - <property name="padding">0</property>
3194 - <property name="expand">False</property>
3195 - <property name="fill">False</property>
3200 - <widget class="GtkTable" id="table48">
3201 - <property name="visible">True</property>
3202 - <property name="n_rows">4</property>
3203 - <property name="n_columns">2</property>
3204 - <property name="homogeneous">False</property>
3205 - <property name="row_spacing">6</property>
3206 - <property name="column_spacing">12</property>
3209 - <widget class="GtkLabel" id="label238">
3210 - <property name="visible">True</property>
3211 - <property name="label" translatable="yes">_Bottom:</property>
3212 - <property name="use_underline">True</property>
3213 - <property name="use_markup">False</property>
3214 - <property name="justify">GTK_JUSTIFY_CENTER</property>
3215 - <property name="wrap">False</property>
3216 - <property name="selectable">False</property>
3217 - <property name="xalign">0</property>
3218 - <property name="yalign">0.5</property>
3219 - <property name="xpad">0</property>
3220 - <property name="ypad">0</property>
3221 - <property name="mnemonic_widget">bottom_spinbutton</property>
3224 - <property name="left_attach">0</property>
3225 - <property name="right_attach">1</property>
3226 - <property name="top_attach">1</property>
3227 - <property name="bottom_attach">2</property>
3228 - <property name="x_options">fill</property>
3229 - <property name="y_options"></property>
3234 - <widget class="GtkLabel" id="label239">
3235 - <property name="visible">True</property>
3236 - <property name="label" translatable="yes">_Left:</property>
3237 - <property name="use_underline">True</property>
3238 - <property name="use_markup">False</property>
3239 - <property name="justify">GTK_JUSTIFY_CENTER</property>
3240 - <property name="wrap">False</property>
3241 - <property name="selectable">False</property>
3242 - <property name="xalign">0</property>
3243 - <property name="yalign">0.5</property>
3244 - <property name="xpad">0</property>
3245 - <property name="ypad">0</property>
3246 - <property name="mnemonic_widget">left_spinbutton</property>
3249 - <property name="left_attach">0</property>
3250 - <property name="right_attach">1</property>
3251 - <property name="top_attach">2</property>
3252 - <property name="bottom_attach">3</property>
3253 - <property name="x_options">fill</property>
3254 - <property name="y_options"></property>
3259 - <widget class="GtkLabel" id="label240">
3260 - <property name="visible">True</property>
3261 - <property name="label" translatable="yes">_Right:</property>
3262 - <property name="use_underline">True</property>
3263 - <property name="use_markup">False</property>
3264 - <property name="justify">GTK_JUSTIFY_CENTER</property>
3265 - <property name="wrap">False</property>
3266 - <property name="selectable">False</property>
3267 - <property name="xalign">0</property>
3268 - <property name="yalign">0.5</property>
3269 - <property name="xpad">0</property>
3270 - <property name="ypad">0</property>
3271 - <property name="mnemonic_widget">right_spinbutton</property>
3274 - <property name="left_attach">0</property>
3275 - <property name="right_attach">1</property>
3276 - <property name="top_attach">3</property>
3277 - <property name="bottom_attach">4</property>
3278 - <property name="x_options">fill</property>
3279 - <property name="y_options"></property>
3284 - <widget class="GtkLabel" id="label237">
3285 - <property name="visible">True</property>
3286 - <property name="label" translatable="yes">_Top:</property>
3287 - <property name="use_underline">True</property>
3288 - <property name="use_markup">False</property>
3289 - <property name="justify">GTK_JUSTIFY_CENTER</property>
3290 - <property name="wrap">False</property>
3291 - <property name="selectable">False</property>
3292 - <property name="xalign">0</property>
3293 - <property name="yalign">0.5</property>
3294 - <property name="xpad">0</property>
3295 - <property name="ypad">0</property>
3296 - <property name="mnemonic_widget">top_spinbutton</property>
3299 - <property name="left_attach">0</property>
3300 - <property name="right_attach">1</property>
3301 - <property name="top_attach">0</property>
3302 - <property name="bottom_attach">1</property>
3303 - <property name="x_options">fill</property>
3304 - <property name="y_options"></property>
3309 - <widget class="GtkSpinButton" id="bottom_spinbutton">
3310 - <property name="visible">True</property>
3311 - <property name="can_focus">True</property>
3312 - <property name="climb_rate">0.1</property>
3313 - <property name="digits">1</property>
3314 - <property name="numeric">True</property>
3315 - <property name="update_policy">GTK_UPDATE_ALWAYS</property>
3316 - <property name="snap_to_ticks">False</property>
3317 - <property name="wrap">False</property>
3318 - <property name="adjustment">0.6 0 100 0.1 10 10</property>
3321 - <property name="left_attach">1</property>
3322 - <property name="right_attach">2</property>
3323 - <property name="top_attach">1</property>
3324 - <property name="bottom_attach">2</property>
3325 - <property name="y_options"></property>
3330 - <widget class="GtkSpinButton" id="left_spinbutton">
3331 - <property name="visible">True</property>
3332 - <property name="can_focus">True</property>
3333 - <property name="climb_rate">0.1</property>
3334 - <property name="digits">1</property>
3335 - <property name="numeric">True</property>
3336 - <property name="update_policy">GTK_UPDATE_ALWAYS</property>
3337 - <property name="snap_to_ticks">False</property>
3338 - <property name="wrap">False</property>
3339 - <property name="adjustment">0.5 0 100 0.1 10 10</property>
3342 - <property name="left_attach">1</property>
3343 - <property name="right_attach">2</property>
3344 - <property name="top_attach">2</property>
3345 - <property name="bottom_attach">3</property>
3346 - <property name="y_options"></property>
3351 - <widget class="GtkSpinButton" id="top_spinbutton">
3352 - <property name="visible">True</property>
3353 - <property name="can_focus">True</property>
3354 - <property name="climb_rate">0.1</property>
3355 - <property name="digits">1</property>
3356 - <property name="numeric">True</property>
3357 - <property name="update_policy">GTK_UPDATE_ALWAYS</property>
3358 - <property name="snap_to_ticks">False</property>
3359 - <property name="wrap">False</property>
3360 - <property name="adjustment">0.3 0 100 0.1 10 10</property>
3363 - <property name="left_attach">1</property>
3364 - <property name="right_attach">2</property>
3365 - <property name="top_attach">0</property>
3366 - <property name="bottom_attach">1</property>
3367 - <property name="y_options"></property>
3372 - <widget class="GtkSpinButton" id="right_spinbutton">
3373 - <property name="visible">True</property>
3374 - <property name="can_focus">True</property>
3375 - <property name="climb_rate">0.1</property>
3376 - <property name="digits">1</property>
3377 - <property name="numeric">True</property>
3378 - <property name="update_policy">GTK_UPDATE_ALWAYS</property>
3379 - <property name="snap_to_ticks">False</property>
3380 - <property name="wrap">False</property>
3381 - <property name="adjustment">0.5 0 100 0.1 10 10</property>
3384 - <property name="left_attach">1</property>
3385 - <property name="right_attach">2</property>
3386 - <property name="top_attach">3</property>
3387 - <property name="bottom_attach">4</property>
3388 - <property name="y_options"></property>
3393 - <property name="padding">0</property>
3394 - <property name="expand">False</property>
3395 - <property name="fill">False</property>
3400 - <property name="padding">0</property>
3401 - <property name="expand">True</property>
3402 - <property name="fill">True</property>
3407 - <property name="padding">0</property>
3408 - <property name="expand">False</property>
3409 - <property name="fill">False</property>
3414 - <widget class="GtkVBox" id="vbox141">
3415 - <property name="visible">True</property>
3416 - <property name="homogeneous">False</property>
3417 - <property name="spacing">6</property>
3420 - <widget class="GtkLabel" id="label272">
3421 - <property name="visible">True</property>
3422 - <property name="label" translatable="yes"><b>Colors</b></property>
3423 - <property name="use_underline">False</property>
3424 - <property name="use_markup">True</property>
3425 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3426 - <property name="wrap">False</property>
3427 - <property name="selectable">False</property>
3428 - <property name="xalign">0</property>
3429 - <property name="yalign">0.5</property>
3430 - <property name="xpad">0</property>
3431 - <property name="ypad">0</property>
3434 - <property name="padding">0</property>
3435 - <property name="expand">False</property>
3436 - <property name="fill">False</property>
3441 - <widget class="GtkHBox" id="hbox80">
3442 - <property name="visible">True</property>
3443 - <property name="homogeneous">False</property>
3444 - <property name="spacing">0</property>
3447 - <widget class="GtkLabel" id="label273">
3448 - <property name="visible">True</property>
3449 - <property name="label" translatable="yes"> </property>
3450 - <property name="use_underline">False</property>
3451 - <property name="use_markup">False</property>
3452 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3453 - <property name="wrap">False</property>
3454 - <property name="selectable">False</property>
3455 - <property name="xalign">0.5</property>
3456 - <property name="yalign">0.5</property>
3457 - <property name="xpad">0</property>
3458 - <property name="ypad">0</property>
3461 - <property name="padding">0</property>
3462 - <property name="expand">False</property>
3463 - <property name="fill">False</property>
3468 - <widget class="GtkVBox" id="vbox142">
3469 - <property name="visible">True</property>
3470 - <property name="homogeneous">False</property>
3471 - <property name="spacing">6</property>
3474 - <widget class="GtkRadioButton" id="print_color_radiobutton">
3475 - <property name="visible">True</property>
3476 - <property name="can_focus">True</property>
3477 - <property name="label" translatable="yes">C_olor</property>
3478 - <property name="use_underline">True</property>
3479 - <property name="relief">GTK_RELIEF_NORMAL</property>
3480 - <property name="focus_on_click">True</property>
3481 - <property name="active">False</property>
3482 - <property name="inconsistent">False</property>
3483 - <property name="draw_indicator">True</property>
3486 - <property name="padding">0</property>
3487 - <property name="expand">False</property>
3488 - <property name="fill">False</property>
3493 - <widget class="GtkRadioButton" id="print_grayscale_radiobutton">
3494 - <property name="visible">True</property>
3495 - <property name="can_focus">True</property>
3496 - <property name="label" translatable="yes">_Grayscale</property>
3497 - <property name="use_underline">True</property>
3498 - <property name="relief">GTK_RELIEF_NORMAL</property>
3499 - <property name="focus_on_click">True</property>
3500 - <property name="active">False</property>
3501 - <property name="inconsistent">False</property>
3502 - <property name="draw_indicator">True</property>
3503 - <property name="group">print_color_radiobutton</property>
3506 - <property name="padding">0</property>
3507 - <property name="expand">False</property>
3508 - <property name="fill">False</property>
3513 - <widget class="GtkImage" id="image2">
3514 - <property name="visible">True</property>
3515 - <property name="stock">gtk-select-color</property>
3516 - <property name="icon_size">6</property>
3517 - <property name="xalign">0.5</property>
3518 - <property name="yalign">0.5</property>
3519 - <property name="xpad">0</property>
3520 - <property name="ypad">0</property>
3523 - <property name="padding">0</property>
3524 - <property name="expand">True</property>
3525 - <property name="fill">True</property>
3530 - <property name="padding">0</property>
3531 - <property name="expand">False</property>
3532 - <property name="fill">False</property>
3537 - <property name="padding">0</property>
3538 - <property name="expand">True</property>
3539 - <property name="fill">True</property>
3544 - <property name="padding">0</property>
3545 - <property name="expand">True</property>
3546 - <property name="fill">False</property>
3551 - <property name="padding">0</property>
3552 - <property name="expand">False</property>
3553 - <property name="fill">True</property>
3558 - <widget class="GtkHBox" id="hbox85">
3559 - <property name="visible">True</property>
3560 - <property name="homogeneous">False</property>
3561 - <property name="spacing">0</property>
3564 - <widget class="GtkVBox" id="vbox140">
3565 - <property name="visible">True</property>
3566 - <property name="homogeneous">False</property>
3567 - <property name="spacing">6</property>
3570 - <widget class="GtkLabel" id="label269">
3571 - <property name="visible">True</property>
3572 - <property name="label" translatable="yes"><b>Footers</b></property>
3573 - <property name="use_underline">False</property>
3574 - <property name="use_markup">True</property>
3575 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3576 - <property name="wrap">False</property>
3577 - <property name="selectable">False</property>
3578 - <property name="xalign">0</property>
3579 - <property name="yalign">0.5</property>
3580 - <property name="xpad">0</property>
3581 - <property name="ypad">0</property>
3584 - <property name="padding">0</property>
3585 - <property name="expand">False</property>
3586 - <property name="fill">False</property>
3591 - <widget class="GtkHBox" id="hbox77">
3592 - <property name="visible">True</property>
3593 - <property name="homogeneous">False</property>
3594 - <property name="spacing">0</property>
3597 - <widget class="GtkLabel" id="label270">
3598 - <property name="visible">True</property>
3599 - <property name="label" translatable="yes"> </property>
3600 - <property name="use_underline">False</property>
3601 - <property name="use_markup">False</property>
3602 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3603 - <property name="wrap">False</property>
3604 - <property name="selectable">False</property>
3605 - <property name="xalign">0.5</property>
3606 - <property name="yalign">0.5</property>
3607 - <property name="xpad">0</property>
3608 - <property name="ypad">0</property>
3611 - <property name="padding">0</property>
3612 - <property name="expand">False</property>
3613 - <property name="fill">False</property>
3618 - <widget class="GtkVBox" id="vbox125">
3619 - <property name="visible">True</property>
3620 - <property name="homogeneous">False</property>
3621 - <property name="spacing">6</property>
3624 - <widget class="GtkCheckButton" id="print_page_numbers_checkbutton">
3625 - <property name="visible">True</property>
3626 - <property name="can_focus">True</property>
3627 - <property name="label" translatable="yes">Page nu_mbers</property>
3628 - <property name="use_underline">True</property>
3629 - <property name="relief">GTK_RELIEF_NORMAL</property>
3630 - <property name="focus_on_click">True</property>
3631 - <property name="active">False</property>
3632 - <property name="inconsistent">False</property>
3633 - <property name="draw_indicator">True</property>
3636 - <property name="padding">0</property>
3637 - <property name="expand">False</property>
3638 - <property name="fill">False</property>
3643 - <widget class="GtkCheckButton" id="print_date_checkbutton">
3644 - <property name="visible">True</property>
3645 - <property name="can_focus">True</property>
3646 - <property name="label" translatable="yes">_Date</property>
3647 - <property name="use_underline">True</property>
3648 - <property name="relief">GTK_RELIEF_NORMAL</property>
3649 - <property name="focus_on_click">True</property>
3650 - <property name="active">False</property>
3651 - <property name="inconsistent">False</property>
3652 - <property name="draw_indicator">True</property>
3655 - <property name="padding">0</property>
3656 - <property name="expand">False</property>
3657 - <property name="fill">False</property>
3662 - <property name="padding">0</property>
3663 - <property name="expand">True</property>
3664 - <property name="fill">True</property>
3669 - <property name="padding">0</property>
3670 - <property name="expand">False</property>
3671 - <property name="fill">False</property>
3676 - <property name="padding">0</property>
3677 - <property name="expand">True</property>
3678 - <property name="fill">True</property>
3683 - <widget class="GtkVBox" id="vbox138">
3684 - <property name="visible">True</property>
3685 - <property name="homogeneous">False</property>
3686 - <property name="spacing">6</property>
3689 - <widget class="GtkLabel" id="label267">
3690 - <property name="visible">True</property>
3691 - <property name="label" translatable="yes"><b>Headers</b></property>
3692 - <property name="use_underline">False</property>
3693 - <property name="use_markup">True</property>
3694 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3695 - <property name="wrap">False</property>
3696 - <property name="selectable">False</property>
3697 - <property name="xalign">0</property>
3698 - <property name="yalign">0.5</property>
3699 - <property name="xpad">0</property>
3700 - <property name="ypad">0</property>
3703 - <property name="padding">0</property>
3704 - <property name="expand">False</property>
3705 - <property name="fill">False</property>
3710 - <widget class="GtkHBox" id="hbox76">
3711 - <property name="visible">True</property>
3712 - <property name="homogeneous">False</property>
3713 - <property name="spacing">0</property>
3716 - <widget class="GtkLabel" id="label268">
3717 - <property name="visible">True</property>
3718 - <property name="label" translatable="yes"> </property>
3719 - <property name="use_underline">False</property>
3720 - <property name="use_markup">False</property>
3721 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3722 - <property name="wrap">False</property>
3723 - <property name="selectable">False</property>
3724 - <property name="xalign">0.5</property>
3725 - <property name="yalign">0.5</property>
3726 - <property name="xpad">0</property>
3727 - <property name="ypad">0</property>
3730 - <property name="padding">0</property>
3731 - <property name="expand">False</property>
3732 - <property name="fill">False</property>
3737 - <widget class="GtkVBox" id="vbox124">
3738 - <property name="visible">True</property>
3739 - <property name="homogeneous">False</property>
3740 - <property name="spacing">6</property>
3743 - <widget class="GtkCheckButton" id="print_page_title_checkbutton">
3744 - <property name="visible">True</property>
3745 - <property name="can_focus">True</property>
3746 - <property name="label" translatable="yes">P_age Title</property>
3747 - <property name="use_underline">True</property>
3748 - <property name="relief">GTK_RELIEF_NORMAL</property>
3749 - <property name="focus_on_click">True</property>
3750 - <property name="active">False</property>
3751 - <property name="inconsistent">False</property>
3752 - <property name="draw_indicator">True</property>
3755 - <property name="padding">0</property>
3756 - <property name="expand">False</property>
3757 - <property name="fill">False</property>
3762 - <widget class="GtkCheckButton" id="print_page_url_checkbutton">
3763 - <property name="visible">True</property>
3764 - <property name="can_focus">True</property>
3765 - <property name="label" translatable="yes">Page _URL</property>
3766 - <property name="use_underline">True</property>
3767 - <property name="relief">GTK_RELIEF_NORMAL</property>
3768 - <property name="focus_on_click">True</property>
3769 - <property name="active">False</property>
3770 - <property name="inconsistent">False</property>
3771 - <property name="draw_indicator">True</property>
3774 - <property name="padding">0</property>
3775 - <property name="expand">False</property>
3776 - <property name="fill">False</property>
3781 - <property name="padding">0</property>
3782 - <property name="expand">False</property>
3783 - <property name="fill">False</property>
3788 - <property name="padding">0</property>
3789 - <property name="expand">True</property>
3790 - <property name="fill">True</property>
3795 - <property name="padding">0</property>
3796 - <property name="expand">True</property>
3797 - <property name="fill">True</property>
3802 - <property name="padding">0</property>
3803 - <property name="expand">True</property>
3804 - <property name="fill">True</property>
3809 - <property name="tab_expand">False</property>
3810 - <property name="tab_fill">True</property>
3815 - <widget class="GtkLabel" id="label276">
3816 - <property name="visible">True</property>
3817 - <property name="label" translatable="yes">Appearance</property>
3818 - <property name="use_underline">False</property>
3819 - <property name="use_markup">False</property>
3820 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3821 - <property name="wrap">False</property>
3822 - <property name="selectable">False</property>
3823 - <property name="xalign">0.5</property>
3824 - <property name="yalign">0.5</property>
3825 - <property name="xpad">0</property>
3826 - <property name="ypad">0</property>
3829 - <property name="type">tab</property>
3834 - <property name="padding">0</property>
3835 - <property name="expand">True</property>
3836 - <property name="fill">True</property>
3843 -<widget class="GtkDialog" id="print_progress_dialog">
3844 - <property name="border_width">7</property>
3845 - <property name="title" translatable="yes">Printing...</property>
3846 - <property name="type">GTK_WINDOW_TOPLEVEL</property>
3847 - <property name="window_position">GTK_WIN_POS_NONE</property>
3848 - <property name="modal">True</property>
3849 - <property name="resizable">True</property>
3850 - <property name="destroy_with_parent">True</property>
3851 - <property name="decorated">True</property>
3852 - <property name="skip_taskbar_hint">False</property>
3853 - <property name="skip_pager_hint">False</property>
3854 - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
3855 - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
3856 - <property name="has_separator">False</property>
3858 - <child internal-child="vbox">
3859 - <widget class="GtkVBox" id="dialog-vbox1">
3860 - <property name="visible">True</property>
3861 - <property name="homogeneous">False</property>
3862 - <property name="spacing">12</property>
3864 - <child internal-child="action_area">
3865 - <widget class="GtkHButtonBox" id="dialog-action_area1">
3866 - <property name="layout_style">GTK_BUTTONBOX_END</property>
3869 - <property name="padding">0</property>
3870 - <property name="expand">False</property>
3871 - <property name="fill">True</property>
3872 - <property name="pack_type">GTK_PACK_END</property>
3877 - <widget class="GtkHBox" id="hbox1">
3878 - <property name="border_width">5</property>
3879 - <property name="visible">True</property>
3880 - <property name="homogeneous">False</property>
3881 - <property name="spacing">12</property>
3884 - <widget class="GtkImage" id="image1">
3885 - <property name="visible">True</property>
3886 - <property name="stock">gtk-print</property>
3887 - <property name="icon_size">6</property>
3888 - <property name="xalign">0.5</property>
3889 - <property name="yalign">0</property>
3890 - <property name="xpad">0</property>
3891 - <property name="ypad">0</property>
3894 - <property name="padding">0</property>
3895 - <property name="expand">False</property>
3896 - <property name="fill">True</property>
3901 - <widget class="GtkVBox" id="vbox1">
3902 - <property name="visible">True</property>
3903 - <property name="homogeneous">False</property>
3904 - <property name="spacing">12</property>
3907 - <widget class="GtkLabel" id="label1">
3908 - <property name="visible">True</property>
3909 - <property name="label" translatable="yes"><span weight="bold" size="larger">Printing...</span></property>
3910 - <property name="use_underline">False</property>
3911 - <property name="use_markup">True</property>
3912 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3913 - <property name="wrap">False</property>
3914 - <property name="selectable">False</property>
3915 - <property name="xalign">0</property>
3916 - <property name="yalign">0.5</property>
3917 - <property name="xpad">0</property>
3918 - <property name="ypad">0</property>
3921 - <property name="padding">0</property>
3922 - <property name="expand">False</property>
3923 - <property name="fill">False</property>
3928 - <widget class="GtkTable" id="table1">
3929 - <property name="visible">True</property>
3930 - <property name="n_rows">2</property>
3931 - <property name="n_columns">2</property>
3932 - <property name="homogeneous">False</property>
3933 - <property name="row_spacing">6</property>
3934 - <property name="column_spacing">12</property>
3937 - <widget class="GtkLabel" id="label2">
3938 - <property name="visible">True</property>
3939 - <property name="label" translatable="yes"><b>Document:</b></property>
3940 - <property name="use_underline">False</property>
3941 - <property name="use_markup">True</property>
3942 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3943 - <property name="wrap">False</property>
3944 - <property name="selectable">False</property>
3945 - <property name="xalign">0</property>
3946 - <property name="yalign">0.5</property>
3947 - <property name="xpad">0</property>
3948 - <property name="ypad">0</property>
3951 - <property name="left_attach">0</property>
3952 - <property name="right_attach">1</property>
3953 - <property name="top_attach">0</property>
3954 - <property name="bottom_attach">1</property>
3955 - <property name="x_options">fill</property>
3956 - <property name="y_options"></property>
3961 - <widget class="GtkLabel" id="destination_label">
3962 - <property name="visible">True</property>
3963 - <property name="label" translatable="yes">DYNAMIC</property>
3964 - <property name="use_underline">False</property>
3965 - <property name="use_markup">True</property>
3966 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3967 - <property name="wrap">False</property>
3968 - <property name="selectable">False</property>
3969 - <property name="xalign">0</property>
3970 - <property name="yalign">0.5</property>
3971 - <property name="xpad">0</property>
3972 - <property name="ypad">0</property>
3975 - <property name="left_attach">0</property>
3976 - <property name="right_attach">1</property>
3977 - <property name="top_attach">1</property>
3978 - <property name="bottom_attach">2</property>
3979 - <property name="x_options">fill</property>
3980 - <property name="y_options"></property>
3985 - <widget class="GtkLabel" id="document">
3986 - <property name="visible">True</property>
3987 - <property name="can_focus">True</property>
3988 - <property name="label" translatable="yes">DYNAMIC</property>
3989 - <property name="use_underline">False</property>
3990 - <property name="use_markup">True</property>
3991 - <property name="justify">GTK_JUSTIFY_LEFT</property>
3992 - <property name="wrap">True</property>
3993 - <property name="selectable">True</property>
3994 - <property name="xalign">0</property>
3995 - <property name="yalign">0.5</property>
3996 - <property name="xpad">0</property>
3997 - <property name="ypad">0</property>
4000 - <property name="left_attach">1</property>
4001 - <property name="right_attach">2</property>
4002 - <property name="top_attach">0</property>
4003 - <property name="bottom_attach">1</property>
4004 - <property name="y_options"></property>
4009 - <widget class="GtkLabel" id="destination">
4010 - <property name="visible">True</property>
4011 - <property name="can_focus">True</property>
4012 - <property name="label" translatable="yes">DYNAMIC</property>
4013 - <property name="use_underline">False</property>
4014 - <property name="use_markup">False</property>
4015 - <property name="justify">GTK_JUSTIFY_LEFT</property>
4016 - <property name="wrap">True</property>
4017 - <property name="selectable">True</property>
4018 - <property name="xalign">0</property>
4019 - <property name="yalign">0.5</property>
4020 - <property name="xpad">0</property>
4021 - <property name="ypad">0</property>
4024 - <property name="left_attach">1</property>
4025 - <property name="right_attach">2</property>
4026 - <property name="top_attach">1</property>
4027 - <property name="bottom_attach">2</property>
4028 - <property name="y_options"></property>
4033 - <property name="padding">0</property>
4034 - <property name="expand">False</property>
4035 - <property name="fill">True</property>
4040 - <widget class="GtkProgressBar" id="progressbar">
4041 - <property name="visible">True</property>
4042 - <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
4043 - <property name="fraction">0</property>
4044 - <property name="pulse_step">0.1</property>
4045 - <property name="text" translatable="yes"></property>
4048 - <property name="padding">0</property>
4049 - <property name="expand">False</property>
4050 - <property name="fill">False</property>
4055 - <property name="padding">0</property>
4056 - <property name="expand">True</property>
4057 - <property name="fill">True</property>
4062 - <property name="padding">0</property>
4063 - <property name="expand">True</property>
4064 - <property name="fill">True</property>
4069 - <widget class="GtkHBox" id="hbox2">
4070 - <property name="visible">True</property>
4071 - <property name="homogeneous">False</property>
4072 - <property name="spacing">0</property>
4079 - <property name="padding">0</property>
4080 - <property name="expand">True</property>
4081 - <property name="fill">True</property>
4089 diff -urN galeon-2.0.7.orig/ui/print-tab.xml galeon-2.0.7/ui/print-tab.xml
4090 --- galeon-2.0.7.orig/ui/print-tab.xml 1970-01-01 01:00:00.000000000 +0100
4091 +++ galeon-2.0.7/ui/print-tab.xml 2009-02-15 09:39:07.000000000 +0100
4093 +<?xml version="1.0"?>
4094 +<!--*- mode: xml -*-->
4096 + <object class="GtkVBox" id="custom_tab_container">
4097 + <property name="border_width">12</property>
4098 + <property name="visible">True</property>
4099 + <property name="homogeneous">False</property>
4100 + <property name="spacing">18</property>
4102 + <object class="GtkVBox" id="frame_box">
4103 + <property name="visible">True</property>
4104 + <property name="sensitive">False</property>
4105 + <property name="homogeneous">False</property>
4106 + <property name="spacing">6</property>
4108 + <object class="GtkLabel" id="label273">
4109 + <property name="visible">True</property>
4110 + <property name="label" translatable="yes"><b>Frames</b></property>
4111 + <property name="use_underline">False</property>
4112 + <property name="use_markup">True</property>
4113 + <property name="justify">GTK_JUSTIFY_LEFT</property>
4114 + <property name="wrap">False</property>
4115 + <property name="selectable">False</property>
4116 + <property name="xalign">0</property>
4117 + <property name="yalign">0.5</property>
4118 + <property name="xpad">0</property>
4119 + <property name="ypad">0</property>
4120 + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
4121 + <property name="width_chars">-1</property>
4122 + <property name="single_line_mode">False</property>
4123 + <property name="angle">0</property>
4126 + <property name="padding">0</property>
4127 + <property name="expand">False</property>
4128 + <property name="fill">False</property>
4132 + <object class="GtkAlignment" id="alignment5">
4133 + <property name="visible">True</property>
4134 + <property name="xalign">0.5</property>
4135 + <property name="yalign">0.5</property>
4136 + <property name="xscale">1</property>
4137 + <property name="yscale">1</property>
4138 + <property name="top_padding">0</property>
4139 + <property name="bottom_padding">0</property>
4140 + <property name="left_padding">12</property>
4141 + <property name="right_padding">0</property>
4143 + <object class="GtkVBox" id="vbox144">
4144 + <property name="visible">True</property>
4145 + <property name="homogeneous">False</property>
4146 + <property name="spacing">6</property>
4148 + <object class="GtkRadioButton" id="print_frames_normal">
4149 + <property name="visible">True</property>
4150 + <property name="can_focus">True</property>
4151 + <property name="label" translatable="yes">As laid out on the _screen</property>
4152 + <property name="use_underline">True</property>
4153 + <property name="relief">GTK_RELIEF_NORMAL</property>
4154 + <property name="focus_on_click">True</property>
4155 + <property name="active">False</property>
4156 + <property name="inconsistent">False</property>
4157 + <property name="draw_indicator">True</property>
4160 + <property name="padding">0</property>
4161 + <property name="expand">False</property>
4162 + <property name="fill">False</property>
4166 + <object class="GtkRadioButton" id="print_frames_selected">
4167 + <property name="visible">True</property>
4168 + <property name="can_focus">True</property>
4169 + <property name="label" translatable="yes">O_nly the selected frame</property>
4170 + <property name="use_underline">True</property>
4171 + <property name="relief">GTK_RELIEF_NORMAL</property>
4172 + <property name="focus_on_click">True</property>
4173 + <property name="active">False</property>
4174 + <property name="inconsistent">False</property>
4175 + <property name="draw_indicator">True</property>
4176 + <property name="group">print_frames_normal</property>
4179 + <property name="padding">0</property>
4180 + <property name="expand">False</property>
4181 + <property name="fill">False</property>
4185 + <object class="GtkRadioButton" id="print_frames_separately">
4186 + <property name="visible">True</property>
4187 + <property name="can_focus">True</property>
4188 + <property name="label" translatable="yes">_Each frame separately</property>
4189 + <property name="use_underline">True</property>
4190 + <property name="relief">GTK_RELIEF_NORMAL</property>
4191 + <property name="focus_on_click">True</property>
4192 + <property name="active">False</property>
4193 + <property name="inconsistent">False</property>
4194 + <property name="draw_indicator">True</property>
4195 + <property name="group">print_frames_normal</property>
4198 + <property name="padding">0</property>
4199 + <property name="expand">False</property>
4200 + <property name="fill">False</property>
4207 + <property name="padding">0</property>
4208 + <property name="expand">True</property>
4209 + <property name="fill">True</property>
4214 + <property name="padding">0</property>
4215 + <property name="expand">False</property>
4216 + <property name="fill">False</property>
4220 + <object class="GtkVBox" id="vbox141">
4221 + <property name="visible">True</property>
4222 + <property name="homogeneous">False</property>
4223 + <property name="spacing">6</property>
4225 + <object class="GtkLabel" id="label272">
4226 + <property name="visible">True</property>
4227 + <property name="label" translatable="yes"><b>Background</b></property>
4228 + <property name="use_underline">False</property>
4229 + <property name="use_markup">True</property>
4230 + <property name="justify">GTK_JUSTIFY_LEFT</property>
4231 + <property name="wrap">False</property>
4232 + <property name="selectable">False</property>
4233 + <property name="xalign">0</property>
4234 + <property name="yalign">0.5</property>
4235 + <property name="xpad">0</property>
4236 + <property name="ypad">0</property>
4237 + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
4238 + <property name="width_chars">-1</property>
4239 + <property name="single_line_mode">False</property>
4240 + <property name="angle">0</property>
4243 + <property name="padding">0</property>
4244 + <property name="expand">False</property>
4245 + <property name="fill">False</property>
4249 + <object class="GtkAlignment" id="alignment4">
4250 + <property name="visible">True</property>
4251 + <property name="xalign">0.5</property>
4252 + <property name="yalign">0.5</property>
4253 + <property name="xscale">1</property>
4254 + <property name="yscale">1</property>
4255 + <property name="top_padding">0</property>
4256 + <property name="bottom_padding">0</property>
4257 + <property name="left_padding">12</property>
4258 + <property name="right_padding">0</property>
4260 + <object class="GtkVBox" id="vbox142">
4261 + <property name="visible">True</property>
4262 + <property name="homogeneous">False</property>
4263 + <property name="spacing">6</property>
4265 + <object class="GtkCheckButton" id="print_bg_colors_checkbutton">
4266 + <property name="visible">True</property>
4267 + <property name="can_focus">True</property>
4268 + <property name="label" translatable="yes">Print background c_olors</property>
4269 + <property name="use_underline">True</property>
4270 + <property name="relief">GTK_RELIEF_NORMAL</property>
4271 + <property name="focus_on_click">True</property>
4272 + <property name="active">False</property>
4273 + <property name="inconsistent">False</property>
4274 + <property name="draw_indicator">True</property>
4277 + <property name="padding">0</property>
4278 + <property name="expand">False</property>
4279 + <property name="fill">False</property>
4283 + <object class="GtkCheckButton" id="print_bg_images_checkbutton">
4284 + <property name="visible">True</property>
4285 + <property name="can_focus">True</property>
4286 + <property name="label" translatable="yes">Print background i_mages</property>
4287 + <property name="use_underline">True</property>
4288 + <property name="relief">GTK_RELIEF_NORMAL</property>
4289 + <property name="focus_on_click">True</property>
4290 + <property name="active">False</property>
4291 + <property name="inconsistent">False</property>
4292 + <property name="draw_indicator">True</property>
4295 + <property name="padding">0</property>
4296 + <property name="expand">False</property>
4297 + <property name="fill">False</property>
4304 + <property name="padding">0</property>
4305 + <property name="expand">True</property>
4306 + <property name="fill">True</property>
4311 + <property name="padding">0</property>
4312 + <property name="expand">False</property>
4313 + <property name="fill">False</property>
4317 + <object class="GtkHBox" id="hbox1">
4318 + <property name="visible">True</property>
4319 + <property name="homogeneous">False</property>
4320 + <property name="spacing">18</property>
4322 + <object class="GtkVBox" id="vbox140">
4323 + <property name="visible">True</property>
4324 + <property name="homogeneous">False</property>
4325 + <property name="spacing">6</property>
4327 + <object class="GtkLabel" id="label269">
4328 + <property name="visible">True</property>
4329 + <property name="label" translatable="yes"><b>Footers</b></property>
4330 + <property name="use_underline">False</property>
4331 + <property name="use_markup">True</property>
4332 + <property name="justify">GTK_JUSTIFY_LEFT</property>
4333 + <property name="wrap">False</property>
4334 + <property name="selectable">False</property>
4335 + <property name="xalign">0</property>
4336 + <property name="yalign">0.5</property>
4337 + <property name="xpad">0</property>
4338 + <property name="ypad">0</property>
4339 + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
4340 + <property name="width_chars">-1</property>
4341 + <property name="single_line_mode">False</property>
4342 + <property name="angle">0</property>
4345 + <property name="padding">0</property>
4346 + <property name="expand">False</property>
4347 + <property name="fill">False</property>
4351 + <object class="GtkAlignment" id="alignment2">
4352 + <property name="visible">True</property>
4353 + <property name="xalign">0.5</property>
4354 + <property name="yalign">0.5</property>
4355 + <property name="xscale">1</property>
4356 + <property name="yscale">1</property>
4357 + <property name="top_padding">0</property>
4358 + <property name="bottom_padding">0</property>
4359 + <property name="left_padding">12</property>
4360 + <property name="right_padding">0</property>
4362 + <object class="GtkVBox" id="vbox125">
4363 + <property name="visible">True</property>
4364 + <property name="homogeneous">False</property>
4365 + <property name="spacing">6</property>
4367 + <object class="GtkCheckButton" id="print_page_numbers_checkbutton">
4368 + <property name="visible">True</property>
4369 + <property name="can_focus">True</property>
4370 + <property name="label" translatable="yes">Page _numbers</property>
4371 + <property name="use_underline">True</property>
4372 + <property name="relief">GTK_RELIEF_NORMAL</property>
4373 + <property name="focus_on_click">True</property>
4374 + <property name="active">False</property>
4375 + <property name="inconsistent">False</property>
4376 + <property name="draw_indicator">True</property>
4379 + <property name="padding">0</property>
4380 + <property name="expand">False</property>
4381 + <property name="fill">False</property>
4385 + <object class="GtkCheckButton" id="print_date_checkbutton">
4386 + <property name="visible">True</property>
4387 + <property name="can_focus">True</property>
4388 + <property name="label" translatable="yes">_Date</property>
4389 + <property name="use_underline">True</property>
4390 + <property name="relief">GTK_RELIEF_NORMAL</property>
4391 + <property name="focus_on_click">True</property>
4392 + <property name="active">False</property>
4393 + <property name="inconsistent">False</property>
4394 + <property name="draw_indicator">True</property>
4397 + <property name="padding">0</property>
4398 + <property name="expand">False</property>
4399 + <property name="fill">False</property>
4406 + <property name="padding">0</property>
4407 + <property name="expand">False</property>
4408 + <property name="fill">False</property>
4413 + <property name="padding">0</property>
4414 + <property name="expand">False</property>
4415 + <property name="fill">False</property>
4419 + <object class="GtkVBox" id="vbox138">
4420 + <property name="visible">True</property>
4421 + <property name="homogeneous">False</property>
4422 + <property name="spacing">6</property>
4424 + <object class="GtkLabel" id="label267">
4425 + <property name="visible">True</property>
4426 + <property name="label" translatable="yes"><b>Headers</b></property>
4427 + <property name="use_underline">False</property>
4428 + <property name="use_markup">True</property>
4429 + <property name="justify">GTK_JUSTIFY_LEFT</property>
4430 + <property name="wrap">False</property>
4431 + <property name="selectable">False</property>
4432 + <property name="xalign">0</property>
4433 + <property name="yalign">0.5</property>
4434 + <property name="xpad">0</property>
4435 + <property name="ypad">0</property>
4436 + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
4437 + <property name="width_chars">-1</property>
4438 + <property name="single_line_mode">False</property>
4439 + <property name="angle">0</property>
4442 + <property name="padding">0</property>
4443 + <property name="expand">False</property>
4444 + <property name="fill">False</property>
4448 + <object class="GtkAlignment" id="alignment3">
4449 + <property name="visible">True</property>
4450 + <property name="xalign">0.5</property>
4451 + <property name="yalign">0.5</property>
4452 + <property name="xscale">1</property>
4453 + <property name="yscale">1</property>
4454 + <property name="top_padding">0</property>
4455 + <property name="bottom_padding">0</property>
4456 + <property name="left_padding">12</property>
4457 + <property name="right_padding">0</property>
4459 + <object class="GtkVBox" id="vbox124">
4460 + <property name="visible">True</property>
4461 + <property name="homogeneous">False</property>
4462 + <property name="spacing">6</property>
4464 + <object class="GtkCheckButton" id="print_page_title_checkbutton">
4465 + <property name="visible">True</property>
4466 + <property name="can_focus">True</property>
4467 + <property name="label" translatable="yes">P_age title</property>
4468 + <property name="use_underline">True</property>
4469 + <property name="relief">GTK_RELIEF_NORMAL</property>
4470 + <property name="focus_on_click">True</property>
4471 + <property name="active">False</property>
4472 + <property name="inconsistent">False</property>
4473 + <property name="draw_indicator">True</property>
4476 + <property name="padding">0</property>
4477 + <property name="expand">False</property>
4478 + <property name="fill">False</property>
4482 + <object class="GtkCheckButton" id="print_page_url_checkbutton">
4483 + <property name="visible">True</property>
4484 + <property name="can_focus">True</property>
4485 + <property name="label" translatable="yes">_Page address</property>
4486 + <property name="use_underline">True</property>
4487 + <property name="relief">GTK_RELIEF_NORMAL</property>
4488 + <property name="focus_on_click">True</property>
4489 + <property name="active">False</property>
4490 + <property name="inconsistent">False</property>
4491 + <property name="draw_indicator">True</property>
4494 + <property name="padding">0</property>
4495 + <property name="expand">False</property>
4496 + <property name="fill">False</property>
4503 + <property name="padding">0</property>
4504 + <property name="expand">True</property>
4505 + <property name="fill">True</property>
4510 + <property name="padding">0</property>
4511 + <property name="expand">False</property>
4512 + <property name="fill">False</property>
4517 + <property name="padding">0</property>
4518 + <property name="expand">False</property>
4519 + <property name="fill">False</property>
4524 diff -urN galeon-2.0.7.orig/utils/gul-gui.c galeon-2.0.7/utils/gul-gui.c
4525 --- galeon-2.0.7.orig/utils/gul-gui.c 2008-07-04 18:30:58.000000000 +0200
4526 +++ galeon-2.0.7/utils/gul-gui.c 2009-02-15 09:39:07.000000000 +0100
4527 @@ -801,3 +801,21 @@
4528 g_error_free (error);
4533 +checkbutton_toggled_cb (GtkToggleButton *button,
4536 + eel_gconf_set_boolean (pref, gtk_toggle_button_get_active (button));
4541 +gul_gui_connect_checkbutton_to_gconf (GtkWidget *widget,
4544 + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget),
4545 + eel_gconf_get_boolean (pref));
4546 + g_signal_connect (widget, "toggled",
4547 + G_CALLBACK (checkbutton_toggled_cb), (gpointer) pref);
4549 diff -urN galeon-2.0.7.orig/utils/gul-gui.h galeon-2.0.7/utils/gul-gui.h
4550 --- galeon-2.0.7.orig/utils/gul-gui.h 2008-07-04 18:30:58.000000000 +0200
4551 +++ galeon-2.0.7/utils/gul-gui.h 2009-02-15 09:39:07.000000000 +0100
4553 void gul_gui_help (GtkWindow* parent,
4555 const char *link_id);
4556 +void gul_gui_connect_checkbutton_to_gconf (GtkWidget *widget,
4557 + const char *pref);