aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-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
11 files changed, 239 insertions, 103 deletions
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;