diff options
author | Chris Toshok <toshok@ximian.com> | 2002-08-20 14:32:06 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-08-20 14:32:06 +0800 |
commit | 124958ab47828e803faf551e1e93b40647c01bf9 (patch) | |
tree | cb6a88f030148a403a77da86fcad5b0b6d64e527 /addressbook/gui | |
parent | f64bfabfa514536408915328c490748f7273b9cc (diff) | |
download | gsoc2013-evolution-124958ab47828e803faf551e1e93b40647c01bf9.tar.gz gsoc2013-evolution-124958ab47828e803faf551e1e93b40647c01bf9.tar.zst gsoc2013-evolution-124958ab47828e803faf551e1e93b40647c01bf9.zip |
add the listener_id slot.
2002-08-19 Chris Toshok <toshok@ximian.com>
* gui/component/select-names/e-select-names-manager.h: add the
listener_id slot.
* gui/component/select-names/e-select-names-manager.c
(e_select_names_manager_new): store off the listener_id.
(e_select_names_manager_destroy): remove the bonobo listener -
fixes a crash when modifying the completion folders after you
bring up a compose window.
(e_select_names_manager_entry_new): another random timeout change
- make the completion at 100ms.
svn path=/trunk/; revision=17815
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-manager.c | 19 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-manager.h | 2 |
2 files changed, 10 insertions, 11 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-manager.c b/addressbook/gui/component/select-names/e-select-names-manager.c index 680196b58f..b8b95507b6 100644 --- a/addressbook/gui/component/select-names/e-select-names-manager.c +++ b/addressbook/gui/component/select-names/e-select-names-manager.c @@ -269,7 +269,7 @@ e_select_names_manager_entry_new (ESelectNamesManager *manager, ESelectNamesMode e_select_names_completion_add_book (E_SELECT_NAMES_COMPLETION(entry->comp), book); } - e_entry_enable_completion_full (entry->entry, entry->comp, 50, completion_handler); + e_entry_enable_completion_full (entry->entry, entry->comp, 100, completion_handler); entry->manager = manager; @@ -451,18 +451,13 @@ e_select_names_manager_new (void) { ESelectNamesManager *manager = E_SELECT_NAMES_MANAGER(gtk_type_new(e_select_names_manager_get_type())); Bonobo_ConfigDatabase db; - CORBA_Environment ev; - CORBA_exception_init (&ev); + db = addressbook_config_database (NULL); - db = addressbook_config_database (&ev); - - CORBA_exception_free (&ev); - - bonobo_event_source_client_add_listener (db, uris_listener, - "Bonobo/ConfigDatabase:change/Addressbook/Completion:", - NULL, - manager); + manager->listener_id = bonobo_event_source_client_add_listener (db, uris_listener, + "Bonobo/ConfigDatabase:change/Addressbook/Completion:", + NULL, + manager); read_completion_books_from_db (manager); @@ -644,6 +639,8 @@ e_select_names_manager_destroy (GtkObject *object) g_list_foreach (manager->completion_books, (GFunc) gtk_object_unref, NULL); g_list_free (manager->completion_books); manager->completion_books = NULL; + + bonobo_event_source_client_remove_listener (addressbook_config_database (NULL), manager->listener_id, NULL); } static void diff --git a/addressbook/gui/component/select-names/e-select-names-manager.h b/addressbook/gui/component/select-names/e-select-names-manager.h index 30b4be35a4..a3cec1ceae 100644 --- a/addressbook/gui/component/select-names/e-select-names-manager.h +++ b/addressbook/gui/component/select-names/e-select-names-manager.h @@ -33,6 +33,8 @@ struct _ESelectNamesManager { ESelectNames *names; GList *completion_books; + + Bonobo_EventSource_ListenerId listener_id; }; struct _ESelectNamesManagerClass { |