[gnome-control-center] printers: Replace ifdefs with #pragma once



commit 13d72a79a7a9c445b6677963cc33ab9b0afecef4
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Jun 15 14:16:20 2018 +1200

    printers: Replace ifdefs with #pragma once

 panels/printers/cc-printers-panel.h       | 6 +-----
 panels/printers/pp-cups.h                 | 5 +----
 panels/printers/pp-details-dialog.h       | 5 +----
 panels/printers/pp-host.c                 | 4 ++--
 panels/printers/pp-host.h                 | 5 +----
 panels/printers/pp-ipp-option-widget.h    | 5 +----
 panels/printers/pp-job.h                  | 5 +----
 panels/printers/pp-jobs-dialog.h          | 5 +----
 panels/printers/pp-maintenance-command.h  | 5 +----
 panels/printers/pp-new-printer-dialog.h   | 5 +----
 panels/printers/pp-new-printer.h          | 5 +----
 panels/printers/pp-options-dialog.h       | 5 +----
 panels/printers/pp-ppd-option-widget.h    | 5 +----
 panels/printers/pp-ppd-selection-dialog.h | 5 +----
 panels/printers/pp-print-device.h         | 5 +----
 panels/printers/pp-printer-entry.h        | 5 +----
 panels/printers/pp-printer.h              | 5 +----
 panels/printers/pp-samba.h                | 5 +----
 panels/printers/pp-utils.h                | 5 +----
 19 files changed, 20 insertions(+), 75 deletions(-)
---
diff --git a/panels/printers/cc-printers-panel.h b/panels/printers/cc-printers-panel.h
index ed5abb29f..18e93a4e0 100644
--- a/panels/printers/cc-printers-panel.h
+++ b/panels/printers/cc-printers-panel.h
@@ -16,9 +16,7 @@
  *
  */
 
-
-#ifndef _CC_PRINTERS_PANEL_H
-#define _CC_PRINTERS_PANEL_H
+#pragma once
 
 #include <shell/cc-panel.h>
 
@@ -28,5 +26,3 @@ G_BEGIN_DECLS
 G_DECLARE_FINAL_TYPE (CcPrintersPanel, cc_printers_panel, CC, PRINTERS_PANEL, CcPanel)
 
 G_END_DECLS
-
-#endif /* _CC_PRINTERS_PANEL_H */
diff --git a/panels/printers/pp-cups.h b/panels/printers/pp-cups.h
index e30203436..04063bb1c 100644
--- a/panels/printers/pp-cups.h
+++ b/panels/printers/pp-cups.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_CUPS_H__
-#define __PP_CUPS_H__
+#pragma once
 
 #include <glib-object.h>
 #include <gio/gio.h>
@@ -75,5 +74,3 @@ gint         pp_cups_renew_subscription_finish (PpCups                *cups,
                                                 GAsyncResult          *result);
 
 G_END_DECLS
-
-#endif /* __PP_CUPS_H__ */
diff --git a/panels/printers/pp-details-dialog.h b/panels/printers/pp-details-dialog.h
index 499f9dbbb..6da259859 100644
--- a/panels/printers/pp-details-dialog.h
+++ b/panels/printers/pp-details-dialog.h
@@ -18,8 +18,7 @@
  * Author: Felipe Borges <feborges redhat com>
  */
 
-#ifndef __PP_DETAILS_DIALOG_H__
-#define __PP_DETAILS_DIALOG_H__
+#pragma once
 
 #include <gtk/gtk.h>
 #include "pp-utils.h"
