diff options
author | Sivaiah Nallagatla <snallagatla@novell.com> | 2004-03-04 14:03:38 +0800 |
---|---|---|
committer | Sivaiah Nallagatla <siva@src.gnome.org> | 2004-03-04 14:03:38 +0800 |
commit | d1a4e3aa277d9cdd3c696af3ede9f206ce0f66f3 (patch) | |
tree | a1c0f43670a3e97aab849b8247fe40ec6eaa8421 | |
parent | f096c882c0d012b85bc8d3cb9104a2334488a667 (diff) | |
download | gsoc2013-evolution-d1a4e3aa277d9cdd3c696af3ede9f206ce0f66f3.tar gsoc2013-evolution-d1a4e3aa277d9cdd3c696af3ede9f206ce0f66f3.tar.gz gsoc2013-evolution-d1a4e3aa277d9cdd3c696af3ede9f206ce0f66f3.tar.bz2 gsoc2013-evolution-d1a4e3aa277d9cdd3c696af3ede9f206ce0f66f3.tar.lz gsoc2013-evolution-d1a4e3aa277d9cdd3c696af3ede9f206ce0f66f3.tar.xz gsoc2013-evolution-d1a4e3aa277d9cdd3c696af3ede9f206ce0f66f3.tar.zst gsoc2013-evolution-d1a4e3aa277d9cdd3c696af3ede9f206ce0f66f3.zip |
: maintain a list of only those source groups which are added to menu
2004-03-04 Sivaiah Nallagatla <snallagatla@novell.com>
* gui/component/addressbook-config.c :
(addressbook_add_server_druid) : maintain a list of only those source groups which are added to menu
instead of all
(source_group_changed_cb) : use the new list to get the selected group
(addressbook_source_dialog_destroy) : free the new list
svn path=/trunk/; revision=24958
-rw-r--r-- | addressbook/ChangeLog | 8 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-config.c | 17 |
2 files changed, 23 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index de932c1d76..712f6a5c67 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,11 @@ +2004-03-04 Sivaiah Nallagatla <snallagatla@novell.com> + + * gui/component/addressbook-config.c : + (addressbook_add_server_druid) : maintain a list of only those source groups which are added to menu + instead of all + (source_group_changed_cb) : use the new list to get the selected group + (addressbook_source_dialog_destroy) : free the new list + 2004-03-04 Not Zed <NotZed@Ximian.com> ** See #54991. diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index 9d4123034e..d0f75d303e 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -96,6 +96,7 @@ struct _AddressbookSourceDialog { /* Source selection (druid only) */ ESourceList *source_list; + GSList *menu_source_groups; GtkWidget *group_optionmenu; /* ESource we're currently editing (editor only) */ @@ -463,6 +464,8 @@ addressbook_source_dialog_destroy (gpointer data, GObject *where_object_was) AddressbookSourceDialog *dialog = data; g_object_unref (dialog->gui); + g_object_unref (dialog->source_list); + g_slist_free (dialog->menu_source_groups); g_free (dialog); } @@ -961,8 +964,8 @@ druid_folder_page_modify_cb (GtkWidget *item, AddressbookSourceDialog *dialog) static void source_group_changed_cb (GtkWidget *widget, AddressbookSourceDialog *sdialog) { - sdialog->source_group = g_slist_nth (e_source_list_peek_groups (sdialog->source_list), - gtk_option_menu_get_history (GTK_OPTION_MENU (sdialog->group_optionmenu)))->data; + sdialog->source_group = g_slist_nth (sdialog->menu_source_groups, + gtk_option_menu_get_history (GTK_OPTION_MENU (sdialog->group_optionmenu)))->data; } static void @@ -1019,6 +1022,7 @@ addressbook_add_server_druid (void) AddressbookSourceDialog *sdialog = g_new0 (AddressbookSourceDialog, 1); GtkWidget *page; GConfClient *gconf_client; + GSList *source_groups; sdialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL, NULL); @@ -1037,6 +1041,15 @@ addressbook_add_server_druid (void) gconf_client = gconf_client_get_default (); sdialog->source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/addressbook/sources"); + source_groups = e_source_list_peek_groups (sdialog->source_list); + sdialog->menu_source_groups = g_slist_copy (source_groups); +#ifndef HAVE_LDAP + for ( ; source_groups != NULL; source_groups = g_slist_next (source_groups)) + + if (!strcmp ("ldap://", e_source_group_peek_base_uri (source_groups->data))) + sdialog->menu_source_groups = g_slist_remove (sdialog->menu_source_groups, source_groups->data); +#endif + sdialog->group_optionmenu = glade_xml_get_widget (sdialog->gui, "druid-group-option-menu"); if (!GTK_IS_MENU (gtk_option_menu_get_menu (GTK_OPTION_MENU (sdialog->group_optionmenu)))) { GtkWidget *menu = gtk_menu_new (); |