aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/addressbook.c8
-rw-r--r--addressbook/gui/component/e-cardlist-model.c6
-rw-r--r--addressbook/gui/component/select-names/e-select-names-text-model.c7
3 files changed, 13 insertions, 8 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index c770aaa8f5..b21c70a83d 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -1047,7 +1047,7 @@ compare_subitems (const void *a, const void *b)
static void
make_suboptions (AddressbookView *view)
{
- ESearchBarSubitem *subitems;
+ ESearchBarSubitem *subitems, *s;
ECategoriesMasterList *master_list;
gint i, N;
@@ -1072,6 +1072,12 @@ make_suboptions (AddressbookView *view)
qsort (subitems + 1, N, sizeof (subitems[0]), compare_subitems);
e_search_bar_set_suboption (view->search, ESB_CATEGORY, subitems);
+
+ for (s = subitems; s->id != -1; s++) {
+ if (s->text)
+ g_free (s->text);
+ }
+ g_free (subitems);
}
static void
diff --git a/addressbook/gui/component/e-cardlist-model.c b/addressbook/gui/component/e-cardlist-model.c
index 5635d25f86..aca0bac22f 100644
--- a/addressbook/gui/component/e-cardlist-model.c
+++ b/addressbook/gui/component/e-cardlist-model.c
@@ -63,16 +63,13 @@ static void
e_cardlist_model_set_value_at (ETableModel *etc, int col, int row, const void *val)
{
ECardlistModel *e_cardlist_model = E_CARDLIST_MODEL(etc);
- ECard *card;
+
if ( col >= E_CARD_SIMPLE_FIELD_LAST - 1|| row >= e_cardlist_model->data_count )
return;
e_table_model_pre_change(etc);
e_card_simple_set(e_cardlist_model->data[row],
col + 1,
val);
- g_object_get(e_cardlist_model->data[row],
- "card", &card,
- NULL);
e_table_model_cell_changed(etc, col, row);
}
@@ -192,7 +189,6 @@ e_cardlist_model_get(ECardlistModel *model,
g_object_get(model->data[row],
"card", &card,
NULL);
- g_object_ref(card);
return card;
}
return NULL;
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 c2ddfcf96c..7859d5b056 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
@@ -334,14 +334,17 @@ e_select_names_text_model_insert_length (ETextModel *model, gint pos, const gcha
ESelectNamesTextModel *text_model = E_SELECT_NAMES_TEXT_MODEL (model);
ESelectNamesModel *source = text_model->source;
const char *t;
+ gchar *tmp;
if (out) {
- gchar *tmp = g_strndup (text, length);
+ tmp = g_strndup (text, length);
fprintf (out, ">> insert \"%s\" (len=%d) at %d\n", tmp, length, pos);
g_free (tmp);
}
- pos = CLAMP (pos, 0, g_utf8_strlen (e_select_names_model_get_textification (source, text_model->sep), -1));
+ tmp = e_select_names_model_get_textification (source, text_model->sep);
+ pos = CLAMP (pos, 0, g_utf8_strlen (tmp, -1));
+ g_free (tmp);
/* We want to control all cursor motions ourselves, rather than taking hints
from the ESelectNamesModel. */