summaryrefslogtreecommitdiff
path: root/gtk/gtkprintoperation.c
Commit message (Collapse)AuthorAgeFilesLines
* build: Enable -Wswitch-enum and -Wswitch-defaultBenjamin Otte2017-10-061-1/+2
| | | | | | | | | | | | | | | | | | | This patch makes that work using 1 of 2 options: 1. Add all missing enums to the switch statement or 2. Cast the switch argument to a uint to avoid having to do that (mostly for GdkEventType). I even found a bug while doing that: clearing a GtkImage with a surface did not notify thae surface property. The reason for enabling this flag even though it is tedious at times is that it is very useful when adding values to an enum, because it makes GTK immediately warn about all the switch statements where this enum is relevant. And I expect changes to enums to be frequent during the GTK4 development cycle.
* printing: Do not truncate job names in GtkPrintOperationCarlos Garcia Campos2016-11-101-20/+4
| | | | | | | | | | | | | | | We are currently truncating job names to 255 bytes, because that's the maximum allowed length of job-name attribute in CUPS. This is a CUPS limitation that GtkPrintOperation shouldn't need to know, and it shouldn't affect other backends, that might have other limitations or even no limitation at all. This has another side effect, that what you set as GtkPrintOperation:job-name could be different to what you get if the property is truncated, this is not documented in gtk_print_operation_set_job_name(). So, I think the job name should be truncated by the CUPS backend, right before setting the job-name attribute. https://bugzilla.gnome.org/show_bug.cgi?id=774097
* print-operation: Be more robust in the error pathDebarshi Ray2016-03-211-2/+3
| | | | | | | | | | | This isn't an issue at the moment. Only exporting to a file can fail by setting by setting an error and it happens to correctly return GTK_PRINT_OPERATION_RESULT_ERROR regardless of this code. Still, let's make this block of code more correct to prevent future changes from introducing broken behaviour. https://bugzilla.gnome.org/show_bug.cgi?id=763731
* gtkprintoperation: job names must not exceed 255 charsFelipe Borges2015-10-091-1/+20
| | | | | | | | | | | According to http://datatracker.ietf.org/doc/rfc2911/, The 'name' attribute syntax is essentially the same as 'text', including the REQUIRED support of UTF-8 except that the sequence of characters is limited so that its encoded form MUST NOT exceed 255 (MAX) octets. CUPS will not print jobs with names exceeding 255 characters. https://bugzilla.gnome.org/show_bug.cgi?id=755988
* print operation: let subclasses use a custom paginatePaolo Borelli2015-08-181-9/+27
| | | | | | | | | | | | | | GtkPrintOperation was emitting paginate only if a signal was connected, this meant that subclassing and overriding the paginate vfunc lead to the unexpected result that paginate did not run. Instead we always emit the signal and use a custom accumulator: if there is a signal we just run that and avoid the default handler, otherwise we run the default handler which can be the one by the subclass or the default handler that just skips pagination. Patch by Yevgen Muntyan, fixes #345345
* print operation: Fix compiler warningsMatthias Clasen2015-06-021-1/+0
| | | | Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
* Remove a pointless comparisonMatthias Clasen2015-03-221-1/+1
| | | | | Comparing an unsigned value against < 0 is not going to succeed. Pointed out by clang.
* printing: Fix origin for scaled, rotated pagesLeo Wolf2014-11-271-8/+10
| | | | | | | | | | | The calls to cairo_translate in _gtk_print_context_rotate_according_to_orientation, _gtk_print_context_reverse_according_to_orientation and _gtk_print_context_translate_into_margin assume an unscaled context. These functions should therefore be called before scaling the context, otherwise the origin does not always end up in the top left corner. https://bugzilla.gnome.org/show_bug.cgi?id=740742
* Ensure that print operation is alive until we're doneРуслан Ижбулатов2014-08-011-0/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=733767
* GtkPrintOperation: Use G_PARAM_EXPLICIT_NOTIFYMatthias Clasen2014-06-091-13/+13
|
* Split GtkWindowGroup into its own fileMatthias Clasen2014-06-041-0/+1
| | | | | gtkwindow.c is too big and too messy. This is a small step towards making it better.
* all: Name more idles and timeoutsBastien Nocera2014-03-261-4/+8
| | | | | | | | | | Following up from 438cd857c49242244dda2923ac447f36464b9e72, name more timeouts and idles. The original grep was missing checking for gdk_threads_add_*() functions (at least for some of the files). https://bugzilla.gnome.org/show_bug.cgi?id=726870
* docs: use Returns: consistentlyWilliam Jon McCann2014-02-191-7/+7
| | | | Instead of Return value:
* docs: use apostrophes in *n'tWilliam Jon McCann2014-02-071-2/+2
|
* docs: use proper quotesWilliam Jon McCann2014-02-051-9/+9
|
* docs: Use "#" for refsect2 instead of ##William Jon McCann2014-02-041-1/+1
|
* docs: replace all <examples> with markdown headingsWilliam Jon McCann2014-02-041-3/+2
|
* docs: Identify examples that are C codeWilliam Jon McCann2014-01-291-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=723119
* docs: use |[ ]| instead of <programlisting></programlisting>William Jon McCann2014-01-291-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=723119
* docs: don't use <emphasis>William Jon McCann2014-01-281-2/+2
| | | | It is a little heavy handed. The text can speak for itself.
* all: Add names to timeoutsBastien Nocera2013-10-231-0/+1
| | | | | | | Add names to every timeout we setup, so it's easier to track their usage, and debug possible misbehaviour. https://bugzilla.gnome.org/show_bug.cgi?id=710651
* gtk: Use new macros for defining private dataEmmanuele Bassi2013-07-091-5/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702996
* Don't rotate pdf landscape outputAdrian Johnson2012-09-121-7/+6
|
* gtk: Don't use GDK_THREADS_ENTER/LEAVE macros internallyMatthias Clasen2012-07-301-2/+2
| | | | | | These are just wrappers for the functions, and we want to deprecate them. Stopping to use them internally is a good first step.
* docs: fix a number of typos and obsolete referencesCosimo Cecchi2012-07-021-4/+4
|
* printing: Rename GTK_UNIT_PIXEL to GTK_UNIT_NONERyan Lortie2012-05-031-2/+2
| | | | | | ...and document that many functions don't accept "none" as a unit. https://bugzilla.gnome.org/show_bug.cgi?id=460908
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* Documentation: Correct references to properties.Murray Cumming2012-02-151-3/+3
| | | | | | | | These should use :, not ::, though signals would use ::. See http://developer.gnome.org/gtk-doc-manual/unstable/documenting_syntax.html.en and http://developer.gnome.org/gtk-doc-manual/unstable/documenting_symbols.html.en
* Print preview: make cancel workMorten Welinder2011-11-071-7/+19
| | | | | | | | This makes cancels of a print preview work in the same way it works for non-previews, i.e., the operation stops at the next page boundary. https://bugzilla.gnome.org/show_bug.cgi?id=662160
* gtk: move _gtk_modules_has_mixed_deps() to gtkmodlesprivate.hMichael Natterer2011-10-231-1/+0
| | | | and remove gtkmainprivate.h completely.
* gtk: Use const instead G_CONST_RETURNJavier Jardón2011-06-101-1/+1
|
* Move GtkPrintOperation docs inlineMatthias Clasen2011-01-301-1/+71
|
* [GI] Add missing (transfer) annotationsPavel Holejsovsky2011-01-201-2/+2
|
* [GI] Annotate strings holding file paths as (type filename)Pavel Holejsovsky2011-01-181-1/+1
|
* Move docs for gtkmain inlineMatthias Clasen2011-01-041-0/+1
| | | | | | | | At the same time, introduce a gtkmainprivate.h header and various other cleanups. Based on a patch by Tadej Borovšak. https://bugzilla.gnome.org/show_bug.cgi?id=617471
* Remove gtktypeutils altogetherMatthias Clasen2011-01-041-3/+5
| | | | | | Based on patches by Javier Jardón. https://bugzilla.gnome.org/show_bug.cgi?id=629955
* Tons of transfer annotationsMatthias Clasen2010-09-211-9/+9
|
* Use gtk_window_has_group() to know if the window has an explicit window group.Javier Jardón2010-08-241-7/+3
| | | | | | | | | gtk_window_get_group() never returns NULL; if the window isn't in a group, a default window group is returned instead. Use gtk_window_has_group() instead. This fixes some previous commits to use accessors to access GtkWindow. Reported by Philip Withnall in bug https://bugzilla.gnome.org/show_bug.cgi?id=627828
* gtk/gtkprintoperation.c: Use accessor functions to access GtkWindowJavier Jardón2010-08-231-2/+7
|
* GtkPrintOperation: unseal private pointerJavier Jardón2010-07-141-2/+3
|
* gtk/: fully remove gtkalias hacksJavier Jardón2010-07-101-4/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* Return error instead of showing an error dialog when printingMarek Kasik2010-06-071-8/+40
| | | | | | | Remove message dialogs showing an error when printing. Return GTK_PRINT_OPERATION_RESULT_ERROR and set error in such a case. Also return GTK_PRINT_OPERATION_RESULT_CANCEL when cancelled. Do it for synchronous and asynchronous cases (#549127).
* Fix typo in gtkprintoperationJavier Jardón2010-05-081-1/+1
| | | | | Reported by Andika Triwidada in https://bugzilla.gnome.org/show_bug.cgi?id=618093
* [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.