diff options
author | Larry Ewing <lewing@src.gnome.org> | 2004-05-05 04:40:43 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2004-05-05 04:40:43 +0800 |
commit | 7844d71521c917e28a0aa369f7881aeab9820604 (patch) | |
tree | 53c0f9537cf9eec3b0c5ffc38b03f3f7a9b96b24 | |
parent | 6483eee0caca26f1e25039ee5f341e1444b3c335 (diff) | |
download | gsoc2013-evolution-7844d71521c917e28a0aa369f7881aeab9820604.tar.gz gsoc2013-evolution-7844d71521c917e28a0aa369f7881aeab9820604.tar.zst gsoc2013-evolution-7844d71521c917e28a0aa369f7881aeab9820604.zip |
(source_group_can_add): helper function to fix groupwise case.
I'm still not happy with this but it will work for now.
svn path=/trunk/; revision=25793
-rw-r--r-- | calendar/ChangeLog | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/calendar-setup.c | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index ce249b3f69..6e4ed7f378 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,6 +1,8 @@ 2004-05-04 Larry Ewing <lewing@ximian.com> * gui/dialogs/calendar-setup.c: fix logic error. + (source_group_can_add): helper function to fix groupwise case. + I'm still not happy with this but it will work for now. * gui/dialogs/calendar-setup.c (source_to_dialog): convert units. (dialog_to_source): convert time units. diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index 7b5016788b..f2a8db178d 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -196,6 +196,27 @@ validate_remote_uri (const gchar *source_location, gboolean interactive, GtkWidg return TRUE; } +static gboolean +source_group_can_add (ESourceGroup *source_group) +{ + gboolean can_add; + EUri *uri; + + can_add = !e_source_group_is_readonly (source_group); + + if (can_add) { + uri = e_uri_new (e_source_group_peek_base_uri (source_group)); + + if (uri && uri->protocol && uri->protocol [0] && strcmp (uri->protocol, "groupwise")) + can_add = FALSE; + + if (uri) + e_uri_free (uri); + } + + return can_add; +} + static int source_group_menu_add_groups (GtkMenuShell *menu_shell, ESourceList *source_list) { @@ -209,7 +230,7 @@ source_group_menu_add_groups (GtkMenuShell *menu_shell, ESourceList *source_list menu_item = gtk_menu_item_new_with_label (e_source_group_peek_name (group)); gtk_widget_show (menu_item); - if (e_source_group_get_readonly(group)) + if (source_group_can_add (group)) gtk_widget_set_sensitive(menu_item, FALSE); else if (i == -1) index = i; |