diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-07-08 00:14:27 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-07-08 00:14:27 +0800 |
commit | 661cc2d0ef7f97a064543032b088d5092c36b4cb (patch) | |
tree | dd22ad7aca692e439e66c55ce56968bff64fa8c9 /addressbook/gui/component/select-names/e-select-names-text-model.c | |
parent | a4a1a93648db15b869ee67a19b7aad1873b5f9c7 (diff) | |
download | gsoc2013-evolution-661cc2d0ef7f97a064543032b088d5092c36b4cb.tar gsoc2013-evolution-661cc2d0ef7f97a064543032b088d5092c36b4cb.tar.gz gsoc2013-evolution-661cc2d0ef7f97a064543032b088d5092c36b4cb.tar.bz2 gsoc2013-evolution-661cc2d0ef7f97a064543032b088d5092c36b4cb.tar.lz gsoc2013-evolution-661cc2d0ef7f97a064543032b088d5092c36b4cb.tar.xz gsoc2013-evolution-661cc2d0ef7f97a064543032b088d5092c36b4cb.tar.zst gsoc2013-evolution-661cc2d0ef7f97a064543032b088d5092c36b4cb.zip |
Since ELDAPServer->port is a char *, allocate a string with the number 389
2000-07-07 Christopher James Lahey <clahey@helixcode.com>
* gui/component/addressbook.c (new_server_cb): Since
ELDAPServer->port is a char *, allocate a string with the number
389 contained.
* gui/component/addressbook.c: Make the select names test test the
new code instead of the old way of getting to an ESelectNames
dialog.
* gui/component/select-names/e-select-names-manager.c: Coded
storing the model for each section, creating an entry and
returning it, and for activating the dialog. Wrote a bit of the
get_cards code, but not all of it.
* gui/component/select-names/e-select-names-model.c,
gui/component/select-names/e-select-names-model.h: Coded all of
the code needed to make ESelectNamesTextModel work (it doesn't
yet, but all the code should be there.) Removed
E_SELECT_NAMES_MODEL_DATA_TYPE_SEPARATION_MATERIAL.
* gui/component/select-names/e-select-names-table-model.c,
gui/component/select-names/e-select-names-text-model.c: Changed
these to compensate for removal of
E_SELECT_NAMES_MODEL_DATA_TYPE_SEPARATION_MATERIAL.
* gui/component/select-names/e-select-names-table-model.h,
gui/component/select-names/e-select-names-text-model.h: Fixed some
silly typos.
* gui/component/select-names/e-select-names.c,
gui/component/select-names/e-select-names.h: Added a parameter to
add_section that lets you specify the source ESelectNamesModel.
svn path=/trunk/; revision=3948
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names-text-model.c')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-text-model.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-text-model.c b/addressbook/gui/component/select-names/e-select-names-text-model.c index abbbae3321..3838e974f6 100644 --- a/addressbook/gui/component/select-names/e-select-names-text-model.c +++ b/addressbook/gui/component/select-names/e-select-names-text-model.c @@ -146,7 +146,7 @@ e_select_names_text_model_insert (ETextModel *model, gint position, gchar position, text); } else { - position -= this_length; + position -= this_length + 1; } } } @@ -165,8 +165,9 @@ e_select_names_text_model_insert_length (ETextModel *model, gint position, gchar position, text, length); + break; } else { - position -= this_length; + position -= this_length + 1; } } } @@ -184,8 +185,9 @@ e_select_names_text_model_delete (ETextModel *model, gint position, gint iterator, position, length); + break; } else { - position -= this_length; + position -= this_length + 1; } } } @@ -204,8 +206,10 @@ e_select_names_text_model_model_changed (ESelectNamesModel *source, for (e_iterator_reset(iterator); e_iterator_is_valid(iterator); e_iterator_next(iterator)) { const ESelectNamesModelData *data = e_iterator_get(iterator); length += strlen(data->string); + length ++; length_count++; } + length --; g_free(model->lengths); model->lengths = g_new(int, length_count + 1); @@ -221,8 +225,10 @@ e_select_names_text_model_model_changed (ESelectNamesModel *source, strcpy(stringp, data->string); this_length = strlen(stringp); stringp += this_length; + *(stringp++) = ','; *(lengthsp++) = this_length; } + stringp --; *stringp = 0; *lengthsp = -1; g_free(E_TEXT_MODEL(model)->text); |