[evolution-patches] Re: 44258: only show non-disabled columns
- From: Mike Kestner <mkestner ximian com>
- To: Evolution Patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] Re: 44258: only show non-disabled columns
- Date: 11 Jun 2003 10:54:41 -0500
With the patch this time.
On Wed, 2003-06-11 at 10:54, Mike Kestner wrote:
> The gal-view-etable uses e-table-config to select fields for the view.
> It was allowing fields marked disabled in the model to be added to the
> view, causing general mayhem with the tasks model. The
> e-table-field-chooser-item correctly ignored these columns, which meant
> the "Add a column" dialog was working correctly. This patch brings the
> two into synch.
>
> It also contains a couple of one liners to potentially clean up some
> warnings lewing was seeing and to guard against potential crashes in
> e-cell-text if the model returns NULL instead of an empty string.
>
> Mike
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/ChangeLog,v
retrieving revision 1.902
diff -u -p -r1.902 ChangeLog
--- ChangeLog 28 May 2003 21:32:52 -0000 1.902
+++ ChangeLog 11 Jun 2003 15:44:30 -0000
@@ -1,3 +1,11 @@
+2003-06-11 Mike Kestner <mkestner ximian com>
+
+ * e-cell-text.c (generate_layout): guard against NULL strings
+ * e-table-config.c (create_global_store): don't add disabled
+ column titles to the store. [44258]
+ * e-tree-table-adapter.c (e_t_t_a_node_set_expanded): don't
+ warn if we're trying to collapse a node that's not visible.
+
2003-05-28 Mike Kestner <mkestner ximian com>
* e-cell-date.c (ecd_get_text): use e_utf8_strftime_fix_am_pm
Index: e-cell-text.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-cell-text.c,v
retrieving revision 1.128
diff -u -p -r1.128 e-cell-text.c
--- e-cell-text.c 19 May 2003 18:37:12 -0000 1.128
+++ e-cell-text.c 11 Jun 2003 15:44:31 -0000
@@ -525,7 +525,7 @@ generate_layout (ECellTextView *text_vie
if (row >= 0) {
char *temp = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row);
- layout = build_layout (text_view, row, temp, width);
+ layout = build_layout (text_view, row, temp ? temp : "?", width);
e_cell_text_free_text(ect, temp);
} else
layout = build_layout (text_view, row, "Mumbo Jumbo", width);
Index: e-table-config.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-table-config.c,v
retrieving revision 1.56
diff -u -p -r1.56 e-table-config.c
--- e-table-config.c 6 May 2003 04:57:48 -0000 1.56
+++ e-table-config.c 11 Jun 2003 15:44:31 -0000
@@ -517,10 +517,13 @@ create_global_store (ETableConfig *confi
global_store = e_table_memory_store_new (store_columns);
for (i = 0; config->source_spec->columns[i]; i++) {
- char *text = g_strdup (dgettext (config->domain,
- config->source_spec->columns[i]->title));
- e_table_memory_store_insert_adopt (E_TABLE_MEMORY_STORE (global_store), i, NULL, text);
+ if (config->source_spec->columns[i]->disabled)
+ continue;
+
+ char *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, "", text);
}
}
Index: e-tree-table-adapter.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-tree-table-adapter.c,v
retrieving revision 1.55
diff -u -p -r1.55 e-tree-table-adapter.c
--- e-tree-table-adapter.c 16 May 2003 21:58:32 -0000 1.55
+++ e-tree-table-adapter.c 11 Jun 2003 15:44:32 -0000
@@ -1027,7 +1027,7 @@ e_tree_table_adapter_node_set_expanded (
node_t *node;
int row;
- if (!expanded && e_tree_model_node_is_root (etta->priv->source, path) && !etta->priv->root_visible)
+ if (!expanded && (!gnode || (e_tree_model_node_is_root (etta->priv->source, path) && !etta->priv->root_visible)))
return;
if (!gnode && expanded) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]