Exemplo n.º 1
0
static gpointer
etss_duplicate_value (ETableModel *etm,
                      gint col,
                      gconstpointer value)
{
	ETableSubset *etss = (ETableSubset *) etm;

	return e_table_model_duplicate_value (etss->source, col, value);
}
Exemplo n.º 2
0
static void
one_set_value_at (ETableModel *etm, int col, int row, const void *val)
{
	ETableOne *one = E_TABLE_ONE(etm);

	if (one->data && one->source) {
		e_table_model_free_value(one->source, col, one->data[col]);
		one->data[col] = e_table_model_duplicate_value(one->source, col, val);
	}
}
Exemplo n.º 3
0
/* The default for one_duplicate_value is to return the raw value. */
static void *
one_duplicate_value (ETableModel *etm, int col, const void *value)
{
	ETableOne *one = E_TABLE_ONE(etm);

	if (one->source)
		return e_table_model_duplicate_value(one->source, col, value);
	else
		return (void *)value;
}
static ETableGroupContainerChildNode *
create_child_node (ETableGroupContainer *etgc, void *val)
{
	ETableGroup *child;
	ETableGroupContainerChildNode *child_node;
	ETableGroup *etg = E_TABLE_GROUP(etgc);

	child_node = g_new (ETableGroupContainerChildNode, 1);
	child_node->rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP (etgc),
						  gnome_canvas_rect_get_type (),
						  "fill_color", "grey70",
						  "outline_color", "grey50",
						  NULL);
	child_node->text = gnome_canvas_item_new (GNOME_CANVAS_GROUP (etgc),
						  e_text_get_type (),
						  "anchor", GTK_ANCHOR_SW,
						  "fill_color", "black",
						  "draw_background", FALSE,
						  NULL);
	child = e_table_group_new (GNOME_CANVAS_GROUP (etgc), etg->full_header,
				   etg->header, etg->model, etgc->sort_info, etgc->n + 1);
	gnome_canvas_item_set(GNOME_CANVAS_ITEM(child),
			      "alternating_row_colors", etgc->alternating_row_colors,
			      "horizontal_draw_grid", etgc->horizontal_draw_grid,
			      "vertical_draw_grid", etgc->vertical_draw_grid,
			      "drawfocus", etgc->draw_focus,
			      "cursor_mode", etgc->cursor_mode,
			      "selection_model", etgc->selection_model,
			      "length_threshold", etgc->length_threshold,
			      "uniform_row_height", etgc->uniform_row_height,
			      "minimum_width", etgc->minimum_width - GROUP_INDENT,
			      NULL);

	g_signal_connect (child, "cursor_change",
			  G_CALLBACK (child_cursor_change), etgc);
	g_signal_connect (child, "cursor_activated",
			  G_CALLBACK (child_cursor_activated), etgc);
	g_signal_connect (child, "double_click",
			  G_CALLBACK (child_double_click), etgc);
	g_signal_connect (child, "right_click",
			  G_CALLBACK (child_right_click), etgc);
	g_signal_connect (child, "click",
			  G_CALLBACK (child_click), etgc);
	g_signal_connect (child, "key_press",
			  G_CALLBACK (child_key_press), etgc);
	g_signal_connect (child, "start_drag",
			  G_CALLBACK (child_start_drag), etgc);
	child_node->child = child;
	child_node->key = e_table_model_duplicate_value (etg->model, etgc->ecol->col_idx, val);
	child_node->string = e_table_model_value_to_string (etg->model, etgc->ecol->col_idx, val);
	child_node->count = 0;

	return child_node;
}