diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2001-01-17 04:45:56 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-01-17 04:45:56 +0800 |
commit | c1c5688c54f8da7ee968f59132cc1878d0138f89 (patch) | |
tree | 41a6b137f47e3ace1c03f84f8267876752efe1c3 /widgets/table/e-table-state.c | |
parent | 4363b68c1c9140c4063c786926608ad58ff52f6d (diff) | |
download | gsoc2013-evolution-c1c5688c54f8da7ee968f59132cc1878d0138f89.tar.gz gsoc2013-evolution-c1c5688c54f8da7ee968f59132cc1878d0138f89.tar.zst gsoc2013-evolution-c1c5688c54f8da7ee968f59132cc1878d0138f89.zip |
Added a bit of documentation. (config_sort_config_show,
2001-01-16 Christopher James Lahey <clahey@helixcode.com>
* e-table-config.c: Added a bit of documentation.
(config_sort_config_show, config_group_config_show):
gnome_dialog_set_parent on the config->dialog_toplevel instead of
the config.
* e-table-specification: Pass "1.0" instead of NULL to xmlNewDoc
here.
* e-table-state.c, e-table-state.h: Pass "1.0" instead of NULL to
xmlNewDoc here. Make sure that sort_info is never NULL if this
object exists. Added ETableStateDuplicate.
svn path=/trunk/; revision=7542
Diffstat (limited to 'widgets/table/e-table-state.c')
-rw-r--r-- | widgets/table/e-table-state.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c index 91f1178a33..c9049b7a18 100644 --- a/widgets/table/e-table-state.c +++ b/widgets/table/e-table-state.c @@ -46,6 +46,7 @@ etst_init (ETableState *state) { state->columns = NULL; state->expansions = NULL; + state->sort_info = e_table_sort_info_new(); } E_MAKE_TYPE(e_table_state, "ETableState", ETableState, etst_class_init, etst_init, PARENT_TYPE); @@ -152,7 +153,7 @@ e_table_state_save_to_string (ETableState *state) int length; xmlDoc *doc; - doc = xmlNewDoc(NULL); + doc = xmlNewDoc("1.0"); xmlDocSetRootElement(doc, e_table_state_save_to_node(state, NULL)); xmlDocDumpMemory(doc, &string, &length); xmlFreeDoc(doc); @@ -192,3 +193,23 @@ e_table_state_save_to_node (ETableState *state, return node; } + +/** + * e_table_state_duplicate: + * @state: state to duplicate + * + * This creates a copy of the %ETableState @state + * + * Returns: The duplicated %ETableState. + */ +ETableState * +e_table_state_duplicate (ETableState *state) +{ + ETableState *new_state = e_table_state_new (); + char *state_str = e_table_state_save_to_string (state); + + printf ("This is the state: \n%s\n", state_str); + e_table_state_load_from_string (new_state, state_str); + + return new_state; +} |