diff options
-rw-r--r-- | ChangeLog | 23 | ||||
-rw-r--r-- | docs/tools/widgets.c | 3 | ||||
-rw-r--r-- | gtk/Makefile.am | 3 | ||||
-rw-r--r-- | gtk/gtkpagesetupunixdialog.h | 4 | ||||
-rw-r--r-- | gtk/gtkprintbackend.h | 8 | ||||
-rw-r--r-- | gtk/gtkprinter-private.h | 3 | ||||
-rw-r--r-- | gtk/gtkprinter.h | 4 | ||||
-rw-r--r-- | gtk/gtkprintjob.h | 4 | ||||
-rw-r--r-- | gtk/gtkprintunixdialog.h | 4 | ||||
-rw-r--r-- | gtk/gtkunixprint.h | 31 | ||||
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 2 | ||||
-rw-r--r-- | modules/printbackends/cups/gtkprintercups.h | 2 | ||||
-rw-r--r-- | modules/printbackends/lpr/gtkprintbackendlpr.c | 1 | ||||
-rw-r--r-- | tests/buildertest.c | 1 | ||||
-rw-r--r-- | tests/defaultvaluetest.c | 2 |
15 files changed, 80 insertions, 15 deletions
@@ -1,3 +1,26 @@ +2008-05-29 Michael Natterer <mitch@imendio.org> + + * gtk/Makefile.am + * gtk/gtkunixprint.h: add a single-include header for the unix + print stuff. + + * gtk/gtkpagesetupunixdialog.h + * gtk/gtkprinter.h + * gtk/gtkprintjob.h + * gtk/gtkprintunixdialog.h: add single-include guards that #error + out if GTK_DISABLE_SINGLE_INCLUDES is defined and any of these + files is included individually. + + * gtk/gtkprintbackend.h + * gtk/gtkprinter-private.h + * modules/printbackends/cups/gtkprintbackendcups.c + * modules/printbackends/cups/gtkprintercups.h + * modules/printbackends/lpr/gtkprintbackendlpr.c + * tests/buildertest.c + * tests/defaultvaluetest.c + * docs/tools/widgets.c: include <gtk/gtkunixprint.h> instead of + individual files. + 2008-05-28 Michael Natterer <mitch@imendio.com> * gtk/gtk*.h: whitespace cleanup: remove trailing whitespace and diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c index 1620e20feb..9abeb2797a 100644 --- a/docs/tools/widgets.c +++ b/docs/tools/widgets.c @@ -1,5 +1,4 @@ -#include <gtk/gtkprintunixdialog.h> -#include <gtk/gtkpagesetupunixdialog.h> +#include <gtk/gtkunixprint.h> #include <gdk/gdkkeysyms.h> #include <X11/Xatom.h> #include <gdkx.h> diff --git a/gtk/Makefile.am b/gtk/Makefile.am index ec01ca06cc..1285f3bd80 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -337,7 +337,8 @@ gtk_unix_print_public_h_sources = \ gtkpagesetupunixdialog.h \ gtkprintunixdialog.h \ gtkprinter.h \ - gtkprintjob.h + gtkprintjob.h \ + gtkunixprint.h endif # Installed header files without compatibility guarantees diff --git a/gtk/gtkpagesetupunixdialog.h b/gtk/gtkpagesetupunixdialog.h index 6590899a2d..81dc3f43c2 100644 --- a/gtk/gtkpagesetupunixdialog.h +++ b/gtk/gtkpagesetupunixdialog.h @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_UNIX_PRINT_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only <gtk/gtkunixprint.h> can be included directly." +#endif + #ifndef __GTK_PAGE_SETUP_UNIX_DIALOG_H__ #define __GTK_PAGE_SETUP_UNIX_DIALOG_H__ diff --git a/gtk/gtkprintbackend.h b/gtk/gtkprintbackend.h index 45afe7b057..a33f6d80fe 100644 --- a/gtk/gtkprintbackend.h +++ b/gtk/gtkprintbackend.h @@ -22,18 +22,16 @@ #define __GTK_PRINT_BACKEND_H__ /* This is a "semi-private" header; it is meant only for - * alternate GtkPrintDialog backend modules; no stability guarantees + * alternate GtkPrintDialog backend modules; no stability guarantees * are made at this point */ #ifndef GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED #error "GtkPrintBackend is not supported API for general use" #endif -#include <cairo.h> #include <gtk/gtk.h> - -#include "gtkprinteroptionset.h" -#include "gtkprintjob.h" +#include <gtk/gtkunixprint.h> +#include <gtk/gtkprinteroptionset.h> G_BEGIN_DECLS diff --git a/gtk/gtkprinter-private.h b/gtk/gtkprinter-private.h index c5faece1b5..39165bd9b5 100644 --- a/gtk/gtkprinter-private.h +++ b/gtk/gtkprinter-private.h @@ -22,9 +22,8 @@ #define __GTK_PRINTER_PRIVATE_H__ #include <gtk/gtk.h> -#include "gtkprinter.h" +#include <gtk/gtkunixprint.h> #include "gtkprinteroptionset.h" -#include "gtkprintjob.h" G_BEGIN_DECLS diff --git a/gtk/gtkprinter.h b/gtk/gtkprinter.h index 6595bf1bea..1eb5bd1bf9 100644 --- a/gtk/gtkprinter.h +++ b/gtk/gtkprinter.h @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_UNIX_PRINT_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only <gtk/gtkunixprint.h> can be included directly." +#endif + #ifndef __GTK_PRINTER_H__ #define __GTK_PRINTER_H__ diff --git a/gtk/gtkprintjob.h b/gtk/gtkprintjob.h index 86ad47a2cc..1edf253665 100644 --- a/gtk/gtkprintjob.h +++ b/gtk/gtkprintjob.h @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_UNIX_PRINT_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only <gtk/gtkunixprint.h> can be included directly." +#endif + #ifndef __GTK_PRINT_JOB_H__ #define __GTK_PRINT_JOB_H__ diff --git a/gtk/gtkprintunixdialog.h b/gtk/gtkprintunixdialog.h index 55c714bce0..47869c1526 100644 --- a/gtk/gtkprintunixdialog.h +++ b/gtk/gtkprintunixdialog.h @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_UNIX_PRINT_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only <gtk/gtkunixprint.h> can be included directly." +#endif + #ifndef __GTK_PRINT_UNIX_DIALOG_H__ #define __GTK_PRINT_UNIX_DIALOG_H__ diff --git a/gtk/gtkunixprint.h b/gtk/gtkunixprint.h new file mode 100644 index 0000000000..69ca7d58b2 --- /dev/null +++ b/gtk/gtkunixprint.h @@ -0,0 +1,31 @@ +/* GtkUnixPrint + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GTK_UNIX_PRINT_H__ +#define __GTK_UNIX_PRINT_H__ + +#define __GTK_UNIX_PRINT_H_INSIDE__ + +#include <gtk/gtkpagesetupunixdialog.h> +#include <gtk/gtkprinter.h> +#include <gtk/gtkprintjob.h> +#include <gtk/gtkprintunixdialog.h> + +#undef __GTK_UNIX_PRINT_H_INSIDE__ + +#endif /* __GTK_UNIX_PRINT_H__ */ diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index d061bc7cee..ff623cf992 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -41,7 +41,7 @@ #include <gtk/gtk.h> #include <gtk/gtkprintbackend.h> -#include <gtk/gtkprinter.h> +#include <gtk/gtkunixprint.h> #include <gtk/gtkprinter-private.h> #include "gtkprintbackendcups.h" diff --git a/modules/printbackends/cups/gtkprintercups.h b/modules/printbackends/cups/gtkprintercups.h index 7e2734703f..6f1c00d452 100644 --- a/modules/printbackends/cups/gtkprintercups.h +++ b/modules/printbackends/cups/gtkprintercups.h @@ -24,7 +24,7 @@ #include <cups/cups.h> #include <cups/ppd.h> -#include "gtkprinter.h" +#include <gtk/gtkunixprint.h> G_BEGIN_DECLS diff --git a/modules/printbackends/lpr/gtkprintbackendlpr.c b/modules/printbackends/lpr/gtkprintbackendlpr.c index a737ba4a16..78f189a100 100644 --- a/modules/printbackends/lpr/gtkprintbackendlpr.c +++ b/modules/printbackends/lpr/gtkprintbackendlpr.c @@ -34,7 +34,6 @@ #include <glib/gi18n-lib.h> #include <gtk/gtk.h> -#include "gtkprinter.h" #include "gtkprinter-private.h" #include "gtkprintbackendlpr.h" diff --git a/tests/buildertest.c b/tests/buildertest.c index 601a5f5bea..de4e080521 100644 --- a/tests/buildertest.c +++ b/tests/buildertest.c @@ -26,7 +26,6 @@ #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> -#include <gtk/gtkprintjob.h> /* Copied from gtkiconfactory.c; keep in sync! */ struct _GtkIconSet diff --git a/tests/defaultvaluetest.c b/tests/defaultvaluetest.c index 8937aa8665..c88926d9f7 100644 --- a/tests/defaultvaluetest.c +++ b/tests/defaultvaluetest.c @@ -22,7 +22,7 @@ #define GTK_ENABLE_BROKEN #include <string.h> #include <gtk/gtk.h> -#include <gtk/gtkprintunixdialog.h> +#include <gtk/gtkunixprint.h> static void check_property (const char *output, |