Merge branch 'print-subdir' into 'main'

Move printing code to its own directory

See merge request GNOME/gtk!6067
This commit is contained in:
Matthias Clasen 2023-06-09 00:32:45 +00:00
commit da47d9cc3d
58 changed files with 547 additions and 384 deletions

View File

@ -68,6 +68,9 @@ for f in get_files('theme/Default/assets-hc', '.svg'):
for f in get_files('ui', '.ui'):
xml += ' <file>ui/{0}</file>\n'.format(f)
for f in get_files('print/ui', '.ui'):
xml += ' <file>print/ui/{0}</file>\n'.format(f)
xml += '\n'
xml += '''

View File

@ -200,19 +200,19 @@
#include <gtk/gtkoverlay.h>
#include <gtk/gtkoverlaylayout.h>
#include <gtk/gtkpadcontroller.h>
#include <gtk/gtkpagesetup.h>
#include <gtk/print/gtkpagesetup.h>
#include <gtk/gtkpaned.h>
#include <gtk/gtkpapersize.h>
#include <gtk/print/gtkpapersize.h>
#include <gtk/gtkpasswordentry.h>
#include <gtk/gtkpasswordentrybuffer.h>
#include <gtk/gtkpicture.h>
#include <gtk/gtkpopover.h>
#include <gtk/gtkpopovermenu.h>
#include <gtk/gtkpopovermenubar.h>
#include <gtk/gtkprintcontext.h>
#include <gtk/gtkprintoperation.h>
#include <gtk/gtkprintoperationpreview.h>
#include <gtk/gtkprintsettings.h>
#include <gtk/print/gtkprintcontext.h>
#include <gtk/print/gtkprintoperation.h>
#include <gtk/print/gtkprintoperationpreview.h>
#include <gtk/print/gtkprintsettings.h>
#include <gtk/gtkprogressbar.h>
#include <gtk/gtkrange.h>
#include <gtk/gtkrecentmanager.h>

View File

@ -63,7 +63,7 @@
#include "gtkwidgetprivate.h"
#include "gtkwindowprivate.h"
#include "gtkwindowgroup.h"
#include "gtkprintbackendprivate.h"
#include "print/gtkprintbackendprivate.h"
#include "gtkimmoduleprivate.h"
#include "gtkroot.h"
#include "gtknative.h"

View File

@ -18,10 +18,10 @@
#define __GTK_UNIX_PRINT_H_INSIDE__
#include <gtk/gtkpagesetupunixdialog.h>
#include <gtk/gtkprinter.h>
#include <gtk/gtkprintjob.h>
#include <gtk/gtkprintunixdialog.h>
#include <gtk/print/gtkpagesetupunixdialog.h>
#include <gtk/print/gtkprinter.h>
#include <gtk/print/gtkprintjob.h>
#include <gtk/print/gtkprintunixdialog.h>
#undef __GTK_UNIX_PRINT_H_INSIDE__

View File

@ -1,6 +1,7 @@
subdir('a11y')
subdir('deprecated')
subdir('inspector')
subdir('print')
gtk_cargs = [
'-DGTK_COMPILATION',
@ -128,7 +129,6 @@ gtk_private_sources = files([
'gtkplacesviewrow.c',
'gtkpointerfocus.c',
'gtkpopovercontent.c',
'gtkprintutils.c',
'gtkprivate.c',
'gtkprogresstracker.c',
'gtkrbtree.c',
@ -303,19 +303,13 @@ gtk_public_sources = files([
'gtkoverlay.c',
'gtkoverlaylayout.c',
'gtkpadcontroller.c',
'gtkpagesetup.c',
'gtkpaned.c',
'gtkpapersize.c',
'gtkpasswordentry.c',
'gtkpasswordentrybuffer.c',
'gtkpicture.c',
'gtkpopover.c',
'gtkpopovermenu.c',
'gtkpopovermenubar.c',
'gtkprintcontext.c',
'gtkprintoperation.c',
'gtkprintoperationpreview.c',
'gtkprintsettings.c',
'gtkprogressbar.c',
'gtkpropertylookuplistmodel.c',
'gtkrange.c',
@ -407,6 +401,8 @@ gtk_public_sources = files([
'gtkwindowhandle.c',
])
gtk_public_sources += gtk_print_sources
gtk_private_type_headers = files([
'gtkcsstypesprivate.h',
'gtktexthandleprivate.h',
@ -545,19 +541,13 @@ gtk_public_headers = files([
'gtkoverlay.h',
'gtkoverlaylayout.h',
'gtkpadcontroller.h',
'gtkpagesetup.h',
'gtkpaned.h',
'gtkpapersize.h',
'gtkpasswordentry.h',
'gtkpasswordentrybuffer.h',
'gtkpicture.h',
'gtkpopover.h',
'gtkpopovermenu.h',
'gtkpopovermenubar.h',
'gtkprintcontext.h',
'gtkprintoperation.h',
'gtkprintoperationpreview.h',
'gtkprintsettings.h',
'gtkprogressbar.h',
'gtkrange.h',
'gtkrecentmanager.h',
@ -634,6 +624,7 @@ gtk_public_headers = files([
install_headers(gtk_public_headers, subdir: 'gtk-4.0/gtk/')
install_headers(gtk_deprecated_headers, subdir: 'gtk-4.0/gtk/deprecated')
install_headers(gtk_print_headers, subdir: 'gtk-4.0/gtk/print')
gtk_sources = gtk_public_sources + gtk_private_sources
@ -684,51 +675,24 @@ if os_unix and tracker3_dep.found()
gtk_sources += 'gtksearchenginetracker3.c'
endif
gtk_unix_print_main_header = [
'gtkunixprint.h'
]
if os_unix
gtk_unix_print_headers = [
'gtkpagesetupunixdialog.h',
'gtkprintunixdialog.h',
'gtkprinter.h',
'gtkprintjob.h',
'gtkunixprint.h',
]
install_headers(gtk_unix_print_headers, subdir: 'gtk-4.0/unix-print/gtk')
gtk_unix_print_sources = files([
'gtkcustompaperunixdialog.c',
'gtkpagesetupunixdialog.c',
'gtkprintbackend.c',
'gtkprinter.c',
'gtkprinteroption.c',
'gtkprinteroptionset.c',
'gtkprinteroptionwidget.c',
'gtkprintjob.c',
'gtkprintoperation-unix.c',
'gtkprintoperation-portal.c',
'gtkprintunixdialog.c',
])
install_headers(gtk_unix_print_main_header, subdir: 'gtk-4.0/unix-print/gtk')
install_headers(gtk_unix_print_headers, subdir: 'gtk-4.0/unix-print/gtk/print')
gtk_sources += gtk_unix_print_sources
endif
if os_win32
gtk_win32_print_headers = []
gtk_win32_print_sources = files([
'gtkprint-win32.c',
'gtkprintoperation-win32.c',
'gtkfilechoosernativewin32.c',
'gtkwin32.c',
])
gtk_sources += gtk_win32_print_sources
gtk_sources += [
'gtkcolorpickerwin32.c',
'gtkimcontextime.c'
'gtkimcontextime.c',
'gtkfilechoosernativewin32.c',
'gtkwin32.c',
]
if cc.has_header_symbol('windows.h', 'IPrintDialogCallback')
cdata.set('HAVE_IPRINTDIALOGCALLBACK', 1)
endif
endif
if x11_enabled
@ -958,7 +922,7 @@ gtkmarshalers = gnome.genmarshal('gtkmarshalers',
gtkmarshal_h = gtkmarshalers[1]
gtktypebuiltins = gnome.mkenums('gtktypebuiltins',
sources: gtk_public_headers + gtk_deprecated_headers,
sources: gtk_public_headers + gtk_deprecated_headers + gtk_print_headers,
c_template: 'gtktypebuiltins.c.template',
h_template: 'gtktypebuiltins.h.template',
install_dir: gtk_includedir / 'gtk-4.0/gtk',
@ -1286,6 +1250,7 @@ if build_gir
gtk_introspection_sources = [
gtk_public_headers,
gtk_public_sources,
gtk_print_headers,
gtk_css_public_headers,
gtk_css_public_sources,
gtk_deprecated_headers,
@ -1295,7 +1260,7 @@ if build_gir
]
if os_unix
gtk_introspection_sources += [ gtk_unix_print_headers, gtk_unix_print_sources ]
gtk_introspection_sources += [ gtk_unix_print_headers + gtk_unix_print_main_header, gtk_unix_print_sources ]
endif
if os_win32

View File

@ -26,18 +26,12 @@
#endif
#include <glib/gi18n-lib.h>
#include "gtkprivate.h"
#include "deprecated/gtkliststore.h"
#include "gtksignallistitemfactory.h"
#include "gtklabel.h"
#include "gtkspinbutton.h"
#include "deprecated/gtkdialogprivate.h"
#include "gtkcustompaperunixdialog.h"
#include "gtkprintbackendprivate.h"
#include "gtkprintutilsprivate.h"
#include "deprecated/gtkdialogprivate.h"
#define LEGACY_CUSTOM_PAPER_FILENAME ".gtk-custom-papers"
#define CUSTOM_PAPER_FILENAME "custom-papers"

View File

@ -18,11 +18,13 @@
#include "config.h"
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gtkpagesetup.h"
#include "gtkprintutilsprivate.h"
#include "gtkprintoperation.h" /* for GtkPrintError */
#include <glib/gi18n-lib.h>
#include "gtktypebuiltins.h"
/**
* GtkPageSetup:

View File

@ -23,7 +23,7 @@
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <gtk/gtkpapersize.h>
#include <gtk/print/gtkpapersize.h>
G_BEGIN_DECLS

View File

@ -22,20 +22,14 @@
#include <locale.h>
#include <glib/gi18n-lib.h>
#include "gtkprivate.h"
#include "gtkbutton.h"
#include "gtkscrolledwindow.h"
#include "gtkcheckbutton.h"
#include "gtklabel.h"
#include "gtkgrid.h"
#include "deprecated/gtkdialogprivate.h"
#include "gtkpagesetupunixdialog.h"
#include "gtkcustompaperunixdialog.h"
#include "gtkprintbackendprivate.h"
#include "gtkpapersize.h"
#include "gtkprintutilsprivate.h"
#include "deprecated/gtkdialogprivate.h"
/**
* GtkPageSetupUnixDialog:
@ -152,7 +146,7 @@ gtk_page_setup_unix_dialog_class_init (GtkPageSetupUnixDialogClass *class)
/* Bind class to template
*/
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/ui/gtkpagesetupunixdialog.ui");
"/org/gtk/libgtk/print/ui/gtkpagesetupunixdialog.ui");
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, printer_combo);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, paper_size_combo);

View File

@ -0,0 +1,158 @@
#include "config.h"
#include "gtkpagethumbnailprivate.h"
enum
{
PROP_PAGE_NUM = 1,
NUM_PROPERTIES,
};
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
struct _GtkPageThumbnail
{
GtkWidget parent_instance;
GtkWidget *label;
int page_num;
};
struct _GtkPageThumbnailClass
{
GtkWidgetClass parent_class;
};
G_DEFINE_TYPE (GtkPageThumbnail, gtk_page_thumbnail, GTK_TYPE_WIDGET)
static void
gtk_page_thumbnail_init (GtkPageThumbnail *self)
{
self->label = gtk_inscription_new ("0");
gtk_widget_set_parent (self->label, GTK_WIDGET (self));
gtk_inscription_set_min_chars (GTK_INSCRIPTION (self->label), 1);
gtk_inscription_set_nat_chars (GTK_INSCRIPTION (self->label), 1);
}
static void
gtk_page_thumbnail_dispose (GObject *object)
{
GtkPageThumbnail *self = GTK_PAGE_THUMBNAIL (object);
g_clear_pointer (&self->label, gtk_widget_unparent);
G_OBJECT_CLASS (gtk_page_thumbnail_parent_class)->dispose (object);
}
static void
gtk_page_thumbnail_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkPageThumbnail *self = GTK_PAGE_THUMBNAIL (object);
switch (prop_id)
{
case PROP_PAGE_NUM:
gtk_page_thumbnail_set_page_num (self, g_value_get_int (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_page_thumbnail_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkPageThumbnail *self = GTK_PAGE_THUMBNAIL (object);
switch (prop_id)
{
case PROP_PAGE_NUM:
g_value_set_int (value, self->page_num);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_page_thumbnail_size_allocate (GtkWidget *widget,
int width,
int height,
int baseline)
{
GtkPageThumbnail *self = GTK_PAGE_THUMBNAIL (widget);
GtkRequisition nat;
GtkAllocation alloc;
gtk_widget_get_preferred_size (self->label, NULL, &nat);
alloc.x = width - nat.width;
alloc.y = height - nat.height;
alloc.width = nat.width;
alloc.height = nat.height;
gtk_widget_size_allocate (self->label, &alloc, -1);
}
static void
gtk_page_thumbnail_class_init (GtkPageThumbnailClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
object_class->dispose = gtk_page_thumbnail_dispose;
object_class->set_property = gtk_page_thumbnail_set_property;
object_class->get_property = gtk_page_thumbnail_get_property;
widget_class->size_allocate = gtk_page_thumbnail_size_allocate;
properties[PROP_PAGE_NUM] =
g_param_spec_int ("page-num", NULL, NULL,
0, G_MAXINT, 0, G_PARAM_READWRITE);
g_object_class_install_properties (object_class, NUM_PROPERTIES, properties);
gtk_widget_class_set_css_name (widget_class, "page-thumbnail");
}
GtkPageThumbnail *
gtk_page_thumbnail_new (void)
{
return g_object_new (GTK_TYPE_PAGE_THUMBNAIL, NULL);
}
void
gtk_page_thumbnail_set_page_num (GtkPageThumbnail *self,
int page_num)
{
g_return_if_fail (GTK_IS_PAGE_THUMBNAIL (self));
g_return_if_fail (page_num >= 0);
char text[64];
if (self->page_num == page_num)
return;
self->page_num = page_num;
g_snprintf (text, sizeof (text), "%d", self->page_num);
gtk_inscription_set_text (GTK_INSCRIPTION (self->label), text);
gtk_widget_queue_draw (GTK_WIDGET (self));
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PAGE_NUM]);
}
int
gtk_page_thumbnail_get_page_num (GtkPageThumbnail *self)
{
g_return_val_if_fail (GTK_IS_PAGE_THUMBNAIL (self), 0);
return self->page_num;
}

View File

@ -0,0 +1,12 @@
#pragma once
#include <gtk/gtk.h>
#define GTK_TYPE_PAGE_THUMBNAIL (gtk_page_thumbnail_get_type ())
G_DECLARE_FINAL_TYPE (GtkPageThumbnail, gtk_page_thumbnail, GTK, PAGE_THUMBNAIL, GtkWidget)
GtkPageThumbnail * gtk_page_thumbnail_new (void);
void gtk_page_thumbnail_set_page_num (GtkPageThumbnail *self,
int page_num);
int gtk_page_thumbnail_get_page_num (GtkPageThumbnail *self);

View File

@ -26,10 +26,11 @@
#endif
#include <math.h>
#include <glib/gi18n-lib.h>
#include "gtkpapersize.h"
#include "gtkprintutilsprivate.h"
#include "gtkprintoperation.h" /* for GtkPrintError */
#include <glib/gi18n-lib.h>
/* _gtk_load_custom_papers() only on Unix so far */
#ifdef G_OS_UNIX

View File

@ -20,12 +20,12 @@
#include <string.h>
#include <gmodule.h>
#include <glib/gi18n-lib.h>
#include "gtkdebug.h"
#include <gtk/gtk.h>
#include "gtkmodulesprivate.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtkprintbackendprivate.h"
@ -272,7 +272,7 @@ gtk_print_backend_class_init (GtkPrintBackendClass *class)
GTK_PARAM_READWRITE));
signals[PRINTER_LIST_CHANGED] =
g_signal_new (I_("printer-list-changed"),
g_signal_new ("printer-list-changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintBackendClass, printer_list_changed),
@ -280,7 +280,7 @@ gtk_print_backend_class_init (GtkPrintBackendClass *class)
NULL,
G_TYPE_NONE, 0);
signals[PRINTER_LIST_DONE] =
g_signal_new (I_("printer-list-done"),
g_signal_new ("printer-list-done",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintBackendClass, printer_list_done),
@ -288,7 +288,7 @@ gtk_print_backend_class_init (GtkPrintBackendClass *class)
NULL,
G_TYPE_NONE, 0);
signals[PRINTER_ADDED] =
g_signal_new (I_("printer-added"),
g_signal_new ("printer-added",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintBackendClass, printer_added),
@ -296,7 +296,7 @@ gtk_print_backend_class_init (GtkPrintBackendClass *class)
NULL,
G_TYPE_NONE, 1, GTK_TYPE_PRINTER);
signals[PRINTER_REMOVED] =
g_signal_new (I_("printer-removed"),
g_signal_new ("printer-removed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintBackendClass, printer_removed),
@ -304,7 +304,7 @@ gtk_print_backend_class_init (GtkPrintBackendClass *class)
NULL,
G_TYPE_NONE, 1, GTK_TYPE_PRINTER);
signals[PRINTER_STATUS_CHANGED] =
g_signal_new (I_("printer-status-changed"),
g_signal_new ("printer-status-changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintBackendClass, printer_status_changed),
@ -312,7 +312,7 @@ gtk_print_backend_class_init (GtkPrintBackendClass *class)
NULL,
G_TYPE_NONE, 1, GTK_TYPE_PRINTER);
signals[REQUEST_PASSWORD] =
g_signal_new (I_("request-password"),
g_signal_new ("request-password",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintBackendClass, request_password),

View File

@ -27,8 +27,8 @@
#endif
#include <gtk/gtk.h>
#include <gtk/gtkunixprint.h>
#include <gtk/gtkprinteroptionsetprivate.h>
#include "gtkunixprint.h"
#include "gtkprinteroptionsetprivate.h"
G_BEGIN_DECLS

View File

@ -24,7 +24,7 @@
#endif
#include <pango/pango.h>
#include <gtk/gtkpagesetup.h>
#include <gtk/print/gtkpagesetup.h>
G_BEGIN_DECLS

View File

@ -20,8 +20,6 @@
#include <string.h>
#include <stdio.h>
#include "gtkprivate.h"
#include "gtkprinter.h"
#include "gtkprinterprivate.h"
#include "gtkprintbackendprivate.h"
@ -120,7 +118,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
PROP_NAME,
g_param_spec_string ("name", NULL, NULL,
"",
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
/**
* GtkPrinter:backend: (attributes org.gtk.Property.get=gtk_printer_get_backend)
@ -131,7 +129,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
PROP_BACKEND,
g_param_spec_object ("backend", NULL, NULL,
GTK_TYPE_PRINT_BACKEND,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
/**
* GtkPrinter:is-virtual: (attributes org.gtk.Property.get=gtk_printer_is_virtual)
@ -142,7 +140,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
PROP_IS_VIRTUAL,
g_param_spec_boolean ("is-virtual", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
/**
* GtkPrinter:accepts-pdf: (attributes org.gtk.Property.get=gtk_printer_accepts_pdf)
@ -153,7 +151,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
PROP_ACCEPTS_PDF,
g_param_spec_boolean ("accepts-pdf", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
/**
* GtkPrinter:accepts-ps: (attributes org.gtk.Property.get=gtk_printer_accepts_ps)
@ -164,7 +162,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
PROP_ACCEPTS_PS,
g_param_spec_boolean ("accepts-ps", NULL, NULL,
TRUE,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
/**
* GtkPrinter:state-message: (attributes org.gtk.Property.get=gtk_printer_get_state_message)
@ -175,7 +173,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
PROP_STATE_MESSAGE,
g_param_spec_string ("state-message", NULL, NULL,
"",
GTK_PARAM_READABLE));
G_PARAM_READABLE));
/**
* GtkPrinter:location: (attributes org.gtk.Property.get=gtk_printer_get_location)
@ -186,7 +184,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
PROP_LOCATION,
g_param_spec_string ("location", NULL, NULL,
"",
GTK_PARAM_READABLE));
G_PARAM_READABLE));
/**
* GtkPrinter:icon-name: (attributes org.gtk.Property.get=gtk_printer_get_icon_name)
@ -197,7 +195,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
PROP_ICON_NAME,
g_param_spec_string ("icon-name", NULL, NULL,
"printer",
GTK_PARAM_READABLE));
G_PARAM_READABLE));
/**
* GtkPrinter:job-count: (attributes org.gtk.Property.get=gtk_printer_get_job_count)
@ -210,7 +208,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
0,
G_MAXINT,
0,
GTK_PARAM_READABLE));
G_PARAM_READABLE));
/**
* GtkPrinter:paused: (attributes org.gtk.Property.get=gtk_printer_is_paused)
@ -224,7 +222,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
PROP_PAUSED,
g_param_spec_boolean ("paused", NULL, NULL,
FALSE,
GTK_PARAM_READABLE));
G_PARAM_READABLE));
/**
* GtkPrinter:accepting-jobs: (attributes org.gtk.Property.get=gtk_printer_is_accepting_jobs)
@ -235,7 +233,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
PROP_ACCEPTING_JOBS,
g_param_spec_boolean ("accepting-jobs", NULL, NULL,
TRUE,
GTK_PARAM_READABLE));
G_PARAM_READABLE));
/**
* GtkPrinter::details-acquired:
@ -249,7 +247,7 @@ gtk_printer_class_init (GtkPrinterClass *class)
* actually obtained.
*/
signals[DETAILS_ACQUIRED] =
g_signal_new (I_("details-acquired"),
g_signal_new ("details-acquired",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrinterClass, details_acquired),
@ -1361,7 +1359,7 @@ gtk_print_capabilities_get_type (void)
{ 0, NULL, NULL }
};
etype = g_flags_register_static (I_("GtkPrintCapabilities"), values);
etype = g_flags_register_static ("GtkPrintCapabilities", values);
}
return etype;

View File

@ -18,9 +18,7 @@
#include "config.h"
#include <string.h>
#include <gmodule.h>
#include "gtkprivate.h"
#include "gtkprinteroptionprivate.h"
/*****************************************
@ -88,7 +86,7 @@ gtk_printer_option_class_init (GtkPrinterOptionClass *class)
gobject_class->get_property = gtk_printer_option_get_property;
signals[CHANGED] =
g_signal_new (I_("changed"),
g_signal_new ("changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrinterOptionClass, changed),
@ -100,7 +98,7 @@ gtk_printer_option_class_init (GtkPrinterOptionClass *class)
PROP_VALUE,
g_param_spec_string ("value", NULL, NULL,
"",
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
}
GtkPrinterOption *

View File

@ -87,39 +87,28 @@ struct _GtkPrinterOptionClass
void (*_gtk_reserved4) (void);
};
GDK_AVAILABLE_IN_ALL
GType gtk_printer_option_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GtkPrinterOption *gtk_printer_option_new (const char *name,
const char *display_text,
GtkPrinterOptionType type);
GDK_AVAILABLE_IN_ALL
void gtk_printer_option_set (GtkPrinterOption *option,
const char *value);
GDK_AVAILABLE_IN_ALL
void gtk_printer_option_set_has_conflict (GtkPrinterOption *option,
gboolean has_conflict);
GDK_AVAILABLE_IN_ALL
void gtk_printer_option_clear_has_conflict (GtkPrinterOption *option);
GDK_AVAILABLE_IN_ALL
void gtk_printer_option_set_boolean (GtkPrinterOption *option,
gboolean value);
GDK_AVAILABLE_IN_ALL
void gtk_printer_option_allocate_choices (GtkPrinterOption *option,
int num);
GDK_AVAILABLE_IN_ALL
void gtk_printer_option_choices_from_array (GtkPrinterOption *option,
int num_choices,
const char **choices,
const char **choices_display);
GDK_AVAILABLE_IN_ALL
gboolean gtk_printer_option_has_choice (GtkPrinterOption *option,
const char *choice);
GDK_AVAILABLE_IN_ALL
void gtk_printer_option_set_activates_default (GtkPrinterOption *option,
gboolean activates);
GDK_AVAILABLE_IN_ALL
gboolean gtk_printer_option_get_activates_default (GtkPrinterOption *option);

View File

@ -19,10 +19,8 @@
#include "config.h"
#include <string.h>
#include <glib.h>
#include <gmodule.h>
#include "gtkprinteroptionsetprivate.h"
#include "gtkprivate.h"
/*****************************************
* GtkPrinterOptionSet *
@ -67,7 +65,7 @@ gtk_printer_option_set_class_init (GtkPrinterOptionSetClass *class)
gobject_class->finalize = gtk_printer_option_set_finalize;
signals[CHANGED] =
g_signal_new (I_("changed"),
g_signal_new ("changed",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrinterOptionSetClass, changed),

View File

@ -22,19 +22,6 @@
#include <ctype.h>
#include <glib/gi18n-lib.h>
#include "gtkcheckbutton.h"
#include "gtkdropdown.h"
#include "gtklistitem.h"
#include "gtksignallistitemfactory.h"
#include "gtkentry.h"
#include "gtkfiledialog.h"
#include "gtkimage.h"
#include "gtklabel.h"
#include "gtkcheckbutton.h"
#include "gtkgrid.h"
#include "gtkorientable.h"
#include "gtkprivate.h"
#include "gtkstringlist.h"
#include "gtkprinteroptionwidgetprivate.h"
@ -112,7 +99,7 @@ gtk_printer_option_widget_class_init (GtkPrinterOptionWidgetClass *class)
widget_class->mnemonic_activate = gtk_printer_option_widget_mnemonic_activate;
signals[CHANGED] =
g_signal_new (I_("changed"),
g_signal_new ("changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrinterOptionWidgetClass, changed),
@ -124,7 +111,7 @@ gtk_printer_option_widget_class_init (GtkPrinterOptionWidgetClass *class)
PROP_SOURCE,
g_param_spec_object ("source", NULL, NULL,
GTK_TYPE_PRINTER_OPTION,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT));
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
}

View File

@ -16,8 +16,8 @@
*/
#pragma once
#include <gtk/gtk.h>
#include "gtkprinteroptionprivate.h"
#include "gtkbox.h"
G_BEGIN_DECLS

View File

@ -19,7 +19,7 @@
#pragma once
#include <gtk/gtk.h>
#include <gtk/gtkunixprint.h>
#include "gtkunixprint.h"
#include "gtkprinteroptionsetprivate.h"
G_BEGIN_DECLS

View File

@ -42,7 +42,6 @@
#include <sys/stat.h>
#include <glib/gstdio.h>
#include "gtkprivate.h"
#include "gtkprintjob.h"
#include "gtkprinter.h"
@ -144,7 +143,7 @@ gtk_print_job_class_init (GtkPrintJobClass *class)
PROP_TITLE,
g_param_spec_string ("title", NULL, NULL,
NULL,
GTK_PARAM_READWRITE |
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
/**
@ -156,7 +155,7 @@ gtk_print_job_class_init (GtkPrintJobClass *class)
PROP_PRINTER,
g_param_spec_object ("printer", NULL, NULL,
GTK_TYPE_PRINTER,
GTK_PARAM_READWRITE |
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
/**
@ -168,7 +167,7 @@ gtk_print_job_class_init (GtkPrintJobClass *class)
PROP_SETTINGS,
g_param_spec_object ("settings", NULL, NULL,
GTK_TYPE_PRINT_SETTINGS,
GTK_PARAM_READWRITE |
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
/**
@ -180,7 +179,7 @@ gtk_print_job_class_init (GtkPrintJobClass *class)
PROP_PAGE_SETUP,
g_param_spec_object ("page-setup", NULL, NULL,
GTK_TYPE_PAGE_SETUP,
GTK_PARAM_READWRITE |
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
/**
@ -193,7 +192,7 @@ gtk_print_job_class_init (GtkPrintJobClass *class)
PROP_TRACK_PRINT_STATUS,
g_param_spec_boolean ("track-print-status", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintJob::status-changed:
@ -205,7 +204,7 @@ gtk_print_job_class_init (GtkPrintJobClass *class)
* to obtain the new status.
*/
signals[STATUS_CHANGED] =
g_signal_new (I_("status-changed"),
g_signal_new ("status-changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintJobClass, status_changed),

View File

@ -24,7 +24,7 @@
#include <cairo.h>
#include <gtk/gtk.h>
#include <gtk/gtkprinter.h>
#include <gtk/print/gtkprinter.h>
G_BEGIN_DECLS

View File

@ -29,16 +29,42 @@
#include <gio/gunixfdlist.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gtkwindowprivate.h"
#include "gtkprintoperation-private.h"
#include "gtkprintoperation-portal.h"
#include "gtkprintsettings.h"
#include "gtkpagesetup.h"
#include "gtkprintbackendprivate.h"
#include "gtkfilelauncher.h"
#include <glib/gi18n-lib.h>
#include "gtkwindowprivate.h"
#include "gtkprivate.h"
#define PORTAL_BUS_NAME "org.freedesktop.portal.Desktop"
#define PORTAL_OBJECT_PATH "/org/freedesktop/portal/desktop"
#define PORTAL_REQUEST_INTERFACE "org.freedesktop.portal.Request"
#define PORTAL_PRINT_INTERFACE "org.freedesktop.portal.Print"
static char *
get_portal_request_path (GDBusConnection *connection,
char **token)
{
char *sender;
int i;
char *path;
*token = g_strdup_printf ("gtk%d", g_random_int_range (0, G_MAXINT));
/* +1 to skip the leading : */
sender = g_strdup (g_dbus_connection_get_unique_name (connection) + 1);
for (i = 0; sender[i]; i++)
if (sender[i] == '.')
sender[i] = '_';
path = g_strconcat (PORTAL_OBJECT_PATH, "/request/", sender, "/", *token, NULL);
g_free (sender);
return path;
}
typedef struct {
GtkPrintOperation *op;
@ -575,7 +601,7 @@ call_prepare_print (GtkPrintOperation *op,
char *token;
portal->prepare_print_handle =
gtk_get_portal_request_path (g_dbus_proxy_get_connection (portal->proxy), &token);
get_portal_request_path (g_dbus_proxy_get_connection (portal->proxy), &token);
portal->response_signal_id =
g_dbus_connection_signal_subscribe (g_dbus_proxy_get_connection (G_DBUS_PROXY (portal->proxy)),

View File

@ -29,20 +29,20 @@
#include <fcntl.h>
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gtkprivate.h"
#include "gtkprintoperation-private.h"
#include "gtkprintoperation-portal.h"
#include <cairo-pdf.h>
#include <cairo-ps.h>
#include "gtkprivate.h"
#include "gtkprintunixdialog.h"
#include "gtkpagesetupunixdialog.h"
#include "gtkprintbackendprivate.h"
#include "gtkprinter.h"
#include "gtkprintjob.h"
#include "gtklabel.h"
#include "gtkfilelauncher.h"
#include <glib/gi18n-lib.h>
typedef struct

View File

@ -39,12 +39,11 @@
#include <cairo-win32.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gtkwidgetprivate.h"
#include "gtkprintoperation-private.h"
#include "gtkprint-win32.h"
#include "gtkwindow.h"
#include "gtkprivate.h"
#include "gtkwidgetprivate.h"
#include "gtknative.h"
#include "win32/gdkprivate-win32.h"
#define MAX_PAGE_RANGES 20

View File

@ -25,14 +25,12 @@
#include <cairo-pdf.h>
#include "gtkprintoperation-private.h"
#include <glib/gi18n-lib.h>
#include "gtkmarshalers.h"
#include "gdk/gdkmarshalers.h"
#include <glib/gi18n-lib.h>
#include "gtkprivate.h"
#include "deprecated/gtkmessagedialog.h"
#include "gtkwindowgroup.h"
#include "gtktypebuiltins.h"
#include "gtkprintoperation-private.h"
/**
* GtkPrintOperation:
@ -632,7 +630,7 @@ preview_ready (GtkPrintOperationPreview *preview,
preview_print_idle,
pop,
preview_print_idle_done);
gdk_source_set_static_name_by_id (id, "[gtk] preview_print_idle");
g_source_set_static_name (g_main_context_find_source_by_id (NULL, id), "[gtk] preview_print_idle");
}
@ -768,7 +766,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* after the ::done signal was emitted.
*/
signals[DONE] =
g_signal_new (I_("done"),
g_signal_new ("done",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, done),
@ -790,7 +788,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* [method@Gtk.PrintOperation.set_n_pages].
*/
signals[BEGIN_PRINT] =
g_signal_new (I_("begin-print"),
g_signal_new ("begin-print",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, begin_print),
@ -821,7 +819,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* Returns: %TRUE if pagination is complete
*/
signals[PAGINATE] =
g_signal_new (I_("paginate"),
g_signal_new ("paginate",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, paginate),
@ -846,7 +844,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* this page.
*/
signals[REQUEST_PAGE_SETUP] =
g_signal_new (I_("request-page-setup"),
g_signal_new ("request-page-setup",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, request_page_setup),
@ -919,7 +917,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* according to your needs.
*/
signals[DRAW_PAGE] =
g_signal_new (I_("draw-page"),
g_signal_new ("draw-page",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, draw_page),
@ -943,7 +941,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* been allocated in the [signal@Gtk.PrintOperation::begin-print] handler.
*/
signals[END_PRINT] =
g_signal_new (I_("end-print"),
g_signal_new ("end-print",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, end_print),
@ -962,7 +960,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* status.
*/
signals[STATUS_CHANGED] =
g_signal_new (I_("status-changed"),
g_signal_new ("status-changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, status_changed),
@ -991,7 +989,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* the print dialog
*/
signals[CREATE_CUSTOM_WIDGET] =
g_signal_new (I_("create-custom-widget"),
g_signal_new ("create-custom-widget",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, create_custom_widget),
@ -1015,7 +1013,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* widget, which can actualize itself according to this change.
*/
signals[UPDATE_CUSTOM_WIDGET] =
g_signal_new (I_("update-custom-widget"),
g_signal_new ("update-custom-widget",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, update_custom_widget),
@ -1039,7 +1037,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* later time.
*/
signals[CUSTOM_WIDGET_APPLY] =
g_signal_new (I_("custom-widget-apply"),
g_signal_new ("custom-widget-apply",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, custom_widget_apply),
@ -1075,7 +1073,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
* Returns: %TRUE if the listener wants to take over control of the preview
*/
signals[PREVIEW] =
g_signal_new (I_("preview"),
g_signal_new ("preview",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationClass, preview),
@ -1102,7 +1100,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_DEFAULT_PAGE_SETUP,
g_param_spec_object ("default-page-setup", NULL, NULL,
GTK_TYPE_PAGE_SETUP,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintOperation:print-settings: (attributes org.gtk.Property.get=gtk_print_operation_get_print_settings org.gtk.Property.set=gtk_print_operation_set_print_settings)
@ -1117,7 +1115,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_PRINT_SETTINGS,
g_param_spec_object ("print-settings", NULL, NULL,
GTK_TYPE_PRINT_SETTINGS,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintOperation:job-name: (attributes org.gtk.Property.set=gtk_print_operation_set_job_name)
@ -1132,7 +1130,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_JOB_NAME,
g_param_spec_string ("job-name", NULL, NULL,
"",
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintOperation:n-pages: (attributes org.gtk.Property.set=gtk_print_operation_set_n_pages)
@ -1155,7 +1153,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
-1,
G_MAXINT,
-1,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkPrintOperation:current-page: (attributes org.gtk.Property.set=gtk_print_operation_set_current_page)
@ -1173,7 +1171,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
-1,
G_MAXINT,
-1,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkPrintOperation:use-full-page: (attributes org.gtk.Property.set=gtk_print_operation_set_use_full_page)
@ -1191,7 +1189,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_USE_FULL_PAGE,
g_param_spec_boolean ("use-full-page", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkPrintOperation:track-print-status: (attributes org.gtk.Property.set=gtk_print_operation_set_track_print_status)
@ -1208,7 +1206,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_TRACK_PRINT_STATUS,
g_param_spec_boolean ("track-print-status", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkPrintOperation:unit: (attributes org.gtk.Property.set=gtk_print_operation_set_unit)
@ -1222,7 +1220,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
g_param_spec_enum ("unit", NULL, NULL,
GTK_TYPE_UNIT,
GTK_UNIT_NONE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkPrintOperation:show-progress: (attributes org.gtk.Property.set=gtk_print_operation_set_show_progress)
@ -1234,7 +1232,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_SHOW_PROGRESS,
g_param_spec_boolean ("show-progress", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkPrintOperation:allow-async: (attributes org.gtk.Property.set=gtk_print_operation_set_allow_async)
@ -1254,7 +1252,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_ALLOW_ASYNC,
g_param_spec_boolean ("allow-async", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkPrintOperation:export-filename: (attributes org.gtk.Property.set=gtk_print_operation_set_export_filename)
@ -1274,7 +1272,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_EXPORT_FILENAME,
g_param_spec_string ("export-filename", NULL, NULL,
NULL,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintOperation:status: (attributes org.gtk.Property.get=gtk_print_operation_get_status)
@ -1286,7 +1284,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
g_param_spec_enum ("status", NULL, NULL,
GTK_TYPE_PRINT_STATUS,
GTK_PRINT_STATUS_INITIAL,
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkPrintOperation:status-string: (attributes org.gtk.Property.get=gtk_print_operation_get_status_string)
@ -1303,7 +1301,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_STATUS_STRING,
g_param_spec_string ("status-string", NULL, NULL,
"",
GTK_PARAM_READABLE));
G_PARAM_READABLE));
/**
@ -1319,7 +1317,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_CUSTOM_TAB_LABEL,
g_param_spec_string ("custom-tab-label", NULL, NULL,
NULL,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintOperation:support-selection: (attributes org.gtk.Property.get=gtk_print_operation_get_support_selection org.gtk.Property.set=gtk_print_operation_set_support_selection)
@ -1332,7 +1330,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_SUPPORT_SELECTION,
g_param_spec_boolean ("support-selection", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkPrintOperation:has-selection: (attributes org.gtk.Property.get=gtk_print_operation_get_has_selection org.gtk.Property.set=gtk_print_operation_set_has_selection)
@ -1346,7 +1344,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_HAS_SELECTION,
g_param_spec_boolean ("has-selection", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
@ -1359,7 +1357,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
PROP_EMBED_PAGE_SETUP,
g_param_spec_boolean ("embed-page-setup", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkPrintOperation:n-pages-to-print: (attributes org.gtk.Property.get=gtk_print_operation_get_n_pages_to_print)
@ -1381,7 +1379,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class)
-1,
G_MAXINT,
-1,
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY));
}
/**
@ -2879,7 +2877,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
g_timeout_add (SHOW_PROGRESS_TIME,
(GSourceFunc) show_progress_timeout,
data);
gdk_source_set_static_name_by_id (priv->show_progress_timeout_id, "[gtk] show_progress_timeout");
g_source_set_static_name (g_main_context_find_source_by_id (NULL, priv->show_progress_timeout_id), "[gtk] show_progress_timeout");
data->progress = progress;
}
@ -2950,7 +2948,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
print_pages_idle,
data,
print_pages_idle_done);
gdk_source_set_static_name_by_id (priv->print_pages_idle_id, "[gtk] print_pages_idle");
g_source_set_static_name (g_main_context_find_source_by_id (NULL, priv->print_pages_idle_id), "[gtk] print_pages_idle");
/* Recursive main loop to make sure we don't exit on sync operations */
if (priv->is_sync)

View File

@ -24,12 +24,12 @@
#endif
#include <cairo.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkwindow.h>
#include <gtk/gtkpagesetup.h>
#include <gtk/gtkprintsettings.h>
#include <gtk/gtkprintcontext.h>
#include <gtk/gtkprintoperationpreview.h>
#include <gtk/gtk.h>
#include <gtk/print/gtkpagesetup.h>
#include <gtk/print/gtkprintsettings.h>
#include <gtk/print/gtkprintcontext.h>
#include <gtk/print/gtkprintoperationpreview.h>
G_BEGIN_DECLS

View File

@ -18,9 +18,11 @@
#include "config.h"
#include "gtkprintoperationpreview.h"
#include <gtk/gtk.h>
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtkprintoperationpreview.h"
/**
@ -57,7 +59,7 @@ gtk_print_operation_preview_get_type (void)
};
print_operation_preview_type =
g_type_register_static (G_TYPE_INTERFACE, I_("GtkPrintOperationPreview"),
g_type_register_static (G_TYPE_INTERFACE, "GtkPrintOperationPreview",
&print_operation_preview_info, 0);
g_type_interface_add_prerequisite (print_operation_preview_type, G_TYPE_OBJECT);
@ -85,7 +87,7 @@ gtk_print_operation_preview_base_init (gpointer g_iface)
*
* A handler for this signal can be used for setup tasks.
*/
g_signal_new (I_("ready"),
g_signal_new ("ready",
GTK_TYPE_PRINT_OPERATION_PREVIEW,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationPreviewIface, ready),
@ -106,7 +108,7 @@ gtk_print_operation_preview_base_init (gpointer g_iface)
* according to @page_setup and set up a suitable cairo
* context, using [method@Gtk.PrintContext.set_cairo_context].
*/
id = g_signal_new (I_("got-page-size"),
id = g_signal_new ("got-page-size",
GTK_TYPE_PRINT_OPERATION_PREVIEW,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkPrintOperationPreviewIface, got_page_size),

View File

@ -23,7 +23,7 @@
#endif
#include <cairo.h>
#include <gtk/gtkprintcontext.h>
#include <gtk/print/gtkprintcontext.h>
G_BEGIN_DECLS

View File

@ -23,10 +23,10 @@
#include <glib/gprintf.h>
#include <gtk/gtk.h>
#include "gtkprintsettings.h"
#include "gtkprintutilsprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidget.h"
/**

View File

@ -22,7 +22,7 @@
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <gtk/gtkpapersize.h>
#include <gtk/print/gtkpapersize.h>
G_BEGIN_DECLS

View File

@ -25,6 +25,14 @@
#include <stdio.h>
#include <math.h>
#include <glib/gi18n-lib.h>
#include "gtkmarshalers.h"
#include "deprecated/gtkdialogprivate.h"
#include "gtkrenderbackgroundprivate.h"
#include "gtkrenderborderprivate.h"
#include "gtkcsscolorvalueprivate.h"
#include "gtkprintunixdialog.h"
#include "gtkcustompaperunixdialog.h"
@ -32,29 +40,7 @@
#include "gtkprinterprivate.h"
#include "gtkprinteroptionwidgetprivate.h"
#include "gtkprintutilsprivate.h"
#include "gtkspinbutton.h"
#include "gtkimage.h"
#include "gtknotebook.h"
#include "gtkscrolledwindow.h"
#include "gtktogglebutton.h"
#include "gtkdrawingarea.h"
#include "gtkbox.h"
#include "gtkgrid.h"
#include "gtkframe.h"
#include "gtklabel.h"
#include "gtkbuildable.h"
#include "deprecated/gtkmessagedialog.h"
#include "gtkbutton.h"
#include "gtksnapshot.h"
#include "gtkrenderbackgroundprivate.h"
#include "gtkrenderborderprivate.h"
#include <glib/gi18n-lib.h>
#include "gtkprivate.h"
#include "gtktypebuiltins.h"
#include "deprecated/gtkdialogprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkcsscolorvalueprivate.h"
#include "gtkpagethumbnailprivate.h"
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
@ -162,11 +148,6 @@ static void update_print_at_entry_sensitivity (GtkWidget *button,
GtkPrintUnixDialog *dialog);
static void update_print_at_option (GtkPrintUnixDialog *dialog);
static void update_dialog_from_capabilities (GtkPrintUnixDialog *dialog);
static void draw_collate (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data);
static gboolean is_printer_active (gpointer item,
gpointer data);
static int default_printer_list_sort_func (gconstpointer a,
@ -273,7 +254,11 @@ struct _GtkPrintUnixDialog
GtkWidget *copies_spin;
GtkWidget *collate_check;
GtkWidget *reverse_check;
GtkWidget *collate_image;
GtkWidget *page_collate_preview;
GtkWidget *page_a1;
GtkWidget *page_a2;
GtkWidget *page_b1;
GtkWidget *page_b2;
GtkWidget *page_layout_preview;
GtkWidget *scale_spin;
GtkWidget *page_set_combo;
@ -366,12 +351,48 @@ is_default_printer (GtkPrintUnixDialog *dialog,
return gtk_printer_is_default (printer);
}
static const char *css_data = ""
"page-thumbnail {\n"
" border: 1px solid #e6e5e4;\n"
" background: white;\n"
"}\n"
"page-thumbnail > label {\n"
" font-family: Sans;\n"
" font-size: 9pt;\n"
" color: #2e3436;\n"
"}\n";
static void
ensure_fallback_style (void)
{
GdkDisplay *display;
GtkCssProvider *provider;
display = gdk_display_get_default ();
if (!display)
return;
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_string (provider, css_data);
gtk_style_context_add_provider_for_display (display,
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
g_object_unref (provider);
}
static void
gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
ensure_fallback_style ();
g_type_ensure (GTK_TYPE_PAGE_THUMBNAIL);
object_class = (GObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
@ -390,7 +411,7 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
PROP_PAGE_SETUP,
g_param_spec_object ("page-setup", NULL, NULL,
GTK_TYPE_PAGE_SETUP,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintUnixDialog:current-page: (attributes org.gtk.Property.get=gtk_print_unix_dialog_get_current_page org.gtk.Property.set=gtk_print_unix_dialog_set_current_page)
@ -403,7 +424,7 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
-1,
G_MAXINT,
-1,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintUnixDialog:print-settings: (attributes org.gtk.Property.get=gtk_print_unix_dialog_get_settings org.gtk.Property.set=gtk_print_unix_dialog_set_settings)
@ -414,7 +435,7 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
PROP_PRINT_SETTINGS,
g_param_spec_object ("print-settings", NULL, NULL,
GTK_TYPE_PRINT_SETTINGS,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintUnixDialog:selected-printer: (attributes org.gtk.Property.get=gtk_print_unix_dialog_get_selected_printer)
@ -425,7 +446,7 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
PROP_SELECTED_PRINTER,
g_param_spec_object ("selected-printer", NULL, NULL,
GTK_TYPE_PRINTER,
GTK_PARAM_READABLE));
G_PARAM_READABLE));
/**
* GtkPrintUnixDialog:manual-capabilities: (attributes org.gtk.Property.get=gtk_print_unix_dialog_get_manual_capabilities org.gtk.Property.set=gtk_print_unix_dialog_set_manual_capabilities)
@ -437,7 +458,7 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
g_param_spec_flags ("manual-capabilities", NULL, NULL,
GTK_TYPE_PRINT_CAPABILITIES,
0,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintUnixDialog:support-selection: (attributes org.gtk.Property.get=gtk_print_unix_dialog_get_support_selection org.gtk.Property.set=gtk_print_unix_dialog_set_support_selection)
@ -448,7 +469,7 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
PROP_SUPPORT_SELECTION,
g_param_spec_boolean ("support-selection", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintUnixDialog:has-selection: (attributes org.gtk.Property.get=gtk_print_unix_dialog_get_has_selection org.gtk.Property.set=gtk_print_unix_dialog_set_has_selection)
@ -459,7 +480,7 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
PROP_HAS_SELECTION,
g_param_spec_boolean ("has-selection", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/**
* GtkPrintUnixDialog:embed-page-setup: (attributes org.gtk.Property.get=gtk_print_unix_dialog_get_embed_page_setup org.gtk.Property.set=gtk_print_unix_dialog_set_embed_page_setup)
@ -470,12 +491,12 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
PROP_EMBED_PAGE_SETUP,
g_param_spec_boolean ("embed-page-setup", NULL, NULL,
FALSE,
GTK_PARAM_READWRITE));
G_PARAM_READWRITE));
/* Bind class to template
*/
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/ui/gtkprintunixdialog.ui");
"/org/gtk/libgtk/print/ui/gtkprintunixdialog.ui");
/* GtkTreeView / GtkTreeModel */
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_list);
@ -492,7 +513,11 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, copies_spin);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, collate_check);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, reverse_check);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, collate_image);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_collate_preview);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_a1);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_a2);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_b1);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_b2);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_layout_preview);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, scale_spin);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_set_combo);
@ -872,20 +897,13 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog)
gtk_print_load_custom_papers (dialog->custom_paper_list);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (dialog->collate_image),
draw_collate,
dialog, NULL);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (dialog->page_layout_preview),
draw_page,
dialog, NULL);
gtk_css_node_set_name (gtk_widget_get_css_node (dialog->collate_image), g_quark_from_static_string ("drawing"));
gtk_css_node_set_name (gtk_widget_get_css_node (dialog->page_layout_preview), g_quark_from_static_string ("drawing"));
dialog->collate_paper_node = gtk_css_node_new();
gtk_css_node_set_name (dialog->collate_paper_node, g_quark_from_static_string ("paper"));
gtk_css_node_set_parent (dialog->collate_paper_node,
gtk_widget_get_css_node (dialog->collate_image));
g_object_unref (dialog->collate_paper_node);
dialog->page_layout_paper_node = gtk_css_node_new();
@ -1781,7 +1799,8 @@ schedule_idle_mark_conflicts (GtkPrintUnixDialog *dialog)
return;
dialog->mark_conflicts_id = g_idle_add (mark_conflicts_callback, dialog);
gdk_source_set_static_name_by_id (dialog->mark_conflicts_id, "[gtk] mark_conflicts_callback");
g_source_set_static_name (g_main_context_find_source_by_id (NULL, dialog->mark_conflicts_id),
"[gtk] mark_conflicts_callback");
}
static void
@ -1928,107 +1947,31 @@ static void
update_collate_icon (GtkToggleButton *toggle_button,
GtkPrintUnixDialog *dialog)
{
gtk_widget_queue_draw (dialog->collate_image);
}
static void
paint_page (GtkPrintUnixDialog *dialog,
GtkWidget *widget,
cairo_t *cr,
int x,
int y,
const char *text,
int text_x)
{
GtkCssStyle *style;
int width, height;
int text_y;
GdkRGBA color;
GtkSnapshot *snapshot;
GskRenderNode *node;
GtkCssBoxes boxes;
width = 20;
height = 26;
text_y = 21;
style = gtk_css_node_get_style (dialog->collate_paper_node);
snapshot = gtk_snapshot_new ();
gtk_css_boxes_init_border_box (&boxes, style, x, y, width, height);
gtk_css_style_snapshot_background (&boxes, snapshot);
gtk_css_style_snapshot_border (&boxes, snapshot);
node = gtk_snapshot_free_to_node (snapshot);
if (node)
{
gsk_render_node_draw (node, cr);
gsk_render_node_unref (node);
}
color = *gtk_css_color_value_get_rgba (style->core->color);
gdk_cairo_set_source_rgba (cr, &color);
cairo_select_font_face (cr, "Sans",
CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 9);
cairo_move_to (cr, x + text_x, y + text_y);
cairo_show_text (cr, text);
}
static void
draw_collate (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
GtkPrintUnixDialog *dialog = GTK_PRINT_UNIX_DIALOG (data);
GtkWidget *widget = GTK_WIDGET (da);
gboolean collate, reverse, rtl;
gboolean collate;
gboolean reverse;
int copies;
int text_x;
int x, y, x1, x2, p1, p2;
collate = dialog_get_collate (dialog);
reverse = dialog_get_reverse (dialog);
copies = dialog_get_n_copies (dialog);
rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
x = (width - 30) / 2;
y = (height - 36) / 2;
if (rtl)
if (collate)
{
x1 = x;
x2 = x - 36;
p1 = 0;
p2 = 10;
text_x = 4;
gtk_page_thumbnail_set_page_num (GTK_PAGE_THUMBNAIL (dialog->page_a1), reverse ? 1 : 2);
gtk_page_thumbnail_set_page_num (GTK_PAGE_THUMBNAIL (dialog->page_a2), reverse ? 2 : 1);
gtk_page_thumbnail_set_page_num (GTK_PAGE_THUMBNAIL (dialog->page_b1), reverse ? 1 : 2);
gtk_page_thumbnail_set_page_num (GTK_PAGE_THUMBNAIL (dialog->page_b2), reverse ? 2 : 1);
}
else
{
x1 = x;
x2 = x + 36;
p1 = 10;
p2 = 0;
text_x = 11;
gtk_page_thumbnail_set_page_num (GTK_PAGE_THUMBNAIL (dialog->page_a1), reverse ? 2 : 1);
gtk_page_thumbnail_set_page_num (GTK_PAGE_THUMBNAIL (dialog->page_a2), reverse ? 2 : 1);
gtk_page_thumbnail_set_page_num (GTK_PAGE_THUMBNAIL (dialog->page_b1), reverse ? 1 : 2);
gtk_page_thumbnail_set_page_num (GTK_PAGE_THUMBNAIL (dialog->page_b2), reverse ? 1 : 2);
}
if (copies == 1)
{
paint_page (dialog, widget, cr, x1 + p1, y, reverse ? "1" : "2", text_x);
paint_page (dialog, widget, cr, x1 + p2, y + 10, reverse ? "2" : "1", text_x);
}
else
{
paint_page (dialog, widget, cr, x1 + p1, y, collate == reverse ? "1" : "2", text_x);
paint_page (dialog, widget, cr, x1 + p2, y + 10, reverse ? "2" : "1", text_x);
paint_page (dialog, widget, cr, x2 + p1, y, reverse ? "1" : "2", text_x);
paint_page (dialog, widget, cr, x2 + p2, y + 10, collate == reverse ? "2" : "1", text_x);
}
gtk_widget_set_visible (dialog->page_b1, copies > 1);
gtk_widget_set_visible (dialog->page_b2, copies > 1);
}
static gboolean
@ -2278,7 +2221,7 @@ dialog_get_collate (GtkPrintUnixDialog *dialog)
{
if (gtk_widget_is_sensitive (dialog->collate_check))
return gtk_check_button_get_active (GTK_CHECK_BUTTON (dialog->collate_check));
return FALSE;
return TRUE;
}
static void

View File

@ -22,8 +22,8 @@
#endif
#include <gtk/gtk.h>
#include <gtk/gtkprinter.h>
#include <gtk/gtkprintjob.h>
#include <gtk/print/gtkprinter.h>
#include <gtk/print/gtkprintjob.h>
G_BEGIN_DECLS

59
gtk/print/meson.build Normal file
View File

@ -0,0 +1,59 @@
gtk_print_headers = files([
'gtkpagesetup.h',
'gtkpapersize.h',
'gtkprintcontext.h',
'gtkprintoperation.h',
'gtkprintoperationpreview.h',
'gtkprintsettings.h',
])
gtk_print_sources = files([
'gtkpagesetup.c',
'gtkpapersize.c',
'gtkprintcontext.c',
'gtkprintoperation.c',
'gtkprintoperationpreview.c',
'gtkprintsettings.c',
'gtkprintutils.c',
])
gtk_unix_print_headers = []
gtk_unix_print_sources = []
if os_unix
gtk_unix_print_headers += files([
'gtkpagesetupunixdialog.h',
'gtkprintunixdialog.h',
'gtkprinter.h',
'gtkprintjob.h',
])
gtk_unix_print_sources += files([
'gtkcustompaperunixdialog.c',
'gtkpagesetupunixdialog.c',
'gtkpagethumbnail.c',
'gtkprintbackend.c',
'gtkprinter.c',
'gtkprinteroption.c',
'gtkprinteroptionset.c',
'gtkprinteroptionwidget.c',
'gtkprintjob.c',
'gtkprintoperation-unix.c',
'gtkprintoperation-portal.c',
'gtkprintunixdialog.c',
])
endif
gtk_win32_print_headers = []
gtk_win32_print_sources = []
if os_win32
gtk_win32_print_sources += files([
'gtkprint-win32.c',
'gtkprintoperation-win32.c',
])
if cc.has_header_symbol('windows.h', 'IPrintDialogCallback')
cdata.set('HAVE_IPRINTDIALOGCALLBACK', 1)
endif
endif

View File

@ -340,9 +340,47 @@
</object>
</child>
<child>
<object class="GtkDrawingArea" id="collate_image">
<property name="content-width">70</property>
<property name="content-height">50</property>
<object class="GtkFixed" id="page_collate_preview">
<child>
<object class="GtkPageThumbnail" id="page_a1">
<property name="page-num">1</property>
<property name="width-request">32</property>
<property name="height-request">40</property>
<layout>
<property name="transform">translate(17, 0)</property>
</layout>
</object>
</child>
<child>
<object class="GtkPageThumbnail" id="page_a2">
<property name="page-num">2</property>
<property name="width-request">32</property>
<property name="height-request">40</property>
<layout>
<property name="transform">translate(0, 17)</property>
</layout>
</object>
</child>
<child>
<object class="GtkPageThumbnail" id="page_b1">
<property name="page-num">1</property>
<property name="width-request">32</property>
<property name="height-request">40</property>
<layout>
<property name="transform">translate(73, 0)</property>
</layout>
</object>
</child>
<child>
<object class="GtkPageThumbnail" id="page_b2">
<property name="page-num">2</property>
<property name="width-request">32</property>
<property name="height-request">40</property>
<layout>
<property name="transform">translate(56, 17)</property>
</layout>
</object>
</child>
<layout>
<property name="column">1</property>
<property name="row">1</property>

View File

@ -45,9 +45,9 @@
#include <gmodule.h>
#include <gtk/gtk.h>
#include <gtk/gtkprintbackendprivate.h>
#include <gtk/gtkunixprint.h>
#include <gtk/gtkprinterprivate.h>
#include <gtk/print/gtkprintbackendprivate.h>
#include <gtk/print/gtkprinterprivate.h>
#include <gtk/gtkprivate.h>
#include "gtkprintbackendcups.h"
@ -57,7 +57,7 @@
#include "gtkcupssecretsutils.h"
#include "gtkprintbackendutils.h"
#include <gtkprintutilsprivate.h>
#include <gtk/print/gtkprintutilsprivate.h>
#include "gtkprivate.h"
#ifdef HAVE_COLORD

View File

@ -20,7 +20,7 @@
#define __GTK_PRINT_BACKEND_CUPS_H__
#include <glib-object.h>
#include "gtkprintbackendprivate.h"
#include "gtk/print/gtkprintbackendprivate.h"
G_BEGIN_DECLS

View File

@ -35,7 +35,7 @@
#include <glib/gi18n-lib.h>
#include "gtk/gtk.h"
#include "gtk/gtkprinterprivate.h"
#include "gtk/print/gtkprinterprivate.h"
#include "gtk/gtkprivate.h"
#include "gtkprintbackendfile.h"

View File

@ -21,7 +21,7 @@
#define __GTK_PRINT_BACKEND_FILE_H__
#include <glib-object.h>
#include "gtkprintbackendprivate.h"
#include "gtk/print/gtkprintbackendprivate.h"
G_BEGIN_DECLS

View File

@ -24,7 +24,7 @@
#include "gtkcupsutils.h"
#include <gtk/gtkunixprint.h>
#include <gtk/gtkprinterprivate.h>
#include <gtk/print/gtkprinterprivate.h>
#ifdef HAVE_COLORD
#include <colord.h>

View File

@ -151,7 +151,7 @@ gtk/gtkcssprovider.c
gtk/gtkcssshorthandproperty.c
gtk/gtkcssstaticstyle.c
gtk/gtkcssstyleproperty.c
gtk/gtkcustompaperunixdialog.c
gtk/print/gtkcustompaperunixdialog.c
gtk/gtkdirectorylist.c
gtk/gtkdragicon.c
gtk/gtkdragsource.c
@ -250,11 +250,11 @@ gtk/gtkorientable.c
gtk/gtkoverlay.c
gtk/gtkoverlaylayout.c
gtk/gtkpadcontroller.c
gtk/gtkpagesetup.c
gtk/gtkpagesetupunixdialog.c
gtk/print/gtkpagesetup.c
gtk/print/gtkpagesetupunixdialog.c
gtk/gtkpaned.c
gtk/gtkpanedhandle.c
gtk/gtkpapersize.c
gtk/print/gtkpapersize.c
gtk/gtkpasswordentry.c
gtk/gtkpathbar.c
gtk/gtkpicture.c
@ -265,18 +265,18 @@ gtk/gtkpopover.c
gtk/gtkpopovercontent.c
gtk/gtkpopovermenubar.c
gtk/gtkpopovermenu.c
gtk/gtkprintbackend.c
gtk/gtkprinter.c
gtk/gtkprinteroption.c
gtk/gtkprinteroptionset.c
gtk/gtkprinteroptionwidget.c
gtk/gtkprintjob.c
gtk/gtkprintoperation.c
gtk/gtkprintoperation-portal.c
gtk/gtkprintoperationpreview.c
gtk/gtkprintoperation-unix.c
gtk/gtkprintoperation-win32.c
gtk/gtkprintunixdialog.c
gtk/print/gtkprintbackend.c
gtk/print/gtkprinter.c
gtk/print/gtkprinteroption.c
gtk/print/gtkprinteroptionset.c
gtk/print/gtkprinteroptionwidget.c
gtk/print/gtkprintjob.c
gtk/print/gtkprintoperation.c
gtk/print/gtkprintoperation-portal.c
gtk/print/gtkprintoperationpreview.c
gtk/print/gtkprintoperation-unix.c
gtk/print/gtkprintoperation-win32.c
gtk/print/gtkprintunixdialog.c
gtk/gtkprogressbar.c
gtk/gtkpropertylookuplistmodel.c
gtk/gtkrange.c
@ -382,7 +382,7 @@ gtk/inspector/visual.ui
gtk/inspector/window.c
gtk/inspector/window.ui
gtk/open-type-layout.h
gtk/paper_names_offsets.c
gtk/print/paper_names_offsets.c
gtk/ui/gtkaboutdialog.ui
gtk/ui/gtkappchooserdialog.ui
gtk/ui/gtkappchooserwidget.ui
@ -401,10 +401,10 @@ gtk/ui/gtkfontchooserwidget.ui
gtk/ui/gtklockbutton.ui
gtk/ui/gtkmediacontrols.ui
gtk/ui/gtkmessagedialog.ui
gtk/ui/gtkpagesetupunixdialog.ui
gtk/print/ui/gtkpagesetupunixdialog.ui
gtk/ui/gtkplacesviewrow.ui
gtk/ui/gtkplacesview.ui
gtk/ui/gtkprintunixdialog.ui
gtk/print/ui/gtkprintunixdialog.ui
gtk/ui/gtkscalebutton.ui
gtk/ui/gtksidebarrow.ui
gtk/ui/gtkstatusbar.ui