Document allow-grouping attribute.
2001-10-26 Christopher James Lahey <clahey@ximian.com> * docs/etablexml.txt: Document allow-grouping attribute. * tests/test-table-1.c (SPEC): Updated this to test the allow_grouping=\"false\" attribute. From gal/e-table/ChangeLog: 2001-10-26 Christopher James Lahey <clahey@ximian.com> * e-table-config.c (config_group_info_update, config_fields_info_update): Added some checks for NULL labels here. * e-table-specification.c, e-table-specification.h: Added allow_grouping field. Fixes Ximian bug #13412. * e-table.c, e-table.h: Added allow_grouping field. Set this field for the sort infos from state objects. svn path=/trunk/; revision=14134
This commit is contained in:

committed by
Chris Lahey

parent
15555e2bdb
commit
b0ab0a15e0
@ -285,6 +285,9 @@ config_group_info_update (ETableConfig *config)
|
||||
GString *res;
|
||||
int count, i;
|
||||
|
||||
if (!e_table_sort_info_get_can_group (info))
|
||||
return;
|
||||
|
||||
count = e_table_sort_info_grouping_get_count (info);
|
||||
res = g_string_new ("");
|
||||
|
||||
@ -322,6 +325,8 @@ config_fields_info_update (ETableConfig *config)
|
||||
GString *res = g_string_new ("");
|
||||
int i;
|
||||
|
||||
return;
|
||||
|
||||
for (i = 0; i < config->state->col_count; i++){
|
||||
for (column = config->source_spec->columns; *column; column++){
|
||||
|
||||
@ -403,13 +408,13 @@ do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
|
||||
config_group_info_update (config);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static GtkWidget *
|
||||
GtkWidget *e_table_proxy_etable_new (void);
|
||||
|
||||
GtkWidget *
|
||||
e_table_proxy_etable_new (void)
|
||||
{
|
||||
return gtk_label_new ("Waiting for the ETable/ETree\nmerger to be commited");
|
||||
return gtk_label_new ("Field selection dialog not\nimplemented here yet.");
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
config_button_fields (GtkWidget *widget, ETableConfig *config)
|
||||
|
@ -70,6 +70,7 @@ etsp_init (ETableSpecification *etsp)
|
||||
etsp->vertical_draw_grid = FALSE;
|
||||
etsp->draw_focus = TRUE;
|
||||
etsp->horizontal_scrolling = FALSE;
|
||||
etsp->allow_grouping = TRUE;
|
||||
|
||||
etsp->cursor_mode = E_CURSOR_SIMPLE;
|
||||
etsp->selection_mode = GTK_SELECTION_MULTIPLE;
|
||||
@ -177,6 +178,7 @@ e_table_specification_load_from_node (ETableSpecification *specification,
|
||||
}
|
||||
specification->draw_focus = e_xml_get_bool_prop_by_name_with_default (node, "draw-focus", TRUE);
|
||||
specification->horizontal_scrolling = e_xml_get_bool_prop_by_name_with_default (node, "horizontal-scrolling", FALSE);
|
||||
specification->allow_grouping = e_xml_get_bool_prop_by_name_with_default (node, "allow-grouping", TRUE);
|
||||
|
||||
specification->selection_mode = GTK_SELECTION_MULTIPLE;
|
||||
temp = e_xml_get_string_prop_by_name (node, "selection-mode");
|
||||
@ -223,6 +225,7 @@ e_table_specification_load_from_node (ETableSpecification *specification,
|
||||
} else if (specification->state == NULL && !strcmp (children->name, "ETableState")) {
|
||||
specification->state = e_table_state_new ();
|
||||
e_table_state_load_from_node (specification->state, children);
|
||||
e_table_sort_info_set_can_group (specification->state->sort_info, specification->allow_grouping);
|
||||
}
|
||||
}
|
||||
|
||||
@ -319,6 +322,7 @@ e_table_specification_save_to_node (ETableSpecification *specification,
|
||||
e_xml_set_bool_prop_by_name (node, "vertical-draw-grid", specification->vertical_draw_grid);
|
||||
e_xml_set_bool_prop_by_name (node, "draw-focus", specification->draw_focus);
|
||||
e_xml_set_bool_prop_by_name (node, "horizontal-scrolling", specification->horizontal_scrolling);
|
||||
e_xml_set_bool_prop_by_name (node, "allow-grouping", specification->allow_grouping);
|
||||
|
||||
switch (specification->selection_mode){
|
||||
case GTK_SELECTION_SINGLE:
|
||||
|
@ -33,6 +33,7 @@ typedef struct {
|
||||
guint vertical_draw_grid : 1;
|
||||
guint draw_focus : 1;
|
||||
guint horizontal_scrolling : 1;
|
||||
guint allow_grouping : 1;
|
||||
GtkSelectionMode selection_mode;
|
||||
ECursorMode cursor_mode;
|
||||
|
||||
|
@ -896,6 +896,7 @@ e_table_set_state_object(ETable *e_table, ETableState *state)
|
||||
}
|
||||
if (state->sort_info) {
|
||||
e_table->sort_info = e_table_sort_info_duplicate(state->sort_info);
|
||||
e_table_sort_info_set_can_group (e_table->sort_info, e_table->allow_grouping);
|
||||
e_table->group_info_change_id =
|
||||
gtk_signal_connect (GTK_OBJECT (e_table->sort_info),
|
||||
"group_info_changed",
|
||||
@ -1087,9 +1088,11 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
|
||||
|
||||
e_table->header = e_table_state_to_header (GTK_WIDGET(e_table), e_table->full_header, state);
|
||||
e_table->horizontal_scrolling = specification->horizontal_scrolling;
|
||||
e_table->allow_grouping = specification->allow_grouping;
|
||||
|
||||
e_table->sort_info = state->sort_info;
|
||||
gtk_object_ref (GTK_OBJECT (state->sort_info));
|
||||
e_table_sort_info_set_can_group (e_table->sort_info, e_table->allow_grouping);
|
||||
|
||||
e_table->group_info_change_id =
|
||||
gtk_signal_connect (GTK_OBJECT (e_table->sort_info), "group_info_changed",
|
||||
|
@ -90,6 +90,7 @@ typedef struct {
|
||||
guint do_drag : 1;
|
||||
|
||||
guint uniform_row_height : 1;
|
||||
guint allow_grouping : 1;
|
||||
|
||||
char *click_to_add_message;
|
||||
GnomeCanvasItem *click_to_add;
|
||||
|
Reference in New Issue
Block a user