diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-31 04:32:08 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-01-31 07:09:19 +0800 |
commit | ec73f5522ff2d6f8c476f02a9daaff32ef1db069 (patch) | |
tree | 14729b8cbf271405e732b84ca2ca944ceb0815e5 /widgets/text | |
parent | c7e371bc5bc8d7898236ac36e1ea0bc08518b791 (diff) | |
download | gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar.gz gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar.bz2 gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar.lz gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar.xz gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar.zst gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'widgets/text')
-rw-r--r-- | widgets/text/e-reflow.c | 92 | ||||
-rw-r--r-- | widgets/text/e-reflow.h | 20 | ||||
-rw-r--r-- | widgets/text/e-text.c | 68 | ||||
-rw-r--r-- | widgets/text/e-text.h | 26 | ||||
-rw-r--r-- | widgets/text/gal-a11y-e-text-factory.h | 2 | ||||
-rw-r--r-- | widgets/text/gal-a11y-e-text.c | 8 | ||||
-rw-r--r-- | widgets/text/gal-a11y-e-text.h | 2 |
7 files changed, 109 insertions, 109 deletions
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c index 85521aa02b..0ce3302da1 100644 --- a/widgets/text/e-reflow.c +++ b/widgets/text/e-reflow.c @@ -42,8 +42,8 @@ static void e_reflow_realize (GnomeCanvasItem *item); static void e_reflow_unrealize (GnomeCanvasItem *item); static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height); -static void e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gint flags); -static double e_reflow_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, GnomeCanvasItem **actual_item); +static void e_reflow_update (GnomeCanvasItem *item, gdouble affine[6], ArtSVP *clip_path, gint flags); +static gdouble e_reflow_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item); static void e_reflow_reflow (GnomeCanvasItem *item, gint flags); static void set_empty(EReflow *reflow); @@ -82,7 +82,7 @@ er_compare (gint i1, gint i2, gpointer user_data) } static gint -e_reflow_pick_line (EReflow *reflow, double x) +e_reflow_pick_line (EReflow *reflow, gdouble x) { x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; x /= reflow->column_width + E_REFLOW_FULL_GUTTER; @@ -113,7 +113,7 @@ e_reflow_resize_children (GnomeCanvasItem *item) for (i = 0; i < count; i++) { if (reflow->items[i]) gnome_canvas_item_set(reflow->items[i], - "width", (double) reflow->column_width, + "width", (gdouble) reflow->column_width, NULL); } } @@ -129,7 +129,7 @@ e_reflow_update_selection_row (EReflow *reflow, gint row) reflow->items[row] = e_reflow_model_incarnate (reflow->model, row, GNOME_CANVAS_GROUP (reflow)); g_object_set (reflow->items[row], "selected", e_selection_model_is_row_selected(E_SELECTION_MODEL(reflow->selection), row), - "width", (double) reflow->column_width, + "width", (gdouble) reflow->column_width, NULL); } } @@ -219,7 +219,7 @@ cursor_changed (ESelectionModel *selection, gint row, gint col, EReflow *reflow) reflow->items[row] = e_reflow_model_incarnate (reflow->model, row, GNOME_CANVAS_GROUP (reflow)); g_object_set (reflow->items[row], "has_cursor", TRUE, - "width", (double) reflow->column_width, + "width", (gdouble) reflow->column_width, NULL); } } @@ -266,7 +266,7 @@ incarnate (EReflow *reflow) reflow->items[unsorted] = e_reflow_model_incarnate (reflow->model, unsorted, GNOME_CANVAS_GROUP (reflow)); g_object_set (reflow->items[unsorted], "selected", e_selection_model_is_row_selected(E_SELECTION_MODEL(reflow->selection), unsorted), - "width", (double) reflow->column_width, + "width", (gdouble) reflow->column_width, NULL); } } @@ -298,7 +298,7 @@ reflow_columns (EReflow *reflow) gint start; gint i; gint column_count, column_start; - double running_height; + gdouble running_height; if (reflow->reflow_from_column <= 1) { start = 0; @@ -734,7 +734,7 @@ e_reflow_set_property (GObject *object, guint prop_id, const GValue *value, GPar case PROP_COLUMN_WIDTH: if (reflow->column_width != g_value_get_double (value)) { GtkAdjustment *adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)); - double old_width = reflow->column_width; + gdouble old_width = reflow->column_width; reflow->column_width = g_value_get_double (value); adjustment->step_increment = (reflow->column_width + E_REFLOW_FULL_GUTTER) / 2; @@ -899,7 +899,7 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) reflow = E_REFLOW (item); - switch ( event->type ) + switch (event->type) { case GDK_KEY_PRESS: return_val = e_selection_model_key_press(reflow->selection, (GdkEventKey *) event); @@ -951,12 +951,12 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) case 1: { GdkEventButton *button = (GdkEventButton *) event; - double n_x; + gdouble n_x; n_x = button->x; n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; n_x = fmod(n_x,(reflow->column_width + E_REFLOW_FULL_GUTTER)); - if ( button->y >= E_REFLOW_BORDER_WIDTH && button->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) { + if (button->y >= E_REFLOW_BORDER_WIDTH && button->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER) { /* don't allow to drag the first line*/ if (e_reflow_pick_line(reflow, button->x) == 0) return TRUE; @@ -990,7 +990,7 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) GtkAdjustment *adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)); gdouble new_value = adjustment->value; new_value += adjustment->step_increment; - if ( new_value > adjustment->upper - adjustment->page_size ) + if (new_value > adjustment->upper - adjustment->page_size) new_value = adjustment->upper - adjustment->page_size; gtk_adjustment_set_value(adjustment, new_value); } @@ -1004,10 +1004,10 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) GtkAdjustment *adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)); reflow->temp_column_width = reflow->column_width + (button->x - reflow->start_x)/(reflow->which_column_dragged - e_reflow_pick_line(reflow, adjustment->value)); - if ( reflow->temp_column_width < 50 ) + if (reflow->temp_column_width < 50) reflow->temp_column_width = 50; reflow->column_drag = FALSE; - if ( old_width != reflow->temp_column_width ) { + if (old_width != reflow->temp_column_width) { gtk_adjustment_set_value(adjustment, adjustment->value + e_reflow_pick_line(reflow, adjustment->value) * (reflow->temp_column_width - reflow->column_width)); reflow->column_width = reflow->temp_column_width; adjustment->step_increment = (reflow->column_width + E_REFLOW_FULL_GUTTER) / 2; @@ -1026,7 +1026,7 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) break; case GDK_MOTION_NOTIFY: if (reflow->column_drag) { - double old_width = reflow->temp_column_width; + gdouble old_width = reflow->temp_column_width; GdkEventMotion *motion = (GdkEventMotion *) event; GtkAdjustment *adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)); reflow->temp_column_width = reflow->column_width + @@ -1040,19 +1040,19 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) return TRUE; } else { GdkEventMotion *motion = (GdkEventMotion *) event; - double n_x; + gdouble n_x; n_x = motion->x; n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; n_x = fmod(n_x,(reflow->column_width + E_REFLOW_FULL_GUTTER)); - if ( motion->y >= E_REFLOW_BORDER_WIDTH && motion->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) { - if ( reflow->default_cursor_shown ) { + if (motion->y >= E_REFLOW_BORDER_WIDTH && motion->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER) { + if (reflow->default_cursor_shown) { gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, reflow->arrow_cursor); reflow->default_cursor_shown = FALSE; } } else - if ( ! reflow->default_cursor_shown ) { + if (!reflow->default_cursor_shown) { gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, reflow->default_cursor); reflow->default_cursor_shown = TRUE; } @@ -1062,13 +1062,13 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) case GDK_ENTER_NOTIFY: if (!reflow->column_drag) { GdkEventCrossing *crossing = (GdkEventCrossing *) event; - double n_x; + gdouble n_x; n_x = crossing->x; n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; n_x = fmod(n_x,(reflow->column_width + E_REFLOW_FULL_GUTTER)); - if ( crossing->y >= E_REFLOW_BORDER_WIDTH && crossing->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) { - if ( reflow->default_cursor_shown ) { + if (crossing->y >= E_REFLOW_BORDER_WIDTH && crossing->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER) { + if (reflow->default_cursor_shown) { gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, reflow->arrow_cursor); reflow->default_cursor_shown = FALSE; } @@ -1078,12 +1078,12 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) case GDK_LEAVE_NOTIFY: if (!reflow->column_drag) { GdkEventCrossing *crossing = (GdkEventCrossing *) event; - double n_x; + gdouble n_x; n_x = crossing->x; n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; n_x = fmod(n_x,(reflow->column_width + E_REFLOW_FULL_GUTTER)); - if ( !( crossing->y >= E_REFLOW_BORDER_WIDTH && crossing->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) ) { - if ( ! reflow->default_cursor_shown ) { + if (!( crossing->y >= E_REFLOW_BORDER_WIDTH && crossing->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER )) { + if (!reflow->default_cursor_shown) { gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, reflow->default_cursor); reflow->default_cursor_shown = TRUE; } @@ -1108,7 +1108,7 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gdouble running_width; EReflow *reflow = E_REFLOW(item); gint i; - double column_width; + gdouble column_width; if (GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->draw) GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->draw (item, drawable, x, y, width, height); @@ -1124,7 +1124,7 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, running_width += i * (column_width + E_REFLOW_FULL_GUTTER); for (; i < reflow->column_count; i++) { - if ( running_width > x + width ) + if (running_width > x + width) break; x_rect = running_width; gtk_paint_flat_box(GTK_WIDGET(item->canvas)->style, @@ -1158,7 +1158,7 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, running_width += i * (column_width + E_REFLOW_FULL_GUTTER); for (; i < reflow->column_count; i++) { - if ( running_width > x + width ) + if (running_width > x + width) break; x_rect = running_width; gdk_draw_rectangle(drawable, @@ -1174,10 +1174,10 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, } static void -e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gint flags) +e_reflow_update (GnomeCanvasItem *item, gdouble affine[6], ArtSVP *clip_path, gint flags) { EReflow *reflow; - double x0, x1, y0, y1; + gdouble x0, x1, y0, y1; reflow = E_REFLOW (item); @@ -1188,9 +1188,9 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin y0 = item->y1; x1 = item->x2; y1 = item->y2; - if ( x1 < x0 + reflow->width ) + if (x1 < x0 + reflow->width) x1 = x0 + reflow->width; - if ( y1 < y0 + reflow->height ) + if (y1 < y0 + reflow->height) y1 = y0 + reflow->height; item->x2 = x1; item->y2 = y1; @@ -1200,13 +1200,13 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin y0 = item->y1; x1 = item->x2; y1 = item->y2; - if ( x0 > 0 ) + if (x0 > 0) x0 = 0; - if ( y0 > 0 ) + if (y0 > 0) y0 = 0; - if ( x1 < E_REFLOW(item)->width ) + if (x1 < E_REFLOW(item)->width) x1 = E_REFLOW(item)->width; - if ( x1 < E_REFLOW(item)->height ) + if (x1 < E_REFLOW(item)->height) x1 = E_REFLOW(item)->height; gnome_canvas_request_redraw(item->canvas, x0, y0, x1, y1); @@ -1217,9 +1217,9 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas))->value); gdouble running_width; gint i; - double column_width; + gdouble column_width; - if ( reflow->previous_temp_column_width != -1 ) { + if (reflow->previous_temp_column_width != -1) { running_width = start_line * (reflow->column_width + E_REFLOW_FULL_GUTTER); column_width = reflow->previous_temp_column_width; running_width -= start_line * (column_width + E_REFLOW_FULL_GUTTER); @@ -1235,7 +1235,7 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin } } - if ( reflow->temp_column_width != -1 ) { + if (reflow->temp_column_width != -1) { running_width = start_line * (reflow->column_width + E_REFLOW_FULL_GUTTER); column_width = reflow->temp_column_width; running_width -= start_line * (column_width + E_REFLOW_FULL_GUTTER); @@ -1258,10 +1258,10 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin static double e_reflow_point (GnomeCanvasItem *item, - double x, double y, gint cx, gint cy, + gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { - double distance = 1; + gdouble distance = 1; *actual_item = NULL; @@ -1297,7 +1297,7 @@ e_reflow_reflow( GnomeCanvasItem *item, gint flags ) gint next_column; gint i; - if (! (GTK_OBJECT_FLAGS (reflow) & GNOME_CANVAS_ITEM_REALIZED)) + if (!(GTK_OBJECT_FLAGS (reflow) & GNOME_CANVAS_ITEM_REALIZED)) return; if (reflow->need_reflow_columns) { @@ -1321,13 +1321,13 @@ e_reflow_reflow( GnomeCanvasItem *item, gint flags ) if (unsorted >= 0 && reflow->items[unsorted]) { e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(reflow->items[unsorted]), - (double) running_width, - (double) running_height); + (gdouble) running_width, + (gdouble) running_height); running_height += reflow->heights[unsorted] + E_REFLOW_BORDER_WIDTH; } } reflow->width = running_width + reflow->column_width + E_REFLOW_BORDER_WIDTH; - if ( reflow->width < reflow->minimum_width ) + if (reflow->width < reflow->minimum_width) reflow->width = reflow->minimum_width; if (old_width != reflow->width) e_canvas_item_request_parent_reflow(item); diff --git a/widgets/text/e-reflow.h b/widgets/text/e-reflow.h index 1559ad6bc0..d11362bed4 100644 --- a/widgets/text/e-reflow.h +++ b/widgets/text/e-reflow.h @@ -36,9 +36,9 @@ G_BEGIN_DECLS * * name type read/write description * -------------------------------------------------------------------------------- - * minimum_width double RW minimum width of the reflow. width >= minimum_width - * width double R width of the reflow - * height double RW height of the reflow + * minimum_width gdouble RW minimum width of the reflow. width >= minimum_width + * width gdouble R width of the reflow + * height gdouble RW height of the reflow */ #define E_REFLOW_TYPE (e_reflow_get_type ()) @@ -86,11 +86,11 @@ struct _EReflow GnomeCanvasItem *empty_text; gchar *empty_message; - double minimum_width; - double width; - double height; + gdouble minimum_width; + gdouble width; + gdouble height; - double column_width; + gdouble column_width; gint incarnate_idle_id; gint do_adjustment_idle_id; @@ -98,8 +98,8 @@ struct _EReflow /* These are all for when the column is being dragged. */ gdouble start_x; gint which_column_dragged; - double temp_column_width; - double previous_temp_column_width; + gdouble temp_column_width; + gdouble previous_temp_column_width; gint cursor_row; @@ -124,7 +124,7 @@ struct _EReflowClass GnomeCanvasGroupClass parent_class; gint (*selection_event) (EReflow *reflow, GnomeCanvasItem *item, GdkEvent *event); - void (*column_width_changed) (EReflow *reflow, double width); + void (*column_width_changed) (EReflow *reflow, gdouble width); }; /* diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index c3f2943b5c..e31b3e519b 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -176,7 +176,7 @@ static GdkAtom clipboard_atom = GDK_NONE; static void e_text_style_set (EText *text, GtkStyle *previous_style) { - if ( text->line_wrap ) { + if (text->line_wrap) { text->needs_split_into_lines = 1; } else { text->needs_calc_height = 1; @@ -236,12 +236,12 @@ e_text_dispose (GObject *object) text->timer = NULL; } - if ( text->dbl_timeout ) { + if (text->dbl_timeout) { g_source_remove (text->dbl_timeout); text->dbl_timeout = 0; } - if ( text->tpl_timeout ) { + if (text->tpl_timeout) { g_source_remove (text->tpl_timeout); text->tpl_timeout = 0; } @@ -492,10 +492,10 @@ e_text_text_model_reposition (ETextModel *model, ETextModelReposFn fn, gpointer } static void -get_bounds (EText *text, double *px1, double *py1, double *px2, double *py2) +get_bounds (EText *text, gdouble *px1, gdouble *py1, gdouble *px2, gdouble *py2) { GnomeCanvasItem *item; - double wx, wy, clip_width, clip_height; + gdouble wx, wy, clip_width, clip_height; item = GNOME_CANVAS_ITEM (text); @@ -512,7 +512,7 @@ get_bounds (EText *text, double *px1, double *py1, double *px2, double *py2) else clip_width = text->clip_width; - if ( text->clip_height < 0 ) + if (text->clip_height < 0) clip_height = text->height; else clip_height = text->clip_height; @@ -688,11 +688,11 @@ e_text_set_property (GObject *object, switch (prop_id) { case PROP_MODEL: - if ( text->model_changed_signal_id ) + if (text->model_changed_signal_id) g_signal_handler_disconnect (text->model, text->model_changed_signal_id); - if ( text->model_repos_signal_id ) + if (text->model_repos_signal_id) g_signal_handler_disconnect (text->model, text->model_repos_signal_id); @@ -720,10 +720,10 @@ e_text_set_property (GObject *object, break; case PROP_EVENT_PROCESSOR: - if ( text->tep && text->tep_command_id ) + if (text->tep && text->tep_command_id) g_signal_handler_disconnect(text->tep, text->tep_command_id); - if ( text->tep ) { + if (text->tep) { g_object_unref(text->tep); } text->tep = E_TEXT_EVENT_PROCESSOR(g_value_get_object (value)); @@ -778,7 +778,7 @@ e_text_set_property (GObject *object, case PROP_CLIP_WIDTH: text->clip_width = fabs (g_value_get_double (value)); calc_ellipsis (text); - if ( text->line_wrap ) { + if (text->line_wrap) { if (text->layout) pango_layout_set_width (text->layout, text->clip_width < 0 ? -1 : text->clip_width * PANGO_SCALE); text->needs_split_into_lines = 1; @@ -802,7 +802,7 @@ e_text_set_property (GObject *object, case PROP_CLIP: text->clip = g_value_get_boolean (value); calc_ellipsis (text); - if ( text->line_wrap ) + if (text->line_wrap) text->needs_split_into_lines = 1; else { text->needs_calc_height = 1; @@ -897,11 +897,11 @@ e_text_set_property (GObject *object, break; case PROP_BREAK_CHARACTERS: - if ( text->break_characters ) { + if (text->break_characters) { g_free(text->break_characters); text->break_characters = NULL; } - if ( g_value_get_string (value) ) + if (g_value_get_string (value)) text->break_characters = g_strdup( g_value_get_string (value) ); text->needs_split_into_lines = 1; needs_reflow = 1; @@ -916,7 +916,7 @@ e_text_set_property (GObject *object, case PROP_WIDTH: text->clip_width = fabs (g_value_get_double (value)); calc_ellipsis (text); - if ( text->line_wrap ) { + if (text->line_wrap) { if (text->layout) { pango_layout_set_width (text->layout, text->width < 0 ? -1 : text->width * PANGO_SCALE); } @@ -1003,9 +1003,9 @@ e_text_set_property (GObject *object, needs_update = 1; } - if ( needs_reflow ) + if (needs_reflow) e_canvas_item_request_reflow (item); - if ( needs_update ) + if (needs_update) gnome_canvas_item_request_update (item); } @@ -1181,7 +1181,7 @@ e_text_reflow (GnomeCanvasItem *item, gint flags) text->needs_calc_height = 1; } - if ( text->needs_calc_height ) { + if (text->needs_calc_height) { calc_height (text); gnome_canvas_item_request_update(item); text->needs_calc_height = 0; @@ -1191,10 +1191,10 @@ e_text_reflow (GnomeCanvasItem *item, gint flags) /* Update handler for the text item */ static void -e_text_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) +e_text_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags) { EText *text; - double x1, y1, x2, y2; + gdouble x1, y1, x2, y2; text = E_TEXT (item); @@ -1224,7 +1224,7 @@ e_text_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint fl } text->needs_recalc_bounds = 0; } - if ( text->needs_redraw ) { + if (text->needs_redraw) { gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2); text->needs_redraw = 0; } @@ -1678,12 +1678,12 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, /* Point handler for the text item */ static double -e_text_point (GnomeCanvasItem *item, double x, double y, +e_text_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { EText *text; - double clip_width; - double clip_height; + gdouble clip_width; + gdouble clip_height; text = E_TEXT (item); @@ -1700,7 +1700,7 @@ e_text_point (GnomeCanvasItem *item, double x, double y, else clip_width = text->clip_width; - if ( text->clip_height < 0 ) + if (text->clip_height < 0) clip_height = text->height; else clip_height = text->clip_height; @@ -1728,10 +1728,10 @@ e_text_point (GnomeCanvasItem *item, double x, double y, /* Bounds handler for the text item */ static void -e_text_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2) +e_text_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2) { EText *text; - double width, height; + gdouble width, height; text = E_TEXT (item); @@ -1744,7 +1744,7 @@ e_text_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double if (text->clip) { if (text->clip_width >= 0) width = text->clip_width; - if ( text->clip_height >= 0 ) + if (text->clip_height >= 0) height = text->clip_height; } @@ -1945,7 +1945,7 @@ e_text_stop_editing (EText *text) text->revert = NULL; text->editing = FALSE; - if ( (!text->default_cursor_shown) && (!text->draw_borders) ) { + if ((!text->default_cursor_shown) && (!text->draw_borders)) { GdkWindow *window; window = gtk_widget_get_window ( @@ -2059,7 +2059,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(text)); } } - if ( text->line_wrap ) + if (text->line_wrap) text->needs_split_into_lines = 1; e_canvas_item_request_reflow (GNOME_CANVAS_ITEM(text)); } @@ -2223,7 +2223,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) case GDK_ENTER_NOTIFY: text->pointer_in = TRUE; if (text->editing || text->draw_borders) { - if ( text->default_cursor_shown ) { + if (text->default_cursor_shown) { gdk_window_set_cursor(window, text->i_cursor); text->default_cursor_shown = FALSE; } @@ -2232,7 +2232,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) case GDK_LEAVE_NOTIFY: text->pointer_in = FALSE; if (text->editing || text->draw_borders) { - if ( ! text->default_cursor_shown ) { + if (!text->default_cursor_shown) { gdk_window_set_cursor(window, text->default_cursor); text->default_cursor_shown = TRUE; } @@ -3163,7 +3163,7 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp if (cur_line) { gint xpos, ypos; - double clip_width, clip_height; + gdouble clip_width, clip_height; /* gboolean trailing = FALSE; */ PangoRectangle pango_pos; @@ -3206,7 +3206,7 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp ypos = pango_pos.y + pango_pos.height; } - if ( text->clip_height < 0 ) + if (text->clip_height < 0) clip_height = text->height; else clip_height = text->clip_height; diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h index 057ff507a7..bed5ff95e8 100644 --- a/widgets/text/e-text.h +++ b/widgets/text/e-text.h @@ -67,16 +67,16 @@ G_BEGIN_DECLS * fill_color string W X color specification for text * fill_color_gdk GdkColor* RW Pointer to an allocated GdkColor * fill_stipple GdkBitmap* RW Stipple pattern for filling the text - * clip_width double RW Width of clip rectangle - * clip_height double RW Height of clip rectangle + * clip_width gdouble RW Width of clip rectangle + * clip_height gdouble RW Height of clip rectangle * clip boolean RW Use clipping rectangle? * fill_clip_rect boolean RW Whether the text item represents itself as being the size of the clipping rectangle. - * x_offset double RW Horizontal offset distance from anchor position - * y_offset double RW Vertical offset distance from anchor position - * text_width double R Used to query the width of the rendered text - * text_height double R Used to query the rendered height of the text - * width double RW A synonym for clip_width - * height double R A synonym for text_height + * x_offset gdouble RW Horizontal offset distance from anchor position + * y_offset gdouble RW Vertical offset distance from anchor position + * text_width gdouble R Used to query the width of the rendered text + * text_height gdouble R Used to query the rendered height of the text + * width gdouble RW A synonym for clip_width + * height gdouble R A synonym for text_height * * These are currently ignored in the AA version: * editable boolean RW Can this item be edited @@ -117,10 +117,10 @@ struct _EText { GtkAnchorType anchor; /* Anchor side for text */ GtkJustification justification; /* Justification for text */ - double clip_width; /* Width of optional clip rectangle */ - double clip_height; /* Height of optional clip rectangle */ + gdouble clip_width; /* Width of optional clip rectangle */ + gdouble clip_height; /* Height of optional clip rectangle */ - double xofs, yofs; /* Text offset distance from anchor position */ + gdouble xofs, yofs; /* Text offset distance from anchor position */ GdkColor color; /* Fill color */ GdkBitmap *stipple; /* Stipple for text */ @@ -135,10 +135,10 @@ struct _EText { gint height; /* Rendered text height in pixels */ guint32 rgba; /* RGBA color for text */ - double affine[6]; /* The item -> canvas affine */ + gdouble affine[6]; /* The item -> canvas affine */ gchar *ellipsis; /* The ellipsis characters. NULL = "...". */ - double ellipsis_width; /* The width of the ellipsis. */ + gdouble ellipsis_width; /* The width of the ellipsis. */ gint xofs_edit; /* Offset because of editing */ gint yofs_edit; /* Offset because of editing */ diff --git a/widgets/text/gal-a11y-e-text-factory.h b/widgets/text/gal-a11y-e-text-factory.h index 7e7f8e9f1a..2364eae23e 100644 --- a/widgets/text/gal-a11y-e-text-factory.h +++ b/widgets/text/gal-a11y-e-text-factory.h @@ -46,4 +46,4 @@ struct _GalA11yETextFactoryClass { /* Standard Glib function */ GType gal_a11y_e_text_factory_get_type (void); -#endif /* ! __GAL_A11Y_E_TEXT_FACTORY_H__ */ +#endif /* __GAL_A11Y_E_TEXT_FACTORY_H__ */ diff --git a/widgets/text/gal-a11y-e-text.c b/widgets/text/gal-a11y-e-text.c index 113c503da9..6c6724ea6d 100644 --- a/widgets/text/gal-a11y-e-text.c +++ b/widgets/text/gal-a11y-e-text.c @@ -64,8 +64,8 @@ et_get_extents (AtkComponent *component, AtkCoordType coord_type) { EText *item = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component))); - double real_width; - double real_height; + gdouble real_width; + gdouble real_height; gint fake_width; gint fake_height; @@ -166,7 +166,7 @@ find_word_start (const gchar *text, current = g_utf8_get_char_validated (at_offset, -1); at_offset = g_utf8_offset_to_pointer (text, offset-1); previous = g_utf8_get_char_validated (at_offset, -1); - if ((! is_a_seperator (current)) && is_a_seperator (previous)) + if ((!is_a_seperator (current)) && is_a_seperator (previous)) break; offset += step; } @@ -192,7 +192,7 @@ find_word_end (const gchar *text, current = g_utf8_get_char_validated (at_offset, -1); at_offset = g_utf8_offset_to_pointer (text, offset-1); previous = g_utf8_get_char_validated (at_offset, -1); - if (is_a_seperator (current) && (! is_a_seperator (previous))) + if (is_a_seperator (current) && (!is_a_seperator (previous))) break; offset += step; } diff --git a/widgets/text/gal-a11y-e-text.h b/widgets/text/gal-a11y-e-text.h index ff55bdadc7..b56d43553c 100644 --- a/widgets/text/gal-a11y-e-text.h +++ b/widgets/text/gal-a11y-e-text.h @@ -53,4 +53,4 @@ GType gal_a11y_e_text_get_type (void); void gal_a11y_e_text_init (void); -#endif /* ! __GAL_A11Y_E_TEXT_H__ */ +#endif /* __GAL_A11Y_E_TEXT_H__ */ |