aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/gui/widgets/ea-minicard.c48
-rw-r--r--calendar/gui/cal-editor-utils.c5
-rw-r--r--calendar/gui/calendar-view-factory.c14
-rw-r--r--calendar/gui/dialogs/cancel-comp.c5
-rw-r--r--calendar/gui/e-week-view-event-item.c73
-rw-r--r--calendar/gui/e-week-view-layout.c22
-rw-r--r--calendar/gui/ea-cal-view-event.c49
-rw-r--r--calendar/gui/ea-day-view-main-item.c11
-rw-r--r--calendar/gui/ea-week-view-main-item.c200
-rw-r--r--calendar/gui/print.c131
-rw-r--r--e-util/e-bit-array.c12
-rw-r--r--e-util/e-plugin.h71
-rw-r--r--e-util/e-signature-list.c30
-rw-r--r--e-util/e-sorter-array.c10
-rw-r--r--mail/em-folder-tree.h3
-rw-r--r--mail/em-vfolder-context.c53
-rw-r--r--mail/em-vfolder-editor.c4
-rw-r--r--mail/mail-mt.c53
-rw-r--r--modules/plugin-lib/e-plugin-lib.c55
-rw-r--r--modules/plugin-lib/e-plugin-lib.h2
-rw-r--r--modules/plugin-mono/e-plugin-mono.c7
-rw-r--r--plugins/google-account-setup/google-contacts-source.c481
-rw-r--r--plugins/groupwise-features/junk-mail-settings.c4
-rw-r--r--plugins/groupwise-features/mail-send-options.c8
-rw-r--r--plugins/groupwise-features/status-track.c11
-rw-r--r--plugins/image-inline/image-inline.c13
-rw-r--r--plugins/save-calendar/csv-format.c26
-rw-r--r--shell/es-event.h25
-rw-r--r--widgets/menus/gal-view-factory-etable.c3
-rw-r--r--widgets/misc/e-canvas.c39
-rw-r--r--widgets/misc/e-map.c20
-rw-r--r--widgets/misc/e-map.h30
-rw-r--r--widgets/table/e-cell-date.c4
-rw-r--r--widgets/table/e-table-group.c37
-rw-r--r--widgets/table/e-table-header-item.c164
-rw-r--r--widgets/table/e-table-memory.c10
-rw-r--r--widgets/table/e-table-without.c15
-rw-r--r--widgets/table/gal-a11y-e-cell-vbox.c8
-rw-r--r--widgets/table/gal-a11y-e-table-column-header.c12
39 files changed, 1096 insertions, 672 deletions
diff --git a/addressbook/gui/widgets/ea-minicard.c b/addressbook/gui/widgets/ea-minicard.c
index 7b68bb76cf..19ee25b9e5 100644
--- a/addressbook/gui/widgets/ea-minicard.c
+++ b/addressbook/gui/widgets/ea-minicard.c
@@ -31,21 +31,33 @@ static const gchar * action_name[] = {
N_("Open")
};
-static G_CONST_RETURN gchar * ea_minicard_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar * ea_minicard_get_description (AtkObject *accessible);
+static G_CONST_RETURN gchar *
+ ea_minicard_get_name (AtkObject *accessible);
+static G_CONST_RETURN gchar *
+ ea_minicard_get_description (AtkObject *accessible);
-static void ea_minicard_class_init (EaMinicardClass *klass);
+static void ea_minicard_class_init (EaMinicardClass *klass);
-static gint ea_minicard_get_n_children (AtkObject *obj);
-static AtkObject* ea_minicard_ref_child(AtkObject *obj, gint i);
+static gint ea_minicard_get_n_children (AtkObject *obj);
+static AtkObject *
+ ea_minicard_ref_child (AtkObject *obj,
+ gint i);
-static AtkStateSet *ea_minicard_ref_state_set (AtkObject *obj);
+static AtkStateSet *
+ ea_minicard_ref_state_set (AtkObject *obj);
-static void atk_action_interface_init (AtkActionIface *iface);
-static gboolean atk_action_interface_do_action (AtkAction *iface, gint i);
-static gint atk_action_interface_get_n_action (AtkAction *iface);
-static G_CONST_RETURN gchar * atk_action_interface_get_description (AtkAction *iface, gint i);
-static G_CONST_RETURN gchar * atk_action_interface_get_name (AtkAction *iface, gint i);
+static void atk_action_interface_init (AtkActionIface *iface);
+static gboolean atk_action_interface_do_action (AtkAction *iface,
+ gint i);
+static gint atk_action_interface_get_n_action
+ (AtkAction *iface);
+static G_CONST_RETURN gchar *
+ atk_action_interface_get_description
+ (AtkAction *iface,
+ gint i);
+static G_CONST_RETURN gchar *
+ atk_action_interface_get_name (AtkAction *iface,
+ gint i);
static gpointer parent_class = NULL;
@@ -168,7 +180,7 @@ ea_minicard_get_description (AtkObject *accessible)
return _("evolution minicard");
}
-AtkObject*
+AtkObject *
ea_minicard_new (GObject *obj)
{
GObject *object;
@@ -185,7 +197,8 @@ ea_minicard_new (GObject *obj)
return accessible;
}
-static AtkStateSet *ea_minicard_ref_state_set (AtkObject *obj)
+static AtkStateSet *
+ea_minicard_ref_state_set (AtkObject *obj)
{
AtkStateSet *state_set = NULL;
GObject *gobj = NULL;
@@ -218,7 +231,8 @@ ea_minicard_ref_child (AtkObject *accessible, gint index)
return NULL;
}
-static void atk_action_interface_init (AtkActionIface *iface)
+static void
+atk_action_interface_init (AtkActionIface *iface)
{
g_return_if_fail (iface != NULL);
@@ -228,7 +242,8 @@ static void atk_action_interface_init (AtkActionIface *iface)
iface->get_name = atk_action_interface_get_name;
}
-static gboolean atk_action_interface_do_action (AtkAction *iface, gint i)
+static gboolean
+atk_action_interface_do_action (AtkAction *iface, gint i)
{
EMinicard *minicard = NULL;
@@ -253,7 +268,8 @@ static gboolean atk_action_interface_do_action (AtkAction *iface, gint i)
return TRUE;
}
-static gint atk_action_interface_get_n_action (AtkAction *iface)
+static gint
+atk_action_interface_get_n_action (AtkAction *iface)
{
return G_N_ELEMENTS (action_name);
}
diff --git a/calendar/gui/cal-editor-utils.c b/calendar/gui/cal-editor-utils.c
index 4258e2ce01..c49e648883 100644
--- a/calendar/gui/cal-editor-utils.c
+++ b/calendar/gui/cal-editor-utils.c
@@ -99,7 +99,10 @@ open_component_editor (EShell *shell,
break;
default:
if (error)
- *error = g_error_new (E_CALENDAR_ERROR, E_CALENDAR_STATUS_INVALID_OBJECT, "%s", _("Invalid object"));
+ *error = g_error_new (
+ E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_INVALID_OBJECT,
+ "%s", _("Invalid object"));
break;
}
diff --git a/calendar/gui/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c
index 34e8344a88..fb48a5559a 100644
--- a/calendar/gui/calendar-view-factory.c
+++ b/calendar/gui/calendar-view-factory.c
@@ -41,11 +41,15 @@ struct _CalendarViewFactoryPrivate {
-static void calendar_view_factory_finalize (GObject *object);
-
-static const gchar *calendar_view_factory_get_title (GalViewFactory *factory);
-static const gchar *calendar_view_factory_get_type_code (GalViewFactory *factory);
-static GalView *calendar_view_factory_new_view (GalViewFactory *factory, const gchar *name);
+static void calendar_view_factory_finalize (GObject *object);
+static const gchar *
+ calendar_view_factory_get_title (GalViewFactory *factory);
+static const gchar *
+ calendar_view_factory_get_type_code
+ (GalViewFactory *factory);
+static GalView *
+ calendar_view_factory_new_view (GalViewFactory *factory,
+ const gchar *name);
G_DEFINE_TYPE (CalendarViewFactory, calendar_view_factory, GAL_VIEW_FACTORY_TYPE)
diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c
index 2c827afacf..fe85119dae 100644
--- a/calendar/gui/dialogs/cancel-comp.c
+++ b/calendar/gui/dialogs/cancel-comp.c
@@ -64,7 +64,10 @@ is_past_event (ECalComponent *comp)
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
-cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean deleting)
+cancel_component_dialog (GtkWindow *parent,
+ ECal *client,
+ ECalComponent *comp,
+ gboolean deleting)
{
ECalComponentVType vtype;
const gchar *id;
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 3054201e34..7971ebb2a8 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -137,8 +137,14 @@ week_view_event_item_double_click (EWeekViewEventItem *event_item,
week_view->events, EWeekViewEvent,
week_view->editing_event_num);
- /* do not call edit of the component, if double clicked on the component, which is not on the server */
- if (editing && event && editing->comp_data == event->comp_data && (!event->comp_data || !is_icalcomp_on_the_server (event->comp_data->icalcomp, event->comp_data->client)))
+ /* Do not call edit of the component, if double clicked
+ * on the component, which is not on the server. */
+ if (editing && event &&
+ editing->comp_data == event->comp_data &&
+ (!event->comp_data ||
+ !is_icalcomp_on_the_server (
+ event->comp_data->icalcomp,
+ event->comp_data->client)))
return TRUE;
}
@@ -371,7 +377,8 @@ week_view_event_item_draw_icons (EWeekViewEventItem *event_item,
event = &g_array_index (week_view->events, EWeekViewEvent,
event_item->priv->event_num);
comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ e_cal_component_set_icalcomponent (
+ comp, icalcomponent_new_clone (event->comp_data->icalcomp));
gc = week_view->main_gc;
cr = gdk_cairo_create (drawable);
@@ -470,9 +477,11 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item,
gint h,
GdkRegion *draw_region)
{
+ ECalModel *model;
EWeekView *week_view;
EWeekViewEvent *event;
GdkPoint points[3];
+ const gchar *color_spec;
gint c1, c2;
cairo_t *cr;
@@ -493,21 +502,34 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item,
points[2].x = x;
points[2].y = y + h - 1;
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)),
- event->comp_data),
- &bg_color)) {
+ model = e_calendar_view_get_model (E_CALENDAR_VIEW (week_view));
+
+ color_spec =
+ e_cal_model_get_color_for_component (model, event->comp_data);
+
+ if (gdk_color_parse (color_spec, &bg_color)) {
GdkColormap *colormap;
colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view));
if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
gdk_cairo_set_source_color (cr, &bg_color);
- }
- else {
- gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
+ } else {
+ EWeekViewColors wvc;
+ GdkColor *color;
- }
+ wvc = E_WEEK_VIEW_COLOR_EVENT_BACKGROUND;
+ color = &week_view->colors[wvc];
+
+ gdk_cairo_set_source_color (cr, color);
+ }
} else {
- gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
+ EWeekViewColors wvc;
+ GdkColor *color;
+
+ wvc = E_WEEK_VIEW_COLOR_EVENT_BACKGROUND;
+ color = &week_view->colors[wvc];
+
+ gdk_cairo_set_source_color (cr, color);
}
cairo_save (cr);
@@ -638,6 +660,7 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
EWeekView *week_view;
EWeekViewEvent *event;
EWeekViewEventSpan *span;
+ ECalModel *model;
GdkGC *gc;
gint x1, y1, x2, y2, time_x, time_y;
gint icon_x, icon_y, time_width, min_end_time_x, max_icon_x;
@@ -656,6 +679,7 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
gdouble cc = 65535.0;
GdkRegion *draw_region;
GdkRectangle rect;
+ const gchar *color_spec;
event_item = E_WEEK_VIEW_EVENT_ITEM (canvas_item);
week_view = E_WEEK_VIEW (GTK_WIDGET (canvas_item->canvas)->parent);
@@ -669,7 +693,9 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
event = &g_array_index (week_view->events, EWeekViewEvent,
event_item->priv->event_num);
- g_return_if_fail (event->spans_index + event_item->priv->span_num < week_view->spans->len);
+ g_return_if_fail (
+ event->spans_index + event_item->priv->span_num <
+ week_view->spans->len);
span = &g_array_index (week_view->spans, EWeekViewEventSpan,
event->spans_index + event_item->priv->span_num);
@@ -715,8 +741,13 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
one_day_event = e_week_view_is_one_day_event (week_view, event_item->priv->event_num);
+ model = e_calendar_view_get_model (E_CALENDAR_VIEW (week_view));
+
+ color_spec =
+ e_cal_model_get_color_for_component (model, event->comp_data);
+
bg_color = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND];
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)), event->comp_data), &bg_color)) {
+ if (gdk_color_parse (color_spec, &bg_color)) {
GdkColormap *colormap;
colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view));
@@ -905,8 +936,14 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
x1 + E_WEEK_VIEW_EVENT_L_PAD + 2,
y1, -3, y2 - y1 + 1, draw_region);
} else if (can_draw_in_region (draw_region, rect_x, y1, 1, y2 - y1)) {
+ EWeekViewColors wvc;
+ GdkColor *color;
+
+ wvc = E_WEEK_VIEW_COLOR_EVENT_BORDER;
+ color = &week_view->colors[wvc];
+
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]);
+ gdk_cairo_set_source_color (cr, color);
cairo_set_line_width (cr, 0.7);
cairo_move_to (cr, rect_x, y1);
cairo_line_to (cr, rect_x, y2);
@@ -920,8 +957,14 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
x2 - E_WEEK_VIEW_EVENT_R_PAD - 2,
y1, 3, y2 - y1 + 1, draw_region);
} else if (can_draw_in_region (draw_region, rect_x2, y2, 1, 1)) {
+ EWeekViewColors wvc;
+ GdkColor *color;
+
+ wvc = E_WEEK_VIEW_COLOR_EVENT_BORDER;
+ color = &week_view->colors[wvc];
+
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]);
+ gdk_cairo_set_source_color (cr, color);
cairo_set_line_width (cr, 0.7);
/* rect_x2 is used uninitialized here */
cairo_move_to (cr, rect_x2, y2);
diff --git a/calendar/gui/e-week-view-layout.c b/calendar/gui/e-week-view-layout.c
index f28f77a020..8962d81610 100644
--- a/calendar/gui/e-week-view-layout.c
+++ b/calendar/gui/e-week-view-layout.c
@@ -189,7 +189,9 @@ e_week_view_layout_event (EWeekViewEvent *event,
span.background_item = NULL;
span.text_item = NULL;
if (event->num_spans > span_num) {
- old_span = &g_array_index (old_spans, EWeekViewEventSpan, event->spans_index + span_num);
+ old_span = &g_array_index (
+ old_spans, EWeekViewEventSpan,
+ event->spans_index + span_num);
span.background_item = old_span->background_item;
span.text_item = old_span->text_item;
old_span->background_item = NULL;
@@ -327,7 +329,14 @@ e_week_view_layout_get_day_position (gint day,
}
} else {
#define wk(x) ( ( working_days & (days [ ((x) + display_start_day) % 7 ]) ) ? 1 : 0)
- CalWeekdays days [] = {CAL_MONDAY, CAL_TUESDAY, CAL_WEDNESDAY, CAL_THURSDAY, CAL_FRIDAY, CAL_SATURDAY, CAL_SUNDAY};
+ CalWeekdays days[] = {
+ CAL_MONDAY,
+ CAL_TUESDAY,
+ CAL_WEDNESDAY,
+ CAL_THURSDAY,
+ CAL_FRIDAY,
+ CAL_SATURDAY,
+ CAL_SUNDAY };
CalWeekdays working_days;
gint arr[4] = {1, 1, 1, 1};
gint edge, i, wd, m, M;
@@ -442,10 +451,13 @@ e_week_view_layout_get_span_position (EWeekViewEvent *event,
}
} else {
gint day_x, day_y, rows = 0;
- e_week_view_layout_get_day_position (end_day_of_week, multi_week_view, 1, display_start_day, compress_weekend,
- &day_x, &day_y, &rows);
+ e_week_view_layout_get_day_position (
+ end_day_of_week, multi_week_view, 1,
+ display_start_day, compress_weekend,
+ &day_x, &day_y, &rows);
- if (((rows / 2) * rows_per_cell) + ((rows % 2) * rows_per_compressed_cell) <= span->row)
+ if (((rows / 2) * rows_per_cell) + ((rows % 2) *
+ rows_per_compressed_cell) <= span->row)
return FALSE;
}
}
diff --git a/calendar/gui/ea-cal-view-event.c b/calendar/gui/ea-cal-view-event.c
index 4fbc93e3e2..230d7ca84f 100644
--- a/calendar/gui/ea-cal-view-event.c
+++ b/calendar/gui/ea-cal-view-event.c
@@ -27,29 +27,42 @@
#include <text/e-text.h>
#include <glib/gi18n.h>
-static void ea_cal_view_event_class_init (EaCalViewEventClass *klass);
-static void ea_cal_view_event_init (EaCalViewEvent *a11y);
-
-static void ea_cal_view_event_dispose (GObject *object);
-static G_CONST_RETURN gchar * ea_cal_view_event_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar * ea_cal_view_event_get_description (AtkObject *accessible);
-static AtkObject* ea_cal_view_event_get_parent (AtkObject *accessible);
-static gint ea_cal_view_event_get_index_in_parent (AtkObject *accessible);
-static AtkStateSet *ea_cal_view_event_ref_state_set (AtkObject *accessible);
+static void ea_cal_view_event_class_init (EaCalViewEventClass *klass);
+static void ea_cal_view_event_init (EaCalViewEvent *a11y);
+static void ea_cal_view_event_dispose (GObject *object);
+static G_CONST_RETURN gchar *
+ ea_cal_view_event_get_name (AtkObject *accessible);
+static G_CONST_RETURN gchar *
+ ea_cal_view_event_get_description
+ (AtkObject *accessible);
+static AtkObject *
+ ea_cal_view_event_get_parent (AtkObject *accessible);
+static gint ea_cal_view_event_get_index_in_parent
+ (AtkObject *accessible);
+static AtkStateSet *
+ ea_cal_view_event_ref_state_set (AtkObject *accessible);
/* component interface */
-static void atk_component_interface_init (AtkComponentIface *iface);
-static void ea_cal_view_get_extents (AtkComponent *component,
- gint *x, gint *y, gint *width, gint *height,
- AtkCoordType coord_type);
+static void atk_component_interface_init (AtkComponentIface *iface);
+static void ea_cal_view_get_extents (AtkComponent *component,
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height,
+ AtkCoordType coord_type);
/* action interface */
-static void atk_action_interface_init (AtkActionIface *iface);
-static gboolean ea_cal_view_event_do_action (AtkAction *action, gint i);
-static gint ea_cal_view_event_get_n_actions (AtkAction *action);
-static G_CONST_RETURN gchar * ea_cal_view_event_action_get_name (AtkAction *action, gint i);
+static void atk_action_interface_init (AtkActionIface *iface);
+static gboolean ea_cal_view_event_do_action (AtkAction *action,
+ gint i);
+static gint ea_cal_view_event_get_n_actions (AtkAction *action);
+static G_CONST_RETURN gchar *
+ ea_cal_view_event_action_get_name
+ (AtkAction *action,
+ gint i);
#ifdef ACC_DEBUG
-static gint n_ea_cal_view_event_created = 0, n_ea_cal_view_event_destroyed = 0;
+static gint n_ea_cal_view_event_created = 0;
+static gint n_ea_cal_view_event_destroyed = 0;
static void ea_cal_view_finalize (GObject *object);
#endif
diff --git a/calendar/gui/ea-day-view-main-item.c b/calendar/gui/ea-day-view-main-item.c
index 9d277287f6..861b83746b 100644
--- a/calendar/gui/ea-day-view-main-item.c
+++ b/calendar/gui/ea-day-view-main-item.c
@@ -29,11 +29,14 @@
#include <glib/gi18n.h>
/* EaDayViewMainItem */
-static void ea_day_view_main_item_class_init (EaDayViewMainItemClass *klass);
+static void ea_day_view_main_item_class_init(EaDayViewMainItemClass *klass);
-static void ea_day_view_main_item_finalize (GObject *object);
-static G_CONST_RETURN gchar * ea_day_view_main_item_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar * ea_day_view_main_item_get_description (AtkObject *accessible);
+static void ea_day_view_main_item_finalize (GObject *object);
+static G_CONST_RETURN gchar *
+ ea_day_view_main_item_get_name (AtkObject *accessible);
+static G_CONST_RETURN gchar *
+ ea_day_view_main_item_get_description
+ (AtkObject *accessible);
static gint ea_day_view_main_item_get_n_children (AtkObject *obj);
static AtkObject* ea_day_view_main_item_ref_child (AtkObject *obj,
diff --git a/calendar/gui/ea-week-view-main-item.c b/calendar/gui/ea-week-view-main-item.c
index e7749f6a70..1db4d8b5be 100644
--- a/calendar/gui/ea-week-view-main-item.c
+++ b/calendar/gui/ea-week-view-main-item.c
@@ -28,80 +28,115 @@
#include <glib/gi18n.h>
/* EaWeekViewMainItem */
-static void ea_week_view_main_item_class_init (EaWeekViewMainItemClass *klass);
-
-static void ea_week_view_main_item_finalize (GObject *object);
-static G_CONST_RETURN gchar * ea_week_view_main_item_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar * ea_week_view_main_item_get_description (AtkObject *accessible);
-
-static gint ea_week_view_main_item_get_n_children (AtkObject *obj);
-static AtkObject* ea_week_view_main_item_ref_child (AtkObject *obj,
- gint i);
-static AtkObject * ea_week_view_main_item_get_parent (AtkObject *accessible);
-static gint ea_week_view_main_item_get_index_in_parent (AtkObject *accessible);
+static void ea_week_view_main_item_class_init
+ (EaWeekViewMainItemClass *class);
+static void ea_week_view_main_item_finalize (GObject *object);
+static G_CONST_RETURN gchar *
+ ea_week_view_main_item_get_name (AtkObject *accessible);
+static G_CONST_RETURN gchar *
+ ea_week_view_main_item_get_description
+ (AtkObject *accessible);
+static gint ea_week_view_main_item_get_n_children
+ (AtkObject *accessible);
+static AtkObject *
+ ea_week_view_main_item_ref_child(AtkObject *accessible,
+ gint i);
+static AtkObject *
+ ea_week_view_main_item_get_parent
+ (AtkObject *accessible);
+static gint ea_week_view_main_item_get_index_in_parent
+ (AtkObject *accessible);
/* callbacks */
-static void ea_week_view_main_item_dates_change_cb (GnomeCalendar *gcal, gpointer data);
-static void ea_week_view_main_item_time_change_cb (EWeekView *week_view, gpointer data);
+static void ea_week_view_main_item_dates_change_cb
+ (GnomeCalendar *gcal,
+ gpointer data);
+static void ea_week_view_main_item_time_change_cb
+ (EWeekView *week_view,
+ gpointer data);
/* component interface */
-static void atk_component_interface_init (AtkComponentIface *iface);
-static void component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y,
- gint *width, gint *height,
- AtkCoordType coord_type);
+static void atk_component_interface_init (AtkComponentIface *iface);
+static void component_interface_get_extents (AtkComponent *component,
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height,
+ AtkCoordType coord_type);
/* atk table interface */
-static void atk_table_interface_init (AtkTableIface *iface);
-static gint table_interface_get_index_at (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_column_at_index (AtkTable *table,
- gint index);
-static gint table_interface_get_row_at_index (AtkTable *table,
- gint index);
-static AtkObject* table_interface_ref_at (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_n_rows (AtkTable *table);
-static gint table_interface_get_n_columns (AtkTable *table);
-static gint table_interface_get_column_extent_at (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_row_extent_at (AtkTable *table,
- gint row,
- gint column);
-
-static gboolean table_interface_is_row_selected (AtkTable *table,
- gint row);
-static gboolean table_interface_is_column_selected (AtkTable *table,
- gint row);
-static gboolean table_interface_is_selected (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_selected_rows (AtkTable *table,
- gint **rows_selected);
-static gint table_interface_get_selected_columns (AtkTable *table,
- gint **columns_selected);
-static gboolean table_interface_add_row_selection (AtkTable *table, gint row);
-static gboolean table_interface_remove_row_selection (AtkTable *table,
- gint row);
-static gboolean table_interface_add_column_selection (AtkTable *table,
- gint column);
-static gboolean table_interface_remove_column_selection (AtkTable *table,
- gint column);
-static AtkObject* table_interface_get_row_header (AtkTable *table, gint row);
-static AtkObject* table_interface_get_column_header (AtkTable *table,
- gint in_col);
-static AtkObject* table_interface_get_caption (AtkTable *table);
+static void atk_table_interface_init (AtkTableIface *iface);
+static gint table_interface_get_index_at (AtkTable *table,
+ gint row,
+ gint column);
+static gint table_interface_get_column_at_index
+ (AtkTable *table,
+ gint index);
+static gint table_interface_get_row_at_index(AtkTable *table,
+ gint index);
+static AtkObject *
+ table_interface_ref_at (AtkTable *table,
+ gint row,
+ gint column);
+static gint table_interface_get_n_rows (AtkTable *table);
+static gint table_interface_get_n_columns (AtkTable *table);
+static gint table_interface_get_column_extent_at
+ (AtkTable *table,
+ gint row,
+ gint column);
+static gint table_interface_get_row_extent_at
+ (AtkTable *table,
+ gint row,
+ gint column);
+
+static gboolean table_interface_is_row_selected (AtkTable *table,
+ gint row);
+static gboolean table_interface_is_column_selected
+ (AtkTable *table,
+ gint row);
+static gboolean table_interface_is_selected (AtkTable *table,
+ gint row,
+ gint column);
+static gint table_interface_get_selected_rows
+ (AtkTable *table,
+ gint **rows_selected);
+static gint table_interface_get_selected_columns
+ (AtkTable *table,
+ gint **columns_selected);
+static gboolean table_interface_add_row_selection
+ (AtkTable *table,
+ gint row);
+static gboolean table_interface_remove_row_selection
+ (AtkTable *table,
+ gint row);
+static gboolean table_interface_add_column_selection
+ (AtkTable *table,
+ gint column);
+static gboolean table_interface_remove_column_selection
+ (AtkTable *table,
+ gint column);
+static AtkObject *
+ table_interface_get_row_header (AtkTable *table,
+ gint row);
+static AtkObject *
+ table_interface_get_column_header
+ (AtkTable *table,
+ gint in_col);
+static AtkObject *
+ table_interface_get_caption (AtkTable *table);
static G_CONST_RETURN gchar *
-table_interface_get_column_description (AtkTable *table, gint in_col);
+ table_interface_get_column_description
+ (AtkTable *table,
+ gint in_col);
static G_CONST_RETURN gchar *
-table_interface_get_row_description (AtkTable *table, gint row);
+ table_interface_get_row_description
+ (AtkTable *table,
+ gint row);
-static AtkObject* table_interface_get_summary (AtkTable *table);
+static AtkObject *
+ table_interface_get_summary (AtkTable *table);
/* atk selection interface */
static void atk_selection_interface_init (AtkSelectionIface *iface);
@@ -116,24 +151,27 @@ static gboolean selection_interface_is_child_selected (AtkSelection *selection,
/* helpers */
static EaCellTable *
-ea_week_view_main_item_get_cell_data (EaWeekViewMainItem *ea_main_item);
-
-static void
-ea_week_view_main_item_destory_cell_data (EaWeekViewMainItem *ea_main_item);
-
-static gint
-ea_week_view_main_item_get_child_index_at (EaWeekViewMainItem *ea_main_item,
- gint row, gint column);
-static gint
-ea_week_view_main_item_get_row_at_index (EaWeekViewMainItem *ea_main_item,
- gint index);
-static gint
-ea_week_view_main_item_get_column_at_index (EaWeekViewMainItem *ea_main_item,
- gint index);
-static gint
-ea_week_view_main_item_get_row_label (EaWeekViewMainItem *ea_main_item,
- gint row, gchar *buffer,
- gint buffer_size);
+ ea_week_view_main_item_get_cell_data
+ (EaWeekViewMainItem *ea_main_item);
+
+static void ea_week_view_main_item_destory_cell_data
+ (EaWeekViewMainItem *ea_main_item);
+
+static gint ea_week_view_main_item_get_child_index_at
+ (EaWeekViewMainItem *ea_main_item,
+ gint row,
+ gint column);
+static gint ea_week_view_main_item_get_row_at_index
+ (EaWeekViewMainItem *ea_main_item,
+ gint index);
+static gint ea_week_view_main_item_get_column_at_index
+ (EaWeekViewMainItem *ea_main_item,
+ gint index);
+static gint ea_week_view_main_item_get_row_label
+ (EaWeekViewMainItem *ea_main_item,
+ gint row,
+ gchar *buffer,
+ gint buffer_size);
#ifdef ACC_DEBUG
static gint n_ea_week_view_main_item_created = 0;
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index e4b9f01b03..d51f4cee0e 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -223,10 +223,10 @@ convert_timet_to_struct_tm (time_t time, icaltimezone *zone)
return &my_tm;
}
-/* Fills the 42-element days array with the day numbers for the specified month. Slots outside the
- * bounds of the month are filled with zeros. The starting and ending indexes of the days are
- * returned in the start and end arguments.
- */
+/* Fills the 42-element days array with the day numbers for the specified
+ * month. Slots outside the bounds of the month are filled with zeros.
+ * The starting and ending indexes of the days are returned in the start
+ * and end arguments. */
static void
build_month (gint month, gint year, gint *days, gint *start, gint *end)
{
@@ -554,7 +554,10 @@ format_date(time_t time, gint flags, gchar *buffer, gint bufflen)
}
static gboolean
-instance_cb (ECalComponent *comp, time_t instance_start, time_t instance_end, gpointer data)
+instance_cb (ECalComponent *comp,
+ time_t instance_start,
+ time_t instance_end,
+ gpointer data)
{
gboolean *found = ((ECalModelGenerateInstancesData *) data)->cb_data;
@@ -717,7 +720,9 @@ bound_text (GtkPrintContext *context,
pango_layout_get_size (layout, &layout_width, &layout_height);
- if (last_page_start && y1 + pango_units_to_double (layout_height) > y2 + (*last_page_start)) {
+ if (last_page_start &&
+ y1 + pango_units_to_double (layout_height) >
+ y2 + (*last_page_start)) {
/* draw this on new page */
if (pages)
*pages = *pages + 1;
@@ -1033,7 +1038,9 @@ print_attendees (GtkPrintContext *context, PangoFontDescription *font, cairo_t *
cairo_show_page (cr);
}
- top = bound_text (context, font, text->str, -1, left + 40.0, top, right, bottom, FALSE, NULL, pages);
+ top = bound_text (
+ context, font, text->str, -1, left + 40.0,
+ top, right, bottom, FALSE, NULL, pages);
g_string_free (text, TRUE);
}
@@ -1067,10 +1074,16 @@ get_summary_with_location (icalcomponent *icalcomp)
}
static void
-print_day_long_event (GtkPrintContext *context, PangoFontDescription *font,
- double left, double right, double top, double bottom,
- double row_height, EDayViewEvent *event,
- struct pdinfo *pdi, ECalModel *model)
+print_day_long_event (GtkPrintContext *context,
+ PangoFontDescription *font,
+ gdouble left,
+ gdouble right,
+ gdouble top,
+ gdouble bottom,
+ gdouble row_height,
+ EDayViewEvent *event,
+ struct pdinfo *pdi,
+ ECalModel *model)
{
gdouble x1, x2, y1, y2;
gdouble left_triangle_width = -1.0, right_triangle_width = -1.0;
@@ -1095,7 +1108,8 @@ print_day_long_event (GtkPrintContext *context, PangoFontDescription *font,
y1 = top + event->start_row_or_col * row_height + 1;
y2 = y1 + row_height - 1;
red = green = blue = 0.95;
- e_cal_model_get_rgb_color_for_component (model, event->comp_data, &red, &green, &blue);
+ e_cal_model_get_rgb_color_for_component (
+ model, event->comp_data, &red, &green, &blue);
print_border_with_triangles (context, x1, x2, y1, y2, 0.5, red, green, blue,
left_triangle_width,
right_triangle_width);
@@ -1169,7 +1183,8 @@ print_day_event (GtkPrintContext *context, PangoFontDescription *font,
start_row = MAX (0, start_row);
end_row = (end_offset - 1) / pdi->mins_per_row;
end_row = MIN (pdi->rows - 1, end_row);
- col_width = (right - left) / pdi->cols_per_row[event->start_minute / pdi->mins_per_row];
+ col_width = (right - left) /
+ pdi->cols_per_row[event->start_minute / pdi->mins_per_row];
if (start_offset != start_row * pdi->mins_per_row
|| end_offset != (end_row + 1) * pdi->mins_per_row)
@@ -1187,7 +1202,8 @@ print_day_event (GtkPrintContext *context, PangoFontDescription *font,
#endif
red = green = blue = 0.95;
- e_cal_model_get_rgb_color_for_component (model, event->comp_data, &red, &green, &blue);
+ e_cal_model_get_rgb_color_for_component (
+ model, event->comp_data, &red, &green, &blue);
print_border_rgb (context, x1, x2, y1, y2, 1.0, red, green, blue);
text = get_summary_with_location (event->comp_data->icalcomp);
@@ -1309,8 +1325,10 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
for (i = 0; i < rows_in_top_display && i < pdi.long_events->len; i++) {
event = &g_array_index (pdi.long_events, EDayViewEvent, i);
- print_day_long_event (context, font, left, right, top + LONG_DAY_EVENTS_TOP_SPACING, bottom,
- DAY_VIEW_ROW_HEIGHT, event, &pdi, model);
+ print_day_long_event (
+ context, font, left, right,
+ top + LONG_DAY_EVENTS_TOP_SPACING, bottom,
+ DAY_VIEW_ROW_HEIGHT, event, &pdi, model);
}
if (rows_in_top_display < pdi.long_events->len) {
@@ -1333,7 +1351,9 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
x = right - gdk_pixbuf_get_width (pixbuf) * 0.5 - 10;
/* Placing '...' over the last all day event entry printed. '-1 -1' comes
from print_long_day_event (top/bottom spacing in each cell) */
- y = top + LONG_DAY_EVENTS_TOP_SPACING + DAY_VIEW_ROW_HEIGHT * (i - 1) + (DAY_VIEW_ROW_HEIGHT - 1 - 1) * 0.5;
+ y = top + LONG_DAY_EVENTS_TOP_SPACING
+ + DAY_VIEW_ROW_HEIGHT * (i - 1)
+ + (DAY_VIEW_ROW_HEIGHT - 1 - 1) * 0.5;
cairo_save (cr);
cairo_scale (cr, 0.5, 0.5);
@@ -1349,13 +1369,16 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
cr = gtk_print_context_get_cairo_context (context);
cairo_set_source_rgb (cr, 0, 0, 0);
- print_border (context, left, right,
- top,
- top + rows_in_top_display * DAY_VIEW_ROW_HEIGHT + LONG_DAY_EVENTS_TOP_SPACING + LONG_DAY_EVENTS_BOTTOM_SPACING,
- 1.0, -1.0);
+ print_border (
+ context, left, right,
+ top, top + rows_in_top_display * DAY_VIEW_ROW_HEIGHT +
+ LONG_DAY_EVENTS_TOP_SPACING + LONG_DAY_EVENTS_BOTTOM_SPACING,
+ 1.0, -1.0);
/* Adjust the area containing the main display. */
- top += rows_in_top_display * DAY_VIEW_ROW_HEIGHT + LONG_DAY_EVENTS_TOP_SPACING + LONG_DAY_EVENTS_BOTTOM_SPACING;
+ top += rows_in_top_display * DAY_VIEW_ROW_HEIGHT
+ + LONG_DAY_EVENTS_TOP_SPACING
+ + LONG_DAY_EVENTS_BOTTOM_SPACING;
/* Draw the borders, lines, and times down the left. */
print_day_background (context, gcal, whence, &pdi,
@@ -1430,9 +1453,9 @@ print_week_long_event (GtkPrintContext *context, PangoFontDescription *font,
if (event->end > psi->day_starts[span->start_day + span->num_days])
right_triangle_width = 4;
- print_border_with_triangles (context, x1, x2, y1, y1 + row_height, 0.0, red, green, blue,
- left_triangle_width,
- right_triangle_width);
+ print_border_with_triangles (
+ context, x1, x2, y1, y1 + row_height, 0.0, red, green, blue,
+ left_triangle_width, right_triangle_width);
/* If the event starts after the first day being printed, we need to
print the start time. */
@@ -1449,7 +1472,9 @@ print_week_long_event (GtkPrintContext *context, PangoFontDescription *font,
buffer, sizeof (buffer));
x1 += 4;
- x1 += print_text_size (context, buffer, PANGO_ALIGN_LEFT, x1, x2, y1, y1 + row_height);
+ x1 += print_text_size (
+ context, buffer, PANGO_ALIGN_LEFT,
+ x1, x2, y1, y1 + row_height);
}
/* If the event ends before the end of the last day being printed,
@@ -1467,7 +1492,9 @@ print_week_long_event (GtkPrintContext *context, PangoFontDescription *font,
buffer, sizeof (buffer));
x2 -= 4;
- x2 -= print_text_size (context, buffer, PANGO_ALIGN_RIGHT, x1, x2, y1, y1 + row_height);
+ x2 -= print_text_size (
+ context, buffer, PANGO_ALIGN_RIGHT,
+ x1, x2, y1, y1 + row_height);
}
x1 += 4;
@@ -1496,7 +1523,9 @@ print_week_day_event (GtkPrintContext *context, PangoFontDescription *font,
e_time_format_time (&date_tm, psi->use_24_hour_format, FALSE,
buffer, sizeof (buffer));
print_rectangle (context, x1, y1, x2 - x1, row_height, red, green, blue);
- x1 += print_text_size (context, buffer, PANGO_ALIGN_LEFT, x1, x2, y1, y1 + row_height) + 4;
+ x1 += print_text_size (
+ context, buffer, PANGO_ALIGN_LEFT,
+ x1, x2, y1, y1 + row_height) + 4;
if (psi->weeks_shown <= 2) {
date_tm.tm_hour = event->end_minute / 60;
@@ -1506,10 +1535,14 @@ print_week_day_event (GtkPrintContext *context, PangoFontDescription *font,
buffer, sizeof (buffer));
print_rectangle (context, x1, y1, x2 - x1, row_height, red, green, blue);
- x1 += print_text_size (context, buffer, PANGO_ALIGN_LEFT, x1, x2, y1, y1 + row_height) + 4;
+ x1 += print_text_size (
+ context, buffer, PANGO_ALIGN_LEFT,
+ x1, x2, y1, y1 + row_height) + 4;
}
- print_text_size (context, text, PANGO_ALIGN_LEFT, x1, x2, y1, y1 + row_height);
+ print_text_size (
+ context, text, PANGO_ALIGN_LEFT,
+ x1, x2, y1, y1 + row_height);
}
static void
@@ -1574,7 +1607,8 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font,
red = .9;
green = .9;
blue = .9;
- e_cal_model_get_rgb_color_for_component (model, event->comp_data, &red, &green, &blue);
+ e_cal_model_get_rgb_color_for_component (
+ model, event->comp_data, &red, &green, &blue);
if (print_is_one_day_week_event (event, span,
psi->day_starts)) {
print_week_day_event (context, font, psi,
@@ -1605,7 +1639,10 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font,
if (end_day_of_week == 5 || end_day_of_week == 6) {
/* Sat or Sun */
- y1 = y1 + (psi->rows_per_compressed_cell - psi->rows_per_cell) * psi->row_height - 3.0;
+ y1 = y1 +
+ (psi->rows_per_compressed_cell -
+ psi->rows_per_cell) *
+ psi->row_height - 3.0;
}
}
@@ -2022,7 +2059,8 @@ print_todo_details (GtkPrintContext *context, GnomeCalendar *gcal,
continue;
comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
+ e_cal_component_set_icalcomponent (
+ comp, icalcomponent_new_clone (comp_data->icalcomp));
e_cal_component_get_summary (comp, &summary);
if (!summary.value) {
@@ -2504,7 +2542,8 @@ print_comp_draw_real (GtkPrintOperation *operation,
top = 0.0;
- /* either draw only the right page or do not draw anything when calculating number of pages */
+ /* Either draw only the right page or do not draw
+ * anything when calculating number of pages. */
if (page_nr != -1)
top = top - ((page_nr) * height);
else
@@ -2572,10 +2611,14 @@ print_comp_draw_real (GtkPrintOperation *operation,
/* Attendees */
if ((page_nr == 0) && e_cal_component_has_attendees (comp)) {
- top = bound_text (context, font, _("Attendees: "), -1, 0.0, top, width, height, FALSE, &page_start, &pages);
+ top = bound_text (
+ context, font, _("Attendees: "), -1, 0.0,
+ top, width, height, FALSE, &page_start, &pages);
pango_font_description_free (font);
font = get_font_for_size (12, PANGO_WEIGHT_NORMAL);
- top = print_attendees (context, font, cr, 0.0, width, top, height, comp, page_nr, &pages);
+ top = print_attendees (
+ context, font, cr, 0.0, width,
+ top, height, comp, page_nr, &pages);
top += get_font_size (font) - 6;
}
@@ -2626,9 +2669,13 @@ print_comp_draw_real (GtkPrintOperation *operation,
if (priority && *priority >= 0) {
gchar *pri_text;
- pri_text = g_strdup_printf (_("Priority: %s"), e_cal_util_priority_to_string (*priority));
- top = bound_text (context, font, pri_text, -1,
- 0.0, top, width, height, FALSE, &page_start, &pages);
+ pri_text = g_strdup_printf (
+ _("Priority: %s"),
+ e_cal_util_priority_to_string (*priority));
+ top = bound_text (
+ context, font, pri_text, -1,
+ 0.0, top, width, height, FALSE,
+ &page_start, &pages);
top += get_font_size (font) - 6;
g_free (pri_text);
}
@@ -2702,7 +2749,11 @@ print_comp_draw_real (GtkPrintOperation *operation,
for (line = ptext->value; line != NULL; line = next_line) {
next_line = strchr (line, '\n');
- top = bound_text (context, font, line, next_line ? next_line - line : -1, 0.0, top + 3, width, height, TRUE, &page_start, &pages);
+ top = bound_text (
+ context, font, line,
+ next_line ? next_line - line : -1,
+ 0.0, top + 3, width, height, TRUE,
+ &page_start, &pages);
if (next_line) {
next_line ++;
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
index c986b4cefc..0a5ca37a0c 100644
--- a/e-util/e-bit-array.c
+++ b/e-util/e-bit-array.c
@@ -58,7 +58,9 @@ e_bit_array_insert_real(EBitArray *eba, gint row)
}
/* Shift right half of box one bit to the right. */
- eba->data[box] = (eba->data[box] & BITMASK_LEFT(row)) | ((eba->data[box] & BITMASK_RIGHT(row)) >> 1);
+ eba->data[box] =
+ (eba->data[box] & BITMASK_LEFT(row)) |
+ ((eba->data[box] & BITMASK_RIGHT(row)) >> 1);
eba->bit_count ++;
}
}
@@ -80,7 +82,9 @@ e_bit_array_delete_real(EBitArray *eba, gint row, gboolean move_selection_mode)
if (move_selection_mode)
selected = e_bit_array_value_at(eba, row);
/* Shift right half of box one bit to the left. */
- eba->data[box] = (eba->data[box] & BITMASK_LEFT(row))| ((eba->data[box] & bitmask) << 1);
+ eba->data[box] =
+ (eba->data[box] & BITMASK_LEFT(row)) |
+ ((eba->data[box] & bitmask) << 1);
/* Shift all words to the right of our box left one bit. */
if (box < last) {
@@ -297,7 +301,9 @@ e_bit_array_bit_count (EBitArray *eba)
return eba->bit_count;
}
-#define OPERATE(object, i,mask,grow) ((grow) ? (((object)->data[(i)]) |= ((guint32) ~(mask))) : (((object)->data[(i)]) &= (mask)))
+#define OPERATE(object, i,mask,grow) \
+ ((grow) ? (((object)->data[(i)]) |= ((guint32) ~(mask))) : \
+ (((object)->data[(i)]) &= (mask)))
void
e_bit_array_change_one_row(EBitArray *eba, gint row, gboolean grow)
diff --git a/e-util/e-plugin.h b/e-util/e-plugin.h
index a90499bf9c..057e80d743 100644
--- a/e-util/e-plugin.h
+++ b/e-util/e-plugin.h
@@ -126,26 +126,34 @@ struct _EPluginClass {
GtkWidget *(*get_configure_widget)(EPlugin *);
};
-GType e_plugin_get_type(void);
-
-gint e_plugin_construct(EPlugin *ep, xmlNodePtr root);
-void e_plugin_add_load_path(const gchar *);
-gint e_plugin_load_plugins(void);
-GSList * e_plugin_list_plugins(void);
-
-gpointer e_plugin_get_symbol(EPlugin *ep, const gchar *name);
-gpointer e_plugin_invoke(EPlugin *ep, const gchar *name, gpointer data);
-void e_plugin_enable(EPlugin *eph, gint state);
-
-GtkWidget *e_plugin_get_configure_widget (EPlugin *ep);
+GType e_plugin_get_type (void);
+gint e_plugin_construct (EPlugin *plugin,
+ xmlNodePtr root);
+void e_plugin_add_load_path (const gchar *path);
+gint e_plugin_load_plugins (void);
+GSList * e_plugin_list_plugins (void);
+gpointer e_plugin_get_symbol (EPlugin *plugin,
+ const gchar *name);
+gpointer e_plugin_invoke (EPlugin *plugin,
+ const gchar *name,
+ gpointer data);
+void e_plugin_enable (EPlugin *plugin,
+ gint state);
+GtkWidget * e_plugin_get_configure_widget (EPlugin *plugin);
/* static helpers */
/* maps prop or content to 'g memory' */
-gchar *e_plugin_xml_prop(xmlNodePtr node, const gchar *id);
-gchar *e_plugin_xml_prop_domain(xmlNodePtr node, const gchar *id, const gchar *domain);
-gint e_plugin_xml_int(xmlNodePtr node, const gchar *id, gint def);
-gchar *e_plugin_xml_content(xmlNodePtr node);
-gchar *e_plugin_xml_content_domain(xmlNodePtr node, const gchar *domain);
+gchar * e_plugin_xml_prop (xmlNodePtr node,
+ const gchar *id);
+gchar * e_plugin_xml_prop_domain (xmlNodePtr node,
+ const gchar *id,
+ const gchar *domain);
+gint e_plugin_xml_int (xmlNodePtr node,
+ const gchar *id,
+ gint def);
+gchar * e_plugin_xml_content (xmlNodePtr node);
+gchar * e_plugin_xml_content_domain (xmlNodePtr node,
+ const gchar *domain);
/* ********************************************************************** */
@@ -204,7 +212,7 @@ struct _EPluginHookTargetKey {
struct _EPluginHookTargetMap {
const gchar *type;
gint id;
- const struct _EPluginHookTargetKey *mask_bits; /* null terminated array */
+ const EPluginHookTargetKey *mask_bits; /* null terminated array */
};
/**
@@ -218,8 +226,7 @@ struct _EPluginHookTargetMap {
**/
struct _EPluginHook {
GObject object;
-
- struct _EPlugin *plugin;
+ EPlugin *plugin;
};
/**
@@ -244,18 +251,26 @@ struct _EPluginHookClass {
const gchar *id;
- gint (*construct)(EPluginHook *eph, EPlugin *ep, xmlNodePtr root);
- void (*enable)(EPluginHook *eph, gint state);
+ gint (*construct) (EPluginHook *plugin_hook,
+ EPlugin *plugin,
+ xmlNodePtr root);
+ void (*enable) (EPluginHook *plugin_hook,
+ gint state);
};
-GType e_plugin_hook_get_type(void);
-
-EPluginHook * e_plugin_hook_new(EPlugin *ep, xmlNodePtr root);
-void e_plugin_hook_enable(EPluginHook *eph, gint state);
+GType e_plugin_hook_get_type (void);
+EPluginHook * e_plugin_hook_new (EPlugin *plugin,
+ xmlNodePtr root);
+void e_plugin_hook_enable (EPluginHook *plugin_hook,
+ gint state);
/* static methods */
-guint32 e_plugin_hook_mask(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const gchar *prop);
-guint32 e_plugin_hook_id(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const gchar *prop);
+guint32 e_plugin_hook_mask (xmlNodePtr root,
+ const EPluginHookTargetKey *map,
+ const gchar *prop);
+guint32 e_plugin_hook_id (xmlNodePtr root,
+ const EPluginHookTargetKey *map,
+ const gchar *prop);
/* README: Currently there is only one flag.
But we may need more in the future and hence makes
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index 61076b9d72..79ebb0be46 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -161,7 +161,10 @@ add_autogen (ESignatureList *list, GSList *new_sigs)
}
static void
-gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
+gconf_signatures_changed (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
ESignatureList *signature_list = user_data;
GSList *list, *l, *n, *new_sigs = NULL;
@@ -175,29 +178,36 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
old_sigs = e_list_duplicate (E_LIST (signature_list));
- list = gconf_client_get_list (client, "/apps/evolution/mail/signatures", GCONF_VALUE_STRING, NULL);
+ list = gconf_client_get_list (
+ client, "/apps/evolution/mail/signatures",
+ GCONF_VALUE_STRING, NULL);
for (l = list; l; l = l->next) {
found = FALSE;
if ((uid = e_signature_uid_from_xml (l->data))) {
/* See if this is an existing signature */
- for (iter = e_list_get_iterator (old_sigs); e_iterator_is_valid (iter); e_iterator_next (iter)) {
+ iter = e_list_get_iterator (old_sigs);
+ while (e_iterator_is_valid (iter)) {
const gchar *signature_uid;
signature = (ESignature *) e_iterator_get (iter);
signature_uid = e_signature_get_uid (signature);
if (!strcmp (signature_uid, uid)) {
/* The signature still exists, so remove
- * it from "old_sigs" and update it.
- */
+ * it from "old_sigs" and update it. */
found = TRUE;
e_iterator_delete (iter);
if (e_signature_set_from_xml (signature, l->data))
- g_signal_emit (signature_list, signals[SIGNATURE_CHANGED], 0, signature);
+ g_signal_emit (
+ signature_list,
+ signals[SIGNATURE_CHANGED],
+ 0, signature);
have_autogen |= e_signature_get_autogenerated (signature);
break;
}
+
+ e_iterator_next (iter);
}
g_object_unref (iter);
@@ -238,10 +248,14 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
}
/* Anything left in old_sigs must have been deleted */
- for (iter = e_list_get_iterator (old_sigs); e_iterator_is_valid (iter); e_iterator_next (iter)) {
+ iter = e_list_get_iterator (old_sigs);
+ while (e_iterator_is_valid (iter)) {
signature = (ESignature *) e_iterator_get (iter);
e_list_remove (E_LIST (signature_list), signature);
- g_signal_emit (signature_list, signals[SIGNATURE_REMOVED], 0, signature);
+ g_signal_emit (
+ signature_list, signals[SIGNATURE_REMOVED], 0,
+ signature);
+ e_iterator_next (iter);
}
g_object_unref (iter);
diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c
index 39f3e61fa8..71cd1d83b2 100644
--- a/e-util/e-sorter-array.c
+++ b/e-util/e-sorter-array.c
@@ -204,8 +204,14 @@ e_sorter_array_append (ESorterArray *esa, gint count)
for (i = 0; i < count; i++) {
gint value = esa->rows;
gsize pos;
- e_bsearch (&value, esa->sorted, esa->rows, sizeof (gint), esort_callback, esa, &pos, NULL);
- memmove (esa->sorted + pos + 1, esa->sorted + pos, sizeof (gint) * (esa->rows - pos));
+
+ e_bsearch (
+ &value, esa->sorted, esa->rows,
+ sizeof (gint), esort_callback, esa, &pos, NULL);
+ memmove (
+ esa->sorted + pos + 1,
+ esa->sorted + pos,
+ sizeof (gint) * (esa->rows - pos));
esa->sorted[pos] = value;
esa->rows ++;
}
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
index a5722e178e..273a87aedf 100644
--- a/mail/em-folder-tree.h
+++ b/mail/em-folder-tree.h
@@ -55,7 +55,8 @@ typedef struct _EMFolderTreePrivate EMFolderTreePrivate;
#define STATE_KEY_EXPANDED "Expanded"
-/* not sure this api is the best, but its the easiest to implement and will cover what we need */
+/* XXX Not sure this api is the best, but its the easiest
+ * to implement and will cover what we need. */
#define EMFT_EXCLUDE_NOSELECT CAMEL_FOLDER_NOSELECT
#define EMFT_EXCLUDE_NOINFERIORS CAMEL_FOLDER_NOINFERIORS
#define EMFT_EXCLUDE_VIRTUAL CAMEL_FOLDER_VIRTUAL
diff --git a/mail/em-vfolder-context.c b/mail/em-vfolder-context.c
index 789735683c..03ecd3681f 100644
--- a/mail/em-vfolder-context.c
+++ b/mail/em-vfolder-context.c
@@ -40,30 +40,26 @@ static EFilterElement *vfolder_new_element(ERuleContext *rc, const gchar *type);
static ERuleContextClass *parent_class = NULL;
static void
-em_vfolder_context_finalise(GObject *obj)
-{
- G_OBJECT_CLASS(parent_class)->finalize(obj);
-}
-
-static void
-em_vfolder_context_class_init(EMVFolderContextClass *klass)
+em_vfolder_context_class_init (EMVFolderContextClass *klass)
{
parent_class = g_type_class_ref(E_TYPE_RULE_CONTEXT);
- ((GObjectClass *)klass)->finalize = em_vfolder_context_finalise;
((ERuleContextClass *)klass)->new_element = vfolder_new_element;
}
static void
-em_vfolder_context_init(EMVFolderContext *vc)
+em_vfolder_context_init (EMVFolderContext *vc)
{
- e_rule_context_add_part_set((ERuleContext *) vc, "partset", E_TYPE_FILTER_PART,
- e_rule_context_add_part, e_rule_context_next_part);
+ e_rule_context_add_part_set (
+ (ERuleContext *) vc, "partset", E_TYPE_FILTER_PART,
+ e_rule_context_add_part, e_rule_context_next_part);
- e_rule_context_add_rule_set((ERuleContext *) vc, "ruleset", em_vfolder_rule_get_type(),
- e_rule_context_add_rule, e_rule_context_next_rule);
+ e_rule_context_add_rule_set (
+ (ERuleContext *) vc, "ruleset", em_vfolder_rule_get_type(),
+ e_rule_context_add_rule, e_rule_context_next_rule);
- ((ERuleContext *)vc)->flags = E_RULE_CONTEXT_THREADING | E_RULE_CONTEXT_GROUPING;
+ ((ERuleContext *)vc)->flags =
+ E_RULE_CONTEXT_THREADING | E_RULE_CONTEXT_GROUPING;
}
GType
@@ -71,20 +67,23 @@ em_vfolder_context_get_type(void)
{
static GType type = 0;
- if (!type) {
- static const GTypeInfo info = {
- sizeof(EMVFolderContextClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
+ if (G_UNLIKELY (type == 0)) {
+ static const GTypeInfo type_info = {
+ sizeof (EMVFolderContextClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
(GClassInitFunc) em_vfolder_context_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof(EMVFolderContext),
- 0, /* n_preallocs */
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EMVFolderContext),
+ 0, /* n_preallocs */
(GInstanceInitFunc) em_vfolder_context_init,
+ NULL /* value_table */
};
- type = g_type_register_static(E_TYPE_RULE_CONTEXT, "EMVFolderContext", &info, 0);
+ type = g_type_register_static (
+ E_TYPE_RULE_CONTEXT, "EMVFolderContext",
+ &type_info, 0);
}
return type;
@@ -98,13 +97,13 @@ em_vfolder_context_get_type(void)
* Return value: A new #EMVFolderContext object.
**/
EMVFolderContext *
-em_vfolder_context_new(void)
+em_vfolder_context_new (void)
{
- return (EMVFolderContext *)g_object_new(em_vfolder_context_get_type(), NULL, NULL);
+ return g_object_new (em_vfolder_context_get_type(), NULL, NULL);
}
static EFilterElement *
-vfolder_new_element(ERuleContext *rc, const gchar *type)
+vfolder_new_element (ERuleContext *rc, const gchar *type)
{
if (!strcmp(type, "system-flag")) {
return (EFilterElement *) e_filter_option_new();
diff --git a/mail/em-vfolder-editor.c b/mail/em-vfolder-editor.c
index 1a928acf39..192319ce10 100644
--- a/mail/em-vfolder-editor.c
+++ b/mail/em-vfolder-editor.c
@@ -121,7 +121,9 @@ em_vfolder_editor_new (EMVFolderContext *vc)
builder = gtk_builder_new ();
e_load_ui_builder_definition (builder, "filter.ui");
- e_rule_editor_construct ((ERuleEditor *) ve, (ERuleContext *) vc, builder, "incoming", _("Search _Folders"));
+ e_rule_editor_construct (
+ (ERuleEditor *) ve, (ERuleContext *) vc,
+ builder, "incoming", _("Search _Folders"));
gtk_widget_hide (e_builder_get_widget (builder, "label17"));
gtk_widget_hide (e_builder_get_widget (builder, "filter_source_combobox"));
g_object_unref (builder);
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 4c7c049745..63bde58665 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -43,19 +43,25 @@
* to rework or get rid of the functions that use this. */
const gchar *shell_builtin_backend = "mail";
-static void mail_operation_status(CamelOperation *op, const gchar *what, gint pc, gpointer data);
+static void mail_operation_status (CamelOperation *op,
+ const gchar *what,
+ gint pc,
+ gpointer data);
/* background operation status stuff */
struct _MailMsgPrivate {
- gint activity_state; /* sigh sigh sigh, we need to keep track of the state external to the
- pointer itself for locking/race conditions */
+ /* XXX We need to keep track of the state external to the
+ * pointer itself for locking/race conditions. */
+ gint activity_state;
EActivity *activity;
GtkWidget *error;
gboolean cancelable;
};
static guint mail_msg_seq; /* sequence number of each message */
-static GHashTable *mail_msg_active_table; /* table of active messages, must hold mail_msg_lock to access */
+
+/* Table of active messages. Must hold mail_msg_lock to access. */
+static GHashTable *mail_msg_active_table;
static GMutex *mail_msg_lock;
static GCond *mail_msg_cond;
@@ -255,7 +261,9 @@ mail_msg_check_error (gpointer msg)
/* we key on the operation pointer, which is at least accurate enough
for the operation type, although it could be on a different object. */
if (g_hash_table_lookup(active_errors, m->info)) {
- g_message("Error occurred while existing dialogue active:\n%s", camel_exception_get_description(&m->ex));
+ g_message (
+ "Error occurred while existing dialogue active:\n%s",
+ camel_exception_get_description(&m->ex));
return;
}
@@ -263,10 +271,14 @@ mail_msg_check_error (gpointer msg)
if (m->info->desc
&& (what = m->info->desc (m))) {
- gd = (GtkDialog *)e_alert_dialog_new_for_args (parent, "mail:async-error", what, camel_exception_get_description(&m->ex), NULL);
+ gd = (GtkDialog *) e_alert_dialog_new_for_args (
+ parent, "mail:async-error", what,
+ camel_exception_get_description(&m->ex), NULL);
g_free(what);
} else
- gd = (GtkDialog *)e_alert_dialog_new_for_args (parent, "mail:async-error-nodescribe", camel_exception_get_description(&m->ex), NULL);
+ gd = (GtkDialog *) e_alert_dialog_new_for_args (
+ parent, "mail:async-error-nodescribe",
+ camel_exception_get_description(&m->ex), NULL);
g_hash_table_insert(active_errors, m->info, gd);
g_signal_connect(gd, "response", G_CALLBACK(error_response), m->info);
@@ -632,7 +644,8 @@ static MailMsgInfo async_event_info = {
(MailMsgFreeFunc) NULL
};
-MailAsyncEvent *mail_async_event_new(void)
+MailAsyncEvent *
+mail_async_event_new (void)
{
MailAsyncEvent *ea;
@@ -642,12 +655,19 @@ MailAsyncEvent *mail_async_event_new(void)
return ea;
}
-gint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer o, gpointer event_data, gpointer data)
+gint
+mail_async_event_emit (MailAsyncEvent *ea,
+ mail_async_event_t type,
+ MailAsyncFunc func,
+ gpointer o,
+ gpointer event_data,
+ gpointer data)
{
struct _proxy_msg *m;
gint id;
- /* we dont have a reply port for this, we dont care when/if it gets executed, just queue it */
+ /* We dont have a reply port for this, we dont
+ * care when/if it gets executed, just queue it. */
m = mail_msg_new(&async_event_info);
m->func = func;
m->o = o;
@@ -662,8 +682,9 @@ gint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyn
ea->tasks = g_slist_prepend(ea->tasks, m);
g_mutex_unlock(ea->lock);
- /* We use an idle function instead of our own message port only because the
- gui message ports's notification buffer might overflow and deadlock us */
+ /* We use an idle function instead of our own message port only
+ * because the gui message ports's notification buffer might
+ * overflow and deadlock us. */
if (type == MAIL_ASYNC_GUI) {
if (mail_in_main_thread ())
g_idle_add(idle_async_event, m);
@@ -675,7 +696,8 @@ gint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyn
return id;
}
-gint mail_async_event_destroy(MailAsyncEvent *ea)
+gint
+mail_async_event_destroy (MailAsyncEvent *ea)
{
gint id;
struct _proxy_msg *m;
@@ -940,7 +962,10 @@ static MailMsgInfo op_status_info = {
};
static void
-mail_operation_status (CamelOperation *op, const gchar *what, gint pc, gpointer data)
+mail_operation_status (CamelOperation *op,
+ const gchar *what,
+ gint pc,
+ gpointer data)
{
struct _op_status_msg *m;
diff --git a/modules/plugin-lib/e-plugin-lib.c b/modules/plugin-lib/e-plugin-lib.c
index f5b5b9dbd1..33ba699258 100644
--- a/modules/plugin-lib/e-plugin-lib.c
+++ b/modules/plugin-lib/e-plugin-lib.c
@@ -79,40 +79,41 @@ plugin_lib_loadmodule (EPlugin *plugin)
}
static gpointer
-plugin_lib_invoke (EPlugin *plugin, const gchar *name, gpointer data)
+plugin_lib_get_symbol (EPlugin *plugin, const gchar *name)
{
EPluginLib *plugin_lib = E_PLUGIN_LIB (plugin);
- EPluginLibFunc cb;
-
- if (!plugin->enabled) {
- g_warning ("trying to invoke '%s' on disabled plugin '%s'", name, plugin->id);
- return NULL;
- }
+ gpointer symbol;
if (plugin_lib_loadmodule (plugin) != 0)
return NULL;
- if (!g_module_symbol (plugin_lib->module, name, (gpointer)&cb)) {
- g_warning ("Cannot resolve symbol '%s' in plugin '%s' (not exported?)", name, plugin_lib->location);
+ if (!g_module_symbol (plugin_lib->module, name, &symbol))
return NULL;
- }
- return cb (plugin, data);
+ return symbol;
}
static gpointer
-plugin_lib_get_symbol (EPlugin *plugin, const gchar *name)
+plugin_lib_invoke (EPlugin *plugin, const gchar *name, gpointer data)
{
EPluginLib *plugin_lib = E_PLUGIN_LIB (plugin);
- gpointer symbol;
+ EPluginLibFunc func;
- if (plugin_lib_loadmodule (plugin) != 0)
+ if (!plugin->enabled) {
+ g_warning ("trying to invoke '%s' on disabled plugin '%s'", name, plugin->id);
return NULL;
+ }
- if (!g_module_symbol (plugin_lib->module, name, &symbol))
+ func = plugin_lib_get_symbol (plugin, name);
+
+ if (func == NULL) {
+ g_warning (
+ "Cannot resolve symbol '%s' in plugin '%s' "
+ "(not exported?)", name, plugin_lib->location);
return NULL;
+ }
- return symbol;
+ return func (plugin, data);
}
static gint
@@ -164,16 +165,14 @@ plugin_lib_construct (EPlugin *plugin, xmlNodePtr root)
static GtkWidget *
plugin_lib_get_configure_widget (EPlugin *plugin)
{
- EPluginLib *plugin_lib = E_PLUGIN_LIB (plugin);
EPluginLibGetConfigureWidgetFunc get_configure_widget;
- if (plugin_lib_loadmodule (plugin) != 0) {
- return NULL;
- }
+ get_configure_widget = plugin_lib_get_symbol (
+ plugin, "e_plugin_lib_get_configure_widget");
+
+ if (get_configure_widget != NULL)
+ return get_configure_widget (plugin);
- if (g_module_symbol (plugin_lib->module, "e_plugin_lib_get_configure_widget", (gpointer)&get_configure_widget)) {
- return (GtkWidget*) get_configure_widget (plugin);
- }
return NULL;
}
@@ -189,14 +188,10 @@ plugin_lib_enable (EPlugin *plugin, gint state)
if (!state && plugin_lib->module == NULL)
return;
- /* this will noop if we're disabling since we tested it above */
- if (plugin_lib_loadmodule (plugin) != 0)
- return;
+ enable = plugin_lib_get_symbol (plugin, "e_plugin_lib_enable");
- if (g_module_symbol (plugin_lib->module, "e_plugin_lib_enable", (gpointer) &enable)) {
- if (enable (plugin, state) != 0)
- return;
- }
+ if (enable != NULL)
+ enable (plugin, state);
}
static void
diff --git a/modules/plugin-lib/e-plugin-lib.h b/modules/plugin-lib/e-plugin-lib.h
index 6ca7d697a9..91f440bf49 100644
--- a/modules/plugin-lib/e-plugin-lib.h
+++ b/modules/plugin-lib/e-plugin-lib.h
@@ -57,7 +57,7 @@ typedef gpointer (*EPluginLibFunc) (EPlugin *ep, gpointer data);
* is disabled. */
typedef gint (*EPluginLibEnableFunc) (EPlugin *ep, gint enable);
-typedef gpointer (*EPluginLibGetConfigureWidgetFunc) (EPlugin *ep);
+typedef GtkWidget * (*EPluginLibGetConfigureWidgetFunc) (EPlugin *ep);
/**
* struct _EPluginLib -
diff --git a/modules/plugin-mono/e-plugin-mono.c b/modules/plugin-mono/e-plugin-mono.c
index 1c43fb9d56..f1fe76ff49 100644
--- a/modules/plugin-mono/e-plugin-mono.c
+++ b/modules/plugin-mono/e-plugin-mono.c
@@ -121,7 +121,8 @@ plugin_mono_invoke (EPlugin *plugin,
plugin_mono = E_PLUGIN_MONO (plugin);
priv = plugin_mono->priv;
- /* we need to do this every time since we may be called from any thread for some uses */
+ /* We need to do this every time since we may
+ * be called from any thread for some uses. */
mono_thread_attach (domain);
if (priv->assembly == NULL) {
@@ -135,7 +136,9 @@ plugin_mono_invoke (EPlugin *plugin,
}
if (plugin_mono->handler == NULL
- || (priv->class = mono_class_from_name (mono_assembly_get_image (priv->assembly), "", plugin_mono->handler)) == NULL) {
+ || (priv->class = mono_class_from_name (
+ mono_assembly_get_image (priv->assembly),
+ "", plugin_mono->handler)) == NULL) {
} else {
priv->plugin = mono_object_new (domain, priv->class);
/* could conceivably init with some context too */
diff --git a/plugins/google-account-setup/google-contacts-source.c b/plugins/google-account-setup/google-contacts-source.c
index 43f4f14c3f..d7554ebe10 100644
--- a/plugins/google-account-setup/google-contacts-source.c
+++ b/plugins/google-account-setup/google-contacts-source.c
@@ -41,164 +41,167 @@ void
ensure_google_contacts_source_group (void)
{
ESourceList *source_list;
+ const gchar *key;
- source_list = e_source_list_new_for_gconf_default ("/apps/evolution/addressbook/sources");
+ key = "/apps/evolution/addressbook/sources";
+ source_list = e_source_list_new_for_gconf_default (key);
- if (source_list == NULL) {
+ if (source_list == NULL)
return;
- }
- e_source_list_ensure_group (source_list, _("Google"), "google://", FALSE);
+ e_source_list_ensure_group (
+ source_list, _("Google"), "google://", FALSE);
g_object_unref (source_list);
}
void
remove_google_contacts_source_group (void)
{
- ESourceList *source_list;
- ESourceGroup *group;
+ ESourceList *source_list;
+ ESourceGroup *group;
+ const gchar *key;
- source_list = e_source_list_new_for_gconf_default ("/apps/evolution/addressbook/sources");
+ key = "/apps/evolution/addressbook/sources";
+ source_list = e_source_list_new_for_gconf_default (key);
- if (source_list == NULL) {
- return;
- }
+ if (source_list == NULL)
+ return;
- group = e_source_list_peek_group_by_base_uri (source_list, "google://");
+ group = e_source_list_peek_group_by_base_uri (source_list, "google://");
- if (group) {
- GSList *sources;
+ if (group) {
+ GSList *sources;
- sources = e_source_group_peek_sources (group);
+ sources = e_source_group_peek_sources (group);
- if (NULL == sources) {
- e_source_list_remove_group (source_list, group);
- e_source_list_sync (source_list, NULL);
- }
- }
- g_object_unref (source_list);
+ if (NULL == sources) {
+ e_source_list_remove_group (source_list, group);
+ e_source_list_sync (source_list, NULL);
+ }
+ }
+ g_object_unref (source_list);
}
static void
on_username_entry_changed (GtkEntry *entry, gpointer user_data)
{
- ESource *source = user_data;
- const gchar *text;
- gchar *username;
-
- text = gtk_entry_get_text (entry);
-
- if (strstr (text, "@")) {
- username = g_strdup (text);
- } else {
- username = g_strdup_printf ("%s@gmail.com", text);
- }
-
- e_source_set_relative_uri (source, username);
- e_source_set_property (source, "username", username);
- e_source_set_property (source, "auth", "plain/password");
- g_free (username);
+ ESource *source = user_data;
+ const gchar *text;
+ gchar *username;
+
+ text = gtk_entry_get_text (entry);
+
+ if (strstr (text, "@")) {
+ username = g_strdup (text);
+ } else {
+ username = g_strdup_printf ("%s@gmail.com", text);
+ }
+
+ e_source_set_relative_uri (source, username);
+ e_source_set_property (source, "username", username);
+ e_source_set_property (source, "auth", "plain/password");
+ g_free (username);
}
static void
on_ssl_cb_toggled (GtkToggleButton *tb, gpointer user_data)
{
- ESource *source = user_data;
+ ESource *source = user_data;
- if (gtk_toggle_button_get_active (tb)) {
- e_source_set_property (source, "use-ssl", "true");
- } else {
- e_source_set_property (source, "use-ssl", "false");
- }
+ if (gtk_toggle_button_get_active (tb)) {
+ e_source_set_property (source, "use-ssl", "true");
+ } else {
+ e_source_set_property (source, "use-ssl", "false");
+ }
}
typedef enum {
- MINUTES,
- HOURS,
- DAYS,
- WEEKS
+ MINUTES,
+ HOURS,
+ DAYS,
+ WEEKS
} IntervalType;
static void
seconds_to_interval (guint seconds, IntervalType *type, gint *time)
{
- gint minutes = seconds / 60;
-
- *type = MINUTES;
- *time = minutes;
- if (minutes && !(minutes % 10080)) {
- *type = WEEKS;
- *time = minutes / 10080;
- } else if (minutes && !(minutes % 1440)) {
- *type = DAYS;
- *time = minutes / 1440;
- } else if (minutes && !(minutes % 60)) {
- *type = HOURS;
- *time = minutes / 60;
- }
+ gint minutes = seconds / 60;
+
+ *type = MINUTES;
+ *time = minutes;
+ if (minutes && !(minutes % 10080)) {
+ *type = WEEKS;
+ *time = minutes / 10080;
+ } else if (minutes && !(minutes % 1440)) {
+ *type = DAYS;
+ *time = minutes / 1440;
+ } else if (minutes && !(minutes % 60)) {
+ *type = HOURS;
+ *time = minutes / 60;
+ }
}
static guint
interval_to_seconds (IntervalType type, gint time)
{
- switch (type) {
- case MINUTES:
- return time * 60;
- case HOURS:
- return time * 60 * 60;
- case DAYS:
- return time * 60 * 60 * 24;
- case WEEKS:
- return time * 60 * 60 * 24 * 7;
- default:
- g_warning ("Time unit out of range");
- break;
- }
- return 0;
+ switch (type) {
+ case MINUTES:
+ return time * 60;
+ case HOURS:
+ return time * 60 * 60;
+ case DAYS:
+ return time * 60 * 60 * 24;
+ case WEEKS:
+ return time * 60 * 60 * 24 * 7;
+ default:
+ g_warning ("Time unit out of range");
+ break;
+ }
+ return 0;
}
static void
on_interval_sb_value_changed (GtkSpinButton *sb, gpointer user_data)
{
- ESource *source = user_data;
- gdouble time;
- guint seconds;
- gchar *value_string;
- GtkWidget *interval_combo;
- IntervalType type;
+ ESource *source = user_data;
+ gdouble time;
+ guint seconds;
+ gchar *value_string;
+ GtkWidget *interval_combo;
+ IntervalType type;
- interval_combo = g_object_get_data (G_OBJECT (sb), "interval-combo");
- type = gtk_combo_box_get_active (GTK_COMBO_BOX (interval_combo));
+ interval_combo = g_object_get_data (G_OBJECT (sb), "interval-combo");
+ type = gtk_combo_box_get_active (GTK_COMBO_BOX (interval_combo));
- time = gtk_spin_button_get_value (sb);
+ time = gtk_spin_button_get_value (sb);
- seconds = interval_to_seconds (type, time);
+ seconds = interval_to_seconds (type, time);
- value_string = g_strdup_printf ("%u", seconds);
- e_source_set_property (source, "refresh-interval", value_string);
- g_free (value_string);
+ value_string = g_strdup_printf ("%u", seconds);
+ e_source_set_property (source, "refresh-interval", value_string);
+ g_free (value_string);
}
static void
on_interval_combo_changed (GtkComboBox *combo, gpointer user_data)
{
- ESource *source = user_data;
- gdouble time;
- guint seconds;
- gchar *value_string;
- GtkWidget *sb;
- IntervalType type;
+ ESource *source = user_data;
+ gdouble time;
+ guint seconds;
+ gchar *value_string;
+ GtkWidget *sb;
+ IntervalType type;
- sb = g_object_get_data (G_OBJECT (combo), "interval-sb");
- type = gtk_combo_box_get_active (combo);
+ sb = g_object_get_data (G_OBJECT (combo), "interval-sb");
+ type = gtk_combo_box_get_active (combo);
- time = gtk_spin_button_get_value (GTK_SPIN_BUTTON (sb));
+ time = gtk_spin_button_get_value (GTK_SPIN_BUTTON (sb));
- seconds = interval_to_seconds (type, time);
+ seconds = interval_to_seconds (type, time);
- value_string = g_strdup_printf ("%u", seconds);
- e_source_set_property (source, "refresh-interval", value_string);
- g_free (value_string);
+ value_string = g_strdup_printf ("%u", seconds);
+ e_source_set_property (source, "refresh-interval", value_string);
+ g_free (value_string);
}
struct ui_data {
@@ -217,146 +220,146 @@ destroy_ui_data(gpointer data)
}
GtkWidget *
-plugin_google_contacts (EPlugin *epl,
+plugin_google_contacts (EPlugin *epl,
EConfigHookItemFactoryData *data)
{
- EABConfigTargetSource *t = (EABConfigTargetSource *) data->target;
- ESource *source;
- ESourceGroup *group;
- const gchar *base_uri;
- const gchar *username;
- const gchar *refresh_interval_str;
- guint refresh_interval;
- const gchar *use_ssl_str;
- gboolean use_ssl;
- GtkWidget *parent;
- GtkWidget *vbox;
-
- GtkWidget *section;
- GtkWidget *vbox2;
-
- GtkWidget *hbox;
- GtkWidget *spacer;
- GtkWidget *label;
- GtkWidget *username_entry;
-
- GtkWidget *interval_sb;
- GtkWidget *interval_combo;
- IntervalType type;
- gint time;
-
- GtkWidget *ssl_cb;
- struct ui_data *ui;
-
- source = t->source;
- group = e_source_peek_group (source);
-
- base_uri = e_source_group_peek_base_uri (group);
-
- g_object_set_data (G_OBJECT (epl), "gwidget", NULL);
-
- if (g_ascii_strncasecmp ("google://", base_uri, 9) != 0) {
- return NULL;
- }
-
- /* Build up the UI */
- parent = data->parent;
- vbox = gtk_widget_get_ancestor (gtk_widget_get_parent (parent), GTK_TYPE_VBOX);
-
- vbox2 = gtk_vbox_new (FALSE, 6);
- gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
-
- section = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (section), _("<b>Server</b>"));
- gtk_misc_set_alignment (GTK_MISC (section), 0.0, 0.0);
- gtk_box_pack_start (GTK_BOX (vbox2), section, FALSE, FALSE, 0);
-
- hbox = gtk_hbox_new (FALSE, 10);
- gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
-
- spacer = gtk_label_new (" ");
- gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
-
- label = gtk_label_new_with_mnemonic (_("User_name:"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- username_entry = gtk_entry_new ();
- username = e_source_get_property (source, "username");
- if (username) {
- gtk_entry_set_text (GTK_ENTRY (username_entry), username);
- }
- gtk_box_pack_start (GTK_BOX (hbox), username_entry, TRUE, TRUE, 0);
-
- hbox = gtk_hbox_new (FALSE, 10);
- gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
-
- spacer = gtk_label_new (" ");
- gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
-
- use_ssl_str = e_source_get_property (source, "use-ssl");
- if (use_ssl_str && ('1' == use_ssl_str[0] ||
- 0 == g_ascii_strcasecmp (use_ssl_str, "true"))) {
- use_ssl = 1;
- } else {
- use_ssl = 0;
- }
- ssl_cb = gtk_check_button_new_with_mnemonic (_("Use _SSL"));
- gtk_box_pack_start (GTK_BOX (hbox), ssl_cb, FALSE, FALSE, 0);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ssl_cb),
- use_ssl);
-
- hbox = gtk_hbox_new (FALSE, 10);
- gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
-
- spacer = gtk_label_new (" ");
- gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
-
- refresh_interval_str = e_source_get_property (source, "refresh-interval");
- if (refresh_interval_str &&
- (1 == sscanf (refresh_interval_str, "%u", &refresh_interval))) {
- } else {
- refresh_interval = -1;
- }
- seconds_to_interval (refresh_interval, &type, &time);
-
- label = gtk_label_new_with_mnemonic (_("Re_fresh:"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- interval_sb = gtk_spin_button_new_with_range (1, 100, 1);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (interval_sb), time);
- gtk_box_pack_start (GTK_BOX (hbox), interval_sb, FALSE, FALSE, 0);
-
- interval_combo = gtk_combo_box_new_text ();
- gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("minutes"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("hours"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("days"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("weeks"));
- gtk_combo_box_set_active (GTK_COMBO_BOX (interval_combo), type);
- gtk_box_pack_start (GTK_BOX (hbox), interval_combo, FALSE, FALSE, 0);
-
- gtk_widget_show_all (vbox2);
-
- g_object_set_data (G_OBJECT (interval_sb), "interval-combo", interval_combo);
- g_object_set_data (G_OBJECT (interval_combo), "interval-sb", interval_sb);
-
- ui = g_malloc0 (sizeof (struct ui_data));
- ui->widget = vbox2;
- g_object_set_data_full(G_OBJECT(epl), "gwidget", ui, destroy_ui_data);
- g_signal_connect (ui->widget, "destroy", G_CALLBACK (gtk_widget_destroyed), &ui->widget);
-
- g_signal_connect (G_OBJECT (username_entry), "changed",
- G_CALLBACK (on_username_entry_changed),
- source);
- g_signal_connect (G_OBJECT (interval_combo), "changed",
- G_CALLBACK (on_interval_combo_changed),
- source);
- g_signal_connect (G_OBJECT (ssl_cb), "toggled",
- G_CALLBACK (on_ssl_cb_toggled),
- source);
- g_signal_connect (G_OBJECT (interval_sb), "value-changed",
- G_CALLBACK (on_interval_sb_value_changed),
- source);
-
- return NULL;
+ EABConfigTargetSource *t = (EABConfigTargetSource *) data->target;
+ ESource *source;
+ ESourceGroup *group;
+ const gchar *base_uri;
+ const gchar *username;
+ const gchar *refresh_interval_str;
+ guint refresh_interval;
+ const gchar *use_ssl_str;
+ gboolean use_ssl;
+ GtkWidget *parent;
+ GtkWidget *vbox;
+
+ GtkWidget *section;
+ GtkWidget *vbox2;
+
+ GtkWidget *hbox;
+ GtkWidget *spacer;
+ GtkWidget *label;
+ GtkWidget *username_entry;
+
+ GtkWidget *interval_sb;
+ GtkWidget *interval_combo;
+ IntervalType type;
+ gint time;
+
+ GtkWidget *ssl_cb;
+ struct ui_data *ui;
+
+ source = t->source;
+ group = e_source_peek_group (source);
+
+ base_uri = e_source_group_peek_base_uri (group);
+
+ g_object_set_data (G_OBJECT (epl), "gwidget", NULL);
+
+ if (g_ascii_strncasecmp ("google://", base_uri, 9) != 0)
+ return NULL;
+
+ /* Build up the UI */
+ parent = data->parent;
+ vbox = gtk_widget_get_ancestor (
+ gtk_widget_get_parent (parent), GTK_TYPE_VBOX);
+
+ vbox2 = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
+
+ section = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (section), _("<b>Server</b>"));
+ gtk_misc_set_alignment (GTK_MISC (section), 0.0, 0.0);
+ gtk_box_pack_start (GTK_BOX (vbox2), section, FALSE, FALSE, 0);
+
+ hbox = gtk_hbox_new (FALSE, 10);
+ gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
+
+ spacer = gtk_label_new (" ");
+ gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
+
+ label = gtk_label_new_with_mnemonic (_("User_name:"));
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+ username_entry = gtk_entry_new ();
+ username = e_source_get_property (source, "username");
+ if (username)
+ gtk_entry_set_text (GTK_ENTRY (username_entry), username);
+ gtk_box_pack_start (GTK_BOX (hbox), username_entry, TRUE, TRUE, 0);
+
+ hbox = gtk_hbox_new (FALSE, 10);
+ gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
+
+ spacer = gtk_label_new (" ");
+ gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
+
+ use_ssl_str = e_source_get_property (source, "use-ssl");
+ if (use_ssl_str && ('1' == use_ssl_str[0] ||
+ 0 == g_ascii_strcasecmp (use_ssl_str, "true"))) {
+ use_ssl = 1;
+ } else {
+ use_ssl = 0;
+ }
+ ssl_cb = gtk_check_button_new_with_mnemonic (_("Use _SSL"));
+ gtk_box_pack_start (GTK_BOX (hbox), ssl_cb, FALSE, FALSE, 0);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ssl_cb), use_ssl);
+
+ hbox = gtk_hbox_new (FALSE, 10);
+ gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
+
+ spacer = gtk_label_new (" ");
+ gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
+
+ refresh_interval_str = e_source_get_property (source, "refresh-interval");
+ if (refresh_interval_str &&
+ (1 == sscanf (refresh_interval_str, "%u", &refresh_interval))) {
+ } else {
+ refresh_interval = -1;
+ }
+ seconds_to_interval (refresh_interval, &type, &time);
+
+ label = gtk_label_new_with_mnemonic (_("Re_fresh:"));
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+ interval_sb = gtk_spin_button_new_with_range (1, 100, 1);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (interval_sb), time);
+ gtk_box_pack_start (GTK_BOX (hbox), interval_sb, FALSE, FALSE, 0);
+
+ interval_combo = gtk_combo_box_new_text ();
+ gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("minutes"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("hours"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("days"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("weeks"));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (interval_combo), type);
+ gtk_box_pack_start (GTK_BOX (hbox), interval_combo, FALSE, FALSE, 0);
+
+ gtk_widget_show_all (vbox2);
+
+ g_object_set_data (G_OBJECT (interval_sb), "interval-combo", interval_combo);
+ g_object_set_data (G_OBJECT (interval_combo), "interval-sb", interval_sb);
+
+ ui = g_malloc0 (sizeof (struct ui_data));
+ ui->widget = vbox2;
+ g_object_set_data_full(G_OBJECT(epl), "gwidget", ui, destroy_ui_data);
+ g_signal_connect (
+ ui->widget, "destroy",
+ G_CALLBACK (gtk_widget_destroyed), &ui->widget);
+
+ g_signal_connect (
+ username_entry, "changed",
+ G_CALLBACK (on_username_entry_changed), source);
+ g_signal_connect (
+ interval_combo, "changed",
+ G_CALLBACK (on_interval_combo_changed), source);
+ g_signal_connect (
+ ssl_cb, "toggled",
+ G_CALLBACK (on_ssl_cb_toggled), source);
+ g_signal_connect (
+ interval_sb, "value-changed",
+ G_CALLBACK (on_interval_sb_value_changed), source);
+
+ return NULL;
}
diff --git a/plugins/groupwise-features/junk-mail-settings.c b/plugins/groupwise-features/junk-mail-settings.c
index 61a5cb0ac9..b868e28c5a 100644
--- a/plugins/groupwise-features/junk-mail-settings.c
+++ b/plugins/groupwise-features/junk-mail-settings.c
@@ -104,7 +104,9 @@ gw_junk_mail_settings_cb (GtkAction *action, EShellView *shell_view)
while (page_count > 0 ) {
notebook = gtk_notebook_new ();
gtk_notebook_append_page ((GtkNotebook *)notebook, box, NULL);
- gtk_box_pack_start ((GtkBox *) ((GtkDialog *) dialog)->vbox, notebook, TRUE, TRUE, 0);
+ gtk_box_pack_start (
+ (GtkBox *) ((GtkDialog *) dialog)->vbox,
+ notebook, TRUE, TRUE, 0);
}
if (page_count == 0)
diff --git a/plugins/groupwise-features/mail-send-options.c b/plugins/groupwise-features/mail-send-options.c
index 1db2209f4b..d6c6f32095 100644
--- a/plugins/groupwise-features/mail-send-options.c
+++ b/plugins/groupwise-features/mail-send-options.c
@@ -156,6 +156,7 @@ from_changed_cb (EComposerFromHeader *header, EMsgComposer *composer)
{
GtkActionGroup *group;
GtkAction *action;
+ EAccount *account;
g_return_if_fail (header != NULL);
g_return_if_fail (composer != NULL);
@@ -166,7 +167,8 @@ from_changed_cb (EComposerFromHeader *header, EMsgComposer *composer)
action = gtk_action_group_get_action (group, "gw-send-options");
g_return_if_fail (action != NULL);
- gtk_action_set_visible (action, account_is_groupwise (e_composer_from_header_get_active (header)));
+ account = e_composer_from_header_get_active (header);
+ gtk_action_set_visible (action, account_is_groupwise (account));
}
static void
@@ -216,7 +218,9 @@ gw_ui_composer_actions (GtkUIManager *manager, EMsgComposer *composer)
header = e_composer_header_table_get_header (headers, E_COMPOSER_HEADER_FROM);
from_changed_cb (E_COMPOSER_FROM_HEADER (header), composer);
- g_signal_connect (G_OBJECT (header), "changed", G_CALLBACK (from_changed_cb), composer);
+ g_signal_connect (
+ header, "changed",
+ G_CALLBACK (from_changed_cb), composer);
return TRUE;
}
diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c
index f1b05ea477..d8cddd03fe 100644
--- a/plugins/groupwise-features/status-track.c
+++ b/plugins/groupwise-features/status-track.c
@@ -60,7 +60,9 @@ format_date (const gchar * value)
}
static CamelMimeMessage *
-get_selected_message (EShellView *shell_view, CamelFolder **folder, gchar **selected_uid)
+get_selected_message (EShellView *shell_view,
+ CamelFolder **folder,
+ gchar **selected_uid)
{
CamelMimeMessage *msg = NULL;
EShellContent *shell_content;
@@ -85,7 +87,8 @@ get_selected_message (EShellView *shell_view, CamelFolder **folder, gchar **sele
}
void
-gw_track_message_status_cb (GtkAction *action, EShellView *shell_view)
+gw_track_message_status_cb (GtkAction *action,
+ EShellView *shell_view)
{
CamelMimeMessage *msg = NULL;
CamelFolder *folder = NULL;
@@ -188,7 +191,9 @@ gw_track_message_status_cb (GtkAction *action, EShellView *shell_view)
if (E_IS_GW_CONNECTION(cnc)) {
GSList *recipient_list;
- e_gw_connection_get_item (cnc, get_container_id (cnc, "Sent Items"), selected_uid, "distribution recipientStatus", &gwitem);
+ e_gw_connection_get_item (
+ cnc, get_container_id (cnc, "Sent Items"),
+ selected_uid, "distribution recipientStatus", &gwitem);
recipient_list = e_gw_item_get_recipient_list (gwitem);
for (;recipient_list != NULL; recipient_list = recipient_list->next)
{
diff --git a/plugins/image-inline/image-inline.c b/plugins/image-inline/image-inline.c
index d3aa595951..fdff39a921 100644
--- a/plugins/image-inline/image-inline.c
+++ b/plugins/image-inline/image-inline.c
@@ -278,12 +278,17 @@ org_gnome_image_inline_pobject_free (EMFormatHTMLPObject *object)
if (image_object->widget != NULL) {
GtkWidget *parent;
- g_signal_handlers_disconnect_by_func (image_object->widget, button_press_press_cb, image_object);
- g_signal_handlers_disconnect_by_func (image_object->widget, drag_data_get_cb, image_object);
+ g_signal_handlers_disconnect_by_func (
+ image_object->widget,
+ button_press_press_cb, image_object);
+ g_signal_handlers_disconnect_by_func (
+ image_object->widget,
+ drag_data_get_cb, image_object);
parent = gtk_widget_get_parent (image_object->widget);
- if (parent)
- g_signal_handlers_disconnect_by_func (parent, size_allocate_cb, image_object);
+ if (parent != NULL)
+ g_signal_handlers_disconnect_by_func (
+ parent, size_allocate_cb, image_object);
g_object_unref (image_object->widget);
image_object->widget = NULL;
diff --git a/plugins/save-calendar/csv-format.c b/plugins/save-calendar/csv-format.c
index a5256c4c36..c3f566de4b 100644
--- a/plugins/save-calendar/csv-format.c
+++ b/plugins/save-calendar/csv-format.c
@@ -57,8 +57,10 @@ display_error_message (GtkWidget *parent, GError *error)
{
GtkWidget *dialog;
- dialog = gtk_message_dialog_new (GTK_WINDOW (parent), 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", error->message);
+ dialog = gtk_message_dialog_new (
+ GTK_WINDOW (parent), 0,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+ "%s", error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
@@ -135,10 +137,12 @@ add_nummeric_to_csv (GString *line, gint *nummeric, CsvConfig *config)
*/
if (nummeric)
- g_string_append_printf (line, "%s%d", (*nummeric<10 && *nummeric>-1)?"0":"", *nummeric);
+ g_string_append_printf (
+ line, "%s%d",
+ (*nummeric < 10 && *nummeric > -1) ? "0" : "",
+ *nummeric);
- line = g_string_append (line, config->delimiter);
- return line;
+ return g_string_append (line, config->delimiter);
}
static GString *
@@ -295,7 +299,10 @@ userstring_to_systemstring (const gchar *userstring)
}
static void
-do_save_calendar_csv (FormatHandler *handler, ESourceSelector *selector, ECalSourceType type, gchar *dest_uri)
+do_save_calendar_csv (FormatHandler *handler,
+ ESourceSelector *selector,
+ ECalSourceType type,
+ gchar *dest_uri)
{
/*
@@ -341,7 +348,9 @@ do_save_calendar_csv (FormatHandler *handler, ESourceSelector *selector, ECalSou
config->quote = userstring_to_systemstring (tmp?tmp:"\"");
config->header = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (d->header_check));
- stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (selector))), dest_uri, &error);
+ stream = open_for_writing (
+ GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (selector))),
+ dest_uri, &error);
if (stream && e_cal_get_object_list_as_comp (source_client, "#t", &objects, NULL)) {
@@ -517,7 +526,8 @@ static GtkWidget *
create_options_widget (FormatHandler *handler)
{
GtkWidget *table = gtk_table_new (4, 2, FALSE), *label = NULL,
- *csv_options = gtk_expander_new_with_mnemonic (_("A_dvanced options for the CSV format")),
+ *csv_options = gtk_expander_new_with_mnemonic (
+ _("A_dvanced options for the CSV format")),
*vbox = gtk_vbox_new (FALSE, 0);
CsvPluginData *d = handler->data;
diff --git a/shell/es-event.h b/shell/es-event.h
index 7bb9fcd781..9729d6f481 100644
--- a/shell/es-event.h
+++ b/shell/es-event.h
@@ -89,14 +89,21 @@ struct _ESEventClass {
EEventClass event_class;
};
-GType es_event_get_type(void);
-
-ESEvent *es_event_peek(void);
-
-ESEventTargetShell *es_event_target_new(ESEvent *eme);
-ESEventTargetState *es_event_target_new_state(ESEvent *emp, gint state);
-ESEventTargetUpgrade *es_event_target_new_upgrade(ESEvent *emp, gint major, gint minor, gint revision);
-ESEventTargetComponent *es_event_target_new_component(ESEvent *eme, const gchar *id);
+GType es_event_get_type (void);
+ESEvent * es_event_peek (void);
+ESEventTargetShell *
+ es_event_target_new (ESEvent *eme);
+ESEventTargetState *
+ es_event_target_new_state (ESEvent *emp,
+ gint state);
+ESEventTargetUpgrade *
+ es_event_target_new_upgrade (ESEvent *event,
+ gint major,
+ gint minor,
+ gint revision);
+ESEventTargetComponent *
+ es_event_target_new_component (ESEvent *event,
+ const gchar *id);
/* ********************************************************************** */
@@ -111,7 +118,7 @@ struct _ESEventHookClass {
EEventHookClass hook_class;
};
-GType es_event_hook_get_type(void);
+GType es_event_hook_get_type (void);
G_END_DECLS
diff --git a/widgets/menus/gal-view-factory-etable.c b/widgets/menus/gal-view-factory-etable.c
index def35a82b4..3eb9d99d57 100644
--- a/widgets/menus/gal-view-factory-etable.c
+++ b/widgets/menus/gal-view-factory-etable.c
@@ -94,7 +94,8 @@ gal_view_factory_etable_init (GalViewFactoryEtable *factory)
GalViewFactory *
gal_view_factory_etable_new (ETableSpecification *spec)
{
- return gal_view_factory_etable_construct (g_object_new (GAL_VIEW_FACTORY_ETABLE_TYPE, NULL), spec);
+ return gal_view_factory_etable_construct (
+ g_object_new (GAL_VIEW_FACTORY_ETABLE_TYPE, NULL), spec);
}
/**
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 6d12cae087..8b1a6d2409 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -153,8 +153,10 @@ emit_event (GnomeCanvas *canvas, GdkEvent *event)
item = canvas->current_item;
- if (canvas->focused_item
- && ((event->type == GDK_KEY_PRESS) || (event->type == GDK_KEY_RELEASE) || (event->type == GDK_FOCUS_CHANGE)))
+ if (canvas->focused_item &&
+ ((event->type == GDK_KEY_PRESS) ||
+ (event->type == GDK_KEY_RELEASE) ||
+ (event->type == GDK_FOCUS_CHANGE)))
item = canvas->focused_item;
if (canvas->grabbed_item)
@@ -279,8 +281,12 @@ e_canvas_key (GtkWidget *widget, GdkEventKey *event)
#define HACKISH_AFFINE
static double
-gnome_canvas_item_invoke_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy,
- GnomeCanvasItem **actual_item)
+gnome_canvas_item_invoke_point (GnomeCanvasItem *item,
+ gdouble x,
+ gdouble y,
+ gint cx,
+ gint cy,
+ GnomeCanvasItem **actual_item)
{
#ifdef HACKISH_AFFINE
gdouble i2w[6], w2c[6], i2c[6], c2i[6];
@@ -327,7 +333,6 @@ pick_current_item (GnomeCanvas *canvas, GdkEvent *event)
| GDK_BUTTON3_MASK
| GDK_BUTTON4_MASK
| GDK_BUTTON5_MASK);
- d(g_print ("%s:%d: button_down = %s\n", __FUNCTION__, __LINE__, button_down ? "TRUE" : "FALSE"));
if (!button_down)
canvas->left_grabbed_item = FALSE;
@@ -630,7 +635,9 @@ ec_style_set_recursive (GnomeCanvasItem *item, GtkStyle *previous_style)
if (signal_id >= 1) {
GSignalQuery query;
g_signal_query (signal_id, &query);
- if (query.return_type == G_TYPE_NONE && query.n_params == 1 && query.param_types[0] == GTK_TYPE_STYLE) {
+ if (query.return_type == G_TYPE_NONE &&
+ query.n_params == 1 &&
+ query.param_types[0] == GTK_TYPE_STYLE) {
g_signal_emit (item, signal_id, 0, previous_style);
}
}
@@ -645,7 +652,9 @@ ec_style_set_recursive (GnomeCanvasItem *item, GtkStyle *previous_style)
static void
e_canvas_style_set (GtkWidget *widget, GtkStyle *previous_style)
{
- ec_style_set_recursive (GNOME_CANVAS_ITEM (gnome_canvas_root (GNOME_CANVAS (widget))), previous_style);
+ ec_style_set_recursive (
+ GNOME_CANVAS_ITEM (gnome_canvas_root (GNOME_CANVAS (widget))),
+ previous_style);
}
static void
@@ -745,7 +754,8 @@ add_idle (ECanvas *canvas)
if (canvas->idle_id != 0)
return;
- canvas->idle_id = g_idle_add_full (G_PRIORITY_HIGH_IDLE, idle_handler, (gpointer) canvas, NULL);
+ canvas->idle_id = g_idle_add_full (
+ G_PRIORITY_HIGH_IDLE, idle_handler, (gpointer) canvas, NULL);
}
static void
@@ -797,12 +807,13 @@ grab_cancelled_check (gpointer data)
}
if (gtk_grab_get_current ()) {
- gnome_canvas_item_ungrab(GNOME_CANVAS (canvas)->grabbed_item, canvas->grab_cancelled_time);
- if (canvas->grab_cancelled_cb) {
- canvas->grab_cancelled_cb (canvas,
- GNOME_CANVAS (canvas)->grabbed_item,
- canvas->grab_cancelled_data);
- }
+ gnome_canvas_item_ungrab (
+ GNOME_CANVAS (canvas)->grabbed_item,
+ canvas->grab_cancelled_time);
+ if (canvas->grab_cancelled_cb)
+ canvas->grab_cancelled_cb (
+ canvas, GNOME_CANVAS (canvas)->grabbed_item,
+ canvas->grab_cancelled_data);
canvas->grab_cancelled_cb = NULL;
canvas->grab_cancelled_check_id = 0;
canvas->grab_cancelled_time = 0;
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index f4968432a0..809841b114 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -223,7 +223,7 @@ e_map_destroy (GtkObject *object)
EMapPrivate *priv;
g_return_if_fail (object != NULL);
- g_return_if_fail (IS_E_MAP (object));
+ g_return_if_fail (E_IS_MAP (object));
view = E_MAP (object);
priv = view->priv;
@@ -244,7 +244,7 @@ e_map_finalize (GObject *object)
EMapPrivate *priv;
g_return_if_fail (object != NULL);
- g_return_if_fail (IS_E_MAP (object));
+ g_return_if_fail (E_IS_MAP (object));
view = E_MAP (object);
priv = view->priv;
@@ -280,7 +280,7 @@ static void
e_map_unmap (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
- g_return_if_fail (IS_E_MAP (widget));
+ g_return_if_fail (E_IS_MAP (widget));
if (GTK_WIDGET_CLASS (parent_class)->unmap)
(*GTK_WIDGET_CLASS (parent_class)->unmap) (widget);
@@ -298,7 +298,7 @@ e_map_realize (GtkWidget *widget)
gint attr_mask;
g_return_if_fail (widget != NULL);
- g_return_if_fail (IS_E_MAP (widget));
+ g_return_if_fail (E_IS_MAP (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
@@ -337,7 +337,7 @@ static void
e_map_unrealize (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
- g_return_if_fail (IS_E_MAP (widget));
+ g_return_if_fail (E_IS_MAP (widget));
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(*GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
@@ -352,7 +352,7 @@ e_map_size_request (GtkWidget *widget, GtkRequisition *requisition)
EMapPrivate *priv;
g_return_if_fail (widget != NULL);
- g_return_if_fail (IS_E_MAP (widget));
+ g_return_if_fail (E_IS_MAP (widget));
g_return_if_fail (requisition != NULL);
view = E_MAP (widget);
@@ -373,7 +373,7 @@ e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
GdkRectangle area;
g_return_if_fail (widget != NULL);
- g_return_if_fail (IS_E_MAP (widget));
+ g_return_if_fail (E_IS_MAP (widget));
g_return_if_fail (allocation != NULL);
view = E_MAP (widget);
@@ -449,7 +449,7 @@ e_map_expose (GtkWidget *widget, GdkEventExpose *event)
EMap *view;
g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (IS_E_MAP (widget), FALSE);
+ g_return_val_if_fail (E_IS_MAP (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
view = E_MAP (widget);
@@ -468,7 +468,7 @@ e_map_set_scroll_adjustments (GtkWidget *widget, GtkAdjustment *hadj, GtkAdjustm
gboolean need_adjust;
g_return_if_fail (widget != NULL);
- g_return_if_fail (IS_E_MAP (widget));
+ g_return_if_fail (E_IS_MAP (widget));
view = E_MAP (widget);
priv = view->priv;
@@ -616,7 +616,7 @@ e_map_new (void)
GtkWidget *widget;
AtkObject *a11y;
- widget = g_object_new (TYPE_E_MAP, NULL);
+ widget = g_object_new (E_TYPE_MAP, NULL);
a11y = gtk_widget_get_accessible (widget);
atk_object_set_name (a11y, _("World Map"));
atk_object_set_role (a11y, ATK_ROLE_IMAGE);
diff --git a/widgets/misc/e-map.h b/widgets/misc/e-map.h
index 4730f7662b..059da7c2a5 100644
--- a/widgets/misc/e-map.h
+++ b/widgets/misc/e-map.h
@@ -26,11 +26,26 @@
#include <gtk/gtk.h>
-#define TYPE_E_MAP (e_map_get_type ())
-#define E_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_E_MAP, EMap))
-#define E_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_E_MAP, EMapClass))
-#define IS_E_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_E_MAP))
-#define IS_E_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_E_MAP))
+/* Standard GObject macros */
+#define E_TYPE_MAP \
+ (e_map_get_type ())
+#define E_MAP(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_MAP, EMap))
+#define E_MAP_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_MAP, EMapClass))
+#define E_IS_MAP(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_MAP))
+#define E_IS_MAP_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_MAP))
+#define E_MAP_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_MAP, EMapClass))
+
+G_BEGIN_DECLS
typedef struct _EMap EMap;
typedef struct _EMapClass EMapClass;
@@ -56,8 +71,7 @@ struct _EMapClass {
/* The definition of Dot */
-struct _EMapPoint
-{
+struct _EMapPoint {
gchar *name; /* Can be NULL */
gdouble longitude, latitude;
guint32 rgba;
@@ -132,4 +146,6 @@ gboolean e_map_point_is_in_view (EMap *map, EMapPoint *point);
EMapPoint *e_map_get_closest_point (EMap *map, gdouble longitude, gdouble latitude,
gboolean in_view);
+G_END_DECLS
+
#endif
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c
index ca1d842526..a66ef1ccd3 100644
--- a/widgets/table/e-cell-date.c
+++ b/widgets/table/e-cell-date.c
@@ -114,5 +114,7 @@ e_cell_date_set_format_component (ECellDate *ecd, const gchar *fmt_component)
{
g_return_if_fail (ecd != NULL);
- g_object_set_data_full ((GObject *)ecd, "fmt-component", g_strdup (fmt_component), g_free);
+ g_object_set_data_full (
+ G_OBJECT (ecd), "fmt-component",
+ g_strdup (fmt_component), g_free);
}
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index 7193ab87c6..aae71bcc06 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -106,9 +106,11 @@ e_table_group_new (GnomeCanvasGroup *parent,
g_return_val_if_fail (model != NULL, NULL);
if (n < e_table_sort_info_grouping_get_count(sort_info)) {
- return e_table_group_container_new (parent, full_header, header, model, sort_info, n);
+ return e_table_group_container_new (
+ parent, full_header, header, model, sort_info, n);
} else {
- return e_table_group_leaf_new (parent, full_header, header, model, sort_info);
+ return e_table_group_leaf_new (
+ parent, full_header, header, model, sort_info);
}
}
@@ -372,7 +374,11 @@ e_table_group_get_printable (ETableGroup *etg)
* %ETableGroup is removed from the value y points to.
*/
void
-e_table_group_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col)
+e_table_group_compute_location (ETableGroup *etg,
+ gint *x,
+ gint *y,
+ gint *row,
+ gint *col)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
@@ -467,7 +473,10 @@ e_table_group_cursor_activated (ETableGroup *e_table_group, gint row)
* This routine emits the "double_click" signal.
*/
void
-e_table_group_double_click (ETableGroup *e_table_group, gint row, gint col, GdkEvent *event)
+e_table_group_double_click (ETableGroup *e_table_group,
+ gint row,
+ gint col,
+ GdkEvent *event)
{
g_return_if_fail (e_table_group != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (e_table_group));
@@ -487,7 +496,10 @@ e_table_group_double_click (ETableGroup *e_table_group, gint row, gint col, GdkE
* This routine emits the "right_click" signal.
*/
gint
-e_table_group_right_click (ETableGroup *e_table_group, gint row, gint col, GdkEvent *event)
+e_table_group_right_click (ETableGroup *e_table_group,
+ gint row,
+ gint col,
+ GdkEvent *event)
{
gint return_val = 0;
@@ -511,7 +523,10 @@ e_table_group_right_click (ETableGroup *e_table_group, gint row, gint col, GdkEv
* This routine emits the "click" signal.
*/
gint
-e_table_group_click (ETableGroup *e_table_group, gint row, gint col, GdkEvent *event)
+e_table_group_click (ETableGroup *e_table_group,
+ gint row,
+ gint col,
+ GdkEvent *event)
{
gint return_val = 0;
@@ -535,7 +550,10 @@ e_table_group_click (ETableGroup *e_table_group, gint row, gint col, GdkEvent *e
* This routine emits the "key_press" signal.
*/
gint
-e_table_group_key_press (ETableGroup *e_table_group, gint row, gint col, GdkEvent *event)
+e_table_group_key_press (ETableGroup *e_table_group,
+ gint row,
+ gint col,
+ GdkEvent *event)
{
gint return_val = 0;
@@ -559,7 +577,10 @@ e_table_group_key_press (ETableGroup *e_table_group, gint row, gint col, GdkEven
* This routine emits the "start_drag" signal.
*/
gint
-e_table_group_start_drag (ETableGroup *e_table_group, gint row, gint col, GdkEvent *event)
+e_table_group_start_drag (ETableGroup *e_table_group,
+ gint row,
+ gint col,
+ GdkEvent *event)
{
gint return_val = 0;
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index b39d86bcd4..7c75b58963 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -183,7 +183,10 @@ e_table_header_item_get_height (ETableHeaderItem *ethi)
}
static void
-ethi_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
+ethi_update (GnomeCanvasItem *item,
+ gdouble *affine,
+ ArtSVP *clip_path,
+ gint flags)
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
@@ -191,14 +194,19 @@ ethi_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint fla
ArtPoint c1, c2, i1, i2;
if (GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update)
- (*GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update)(item, affine, clip_path, flags);
+ GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update (
+ item, affine, clip_path, flags);
if (ethi->sort_info)
- ethi->group_indent_width = e_table_sort_info_grouping_get_count(ethi->sort_info) * GROUP_INDENT;
+ ethi->group_indent_width =
+ e_table_sort_info_grouping_get_count (ethi->sort_info)
+ * GROUP_INDENT;
else
ethi->group_indent_width = 0;
- ethi->width = e_table_header_total_width (ethi->eth) + ethi->group_indent_width;
+ ethi->width =
+ e_table_header_total_width (ethi->eth) +
+ ethi->group_indent_width;
i1.x = i1.y = 0;
i2.x = ethi->width;
@@ -213,7 +221,10 @@ ethi_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint fla
item->x2 != c2.x ||
item->y2 != c2.y)
{
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
+ gnome_canvas_request_redraw (
+ item->canvas,
+ item->x1, item->y1,
+ item->x2, item->y2);
item->x1 = c1.x;
item->y1 = c1.y;
item->x2 = c2.x;
@@ -348,7 +359,7 @@ ethi_set_property (GObject *object,
ethi->group_info_changed_id =
g_signal_connect (
ethi->sort_info, "group_info_changed",
- G_CALLBACK(ethi_sort_info_changed), ethi);
+ G_CALLBACK (ethi_sort_info_changed), ethi);
break;
case PROP_TABLE:
if (g_value_get_object (value))
@@ -508,13 +519,21 @@ ethi_add_drop_marker (ETableHeaderItem *ethi, gint col, gboolean recreate)
GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas)->window,
&rx, &ry);
- rx -= gtk_layout_get_hadjustment (GTK_LAYOUT (GNOME_CANVAS_ITEM (ethi)->canvas))->value;
- ry -= gtk_layout_get_vadjustment (GTK_LAYOUT (GNOME_CANVAS_ITEM (ethi)->canvas))->value;
+ rx -= gtk_layout_get_hadjustment (
+ GTK_LAYOUT (GNOME_CANVAS_ITEM (ethi)->canvas))->value;
+ ry -= gtk_layout_get_vadjustment (
+ GTK_LAYOUT (GNOME_CANVAS_ITEM (ethi)->canvas))->value;
- gtk_window_move (GTK_WINDOW (arrow_down), rx + x - ARROW_PTR, ry - ARROW_DOWN_HEIGHT);
+ gtk_window_move (
+ GTK_WINDOW (arrow_down),
+ rx + x - ARROW_PTR,
+ ry - ARROW_DOWN_HEIGHT);
gtk_widget_show_all (arrow_down);
- gtk_window_move (GTK_WINDOW (arrow_up), rx + x - ARROW_PTR, ry + ethi->height);
+ gtk_window_move (
+ GTK_WINDOW (arrow_up),
+ rx + x - ARROW_PTR,
+ ry + ethi->height);
gtk_widget_show_all (arrow_up);
}
@@ -582,16 +601,13 @@ moved (ETableHeaderItem *ethi, guint col, guint model_col)
#endif
static void
-do_drag_motion(ETableHeaderItem *ethi,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time,
- gboolean recreate)
+do_drag_motion (ETableHeaderItem *ethi,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ gboolean recreate)
{
- d(g_print("In do_drag_motion\n"));
- d(g_print("x = %d, y = %d, ethi->width = %d, ethi->height = %d\n", x, y, ethi->width, ethi->height));
-
if ((x >= 0) && (x <= (ethi->width)) &&
(y >= 0) && (y <= (ethi->height))) {
gint col;
@@ -690,7 +706,8 @@ context_destroyed (gpointer data)
}
static void
-context_connect (ETableHeaderItem *ethi, GdkDragContext *context)
+context_connect (ETableHeaderItem *ethi,
+ GdkDragContext *context)
{
if (g_dataset_get_data (context, "e-table-header-item") == NULL) {
g_object_ref (ethi);
@@ -699,9 +716,12 @@ context_connect (ETableHeaderItem *ethi, GdkDragContext *context)
}
static gboolean
-ethi_drag_motion (GtkWidget *widget, GdkDragContext *context,
- gint x, gint y, guint time,
- ETableHeaderItem *ethi)
+ethi_drag_motion (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ ETableHeaderItem *ethi)
{
gchar *droptype, *headertype;
guint direction = 0;
@@ -719,8 +739,6 @@ ethi_drag_motion (GtkWidget *widget, GdkDragContext *context,
g_free (headertype);
- d(g_print ("y = %d, widget->allocation.y = %d, GTK_LAYOUT (widget)->vadjustment->value = %f\n", y, widget->allocation.y, GTK_LAYOUT (widget)->vadjustment->value));
-
if (x < 20)
direction |= ET_SCROLL_LEFT;
if (x > widget->allocation.width - 20)
@@ -748,7 +766,9 @@ ethi_drag_motion (GtkWidget *widget, GdkDragContext *context,
}
static void
-ethi_drag_end (GtkWidget *canvas, GdkDragContext *context, ETableHeaderItem *ethi)
+ethi_drag_end (GtkWidget *canvas,
+ GdkDragContext *context,
+ ETableHeaderItem *ethi)
{
ethi_remove_drop_marker (ethi);
ethi_remove_destroy_marker (ethi);
@@ -857,7 +877,10 @@ ethi_drag_drop (GtkWidget *canvas,
}
static void
-ethi_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, ETableHeaderItem *ethi)
+ethi_drag_leave (GtkWidget *widget,
+ GdkDragContext *context,
+ guint time,
+ ETableHeaderItem *ethi)
{
ethi_remove_drop_marker (ethi);
if (ethi->drag_col != -1)
@@ -881,11 +904,12 @@ ethi_realize (GnomeCanvasItem *item)
/*
* Now, configure DnD
*/
- ethi_drop_types[0].target = g_strdup_printf("%s-%s", ethi_drop_types[0].target, ethi->dnd_code);
- gtk_drag_dest_set (GTK_WIDGET (item->canvas), 0,
- ethi_drop_types, G_N_ELEMENTS (ethi_drop_types),
- GDK_ACTION_MOVE);
- g_free(ethi_drop_types[0].target);
+ ethi_drop_types[0].target = g_strdup_printf (
+ "%s-%s", ethi_drop_types[0].target, ethi->dnd_code);
+ gtk_drag_dest_set (
+ GTK_WIDGET (item->canvas), 0, ethi_drop_types,
+ G_N_ELEMENTS (ethi_drop_types), GDK_ACTION_MOVE);
+ g_free (ethi_drop_types[0].target);
/* Drop signals */
ethi->drag_motion_id = g_signal_connect (item->canvas, "drag_motion",
@@ -935,7 +959,12 @@ ethi_unrealize (GnomeCanvasItem *item)
}
static void
-ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height)
+ethi_draw (GnomeCanvasItem *item,
+ GdkDrawable *drawable,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
GnomeCanvas *canvas = item->canvas;
@@ -1016,7 +1045,10 @@ ethi_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy,
* then the ETableCol that actually contains this point is returned here
*/
static gboolean
-is_pointer_on_division (ETableHeaderItem *ethi, gint pos, gint *the_total, gint *return_col)
+is_pointer_on_division (ETableHeaderItem *ethi,
+ gint pos,
+ gint *the_total,
+ gint *return_col)
{
const gint cols = e_table_header_count (ethi->eth);
gint col, total;
@@ -1466,37 +1498,62 @@ free_popup_info (GtkWidget *w, EthiHeaderInfo *info)
/* Bit 2 is disabled if not "sortable". */
/* Bit 4 is disabled if we don't have a pointer to our table object. */
static EPopupMenu ethi_context_menu [] = {
- E_POPUP_ITEM (N_("Sort _Ascending"), G_CALLBACK(ethi_popup_sort_ascending), 2),
- E_POPUP_ITEM (N_("Sort _Descending"), G_CALLBACK(ethi_popup_sort_descending), 2),
- E_POPUP_ITEM (N_("_Unsort"), G_CALLBACK(ethi_popup_unsort), 0),
+ E_POPUP_ITEM (
+ N_("Sort _Ascending"),
+ G_CALLBACK (ethi_popup_sort_ascending), 2),
+ E_POPUP_ITEM (
+ N_("Sort _Descending"),
+ G_CALLBACK (ethi_popup_sort_descending), 2),
+ E_POPUP_ITEM (
+ N_("_Unsort"), G_CALLBACK (ethi_popup_unsort), 0),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Group By This _Field"), G_CALLBACK(ethi_popup_group_field), 16),
- E_POPUP_ITEM (N_("Group By _Box"), G_CALLBACK(ethi_popup_group_box), 128),
+ E_POPUP_ITEM (
+ N_("Group By This _Field"),
+ G_CALLBACK (ethi_popup_group_field), 16),
+ E_POPUP_ITEM (
+ N_("Group By _Box"),
+ G_CALLBACK (ethi_popup_group_box), 128),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Remove This _Column"), G_CALLBACK(ethi_popup_remove_column), 8),
- E_POPUP_ITEM (N_("Add a C_olumn..."), G_CALLBACK(ethi_popup_field_chooser), 0),
+ E_POPUP_ITEM (
+ N_("Remove This _Column"),
+ G_CALLBACK (ethi_popup_remove_column), 8),
+ E_POPUP_ITEM (
+ N_("Add a C_olumn..."),
+ G_CALLBACK (ethi_popup_field_chooser), 0),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("A_lignment"), G_CALLBACK(ethi_popup_alignment), 128),
- E_POPUP_ITEM (N_("B_est Fit"), G_CALLBACK(ethi_popup_best_fit), 2),
- E_POPUP_ITEM (N_("Format Column_s..."), G_CALLBACK(ethi_popup_format_columns), 128),
+ E_POPUP_ITEM (
+ N_("A_lignment"),
+ G_CALLBACK (ethi_popup_alignment), 128),
+ E_POPUP_ITEM (
+ N_("B_est Fit"),
+ G_CALLBACK (ethi_popup_best_fit), 2),
+ E_POPUP_ITEM (
+ N_("Format Column_s..."),
+ G_CALLBACK (ethi_popup_format_columns), 128),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Custo_mize Current View..."), G_CALLBACK(ethi_popup_customize_view), 4),
+ E_POPUP_ITEM (
+ N_("Custo_mize Current View..."),
+ G_CALLBACK (ethi_popup_customize_view), 4),
E_POPUP_TERMINATOR
};
static void
sort_by_id (GtkWidget *menu_item, ETableHeaderItem *ethi)
{
- gint col = GPOINTER_TO_INT (g_object_get_data(G_OBJECT (menu_item), "col-number"));
ETableCol *ecol;
gboolean clearfirst;
+ gint col;
+ col = GPOINTER_TO_INT (g_object_get_data (
+ G_OBJECT (menu_item), "col-number"));
ecol = e_table_header_get_column (ethi->full_header, col);
clearfirst = e_table_sort_info_sorting_get_count (ethi->sort_info) > 1;
- if (!clearfirst && ecol && e_table_sort_info_sorting_get_count (ethi->sort_info) == 1) {
- ETableSortColumn column = e_table_sort_info_sorting_get_nth(ethi->sort_info, 0);
+ if (!clearfirst && ecol &&
+ e_table_sort_info_sorting_get_count (ethi->sort_info) == 1) {
+ ETableSortColumn column;
+ column = e_table_sort_info_sorting_get_nth(ethi->sort_info, 0);
clearfirst = ecol->sortable && ecol->col_idx != column.column;
}
@@ -1574,11 +1631,15 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
continue;
if (ncol == sort_col) {
- text = g_strdup_printf("%s (%s)", ethi->full_header->columns[ncol]->text, ascending ? _("Ascending"):_("Descending"));
+ text = g_strdup_printf (
+ "%s (%s)",
+ ethi->full_header->columns[ncol]->text,
+ ascending ? _("Ascending"):_("Descending"));
menu_item = gtk_check_menu_item_new_with_label (text);
g_free (text);
} else
- menu_item = gtk_check_menu_item_new_with_label (ethi->full_header->columns[ncol]->text);
+ menu_item = gtk_check_menu_item_new_with_label (
+ ethi->full_header->columns[ncol]->text);
gtk_widget_show (menu_item);
gtk_menu_shell_prepend (GTK_MENU_SHELL (sub_menu), menu_item);
@@ -1800,7 +1861,8 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
} else if (was_maybe_drag && ethi->sort_info) {
ETableCol *ecol;
- ecol = e_table_header_get_column (ethi->eth, ethi_find_col_by_x (ethi, e->button.x));
+ col = ethi_find_col_by_x (ethi, e->button.x);
+ ecol = e_table_header_get_column (ethi->eth, col);
ethi_change_sort_state (ethi, ecol);
}
diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c
index 8eb6a3e30c..e79448ee20 100644
--- a/widgets/table/e-table-memory.c
+++ b/widgets/table/e-table-memory.c
@@ -170,7 +170,10 @@ e_table_memory_insert (ETableMemory *etmm,
if (row == -1)
row = etmm->priv->num_rows;
etmm->priv->data = g_renew(gpointer, etmm->priv->data, etmm->priv->num_rows + 1);
- memmove(etmm->priv->data + row + 1, etmm->priv->data + row, (etmm->priv->num_rows - row) * sizeof (gpointer));
+ memmove (
+ etmm->priv->data + row + 1,
+ etmm->priv->data + row,
+ (etmm->priv->num_rows - row) * sizeof (gpointer));
etmm->priv->data[row] = data;
etmm->priv->num_rows ++;
if (!etmm->priv->frozen)
@@ -199,7 +202,10 @@ e_table_memory_remove (ETableMemory *etmm, gint row)
if (!etmm->priv->frozen)
e_table_model_pre_change(E_TABLE_MODEL(etmm));
ret = etmm->priv->data[row];
- memmove(etmm->priv->data + row, etmm->priv->data + row + 1, (etmm->priv->num_rows - row - 1) * sizeof (gpointer));
+ memmove (
+ etmm->priv->data + row,
+ etmm->priv->data + row + 1,
+ (etmm->priv->num_rows - row - 1) * sizeof (gpointer));
etmm->priv->num_rows --;
if (!etmm->priv->frozen)
e_table_model_row_deleted(E_TABLE_MODEL(etmm), row);
diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c
index a53ada3589..f1f6a88b31 100644
--- a/widgets/table/e-table-without.c
+++ b/widgets/table/e-table-without.c
@@ -114,7 +114,10 @@ remove_row (ETableWithout *etw, gint view_row)
ETableSubset *etss = E_TABLE_SUBSET (etw);
e_table_model_pre_change (E_TABLE_MODEL (etw));
- memmove (etss->map_table + view_row, etss->map_table + view_row + 1, (etss->n_map - view_row - 1) * sizeof (gint));
+ memmove (
+ etss->map_table + view_row,
+ etss->map_table + view_row + 1,
+ (etss->n_map - view_row - 1) * sizeof (gint));
etss->n_map --;
e_table_model_row_deleted (E_TABLE_MODEL (etw), view_row);
}
@@ -149,7 +152,10 @@ etw_dispose (GObject *object)
}
static void
-etw_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *etm, gint model_row, gint count)
+etw_proxy_model_rows_inserted (ETableSubset *etss,
+ ETableModel *etm,
+ gint model_row,
+ gint count)
{
gint i;
ETableWithout *etw = E_TABLE_WITHOUT (etss);
@@ -177,7 +183,10 @@ etw_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *etm, gint model_
}
static void
-etw_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *etm, gint model_row, gint count)
+etw_proxy_model_rows_deleted (ETableSubset *etss,
+ ETableModel *etm,
+ gint model_row,
+ gint count)
{
gint i; /* View row */
ETableWithout *etw = E_TABLE_WITHOUT (etss);
diff --git a/widgets/table/gal-a11y-e-cell-vbox.c b/widgets/table/gal-a11y-e-cell-vbox.c
index b3f92a695a..e7407e7259 100644
--- a/widgets/table/gal-a11y-e-cell-vbox.c
+++ b/widgets/table/gal-a11y-e-cell-vbox.c
@@ -75,12 +75,14 @@ ecv_ref_child (AtkObject *a11y, gint i)
row = gaec->row;
model_col = ecvv->model_cols[i];
subcell_view = ecvv->subcell_views[i];
+ /* FIXME Should the view column use a fake
+ * one or the same as its parent? */
ret = gal_a11y_e_cell_registry_get_object (NULL,
gaec->item,
subcell_view,
a11y,
model_col,
- gaec->view_col, /* FIXME should the view column use a fake one or the same as its parent? */
+ gaec->view_col,
row);
gaev->a11y_subcells[i] = ret;
g_object_ref (ret);
@@ -132,7 +134,9 @@ ecv_ref_accessible_at_point (AtkComponent *component,
return NULL;
for (i = 0; i < ecvv->subcell_view_count; i++) {
- subcell_height = e_cell_height (ecvv->subcell_views[i], ecvv->model_cols[i], gaec->view_col, gaec->row);
+ subcell_height = e_cell_height (
+ ecvv->subcell_views[i], ecvv->model_cols[i],
+ gaec->view_col, gaec->row);
if ( 0 <= y && y <= subcell_height) {
return ecv_ref_child ((AtkObject *)component, i);
} else
diff --git a/widgets/table/gal-a11y-e-table-column-header.c b/widgets/table/gal-a11y-e-table-column-header.c
index 41e6ab0fca..33b85571ee 100644
--- a/widgets/table/gal-a11y-e-table-column-header.c
+++ b/widgets/table/gal-a11y-e-table-column-header.c
@@ -32,7 +32,9 @@
static GObjectClass *parent_class;
static gint priv_offset;
-#define GET_PRIVATE(object) ((GalA11yETableColumnHeaderPrivate *) (((gchar *) object) + priv_offset))
+#define GET_PRIVATE(object) \
+ ((GalA11yETableColumnHeaderPrivate *) \
+ (((gchar *) object) + priv_offset))
#define PARENT_TYPE (atk_gobject_accessible_get_type ())
struct _GalA11yETableColumnHeaderPrivate {
@@ -192,10 +194,12 @@ gal_a11y_e_table_column_header_get_type (void)
NULL
};
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yETableColumnHeader", &info, 0,
- sizeof (GalA11yETableColumnHeaderPrivate), &priv_offset);
+ type = gal_a11y_type_register_static_with_private (
+ PARENT_TYPE, "GalA11yETableColumnHeader", &info, 0,
+ sizeof (GalA11yETableColumnHeaderPrivate), &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);
}
return type;