Commit Graph

119 Commits

Author SHA1 Message Date
Adrian Johnson
dd7e8e9414 Don't rotate pdf landscape output 2012-09-12 15:38:37 +02:00
Matthias Clasen
8d0e88bac7 gtk: Don't use GDK_THREADS_ENTER/LEAVE macros internally
These are just wrappers for the functions, and we want to
deprecate them. Stopping to use them internally is a good
first step.
2012-07-30 18:01:47 +02:00
Cosimo Cecchi
f70fc49ebc docs: fix a number of typos and obsolete references 2012-07-02 10:41:11 -04:00
Ryan Lortie
88c63903a5 printing: Rename GTK_UNIT_PIXEL to GTK_UNIT_NONE
...and document that many functions don't accept "none" as a unit.

https://bugzilla.gnome.org/show_bug.cgi?id=460908
2012-05-03 18:30:48 -07:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Murray Cumming
a0b4ab109d Documentation: Correct references to properties.
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
2012-02-15 11:43:33 +01:00
Morten Welinder
d80953666e Print preview: make cancel work
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
2011-11-07 13:10:24 -05:00
Michael Natterer
5c4f2ef0c1 gtk: move _gtk_modules_has_mixed_deps() to gtkmodlesprivate.h
and remove gtkmainprivate.h completely.
2011-10-23 13:57:07 +02:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Matthias Clasen
837c504a11 Move GtkPrintOperation docs inline 2011-01-30 02:34:59 -05:00
Pavel Holejsovsky
2f0d40335b [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
Pavel Holejsovsky
6d5cdad56e [GI] Annotate strings holding file paths as (type filename) 2011-01-18 17:29:40 +01:00
Matthias Clasen
b123bc41fd Move docs for gtkmain inline
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
2011-01-04 17:32:12 -05:00
Matthias Clasen
98440ad031 Remove gtktypeutils altogether
Based on patches by Javier Jardón.

https://bugzilla.gnome.org/show_bug.cgi?id=629955
2011-01-04 14:51:19 -05:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Javier Jardón
c05f344c0a Use gtk_window_has_group() to know if the window has an explicit window group.
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
2010-08-24 16:16:42 +02:00
Javier Jardón
fb4661be6d gtk/gtkprintoperation.c: Use accessor functions to access GtkWindow 2010-08-23 20:19:18 +02:00
Javier Jardón
9db9c5f247 GtkPrintOperation: unseal private pointer 2010-07-14 02:07:04 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Marek Kasik
ca6aacc32d Return error instead of showing an error dialog when printing
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).
2010-06-07 14:52:38 +02:00
Javier Jardón
7b2024c1bd Fix typo in gtkprintoperation
Reported by Andika Triwidada in
https://bugzilla.gnome.org/show_bug.cgi?id=618093
2010-05-08 16:36:38 +02:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
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
2010-02-19 17:57:51 -02:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
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.
2009-12-16 17:22:01 -02:00
Marek Kasik
33ec0ecf05 Don't assign a GtkPageOrientation to a boolean value
GtkPrintOperationPrivate->orientation is a boolean value.
2009-10-27 17:35:37 +01:00
Marek Kasik
6b5912a213 Show correct print preview
Modify print preview according to settings from print dialog.
Similar approach as during real print is applied to the preview
process (#592582).
2009-10-26 17:47:37 +01:00
Javier Jardón
670e141b3a Fix some compilation warning
Added some default cases and assert if reached
2009-10-21 02:08:18 +02:00
Shixin Zeng
02457e3a93 Return value from non-void function 2009-08-20 23:56:52 +03:00
Marek Kasik
d878dc8e1a Increment page sequence before print of the page, not after
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.
2009-08-10 11:37:32 +02:00
Carlos Garcia Campos
c775906e4a Add gtk_print_operation_get_n_pages_to_print()
It returns the number of pages that will be printed to allow tracking
the progress of a print operation. Fixes bgo#582964.
2009-08-07 09:42:03 +02:00
Matthias Clasen
d6afa6eff2 Fix a typo in the startup-id property definition
As well as some new GtkPrintOperation properties, which were not
correctly set up. This was noticed in bug 588958.
2009-07-19 23:52:58 -04: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
Hans Breuer
37957aea34 Use G_PI rather than M_PI 2009-07-04 12:19:08 +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
Matthias Clasen
d2ac65c8ba Fix a typo in the ::update-custom-widget docs 2009-05-29 18:47:23 -04:00
Carlos Garcia Campos
7437a79b85 Fix a crash when printing with defer drawing enabled
Fixes bgo#582963
2009-05-23 11:12:56 +02:00
Carlos Garcia Campos
9b7fa7a904 Use nr_of_pages_to_print instead of nr_of_pages when updating printing progress
Fixes bgo#582950.
2009-05-18 09:43:13 +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
6e121ee85e Allow the custom widget to actualize on a printer change
Passes print settings and page setup to the custom widget
through a new "update-custom-widget" signal (#564854).
2009-04-21 13:06:49 +02:00
Matthias Clasen
aa8673ba84 Fix make check
svn path=/trunk/; revision=22033
2009-01-01 06:46:57 +00: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
Matthias Clasen
b478870c5f More conversion to C_()
svn path=/trunk/; revision=21717
2008-10-27 03:07:16 +00:00
Philip Withnall
ab9f1d7bbc Bug 530454 – Clarify page_nr when printing
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
2008-10-26 12:11:11 +00:00
Christian Persch
aadcba2dc5 Bug 555386 – format not a string literal and no format arguments
svn path=/trunk/; revision=21642
2008-10-13 12:54:45 +00:00
Matthias Clasen
3f53433008 Documentation fixes
svn path=/trunk/; revision=21217
2008-08-28 02:27:14 +00:00
Marek Kasik
547694ef0e Bug 545875 – evo crashed when trying to print pages 6-7 of a 1 page
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
2008-08-21 11:30:46 +00:00
Michael Natterer
d934deaaf3 change "error_dialog" variable to GtkWidget fo fix two warnings.
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
2008-07-04 10:46:19 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Matthias Clasen
a7abdcf8fc Handle failure to create temp file by returning NULL.
* 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
2008-07-01 05:38:49 +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
Hans Breuer
8677ed959d check surface status after ceating a pdf. Avoids crashing when the target
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
2008-06-13 08:36:26 +00:00