diff options
author | Harish Krishnaswamy <kharish@novell.com> | 2006-06-15 00:13:51 +0800 |
---|---|---|
committer | Harish Krishnaswamy <kharish@src.gnome.org> | 2006-06-15 00:13:51 +0800 |
commit | 7b007f834dc12e0c1308ba23d90766e0e6112612 (patch) | |
tree | 772956e3c5543e5a3ec8f82ee28e164a74e45e0f /calendar | |
parent | cf8e3601fc54653eb38533318c8968b24d15ce32 (diff) | |
download | gsoc2013-evolution-7b007f834dc12e0c1308ba23d90766e0e6112612.tar gsoc2013-evolution-7b007f834dc12e0c1308ba23d90766e0e6112612.tar.gz gsoc2013-evolution-7b007f834dc12e0c1308ba23d90766e0e6112612.tar.bz2 gsoc2013-evolution-7b007f834dc12e0c1308ba23d90766e0e6112612.tar.lz gsoc2013-evolution-7b007f834dc12e0c1308ba23d90766e0e6112612.tar.xz gsoc2013-evolution-7b007f834dc12e0c1308ba23d90766e0e6112612.tar.zst gsoc2013-evolution-7b007f834dc12e0c1308ba23d90766e0e6112612.zip |
Remove GroupWise from the list Task ESource Groups as it supports a single
2006-06-14 Harish Krishnaswamy <kharish@novell.com>
* gui/dialogs/calendar-setup.c: (calendar_setup_edit_task_list):
Remove GroupWise from the list Task ESource Groups as it supports
a single Task list only. Fixes bug #176596 in bugzilla.novell.com.
svn path=/trunk/; revision=32143
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/dialogs/calendar-setup.c | 23 |
2 files changed, 27 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index bf963b7e57..d3d24c93be 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2006-06-14 Harish Krishnaswamy <kharish@novell.com> + + * gui/dialogs/calendar-setup.c: (calendar_setup_edit_task_list): + Remove GroupWise from the list Task ESource Groups as it supports + a single Task list only. Fixes bug #176596 in bugzilla.novell.com. + 2006-06-14 Aishwarya k <aishkalyan@gmail.com> *Fix for bug #339217 diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index e413856a31..4c79a1c34c 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -498,14 +498,33 @@ calendar_setup_edit_task_list (struct _GtkWindow *parent, ESource *source) e_source_set_color (sdialog->source, color); } else { GConfClient *gconf; - GSList *l; + GSList *l, *ptr, *temp = NULL; sdialog->source = e_source_new ("", ""); gconf = gconf_client_get_default (); sdialog->source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/tasks/sources"); l = e_source_list_peek_groups (sdialog->source_list); - sdialog->menu_source_groups = g_slist_copy(l); + /* Skip GW as it supports only one task list */ + ptr = l; + if (!strncmp (e_source_group_peek_base_uri ((ESourceGroup *)ptr->data), + "groupwise://", 12 )) { + l = l->next; + g_object_unref (ptr->data); + g_slist_free_1 (ptr); + } + for (ptr=l; ptr->next;) { + if (!strncmp (e_source_group_peek_base_uri ((ESourceGroup *)ptr->next->data), + "groupwise://", 12 )) { + temp = ptr->next; + ptr->next = temp->next; + g_object_unref (temp->data); + g_slist_free_1 (temp); + } else { + ptr = ptr->next; + } + } + sdialog->menu_source_groups = g_slist_copy(l); sdialog->source_group = (ESourceGroup *)sdialog->menu_source_groups->data; g_object_unref (gconf); } |