aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
diff options
context:
space:
mode:
Diffstat (limited to 'my-evolution')
-rw-r--r--my-evolution/ChangeLog5
-rw-r--r--my-evolution/e-summary-preferences.c11
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);