diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-09-19 06:40:28 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-09-19 06:40:28 +0800 |
commit | 7728dbda7d5a4f1fb89e0a70c6db7cf9b5fdd06c (patch) | |
tree | 88e3faf53c35f241d31b404a72aedd1ddcfc8074 /my-evolution/e-summary-preferences.c | |
parent | ce6bceaadc100469339cb0ca075c2760b99b30dd (diff) | |
download | gsoc2013-evolution-7728dbda7d5a4f1fb89e0a70c6db7cf9b5fdd06c.tar.gz gsoc2013-evolution-7728dbda7d5a4f1fb89e0a70c6db7cf9b5fdd06c.tar.zst gsoc2013-evolution-7728dbda7d5a4f1fb89e0a70c6db7cf9b5fdd06c.zip |
Don't add folders multiple times
svn path=/trunk/; revision=12960
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); |