Commit Graph

118 Commits

Author SHA1 Message Date
Matthias Clasen
5e30c5d986 More default property value fixes
svn path=/trunk/; revision=19278
2007-12-28 18:10:32 +00:00
Matthias Clasen
4896e24bb1 Require gtk-doc 1.8
2007-11-25  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.8

        * */*.c: Use gtk-doc abbreviations for examples in docs.


svn path=/trunk/; revision=19041
2007-11-25 06:51:19 +00:00
Murray Cumming
5d1a5ac216 Revert the change on 2007-04-29 (Also check the default handler when
2007-10-05  Murray Cumming  <murrayc@murrayc.com>

* gtk/gtkprintoperation.c: (print_pages_idle):
Revert the change on 2007-04-29 (Also check
the default handler when deciding whether to emit the
paginate signal.  (#345345, Yevgen Muntyan)).
This stopped printing from working in gtkmm, and is apparently 
not appropriate anyway. Bug #482089.

svn path=/trunk/; revision=18885
2007-10-05 08:18:43 +00:00
Matthias Clasen
b0cc27c30b Some more fixed to prevent segfaults with missing or nonsensical ranges.
2007-09-21  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintoperation.c (print_pages_idle): Some more
        fixed to prevent segfaults with missing or nonsensical ranges.


svn path=/trunk/; revision=18854
2007-09-21 15:38:29 +00:00
Jean Brefort
e7131b2f91 abort printing when the range is NULL. (#478803)
2007-09-21  Jean Brefort  <jean.brefort@normalesup.org>

	* gtk/gtkprintoperation.c: (print_pages_idle): abort printing 
	when the range is NULL. (#478803)


svn path=/trunk/; revision=18853
2007-09-21 14:50:06 +00:00
Matthias Clasen
2470acff89 More of the same
svn path=/trunk/; revision=17925
2007-05-26 07:13:52 +00:00
Torsten Schoenfeld
2293bbcd2d Unset priv->platform_data and priv->free_platform_data to prevent
2007-05-15  Torsten Schoenfeld  <kaffeetisch@gmx.de>

	* gtk/gtkprintoperation.c (pdf_end_run): Unset priv->platform_data and
	priv->free_platform_data to prevent gtk_print_operation_finalize()
	from freeing the cairo surface a second time.

svn path=/trunk/; revision=17851
2007-05-15 17:57:27 +00:00
Matthias Clasen
10862a344a Fix a compiler warning.
svn path=/trunk/; revision=17729
2007-04-30 06:04:48 +00:00
Matthias Clasen
23263cd43c Translate the default job name, and don't utf8-validate the job name in
2007-04-30  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintoperation.c: Translate the default job
        name, and don't utf8-validate the job name in the
        setter.  (#421993, Morten Welinder)



svn path=/trunk/; revision=17726
2007-04-30 05:08:26 +00:00
Matthias Clasen
a788ef97a4 Fix some issues with reference handling in the printing code. (#429902,
2007-04-29  Matthias Clasen <mclasen@redhat.com>

        Fix some issues with reference handling in the printing
        code.  (#429902, Mathias Hasselmann)

        * gtk/gtkprintoperation.c (gtk_print_operation_finalize):
        Unref the print context, if we have one.
        (gtk_print_operation_done): Add a default ::done handler
        that unrefs the print context.
        (preview_ready): Take a reference on the print operation
        preview here.
        (print_pages_idle): ...not here,
        (preview_print_idle_done): ...and release it here.

        * tests/print-editor.c (preview_cb): Take a reference
        on the print operation here.

svn path=/trunk/; revision=17722
2007-04-30 04:45:33 +00:00
Matthias Clasen
7f95ef5ef3 Don't get stuck in a recursive mainloop if a synchronous preview is
2007-04-29  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintoperation.c (print_pages_idle): Don't get
        stuck in a recursive mainloop if a synchronous preview
        is cancelled.

svn path=/trunk/; revision=17721
2007-04-30 02:47:41 +00:00
Matthias Clasen
b9856ac887 Make the emission of ::end-print and ::done consistent for previews.
2007-04-29  Matthias Clasen <mclasen@redhat.com>

        Make the emission of ::end-print and ::done consistent
        for previews.  (#347567, Yevgen Muntyan)

        * gtk/gtkprintoperation.c (preview_iface_end_preview): Set
        the finished status here.
        (preview_end_run): ...and not here.
        (print_pages_idle_done): Emit ::done for a cancelled preview.
        (print_pages_idle): If a preview has been cancelled, don't
        emit ::ready, but emit ::end-print.

        tests/print-editor.c: Use ::end-print to undo allocations
        from ::begin-print.


svn path=/trunk/; revision=17719
2007-04-30 02:18:36 +00:00
Matthias Clasen
86b19df30c Document that a print operation can be run only once, and add a
2007-04-29  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintoperation.c (gtk_print_operation_run): Document
        that a print operation can be run only once, and add a
        corresponding g_return_if_fail().   (#379399, Masao Mutoh)



svn path=/trunk/; revision=17715
2007-04-29 18:55:12 +00:00
Matthias Clasen
924d9163b4 Fix the build
svn path=/trunk/; revision=17701
2007-04-29 06:50:42 +00:00
Matthias Clasen
557ff70925 Also check the default handler when deciding whether to emit the paginate
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintoperation.c (print_pages_idle): Also check
        the default handler when deciding whether to emit the
        paginate signal.  (#345345, Yevgen Muntyan)



svn path=/trunk/; revision=17698
2007-04-29 06:34:12 +00:00
Matthias Clasen
aa3f2a792a Don't crash if end_run is not set. (#424168, Matthias Hasselmann)
2007-04-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintoperation.c (preview_iface_end_preview): Don't
        crash if end_run is not set.  (#424168, Matthias Hasselmann)



svn path=/trunk/; revision=17636
2007-04-25 16:28:30 +00:00
Michael Natterer
653a03c218 fix the build. Dunno if the fix is right, but I think it is.
2007-04-25  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkprintoperation.c (preview_iface_is_selected): fix the
	build. Dunno if the fix is right, but I think it is.


svn path=/trunk/; revision=17629
2007-04-25 09:47:14 +00:00
Matthias Clasen
8f409578f2 Parse half-open ranges like -2 or 3-, and be a bit more liberal about
2007-04-24  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintunixdialog.c (dialog_get_page_ranges): Parse
        half-open ranges like -2 or 3-, and be a bit more liberal
        about whitespace.
        (dialog_set_page_ranges): Support half-open ranges.

        * gtk/gtkprintoperation.c (print_pages_idle): Substitute the
        number of pages in half-open ranges.
        (preview_iface_is_selected): Support half-open ranges here, too.



svn path=/trunk/; revision=17627
2007-04-24 20:16:35 +00:00
Alexander Larsson
fb8638d0ac Make async print preview work by actually starting the print process in
2007-04-16  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkprintoperation.c (gtk_print_operation_run):
	Make async print preview work by actually starting
	the print process in that case (#424168)



svn path=/trunk/; revision=17603
2007-04-16 08:57:35 +00:00
Matthias Clasen
69072fc65c Fix an oversight in an example.
svn path=/trunk/; revision=17495
2007-03-12 06:15:41 +00:00
Matthias Clasen
4e332f0da6 Fix another leak
svn path=/trunk/; revision=17048
2007-01-04 04:49:31 +00:00
Matthias Clasen
1ed8f92140 fix doc formatting errors 2006-12-29 20:30:39 +00:00
Matthias Clasen
721c3bc101 Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * *.c: Replace a lot of idle and timeout calls by
        the new gdk_threads api.
2006-12-22 19:10:43 +00:00
Matthias Clasen
e142731885 Fix typos 2006-09-25 14:48:31 +00:00
Matthias Clasen
f2936e2706 Queue printing idles at a low priority. (#348289, Yevgen Muntyan)
2006-08-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintoperation.c (print_pages, preview_ready): Queue
	printing idles at a low priority.  (#348289, Yevgen Muntyan)
2006-08-17 16:24:56 +00:00
Matthias Clasen
895e9b3584 Some more printing docs 2006-08-15 19:49:27 +00:00
Matthias Clasen
f8794cccca Improve consistency of signal and property names 2006-07-06 05:14:03 +00:00
Matthias Clasen
18a0068300 some cross-referencing 2006-06-29 10:01:25 +00:00
Matthias Clasen
b8888ec22c Improve docs 2006-06-29 09:52:36 +00:00
Matthias Clasen
f8f9384537 Documentation additions and fixes.
2006-06-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprinter.c:
        * gtk/gtkprintunixdialog.c:
        * gtk/gtkprintoperationpreview.c:
        * gtk/gtkprintcontext.c (gtk_print_context_set_cairo_context):
        * gtk/gtklabel.c (gtk_label_set_line_wrap_mode):
        * gtk/gtkentry.c (gtk_entry_new):
        * gtk/gtkprintoperation.c (gtk_print_operation_set_custom_tab_label):
        * gtk/gtkclipboard.c (gtk_clipboard_wait_for_rich_text): Documentation
        additions and fixes.

        * gtk/gtkaspectframe.h:
        * gtk/gtkaboutdialog.c:
        * gtk/gtkcalendar.c:
        * gtk/gtkinputdialog.c:
        * gtk/gtk.symbols: Remove unnecessary includes.

        * gtk/gtkprogress.[hc]:
        * gtk/gtkitemfactory.[hc]: Don't unnecessarily use GTK_COMPILATION,
        remove unnecessary includes.
2006-06-29 09:18:07 +00:00
Murray Cumming
41b067c43a Correctly register the done signal - it sends an enum, not an int.
2006-06-20  Murray Cumming  <murrayc@murrayc.com>

        * gtk/gtkprintoperation.c: (gtk_print_operation_class_init):
        Correctly register the done signal - it sends an enum, not an int.
2006-06-20 19:48:37 +00:00
Matthias Clasen
44f85d4769 When starting a preview from the print dialog, set the action to PREVIEW.
2006-06-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintoperation-unix.c (handle_print_response): When starting
	a preview from the print dialog, set the action to PREVIEW.

	* gtk/gtkprintoperation.c: Cosmetic changes.
2006-06-16 16:36:25 +00:00
Matthias Clasen
289d59857f Use cairo_pdf_surface_set_dpi by cairo_surface_set_fallback_resolution.
2006-06-10  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintoperation.c:
        * modules/printbackends/pdf/gtkprintbackendpdf.c: Use
        cairo_pdf_surface_set_dpi by cairo_surface_set_fallback_resolution.
        (#344512, Elijah Newren)
2006-06-11 02:30:58 +00:00
Matthias Clasen
8935dc0947 Register create_custom_widget as an object-returning signal. (#344505,
2006-06-10  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintoperation.c: Register create_custom_widget as
        an object-returning signal.  (#344505, Marko Anastasov, patch
        by Christian Persch)

        * gtk/gtkmarshalers.list: Add the right marshaller.
2006-06-11 00:32:38 +00:00
Matthias Clasen
ada7aa635e fix build 2006-06-09 01:55:29 +00:00
Matthias Clasen
480803d5ba Don't include gtkprinter-private.h here.
2006-06-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintbackend.h: Don't include gtkprinter-private.h here.

	* gtk/gtkprintunixdialog.c:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintjob.c:
	* gtk/gtkprintbackend.c: Instead include it here.

	* gtk/gtk.symbols:
	* gtk/gtkprintoperation.h:
	* gtk/gtkprintoperation.c: Rename pdf_target to export_filename.
2006-06-08 17:01:28 +00:00
Matthias Clasen
2307bcefef Rename pdf_target to export_filename 2006-06-08 16:37:39 +00:00
Matthias Clasen
49e88d8900 Get rid of GTK_PRINT_OPERATION_RESULT_PREVIEW.
2006-06-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintoperation.h (GtkPrintOperationResult): Get
	rid of GTK_PRINT_OPERATION_RESULT_PREVIEW.

	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation.c: Update all users.
2006-06-08 16:30:51 +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
Matthias Clasen
b5af7163a1 Add some docs.
2006-06-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintoperation.c: Add some docs.

	* gtk/gtk.symbols: Add gtk_print_operation_set_allow_async.

	* gtk/gtkprintoperation.h: Remove gtk_print_operation_run_async.
2006-06-08 01:25:43 +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
b2cbfe66a4 2.9.2 2006-06-05 19:33:40 +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
46466176e2 add docs 2006-06-01 05:19:16 +00:00
Matthias Clasen
b641d2df47 Don't treat manual_scale like a percentage, its a factor.
2006-05-31  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintoperation.c (print_pages_idle): Don't
	treat manual_scale like a percentage, its a factor.
2006-05-31 19:46:02 +00:00
Matthias Clasen
084729ac7f Change some function names to be longer and better.
2006-05-31  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintcontext.h:
	* gtk/gtkprintcontext.c:
	* gtk/gtkprintoperation.c:
	* gtk/gtkprintoperation-unix.c: Change some function names to be
	longer and better.
	gtk_print_context_get_cairo -> gtk_print_context_get_cairo_context
	gtk_print_context_get_fontmap -> gtk_print_context_get_pango_fontmap
	gtk_print_context_create_context -> gtk_print_context_create_pango_context
	gtk_print_context_create_layout -> gtk_print_context_create_pango_layout
	Update all callers.
2006-05-31 13:38:10 +00:00
Matthias Clasen
7f6f61c9ff Custom tab label 2006-05-24 16:15:15 +00:00
Matthias Clasen
8fb35cd54d Do the begin-print emission in the idle, so that the print dialog goes
2006-05-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintoperation.c (print_pages): Do the begin-print
	emission in the idle, so that the print dialog goes away
	before begin-print.
2006-05-23 16:52:10 +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
Matthias Clasen
e5c0e302fb fix docs 2006-05-22 19:39:23 +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
Matthias Clasen
436e5e8e12 Cosmetic cleanups.
2006-05-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintoperation.c (gtk_print_operation_class_init):
	Cosmetic cleanups.
2006-05-16 16:11:31 +00:00
Matthias Clasen
6560161713 Reverse the order of ranges when printing in reverse. (#341578)
2006-05-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintoperation.c: Reverse the order of
	ranges when printing in reverse.  (#341578)
2006-05-15 18:33:41 +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
Matthias Clasen
9dc49c4563 more async printing 2006-05-15 15:27:18 +00:00
Alexander Larsson
0d8743ebc9 Update g_object_notify to new property name.
2006-05-12  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkprintoperation.c (gtk_print_operation_set_n_pages):
	Update g_object_notify to new property name.
2006-05-12 13:24:12 +00:00
Alexander Larsson
c459feaab1 Fix build errors.
2006-05-12  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkrecentmanager.c:
	Fix build errors.

	* gtk/gtk.symbols:
	* demos/gtk-demo/printing.c:
	* gtk/gtkprintoperation-win32.c:
	* gtk/gtkprintoperation.[ch]:
	* gtk/gtkprintsettings.[ch]:
	* modules/printbackends/cups/gtkprintbackendcups.c:
	* modules/printbackends/lpr/gtkprintbackendlpr.c:
	* modules/printbackends/pdf/gtkprintbackendpdf.c:
	* tests/print-editor.c:
	* tests/testnouiprint.c:
	* tests/testprint.c:
	* tests/testprintfileoperation.c:
	Rename functions from nr_of_pages to n_pages, and num_copies to
	n_copies to match other gtk+ names.

	* gtk/gtkmenu.c: (gtk_menu_popdown):
	Only re-set window group on popdown if we set it on popup (i.e.
	if there is a parent menu shell).
	Fixed part of bug #340401

	* gtk/gtkwindow.c:
	Add (contruct) property "transient-for" to GtkWindow. This
	is needed for the fix to bug #340401.

	* gtk/gtkprintunixdialog.c:
	Use the transient-for property on construction and populate the dialog
	with widgets after that. This fixes bug #340401.
	More n_pages renames.
2006-05-12 09:47:58 +00:00
Alexander Larsson
719050ed1f Implement per-page paper sizes.
2006-05-05  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkprintoperation-unix.c:
	Implement per-page paper sizes.

	* gtk/gtkprintoperation.c:
	Implement per-page paper sizes for pdf output.
	Make gtk_print_operation_set_pdf_target() work again

	* tests/Makefile.am:
	* tests/testprint.c:
	* tests/testprintfileoperation.[ch]:
	Add more test code for printing support.
	This tests per-page paper sizes & orientation and
	deriving from GtkPrintOperation.
2006-05-05 11:03:33 +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
Christian Persch
061f252873 Use a priv variable when accessing priv multiple times in the same
2006-05-02  Christian Persch  <chpe@cvs.gnome.org>

	* gtk/gtkpagesetupunixdialog.c:
	* gtk/gtkprintcontext.c:
	* gtk/gtkprinter.c:
	* gtk/gtkprinteroptionwidget.c:
	* gtk/gtkprintjob.c:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation.c:
	* gtk/gtkprintunixdialog.c: Use a priv variable when accessing priv
	  multiple times in the same function. Bug #340288.
2006-05-02 12:48:52 +00:00
Matthias Clasen
a76906c705 Add docs.
2006-04-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintjob.c (gtk_print_job_set_source_file): Add docs.

	* gtk/gtkprintoperation.c: Add docs.
2006-04-25 15:36:54 +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