diff options
Diffstat (limited to 'my-evolution/e-summary-preferences.c')
-rw-r--r-- | my-evolution/e-summary-preferences.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c index b289bb170d..43484c26be 100644 --- a/my-evolution/e-summary-preferences.c +++ b/my-evolution/e-summary-preferences.c @@ -688,13 +688,22 @@ mail_add_clicked_cb (GtkButton *button, int row; ESummaryMailRowData *rd; char *text[1]; + GList *p; row = GPOINTER_TO_INT (GTK_CLIST (pd->mail->all)->selection->data); rd = gtk_clist_get_row_data (GTK_CLIST (pd->mail->all), row); g_return_if_fail (rd != NULL); - + + for (p = pd->summary->preferences->display_folders; p; p = p->next) { + if (strcmp (rd->uri + 7, p->data) == 0) { + /* Already in list */ + return; + } + } + text[0] = rd->name + 1; row = gtk_clist_append (GTK_CLIST (pd->mail->shown), text); + pd->summary->preferences->display_folders = g_list_prepend (pd->summary->preferences->display_folders, g_strdup (rd->uri + 7)); gtk_clist_set_row_data (GTK_CLIST (pd->mail->shown), row, pd->summary->preferences->display_folders); |