[Xfce4-commits] [panel-plugins/xfce4-weather-plugin] 18/25: Debug builds now at 100%
noreply at xfce.org
noreply at xfce.org
Mon Sep 17 00:14:15 CEST 2018
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-weather-plugin.
commit e649cb4fba27430a1c76bcdf5b83d37cc59539ed
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Sep 13 06:31:36 2018 -0400
Debug builds now at 100%
---
panel-plugin/weather-data.c | 2 +-
panel-plugin/weather-icon.c | 34 ++++++++++++++++++++++++++++++++++
panel-plugin/weather-icon.h | 29 ++---------------------------
3 files changed, 37 insertions(+), 28 deletions(-)
diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c
index 1878a60..3b23a21 100644
--- a/panel-plugin/weather-data.c
+++ b/panel-plugin/weather-data.c
@@ -613,7 +613,7 @@ calculate_symbol(xml_time *timeslice,
/* update symbol name */
g_free(loc->symbol);
- loc->symbol = g_strdup(symbol_names[loc->symbol_id]);
+ loc->symbol = g_strdup(get_symbol_name(loc->symbol_id));
}
diff --git a/panel-plugin/weather-icon.c b/panel-plugin/weather-icon.c
index dac5248..49a2f59 100644
--- a/panel-plugin/weather-icon.c
+++ b/panel-plugin/weather-icon.c
@@ -36,6 +36,40 @@
#define ICON_DIR_BIG "128"
+static const gchar *symbol_names[] = {
+ "NODATA",
+ "SUN",
+ "LIGHTCLOUD",
+ "PARTLYCLOUD",
+ "CLOUD",
+ "LIGHTRAINSUN",
+ "LIGHTRAINTHUNDERSUN",
+ "SLEETSUN",
+ "SNOWSUN",
+ "LIGHTRAIN",
+ "RAIN",
+ "RAINTHUNDER",
+ "SLEET",
+ "SNOW",
+ "SNOWTHUNDER",
+ "FOG",
+ "SUN",
+ "LIGHTCLOUD",
+ "LIGHTRAINSUN",
+ "SNOWSUN",
+ "SLEETSUNTHUNDER",
+ "SNOWSUNTHUNDER",
+ "LIGHTRAINTHUNDER",
+ "SLEETTHUNDER"
+};
+
+
+const gchar *get_symbol_name(gint idx)
+{
+ return symbol_names[idx];
+}
+
+
static gboolean
icon_missing(const icon_theme *theme,
const gchar *sizedir,
diff --git a/panel-plugin/weather-icon.h b/panel-plugin/weather-icon.h
index 6232b12..409c7c6 100644
--- a/panel-plugin/weather-icon.h
+++ b/panel-plugin/weather-icon.h
@@ -49,33 +49,6 @@ typedef enum {
SYMBOL_COUNT
} symbol_ids;
-static const gchar *symbol_names[] = {
- "NODATA",
- "SUN",
- "LIGHTCLOUD",
- "PARTLYCLOUD",
- "CLOUD",
- "LIGHTRAINSUN",
- "LIGHTRAINTHUNDERSUN",
- "SLEETSUN",
- "SNOWSUN",
- "LIGHTRAIN",
- "RAIN",
- "RAINTHUNDER",
- "SLEET",
- "SNOW",
- "SNOWTHUNDER",
- "FOG",
- "SUN",
- "LIGHTCLOUD",
- "LIGHTRAINSUN",
- "SNOWSUN",
- "SLEETSUNTHUNDER",
- "SNOWSUNTHUNDER",
- "LIGHTRAINTHUNDER",
- "SLEETTHUNDER"
-};
-
typedef struct {
gchar *dir;
gchar *name;
@@ -103,6 +76,8 @@ icon_theme *icon_theme_copy(icon_theme *src);
void icon_theme_free(icon_theme *theme);
+const gchar *get_symbol_name (gint idx);
+
G_END_DECLS
#endif
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list