aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/calendar-weather
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-12 11:19:03 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-12 11:19:03 +0800
commite68456f60f37d5d6e18fac95a5a9ddea2e9627fa (patch)
treea45843764cfee8994cf540bf703250120b5e4a9a /plugins/calendar-weather
parent5e31896863e915fb2a7f613c029fb91aeaa2e42c (diff)
downloadgsoc2013-evolution-e68456f60f37d5d6e18fac95a5a9ddea2e9627fa.tar
gsoc2013-evolution-e68456f60f37d5d6e18fac95a5a9ddea2e9627fa.tar.gz
gsoc2013-evolution-e68456f60f37d5d6e18fac95a5a9ddea2e9627fa.tar.bz2
gsoc2013-evolution-e68456f60f37d5d6e18fac95a5a9ddea2e9627fa.tar.lz
gsoc2013-evolution-e68456f60f37d5d6e18fac95a5a9ddea2e9627fa.tar.xz
gsoc2013-evolution-e68456f60f37d5d6e18fac95a5a9ddea2e9627fa.tar.zst
gsoc2013-evolution-e68456f60f37d5d6e18fac95a5a9ddea2e9627fa.zip
Get the calendar-weather plugin working.
Diffstat (limited to 'plugins/calendar-weather')
-rw-r--r--plugins/calendar-weather/Makefile.am14
-rw-r--r--plugins/calendar-weather/calendar-weather.c16
2 files changed, 12 insertions, 18 deletions
diff --git a/plugins/calendar-weather/Makefile.am b/plugins/calendar-weather/Makefile.am
index 0f3daf774b..484adf71e9 100644
--- a/plugins/calendar-weather/Makefile.am
+++ b/plugins/calendar-weather/Makefile.am
@@ -1,12 +1,12 @@
eds_datadir = `pkg-config --variable=privdatadir evolution-data-server-1.2`
-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@
diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c
index 22fb4946f3..b49726a57a 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,7 +41,7 @@ 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);
+void e_calendar_weather_migrate (EPlugin *epl, ECalEventTargetBackend *data);
gint e_plugin_lib_enable (EPluginLib *epl, gint enable);
#define WEATHER_BASE_URI "weather://"
@@ -93,21 +92,16 @@ exit:
}
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;
@@ -121,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;
}
@@ -129,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