summaryrefslogtreecommitdiff
path: root/gtk/gtkprintbackend.c
Commit message (Collapse)AuthorAgeFilesLines
* printing: Properly initialize auth_info in gtkprintbackend.cDariusz Gadomski2014-10-071-1/+1
| | | | | | | | auth_info should be a NULL-terminated array as it is used in e.g. g_strdupv invocations iterating over its elements until a NULL element is encountered. https://bugzilla.gnome.org/show_bug.cgi?id=737777
* Use secrets service for cups auth_infoAndre Heinecke2014-09-011-10/+36
| | | | | | | | | | | | | | When a printer requires auth_info (e.g. a printer connected over the samba protocol) it is now possible to save the credentials necessary for printing if a secrets service is available over dbus. The auth_info is then stored / loaded from the default collection of that secrets service. If no such service is available the user is not shown the option to remember the password and the behavior remains the same as before. https://bugzilla.gnome.org/show_bug.cgi?id=674264
* docs: use Returns: consistentlyWilliam Jon McCann2014-02-191-2/+2
| | | | Instead of Return value:
* gtk: Use new macros for defining private dataEmmanuele Bassi2013-07-091-6/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702996
* Start migrating internals away from GtkStockWilliam Jon McCann2013-06-241-3/+3
|
* gtk: Add get_type() function declarations for private objectsBenjamin Otte2012-10-021-0/+2
| | | | | | | | | I'm adding a bunch of fixes for gcc complaining about -Wmissing-declarations. This set of patches makes private classes in gtk/*.c that use G_DEFINE_TYPE() safe by adding definitions for the get_type() function that can't be made static.
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* gtk: clean up the private horrorMichael Natterer2011-10-221-0/+1
| | | | | | | | | | | - add gtkmodulesprivate.h and move stuff there from gtkprivate.h - add gtkprivate.c and move stuff there from gtkmain.c - add gtkwin32.c and move stuff there from gtkmain.c - don't redefine GTK_DATADIR and friends in gtkprivate.h - have _gtk_get_datadir() and friends on all platforms - remove the horrid hacks where gtkprivate.h can't be included, or must be included later due to redefinition of the compile-time directories
* gtkprintbackend: gtk_misc_set_alignment replacingDiego Celix2011-06-101-2/+4
| | | | | | | | Replacing the function gtk_misc_set_alignment () with gtk_widget_set_halign () and gtk_widget_set_valign () in gtk/gtkprintbackend.c https://bugzilla.gnome.org/show_bug.cgi?id=650762
* Replace gtk_misc_set_padding() with GtkWidget:margin propertiesJavier Jardón2011-06-021-2/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=651605
* Add some missing symbols to the docsMatthias Clasen2011-02-081-1/+1
|
* gtk: remove "gboolean homogeneous" from gtk_box_new()Michael Natterer2010-11-021-3/+4
| | | | Because it's FALSE in virtually all use cases.
* Use gtk_box_new() instead gtk_[v|h]box_new()Javier Jardón2010-10-301-3/+3
|
* GTK docs: various fixupsMatthias Clasen2010-10-011-0/+4
|
* Remove separators from dialogsMatthias Clasen2010-09-021-1/+0
| | | | | It seems more reasonable to remove this feature than to keep fighting off every separator that pops up by accident in a dialog.
* gtkprintbackend: Use private pointer instead GET_PRIV() macroJavier Jardón2010-07-131-9/+5
|
* Use accessor functions to access GtkDialogJavier Jardón2010-07-131-1/+3
|
* gtk/: fully remove gtkalias hacksJavier Jardón2010-07-101-5/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* Fix declaration of gtk_print_job_set_statusMatthias Clasen2010-01-171-1/+0
| | | | The problem was reported in bug 606698.
* [introspection] Merge in Gtk-custom.c annotationsColin Walters2009-12-161-0/+10
| | | | | | | | 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.
* Default to hard margins not availableAdrian Johnson2009-12-051-6/+1
| | | | unless the print backend explicitly provides them.
* Revert "Default to hard margins not available"Christian Persch2009-12-011-1/+6
| | | | This reverts commit a77f209f23e78da6e63495b0ef873e28a371e084.
* Default to hard margins not availableAdrian Johnson2009-12-011-6/+1
| | | | unless the print backend explicitly provides them.
* Allow getting the printer's hard marginsChristian Persch2009-12-011-6/+8
| | | | Adds a way to get the unprintable area of the printer. Bug #468989.
* Add support for 'auth-info' attribute to the CUPS backendMarek Kasik2009-09-241-83/+81
| | | | | | | Check for 'auth-info-required' attribute from printer attributes to find out whether an authentization of user is needed. Change password dialog of print backend to be able to require informations requested thru 'auth-info-required' (#566522).
* Adds authentication support of CUPS backendMarek Kasik2009-04-211-0/+182
| | | | | | | Adds authentication support of CUPS backend against CUPS server. Print dialog is now capable to ask user for password and pass it to the CUPS server. It is also possible to authenticate user through Kerberos (GSS-API) (#384940).
* Bug 555386 – format not a string literal and no format argumentsChristian Persch2008-10-131-2/+2
| | | | svn path=/trunk/; revision=21642
* Bug 346903 – gtk_enumerate_printers needs events to completeMatthias Clasen2008-09-171-2/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-09-17 Matthias Clasen <mclasen@redhat.com> Bug 346903 – gtk_enumerate_printers needs events to complete * gtk/gtkprintbackend.h: * gtk/gtkprintbackend.c: Add a GtkPrintBackend::status property. * modules/printbackends/cups/gtkcupsutils.h: * modules/printbackends/cups/gtkcupsutils.c: Turn the connection test into a tristate available/unavailable/in progress. * modules/printbackends/cups/gtkprintbackendcups.c: Use a single connection test instance for getting the default printer and for getting the printer list. Set the GtkPrintBackend::status property according to the result of the connection test. Use the printer-type attribute to find the default printer, if cups supports it. * gtk/gtkprinter.c: When enumerating printers, give up when the backend status is 'unavailable'. * gtk/gtkprintunixdialog.c (printer_status_cb): Select the printer when it is the default and nothing else has been selected yet. svn path=/trunk/; revision=21417
* Revert name changeCody Russell2008-07-011-1/+1
| | | | svn path=/trunk/; revision=20724
* 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
* Fix a typo in a commentJohan Dahlin2008-06-191-1/+1
| | | | | | | | | 2008-06-19 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkprintbackend.c: Fix a typo in a comment svn path=/trunk/; revision=20471
* RH bug 204621 - "GtkPrint" asks for "Letter" size paper when "A4" sizeMatthias Clasen2008-05-211-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | was chosen Patch by Marek Kasik. * gtk/gtk.symbols: * gtk/gtkprinter.[hc]: Add gtk_printer_get_default_page_size. * gtk/gtkprintbackend.[hc]: Add fallback implementation. * modules/printbackends/file/gtkprintbackendfile.c: * modules/printbackends/cups/gtkprintbackendcups.c: Implement get_default_page_size. * gtk/gtkpagesetupunixdialog.c: When selecting a different printer, select its default paper size. * gtk/gtkprintunixdialog.c: If no explicit page setup has been set, use the printer default. * gtk/gtkprintoperation-unix.c: Don't create an empty page setup if we don't have a default page setup. svn path=/trunk/; revision=20120
* Move a few settings to gtksettings.c to make sure they show up in theMatthias Clasen2006-12-311-30/+0
| | | | | | | | | | | | | | | 2006-12-30 Matthias Clasen <mclasen@redhat.com> * gtk/gtkprintoperation-unix.c: * gtk/gtkprintbackend.c: * gtk/gtkfilechooserdefault.c: * gtk/gtksettings.c: Move a few settings to gtksettings.c to make sure they show up in the docs. (#365364, Christian Persch) svn path=/trunk/; revision=16992
* Fix some typos with inline property docs. (#347065, John Finlay)Matthias Clasen2006-07-101-1/+1
| | | | | | | | | | | | 2006-07-10 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaction.c: * gtk/gtkiconview.c: * gtk/gtkprintbackend.c: * gtk/gtkprintoperation-unix.c: * gtk/gtkscrolledwindow.c: * gtk/gtktoolbar.c: Fix some typos with inline property docs. (#347065, John Finlay)
* Apply a patch by John Palmieri to use buffered io using GIOChannels, cleanMatthias Clasen2006-06-211-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add an GError parameter.Matthias Clasen2006-06-211-2/+4
| | | | | | | | | | | | | | | | | 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.
* Don't open a display connection.Matthias Clasen2006-06-191-2/+4
| | | | | | | | | 2006-06-18 Matthias Clasen <mclasen@redhat.com> * tests/testnouiprint.c (main): Don't open a display connection. * gtk/gtkprintbackend.c (gtk_print_backend_load_modules): Make this work without a display connection. (339702, Alexander Larsson)
* Move the registration of the gtk-print-preview-command setting fromMatthias Clasen2006-06-161-5/+9
| | | | | | | | | | 2006-06-16 Matthias Clasen <mclasen@redhat.com> * gtk/gtkprintoperation-unix.c: * gtk/gtkprintbackend.c: Move the registration of the gtk-print-preview-command setting from gtkprintbackend.c to gtkprintoperation-unix.c, to make sure it is registered before the first use. Also, document the two settings.
* Cosmetic cleanups.Matthias Clasen2006-06-121-35/+35
| | | | | | | | | 2006-06-12 Matthias Clasen <mclasen@redhat.com> * gtk/gtkprintjob.c: * gtk/gtkprintbackend.c: * gtk/gtkpagesetupunixdialog.c: * gtk/gtkprintunixdialog.c: Cosmetic cleanups.
* Don't include gtkprinter-private.h here.Matthias Clasen2006-06-081-0/+1
| | | | | | | | | | | | | | | 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.
* Add gtkprintoperationpreview.[ch] Set default preview command. HardcodedAlexander Larsson2006-06-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Intern signal names.Matthias Clasen2006-06-011-5/+5
|
* Add gtk_print_unix_dialog_set_manual_capabilities that controls whatAlexander Larsson2006-05-241-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Never unload print backends. Remove gtk_print_backend_unref_at_idle.Alexander Larsson2006-05-151-13/+5
| | | | | | | | | | | | | | | 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.
* More of the sameMatthias Clasen2006-05-141-2/+2
|
* Added new symbolsAlexander Larsson2006-05-041-68/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge the gtk-printing branch. For more detailed ChangeLog entries, seeAlexander Larsson2006-04-211-0/+379
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.