aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-preferences.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-07-07 01:26:47 +0800
committerIain Holmes <iain@src.gnome.org>2001-07-07 01:26:47 +0800
commitd78749b52160b46f3409963372113c786c0088e7 (patch)
treee7829fff58cd3abdbf2ff9b33bbb87e096139ac9 /my-evolution/e-summary-preferences.c
parent15aeda78aa5c7edd4e4c30a4f728290126b2e0bd (diff)
downloadgsoc2013-evolution-d78749b52160b46f3409963372113c786c0088e7.tar
gsoc2013-evolution-d78749b52160b46f3409963372113c786c0088e7.tar.gz
gsoc2013-evolution-d78749b52160b46f3409963372113c786c0088e7.tar.bz2
gsoc2013-evolution-d78749b52160b46f3409963372113c786c0088e7.tar.lz
gsoc2013-evolution-d78749b52160b46f3409963372113c786c0088e7.tar.xz
gsoc2013-evolution-d78749b52160b46f3409963372113c786c0088e7.tar.zst
gsoc2013-evolution-d78749b52160b46f3409963372113c786c0088e7.zip
Fix bad selection clist stuff
svn path=/trunk/; revision=10848
Diffstat (limited to 'my-evolution/e-summary-preferences.c')
-rw-r--r--my-evolution/e-summary-preferences.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c
index e134aeb868..0b66b231de 100644
--- a/my-evolution/e-summary-preferences.c
+++ b/my-evolution/e-summary-preferences.c
@@ -568,9 +568,11 @@ fill_rdf_shown_clist (GtkCList *clist,
for (p = pd->summary->preferences->rdf_urls; p; p = p->next) {
char *text[1];
+ int row;
text[0] = (char *) find_name_for_url (pd, p->data);
- gtk_clist_append (clist, text);
+ row = gtk_clist_append (clist, text);
+ gtk_clist_set_row_data (clist, row, p);
}
}
@@ -723,25 +725,28 @@ rdf_add_clicked_cb (GtkButton *button,
PropertyData *pd)
{
struct _RDFInfo *info;
- GList *p;
+ GList *p, *rows;
char *text[1];
int row;
- row = GPOINTER_TO_INT (GTK_CLIST (pd->rdf->all)->selection->data);
- info = gtk_clist_get_row_data (GTK_CLIST (pd->rdf->all), row);
-
- text[0] = info->name;
-
- for (p = pd->summary->preferences->rdf_urls; p; p = p->next) {
- if (strcmp (p->data, info->url) == 0) {
- /* Found it already */
- return;
+ for (rows = GTK_CLIST (pd->rdf->all)->selection; rows; rows = rows->next) {
+ row = GPOINTER_TO_INT (rows->data);
+ info = gtk_clist_get_row_data (GTK_CLIST (pd->rdf->all), row);
+
+ text[0] = info->name;
+
+ for (p = pd->summary->preferences->rdf_urls; p; p = p->next) {
+ if (strcmp (p->data, info->url) == 0) {
+ /* Found it already */
+ return;
+ }
}
+
+ pd->summary->preferences->rdf_urls = g_list_prepend (pd->summary->preferences->rdf_urls, g_strdup (info->url));
+ row = gtk_clist_prepend (GTK_CLIST (pd->rdf->shown), text);
+ gtk_clist_set_row_data (GTK_CLIST (pd->rdf->shown), row,
+ pd->summary->preferences->rdf_urls);
}
-
- pd->summary->preferences->rdf_urls = g_list_prepend (pd->summary->preferences->rdf_urls, g_strdup (info->url));
- gtk_clist_prepend (GTK_CLIST (pd->rdf->shown), text);
-
gnome_property_box_changed (pd->box);
}
@@ -753,9 +758,9 @@ rdf_remove_clicked_cb (GtkButton *button,
int row;
row = GPOINTER_TO_INT (GTK_CLIST (pd->rdf->shown)->selection->data);
+ p = gtk_clist_get_row_data (GTK_CLIST (pd->rdf->shown), row);
gtk_clist_remove (GTK_CLIST (pd->rdf->shown), row);
-
- p = g_list_nth (pd->summary->preferences->rdf_urls, row);
+
pd->summary->preferences->rdf_urls = g_list_remove_link (pd->summary->preferences->rdf_urls, p);
g_free (p->data);
g_list_free (p);