@@ -38,5 +37,3 @@ PpDetailsDialog *pp_details_dialog_new      (GtkWindow            *parent,
 void             pp_details_dialog_free     (PpDetailsDialog      *dialog);
 
 G_END_DECLS
-
-#endif
diff --git a/panels/printers/pp-host.c b/panels/printers/pp-host.c
index a5d2ca197..476a691f0 100644
--- a/panels/printers/pp-host.c
+++ b/panels/printers/pp-host.c
@@ -26,8 +26,8 @@
 
 typedef struct
 {
-  gchar   *hostname;
-  gint     port;
+  gchar *hostname;
+  gint   port;
 } PpHostPrivate;
 
 G_DEFINE_TYPE_WITH_PRIVATE (PpHost, pp_host, G_TYPE_OBJECT);
diff --git a/panels/printers/pp-host.h b/panels/printers/pp-host.h
index cc1410328..ea7354e97 100644
--- a/panels/printers/pp-host.h
+++ b/panels/printers/pp-host.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_HOST_H__
-#define __PP_HOST_H__
+#pragma once
 
 #include <glib-object.h>
 #include <gio/gio.h>
@@ -79,5 +78,3 @@ PpDevicesList *pp_host_get_lpd_devices_finish         (PpHost               *hos
                                                        GError              **error);
 
 G_END_DECLS
-
-#endif /* __PP_HOST_H__ */
diff --git a/panels/printers/pp-ipp-option-widget.h b/panels/printers/pp-ipp-option-widget.h
index aa2ffbcb8..a5d0b840f 100644
--- a/panels/printers/pp-ipp-option-widget.h
+++ b/panels/printers/pp-ipp-option-widget.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_IPP_OPTION_WIDGET_H__
-#define __PP_IPP_OPTION_WIDGET_H__
+#pragma once
 
 #include <gtk/gtk.h>
 #include <cups/cups.h>
@@ -38,5 +37,3 @@ GtkWidget   *pp_ipp_option_widget_new (IPPAttribute *attr_supported,
                                        const gchar  *printer);
 
 G_END_DECLS
-
-#endif /* __PP_IPP_OPTION_WIDGET_H__ */
diff --git a/panels/printers/pp-job.h b/panels/printers/pp-job.h
index 29fffddbd..fb4105fce 100644
--- a/panels/printers/pp-job.h
+++ b/panels/printers/pp-job.h
@@ -18,8 +18,7 @@
  * Author: Felipe Borges <feborges redhat com>
  */
 
-#ifndef __PP_JOB_H__
-#define __PP_JOB_H__
+#pragma once
 
 #include <gtk/gtk.h>
 #include <glib-object.h>
@@ -58,5 +57,3 @@ gboolean       pp_job_authenticate_finish        (PpJob                *job,
                                                   GError              **error);
 
 G_END_DECLS
-
-#endif
diff --git a/panels/printers/pp-jobs-dialog.h b/panels/printers/pp-jobs-dialog.h
index 492a7c413..23c38b907 100644
--- a/panels/printers/pp-jobs-dialog.h
+++ b/panels/printers/pp-jobs-dialog.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_JOBS_DIALOG_H__
-#define __PP_JOBS_DIALOG_H__
+#pragma once
 
 #include <gtk/gtk.h>
 #include "pp-utils.h"
@@ -41,5 +40,3 @@ void          pp_jobs_dialog_free              (PpJobsDialog         *dialog);
 void          pp_jobs_dialog_authenticate_jobs (PpJobsDialog         *dialog);
 
 G_END_DECLS
-
-#endif
diff --git a/panels/printers/pp-maintenance-command.h b/panels/printers/pp-maintenance-command.h
index 5ba0a08d2..b5bacfe7d 100644
--- a/panels/printers/pp-maintenance-command.h
+++ b/panels/printers/pp-maintenance-command.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_MAINTENANCE_COMMAND_H__
-#define __PP_MAINTENANCE_COMMAND_H__
+#pragma once
 
 #include <glib-object.h>
 #include <gio/gio.h>
@@ -51,5 +50,3 @@ gboolean              pp_maintenance_command_is_supported_finish (PpMaintenanceC
                                                                   GAsyncResult          *result,
                                                                   GError               **error);
 G_END_DECLS
-
-#endif /* __PP_MAINTENANCE_COMMAND_H__ */
diff --git a/panels/printers/pp-new-printer-dialog.h b/panels/printers/pp-new-printer-dialog.h
index 54a0a2300..0a7d84be8 100644
--- a/panels/printers/pp-new-printer-dialog.h
+++ b/panels/printers/pp-new-printer-dialog.h
@@ -17,8 +17,7 @@
  *
  */
 
-#ifndef __PP_NEW_PRINTER_DIALOG_H__
-#define __PP_NEW_PRINTER_DIALOG_H__
+#pragma once
 
 #include "pp-utils.h"
 
@@ -35,5 +34,3 @@ void                pp_new_printer_dialog_set_ppd_list (PpNewPrinterDialog *dial
                                                         PPDList            *list);
 
 G_END_DECLS
-
-#endif /* __PP_NEW_PRINTER_DIALOG_H__ */
diff --git a/panels/printers/pp-new-printer.h b/panels/printers/pp-new-printer.h
index 2f70d4531..207bac410 100644
--- a/panels/printers/pp-new-printer.h
+++ b/panels/printers/pp-new-printer.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_NEW_PRINTER_H__
-#define __PP_NEW_PRINTER_H__
+#pragma once
 
 #include <glib-object.h>
 #include <gio/gio.h>
@@ -41,5 +40,3 @@ gboolean      pp_new_printer_add_finish (PpNewPrinter         *host,
                                          GError              **error);
 
 G_END_DECLS
-
-#endif /* __PP_NEW_PRINTER_H__ */
diff --git a/panels/printers/pp-options-dialog.h b/panels/printers/pp-options-dialog.h
index 5e7557560..30c7ae700 100644
--- a/panels/printers/pp-options-dialog.h
+++ b/panels/printers/pp-options-dialog.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_OPTIONS_DIALOG_H__
-#define __PP_OPTIONS_DIALOG_H__
+#pragma once
 
 #include <gtk/gtk.h>
 #include "pp-utils.h"
@@ -39,5 +38,3 @@ void             pp_options_dialog_set_callback (PpOptionsDialog      *dialog,
 void             pp_options_dialog_free         (PpOptionsDialog      *dialog);
 
 G_END_DECLS
-
-#endif
diff --git a/panels/printers/pp-ppd-option-widget.h b/panels/printers/pp-ppd-option-widget.h
index 2216a8aa9..b558e5130 100644
--- a/panels/printers/pp-ppd-option-widget.h
+++ b/panels/printers/pp-ppd-option-widget.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_PPD_OPTION_WIDGET_H__
-#define __PP_PPD_OPTION_WIDGET_H__
+#pragma once
 
 #include <gtk/gtk.h>
 #include <cups/cups.h>
@@ -34,5 +33,3 @@ GtkWidget   *pp_ppd_option_widget_new      (ppd_option_t *source,
                                             const gchar  *printer_name);
 
 G_END_DECLS
-
-#endif /* __PP_PPD_OPTION_WIDGET_H__ */
diff --git a/panels/printers/pp-ppd-selection-dialog.h b/panels/printers/pp-ppd-selection-dialog.h
index d9217ef12..3cca00243 100644
--- a/panels/printers/pp-ppd-selection-dialog.h
+++ b/panels/printers/pp-ppd-selection-dialog.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_PPD_SELECTION_DIALOG_H__
-#define __PP_PPD_SELECTION_DIALOG_H__
+#pragma once
 
 #include <gtk/gtk.h>
 #include "pp-utils.h"
@@ -40,5 +39,3 @@ void                  pp_ppd_selection_dialog_set_ppd_list         (PpPPDSelecti
 void                  pp_ppd_selection_dialog_free                 (PpPPDSelectionDialog      *dialog);
 
 G_END_DECLS
-
-#endif
diff --git a/panels/printers/pp-print-device.h b/panels/printers/pp-print-device.h
index ecf07a3ce..a271254f7 100644
--- a/panels/printers/pp-print-device.h
+++ b/panels/printers/pp-print-device.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_PRINT_DEVICE_H__
-#define __PP_PRINT_DEVICE_H__
+#pragma once
 
 #include <glib-object.h>
 #include <gio/gio.h>
@@ -47,5 +46,3 @@ gint           pp_print_device_get_acquisition_method    (PpPrintDevice *device)
 gboolean       pp_print_device_is_network_device         (PpPrintDevice *device);
 
 G_END_DECLS
-
-#endif /* __PP_PRINT_DEVICE_H__ */
diff --git a/panels/printers/pp-printer-entry.h b/panels/printers/pp-printer-entry.h
index 215517ac1..753231ea6 100644
--- a/panels/printers/pp-printer-entry.h
+++ b/panels/printers/pp-printer-entry.h
@@ -17,8 +17,7 @@
  * Author: Felipe Borges <felipeborges gnome org>
  */
 
-#ifndef PP_PRINTER_ENTRY_H
-#define PP_PRINTER_ENTRY_H
+#pragma once
 
 #include <gtk/gtk.h>
 #include <cups/cups.h>
@@ -36,5 +35,3 @@ GSList         *pp_printer_entry_get_size_group_widgets (PpPrinterEntry *self);
 void            pp_printer_entry_show_jobs_dialog (PpPrinterEntry *self);
 
 void            pp_printer_entry_authenticate_jobs (PpPrinterEntry *self);
-
-#endif /* PP_PRINTER_ENTRY_H */
diff --git a/panels/printers/pp-printer.h b/panels/printers/pp-printer.h
index 17594d3c8..5c6d6cc67 100644
--- a/panels/printers/pp-printer.h
+++ b/panels/printers/pp-printer.h
@@ -18,8 +18,7 @@
  *          Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_PRINTER_H__
-#define __PP_PRINTER_H__
+#pragma once
 
 #include <glib-object.h>
 #include <gio/gio.h>
@@ -77,5 +76,3 @@ gboolean     pp_printer_print_file_finish (PpPrinter         *printer,
                                            GError           **error);
 
 G_END_DECLS
-
-#endif /* __PP_PRINTER_H__ */
diff --git a/panels/printers/pp-samba.h b/panels/printers/pp-samba.h
index cef347a66..e2c5ddf20 100644
--- a/panels/printers/pp-samba.h
+++ b/panels/printers/pp-samba.h
@@ -18,8 +18,7 @@
  * Author: Marek Kasik <mkasik redhat com>
  */
 
-#ifndef __PP_SAMBA_H__
-#define __PP_SAMBA_H__
+#pragma once
 
 #include "pp-host.h"
 #include "pp-utils.h"
@@ -46,5 +45,3 @@ void           pp_samba_set_auth_info      (PpSamba             *samba,
                                             const gchar         *password);
 
 G_END_DECLS
-
-#endif /* __PP_SAMBA_H__ */
diff --git a/panels/printers/pp-utils.h b/panels/printers/pp-utils.h
index ac1c3b7de..f1631426f 100644
--- a/panels/printers/pp-utils.h
+++ b/panels/printers/pp-utils.h
@@ -17,8 +17,7 @@
  *
  */
 
-#ifndef __PP_UTILS_H__
-#define __PP_UTILS_H__
+#pragma once
 
 #include <gtk/gtk.h>
 #include <cups/cups.h>
@@ -266,5 +265,3 @@ gchar      *canonicalize_device_name (GList         *device_names,
 void        shift_string_left (gchar *str);
 
 G_END_DECLS
-
-#endif /* __PP_UTILS_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]