[libgweather] Move to a more consistent naming system for source files



commit be5fb83a6b98f6a02d5f13bad14ec794d8aa0dad
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Apr 13 22:50:40 2015 -0700

    Move to a more consistent naming system for source files
    
    gnome-builder enforces the convention that header files must
    be named after their corresponding C file, and will show
    spurious errors or warnings otherwise.
    Rename headers to follow this convention.
    This can cause API breaks on apps that use some header files
    directly (hopefully none). But apps should use gweather/gweather.h
    as the only header and then nothing will break.

 libgweather/Makefile.am                            |   41 +++++++++++---------
 ...{location-entry.c => gweather-location-entry.c} |    4 +-
 ...{location-entry.h => gweather-location-entry.h} |    0
 libgweather/gweather-location.c                    |    4 +-
 libgweather/{parser.c => gweather-parser.c}        |    8 ++--
 libgweather/{parser.h => gweather-parser.h}        |    0
 libgweather/{weather-priv.h => gweather-private.h} |    0
 .../{timezone-menu.c => gweather-timezone-menu.c}  |    4 +-
 .../{timezone-menu.h => gweather-timezone-menu.h}  |    0
 libgweather/gweather-timezone.c                    |    4 +-
 libgweather/{weather.c => gweather-weather.c}      |    2 +-
 libgweather/gweather.h                             |    3 +-
 libgweather/test_locations.c                       |    4 +-
 libgweather/test_metar.c                           |    2 +-
 libgweather/test_sun_moon.c                        |    2 +-
 libgweather/weather-iwin.c                         |    2 +-
 libgweather/weather-metar.c                        |    2 +-
 libgweather/weather-moon.c                         |    2 +-
 libgweather/weather-owm.c                          |    2 +-
 libgweather/weather-sun.c                          |    2 +-
 libgweather/weather-wx.c                           |    2 +-
 libgweather/weather-yahoo.c                        |    2 +-
 libgweather/weather-yrno.c                         |    2 +-
 po-locations/POTFILES.skip                         |   10 ++--
 po/POTFILES.in                                     |    6 +-
 25 files changed, 58 insertions(+), 52 deletions(-)
---
diff --git a/libgweather/Makefile.am b/libgweather/Makefile.am
index 47f2309..931a82a 100644
--- a/libgweather/Makefile.am
+++ b/libgweather/Makefile.am
@@ -13,8 +13,8 @@ AM_CFLAGS = $(WARN_CFLAGS)
 
 gweather_new_headers = \
        gweather.h \
-       gweather-location.h location-entry.h \
-       gweather-timezone.h timezone-menu.h \
+       gweather-location.h gweather-location-entry.h \
+       gweather-timezone.h gweather-timezone-menu.h \
        gweather-weather.h gweather-enums.h
 
 libgweatherincdir = $(includedir)/libgweather-3.0/libgweather
@@ -23,17 +23,31 @@ libgweatherinc_HEADERS = \
        gweather-enum-types.h           \
        gweather-version.h
 
-libgweather_internal_3_la_SOURCES = \
-       weather.c weather-priv.h \
+gweather_c_sources = \
+       gweather-weather.c \
        weather-metar.c weather-iwin.c weather-yahoo.c \
        weather-wx.c weather-yrno.c weather-owm.c \
        weather-sun.c weather-moon.c \
        gweather-enum-types.c \
-       gweather-location.c gweather-location.h \
-       gweather-timezone.c gweather-timezone.h \
-       location-entry.c location-entry.h \
-       timezone-menu.c timezone-menu.h \
-       parser.c parser.h
+       gweather-location.c \
+       gweather-timezone.c \
+       gweather-location-entry.c \
+       gweather-timezone-menu.c \
+       gweather-parser.c
+
+introspection_sources = \
+       $(gweather_c_sources) \
+       $(gweather_new_headers)
+
+built_introspection_sources = \
+       gweather-enum-types.h gweather-enums.h
+
+libgweather_internal_3_la_SOURCES = \
+       $(gweather_c_sources) \
+       $(gweather_new_headers) \
+       $(built_introspection_sources) \
+       gweather-private.h \
+       gweather-parser.h
 
 libgweather_internal_3_la_CPPFLAGS = \
        $(AM_CPPFLAGS)                  \
