[gnome-control-center] common: sharing: Replace ifdefs with #pragma once
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] common: sharing: Replace ifdefs with #pragma once
- Date: Fri, 1 Jun 2018 21:46:20 +0000 (UTC)
commit 223087cf391c038f761fbc9cfc9512429d4cc9d5
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Jun 1 12:15:08 2018 +1200
common: sharing: Replace ifdefs with #pragma once
panels/common/cc-common-language.h | 5 +----
panels/common/cc-language-chooser.h | 5 +----
panels/common/cc-util.h | 5 +----
panels/common/gsd-device-manager-udev.h | 5 +----
panels/common/gsd-device-manager-x11.h | 5 +----
panels/common/gsd-device-manager.h | 5 +----
panels/common/gsd-input-helper.h | 5 +----
panels/common/hostname-helper.h | 2 ++
panels/common/list-box-helper.h | 2 ++
9 files changed, 11 insertions(+), 28 deletions(-)
---
diff --git a/panels/common/cc-common-language.h b/panels/common/cc-common-language.h
index 557147518..1f578b7d2 100644
--- a/panels/common/cc-common-language.h
+++ b/panels/common/cc-common-language.h
@@ -18,8 +18,7 @@
* Written by: Matthias Clasen <mclasen redhat com>
*/
-#ifndef __CC_COMMON_LANGUAGE_H__
-#define __CC_COMMON_LANGUAGE_H__
+#pragma once
#include <gtk/gtk.h>
@@ -57,5 +56,3 @@ void cc_common_language_select_current_language (GtkTreeView *treeview);
void cc_common_language_add_user_languages (GtkTreeModel *model);
G_END_DECLS
-
-#endif
diff --git a/panels/common/cc-language-chooser.h b/panels/common/cc-language-chooser.h
index 5329e8b7d..4f4f74990 100644
--- a/panels/common/cc-language-chooser.h
+++ b/panels/common/cc-language-chooser.h
@@ -18,8 +18,7 @@
* Written by: Matthias Clasen <mclasen redhat com>
*/
-#ifndef __CC_LANGUAGE_CHOOSER_H__
-#define __CC_LANGUAGE_CHOOSER_H__
+#pragma once
#include <gtk/gtk.h>
#include <glib-object.h>
@@ -33,5 +32,3 @@ void cc_language_chooser_set_language (GtkWidget *chooser,
const gchar *language);
G_END_DECLS
-
-#endif /* __CC_LANGUAGE_CHOOSER_H__ */
diff --git a/panels/common/cc-util.h b/panels/common/cc-util.h
index cd1784a0a..538d3582a 100644
--- a/panels/common/cc-util.h
+++ b/panels/common/cc-util.h
@@ -18,12 +18,9 @@
*/
-#ifndef _CC_UTIL_H
-#define _CC_UTIL_H
+#pragma once
#include <glib.h>
char * cc_util_normalize_casefold_and_unaccent (const char *str);
char * cc_util_get_smart_date (GDateTime *date);
-
-#endif
diff --git a/panels/common/gsd-device-manager-udev.h b/panels/common/gsd-device-manager-udev.h
index eec0e5dfa..0c9dbcc9b 100644
--- a/panels/common/gsd-device-manager-udev.h
+++ b/panels/common/gsd-device-manager-udev.h
@@ -19,8 +19,7 @@
* Author: Carlos Garnacho <carlosg gnome org>
*/
-#ifndef __GSD_UDEV_DEVICE_MANAGER_H__
-#define __GSD_UDEV_DEVICE_MANAGER_H__
+#pragma once
#include "gsd-device-manager.h"
@@ -30,5 +29,3 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GsdUdevDeviceManager, gsd_udev_device_manager, GSD, UDEV_DEVICE_MANAGER,
GsdDeviceManager)
G_END_DECLS
-
-#endif /* __GSD_UDEV_DEVICE_MANAGER_H__ */
diff --git a/panels/common/gsd-device-manager-x11.h b/panels/common/gsd-device-manager-x11.h
index a21e711b9..82dbaf154 100644
--- a/panels/common/gsd-device-manager-x11.h
+++ b/panels/common/gsd-device-manager-x11.h
@@ -19,8 +19,7 @@
* Author: Carlos Garnacho <carlosg gnome org>
*/
-#ifndef __GSD_X11_DEVICE_MANAGER_H__
-#define __GSD_X11_DEVICE_MANAGER_H__
+#pragma once
#include <gdk/gdk.h>
#include "gsd-device-manager.h"
@@ -31,5 +30,3 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GsdX11DeviceManager, gsd_x11_device_manager, GSD, X11_DEVICE_MANAGER, GsdDeviceManager)
G_END_DECLS
-
-#endif /* __GSD_X11_DEVICE_MANAGER_H__ */
diff --git a/panels/common/gsd-device-manager.h b/panels/common/gsd-device-manager.h
index 68ebfc1f9..13cf226a0 100644
--- a/panels/common/gsd-device-manager.h
+++ b/panels/common/gsd-device-manager.h
@@ -17,8 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef __GSD_DEVICE_MANAGER_H__
-#define __GSD_DEVICE_MANAGER_H__
+#pragma once
#include <gdk/gdk.h>
#include <glib-object.h>
@@ -83,5 +82,3 @@ GsdDevice * gsd_device_manager_lookup_gdk_device (GsdDeviceManager *manager,
GdkDevice *gdk_device);
G_END_DECLS
-
-#endif /* __GSD_DEVICE_MANAGER_H__ */
diff --git a/panels/common/gsd-input-helper.h b/panels/common/gsd-input-helper.h
index 31e2e47a1..ca77934ec 100644
--- a/panels/common/gsd-input-helper.h
+++ b/panels/common/gsd-input-helper.h
@@ -16,8 +16,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GSD_INPUT_HELPER_H
-#define __GSD_INPUT_HELPER_H
+#pragma once
G_BEGIN_DECLS
@@ -68,5 +67,3 @@ void xdevice_close (XDevice *xdevice);
const char * xdevice_get_wacom_tool_type (int deviceid);
G_END_DECLS
-
-#endif /* __GSD_INPUT_HELPER_H */
diff --git a/panels/common/hostname-helper.h b/panels/common/hostname-helper.h
index 9f96c12f9..3d2a1430d 100644
--- a/panels/common/hostname-helper.h
+++ b/panels/common/hostname-helper.h
@@ -16,6 +16,8 @@
*
*/
+#pragma once
+
char *pretty_hostname_to_static (const char *pretty,
gboolean for_display);
char *pretty_hostname_to_ssid (const char *pretty);
diff --git a/panels/common/list-box-helper.h b/panels/common/list-box-helper.h
index c2a0acc97..f3c2553c9 100644
--- a/panels/common/list-box-helper.h
+++ b/panels/common/list-box-helper.h
@@ -16,6 +16,8 @@
*
*/
+#pragma once
+
#include <gtk/gtk.h>
#define CC_TYPE_LIST_BOX_ROW (cc_list_box_row_get_type ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]