summaryrefslogtreecommitdiff
path: root/gtk/gtkprintoperation.c
Commit message (Collapse)AuthorAgeFilesLines
* [annotations] Add allow-noneJohan Dahlin2010-02-191-3/+3
| | | | | | | | This commit was created using a script that searched for all docstrings containing a parameter and the string 'or %NULL'. Gdk backends and demos excluded as they are not part of a public API https://bugzilla.gnome.org/show_bug.cgi?id=610474
* [introspection] Merge in Gtk-custom.c annotationsColin Walters2009-12-161-6/+6
| | | | | | | | The Gtk-custom.c file in gir-repository contained a number of introspection annotations. Merge those into the GTK source files. Some documentation was moved from the tmpl/ files to accomodate the addition of annotations.
* Don't assign a GtkPageOrientation to a boolean valueMarek Kasik2009-10-271-1/+1
| | | | GtkPrintOperationPrivate->orientation is a boolean value.
* Show correct print previewMarek Kasik2009-10-261-68/+93
| | | | | | Modify print preview according to settings from print dialog. Similar approach as during real print is applied to the preview process (#592582).
* Fix some compilation warningJavier Jardón2009-10-211-0/+4
| | | | Added some default cases and assert if reached
* Return value from non-void functionShixin Zeng2009-08-201-1/+1
|
* Increment page sequence before print of the page, not afterMarek Kasik2009-08-101-6/+11
| | | | | | | When printing, increment page sequence before rendering of the page, not after (#590084). In opposite case it runs "end_page" function with wrong parameters when drawing a page in another thread.
* Add gtk_print_operation_get_n_pages_to_print()Carlos Garcia Campos2009-08-071-1/+55
| | | | | It returns the number of pages that will be printed to allow tracking the progress of a print operation. Fixes bgo#582964.
* Fix a typo in the startup-id property definitionMatthias Clasen2009-07-191-3/+17
| | | | | As well as some new GtkPrintOperation properties, which were not correctly set up. This was noticed in bug 588958.
* Add paper size combo and orientation combo to print dialogMarek Kasik2009-07-101-1/+70
| | | | | | | | | | | | | | | | | | | | | 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.
* Use G_PI rather than M_PIHans Breuer2009-07-041-1/+1
|
* Add ability to print selectionMarek Kasik2009-06-081-0/+128
| | | | | | | | | | | | | | | | | | | | | | 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().
* Fix a typo in the ::update-custom-widget docsMatthias Clasen2009-05-291-2/+2
|
* Fix a crash when printing with defer drawing enabledCarlos Garcia Campos2009-05-231-13/+24
| | | | Fixes bgo#582963
* Use nr_of_pages_to_print instead of nr_of_pages when updating printing progressCarlos Garcia Campos2009-05-181-2/+2
| | | | Fixes bgo#582950.
* Add ability to print in number-up mode for file backend and lpr backendMarek Kasik2009-05-131-67/+348
| | | | | | | | | | | 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".
* Allow the custom widget to actualize on a printer changeMarek Kasik2009-04-211-1/+24
| | | | | Passes print settings and page setup to the custom widget through a new "update-custom-widget" signal (#564854).
* Fix make checkMatthias Clasen2009-01-011-1/+1
| | | | svn path=/trunk/; revision=22033
* Bug 339318 - Allow page rendering to (optionally) happen in a threadMarek Kasik2008-12-191-134/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* More conversion to C_()Matthias Clasen2008-10-271-19/+10
| | | | svn path=/trunk/; revision=21717
* Bug 530454 – Clarify page_nr when printingPhilip Withnall2008-10-261-2/+2
| | | | | | | | | | | | | 2008-10-26 Philip Withnall <philip@tecnocode.co.uk> Bug 530454 – Clarify page_nr when printing * gtk/gtkprintoperation.c (gtk_print_operation_class_init): Point out that page_nr is 0-based in the documentation. svn path=/trunk/; revision=21714
* Bug 555386 – format not a string literal and no format argumentsChristian Persch2008-10-131-4/+4
| | | | svn path=/trunk/; revision=21642
* Documentation fixesMatthias Clasen2008-08-281-25/+27
| | | | svn path=/trunk/; revision=21217
* Bug 545875 – evo crashed when trying to print pages 6-7 of a 1 pageMarek Kasik2008-08-211-0/+42
| | | | | | | | | | | | 2008-08-21 Marek Kasik <mkasik@redhat.com> Bug 545875 – evo crashed when trying to print pages 6-7 of a 1 page email * gtk/gtkprintoperation.c: Clamp page ranges to correct ranges svn path=/trunk/; revision=21177
* change "error_dialog" variable to GtkWidget fo fix two warnings.Michael Natterer2008-07-041-4/+4
| | | | | | | | | | 2008-07-04 Michael Natterer <mitch@imendio.com> * gtk/gtkprintoperation.c (print_pages): change "error_dialog" variable to GtkWidget fo fix two warnings. svn path=/trunk/; revision=20759
* Revert name changeCody Russell2008-07-011-1/+1
| | | | svn path=/trunk/; revision=20724
* Handle failure to create temp file by returning NULL.Matthias Clasen2008-07-011-7/+38
| | | | | | | | | | | | | | | * gtk/gtkprintoperation-unix.c (_gtk_print_operation_platform_backend_create_preview_surface): Handle failure to create temp file by returning NULL. * gtk/gtkprintoperation.c (gtk_print_operation_preview_handler): Return FALSE if surface creation fails. (print_pages): If the preiew signal is not handled, show an error dialog. svn path=/trunk/; revision=20715
* Practically everything changed.Cody Russell2008-06-301-1/+1
| | | | | | | | | | | | | 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
* check surface status after ceating a pdf. Avoids crashing when the targetHans Breuer2008-06-131-0/+11
| | | | | | | | | | | | | | | 2008-05-23 Hans Breuer <hans@breuer.org> * gtk/gtkprintoperation.c : check surface status after ceating a pdf. Avoids crashing when the target can not be written, bug #537685 * gdk/win32/gdkdisplay-win32.c : runtime linking of ProcessIdToSessionId * gtk/gtkfilesystem.c : variadic macros are not supported with c89 and it was not needed here anyway. svn path=/trunk/; revision=20370
* Fix some i18n errors. Pointed out by Behdad Esfahbod.Matthias Clasen2008-02-121-2/+1
| | | | | | | | | | | | | | 2008-02-12 Matthias Clasen <mclasne@redhat.com> * gtk/gtkpapersize.c: * gtk/gtkprintoperation.c: * gtk/gtkvolumebutton.c: * gtk/gtkbulderparser.c: Fix some i18n errors. Pointed out by Behdad Esfahbod. svn path=/trunk/; revision=19547
* More default property value fixesMatthias Clasen2007-12-281-0/+2
| | | | svn path=/trunk/; revision=19278
* Require gtk-doc 1.8Matthias Clasen2007-11-251-11/+12
| | | | | | | | | | | 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
* Revert the change on 2007-04-29 (Also check the default handler whenMurray Cumming2007-10-051-2/+1
| | | | | | | | | | | | | 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
* Some more fixed to prevent segfaults with missing or nonsensical ranges.Matthias Clasen2007-09-211-9/+7
| | | | | | | | | | 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
* abort printing when the range is NULL. (#478803)Jean Brefort2007-09-211-0/+5
| | | | | | | | | | 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
* More of the sameMatthias Clasen2007-05-261-36/+42
| | | | svn path=/trunk/; revision=17925
* Unset priv->platform_data and priv->free_platform_data to preventTorsten Schoenfeld2007-05-151-0/+3
| | | | | | | | | | 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
* Fix a compiler warning.Matthias Clasen2007-04-301-1/+2
| | | | svn path=/trunk/; revision=17729
* Translate the default job name, and don't utf8-validate the job name inMatthias Clasen2007-04-301-2/+6
| | | | | | | | | | | | 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
* Fix some issues with reference handling in the printing code. (#429902,Matthias Clasen2007-04-301-3/+20
| | | | | | | | | | | | | | | | | | | | | 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
* Don't get stuck in a recursive mainloop if a synchronous preview isMatthias Clasen2007-04-301-2/+3
| | | | | | | | | | 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
* Make the emission of ::end-print and ::done consistent for previews.Matthias Clasen2007-04-301-7/+6
| | | | | | | | | | | | | | | | | | | | 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
* Document that a print operation can be run only once, and add aMatthias Clasen2007-04-291-4/+7
| | | | | | | | | | | | 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
* Fix the buildMatthias Clasen2007-04-291-1/+1
| | | | svn path=/trunk/; revision=17701
* Also check the default handler when deciding whether to emit the paginateMatthias Clasen2007-04-291-1/+2
| | | | | | | | | | | | 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
* Don't crash if end_run is not set. (#424168, Matthias Hasselmann)Matthias Clasen2007-04-251-2/+3
| | | | | | | | | | | 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
* fix the build. Dunno if the fix is right, but I think it is.Michael Natterer2007-04-251-1/+1
| | | | | | | | | | 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
* Parse half-open ranges like -2 or 3-, and be a bit more liberal aboutMatthias Clasen2007-04-241-1/+5
| | | | | | | | | | | | | | | | | 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
* Make async print preview work by actually starting the print process inAlexander Larsson2007-04-161-1/+4
| | | | | | | | | | | | 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
* Fix an oversight in an example.Matthias Clasen2007-03-121-1/+1
| | | | svn path=/trunk/; revision=17495