[totem/wip/hadess/simplify-decls: 1/8] all: Clean up headers




commit 1570003efe595bb8781fdf9de3e25d2f7e028052
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Mar 31 16:05:40 2022 +0200

    all: Clean up headers
    
    Use #pragma once and remove G_BEGIN_DECLS/G_END_DECLS

 src/backend/bacon-video-widget-gst-missing-plugins.h   |  9 +--------
 src/plugins/properties/bacon-video-widget-properties.h |  5 +----
 src/plugins/screenshot/totem-gallery-progress.h        |  9 +--------
 src/plugins/screenshot/totem-gallery.h                 |  9 +--------
 src/plugins/screenshot/totem-screenshot-plugin.h       |  9 +--------
 src/plugins/skipto/totem-skipto.h                      |  9 +--------
 src/plugins/skipto/totem-time-entry.h                  |  9 +--------
 src/plugins/totem-plugin.h                             | 10 +---------
 src/plugins/totem-plugins-engine.h                     | 10 +---------
 src/totem-interface.h                                  |  9 +--------
 src/totem-menu.h                                       |  9 +--------
 src/totem-options.h                                    |  9 +--------
 src/totem-preferences-dialog.h                         |  9 +--------
 src/totem-private.h                                    |  5 +----
 src/totem-profile.h                                    |  5 +----
 src/totem-search-entry.h                               |  9 +--------
 src/totem-session.h                                    |  9 +--------
 src/totem-subtitle-encoding.h                          |  5 +----
 src/totem-uri.h                                        | 11 ++---------
 src/totem.h                                            |  7 +------
 20 files changed, 21 insertions(+), 145 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-missing-plugins.h 
b/src/backend/bacon-video-widget-gst-missing-plugins.h
index 01b9fc123..38d9aa78b 100644
--- a/src/backend/bacon-video-widget-gst-missing-plugins.h
+++ b/src/backend/bacon-video-widget-gst-missing-plugins.h
@@ -20,16 +20,9 @@
    Author: Tim-Philipp Müller <tim centricular net>
  */
 
-#ifndef BACON_VIDEO_WIDGET_GST_MISSING_PLUGINS_H
-#define BACON_VIDEO_WIDGET_GST_MISSING_PLUGINS_H
+#pragma once
 
 #include "bacon-video-widget.h"
 
-G_BEGIN_DECLS
-
 void bacon_video_widget_gst_missing_plugins_setup (BaconVideoWidget *bvw);
 void bacon_video_widget_gst_missing_plugins_block (void);
-
-G_END_DECLS
-
-#endif /* BACON_VIDEO_WIDGET_GST_MISSING_PLUGINS_H */
diff --git a/src/plugins/properties/bacon-video-widget-properties.h 
b/src/plugins/properties/bacon-video-widget-properties.h
index 32ec5e0b8..f353f9b45 100644
--- a/src/plugins/properties/bacon-video-widget-properties.h
+++ b/src/plugins/properties/bacon-video-widget-properties.h
@@ -20,8 +20,7 @@
    Author: Bastien Nocera <hadess hadess net>
  */
 
-#ifndef BACON_VIDEO_WIDGET_PROPERTIES_H
-#define BACON_VIDEO_WIDGET_PROPERTIES_H
+#pragma once
 
 #include <gtk/gtk.h>
 
@@ -58,5 +57,3 @@ void bacon_video_widget_properties_set_has_type               (BaconVideoWidgetProperties 
*pr
                                                         gboolean                    has_audio);
 void bacon_video_widget_properties_set_framerate       (BaconVideoWidgetProperties *props,
                                                         float                       framerate);
-
-#endif /* BACON_VIDEO_WIDGET_PROPERTIES_H */
diff --git a/src/plugins/screenshot/totem-gallery-progress.h b/src/plugins/screenshot/totem-gallery-progress.h
index 3a018b596..852de79b8 100644
--- a/src/plugins/screenshot/totem-gallery-progress.h
+++ b/src/plugins/screenshot/totem-gallery-progress.h
@@ -25,15 +25,12 @@
  * See license_change file for details.
  */
 
