aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-08 00:22:36 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:10 +0800
commit578214584caa7805edca09b27e2306dc31d80fb6 (patch)
treedfa18882e01b362a721fd47bd901538bc5e3a9c4 /widgets
parent30fe010cffa6f290170147ea9a8b617d04fab39d (diff)
downloadgsoc2013-evolution-578214584caa7805edca09b27e2306dc31d80fb6.tar.gz
gsoc2013-evolution-578214584caa7805edca09b27e2306dc31d80fb6.tar.zst
gsoc2013-evolution-578214584caa7805edca09b27e2306dc31d80fb6.zip
Whitespace and coding style cleanups.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c3
-rw-r--r--widgets/misc/e-calendar-item.c3
-rw-r--r--widgets/misc/e-dateedit.c3
-rw-r--r--widgets/misc/e-map.c4
-rw-r--r--widgets/misc/ea-calendar-cell.c3
-rw-r--r--widgets/misc/ea-calendar-item.c3
-rw-r--r--widgets/table/e-cell-date.c4
-rw-r--r--widgets/table/e-table-config.c7
-rw-r--r--widgets/table/e-table-field-chooser-item.c3
-rw-r--r--widgets/table/e-table-header-item.c10
-rw-r--r--widgets/table/e-table-header-utils.c4
-rw-r--r--widgets/table/e-table-header.c7
-rw-r--r--widgets/table/e-table-search.c6
-rw-r--r--widgets/table/e-table.c6
-rw-r--r--widgets/table/e-tree.c10
-rw-r--r--widgets/table/gal-a11y-e-table-item.c6
-rw-r--r--widgets/text/e-text-model.c3
-rw-r--r--widgets/text/e-text.c19
-rw-r--r--widgets/text/gal-a11y-e-text.c9
19 files changed, 78 insertions, 35 deletions
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index ca77c5af5c..26cfdea4ec 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -772,7 +772,8 @@ on_combo_changed (GtkComboBox *combo_box, ETimezoneDialog *etd)
priv = etd->priv;
- timezone_combo_get_active_text (GTK_COMBO_BOX (priv->timezone_combo), &new_zone_name);
+ timezone_combo_get_active_text (
+ GTK_COMBO_BOX (priv->timezone_combo), &new_zone_name);
if (!*new_zone_name)
priv->zone = NULL;
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index c76a9fa62e..aa666f5267 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -3211,7 +3211,8 @@ e_calendar_item_ensure_days_visible (ECalendarItem *calitem,
&current_end_month);
/* Try to ensure that the end month is shown. */
- if ((end_year == current_end_year + 1 && current_end_month == 11 && end_month == 0) ||
+ if ((end_year == current_end_year + 1 &&
+ current_end_month == 11 && end_month == 0) ||
(end_year == current_end_year && end_month == current_end_month + 1)) {
/* See if the end of the selection will fit in the
leftover days of the month after the last one shown. */
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 4e704bd39a..881f1f332c 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -1978,7 +1978,8 @@ e_date_edit_update_time_entry (EDateEdit *dedit)
/* This is a strftime() format. %H = hour (0-23), %M = minute. */
e_time_format_time (&tmp_tm, 1, 0, buffer, sizeof (buffer));
else
- /* This is a strftime() format. %I = hour (1-12), %M = minute, %p = am/pm string. */
+ /* This is a strftime() format. %I = hour (1-12),
+ * %M = minute, %p = am/pm string. */
e_time_format_time (&tmp_tm, 0, 0, buffer, sizeof (buffer));
/* For 12-hour am/pm format, we want space padding, not zero padding. This
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 405a55d686..6b90887ffc 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -973,7 +973,9 @@ e_map_zoom_out (EMap *map)
e_map_set_zoom (map, E_MAP_ZOOMED_OUT);
center_at (map, longitude, latitude);
- e_map_tween_new_from (map, E_MAP_TWEEN_DURATION_MSECS, longitude, latitude, prevzoom);
+ e_map_tween_new_from (
+ map, E_MAP_TWEEN_DURATION_MSECS,
+ longitude, latitude, prevzoom);
}
void
diff --git a/widgets/misc/ea-calendar-cell.c b/widgets/misc/ea-calendar-cell.c
index 2915a6cd04..cff30af4d8 100644
--- a/widgets/misc/ea-calendar-cell.c
+++ b/widgets/misc/ea-calendar-cell.c
@@ -377,7 +377,8 @@ component_interface_grab_focus (AtkComponent *component)
atk_selection_add_selection (ATK_SELECTION (ea_calitem), index);
gtk_widget_grab_focus (GTK_WIDGET (GNOME_CANVAS_ITEM (calitem)->canvas));
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (GNOME_CANVAS_ITEM (calitem)->canvas));
+ toplevel = gtk_widget_get_toplevel (
+ GTK_WIDGET (GNOME_CANVAS_ITEM (calitem)->canvas));
if (toplevel && gtk_widget_is_toplevel (toplevel))
gtk_window_present (GTK_WINDOW (toplevel));
diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c
index e9977bf01e..6179d45551 100644
--- a/widgets/misc/ea-calendar-item.c
+++ b/widgets/misc/ea-calendar-item.c
@@ -1306,7 +1306,8 @@ ea_calendar_set_focus_object (EaCalendarItem *ea_calitem, AtkObject *item_cell)
AtkStateSet *state_set, *old_state_set;
AtkObject *old_cell;
- old_cell = (AtkObject *)g_object_get_data (G_OBJECT(ea_calitem), "gail-focus-object");
+ old_cell = (AtkObject *)g_object_get_data (
+ G_OBJECT(ea_calitem), "gail-focus-object");
if (old_cell && EA_IS_CALENDAR_CELL (old_cell)) {
old_state_set = atk_object_ref_state_set (old_cell);
atk_state_set_remove_state (old_state_set, ATK_STATE_FOCUSED);
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c
index c4a4cf3103..9040f80ccd 100644
--- a/widgets/table/e-cell-date.c
+++ b/widgets/table/e-cell-date.c
@@ -51,7 +51,9 @@ ecd_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
fmt_component = "Default";
else
fmt_part = "table";
- return e_datetime_format_format (fmt_component, fmt_part, DTFormatKindDateTime, date);
+
+ return e_datetime_format_format (
+ fmt_component, fmt_part, DTFormatKindDateTime, date);
}
static void
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 62db1d32b1..490072cf80 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -621,8 +621,11 @@ create_store (ETableConfig *config)
if (config->source_spec->columns[i]->disabled)
continue;
- text = g_strdup (dgettext (config->domain, config->source_spec->columns[i]->title));
- e_table_memory_store_insert_adopt (E_TABLE_MEMORY_STORE (store), -1, NULL, text, i);
+ text = g_strdup (dgettext (
+ config->domain,
+ config->source_spec->columns[i]->title));
+ e_table_memory_store_insert_adopt (
+ E_TABLE_MEMORY_STORE (store), -1, NULL, text, i);
}
return store;
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index 51ab6c1139..6afde43911 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -135,7 +135,8 @@ etfci_rebuild_combined (ETableFieldChooserItem *etfci)
ETableCol *ecol = e_table_header_get_column (etfci->full_header, i);
if (ecol->disabled)
continue;
- if (!(GPOINTER_TO_INT (g_hash_table_lookup (hash, GINT_TO_POINTER (ecol->col_idx)))))
+ if (!(GPOINTER_TO_INT (g_hash_table_lookup (
+ hash, GINT_TO_POINTER (ecol->col_idx)))))
e_table_header_add_column (etfci->combined_header, ecol, -1);
}
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 2bbd5c83d2..346ffed2d3 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -873,7 +873,8 @@ ethi_drag_drop (GtkWidget *canvas,
ethi->drop_col = col;
if (col != -1) {
- gchar *target = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code);
+ gchar *target = g_strdup_printf (
+ "%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code);
d(g_print ("ethi - %s\n", target));
gtk_drag_get_data (canvas, context, gdk_atom_intern (target, FALSE), time);
g_free (target);
@@ -986,7 +987,9 @@ ethi_draw (GnomeCanvasItem *item,
gint length = e_table_sort_info_grouping_get_count (ethi->sort_info);
gint i;
for (i = 0; i < length; i++) {
- ETableSortColumn column = e_table_sort_info_grouping_get_nth (ethi->sort_info, i);
+ ETableSortColumn column =
+ e_table_sort_info_grouping_get_nth (
+ ethi->sort_info, i);
g_hash_table_insert (arrows,
GINT_TO_POINTER ((gint) column.column),
GINT_TO_POINTER (column.ascending ?
@@ -1925,7 +1928,8 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
ecol = e_table_header_get_column (ethi->eth, ethi->selected_col);
ethi_change_sort_state (ethi, ecol);
- } else if ((e->key.keyval == GDK_KEY_Right) || (e->key.keyval == GDK_KEY_KP_Right)) {
+ } else if ((e->key.keyval == GDK_KEY_Right) ||
+ (e->key.keyval == GDK_KEY_KP_Right)) {
ETableCol *ecol;
if ((ethi->selected_col < 0) || (ethi->selected_col >= ethi->eth->col_count - 1))
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index 2fe6a56089..8911867652 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -124,7 +124,9 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc,
pheight = gdk_pixbuf_get_height (pixbuf);
g_return_val_if_fail (width <= pwidth && height <= pheight, NULL);
- color = ((bg->red & 0xff00) << 8) | (bg->green & 0xff00) | ((bg->blue & 0xff00) >> 8);
+ color = ((bg->red & 0xff00) << 8) |
+ (bg->green & 0xff00) |
+ ((bg->blue & 0xff00) >> 8);
if (width >= pwidth && height >= pheight) {
tmp = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index f648a8d765..ef1b573346 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -121,7 +121,9 @@ enqueue (ETableHeader *eth, gint column, gint width)
eth->change_queue = eth->change_tail;
if (!eth->idle) {
- eth->idle = g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc) dequeue_idle, eth, NULL);
+ eth->idle = g_idle_add_full (
+ G_PRIORITY_LOW, (GSourceFunc)
+ dequeue_idle, eth, NULL);
}
}
@@ -714,7 +716,8 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
usable_width = eth->width - left_width - 1;
if (eth->sort_info)
- usable_width -= e_table_sort_info_grouping_get_count (eth->sort_info) * GROUP_INDENT;
+ usable_width -= e_table_sort_info_grouping_get_count (
+ eth->sort_info) * GROUP_INDENT;
/* Calculate minimum_width of stuff on the right as well as
* total usable expansion on the right.
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index 538dcc4f1a..cf7edf3592 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -183,8 +183,10 @@ e_table_search_input_character (ETableSearch *ets, gunichar character)
character_utf8[g_unichar_to_utf8 (character, character_utf8)] = 0;
temp_string = g_strdup_printf ("%s%s", ets->priv->search_string, character_utf8);
- if (e_table_search_search (ets, temp_string,
- ets->priv->last_character != 0 ? E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST : 0)) {
+ if (e_table_search_search (
+ ets, temp_string,
+ ets->priv->last_character != 0 ?
+ E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST : 0)) {
g_free (ets->priv->search_string);
ets->priv->search_string = temp_string;
add_timeout (ets);
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 70b973c5b3..38ede4dd80 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -1962,7 +1962,8 @@ et_build_grouping_spec (ETable *e_table)
node = grouping;
for (i = 0; i < group_count; i++) {
- ETableSortColumn column = e_table_sort_info_grouping_get_nth (e_table->sort_info, i);
+ ETableSortColumn column =
+ e_table_sort_info_grouping_get_nth (e_table->sort_info, i);
xmlNode *new_node = xmlNewChild(node, NULL, "group", NULL);
e_xml_set_integer_prop_by_name (new_node, "column", column.column);
@@ -1971,7 +1972,8 @@ et_build_grouping_spec (ETable *e_table)
}
for (i = 0; i < sort_count; i++) {
- ETableSortColumn column = e_table_sort_info_sorting_get_nth (e_table->sort_info, i);
+ ETableSortColumn column =
+ e_table_sort_info_sorting_get_nth (e_table->sort_info, i);
xmlNode *new_node = xmlNewChild(node, NULL, "leaf", NULL);
e_xml_set_integer_prop_by_name (new_node, "column", column.column);
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 040881c857..d9b6ce4035 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -2967,7 +2967,8 @@ scroll_timeout (gpointer data)
static void
scroll_on (ETree *et, guint scroll_direction)
{
- if (et->priv->scroll_idle_id == 0 || scroll_direction != et->priv->scroll_direction) {
+ if (et->priv->scroll_idle_id == 0 ||
+ scroll_direction != et->priv->scroll_direction) {
if (et->priv->scroll_idle_id != 0)
g_source_remove (et->priv->scroll_idle_id);
et->priv->scroll_direction = scroll_direction;
@@ -3041,7 +3042,8 @@ collapse_drag (ETree *et, ETreePath drop)
{
GList *list;
- /* We only want to leave open parents of the node dropped in. Not the node itself. */
+ /* We only want to leave open parents of the node dropped in.
+ * Not the node itself. */
if (drop) {
drop = e_tree_model_node_get_parent (et->priv->model, drop);
}
@@ -3097,7 +3099,9 @@ context_connect (ETree *et, GdkDragContext *context)
return;
if (et->priv->last_drop_context)
- g_object_weak_unref (G_OBJECT (et->priv->last_drop_context), context_destroyed, et);
+ g_object_weak_unref (
+ G_OBJECT (et->priv->last_drop_context),
+ context_destroyed, et);
else
g_object_ref (et);
diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c
index f35eeb1a69..92716e68bc 100644
--- a/widgets/table/gal-a11y-e-table-item.c
+++ b/widgets/table/gal-a11y-e-table-item.c
@@ -188,7 +188,8 @@ eti_a11y_reset_focus_object (GalA11yETableItem *a11y,
old_cell = (AtkObject *)g_object_get_data (G_OBJECT (a11y), "gail-focus-object");
if (old_cell && GAL_A11Y_IS_E_CELL (old_cell))
- gal_a11y_e_cell_remove_state (GAL_A11Y_E_CELL (old_cell), ATK_STATE_FOCUSED, FALSE);
+ gal_a11y_e_cell_remove_state (
+ GAL_A11Y_E_CELL (old_cell), ATK_STATE_FOCUSED, FALSE);
if (old_cell)
g_object_unref (old_cell);
@@ -196,7 +197,8 @@ eti_a11y_reset_focus_object (GalA11yETableItem *a11y,
if (cell != NULL) {
g_object_set_data (G_OBJECT (a11y), "gail-focus-object", cell);
- gal_a11y_e_cell_add_state (GAL_A11Y_E_CELL (cell), ATK_STATE_FOCUSED, FALSE);
+ gal_a11y_e_cell_add_state (
+ GAL_A11Y_E_CELL (cell), ATK_STATE_FOCUSED, FALSE);
} else
g_object_set_data (G_OBJECT (a11y), "gail-focus-object", NULL);
diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c
index 8641bf1527..bb8669d9e8 100644
--- a/widgets/text/e-text-model.c
+++ b/widgets/text/e-text-model.c
@@ -208,7 +208,8 @@ e_text_model_real_set_text (ETextModel *model, const gchar *text)
g_string_set_size (model->priv->text, 0);
- } else if (*model->priv->text->str == '\0' || strcmp (model->priv->text->str, text)) {
+ } else if (*model->priv->text->str == '\0' ||
+ strcmp (model->priv->text->str, text)) {
g_string_assign (model->priv->text, text);
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 9801132684..0b9f7f149f 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -360,8 +360,10 @@ reset_layout_attrs (EText *text)
e_text_model_get_nth_object_bounds (text->model, i, &start_pos, &end_pos);
- attr->start_index = g_utf8_offset_to_pointer (text->text, start_pos) - text->text;
- attr->end_index = g_utf8_offset_to_pointer (text->text, end_pos) - text->text;
+ attr->start_index = g_utf8_offset_to_pointer (
+ text->text, start_pos) - text->text;
+ attr->end_index = g_utf8_offset_to_pointer (
+ text->text, end_pos) - text->text;
pango_attr_list_insert (attrs, attr);
}
@@ -401,7 +403,8 @@ create_layout (EText *text)
if (text->layout)
return;
- text->layout = gtk_widget_create_pango_layout (GTK_WIDGET (item->canvas), text->text);
+ text->layout = gtk_widget_create_pango_layout (
+ GTK_WIDGET (item->canvas), text->text);
if (text->line_wrap)
pango_layout_set_width (
text->layout, text->clip_width < 0
@@ -1693,7 +1696,9 @@ _blink_scroll_timeout (gpointer data)
e_tep_event.type = GDK_MOTION_NOTIFY;
e_tep_event.motion.state = text->last_state;
e_tep_event.motion.time = 0;
- e_tep_event.motion.position = get_position_from_xy (text, text->lastx, text->lasty);
+ e_tep_event.motion.position =
+ get_position_from_xy (
+ text, text->lastx, text->lasty);
_get_tep (text);
e_text_event_processor_handle_event (text->tep,
&e_tep_event);
@@ -1864,7 +1869,8 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
&& (event->key.state & GDK_SHIFT_MASK)
&& text->handle_popup ) {
- /* Simulate a GdkEventButton here, so that we can call e_text_do_popup directly */
+ /* Simulate a GdkEventButton here, so that we can
+ * call e_text_do_popup directly */
GdkEventButton *button = (GdkEventButton *) gdk_event_new (GDK_BUTTON_PRESS);
button->time = event->key.time;
@@ -2466,7 +2472,8 @@ _get_updated_position (EText *text, gboolean direction)
/* if is_cursor_position is set, cursor can appear in front of character.
i.e. this is a grapheme boundary AND make some sanity checks */
- if ((new_pos >=0) && (new_pos < n_attrs) && (log_attrs[new_pos].is_cursor_position))
+ if ((new_pos >=0) && (new_pos < n_attrs) &&
+ (log_attrs[new_pos].is_cursor_position))
break;
else if ((new_pos < 0) || (new_pos >= n_attrs))
{
diff --git a/widgets/text/gal-a11y-e-text.c b/widgets/text/gal-a11y-e-text.c
index 75e3307373..dcc96d1d69 100644
--- a/widgets/text/gal-a11y-e-text.c
+++ b/widgets/text/gal-a11y-e-text.c
@@ -1105,9 +1105,12 @@ gal_a11y_e_text_get_type (void)
PARENT_TYPE, "GalA11yEText", &info, 0,
sizeof (GalA11yETextPrivate), &priv_offset);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
- g_type_add_interface_static (type, ATK_TYPE_TEXT, &atk_text_info);
- g_type_add_interface_static (type, ATK_TYPE_EDITABLE_TEXT, &atk_editable_text_info);
+ g_type_add_interface_static (
+ type, ATK_TYPE_COMPONENT, &atk_component_info);
+ g_type_add_interface_static (
+ type, ATK_TYPE_TEXT, &atk_text_info);
+ g_type_add_interface_static (
+ type, ATK_TYPE_EDITABLE_TEXT, &atk_editable_text_info);
}
return type;