[Goodies-commits] r5797 - xfbib/branches/gobject/src
Jesper Karlsson
zarper at xfce.org
Fri Oct 24 23:13:51 CEST 2008
Author: zarper
Date: 2008-10-24 21:13:51 +0000 (Fri, 24 Oct 2008)
New Revision: 5797
Modified:
xfbib/branches/gobject/src/xfbib-multiple-input.c
Log:
Removed a bug where text strings other than Author and Editor where split up if they had the word 'and' in them.
Modified: xfbib/branches/gobject/src/xfbib-multiple-input.c
===================================================================
--- xfbib/branches/gobject/src/xfbib-multiple-input.c 2008-10-24 19:44:00 UTC (rev 5796)
+++ xfbib/branches/gobject/src/xfbib-multiple-input.c 2008-10-24 21:13:51 UTC (rev 5797)
@@ -223,15 +223,25 @@
{
GtkTreeModel *model;
GtkTreeIter iter;
+ GtkTreeViewColumn *column;
gchar **split = NULL;
+ const gchar *title;
gint n;
model = gtk_tree_view_get_model(GTK_TREE_VIEW (multiple_input->tree_view));
-
- split = g_strsplit(text, " and ", 0);
- for (n = 0; split[n] != NULL; n++) {
+
+ column = gtk_tree_view_get_column(GTK_TREE_VIEW(multiple_input->tree_view), 0);
+ title = gtk_tree_view_column_get_title(column);
+
+ if(strcasecmp(title, "author") == 0) {
+ split = g_strsplit(text, " and ", 0);
+ for (n = 0; split[n] != NULL; n++) {
+ gtk_list_store_append(GTK_LIST_STORE (model), &iter);
+ gtk_list_store_set(GTK_LIST_STORE (model), &iter, 0, split[n], -1);
+ }
+ } else {
gtk_list_store_append(GTK_LIST_STORE (model), &iter);
- gtk_list_store_set(GTK_LIST_STORE (model), &iter, 0, split[n], -1);
+ gtk_list_store_set(GTK_LIST_STORE (model), &iter, 0, text, -1);
}
}
More information about the Goodies-commits
mailing list