-#ifndef TOTEM_GALLERY_PROGRESS_H
-#define TOTEM_GALLERY_PROGRESS_H
+#pragma once
 
 #include <glib.h>
 #include <glib-object.h>
 #include <gtk/gtk.h>
 
-G_BEGIN_DECLS
-
 #define TOTEM_TYPE_GALLERY_PROGRESS            (totem_gallery_progress_get_type ())
 #define TOTEM_GALLERY_PROGRESS(o)              (G_TYPE_CHECK_INSTANCE_CAST ((o), 
TOTEM_TYPE_GALLERY_PROGRESS, TotemGalleryProgress))
 #define TOTEM_GALLERY_PROGRESS_CLASS(k)                (G_TYPE_CHECK_CLASS_CAST((k), 
TOTEM_TYPE_GALLERY_PROGRESS, TotemGalleryProgressClass))
@@ -55,7 +52,3 @@ typedef struct {
 GType totem_gallery_progress_get_type (void);
 TotemGalleryProgress *totem_gallery_progress_new (GPid child_pid, const gchar *output_filename);
 void totem_gallery_progress_run (TotemGalleryProgress *self, gint stdout_fd);
-
-G_END_DECLS
-
-#endif /* !TOTEM_GALLERY_PROGRESS_H */
diff --git a/src/plugins/screenshot/totem-gallery.h b/src/plugins/screenshot/totem-gallery.h
index 69d27b353..dc6e06680 100644
--- a/src/plugins/screenshot/totem-gallery.h
+++ b/src/plugins/screenshot/totem-gallery.h
@@ -25,8 +25,7 @@
  * See license_change file for details.
  */
 
-#ifndef TOTEM_GALLERY_H
-#define TOTEM_GALLERY_H
+#pragma once
 
 #include <glib.h>
 #include <glib-object.h>
@@ -34,8 +33,6 @@
 
 #include "totem.h"
 
-G_BEGIN_DECLS
-
 #define TOTEM_TYPE_GALLERY             (totem_gallery_get_type ())
 #define TOTEM_GALLERY(o)               (G_TYPE_CHECK_INSTANCE_CAST ((o), TOTEM_TYPE_GALLERY, TotemGallery))
 #define TOTEM_GALLERY_CLASS(k)         (G_TYPE_CHECK_CLASS_CAST((k), TOTEM_TYPE_GALLERY, TotemGalleryClass))
@@ -56,7 +53,3 @@ typedef struct {
 
 GType totem_gallery_get_type (void);
 TotemGallery *totem_gallery_new (Totem *totem);
-
-G_END_DECLS
-
-#endif /* !TOTEM_GALLERY_H */
diff --git a/src/plugins/screenshot/totem-screenshot-plugin.h 
b/src/plugins/screenshot/totem-screenshot-plugin.h
index a59ce66db..9c16a3546 100644
--- a/src/plugins/screenshot/totem-screenshot-plugin.h
+++ b/src/plugins/screenshot/totem-screenshot-plugin.h
@@ -25,8 +25,7 @@
  * See license_change file for details.
  */
 
-#ifndef TOTEM_SCREENSHOT_PLUGIN_H
-#define TOTEM_SCREENSHOT_PLUGIN_H
+#pragma once
 
 #include <glib.h>
 
@@ -34,11 +33,5 @@
 #include <libpeas/peas-extension-base.h>
 #include <libpeas/peas-object-module.h>
 
-G_BEGIN_DECLS
-
 gchar *totem_screenshot_plugin_setup_file_chooser (const char *filename_format, const char *movie_name) 
G_GNUC_WARN_UNUSED_RESULT G_GNUC_FORMAT (1);
 void totem_screenshot_plugin_update_file_chooser (const char *filename);
-
-G_END_DECLS
-
-#endif /* !TOTEM_SCREENSHOT_PLUGIN_H */
diff --git a/src/plugins/skipto/totem-skipto.h b/src/plugins/skipto/totem-skipto.h
index d306ab5bb..90c6ae831 100644
--- a/src/plugins/skipto/totem-skipto.h
+++ b/src/plugins/skipto/totem-skipto.h
@@ -27,15 +27,12 @@
  * Author: Bastien Nocera <hadess hadess net>, Philip Withnall <philip tecnocode co uk>
  */
 
-#ifndef TOTEM_SKIPTO_H
-#define TOTEM_SKIPTO_H
+#pragma once
 
 #include <gtk/gtk.h>
 
 #include "totem.h"
 
-G_BEGIN_DECLS
-
 #define TOTEM_TYPE_SKIPTO              (totem_skipto_get_type ())
 #define TOTEM_SKIPTO(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOTEM_TYPE_SKIPTO, TotemSkipto))
 #define TOTEM_SKIPTO_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), TOTEM_TYPE_SKIPTO, 
TotemSkiptoClass))
@@ -63,7 +60,3 @@ gint64 totem_skipto_get_range (TotemSkipto *skipto);
 void totem_skipto_update_range (TotemSkipto *skipto, gint64 _time);
 void totem_skipto_set_seekable (TotemSkipto *skipto, gboolean seekable);
 void totem_skipto_set_current  (TotemSkipto *skipto, gint64 _time);
