aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMike Kestner <mkestner@ximian.com>2003-09-12 05:14:00 +0800
committerMike Kestner <mkestner@src.gnome.org>2003-09-12 05:14:00 +0800
commit7fef481a7ac44ebaa98cfb39c106546345b23e43 (patch)
tree7e7b5c674e140180748d82deee6daf4d12c0c82a /widgets/table
parentf01f363a70ccc3a4f6ad62fd4fb58cca99d16457 (diff)
downloadgsoc2013-evolution-7fef481a7ac44ebaa98cfb39c106546345b23e43.tar.gz
gsoc2013-evolution-7fef481a7ac44ebaa98cfb39c106546345b23e43.tar.zst
gsoc2013-evolution-7fef481a7ac44ebaa98cfb39c106546345b23e43.zip
new method to get the source model column for a specified available_model
2003-09-11 Mike Kestner <mkestner@ximian.com> * e-table-config.c (get_source_model_col_index): new method to get the source model column for a specified available_model idx. (create_global_store): save the source model index in a new col. (config_button_add): use the new index lookup function [48153]. svn path=/trunk/; revision=22536
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-config.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 4881edb687..825e28a5a4 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -94,10 +94,8 @@ config_finalize (GObject *object)
static void
e_table_config_changed (ETableConfig *config, ETableState *state)
{
- g_return_if_fail (config != NULL);
g_return_if_fail (E_IS_TABLE_CONFIG (config));
-
g_signal_emit(G_OBJECT(config), e_table_config_signals [CHANGED], 0, state);
}
@@ -510,6 +508,7 @@ do_fields_config_dialog (ETableConfig *config)
ETableMemoryStoreColumnInfo store_columns[] = {
E_TABLE_MEMORY_STORE_STRING,
+ E_TABLE_MEMORY_STORE_INTEGER,
E_TABLE_MEMORY_STORE_TERMINATOR
};
@@ -529,7 +528,7 @@ create_global_store (ETableConfig *config)
continue;
text = g_strdup (dgettext (config->domain, config->source_spec->columns[i]->title));
- e_table_memory_store_insert_adopt (E_TABLE_MEMORY_STORE (global_store), -1, NULL, text);
+ e_table_memory_store_insert_adopt (E_TABLE_MEMORY_STORE (global_store), -1, NULL, text, i);
}
}
@@ -640,6 +639,17 @@ connect_button (ETableConfig *config, GladeXML *gui, const char *widget_name, GC
}
}
+static gint
+get_source_model_col_index (ETableConfig *config, gint idx)
+{
+ gint visible_index, result;
+ ETableModel *src_model = E_TABLE_SUBSET (config->available_model)->source;
+
+ visible_index = e_table_subset_view_to_model_row (E_TABLE_SUBSET (config->available_model), idx);
+
+ return GPOINTER_TO_INT (e_table_model_value_at (src_model, 1, visible_index));
+}
+
static void
sort_entry_changed (GtkEntry *entry, ETableConfigSortWidgets *sort)
{
@@ -882,7 +892,7 @@ config_button_add (GtkWidget *widget, ETableConfig *config)
config->temp_state->expansions = g_renew (double, config->temp_state->expansions, config->temp_state->col_count + count);
i = config->temp_state->col_count;
for (column = columns; column; column = column->next) {
- config->temp_state->columns[i] = e_table_subset_view_to_model_row (E_TABLE_SUBSET (config->available_model), GPOINTER_TO_INT (column->data));
+ config->temp_state->columns[i] = get_source_model_col_index (config, GPOINTER_TO_INT (column->data));
config->temp_state->expansions[i] = config->source_spec->columns[config->temp_state->columns[i]]->expansion;
i++;
}
>1-2/+2 * The FreeBSD GNOME team is proud to annunce the release of GNOME 2.22.0 formarcus2008-03-242-5/+5 * Presenting GNOME 2.20.1 and all related works for FreeBSD. The officialmarcus2007-10-252-6/+5 * Allow these ports to build with GCC 4.2.marcus2007-05-241-1/+1 * - Welcome X.org 7.2 \o/.flz2007-05-201-0/+1 * Presenting GNOME 2.18 for FreeBSD. GNOME 2.18 is a departure from recent GNOMEmarcus2007-03-192-5/+5 * Chase the GNOME X11BASE to LOCALBASE move, and fix the build with themarcus2006-10-142-7/+7 * Presenting GNOME 2.14.1 for FreeBSD! Checkoutmarcus2006-04-302-7/+6 * Conversion to a single libtool environment.ade2006-02-232-10/+3 * Switch to <target>:: convention for both patch-autotools and run-autotools,ade2005-11-191-1/+1 * - Update to 2.12.1bland2005-11-182-3/+4 * Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-151-1/+1 * Update to 2.12.0.marcus2005-11-052-3/+4 * Update to 2.10.0. Note: this release is API and ABI compatible withmarcus2005-03-122-6/+14 * Bump PORTREVISIONS for all ports that depend on atk or pango to ease in themarcus2004-11-081-0/+1 * Increase USE_GCC to 3.4 for those ports which compile with it.kris2004-09-301-1/+1 * USE_INTLTOOL_VER -> USE_INC_LIBTOOL_VER to let lthack actuallybland2004-08-17