Commit Graph

61 Commits

Author SHA1 Message Date
Matthias Clasen
3f26314d0f Bug 531008 – Crash in gtkprintunixdialog.c
* gtk/gtkprintunixdialog.c: Disconnect signal handlers when
        the dialog closes. Patch by Yevgen Muntyan.


svn path=/trunk/; revision=20186
2008-05-27 04:48:31 +00:00
Sven Neumann
d0ffa630f5 respect the GTK_NO_WINDOW flag and don't create an output window if it is
2008-05-25  Sven Neumann  <sven@gimp.org>

	* gtk/gtkdrawingarea.c (gtk_drawing_area_realize)
	(gtk_drawing_area_size_allocate): respect the GTK_NO_WINDOW flag
	and don't create an output window if it is set.

	* gtk/gtkprintunixdialog.c: set the GTK_NO_WINDOW flag for the
	drawing areas. Fixes bug #519317.


svn path=/trunk/; revision=20148
2008-05-25 12:53:59 +00:00
Matthias Clasen
59ae44d00e RH bug 204621 - "GtkPrint" asks for "Letter" size paper when "A4" size
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
2008-05-21 02:17:30 +00:00
Sven Neumann
04466bac87 gtk/gtkfilechooserdefault.c set alternative button order for overwrite
2008-03-13  Sven Neumann  <sven@gimp.org>

	* gtk/gtkfilechooserdefault.c
	* gtk/gtkprintunixdialog.c: set alternative button order for
	overwrite confirmation dialogs (bug #522191).

svn path=/trunk/; revision=19866
2008-03-13 14:09:02 +00:00
Sven Neumann
c59ceab0fc added some line-breaks for readability.
2008-03-13  Sven Neumann  <sven@gimp.org>

	* gtk/gtkprintunixdialog.c (add_custom_button_to_dialog)
	(overwrite_confirmation_dialog): added some line-breaks for
	readability.

svn path=/trunk/; revision=19862
2008-03-13 09:22:48 +00:00
Matthias Clasen
b7aeafa395 Add an overwrite confirmation dialog for print-to-file. (#474302, Marek
2008-03-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintunixdialog.c: Add an overwrite confirmation
        dialog for print-to-file.  (#474302, Marek Kašík)



svn path=/trunk/; revision=19787
2008-03-12 18:02:29 +00:00
Paolo Borelli
5c1a343c75 do not leak the pango layout, fixes #512375.
2008-01-28  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtkprintunixdialog.c (draw_page_cb): do not leak the pango
	layout, fixes #512375.


svn path=/trunk/; revision=19419
2008-01-28 16:06:16 +00:00
Christian Persch
88e5b9d26e Plug a mem leak. Bug #506107.
2007-12-31  Christian Persch  <chpe@gnome.org>

	* gtk/gtkprintunixdialog.c: (gtk_print_unix_dialog_get_property):
	Plug a mem leak. Bug #506107.

svn path=/trunk/; revision=19290
2007-12-31 00:04:32 +00:00
Yevgen Muntyan
6003bcbd96 added alternative button order in Print and Page Setup dialogs.
2007-12-07  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtkprintunixdialog.c:
	* gtk/gtkpagesetupunixdialog.c: added alternative button order in
	Print and Page Setup dialogs.


svn path=/trunk/; revision=19126
2007-12-07 18:05:42 +00:00
Matthias Clasen
fa0328da18 Change some labels to be clearer. String change ! (#376361, Sven Neumann)
2007-11-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintunixdialog.c: Change some labels to be clearer.
        String change !   (#376361, Sven Neumann)


svn path=/trunk/; revision=19061
2007-11-26 18:27:20 +00:00
Matthias Clasen
1a869c046a Add an internal child name for the notebook, so that GtkBuilder can be
2007-09-07  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintunixdialog.c: Add an internal child name for
        the notebook, so that GtkBuilder can be used to add custom tabs.
        (#472951, Christian Persch)


svn path=/trunk/; revision=18757
2007-09-07 20:03:22 +00:00
Matthias Clasen
57c44b18e7 Port to use new tooltips API. (#451397, Jan Arne Petersen)
2007-07-24  Matthias Clasen  <mclasen@redhat.com>

        * gtkcolorsel.c:
        * gtkfilechooserdefault.c:
        * gtkpagesetupunixdialog.c:
        * gtkprintunixdialog.c: Port to use new tooltips API.
        (#451397, Jan Arne Petersen)


svn path=/trunk/; revision=18539
2007-07-24 15:18:42 +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
Yevgen Muntyan
1a534510aa missing #include <ctype.h>.
2007-05-23  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtkprintunixdialog.c: missing #include <ctype.h>.

	* gtk/gtkhandlebox.c (gtk_handle_box_paint):
	* gtk/gtkpagesetupunixdialog.c (_gtk_load_custom_papers):
	* gtk/gtkstatusbar.c (gtk_statusbar_get_context_id):
	* gtk/gtkiconcache.c (_gtk_icon_cache_new_for_path):
	* gtk/gtktrayicon-x11.c (gtk_tray_icon_send_dock_request):
	* gtk/gtkpreview.c (gtk_preview_finalize):
	* gtk/gtknotebook.c (gtk_notebook_set_group_id):
	* tests/testnotebookdnd.c (window_creation_function):
	* tests/testiconview.c (do_popup_menu):
	Fixed some compiler warnings (#440689).

svn path=/trunk/; revision=17898
2007-05-23 15:06:03 +00:00
Christian Persch
be87e9a8cd Make gtk_printer_get_capabilities public, and move the
2007-04-30  Christian Persch  <chpe@gnome.org>

	* docs/reference/gtk/gtk-sections.txt:
	* gtk/gtk.symbols:
	* gtk/gtkprinter-private.h:
	* gtk/gtkprinter.c: (gtk_printer_get_capabilities),
	(gtk_print_capabilities_get_type):
	* gtk/gtkprinter.h:
	* gtk/gtkprintunixdialog.c: (selected_printer_changed):
	Make gtk_printer_get_capabilities public, and move the
	GtkPrintCapabilities definition to gtkprinter.h. Bug #390437.

svn path=/trunk/; revision=17746
2007-04-30 19:12:00 +00:00
Matthias Clasen
6573ed5f12 Fix some compiler warnings. (#433642, Kjartan Maraas)
2007-04-30  Matthias Clasen  <mclasen@redhat.com>

        Fix some compiler warnings.  (#433642, Kjartan Maraas)

        * gtk/gtkfilesystemwin32.c (gtk_file_system_win32_get_info):
        (gtk_file_system_win32_create_folder):
        * gtk/gtkaction.c (gtk_action_create_menu): Fix NULL/FALSE confusion.

        * gtk/gtklinkbutton.c (gtk_link_button_clicked): Pass
        the right type to uri_func.

        * gtk/gtktext.c (gtk_text_key_press):
        * gtk/gtkstatusicon.c (gtk_status_icon_get_property):
        * gtk/gtkxembed.c (_gtk_xembed_send_message): Add casts.

        * gtk/gtktrayicon-x11.c (gtk_tray_icon_manager_window_destroyed):
        (gtk_tray_icon_delete):
        * gtk/gtkprintunixdialog.c (create_main_page):
        * gtk/gtkhsv.c (gtk_hsv_motion): Remove unused variables.

        * gtk/gtkliststore.c: Adapt callbacks to GSequence types.


svn path=/trunk/; revision=17739
2007-04-30 16:18:54 +00:00
Matthias Clasen
69b57df8ce Remove leftover debugging spew
svn path=/trunk/; revision=17717
2007-04-29 23:21:32 +00:00
Matthias Clasen
bcbbbe5101 Make gtk_printer_has_details() and gtk_printer_request_details() public.
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkprinter-private.h:
        * gtk/gtkprinter.[hc]: Make gtk_printer_has_details() and
        gtk_printer_request_details() public.

        * gtk/gtkpagesetupunixdialog.c:
        * gtk/gtkprintunixdialog.c: Update callers.  (#389203,
        Christian Persch)



svn path=/trunk/; revision=17690
2007-04-29 04:42:13 +00:00
Matthias Clasen
8f409578f2 Parse half-open ranges like -2 or 3-, and be a bit more liberal about
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
2007-04-24 20:16:35 +00:00
Matthias Clasen
7a66837a80 Scroll to make the selected printer visible. (#418403, Nickolay V.
2007-03-16  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintunixdialog.c (printer_added_cb): Scroll to
        make the selected printer visible.  (#418403, Nickolay V. Shmyrev,
        patch by Christian Persch)



svn path=/trunk/; revision=17531
2007-03-16 05:13:10 +00:00
Matthias Clasen
3f9deb4aeb Change a label
svn path=/trunk/; revision=17356
2007-02-26 19:12:22 +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
ce503485cb Add a tooltip explaining the format of page ranges, and improve the page
2006-12-19  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintunixdialog.c: Add a tooltip explaining the
        format of page ranges, and improve the page sequence icon
        for the case of n_copies == 1.
2006-12-20 04:39:52 +00:00
Matthias Clasen
c078d6af69 Improve print dialog 2006-12-06 15:17:40 +00:00
Matthias Clasen
192f2ec215 Fix a typo. (#359542, Ghee Teo)
2006-10-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintunixdialog.c (update_dialog_from_capabilities): Fix
	a typo.  (#359542, Ghee Teo)
2006-10-08 19:39:15 +00:00
Matthias Clasen
c7ab7fb60b Remove leftover debugging 2006-08-17 04:51:40 +00:00
Matthias Clasen
2b2b742048 Re-select the current printer to update per-printer ui. (#348245, Don
2006-08-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintunixdialog.c (gtk_print_unix_dialog_set_manual_capabilities):
	Re-select the current printer to update per-printer ui.
	(#348245, Don Scorgie)
2006-08-17 04:48:39 +00:00
Matthias Clasen
a3bfbe23ab Documentation updates.
2006-06-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintsettings.c (gtk_print_settings_get_page_ranges):
        Documentation updates.

        * gtk/gtkprintunixdialog.c (gtk_print_unix_dialog_set_settings):
        Don't leak the ranges.  (#346237, Carolyn MacLeod)
2006-06-30 10:42:31 +00:00
Matthias Clasen
866006534c Add a preview capability 2006-06-30 10:32:56 +00:00
Matthias Clasen
f8f9384537 Documentation additions and fixes.
2006-06-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprinter.c:
        * gtk/gtkprintunixdialog.c:
        * gtk/gtkprintoperationpreview.c:
        * gtk/gtkprintcontext.c (gtk_print_context_set_cairo_context):
        * gtk/gtklabel.c (gtk_label_set_line_wrap_mode):
        * gtk/gtkentry.c (gtk_entry_new):
        * gtk/gtkprintoperation.c (gtk_print_operation_set_custom_tab_label):
        * gtk/gtkclipboard.c (gtk_clipboard_wait_for_rich_text): Documentation
        additions and fixes.

        * gtk/gtkaspectframe.h:
        * gtk/gtkaboutdialog.c:
        * gtk/gtkcalendar.c:
        * gtk/gtkinputdialog.c:
        * gtk/gtk.symbols: Remove unnecessary includes.

        * gtk/gtkprogress.[hc]:
        * gtk/gtkitemfactory.[hc]: Don't unnecessarily use GTK_COMPILATION,
        remove unnecessary includes.
2006-06-29 09:18:07 +00:00
Matthias Clasen
3742f415ea Forgotten file 2006-06-19 11:42:28 +00:00
Matthias Clasen
2858512ebe Add a GENERATE_PS capability. And use it here.
2006-06-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintjob.h: Add a GENERATE_PS capability.
	* gtk/gtkprintunixdialog.c (is_printer_active): And use it here.
2006-06-19 04:21:22 +00:00
Matthias Clasen
9ee7d66fa3 ~
2006-06-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintunixdialog.c: Clean up the handling of
	printer-specific options. There is just one extension point on the
	main tab now, and all options in the GtkPrintDialogExtension
	group are put there.
2006-06-17 05:15:49 +00:00
Matthias Clasen
b69212f681 Don't grow additional columns.
2006-06-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintunixdialog.c (add_option_to_table): Don't grow
	additional columns.
2006-06-16 18:33:29 +00:00
Matthias Clasen
bae05d11d4 Move the conflict label out of the button box. (#339456, Christian Persch)
2006-06-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintunixdialog.c (populate_dialog): Move the conflict
	label out of the button box.  (#339456, Christian Persch)
2006-06-16 17:38:00 +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
c6d1d9dd01 Add a GTK_PRINT_CAPABILITY_GENERATE_PDF capability.
2006-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintjob.h: Add a GTK_PRINT_CAPABILITY_GENERATE_PDF
	capability.

	* gtk/gtkprintunixdialog.c: Use it here to hide "Print to PDF"
	from the printer list.  (#339592, Christian Persch)
2006-06-12 16:47:41 +00:00
Matthias Clasen
01e3463f91 Cosmetic cleanups.
2006-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintjob.c:
	* gtk/gtkprintbackend.c:
	* gtk/gtkpagesetupunixdialog.c:
	* gtk/gtkprintunixdialog.c: Cosmetic cleanups.
2006-06-12 04:39:55 +00:00
Matthias Clasen
480803d5ba Don't include gtkprinter-private.h here.
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.
2006-06-08 17:01:28 +00:00
Alexander Larsson
fad69ba06c Add gtkprintoperationpreview.[ch] Set default preview command. Hardcoded
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.
2006-06-02 15:16:13 +00:00
Matthias Clasen
b79221eea7 more canonical signal names 2006-06-01 04:58:18 +00:00
Matthias Clasen
d6f2aadab7 Make collate check button insensitive 2006-05-24 19:03:52 +00:00
Matthias Clasen
b86d879e22 Make the range entry insensitive if another range option is selected.
2006-05-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintunixdialog.c (create_main_page): Make
	the range entry insensitive if another range option
	is selected.  (#342783, Caolan McNamara)
2006-05-24 18:21:12 +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
07d2dd1700 Add gtk_print_unix_dialog_add_custom_tab
2006-05-23  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkprintunixdialog.[ch]:
	Add gtk_print_unix_dialog_add_custom_tab

	* gtk/gtkprintoperation-unix.c:
	Implement custom widgets for unix.
	Fix some warnings by including cairo-ps/pdf.h

	* gtk/gtkprintoperation-win32.c:
	Mark string for translation.
2006-05-23 08:09:08 +00:00
Matthias Clasen
c2ef3c76f6 more of the same 2006-05-22 12:55:02 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
f24becbe96 Some fixes to capitalization of labels. (#341558, Dennis Cranston)
2006-05-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintunixdialog.c: Some fixes to capitalization of
	labels.  (#341558, Dennis Cranston)
2006-05-13 03:05:16 +00:00
Alexander Larsson
d8f1ce735c Better handling of the window group on unsetting transient-for, since the
2006-05-12  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkwindow.c:
	Better handling of the window group on unsetting transient-for, since
	the transient parent might have changed group.

	* gtk/gtkmenu.c:
	Combine the handling of transient for the attach-widget and the
	window group handling by setting transient-to on popup/popdown only.

	See bug #340401

	* gtk/gtkprintunixdialog.c:
	Remove part of old fix no longer needed.
2006-05-12 16:06:53 +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