@@ -86,15 +100,6 @@ INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(srcdir) --c-include
 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
 
 if HAVE_INTROSPECTION
-introspection_sources =        \
-       weather.c gweather-weather.h \
-       gweather-location.c gweather-location.h \
-       gweather-timezone.c gweather-timezone.h \
-       location-entry.c location-entry.h \
-       timezone-menu.c timezone-menu.h
-
-built_introspection_sources = gweather-enum-types.h gweather-enums.h
-
 GWeather-3.0.gir: libgweather-3.la Makefile
 GWeather_3_0_gir_INCLUDES = GObject-2.0 Gtk-3.0
 GWeather_3_0_gir_CFLAGS = $(libgweather_internal_3_la_CPPFLAGS) -DGWEATHER_I_KNOW_THIS_IS_UNSTABLE
diff --git a/libgweather/location-entry.c b/libgweather/gweather-location-entry.c
similarity index 99%
rename from libgweather/location-entry.c
rename to libgweather/gweather-location-entry.c
index d92d9dc..876b31e 100644
--- a/libgweather/location-entry.c
+++ b/libgweather/gweather-location-entry.c
@@ -27,8 +27,8 @@
 #include <gio/gio.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "location-entry.h"
-#include "weather-priv.h"
+#include "gweather-location-entry.h"
+#include "gweather-private.h"
 
 /**
  * SECTION:gweatherlocationentry
diff --git a/libgweather/location-entry.h b/libgweather/gweather-location-entry.h
similarity index 100%
rename from libgweather/location-entry.h
rename to libgweather/gweather-location-entry.h
diff --git a/libgweather/gweather-location.c b/libgweather/gweather-location.c
index 324b80a..420cda6 100644
--- a/libgweather/gweather-location.c
+++ b/libgweather/gweather-location.c
@@ -33,8 +33,8 @@
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
 #include "gweather-location.h"
 #include "gweather-timezone.h"
-#include "parser.h"
-#include "weather-priv.h"
+#include "gweather-parser.h"
+#include "gweather-private.h"
 
 /* This is the precision of coordinates in the database */
 #define EPSILON 0.000001
diff --git a/libgweather/parser.c b/libgweather/gweather-parser.c
similarity index 98%
rename from libgweather/parser.c
rename to libgweather/gweather-parser.c
index cda861a..61b3617 100644
--- a/libgweather/parser.c
+++ b/libgweather/gweather-parser.c
@@ -22,15 +22,15 @@
 #include <config.h>
 #endif
 
-#define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
-
-#include "parser.h"
 #include <string.h>
 #include <glib.h>
 #include <libxml/xmlreader.h>
 #include <glib/gi18n-lib.h>
 