-
-G_END_DECLS
-
-#endif /* TOTEM_SKIPTO_H */
diff --git a/src/plugins/skipto/totem-time-entry.h b/src/plugins/skipto/totem-time-entry.h
index b2b929663..e0a7f3197 100644
--- a/src/plugins/skipto/totem-time-entry.h
+++ b/src/plugins/skipto/totem-time-entry.h
@@ -27,15 +27,12 @@
  * Author: Philip Withnall <philip tecnocode co uk>
  */
 
-#ifndef TOTEM_TIME_ENTRY_H
-#define TOTEM_TIME_ENTRY_H
+#pragma once
 
 #include <glib.h>
 #include <glib-object.h>
 #include <gtk/gtk.h>
 
-G_BEGIN_DECLS
-
 #define TOTEM_TYPE_TIME_ENTRY          (totem_time_entry_get_type ())
 #define TOTEM_TIME_ENTRY(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), TOTEM_TYPE_TIME_ENTRY, 
TotemTimeEntry))
 #define TOTEM_TIME_ENTRY_CLASS(k)      (G_TYPE_CHECK_CLASS_CAST((k), TOTEM_TYPE_TIME_ENTRY, 
TotemTimeEntryClass))
@@ -56,7 +53,3 @@ typedef struct {
 
 GType totem_time_entry_get_type (void);
 GtkWidget *totem_time_entry_new (GtkAdjustment *adjustment, gdouble climb_rate);
-
-G_END_DECLS
-
-#endif /* !TOTEM_TIME_ENTRY_H */
diff --git a/src/plugins/totem-plugin.h b/src/plugins/totem-plugin.h
index da35fcaaf..68c58f85d 100644
--- a/src/plugins/totem-plugin.h
+++ b/src/plugins/totem-plugin.h
@@ -27,8 +27,7 @@
  *
  */
 
-#ifndef __TOTEM_PLUGIN_H__
-#define __TOTEM_PLUGIN_H__
+#pragma once
 
 #include <libpeas/peas-extension-base.h>
 #include <libpeas/peas-object-module.h>
@@ -36,8 +35,6 @@
 #include <libpeas-gtk/peas-gtk-configurable.h>
 #include <totem.h>
 
-G_BEGIN_DECLS
-
 /**
  * _TOTEM_PLUGIN_REGISTER:
  * @TYPE_NAME: the name of the plugin type, in UPPER_CASE
@@ -167,8 +164,3 @@ G_BEGIN_DECLS
        {                                                                       \
                iface->create_configure_widget = impl_create_configure_widget;  \
        }
-
-G_END_DECLS
-
-#endif  /* __TOTEM_PLUGIN_H__ */
-
diff --git a/src/plugins/totem-plugins-engine.h b/src/plugins/totem-plugins-engine.h
index b3360e4e5..8c8207eb7 100644
--- a/src/plugins/totem-plugins-engine.h
+++ b/src/plugins/totem-plugins-engine.h
@@ -27,15 +27,12 @@
  *
  */
 
-#ifndef __TOTEM_PLUGINS_ENGINE_H__
-#define __TOTEM_PLUGINS_ENGINE_H__
+#pragma once
 
 #include <glib.h>
 #include <libpeas/peas-engine.h>
 #include <totem.h>
 
-G_BEGIN_DECLS
-
 #define TOTEM_TYPE_PLUGINS_ENGINE              (totem_plugins_engine_get_type ())
 #define TOTEM_PLUGINS_ENGINE(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), TOTEM_TYPE_PLUGINS_ENGINE, 
TotemPluginsEngine))
 #define TOTEM_PLUGINS_ENGINE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), TOTEM_TYPE_PLUGINS_ENGINE, 
