diff --git a/evolution-data-server-1.10.0-code-cleanup.patch b/evolution-data-server-1.10.0-code-cleanup.patch new file mode 100644 index 0000000..5baa59b --- /dev/null +++ b/evolution-data-server-1.10.0-code-cleanup.patch @@ -0,0 +1,1112 @@ +--- evolution-data-server-1.10.0/libedataserverui/e-name-selector-dialog.glade.code-cleanup 2007-01-03 05:09:27.000000000 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/e-name-selector-dialog.glade 2007-03-13 15:49:50.000000000 -0400 +@@ -118,7 +118,10 @@ + 0.5 + 0 + 0 +- optionmenu-category ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -127,23 +130,7 @@ + 2 + fill + +- +- +- +- +- +- True +- True +- 0 +- +- +- 1 +- 2 +- 1 +- 2 +- fill +- fill +- ++ + + + +@@ -229,6 +216,23 @@ + fill + + ++ ++ ++ ++ True ++ Any Category ++ False ++ True ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ fill ++ fill ++ ++ + + + 0 +--- evolution-data-server-1.10.0/libedataserverui/e-name-selector-list.c.code-cleanup 2007-01-03 05:09:27.000000000 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/e-name-selector-list.c 2007-03-13 15:49:50.000000000 -0400 +@@ -447,7 +447,7 @@ + + if (len > 1) { + menu_item = gtk_radio_menu_item_new_with_label (group, email); +- group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menu_item)); ++ group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item)); + g_signal_connect (menu_item, "toggled", G_CALLBACK (destination_set_email), destination); + } else { + menu_item = gtk_menu_item_new_with_label (email); +--- evolution-data-server-1.10.0/libedataserverui/e-name-selector-entry.c.code-cleanup 2007-01-03 05:09:27.000000000 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/e-name-selector-entry.c 2007-03-13 15:49:50.000000000 -0400 +@@ -2136,7 +2136,7 @@ + + if (len > 1) { + menu_item = gtk_radio_menu_item_new_with_label (group, email); +- group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menu_item)); ++ group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item)); + g_signal_connect (menu_item, "toggled", G_CALLBACK (destination_set_email), destination); + } else { + menu_item = gtk_menu_item_new_with_label (email); +--- evolution-data-server-1.10.0/libedataserverui/test-source-option-menu.c.code-cleanup 2007-01-03 05:09:27.000000000 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/test-source-option-menu.c 2007-03-13 15:49:50.000000000 -0400 +@@ -1,5 +1,5 @@ + /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +-/* test-source-option-menu.c - Test for ESourceOptionMenu. ++/* test-source-combo-box.c - Test for ESourceComboBox. + * + * Copyright (C) 2003 Novell, Inc. + * +@@ -24,17 +24,17 @@ + #include + #endif + +- +-#include "e-source-option-menu.h" ++#include "e-source-combo-box.h" + + #include + #include + + static void +-source_selected_callback (ESourceOptionMenu *menu, +- ESource *source, +- void *unused_data) ++source_changed_cb (ESourceComboBox *combo_box) + { ++ ESource *source; ++ ++ source = e_source_combo_box_get_active (combo_box); + g_print ("source selected: \"%s\"\n", e_source_peek_name (source)); + } + +@@ -43,7 +43,7 @@ + on_idle_create_widget (const char *gconf_path) + { + GtkWidget *window; +- GtkWidget *option_menu; ++ GtkWidget *combo_box; + ESourceList *source_list; + GConfClient *gconf_client; + +@@ -51,10 +51,12 @@ + source_list = e_source_list_new_for_gconf (gconf_client, gconf_path); + + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); +- option_menu = e_source_option_menu_new (source_list); +- g_signal_connect (option_menu, "source_selected", G_CALLBACK (source_selected_callback), NULL); ++ combo_box = e_source_combo_box_new (source_list); ++ g_signal_connect ( ++ combo_box, "changed", ++ G_CALLBACK (source_changed_cb), NULL); + +- gtk_container_add (GTK_CONTAINER (window), option_menu); ++ gtk_container_add (GTK_CONTAINER (window), combo_box); + gtk_widget_show_all (window); + + g_object_unref (gconf_client); +--- evolution-data-server-1.10.0/libedataserverui/e-source-option-menu.h.code-cleanup 2007-01-03 05:09:27.000000000 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/e-source-option-menu.h 2007-03-13 15:49:50.000000000 -0400 +@@ -23,6 +23,8 @@ + #ifndef _E_SOURCE_OPTION_MENU_H_ + #define _E_SOURCE_OPTION_MENU_H_ + ++#ifndef EDS_DISABLE_DEPRECATED ++ + #include + + #include +@@ -60,5 +62,6 @@ + void e_source_option_menu_select (ESourceOptionMenu *menu, + ESource *source); + ++#endif /* EDS_DISABLE_DEPRECATED */ + + #endif /* _E_SOURCE_OPTION_MENU_H_ */ +--- /dev/null 2007-03-08 09:20:11.212292094 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/e-source-combo-box.h 2007-03-13 15:49:50.000000000 -0400 +@@ -0,0 +1,79 @@ ++/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ ++/* e-source-combo-box.h ++ * ++ * Copyright (C) 2007 Novell, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of version 2 of the GNU Lesser General Public ++ * License as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this program; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++#ifndef _E_SOURCE_COMBO_BOX_H_ ++#define _E_SOURCE_COMBO_BOX_H_ ++ ++#include ++#include ++ ++#define E_TYPE_SOURCE_COMBO_BOX \ ++ (e_source_combo_box_get_type ()) ++#define E_SOURCE_COMBO_BOX(obj) \ ++ (G_TYPE_CHECK_INSTANCE_CAST \ ++ ((obj), E_TYPE_SOURCE_COMBO_BOX, ESourceComboBox)) ++#define E_SOURCE_COMBO_BOX_CLASS(cls) \ ++ (G_TYPE_CHECK_CLASS_CAST \ ++ ((cls), E_TYPE_SOURCE_COMBO_BOX, ESourceComboBoxClass)) ++#define E_IS_SOURCE_COMBO_BOX(obj) \ ++ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SOURCE_COMBO_BOX)) ++#define E_IS_SOURCE_COMBO_BOX_CLASS(cls) \ ++ (G_TYPE_CHECK_CLASS_TYPE ((cls), E_TYPE_SOURCE_COMBO_BOX)) ++#define E_SOURCE_COMBO_BOX_GET_CLASS(obj) \ ++ (G_TYPE_INSTANCE_GET_CLASS \ ++ ((obj), E_TYPE_SOURCE_COMBO_BOX, ESourceComboBox)) ++ ++G_BEGIN_DECLS ++ ++typedef struct _ESourceComboBox ESourceComboBox; ++typedef struct _ESourceComboBoxClass ESourceComboBoxClass; ++typedef struct _ESourceComboBoxPrivate ESourceComboBoxPrivate; ++ ++struct _ESourceComboBox { ++ GtkComboBox parent; ++ ++ ESourceComboBoxPrivate *priv; ++}; ++ ++struct _ESourceComboBoxClass { ++ GtkComboBoxClass parent_class; ++}; ++ ++GType e_source_combo_box_get_type (void); ++GtkWidget * e_source_combo_box_new (ESourceList *source_list); ++ESourceList * e_source_combo_box_get_source_list ++ (ESourceComboBox *source_combo_box); ++void e_source_combo_box_set_source_list ++ (ESourceComboBox *source_combo_box, ++ ESourceList *source_list); ++ESource * e_source_combo_box_get_active ++ (ESourceComboBox *source_combo_box); ++void e_source_combo_box_set_active ++ (ESourceComboBox *source_combo_box, ++ ESource *source); ++const gchar * e_source_combo_box_get_active_uid ++ (ESourceComboBox *source_combo_box); ++void e_source_combo_box_set_active_uid ++ (ESourceComboBox *source_combo_box, ++ const gchar *uid); ++ ++G_END_DECLS ++ ++#endif /* _E_SOURCE_COMBO_BOX_H_ */ +--- evolution-data-server-1.10.0/libedataserverui/Makefile.in.code-cleanup 2007-03-13 16:40:50.000000000 -0400 ++++ evolution-data-server-1.10.0/libedataserverui/Makefile.in 2007-03-13 16:41:45.000000000 -0400 +@@ -78,8 +78,8 @@ + e-name-selector-dialog.lo e-name-selector-entry.lo \ + e-name-selector-model.lo e-name-selector-list.lo \ + e-passwords.lo e-source-selector.lo \ +- e-source-selector-dialog.lo e-source-option-menu.lo \ +- e-tree-model-generator.lo ++ e-source-selector-dialog.lo e-source-combo-box.lo \ ++ e-source-option-menu.lo e-tree-model-generator.lo + libedataserverui_1_2_la_OBJECTS = \ + $(am_libedataserverui_1_2_la_OBJECTS) + PROGRAMS = $(noinst_PROGRAMS) +@@ -452,6 +452,7 @@ + e-passwords.c \ + e-source-selector.c \ + e-source-selector-dialog.c \ ++ e-source-combo-box.c \ + e-source-option-menu.c \ + e-tree-model-generator.c + +@@ -481,6 +482,7 @@ + e-passwords.h \ + e-source-selector.h \ + e-source-selector-dialog.h \ ++ e-source-combo-box.h \ + e-source-option-menu.h \ + e-tree-model-generator.h + +@@ -619,6 +621,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e-name-selector-model.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e-name-selector.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e-passwords.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e-source-combo-box.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e-source-option-menu.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e-source-selector-dialog.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e-source-selector.Plo@am__quote@ +--- evolution-data-server-1.10.0/libedataserverui/e-name-selector-dialog.h.code-cleanup 2007-01-03 05:09:27.000000000 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/e-name-selector-dialog.h 2007-03-13 15:49:50.000000000 -0400 +@@ -58,7 +58,6 @@ + /* Private */ + + EBook *pending_book; +- ESourceList *source_list; + ENameSelectorModel *name_selector_model; + GtkTreeModelSort *contact_sort; + +--- evolution-data-server-1.10.0/libedataserverui/Makefile.am.code-cleanup 2007-01-03 05:09:27.000000000 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/Makefile.am 2007-03-13 15:49:50.000000000 -0400 +@@ -31,6 +31,7 @@ + e-passwords.c \ + e-source-selector.c \ + e-source-selector-dialog.c \ ++ e-source-combo-box.c \ + e-source-option-menu.c \ + e-tree-model-generator.c + +@@ -63,6 +64,7 @@ + e-passwords.h \ + e-source-selector.h \ + e-source-selector-dialog.h \ ++ e-source-combo-box.h \ + e-source-option-menu.h \ + e-tree-model-generator.h + +--- evolution-data-server-1.10.0/libedataserverui/e-name-selector-dialog.c.code-cleanup 2007-03-13 15:49:50.000000000 -0400 ++++ evolution-data-server-1.10.0/libedataserverui/e-name-selector-dialog.c 2007-03-13 15:49:50.000000000 -0400 +@@ -32,7 +32,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -64,9 +64,8 @@ + guint destination_index; + }; + +-static ESource *find_first_source (ESourceList *source_list); + static void search_changed (ENameSelectorDialog *name_selector_dialog); +-static void source_selected (ENameSelectorDialog *name_selector_dialog, ESource *source); ++static void source_changed (ENameSelectorDialog *name_selector_dialog, ESourceComboBox *source_combo_box); + static void transfer_button_clicked (ENameSelectorDialog *name_selector_dialog, GtkButton *transfer_button); + static void contact_selection_changed (ENameSelectorDialog *name_selector_dialog); + static void setup_name_selector_model (ENameSelectorDialog *name_selector_dialog); +@@ -106,33 +105,28 @@ + { + } + +-/* FIXME: category_list should become part of ENameSelectorDialog structure */ +-GList *category_list; +- + static void + e_name_selector_dialog_populate_categories (ENameSelectorDialog *name_selector_dialog) + { +- GtkWidget *category_option_menu; +- GtkWidget *category_menu; +- GList *l; +- category_option_menu = glade_xml_get_widget (name_selector_dialog->gui, "optionmenu-category"); ++ GtkWidget *combo_box; ++ GList *category_list, *iter; + +- /* Categories are already sorted */ +- category_list = e_categories_get_list () ; +- category_list = g_list_prepend (category_list, _("Any Category")); +- +- category_menu = gtk_menu_new (); +- l = category_list; +- while (l) { +- GtkWidget *item; +- item = gtk_menu_item_new_with_label (l->data); +- gtk_menu_shell_append (GTK_MENU_SHELL (category_menu), item); +- l = l->next; +- } +- gtk_widget_show_all (category_menu); +- gtk_option_menu_set_menu (GTK_OPTION_MENU (category_option_menu), category_menu); +- +- g_signal_connect_swapped (category_option_menu, "changed", G_CALLBACK (search_changed), name_selector_dialog); ++ /* "Any Category" is preloaded. */ ++ combo_box = glade_xml_get_widget ( ++ name_selector_dialog->gui, "combobox-category"); ++ if (gtk_combo_box_get_active (GTK_COMBO_BOX (combo_box)) == -1) ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0); ++ ++ /* Categories are already sorted. */ ++ category_list = e_categories_get_list (); ++ for (iter = category_list; iter != NULL; iter = iter->next) ++ gtk_combo_box_append_text ( ++ GTK_COMBO_BOX (combo_box), iter->data); ++ g_list_free (category_list); ++ ++ g_signal_connect_swapped ( ++ combo_box, "changed", ++ G_CALLBACK (search_changed), name_selector_dialog); + } + + static void +@@ -223,34 +217,26 @@ + + name_selector_dialog->name_selector_model = e_name_selector_model_new (); + name_selector_dialog->sections = g_array_new (FALSE, FALSE, sizeof (Section)); +- name_selector_dialog->source_list = source_list; + + setup_name_selector_model (name_selector_dialog); + + /* Create source menu */ + +- widget = e_source_option_menu_new (name_selector_dialog->source_list); +- ++ widget = e_source_combo_box_new (source_list); ++ g_signal_connect_swapped ( ++ widget, "changed", ++ G_CALLBACK (source_changed), name_selector_dialog); ++ g_object_unref (source_list); ++ + gconf_client = gconf_client_get_default(); + uid = gconf_client_get_string (gconf_client, "/apps/evolution/addressbook/display/primary_addressbook", + NULL); + g_object_unref (gconf_client); + if (uid) { +- ESource *source = e_source_list_peek_source_by_uid(name_selector_dialog->source_list, uid); +- if (source) { +- e_source_option_menu_select ((ESourceOptionMenu *)widget, source); +- source_selected (name_selector_dialog, source); +- } +- else { +- source_selected (name_selector_dialog, find_first_source (name_selector_dialog->source_list)); +- } ++ e_source_combo_box_set_active_uid ( ++ E_SOURCE_COMBO_BOX (widget), uid); + g_free (uid); + } +- else { +- source_selected (name_selector_dialog, find_first_source (name_selector_dialog->source_list)); +- } +- +- g_signal_connect_swapped (widget, "source_selected", G_CALLBACK (source_selected), name_selector_dialog); + + label = glade_xml_get_widget (name_selector_dialog->gui, "AddressBookLabel"); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); +@@ -308,9 +294,7 @@ + ENameSelectorDialog *name_selector_dialog = E_NAME_SELECTOR_DIALOG (object); + + g_array_free (name_selector_dialog->sections, TRUE); +- g_object_unref (name_selector_dialog->source_list); + g_object_unref (name_selector_dialog->button_size_group); +- g_list_free (category_list); + + if (G_OBJECT_CLASS (e_name_selector_dialog_parent_class)->finalize) + G_OBJECT_CLASS (e_name_selector_dialog_parent_class)->finalize (object); +@@ -384,26 +368,6 @@ + *email_n = email_n_local; + } + +-static ESource * +-find_first_source (ESourceList *source_list) +-{ +- GSList *groups, *sources, *l, *m; +- +- groups = e_source_list_peek_groups (source_list); +- for (l = groups; l; l = l->next) { +- ESourceGroup *group = l->data; +- +- sources = e_source_group_peek_sources (group); +- for (m = sources; m; m = m->next) { +- ESource *source = m->data; +- +- return source; +- } +- } +- +- return NULL; +-} +- + static void + add_destination (EDestinationStore *destination_store, EContact *contact, gint email_n) + { +@@ -742,8 +706,13 @@ + } + + static void +-source_selected (ENameSelectorDialog *name_selector_dialog, ESource *source) ++source_changed (ENameSelectorDialog *name_selector_dialog, ++ ESourceComboBox *source_combo_box) + { ++ ESource *source; ++ ++ source = e_source_combo_box_get_active (source_combo_box); ++ + /* Remove any previous books being shown or loaded */ + remove_books (name_selector_dialog); + +@@ -761,49 +730,54 @@ + { + EContactStore *contact_store; + EBookQuery *book_query; +- GtkWidget *category_option_menu; ++ GtkWidget *combo_box; + const gchar *text; +- gint category_id; + gchar *text_escaped; + gchar *query_string; +- const gchar *category; ++ gchar *category; + gchar *category_escaped; + +- category_option_menu = glade_xml_get_widget(name_selector_dialog->gui, "optionmenu-category"); +- category_id = gtk_option_menu_get_history (GTK_OPTION_MENU(category_option_menu)); +- category = g_list_nth_data (category_list, category_id); +- if (!category) +- return; ++ combo_box = glade_xml_get_widget ( ++ name_selector_dialog->gui, "combobox-category"); ++ if (gtk_combo_box_get_active (GTK_COMBO_BOX (combo_box)) == -1) ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0); ++ ++ category = gtk_combo_box_get_active_text (GTK_COMBO_BOX (combo_box)); + category_escaped = escape_sexp_string (category); + + text = gtk_entry_get_text (name_selector_dialog->search_entry); + text_escaped = escape_sexp_string (text); + +- if ( !strcmp (category, _("Any Category"))) { +- query_string = g_strdup_printf ("(or (beginswith \"file_as\" %s) " +- " (beginswith \"full_name\" %s) " +- " (beginswith \"email\" %s) " +- " (beginswith \"nickname\" %s)))", +- text_escaped, text_escaped, text_escaped, text_escaped); +- } +- else { +- query_string = g_strdup_printf ("(and (is \"category_list\" %s) " +- "(or (beginswith \"file_as\" %s) " +- " (beginswith \"full_name\" %s) " +- " (beginswith \"email\" %s) " +- " (beginswith \"nickname\" %s)))", +- category_escaped,text_escaped, text_escaped, text_escaped, text_escaped); +- } ++ if (!strcmp (category, _("Any Category"))) ++ query_string = g_strdup_printf ( ++ "(or (beginswith \"file_as\" %s) " ++ " (beginswith \"full_name\" %s) " ++ " (beginswith \"email\" %s) " ++ " (beginswith \"nickname\" %s)))", ++ text_escaped, text_escaped, ++ text_escaped, text_escaped); ++ else ++ query_string = g_strdup_printf ( ++ "(and (is \"category_list\" %s) " ++ "(or (beginswith \"file_as\" %s) " ++ " (beginswith \"full_name\" %s) " ++ " (beginswith \"email\" %s) " ++ " (beginswith \"nickname\" %s)))", ++ category_escaped, text_escaped, text_escaped, ++ text_escaped, text_escaped); + + book_query = e_book_query_from_string (query_string); +- g_free (query_string); +- g_free (text_escaped); +- g_free (category_escaped); + +- contact_store = e_name_selector_model_peek_contact_store (name_selector_dialog->name_selector_model); ++ contact_store = e_name_selector_model_peek_contact_store ( ++ name_selector_dialog->name_selector_model); + e_contact_store_set_query (contact_store, book_query); + + e_book_query_unref (book_query); ++ ++ g_free (query_string); ++ g_free (text_escaped); ++ g_free (category_escaped); ++ g_free (category); + } + + static void +--- /dev/null 2007-03-08 09:20:11.212292094 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/e-source-combo-box.c 2007-03-13 15:49:50.000000000 -0400 +@@ -0,0 +1,461 @@ ++/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ ++/* e-source-option-menu.c ++ * ++ * Copyright (C) 2007 Novell, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of version 2 of the GNU Lesser General Public ++ * License as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this program; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#include "e-source-combo-box.h" ++ ++#define E_SOURCE_COMBO_BOX_GET_PRIVATE(obj) \ ++ (G_TYPE_INSTANCE_GET_PRIVATE \ ++ ((obj), E_TYPE_SOURCE_COMBO_BOX, ESourceComboBoxPrivate)) ++ ++struct _ESourceComboBoxPrivate { ++ ESourceList *source_list; ++ GHashTable *uid_to_row_reference; ++ gulong handler_id; ++}; ++ ++enum { ++ PROP_0, ++ PROP_SOURCE_LIST ++}; ++ ++enum { ++ COLUMN_NAME, /* G_TYPE_STRING */ ++ COLUMN_SENSITIVE, /* G_TYPE_BOOLEAN */ ++ COLUMN_SOURCE, /* G_TYPE_OBJECT */ ++ NUM_COLUMNS ++}; ++ ++static gpointer parent_class = NULL; ++ ++static void ++source_list_changed_cb (ESourceList *source_list, ++ ESourceComboBox *source_combo_box) ++{ ++ ESourceComboBoxPrivate *priv; ++ GtkComboBox *combo_box; ++ GtkTreeModel *model; ++ GtkListStore *store; ++ GtkTreeIter iter; ++ GtkTreePath *path; ++ GSList *groups; ++ GSList *sources; ++ const gchar *name; ++ const gchar *uid; ++ gchar *indented_name; ++ ++ priv = E_SOURCE_COMBO_BOX_GET_PRIVATE (source_combo_box); ++ g_hash_table_remove_all (priv->uid_to_row_reference); ++ ++ combo_box = GTK_COMBO_BOX (source_combo_box); ++ gtk_combo_box_set_active (combo_box, -1); ++ ++ model = gtk_combo_box_get_model (combo_box); ++ store = GTK_LIST_STORE (model); ++ gtk_list_store_clear (store); ++ ++ for (groups = e_source_list_peek_groups (source_list); ++ groups != NULL; groups = groups->next) { ++ ++ /* Only show source groups that have sources. */ ++ if (e_source_group_peek_sources (groups->data) == NULL) ++ continue; ++ ++ name = e_source_group_peek_name (groups->data); ++ gtk_list_store_append (store, &iter); ++ gtk_list_store_set ( ++ store, &iter, ++ COLUMN_NAME, name, ++ COLUMN_SENSITIVE, FALSE, ++ COLUMN_SOURCE, groups->data, ++ -1); ++ ++ for (sources = e_source_group_peek_sources (groups->data); ++ sources != NULL; sources = sources->next) { ++ ++ name = e_source_peek_name (sources->data); ++ indented_name = g_strconcat (" ", name, NULL); ++ gtk_list_store_append (store, &iter); ++ gtk_list_store_set ( ++ store, &iter, ++ COLUMN_NAME, indented_name, ++ COLUMN_SENSITIVE, TRUE, ++ COLUMN_SOURCE, sources->data, ++ -1); ++ g_free (indented_name); ++ ++ if (gtk_combo_box_get_active (combo_box) == -1) ++ gtk_combo_box_set_active_iter ( ++ combo_box, &iter); ++ ++ uid = e_source_peek_uid (sources->data); ++ path = gtk_tree_model_get_path (model, &iter); ++ g_hash_table_insert ( ++ priv->uid_to_row_reference, g_strdup (uid), ++ gtk_tree_row_reference_new (model, path)); ++ gtk_tree_path_free (path); ++ } ++ } ++} ++ ++static GObject * ++e_source_combo_box_constructor (GType type, guint n_construct_properties, ++ GObjectConstructParam *construct_properties) ++{ ++ GtkCellRenderer *renderer; ++ GtkListStore *store; ++ GObject *object; ++ ++ /* Chain up to parent's "constructor" method. */ ++ object = G_OBJECT_CLASS (parent_class)->constructor ( ++ type, n_construct_properties, construct_properties); ++ ++ store = gtk_list_store_new ( ++ NUM_COLUMNS, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_OBJECT); ++ gtk_combo_box_set_model ( ++ GTK_COMBO_BOX (object), GTK_TREE_MODEL (store)); ++ ++ renderer = gtk_cell_renderer_text_new (); ++ gtk_cell_layout_pack_start ( ++ GTK_CELL_LAYOUT (object), renderer, TRUE); ++ gtk_cell_layout_set_attributes ( ++ GTK_CELL_LAYOUT (object), renderer, ++ "text", COLUMN_NAME, ++ "sensitive", COLUMN_SENSITIVE, ++ NULL); ++ ++ return object; ++} ++ ++static void ++e_source_combo_box_set_property (GObject *object, guint property_id, ++ const GValue *value, GParamSpec *pspec) ++{ ++ ESourceComboBoxPrivate *priv; ++ ++ priv = E_SOURCE_COMBO_BOX_GET_PRIVATE (object); ++ ++ switch (property_id) { ++ case PROP_SOURCE_LIST: ++ ++ if (priv->source_list != NULL) { ++ g_signal_handler_disconnect ( ++ priv->source_list, priv->handler_id); ++ g_object_unref (priv->source_list); ++ } ++ ++ priv->source_list = g_value_dup_object (value); ++ ++ /* Reset the tree store. */ ++ source_list_changed_cb ( ++ priv->source_list, ++ E_SOURCE_COMBO_BOX (object)); ++ ++ /* Watch for source list changes. */ ++ priv->handler_id = g_signal_connect_object ( ++ priv->source_list, "changed", ++ G_CALLBACK (source_list_changed_cb), ++ object, 0); ++ ++ return; ++ } ++ ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); ++} ++ ++static void ++e_source_combo_box_get_property (GObject *object, guint property_id, ++ GValue *value, GParamSpec *pspec) ++{ ++ ESourceComboBoxPrivate *priv; ++ ++ priv = E_SOURCE_COMBO_BOX_GET_PRIVATE (object); ++ ++ switch (property_id) { ++ case PROP_SOURCE_LIST: ++ g_value_set_object (value, priv->source_list); ++ return; ++ } ++ ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); ++} ++ ++static void ++e_source_combo_box_dispose (GObject *object) ++{ ++ ESourceComboBoxPrivate *priv; ++ ++ priv = E_SOURCE_COMBO_BOX_GET_PRIVATE (object); ++ ++ if (priv->source_list != NULL) { ++ g_object_unref (priv->source_list); ++ priv->source_list = NULL; ++ } ++ ++ g_hash_table_remove_all (priv->uid_to_row_reference); ++ ++ /* Chain up to parent's "dispose" method. */ ++ G_OBJECT_CLASS (parent_class)->dispose (object); ++} ++ ++static void ++e_source_combo_box_finalize (GObject *object) ++{ ++ ESourceComboBoxPrivate *priv; ++ ++ priv = E_SOURCE_COMBO_BOX_GET_PRIVATE (object); ++ ++ g_hash_table_destroy (priv->uid_to_row_reference); ++ ++ /* Chain up to parent's "finalize" method. */ ++ G_OBJECT_CLASS (parent_class)->finalize (object); ++} ++ ++static void ++e_source_combo_box_class_init (ESourceComboBoxClass *class) ++{ ++ GObjectClass *object_class = G_OBJECT_CLASS (class); ++ ++ parent_class = g_type_class_peek_parent (class); ++ ++ g_type_class_add_private (class, sizeof (ESourceComboBox)); ++ ++ object_class->constructor = e_source_combo_box_constructor; ++ object_class->set_property = e_source_combo_box_set_property; ++ object_class->get_property = e_source_combo_box_get_property; ++ object_class->dispose = e_source_combo_box_dispose; ++ object_class->finalize = e_source_combo_box_finalize; ++ ++ g_object_class_install_property ( ++ object_class, ++ PROP_SOURCE_LIST, ++ g_param_spec_object ( ++ "source-list", ++ "source-list", ++ "List of sources to choose from", ++ E_TYPE_SOURCE_LIST, ++ G_PARAM_READWRITE)); ++} ++ ++static void ++e_source_combo_box_init (ESourceComboBox *source_combo_box) ++{ ++ ESourceComboBoxPrivate *priv; ++ ++ priv = E_SOURCE_COMBO_BOX_GET_PRIVATE (source_combo_box); ++ ++ priv->uid_to_row_reference = g_hash_table_new_full ( ++ g_str_hash, g_str_equal, ++ (GDestroyNotify) g_free, ++ (GDestroyNotify) gtk_tree_row_reference_free); ++} ++ ++GType ++e_source_combo_box_get_type (void) ++{ ++ static GType type = 0; ++ ++ if (G_UNLIKELY (type == 0)) { ++ static const GTypeInfo type_info = { ++ sizeof (ESourceComboBoxClass), ++ (GBaseInitFunc) NULL, ++ (GBaseFinalizeFunc) NULL, ++ (GClassInitFunc) e_source_combo_box_class_init, ++ (GClassFinalizeFunc) NULL, ++ NULL, /* class_data */ ++ sizeof (ESourceComboBox), ++ 0, /* n_preallocs */ ++ (GInstanceInitFunc) e_source_combo_box_init, ++ NULL /* value_table */ ++ }; ++ ++ type = g_type_register_static ( ++ GTK_TYPE_COMBO_BOX, "ESourceComboBox", &type_info, 0); ++ } ++ ++ return type; ++} ++ ++/** ++ * e_source_combo_box_new: ++ * @source_list: an #ESourceList ++ * ++ * Creates a new #ESourceComboBox widget that lets the user pick an #ESource ++ * from the provided #ESourceList. ++ * ++ * Returns: a new #ESourceComboBox ++ **/ ++GtkWidget * ++e_source_combo_box_new (ESourceList *source_list) ++{ ++ g_return_val_if_fail (source_list != NULL, NULL); ++ ++ return g_object_new ( ++ E_TYPE_SOURCE_COMBO_BOX, ++ "source-list", source_list, NULL); ++} ++ ++/** ++ * e_source_combo_box_get_source_list: ++ * @source_combo_box: an #ESourceComboBox ++ * ++ * Returns the #ESourceList which is acting as a data source for ++ * @source_combo_box. ++ * ++ * Returns: an #ESourceList ++ **/ ++ESourceList * ++e_source_combo_box_get_source_list (ESourceComboBox *source_combo_box) ++{ ++ ESourceList *source_list; ++ ++ g_return_val_if_fail (source_combo_box != NULL, NULL); ++ ++ g_object_get (source_combo_box, "source-list", &source_list, NULL); ++ ++ return source_list; ++} ++ ++/** ++ * e_source_combo_box_set_source_list: ++ * @source_combo_box: an #ESourceComboBox ++ * @source_list: an #ESourceList ++ * ++ * Sets the source list used by @source_combo_box to be @source_list. This ++ * causes the contents of @source_combo_box to be regenerated. ++ **/ ++void ++e_source_combo_box_set_source_list (ESourceComboBox *source_combo_box, ++ ESourceList *source_list) ++{ ++ g_return_if_fail (source_combo_box != NULL); ++ g_return_if_fail (source_list != NULL); ++ ++ g_object_set (source_combo_box, "source-list", source_list, NULL); ++} ++ ++/** ++ * e_source_combo_box_get_active: ++ * @source_combo_box: an #ESourceComboBox ++ * ++ * Returns the #ESource corresponding to the currently active item, or %NULL ++ * if there is no active item. ++ * ++ * Returns: an #ESource or %NULL ++ **/ ++ESource * ++e_source_combo_box_get_active (ESourceComboBox *source_combo_box) ++{ ++ GtkComboBox *combo_box; ++ GtkTreeIter iter; ++ ESource *source; ++ ++ g_return_val_if_fail (source_combo_box != NULL, NULL); ++ ++ combo_box = GTK_COMBO_BOX (source_combo_box); ++ ++ if (!gtk_combo_box_get_active_iter (combo_box, &iter)) ++ return NULL; ++ ++ gtk_tree_model_get ( ++ gtk_combo_box_get_model (combo_box), ++ &iter, COLUMN_SOURCE, &source, -1); ++ ++ return source; ++} ++ ++/** ++ * e_source_combo_box_set_active: ++ * @source_combo_box: an #ESourceComboBox ++ * @source: an #ESource ++ * ++ * Sets the active item to the one corresponding to @source. ++ **/ ++void ++e_source_combo_box_set_active (ESourceComboBox *source_combo_box, ++ ESource *source) ++{ ++ g_return_if_fail (source_combo_box != NULL); ++ g_return_if_fail (source != NULL); ++ ++ e_source_combo_box_set_active_uid ( ++ source_combo_box, e_source_peek_uid (source)); ++} ++ ++/** ++ * e_source_combo_box_get_active_uid: ++ * @source_combo_box: an #ESourceComboBox ++ * ++ * Returns the unique ID of the #ESource corresponding to the currently ++ * active item, or %NULL if there is no active item. ++ * ++ * Returns: a unique ID string or %NULL ++ **/ ++const gchar * ++e_source_combo_box_get_active_uid (ESourceComboBox *source_combo_box) ++{ ++ ESource *source; ++ ++ g_return_val_if_fail (source_combo_box != NULL, NULL); ++ ++ source = e_source_combo_box_get_active (source_combo_box); ++ if (source == NULL) ++ return NULL; ++ ++ return e_source_peek_uid (source); ++} ++ ++/** ++ * e_source_combo_box_set_active_uid: ++ * @source_combo_box: an #ESourceComboBox ++ * @uid: a unique ID of an #ESource ++ * ++ * Sets the active item to the one corresponding to @uid. ++ **/ ++void ++e_source_combo_box_set_active_uid (ESourceComboBox *source_combo_box, ++ const gchar *uid) ++{ ++ ESourceComboBoxPrivate *priv; ++ GtkTreeRowReference *reference; ++ GtkComboBox *combo_box; ++ GtkTreeIter iter; ++ gboolean iter_was_set; ++ ++ g_return_if_fail (source_combo_box != NULL); ++ g_return_if_fail (uid != NULL); ++ ++ priv = E_SOURCE_COMBO_BOX_GET_PRIVATE (source_combo_box); ++ ++ combo_box = GTK_COMBO_BOX (source_combo_box); ++ ++ reference = g_hash_table_lookup (priv->uid_to_row_reference, uid); ++ g_return_if_fail (reference != NULL); ++ ++ iter_was_set = gtk_tree_model_get_iter ( ++ gtk_combo_box_get_model (combo_box), &iter, ++ gtk_tree_row_reference_get_path (reference)); ++ g_return_if_fail (!iter_was_set); ++ ++ gtk_combo_box_set_active_iter (combo_box, &iter); ++} +--- evolution-data-server-1.10.0/docs/reference/libedataserverui/libedataserverui-docs.sgml.code-cleanup 2007-03-12 01:23:42.000000000 -0400 ++++ evolution-data-server-1.10.0/docs/reference/libedataserverui/libedataserverui-docs.sgml 2007-03-13 15:49:50.000000000 -0400 +@@ -19,6 +19,7 @@ + + + ++ + + + +--- evolution-data-server-1.10.0/docs/reference/libedataserverui/libedataserverui.types.code-cleanup 2007-03-12 01:23:42.000000000 -0400 ++++ evolution-data-server-1.10.0/docs/reference/libedataserverui/libedataserverui.types 2007-03-13 15:49:50.000000000 -0400 +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -19,6 +20,7 @@ + e_name_selector_entry_get_type + e_name_selector_list_get_type + e_name_selector_model_get_type ++e_source_combo_box_get_type + e_source_option_menu_get_type + e_source_selector_get_type + e_source_selector_dialog_get_type +--- evolution-data-server-1.10.0/docs/reference/libedataserverui/libedataserverui-sections.txt.code-cleanup 2007-03-12 01:23:42.000000000 -0400 ++++ evolution-data-server-1.10.0/docs/reference/libedataserverui/libedataserverui-sections.txt 2007-03-13 15:49:50.000000000 -0400 +@@ -25,6 +25,29 @@ + + +
++e-source-combo-box ++ESourceComboBox ++ESourceComboBox ++e_source_combo_box_new ++e_source_combo_box_get_source_list ++e_source_combo_box_set_source_list ++e_source_combo_box_get_active ++e_source_combo_box_set_active ++e_source_combo_box_get_active_uid ++e_source_combo_box_set_active_uid ++ ++E_SOURCE_COMBO_BOX ++E_IS_SOURCE_COMBO_BOX ++E_TYPE_SOURCE_COMBO_BOX ++E_SOURCE_COMBO_BOX_CLASS ++E_IS_SOURCE_COMBO_BOX_CLASS ++E_SOURCE_COMBO_BOX_GET_CLASS ++ESourceComboBoxClass ++ ++e_source_combo_box_get_type ++
++ ++
+ e-source-option-menu + ESourceOptionMenu + ESourceOptionMenu +--- evolution-data-server-1.10.0/iconv-detect.c.code-cleanup 2007-01-03 05:10:36.000000000 -0500 ++++ evolution-data-server-1.10.0/iconv-detect.c 2007-03-13 15:49:50.000000000 -0400 +@@ -21,6 +21,7 @@ + */ + + #include ++#include + #include + + enum { +--- evolution-data-server-1.10.0/calendar/libical/src/libicalss/icalssyacc.y.code-cleanup 2007-01-03 10:02:34.000000000 -0500 ++++ evolution-data-server-1.10.0/calendar/libical/src/libicalss/icalssyacc.y 2007-03-13 15:49:50.000000000 -0400 +@@ -47,6 +47,7 @@ + static void ssyacc_add_from(struct icalgauge_impl* impl, char* str1); + static void set_logic(struct icalgauge_impl* impl,icalgaugelogic l); + void sserror(char *s); /* Don't know why I need this.... */ ++int sslex(void *YYPARSE_PARAM); + + %} + +--- evolution-data-server-1.10.0/calendar/libical/src/libicalvcal/vcc.y.code-cleanup 2007-01-03 10:02:34.000000000 -0500 ++++ evolution-data-server-1.10.0/calendar/libical/src/libicalvcal/vcc.y 2007-03-13 15:49:50.000000000 -0400 +@@ -170,6 +170,7 @@ + static void enterAttr(const char *s1, const char *s2); + static void enterValues(const char *value); + static void mime_error_(char *s); ++static int mime_lex(void); + + %} + diff --git a/evolution-data-server-1.9.92-e-passwords.patch b/evolution-data-server-1.9.92-e-passwords.patch index 3d2bcd7..571bf31 100644 --- a/evolution-data-server-1.9.92-e-passwords.patch +++ b/evolution-data-server-1.9.92-e-passwords.patch @@ -1,5 +1,5 @@ ---- evolution-data-server-1.9.92/libedataserverui/e-passwords.h.e-passwords 2007-01-03 09:56:25.000000000 -0500 -+++ evolution-data-server-1.9.92/libedataserverui/e-passwords.h 2007-03-08 16:47:27.000000000 -0500 +--- evolution-data-server-1.10.0/libedataserverui/e-passwords.h.e-passwords 2007-01-03 05:09:27.000000000 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/e-passwords.h 2007-03-14 18:05:55.000000000 -0400 @@ -28,45 +28,65 @@ G_BEGIN_DECLS @@ -97,8 +97,8 @@ G_END_DECLS ---- evolution-data-server-1.9.92/libedataserverui/e-passwords.c.e-passwords 2007-02-09 13:49:32.000000000 -0500 -+++ evolution-data-server-1.9.92/libedataserverui/e-passwords.c 2007-03-08 16:47:27.000000000 -0500 +--- evolution-data-server-1.10.0/libedataserverui/e-passwords.c.e-passwords 2007-02-09 03:38:09.000000000 -0500 ++++ evolution-data-server-1.10.0/libedataserverui/e-passwords.c 2007-03-14 20:27:01.000000000 -0400 @@ -23,18 +23,29 @@ */ @@ -139,7 +139,7 @@ */ #ifdef HAVE_CONFIG_H -@@ -42,159 +53,372 @@ +@@ -42,159 +53,384 @@ #endif #include @@ -467,18 +467,30 @@ +ep_msg_send (EPassMsg *msg) { - int needidle = 0; ++ GMainContext *context; ++ ++ context = g_main_context_default (); ++ + /* Expedite flag requires a key. */ + g_assert (!msg->expedite || msg->key != NULL); ++ ++ if (!(msg->expedite && ep_msg_expedite (msg))) ++ g_thread_pool_push (dispatcher, msg, NULL); - LOCK(); - e_dlist_addtail(&request_list, (EDListNode *)&msg->msg); - if (!idle_id) { - if (!msg->ismain) - idle_id = g_idle_add(ep_idle_dispatch, NULL); -+ if (!(msg->expedite && ep_msg_expedite (msg))) -+ g_thread_pool_push (dispatcher, msg, NULL); ++ g_debug ("%s: in main thread? %d", G_STRFUNC, ++ g_main_context_is_owner (context)); + -+ e_flag_wait (msg->done); ++ /* Don't block the main loop. */ ++ if (g_main_context_is_owner (context)) ++ while (!e_flag_is_set (msg->done)) ++ g_main_context_iteration (context, TRUE); ++ else ++ e_flag_wait (msg->done); +} + +static void @@ -614,7 +626,7 @@ { GnomeKeyringAttributeList *attributes; GnomeKeyringAttribute attribute; -@@ -205,11 +429,8 @@ +@@ -205,11 +441,8 @@ result = gnome_keyring_get_default_keyring_sync (&default_keyring); if (!default_keyring) { @@ -628,7 +640,7 @@ default_keyring = g_strdup ("default"); } -@@ -239,38 +460,44 @@ +@@ -239,38 +472,44 @@ } g_free (default_keyring); @@ -642,15 +654,15 @@ +ep_clear_passwords_keyfile (EPassMsg *msg) { - char *path; -- -- path = g_strdup_printf ("/Evolution/Passwords-%s", msg->component); + gchar *group; + GError *error = NULL; -- gnome_config_private_clean_section (path); -- gnome_config_private_sync_file ("/Evolution"); +- path = g_strdup_printf ("/Evolution/Passwords-%s", msg->component); + group = ep_key_file_get_group (msg->component); +- gnome_config_private_clean_section (path); +- gnome_config_private_sync_file ("/Evolution"); +- - g_free (path); + g_key_file_remove_group (key_file, group, &error); + if (error == NULL) @@ -691,7 +703,7 @@ { GnomeKeyringAttributeList *attributes; GnomeKeyringAttribute attribute; -@@ -281,11 +508,8 @@ +@@ -281,11 +520,8 @@ result = gnome_keyring_get_default_keyring_sync (&default_keyring); if (!default_keyring) { @@ -705,7 +717,7 @@ default_keyring = g_strdup ("default"); } d(g_print("Get Default %d\n", result)); -@@ -316,69 +540,54 @@ +@@ -316,69 +552,54 @@ g_free (default_keyring); /* free up the session passwords */ @@ -802,7 +814,7 @@ guint32 item_id; if (!strcmp (uri->protocol, "ldap") && !uri->user) { -@@ -419,48 +628,48 @@ +@@ -419,48 +640,48 @@ d(g_print("Remember %s: %d/%d\n", msg->key, result, item_id)); /* now remove it from our session hash */ @@ -826,16 +838,11 @@ - gpointer okey, value; - char *path, *pass64; - int len, state, save; -+ gchar *group, *key, *password; - +- - if (g_hash_table_lookup_extended (passwords, msg->key, &okey, &value)) { - /* add it to the on-disk cache of passwords */ - path = password_path (msg->component, okey); -+ password = g_hash_table_lookup (password_cache, msg->key); -+ if (password == NULL) { -+ g_warning ("Password for key \"%s\" not found", msg->key); -+ return; -+ } ++ gchar *group, *key, *password; - len = strlen (value); - pass64 = g_malloc0 ((len + 2) * 4 / 3 + 1); @@ -845,6 +852,16 @@ - gnome_config_private_set_string (path, pass64); - g_free (path); - g_free (pass64); ++ password = g_hash_table_lookup (password_cache, msg->key); ++ if (password == NULL) { ++ g_warning ("Password for key \"%s\" not found", msg->key); ++ return; ++ } + +- /* now remove it from our session hash */ +- g_hash_table_remove (passwords, msg->key); +- g_free (okey); +- g_free (value); + group = ep_key_file_get_group (msg->component); + key = ep_key_file_normalize_key (msg->key); + password = ep_password_encode (password); @@ -853,11 +870,6 @@ + g_key_file_set_string (key_file, group, key, password); + ep_key_file_save (); -- /* now remove it from our session hash */ -- g_hash_table_remove (passwords, msg->key); -- g_free (okey); -- g_free (value); -- - gnome_config_private_sync_file ("/Evolution"); - } + g_free (group); @@ -881,7 +893,7 @@ } #if WITH_GNOME_KEYRING -@@ -472,7 +681,6 @@ +@@ -472,7 +693,6 @@ GnomeKeyringResult result; GList *matches = NULL, *tmp; char *default_keyring = NULL; @@ -889,7 +901,7 @@ EUri *uri = e_uri_new (msg->key); if (!strcmp (uri->protocol, "ldap") && !uri->user) { -@@ -486,27 +694,17 @@ +@@ -486,27 +706,17 @@ uri->user = keycopy; } @@ -920,7 +932,7 @@ default_keyring = g_strdup ("default"); } -@@ -567,35 +765,44 @@ +@@ -567,35 +777,44 @@ } g_free (default_keyring); @@ -938,14 +950,14 @@ - char *path; + gchar *group, *key; + GError *error = NULL; -+ -+ g_hash_table_remove (password_cache, msg->key); - if (g_hash_table_lookup_extended (passwords, msg->key, &okey, &value)) { - g_hash_table_remove (passwords, msg->key); - memset (value, 0, strlen (value)); - g_free (okey); - g_free (value); ++ g_hash_table_remove (password_cache, msg->key); ++ + group = ep_key_file_get_group (msg->component); + key = ep_key_file_normalize_key (msg->key); + @@ -984,7 +996,7 @@ #if WITH_GNOME_KEYRING static void -@@ -605,11 +812,11 @@ +@@ -605,11 +824,11 @@ GnomeKeyringAttributeList *attributes; GnomeKeyringAttribute attribute; GnomeKeyringResult result; @@ -999,7 +1011,7 @@ } else { EUri *uri = e_uri_new (msg->key); -@@ -683,287 +890,154 @@ +@@ -683,287 +902,154 @@ } } @@ -1377,7 +1389,7 @@ * * Set the offline-state of the application. This is a work-around * for having the backends fully offline aware, and returns a -@@ -972,10 +1046,11 @@ +@@ -972,10 +1058,11 @@ * FIXME: This is not a permanent api, review post 2.0. **/ void @@ -1392,7 +1404,7 @@ } /** -@@ -986,150 +1061,137 @@ +@@ -986,150 +1073,137 @@ void e_passwords_forget_passwords (void) { @@ -1428,12 +1440,12 @@ - EPassMsg *msg = ep_msg_new(ep_clear_passwords_file); -#endif + EPassMsg *msg; -+ -+ g_return_if_fail (component != NULL); - msg->component = component_name; - ep_msg_send(msg); - ep_msg_free(msg); ++ g_return_if_fail (component != NULL); ++ + msg = ep_msg_new (ep_clear_passwords, FALSE); + msg->component = component; + @@ -1523,33 +1535,33 @@ { EPassMsg *msg; - char *passwd; -- ++ char *password; + - g_return_val_if_fail(component_name != NULL, NULL); - g_return_val_if_fail(key != NULL, NULL); -+ char *password; ++ g_return_val_if_fail (component != NULL, NULL); ++ g_return_val_if_fail (key != NULL, NULL); -#if WITH_GNOME_KEYRING - msg = ep_msg_new(gnome_keyring_is_available() ? ep_get_password_keyring : ep_get_password_file); -#else - msg = ep_msg_new(ep_get_password_file); -#endif -+ g_return_val_if_fail (component != NULL, NULL); -+ g_return_val_if_fail (key != NULL, NULL); - +- - msg->component = component_name; + msg = ep_msg_new (ep_get_password, TRUE); + msg->component = component; msg->key = key; - ep_msg_send(msg); +- +- passwd = msg->password; +- msg->password = NULL; +- ep_msg_free(msg); + ep_msg_send (msg); + password = msg->password; + ep_msg_free (msg); -- passwd = msg->password; -- msg->password = NULL; -- ep_msg_free(msg); -- - return passwd; + return password; } @@ -1596,7 +1608,7 @@ * @key: key to store the password under * @prompt: prompt string * @secret: whether or not the password text should be ***ed out -@@ -1146,241 +1208,45 @@ +@@ -1146,241 +1220,45 @@ * return value is non-%NULL and @remember_type is not * E_PASSWORDS_DO_NOT_REMEMBER. **/ @@ -1867,8 +1879,8 @@ - return (char *)plain; + return password; } ---- evolution-data-server-1.9.92/libedataserver/e-msgport.h.e-passwords 2007-02-26 01:52:22.000000000 -0500 -+++ evolution-data-server-1.9.92/libedataserver/e-msgport.h 2007-03-08 16:47:27.000000000 -0500 +--- evolution-data-server-1.10.0/libedataserver/e-msgport.h.e-passwords 2007-02-26 04:52:17.000000000 -0500 ++++ evolution-data-server-1.10.0/libedataserver/e-msgport.h 2007-03-14 18:05:55.000000000 -0400 @@ -54,7 +54,7 @@ /* header for any message */ diff --git a/evolution-data-server.spec b/evolution-data-server.spec index 6ada376..f0ac532 100644 --- a/evolution-data-server.spec +++ b/evolution-data-server.spec @@ -26,7 +26,7 @@ Name: evolution-data-server Version: 1.10.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL Group: System Environment/Libraries Summary: Backend data server for Evolution @@ -36,47 +36,47 @@ Source: %{name}-%{version}.tar.bz2 ### Patches ### -Patch10: evolution-data-server-1.0.2-workaround-cal-backend-leak.patch -Patch11: evolution-1.4.4-ldap-x86_64-hack.patch -Patch12: evolution-data-server-1.2.2-fix_open_calendar_declaration.patch -Patch13: evolution-data-server-1.3.8-fix-implicit-function-declarations +Patch10: evolution-1.4.4-ldap-x86_64-hack.patch # Remove gnome-common macros from configure.in. # We do not ship gnome-common (or at least we're not supposed to). -Patch14: evolution-data-server-1.8.0-no-gnome-common.patch +Patch11: evolution-data-server-1.8.0-no-gnome-common.patch # RH bug #202309 -Patch15: evolution-data-server-1.7.91-maybe-fix-crash.patch +Patch12: evolution-data-server-1.7.91-maybe-fix-crash.patch # RH bug #203915 -Patch17: evolution-data-server-1.8.0-fix-camel-malloc.patch +Patch13: evolution-data-server-1.8.0-fix-camel-malloc.patch # GNOME bug #360240 -Patch18: evolution-data-server-1.8.1-warn-unused-variable.patch +Patch14: evolution-data-server-1.8.1-warn-unused-variable.patch # GNOME bug #360619 -Patch19: evolution-data-server-1.8.1-warn-incompatible-pointer-type.patch +Patch15: evolution-data-server-1.8.1-warn-incompatible-pointer-type.patch # GNOME bug #363965 -Patch20: evolution-data-server-1.9.1-kill-ememory.patch +Patch16: evolution-data-server-1.9.1-kill-ememory.patch # RH bug #203058 -Patch21: evolution-data-server-1.9.2-fix-name-selector-dialog.patch +Patch17: evolution-data-server-1.9.2-fix-name-selector-dialog.patch # RH bug #210142 -Patch22: evolution-data-server-1.9.2-strftime.patch +Patch18: evolution-data-server-1.9.2-strftime.patch # GNOME bug #373117 -Patch23: evolution-data-server-1.9.3-e-source-color.patch +Patch19: evolution-data-server-1.9.3-e-source-color.patch # GNOME bug #415891 -Patch24: evolution-data-server-1.9.92-e-flag.patch +Patch20: evolution-data-server-1.9.92-e-flag.patch # GNOME bug #376991 -Patch25: evolution-data-server-1.9.92-e-passwords.patch +Patch21: evolution-data-server-1.9.92-e-passwords.patch # GNOME bug #415922 -Patch26: evolution-data-server-1.9.92-isa-support.patch +Patch22: evolution-data-server-1.9.92-isa-support.patch + +# GNOME bug #417999 +Patch23: evolution-data-server-1.10.0-code-cleanup.patch ### Dependencies ### @@ -156,22 +156,20 @@ evolution-data-server. %prep %setup -q -%patch10 -p1 -b .workaround-cal-backend-leak -%patch11 -p1 -b .ldaphack -%patch12 -p1 -b .fix_open_calendar_declaration -%patch13 -p1 -b .fix-implicit-function-declarations -%patch14 -p1 -b .no-gnome-common -%patch15 -p1 -b .maybe-fix-crash -%patch17 -p1 -b .fix-camel-malloc -%patch18 -p1 -b .warn-unused-variable -%patch19 -p1 -b .warn-incompatible-pointer-type -%patch20 -p1 -b .kill-ememory -%patch21 -p1 -b .fix-name-selector-dialog -%patch22 -p1 -b .strftime -%patch23 -p1 -b .e-source-color -%patch24 -p1 -b .e-flag -%patch25 -p1 -b .e-passwords -%patch26 -p1 -b .isa-support +%patch10 -p1 -b .ldaphack +%patch11 -p1 -b .no-gnome-common +%patch12 -p1 -b .maybe-fix-crash +%patch13 -p1 -b .fix-camel-malloc +%patch14 -p1 -b .warn-unused-variable +%patch15 -p1 -b .warn-incompatible-pointer-type +%patch16 -p1 -b .kill-ememory +%patch17 -p1 -b .fix-name-selector-dialog +%patch18 -p1 -b .strftime +%patch19 -p1 -b .e-source-color +%patch20 -p1 -b .e-flag +%patch21 -p1 -b .e-passwords +%patch22 -p1 -b .isa-support +%patch23 -p1 -b .code-cleanup mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib @@ -380,6 +378,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libexchange-storage-%{eds_api_version}.pc %changelog +* Wed Mar 14 2007 Matthew Barnes - 1.10.0-2.fc7 +- Modify patch for GNOME bug #376991 to fix RH bug #231994. +- Add patch for GNOME bug #419999 (avoid deprecated GTK+ symbols). +- Remove evolution-data-server-1.0.2-workaround-cal-backend-leak.patch. +- Remove evolution-data-server-1.2.2-fix_open_calendar_declaration.patch. +- Remove evolution-data-server-1.3.8-fix-implicit-function-declarations. + * Mon Mar 12 2007 Matthew Barnes - 1.10.0-1.fc7 - Update to 1.10.0 - Remove patch for GNOME bug #301363 (fixed upstream).