From 6bb3bbdfff7383749d19a57cfe3162cd67aabf9b Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Tue, 17 Jul 2001 04:58:55 +0000 Subject: Added addSectionWithLimit to the SelectNames interface. 2001-07-16 Jon Trowbridge * gui/component/select-names/Evolution-Addressbook-SelectNames.idl: Added addSectionWithLimit to the SelectNames interface. * gui/component/select-names/e-select-names-bonobo.c (impl_SelectNames_add_section_with_limit): Added. Implements addSectionWithLimit. (e_select_names_bonobo_construct): Set up as a BonoboEventSource. (init): Listen for "changed" signals from our manager. (manager_changed_cb): Notify our listeners if we get a changed signal from our manager. * gui/component/select-names/e-select-names-manager.c (e_select_names_manager_class_init): Added a "changed" signal". (section_copy): Propogate the signal connection. (section_free): Disconnect the changed handler. (e_select_names_manager_add_section_with_limit): Connect to the new section's model, listening for changes. (e_select_names_manager_activate_dialog): Connect to the "working copy" model, listening for changes. (e_select_names_manager_add_section_with_limit): Added. (e_select_names_manager_add_section): Changed to just be a special case of e_select_names_manager_add_section_with_limit. * gui/component/select-names/e-select-names-model.c (e_select_names_model_set_limit): Added. Allows a max number of names allowed in the model. (e_select_names_model_get_limit): Added. Returns the limit. (e_select_names_model_at_limit): Added. Returns TRUE if the model is "full". (e_select_names_model_insert): Check that we aren't at the limit before inserting. Silently return if we are. (e_select_names_model_append): Check that we aren't at the limit before appending. Silently return if we are. svn path=/trunk/; revision=11150 --- addressbook/gui/component/select-names/e-select-names-model.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addressbook/gui/component/select-names/e-select-names-model.h') diff --git a/addressbook/gui/component/select-names/e-select-names-model.h b/addressbook/gui/component/select-names/e-select-names-model.h index 989a829223..330f1ddd82 100644 --- a/addressbook/gui/component/select-names/e-select-names-model.h +++ b/addressbook/gui/component/select-names/e-select-names-model.h @@ -50,6 +50,10 @@ const gchar *e_select_names_model_get_textification (ESelectNamesModel *model); const gchar *e_select_names_model_get_address_text (ESelectNamesModel *model); gint e_select_names_model_count (ESelectNamesModel *model); +gint e_select_names_model_get_limit (ESelectNamesModel *model); +void e_select_names_model_set_limit (ESelectNamesModel *model, gint limit); +gboolean e_select_names_model_at_limit (ESelectNamesModel *model); + const EDestination *e_select_names_model_get_destination (ESelectNamesModel *model, gint index); gchar *e_select_names_model_export_destinationv (ESelectNamesModel *model); void e_select_names_model_import_destinationv (ESelectNamesModel *model, -- cgit v1.2.3