+#define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
+#include "gweather-private.h"
+#include "gweather-parser.h"
+
 /*
  * _gweather_parser_get_value:
  * @parser: a #GWeatherParser
diff --git a/libgweather/parser.h b/libgweather/gweather-parser.h
similarity index 100%
rename from libgweather/parser.h
rename to libgweather/gweather-parser.h
diff --git a/libgweather/weather-priv.h b/libgweather/gweather-private.h
similarity index 100%
rename from libgweather/weather-priv.h
rename to libgweather/gweather-private.h
diff --git a/libgweather/timezone-menu.c b/libgweather/gweather-timezone-menu.c
similarity index 99%
rename from libgweather/timezone-menu.c
rename to libgweather/gweather-timezone-menu.c
index 87b4f51..2edb6da 100644
--- a/libgweather/timezone-menu.c
+++ b/libgweather/gweather-timezone-menu.c
@@ -23,8 +23,8 @@
 #endif
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "timezone-menu.h"
-#include "weather-priv.h"
+#include "gweather-timezone-menu.h"
+#include "gweather-private.h"
 
 #include <string.h>
 
diff --git a/libgweather/timezone-menu.h b/libgweather/gweather-timezone-menu.h
similarity index 100%
rename from libgweather/timezone-menu.h
rename to libgweather/gweather-timezone-menu.h
diff --git a/libgweather/gweather-timezone.c b/libgweather/gweather-timezone.c
index d2132cd..34f28a2 100644
--- a/libgweather/gweather-timezone.c
+++ b/libgweather/gweather-timezone.c
@@ -26,8 +26,8 @@
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
 #include "gweather-timezone.h"
-#include "parser.h"
-#include "weather-priv.h"
+#include "gweather-parser.h"
+#include "gweather-private.h"
 
 /**
  * SECTION:gweathertimezone
diff --git a/libgweather/weather.c b/libgweather/gweather-weather.c
similarity index 99%
rename from libgweather/weather.c
rename to libgweather/gweather-weather.c
index 7052ffd..a93f83c 100644
--- a/libgweather/weather.c
+++ b/libgweather/gweather-weather.c
@@ -36,7 +36,7 @@
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
 #include "gweather-weather.h"
-#include "weather-priv.h"
+#include "gweather-private.h"
 #include "gweather-enum-types.h"
 
 #define MOON_PHASES 36
diff --git a/libgweather/gweather.h b/libgweather/gweather.h
index de5c89d..c3a7989 100644
--- a/libgweather/gweather.h
+++ b/libgweather/gweather.h
@@ -28,6 +28,7 @@
 #include <libgweather/gweather-location.h>
 #include <libgweather/gweather-timezone.h>
 #include <libgweather/gweather-weather.h>
-#include <libgweather/location-entry.h>
+#include <libgweather/gweather-location-entry.h>
+#include <libgweather/gweather-timezone-menu.h>
 
 #endif /* __GWEATHER_H__ */
diff --git a/libgweather/test_locations.c b/libgweather/test_locations.c
index 40d1b94..400c443 100644
--- a/libgweather/test_locations.c
+++ b/libgweather/test_locations.c
@@ -1,7 +1,7 @@
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "location-entry.h"
-#include "timezone-menu.h"
+#include "gweather-location-entry.h"
+#include "gweather-timezone-menu.h"
 
 static void
 deleted (GtkWidget *widget, GdkEvent *event, gpointer data)
diff --git a/libgweather/test_metar.c b/libgweather/test_metar.c
index 5ea4435..7b00c37 100644
--- a/libgweather/test_metar.c
+++ b/libgweather/test_metar.c
@@ -7,7 +7,7 @@
 #include <string.h>
 #include <stdio.h>
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
+#include "gweather-private.h"
 
 #ifndef BUFLEN
 #define BUFLEN 4096
diff --git a/libgweather/test_sun_moon.c b/libgweather/test_sun_moon.c
index f39f62a..9ebfe4b 100644
--- a/libgweather/test_sun_moon.c
+++ b/libgweather/test_sun_moon.c
@@ -5,7 +5,7 @@
 #include <time.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
+#include "gweather-private.h"
 
 int
 main (int argc, char **argv)
diff --git a/libgweather/weather-iwin.c b/libgweather/weather-iwin.c
index 1bc60f5..b1ebd26 100644
--- a/libgweather/weather-iwin.c
+++ b/libgweather/weather-iwin.c
@@ -27,7 +27,7 @@
 #include <libxml/parser.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
+#include "gweather-private.h"
 
 static gboolean
 hasAttr (xmlNode *node, const char *attr_name, const char *attr_value)
diff --git a/libgweather/weather-metar.c b/libgweather/weather-metar.c
index d808e43..89ed00e 100644
--- a/libgweather/weather-metar.c
+++ b/libgweather/weather-metar.c
@@ -26,7 +26,7 @@
 #include <regex.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
