From: Matthias Clasen Date: Wed, 7 Jun 2023 03:35:07 +0000 (-0400) Subject: print: Start sorting apart includes X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~171^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2adc0170487b3797b3cf1ec133fbacede2f83fe1;p=gtk4.git print: Start sorting apart includes Use gtk/gtk.h in the print sources, so that it becomes apparent where we are using private apis. --- diff --git a/gtk/print/gtkcustompaperunixdialog.c b/gtk/print/gtkcustompaperunixdialog.c index 375927e517..ccca8e664c 100644 --- a/gtk/print/gtkcustompaperunixdialog.c +++ b/gtk/print/gtkcustompaperunixdialog.c @@ -26,18 +26,13 @@ #endif #include -#include "gtkprivate.h" -#include "deprecated/gtkliststore.h" - -#include "gtksignallistitemfactory.h" -#include "gtklabel.h" -#include "gtkspinbutton.h" +#include +#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" diff --git a/gtk/print/gtkpagesetup.c b/gtk/print/gtkpagesetup.c index 588e43d8e7..1b9416aa9d 100644 --- a/gtk/print/gtkpagesetup.c +++ b/gtk/print/gtkpagesetup.c @@ -18,11 +18,13 @@ #include "config.h" +#include + +#include + #include "gtkpagesetup.h" #include "gtkprintutilsprivate.h" #include "gtkprintoperation.h" /* for GtkPrintError */ -#include -#include "gtktypebuiltins.h" /** * GtkPageSetup: diff --git a/gtk/print/gtkpagesetupunixdialog.c b/gtk/print/gtkpagesetupunixdialog.c index e9f5cfd6ab..ceddba4ca0 100644 --- a/gtk/print/gtkpagesetupunixdialog.c +++ b/gtk/print/gtkpagesetupunixdialog.c @@ -22,20 +22,14 @@ #include #include -#include "gtkprivate.h" - -#include "gtkbutton.h" -#include "gtkscrolledwindow.h" -#include "gtkcheckbutton.h" -#include "gtklabel.h" -#include "gtkgrid.h" +#include +#include "deprecated/gtkdialogprivate.h" #include "gtkpagesetupunixdialog.h" #include "gtkcustompaperunixdialog.h" #include "gtkprintbackendprivate.h" #include "gtkpapersize.h" #include "gtkprintutilsprivate.h" -#include "deprecated/gtkdialogprivate.h" /** * GtkPageSetupUnixDialog: diff --git a/gtk/print/gtkpapersize.c b/gtk/print/gtkpapersize.c index 97bd96d49c..894a6f7334 100644 --- a/gtk/print/gtkpapersize.c +++ b/gtk/print/gtkpapersize.c @@ -26,10 +26,11 @@ #endif #include +#include + #include "gtkpapersize.h" #include "gtkprintutilsprivate.h" #include "gtkprintoperation.h" /* for GtkPrintError */ -#include /* _gtk_load_custom_papers() only on Unix so far */ #ifdef G_OS_UNIX diff --git a/gtk/print/gtkprintbackend.c b/gtk/print/gtkprintbackend.c index 1fd4c3572b..a16e34606a 100644 --- a/gtk/print/gtkprintbackend.c +++ b/gtk/print/gtkprintbackend.c @@ -20,12 +20,12 @@ #include #include - #include -#include "gtkdebug.h" + +#include #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), diff --git a/gtk/print/gtkprinter.c b/gtk/print/gtkprinter.c index 9b16d02463..356525e037 100644 --- a/gtk/print/gtkprinter.c +++ b/gtk/print/gtkprinter.c @@ -20,8 +20,6 @@ #include #include -#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; diff --git a/gtk/print/gtkprinteroption.c b/gtk/print/gtkprinteroption.c index 91e4bdecb9..25f415616c 100644 --- a/gtk/print/gtkprinteroption.c +++ b/gtk/print/gtkprinteroption.c @@ -18,9 +18,7 @@ #include "config.h" #include -#include -#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 * diff --git a/gtk/print/gtkprinteroptionprivate.h b/gtk/print/gtkprinteroptionprivate.h index 0578e30ebb..82dd8739ba 100644 --- a/gtk/print/gtkprinteroptionprivate.h +++ b/gtk/print/gtkprinteroptionprivate.h @@ -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); diff --git a/gtk/print/gtkprinteroptionset.c b/gtk/print/gtkprinteroptionset.c index 288fda6f37..c6e10d2f93 100644 --- a/gtk/print/gtkprinteroptionset.c +++ b/gtk/print/gtkprinteroptionset.c @@ -19,10 +19,8 @@ #include "config.h" #include #include -#include #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), diff --git a/gtk/print/gtkprinteroptionwidget.c b/gtk/print/gtkprinteroptionwidget.c index c14a675761..fb0fe1268c 100644 --- a/gtk/print/gtkprinteroptionwidget.c +++ b/gtk/print/gtkprinteroptionwidget.c @@ -22,19 +22,7 @@ #include #include -#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 #include "gtkprinteroptionwidgetprivate.h" @@ -112,7 +100,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 +112,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)); } diff --git a/gtk/print/gtkprintjob.c b/gtk/print/gtkprintjob.c index b295d8d69f..9efc638ef9 100644 --- a/gtk/print/gtkprintjob.c +++ b/gtk/print/gtkprintjob.c @@ -42,7 +42,6 @@ #include #include -#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), diff --git a/gtk/print/gtkprintoperation-portal.c b/gtk/print/gtkprintoperation-portal.c index d39ad1645c..6dc36892c9 100644 --- a/gtk/print/gtkprintoperation-portal.c +++ b/gtk/print/gtkprintoperation-portal.c @@ -29,16 +29,23 @@ #include +#include +#include +#include "gtkwindowprivate.h" +#include "gtkprivate.h" + #include "gtkprintoperation-private.h" #include "gtkprintoperation-portal.h" #include "gtkprintsettings.h" #include "gtkpagesetup.h" #include "gtkprintbackendprivate.h" -#include "gtkfilelauncher.h" -#include -#include "gtkwindowprivate.h" -#include "gtkprivate.h" +#ifndef PORTAL_BUS_NAME +#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" +#endif typedef struct { GtkPrintOperation *op; diff --git a/gtk/print/gtkprintoperation-unix.c b/gtk/print/gtkprintoperation-unix.c index 1108927bb2..db4d878e33 100644 --- a/gtk/print/gtkprintoperation-unix.c +++ b/gtk/print/gtkprintoperation-unix.c @@ -29,20 +29,20 @@ #include #include +#include +#include +#include "gtkprivate.h" + #include "gtkprintoperation-private.h" #include "gtkprintoperation-portal.h" #include #include -#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 typedef struct diff --git a/gtk/print/gtkprintoperation-win32.c b/gtk/print/gtkprintoperation-win32.c index 15d68abff4..a68ecfc2b6 100644 --- a/gtk/print/gtkprintoperation-win32.c +++ b/gtk/print/gtkprintoperation-win32.c @@ -39,12 +39,11 @@ #include #include #include +#include +#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 diff --git a/gtk/print/gtkprintoperation.c b/gtk/print/gtkprintoperation.c index c4b0fab467..6423a890a4 100644 --- a/gtk/print/gtkprintoperation.c +++ b/gtk/print/gtkprintoperation.c @@ -25,14 +25,13 @@ #include -#include "gtkprintoperation-private.h" +#include +#include #include "gtkmarshalers.h" #include "gdk/gdkmarshalers.h" -#include #include "gtkprivate.h" -#include "deprecated/gtkmessagedialog.h" -#include "gtkwindowgroup.h" -#include "gtktypebuiltins.h" + +#include "gtkprintoperation-private.h" /** * GtkPrintOperation: @@ -632,7 +631,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 +767,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 +789,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 +820,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 +845,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 +918,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 +942,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 +961,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 +990,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 +1014,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 +1038,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 +1074,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 +1101,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 +1116,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 +1131,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 +1154,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 +1172,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 +1190,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 +1207,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 +1221,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 +1233,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 +1253,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 +1273,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 +1285,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 +1302,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 +1318,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 +1331,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 +1345,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 +1358,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 +1380,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 +2878,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 +2949,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) diff --git a/gtk/print/gtkprintoperationpreview.c b/gtk/print/gtkprintoperationpreview.c index 423e352390..8e782bd498 100644 --- a/gtk/print/gtkprintoperationpreview.c +++ b/gtk/print/gtkprintoperationpreview.c @@ -18,9 +18,11 @@ #include "config.h" -#include "gtkprintoperationpreview.h" +#include + #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), diff --git a/gtk/print/gtkprintsettings.c b/gtk/print/gtkprintsettings.c index 5daa6e6711..2c8c3a2f33 100644 --- a/gtk/print/gtkprintsettings.c +++ b/gtk/print/gtkprintsettings.c @@ -23,10 +23,10 @@ #include +#include + #include "gtkprintsettings.h" #include "gtkprintutilsprivate.h" -#include "gtktypebuiltins.h" -#include "gtkwidget.h" /** diff --git a/gtk/print/gtkprintunixdialog.c b/gtk/print/gtkprintunixdialog.c index 1835002b9a..7611ea141e 100644 --- a/gtk/print/gtkprintunixdialog.c +++ b/gtk/print/gtkprintunixdialog.c @@ -25,6 +25,14 @@ #include #include +#include +#include +#include "gtkmarshalers.h" +#include "deprecated/gtkdialogprivate.h" +#include "gtkrenderbackgroundprivate.h" +#include "gtkrenderborderprivate.h" +#include "gtkcsscolorvalueprivate.h" + #include "gtkprintunixdialog.h" #include "gtkcustompaperunixdialog.h" @@ -33,29 +41,6 @@ #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 -#include "gtkprivate.h" -#include "gtktypebuiltins.h" -#include "deprecated/gtkdialogprivate.h" -#include "gtkwidgetprivate.h" -#include "gtkcsscolorvalueprivate.h" - G_GNUC_BEGIN_IGNORE_DEPRECATIONS @@ -390,7 +375,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 +388,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 +399,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 +410,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 +422,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 +433,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 +444,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,7 +455,7 @@ 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 */ @@ -1781,7 +1766,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