TotemPluginsEngineClass))
@@ -61,8 +58,3 @@ struct _TotemPluginsEngineClass
 GType                  totem_plugins_engine_get_type                   (void) G_GNUC_CONST;
 TotemPluginsEngine     *totem_plugins_engine_get_default               (TotemObject *totem);
 void                   totem_plugins_engine_shut_down                  (TotemPluginsEngine *self);
-
-G_END_DECLS
-
-#endif  /* __TOTEM_PLUGINS_ENGINE_H__ */
-
diff --git a/src/totem-interface.h b/src/totem-interface.h
index a41b0b210..55477a6f8 100644
--- a/src/totem-interface.h
+++ b/src/totem-interface.h
@@ -20,14 +20,11 @@
    Author: Bastien Nocera <hadess hadess net>
  */
 
-#ifndef TOTEM_INTERFACE_H
-#define TOTEM_INTERFACE_H
+#pragma once
 
 #include <gtk/gtk.h>
 #include "totem.h"
 
-G_BEGIN_DECLS
-
 void            totem_interface_error          (const char *title,
                                                 const char *reason,
                                                 GtkWindow *parent);
@@ -38,7 +35,3 @@ GtkWidget *    totem_interface_create_header_button (GtkWidget  *header,
                                                       GtkWidget  *button,
                                                       const char *icon_name,
                                                       GtkPackType pack_type);
-
-G_END_DECLS
-
-#endif /* TOTEM_INTERFACE_H */
diff --git a/src/totem-menu.h b/src/totem-menu.h
index 035535871..f6b5f847e 100644
--- a/src/totem-menu.h
+++ b/src/totem-menu.h
@@ -20,14 +20,11 @@
    Author: Bastien Nocera <hadess hadess net>
  */
 
-#ifndef TOTEM_MENU_H
-#define TOTEM_MENU_H
+#pragma once
 
 #include "totem.h"
 #include "bacon-video-widget.h"
 
-G_BEGIN_DECLS
-
 void totem_app_menu_setup (Totem *totem);
 void totem_app_actions_setup (Totem *totem);
 
