diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-08 00:22:36 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-08 06:48:38 +0800 |
commit | 4cfb84c573f21ca7519e24cff1c5742b715355c4 (patch) | |
tree | 92314a7c4ebb1b82f5bbe0e48856e23f06dcfc95 /widgets/text | |
parent | c7b455de89487e606fc620420c1778f5e55afcac (diff) | |
download | gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar.gz gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar.bz2 gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar.lz gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar.xz gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.tar.zst gsoc2013-evolution-4cfb84c573f21ca7519e24cff1c5742b715355c4.zip |
Whitespace and coding style cleanups.
Diffstat (limited to 'widgets/text')
-rw-r--r-- | widgets/text/e-text-model.c | 3 | ||||
-rw-r--r-- | widgets/text/e-text.c | 19 | ||||
-rw-r--r-- | widgets/text/gal-a11y-e-text.c | 9 |
3 files changed, 21 insertions, 10 deletions
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; |