Commit Graph

27 Commits

Author SHA1 Message Date
Adrian Johnson
dd7e8e9414 Don't rotate pdf landscape output 2012-09-12 15:38:37 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Adrian Johnson
48cf7d9e7e Set unix printer hard margins on print context 2009-12-05 13:45:55 +01:00
Christian Persch
33552c75b1 Revert "Set unix printer hard margins on print context"
This reverts commit 826d800b74.
2009-12-01 19:00:58 +01:00
Adrian Johnson
826d800b74 Set unix printer hard margins on print context 2009-12-01 17:39:26 +01:00
Marek Kasik
0ef74c936f Add paper size combo and orientation combo to print dialog
Paper size combo and orientation combo can be added by
gtk_print_operation_set_embed_page_setup_dialog() to GtkPrinUnixDialog
now. This function induce calling of
gtk_print_unix_dailog_set_embed_page_setup_dialog() after creation of
dialog. These two functions control embed-page-setup-dialog properties
in GtkPrintOperation and in GtkPrintUnixDialog.
There is also new function gtk_print_unix_dialog_get_page_setup_set()
which says whether page setup was set by user.
Selected page setup is stored as default page setup in
GtkPrintOperation.
New class is added, its name is GtkCustomPaperUnixDialog. The class
manages custom sizes. It is derived from GtkPageSetupUnixDialog's
CustomPaperDialog structure.
Page layout preview is modified, so, it shows dimensions of current
page setup (mm or inch - depends on locale). It also shows the name of
actual paper if page setup dialog is not embedded (paper size combo is
not visible).
gtk-demo is actualized to include this new feature.
2009-07-10 11:28:31 +02:00
Marek Kasik
a12a583c99 Add ability to print selection
Add a new radio button "Selection" to the print dialog. Its presence
depends on calling of functions gtk_print_operation_set_support_selection()
and gtk_print_dialog_unix_set_support_selection().
Sensitivity of the radio depends on calling of
functions gtk_print_operation_set_has_selection() and
gtk_print_dialog_unix_set_has_selection().
There are new properties GtkPrintUnixDialog::support-selection,
GtkPrintUnixDialog::has-selection, GtkPrintOperation::support-selection
and GtkPrintOperation::has-selection. Corresponding getters are
gtk_print_dialog_unix_get_support_selection(),
gtk_print_dialog_unix_get_has_selection(),
gtk_print_operation_get_support_selection() and
gtk_print_operation_get_has_selection().
Application has to set number of pages to which the selection will be formated
in GtkPrintOperation::begin-print's callback by the
gtk_print_operation_set_n_pages() function (bug #344519).
There is also new property GtkPrintUnixDialog::manual-capabilities controled by
gtk_print_unix_dialog_set_manual_capabilities() and
gtk_print_unix_dialog_get_manual_capabilities().
2009-06-08 15:37:32 +02:00
Marek Kasik
91190ce281 Add ability to print in number-up mode for file backend and lpr backend
GtkPrintOperation is now able to render multiple pages per sheet by its
own. The most important changes are in these functions:
  * increment_page_sequence
  * prepare_data
  * common_render_page
  * print_pages_idle
Patch also changes set of choices for 2 pages per sheet mode when
landscape orientation is used to "Top to bottom" and "Bottom to top".
2009-05-13 18:28:42 +02:00
Marek Kasik
8ff5d4ffc4 Bug 339318 - Allow page rendering to (optionally) happen in a thread
2008-12-19  Marek Kasik  <mkasik@redhat.com>

	Bug 339318 - Allow page rendering to (optionally) happen in a thread

	* gtk/gtk.symbols: API change
	* doc/reference/gtk/gtk-sections.txt: API change
	* gtk/gtkprintoperation-private.h
	* gtk/gtkprintoperation.h
	* gtk/gtkprintoperation.c: Adds 2 new functions
	   gtk_print_operation_set_defer_drawing()
	     - Sets up the GtkPrintOperation to wait for calling of
	       gtk_print_operation_draw_page_finish() from application. It can
	       be used for drawing page in another thread.
	       This function must be called in the callback of "draw-page"
	       signal.
	   gtk_print_operation_draw_page_finish()
	     - Signalize that drawing of particular page is complete.
	       It is called after completion of page drawing (e.g. drawing
	       in another thread).
	       If gtk_print_operation_set_defer_drawing() was called before,
	       then this function has to be called by application. In another
	       case it is called by the library itself.

svn path=/trunk/; revision=21913
2008-12-19 16:42:05 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Matthias Clasen
a0812b9ed5 forgotten file 2006-06-08 16:53:26 +00:00
Alexander Larsson
79041f07cd Update windows to build with new APIs and first cut at preview work.
2006-06-08  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkprintoperation-win32.c:
	Update windows to build with new APIs and first cut
	at preview work.

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation.c
	Various updates needed when making the preview work on win32.

	* tests/print-editor.c:
	Print, don't preview.
2006-06-08 09:09:50 +00:00
Matthias Clasen
8c72227bd7 Add more docs, cleanups 2006-06-08 03:25:28 +00:00
Alexander Larsson
9bea38595f Clean up APIs: Make async a setting instead of separate calls. Combine
2006-06-07  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation.[ch]:
	Clean up APIs:
	Make async a setting instead of separate calls.
	Combine settings like show_dialog, show_preview and pdf_target into
	an action enum that you pass to gtk_print_dialog_run().

	* tests/print-editor.c:
	* tests/testnouiprint.c:
	* tests/testprint.c:
	* demos/gtk-demo/printing.c:
	Update to new APIs
2006-06-07 15:09:03 +00:00
Matthias Clasen
67dc5155af Add a GtkPrintOperation::show-preview property 2006-06-03 03:30:21 +00:00
Alexander Larsson
fad69ba06c Add gtkprintoperationpreview.[ch] Set default preview command. Hardcoded
2006-06-02  Alexander Larsson  <alexl@redhat.com>

	* gtk/Makefile.am:
	Add gtkprintoperationpreview.[ch]
	Set default preview command. Hardcoded for now.

	* gtk/gtkmarshalers.list:
	Add BOOLEAN:OBJECT,OBJECT,OBJECT

	* gtk/gtkprintbackend.c:
	Add preview command property.

	* gtk/gtkprintcontext.[ch]:
	Make less dependent on PrintOperation for output settings
	Externally set cairo_t and dpi. Resettable.
	Create fontmap without metrics hinting (so that print preview
	text layout doesn't depend on zoom level).

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation.[ch]:
	Initial work on print preview API and default implementation
	using an external preview app.

	* gtk/gtkprintoperation-win32.c:
	Some needed updates. Not done, needs more work.

	* gtk/gtkprintoperationpreview.[ch]:
	New interface used in print preview api.

	* gtk/gtkprintunixdialog.c:
	Add print preview dialog.

	* tests/print-editor.c:
	Test using an custom print preview widget.
2006-06-02 15:16:13 +00:00
Matthias Clasen
09f4906d21 bits from the preview patch 2006-06-01 12:38:07 +00:00
Matthias Clasen
7f6f61c9ff Custom tab label 2006-05-24 16:15:15 +00:00
Matthias Clasen
57a052b0b0 Add a boolean show-progress property, and show a progress dialog if it is
2006-05-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkprintoperation.h:
	* gtk/gtkprintoperation.c: Add a boolean show-progress
	property, and show a progress dialog if it is set to TRUE.

	* gtk/gtkprintoperation.c (pdf_end_run):
	* gtk/gtkprintoperation-win32.c (win32_end_run):
	* gtk/gtkprintoperation-unix.c (unix_end_run):
	* gtk/gtkprintoperation-private.h: Add a cancelled
	parameter to end_run, and call it even if the print
	operation was cancelled.
2006-05-23 16:30:45 +00:00
Alexander Larsson
d2cb6c6eb2 Make sure grab-notify is emitted on toplevels as well as child widgets.
2006-05-22  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkmain.c:
	Make sure grab-notify is emitted on toplevels as well as
	child widgets.

	* gtk/Makefile.am:
	* gtk/gtkwin32embedwidget.[ch]
	Add new widget used for win32 port to embed gtk+
	widgets in windows dialog.

	* gtk/gtkmarshalers.list:
	Add POINTER:VOID

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation.[ch]:
	Generic support for custom widgets in print dialog.

	* gtk/gtkprintoperation-win32.c:
	Implement custom widget support for win32.

	* tests/print-editor.c:
	Allow setting of font using custom widgets in the print dialog.
2006-05-22 17:19:10 +00:00
Matthias Clasen
a59a999d7c New function to cancel a running print operation.
2006-05-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkprintoperation.h:
	* gtk/gtkprintoperation.c (gtk_print_operation_cancel): New function
	to cancel a running print operation.

	* gtk/gtkprintoperation-private.h (struct _GtkPrintOperationPrivate):
	Add a cancelled flag, use g types, use bitfields.

	* gtk/gtkprintoperation.c (print_pages): Clean up after the idle
	in the synchronous case.
2006-05-19 19:25:51 +00:00
Matthias Clasen
7402657672 Add a GtkPrintOperation:: paginate signal that gets emitted to paginate a
2006-05-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintoperation.h:
	* gtk/gtkprintoperation.c: Add a GtkPrintOperation:: paginate signal
	that gets emitted to paginate a document in chunks.
2006-05-18 20:09:05 +00:00
Alexander Larsson
3f529199e5 Added gtk_print_job_set/get_track_print_status
2006-05-15  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkprintjob.[ch]:
	Added gtk_print_job_set/get_track_print_status

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation.[ch]:
	Add gtk_print_operation_set_track_print_status.

	* gtk/gtkprintoperation-unix.c:
	Implement track_print_status on unix

	* gtk/gtkprintoperation-win32.c:
	Implement track_print_status on win32

	* gtk/gtk.symbols:
	Added symbols

	* modules/printbackends/cups/gtkprintbackendcups.c:
	Implement track_print_status for cups

	* tests/print-editor.c:
	Test track_print_status.
2006-05-15 16:22:38 +00:00
Alexander Larsson
c36d8f3cb3 Added new symbols
2006-05-04  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtk.symbols:
	Added new symbols

	* gtk/gtkpagesetupunixdialog.c:
	* gtk/gtkprintunixdialog.c:
	Destroy backends when finalizing dialogs.
	Fix printer leak in selected_printer_changed.

	* gtk/gtkprintbackend.[ch]:
	Convert from interface to baseclass.
	Move printer hashtable here so that the baseclass can handle
	the slightly complicated ownership model.
	Add gtk_print_backend_destroy which runs the dispose method,
	causing the ref-cycles between the backend and its printers
	to be broken.
	Add gtk_print_backend_unref_at_idle().

	* gtk/gtkprinter.[ch]:
	GtkPrinter objects now ref their backend so that its always
	availible, since its needed for the printer object to work.
	This causes a reference-cycle that is broken using
	gtk_print_backend_destroy.
	Add gtk_printer_compare.

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation.c:
	Implement !show_dialog for unix.
	Make sure the print data is fully spooled before returning
	from a sync run_dialog.


	* modules/printbackends/cups/gtkcupsutils.[ch]:
	Add gtk_cups_request_ipp_add_strings

	* modules/printbackends/cups/gtkprintbackendcups.c:
	* modules/printbackends/cups/gtkprintercups.c:
	* modules/printbackends/lpr/gtkprintbackendlpr.c:
	* modules/printbackends/pdf/gtkprintbackendpdf.c:
	Convert backends to derive instead of implementing interface.
	Move common code into baseclass.
	CUPS:
	  Remove the printer polling in dispose, not finalize.
	  In the cups watch, remove the backend at idle instead of
	  immediately, since the unref can cause the module to be unloaded.
	  Limit the number of printer attributes requested
	  Get printer uri in initial printer listing so that we can use
	  the printer object immediately.

	* tests/Makefile.am:
	* tests/testnouiprint.c:
	Add testcase for !show_dialog.
2006-05-04 13:43:32 +00:00
Matthias Clasen
2e9cc2f693 Refactor the gtk_print_operation_run() code and add an _async version.
2006-04-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkprintoperation.c (gtk_print_operation_run_async): Refactor the
	gtk_print_operation_run() code and add an _async version.

	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c
	(_gtk_print_operation_platform_backend_run_dialog_async)
	(gtk_print_run_page_setup_dialog_async): Variants of the run functions
	which don't call gtk_dialog_run(), but only show the dialog and return,
	and handle the response in a signal handler.

	* gtk/gtkprintoperation-win32.c (gtk_print_run_page_setup_dialog_async)
	(_gtk_print_operation_platform_backend_run_dialog_async): Implement these
	by calling the sync versions.
2006-04-24 17:00:44 +00:00
Alexander Larsson
27f746fbd0 Merge the gtk-printing branch. For more detailed ChangeLog entries, see
2006-04-21  Alexander Larsson  <alexl@redhat.com>

        Merge the gtk-printing branch.
	For more detailed ChangeLog entries, see the branch.

	* .cvsignore:
	* Makefile.am:
	* configure.in:
	* docs/tools/widgets.c:
	* gtk+-unix-print-2.0.pc.in:
	* gtk/Makefile.am:
	* gtk/gen-paper-names.c:
	* gtk/gtk.h:
	* gtk/gtk.symbols:
	* gtk/gtkenums.h:
	* gtk/gtkiconfactory.c:
	* gtk/gtkmarshalers.list:
	* gtk/gtkpagesetup.[ch]:
	* gtk/gtkpagesetupunixdialog.[ch]:
	* gtk/gtkpapersize.[ch]:
	* gtk/gtkprint-win32.[ch]:
	* gtk/gtkprintbackend.[ch]:
	* gtk/gtkprintcontext.[ch]:
	* gtk/gtkprinter-private.h:
	* gtk/gtkprinter.[ch]:
	* gtk/gtkprinteroption.[ch]:
	* gtk/gtkprinteroptionset.[ch]:
	* gtk/gtkprinteroptionwidget.[ch]:
	* gtk/gtkprintjob.[ch]:
	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation-win32.c:
	* gtk/gtkprintoperation.[ch]:
	* gtk/gtkprintsettings.[ch]:
	* gtk/gtkprintunixdialog.[ch]:
	* gtk/paper_names.c:
	* gtk/paper_names_offsets.c:
	Platform independent printing API and implementations
	for unix and windows.

	* gtk/gtkstock.h:
	* gtk/stock-icons/24/gtk-orientation-landscape.png:
	* gtk/stock-icons/24/gtk-orientation-portrait.png:
	* gtk/stock-icons/24/gtk-orientation-reverse-landscape.png:
	Add stock icons for page orientation.

	* modules/Makefile.am:
	* modules/printbackends/Makefile.am:
	* modules/printbackends/cups/Makefile.am:
	* modules/printbackends/cups/gtkcupsutils.[ch]:
	* modules/printbackends/cups/gtkprintbackendcups.[ch]:
	* modules/printbackends/cups/gtkprintercups.[ch]:

	Cups printing backend for unix.

	* modules/printbackends/lpr/Makefile.am:
	* modules/printbackends/lpr/gtkprintbackendlpr.[ch]:
	lpr printing backend for unix.

	* modules/printbackends/pdf/Makefile.am:
	* modules/printbackends/pdf/gtkprintbackendpdf.[ch]:
	print-to-pdf printing backend for unix.

	* tests/.cvsignore:
	* tests/Makefile.am:
	* tests/print-editor.c:
	Test application for printing.

	* gdk/gdk.symbols:
	* gdk/win32/gdkevents-win32.c:
	* gdk/win32/gdkwin32.h:
	Add gdk_win32_set_modal_dialog_libgtk_only so that we can pump the
	mainloop while displaying a win32 common dialog.

	* gdk/directfb/Makefile.am:
	Whitespace cleanup.
2006-04-21 15:09:32 +00:00