+#include "gweather-private.h"
 
 enum {
     TIME_RE,
diff --git a/libgweather/weather-moon.c b/libgweather/weather-moon.c
index 222eef4..8ad09d4 100644
--- a/libgweather/weather-moon.c
+++ b/libgweather/weather-moon.c
@@ -36,7 +36,7 @@
 #include <glib.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
+#include "gweather-private.h"
 
 /*
  * Elements of the Moon's orbit, epoch 2000 Jan 1.5
diff --git a/libgweather/weather-owm.c b/libgweather/weather-owm.c
index 065fd6c..5a1fc66 100644
--- a/libgweather/weather-owm.c
+++ b/libgweather/weather-owm.c
@@ -36,7 +36,7 @@
 #include <libxml/xpathInternals.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
+#include "gweather-private.h"
 
 #define XC(t) ((const xmlChar *)(t))
 
diff --git a/libgweather/weather-sun.c b/libgweather/weather-sun.c
index 7874fbe..bd0bd04 100644
--- a/libgweather/weather-sun.c
+++ b/libgweather/weather-sun.c
@@ -33,7 +33,7 @@
 #include <glib.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
+#include "gweather-private.h"
 
 #define ECCENTRICITY(d)         (0.01671123 - (d)/36525.*0.00004392)
 
diff --git a/libgweather/weather-wx.c b/libgweather/weather-wx.c
index 2701dce..abc77e0 100644
--- a/libgweather/weather-wx.c
+++ b/libgweather/weather-wx.c
@@ -21,7 +21,7 @@
 #endif
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
+#include "gweather-private.h"
 
 static void
 wx_finish (SoupSession *session, SoupMessage *msg, gpointer data)
diff --git a/libgweather/weather-yahoo.c b/libgweather/weather-yahoo.c
index 06fc1d9..0c7d598 100644
--- a/libgweather/weather-yahoo.c
+++ b/libgweather/weather-yahoo.c
@@ -35,7 +35,7 @@
 #include <libxml/xpathInternals.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
+#include "gweather-private.h"
 
 #define XC(t) ((const xmlChar *)(t))
 
diff --git a/libgweather/weather-yrno.c b/libgweather/weather-yrno.c
index dbf747d..d2fe179 100644
--- a/libgweather/weather-yrno.c
+++ b/libgweather/weather-yrno.c
@@ -35,7 +35,7 @@
 #include <libxml/xpathInternals.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include "weather-priv.h"
+#include "gweather-private.h"
 
 #define XC(t) ((const xmlChar *)(t))
 
diff --git a/po-locations/POTFILES.skip b/po-locations/POTFILES.skip
index b63fc8f..ed965e6 100644
--- a/po-locations/POTFILES.skip
+++ b/po-locations/POTFILES.skip
@@ -5,17 +5,17 @@ libgweather/gweather.pc
 libgweather/gweather.pc.in
 libgweather/gweather-location.c
 libgweather/gweather-timezone.c
-libgweather/parser.c
+libgweather/gweather-parser.c
 libgweather/test_metar.c
-libgweather/timezone-menu.c
+libgweather/gweather-timezone-menu.c
 libgweather/weather-bom.c
-libgweather/weather.c
-libgweather/weather.h
+libgweather/gweather-weather.c
+libgweather/gweather-weather.h
 libgweather/weather-iwin.c
 libgweather/weather-metar.c
 libgweather/weather-met.c
 libgweather/weather-owm.c
-libgweather/weather-priv.h
+libgweather/gweather-private.h
 libgweather/weather-sun.c
 libgweather/weather-wx.c
 libgweather/weather-yrno.c
diff --git a/po/POTFILES.in b/po/POTFILES.in
index d8515da..0d483b1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,9 +5,9 @@
 data/glade/libgweather.xml.in
 libgweather/gweather-location.c
 libgweather/gweather-timezone.c
-libgweather/parser.c
-libgweather/timezone-menu.c
-libgweather/weather.c
+libgweather/gweather-parser.c
+libgweather/gweather-timezone-menu.c
+libgweather/gweather-weather.c
 libgweather/weather-iwin.c
 libgweather/weather-metar.c
 libgweather/weather-owm.c


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