aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-01-20 03:38:58 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-01-20 03:38:58 +0800
commit7f0d04dd7a82446bd7ad9273f47358f8ad1fb7a4 (patch)
tree0eaf4bd4f3e8e93009f59344779a4270b73a4c40
parent3c4559b613835540b2ff7eb9e4a0008766dae607 (diff)
downloadgsoc2013-evolution-7f0d04dd7a82446bd7ad9273f47358f8ad1fb7a4.tar
gsoc2013-evolution-7f0d04dd7a82446bd7ad9273f47358f8ad1fb7a4.tar.gz
gsoc2013-evolution-7f0d04dd7a82446bd7ad9273f47358f8ad1fb7a4.tar.bz2
gsoc2013-evolution-7f0d04dd7a82446bd7ad9273f47358f8ad1fb7a4.tar.lz
gsoc2013-evolution-7f0d04dd7a82446bd7ad9273f47358f8ad1fb7a4.tar.xz
gsoc2013-evolution-7f0d04dd7a82446bd7ad9273f47358f8ad1fb7a4.tar.zst
gsoc2013-evolution-7f0d04dd7a82446bd7ad9273f47358f8ad1fb7a4.zip
handle the case where we have a bogus uid
2004-01-19 JP Rosevear <jpr@ximian.com> * gui/tasks-component.c (update_primary_selection): handle the case where we have a bogus uid * gui/calendar-component.c (update_primary_selection): ditto svn path=/trunk/; revision=24313
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/calendar-component.c6
-rw-r--r--calendar/gui/tasks-component.c4
3 files changed, 13 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 7d14f2df96..c853d3ca20 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-19 JP Rosevear <jpr@ximian.com>
+
+ * gui/tasks-component.c (update_primary_selection): handle the
+ case where we have a bogus uid
+
+ * gui/calendar-component.c (update_primary_selection): ditto
+
2004-01-19 Radek Doulik <rodo@ximian.com>
* gui/print.c (print_day_add_event): uncomment and use
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 2158f2a32d..58e82057cd 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -209,7 +209,7 @@ static void
update_primary_selection (CalendarComponent *calendar_component)
{
CalendarComponentPrivate *priv;
- ESource *source;
+ ESource *source = NULL;
char *uid;
priv = calendar_component->priv;
@@ -218,11 +218,11 @@ update_primary_selection (CalendarComponent *calendar_component)
if (uid) {
source = e_source_list_peek_source_by_uid (priv->source_list, uid);
g_free (uid);
+ }
+ if (source) {
e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (priv->source_selector), source);
} else {
- ESource *source;
-
/* Try to create a default if there isn't one */
source = e_source_list_peek_source_any (priv->source_list);
if (source)
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index a2d39a0ce9..0670d0ecb8 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -251,7 +251,7 @@ static void
update_primary_selection (TasksComponent *component)
{
TasksComponentPrivate *priv;
- ESource *source;
+ ESource *source = NULL;
char *uid;
priv = component->priv;
@@ -260,7 +260,9 @@ update_primary_selection (TasksComponent *component)
if (uid) {
source = e_source_list_peek_source_by_uid (priv->source_list, uid);
g_free (uid);
+ }
+ if (source) {
e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (priv->source_selector), source);
} else {
ESource *source;