@@ -43,7 +40,3 @@ typedef struct {
 GList *bvw_lang_info_to_menu_labels (GList        *langs,
                                     BvwTrackType  track_type);
 void free_menu_item (MenuItem *item);
-
-G_END_DECLS
-
-#endif /* TOTEM_MENU_H */
diff --git a/src/totem-options.h b/src/totem-options.h
index f38870649..f345164bc 100644
--- a/src/totem-options.h
+++ b/src/totem-options.h
@@ -20,15 +20,12 @@
    Author: Bastien Nocera <hadess hadess net>
  */
 
-#ifndef TOTEM_OPTIONS_H
-#define TOTEM_OPTIONS_H
+#pragma once
 
 #include <gtk/gtk.h>
 
 #include "totem.h"
 
-G_BEGIN_DECLS
-
 /* Stores the state of the command line options */
 typedef struct {
        gboolean playpause;
@@ -57,7 +54,3 @@ extern TotemCmdLineOptions optionstate;
 void totem_options_register_remote_commands (Totem *totem);
 void totem_options_process_for_server (Totem *totem,
                                       TotemCmdLineOptions* options);
-
-G_END_DECLS
-
-#endif /* TOTEM_OPTIONS_H */
diff --git a/src/totem-preferences-dialog.h b/src/totem-preferences-dialog.h
index af30e9cd8..19ceb9ec3 100644
--- a/src/totem-preferences-dialog.h
+++ b/src/totem-preferences-dialog.h
@@ -26,18 +26,11 @@
  *
  */
 
-#ifndef TOTEM_PREFERENCES_H
-#define TOTEM_PREFERENCES_H
+#pragma once
 
 #include <gtk/gtk.h>
 
-G_BEGIN_DECLS
-
 #define TOTEM_TYPE_PREFERENCES_DIALOG (totem_preferences_dialog_get_type())
 G_DECLARE_FINAL_TYPE (TotemPreferencesDialog, totem_preferences_dialog, TOTEM, PREFERENCES_DIALOG, GtkDialog)
 
 GtkWidget *totem_preferences_dialog_new (Totem *totem);
-
-G_END_DECLS
-
-#endif /* TOTEM_PREFERENCES_H */
diff --git a/src/totem-private.h b/src/totem-private.h
index 7346df55e..673edaadc 100644
--- a/src/totem-private.h
+++ b/src/totem-private.h
@@ -25,8 +25,7 @@
  *
  */
 
-#ifndef __TOTEM_PRIVATE_H__
-#define __TOTEM_PRIVATE_H__
+#pragma once
 
 #include <gtk/gtk.h>
 #include <gio/gio.h>
@@ -203,5 +202,3 @@ void        totem_object_add_items_to_playlist      (TotemObject *totem,
 /* Signal emission */
 void   totem_file_has_played                   (TotemObject *totem,
                                                 const char *mrl);
-
-#endif /* __TOTEM_PRIVATE_H__ */
diff --git a/src/totem-profile.h b/src/totem-profile.h
index 1089c5685..61afe81b3 100644
--- a/src/totem-profile.h
+++ b/src/totem-profile.h
@@ -27,8 +27,7 @@
  *
  */
 
-#ifndef __TOTEM_PROFILE_H__
-#define __TOTEM_PROFILE_H__ 1
+#pragma once
 
 #ifdef GNOME_ENABLE_DEBUG
 
@@ -53,5 +52,3 @@
 #define TOTEM_PROFILE(function) function
 
 #endif /* GNOME_ENABLE_DEBUG */
-
-#endif /* __TOTEM_PROFILE_H__ */
diff --git a/src/totem-search-entry.h b/src/totem-search-entry.h
index 420c395fa..96c56c325 100644
--- a/src/totem-search-entry.h
+++ b/src/totem-search-entry.h
@@ -19,15 +19,12 @@
  *
  */
 
-#ifndef __TOTEM_SEARCH_ENTRY_H__
-#define __TOTEM_SEARCH_ENTRY_H__
+#pragma once
 
 #include <glib-object.h>
 
 #include <gtk/gtk.h>
 
-G_BEGIN_DECLS
-
 #define TOTEM_TYPE_SEARCH_ENTRY totem_search_entry_get_type()
 #define TOTEM_SEARCH_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOTEM_TYPE_SEARCH_ENTRY, 
TotemSearchEntry))
 #define TOTEM_SEARCH_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOTEM_TYPE_SEARCH_ENTRY, 
TotemSearchEntryClass))
@@ -68,7 +65,3 @@ gboolean    totem_search_entry_set_selected_id (TotemSearchEntry *self,
 
 const char *totem_search_entry_get_text        (TotemSearchEntry *self);
 GtkEntry   *totem_search_entry_get_entry       (TotemSearchEntry *self);
-
-G_END_DECLS
-
-#endif /* __TOTEM_SEARCH_ENTRY_H__ */
diff --git a/src/totem-session.h b/src/totem-session.h
index edee82d6f..f3d0a2dbc 100644
--- a/src/totem-session.h
+++ b/src/totem-session.h
@@ -20,17 +20,10 @@
    Author: Bastien Nocera <hadess hadess net>
  */
 
-#ifndef TOTEM_SESSION_H
-#define TOTEM_SESSION_H
+#pragma once
 
 #include "totem.h"
 
-G_BEGIN_DECLS
-
 gboolean totem_session_try_restore (Totem *totem);
 void totem_session_save (Totem *totem);
 void totem_session_cleanup (Totem *totem);
-
-G_END_DECLS
-
-#endif /* TOTEM_SESSION_H */
diff --git a/src/totem-subtitle-encoding.h b/src/totem-subtitle-encoding.h
index 7283f003a..47448ede0 100644
--- a/src/totem-subtitle-encoding.h
+++ b/src/totem-subtitle-encoding.h
@@ -1,12 +1,9 @@
 /* Encoding stuff */
 
-#ifndef TOTEM_SUBTITLE_ENCODING_H
-#define TOTEM_SUBTITLE_ENCODING_H
+#pragma once
 
 #include <gtk/gtk.h>
 
 void totem_subtitle_encoding_init (GtkComboBox *combo);
 void totem_subtitle_encoding_set (GtkComboBox *combo, const char *encoding);
 const char * totem_subtitle_encoding_get_selected (GtkComboBox *combo);
-
-#endif /* SUBTITLE_ENCODING_H */
diff --git a/src/totem-uri.h b/src/totem-uri.h
index 3e89606d9..b5aef7833 100644
--- a/src/totem-uri.h
+++ b/src/totem-uri.h
@@ -20,15 +20,12 @@
    Author: Bastien Nocera <hadess hadess net>
  */
 
-#ifndef TOTEM_URI_H
-#define TOTEM_URI_H
+#pragma once
 
 #include "totem.h"
 #include <gtk/gtk.h>
 #include <gio/gio.h>
 
-G_BEGIN_DECLS
-
 const char *   totem_dot_dir                   (void);
 const char *   totem_data_dot_dir              (void);
 char *         totem_pictures_dir              (void);
@@ -44,9 +41,5 @@ void          totem_destroy_file_filters      (void);
 char *         totem_uri_escape_for_display    (const char *uri);
 GSList *       totem_add_files                 (GtkWindow *parent,
                                                 const char *path);
-char *         totem_add_subtitle              (GtkWindow *parent, 
+char *         totem_add_subtitle              (GtkWindow *parent,
                                                 const char *uri);
-
-G_END_DECLS
-
-#endif /* TOTEM_URI_H */
diff --git a/src/totem.h b/src/totem.h
index 69649e0ef..ec0cd9edc 100644
--- a/src/totem.h
+++ b/src/totem.h
@@ -25,8 +25,7 @@
  *
  */
 
-#ifndef __TOTEM_H__
-#define __TOTEM_H__
+#pragma once
 
 #include <glib-object.h>
 #include <gtk/gtk.h>
@@ -38,8 +37,6 @@
  **/
 #define TOTEM_GSETTINGS_SCHEMA "org.gnome.totem"
 
-G_BEGIN_DECLS
-
 /**
  * TotemRemoteCommand:
  * @TOTEM_REMOTE_COMMAND_UNKNOWN: unknown command
@@ -232,5 +229,3 @@ gboolean totem_object_remote_get_setting    (TotemObject *totem,
 
 const gchar * const *totem_object_get_supported_content_types (void);
 const gchar * const *totem_object_get_supported_uri_schemes (void);
-
-#endif /* __TOTEM_H__ */


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