Commit Graph

135 Commits

Author SHA1 Message Date
Michael Natterer
870bac8fd0 change return value and local variable to const gchar* to fix warning
2008-04-18  Michael Natterer  <mitch@imendio.com>

	* modules/printbackends/cups/gtkprintercups.[ch]
	(gtk_printer_cups_get_ppd_name): change return value and local
	variable to const gchar* to fix warning about discarding const
	qualifier.


svn path=/trunk/; revision=20021
2008-04-18 14:51:26 +00:00
Jens Granseuer
1b97ef3e14 Don't define variables in the middle of a block. (#522067)
2008-03-12  Jens Granseuer  <jensgr@gmx.net>

	* modules/printbackends/cups/gtkprintbackendcups.c:
	(cups_printer_prepare_for_print): Don't define variables in the
	middle of a block. (#522067)

svn path=/trunk/; revision=19789
2008-03-12 18:37:39 +00:00
Matthias Clasen
b1f8302299 Fix a crash
svn path=/trunk/; revision=19786
2008-03-12 17:52:36 +00:00
Michael Natterer
f572d21294 include <glib/gstdio.h> for g_fopen().
2008-03-12  Michael Natterer  <mitch@imendio.com>

	* modules/printbackends/cups/gtkprintbackendcups.c: include
	<glib/gstdio.h> for g_fopen().


svn path=/trunk/; revision=19775
2008-03-12 11:12:37 +00:00
Matthias Clasen
66b9c59214 Use g_ascii_formatd when formatting custom paper sizes, since cups doesn't
2008-03-11  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c: Use
        g_ascii_formatd when formatting custom paper sizes, since
        cups doesn't handle , as decimal separator.  (#521548)



svn path=/trunk/; revision=19762
2008-03-12 01:34:34 +00:00
Matthias Clasen
9b26a1c319 Honor cups user default options from ~/.cups/lpoptions (#469210, Stijn
2008-03-04  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c:
        Honor cups user default options from ~/.cups/lpoptions
        (#469210, Stijn Hoop)



svn path=/trunk/; revision=19710
2008-03-05 03:45:41 +00:00
Michael Natterer
64c73a61b7 Remove all .cvsignore files.
svn path=/trunk/; revision=19169
2007-12-13 11:18:45 +00:00
15:39:40 Tim Janik
2dc08ada49 call g_test_init() from gtk_test_init().
2007-11-22 15:39:40  Tim Janik  <timj@imendio.com>

        * gtk/gtktestutils.c: call g_test_init() from gtk_test_init().

        * gtk/tests/testing.c: use g_test_add_func() to register tests and use
	g_test_run() to run the tests to integrate with the testing framework.

        * gtk/tests/Makefile.am: removed exemplary testing rules.

        * Makefile.am, gtk/tests/Makefile.am, gtk/Makefile.am:
        * gtk/xdgmime/Makefile.am, gtk/theme-bits/Makefile.am:
        * tests/Makefile.am, docs/reference/gdk-pixbuf/Makefile.am:
        * docs/reference/gdk/Makefile.am, docs/reference/gtk/Makefile.am:
        * docs/reference/Makefile.am, docs/tools/Makefile.am:
        * docs/tutorial/Makefile.am, docs/faq/Makefile.am, docs/Makefile.am:
        * gdk-pixbuf/pixops/Makefile.am, gdk-pixbuf/Makefile.am:
        * demos/gtk-demo/Makefile.am, demos/Makefile.am:
        * modules/input/Makefile.am, modules/printbackends/file/Makefile.am:
        * modules/printbackends/test/Makefile.am, modules/printbackends/Makefile.am:
        * modules/printbackends/cups/Makefile.am, modules/printbackends/lpr/Makefile.am:
        * modules/engines/ms-windows/Theme/gtk-2.0/Makefile.am:
        * modules/engines/ms-windows/Theme/Makefile.am:
        * modules/engines/ms-windows/Makefile.am:
        * modules/engines/Makefile.am,  modules/engines/pixbuf/Makefile.am:
        * modules/Makefile.am, m4macros/Makefile.am, perf/Makefile.am:
        * contrib/Makefile.am, contrib/gdk-pixbuf-xlib/Makefile.am:
        * gdk/directfb/Makefile.am, gdk/linux-fb/Makefile.am:
        * gdk/quartz/Makefile.am, gdk/win32/rc/Makefile.am:
        * gdk/win32/Makefile.am, gdk/x11/Makefile.am, gdk/Makefile.am:
	include $(top_srcdir)/Makefile.decl, adapted EXTRA_DIST assignments.



svn path=/trunk/; revision=19033
2007-11-22 14:38:26 +00:00
Matthias Clasen
68c4796380 Fix a casting problem. (#485662, patch by Herbert Valerio Riedel)
2007-11-22  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkcupsutils.c: Fix a casting problem.
        (#485662, patch by Herbert Valerio Riedel)



svn path=/trunk/; revision=19025
2007-11-22 06:04:41 +00:00
Matthias Clasen
be64bb2d2c correct a comment
svn path=/trunk/; revision=18862
2007-09-24 17:12:33 +00:00
Matthias Clasen
c87cfa8afd Include config.h first. (#467719)
2007-09-09  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/lpr/gtkprintbackendlpr.c:
        * modules/printbackends/cups/gtkcupsutils.c:
        * modules/printbackends/cups/gtkprintbackendcups.c: Include
        config.h first.  (#467719)



svn path=/trunk/; revision=18772
2007-09-09 20:13:58 +00:00
Wouter Bolsterlee
e1cf3b525b Fix typo that broke the build.
2007-09-07  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* modules/printbackends/cups/gtkcupsutils.c:
	(_post_send): Fix typo that broke the build.

svn path=/trunk/; revision=18755
2007-09-07 19:25:13 +00:00
Matthias Clasen
378eb68948 Check for the cups function httpGetAuthString().
2007-09-07  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Check for the cups function httpGetAuthString().

        * modules/printbackends/cups/gtkcupsutils.c: Use httpGetAuthString()
        if available.  (#467414, Claudio Saavedra)


svn path=/trunk/; revision=18753
2007-09-07 18:32:36 +00:00
Sven Neumann
8c4287775b change the file extension when the file format is changed in the Print
2007-08-09  Sven Neumann  <sven@gimp.org>

	* modules/printbackends/file/gtkprintbackendfile.c: change the
	file extension when the file format is changed in the Print dialog
	(#356630).

svn path=/trunk/; revision=18600
2007-08-09 15:05:23 +00:00
Matthias Clasen
ab5a9520df Dectect if cups allows access to the http_t authstring field.
2007-07-23  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Dectect if cups allows access to the http_t
        authstring field.

        * modules/printbackends/cups/gtkcupsutils.c: Rely on the
        HAVE_HTTP_AUTHSTRING define done by configure.


svn path=/trunk/; revision=18527
2007-07-23 17:02:04 +00:00
Matthias Clasen
2f6e6f2eed Fix build problems on Cygwin. (#448604)
2007-07-09  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/*/Makefile.am: Fix build problems
        on Cygwin.  (#448604)


svn path=/trunk/; revision=18412
2007-07-09 18:00:22 +00:00
Matthias Clasen
388b14515a Enable SSL support. (#451070, Vince Busam)
2007-06-29  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackend/cups/gtkcupsutils.c (_post_check):
        (_get_check): Enable SSL support.  (#451070, Vince Busam)



svn path=/trunk/; revision=18293
2007-06-29 18:41:23 +00:00
Matthias Clasen
3f7f212940 Fix some locking issues
svn path=/trunk/; revision=18105
2007-06-12 02:12:32 +00:00
Carlos Garcia Campos
eb7f97bb9b Add new capability GTK_PRINT_CAPABILITY_NUMBER_UP.
2007-05-28  Carlos Garcia Campos  <carlosgc@gnome.org>
	* gtk/gtkprinter.[ch]: Add new capability
	GTK_PRINT_CAPABILITY_NUMBER_UP.
	* docs/reference/gtk/tmpl/gtkprintunixdialog.sgml: 
	* gtk/gtkprintunixdialog.c: (update_dialog_from_capabilities):
	* modules/printbackends/file/gtkprintbackendfile.c:
	(file_printer_get_options), (file_printer_get_settings_from_options):
	* modules/printbackends/cups/gtkprintbackendcups.c:
	(cups_printer_get_capabilities): Add a new print capability to specify
	whether print dialog will offer printing multiple pages per sheet. (#398414)

svn path=/trunk/; revision=17963
2007-05-28 10:41:09 +00:00
Matthias Clasen
f38ff3c52b Get all the printer attributes when getting the list of printers, not via
2007-04-30  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c: Get all
        the printer attributes when getting the list of printers,
        not via separate requests.  (#387889, Krishan Purahoo)



svn path=/trunk/; revision=17741
2007-04-30 17:39:40 +00:00
Matthias Clasen
7253a5a292 Rename gtk_paper_size_get_builtins() to gtk_paper_size_get_paper_sizes()
2007-04-30  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkpapersize.[hc]: Rename gtk_paper_size_get_builtins()
        to gtk_paper_size_get_paper_sizes() and optionally include
        custom paper sizes.

        * gtk/gtkpagesetupunixdialog.c: Internally export a function
        to load custom paper sizes.

        * modules/printbackends/file/gtkprintbackendfile.c: Implement
        printer_list_papers, returning all paper sizes.  (#434329,
        Christian Persch)


svn path=/trunk/; revision=17728
2007-04-30 06:03:01 +00:00
Matthias Clasen
a59a315050 Fix a typo. String change ! (#406160, Stephane Raimbault)
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c: Fix a
        typo. String change !  (#406160, Stephane Raimbault)



svn path=/trunk/; revision=17692
2007-04-29 04:54:36 +00:00
Matthias Clasen
6c1d4a2104 More cleanups
svn path=/trunk/; revision=17689
2007-04-29 04:10:39 +00:00
Matthias Clasen
f6b2328853 Cleanups
svn path=/trunk/; revision=17688
2007-04-29 03:52:10 +00:00
Matthias Clasen
fd57356b2f Make building the test print backend optional
svn path=/trunk/; revision=17687
2007-04-29 03:41:53 +00:00
Matthias Clasen
88d4546a36 Correct some copyright lines.
2007-04-28  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/lpr/*:
        * modules/printbackends/cups/*: Correct some copyright lines.

        * configure.in:
        * modules/printbackends/Makefile.am:
        * modules/printbackends/test/*: Add a test print backend.
        (#409089, John Palmieri)


svn path=/trunk/; revision=17686
2007-04-29 03:31:03 +00:00
Matthias Clasen
931647f00d Mark the printer list as done. (#428665, Bogdan Gheorghe)
2007-04-26  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/lpr/gtkprintbackendlpr.c
        (gtk_print_backend_lpr_init): Mark the printer list as done.
        (#428665, Bogdan Gheorghe)



svn path=/trunk/; revision=17653
2007-04-26 06:14:03 +00:00
Matthias Clasen
13cc75654c Reduce the amount of debug spew if we are not debugging.
2007-04-23  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c: Reduce
        the amount of debug spew if we are not debugging.



svn path=/trunk/; revision=17619
2007-04-23 17:06:07 +00:00
Matthias Clasen
0cd6108945 Support raw printers
svn path=/trunk/; revision=17568
2007-03-28 15:53:08 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Felix Riemann
c98925bcd2 Fix leaked string. Fixes bug #402565.
2007-01-30  Felix Riemann  <friemann@svn.gnome.org>

	* modules/printbackends/file/gtkprintbackendfile.c:
	(file_printer_get_options): Fix leaked string. Fixes bug #402565.

svn path=/trunk/; revision=17238
2007-01-30 20:19:11 +00:00
Matthias Clasen
734b613cf5 fix the build
svn path=/trunk/; revision=17175
2007-01-17 13:14:08 +00:00
Matthias Clasen
f7d932d499 Don't use httpGetFd() when building against cups 1.1
2007-01-17  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c: Don't use
        httpGetFd() when building against cups 1.1



svn path=/trunk/; revision=17170
2007-01-17 06:10:08 +00:00
Matthias Clasen
5db7fbc8dc Fix another leak
svn path=/trunk/; revision=17050
2007-01-04 05:09:08 +00:00
Matthias Clasen
d6b33b2ad5 Close the http connection after getting the PPD.
2007-01-03  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c: Close
        the http connection after getting the PPD.

 

svn path=/trunk/; revision=17042
2007-01-04 00:12:04 +00:00
Matthias Clasen
5490174708 Cleanups
svn path=/trunk/; revision=17036
2007-01-03 20:34:00 +00:00
Matthias Clasen
29282c6ec9 Fix some IPP compliance issues. (#391523, Albrecht Dress)
2007-01-01  Matthias Clasen  <mclasen@redhat.com>

        Fix some IPP compliance issues.  (#391523, Albrecht Dress)

        * modules/printbackends/cups/gtkcupsutils.c
        (gtk_cups_request_encode_option): Use IPP_TAG_JOB, not
        IPP_TAG_OPERATION.
        * modules/printbackends/cups/gtkprintbackendcups.c
        (gtk_print_backend_cups_print_stream): Don't add the
        requesting-user-name attribute a second time.



svn path=/trunk/; revision=17002
2007-01-01 23:47:45 +00:00
Matthias Clasen
c855dc61b5 broken pre-commit script 2006-12-28 04:22:46 +00:00
Matthias Clasen
da91672d46 forgotten file 2006-12-27 06:50:31 +00:00
Matthias Clasen
c5ef6f4b39 Use getters for http fields where available. (#364866, Björn Lindqvist)
2006-12-27  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c: Use
        getters for http fields where available.  (#364866,
        Björn Lindqvist)
2006-12-27 06:49:49 +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
d503f5d028 Properly pass multi-value options to cups. (#355350, Jürg Billeter)
2006-12-10  Matthias Clasen  <mclasen@redhat.com>

	* modules/printbackends/cups/gtkcupsutils.c (gtk_cups_request_encode_option):
	Properly pass multi-value options to cups.  (#355350, Jürg Billeter)
2006-12-11 04:08:42 +00:00
Matthias Clasen
7ad533044a Make print dialog work when 'BrowseShortNames Off' is specified in cups
2006-11-25  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c: Make
        print dialog work when 'BrowseShortNames Off' is specified
        in cups configuration. Patch by Tim Waugh.
2006-11-25 05:12:48 +00:00
Matthias Clasen
b99bea2489 Don't pass NULL to strncpy. (#359537, patch by Carlos Garcia Campos)
2006-11-15  Matthias Clasen  <mclasen@redhat.com>

	* modules/printbackends/cups/gtkprintbackendcups.c (cups_printer_get_options):
	Don't pass NULL to strncpy.  (#359537, patch by  Carlos Garcia Campos)
2006-11-15 18:54:43 +00:00
Matthias Clasen
7e480bb4b8 Complete the fix for bug 357280 2006-10-03 18:19:15 +00:00
Matthias Clasen
29d0ac8db5 Complete the fix for bug 357280.
2006-10-03  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c: Complete
        the fix for bug 357280.
2006-10-03 15:05:05 +00:00
Matthias Clasen
f647f66400 Only use the group name field if cups is new enough. (#357280)
2006-10-02  Matthias Clasen  <mclasen@redhat.com>

	* modules/printbackends/cups/gtkprintbackendcups.c (available_choices):
	Only use the group name field if cups is new enough.  (#357280)
2006-10-02 05:39:31 +00:00
Behdad Esfahbod
1c061cb55e Add. 2006-09-06 18:45:19 +00:00
Matthias Clasen
a9dc0eb466 Send printer-list-done on error.
2006-08-31  Matthias Clasen  <mclasen@redhat.com>

	* modules/printbackends/cups/gtkprintbackendcups.c (cups_request_printer_list_cb): Send printer-list-done on error.
2006-08-31 17:44:07 +00:00
Matthias Clasen
af2d60ab70 Use a resonable timeout of 3 seconds when polling for printer list
2006-08-28  Matthias Clasen   <mclasen@redhat.com>

        * modules/printbackend/cups/gtkprintbackendcups.c: Use a
        resonable timeout of 3 seconds when polling for printer
        list updates, instead of 300000 seconds...
2006-08-28 18:03:44 +00:00
Matthias Clasen
919cdba486 Handle filename encoding consistently. (#351812, Christian Persch)
2006-08-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprinteroptionwidget.c (update_widgets):
	* modules/printbackends/file/gtkprintbackendfile.c
	(output_file_from_settings): Handle filename encoding
	consistently.  (#351812, Christian Persch)
2006-08-18 01:30:24 +00:00
Matthias Clasen
0e2e8d83f5 Improve the handling of the default output filename, to ensure that we
2006-08-17  Matthias Clasen  <mclasen@redhat.com>

	* modules/printbackends/file/gtkprintbackendfile.c: Improve
	the handling of the default output filename, to ensure
	that we default to output.ps when only PostScript output
	is possible.  (#348236, Don Scorgie)
2006-08-17 04:57:00 +00:00
Matthias Clasen
430a9d5ea8 Simplify, make it build against cups 1.1. (#350329)
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

	* modules/printbackends/cups/gtkprintbackendcups.c (create_pickone_option):
	Simplify, make it build against cups 1.1.  (#350329)
2006-08-15 16:05:13 +00:00
Matthias Clasen
cb3669e1a1 Check if option is NULL before using it. (#348014, Christian Persch)
2006-07-19  Matthias Clasen  <mclasen@redhat.com>

	* modules/printbackends/file/gtkprintbackendfile.c
	(file_printer_get_settings_from_options): Check if option
	is NULL before using it.  (#348014, Christian Persch)
2006-07-19 15:52:48 +00:00
John Palmieri
5713af241a Make bits from my last commit are conditionally compiled only if cups 1.2
* modules/printbackends/cups/gtkprintbackendcups.c:
  Make bits from my last commit are conditionally compiled
  only if cups 1.2 is available.
2006-07-18 21:47:04 +00:00
John Palmieri
7d2ec5d007 add GTK_PRINTER_OPTION_TYPE_PICKONE_PASSWORD,
* gtk/gtkprinteroption.h:
 * gtk/gtkprinteroptionwidget.c:
 * modules/printbackends/cups/gtkprintbackendcups.c:
   add GTK_PRINTER_OPTION_TYPE_PICKONE_PASSWORD,
   GTK_PRINTER_OPTION_TYPE_PICKONE_PASSCODE,
   GTK_PRINTER_OPTION_TYPE_PICKONE_REAL,
   GTK_PRINTER_OPTION_TYPE_PICKONE_INT,
   and GTK_PRINTER_OPTION_TYPE_PICKONE_STRING options to support a subset
   of the new CUPS 1.2 custom options spec
2006-07-18 18:26:51 +00:00
John Palmieri
828014328c Get the name of the first printer in a class to use when requesting a PPD
* modules/printbackends/cups/gtkprintbackendcups.c:
  (cups_request_printer_list_cb): Get the name of the first printer
  in a class to use when requesting a PPD
  (cups_request_ppd_cb, cups_request_ppd): Fix the parameters of
  the "details-acquired" signal emittion
  (cups_request_ppd): get the ppd name from the cups printer

* modules/printbackends/cups/gtkprintercups.c (gtk_printer_cups_get_ppd_name):
  New method for getting the name of the ppd we should request
2006-07-06 17:55:32 +00:00
Matthias Clasen
e070fdf693 Fix compilation with cups 1.1 2006-06-22 13:09:29 +00:00
Matthias Clasen
894d81c829 Apply a patch by Christian Persch to support PostScript and PDF output.
2006-06-21  Matthias Clasen  <mclasen@redhat.com>

	* modules/printbackends/file/gtkprintbackendfile.c:
	Apply a patch by Christian Persch to support PostScript and PDF
	output.
2006-06-21 19:06:58 +00:00
Matthias Clasen
be8f3c72ea Apply a patch by John Palmieri to use buffered io using GIOChannels, clean
2006-06-21  Matthias Clasen  <mclasen@redhat.com>

	Apply a patch by John Palmieri to use buffered io using
	GIOChannels, clean up error handling and support Cups 1.2
	api in the printing code.

	* acconfig.h:
	* configure.in: Detect Cups 1.2

	* gtk/gtkdebug.h:
	* gtk/gtkmain.c: Add a printing debug key.

	* gtk/gtkprintbackend.[hc]: Remove the GError parameter from
	gtk_print_backend_print_stream, and take a  GIOChannel instead
	of an fd.

	* gtk/gtkprinter-private.h:
	* gtk/gtkprinter.c: Replace the fd parameter of
	_gtk_printer_create_cairo_surface by a GIOChannel.

	* gtk/gtkprintjob.[hc]: Remove the GError parameter from
	gtk_print_job_send and make it return void.

	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintjob.c: Adjust callers, add some debugging support.

	* modules/printbackends/Makefile.am: Fix DIST_SUBDIRS.

	* modules/printbackends/cups/Makefile.am:
	* modules/printbackends/lpr/Makefile.am: Add debug CFLAGS.

	* modules/printbackends/cups/gtkcupsutils.[hc]:
	* modules/printbackends/cups/gtkprintbackendcups.c:
	* modules/printbackends/file/gtkprintbackendfile.c:
	* modules/printbackends/lpr/gtkprintbackendfile.c: Adapt to
	the GIOChannel and GError changes, add debug output
2006-06-21 18:16:58 +00:00
Matthias Clasen
bc1dbd58d5 Add an GError parameter.
2006-06-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintbackend.h:
	* gtk/gtkprintbackend.c (gtk_print_backend_print_stream): Add an
	GError parameter.

	* modules/printbackends/file/gtkprintbackendfile.c
	(gtk_print_backend_file_print_stream):
	* modules/printbackends/lpr/gtkprintbackendlpr.c
	(gtk_print_backend_lpr_print_stream):
	* modules/printbackends/cups/gtkprintbackendcups.c
	(gtk_print_backend_cups_print_stream):
	* gtk/gtkprintjob.c (gtk_print_job_send): Update all callers and
	implementations.
2006-06-21 05:56:14 +00:00
Matthias Clasen
6ffc87bb80 Cleanups 2006-06-21 05:08:43 +00:00
Christian Persch
d14e9a14ad configure.in gtk/Makefile.am Rename "pdf" backend to "file" backend. Step
2006-06-20  Christian Persch  <chpe@cvs.gnome.org>

	* configure.in
	* gtk/Makefile.am
	* modules/printbackends/Makefile.am
	A modules/printbackends/file/.cvsignore
	A modules/printbackends/file/Makefile.am
	A modules/printbackends/file/gtkprintbackendfile.c
	A modules/printbackends/file/gtkprintbackendfile.h
	R modules/printbackends/pdf/*:
	Rename "pdf" backend to "file" backend. Step 2 from bug #339592.
2006-06-20 18:42:46 +00:00
Christian Persch
0bce4d271a Convert input to filename encoding and construct an URI from that. Add
2006-06-20  Christian Persch  <chpe@cvs.gnome.org>

	* gtk/gtkprinteroptionwidget.c: (filesave_changed_cb),
	(alternative_set), (construct_widgets): Convert input to filename
	encoding and construct an URI from that.
	* gtk/gtkprintsettings.h: Add OUTPUT_FILE_FORMAT and OUTPUT_URI keys.
	* modules/printbackends/pdf/gtkprintbackendpdf.c: Use those defines.
	Step 1 from bug #339592.
2006-06-20 17:36:55 +00:00
Matthias Clasen
7a44ce3366 Add a capabilities argument to the printer_get_options method and to the
2006-06-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprinter-private.h:
	* gtk/gtkprinter.c (_gtk_printer_get_options):
	* gtk/gtkprintbackend.h: Add a capabilities argument to the
	printer_get_options method and to the _gtk_printer_get_options
	function

	* modules/printbackends/lpr/gtkprintbackendlpr.c
	(lpr_printer_get_options):
	* modules/printbackends/pdf/gtkprintbackendpdf.c
	(pdf_printer_get_options):
	* modules/printbackends/cups/gtkprintbackendcups.c
	(cups_printer_get_options):
	* gtk/gtkprintunixdialog.c (selected_printer_changed): Adjust
	callers and implementations.
2006-06-19 05:09:49 +00:00
Matthias Clasen
374e181734 Fix a typo: s/Extention/Extension/.
2006-06-17  Matthias Clasen  <mclasen@redhat.com>

	* modules/printbackends/pdf/gtkprintbackendpdf.c:
	* modules/printbackends/lpr/gtkprintbackendlpr.c: Fix a typo:
	s/Extention/Extension/.
2006-06-17 05:19:18 +00:00
Matthias Clasen
505c6149cc Use stock print icons; make it compile 2006-06-17 01:04:50 +00:00
Matthias Clasen
956bcb4393 Add a GtkPrintSettings parameter to the printer_create_cairo_surface
2006-06-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintbackend.h: Add a GtkPrintSettings parameter to the
	printer_create_cairo_surface method.

	* modules/printbackends/pdf/gtkprintbackendpdf.c:
	* modules/printbackends/cups/gtkprintbackendcups.c:
	* modules/printbackends/lpr/gtkprintbackendlpr.c:
	* gtk/gtkprinter.c (_gtk_printer_create_cairo_surface):
	* gtk/gtkprinter-private.h:
	* gtk/gtkprintjob.c (gtk_print_job_get_surface): Adapt all users.
2006-06-16 18:29:09 +00:00
Matthias Clasen
0f0e499c12 fix 345038 2006-06-16 05:08:14 +00:00
Matthias Clasen
82743b9f21 fix the print-to-pdf icon 2006-06-16 04:02:34 +00:00
Matthias Clasen
809c8d565f Use gtk_printer_accepts_ps here.
2006-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintunixdialog.c (is_printer_active): Use
	gtk_printer_accepts_ps here.

	* modules/printbackends/pdf/gtkprintbackendpdf.c (gtk_print_backend_pdf_init):
	Mark the virtual "Print to PDF" printer as not accepting PS.

	* gtk/gtk.symbols:
	* gtk/gtkprinter.h:
	* gtk/gtkprinter.c: Add two new properties accepts-pdf and
	accepts-ps (with getters) to allow learning supported formats.
2006-06-12 17:45:49 +00:00
Matthias Clasen
1f09da45a6 use the passed in destroy notify 2006-06-11 02:40:02 +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
a075c94acb Fix a C99ism 2006-06-07 12:59:05 +00:00
Alexander Larsson
50d17b73b6 Further updates from the GtkPrintContext functions rename.
2006-05-31  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtk.symbols:
	* demos/gtk-demo/printing.c:
	* tests/print-editor.c:
	* tests/testnouiprint.c:
	* tests/testprint.c:
	* tests/testprintfileoperation.c:
	Further updates from the GtkPrintContext functions rename.

	* modules/printbackends/cups/gtkcupsutils.c:
	Always set requesting-user-name when doing cups requests.
2006-05-31 14:06:02 +00:00
Alexander Larsson
70376f280a Add gtk_print_unix_dialog_set_manual_capabilities that controls what
2006-05-24  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkprintunixdialog.[ch]:
	Add gtk_print_unix_dialog_set_manual_capabilities that controls
	what widgets to enable in the dialog depending on the apps
	capabilities.

	* gtk/gtkprintbackend.[ch]:
	* gtk/gtkprinter-private.h:
	* gtk/gtkprinter.c:
	* gtk/gtkprintjob.h:
	Add printer_get_capabilities to backend.
	Move some fallback calls to the printbackend base class.

	* gtk/gtkprintoperation-unix.c:
	Set manual capabilities

	* modules/printbackends/cups/gtkprintbackendcups.c:
	Implement get_capabilities

	* modules/printbackends/lpr/gtkprintbackendlpr.c:
	* modules/printbackends/pdf/gtkprintbackendpdf.c:
	Move some methods to baseclass.
2006-05-24 10:50:57 +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
5e0dc70323 Never unload print backends. Remove gtk_print_backend_unref_at_idle.
2006-05-15  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkprintbackend.[ch]: (_gtk_print_backend_create):
	Never unload print backends.
	Remove gtk_print_backend_unref_at_idle.

	* modules/printbackends/cups/gtkprintbackendcups.c:
	(cups_dispatch_watch_finalize):
	Don't use the unref_at_idle hack since that caused
	deadlocks. Instead we never unload print backends, which
	is not really a big problem.
2006-05-15 15: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
John (J5) Palmieri
2b0ffdac07 make the _CUPS_MAP_ATTR_STR macro not dup the string so we don't leak
2006-05-10  John (J5) Palmieri  <johnp@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c:
        make the _CUPS_MAP_ATTR_STR macro not dup the string so we don't
        leak
2006-05-10 00:42:23 +00:00
Christian Persch
9ef568468e Always register the type with the type module, even if it had been
2006-05-05  Christian Persch  <chpe@cvs.gnome.org>

	* modules/printbackends/cups/gtkprintbackendcups.c:
	* modules/printbackends/lpr/gtkprintbackendlpr.c:
	* modules/printbackends/pdf/gtkprintbackendpdf.c: Always register
	  the type with the type module, even if it had been registered
	  before. Fixes bug #340676.
2006-05-05 20:22:27 +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
Behdad Esfahbod
ab7c146eb4 . 2006-04-29 04:57:30 +00:00
Matthias Clasen
e6e2f91b19 some more options 2006-04-25 04:38:07 +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