[Xfce4-commits] <xfce4-weather-plugin:master> Replace icon "99" with "NODATA".
Harald Judt
noreply at xfce.org
Fri Jul 13 16:50:27 CEST 2012
Updating branch refs/heads/master
to 8436eb11880c07487c9b34e8eb00f91aa78e7735 (commit)
from 30ac02269b70bda168c7ac9e24856d4cf4ae3b82 (commit)
commit 8436eb11880c07487c9b34e8eb00f91aa78e7735
Author: Harald Judt <h.judt at gmx.at>
Date: Fri Jul 13 16:16:58 2012 +0200
Replace icon "99" with "NODATA".
icons/liquid/Makefile.am | 2 +-
icons/liquid/{99.png => NODATA.png} | Bin 6724 -> 6724 bytes
panel-plugin/weather-icon.c | 7 ++++---
panel-plugin/weather.c | 10 +++++-----
4 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/icons/liquid/Makefile.am b/icons/liquid/Makefile.am
index 4910ee6..7ebf043 100644
--- a/icons/liquid/Makefile.am
+++ b/icons/liquid/Makefile.am
@@ -1,6 +1,6 @@
liquiddir = $(datadir)/xfce4/weather/icons/liquid
-liquid_DATA = 99.png \
+liquid_DATA = NODATA.png \
CLOUD.png \
FOG.png \
LIGHTCLOUD.png \
diff --git a/icons/liquid/99.png b/icons/liquid/NODATA.png
similarity index 100%
rename from icons/liquid/99.png
rename to icons/liquid/NODATA.png
diff --git a/panel-plugin/weather-icon.c b/panel-plugin/weather-icon.c
index 6aaf75c..47b888c 100644
--- a/panel-plugin/weather-icon.c
+++ b/panel-plugin/weather-icon.c
@@ -26,6 +26,7 @@
#include "weather-icon.h"
#define DEFAULT_W_THEME "liquid"
+#define NODATA "NODATA"
const gchar *night_symbols[] = {
"CLOUD",
@@ -49,7 +50,7 @@ get_icon (const gchar *number,
guint i;
if (number == NULL || strlen(number) == 0)
- number = "99";
+ number = NODATA;
else if (night)
{
number_len = strlen(number);
@@ -74,9 +75,9 @@ get_icon (const gchar *number,
if (G_UNLIKELY (!image)) {
g_warning ("Unable to open image: %s", filename);
- if (number && strcmp(number, "99")) {
+ if (number && strcmp(number, NODATA)) {
g_free(filename);
- return get_icon("99", size, FALSE);
+ return get_icon(NULL, size, FALSE);
}
}
g_free (filename);
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index e3c8c03..a216f26 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -240,14 +240,14 @@ set_icon_error (xfceweather_data *data)
/* make icon double-size in deskbar mode */
if (data->panel_orientation == XFCE_PANEL_PLUGIN_MODE_DESKBAR
&& data->size != data->panel_size)
- icon = get_icon ("99", data->size * 2, FALSE);
+ icon = get_icon (NULL, data->size * 2, FALSE);
else
- icon = get_icon ("99", data->size, FALSE);
+ icon = get_icon (NULL, data->size, FALSE);
#else
if (data->panel_orientation == GTK_ORIENTATION_VERTICAL)
- icon = get_icon ("99", data->size - height - 2, FALSE);
+ icon = get_icon (NULL, data->size - height - 2, FALSE);
else
- icon = get_icon ("99", data->size, FALSE);
+ icon = get_icon (NULL, data->size, FALSE);
#endif
gtk_image_set_from_pixbuf (GTK_IMAGE (data->iconimage), icon);
@@ -910,7 +910,7 @@ xfceweather_create_control (XfcePanelPlugin *plugin)
data->scrollbox = gtk_scrollbox_new ();
data->size = xfce_panel_plugin_get_size (plugin);
- icon = get_icon ("99", 16, FALSE);
+ icon = get_icon (NULL, 16, FALSE);
data->iconimage = gtk_image_new_from_pixbuf (icon);
if (G_LIKELY (icon))
More information about the Xfce4-commits
mailing list