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 | |
parent | ce6bceaadc100469339cb0ca075c2760b99b30dd (diff) | |
download | gsoc2013-evolution-7728dbda7d5a4f1fb89e0a70c6db7cf9b5fdd06c.tar gsoc2013-evolution-7728dbda7d5a4f1fb89e0a70c6db7cf9b5fdd06c.tar.gz gsoc2013-evolution-7728dbda7d5a4f1fb89e0a70c6db7cf9b5fdd06c.tar.bz2 gsoc2013-evolution-7728dbda7d5a4f1fb89e0a70c6db7cf9b5fdd06c.tar.lz gsoc2013-evolution-7728dbda7d5a4f1fb89e0a70c6db7cf9b5fdd06c.tar.xz 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')
-rw-r--r-- | my-evolution/ChangeLog | 5 | ||||
-rw-r--r-- | my-evolution/e-summary-preferences.c | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index 0f05fe2bbe..5ce33ade93 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,5 +1,10 @@ 2001-09-18 Iain Holmes <iain@ximian.com> + * e-summary-preferences.c (mail_add_clicked_cb): Don't add folders that + are already in the list + +2001-09-18 Iain Holmes <iain@ximian.com> + * e-summary-rdf.c (display_doc): Verbose error reporting. (read_callback): Same. (open_callback): Same. 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); |