aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2006-08-22 18:24:31 +0800
committerKjartan Maraas <kmaraas@src.gnome.org>2006-08-22 18:24:31 +0800
commit9de0b61f706f8ec51cd60059fbb04c5cda3c235c (patch)
treec9c6dd2d3e6e1f3dfddc6ac165289ac405c9ca62 /calendar
parent41a4ef665287d566fbb4de0d96ec148a0750bf24 (diff)
downloadgsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar.gz
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar.bz2
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar.lz
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar.xz
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar.zst
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.zip
Plug a leak. Same thing here.
2006-08-22 Kjartan Maraas <kmaraas@gnome.org> * gui/calendar-component.c (ensure_sources): Plug a leak. * gui/migration.c (create_calendar_sources): Same thing here. svn path=/trunk/; revision=32625
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/calendar-component.c9
-rw-r--r--calendar/gui/migration.c7
3 files changed, 16 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 8499f32327..f5b38017b4 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-22 Kjartan Maraas <kmaraas@gnome.org>
+
+ * gui/calendar-component.c (ensure_sources): Plug a leak.
+ * gui/migration.c (create_calendar_sources): Same thing here.
+
2006-08-21 Chenthill Palanisamy <pchenthill@novell.com>
Fixes #346549
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index c4c48f22fb..271f0845fd 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -235,11 +235,13 @@ ensure_sources (CalendarComponent *component)
}
if (!personal_source) {
+ char *primary_calendar = calendar_config_get_primary_calendar();
+
/* Create the default Person addressbook */
personal_source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (on_this_computer, personal_source, -1);
-
- if (!calendar_config_get_primary_calendar () && !calendar_config_get_calendars_selected ()) {
+
+ if (!primary_calendar && !calendar_config_get_calendars_selected ()) {
GSList selected;
calendar_config_set_primary_calendar (e_source_peek_uid (personal_source));
@@ -248,7 +250,8 @@ ensure_sources (CalendarComponent *component)
selected.next = NULL;
calendar_config_set_calendars_selected (&selected);
}
-
+
+ g_free (primary_calendar);
e_source_set_color (personal_source, 0xBECEDD);
}
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
index 1cc2a0c169..543a5891cc 100644
--- a/calendar/gui/migration.c
+++ b/calendar/gui/migration.c
@@ -478,11 +478,13 @@ create_calendar_sources (CalendarComponent *component,
}
if (!*personal_source) {
+ char *primary_calendar = calendar_config_get_primary_calendar ();
+
/* Create the default Person calendar */
ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (*on_this_computer, source, -1);
- if (!calendar_config_get_primary_calendar () && !calendar_config_get_calendars_selected ()) {
+ if (!primary_calendar && !calendar_config_get_calendars_selected ()) {
GSList selected;
calendar_config_set_primary_calendar (e_source_peek_uid (source));
@@ -491,7 +493,8 @@ create_calendar_sources (CalendarComponent *component,
selected.next = NULL;
calendar_config_set_calendars_selected (&selected);
}
-
+
+ g_free (primary_calendar);
e_source_set_color (source, 0xBECEDD);
*personal_source = source;
}