print: Maintain compatibility
authorMatthias Clasen <mclasen@redhat.com>
Wed, 7 Jun 2023 04:29:39 +0000 (00:29 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 7 Jun 2023 11:16:26 +0000 (07:16 -0400)
gtkunixprint.h is a public header, that needs
to keep being installed in the same location.

gtk/gtkunixprint.h [new file with mode: 0644]
gtk/meson.build
gtk/print/gtkunixprint.h [deleted file]
gtk/print/meson.build
modules/printbackends/gtkprintbackendcups.c
modules/printbackends/gtkprintercups.h

diff --git a/gtk/gtkunixprint.h b/gtk/gtkunixprint.h
new file mode 100644 (file)
index 0000000..79158f1
--- /dev/null
@@ -0,0 +1,27 @@
+/* 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#define __GTK_UNIX_PRINT_H_INSIDE__
+
+#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__
+
index 7b8926451b0bdd194bddeaf7a0b3af628efcf29d..84e8b0ad8955db91a10e1581e2750074ea77c4ec 100644 (file)
@@ -675,8 +675,13 @@ if os_unix and tracker3_dep.found()
   gtk_sources += 'gtksearchenginetracker3.c'
 endif
 
+gtk_unix_print_main_header = [
+  'gtkunixprint.h'
+]
+
 if os_unix
-  install_headers(gtk_unix_print_headers, subdir: 'gtk-4.0/unix-print/gtk')
+  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
 
@@ -1254,7 +1259,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
diff --git a/gtk/print/gtkunixprint.h b/gtk/print/gtkunixprint.h
deleted file mode 100644 (file)
index 79158f1..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#define __GTK_UNIX_PRINT_H_INSIDE__
-
-#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__
-
index 79f4d085de3502364e3df0a08f759094353c1e1c..a5263da99d20ec396a6dcca9ca51bcaaa08821fc 100644 (file)
@@ -26,7 +26,6 @@ if os_unix
     'gtkprintunixdialog.h',
     'gtkprinter.h',
     'gtkprintjob.h',
-    'gtkunixprint.h',
   ])
 
   gtk_unix_print_sources += files([
index aa9b5158789ff0e096dfa11bd7523ab14922a631..0382c8983dc47d54af45c41307d0d50ad0a73f61 100644 (file)
@@ -45,8 +45,8 @@
 #include <gmodule.h>
 
 #include <gtk/gtk.h>
+#include <gtk/gtkunixprint.h>
 #include <gtk/print/gtkprintbackendprivate.h>
-#include <gtk/print/gtkunixprint.h>
 #include <gtk/print/gtkprinterprivate.h>
 #include <gtk/gtkprivate.h>
 
index fb67f6ac837153a7dc51c40bb8c51eb70930f769..30edcece27861668ae22d4656ab50ba0cf0fe2ff 100644 (file)
@@ -23,7 +23,7 @@
 #include <cups/ppd.h>
 #include "gtkcupsutils.h"
 
-#include <gtk/print/gtkunixprint.h>
+#include <gtk/gtkunixprint.h>
 #include <gtk/print/gtkprinterprivate.h>
 
 #ifdef HAVE_COLORD