[libgda/LIBGDA_4.2] GdauiRawGrid: handle column renaming



commit 720ec9b2a572eead524cf1a5240e6b6d6ff0bd45
Author: Vivien Malerba <malerba gnome-db org>
Date:   Tue Jan 24 18:30:54 2012 +0100

    GdauiRawGrid: handle column renaming

 libgda-ui/gdaui-raw-grid.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/libgda-ui/gdaui-raw-grid.c b/libgda-ui/gdaui-raw-grid.c
index 9d40f75..87d521c 100644
--- a/libgda-ui/gdaui-raw-grid.c
+++ b/libgda-ui/gdaui-raw-grid.c
@@ -2980,6 +2980,22 @@ paramlist_param_attr_changed_cb (G_GNUC_UNUSED GdaSet *paramlist, GdaHolder *par
 		}
 		create_tree_view_column (grid, cdata, pos);
 	}
+	else if (!strcmp (att_name, GDA_ATTRIBUTE_NAME)) {
+		ColumnData *cdata;
+		cdata = get_column_data_for_holder (grid, param);
+		if (!cdata)
+			return;
+		if (att_value) {
+			if (G_VALUE_TYPE (att_value) == G_TYPE_STRING) {
+				g_free (cdata->title);
+				cdata->title = g_value_dup_string (att_value);
+				gtk_tree_view_column_set_title (cdata->column, cdata->title);
+			}
+			else
+				g_warning (_("The '%s' attribute should be a G_TYPE_STRING value"),
+					   GDA_ATTRIBUTE_NAME);
+		}
+	}
 }
 
 static GError *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]