aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@ximian.com>2001-01-15 15:57:36 +0800
committerMiguel de Icaza <miguel@src.gnome.org>2001-01-15 15:57:36 +0800
commit8da5139f16e9488604b215569f22834a7ed628e9 (patch)
tree37434bd271af68353b381939e3e5a11b041cb613 /widgets/table
parentb64ffc9183d2c94ce6b8fdf10f382904aa8021e8 (diff)
downloadgsoc2013-evolution-8da5139f16e9488604b215569f22834a7ed628e9.tar
gsoc2013-evolution-8da5139f16e9488604b215569f22834a7ed628e9.tar.gz
gsoc2013-evolution-8da5139f16e9488604b215569f22834a7ed628e9.tar.bz2
gsoc2013-evolution-8da5139f16e9488604b215569f22834a7ed628e9.tar.lz
gsoc2013-evolution-8da5139f16e9488604b215569f22834a7ed628e9.tar.xz
gsoc2013-evolution-8da5139f16e9488604b215569f22834a7ed628e9.tar.zst
gsoc2013-evolution-8da5139f16e9488604b215569f22834a7ed628e9.zip
Make output pretier by using newlines when there is a lot of information
2001-01-15 Miguel de Icaza <miguel@ximian.com> * e-table-config.c (config_fields_info_update): Make output pretier by using newlines when there is a lot of information to display. (config_group_info_update): ditto. (config_sort_info_update): ditto. svn path=/trunk/; revision=7497
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-config.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index c0fa629019..eec0de388f 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -123,7 +123,7 @@ config_sort_info_update (ETableConfig *config)
{
ETableSortInfo *info = config->state->sort_info;
GString *res;
- int count, i;
+ int count, i, items = 0;
count = e_table_sort_info_sorting_get_count (info);
res = g_string_new ("");
@@ -140,6 +140,9 @@ config_sort_info_update (ETableConfig *config)
res,
col.ascending ?
_("(Ascending)") : _("(Descending)"));
+ items++;
+ if (items > 4)
+ g_string_append_c (res, '\n');
break;
}
}
@@ -157,7 +160,7 @@ config_group_info_update (ETableConfig *config)
{
ETableSortInfo *info = config->state->sort_info;
GString *res;
- int count, i;
+ int count, i, items = 0;
count = e_table_sort_info_grouping_get_count (info);
res = g_string_new ("");
@@ -174,6 +177,11 @@ config_group_info_update (ETableConfig *config)
res,
col.ascending ?
_("(Ascending)") : _("(Descending)"));
+
+ items++;
+ if (items > 4)
+ g_string_append_c (res, '\n');
+ break;
}
}
}
@@ -189,11 +197,16 @@ config_fields_info_update (ETableConfig *config)
{
ETableColumnSpecification **column;
GString *res = g_string_new ("");
-
+ int items = 0;
+
for (column = config->spec->columns; *column; *column++){
g_string_append (res, (*column)->title_);
if (column [1])
g_string_append (res, ", ");
+ items++;
+
+ if (items > 5)
+ g_string_append_c (res, '\n');
}
gtk_label_set_text (GTK_LABEL (config->fields_label), res->str);