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 | |
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')
61 files changed, 377 insertions, 377 deletions
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c index 4110b55313..3dc5f35709 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ b/widgets/e-timezone-dialog/e-timezone-dialog.c @@ -504,14 +504,14 @@ on_map_motion (GtkWidget *widget, GdkEventMotion *event, gpointer data) { ETimezoneDialog *etd; ETimezoneDialogPrivate *priv; - double longitude, latitude; + gdouble longitude, latitude; icaltimezone *new_zone; gchar *display=NULL; etd = E_TIMEZONE_DIALOG (data); priv = etd->priv; - e_map_window_to_world (priv->map, (double) event->x, (double) event->y, + e_map_window_to_world (priv->map, (gdouble) event->x, (gdouble) event->y, &longitude, &latitude); if (priv->point_hover && priv->point_hover != priv->point_selected) @@ -594,12 +594,12 @@ on_map_button_pressed (GtkWidget *w, GdkEventButton *event, gpointer data) { ETimezoneDialog *etd; ETimezoneDialogPrivate *priv; - double longitude, latitude; + gdouble longitude, latitude; etd = E_TIMEZONE_DIALOG (data); priv = etd->priv; - e_map_window_to_world (priv->map, (double) event->x, (double) event->y, + e_map_window_to_world (priv->map, (gdouble) event->x, (gdouble) event->y, &longitude, &latitude); if (event->button != 1) { @@ -630,7 +630,7 @@ get_zone_from_point (ETimezoneDialog *etd, EMapPoint *point) { icalarray *zones; - double longitude, latitude; + gdouble longitude, latitude; gint i; if (point == NULL) @@ -643,7 +643,7 @@ get_zone_from_point (ETimezoneDialog *etd, for (i = 0; i < zones->num_elements; i++) { icaltimezone *zone; - double zone_longitude, zone_latitude; + gdouble zone_longitude, zone_latitude; zone = icalarray_element_at (zones, i); zone_longitude = icaltimezone_get_longitude (zone); @@ -736,7 +736,7 @@ set_map_timezone (ETimezoneDialog *etd, icaltimezone *zone) { ETimezoneDialogPrivate *priv; EMapPoint *point; - double zone_longitude, zone_latitude; + gdouble zone_longitude, zone_latitude; priv = etd->priv; diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index 9829d81279..84adf6185f 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -57,7 +57,7 @@ static void e_calendar_item_realize (GnomeCanvasItem *item); static void e_calendar_item_unrealize (GnomeCanvasItem *item); static void e_calendar_item_unmap (GnomeCanvasItem *item); static void e_calendar_item_update (GnomeCanvasItem *item, - double *affine, + gdouble *affine, ArtSVP *clip_path, gint flags); static void e_calendar_item_draw (GnomeCanvasItem *item, @@ -85,9 +85,9 @@ static void e_calendar_item_draw_day_numbers (ECalendarItem *calitem, gint start_weekday, gint cells_x, gint cells_y); -static double e_calendar_item_point (GnomeCanvasItem *item, - double x, - double y, +static gdouble e_calendar_item_point (GnomeCanvasItem *item, + gdouble x, + gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item); @@ -100,8 +100,8 @@ static gint e_calendar_item_key_press_event (ECalendarItem *item, GdkEvent *event); static gint e_calendar_item_event (GnomeCanvasItem *item, GdkEvent *event); -static void e_calendar_item_bounds (GnomeCanvasItem *item, double *x1, double *y1, - double *x2, double *y2); +static void e_calendar_item_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, + gdouble *x2, gdouble *y2); static gboolean e_calendar_item_button_press (ECalendarItem *calitem, GdkEvent *event); @@ -880,7 +880,7 @@ e_calendar_item_unmap (GnomeCanvasItem *item) static void e_calendar_item_update (GnomeCanvasItem *item, - double *affine, + gdouble *affine, ArtSVP *clip_path, gint flags) { @@ -1749,7 +1749,7 @@ e_calendar_item_get_week_number (ECalendarItem *calitem, Since we are the only item we just return ourself and 0 for the distance. This is needed so that we get button/motion events. */ static double -e_calendar_item_point (GnomeCanvasItem *item, double x, double y, +e_calendar_item_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { @@ -1912,8 +1912,8 @@ e_calendar_item_event (GnomeCanvasItem *item, GdkEvent *event) } static void -e_calendar_item_bounds (GnomeCanvasItem *item, double *x1, double *y1, - double *x2, double *y2) +e_calendar_item_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, + gdouble *x2, gdouble *y2) { ECalendarItem *calitem; diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c index f9879c2614..ab70082e95 100644 --- a/widgets/misc/e-canvas-background.c +++ b/widgets/misc/e-canvas-background.c @@ -50,10 +50,10 @@ struct _ECanvasBackgroundPrivate { GdkColor color; /* Fill color */ GdkBitmap *stipple; /* Stipple for fill */ GdkGC *gc; /* GC for filling */ - double x1; - double x2; - double y1; - double y2; + gdouble x1; + gdouble x2; + gdouble y1; + gdouble y2; guint needs_redraw : 1; }; @@ -88,9 +88,9 @@ get_color(ECanvasBackground *ecb) } static void -ecb_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2) +ecb_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2) { - double i2c [6]; + gdouble i2c [6]; ArtPoint c1, c2, i1, i2; ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); @@ -106,16 +106,16 @@ ecb_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y art_affine_point (&c2, &i2, i2c); if (ecb->priv->x1 < 0) - c1.x = -(double)UINT_MAX; + c1.x = -(gdouble)UINT_MAX; if (ecb->priv->y1 < 0) - c1.y = -(double)UINT_MAX; + c1.y = -(gdouble)UINT_MAX; if (ecb->priv->x2 < 0) - c2.x = (double)UINT_MAX; + c2.x = (gdouble)UINT_MAX; if (ecb->priv->y2 < 0) - c2.y = (double)UINT_MAX; + c2.y = (gdouble)UINT_MAX; *x1 = c1.x; *y1 = c1.y; @@ -127,7 +127,7 @@ ecb_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y * GnomeCanvasItem::update method */ static void -ecb_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) +ecb_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags) { ArtPoint o1, o2; ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); @@ -377,7 +377,7 @@ ecb_draw (GnomeCanvasItem *item, { ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); gint x1, x2, y1, y2; - double i2c [6]; + gdouble i2c [6]; ArtPoint upper_left, lower_right, ecb_base_point; /* @@ -410,7 +410,7 @@ ecb_draw (GnomeCanvasItem *item, } static double -ecb_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, +ecb_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); diff --git a/widgets/misc/e-canvas-background.h b/widgets/misc/e-canvas-background.h index 7e3ac19a13..e1e24d0663 100644 --- a/widgets/misc/e-canvas-background.h +++ b/widgets/misc/e-canvas-background.h @@ -36,10 +36,10 @@ G_BEGIN_DECLS * or NULL pointer for no color (transparent) * fill_color_gdk GdkColor* RW Allocated GdkColor for fill * fill_stipple GdkBitmap* RW Stipple pattern for fill - * x1 double RW Coordinates for edges of background rectangle - * x2 double RW Default is all of them = -1. - * y1 double RW Which means that the entire space is shown. - * y2 double RW If you need the rectangle to have negative coordinates, use an affine. + * x1 gdouble RW Coordinates for edges of background rectangle + * x2 gdouble RW Default is all of them = -1. + * y1 gdouble RW Which means that the entire space is shown. + * y2 gdouble RW If you need the rectangle to have negative coordinates, use an affine. */ #define E_CANVAS_BACKGROUND_TYPE (e_canvas_background_get_type ()) diff --git a/widgets/misc/e-canvas-utils.c b/widgets/misc/e-canvas-utils.c index 9e097b02bd..c4163feea1 100644 --- a/widgets/misc/e-canvas-utils.c +++ b/widgets/misc/e-canvas-utils.c @@ -24,9 +24,9 @@ #include "e-canvas-utils.h" void -e_canvas_item_move_absolute (GnomeCanvasItem *item, double dx, double dy) +e_canvas_item_move_absolute (GnomeCanvasItem *item, gdouble dx, gdouble dy) { - double translate[6]; + gdouble translate[6]; g_return_if_fail (item != NULL); g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); @@ -64,7 +64,7 @@ compute_offset(gint top, gint bottom, gint page_top, gint page_bottom) } static void -e_canvas_show_area (GnomeCanvas *canvas, double x1, double y1, double x2, double y2) +e_canvas_show_area (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { GtkAdjustment *h, *v; gint dx = 0, dy = 0; @@ -96,7 +96,7 @@ e_canvas_show_area (GnomeCanvas *canvas, double x1, double y1, double x2, double } void -e_canvas_item_show_area (GnomeCanvasItem *item, double x1, double y1, double x2, double y2) +e_canvas_item_show_area (GnomeCanvasItem *item, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { g_return_if_fail (item != NULL); g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); @@ -108,7 +108,7 @@ e_canvas_item_show_area (GnomeCanvasItem *item, double x1, double y1, double x2, } static gboolean -e_canvas_area_shown (GnomeCanvas *canvas, double x1, double y1, double x2, double y2) +e_canvas_area_shown (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { GtkAdjustment *h, *v; gint dx = 0, dy = 0; @@ -141,7 +141,7 @@ e_canvas_area_shown (GnomeCanvas *canvas, double x1, double y1, double x2, doubl } gboolean -e_canvas_item_area_shown (GnomeCanvasItem *item, double x1, double y1, double x2, double y2) +e_canvas_item_area_shown (GnomeCanvasItem *item, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { g_return_val_if_fail (item != NULL, FALSE); g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (item), FALSE); @@ -153,10 +153,10 @@ e_canvas_item_area_shown (GnomeCanvasItem *item, double x1, double y1, double x2 } typedef struct { - double x1; - double y1; - double x2; - double y2; + gdouble x1; + gdouble y1; + gdouble x2; + gdouble y2; GnomeCanvas *canvas; } DoubsAndCanvas; @@ -172,7 +172,7 @@ show_area_timeout (gpointer data) } void -e_canvas_item_show_area_delayed (GnomeCanvasItem *item, double x1, double y1, double x2, double y2, gint delay) +e_canvas_item_show_area_delayed (GnomeCanvasItem *item, gdouble x1, gdouble y1, gdouble x2, gdouble y2, gint delay) { DoubsAndCanvas *dac; diff --git a/widgets/misc/e-canvas-utils.h b/widgets/misc/e-canvas-utils.h index cda34e99b5..8f7600e72d 100644 --- a/widgets/misc/e-canvas-utils.h +++ b/widgets/misc/e-canvas-utils.h @@ -28,27 +28,27 @@ G_BEGIN_DECLS void e_canvas_item_move_absolute (GnomeCanvasItem *item, - double dx, - double dy); + gdouble dx, + gdouble dy); void e_canvas_item_show_area (GnomeCanvasItem *item, - double x1, - double y1, - double x2, - double y2); + gdouble x1, + gdouble y1, + gdouble x2, + gdouble y2); void e_canvas_item_show_area_delayed (GnomeCanvasItem *item, - double x1, - double y1, - double x2, - double y2, + gdouble x1, + gdouble y1, + gdouble x2, + gdouble y2, gint delay); /* Returns TRUE if the area is already shown on the screen (including spacing.) This is equivelent to returning FALSE iff show_area would do anything. */ gboolean e_canvas_item_area_shown (GnomeCanvasItem *item, - double x1, - double y1, - double x2, - double y2); + gdouble x1, + gdouble y1, + gdouble x2, + gdouble y2); G_END_DECLS diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c index af159b2000..e9d78f220c 100644 --- a/widgets/misc/e-canvas-vbox.c +++ b/widgets/misc/e-canvas-vbox.c @@ -256,9 +256,9 @@ e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item) e_canvas_vbox->items = g_list_append(e_canvas_vbox->items, item); g_object_weak_ref (G_OBJECT (item), e_canvas_vbox_remove_item, e_canvas_vbox); - if ( GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED ) { + if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) { gnome_canvas_item_set(item, - "width", (double) e_canvas_vbox->minimum_width, + "width", (gdouble) e_canvas_vbox->minimum_width, NULL); e_canvas_item_request_reflow(item); } @@ -270,9 +270,9 @@ e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *i e_canvas_vbox->items = g_list_prepend(e_canvas_vbox->items, item); g_object_weak_ref (G_OBJECT (item), e_canvas_vbox_remove_item, e_canvas_vbox); - if ( GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED ) { + if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) { gnome_canvas_item_set(item, - "width", (double) e_canvas_vbox->minimum_width, + "width", (gdouble) e_canvas_vbox->minimum_width, NULL); e_canvas_item_request_reflow(item); } @@ -288,7 +288,7 @@ e_canvas_vbox_resize_children (GnomeCanvasItem *item) for ( list = e_canvas_vbox->items; list; list = list->next ) { GnomeCanvasItem *child = GNOME_CANVAS_ITEM(list->data); gnome_canvas_item_set(child, - "width", (double) e_canvas_vbox->minimum_width, + "width", (gdouble) e_canvas_vbox->minimum_width, NULL); } } @@ -297,7 +297,7 @@ static void e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) { ECanvasVbox *e_canvas_vbox = E_CANVAS_VBOX(item); - if ( GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED ) { + if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) { gdouble old_height; gdouble running_height; @@ -322,8 +322,8 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) "width", &item_width, NULL); e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data), - (double) 0, - (double) running_height); + (gdouble) 0, + (gdouble) running_height); running_height += item_height; if (max_width < item_width) max_width = item_width; @@ -338,8 +338,8 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) NULL); e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data), - (double) 0, - (double) running_height); + (gdouble) 0, + (gdouble) running_height); running_height += item_height; if (max_width < item_width) diff --git a/widgets/misc/e-canvas-vbox.h b/widgets/misc/e-canvas-vbox.h index b41b8f80ec..9fb5b8ba34 100644 --- a/widgets/misc/e-canvas-vbox.h +++ b/widgets/misc/e-canvas-vbox.h @@ -34,9 +34,9 @@ G_BEGIN_DECLS * * name type read/write description * -------------------------------------------------------------------------------- - * width double RW width of the CanvasVbox - * height double R height of the CanvasVbox - * spacing double RW Spacing between items. + * width gdouble RW width of the CanvasVbox + * height gdouble R height of the CanvasVbox + * spacing gdouble RW Spacing between items. */ #define E_CANVAS_VBOX_TYPE (e_canvas_vbox_get_type ()) @@ -55,10 +55,10 @@ struct _ECanvasVbox /* item specific fields */ GList *items; /* Of type GnomeCanvasItem */ - double width; - double minimum_width; - double height; - double spacing; + gdouble width; + gdouble minimum_width; + gdouble height; + gdouble spacing; }; struct _ECanvasVboxClass diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index 314837edf1..6d12cae087 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -279,11 +279,11 @@ e_canvas_key (GtkWidget *widget, GdkEventKey *event) #define HACKISH_AFFINE static double -gnome_canvas_item_invoke_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, +gnome_canvas_item_invoke_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { #ifdef HACKISH_AFFINE - double i2w[6], w2c[6], i2c[6], c2i[6]; + gdouble i2w[6], w2c[6], i2c[6], c2i[6]; ArtPoint c, i; #endif @@ -312,7 +312,7 @@ static gint pick_current_item (GnomeCanvas *canvas, GdkEvent *event) { gint button_down; - double x, y; + gdouble x, y; gint cx, cy; gint retval; diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c index e6a223a121..f4968432a0 100644 --- a/widgets/misc/e-map.c +++ b/widgets/misc/e-map.c @@ -71,7 +71,7 @@ struct _EMapPrivate { /* Realtime zoom data */ EMapZoomState zoom_state; - double zoom_target_long, zoom_target_lat; + gdouble zoom_target_long, zoom_target_lat; /* Dots */ GPtrArray *points; @@ -633,7 +633,7 @@ e_map_new (void) * Latitude E <-90, 90] */ void -e_map_window_to_world (EMap *map, double win_x, double win_y, double *world_longitude, double *world_latitude) +e_map_window_to_world (EMap *map, gdouble win_x, gdouble win_y, gdouble *world_longitude, gdouble *world_latitude) { EMapPrivate *priv; gint width, height; @@ -646,14 +646,14 @@ e_map_window_to_world (EMap *map, double win_x, double win_y, double *world_long width = gdk_pixbuf_get_width (priv->map_render_pixbuf); height = gdk_pixbuf_get_height (priv->map_render_pixbuf); - *world_longitude = (win_x + priv->xofs - (double) width / 2.0) / - ((double) width / 2.0) * 180.0; - *world_latitude = ((double) height / 2.0 - win_y - priv->yofs) / - ((double) height / 2.0) * 90.0; + *world_longitude = (win_x + priv->xofs - (gdouble) width / 2.0) / + ((gdouble) width / 2.0) * 180.0; + *world_latitude = ((gdouble) height / 2.0 - win_y - priv->yofs) / + ((gdouble) height / 2.0) * 90.0; } void -e_map_world_to_window (EMap *map, double world_longitude, double world_latitude, double *win_x, double *win_y) +e_map_world_to_window (EMap *map, gdouble world_longitude, gdouble world_latitude, gdouble *win_x, gdouble *win_y) { EMapPrivate *priv; gint width, height; @@ -689,7 +689,7 @@ e_map_get_magnification (EMap *map) } void -e_map_zoom_to_location (EMap *map, double longitude, double latitude) +e_map_zoom_to_location (EMap *map, gdouble longitude, gdouble latitude) { EMapPrivate *priv; @@ -753,7 +753,7 @@ e_map_thaw (EMap *map) /* --- Point manipulation --- */ EMapPoint * -e_map_add_point (EMap *map, gchar *name, double longitude, double latitude, guint32 color_rgba) +e_map_add_point (EMap *map, gchar *name, gdouble longitude, gdouble latitude, guint32 color_rgba) { EMapPrivate *priv; EMapPoint *point; @@ -798,7 +798,7 @@ e_map_remove_point (EMap *map, EMapPoint *point) } void -e_map_point_get_location (EMapPoint *point, double *longitude, double *latitude) +e_map_point_get_location (EMapPoint *point, gdouble *longitude, gdouble *latitude) { *longitude = point->longitude; *latitude = point->latitude; @@ -847,7 +847,7 @@ e_map_point_is_in_view (EMap *map, EMapPoint *point) { EMapPrivate *priv; GtkAllocation allocation; - double x, y; + gdouble x, y; priv = map->priv; if (!priv->map_render_pixbuf) return FALSE; @@ -863,12 +863,12 @@ e_map_point_is_in_view (EMap *map, EMapPoint *point) } EMapPoint * -e_map_get_closest_point (EMap *map, double longitude, double latitude, gboolean in_view) +e_map_get_closest_point (EMap *map, gdouble longitude, gdouble latitude, gboolean in_view) { EMapPrivate *priv; EMapPoint *point_chosen = NULL, *point; - double min_dist = 0.0, dist; - double dx, dy; + gdouble min_dist = 0.0, dist; + gdouble dx, dy; gint i; priv = map->priv; @@ -947,7 +947,7 @@ update_render_pixbuf (EMap *map, EMapPoint *point; GtkAllocation allocation; gint width, height, orig_width, orig_height; - double zoom; + gdouble zoom; gint i; if (!GTK_WIDGET_REALIZED (map)) @@ -965,10 +965,10 @@ update_render_pixbuf (EMap *map, /* Compute scaled width and height based on the extreme dimension */ - if ((double) width / orig_width > (double) height / orig_height) - zoom = (double) width / (double) orig_width; + if ((gdouble) width / orig_width > (gdouble) height / orig_height) + zoom = (gdouble) width / (gdouble) orig_width; else - zoom = (double) height / (double) orig_height; + zoom = (gdouble) height / (gdouble) orig_height; if (priv->zoom_state == E_MAP_ZOOMED_IN) zoom *= 2.0; @@ -1097,7 +1097,7 @@ update_render_point (EMap *map, EMapPoint *point) { EMapPrivate *priv; GdkPixbuf *pb; - double px, py; + gdouble px, py; priv = map->priv; pb = priv->map_render_pixbuf; @@ -1129,7 +1129,7 @@ static void repaint_point (EMap *map, EMapPoint *point) { GdkRectangle area; - double px, py; + gdouble px, py; if (!e_map_point_is_in_view (map, point)) return; @@ -1434,14 +1434,14 @@ blowup_window_area (GdkWindow *window, gint area_x, gint area_y, gint target_x, if (area_width > area_height) { strong_axis = AXIS_X; - axis_factor = (double) area_height / (double) area_width; + axis_factor = (gdouble) area_height / (gdouble) area_width; zoom_chunk = MAX (1, area_width / 250); i = (area_width * (zoom_factor - 1.0)) / zoom_chunk; } else { strong_axis = AXIS_Y; - axis_factor = (double) area_width / (double) area_height; + axis_factor = (gdouble) area_width / (gdouble) area_height; zoom_chunk = MAX (1, area_height / 250); i = (area_height * (zoom_factor - 1.0)) / zoom_chunk; } @@ -1537,7 +1537,7 @@ zoom_in_smooth (EMap *map) EMapPrivate *priv; GdkWindow *window; gint width, height; - double x, y; + gdouble x, y; g_return_if_fail (map); g_return_if_fail (GTK_WIDGET_REALIZED (GTK_WIDGET (map))); @@ -1594,7 +1594,7 @@ zoom_in (EMap *map) GtkAllocation allocation; GdkRectangle area; EMapPrivate *priv; - double x, y; + gdouble x, y; priv = map->priv; @@ -1628,8 +1628,8 @@ zoom_out (EMap *map) GtkAllocation allocation; GdkRectangle area; EMapPrivate *priv; - double longitude, latitude; - double x, y; + gdouble longitude, latitude; + gdouble x, y; priv = map->priv; diff --git a/widgets/misc/e-map.h b/widgets/misc/e-map.h index b3d7997401..4730f7662b 100644 --- a/widgets/misc/e-map.h +++ b/widgets/misc/e-map.h @@ -59,7 +59,7 @@ struct _EMapClass { struct _EMapPoint { gchar *name; /* Can be NULL */ - double longitude, latitude; + gdouble longitude, latitude; guint32 rgba; gpointer user_data; }; @@ -80,15 +80,15 @@ void e_map_thaw (EMap *map); /* Translates window-relative coords to lat/long */ void e_map_window_to_world (EMap *map, - double win_x, double win_y, - double *world_longitude, double *world_latitude); + gdouble win_x, gdouble win_y, + gdouble *world_longitude, gdouble *world_latitude); /* Translates lat/long to window-relative coordinates. Note that the * returned coordinates can be negative or greater than the current size * of the allocation area */ void e_map_world_to_window (EMap *map, - double world_longitude, double world_latitude, - double *win_x, double *win_y); + gdouble world_longitude, gdouble world_latitude, + gdouble *win_x, gdouble *win_y); /* --- Zoom --- */ @@ -101,7 +101,7 @@ void e_map_set_smooth_zoom (EMap *map, gboolean state); gboolean e_map_get_smooth_zoom (EMap *map); /* NB: Function definition will change shortly */ -void e_map_zoom_to_location (EMap *map, double longitude, double latitude); +void e_map_zoom_to_location (EMap *map, gdouble longitude, gdouble latitude); /* Zoom to mag factor 1.0 */ void e_map_zoom_out (EMap *map); @@ -109,13 +109,13 @@ void e_map_zoom_out (EMap *map); /* --- Points --- */ EMapPoint *e_map_add_point (EMap *map, gchar *name, - double longitude, double latitude, + gdouble longitude, gdouble latitude, guint32 color_rgba); void e_map_remove_point (EMap *map, EMapPoint *point); void e_map_point_get_location (EMapPoint *point, - double *longitude, double *latitude); + gdouble *longitude, gdouble *latitude); gchar *e_map_point_get_name (EMapPoint *point); @@ -129,7 +129,7 @@ gpointer e_map_point_get_data (EMapPoint *point); gboolean e_map_point_is_in_view (EMap *map, EMapPoint *point); -EMapPoint *e_map_get_closest_point (EMap *map, double longitude, double latitude, +EMapPoint *e_map_get_closest_point (EMap *map, gdouble longitude, gdouble latitude, gboolean in_view); #endif diff --git a/widgets/table/e-cell-checkbox.c b/widgets/table/e-cell-checkbox.c index b01e6c11bc..9264c37ad4 100644 --- a/widgets/table/e-cell-checkbox.c +++ b/widgets/table/e-cell-checkbox.c @@ -42,7 +42,7 @@ static GdkPixbuf *checks [2]; static void ecc_print (ECellView *ecell_view, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width, double height) + gdouble width, gdouble height) { cairo_t *cr = gtk_print_context_get_cairo_context (context); const gint value = GPOINTER_TO_INT ( diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c index af79261c64..fe9b90717f 100644 --- a/widgets/table/e-cell-combo.c +++ b/widgets/table/e-cell-combo.c @@ -373,8 +373,8 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc, gboolean show_vscroll = FALSE, show_hscroll = FALSE; gint avail_height, avail_width, min_height, work_height, screen_width; gint column_width, row_height, scrollbar_width; - double x1, y1; - double wx, wy; + gdouble x1, y1; + gdouble wx, wy; /* This code is practically copied from GtkCombo. */ popup = GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window); diff --git a/widgets/table/e-cell-date-edit.c b/widgets/table/e-cell-date-edit.c index f67a03ceed..1d27b292d0 100644 --- a/widgets/table/e-cell-date-edit.c +++ b/widgets/table/e-cell-date-edit.c @@ -644,7 +644,7 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde, GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (eti)->canvas); GtkRequisition popup_requisition; gint avail_height, screen_width, column_width, row_height; - double x1, y1, wx, wy; + gdouble x1, y1, wx, wy; gdk_window_get_origin (canvas->window, x, y); diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index 3f7ee1d378..eb7b1330c3 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -191,7 +191,7 @@ pixbuf_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) static void pixbuf_print (ECellView *ecell_view, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width, double height) + gdouble width, gdouble height) { GdkPixbuf *pixbuf; gint scale; @@ -203,8 +203,8 @@ pixbuf_print (ECellView *ecell_view, GtkPrintContext *context, scale = gdk_pixbuf_get_height (pixbuf); cairo_save (cr); - cairo_translate (cr, 0, (double)(height - scale) / (double)2); - gdk_cairo_set_source_pixbuf (cr, pixbuf, (double)scale, (double)scale); + cairo_translate (cr, 0, (gdouble)(height - scale) / (gdouble)2); + gdk_cairo_set_source_pixbuf (cr, pixbuf, (gdouble)scale, (gdouble)scale); cairo_paint (cr); cairo_restore (cr); } @@ -212,7 +212,7 @@ pixbuf_print (ECellView *ecell_view, GtkPrintContext *context, static gdouble pixbuf_print_height (ECellView *ecell_view, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width) + gdouble width) { GdkPixbuf *pixbuf; diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c index 62777792b3..6deb4c46a9 100644 --- a/widgets/table/e-cell-popup.c +++ b/widgets/table/e-cell-popup.c @@ -88,14 +88,14 @@ static void ecp_print (ECellView *ecv, gint model_col, gint view_col, gint row, - double width, - double height); + gdouble width, + gdouble height); static gdouble ecp_print_height (ECellView *ecv, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width); + gdouble width); static gint ecp_max_width (ECellView *ecv, gint model_col, gint view_col); @@ -388,7 +388,7 @@ ecp_leave_edit (ECellView *ecv, gint model_col, gint view_col, gint row, static void ecp_print (ECellView *ecv, GtkPrintContext *context, - gint model_col, gint view_col, gint row, double width, double height) + gint model_col, gint view_col, gint row, gdouble width, gdouble height) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; @@ -399,7 +399,7 @@ ecp_print (ECellView *ecv, GtkPrintContext *context, static gdouble ecp_print_height (ECellView *ecv, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width) + gdouble width) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 852f8ec980..57dd88e17d 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -136,7 +136,7 @@ typedef struct { gint xofs, yofs; /* This gets added to the x and y for the cell text. */ - double ellipsis_width[2]; /* The width of the ellipsis. */ + gdouble ellipsis_width[2]; /* The width of the ellipsis. */ } ECellTextView; struct _CellEdit { @@ -289,7 +289,7 @@ ect_stop_editing (ECellTextView *text_view, gboolean commit) text = edit->text; if (edit->tep) g_object_unref (edit->tep); - if (! edit->default_cursor_shown) { + if (!edit->default_cursor_shown) { gdk_window_set_cursor (GTK_WIDGET(text_view->canvas)->window, NULL); edit->default_cursor_shown = TRUE; } @@ -1132,7 +1132,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col text_view->pointer_in = FALSE; #endif if (edit_display) { - if (! edit->default_cursor_shown) { + if (!edit->default_cursor_shown) { gdk_window_set_cursor (canvas->window, NULL); edit->default_cursor_shown = TRUE; } @@ -1301,7 +1301,7 @@ ect_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, static void get_font_size (PangoLayout *layout, PangoFontDescription *font, const gchar *text, - double *width, double *height) + gdouble *width, gdouble *height) { gint w; gint h; @@ -1314,14 +1314,14 @@ get_font_size (PangoLayout *layout, PangoFontDescription *font, const gchar *tex pango_layout_get_size (layout, &w, &h); - *width = (double)w/(double)PANGO_SCALE; - *height = (double)h/(double)PANGO_SCALE; + *width = (gdouble)w/(gdouble)PANGO_SCALE; + *height = (gdouble)h/(gdouble)PANGO_SCALE; } static void ect_print (ECellView *ecell_view, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width, double height) + gdouble width, gdouble height) { PangoFontDescription *font_des; PangoLayout *layout; @@ -1334,7 +1334,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, gboolean strikeout, underline; cairo_t *cr; gchar *string; - double ty, ly, text_width = 0.0, text_height = 0.0; + gdouble ty, ly, text_width = 0.0, text_height = 0.0; cr = gtk_print_context_get_cairo_context (context); string = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row); @@ -1354,9 +1354,9 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, pango_context = gtk_widget_get_pango_context (canvas); font_metrics = pango_context_get_metrics (pango_context, canvas->style->font_desc, pango_context_get_language(pango_context)); - ty = (double)(text_height + ty = (gdouble)(text_height - pango_font_metrics_get_ascent (font_metrics) - - pango_font_metrics_get_descent (font_metrics)) / 2.0 /(double)PANGO_SCALE; + - pango_font_metrics_get_descent (font_metrics)) / 2.0 /(gdouble)PANGO_SCALE; strikeout = ect->strikeout_column >= 0 && row >= 0 && e_table_model_value_at (ecell_view->e_table_model, ect->strikeout_column, row); @@ -1366,7 +1366,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, dir = pango_find_base_dir (string, strlen(string)); if (underline) { - ly = ty + (double)pango_font_metrics_get_underline_position (font_metrics)/(double)PANGO_SCALE; + ly = ty + (gdouble)pango_font_metrics_get_underline_position (font_metrics)/(gdouble)PANGO_SCALE; cairo_new_path (cr); if (dir == PANGO_DIRECTION_RTL) { cairo_move_to (cr, width - 2, ly + text_height + 6); @@ -1376,12 +1376,12 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, cairo_move_to (cr, 2, ly + text_height + 6); cairo_line_to (cr, MIN (2 + text_width, width - 2), ly + text_height + 6); } - cairo_set_line_width (cr, (double)pango_font_metrics_get_underline_thickness (font_metrics)/(double)PANGO_SCALE); + cairo_set_line_width (cr, (gdouble)pango_font_metrics_get_underline_thickness (font_metrics)/(gdouble)PANGO_SCALE); cairo_stroke (cr); } if (strikeout) { - ly = ty + (double)pango_font_metrics_get_strikethrough_position (font_metrics)/(double)PANGO_SCALE; + ly = ty + (gdouble)pango_font_metrics_get_strikethrough_position (font_metrics)/(gdouble)PANGO_SCALE; cairo_new_path (cr); if (dir == PANGO_DIRECTION_RTL) { cairo_move_to (cr, width - 2, ly + text_height + 6); @@ -1391,7 +1391,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, cairo_move_to (cr, 2, ly + text_height + 6); cairo_line_to (cr, MIN (2 + text_width, width - 2), ly + text_height + 6); } - cairo_set_line_width (cr,(double)pango_font_metrics_get_strikethrough_thickness (font_metrics)/(double)PANGO_SCALE); + cairo_set_line_width (cr,(gdouble)pango_font_metrics_get_strikethrough_thickness (font_metrics)/(gdouble)PANGO_SCALE); cairo_stroke (cr); } @@ -1409,7 +1409,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, static gdouble ect_print_height (ECellView *ecell_view, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width) + gdouble width) { /* * Font size is 16 by default. To leave some margin for cell diff --git a/widgets/table/e-cell-text.h b/widgets/table/e-cell-text.h index 740db82880..2cc23a36f5 100644 --- a/widgets/table/e-cell-text.h +++ b/widgets/table/e-cell-text.h @@ -56,7 +56,7 @@ typedef struct { GtkJustification justify; gchar *font_name; - double x, y; /* Position at anchor */ + gdouble x, y; /* Position at anchor */ gulong pixel; /* Fill color */ diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c index a03eed037e..5f7cc66321 100644 --- a/widgets/table/e-cell-toggle.c +++ b/widgets/table/e-cell-toggle.c @@ -328,8 +328,8 @@ cell_toggle_print (ECellView *ecell_view, cairo_save(cr); cairo_translate (cr, 0 , 0); image = gdk_pixbuf_add_alpha (image, TRUE, 255, 255, 255); - image_width = (double)gdk_pixbuf_get_width (image); - image_height = (double)gdk_pixbuf_get_height (image); + image_width = (gdouble)gdk_pixbuf_get_width (image); + image_height = (gdouble)gdk_pixbuf_get_height (image); cairo_rectangle (cr, image_width / 7, image_height / 3, image_width - image_width / 4, image_width - image_height / 7); diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c index fac7b9784f..8a8017e2e7 100644 --- a/widgets/table/e-cell-tree.c +++ b/widgets/table/e-cell-tree.c @@ -674,7 +674,7 @@ ect_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, static void ect_print (ECellView *ecell_view, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width, double height) + gdouble width, gdouble height) { ECellTreeView *tree_view = (ECellTreeView *) ecell_view; cairo_t *cr = gtk_print_context_get_cairo_context (context); @@ -769,7 +769,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, static gdouble ect_print_height (ECellView *ecell_view, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width) + gdouble width) { return 12; /* XXX */ } diff --git a/widgets/table/e-cell.c b/widgets/table/e-cell.c index 4c32c18e77..1c4b64f2c1 100644 --- a/widgets/table/e-cell.c +++ b/widgets/table/e-cell.c @@ -283,7 +283,7 @@ e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable, void e_cell_print (ECellView *ecell_view, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width, double height) + gdouble width, gdouble height) { if (ECVIEW_EC_CLASS(ecell_view)->print) ECVIEW_EC_CLASS(ecell_view)->print (ecell_view, context, model_col, view_col, row, width, height); @@ -297,7 +297,7 @@ e_cell_print (ECellView *ecell_view, GtkPrintContext *context, gdouble e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context, gint model_col, gint view_col, gint row, - double width) + gdouble width) { if (ECVIEW_EC_CLASS(ecell_view)->print_height) return ECVIEW_EC_CLASS(ecell_view)->print_height diff --git a/widgets/table/e-cell.h b/widgets/table/e-cell.h index 181a3143e4..63fa8e2afd 100644 --- a/widgets/table/e-cell.h +++ b/widgets/table/e-cell.h @@ -151,8 +151,8 @@ void e_cell_print (ECellView *ecell_view, gint model_col, gint view_col, gint row, - double width, - double height); + gdouble width, + gdouble height); gdouble e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context, gint model_col, diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c index c71e10bde4..e5c35fe93c 100644 --- a/widgets/table/e-table-click-to-add.c +++ b/widgets/table/e-table-click-to-add.c @@ -242,10 +242,10 @@ create_rect_and_text (ETableClickToAdd *etcta) if (!etcta->rect) etcta->rect = gnome_canvas_item_new(GNOME_CANVAS_GROUP(etcta), gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) etcta->width - 1, - "y2", (double) etcta->height - 1, + "x1", (gdouble) 0, + "y1", (gdouble) 0, + "x2", (gdouble) etcta->width - 1, + "y2", (gdouble) etcta->height - 1, "outline_color_gdk", &widget->style->fg[GTK_STATE_NORMAL], "fill_color_gdk", &widget->style->bg[GTK_STATE_NORMAL], NULL); @@ -458,7 +458,7 @@ etcta_reflow (GnomeCanvasItem *item, gint flags) { ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item); - double old_height = etcta->height; + gdouble old_height = etcta->height; if (etcta->text) { g_object_get(etcta->text, diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c index 4e9802d9b8..cd96441b63 100644 --- a/widgets/table/e-table-col.c +++ b/widgets/table/e-table-col.c @@ -169,7 +169,7 @@ ETableCol * e_table_col_new (gint col_idx, const gchar *text, const gchar *icon_name, - double expansion, + gdouble expansion, gint min_width, ECell *ecell, GCompareDataFunc compare, diff --git a/widgets/table/e-table-col.h b/widgets/table/e-table-col.h index 7b7c31db7c..cbe3dc3a80 100644 --- a/widgets/table/e-table-col.h +++ b/widgets/table/e-table-col.h @@ -96,7 +96,7 @@ GType e_table_col_get_type (void); ETableCol * e_table_col_new (gint col_idx, const gchar *text, const gchar *icon_name, - double expansion, + gdouble expansion, gint min_width, ECell *ecell, GCompareDataFunc compare, diff --git a/widgets/table/e-table-column-specification.h b/widgets/table/e-table-column-specification.h index 7ea6f23dc4..048decdf54 100644 --- a/widgets/table/e-table-column-specification.h +++ b/widgets/table/e-table-column-specification.h @@ -43,7 +43,7 @@ typedef struct { gchar *title; gchar *pixbuf; - double expansion; + gdouble expansion; gint minimum_width; guint resizable : 1; guint disabled : 1; diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index 1bbfc6a8b3..f87b316dd0 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -1031,7 +1031,7 @@ config_button_remove (GtkWidget *widget, ETableConfig *config) gint row = GPOINTER_TO_INT (column->data); memmove (config->temp_state->columns + row, config->temp_state->columns + row + 1, sizeof (gint) * (config->temp_state->col_count - row - 1)); - memmove (config->temp_state->expansions + row, config->temp_state->expansions + row + 1, sizeof (double) * (config->temp_state->col_count - row - 1)); + memmove (config->temp_state->expansions + row, config->temp_state->expansions + row + 1, sizeof (gdouble) * (config->temp_state->col_count - row - 1)); config->temp_state->col_count --; } config->temp_state->columns = g_renew (int, config->temp_state->columns, config->temp_state->col_count); @@ -1048,9 +1048,9 @@ config_button_up (GtkWidget *widget, ETableConfig *config) GList *columns = NULL; GList *column; gint *new_shown; - double *new_expansions; + gdouble *new_expansions; gint next_col; - double next_expansion; + gdouble next_expansion; gint i; e_table_selected_row_foreach (config->shown, add_column, &columns); @@ -1103,9 +1103,9 @@ config_button_down (GtkWidget *widget, ETableConfig *config) GList *columns = NULL; GList *column; gint *new_shown; - double *new_expansions; + gdouble *new_expansions; gint next_col; - double next_expansion; + gdouble next_expansion; gint i; e_table_selected_row_foreach (config->shown, add_column, &columns); diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c index 5cd2f9edc2..f38cb3964a 100644 --- a/widgets/table/e-table-field-chooser-item.c +++ b/widgets/table/e-table-field-chooser-item.c @@ -90,11 +90,11 @@ etfci_dispose (GObject *object) } static gint -etfci_find_button (ETableFieldChooserItem *etfci, double loc) +etfci_find_button (ETableFieldChooserItem *etfci, gdouble loc) { gint i; gint count; - double height = 0; + gdouble height = 0; count = e_table_header_count(etfci->combined_header); for (i = 0; i < count; i++) { @@ -137,7 +137,7 @@ 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); } @@ -148,10 +148,10 @@ static void etfci_reflow (GnomeCanvasItem *item, gint flags) { ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item); - double old_height; + gdouble old_height; gint i; gint count; - double height = 0; + gdouble height = 0; etfci_rebuild_combined (etfci); @@ -176,10 +176,10 @@ etfci_reflow (GnomeCanvasItem *item, gint flags) } static void -etfci_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) +etfci_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags) { ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item); - double i2c [6]; + gdouble i2c [6]; ArtPoint c1, c2, i1, i2; if (GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->update) @@ -493,7 +493,7 @@ etfci_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint w } static double -etfci_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, +etfci_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; @@ -514,7 +514,7 @@ etfci_maybe_start_drag (ETableFieldChooserItem *etfci, gint x, gint y) } static void -etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, double x, double y) +etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, gdouble x, gdouble y) { GtkWidget *widget = GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas); GtkTargetList *list; diff --git a/widgets/table/e-table-field-chooser-item.h b/widgets/table/e-table-field-chooser-item.h index d0cbbd9f75..9040d7db39 100644 --- a/widgets/table/e-table-field-chooser-item.h +++ b/widgets/table/e-table-field-chooser-item.h @@ -42,7 +42,7 @@ typedef struct { ETableHeader *header; ETableHeader *combined_header; - double height, width; + gdouble height, width; PangoFontDescription *font_desc; diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c index 8d6ddb59e3..3c1d722617 100644 --- a/widgets/table/e-table-field-chooser.c +++ b/widgets/table/e-table-field-chooser.c @@ -101,10 +101,10 @@ ensure_nonzero_step_increments (ETableFieldChooser *etfc) static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, ETableFieldChooser *etfc) { - double height; + gdouble height; etfc->last_alloc = *allocation; gnome_canvas_item_set( etfc->item, - "width", (double) allocation->width, + "width", (gdouble) allocation->width, NULL ); g_object_get(etfc->item, "height", &height, @@ -112,15 +112,15 @@ static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, ETab height = MAX(height, allocation->height); gnome_canvas_set_scroll_region(GNOME_CANVAS( etfc->canvas ), 0, 0, allocation->width - 1, height - 1); gnome_canvas_item_set( etfc->rect, - "x2", (double) allocation->width, - "y2", (double) height, + "x2", (gdouble) allocation->width, + "y2", (gdouble) height, NULL ); ensure_nonzero_step_increments (etfc); } static void resize(GnomeCanvas *canvas, ETableFieldChooser *etfc) { - double height; + gdouble height; g_object_get(etfc->item, "height", &height, NULL); @@ -129,8 +129,8 @@ static void resize(GnomeCanvas *canvas, ETableFieldChooser *etfc) gnome_canvas_set_scroll_region (GNOME_CANVAS(etfc->canvas), 0, 0, etfc->last_alloc.width - 1, height - 1); gnome_canvas_item_set( etfc->rect, - "x2", (double) etfc->last_alloc.width, - "y2", (double) height, + "x2", (gdouble) etfc->last_alloc.width, + "y2", (gdouble) height, NULL ); ensure_nonzero_step_increments (etfc); } @@ -187,16 +187,16 @@ e_table_field_chooser_init (ETableFieldChooser *etfc) etfc->rect = gnome_canvas_item_new(gnome_canvas_root( GNOME_CANVAS( etfc->canvas ) ), gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, + "x1", (gdouble) 0, + "y1", (gdouble) 0, + "x2", (gdouble) 100, + "y2", (gdouble) 100, "fill_color", "white", NULL ); etfc->item = gnome_canvas_item_new(gnome_canvas_root(etfc->canvas), e_table_field_chooser_item_get_type(), - "width", (double) 100, + "width", (gdouble) 100, "full_header", etfc->full_header, "header", etfc->header, "dnd_code", etfc->dnd_code, diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index 26124b824a..77d766b16e 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -1084,10 +1084,10 @@ etgc_reflow (GnomeCanvasItem *item, gint flags) running_height); gnome_canvas_item_set (GNOME_CANVAS_ITEM(child_node->rect), - "x1", (double) 0, - "x2", (double) running_width + GROUP_INDENT, - "y1", (double) running_height - extra_height, - "y2", (double) running_height + item_height, + "x1", (gdouble) 0, + "x2", (gdouble) running_width + GROUP_INDENT, + "y1", (gdouble) running_height - extra_height, + "y2", (gdouble) running_height + item_height, NULL); running_height += item_height + extra_height; @@ -1154,7 +1154,7 @@ typedef struct { #if 0 static gint -gp_draw_rect (GtkPrintContext *context, double x, double y, double width, double height) +gp_draw_rect (GtkPrintContext *context, gdouble x, gdouble y, gdouble width, gdouble height) { cairo_t *cr; cr = gtk_print_context_get_cairo_context (context); diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 0ea785bc86..b39d86bcd4 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -183,11 +183,11 @@ e_table_header_item_get_height (ETableHeaderItem *ethi) } static void -ethi_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) +ethi_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags) { ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item); - double i2c [6]; + gdouble i2c [6]; ArtPoint c1, c2, i1, i2; if (GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update) @@ -526,7 +526,7 @@ static gchar gray50_bits [] = { static void ethi_add_destroy_marker (ETableHeaderItem *ethi) { - double x1; + gdouble x1; if (ethi->remove_item) gtk_object_destroy (GTK_OBJECT (ethi->remove_item)); @@ -535,7 +535,7 @@ ethi_add_destroy_marker (ETableHeaderItem *ethi) ethi->stipple = gdk_bitmap_create_from_data ( NULL, gray50_bits, gray50_width, gray50_height); - x1 = (double) e_table_header_col_diff (ethi->eth, 0, ethi->drag_col); + x1 = (gdouble) e_table_header_col_diff (ethi->eth, 0, ethi->drag_col); if (ethi->drag_col > 0) x1 += ethi->group_indent_width; @@ -543,11 +543,11 @@ ethi_add_destroy_marker (ETableHeaderItem *ethi) GNOME_CANVAS_GROUP (GNOME_CANVAS_ITEM (ethi)->canvas->root), gnome_canvas_rect_get_type (), "x1", x1 + 1, - "y1", (double) 1, - "x2", (double) x1 + e_table_header_col_diff ( + "y1", (gdouble) 1, + "x2", (gdouble) x1 + e_table_header_col_diff ( ethi->eth, ethi->drag_col, ethi->drag_col+1) - 2, - "y2", (double) ethi->height - 2, + "y2", (gdouble) ethi->height - 2, "fill_color", "red", "fill_stipple", ethi->stipple, NULL); @@ -630,7 +630,7 @@ scroll_timeout (gpointer data) ETableHeaderItem *ethi = data; gint dx = 0; GtkAdjustment *h, *v; - double value; + gdouble value; if (ethi->scroll_direction & ET_SCROLL_RIGHT) dx += 20; @@ -1001,7 +1001,7 @@ ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wi } static double -ethi_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, +ethi_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; @@ -1626,7 +1626,7 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col) ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i); if (model_col == column.column || model_col == -1) { gint ascending = column.ascending; - ascending = ! ascending; + ascending = !ascending; column.ascending = ascending; e_table_sort_info_grouping_set_nth(ethi->sort_info, i, column); found = TRUE; diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c index e5587ab3e2..3ff4c3472b 100644 --- a/widgets/table/e-table-header.c +++ b/widgets/table/e-table-header.c @@ -684,8 +684,8 @@ e_table_header_set_selection (ETableHeader *eth, gboolean allow_selection) static void eth_set_size (ETableHeader *eth, gint idx, gint size) { - double expansion; - double old_expansion; + gdouble expansion; + gdouble old_expansion; gint min_width; gint left_width; gint total_extra; @@ -775,8 +775,8 @@ eth_set_size (ETableHeader *eth, gint idx, gint size) 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)); + expansion * (((gdouble)(size - (eth->columns[idx]->min_width + + eth->width_extras))) / ((gdouble)total_extra)); /* The expansion left for the columns on the right. */ expansion -= eth->columns[idx]->expansion; @@ -845,9 +845,9 @@ eth_calc_widths (ETableHeader *eth) { gint i; gint extra; - double expansion; + gdouble expansion; gint last_position = 0; - double next_position = 0; + gdouble next_position = 0; gint last_resizable = -1; gint *widths; gboolean changed; diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 006c5c02cf..d6f0a45cf7 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -419,9 +419,9 @@ eti_detach_cell_views (ETableItem *eti) } static void -eti_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2) +eti_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2) { - double i2c [6]; + gdouble i2c [6]; ArtPoint c1, c2, i1, i2; ETableItem *eti = E_TABLE_ITEM (item); @@ -474,7 +474,7 @@ eti_reflow (GnomeCanvasItem *item, gint flags) * GnomeCanvasItem::update method */ static void -eti_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) +eti_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags) { ArtPoint o1, o2; ETableItem *eti = E_TABLE_ITEM (item); @@ -782,7 +782,7 @@ eti_item_region_redraw (ETableItem *eti, gint x0, gint y0, gint x1, gint y1) { GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti); ArtDRect rect; - double i2c [6]; + gdouble i2c [6]; rect.x0 = x0; rect.y0 = y0; @@ -1728,7 +1728,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid gint x1, x2; gint f_x1, f_x2, f_y1, f_y2; gboolean f_found; - double i2c [6]; + gdouble i2c [6]; ArtPoint eti_base, eti_base_item, lower_right; GtkWidget *canvas = GTK_WIDGET(item->canvas); gint height_extra = eti->horizontal_draw_grid ? 1 : 0; @@ -2015,7 +2015,7 @@ exit: } static double -eti_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, +eti_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; @@ -2024,7 +2024,7 @@ eti_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, } static gboolean -find_cell (ETableItem *eti, double x, double y, gint *view_col_res, gint *view_row_res, double *x1_res, double *y1_res) +find_cell (ETableItem *eti, gdouble x, gdouble y, gint *view_col_res, gint *view_row_res, gdouble *x1_res, gdouble *y1_res) { const gint cols = eti->cols; const gint rows = eti->rows; @@ -2164,8 +2164,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) switch (e->type) { case GDK_BUTTON_PRESS: { - double x1, y1; - double realx, realy; + gdouble x1, y1; + gdouble realx, realy; GdkEventButton button; gint col, row; gint cursor_row, cursor_col; @@ -2288,7 +2288,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) } case GDK_BUTTON_RELEASE: { - double x1, y1; + gdouble x1, y1; gint col, row; gint cursor_row, cursor_col; @@ -2367,7 +2367,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) case GDK_2BUTTON_PRESS: { gint model_col, model_row; #if 0 - double x1, y1; + gdouble x1, y1; #endif d(g_print("%s: GDK_2BUTTON_PRESS received, button %d\n", __FUNCTION__, e->button.button)); @@ -2422,7 +2422,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) } case GDK_MOTION_NOTIFY: { gint col, row, flags; - double x1, y1; + gdouble x1, y1; gint cursor_col, cursor_row; gnome_canvas_item_w2i (item, &e->motion.x, &e->motion.y); @@ -3079,7 +3079,7 @@ eti_cursor_change (ESelectionModel *selection, gint row, gint col, ETableItem *e return; } - if (! e_table_model_has_change_pending (eti->table_model)) { + if (!e_table_model_has_change_pending (eti->table_model)) { if (!eti->in_key_press) { eti_maybe_show_cursor(eti, DOUBLE_CLICK_TIME + 10); } else { @@ -3111,7 +3111,7 @@ eti_cursor_activated (ESelectionModel *selection, gint row, gint col, ETableItem view_col = model_to_view_col(eti, col); if (view_row != -1 && view_col != -1) { - if (! e_table_model_has_change_pending (eti->table_model)) { + if (!e_table_model_has_change_pending (eti->table_model)) { if (!eti->in_key_press) { eti_show_cursor(eti, DOUBLE_CLICK_TIME + 10); } else { @@ -3254,7 +3254,7 @@ e_table_item_compute_mouse_over (ETableItem *eti, gint *row, gint *col) { - double realx, realy; + gdouble realx, realy; /* Save the grabbed row but make sure that we don't get flawed results because the cursor is grabbed. */ gint grabbed_row = eti->grabbed_row; @@ -3307,8 +3307,8 @@ static gdouble * e_table_item_calculate_print_widths (ETableHeader *eth, gdouble width) { gint i; - double extra; - double expansion; + gdouble extra; + gdouble expansion; gint last_resizable = -1; gdouble scale = 1.0L; gdouble *widths = g_new(gdouble, e_table_header_count(eth)); @@ -3348,7 +3348,7 @@ eti_printed_row_height (ETableItem *eti, gdouble *widths, GtkPrintContext *conte #define CHECK(x) if((x) == -1) return -1; static gint -gp_draw_rect (GtkPrintContext *context, double x, double y, double width, double height) +gp_draw_rect (GtkPrintContext *context, gdouble x, gdouble y, gdouble width, gdouble height) { cairo_t *cr; cr = gtk_print_context_get_cairo_context (context); @@ -3363,8 +3363,8 @@ gp_draw_rect (GtkPrintContext *context, double x, double y, double width, double static void e_table_item_print_page (EPrintable *ep, GtkPrintContext *context, - double width, - double height, + gdouble width, + gdouble height, gboolean quantize, ETableItemPrintContext *itemcontext) { @@ -3374,7 +3374,7 @@ e_table_item_print_page (EPrintable *ep, gdouble max_height; gint rows_printed = itemcontext->rows_printed; gint row, col, next_page = 0; - double yd = height; + gdouble yd = height; cairo_t *cr; gdouble *widths; diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c index 86694eccac..46d0c355e8 100644 --- a/widgets/table/e-table-state.c +++ b/widgets/table/e-table-state.c @@ -145,7 +145,7 @@ e_table_state_load_from_string (ETableState *state, typedef struct { gint column; - double expansion; + gdouble expansion; } int_and_double; void @@ -255,7 +255,7 @@ e_table_state_save_to_node (ETableState *state, for (i = 0; i < state->col_count; i++) { gint column = state->columns[i]; - double expansion = state->expansions[i]; + gdouble expansion = state->expansions[i]; xmlNode *new_node; new_node = xmlNewChild ( diff --git a/widgets/table/e-table-state.h b/widgets/table/e-table-state.h index da3f11b93c..082bb17ad7 100644 --- a/widgets/table/e-table-state.h +++ b/widgets/table/e-table-state.h @@ -42,7 +42,7 @@ typedef struct { ETableSortInfo *sort_info; gint col_count; gint *columns; - double *expansions; + gdouble *expansions; } ETableState; typedef struct { diff --git a/widgets/table/e-table-utils.c b/widgets/table/e-table-utils.c index e54317ec8b..89affd357d 100644 --- a/widgets/table/e-table-utils.c +++ b/widgets/table/e-table-utils.c @@ -52,7 +52,7 @@ e_table_state_to_header (GtkWidget *widget, ETableHeader *full_header, ETableSta for (column = 0; column < state->col_count; column++) { gint col; - double expansion; + gdouble expansion; ETableCol *table_col; col = state->columns[column]; diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 2656f7f949..14b3707464 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -593,7 +593,7 @@ et_focus (GtkWidget *container, GtkDirectionType direction) static void set_header_canvas_width (ETable *e_table) { - double oldwidth, oldheight, width; + gdouble oldwidth, oldheight, width; if (!(e_table->header_item && e_table->header_canvas && e_table->table_canvas)) return; @@ -997,7 +997,7 @@ changed_idle (gpointer data) gtk_object_destroy (GTK_OBJECT (et->group)); et_build_groups(et); g_object_set (et->canvas_vbox, - "width", (double) GTK_WIDGET (et->table_canvas)->allocation.width, + "width", (gdouble) GTK_WIDGET (et->table_canvas)->allocation.width, NULL); if (GTK_WIDGET_REALIZED(et->table_canvas)) @@ -1308,7 +1308,7 @@ e_table_set_state_object(ETable *e_table, ETableState *state) connect_header (e_table, state); - g_value_set_double (val, (double) (GTK_WIDGET(e_table->table_canvas)->allocation.width)); + g_value_set_double (val, (gdouble) (GTK_WIDGET(e_table->table_canvas)->allocation.width)); g_object_set_property (G_OBJECT (e_table->header), "width", val); g_free (val); @@ -2586,10 +2586,10 @@ e_table_drag_highlight (ETable *table, NULL); } gnome_canvas_item_set (table->drop_highlight, - "x1", (double) x, - "x2", (double) x + width - 1, - "y1", (double) y, - "y2", (double) y + height - 1, + "x1", (gdouble) x, + "x2", (gdouble) x + width - 1, + "y1", (gdouble) y, + "y2", (gdouble) y + height - 1, NULL); } else { if (table->drop_highlight) { @@ -2884,7 +2884,7 @@ scroll_timeout (gpointer data) ETable *et = data; gint dx = 0, dy = 0; GtkAdjustment *h, *v; - double hvalue, vvalue; + gdouble hvalue, vvalue; if (et->scroll_direction & ET_SCROLL_DOWN) dy += 20; diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index d612fc93bc..3d5c604faa 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -663,7 +663,7 @@ et_focus (GtkWidget *container, GtkDirectionType direction) static void set_header_canvas_width (ETree *e_tree) { - double oldwidth, oldheight, width; + gdouble oldwidth, oldheight, width; if (!(e_tree->priv->header_item && e_tree->priv->header_canvas && e_tree->priv->table_canvas)) return; @@ -1165,7 +1165,7 @@ e_tree_set_state_object(ETree *e_tree, ETableState *state) connect_header (e_tree, state); - g_value_set_double (val, (double) (GTK_WIDGET(e_tree->priv->table_canvas)->allocation.width)); + g_value_set_double (val, (gdouble) (GTK_WIDGET(e_tree->priv->table_canvas)->allocation.width)); g_object_set_property (G_OBJECT (e_tree->priv->header), "width", val); g_free (val); @@ -2378,10 +2378,10 @@ e_tree_drag_highlight (ETree *tree, NULL); } gnome_canvas_item_set (tree->priv->drop_highlight, - "x1", (double) x, - "x2", (double) x + width - 1, - "y1", (double) y, - "y2", (double) y + height - 1, + "x1", (gdouble) x, + "x2", (gdouble) x + width - 1, + "y1", (gdouble) y, + "y2", (gdouble) y + height - 1, NULL); } else { gtk_object_destroy (GTK_OBJECT (tree->priv->drop_highlight)); @@ -2747,7 +2747,7 @@ scroll_timeout (gpointer data) ETree *et = data; gint dx = 0, dy = 0; GtkAdjustment *v, *h; - double vvalue, hvalue; + gdouble vvalue, hvalue; if (et->priv->scroll_direction & ET_SCROLL_DOWN) dy += 20; @@ -3399,7 +3399,7 @@ e_tree_class_init (ETreeClass *class) static void tree_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETree *tree) { - double width; + gdouble width; g_return_if_fail (tree != NULL); g_return_if_fail (tree->priv != NULL); @@ -3444,8 +3444,8 @@ e_tree_set_info_message (ETree *tree, const gchar *info_message) "justification", GTK_JUSTIFY_LEFT, "text", info_message, "draw_background", FALSE, - "width", (double) GTK_WIDGET (tree->priv->table_canvas)->allocation.width - 60.0, - "clip_width", (double) GTK_WIDGET (tree->priv->table_canvas)->allocation.width - 60.0, + "width", (gdouble) GTK_WIDGET (tree->priv->table_canvas)->allocation.width - 60.0, + "clip_width", (gdouble) GTK_WIDGET (tree->priv->table_canvas)->allocation.width - 60.0, NULL); e_canvas_item_move_absolute (tree->priv->info_text, 30, 30); diff --git a/widgets/table/gal-a11y-e-cell-popup.h b/widgets/table/gal-a11y-e-cell-popup.h index 9729e13e55..b96aa9392c 100644 --- a/widgets/table/gal-a11y-e-cell-popup.h +++ b/widgets/table/gal-a11y-e-cell-popup.h @@ -58,4 +58,4 @@ AtkObject *gal_a11y_e_cell_popup_new (ETableItem *item, gint view_col, gint row); -#endif /* ! __GAL_A11Y_E_CELL_POPUP_H__ */ +#endif /* __GAL_A11Y_E_CELL_POPUP_H__ */ diff --git a/widgets/table/gal-a11y-e-cell-registry.h b/widgets/table/gal-a11y-e-cell-registry.h index 85afdadf4e..189da02b02 100644 --- a/widgets/table/gal-a11y-e-cell-registry.h +++ b/widgets/table/gal-a11y-e-cell-registry.h @@ -68,4 +68,4 @@ void gal_a11y_e_cell_registry_add_cell_type (GalA11yECellRegistry *re GType type, GalA11yECellRegistryFunc func); -#endif /* ! __GAL_A11Y_E_CELL_REGISTRY_H__ */ +#endif /* __GAL_A11Y_E_CELL_REGISTRY_H__ */ diff --git a/widgets/table/gal-a11y-e-cell-text.h b/widgets/table/gal-a11y-e-cell-text.h index e5a95accad..c9e0fa8ac4 100644 --- a/widgets/table/gal-a11y-e-cell-text.h +++ b/widgets/table/gal-a11y-e-cell-text.h @@ -60,4 +60,4 @@ AtkObject *gal_a11y_e_cell_text_new (ETableItem *item, gint view_col, gint row); -#endif /* ! __GAL_A11Y_E_CELL_TEXT_H__ */ +#endif /* __GAL_A11Y_E_CELL_TEXT_H__ */ diff --git a/widgets/table/gal-a11y-e-cell-tree.h b/widgets/table/gal-a11y-e-cell-tree.h index fa48c1486a..fedd9e5fbd 100644 --- a/widgets/table/gal-a11y-e-cell-tree.h +++ b/widgets/table/gal-a11y-e-cell-tree.h @@ -60,4 +60,4 @@ AtkObject *gal_a11y_e_cell_tree_new (ETableItem *item, gint view_col, gint row); -#endif /* ! __GAL_A11Y_E_CELL_TREE_H__ */ +#endif /* __GAL_A11Y_E_CELL_TREE_H__ */ diff --git a/widgets/table/gal-a11y-e-cell.h b/widgets/table/gal-a11y-e-cell.h index 4f2e536b8d..aa02aff79c 100644 --- a/widgets/table/gal-a11y-e-cell.h +++ b/widgets/table/gal-a11y-e-cell.h @@ -106,4 +106,4 @@ gboolean gal_a11y_e_cell_remove_state (GalA11yECell *cell, AtkStateType state_type, gboolean emit_signal); -#endif /* ! __GAL_A11Y_E_CELL_H__ */ +#endif /* __GAL_A11Y_E_CELL_H__ */ diff --git a/widgets/table/gal-a11y-e-table-click-to-add.c b/widgets/table/gal-a11y-e-table-click-to-add.c index 225f24c685..8d788a458b 100644 --- a/widgets/table/gal-a11y-e-table-click-to-add.c +++ b/widgets/table/gal-a11y-e-table-click-to-add.c @@ -144,7 +144,7 @@ etcta_ref_child (AtkObject *accessible, AtkObject * atk_obj = NULL; ETableClickToAdd * etcta; - if ( i != 0 ) + if (i != 0) return NULL; etcta = E_TABLE_CLICK_TO_ADD(atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible))); diff --git a/widgets/table/gal-a11y-e-table-click-to-add.h b/widgets/table/gal-a11y-e-table-click-to-add.h index 17d6940d08..0d1507f79d 100644 --- a/widgets/table/gal-a11y-e-table-click-to-add.h +++ b/widgets/table/gal-a11y-e-table-click-to-add.h @@ -52,4 +52,4 @@ GType gal_a11y_e_table_click_to_add_get_type (void); AtkObject *gal_a11y_e_table_click_to_add_new (GObject *widget); void gal_a11y_e_table_click_to_add_init (void); -#endif /* ! __GAL_A11Y_E_TABLE_CLICK_TO_ADD_H__ */ +#endif /* __GAL_A11Y_E_TABLE_CLICK_TO_ADD_H__ */ diff --git a/widgets/table/gal-a11y-e-table-column-header.h b/widgets/table/gal-a11y-e-table-column-header.h index 0cf0695f75..ec9a74b868 100644 --- a/widgets/table/gal-a11y-e-table-column-header.h +++ b/widgets/table/gal-a11y-e-table-column-header.h @@ -50,4 +50,4 @@ GType gal_a11y_e_table_column_header_get_type (void); AtkObject *gal_a11y_e_table_column_header_new (ETableCol *etc, ETableItem *item); void gal_a11y_e_table_column_header_init (void); -#endif /* ! __GAL_A11Y_E_TABLE_COLUMN_HEADER_H__ */ +#endif /* __GAL_A11Y_E_TABLE_COLUMN_HEADER_H__ */ diff --git a/widgets/table/gal-a11y-e-table-factory.h b/widgets/table/gal-a11y-e-table-factory.h index f0a1cecd0b..6caf3d8beb 100644 --- a/widgets/table/gal-a11y-e-table-factory.h +++ b/widgets/table/gal-a11y-e-table-factory.h @@ -47,4 +47,4 @@ struct _GalA11yETableFactoryClass { /* Standard Glib function */ GType gal_a11y_e_table_factory_get_type (void); -#endif /* ! __GAL_A11Y_E_TABLE_FACTORY_H__ */ +#endif /* __GAL_A11Y_E_TABLE_FACTORY_H__ */ diff --git a/widgets/table/gal-a11y-e-table-item-factory.h b/widgets/table/gal-a11y-e-table-item-factory.h index 5fdf7ce1ef..a08cfeb84b 100644 --- a/widgets/table/gal-a11y-e-table-item-factory.h +++ b/widgets/table/gal-a11y-e-table-item-factory.h @@ -46,4 +46,4 @@ struct _GalA11yETableItemFactoryClass { /* Standard Glib function */ GType gal_a11y_e_table_item_factory_get_type (void); -#endif /* ! __GAL_A11Y_E_TABLE_FACTORY_H__ */ +#endif /* __GAL_A11Y_E_TABLE_FACTORY_H__ */ diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c index 37f55f68c1..85c4f9164d 100644 --- a/widgets/table/gal-a11y-e-table-item.c +++ b/widgets/table/gal-a11y-e-table-item.c @@ -799,7 +799,7 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y) /* Compare with previously saved column headers. */ for ( i = 0; i < n_cols && cols[i]; i ++ ) { for ( j = 0; j < prev_n_cols && prev_cols[j]; j ++ ) { - if ( prev_cols [j] == cols[i] && i != j ) { + if (prev_cols [j] == cols[i] && i != j) { reorder_found = TRUE; state [i] = ETI_HEADER_REORDERED; @@ -813,7 +813,7 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y) } /* cols[i] is new added column. */ - if ( j == prev_n_cols ) { + if (j == prev_n_cols) { added_found = TRUE; state[i] = ETI_HEADER_NEW_ADDED; } @@ -822,11 +822,11 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y) /* Now try to find if there are removed columns. */ for (i = 0; i < prev_n_cols && prev_cols[i]; i ++) { for (j = 0; j < n_cols && cols[j]; j ++) - if ( prev_cols [j] == cols[i] ) + if (prev_cols [j] == cols[i]) break; /* Removed columns found. */ - if ( j == n_cols ) { + if (j == n_cols) { removed_found = TRUE; prev_state[j] = ETI_HEADER_REMOVED; } diff --git a/widgets/table/gal-a11y-e-table-item.h b/widgets/table/gal-a11y-e-table-item.h index 87773aae48..90861a14ec 100644 --- a/widgets/table/gal-a11y-e-table-item.h +++ b/widgets/table/gal-a11y-e-table-item.h @@ -55,4 +55,4 @@ AtkObject *gal_a11y_e_table_item_new (ETableItem *item); void gal_a11y_e_table_item_init (void); -#endif /* ! __GAL_A11Y_E_TABLE_ITEM_H__ */ +#endif /* __GAL_A11Y_E_TABLE_ITEM_H__ */ diff --git a/widgets/table/gal-a11y-e-table.h b/widgets/table/gal-a11y-e-table.h index ba7c8adc03..f5dba40c7e 100644 --- a/widgets/table/gal-a11y-e-table.h +++ b/widgets/table/gal-a11y-e-table.h @@ -55,4 +55,4 @@ AtkObject *gal_a11y_e_table_new (GObject *table); void gal_a11y_e_table_init (void); -#endif /* ! __GAL_A11Y_E_TABLE_H__ */ +#endif /* __GAL_A11Y_E_TABLE_H__ */ diff --git a/widgets/table/gal-a11y-e-tree-factory.h b/widgets/table/gal-a11y-e-tree-factory.h index 36b4a61dc2..640261acf2 100644 --- a/widgets/table/gal-a11y-e-tree-factory.h +++ b/widgets/table/gal-a11y-e-tree-factory.h @@ -46,4 +46,4 @@ struct _GalA11yETreeFactoryClass { /* Standard Glib function */ GType gal_a11y_e_tree_factory_get_type (void); -#endif /* ! __GAL_A11Y_E_TREE_FACTORY_H__ */ +#endif /* __GAL_A11Y_E_TREE_FACTORY_H__ */ diff --git a/widgets/table/gal-a11y-e-tree.h b/widgets/table/gal-a11y-e-tree.h index ef15dade36..61799e1b93 100644 --- a/widgets/table/gal-a11y-e-tree.h +++ b/widgets/table/gal-a11y-e-tree.h @@ -54,4 +54,4 @@ AtkObject *gal_a11y_e_tree_new (GObject *tree); void gal_a11y_e_tree_init (void); -#endif /* ! __GAL_A11Y_E_TREE_H__ */ +#endif /* __GAL_A11Y_E_TREE_H__ */ 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__ */ |