diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-01-31 00:32:55 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-01-31 00:33:28 +0800 |
commit | 0109aa3a92b484ebb85c6481e5a8e39819b1f011 (patch) | |
tree | e7837b0a50517fc160a7b4d6d47f5c78a5505523 /widgets | |
parent | f25d21294158625477c529a679fd2f27fffb562c (diff) | |
download | gsoc2013-evolution-0109aa3a92b484ebb85c6481e5a8e39819b1f011.tar.gz gsoc2013-evolution-0109aa3a92b484ebb85c6481e5a8e39819b1f011.tar.zst gsoc2013-evolution-0109aa3a92b484ebb85c6481e5a8e39819b1f011.zip |
More whitespace cleanup.
Diffstat (limited to 'widgets')
37 files changed, 409 insertions, 409 deletions
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c index cf5a41eabf..ca77c5af5c 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ b/widgets/e-timezone-dialog/e-timezone-dialog.c @@ -491,7 +491,7 @@ on_map_timeout (gpointer data) if (!priv->point_selected) return TRUE; - if (e_map_point_get_color_rgba (priv->point_selected) + if (e_map_point_get_color_rgba (priv->point_selected) == E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_1_RGBA) e_map_point_set_color_rgba (priv->map, priv->point_selected, E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_2_RGBA); diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c index 66b055dca6..b2a8196c06 100644 --- a/widgets/menus/gal-define-views-dialog.c +++ b/widgets/menus/gal-define-views-dialog.c @@ -259,7 +259,7 @@ gal_define_views_dialog_init (GalDefineViewsDialog *dialog) NULL); dialog->treeview = GTK_TREE_VIEW (e_builder_get_widget (dialog->builder, "treeview1")); - gtk_tree_view_set_reorderable (GTK_TREE_VIEW (dialog->treeview), FALSE); + gtk_tree_view_set_reorderable (GTK_TREE_VIEW (dialog->treeview), FALSE); gtk_tree_view_set_headers_visible (dialog->treeview, TRUE); gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); diff --git a/widgets/misc/e-buffer-tagger.c b/widgets/misc/e-buffer-tagger.c index feef06c21e..cc2444d607 100644 --- a/widgets/misc/e-buffer-tagger.c +++ b/widgets/misc/e-buffer-tagger.c @@ -480,8 +480,8 @@ textview_motion_notify_event (GtkTextView *textview, GdkEventMotion *event) g_return_val_if_fail (GTK_IS_TEXT_VIEW (textview), FALSE); gtk_text_view_window_to_buffer_coords (textview, - GTK_TEXT_WINDOW_WIDGET, - event->x, event->y, &x, &y); + GTK_TEXT_WINDOW_WIDGET, + event->x, event->y, &x, &y); update_mouse_cursor (textview, x, y); diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index df5dba165e..c76a9fa62e 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -1218,12 +1218,12 @@ e_calendar_item_draw_month (ECalendarItem *calitem, start_weekday = (tmp_tm.tm_wday + 6) % 7; if (month_x + max_x - clip_rect.x > 0) { - cairo_save (cr); + cairo_save (cr); clip_rect.width = month_x + max_x - clip_rect.x; clip_rect.height = text_y + char_height - clip_rect.y; - gdk_cairo_rectangle (cr, &clip_rect); - cairo_clip (cr); + gdk_cairo_rectangle (cr, &clip_rect); + cairo_clip (cr); /* This is a strftime() format. %B = Month name, %Y = Year. */ e_utf8_strftime (buffer, sizeof (buffer), _("%B %Y"), &tmp_tm); @@ -1237,13 +1237,13 @@ e_calendar_item_draw_month (ECalendarItem *calitem, text_x = (calitem->month_width - text_width) / 2; text_x = MAX (min_x, text_x); - gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]); - cairo_move_to (cr, - month_x + text_x, - text_y); + gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]); + cairo_move_to (cr, + month_x + text_x, + text_y); pango_cairo_show_layout (cr, layout); - cairo_restore (cr); + cairo_restore (cr); } /* Set the clip rectangle for the main month display. */ @@ -1262,8 +1262,8 @@ e_calendar_item_draw_month (ECalendarItem *calitem, cairo_save (cr); - gdk_cairo_rectangle (cr, &clip_rect); - cairo_clip (cr); + gdk_cairo_rectangle (cr, &clip_rect); + cairo_clip (cr); /* Draw the day initials across the top of the month. */ min_cell_width = MAX (calitem->max_day_width, (calitem->max_digit_width * 2)) @@ -1298,14 +1298,14 @@ e_calendar_item_draw_month (ECalendarItem *calitem, pango_layout_set_font_description (layout, font_desc); if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) text_x += (7-1) * calitem->cell_width; - gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_ACTIVE]); + gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_ACTIVE]); for (day = 0; day < 7; day++) { cairo_save (cr); layout_set_day_text (calitem, layout, day_index); - cairo_move_to (cr, - text_x - calitem->day_widths[day_index], - text_y); - pango_cairo_show_layout (cr, layout); + cairo_move_to (cr, + text_x - calitem->day_widths[day_index], + text_y); + pango_cairo_show_layout (cr, layout); text_x += (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ? -calitem->cell_width : calitem->cell_width; day_index++; diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c index 59d72f6692..adf2cdc83c 100644 --- a/widgets/misc/e-canvas-background.c +++ b/widgets/misc/e-canvas-background.c @@ -106,7 +106,7 @@ ecb_dispose (GObject *object) } if (G_OBJECT_CLASS (ecb_parent_class)->dispose) - G_OBJECT_CLASS (ecb_parent_class)->dispose (object); + G_OBJECT_CLASS (ecb_parent_class)->dispose (object); } static void @@ -150,7 +150,7 @@ ecb_set_property (GObject *object, color_changed = TRUE; break; - case PROP_FILL_COLOR_RGBA: + case PROP_FILL_COLOR_RGBA: ecb->priv->rgba = g_value_get_uint (value); color_changed = TRUE; break; @@ -171,7 +171,7 @@ ecb_get_property (GObject *object, ecb = E_CANVAS_BACKGROUND (object); switch (prop_id) { - case PROP_FILL_COLOR_RGBA: + case PROP_FILL_COLOR_RGBA: g_value_set_uint (value, ecb->priv->rgba); break; default: @@ -197,12 +197,12 @@ ecb_draw (GnomeCanvasItem *item, ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); cairo_save (cr); - cairo_set_source_rgba (cr, - ((ecb->priv->rgba >> 24) & 0xff) / 255.0, - ((ecb->priv->rgba >> 16) & 0xff) / 255.0, - ((ecb->priv->rgba >> 8) & 0xff) / 255.0, - ( ecb->priv->rgba & 0xff) / 255.0); - cairo_paint (cr); + cairo_set_source_rgba (cr, + ((ecb->priv->rgba >> 24) & 0xff) / 255.0, + ((ecb->priv->rgba >> 16) & 0xff) / 255.0, + ((ecb->priv->rgba >> 8) & 0xff) / 255.0, + ( ecb->priv->rgba & 0xff) / 255.0); + cairo_paint (cr); cairo_restore (cr); } diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index cca6d92670..5bb51f6bfc 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -172,14 +172,14 @@ gnome_canvas_item_invoke_point (GnomeCanvasItem *item, gint cx, gint cy) { - cairo_matrix_t inverse; + cairo_matrix_t inverse; /* Calculate x & y in item local coordinates */ - inverse = item->matrix; - if (cairo_matrix_invert (&inverse) != CAIRO_STATUS_SUCCESS) - return NULL; + inverse = item->matrix; + if (cairo_matrix_invert (&inverse) != CAIRO_STATUS_SUCCESS) + return NULL; - cairo_matrix_transform_point (&inverse, &x, &y); + cairo_matrix_transform_point (&inverse, &x, &y); if (GNOME_CANVAS_ITEM_GET_CLASS (item)->point) return GNOME_CANVAS_ITEM_GET_CLASS (item)->point (item, x, y, cx, cy); @@ -452,7 +452,7 @@ canvas_button_event (GtkWidget *widget, canvas->current_item)); /* dispatch normally regardless of the event's window if an item has - has a pointer grab in effect */ + has a pointer grab in effect */ if (!canvas->grabbed_item && event->window != bin_window) return retval; diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index d2c7dc200a..ae962081d6 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -641,7 +641,7 @@ create_children (EDateEdit *dedit) vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), vbox); - gtk_widget_show (vbox); + gtk_widget_show (vbox); priv->calendar = e_calendar_new (); calendar = E_CALENDAR (priv->calendar); @@ -655,23 +655,23 @@ create_children (EDateEdit *dedit) G_CALLBACK (on_date_popup_date_selected), dedit); gtk_box_pack_start (GTK_BOX (vbox), priv->calendar, FALSE, FALSE, 0); - gtk_widget_show (priv->calendar); + gtk_widget_show (priv->calendar); bbox = gtk_hbutton_box_new (); gtk_container_set_border_width (GTK_CONTAINER (bbox), 4); gtk_box_set_spacing (GTK_BOX (bbox), 2); gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, FALSE, 0); - gtk_widget_show (bbox); + gtk_widget_show (bbox); priv->now_button = gtk_button_new_with_mnemonic (_("No_w")); gtk_container_add (GTK_CONTAINER (bbox), priv->now_button); - gtk_widget_show (priv->now_button); + gtk_widget_show (priv->now_button); g_signal_connect (priv->now_button, "clicked", G_CALLBACK (on_date_popup_now_button_clicked), dedit); priv->today_button = gtk_button_new_with_mnemonic (_("_Today")); gtk_container_add (GTK_CONTAINER (bbox), priv->today_button); - gtk_widget_show (priv->today_button); + gtk_widget_show (priv->today_button); g_signal_connect (priv->today_button, "clicked", G_CALLBACK (on_date_popup_today_button_clicked), dedit); @@ -1803,8 +1803,8 @@ on_date_entry_focus_out (GtkEntry *entry, GtkWidget *msg_dialog; tmp_tm.tm_year = 0; - tmp_tm.tm_mon = 0; - tmp_tm.tm_mday = 0; + tmp_tm.tm_mon = 0; + tmp_tm.tm_mday = 0; e_date_edit_check_date_changed (dedit); diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c index 00bb57d13d..ba8be2669e 100644 --- a/widgets/misc/e-printable.c +++ b/widgets/misc/e-printable.c @@ -139,7 +139,7 @@ e_printable_print_page (EPrintable *e_printable, gboolean e_printable_data_left (EPrintable *e_printable) { - gboolean ret_val; + gboolean ret_val; g_return_val_if_fail (e_printable != NULL, FALSE); g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE); @@ -168,7 +168,7 @@ e_printable_height (EPrintable *e_printable, gdouble max_height, gboolean quantized) { - gdouble ret_val; + gdouble ret_val; g_return_val_if_fail (e_printable != NULL, -1); g_return_val_if_fail (E_IS_PRINTABLE (e_printable), -1); @@ -191,7 +191,7 @@ e_printable_will_fit (EPrintable *e_printable, gdouble max_height, gboolean quantized) { - gboolean ret_val; + gboolean ret_val; g_return_val_if_fail (e_printable != NULL, FALSE); g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE); diff --git a/widgets/misc/ea-calendar-cell.c b/widgets/misc/ea-calendar-cell.c index ecd7179e0e..2915a6cd04 100644 --- a/widgets/misc/ea-calendar-cell.c +++ b/widgets/misc/ea-calendar-cell.c @@ -201,7 +201,7 @@ ea_calendar_cell_new (GObject *obj) #ifdef ACC_DEBUG static void ea_calendar_cell_finalize (GObject *object) { - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (parent_class)->finalize (object); ++n_ea_calendar_cell_destroyed; g_print ("ACC_DEBUG: n_ea_calendar_cell_destroyed = %d\n", diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c index 97528a5639..e9977bf01e 100644 --- a/widgets/misc/ea-calendar-item.c +++ b/widgets/misc/ea-calendar-item.c @@ -203,7 +203,7 @@ ea_calendar_item_class_init (EaCalendarItemClass *klass) class->get_name = ea_calendar_item_get_name; class->get_description = ea_calendar_item_get_description; - class->ref_state_set = ea_calendar_item_ref_state_set; + class->ref_state_set = ea_calendar_item_ref_state_set; class->get_n_children = ea_calendar_item_get_n_children; class->ref_child = ea_calendar_item_ref_child; @@ -310,7 +310,7 @@ ea_calendar_item_get_name (AtkObject *accessible) name_str = g_strdup_printf ( _("Calendar: from %s to %s"), buffer_start, buffer_end); - } + } #if 0 if (e_calendar_item_get_selection (calitem, &select_start, &select_end)) { diff --git a/widgets/table/e-cell-date-edit.c b/widgets/table/e-cell-date-edit.c index 770ac77f0a..fc81d59cfd 100644 --- a/widgets/table/e-cell-date-edit.c +++ b/widgets/table/e-cell-date-edit.c @@ -234,11 +234,11 @@ e_cell_date_edit_init (ECellDateEdit *ecde) vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), vbox); - gtk_widget_show (vbox); + gtk_widget_show (vbox); hbox = gtk_hbox_new (FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - gtk_widget_show (hbox); + gtk_widget_show (hbox); ecde->calendar = e_calendar_new (); gnome_canvas_item_set (GNOME_CANVAS_ITEM (E_CALENDAR (ecde->calendar)->calitem), @@ -249,7 +249,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde) vbox2 = gtk_vbox_new (FALSE, 2); gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0); - gtk_widget_show (vbox2); + gtk_widget_show (vbox2); ecde->time_entry = gtk_entry_new (); gtk_widget_set_size_request (ecde->time_entry, 50, -1); @@ -295,11 +295,11 @@ e_cell_date_edit_init (ECellDateEdit *ecde) gtk_container_set_border_width (GTK_CONTAINER (bbox), 4); gtk_box_set_spacing (GTK_BOX (bbox), 2); gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, FALSE, 0); - gtk_widget_show (bbox); + gtk_widget_show (bbox); now_button = gtk_button_new_with_label (_("Now")); gtk_container_add (GTK_CONTAINER (bbox), now_button); - gtk_widget_show (now_button); + gtk_widget_show (now_button); g_signal_connect((now_button), "clicked", G_CALLBACK (e_cell_date_edit_on_now_clicked), ecde); @@ -307,7 +307,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde) today_button = gtk_button_new_with_label (_("Today")); gtk_container_add (GTK_CONTAINER (bbox), today_button); - gtk_widget_show (today_button); + gtk_widget_show (today_button); g_signal_connect((today_button), "clicked", G_CALLBACK (e_cell_date_edit_on_today_clicked), ecde); @@ -316,7 +316,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde) /* Translators: "None" as a label of a button to unset date in a date table cell */ none_button = gtk_button_new_with_label (C_("table-date", "None")); gtk_container_add (GTK_CONTAINER (bbox), none_button); - gtk_widget_show (none_button); + gtk_widget_show (none_button); g_signal_connect((none_button), "clicked", G_CALLBACK (e_cell_date_edit_on_none_clicked), ecde); @@ -324,7 +324,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde) ok_button = gtk_button_new_with_label (_("OK")); gtk_container_add (GTK_CONTAINER (bbox), ok_button); - gtk_widget_show (ok_button); + gtk_widget_show (ok_button); g_signal_connect((ok_button), "clicked", G_CALLBACK (e_cell_date_edit_on_ok_clicked), ecde); diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c index 48547e037b..6710f60bd5 100644 --- a/widgets/table/e-cell-hbox.c +++ b/widgets/table/e-cell-hbox.c @@ -57,8 +57,8 @@ ecv_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view hbox_view->cell_view.ecell = ecell; hbox_view->cell_view.e_table_model = table_model; hbox_view->cell_view.e_table_item_view = e_table_item_view; - hbox_view->cell_view.kill_view_cb = NULL; - hbox_view->cell_view.kill_view_cb_data = NULL; + hbox_view->cell_view.kill_view_cb = NULL; + hbox_view->cell_view.kill_view_cb_data = NULL; /* create our subcell view */ hbox_view->subcell_view_count = ecv->subcell_count; @@ -84,11 +84,11 @@ ecv_kill_view (ECellView *ecv) ECellHboxView *hbox_view = (ECellHboxView *) ecv; gint i; - if (hbox_view->cell_view.kill_view_cb) - (hbox_view->cell_view.kill_view_cb)(ecv, hbox_view->cell_view.kill_view_cb_data); + if (hbox_view->cell_view.kill_view_cb) + (hbox_view->cell_view.kill_view_cb)(ecv, hbox_view->cell_view.kill_view_cb_data); - if (hbox_view->cell_view.kill_view_cb_data) - g_list_free (hbox_view->cell_view.kill_view_cb_data); + if (hbox_view->cell_view.kill_view_cb_data) + g_list_free (hbox_view->cell_view.kill_view_cb_data); /* kill our subcell view */ for (i = 0; i < hbox_view->subcell_view_count; i++) diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index e25cb2dc63..9687e7d392 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -87,11 +87,11 @@ pixbuf_kill_view (ECellView *ecell_view) ECellPixbufView *pixbuf_view = (ECellPixbufView *) ecell_view; if (pixbuf_view->cell_view.kill_view_cb) - pixbuf_view->cell_view.kill_view_cb ( - ecell_view, pixbuf_view->cell_view.kill_view_cb_data); + pixbuf_view->cell_view.kill_view_cb ( + ecell_view, pixbuf_view->cell_view.kill_view_cb_data); if (pixbuf_view->cell_view.kill_view_cb_data) - g_list_free (pixbuf_view->cell_view.kill_view_cb_data); + g_list_free (pixbuf_view->cell_view.kill_view_cb_data); g_free (pixbuf_view); } @@ -111,7 +111,7 @@ pixbuf_draw (ECellView *ecell_view, cairo_t *cr, /* we can't make sure we really got a pixbuf since, well, it's a Gdk thing */ if (x2 - x1 == 0) - return; + return; if (!cell_pixbuf) return; @@ -121,17 +121,17 @@ pixbuf_draw (ECellView *ecell_view, cairo_t *cr, /* We center the pixbuf within our allocated space */ if (x2 - x1 > pix_w) { - gint diff = (x2 - x1) - pix_w; - real_x = x1 + diff/2; + gint diff = (x2 - x1) - pix_w; + real_x = x1 + diff/2; } else { - real_x = x1; + real_x = x1; } if (y2 - y1 > pix_h) { - gint diff = (y2 - y1) - pix_h; - real_y = y1 + diff/2; + gint diff = (y2 - y1) - pix_h; + real_y = y1 + diff/2; } else { - real_y = y1; + real_y = y1; } cairo_save (cr); @@ -156,7 +156,7 @@ pixbuf_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) GdkPixbuf *pixbuf; if (row == -1) { if (e_table_model_row_count (ecell_view->e_table_model) > 0) { - row = 0; + row = 0; } else { return 6; } @@ -164,7 +164,7 @@ pixbuf_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) pixbuf = (GdkPixbuf *) e_table_model_value_at (ecell_view->e_table_model, 1, row); if (!pixbuf) - return 0; + return 0; /* We give ourselves 3 pixels of padding on either side */ return gdk_pixbuf_get_height (pixbuf) + 6; @@ -225,21 +225,21 @@ pixbuf_max_width (ECellView *ecell_view, gint model_col, gint view_col) gint max_width = -1; if (model_col == 0) { - num_rows = e_table_model_row_count (ecell_view->e_table_model); - - for (i = 0; i <= num_rows; i++) { - GdkPixbuf *pixbuf = (GdkPixbuf *) e_table_model_value_at - (ecell_view->e_table_model, - 1, - i); - if (!pixbuf) - continue; - pw = gdk_pixbuf_get_width (pixbuf); - if (max_width < pw) - max_width = pw; - } + num_rows = e_table_model_row_count (ecell_view->e_table_model); + + for (i = 0; i <= num_rows; i++) { + GdkPixbuf *pixbuf = (GdkPixbuf *) e_table_model_value_at + (ecell_view->e_table_model, + 1, + i); + if (!pixbuf) + continue; + pw = gdk_pixbuf_get_width (pixbuf); + if (max_width < pw) + max_width = pw; + } } else { - return -1; + return -1; } return max_width; diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c index abfe61e206..334e6be77a 100644 --- a/widgets/table/e-cell-popup.c +++ b/widgets/table/e-cell-popup.c @@ -130,8 +130,8 @@ e_cell_popup_class_init (ECellPopupClass *class) ecc->get_bg_color = ecp_get_bg_color; gal_a11y_e_cell_registry_add_cell_type (NULL, - E_TYPE_CELL_POPUP, - gal_a11y_e_cell_popup_new); + E_TYPE_CELL_POPUP, + gal_a11y_e_cell_popup_new); } static void @@ -183,8 +183,8 @@ ecp_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view ecp_view->cell_view.ecell = ecell; ecp_view->cell_view.e_table_model = table_model; ecp_view->cell_view.e_table_item_view = e_table_item_view; - ecp_view->cell_view.kill_view_cb = NULL; - ecp_view->cell_view.kill_view_cb_data = NULL; + ecp_view->cell_view.kill_view_cb = NULL; + ecp_view->cell_view.kill_view_cb_data = NULL; ecp_view->child_view = e_cell_new_view (ecp->child, table_model, e_table_item_view); diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 245f894067..d79c826b5c 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -326,7 +326,7 @@ ect_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view text_view->cell_view.e_table_model = table_model; text_view->cell_view.e_table_item_view = e_table_item_view; text_view->cell_view.kill_view_cb = NULL; - text_view->cell_view.kill_view_cb_data = NULL; + text_view->cell_view.kill_view_cb_data = NULL; text_view->canvas = canvas; @@ -345,7 +345,7 @@ ect_kill_view (ECellView *ecv) ECellTextView *text_view = (ECellTextView *) ecv; if (text_view->cell_view.kill_view_cb) - (text_view->cell_view.kill_view_cb)(ecv, text_view->cell_view.kill_view_cb_data); + (text_view->cell_view.kill_view_cb)(ecv, text_view->cell_view.kill_view_cb_data); if (text_view->cell_view.kill_view_cb_data) g_list_free (text_view->cell_view.kill_view_cb_data); @@ -722,8 +722,8 @@ ect_draw (ECellView *ecell_view, cairo_t *cr, x_origin = x1 + ect->x + text_view->xofs - (edit ? edit->xofs_edit : 0); y_origin = y1 + ect->y + text_view->yofs - (edit ? edit->yofs_edit : 0); - cairo_rectangle (cr, x1, y1, x2 - x1, y2 - y1); - cairo_clip (cr); + cairo_rectangle (cr, x1, y1, x2 - x1, y2 - y1); + cairo_clip (cr); layout = generate_layout (text_view, model_col, view_col, row, x2 - x1); @@ -731,33 +731,33 @@ ect_draw (ECellView *ecell_view, cairo_t *cr, layout = layout_with_preedit (text_view, row, edit->text ? edit->text : "?", x2 - x1); } - cairo_move_to (cr, x_origin, y_origin); + cairo_move_to (cr, x_origin, y_origin); pango_cairo_show_layout (cr, layout); if (edit && edit->view_col == view_col && edit->row == row) { if (edit->selection_start != edit->selection_end) { cairo_region_t *clip_region; - gint indices[2]; - GtkStateType state; + gint indices[2]; + GtkStateType state; - state = edit->has_selection ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE; + state = edit->has_selection ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE; indices[0] = MIN (edit->selection_start, edit->selection_end); indices[1] = MAX (edit->selection_start, edit->selection_end); - clip_region = gdk_pango_layout_get_clip_region (layout, - x_origin, y_origin, - indices, 1); - gdk_cairo_region (cr, clip_region); - cairo_clip (cr); + clip_region = gdk_pango_layout_get_clip_region (layout, + x_origin, y_origin, + indices, 1); + gdk_cairo_region (cr, clip_region); + cairo_clip (cr); cairo_region_destroy (clip_region); - gdk_cairo_set_source_color (cr, &style->base[state]); - cairo_paint (cr); + gdk_cairo_set_source_color (cr, &style->base[state]); + cairo_paint (cr); - gdk_cairo_set_source_color (cr, &style->text[state]); - cairo_move_to (cr, x_origin, y_origin); - pango_cairo_show_layout (cr, layout); + gdk_cairo_set_source_color (cr, &style->text[state]); + cairo_move_to (cr, x_origin, y_origin); + pango_cairo_show_layout (cr, layout); } else { if (edit->show_cursor) { PangoRectangle strong_pos, weak_pos; diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c index 1a4b00bb4c..e75c973d57 100644 --- a/widgets/table/e-cell-tree.c +++ b/widgets/table/e-cell-tree.c @@ -742,7 +742,7 @@ e_cell_tree_class_init (ECellTreeClass *class) ecc->max_width = ect_max_width; ecc->get_bg_color = ect_get_bg_color; - gal_a11y_e_cell_registry_add_cell_type (NULL, E_TYPE_CELL_TREE, gal_a11y_e_cell_tree_new); + gal_a11y_e_cell_registry_add_cell_type (NULL, E_TYPE_CELL_TREE, gal_a11y_e_cell_tree_new); } static void diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c index 1e5875b2b1..5d0c5989a5 100644 --- a/widgets/table/e-cell-vbox.c +++ b/widgets/table/e-cell-vbox.c @@ -53,8 +53,8 @@ ecv_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view vbox_view->cell_view.ecell = ecell; vbox_view->cell_view.e_table_model = table_model; vbox_view->cell_view.e_table_item_view = e_table_item_view; - vbox_view->cell_view.kill_view_cb = NULL; - vbox_view->cell_view.kill_view_cb_data = NULL; + vbox_view->cell_view.kill_view_cb = NULL; + vbox_view->cell_view.kill_view_cb_data = NULL; /* create our subcell view */ vbox_view->subcell_view_count = ecv->subcell_count; @@ -78,11 +78,11 @@ ecv_kill_view (ECellView *ecv) ECellVboxView *vbox_view = (ECellVboxView *) ecv; gint i; - if (vbox_view->cell_view.kill_view_cb) + if (vbox_view->cell_view.kill_view_cb) (vbox_view->cell_view.kill_view_cb)(ecv, vbox_view->cell_view.kill_view_cb_data); - if (vbox_view->cell_view.kill_view_cb_data) - g_list_free (vbox_view->cell_view.kill_view_cb_data); + if (vbox_view->cell_view.kill_view_cb_data) + g_list_free (vbox_view->cell_view.kill_view_cb_data); /* kill our subcell view */ for (i = 0; i < vbox_view->subcell_view_count; i++) diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c index 91a77c83c5..dafd0b79fe 100644 --- a/widgets/table/e-table-field-chooser-item.c +++ b/widgets/table/e-table-field-chooser-item.c @@ -190,7 +190,7 @@ etfci_update (GnomeCanvasItem *item, x2 = etfci->width; y2 = etfci->height; - gnome_canvas_matrix_transform_rect (i2c, &x1, &y1, &x2, &y2); + gnome_canvas_matrix_transform_rect (i2c, &x1, &y1, &x2, &y2); if (item->x1 != x1 || item->y1 != y1 || diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index f9c12b2a9a..7f4352a6d5 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -1032,7 +1032,7 @@ etgc_reflow (GnomeCanvasItem *item, gint flags) ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (item); gboolean frozen; - g_object_get (etgc, + g_object_get (etgc, "frozen", &frozen, NULL); diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 0c56b59ea2..e6371b01b6 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -176,7 +176,7 @@ ethi_update (GnomeCanvasItem *item, gint flags) { ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item); - double x1, y1, x2, y2; + double x1, y1, x2, y2; if (GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update) GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update ( @@ -197,7 +197,7 @@ ethi_update (GnomeCanvasItem *item, x2 = ethi->width; y2 = ethi->height; - gnome_canvas_matrix_transform_rect (i2c, &x1, &y1, &x2, &y2); + gnome_canvas_matrix_transform_rect (i2c, &x1, &y1, &x2, &y2); if (item->x1 != x1 || item->y1 != y1 || diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 75a8f44d5d..f51c741127 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -439,7 +439,7 @@ eti_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdoubl *y2 = eti->height; gnome_canvas_item_i2c_matrix (GNOME_CANVAS_ITEM (eti), &i2c); - gnome_canvas_matrix_transform_rect (&i2c, x1, y1, x2, y2); + gnome_canvas_matrix_transform_rect (&i2c, x1, y1, x2, y2); } static void @@ -477,7 +477,7 @@ static void eti_update (GnomeCanvasItem *item, const cairo_matrix_t *i2c, gint flags) { ETableItem *eti = E_TABLE_ITEM (item); - double x1, x2, y1, y2; + double x1, x2, y1, y2; if (GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->update) (*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->update)(item, i2c, flags); @@ -1324,7 +1324,7 @@ eti_add_selection_model (ETableItem *eti, ESelectionModel *selection) G_CALLBACK (eti_cursor_activated), eti); eti_selection_change (selection, eti); - g_signal_emit_by_name (G_OBJECT (eti), + g_signal_emit_by_name (G_OBJECT (eti), "selection_model_added", eti->selection); } @@ -1640,7 +1640,7 @@ eti_realize (GnomeCanvasItem *item) GtkStyle *style; if (GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->realize) - (*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->realize)(item); + (*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->realize)(item); eti->rows = e_table_model_row_count (eti->table_model); @@ -1707,23 +1707,23 @@ eti_unrealize (GnomeCanvasItem *item) eti->height = 0; if (GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->unrealize) - (*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->unrealize)(item); + (*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->unrealize)(item); } static void eti_draw_grid_line (ETableItem *eti, cairo_t *cr, GtkStyle *style, gint x1, gint y1, gint x2, gint y2) { - cairo_save (cr); + cairo_save (cr); - cairo_set_line_width (cr, 1.0); - gdk_cairo_set_source_color (cr, &style->dark[GTK_STATE_NORMAL]); + cairo_set_line_width (cr, 1.0); + gdk_cairo_set_source_color (cr, &style->dark[GTK_STATE_NORMAL]); - cairo_move_to (cr, x1 + 0.5, y1 + 0.5); - cairo_line_to (cr, x2 + 0.5, y2 + 0.5); - cairo_stroke (cr); + cairo_move_to (cr, x1 + 0.5, y1 + 0.5); + cairo_line_to (cr, x2 + 0.5, y2 + 0.5); + cairo_stroke (cr); - cairo_restore (cr); + cairo_restore (cr); } static void @@ -1741,7 +1741,7 @@ eti_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, gint y, gint width, gint h cairo_matrix_t i2c; gdouble eti_base_x, eti_base_y, lower_right_y, lower_right_x; GtkWidget *canvas = GTK_WIDGET (item->canvas); - GtkStyle *style = gtk_widget_get_style (canvas); + GtkStyle *style = gtk_widget_get_style (canvas); gint height_extra = eti->horizontal_draw_grid ? 1 : 0; /* @@ -1750,11 +1750,11 @@ eti_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, gint y, gint width, gint h gnome_canvas_item_i2c_matrix (item, &i2c); eti_base_x = 0; eti_base_y = 0; - cairo_matrix_transform_point (&i2c, &eti_base_x, &eti_base_y); + cairo_matrix_transform_point (&i2c, &eti_base_x, &eti_base_y); lower_right_x = eti->width; lower_right_y = eti->height; - cairo_matrix_transform_point (&i2c, &lower_right_x, &lower_right_y); + cairo_matrix_transform_point (&i2c, &lower_right_x, &lower_right_y); /* * First column to draw, last column to draw @@ -2005,18 +2005,18 @@ eti_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, gint y, gint width, gint h * Draw focus */ if (eti->draw_focus && f_found) { - static const double dash[] = { 1.0, 1.0 }; - cairo_set_line_width (cr, 1.0); - cairo_rectangle (cr, - f_x1 + 0.5, f_x2 + 0.5, - f_x2 - f_x1 - 1, f_y2 - f_y1); + static const double dash[] = { 1.0, 1.0 }; + cairo_set_line_width (cr, 1.0); + cairo_rectangle (cr, + f_x1 + 0.5, f_x2 + 0.5, + f_x2 - f_x1 - 1, f_y2 - f_y1); - gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]); - cairo_stroke_preserve (cr); + gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]); + cairo_stroke_preserve (cr); - cairo_set_dash (cr, dash, G_N_ELEMENTS (dash), 0.0); - gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]); - cairo_stroke (cr); + cairo_set_dash (cr, dash, G_N_ELEMENTS (dash), 0.0); + gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]); + cairo_stroke (cr); } } @@ -3239,7 +3239,7 @@ e_table_item_compute_location (ETableItem *eti, gint *col) { /* Save the grabbed row but make sure that we don't get flawed - results because the cursor is grabbed. */ + results because the cursor is grabbed. */ gint grabbed_row = eti->grabbed_row; eti->grabbed_row = -1; @@ -3264,7 +3264,7 @@ e_table_item_compute_mouse_over (ETableItem *eti, { gdouble realx, realy; /* Save the grabbed row but make sure that we don't get flawed - results because the cursor is grabbed. */ + results because the cursor is grabbed. */ gint grabbed_row = eti->grabbed_row; eti->grabbed_row = -1; diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 5028a48a6b..c7e955efba 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -1381,9 +1381,9 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h g_signal_connect ( G_OBJECT (e_table->click_to_add), "event", G_CALLBACK (click_to_add_event), e_table); - g_signal_connect ( + g_signal_connect ( G_OBJECT (e_table->click_to_add), "cursor_change", - G_CALLBACK (click_to_add_cursor_change), e_table); + G_CALLBACK (click_to_add_cursor_change), e_table); } } @@ -3269,8 +3269,8 @@ e_table_class_init (ETableClass *class) widget_class->grab_focus = et_grab_focus; widget_class->unrealize = et_unrealize; - widget_class->get_preferred_width = et_get_preferred_width; - widget_class->get_preferred_height = et_get_preferred_height; + widget_class->get_preferred_width = et_get_preferred_width; + widget_class->get_preferred_height = et_get_preferred_height; widget_class->focus = et_focus; diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index cc8a1fcd6a..cd438a77e2 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -501,7 +501,7 @@ static void etsm_invert_selection (ESelectionModel *selection) { ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (selection); - gint count = etsm_row_count (selection); + gint count = etsm_row_count (selection); gint i; for (i = 0; i < count; i++) { diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index d529a6e045..4ca80d97a0 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -116,10 +116,10 @@ lookup_gnode (ETreeTableAdapter *etta, ETreePath path) static void resize_map (ETreeTableAdapter *etta, gint size) { - if (size > etta->priv->n_vals_allocated) { - etta->priv->n_vals_allocated = MAX (etta->priv->n_vals_allocated + INCREMENT_AMOUNT, size); - etta->priv->map_table = g_renew (node_t *, etta->priv->map_table, etta->priv->n_vals_allocated); - } + if (size > etta->priv->n_vals_allocated) { + etta->priv->n_vals_allocated = MAX (etta->priv->n_vals_allocated + INCREMENT_AMOUNT, size); + etta->priv->map_table = g_renew (node_t *, etta->priv->map_table, etta->priv->n_vals_allocated); + } etta->priv->n_map = size; } diff --git a/widgets/table/gal-a11y-e-cell-toggle.c b/widgets/table/gal-a11y-e-cell-toggle.c index 660a0ebd9a..c57d7083e6 100644 --- a/widgets/table/gal-a11y-e-cell-toggle.c +++ b/widgets/table/gal-a11y-e-cell-toggle.c @@ -57,16 +57,16 @@ gal_a11y_e_cell_toggle_get_type (void) { static const GTypeInfo tinfo = { - sizeof (GalA11yECellToggleClass), - (GBaseInitFunc) NULL, /* base init */ - (GBaseFinalizeFunc) NULL, /* base finalize */ - (GClassInitFunc) gal_a11y_e_cell_toggle_class_init, /* class init */ - (GClassFinalizeFunc) NULL, /* class finalize */ - NULL, /* class data */ - sizeof (GalA11yECellToggle), /* instance size */ - 0, /* nb preallocs */ - NULL, /* instance init */ - NULL /* value table */ + sizeof (GalA11yECellToggleClass), + (GBaseInitFunc) NULL, /* base init */ + (GBaseFinalizeFunc) NULL, /* base finalize */ + (GClassInitFunc) gal_a11y_e_cell_toggle_class_init, /* class init */ + (GClassFinalizeFunc) NULL, /* class finalize */ + NULL, /* class data */ + sizeof (GalA11yECellToggle), /* instance size */ + 0, /* nb preallocs */ + NULL, /* instance init */ + NULL /* value table */ }; type = g_type_register_static (GAL_A11Y_TYPE_E_CELL, @@ -108,10 +108,10 @@ toggle_cell_action (GalA11yECell *cell) event.type = GDK_BUTTON_PRESS; event.window = gtk_layout_get_bin_window (layout); - event.button = 1; - event.send_event = TRUE; - event.time = GDK_CURRENT_TIME; - event.axes = NULL; + event.button = 1; + event.send_event = TRUE; + event.time = GDK_CURRENT_TIME; + event.axes = NULL; g_signal_emit_by_name (cell->item, "event", &event, &finished); } @@ -130,7 +130,7 @@ model_change_cb (ETableModel *etm, e_table_model_value_at (cell->cell_view->e_table_model, cell->model_col, cell->row)); /* Cheat gnopernicus, or it will ignore the state change signal */ - atk_focus_tracker_notify (ATK_OBJECT (cell)); + atk_focus_tracker_notify (ATK_OBJECT (cell)); if (value) gal_a11y_e_cell_add_state (cell, ATK_STATE_CHECKED, TRUE); @@ -160,13 +160,13 @@ gal_a11y_e_cell_toggle_new (ETableItem *item, toggle_cell = GAL_A11Y_E_CELL_TOGGLE (a11y); a11y->role = ATK_ROLE_TABLE_CELL; - gal_a11y_e_cell_construct (a11y, - item, - cell_view, - parent, - model_col, - view_col, - row); + gal_a11y_e_cell_construct (a11y, + item, + cell_view, + parent, + model_col, + view_col, + row); gal_a11y_e_cell_add_action (cell, "toggle", @@ -182,7 +182,7 @@ gal_a11y_e_cell_toggle_new (ETableItem *item, value = GPOINTER_TO_INT ( e_table_model_value_at (cell->cell_view->e_table_model, - cell->model_col, cell->row)); + cell->model_col, cell->row)); if (value) gal_a11y_e_cell_add_state (cell, ATK_STATE_CHECKED, FALSE); else diff --git a/widgets/table/gal-a11y-e-cell-tree.c b/widgets/table/gal-a11y-e-cell-tree.c index 1a95c46a90..ee06f6e025 100644 --- a/widgets/table/gal-a11y-e-cell-tree.c +++ b/widgets/table/gal-a11y-e-cell-tree.c @@ -69,28 +69,28 @@ static void kill_view_cb (ECellView *subcell_view, gpointer psubcell_a11ies) { - GList *node; + GList *node; GList *subcell_a11ies = (GList *) psubcell_a11ies; - GalA11yECell *subcell; + GalA11yECell *subcell; - for (node = subcell_a11ies; node != NULL; node = g_list_next (node)) - { - subcell = GAL_A11Y_E_CELL (node->data); - if (subcell && subcell->cell_view == subcell_view) - { + for (node = subcell_a11ies; node != NULL; node = g_list_next (node)) + { + subcell = GAL_A11Y_E_CELL (node->data); + if (subcell && subcell->cell_view == subcell_view) + { d(fprintf(stderr, "subcell_view %p deleted before the a11y object %p\n", subcell_view, subcell)); - subcell->cell_view = NULL; - } - } + subcell->cell_view = NULL; + } + } } static void ectr_subcell_weak_ref (GalA11yECellTree *a11y, GalA11yECell *subcell_a11y) { - ECellView *subcell_view = subcell_a11y ? subcell_a11y->cell_view : NULL; - if (subcell_a11y && subcell_view && subcell_view->kill_view_cb_data) - subcell_view->kill_view_cb_data = g_list_remove (subcell_view->kill_view_cb_data, subcell_a11y); + ECellView *subcell_view = subcell_a11y ? subcell_a11y->cell_view : NULL; + if (subcell_a11y && subcell_view && subcell_view->kill_view_cb_data) + subcell_view->kill_view_cb_data = g_list_remove (subcell_view->kill_view_cb_data, subcell_a11y); g_signal_handler_disconnect (GAL_A11Y_E_CELL (a11y)->item->table_model, a11y->model_row_changed_id); @@ -102,11 +102,11 @@ ectr_do_action_expand (AtkAction *action) { GalA11yECell *a11y; ETableModel *table_model; - ETreePath node; + ETreePath node; ETreeModel *tree_model; - ETreeTableAdapter *tree_table_adapter; + ETreeTableAdapter *tree_table_adapter; - a11y = GAL_A11Y_E_CELL (action); + a11y = GAL_A11Y_E_CELL (action); table_model = a11y->item->table_model; node = e_table_model_value_at (table_model, -1, a11y->row); tree_model = e_table_model_value_at (table_model, -2, a11y->row); @@ -125,15 +125,15 @@ ectr_do_action_collapse (AtkAction *action) { GalA11yECell *a11y; ETableModel *table_model; - ETreePath node; + ETreePath node; ETreeModel *tree_model; - ETreeTableAdapter *tree_table_adapter; + ETreeTableAdapter *tree_table_adapter; - a11y = GAL_A11Y_E_CELL (action); + a11y = GAL_A11Y_E_CELL (action); table_model = a11y->item->table_model; - node = e_table_model_value_at (table_model, -1, a11y->row); + node = e_table_model_value_at (table_model, -1, a11y->row); tree_model = e_table_model_value_at (table_model, -2, a11y->row); - tree_table_adapter = e_table_model_value_at (table_model, -3, a11y->row); + tree_table_adapter = e_table_model_value_at (table_model, -3, a11y->row); if (e_tree_model_node_is_expandable (tree_model, node)) { e_tree_table_adapter_node_set_expanded (tree_table_adapter, @@ -191,9 +191,9 @@ gal_a11y_e_cell_tree_new (ETableItem *item, AtkObject *subcell_a11y; GalA11yECellTree *a11y; - ETreePath node; - ETreeModel *tree_model; - ETreeTableAdapter *tree_table_adapter; + ETreePath node; + ETreeModel *tree_model; + ETreeTableAdapter *tree_table_adapter; ECellView *subcell_view; subcell_view = e_cell_tree_view_get_subcell_view (cell_view); @@ -249,12 +249,12 @@ gal_a11y_e_cell_tree_new (ETableItem *item, G_CALLBACK (ectr_model_row_changed_cb), subcell_a11y); - if (subcell_a11y && subcell_view) - { - subcell_view->kill_view_cb = kill_view_cb; - if (!g_list_find (subcell_view->kill_view_cb_data, subcell_a11y)) - subcell_view->kill_view_cb_data = g_list_append (subcell_view->kill_view_cb_data, subcell_a11y); - } + if (subcell_a11y && subcell_view) + { + subcell_view->kill_view_cb = kill_view_cb; + if (!g_list_find (subcell_view->kill_view_cb_data, subcell_a11y)) + subcell_view->kill_view_cb_data = g_list_append (subcell_view->kill_view_cb_data, subcell_a11y); + } g_object_weak_ref (G_OBJECT (subcell_a11y), (GWeakNotify) ectr_subcell_weak_ref, a11y); diff --git a/widgets/table/gal-a11y-e-cell.c b/widgets/table/gal-a11y-e-cell.c index 65a1fe9759..17f9b8f166 100644 --- a/widgets/table/gal-a11y-e-cell.c +++ b/widgets/table/gal-a11y-e-cell.c @@ -105,7 +105,7 @@ static G_CONST_RETURN gchar * gal_a11y_e_cell_get_name (AtkObject * a11y) { GalA11yECell *cell = GAL_A11Y_E_CELL (a11y); - ETableCol *ecol; + ETableCol *ecol; if (a11y->name != NULL && strcmp (a11y->name, "")) return a11y->name; diff --git a/widgets/table/gal-a11y-e-table-click-to-add-factory.c b/widgets/table/gal-a11y-e-table-click-to-add-factory.c index e13e6599b4..9c9390a9c2 100644 --- a/widgets/table/gal-a11y-e-table-click-to-add-factory.c +++ b/widgets/table/gal-a11y-e-table-click-to-add-factory.c @@ -40,7 +40,7 @@ static AtkObjectFactoryClass *parent_class; static GType gal_a11y_e_table_click_to_add_factory_get_accessible_type (void) { - return GAL_A11Y_TYPE_E_TABLE_CLICK_TO_ADD; + return GAL_A11Y_TYPE_E_TABLE_CLICK_TO_ADD; } static AtkObject* 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 05f145f6ed..1b7ce531e2 100644 --- a/widgets/table/gal-a11y-e-table-click-to-add.c +++ b/widgets/table/gal-a11y-e-table-click-to-add.c @@ -188,9 +188,9 @@ etcta_class_init (GalA11yETableClickToAddClass *class) parent_class = g_type_class_ref (PARENT_TYPE); atk_object_class->get_name = etcta_get_name; - atk_object_class->get_n_children = etcta_get_n_children; - atk_object_class->ref_child = etcta_ref_child; - atk_object_class->ref_state_set = etcta_ref_state_set; + atk_object_class->get_n_children = etcta_get_n_children; + atk_object_class->ref_child = etcta_ref_child; + atk_object_class->ref_state_set = etcta_ref_state_set; } static void @@ -234,14 +234,14 @@ gal_a11y_e_table_click_to_add_get_type (void) NULL }; - factory = atk_registry_get_factory (atk_get_default_registry (), GNOME_TYPE_CANVAS_ITEM); + factory = atk_registry_get_factory (atk_get_default_registry (), GNOME_TYPE_CANVAS_ITEM); parent_type = atk_object_factory_get_accessible_type (factory); - type = gal_a11y_type_register_static_with_private (PARENT_TYPE, + type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yETableClickToAdd", &info, 0, sizeof (GalA11yETableClickToAddPrivate), &priv_offset); - g_type_add_interface_static (type, ATK_TYPE_ACTION, &atk_action_info); + g_type_add_interface_static (type, ATK_TYPE_ACTION, &atk_action_info); } @@ -251,7 +251,7 @@ gal_a11y_e_table_click_to_add_get_type (void) static gboolean etcta_event (GnomeCanvasItem *item, GdkEvent *e, gpointer data) { - ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item); + ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item); GalA11yETableClickToAdd *a11y; GalA11yETableClickToAddPrivate *priv; diff --git a/widgets/table/gal-a11y-e-table-factory.c b/widgets/table/gal-a11y-e-table-factory.c index face3ad06b..5d9c4bbdb8 100644 --- a/widgets/table/gal-a11y-e-table-factory.c +++ b/widgets/table/gal-a11y-e-table-factory.c @@ -34,7 +34,7 @@ static AtkObjectFactoryClass *parent_class; static GType gal_a11y_e_table_factory_get_accessible_type (void) { - return GAL_A11Y_TYPE_E_TABLE; + return GAL_A11Y_TYPE_E_TABLE; } static AtkObject* diff --git a/widgets/table/gal-a11y-e-table-item-factory.c b/widgets/table/gal-a11y-e-table-item-factory.c index c987b0068a..fb1b3a9966 100644 --- a/widgets/table/gal-a11y-e-table-item-factory.c +++ b/widgets/table/gal-a11y-e-table-item-factory.c @@ -40,7 +40,7 @@ static AtkObjectFactoryClass *parent_class; static GType gal_a11y_e_table_item_factory_get_accessible_type (void) { - return GAL_A11Y_TYPE_E_TABLE_ITEM; + return GAL_A11Y_TYPE_E_TABLE_ITEM; } static AtkObject* diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c index 218265ecdd..eb0c9be127 100644 --- a/widgets/table/gal-a11y-e-table-item.c +++ b/widgets/table/gal-a11y-e-table-item.c @@ -87,9 +87,9 @@ eti_ref_state_set (AtkObject *accessible) { GalA11yETableItemPrivate *priv = GET_PRIVATE (accessible); - g_object_ref (priv->state_set); + g_object_ref (priv->state_set); - return priv->state_set; + return priv->state_set; } inline static gint @@ -329,10 +329,10 @@ cell_destroyed (gpointer data) g_return_if_fail (cell->item && G_IS_OBJECT (cell->item)); - if (cell->item) { - g_object_unref (cell->item); - cell->item = NULL; - } + if (cell->item) { + g_object_unref (cell->item); + cell->item = NULL; + } } @@ -693,7 +693,7 @@ eti_rows_inserted (ETableModel * model, gint row, gint count, g_return_if_fail (table_item); item_a11y = GAL_A11Y_E_TABLE_ITEM (table_item); - n_cols = atk_table_get_n_columns (ATK_TABLE (table_item)); + n_cols = atk_table_get_n_columns (ATK_TABLE (table_item)); n_rows = atk_table_get_n_rows (ATK_TABLE (table_item)); old_nrows = GET_PRIVATE (item_a11y)->rows; @@ -706,13 +706,13 @@ eti_rows_inserted (ETableModel * model, gint row, gint count, g_signal_emit_by_name (table_item, "row-inserted", row, count, NULL); - for (i = row; i < (row + count); i++) { - for (j = 0; j < n_cols; j++) { + for (i = row; i < (row + count); i++) { + for (j = 0; j < n_cols; j++) { g_signal_emit_by_name (table_item, "children_changed::add", - ( ((i + 1)*n_cols) + j), NULL, NULL); + ( ((i + 1)*n_cols) + j), NULL, NULL); } - } + } g_signal_emit_by_name (table_item, "visible-data-changed"); } @@ -727,7 +727,7 @@ eti_rows_deleted (ETableModel * model, gint row, gint count, ATK_GOBJECT_ACCESSIBLE (table_item))); n_rows = atk_table_get_n_rows (ATK_TABLE (table_item)); - n_cols = atk_table_get_n_columns (ATK_TABLE (table_item)); + n_cols = atk_table_get_n_columns (ATK_TABLE (table_item)); old_nrows = GET_PRIVATE (table_item)->rows; @@ -738,13 +738,13 @@ eti_rows_deleted (ETableModel * model, gint row, gint count, g_signal_emit_by_name (table_item, "row-deleted", row, count, NULL); - for (i = row; i < (row + count); i++) { - for (j = 0; j < n_cols; j++) { + for (i = row; i < (row + count); i++) { + for (j = 0; j < n_cols; j++) { g_signal_emit_by_name (table_item, "children_changed::remove", - ( ((i + 1)*n_cols) + j), NULL, NULL); + ( ((i + 1)*n_cols) + j), NULL, NULL); } - } + } g_signal_emit_by_name (table_item, "visible-data-changed"); eti_a11y_reset_focus_object ((GalA11yETableItem *)table_item, item, TRUE); } @@ -781,67 +781,67 @@ static void eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y) { - gboolean reorder_found=FALSE, added_found=FALSE, removed_found=FALSE; - GalA11yETableItem * a11y_item; - ETableCol ** cols, **prev_cols; - GalA11yETableItemPrivate *priv; - gint *state = NULL, *prev_state = NULL, *reorder = NULL; - gint i,j,n_rows,n_cols, prev_n_cols; + gboolean reorder_found=FALSE, added_found=FALSE, removed_found=FALSE; + GalA11yETableItem * a11y_item; + ETableCol ** cols, **prev_cols; + GalA11yETableItemPrivate *priv; + gint *state = NULL, *prev_state = NULL, *reorder = NULL; + gint i,j,n_rows,n_cols, prev_n_cols; - a11y_item = GAL_A11Y_E_TABLE_ITEM (a11y); - priv = GET_PRIVATE (a11y_item); + a11y_item = GAL_A11Y_E_TABLE_ITEM (a11y); + priv = GET_PRIVATE (a11y_item); /* Assume rows do not changed. */ - n_rows = priv->rows; + n_rows = priv->rows; - prev_n_cols = priv->cols; - prev_cols = priv->columns; + prev_n_cols = priv->cols; + prev_cols = priv->columns; - cols = e_table_header_get_columns (eth); + cols = e_table_header_get_columns (eth); n_cols = eth->col_count; - g_return_if_fail (cols && prev_cols && n_cols > 0); + g_return_if_fail (cols && prev_cols && n_cols > 0); /* Init to ETI_HEADER_UNCHANGED. */ - state = g_malloc0 (sizeof (gint) * n_cols); - prev_state = g_malloc0 (sizeof (gint) * prev_n_cols); - reorder = g_malloc0 (sizeof (gint) * n_cols); + state = g_malloc0 (sizeof (gint) * n_cols); + prev_state = g_malloc0 (sizeof (gint) * prev_n_cols); + reorder = g_malloc0 (sizeof (gint) * n_cols); /* 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) { + 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) { - reorder_found = TRUE; - state[i] = ETI_HEADER_REORDERED; + reorder_found = TRUE; + state[i] = ETI_HEADER_REORDERED; reorder[i] = j; - break; - } else if (prev_cols[j] == cols[i]) { + break; + } else if (prev_cols[j] == cols[i]) { /* OK, this column is not changed. */ - break; - } - } + break; + } + } /* 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; - } - } + state[i] = ETI_HEADER_NEW_ADDED; + } + } /* 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]) + 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]) break; /* Removed columns found. */ - if (j == n_cols) { + if (j == n_cols) { removed_found = TRUE; prev_state[j] = ETI_HEADER_REMOVED; - } - } + } + } /* If nothing interesting just return. */ if (!reorder_found && !added_found && !removed_found) @@ -1064,9 +1064,9 @@ gal_a11y_e_table_item_new (ETableItem *item) GET_PRIVATE (a11y)->cols = item->cols; GET_PRIVATE (a11y)->rows = item->rows; - GET_PRIVATE (a11y)->columns = e_table_header_get_columns (item->header); - if ( GET_PRIVATE (a11y)->columns == NULL) - return NULL; + GET_PRIVATE (a11y)->columns = e_table_header_get_columns (item->header); + if ( GET_PRIVATE (a11y)->columns == NULL) + return NULL; if (item) { g_signal_connect (G_OBJECT(item), "selection_model_removed", diff --git a/widgets/table/gal-a11y-e-tree-factory.c b/widgets/table/gal-a11y-e-tree-factory.c index cf864ca283..8d1951580d 100644 --- a/widgets/table/gal-a11y-e-tree-factory.c +++ b/widgets/table/gal-a11y-e-tree-factory.c @@ -33,7 +33,7 @@ static AtkObjectFactoryClass *parent_class; static GType gal_a11y_e_tree_factory_get_accessible_type (void) { - return GAL_A11Y_TYPE_E_TREE; + return GAL_A11Y_TYPE_E_TREE; } static AtkObject* diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c index 04572d9cce..8adbace707 100644 --- a/widgets/text/e-reflow.c +++ b/widgets/text/e-reflow.c @@ -1252,12 +1252,12 @@ e_reflow_draw (GnomeCanvasItem *item, if (running_width > x + width) break; x_rect = running_width; - cairo_rectangle (cr, + cairo_rectangle (cr, x_rect - x, y_rect - y, width_rect - 1, height_rect - 1); - cairo_fill (cr); + cairo_fill (cr); running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; } cairo_restore (cr); @@ -1358,7 +1358,7 @@ static GnomeCanvasItem * e_reflow_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy) { - GnomeCanvasItem *child; + GnomeCanvasItem *child; if (GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->point) child = GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->point (item, x, y, cx, cy); diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index edd0a74fcc..5277031a06 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -766,7 +766,7 @@ e_text_set_property (GObject *object, needs_update = 1; break; - case PROP_FILL_COLOR: + case PROP_FILL_COLOR: if (g_value_get_string (value)) gdk_color_parse (g_value_get_string (value), &color); @@ -792,7 +792,7 @@ e_text_set_property (GObject *object, needs_update = 1; break; - case PROP_FILL_COLOR_RGBA: + case PROP_FILL_COLOR_RGBA: text->rgba = g_value_get_uint (value); color.red = ((text->rgba >> 24) & 0xff) * 0x101; color.green = ((text->rgba >> 16) & 0xff) * 0x101; @@ -1306,11 +1306,11 @@ e_text_draw (GnomeCanvasItem *item, cairo_t *cr, if (text->draw_background || text->draw_button) { gdk_cairo_set_source_color (cr, &style->fg[state]); } else { - cairo_set_source_rgba (cr, - ((text->rgba >> 24) & 0xff) / 255.0, - ((text->rgba >> 16) & 0xff) / 255.0, - ((text->rgba >> 8) & 0xff) / 255.0, - ( text->rgba & 0xff) / 255.0); + cairo_set_source_rgba (cr, + ((text->rgba >> 24) & 0xff) / 255.0, + ((text->rgba >> 16) & 0xff) / 255.0, + ((text->rgba >> 8) & 0xff) / 255.0, + ( text->rgba & 0xff) / 255.0); } if (text->draw_borders || text->draw_background) { diff --git a/widgets/text/gal-a11y-e-text-factory.c b/widgets/text/gal-a11y-e-text-factory.c index d68e2ce549..0c933c2245 100644 --- a/widgets/text/gal-a11y-e-text-factory.c +++ b/widgets/text/gal-a11y-e-text-factory.c @@ -33,7 +33,7 @@ static AtkObjectFactoryClass *parent_class; static GType gal_a11y_e_text_factory_get_accessible_type (void) { - return GAL_A11Y_TYPE_E_TEXT; + return GAL_A11Y_TYPE_E_TEXT; } static AtkObject* diff --git a/widgets/text/gal-a11y-e-text.c b/widgets/text/gal-a11y-e-text.c index 45bd9341ec..75e3307373 100644 --- a/widgets/text/gal-a11y-e-text.c +++ b/widgets/text/gal-a11y-e-text.c @@ -121,14 +121,14 @@ et_get_text (AtkText *text, gint start_offset, gint end_offset) { - gint start, end, real_start, real_end, len; + gint start, end, real_start, real_end, len; const gchar *full_text = et_get_full_text (text); - if (full_text == NULL) - return NULL; - len = g_utf8_strlen (full_text, -1); + if (full_text == NULL) + return NULL; + len = g_utf8_strlen (full_text, -1); - start = MIN (MAX (0, start_offset), len); - end = MIN (MAX (-1, end_offset), len); + start = MIN (MAX (0, start_offset), len); + end = MIN (MAX (-1, end_offset), len); if (end_offset == -1) end = strlen (full_text); @@ -236,23 +236,23 @@ find_sentence_end (const gchar *text, gint begin_offset, gint step) { - gint offset; - gchar *at_offset; - gunichar previous; - gint len; - - offset = begin_offset; - len = g_utf8_strlen (text, -1); - - while (offset > 0 && offset < len) { - at_offset = g_utf8_offset_to_pointer (text, offset - 1); - previous = g_utf8_get_char_validated (at_offset, -1); - if (previous == '.' || previous == '!' || previous == '?') - break; - offset += step; - } - - return offset; + gint offset; + gchar *at_offset; + gunichar previous; + gint len; + + offset = begin_offset; + len = g_utf8_strlen (text, -1); + + while (offset > 0 && offset < len) { + at_offset = g_utf8_offset_to_pointer (text, offset - 1); + previous = g_utf8_get_char_validated (at_offset, -1); + if (previous == '.' || previous == '!' || previous == '?') + break; + offset += step; + } + + return offset; } static gint @@ -260,23 +260,23 @@ find_line_start (const gchar *text, gint begin_offset, gint step) { - gint offset; - gchar *at_offset; - gunichar previous; - gint len; - - offset = begin_offset; - len = g_utf8_strlen (text, -1); - - while (offset > 0 && offset < len) { - at_offset = g_utf8_offset_to_pointer (text, offset - 1); - previous = g_utf8_get_char_validated (at_offset, -1); - if (previous == '\n' || previous == '\r') - break; - offset += step; - } - - return offset; + gint offset; + gchar *at_offset; + gunichar previous; + gint len; + + offset = begin_offset; + len = g_utf8_strlen (text, -1); + + while (offset > 0 && offset < len) { + at_offset = g_utf8_offset_to_pointer (text, offset - 1); + previous = g_utf8_get_char_validated (at_offset, -1); + if (previous == '\n' || previous == '\r') + break; + offset += step; + } + + return offset; } static gint @@ -284,23 +284,23 @@ find_line_end (const gchar *text, gint begin_offset, gint step) { - gint offset; - gchar *at_offset; - gunichar current; - gint len; - - offset = begin_offset; - len = g_utf8_strlen (text, -1); - - while (offset >= 0 && offset < len) { - at_offset = g_utf8_offset_to_pointer (text, offset); - current = g_utf8_get_char_validated (at_offset, -1); - if (current == '\n' || current == '\r') - break; - offset += step; - } - - return offset; + gint offset; + gchar *at_offset; + gunichar current; + gint len; + + offset = begin_offset; + len = g_utf8_strlen (text, -1); + + while (offset >= 0 && offset < len) { + at_offset = g_utf8_offset_to_pointer (text, offset); + current = g_utf8_get_char_validated (at_offset, -1); + if (current == '\n' || current == '\r') + break; + offset += step; + } + + return offset; } static gchar * @@ -310,9 +310,9 @@ et_get_text_after_offset (AtkText *text, gint *start_offset, gint *end_offset) { - gint start, end, len; - const gchar *full_text = et_get_full_text (text); - g_return_val_if_fail (full_text, NULL); + gint start, end, len; + const gchar *full_text = et_get_full_text (text); + g_return_val_if_fail (full_text, NULL); switch (boundary_type) { @@ -364,8 +364,8 @@ et_get_text_at_offset (AtkText *text, gint *end_offset) { gint start, end, len; - const gchar *full_text = et_get_full_text (text); - g_return_val_if_fail (full_text, NULL); + const gchar *full_text = et_get_full_text (text); + g_return_val_if_fail (full_text, NULL); switch (boundary_type) { @@ -383,19 +383,19 @@ et_get_text_at_offset (AtkText *text, break; case ATK_TEXT_BOUNDARY_SENTENCE_START: start = find_sentence_start (full_text, offset - 1, -1); - end = find_sentence_start (full_text, offset, 1); + end = find_sentence_start (full_text, offset, 1); break; case ATK_TEXT_BOUNDARY_SENTENCE_END: start = find_sentence_end (full_text, offset, -1); - end = find_sentence_end (full_text, offset + 1, 1); + end = find_sentence_end (full_text, offset + 1, 1); break; case ATK_TEXT_BOUNDARY_LINE_START: start = find_line_start (full_text, offset - 1, -1); - end = find_line_start (full_text, offset, 1); + end = find_line_start (full_text, offset, 1); break; case ATK_TEXT_BOUNDARY_LINE_END: start = find_line_end (full_text, offset, -1); - end = find_line_end (full_text, offset + 1, 1); + end = find_line_end (full_text, offset + 1, 1); break; default: return NULL; @@ -427,9 +427,9 @@ et_get_text_before_offset (AtkText *text, gint *start_offset, gint *end_offset) { - gint start, end, len; - const gchar *full_text = et_get_full_text (text); - g_return_val_if_fail (full_text, NULL); + gint start, end, len; + const gchar *full_text = et_get_full_text (text); + g_return_val_if_fail (full_text, NULL); switch (boundary_type) { @@ -451,15 +451,15 @@ et_get_text_before_offset (AtkText *text, break; case ATK_TEXT_BOUNDARY_SENTENCE_END: end = find_sentence_end (full_text, offset, -1); - start = find_sentence_end (full_text, end - 1, -1); + start = find_sentence_end (full_text, end - 1, -1); break; case ATK_TEXT_BOUNDARY_LINE_START: end = find_line_start (full_text, offset, -1); - start = find_line_start (full_text, end - 1, -1); + start = find_line_start (full_text, end - 1, -1); break; case ATK_TEXT_BOUNDARY_LINE_END: end = find_line_end (full_text, offset, -1); - start = find_line_end (full_text, end - 1, -1); + start = find_line_end (full_text, end - 1, -1); break; default: return NULL; @@ -518,24 +518,24 @@ et_get_character_extents (AtkText *text, gint *height, AtkCoordType coords) { - GObject *obj; - EText *etext; - GnomeCanvas *canvas; - gint x_widget, y_widget, x_window, y_window; - GdkWindow *window; - GtkWidget *widget; + GObject *obj; + EText *etext; + GnomeCanvas *canvas; + gint x_widget, y_widget, x_window, y_window; + GdkWindow *window; + GtkWidget *widget; PangoRectangle pango_pos; - g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text)); - obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)); - if (obj == NULL) - return; - g_return_if_fail (E_IS_TEXT (obj)); - etext = E_TEXT (obj); - canvas = GNOME_CANVAS_ITEM (etext)->canvas; - widget = GTK_WIDGET (canvas); - window = gtk_widget_get_window (widget); - gdk_window_get_origin (window, &x_widget, &y_widget); + g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text)); + obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)); + if (obj == NULL) + return; + g_return_if_fail (E_IS_TEXT (obj)); + etext = E_TEXT (obj); + canvas = GNOME_CANVAS_ITEM (etext)->canvas; + widget = GTK_WIDGET (canvas); + window = gtk_widget_get_window (widget); + gdk_window_get_origin (window, &x_widget, &y_widget); pango_layout_index_to_pos (etext->layout, offset, &pango_pos); pango_pos.x = PANGO_PIXELS (pango_pos.x); @@ -549,18 +549,18 @@ et_get_character_extents (AtkText *text, *width = pango_pos.width; *height = pango_pos.height; - if (etext->draw_borders) { + if (etext->draw_borders) { *x += 3; /*BORDER_INDENT;*/ *y += 3; /*BORDER_INDENT;*/ - } + } *x += etext->xofs; *y += etext->yofs; - if (etext->editing) { + if (etext->editing) { *x -= etext->xofs_edit; *y -= etext->yofs_edit; - } + } *x += etext->cx; *y += etext->cy; @@ -595,23 +595,23 @@ et_get_offset_at_point (AtkText *text, gint y, AtkCoordType coords) { - GObject *obj; - EText *etext; - GnomeCanvas *canvas; + GObject *obj; + EText *etext; + GnomeCanvas *canvas; gint x_widget, y_widget, x_window, y_window; GdkWindow *window; - GtkWidget *widget; - gint index; - gint trailing; - - g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), -1); - obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)); - if (obj == NULL) - return -1; - g_return_val_if_fail (E_IS_TEXT (obj), -1); - etext = E_TEXT (obj); - canvas = GNOME_CANVAS_ITEM (etext)->canvas; - widget = GTK_WIDGET (canvas); + GtkWidget *widget; + gint index; + gint trailing; + + g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), -1); + obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)); + if (obj == NULL) + return -1; + g_return_val_if_fail (E_IS_TEXT (obj), -1); + etext = E_TEXT (obj); + canvas = GNOME_CANVAS_ITEM (etext)->canvas; + widget = GTK_WIDGET (canvas); window = gtk_widget_get_window (widget); gdk_window_get_origin (window, &x_widget, &y_widget); @@ -628,29 +628,29 @@ et_get_offset_at_point (AtkText *text, else return -1; - if (etext->draw_borders) { - x -= 3; /*BORDER_INDENT;*/ - y -= 3; /*BORDER_INDENT;*/ - } + if (etext->draw_borders) { + x -= 3; /*BORDER_INDENT;*/ + y -= 3; /*BORDER_INDENT;*/ + } - x -= etext->xofs; - y -= etext->yofs; + x -= etext->xofs; + y -= etext->yofs; - if (etext->editing) { - x += etext->xofs_edit; - y += etext->yofs_edit; - } + if (etext->editing) { + x += etext->xofs_edit; + y += etext->yofs_edit; + } - x -= etext->cx; - y -= etext->cy; + x -= etext->cx; + y -= etext->cy; - pango_layout_xy_to_index (etext->layout, + pango_layout_xy_to_index (etext->layout, x * PANGO_SCALE - PANGO_SCALE / 2, y * PANGO_SCALE - PANGO_SCALE / 2, &index, &trailing); - return g_utf8_pointer_to_offset (etext->text, etext->text + index + trailing); + return g_utf8_pointer_to_offset (etext->text, etext->text + index + trailing); } static gint @@ -772,8 +772,8 @@ et_set_selection (AtkText *text, return FALSE; g_return_val_if_fail (E_IS_TEXT (obj), FALSE); if (selection_num == 0) - return et_add_selection (text, start_offset, end_offset); - return FALSE; + return et_add_selection (text, start_offset, end_offset); + return FALSE; } static gboolean |