diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-08-29 22:44:16 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-08-29 23:22:28 +0800 |
commit | 4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9 (patch) | |
tree | ce1154c5d7487fbd566c5b68df90fb8259b4604e /widgets/misc | |
parent | e6c42ecc596fb16247e8d1d591a5d244a61d0e24 (diff) | |
download | gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.gz gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.bz2 gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.lz gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.xz gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.zst gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'widgets/misc')
31 files changed, 410 insertions, 382 deletions
diff --git a/widgets/misc/e-account-manager.h b/widgets/misc/e-account-manager.h index dab8b2832f..0dc5892b2e 100644 --- a/widgets/misc/e-account-manager.h +++ b/widgets/misc/e-account-manager.h @@ -68,7 +68,8 @@ GType e_account_manager_get_type (void); GtkWidget * e_account_manager_new (EAccountList *account_list); void e_account_manager_add_account (EAccountManager *manager); void e_account_manager_edit_account (EAccountManager *manager); -void e_account_manager_delete_account(EAccountManager *manager); +void e_account_manager_delete_account + (EAccountManager *manager); EAccountList * e_account_manager_get_account_list (EAccountManager *manager); void e_account_manager_set_account_list diff --git a/widgets/misc/e-account-tree-view.h b/widgets/misc/e-account-tree-view.h index ea13dc3902..e9b2f7f8d3 100644 --- a/widgets/misc/e-account-tree-view.h +++ b/widgets/misc/e-account-tree-view.h @@ -75,8 +75,10 @@ EAccountList * e_account_tree_view_get_account_list void e_account_tree_view_set_account_list (EAccountTreeView *tree_view, EAccountList *account_list); -EAccount * e_account_tree_view_get_selected(EAccountTreeView *tree_view); -gboolean e_account_tree_view_set_selected(EAccountTreeView *tree_view, +EAccount * e_account_tree_view_get_selected + (EAccountTreeView *tree_view); +gboolean e_account_tree_view_set_selected + (EAccountTreeView *tree_view, EAccount *account); G_END_DECLS diff --git a/widgets/misc/e-attachment-button.h b/widgets/misc/e-attachment-button.h index 89ecccfe9b..a27d8ae146 100644 --- a/widgets/misc/e-attachment-button.h +++ b/widgets/misc/e-attachment-button.h @@ -74,8 +74,10 @@ gboolean e_attachment_button_get_expandable void e_attachment_button_set_expandable (EAttachmentButton *button, gboolean expandable); -gboolean e_attachment_button_get_expanded(EAttachmentButton *button); -void e_attachment_button_set_expanded(EAttachmentButton *button, +gboolean e_attachment_button_get_expanded + (EAttachmentButton *button); +void e_attachment_button_set_expanded + (EAttachmentButton *button, gboolean expanded); G_END_DECLS diff --git a/widgets/misc/e-attachment-view.h b/widgets/misc/e-attachment-view.h index 164413221c..0f5bcf1c0c 100644 --- a/widgets/misc/e-attachment-view.h +++ b/widgets/misc/e-attachment-view.h @@ -172,7 +172,8 @@ void e_attachment_view_unselect_path (EAttachmentView *view, GtkTreePath *path); void e_attachment_view_select_all (EAttachmentView *view); void e_attachment_view_unselect_all (EAttachmentView *view); -void e_attachment_view_sync_selection(EAttachmentView *view, +void e_attachment_view_sync_selection + (EAttachmentView *view, EAttachmentView *target); /* Drag Source Support */ @@ -222,8 +223,10 @@ GtkActionGroup *e_attachment_view_add_action_group GtkActionGroup *e_attachment_view_get_action_group (EAttachmentView *view, const gchar *group_name); -GtkWidget * e_attachment_view_get_popup_menu(EAttachmentView *view); -GtkUIManager * e_attachment_view_get_ui_manager(EAttachmentView *view); +GtkWidget * e_attachment_view_get_popup_menu + (EAttachmentView *view); +GtkUIManager * e_attachment_view_get_ui_manager + (EAttachmentView *view); GtkAction * e_attachment_view_recent_action_new (EAttachmentView *view, const gchar *action_name, @@ -233,7 +236,8 @@ void e_attachment_view_show_popup_menu GdkEventButton *event, GtkMenuPositionFunc func, gpointer user_data); -void e_attachment_view_update_actions(EAttachmentView *view); +void e_attachment_view_update_actions + (EAttachmentView *view); G_END_DECLS diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index 7a850ee137..d346117a8b 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -47,11 +47,11 @@ static const gint e_calendar_item_days_in_month[12] = { && ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))) ? 1 : 0) static void e_calendar_item_dispose (GObject *object); -static void e_calendar_item_get_property(GObject *object, +static void e_calendar_item_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -static void e_calendar_item_set_property(GObject *object, +static void e_calendar_item_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); @@ -125,7 +125,7 @@ static void e_calendar_item_get_month_info (ECalendarItem *calitem, gint *first_day_offset, gint *days_in_month, gint *days_in_prev_month); -static void e_calendar_item_recalc_sizes(ECalendarItem *calitem); +static void e_calendar_item_recalc_sizes (ECalendarItem *calitem); static void e_calendar_item_get_day_style (ECalendarItem *calitem, gint year, @@ -147,12 +147,12 @@ static void e_calendar_item_check_selection_end (ECalendarItem *calitem, gint start_day, gint *end_month, gint *end_day); -static void e_calendar_item_check_selection_start(ECalendarItem *calitem, +static void e_calendar_item_check_selection_start (ECalendarItem *calitem, gint *start_month, gint *start_day, gint end_month, gint end_day); -static void e_calendar_item_add_days_to_selection(ECalendarItem *calitem, +static void e_calendar_item_add_days_to_selection (ECalendarItem *calitem, gint days); static void e_calendar_item_round_up_selection (ECalendarItem *calitem, gint *month_offset, @@ -179,7 +179,7 @@ static gboolean e_calendar_item_ensure_days_visible (ECalendarItem *calitem, static void e_calendar_item_show_popup_menu (ECalendarItem *calitem, GdkEventButton *event, gint month_offset); -static void e_calendar_item_on_menu_item_activate(GtkWidget *menuitem, +static void e_calendar_item_on_menu_item_activate (GtkWidget *menuitem, ECalendarItem *calitem); static void e_calendar_item_position_menu (GtkMenu *menu, gint *x, @@ -850,7 +850,7 @@ e_calendar_item_realize (GnomeCanvasItem *item) calitem = E_CALENDAR_ITEM (item); - e_calendar_item_style_set (GTK_WIDGET(item->canvas), calitem); + e_calendar_item_style_set (GTK_WIDGET (item->canvas), calitem); e_extensible_load_extensions (E_EXTENSIBLE (calitem)); } @@ -1778,7 +1778,7 @@ e_calendar_item_stop_selecting (ECalendarItem *calitem, guint32 time) /* If the user selects the grayed dates before the first month or after the last month, we move backwards or forwards one month. - The set_month() call should take care of updating the selection. */ + The set_month () call should take care of updating the selection. */ if (calitem->selection_end_month_offset == -1) e_calendar_item_set_first_month (calitem, calitem->year, calitem->month - 1); @@ -2553,7 +2553,7 @@ e_calendar_item_get_month_info (ECalendarItem *calitem, } void -e_calendar_item_get_first_month(ECalendarItem *calitem, +e_calendar_item_get_first_month (ECalendarItem *calitem, gint *year, gint *month) { @@ -2601,7 +2601,7 @@ e_calendar_item_preserve_day_selection (ECalendarItem *calitem, /* This also handles values of month < 0 or > 11 by updating the year. */ void -e_calendar_item_set_first_month(ECalendarItem *calitem, +e_calendar_item_set_first_month (ECalendarItem *calitem, gint year, gint month) { @@ -2721,14 +2721,14 @@ e_calendar_item_set_max_days_sel (ECalendarItem *calitem, /* Get the maximum number of days before whole weeks are selected */ gint -e_calendar_item_get_days_start_week_sel(ECalendarItem *calitem) +e_calendar_item_get_days_start_week_sel (ECalendarItem *calitem) { return calitem->days_to_start_week_selection; } /* Set the maximum number of days before whole weeks are selected */ void -e_calendar_item_set_days_start_week_sel(ECalendarItem *calitem, +e_calendar_item_set_days_start_week_sel (ECalendarItem *calitem, gint days) { calitem->days_to_start_week_selection = days; @@ -3473,7 +3473,7 @@ e_calendar_item_signal_emission_idle_cb (gpointer data) /* We ref the calitem & check in case it gets destroyed, since we were getting a free memory write here. */ - g_object_ref((calitem)); + g_object_ref ((calitem)); if (calitem->date_range_changed) { calitem->date_range_changed = FALSE; @@ -3485,7 +3485,7 @@ e_calendar_item_signal_emission_idle_cb (gpointer data) g_signal_emit (calitem, e_calendar_item_signals[SELECTION_CHANGED], 0); } - g_object_unref((calitem)); + g_object_unref ((calitem)); GDK_THREADS_LEAVE (); return FALSE; diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c index ab7f2d3442..af5d0c7d83 100644 --- a/widgets/misc/e-calendar.c +++ b/widgets/misc/e-calendar.c @@ -262,7 +262,7 @@ e_calendar_style_set (GtkWidget *widget, { ECalendar *e_calendar; - e_calendar = E_CALENDAR(widget); + e_calendar = E_CALENDAR (widget); if (GTK_WIDGET_CLASS (e_calendar_parent_class)->style_set) (*GTK_WIDGET_CLASS (e_calendar_parent_class)->style_set) (widget, previous_style); @@ -291,7 +291,7 @@ e_calendar_size_request (GtkWidget *widget, cal = E_CALENDAR (widget); style = gtk_widget_get_style (GTK_WIDGET (cal)); - g_object_get((cal->calitem), + g_object_get ((cal->calitem), "row_height", &row_height, "column_width", &col_width, NULL); @@ -559,8 +559,8 @@ e_calendar_button_has_focus (ECalendar *cal) g_return_val_if_fail (E_IS_CALENDAR (cal), FALSE); - prev_widget = GNOME_CANVAS_WIDGET(cal->prev_item)->widget; - next_widget = GNOME_CANVAS_WIDGET(cal->next_item)->widget; + prev_widget = GNOME_CANVAS_WIDGET (cal->prev_item)->widget; + next_widget = GNOME_CANVAS_WIDGET (cal->next_item)->widget; ret_val = gtk_widget_has_focus (prev_widget) || gtk_widget_has_focus (next_widget); return ret_val; @@ -633,8 +633,8 @@ e_calendar_set_focusable (ECalendar *cal, gboolean focusable) g_return_if_fail (E_IS_CALENDAR (cal)); widget = GTK_WIDGET (cal); - prev_widget = GNOME_CANVAS_WIDGET(cal->prev_item)->widget; - next_widget = GNOME_CANVAS_WIDGET(cal->next_item)->widget; + prev_widget = GNOME_CANVAS_WIDGET (cal->prev_item)->widget; + next_widget = GNOME_CANVAS_WIDGET (cal->next_item)->widget; if (focusable) { gtk_widget_set_can_focus (widget, TRUE); diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c index 944f3b63df..6d4a9de5e4 100644 --- a/widgets/misc/e-canvas-background.c +++ b/widgets/misc/e-canvas-background.c @@ -81,7 +81,7 @@ enum { }; static void -get_color(ECanvasBackground *ecb) +get_color (ECanvasBackground *ecb) { GnomeCanvasItem *item = GNOME_CANVAS_ITEM (ecb); ecb->priv->color.pixel = gnome_canvas_get_color_pixel (item->canvas, @@ -278,7 +278,7 @@ ecb_set_property (GObject *object, } ecb->priv->needs_redraw = 1; - gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(ecb)); + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb)); } static void diff --git a/widgets/misc/e-canvas-utils.c b/widgets/misc/e-canvas-utils.c index c4163feea1..29dc21d3b3 100644 --- a/widgets/misc/e-canvas-utils.c +++ b/widgets/misc/e-canvas-utils.c @@ -37,7 +37,7 @@ e_canvas_item_move_absolute (GnomeCanvasItem *item, gdouble dx, gdouble dy) } static double -compute_offset(gint top, gint bottom, gint page_top, gint page_bottom) +compute_offset (gint top, gint bottom, gint page_top, gint page_bottom) { gint size = bottom - top; gint offset = 0; @@ -76,23 +76,23 @@ e_canvas_show_area (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gdo g_return_if_fail (canvas != NULL); g_return_if_fail (GNOME_IS_CANVAS (canvas)); - h = gtk_layout_get_hadjustment(GTK_LAYOUT(canvas)); + h = gtk_layout_get_hadjustment (GTK_LAYOUT (canvas)); page_size = gtk_adjustment_get_page_size (h); lower = gtk_adjustment_get_lower (h); upper = gtk_adjustment_get_upper (h); value = gtk_adjustment_get_value (h); - dx = compute_offset(x1, x2, value, value + page_size); + dx = compute_offset (x1, x2, value, value + page_size); if (dx) - gtk_adjustment_set_value(h, CLAMP(value + dx, lower, upper - page_size)); + gtk_adjustment_set_value (h, CLAMP (value + dx, lower, upper - page_size)); - v = gtk_layout_get_vadjustment(GTK_LAYOUT(canvas)); + v = gtk_layout_get_vadjustment (GTK_LAYOUT (canvas)); page_size = gtk_adjustment_get_page_size (v); lower = gtk_adjustment_get_lower (v); upper = gtk_adjustment_get_upper (v); value = gtk_adjustment_get_value (v); - dy = compute_offset(y1, y2, value, value + page_size); + dy = compute_offset (y1, y2, value, value + page_size); if (dy) - gtk_adjustment_set_value(v, CLAMP(value + dy, lower, upper - page_size)); + gtk_adjustment_set_value (v, CLAMP (value + dy, lower, upper - page_size)); } void @@ -101,10 +101,10 @@ e_canvas_item_show_area (GnomeCanvasItem *item, gdouble x1, gdouble y1, gdouble g_return_if_fail (item != NULL); g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - gnome_canvas_item_i2w(item, &x1, &y1); - gnome_canvas_item_i2w(item, &x2, &y2); + gnome_canvas_item_i2w (item, &x1, &y1); + gnome_canvas_item_i2w (item, &x2, &y2); - e_canvas_show_area(item->canvas, x1, y1, x2, y2); + e_canvas_show_area (item->canvas, x1, y1, x2, y2); } static gboolean @@ -120,22 +120,22 @@ e_canvas_area_shown (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gd g_return_val_if_fail (canvas != NULL, FALSE); g_return_val_if_fail (GNOME_IS_CANVAS (canvas), FALSE); - h = gtk_layout_get_hadjustment(GTK_LAYOUT(canvas)); + h = gtk_layout_get_hadjustment (GTK_LAYOUT (canvas)); page_size = gtk_adjustment_get_page_size (h); lower = gtk_adjustment_get_lower (h); upper = gtk_adjustment_get_upper (h); value = gtk_adjustment_get_value (h); - dx = compute_offset(x1, x2, value, value + page_size); - if (CLAMP(value + dx, lower, upper - page_size) - value != 0) + dx = compute_offset (x1, x2, value, value + page_size); + if (CLAMP (value + dx, lower, upper - page_size) - value != 0) return FALSE; - v = gtk_layout_get_vadjustment(GTK_LAYOUT(canvas)); + v = gtk_layout_get_vadjustment (GTK_LAYOUT (canvas)); page_size = gtk_adjustment_get_page_size (v); lower = gtk_adjustment_get_lower (v); upper = gtk_adjustment_get_upper (v); value = gtk_adjustment_get_value (v); - dy = compute_offset(y1, y2, value, value + page_size); - if (CLAMP(value + dy, lower, upper - page_size) - value != 0) + dy = compute_offset (y1, y2, value, value + page_size); + if (CLAMP (value + dy, lower, upper - page_size) - value != 0) return FALSE; return TRUE; } @@ -146,10 +146,10 @@ e_canvas_item_area_shown (GnomeCanvasItem *item, gdouble x1, gdouble y1, gdouble g_return_val_if_fail (item != NULL, FALSE); g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (item), FALSE); - gnome_canvas_item_i2w(item, &x1, &y1); - gnome_canvas_item_i2w(item, &x2, &y2); + gnome_canvas_item_i2w (item, &x1, &y1); + gnome_canvas_item_i2w (item, &x2, &y2); - return e_canvas_area_shown(item->canvas, x1, y1, x2, y2); + return e_canvas_area_shown (item->canvas, x1, y1, x2, y2); } typedef struct { @@ -165,9 +165,9 @@ show_area_timeout (gpointer data) { DoubsAndCanvas *dac = data; - e_canvas_show_area(dac->canvas, dac->x1, dac->y1, dac->x2, dac->y2); + e_canvas_show_area (dac->canvas, dac->x1, dac->y1, dac->x2, dac->y2); g_object_unref (dac->canvas); - g_free(dac); + g_free (dac); return FALSE; } @@ -179,15 +179,15 @@ e_canvas_item_show_area_delayed (GnomeCanvasItem *item, gdouble x1, gdouble y1, g_return_if_fail (item != NULL); g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - gnome_canvas_item_i2w(item, &x1, &y1); - gnome_canvas_item_i2w(item, &x2, &y2); + gnome_canvas_item_i2w (item, &x1, &y1); + gnome_canvas_item_i2w (item, &x2, &y2); - dac = g_new(DoubsAndCanvas, 1); + dac = g_new (DoubsAndCanvas, 1); dac->x1 = x1; dac->y1 = y1; dac->x2 = x2; dac->y2 = y2; dac->canvas = item->canvas; g_object_ref (item->canvas); - g_timeout_add(delay, show_area_timeout, dac); + g_timeout_add (delay, show_area_timeout, dac); } diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c index 3f1c7b3c07..a49f7e93be 100644 --- a/widgets/misc/e-canvas-vbox.c +++ b/widgets/misc/e-canvas-vbox.c @@ -43,8 +43,8 @@ static void e_canvas_vbox_realize (GnomeCanvasItem *item); static void e_canvas_vbox_reflow (GnomeCanvasItem *item, gint flags); -static void e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item); -static void e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item); +static void e_canvas_vbox_real_add_item (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item); +static void e_canvas_vbox_real_add_item_start (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item); static void e_canvas_vbox_resize_children (GnomeCanvasItem *item); /* The arguments we take */ @@ -117,7 +117,7 @@ e_canvas_vbox_init (ECanvasVbox *vbox) vbox->height = 10; vbox->spacing = 0; - e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(vbox), e_canvas_vbox_reflow); + e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (vbox), e_canvas_vbox_reflow); } static void @@ -133,12 +133,12 @@ e_canvas_vbox_set_property (GObject *object, guint prop_id, const GValue *value, case PROP_WIDTH: case PROP_MINIMUM_WIDTH: e_canvas_vbox->minimum_width = g_value_get_double (value); - e_canvas_vbox_resize_children(item); - e_canvas_item_request_reflow(item); + e_canvas_vbox_resize_children (item); + e_canvas_item_request_reflow (item); break; case PROP_SPACING: e_canvas_vbox->spacing = g_value_get_double (value); - e_canvas_item_request_reflow(item); + e_canvas_item_request_reflow (item); break; } } @@ -188,15 +188,15 @@ disconnect_item_cb (gpointer data, gpointer user_data) static void e_canvas_vbox_dispose (GObject *object) { - ECanvasVbox *vbox = E_CANVAS_VBOX(object); + ECanvasVbox *vbox = E_CANVAS_VBOX (object); if (vbox->items) { - g_list_foreach(vbox->items, disconnect_item_cb, vbox); - g_list_free(vbox->items); + g_list_foreach (vbox->items, disconnect_item_cb, vbox); + g_list_free (vbox->items); vbox->items = NULL; } - G_OBJECT_CLASS(e_canvas_vbox_parent_class)->dispose (object); + G_OBJECT_CLASS (e_canvas_vbox_parent_class)->dispose (object); } static gint @@ -229,7 +229,7 @@ e_canvas_vbox_event (GnomeCanvasItem *item, GdkEvent *event) break; } if (!return_val) { - if (GNOME_CANVAS_ITEM_CLASS(e_canvas_vbox_parent_class)->event) + if (GNOME_CANVAS_ITEM_CLASS (e_canvas_vbox_parent_class)->event) return GNOME_CANVAS_ITEM_CLASS (e_canvas_vbox_parent_class)->event (item, event); } return return_val; @@ -239,45 +239,45 @@ e_canvas_vbox_event (GnomeCanvasItem *item, GdkEvent *event) static void e_canvas_vbox_realize (GnomeCanvasItem *item) { - if (GNOME_CANVAS_ITEM_CLASS(e_canvas_vbox_parent_class)->realize) - (* GNOME_CANVAS_ITEM_CLASS(e_canvas_vbox_parent_class)->realize) (item); + if (GNOME_CANVAS_ITEM_CLASS (e_canvas_vbox_parent_class)->realize) + (* GNOME_CANVAS_ITEM_CLASS (e_canvas_vbox_parent_class)->realize) (item); - e_canvas_vbox_resize_children(item); - e_canvas_item_request_reflow(item); + e_canvas_vbox_resize_children (item); + e_canvas_item_request_reflow (item); } static void e_canvas_vbox_remove_item (gpointer data, GObject *where_object_was) { ECanvasVbox *vbox = data; - vbox->items = g_list_remove(vbox->items, where_object_was); + vbox->items = g_list_remove (vbox->items, where_object_was); } static void -e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item) +e_canvas_vbox_real_add_item (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item) { - e_canvas_vbox->items = g_list_append(e_canvas_vbox->items, 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 (GNOME_CANVAS_ITEM (e_canvas_vbox)->flags & GNOME_CANVAS_ITEM_REALIZED) { - gnome_canvas_item_set(item, + gnome_canvas_item_set (item, "width", (gdouble) e_canvas_vbox->minimum_width, NULL); - e_canvas_item_request_reflow(item); + e_canvas_item_request_reflow (item); } } static void -e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item) +e_canvas_vbox_real_add_item_start (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item) { - e_canvas_vbox->items = g_list_prepend(e_canvas_vbox->items, item); + 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 (GNOME_CANVAS_ITEM (e_canvas_vbox)->flags & GNOME_CANVAS_ITEM_REALIZED) { - gnome_canvas_item_set(item, + gnome_canvas_item_set (item, "width", (gdouble) e_canvas_vbox->minimum_width, NULL); - e_canvas_item_request_reflow(item); + e_canvas_item_request_reflow (item); } } @@ -289,17 +289,17 @@ e_canvas_vbox_resize_children (GnomeCanvasItem *item) e_canvas_vbox = E_CANVAS_VBOX (item); for (list = e_canvas_vbox->items; list; list = list->next) { - GnomeCanvasItem *child = GNOME_CANVAS_ITEM(list->data); - gnome_canvas_item_set(child, + GnomeCanvasItem *child = GNOME_CANVAS_ITEM (list->data); + gnome_canvas_item_set (child, "width", (gdouble) e_canvas_vbox->minimum_width, NULL); } } static void -e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) +e_canvas_vbox_reflow ( GnomeCanvasItem *item, gint flags ) { - ECanvasVbox *e_canvas_vbox = E_CANVAS_VBOX(item); + ECanvasVbox *e_canvas_vbox = E_CANVAS_VBOX (item); if (item->flags & GNOME_CANVAS_ITEM_REALIZED) { gdouble old_height; @@ -324,15 +324,15 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) "height", &item_height, "width", &item_width, NULL); - e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data), + e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (list->data), (gdouble) 0, (gdouble) running_height); running_height += item_height; if (max_width < item_width) max_width = item_width; - list = g_list_next(list); + list = g_list_next (list); - for (; list; list = g_list_next(list)) { + for (; list; list = g_list_next (list)) { running_height += e_canvas_vbox->spacing; g_object_get (list->data, @@ -340,7 +340,7 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) "width", &item_width, NULL); - e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data), + e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (list->data), (gdouble) 0, (gdouble) running_height); @@ -354,21 +354,21 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) e_canvas_vbox->width = max_width; if (old_height != e_canvas_vbox->height || old_width != e_canvas_vbox->width) - e_canvas_item_request_parent_reflow(item); + e_canvas_item_request_parent_reflow (item); } } void -e_canvas_vbox_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item) +e_canvas_vbox_add_item (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item) { - if (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item) - (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item) (e_canvas_vbox, item); + if (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item) + (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item) (e_canvas_vbox, item); } void -e_canvas_vbox_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item) +e_canvas_vbox_add_item_start (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item) { - if (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item_start) - (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item_start) (e_canvas_vbox, item); + if (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item_start) + (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item_start) (e_canvas_vbox, item); } diff --git a/widgets/misc/e-canvas-vbox.h b/widgets/misc/e-canvas-vbox.h index 9fb5b8ba34..7f0110ce9e 100644 --- a/widgets/misc/e-canvas-vbox.h +++ b/widgets/misc/e-canvas-vbox.h @@ -76,8 +76,8 @@ struct _ECanvasVboxClass * should also do an ECanvas parent CanvasVbox request if its size * changes. */ -void e_canvas_vbox_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item); -void e_canvas_vbox_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item); +void e_canvas_vbox_add_item (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item); +void e_canvas_vbox_add_item_start (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item); GType e_canvas_vbox_get_type (void); G_END_DECLS diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index 23e8176d24..261d92cf12 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -366,10 +366,10 @@ canvas_style_set_recursive (GnomeCanvasItem *item, static void canvas_dispose (GObject *object) { - ECanvas *canvas = E_CANVAS(object); + ECanvas *canvas = E_CANVAS (object); if (canvas->idle_id) - g_source_remove(canvas->idle_id); + g_source_remove (canvas->idle_id); canvas->idle_id = 0; if (canvas->grab_cancelled_check_id) @@ -417,7 +417,7 @@ canvas_unrealize (GtkWidget *widget) ECanvas * ecanvas = E_CANVAS (widget); if (ecanvas->idle_id) { - g_source_remove(ecanvas->idle_id); + g_source_remove (ecanvas->idle_id); ecanvas->idle_id = 0; } @@ -662,7 +662,7 @@ e_canvas_item_grab_focus (GnomeCanvasItem *item, item->canvas->focused_item = item; - if (widget_too && !gtk_widget_has_focus (GTK_WIDGET(item->canvas))) { + if (widget_too && !gtk_widget_has_focus (GTK_WIDGET (item->canvas))) { gtk_widget_grab_focus (GTK_WIDGET (item->canvas)); } @@ -709,8 +709,8 @@ e_canvas_item_invoke_reflow (GnomeCanvasItem *item, static void do_reflow (ECanvas *canvas) { - if (GNOME_CANVAS(canvas)->root->flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW) - e_canvas_item_invoke_reflow (GNOME_CANVAS(canvas)->root, 0); + if (GNOME_CANVAS (canvas)->root->flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW) + e_canvas_item_invoke_reflow (GNOME_CANVAS (canvas)->root, 0); } /* Idle handler for the e-canvas. It deals with pending reflows. */ @@ -719,7 +719,7 @@ idle_handler (gpointer data) { ECanvas *canvas; - GDK_THREADS_ENTER(); + GDK_THREADS_ENTER (); canvas = E_CANVAS (data); do_reflow (canvas); @@ -729,7 +729,7 @@ idle_handler (gpointer data) g_signal_emit (canvas, signals [REFLOW], 0); - GDK_THREADS_LEAVE(); + GDK_THREADS_LEAVE (); return FALSE; } @@ -753,7 +753,7 @@ e_canvas_item_descendent_needs_reflow (GnomeCanvasItem *item) item->flags |= E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW; if (item->parent) - e_canvas_item_descendent_needs_reflow(item->parent); + e_canvas_item_descendent_needs_reflow (item->parent); } void @@ -763,15 +763,15 @@ e_canvas_item_request_reflow (GnomeCanvasItem *item) if (item->flags & GNOME_CANVAS_ITEM_REALIZED) { item->flags |= E_CANVAS_ITEM_NEEDS_REFLOW; - e_canvas_item_descendent_needs_reflow(item); - add_idle(E_CANVAS(item->canvas)); + e_canvas_item_descendent_needs_reflow (item); + add_idle (E_CANVAS (item->canvas)); } } void e_canvas_item_request_parent_reflow (GnomeCanvasItem *item) { - g_return_if_fail (GNOME_IS_CANVAS_ITEM(item)); + g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); e_canvas_item_request_reflow (item->parent); } diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 8f14e84e20..77f337e4aa 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -68,7 +68,7 @@ struct _EDateEditPrivate { gboolean use_24_hour_format; /* This is TRUE if we want to make the time field insensitive rather - than hide it when set_show_time() is called. */ + * than hide it when set_show_time() is called. */ gboolean make_time_insensitive; /* This is the range of hours we show in the time popup. */ @@ -76,11 +76,11 @@ struct _EDateEditPrivate { gint upper_hour; /* This indicates whether the last date committed was invalid. - (A date is committed by hitting Return, moving the keyboard focus, - or selecting a date in the popup). Note that this only indicates - that the date couldn't be parsed. A date set to 'None' is valid - here, though e_date_edit_date_is_valid() will return FALSE if an - empty date isn't actually permitted. */ + * (A date is committed by hitting Return, moving the keyboard focus, + * or selecting a date in the popup). Note that this only indicates + * that the date couldn't be parsed. A date set to 'None' is valid + * here, though e_date_edit_date_is_valid() will return FALSE if an + * empty date isn't actually permitted. */ gboolean date_is_valid; /* This is the last valid date which was set. If the date was set to @@ -92,11 +92,11 @@ struct _EDateEditPrivate { gint day; /* This indicates whether the last time committed was invalid. - (A time is committed by hitting Return, moving the keyboard focus, - or selecting a time in the popup). Note that this only indicates - that the time couldn't be parsed. An empty/None time is valid - here, though e_date_edit_time_is_valid() will return FALSE if an - empty time isn't actually permitted. */ + * (A time is committed by hitting Return, moving the keyboard focus, + * or selecting a time in the popup). Note that this only indicates + * that the time couldn't be parsed. An empty/None time is valid + * here, though e_date_edit_time_is_valid() will return FALSE if an + * empty time isn't actually permitted. */ gboolean time_is_valid; /* This is the last valid time which was set. If the time was set to @@ -1805,12 +1805,12 @@ on_date_entry_focus_out (GtkEntry *entry, e_date_edit_check_date_changed (dedit); if (!e_date_edit_date_is_valid (dedit)) { - msg_dialog = gtk_message_dialog_new(NULL, + msg_dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "%s", _("Invalid Date Value")); - gtk_dialog_run (GTK_DIALOG(msg_dialog)); + gtk_dialog_run (GTK_DIALOG (msg_dialog)); gtk_widget_destroy (msg_dialog); e_date_edit_get_date ( dedit, &tmp_tm.tm_year, @@ -1849,14 +1849,14 @@ on_time_entry_focus_out (GtkEntry *entry, e_date_edit_check_time_changed (dedit); if (!e_date_edit_time_is_valid (dedit)) { - msg_dialog=gtk_message_dialog_new(NULL, + msg_dialog=gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "%s", _("Invalid Time Value")); - gtk_dialog_run (GTK_DIALOG(msg_dialog)); + gtk_dialog_run (GTK_DIALOG (msg_dialog)); gtk_widget_destroy (msg_dialog); - e_date_edit_set_time (dedit,e_date_edit_get_time(dedit)); + e_date_edit_set_time (dedit,e_date_edit_get_time (dedit)); gtk_widget_grab_focus (GTK_WIDGET (entry)); return FALSE; } @@ -2352,5 +2352,5 @@ e_date_edit_get_entry (EDateEdit *dedit) EDateEditPrivate *priv; priv = dedit->priv; - return GTK_WIDGET(priv->date_entry); + return GTK_WIDGET (priv->date_entry); } diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h index 5c1e20deac..28032dd8c9 100644 --- a/widgets/misc/e-dateedit.h +++ b/widgets/misc/e-dateedit.h @@ -164,8 +164,8 @@ void e_date_edit_set_time_popup_range (EDateEdit *dedit, gint upper_hour); /* Whether the time field is made insensitive rather than hiding it. */ -gboolean e_date_edit_get_make_time_insensitive(EDateEdit *dedit); -void e_date_edit_set_make_time_insensitive(EDateEdit *dedit, +gboolean e_date_edit_get_make_time_insensitive (EDateEdit *dedit); +void e_date_edit_set_make_time_insensitive (EDateEdit *dedit, gboolean make_insensitive); /* Whether two-digit years in date could be modified as in future; default is TRUE */ diff --git a/widgets/misc/e-focus-tracker.h b/widgets/misc/e-focus-tracker.h index 679cc4b655..86b206e240 100644 --- a/widgets/misc/e-focus-tracker.h +++ b/widgets/misc/e-focus-tracker.h @@ -91,7 +91,8 @@ void e_focus_tracker_update_actions (EFocusTracker *focus_tracker); void e_focus_tracker_cut_clipboard (EFocusTracker *focus_tracker); void e_focus_tracker_copy_clipboard (EFocusTracker *focus_tracker); void e_focus_tracker_paste_clipboard (EFocusTracker *focus_tracker); -void e_focus_tracker_delete_selection(EFocusTracker *focus_tracker); +void e_focus_tracker_delete_selection + (EFocusTracker *focus_tracker); void e_focus_tracker_select_all (EFocusTracker *focus_tracker); G_END_DECLS diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c index 682e84d50e..62e3571984 100644 --- a/widgets/misc/e-map.c +++ b/widgets/misc/e-map.c @@ -210,10 +210,10 @@ e_map_finalize (GObject *object) view = E_MAP (object); priv = view->priv; - g_object_unref((priv->hadj)); + g_object_unref ((priv->hadj)); priv->hadj = NULL; - g_object_unref((priv->vadj)); + g_object_unref ((priv->vadj)); priv->vadj = NULL; if (priv->map_pixbuf) @@ -1614,7 +1614,7 @@ zoom_do (EMap *map) g_signal_handlers_unblock_matched (priv->hadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map); g_signal_handlers_unblock_matched (priv->vadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map); - set_scroll_area(map); + set_scroll_area (map); } /* Callback used when an adjustment is changed */ diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c index 422fd47e60..bea993e457 100644 --- a/widgets/misc/e-popup-menu.c +++ b/widgets/misc/e-popup-menu.c @@ -110,7 +110,7 @@ e_popup_menu_create_with_domain (EPopupMenu *menu_list, if (menu_list[i].is_radio) group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item)); - make_item (menu, GTK_MENU_ITEM (item), dgettext(domain, menu_list[i].name), menu_list[i].pixmap_widget); + make_item (menu, GTK_MENU_ITEM (item), dgettext (domain, menu_list[i].name), menu_list[i].pixmap_widget); } else { item = gtk_menu_item_new (); } diff --git a/widgets/misc/e-preferences-window.h b/widgets/misc/e-preferences-window.h index 3606d6e629..f7789b3af6 100644 --- a/widgets/misc/e-preferences-window.h +++ b/widgets/misc/e-preferences-window.h @@ -58,7 +58,9 @@ struct _EPreferencesWindowClass { GtkWindowClass parent_class; }; -typedef GtkWidget *(*EPreferencesWindowCreatePageFn) (EPreferencesWindow *window); +typedef GtkWidget * + (*EPreferencesWindowCreatePageFn) + (EPreferencesWindow *window); GType e_preferences_window_get_type (void); GtkWidget * e_preferences_window_new (gpointer shell); @@ -72,7 +74,8 @@ void e_preferences_window_add_page (EPreferencesWindow *window, gint sort_order); void e_preferences_window_show_page (EPreferencesWindow *window, const gchar *page_name); -void e_preferences_window_filter_page(EPreferencesWindow *window, +void e_preferences_window_filter_page + (EPreferencesWindow *window, const gchar *page_name); G_END_DECLS diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c index 13de73e068..eb10c8c1fe 100644 --- a/widgets/misc/e-printable.c +++ b/widgets/misc/e-printable.c @@ -113,9 +113,9 @@ e_printable_init (EPrintable *e_printable) } EPrintable * -e_printable_new(void) +e_printable_new (void) { - return E_PRINTABLE(g_object_new(E_PRINTABLE_TYPE, NULL)); + return E_PRINTABLE (g_object_new (E_PRINTABLE_TYPE, NULL)); } void diff --git a/widgets/misc/e-searching-tokenizer.c b/widgets/misc/e-searching-tokenizer.c index e7ef585146..b2581799c1 100644 --- a/widgets/misc/e-searching-tokenizer.c +++ b/widgets/misc/e-searching-tokenizer.c @@ -57,7 +57,7 @@ G_DEFINE_TYPE ( /* This is faster and safer than glib2's utf8 abomination, but isn't exported from camel as yet */ static inline guint32 -camel_utf8_getc(const guchar **ptr) +camel_utf8_getc (const guchar **ptr) { register guchar *p = (guchar *)*ptr; register guchar c, r; @@ -102,7 +102,7 @@ static const gchar *ignored_tags[] = { static gint ignore_tag (const gchar *tag) { - gchar *t = g_alloca(strlen(tag)+1), c, *out; + gchar *t = g_alloca (strlen (tag)+1), c, *out; const gchar *in; gint i; @@ -167,10 +167,10 @@ struct _trie { static void dump_trie (struct _state *s, gint d) { - gchar *p = g_alloca(d*2+1); + gchar *p = g_alloca (d*2+1); struct _match *m; - memset(p, ' ', d*2); + memset (p, ' ', d*2); p[d*2]=0; printf("%s[state] %p: %d fail->%p\n", p, s, s->final, s->fail); @@ -212,19 +212,19 @@ build_trie (gint nocase, gint len, guchar **words) gint state_depth_max, state_depth_size; struct _state **state_depth; - trie = g_malloc(sizeof(*trie)); + trie = g_malloc (sizeof (*trie)); trie->root.matches = NULL; trie->root.final = 0; trie->root.fail = NULL; trie->root.next = NULL; - trie->state_chunks = e_memchunk_new (8, sizeof(struct _state)); - trie->match_chunks = e_memchunk_new (8, sizeof(struct _match)); + trie->state_chunks = e_memchunk_new (8, sizeof (struct _state)); + trie->match_chunks = e_memchunk_new (8, sizeof (struct _match)); /* This will correspond to the length of the longest pattern */ state_depth_size = 0; state_depth_max = 64; - state_depth = g_malloc(sizeof(*state_depth[0])*64); + state_depth = g_malloc (sizeof (*state_depth[0])*64); state_depth[0] = NULL; /* Step 1: Build trie */ @@ -240,17 +240,17 @@ build_trie (gint nocase, gint len, guchar **words) c = g_unichar_tolower (c); m = g (q, c); if (m == NULL) { - m = e_memchunk_alloc(trie->match_chunks); + m = e_memchunk_alloc (trie->match_chunks); m->ch = c; m->next = q->matches; q->matches = m; - q = m->match = e_memchunk_alloc(trie->state_chunks); + q = m->match = e_memchunk_alloc (trie->state_chunks); q->matches = NULL; q->fail = &trie->root; q->final = 0; if (state_depth_max < depth) { state_depth_max += 64; - state_depth = g_realloc(state_depth, sizeof(*state_depth[0])*state_depth_max); + state_depth = g_realloc (state_depth, sizeof (*state_depth[0])*state_depth_max); } if (state_depth_size < depth) { state_depth[depth] = NULL; @@ -267,7 +267,7 @@ build_trie (gint nocase, gint len, guchar **words) } d(printf("Dumping trie:\n")); - d(dump_trie (&trie->root, 0)); + d (dump_trie (&trie->root, 0)); /* Step 2: Build failure graph */ @@ -314,8 +314,8 @@ build_trie (gint nocase, gint len, guchar **words) static void free_trie (struct _trie *t) { - e_memchunk_destroy(t->match_chunks); - e_memchunk_destroy(t->state_chunks); + e_memchunk_destroy (t->match_chunks); + e_memchunk_destroy (t->state_chunks); g_free (t); } @@ -373,7 +373,7 @@ struct _searcher { }; static void -searcher_set_tokenfunc(struct _searcher *s, gchar *(*next)(), gpointer data) +searcher_set_tokenfunc (struct _searcher *s, gchar *(*next)(), gpointer data) { s->next_token = next; s->next_data = data; @@ -385,7 +385,7 @@ searcher_new (gint flags, gint argc, guchar **argv, const gchar *tags, const gch gint i, m; struct _searcher *s; - s = g_malloc(sizeof(*s)); + s = g_malloc (sizeof (*s)); s->t = build_trie ((flags&SEARCH_CASE) == 0, argc, argv); s->words = argc; @@ -407,13 +407,13 @@ searcher_new (gint flags, gint argc, guchar **argv, const gchar *tags, const gch i = 2; while (i<m) i<<=2; - s->last = g_malloc(sizeof(s->last[0])*i); + s->last = g_malloc (sizeof (s->last[0])*i); s->last_mask = i-1; s->lastp = 0; /* a stack of possible submatches */ s->submatchp = 0; - s->submatches = g_malloc(sizeof(s->submatches[0])*argc+1); + s->submatches = g_malloc (sizeof (s->submatches[0])*argc+1); return s; } @@ -441,10 +441,10 @@ append_token (GQueue *queue, const gchar *tok, gint len) struct _token *token; if (len == -1) - len = strlen(tok); - token = g_malloc(sizeof(*token) + len+1); + len = strlen (tok); + token = g_malloc (sizeof (*token) + len+1); token->offset = 0; /* set by caller when required */ - memcpy(token->tok, tok, len); + memcpy (token->tok, tok, len); token->tok[len] = 0; g_queue_push_tail (queue, token); @@ -454,7 +454,7 @@ append_token (GQueue *queue, const gchar *tok, gint len) #define free_token(x) (g_free (x)) static void -output_token(struct _searcher *s, struct _token *token) +output_token (struct _searcher *s, struct _token *token) { gint offend; gint left, pre; @@ -465,10 +465,10 @@ output_token(struct _searcher *s, struct _token *token) g_queue_push_tail (&s->output, token); } else { d (printf("discarding tag token '%s' from input\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok)); - free_token(token); + free_token (token); } } else { - offend = token->offset + strlen(token->tok); + offend = token->offset + strlen (token->tok); left = offend-s->offout; if (left > 0) { pre = s->offout - token->offset; @@ -479,13 +479,13 @@ output_token(struct _searcher *s, struct _token *token) g_queue_push_tail (&s->output, token); } else { d (printf("discarding whole token '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok)); - free_token(token); + free_token (token); } } } static struct _token * -find_token(struct _searcher *s, gint start) +find_token (struct _searcher *s, gint start) { GList *link; @@ -504,7 +504,7 @@ find_token(struct _searcher *s, gint start) } static void -output_match(struct _searcher *s, guint start, guint end) +output_match (struct _searcher *s, guint start, guint end) { register struct _token *token; struct _token *starttoken, *endtoken; @@ -512,8 +512,8 @@ output_match(struct _searcher *s, guint start, guint end) d (printf("output match: %d-%d at %d\n", start, end, s->offout)); - starttoken = find_token(s, start); - endtoken = find_token(s, end); + starttoken = find_token (s, start); + endtoken = find_token (s, end); if (starttoken == NULL || endtoken == NULL) { d (printf("Cannot find match history for match %d-%d\n", start, end)); @@ -527,12 +527,12 @@ output_match(struct _searcher *s, guint start, guint end) while ((struct _token *) g_queue_peek_head (&s->input) != starttoken) { token = g_queue_pop_head (&s->input); d (printf("appending failed match '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok)); - output_token(s, token); + output_token (s, token); } /* output any pre-match text */ if (s->offout < start) { - token = append_token(&s->output, starttoken->tok + (s->offout-starttoken->offset), start-s->offout); + token = append_token (&s->output, starttoken->tok + (s->offout-starttoken->offset), start-s->offout); d (printf("adding pre-match text '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok)); s->offout = start; } @@ -540,35 +540,35 @@ output_match(struct _searcher *s, guint start, guint end) /* output highlight/bold */ if (s->flags & SEARCH_BOLD) { sprintf(b, "%c<b>", (gchar)TAG_ESCAPE); - append_token(&s->output, b, -1); + append_token (&s->output, b, -1); } if (s->tags) - append_token(&s->output, s->tags, -1); + append_token (&s->output, s->tags, -1); /* output match node (s) */ if (starttoken != endtoken) { while ((struct _token *) g_queue_peek_head (&s->input) != endtoken) { token = g_queue_pop_head (&s->input); d (printf("appending (partial) match node (head) '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok)); - output_token(s, token); + output_token (s, token); } } /* any remaining partial content */ if (s->offout < end) { - token = append_token(&s->output, endtoken->tok+(s->offout-endtoken->offset), end-s->offout); + token = append_token (&s->output, endtoken->tok+(s->offout-endtoken->offset), end-s->offout); d (printf("appending (partial) match node (tail) '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok)); s->offout = end; } /* end highlight */ if (s->tage) - append_token(&s->output, s->tage, -1); + append_token (&s->output, s->tage, -1); /* and close bold if we need to */ if (s->flags & SEARCH_BOLD) { sprintf(b, "%c</b>", (gchar)TAG_ESCAPE); - append_token(&s->output, b, -1); + append_token (&s->output, b, -1); } } @@ -579,7 +579,7 @@ output_subpending (struct _searcher *s) gint i; for (i=s->submatchp-1;i>=0;i--) - output_match(s, s->submatches[i].offstart, s->submatches[i].offend); + output_match (s, s->submatches[i].offstart, s->submatches[i].offend); s->submatchp = 0; } @@ -630,12 +630,12 @@ output_pending (struct _searcher *s) struct _token *token; while ((token = g_queue_pop_head (&s->input)) != NULL) - output_token(s, token); + output_token (s, token); } /* flushes any nodes we cannot possibly match anymore */ static void -flush_extra(struct _searcher *s) +flush_extra (struct _searcher *s) { guint start; gint i; @@ -648,18 +648,18 @@ flush_extra(struct _searcher *s) start = s->submatches[i].offstart; /* now, flush out any tokens which are before this point */ - starttoken = find_token(s, start); + starttoken = find_token (s, start); if (starttoken == NULL) return; while ((struct _token *) g_queue_peek_head (&s->input) != starttoken) { token = g_queue_pop_head (&s->input); - output_token(s, token); + output_token (s, token); } } static gchar * -searcher_next_token(struct _searcher *s) +searcher_next_token (struct _searcher *s) { struct _token *token; const guchar *tok, *stok, *pre_tok; @@ -671,7 +671,7 @@ searcher_next_token(struct _searcher *s) while (g_queue_is_empty (&s->output)) { /* get next token */ - tok = (guchar *)s->next_token(s->next_data); + tok = (guchar *)s->next_token (s->next_data); if (tok == NULL) { output_subpending (s); output_pending (s); @@ -679,7 +679,7 @@ searcher_next_token(struct _searcher *s) } /* we dont always have to copy each token, e.g. if we dont match anything */ - token = append_token(&s->input, (gchar *)tok, -1); + token = append_token (&s->input, (gchar *)tok, -1); token->offset = s->offset; tok = (guchar *)token->tok; @@ -748,13 +748,13 @@ searcher_next_token(struct _searcher *s) s->offset += (pre_tok-stok); - flush_extra(s); + flush_extra (s); } s->state = q; if (s->current) - free_token(s->current); + free_token (s->current); s->current = token = g_queue_pop_head (&s->output); @@ -762,12 +762,12 @@ searcher_next_token(struct _searcher *s) } static gchar * -searcher_peek_token(struct _searcher *s) +searcher_peek_token (struct _searcher *s) { gchar *tok; /* we just get it and then put it back, it's fast enuf */ - tok = searcher_next_token(s); + tok = searcher_next_token (s); if (tok) { /* need to clear this so we dont free it while its still active */ g_queue_push_head (&s->output, s->current); @@ -799,14 +799,14 @@ search_info_new (void) { struct _search_info *s; - s = g_malloc0(sizeof(struct _search_info)); + s = g_malloc0 (sizeof (struct _search_info)); s->strv = g_ptr_array_new (); return s; } static void -search_info_set_flags(struct _search_info *si, guint flags, guint mask) +search_info_set_flags (struct _search_info *si, guint flags, guint mask) { si->flags = (si->flags & ~mask) | (flags & mask); } @@ -894,9 +894,9 @@ search_info_to_searcher (struct _search_info *si) else col = si->color; - tags = g_alloca(20+strlen(col)); + tags = g_alloca (20+strlen (col)); sprintf(tags, "%c<font color=\"%s\">", TAG_ESCAPE, col); - tage = g_alloca(20); + tage = g_alloca (20); sprintf(tage, "%c</font>", TAG_ESCAPE); return searcher_new (si->flags, si->strv->len, (guchar **)si->strv->pdata, tags, tage); @@ -971,7 +971,7 @@ searching_tokenizer_begin (HTMLTokenizer *tokenizer, if ((priv->engine = search_info_to_searcher (priv->primary)) || (priv->engine = search_info_to_searcher (priv->secondary))) { - searcher_set_tokenfunc(priv->engine, get_token, tokenizer); + searcher_set_tokenfunc (priv->engine, get_token, tokenizer); } /* else - no engine, no search active */ @@ -1093,7 +1093,7 @@ e_searching_tokenizer_init (ESearchingTokenizer *tokenizer) search_info_set_color (tokenizer->priv->primary, "red"); tokenizer->priv->secondary = search_info_new (); - search_info_set_flags( + search_info_set_flags ( tokenizer->priv->secondary, SEARCH_BOLD, SEARCH_CASE | SEARCH_BOLD); search_info_set_color (tokenizer->priv->secondary, "purple"); diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c index 5406fd635b..8f9a8f087d 100644 --- a/widgets/misc/e-selection-model-array.c +++ b/widgets/misc/e-selection-model-array.c @@ -42,11 +42,11 @@ enum { }; void -e_selection_model_array_confirm_row_count(ESelectionModelArray *esma) +e_selection_model_array_confirm_row_count (ESelectionModelArray *esma) { if (esma->eba == NULL) { - gint row_count = e_selection_model_array_get_row_count(esma); - esma->eba = e_bit_array_new(row_count); + gint row_count = e_selection_model_array_get_row_count (esma); + esma->eba = e_bit_array_new (row_count); esma->selected_row = -1; esma->selected_range_end = -1; } @@ -72,13 +72,13 @@ es_row_sorted_to_model (ESelectionModelArray *esma, gint sorted_row) /* FIXME: Should this deal with moving the selection if it's in single mode? */ void -e_selection_model_array_delete_rows(ESelectionModelArray *esma, gint row, gint count) +e_selection_model_array_delete_rows (ESelectionModelArray *esma, gint row, gint count) { if (esma->eba) { - if (E_SELECTION_MODEL(esma)->mode == GTK_SELECTION_SINGLE) - e_bit_array_delete_single_mode(esma->eba, row, count); + if (E_SELECTION_MODEL (esma)->mode == GTK_SELECTION_SINGLE) + e_bit_array_delete_single_mode (esma->eba, row, count); else - e_bit_array_delete(esma->eba, row, count); + e_bit_array_delete (esma->eba, row, count); if (esma->cursor_row >= row && esma->cursor_row < row + count) { /* we should move the cursor_row, because some lines before us are going to be removed */ @@ -116,34 +116,34 @@ e_selection_model_array_delete_rows(ESelectionModelArray *esma, gint row, gint c esma->selected_row = -1; esma->selected_range_end = -1; - e_selection_model_selection_changed(E_SELECTION_MODEL(esma)); - e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), esma->cursor_row, esma->cursor_col); + e_selection_model_selection_changed (E_SELECTION_MODEL (esma)); + e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), esma->cursor_row, esma->cursor_col); } } void -e_selection_model_array_insert_rows(ESelectionModelArray *esma, gint row, gint count) +e_selection_model_array_insert_rows (ESelectionModelArray *esma, gint row, gint count) { if (esma->eba) { - e_bit_array_insert(esma->eba, row, count); + e_bit_array_insert (esma->eba, row, count); /* just recalculate new position of the previously set cursor row */ esma->cursor_row = es_row_sorted_to_model (esma, esma->cursor_row_sorted); esma->selected_row = -1; esma->selected_range_end = -1; - e_selection_model_selection_changed(E_SELECTION_MODEL(esma)); - e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), esma->cursor_row, esma->cursor_col); + e_selection_model_selection_changed (E_SELECTION_MODEL (esma)); + e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), esma->cursor_row, esma->cursor_col); } } void -e_selection_model_array_move_row(ESelectionModelArray *esma, gint old_row, gint new_row) +e_selection_model_array_move_row (ESelectionModelArray *esma, gint old_row, gint new_row) { - ESelectionModel *esm = E_SELECTION_MODEL(esma); + ESelectionModel *esm = E_SELECTION_MODEL (esma); if (esma->eba) { - gboolean selected = e_bit_array_value_at(esma->eba, old_row); + gboolean selected = e_bit_array_value_at (esma->eba, old_row); gboolean cursor = (esma->cursor_row == old_row); gint old_row_sorted, new_row_sorted; @@ -155,13 +155,13 @@ e_selection_model_array_move_row(ESelectionModelArray *esma, gint old_row, gint else if (new_row_sorted < esma->cursor_row_sorted && esma->cursor_row_sorted < old_row_sorted) esma->cursor_row_sorted++; - e_bit_array_move_row(esma->eba, old_row, new_row); + e_bit_array_move_row (esma->eba, old_row, new_row); if (selected) { if (esm->mode == GTK_SELECTION_SINGLE) e_bit_array_select_single_row (esma->eba, new_row); else - e_bit_array_change_one_row(esma->eba, new_row, TRUE); + e_bit_array_change_one_row (esma->eba, new_row, TRUE); } if (cursor) { esma->cursor_row = new_row; @@ -171,8 +171,8 @@ e_selection_model_array_move_row(ESelectionModelArray *esma, gint old_row, gint esma->selected_row = -1; esma->selected_range_end = -1; - e_selection_model_selection_changed(esm); - e_selection_model_cursor_changed(esm, esma->cursor_row, esma->cursor_col); + e_selection_model_selection_changed (esm); + e_selection_model_cursor_changed (esm, esma->cursor_row, esma->cursor_col); } } @@ -216,11 +216,11 @@ esma_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp switch (prop_id) { case PROP_CURSOR_ROW: - e_selection_model_do_something(esm, g_value_get_int (value), esma->cursor_col, 0); + e_selection_model_do_something (esm, g_value_get_int (value), esma->cursor_col, 0); break; case PROP_CURSOR_COL: - e_selection_model_do_something(esm, esma->cursor_row, g_value_get_int(value), 0); + e_selection_model_do_something (esm, esma->cursor_row, g_value_get_int (value), 0); break; } } @@ -238,9 +238,9 @@ static gboolean esma_is_row_selected (ESelectionModel *selection, gint n) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); if (esma->eba) - return e_bit_array_value_at(esma->eba, n); + return e_bit_array_value_at (esma->eba, n); else return FALSE; } @@ -259,9 +259,9 @@ esma_foreach (ESelectionModel *selection, EForeachFunc callback, gpointer closure) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); if (esma->eba) - e_bit_array_foreach(esma->eba, callback, closure); + e_bit_array_foreach (esma->eba, callback, closure); } /** @@ -271,11 +271,11 @@ esma_foreach (ESelectionModel *selection, * This routine clears the selection to no rows selected. */ static void -esma_clear(ESelectionModel *selection) +esma_clear (ESelectionModel *selection) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); if (esma->eba) { - g_object_unref(esma->eba); + g_object_unref (esma->eba); esma->eba = NULL; } esma->cursor_row = -1; @@ -283,8 +283,8 @@ esma_clear(ESelectionModel *selection) esma->cursor_row_sorted = -1; esma->selected_row = -1; esma->selected_range_end = -1; - e_selection_model_selection_changed(E_SELECTION_MODEL(esma)); - e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), -1, -1); + e_selection_model_selection_changed (E_SELECTION_MODEL (esma)); + e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), -1, -1); } #define PART(x,n) (((x) & (0x01010101 << n)) >> n) @@ -301,9 +301,9 @@ esma_clear(ESelectionModel *selection) static gint esma_selected_count (ESelectionModel *selection) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); if (esma->eba) - return e_bit_array_selected_count(esma->eba); + return e_bit_array_selected_count (esma->eba); else return 0; } @@ -318,11 +318,11 @@ esma_selected_count (ESelectionModel *selection) static void esma_select_all (ESelectionModel *selection) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); - e_selection_model_array_confirm_row_count(esma); + e_selection_model_array_confirm_row_count (esma); - e_bit_array_select_all(esma->eba); + e_bit_array_select_all (esma->eba); esma->cursor_col = 0; esma->cursor_row_sorted = 0; @@ -330,8 +330,8 @@ esma_select_all (ESelectionModel *selection) esma->selection_start_row = esma->cursor_row; esma->selected_row = -1; esma->selected_range_end = -1; - e_selection_model_selection_changed(E_SELECTION_MODEL(esma)); - e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), 0, 0); + e_selection_model_selection_changed (E_SELECTION_MODEL (esma)); + e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), 0, 0); } /** @@ -344,11 +344,11 @@ esma_select_all (ESelectionModel *selection) static void esma_invert_selection (ESelectionModel *selection) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); - e_selection_model_array_confirm_row_count(esma); + e_selection_model_array_confirm_row_count (esma); - e_bit_array_invert_selection(esma->eba); + e_bit_array_invert_selection (esma->eba); esma->cursor_col = -1; esma->cursor_row = -1; @@ -356,24 +356,24 @@ esma_invert_selection (ESelectionModel *selection) esma->selection_start_row = 0; esma->selected_row = -1; esma->selected_range_end = -1; - e_selection_model_selection_changed(E_SELECTION_MODEL(esma)); - e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), -1, -1); + e_selection_model_selection_changed (E_SELECTION_MODEL (esma)); + e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), -1, -1); } static gint esma_row_count (ESelectionModel *selection) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); - e_selection_model_array_confirm_row_count(esma); - return e_bit_array_bit_count(esma->eba); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); + e_selection_model_array_confirm_row_count (esma); + return e_bit_array_bit_count (esma->eba); } static void -esma_change_one_row(ESelectionModel *selection, gint row, gboolean grow) +esma_change_one_row (ESelectionModel *selection, gint row, gboolean grow) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); - e_selection_model_array_confirm_row_count(esma); - e_bit_array_change_one_row(esma->eba, row, grow); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); + e_selection_model_array_confirm_row_count (esma); + e_bit_array_change_one_row (esma->eba, row, grow); } static void @@ -381,10 +381,10 @@ esma_change_cursor (ESelectionModel *selection, gint row, gint col) { ESelectionModelArray *esma; - g_return_if_fail(selection != NULL); - g_return_if_fail(E_IS_SELECTION_MODEL(selection)); + g_return_if_fail (selection != NULL); + g_return_if_fail (E_IS_SELECTION_MODEL (selection)); - esma = E_SELECTION_MODEL_ARRAY(selection); + esma = E_SELECTION_MODEL_ARRAY (selection); esma->cursor_row = row; esma->cursor_col = col; @@ -392,18 +392,18 @@ esma_change_cursor (ESelectionModel *selection, gint row, gint col) } static void -esma_change_range(ESelectionModel *selection, gint start, gint end, gboolean grow) +esma_change_range (ESelectionModel *selection, gint start, gint end, gboolean grow) { gint i; - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); if (start != end) { - if (selection->sorter && e_sorter_needs_sorting(selection->sorter)) { + if (selection->sorter && e_sorter_needs_sorting (selection->sorter)) { for ( i = start; i < end; i++) { - e_bit_array_change_one_row(esma->eba, e_sorter_sorted_to_model(selection->sorter, i), grow); + e_bit_array_change_one_row (esma->eba, e_sorter_sorted_to_model (selection->sorter, i), grow); } } else { - e_selection_model_array_confirm_row_count(esma); - e_bit_array_change_range(esma->eba, start, end, grow); + e_selection_model_array_confirm_row_count (esma); + e_bit_array_change_range (esma->eba, start, end, grow); } } } @@ -411,25 +411,25 @@ esma_change_range(ESelectionModel *selection, gint start, gint end, gboolean gro static gint esma_cursor_row (ESelectionModel *selection) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); return esma->cursor_row; } static gint esma_cursor_col (ESelectionModel *selection) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); return esma->cursor_col; } static void esma_real_select_single_row (ESelectionModel *selection, gint row) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); - e_selection_model_array_confirm_row_count(esma); + e_selection_model_array_confirm_row_count (esma); - e_bit_array_select_single_row(esma->eba, row); + e_bit_array_select_single_row (esma->eba, row); esma->selection_start_row = row; esma->selected_row = row; @@ -439,51 +439,51 @@ esma_real_select_single_row (ESelectionModel *selection, gint row) static void esma_select_single_row (ESelectionModel *selection, gint row) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); gint selected_row = esma->selected_row; esma_real_select_single_row (selection, row); if (selected_row != -1 && esma->eba && selected_row < e_bit_array_bit_count (esma->eba)) { if (selected_row != row) { - e_selection_model_selection_row_changed(selection, selected_row); - e_selection_model_selection_row_changed(selection, row); + e_selection_model_selection_row_changed (selection, selected_row); + e_selection_model_selection_row_changed (selection, row); } } else { - e_selection_model_selection_changed(selection); + e_selection_model_selection_changed (selection); } } static void esma_toggle_single_row (ESelectionModel *selection, gint row) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); - e_selection_model_array_confirm_row_count(esma); - e_bit_array_toggle_single_row(esma->eba, row); + e_selection_model_array_confirm_row_count (esma); + e_bit_array_toggle_single_row (esma->eba, row); esma->selection_start_row = row; esma->selected_row = -1; esma->selected_range_end = -1; - e_selection_model_selection_row_changed(E_SELECTION_MODEL(esma), row); + e_selection_model_selection_row_changed (E_SELECTION_MODEL (esma), row); } static void esma_real_move_selection_end (ESelectionModel *selection, gint row) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); gint old_start; gint old_end; gint new_start; gint new_end; - if (selection->sorter && e_sorter_needs_sorting(selection->sorter)) { - old_start = MIN (e_sorter_model_to_sorted(selection->sorter, esma->selection_start_row), - e_sorter_model_to_sorted(selection->sorter, esma->cursor_row)); - old_end = MAX (e_sorter_model_to_sorted(selection->sorter, esma->selection_start_row), - e_sorter_model_to_sorted(selection->sorter, esma->cursor_row)) + 1; - new_start = MIN (e_sorter_model_to_sorted(selection->sorter, esma->selection_start_row), - e_sorter_model_to_sorted(selection->sorter, row)); - new_end = MAX (e_sorter_model_to_sorted(selection->sorter, esma->selection_start_row), - e_sorter_model_to_sorted(selection->sorter, row)) + 1; + if (selection->sorter && e_sorter_needs_sorting (selection->sorter)) { + old_start = MIN (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row), + e_sorter_model_to_sorted (selection->sorter, esma->cursor_row)); + old_end = MAX (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row), + e_sorter_model_to_sorted (selection->sorter, esma->cursor_row)) + 1; + new_start = MIN (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row), + e_sorter_model_to_sorted (selection->sorter, row)); + new_end = MAX (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row), + e_sorter_model_to_sorted (selection->sorter, row)) + 1; } else { old_start = MIN (esma->selection_start_row, esma->cursor_row); old_end = MAX (esma->selection_start_row, esma->cursor_row) + 1; @@ -492,13 +492,13 @@ esma_real_move_selection_end (ESelectionModel *selection, gint row) } /* This wouldn't work nearly so smoothly if one end of the selection weren't held in place. */ if (old_start < new_start) - esma_change_range(selection, old_start, new_start, FALSE); + esma_change_range (selection, old_start, new_start, FALSE); if (new_start < old_start) - esma_change_range(selection, new_start, old_start, TRUE); + esma_change_range (selection, new_start, old_start, TRUE); if (old_end < new_end) - esma_change_range(selection, old_end, new_end, TRUE); + esma_change_range (selection, old_end, new_end, TRUE); if (new_end < old_end) - esma_change_range(selection, new_end, old_end, FALSE); + esma_change_range (selection, new_end, old_end, FALSE); esma->selected_row = -1; esma->selected_range_end = -1; } @@ -507,40 +507,40 @@ static void esma_move_selection_end (ESelectionModel *selection, gint row) { esma_real_move_selection_end (selection, row); - e_selection_model_selection_changed(selection); + e_selection_model_selection_changed (selection); } static void esma_set_selection_end (ESelectionModel *selection, gint row) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection); gint selected_range_end = esma->selected_range_end; - gint view_row = e_sorter_model_to_sorted(selection->sorter, row); + gint view_row = e_sorter_model_to_sorted (selection->sorter, row); - esma_real_select_single_row(selection, esma->selection_start_row); + esma_real_select_single_row (selection, esma->selection_start_row); esma->cursor_row = esma->selection_start_row; esma->cursor_row_sorted = es_row_model_to_sorted (esma, esma->cursor_row); - esma_real_move_selection_end(selection, row); + esma_real_move_selection_end (selection, row); esma->selected_range_end = view_row; if (selected_range_end != -1 && view_row != -1) { if (selected_range_end == view_row - 1 || selected_range_end == view_row + 1) { - e_selection_model_selection_row_changed(selection, selected_range_end); - e_selection_model_selection_row_changed(selection, view_row); + e_selection_model_selection_row_changed (selection, selected_range_end); + e_selection_model_selection_row_changed (selection, view_row); } } - e_selection_model_selection_changed(selection); + e_selection_model_selection_changed (selection); } gint e_selection_model_array_get_row_count (ESelectionModelArray *esma) { - g_return_val_if_fail(esma != NULL, 0); - g_return_val_if_fail(E_IS_SELECTION_MODEL_ARRAY(esma), 0); + g_return_val_if_fail (esma != NULL, 0); + g_return_val_if_fail (E_IS_SELECTION_MODEL_ARRAY (esma), 0); - if (E_SELECTION_MODEL_ARRAY_GET_CLASS(esma)->get_row_count) - return E_SELECTION_MODEL_ARRAY_GET_CLASS(esma)->get_row_count (esma); + if (E_SELECTION_MODEL_ARRAY_GET_CLASS (esma)->get_row_count) + return E_SELECTION_MODEL_ARRAY_GET_CLASS (esma)->get_row_count (esma); else return 0; } @@ -564,8 +564,8 @@ e_selection_model_array_class_init (ESelectionModelArrayClass *klass) GObjectClass *object_class; ESelectionModelClass *esm_class; - object_class = G_OBJECT_CLASS(klass); - esm_class = E_SELECTION_MODEL_CLASS(klass); + object_class = G_OBJECT_CLASS (klass); + esm_class = E_SELECTION_MODEL_CLASS (klass); object_class->dispose = esma_dispose; object_class->get_property = esma_get_property; diff --git a/widgets/misc/e-selection-model-simple.c b/widgets/misc/e-selection-model-simple.c index 571f4a5baf..829363d400 100644 --- a/widgets/misc/e-selection-model-simple.c +++ b/widgets/misc/e-selection-model-simple.c @@ -46,7 +46,7 @@ e_selection_model_simple_class_init (ESelectionModelSimpleClass *klass) { ESelectionModelArrayClass *esma_class; - esma_class = E_SELECTION_MODEL_ARRAY_CLASS(klass); + esma_class = E_SELECTION_MODEL_ARRAY_CLASS (klass); esma_class->get_row_count = esms_get_row_count; } @@ -69,9 +69,9 @@ e_selection_model_simple_set_row_count (ESelectionModelSimple *esms, gint row_count) { if (esms->row_count != row_count) { - ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(esms); + ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (esms); if (esma->eba) - g_object_unref(esma->eba); + g_object_unref (esma->eba); esma->eba = NULL; esma->selected_row = -1; esma->selected_range_end = -1; @@ -82,7 +82,7 @@ e_selection_model_simple_set_row_count (ESelectionModelSimple *esms, static gint esms_get_row_count (ESelectionModelArray *esma) { - ESelectionModelSimple *esms = E_SELECTION_MODEL_SIMPLE(esma); + ESelectionModelSimple *esms = E_SELECTION_MODEL_SIMPLE (esma); return esms->row_count; } @@ -92,7 +92,7 @@ void e_selection_model_simple_insert_rows (ESelectionModelSimple *e gint count) { esms->row_count += count; - e_selection_model_array_insert_rows (E_SELECTION_MODEL_ARRAY(esms), row, count); + e_selection_model_array_insert_rows (E_SELECTION_MODEL_ARRAY (esms), row, count); } void @@ -101,7 +101,7 @@ e_selection_model_simple_delete_rows (ESelectionModelSimple *esms, gint count) { esms->row_count -= count; - e_selection_model_array_delete_rows (E_SELECTION_MODEL_ARRAY(esms), row, count); + e_selection_model_array_delete_rows (E_SELECTION_MODEL_ARRAY (esms), row, count); } void @@ -109,5 +109,5 @@ e_selection_model_simple_move_row (ESelectionModelSimple *esms, gint old_row, gint new_row) { - e_selection_model_array_move_row (E_SELECTION_MODEL_ARRAY(esms), old_row, new_row); + e_selection_model_array_move_row (E_SELECTION_MODEL_ARRAY (esms), old_row, new_row); } diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c index b18a62423e..f1b2c9bbf1 100644 --- a/widgets/misc/e-selection-model.c +++ b/widgets/misc/e-selection-model.c @@ -52,7 +52,7 @@ enum { }; inline static void -add_sorter(ESelectionModel *esm, ESorter *sorter) +add_sorter (ESelectionModel *esm, ESorter *sorter) { esm->sorter = sorter; if (sorter) { @@ -61,7 +61,7 @@ add_sorter(ESelectionModel *esm, ESorter *sorter) } inline static void -drop_sorter(ESelectionModel *esm) +drop_sorter (ESelectionModel *esm) { if (esm->sorter) { g_object_unref (esm->sorter); @@ -76,7 +76,7 @@ esm_dispose (GObject *object) esm = E_SELECTION_MODEL (object); - drop_sorter(esm); + drop_sorter (esm); /* Chain up to parent's dispose() method. */ G_OBJECT_CLASS (e_selection_model_parent_class)->dispose (object); @@ -115,7 +115,7 @@ esm_set_property (GObject *object, switch (property_id) { case PROP_SORTER: - drop_sorter(esm); + drop_sorter (esm); add_sorter ( esm, g_value_get_object (value) ? E_SORTER (g_value_get_object (value)) : NULL); @@ -124,9 +124,9 @@ esm_set_property (GObject *object, case PROP_SELECTION_MODE: esm->mode = g_value_get_int (value); if (esm->mode == GTK_SELECTION_SINGLE) { - gint cursor_row = e_selection_model_cursor_row(esm); - gint cursor_col = e_selection_model_cursor_col(esm); - e_selection_model_do_something(esm, cursor_row, cursor_col, 0); + gint cursor_row = e_selection_model_cursor_row (esm); + gint cursor_col = e_selection_model_cursor_col (esm); + e_selection_model_do_something (esm, cursor_row, cursor_col, 0); } break; @@ -149,7 +149,7 @@ e_selection_model_class_init (ESelectionModelClass *class) { GObjectClass *object_class; - object_class = G_OBJECT_CLASS(class); + object_class = G_OBJECT_CLASS (class); object_class->dispose = esm_dispose; object_class->get_property = esm_get_property; object_class->set_property = esm_set_property; @@ -512,7 +512,7 @@ e_selection_model_do_something (ESelectionModel *selection, if (col == -1 && row != -1) col = 0; - row_count = e_selection_model_row_count(selection); + row_count = e_selection_model_row_count (selection); if (row_count >= 0 && row < row_count) { switch (selection->mode) { case GTK_SELECTION_SINGLE: @@ -531,14 +531,14 @@ e_selection_model_do_something (ESelectionModel *selection, } break; default: - g_return_if_reached(); + g_return_if_reached (); break; } - e_selection_model_change_cursor(selection, row, col); - g_signal_emit(selection, + e_selection_model_change_cursor (selection, row, col); + g_signal_emit (selection, signals[CURSOR_CHANGED], 0, row, col); - g_signal_emit(selection, + g_signal_emit (selection, signals[CURSOR_ACTIVATED], 0, row, col); } @@ -567,14 +567,14 @@ e_selection_model_maybe_do_something (ESelectionModel *selection, selection->old_selection = -1; - if (e_selection_model_is_row_selected(selection, row)) { - e_selection_model_change_cursor(selection, row, col); - g_signal_emit(selection, + if (e_selection_model_is_row_selected (selection, row)) { + e_selection_model_change_cursor (selection, row, col); + g_signal_emit (selection, signals[CURSOR_CHANGED], 0, row, col); return FALSE; } else { - e_selection_model_do_something(selection, row, col, state); + e_selection_model_do_something (selection, row, col, state); return TRUE; } } @@ -641,16 +641,16 @@ e_selection_model_select_as_key_press (ESelectionModel *selection, e_selection_model_select_single_row (selection, row); break; default: - g_return_if_reached(); + g_return_if_reached (); break; } if (row != -1) { - e_selection_model_change_cursor(selection, row, col); - g_signal_emit(selection, + e_selection_model_change_cursor (selection, row, col); + g_signal_emit (selection, signals[CURSOR_CHANGED], 0, row, col); if (cursor_activated) - g_signal_emit(selection, + g_signal_emit (selection, signals[CURSOR_ACTIVATED], 0, row, col); } @@ -661,8 +661,8 @@ move_selection (ESelectionModel *selection, gboolean up, GdkModifierType state) { - gint row = e_selection_model_cursor_row(selection); - gint col = e_selection_model_cursor_col(selection); + gint row = e_selection_model_cursor_row (selection); + gint col = e_selection_model_cursor_col (selection); gint row_count; /* there is no selected row when row is -1 */ @@ -675,10 +675,10 @@ move_selection (ESelectionModel *selection, row++; if (row < 0) row = 0; - row_count = e_selection_model_row_count(selection); + row_count = e_selection_model_row_count (selection); if (row >= row_count) row = row_count - 1; - row = e_sorter_sorted_to_model(selection->sorter, row); + row = e_sorter_sorted_to_model (selection->sorter, row); e_selection_model_select_as_key_press (selection, row, col, state); return TRUE; @@ -706,20 +706,20 @@ e_selection_model_key_press (ESelectionModel *selection, switch (key->keyval) { case GDK_Up: case GDK_KP_Up: - return move_selection(selection, TRUE, key->state); + return move_selection (selection, TRUE, key->state); case GDK_Down: case GDK_KP_Down: - return move_selection(selection, FALSE, key->state); + return move_selection (selection, FALSE, key->state); case GDK_space: case GDK_KP_Space: if (selection->mode != GTK_SELECTION_SINGLE) { - gint row = e_selection_model_cursor_row(selection); - gint col = e_selection_model_cursor_col(selection); + gint row = e_selection_model_cursor_row (selection); + gint col = e_selection_model_cursor_col (selection); if (row == -1) break; e_selection_model_toggle_single_row (selection, row); - g_signal_emit(selection, + g_signal_emit (selection, signals[CURSOR_ACTIVATED], 0, row, col); return TRUE; @@ -728,10 +728,10 @@ e_selection_model_key_press (ESelectionModel *selection, case GDK_Return: case GDK_KP_Enter: if (selection->mode != GTK_SELECTION_SINGLE) { - gint row = e_selection_model_cursor_row(selection); - gint col = e_selection_model_cursor_col(selection); + gint row = e_selection_model_cursor_row (selection); + gint col = e_selection_model_cursor_col (selection); e_selection_model_select_single_row (selection, row); - g_signal_emit(selection, + g_signal_emit (selection, signals[CURSOR_ACTIVATED], 0, row, col); return TRUE; @@ -741,9 +741,9 @@ e_selection_model_key_press (ESelectionModel *selection, case GDK_KP_Home: if (selection->cursor_mode == E_CURSOR_LINE) { gint row = 0; - gint cursor_col = e_selection_model_cursor_col(selection); + gint cursor_col = e_selection_model_cursor_col (selection); - row = e_sorter_sorted_to_model(selection->sorter, row); + row = e_sorter_sorted_to_model (selection->sorter, row); e_selection_model_select_as_key_press (selection, row, cursor_col, key->state); return TRUE; } @@ -751,10 +751,10 @@ e_selection_model_key_press (ESelectionModel *selection, case GDK_End: case GDK_KP_End: if (selection->cursor_mode == E_CURSOR_LINE) { - gint row = e_selection_model_row_count(selection) - 1; - gint cursor_col = e_selection_model_cursor_col(selection); + gint row = e_selection_model_row_count (selection) - 1; + gint cursor_col = e_selection_model_cursor_col (selection); - row = e_sorter_sorted_to_model(selection->sorter, row); + row = e_sorter_sorted_to_model (selection->sorter, row); e_selection_model_select_as_key_press (selection, row, cursor_col, key->state); return TRUE; } diff --git a/widgets/misc/e-selection-model.h b/widgets/misc/e-selection-model.h index a96b6e8be6..355734b6a5 100644 --- a/widgets/misc/e-selection-model.h +++ b/widgets/misc/e-selection-model.h @@ -136,7 +136,8 @@ void e_selection_model_right_click_down guint row, guint col, GdkModifierType state); -void e_selection_model_right_click_up(ESelectionModel *selection); +void e_selection_model_right_click_up + (ESelectionModel *selection); gboolean e_selection_model_key_press (ESelectionModel *esm, GdkEventKey *key); void e_selection_model_select_as_key_press @@ -153,14 +154,16 @@ void e_selection_model_foreach (ESelectionModel *esm, EForeachFunc callback, gpointer closure); void e_selection_model_clear (ESelectionModel *esm); -gint e_selection_model_selected_count(ESelectionModel *esm); +gint e_selection_model_selected_count + (ESelectionModel *esm); void e_selection_model_select_all (ESelectionModel *esm); void e_selection_model_invert_selection (ESelectionModel *esm); gint e_selection_model_row_count (ESelectionModel *esm); /* Private virtual Functions */ -void e_selection_model_change_one_row(ESelectionModel *esm, +void e_selection_model_change_one_row + (ESelectionModel *esm, gint row, gboolean on); void e_selection_model_change_cursor (ESelectionModel *esm, @@ -182,7 +185,8 @@ void e_selection_model_set_selection_end gint row); /* Signals */ -void e_selection_model_cursor_changed(ESelectionModel *selection, +void e_selection_model_cursor_changed + (ESelectionModel *selection, gint row, gint col); void e_selection_model_cursor_activated diff --git a/widgets/misc/e-send-options.c b/widgets/misc/e-send-options.c index b7793be997..48eda2dced 100644 --- a/widgets/misc/e-send-options.c +++ b/widgets/misc/e-send-options.c @@ -135,7 +135,7 @@ e_send_options_get_widgets_data (ESendOptionsDialog *sod) gopts->delay_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->delay_delivery)); if (e_date_edit_date_is_valid (E_DATE_EDIT (priv->delay_until)) && - e_date_edit_time_is_valid (E_DATE_EDIT(priv->delay_until))) + e_date_edit_time_is_valid (E_DATE_EDIT (priv->delay_until))) gopts->delay_until = e_date_edit_get_time (E_DATE_EDIT (priv->delay_until)); sopts->tracking_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->create_sent)); @@ -608,7 +608,7 @@ e_send_options_dialog_run (ESendOptionsDialog *sod, GtkWidget *parent, Item_type priv->builder = gtk_builder_new (); e_load_ui_builder_definition (priv->builder, "e-send-options.ui"); - if (!get_widgets(sod)) { + if (!get_widgets (sod)) { g_object_unref (priv->builder); g_message (G_STRLOC ": Could not get the Widgets \n"); return FALSE; diff --git a/widgets/misc/e-web-view-preview.c b/widgets/misc/e-web-view-preview.c index ea5cee0241..c21fee95db 100644 --- a/widgets/misc/e-web-view-preview.c +++ b/widgets/misc/e-web-view-preview.c @@ -245,7 +245,7 @@ e_web_view_preview_show_tree_view (EWebViewPreview *preview) } void -e_web_view_preview_hide_tree_view(EWebViewPreview *preview) +e_web_view_preview_hide_tree_view (EWebViewPreview *preview) { g_return_if_fail (preview != NULL); g_return_if_fail (E_IS_WEB_VIEW_PREVIEW (preview)); diff --git a/widgets/misc/e-web-view-preview.h b/widgets/misc/e-web-view-preview.h index ae7569034c..07c78ff182 100644 --- a/widgets/misc/e-web-view-preview.h +++ b/widgets/misc/e-web-view-preview.h @@ -75,26 +75,36 @@ struct _EWebViewPreviewClass { GType e_web_view_preview_get_type (void); GtkWidget * e_web_view_preview_new (void); - -GtkTreeView * e_web_view_preview_get_tree_view(EWebViewPreview *preview); +GtkTreeView * e_web_view_preview_get_tree_view + (EWebViewPreview *preview); GtkWidget * e_web_view_preview_get_preview (EWebViewPreview *preview); -void e_web_view_preview_set_preview (EWebViewPreview *preview, GtkWidget *preview_widget); - -void e_web_view_preview_show_tree_view(EWebViewPreview *preview); -void e_web_view_preview_hide_tree_view(EWebViewPreview *preview); - -void e_web_view_preview_set_escape_values(EWebViewPreview *preview, gboolean escape); -gboolean e_web_view_preview_get_escape_values(EWebViewPreview *preview); - +void e_web_view_preview_set_preview (EWebViewPreview *preview, + GtkWidget *preview_widget); +void e_web_view_preview_show_tree_view + (EWebViewPreview *preview); +void e_web_view_preview_hide_tree_view + (EWebViewPreview *preview); +void e_web_view_preview_set_escape_values + (EWebViewPreview *preview, + gboolean escape); +gboolean e_web_view_preview_get_escape_values + (EWebViewPreview *preview); void e_web_view_preview_begin_update (EWebViewPreview *preview); void e_web_view_preview_end_update (EWebViewPreview *preview); - -void e_web_view_preview_add_header (EWebViewPreview *preview, gint index, const gchar *header); -void e_web_view_preview_add_text (EWebViewPreview *preview, const gchar *text); -void e_web_view_preview_add_raw_html (EWebViewPreview *preview, const gchar *raw_html); -void e_web_view_preview_add_separator(EWebViewPreview *preview); -void e_web_view_preview_add_empty_line(EWebViewPreview *preview); -void e_web_view_preview_add_section (EWebViewPreview *preview, const gchar *section, const gchar *value); +void e_web_view_preview_add_header (EWebViewPreview *preview, + gint index, + const gchar *header); +void e_web_view_preview_add_text (EWebViewPreview *preview, + const gchar *text); +void e_web_view_preview_add_raw_html (EWebViewPreview *preview, + const gchar *raw_html); +void e_web_view_preview_add_separator + (EWebViewPreview *preview); +void e_web_view_preview_add_empty_line + (EWebViewPreview *preview); +void e_web_view_preview_add_section (EWebViewPreview *preview, + const gchar *section, + const gchar *value); G_END_DECLS diff --git a/widgets/misc/e-web-view.h b/widgets/misc/e-web-view.h index 56477ef257..f7ffefe935 100644 --- a/widgets/misc/e-web-view.h +++ b/widgets/misc/e-web-view.h @@ -128,7 +128,8 @@ void e_web_view_set_selected_uri (EWebView *web_view, GtkAction * e_web_view_get_open_proxy (EWebView *web_view); void e_web_view_set_open_proxy (EWebView *web_view, GtkAction *open_proxy); -GtkTargetList * e_web_view_get_paste_target_list(EWebView *web_view); +GtkTargetList * e_web_view_get_paste_target_list + (EWebView *web_view); GtkAction * e_web_view_get_print_proxy (EWebView *web_view); void e_web_view_set_print_proxy (EWebView *web_view, GtkAction *print_proxy); diff --git a/widgets/misc/ea-calendar-cell.c b/widgets/misc/ea-calendar-cell.c index 8728f49a46..ecd7179e0e 100644 --- a/widgets/misc/ea-calendar-cell.c +++ b/widgets/misc/ea-calendar-cell.c @@ -216,7 +216,7 @@ ea_calendar_cell_get_name (AtkObject *accessible) g_return_val_if_fail (EA_IS_CALENDAR_CELL (accessible), NULL); - g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible)); + g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible)); if (!g_obj) /* defunct object*/ return NULL; @@ -258,7 +258,7 @@ ea_calendar_cell_get_parent (AtkObject *accessible) g_return_val_if_fail (EA_IS_CALENDAR_CELL (accessible), NULL); - g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible)); + g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible)); if (!g_obj) /* defunct object*/ return NULL; @@ -277,7 +277,7 @@ ea_calendar_cell_get_index_in_parent (AtkObject *accessible) g_return_val_if_fail (EA_IS_CALENDAR_CELL (accessible), -1); - g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible)); + g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible)); if (!g_obj) return -1; cell = E_CALENDAR_CELL (g_obj); @@ -293,7 +293,7 @@ ea_calendar_cell_ref_state_set (AtkObject *accessible) g_return_val_if_fail (atk_cell->state_set, NULL); - g_object_ref(atk_cell->state_set); + g_object_ref (atk_cell->state_set); return atk_cell->state_set; @@ -328,7 +328,7 @@ component_interface_get_extents (AtkComponent *component, g_return_if_fail (EA_IS_CALENDAR_CELL (component)); - g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component)); + g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component)); if (!g_obj) /* defunct object*/ return; @@ -368,7 +368,7 @@ component_interface_grab_focus (AtkComponent *component) a11y = EA_CALENDAR_CELL (component); ea_calitem = ea_calendar_cell_get_parent (ATK_OBJECT (a11y)); - g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(ea_calitem)); + g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (ea_calitem)); calitem = E_CALENDAR_ITEM (g_obj); index = atk_object_get_index_in_parent (ATK_OBJECT (a11y)); diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c index 0946775e2d..cde4e78494 100644 --- a/widgets/misc/ea-calendar-item.c +++ b/widgets/misc/ea-calendar-item.c @@ -278,7 +278,7 @@ ea_calendar_item_get_name (AtkObject *accessible) g_return_val_if_fail (EA_IS_CALENDAR_ITEM (accessible), NULL); - g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible)); + g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible)); if (!g_obj) return NULL; g_return_val_if_fail (E_IS_CALENDAR_ITEM (g_obj), NULL); @@ -354,7 +354,7 @@ ea_calendar_item_ref_state_set (AtkObject *accessible) GObject *g_obj; state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (accessible); - g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible)); + g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible)); if (!g_obj) return state_set; @@ -440,7 +440,7 @@ ea_calendar_item_ref_child (AtkObject *accessible, gint index) g_print ("AccDebug: ea_calendar_item children[%d]=%p\n", index, (gpointer)cell); #endif - return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT(cell))); + return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT (cell))); } /* atk table interface */ @@ -1057,15 +1057,15 @@ ea_calendar_item_get_cell_data (EaCalendarItem *ea_calitem) if (!g_obj) return NULL; - cell_data = g_object_get_data (G_OBJECT(ea_calitem), + cell_data = g_object_get_data (G_OBJECT (ea_calitem), "ea-calendar-cell-table"); if (!cell_data) { - gint n_cells = ea_calendar_item_get_n_children (ATK_OBJECT(ea_calitem)); + gint n_cells = ea_calendar_item_get_n_children (ATK_OBJECT (ea_calitem)); cell_data = ea_cell_table_create (n_cells/EA_CALENDAR_COLUMN_NUM, EA_CALENDAR_COLUMN_NUM, FALSE); - g_object_set_data (G_OBJECT(ea_calitem), + g_object_set_data (G_OBJECT (ea_calitem), "ea-calendar-cell-table", cell_data); } return cell_data; @@ -1078,10 +1078,10 @@ ea_calendar_item_destory_cell_data (EaCalendarItem *ea_calitem) g_return_if_fail (ea_calitem); - cell_data = g_object_get_data (G_OBJECT(ea_calitem), + cell_data = g_object_get_data (G_OBJECT (ea_calitem), "ea-calendar-cell-table"); if (cell_data) { - g_object_set_data (G_OBJECT(ea_calitem), + g_object_set_data (G_OBJECT (ea_calitem), "ea-calendar-cell-table", NULL); ea_cell_table_destroy (cell_data); } diff --git a/widgets/misc/ea-cell-table.c b/widgets/misc/ea-cell-table.c index 95ae59dea4..be859943fd 100644 --- a/widgets/misc/ea-cell-table.c +++ b/widgets/misc/ea-cell-table.c @@ -44,7 +44,7 @@ ea_cell_table_create (gint rows, gint columns, gboolean column_first) for (index = rows -1; index >= 0; --index) cell_data->row_labels [index] = NULL; - cell_data->cells = g_new0(gpointer, (columns * rows)); + cell_data->cells = g_new0 (gpointer, (columns * rows)); for (index = (columns * rows) -1; index >= 0; --index) cell_data->cells [index] = NULL; return cell_data; @@ -102,7 +102,7 @@ ea_cell_table_set_cell (EaCellTable * cell_data, if (index == -1) return FALSE; - if (cell && G_IS_OBJECT(cell)) + if (cell && G_IS_OBJECT (cell)) g_object_ref (cell); if (cell_data->cells[index] && G_IS_OBJECT (cell_data->cells[index])) @@ -132,7 +132,7 @@ ea_cell_table_set_cell_at_index (EaCellTable * cell_data, if (index < 0 || index >=cell_data->columns * cell_data->rows) return FALSE; - if (cell && G_IS_OBJECT(cell)) + if (cell && G_IS_OBJECT (cell)) g_object_ref (cell); if (cell_data->cells[index] && G_IS_OBJECT (cell_data->cells[index])) @@ -161,7 +161,7 @@ ea_cell_table_set_column_label (EaCellTable * cell_data, if (cell_data->column_labels[column]) g_free (cell_data->column_labels[column]); - cell_data->column_labels[column] = g_strdup(label); + cell_data->column_labels[column] = g_strdup (label); } G_CONST_RETURN gchar * @@ -183,7 +183,7 @@ ea_cell_table_set_row_label (EaCellTable * cell_data, if (cell_data->row_labels[row]) g_free (cell_data->row_labels[row]); - cell_data->row_labels[row] = g_strdup(label); + cell_data->row_labels[row] = g_strdup (label); } gint diff --git a/widgets/misc/test-preferences-window.c b/widgets/misc/test-preferences-window.c index e35895f118..e7c4499d6a 100644 --- a/widgets/misc/test-preferences-window.c +++ b/widgets/misc/test-preferences-window.c @@ -89,7 +89,7 @@ main (gint argc, gchar **argv) window = e_preferences_window_new (NULL); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); - g_signal_connect( + g_signal_connect ( window, "delete-event", G_CALLBACK (delete_event_callback), NULL); |