[libgweather] Fix compiler warnings
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather] Fix compiler warnings
- Date: Mon, 16 Sep 2013 17:04:17 +0000 (UTC)
commit f3cdb38959a0263fa2d8f9c1fdeaad982606b1c0
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sun Sep 8 18:35:36 2013 +0200
Fix compiler warnings
And consistenly use glib gettext macros
libgweather/weather-priv.h | 6 +-----
libgweather/weather.c | 17 ++---------------
2 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/libgweather/weather-priv.h b/libgweather/weather-priv.h
index 01d81c5..c9e4b73 100644
--- a/libgweather/weather-priv.h
+++ b/libgweather/weather-priv.h
@@ -26,6 +26,7 @@
#include <math.h>
#include <gio/gio.h>
#include <libsoup/soup.h>
+#include <glib/gi18n-lib.h>
#include "gweather-weather.h"
#include "gweather-location.h"
@@ -34,12 +35,7 @@
#include "gweather-win32.h"
#endif
-const char *gweather_gettext (const char *str) G_GNUC_FORMAT (1);
-const char *gweather_dpgettext (const char *context, const char *str) G_GNUC_FORMAT (2);
void _gweather_gettext_init (void);
-#define _(str) (gweather_gettext (str))
-#define C_(context, str) (gweather_dpgettext (context, str))
-#define N_(str) (str)
struct _GWeatherLocation {
char *name, *msgctxt, *sort_name;
diff --git a/libgweather/weather.c b/libgweather/weather.c
index d8e6399..b847e3a 100644
--- a/libgweather/weather.c
+++ b/libgweather/weather.c
@@ -98,21 +98,6 @@ _gweather_gettext_init (void)
}
}
-const char *
-gweather_gettext (const char *str)
-{
- _gweather_gettext_init ();
- return dgettext (GETTEXT_PACKAGE, str);
-}
-
-const char *
-gweather_dpgettext (const char *context,
- const char *str)
-{
- _gweather_gettext_init ();
- return g_dpgettext2 (GETTEXT_PACKAGE, context, str);
-}
-
static void
_weather_location_free (WeatherLocation *location)
{
@@ -2167,6 +2152,8 @@ gweather_info_class_init (GWeatherInfoClass *klass)
NULL, /* accu_data */
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+
+ _gweather_gettext_init ();
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]