aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-23 12:04:56 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-01-23 12:04:56 +0800
commit9acd121a93cf023501b48992ebe4341d4220301c (patch)
tree2506a9361c0043d7513d124abdd964467a750b98 /widgets/table/e-table-header.c
parent53d9c34bb570d65740de43f8a711dc6cc53d5977 (diff)
downloadgsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar.gz
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar.bz2
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar.lz
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar.xz
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar.zst
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.zip
Coding style and whitespace cleanups.
Diffstat (limited to 'widgets/table/e-table-header.c')
-rw-r--r--widgets/table/e-table-header.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index 8d382f5a92..e5587ab3e2 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -91,7 +91,8 @@ dequeue_idle (ETableHeader *eth)
gint column, width;
dequeue (eth, &column, &width);
- while (eth->change_queue && ((struct two_ints *) eth->change_queue->data)->column == column)
+ while (eth->change_queue && ((struct two_ints *)
+ eth->change_queue->data)->column == column)
dequeue (eth, &column, &width);
if (column == -1)
@@ -207,7 +208,9 @@ eth_set_property (GObject *object, guint prop_id, const GValue *val, GParamSpec
case PROP_SORT_INFO:
if (eth->sort_info) {
if (eth->sort_info_group_change_id)
- g_signal_handler_disconnect(G_OBJECT(eth->sort_info), eth->sort_info_group_change_id);
+ g_signal_handler_disconnect (
+ G_OBJECT(eth->sort_info),
+ eth->sort_info_group_change_id);
g_object_unref (eth->sort_info);
}
eth->sort_info = E_TABLE_SORT_INFO(g_value_get_object (val));
@@ -631,7 +634,9 @@ e_table_header_move (ETableHeader *eth, gint source_index, gint target_index)
g_return_if_fail (source_index >= 0);
g_return_if_fail (target_index >= 0);
g_return_if_fail (source_index < eth->col_count);
- g_return_if_fail (target_index < eth->col_count + 1); /* Can be moved beyond the last item. */
+
+ /* Can be moved beyond the last item. */
+ g_return_if_fail (target_index < eth->col_count + 1);
if (source_index < target_index)
target_index --;
@@ -769,7 +774,9 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
old_expansion = expansion;
old_expansion -= eth->columns[idx]->expansion;
/* Set the new expansion so that it will generate the desired size. */
- eth->columns[idx]->expansion = expansion * (((double)(size - (eth->columns[idx]->min_width + eth->width_extras)))/((double)total_extra));
+ eth->columns[idx]->expansion =
+ expansion * (((double)(size - (eth->columns[idx]->min_width +
+ eth->width_extras))) / ((double)total_extra));
/* The expansion left for the columns on the right. */
expansion -= eth->columns[idx]->expansion;
@@ -861,7 +868,9 @@ eth_calc_widths (ETableHeader *eth)
extra -= e_table_sort_info_grouping_get_count(eth->sort_info) * GROUP_INDENT;
if (expansion != 0 && extra > 0) {
for (i = 0; i < last_resizable; i++) {
- next_position += extra * (eth->columns[i]->resizable ? eth->columns[i]->expansion : 0)/expansion;
+ next_position +=
+ extra * (eth->columns[i]->resizable ?
+ eth->columns[i]->expansion : 0) / expansion;
widths[i] += next_position - last_position;
last_position = next_position;
}
@@ -927,7 +936,9 @@ e_table_header_prioritized_column (ETableHeader *eth)
}
ETableCol *
-e_table_header_prioritized_column_selected (ETableHeader *eth, ETableColCheckFunc check_func, gpointer user_data)
+e_table_header_prioritized_column_selected (ETableHeader *eth,
+ ETableColCheckFunc check_func,
+ gpointer user_data)
{
ETableCol *best_col = NULL;
gint best_priority = G_MININT;
@@ -940,7 +951,8 @@ e_table_header_prioritized_column_selected (ETableHeader *eth, ETableColCheckFun
for (i = 1; i < count; i++) {
ETableCol *col = e_table_header_get_column (eth, i);
if (col) {
- if ((best_col == NULL || col->priority > best_priority) && check_func (col, user_data)) {
+ if ((best_col == NULL || col->priority > best_priority)
+ && check_func (col, user_data)) {
best_priority = col->priority;
best_col = col;
}