aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@src.gnome.org>2000-04-01 06:42:04 +0800
committerMiguel de Icaza <miguel@src.gnome.org>2000-04-01 06:42:04 +0800
commitcd8753df965d89d32d66e0ed4ba28311ac1f22eb (patch)
tree1b92961f281d041093fca19d42f55a25eace9bdc
parent1c3d76dfbd97c7c649c44631efd6bc06208ab249 (diff)
downloadgsoc2013-evolution-cd8753df965d89d32d66e0ed4ba28311ac1f22eb.tar.gz
gsoc2013-evolution-cd8753df965d89d32d66e0ed4ba28311ac1f22eb.tar.zst
gsoc2013-evolution-cd8753df965d89d32d66e0ed4ba28311ac1f22eb.zip
Love, part 3
svn path=/trunk/; revision=2273
-rw-r--r--widgets/e-table/e-table-config.c26
-rw-r--r--widgets/table/e-table-config.c26
2 files changed, 38 insertions, 14 deletions
diff --git a/widgets/e-table/e-table-config.c b/widgets/e-table/e-table-config.c
index c81eeecca0..d99bfea2f1 100644
--- a/widgets/e-table/e-table-config.c
+++ b/widgets/e-table/e-table-config.c
@@ -34,15 +34,14 @@ load_data (GladeXML *xml, char *label_widget, const char *content)
}
static char *
-get_fields (ETable *etable)
+get_fields (ETable *etable, xmlNode *xmlRoot)
{
- xmlNode *xmlRoot, *xmlColumns;
+ xmlNode *xmlColumns;
xmlNode *column;
GString *res;
char *s;
res = g_string_new ("");
- xmlRoot = xmlDocGetRootElement (etable->specification);
xmlColumns = e_xml_get_child_by_name (xmlRoot, "columns-shown");
for (column = xmlColumns->childs; column; column = column->next){
@@ -62,9 +61,19 @@ get_fields (ETable *etable)
}
static char *
-get_grouping (ETable *etable)
+get_grouping (ETable *etable, xmlNode *xmlRoot)
{
- return g_strdup ("None");
+ xmlNode *xmlGrouping;
+ GString *res;
+ char *s;
+
+ res = g_string_new ("");
+ xmlGrouping = e_xml_get_child_by_name (xmlRoot, "grouping");
+
+ s = res->str;
+ g_string_free (res, FALSE);
+
+ return s;
}
static char *
@@ -86,13 +95,16 @@ get_filter (ETable *etable)
static void
load_label_data (GladeXML *gui, ETable *etable)
{
+ xmlNode *xmlRoot;
char *s;
- s = get_fields (etable);
+ xmlRoot = xmlDocGetRootElement (etable->specification);
+
+ s = get_fields (etable, xmlRoot);
load_data (gui, "label1", s);
g_free (s);
- s = get_grouping (etable);
+ s = get_grouping (etable, xmlRoot);
load_data (gui, "label2", s);
g_free (s);
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index c81eeecca0..d99bfea2f1 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -34,15 +34,14 @@ load_data (GladeXML *xml, char *label_widget, const char *content)
}
static char *
-get_fields (ETable *etable)
+get_fields (ETable *etable, xmlNode *xmlRoot)
{
- xmlNode *xmlRoot, *xmlColumns;
+ xmlNode *xmlColumns;
xmlNode *column;
GString *res;
char *s;
res = g_string_new ("");
- xmlRoot = xmlDocGetRootElement (etable->specification);
xmlColumns = e_xml_get_child_by_name (xmlRoot, "columns-shown");
for (column = xmlColumns->childs; column; column = column->next){
@@ -62,9 +61,19 @@ get_fields (ETable *etable)
}
static char *
-get_grouping (ETable *etable)
+get_grouping (ETable *etable, xmlNode *xmlRoot)
{
- return g_strdup ("None");
+ xmlNode *xmlGrouping;
+ GString *res;
+ char *s;
+
+ res = g_string_new ("");
+ xmlGrouping = e_xml_get_child_by_name (xmlRoot, "grouping");
+
+ s = res->str;
+ g_string_free (res, FALSE);
+
+ return s;
}
static char *
@@ -86,13 +95,16 @@ get_filter (ETable *etable)
static void
load_label_data (GladeXML *gui, ETable *etable)
{
+ xmlNode *xmlRoot;
char *s;
- s = get_fields (etable);
+ xmlRoot = xmlDocGetRootElement (etable->specification);
+
+ s = get_fields (etable, xmlRoot);
load_data (gui, "label1", s);
g_free (s);
- s = get_grouping (etable);
+ s = get_grouping (etable, xmlRoot);
load_data (gui, "label2", s);
g_free (s);