From bdad58fc5f68ee7bcf42a2a6537b7d744abd16af Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Wed, 12 Mar 2003 06:46:38 +0000 Subject: [ fixes bug #39507 ] new function, sync the models after we do a search. 2003-03-11 Chris Toshok [ fixes bug #39507 ] * gui/component/select-names/e-select-names.c (search_result): new function, sync the models after we do a search. (addressbook_model_set_uri): connect to search_result. svn path=/trunk/; revision=20260 --- addressbook/gui/component/select-names/e-select-names.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'addressbook/gui') diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index ed8a3c3c45..51af18c78f 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -52,6 +52,8 @@ static void e_select_names_class_init (ESelectNamesClass *klass); static void e_select_names_dispose (GObject *object); static void update_query (GtkWidget *widget, ESelectNames *e_select_names); +static void sync_table_and_models (ESelectNamesModel *triggering_model, ESelectNames *esl); + extern EvolutionShellClient *global_shell_client; static GtkDialogClass *parent_class = NULL; @@ -111,6 +113,12 @@ e_select_names_class_init (ESelectNamesClass *klass) GtkWidget *e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int num1, int num2); GtkWidget *e_addressbook_create_folder_selector(char *name, char *string1, char *string2, int num1, int num2); +static void +search_result (EAddressbookModel *model, EBookViewStatus status, ESelectNames *esn) +{ + sync_table_and_models (NULL, esn); +} + static void set_book(EBook *book, EBookStatus status, ESelectNames *esn) { @@ -143,6 +151,10 @@ addressbook_model_set_uri(ESelectNames *e_select_names, EAddressbookModel *model book = e_book_new(); + g_signal_connect (model, + "search_result", G_CALLBACK (search_result), + e_select_names); + g_object_ref(e_select_names); g_object_ref(model); addressbook_load_uri(book, book_uri, (EBookCallback) set_book, e_select_names); -- cgit