aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/calendar-weather
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/calendar-weather')
-rw-r--r--plugins/calendar-weather/Makefile.am24
-rw-r--r--plugins/calendar-weather/calendar-weather.c45
-rw-r--r--plugins/calendar-weather/category_weather_cloudy_16.pngbin597 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_fog_16.pngbin217 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_partly_cloudy_16.pngbin760 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_rain_16.pngbin647 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_snow_16.pngbin624 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_sun_16.pngbin420 -> 0 bytes
-rw-r--r--plugins/calendar-weather/category_weather_tstorm_16.pngbin728 -> 0 bytes
9 files changed, 25 insertions, 44 deletions
diff --git a/plugins/calendar-weather/Makefile.am b/plugins/calendar-weather/Makefile.am
index 360555810a..484adf71e9 100644
--- a/plugins/calendar-weather/Makefile.am
+++ b/plugins/calendar-weather/Makefile.am
@@ -1,26 +1,16 @@
eds_datadir = `pkg-config --variable=privdatadir evolution-data-server-1.2`
-weatherdatadir = $(datadir)/evolution/$(BASE_VERSION)/weather
-AM_CPPFLAGS = \
- -I$(top_srcdir) \
- -I$(top_builddir)/shell \
- $(EVOLUTION_CALENDAR_CFLAGS) \
- $(SOURCE_SEL_CFLAGS) \
- -DWEATHER_DATADIR=\""$(weatherdatadir)"\" \
- -DWEATHER_EDS_DATADIR=\""$(eds_datadir)/weather"\" \
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/widgets \
+ $(EVOLUTION_CALENDAR_CFLAGS) \
+ $(SOURCE_SEL_CFLAGS) \
+ -DWEATHER_DATADIR=\""$(weatherdatadir)"\" \
+ -DWEATHER_EDS_DATADIR=\""$(eds_datadir)/weather"\" \
$(LIBGWEATHER_CFLAGS)
@EVO_PLUGIN_RULE@
-weatherdata_DATA = \
- category_weather_cloudy_16.png \
- category_weather_fog_16.png \
- category_weather_partly_cloudy_16.png \
- category_weather_rain_16.png \
- category_weather_snow_16.png \
- category_weather_sun_16.png \
- category_weather_tstorm_16.png
-
plugin_DATA = org-gnome-calendar-weather.eplug
plugin_LTLIBRARIES = liborg-gnome-calendar-weather.la
diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c
index cacc7e00fa..b558f7e3d2 100644
--- a/plugins/calendar-weather/calendar-weather.c
+++ b/plugins/calendar-weather/calendar-weather.c
@@ -24,7 +24,6 @@
#include "e-util/e-icon-factory.h"
#include <calendar/gui/e-cal-config.h>
#include <calendar/gui/e-cal-event.h>
-#include <calendar/gui/calendar-component.h>
#include <libedataserver/e-source.h>
#include <libedataserver/e-url.h>
#include <libedataserver/e-categories.h>
@@ -42,17 +41,17 @@ GtkWidget *e_calendar_weather_location (EPlugin *epl, EConfigHookItemFactoryData
GtkWidget *e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data);
GtkWidget *e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data);
gboolean e_calendar_weather_check (EPlugin *epl, EConfigHookPageCheckData *data);
-void e_calendar_weather_migrate (EPlugin *epl, ECalEventTargetComponent *data);
-gint e_plugin_lib_enable (EPluginLib *epl, gint enable);
+void e_calendar_weather_migrate (EPlugin *epl, ECalEventTargetBackend *data);
+gint e_plugin_lib_enable (EPlugin *epl, gint enable);
#define WEATHER_BASE_URI "weather://"
gint
-e_plugin_lib_enable (EPluginLib *epl, gint enable)
+e_plugin_lib_enable (EPlugin *epl, gint enable)
{
GList *l;
- gboolean found = FALSE;
const gchar *tmp;
+ gint ii;
static struct {
const gchar *description;
@@ -74,43 +73,35 @@ e_plugin_lib_enable (EPluginLib *epl, gint enable)
/* Add the categories icons if we don't have them. */
for (l = e_categories_get_list (); l; l = g_list_next (l)) {
- if (!strcmp ((const gchar *)l->data, tmp)) {
- found = TRUE;
- break;
- }
+ if (!strcmp ((const gchar *)l->data, tmp))
+ goto exit;
}
- if (!found) {
- gint i;
-
- for (i = 0; categories[i].description; i++) {
- gchar *filename;
+ for (ii = 0; categories[ii].description; ii++) {
+ gchar *filename;
- filename = e_icon_factory_get_icon_filename (categories[i].icon_name, GTK_ICON_SIZE_MENU);
- e_categories_add (_(categories[i].description), NULL, filename, FALSE);
- g_free (filename);
- }
+ filename = e_icon_factory_get_icon_filename (
+ categories[ii].icon_name, GTK_ICON_SIZE_MENU);
+ e_categories_add (
+ _(categories[ii].description), NULL, filename, FALSE);
+ g_free (filename);
}
+exit:
return 0;
}
void
-e_calendar_weather_migrate (EPlugin *epl, ECalEventTargetComponent *data)
+e_calendar_weather_migrate (EPlugin *epl, ECalEventTargetBackend *data)
{
/* Perform a migration step here. This allows us to keep the weather calendar completely
* separate from evolution. If the plugin isn't built, the weather source group won't
* show up in the user's evolution. If it is, this will create it if it doesn't exist */
- CalendarComponent *component;
- ESourceList *source_list;
ESourceGroup *group;
GSList *groups;
ESourceGroup *weather = NULL;
- component = data->component;
- source_list = calendar_component_peek_source_list (component);
-
- groups = e_source_list_peek_groups (source_list);
+ groups = e_source_list_peek_groups (data->source_list);
if (groups) {
/* groups are already there, we need to search */
GSList *g;
@@ -124,7 +115,7 @@ e_calendar_weather_migrate (EPlugin *epl, ECalEventTargetComponent *data)
if (!weather) {
group = e_source_group_new (_("Weather"), WEATHER_BASE_URI);
- e_source_list_add_group (source_list, group, -1);
+ e_source_list_add_group (data->source_list, group, -1);
weather = group;
}
@@ -132,7 +123,7 @@ e_calendar_weather_migrate (EPlugin *epl, ECalEventTargetComponent *data)
if (weather)
g_object_unref (weather);
- e_source_list_sync (source_list, NULL);
+ e_source_list_sync (data->source_list, NULL);
}
static void
diff --git a/plugins/calendar-weather/category_weather_cloudy_16.png b/plugins/calendar-weather/category_weather_cloudy_16.png
deleted file mode 100644
index ddb3ba7c59..0000000000
--- a/plugins/calendar-weather/category_weather_cloudy_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_fog_16.png b/plugins/calendar-weather/category_weather_fog_16.png
deleted file mode 100644
index 23e4e2f1d4..0000000000
--- a/plugins/calendar-weather/category_weather_fog_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_partly_cloudy_16.png b/plugins/calendar-weather/category_weather_partly_cloudy_16.png
deleted file mode 100644
index 472feaa654..0000000000
--- a/plugins/calendar-weather/category_weather_partly_cloudy_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_rain_16.png b/plugins/calendar-weather/category_weather_rain_16.png
deleted file mode 100644
index e00d5e1c82..0000000000
--- a/plugins/calendar-weather/category_weather_rain_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_snow_16.png b/plugins/calendar-weather/category_weather_snow_16.png
deleted file mode 100644
index 5e95985f5f..0000000000
--- a/plugins/calendar-weather/category_weather_snow_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_sun_16.png b/plugins/calendar-weather/category_weather_sun_16.png
deleted file mode 100644
index 780c61c23c..0000000000
--- a/plugins/calendar-weather/category_weather_sun_16.png
+++ /dev/null
Binary files differ
diff --git a/plugins/calendar-weather/category_weather_tstorm_16.png b/plugins/calendar-weather/category_weather_tstorm_16.png
deleted file mode 100644
index b2af092b53..0000000000
--- a/plugins/calendar-weather/category_weather_tstorm_16.png
+++ /dev/null
Binary files differ