aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/editgroup.c12
2 files changed, 9 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 2560e13f..9d8351eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2017-02-15
+ * src/editgroup.c: expand the tree when moving email from group to
+ available list.
+
+2017-02-15
+
* src/editgroup.c: show available email list with folder tree.
2017-02-10
diff --git a/src/editgroup.c b/src/editgroup.c
index 8dc4a450..3ffe7251 100644
--- a/src/editgroup.c
+++ b/src/editgroup.c
@@ -153,6 +153,9 @@ static void edit_group_list_add_email(GtkTreeStore *store, GtkTreeIter *parent,
GROUP_COL_EMAIL, email->address,
GROUP_COL_REMARKS, email->remarks,
GROUP_COL_DATA, email, -1);
+ if (parent && GTK_TREE_MODEL(store) == gtk_tree_view_get_model(groupeditdlg.treeview_avail)) {
+ gtkut_tree_view_expand_parent_all(groupeditdlg.treeview_avail, &iter);
+ }
g_free(name);
}
@@ -167,8 +170,6 @@ static void edit_group_load_available_list_recurse(ItemFolder *folder, GtkTreeIt
GtkTreeIter iter;
GList *node;
- debug_print("edit_group_load_available_list_recurse: %s (id: %s)\n", ADDRITEM_NAME(folder), ADDRITEM_ID(folder));
-
model = gtk_tree_view_get_model(groupeditdlg.treeview_avail);
store = GTK_TREE_STORE(model);
@@ -190,21 +191,16 @@ static void edit_group_load_available_list_recurse(ItemFolder *folder, GtkTreeIt
node = g_list_next(node);
}
- debug_print("folder: %s (id: %s)\n", ADDRITEM_NAME(folder), ADDRITEM_ID(folder));
node = folder->listPerson;
while (node) {
if (ADDRITEM_TYPE(node->data) == ITEMTYPE_PERSON) {
GList *cur;
ItemPerson *person = (ItemPerson *)node->data;
- debug_print(" person: %s (id: %s)\n", ADDRITEM_NAME(person), ADDRITEM_ID(person));
cur = person->listEMail;
while (cur) {
ItemEMail *email = (ItemEMail *)cur->data;
if (!g_hash_table_lookup(table, ADDRITEM_ID(email))) {
- debug_print(" email: <%s>\n", email->address);
- edit_group_list_add_email(store, ADDRITEM_PARENT(folder) ? &iter: NULL, email);
- } else {
- debug_print(" email: <%s> is already in group\n", email->address);
+ edit_group_list_add_email(store, ADDRITEM_PARENT(folder) ? &iter : NULL, email);
}
cur = g_list_next(cur);
}