aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-11 23:50:51 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-12 02:14:04 +0800
commitebcce86769d174cce6e881740c5e9bcedce28e06 (patch)
treeb2cc2d18ceb0c3bd3e78f5b768c1b6926b69bb4a /widgets/table/e-table.c
parent1e3deb31476cf0026011876327be83e9a47847ee (diff)
downloadgsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.gz
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.zst
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.zip
Coding style and whitespace cleanups.
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r--widgets/table/e-table.c500
1 files changed, 250 insertions, 250 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 9c1070bf4d..254ea47046 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -111,7 +111,7 @@ enum {
ET_SCROLL_RIGHT = 1 << 3
};
-static guint et_signals [LAST_SIGNAL] = { 0 };
+static guint et_signals[LAST_SIGNAL] = { 0 };
static void e_table_fill_table (ETable *e_table, ETableModel *model);
static gboolean changed_idle (gpointer data);
@@ -124,33 +124,33 @@ static void et_drag_begin (GtkWidget *widget,
static void et_drag_end (GtkWidget *widget,
GdkDragContext *context,
ETable *et);
-static void et_drag_data_get(GtkWidget *widget,
+static void et_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
guint time,
ETable *et);
-static void et_drag_data_delete(GtkWidget *widget,
+static void et_drag_data_delete (GtkWidget *widget,
GdkDragContext *context,
ETable *et);
-static void et_drag_leave(GtkWidget *widget,
+static void et_drag_leave (GtkWidget *widget,
GdkDragContext *context,
guint time,
ETable *et);
-static gboolean et_drag_motion(GtkWidget *widget,
+static gboolean et_drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
guint time,
ETable *et);
-static gboolean et_drag_drop(GtkWidget *widget,
+static gboolean et_drag_drop (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
guint time,
ETable *et);
-static void et_drag_data_received(GtkWidget *widget,
+static void et_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
@@ -198,7 +198,7 @@ et_disconnect_model (ETable *et)
static void
e_table_state_change (ETable *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [STATE_CHANGE], 0);
+ g_signal_emit (G_OBJECT (et), et_signals[STATE_CHANGE], 0);
}
#define CHECK_HORIZONTAL(et) \
@@ -282,7 +282,7 @@ disconnect_header (ETable *e_table)
g_signal_handler_disconnect (G_OBJECT (e_table->header),
e_table->dimension_change_id);
- g_object_unref(e_table->header);
+ g_object_unref (e_table->header);
e_table->header = NULL;
}
@@ -337,7 +337,7 @@ et_dispose (GObject *object)
}
if (et->reflow_idle_id) {
- g_source_remove(et->reflow_idle_id);
+ g_source_remove (et->reflow_idle_id);
et->reflow_idle_id = 0;
}
@@ -395,10 +395,10 @@ et_dispose (GObject *object)
et->rebuild_idle_id = 0;
}
- g_free(et->click_to_add_message);
+ g_free (et->click_to_add_message);
et->click_to_add_message = NULL;
- g_free(et->domain);
+ g_free (et->domain);
et->domain = NULL;
(*G_OBJECT_CLASS (e_table_parent_class)->dispose)(object);
@@ -443,7 +443,7 @@ et_search_search (ETableSearch *search,
rows = e_table_model_row_count (et->model);
- g_object_get(et->selection,
+ g_object_get (et->selection,
"cursor_row", &cursor,
NULL);
@@ -503,7 +503,7 @@ init_search (ETable *e_table)
if (e_table->search != NULL)
return;
- e_table->search = e_table_search_new();
+ e_table->search = e_table_search_new ();
e_table->search_search_id =
g_signal_connect (G_OBJECT (e_table->search), "search",
@@ -521,7 +521,7 @@ et_finalize (GObject *object)
g_free (et->click_to_add_message);
et->click_to_add_message = NULL;
- g_free(et->domain);
+ g_free (et->domain);
et->domain = NULL;
G_OBJECT_CLASS (e_table_parent_class)->finalize (object);
}
@@ -566,7 +566,7 @@ e_table_init (ETable *e_table)
e_table->do_drag = 0;
e_table->sorter = NULL;
- e_table->selection = e_table_selection_model_new();
+ e_table->selection = e_table_selection_model_new ();
e_table->cursor_loc = E_TABLE_CURSOR_LOC_NONE;
e_table->spec = NULL;
@@ -654,7 +654,7 @@ header_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETable *e_
static void
group_info_changed (ETableSortInfo *info, ETable *et)
{
- gboolean will_be_grouped = e_table_sort_info_grouping_get_count(info) > 0;
+ gboolean will_be_grouped = e_table_sort_info_grouping_get_count (info) > 0;
clear_current_search_col (et);
if (et->is_grouped || will_be_grouped) {
et->need_rebuild = TRUE;
@@ -694,7 +694,7 @@ e_table_setup_header (ETable *e_table)
"table", e_table,
NULL);
- g_free(pointer);
+ g_free (pointer);
g_signal_connect (
G_OBJECT (e_table->header_canvas), "size_allocate",
@@ -719,7 +719,7 @@ table_canvas_reflow_idle (ETable *e_table)
e_table->canvas_vbox,
"height", &height, "width", &width, NULL);
height = MAX ((gint)height, allocation.height);
- width = MAX((gint)width, allocation.width);
+ width = MAX ((gint)width, allocation.width);
/* I have no idea why this needs to be -1, but it works. */
gnome_canvas_get_scroll_region (GNOME_CANVAS (e_table->table_canvas),
NULL, NULL, &oldwidth, &oldheight);
@@ -756,8 +756,8 @@ table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
g_object_set_property (G_OBJECT (e_table->header), "width", val);
g_free (val);
if (e_table->reflow_idle_id)
- g_source_remove(e_table->reflow_idle_id);
- table_canvas_reflow_idle(e_table);
+ g_source_remove (e_table->reflow_idle_id);
+ table_canvas_reflow_idle (e_table);
e_table->size_allocated = TRUE;
@@ -778,7 +778,7 @@ static void
click_to_add_cursor_change (ETableClickToAdd *etcta, gint row, gint col, ETable *et)
{
if (et->cursor_loc == E_TABLE_CURSOR_LOC_TABLE) {
- e_selection_model_clear(E_SELECTION_MODEL (et->selection));
+ e_selection_model_clear (E_SELECTION_MODEL (et->selection));
}
et->cursor_loc = E_TABLE_CURSOR_LOC_ETCTA;
}
@@ -791,22 +791,22 @@ group_cursor_change (ETableGroup *etg, gint row, ETable *et)
old_cursor_loc = et->cursor_loc;
et->cursor_loc = E_TABLE_CURSOR_LOC_TABLE;
- g_signal_emit (G_OBJECT (et), et_signals [CURSOR_CHANGE], 0, row);
+ g_signal_emit (G_OBJECT (et), et_signals[CURSOR_CHANGE], 0, row);
if (old_cursor_loc == E_TABLE_CURSOR_LOC_ETCTA && et->click_to_add)
- e_table_click_to_add_commit(E_TABLE_CLICK_TO_ADD(et->click_to_add));
+ e_table_click_to_add_commit (E_TABLE_CLICK_TO_ADD (et->click_to_add));
}
static void
group_cursor_activated (ETableGroup *etg, gint row, ETable *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [CURSOR_ACTIVATED], 0, row);
+ g_signal_emit (G_OBJECT (et), et_signals[CURSOR_ACTIVATED], 0, row);
}
static void
group_double_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [DOUBLE_CLICK], 0, row, col, event);
+ g_signal_emit (G_OBJECT (et), et_signals[DOUBLE_CLICK], 0, row, col, event);
}
static gboolean
@@ -825,7 +825,7 @@ static gboolean
group_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
{
gboolean return_val = 0;
- g_signal_emit (G_OBJECT (et), et_signals [CLICK], 0, row, col, event, &return_val);
+ g_signal_emit (G_OBJECT (et), et_signals[CLICK], 0, row, col, event, &return_val);
return return_val;
}
@@ -899,7 +899,7 @@ group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *
(key->keyval >= GDK_A && key->keyval <= GDK_Z) ||
(key->keyval >= GDK_0 && key->keyval <= GDK_9)))
e_table_search_input_character (et->search, key->keyval);
- g_signal_emit (G_OBJECT (et), et_signals [KEY_PRESS], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[KEY_PRESS], 0,
row, col, event, &return_val);
break;
}
@@ -910,7 +910,7 @@ static gboolean
group_start_drag (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
{
gboolean return_val = TRUE;
- g_signal_emit (G_OBJECT (et), et_signals [START_DRAG], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[START_DRAG], 0,
row, col, event, &return_val);
return return_val;
}
@@ -932,7 +932,7 @@ et_table_row_changed (ETableModel *table_model, gint row, ETable *et)
if (!et->need_rebuild) {
if (e_table_group_remove (et->group, row))
e_table_group_add (et->group, row);
- CHECK_HORIZONTAL(et);
+ CHECK_HORIZONTAL (et);
}
}
@@ -946,28 +946,28 @@ static void
et_table_rows_inserted (ETableModel *table_model, gint row, gint count, ETable *et)
{
/* This number has already been decremented. */
- gint row_count = e_table_model_row_count(table_model);
+ gint row_count = e_table_model_row_count (table_model);
if (!et->need_rebuild) {
gint i;
if (row != row_count - count)
- e_table_group_increment(et->group, row, count);
+ e_table_group_increment (et->group, row, count);
for (i = 0; i < count; i++)
e_table_group_add (et->group, row + i);
- CHECK_HORIZONTAL(et);
+ CHECK_HORIZONTAL (et);
}
}
static void
et_table_rows_deleted (ETableModel *table_model, gint row, gint count, ETable *et)
{
- gint row_count = e_table_model_row_count(table_model);
+ gint row_count = e_table_model_row_count (table_model);
if (!et->need_rebuild) {
gint i;
for (i = 0; i < count; i++)
e_table_group_remove (et->group, row + i);
if (row != row_count)
- e_table_group_decrement(et->group, row, count);
- CHECK_HORIZONTAL(et);
+ e_table_group_decrement (et->group, row, count);
+ CHECK_HORIZONTAL (et);
}
}
@@ -976,7 +976,7 @@ et_build_groups (ETable *et)
{
gboolean was_grouped = et->is_grouped;
- et->is_grouped = e_table_sort_info_grouping_get_count(et->sort_info) > 0;
+ et->is_grouped = e_table_sort_info_grouping_get_count (et->sort_info) > 0;
et->group = e_table_group_new (GNOME_CANVAS_GROUP (et->canvas_vbox),
et->full_header,
@@ -995,7 +995,7 @@ et_build_groups (ETable *et)
GNOME_CANVAS_ITEM (et->group));
gnome_canvas_item_set (
- GNOME_CANVAS_ITEM(et->group),
+ GNOME_CANVAS_ITEM (et->group),
"alternating_row_colors", et->alternating_row_colors,
"horizontal_draw_grid", et->horizontal_draw_grid,
"vertical_draw_grid", et->vertical_draw_grid,
@@ -1063,7 +1063,7 @@ changed_idle (gpointer data)
if (et->group)
gtk_object_destroy (GTK_OBJECT (et->group));
- et_build_groups(et);
+ et_build_groups (et);
widget = GTK_WIDGET (et->table_canvas);
gtk_widget_get_allocation (widget, &allocation);
@@ -1080,7 +1080,7 @@ changed_idle (gpointer data)
et->rebuild_idle_id = 0;
- CHECK_HORIZONTAL(et);
+ CHECK_HORIZONTAL (et);
return FALSE;
}
@@ -1094,12 +1094,12 @@ et_canvas_realize (GtkWidget *canvas, ETable *e_table)
widget = GTK_WIDGET (e_table->table_canvas);
style = gtk_widget_get_style (widget);
- gnome_canvas_item_set(
+ gnome_canvas_item_set (
e_table->white_item,
"fill_color_gdk", &style->base[GTK_STATE_NORMAL],
NULL);
- CHECK_HORIZONTAL(e_table);
+ CHECK_HORIZONTAL (e_table);
set_header_width (e_table);
}
@@ -1107,7 +1107,7 @@ static gboolean
white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETable *e_table)
{
gboolean return_val = 0;
- g_signal_emit (GTK_OBJECT (e_table), et_signals [WHITE_SPACE_EVENT], 0,
+ g_signal_emit (GTK_OBJECT (e_table), et_signals[WHITE_SPACE_EVENT], 0,
event, &return_val);
return return_val;
}
@@ -1118,10 +1118,10 @@ et_eti_leave_edit (ETable *et)
GnomeCanvas *canvas = et->table_canvas;
if (gtk_widget_has_focus (GTK_WIDGET (canvas))) {
- GnomeCanvasItem *item = GNOME_CANVAS(canvas)->focused_item;
+ GnomeCanvasItem *item = GNOME_CANVAS (canvas)->focused_item;
- if (E_IS_TABLE_ITEM(item)) {
- e_table_item_leave_edit_(E_TABLE_ITEM(item));
+ if (E_IS_TABLE_ITEM (item)) {
+ e_table_item_leave_edit_(E_TABLE_ITEM (item));
}
}
}
@@ -1183,17 +1183,17 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d
ecanvas = E_CANVAS (widget);
if (!event->in) {
- gtk_im_context_focus_out(ecanvas->im_context);
+ gtk_im_context_focus_out (ecanvas->im_context);
return FALSE;
} else {
- gtk_im_context_focus_in(ecanvas->im_context);
+ gtk_im_context_focus_in (ecanvas->im_context);
}
etable = E_TABLE (data);
- if (e_table_model_row_count(etable->model) < 1
+ if (e_table_model_row_count (etable->model) < 1
&& (etable->click_to_add)
- && !(E_TABLE_CLICK_TO_ADD(etable->click_to_add)->row)) {
+ && !(E_TABLE_CLICK_TO_ADD (etable->click_to_add)->row)) {
gnome_canvas_item_grab_focus (etable->canvas_vbox);
gnome_canvas_item_grab_focus (etable->click_to_add);
} else if (!canvas->focused_item && etable->group) {
@@ -1203,7 +1203,7 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d
/* check whether click_to_add already got the focus */
if (etable->click_to_add) {
- GnomeCanvasItem *row = E_TABLE_CLICK_TO_ADD(etable->click_to_add)->row;
+ GnomeCanvasItem *row = E_TABLE_CLICK_TO_ADD (etable->click_to_add)->row;
if (canvas->focused_item == row)
return TRUE;
}
@@ -1250,11 +1250,11 @@ click_to_add_event (ETableClickToAdd *etcta, GdkEventKey *key, ETable *etable)
case GDK_ISO_Left_Tab:
if (key->state & GDK_CONTROL_MASK) {
if (etable->group) {
- if (e_table_model_row_count(etable->model) > 0)
+ if (e_table_model_row_count (etable->model) > 0)
focus_first_etable_item (etable->group);
else
gtk_widget_child_focus (
- gtk_widget_get_toplevel(GTK_WIDGET(etable->table_canvas)), GTK_DIR_TAB_FORWARD);
+ gtk_widget_get_toplevel (GTK_WIDGET (etable->table_canvas)), GTK_DIR_TAB_FORWARD);
break;
}
}
@@ -1316,9 +1316,9 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h
gtk_widget_show (widget);
- e_table->white_item = gnome_canvas_item_new(
- gnome_canvas_root(e_table->table_canvas),
- e_canvas_background_get_type(),
+ e_table->white_item = gnome_canvas_item_new (
+ gnome_canvas_root (e_table->table_canvas),
+ e_canvas_background_get_type (),
"fill_color_gdk", &style->base[GTK_STATE_NORMAL],
NULL);
@@ -1326,14 +1326,14 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h
G_CALLBACK (white_item_event), e_table);
g_signal_connect (G_OBJECT(e_table->table_canvas), "realize",
- G_CALLBACK(et_canvas_realize), e_table);
+ G_CALLBACK (et_canvas_realize), e_table);
g_signal_connect (G_OBJECT(gnome_canvas_root (e_table->table_canvas)), "event",
- G_CALLBACK(et_canvas_root_event), e_table);
+ G_CALLBACK (et_canvas_root_event), e_table);
- e_table->canvas_vbox = gnome_canvas_item_new(
- gnome_canvas_root(e_table->table_canvas),
- e_canvas_vbox_get_type(),
+ e_table->canvas_vbox = gnome_canvas_item_new (
+ gnome_canvas_root (e_table->table_canvas),
+ e_canvas_vbox_get_type (),
"spacing", 10.0,
NULL);
@@ -1341,11 +1341,11 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h
G_OBJECT (e_table->canvas_vbox), "event",
G_CALLBACK (canvas_vbox_event), e_table);
- et_build_groups(e_table);
+ et_build_groups (e_table);
if (e_table->use_click_to_add) {
e_table->click_to_add = gnome_canvas_item_new (
- GNOME_CANVAS_GROUP(e_table->canvas_vbox),
+ GNOME_CANVAS_GROUP (e_table->canvas_vbox),
e_table_click_to_add_get_type (),
"header", e_table->header,
"model", e_table->model,
@@ -1354,11 +1354,11 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h
if (e_table->use_click_to_add_end)
e_canvas_vbox_add_item (
- E_CANVAS_VBOX(e_table->canvas_vbox),
+ E_CANVAS_VBOX (e_table->canvas_vbox),
e_table->click_to_add);
else
e_canvas_vbox_add_item_start (
- E_CANVAS_VBOX(e_table->canvas_vbox),
+ E_CANVAS_VBOX (e_table->canvas_vbox),
e_table->click_to_add);
g_signal_connect (
@@ -1386,7 +1386,7 @@ e_table_fill_table (ETable *e_table, ETableModel *model)
*
**/
void
-e_table_set_state_object(ETable *e_table, ETableState *state)
+e_table_set_state_object (ETable *e_table, ETableState *state)
{
GValue *val;
GtkWidget *widget;
@@ -1411,10 +1411,10 @@ e_table_set_state_object(ETable *e_table, ETableState *state)
if (e_table->sort_info_change_id)
g_signal_handler_disconnect (G_OBJECT (e_table->sort_info),
e_table->sort_info_change_id);
- g_object_unref(e_table->sort_info);
+ g_object_unref (e_table->sort_info);
}
if (state->sort_info) {
- e_table->sort_info = e_table_sort_info_duplicate(state->sort_info);
+ e_table->sort_info = e_table_sort_info_duplicate (state->sort_info);
e_table_sort_info_set_can_group (e_table->sort_info, e_table->allow_grouping);
e_table->group_info_change_id =
g_signal_connect (G_OBJECT (e_table->sort_info), "group_info_changed",
@@ -1427,16 +1427,16 @@ e_table_set_state_object(ETable *e_table, ETableState *state)
e_table->sort_info = NULL;
if (e_table->sorter)
- g_object_set(e_table->sorter,
+ g_object_set (e_table->sorter,
"sort_info", e_table->sort_info,
NULL);
if (e_table->header_item)
- g_object_set(e_table->header_item,
+ g_object_set (e_table->header_item,
"ETableHeader", e_table->header,
"sort_info", e_table->sort_info,
NULL);
if (e_table->click_to_add)
- g_object_set(e_table->click_to_add,
+ g_object_set (e_table->click_to_add,
"header", e_table->header,
NULL);
@@ -1461,17 +1461,17 @@ e_table_set_state (ETable *e_table,
{
ETableState *state;
- g_return_if_fail(e_table != NULL);
- g_return_if_fail(E_IS_TABLE(e_table));
- g_return_if_fail(state_str != NULL);
+ g_return_if_fail (e_table != NULL);
+ g_return_if_fail (E_IS_TABLE (e_table));
+ g_return_if_fail (state_str != NULL);
- state = e_table_state_new();
- e_table_state_load_from_string(state, state_str);
+ state = e_table_state_new ();
+ e_table_state_load_from_string (state, state_str);
if (state->col_count > 0)
- e_table_set_state_object(e_table, state);
+ e_table_set_state_object (e_table, state);
- g_object_unref(state);
+ g_object_unref (state);
}
/**
@@ -1488,17 +1488,17 @@ e_table_load_state (ETable *e_table,
{
ETableState *state;
- g_return_if_fail(e_table != NULL);
- g_return_if_fail(E_IS_TABLE(e_table));
- g_return_if_fail(filename != NULL);
+ g_return_if_fail (e_table != NULL);
+ g_return_if_fail (E_IS_TABLE (e_table));
+ g_return_if_fail (filename != NULL);
- state = e_table_state_new();
- e_table_state_load_from_file(state, filename);
+ state = e_table_state_new ();
+ e_table_state_load_from_file (state, filename);
if (state->col_count > 0)
- e_table_set_state_object(e_table, state);
+ e_table_set_state_object (e_table, state);
- g_object_unref(state);
+ g_object_unref (state);
}
/**
@@ -1518,21 +1518,21 @@ e_table_get_state_object (ETable *e_table)
gint full_col_count;
gint i, j;
- state = e_table_state_new();
+ state = e_table_state_new ();
if (state->sort_info)
g_object_unref (state->sort_info);
state->sort_info = e_table->sort_info;
- g_object_ref(state->sort_info);
+ g_object_ref (state->sort_info);
state->col_count = e_table_header_count (e_table->header);
full_col_count = e_table_header_count (e_table->full_header);
- state->columns = g_new(int, state->col_count);
- state->expansions = g_new(double, state->col_count);
+ state->columns = g_new (int, state->col_count);
+ state->expansions = g_new (double, state->col_count);
for (i = 0; i < state->col_count; i++) {
- ETableCol *col = e_table_header_get_column(e_table->header, i);
+ ETableCol *col = e_table_header_get_column (e_table->header, i);
state->columns[i] = -1;
for (j = 0; j < full_col_count; j++) {
- if (col->col_idx == e_table_header_index(e_table->full_header, j)) {
+ if (col->col_idx == e_table_header_index (e_table->full_header, j)) {
state->columns[i] = j;
break;
}
@@ -1558,9 +1558,9 @@ gchar *e_table_get_state (ETable *e_table
ETableState *state;
gchar *string;
- state = e_table_get_state_object(e_table);
- string = e_table_state_save_to_string(state);
- g_object_unref(state);
+ state = e_table_get_state_object (e_table);
+ string = e_table_state_save_to_string (state);
+ g_object_unref (state);
return string;
}
@@ -1579,21 +1579,21 @@ e_table_save_state (ETable *e_table,
{
ETableState *state;
- state = e_table_get_state_object(e_table);
- e_table_state_save_to_file(state, filename);
- g_object_unref(state);
+ state = e_table_get_state_object (e_table);
+ e_table_state_save_to_file (state, filename);
+ g_object_unref (state);
}
static void
et_selection_model_selection_changed (ETableGroup *etg, ETable *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [SELECTION_CHANGE], 0);
+ g_signal_emit (G_OBJECT (et), et_signals[SELECTION_CHANGE], 0);
}
static void
et_selection_model_selection_row_changed (ETableGroup *etg, gint row, ETable *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [SELECTION_CHANGE], 0);
+ g_signal_emit (G_OBJECT (et), et_signals[SELECTION_CHANGE], 0);
}
static ETable *
@@ -1610,9 +1610,9 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
g_value_init (val, G_TYPE_OBJECT);
if (ete)
- g_object_ref(ete);
+ g_object_ref (ete);
else {
- ete = e_table_extras_new();
+ ete = e_table_extras_new ();
}
e_table->domain = g_strdup (specification->domain);
@@ -1627,12 +1627,12 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
e_table->vertical_draw_grid = specification->vertical_draw_grid;
e_table->draw_focus = specification->draw_focus;
e_table->cursor_mode = specification->cursor_mode;
- e_table->full_header = e_table_spec_to_full_header(specification, ete);
+ e_table->full_header = e_table_spec_to_full_header (specification, ete);
g_object_ref (e_table->full_header);
col_count = e_table_header_count (e_table->full_header);
for (i = 0; i < col_count; i++) {
- ETableCol *col = e_table_header_get_column(e_table->full_header, i);
+ ETableCol *col = e_table_header_get_column (e_table->full_header, i);
if (col && col->search) {
e_table->current_search_col = col;
e_table->search_col_set = TRUE;
@@ -1666,7 +1666,7 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
g_object_set_property (G_OBJECT(e_table->header), "sort_info", val);
g_free (val);
- e_table->sorter = e_table_sorter_new(etm, e_table->full_header, e_table->sort_info);
+ e_table->sorter = e_table_sorter_new (etm, e_table->full_header, e_table->sort_info);
g_object_set (e_table->selection,
"model", etm,
@@ -1711,7 +1711,7 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
gtk_widget_pop_colormap ();
- g_object_unref(ete);
+ g_object_unref (ete);
return e_table;
}
@@ -1737,40 +1737,40 @@ e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
ETableSpecification *specification;
ETableState *state;
- g_return_val_if_fail(e_table != NULL, NULL);
- g_return_val_if_fail(E_IS_TABLE(e_table), NULL);
- g_return_val_if_fail(etm != NULL, NULL);
- g_return_val_if_fail(E_IS_TABLE_MODEL(etm), NULL);
- g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), NULL);
- g_return_val_if_fail(spec_str != NULL, NULL);
+ g_return_val_if_fail (e_table != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE (e_table), NULL);
+ g_return_val_if_fail (etm != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE_MODEL (etm), NULL);
+ g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), NULL);
+ g_return_val_if_fail (spec_str != NULL, NULL);
g_object_ref (etm);
- specification = e_table_specification_new();
+ specification = e_table_specification_new ();
g_object_ref (specification);
- if (!e_table_specification_load_from_string(specification, spec_str)) {
- g_object_unref(specification);
+ if (!e_table_specification_load_from_string (specification, spec_str)) {
+ g_object_unref (specification);
return NULL;
}
if (state_str) {
- state = e_table_state_new();
+ state = e_table_state_new ();
g_object_ref (state);
- e_table_state_load_from_string(state, state_str);
+ e_table_state_load_from_string (state, state_str);
if (state->col_count <= 0) {
- g_object_unref(state);
+ g_object_unref (state);
state = specification->state;
- g_object_ref(state);
+ g_object_ref (state);
}
} else {
state = specification->state;
- g_object_ref(state);
+ g_object_ref (state);
}
e_table = et_real_construct (e_table, etm, ete, specification, state);
e_table->spec = specification;
- g_object_unref(state);
+ g_object_unref (state);
return e_table;
}
@@ -1797,40 +1797,40 @@ e_table_construct_from_spec_file (ETable *e_table, ETableModel *etm, ETableExtra
ETableSpecification *specification;
ETableState *state;
- g_return_val_if_fail(e_table != NULL, NULL);
- g_return_val_if_fail(E_IS_TABLE(e_table), NULL);
- g_return_val_if_fail(etm != NULL, NULL);
- g_return_val_if_fail(E_IS_TABLE_MODEL(etm), NULL);
- g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), NULL);
- g_return_val_if_fail(spec_fn != NULL, NULL);
+ g_return_val_if_fail (e_table != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE (e_table), NULL);
+ g_return_val_if_fail (etm != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE_MODEL (etm), NULL);
+ g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), NULL);
+ g_return_val_if_fail (spec_fn != NULL, NULL);
- specification = e_table_specification_new();
- if (!e_table_specification_load_from_file(specification, spec_fn)) {
- g_object_unref(specification);
+ specification = e_table_specification_new ();
+ if (!e_table_specification_load_from_file (specification, spec_fn)) {
+ g_object_unref (specification);
return NULL;
}
if (state_fn) {
- state = e_table_state_new();
- if (!e_table_state_load_from_file(state, state_fn)) {
- g_object_unref(state);
+ state = e_table_state_new ();
+ if (!e_table_state_load_from_file (state, state_fn)) {
+ g_object_unref (state);
state = specification->state;
- g_object_ref(state);
+ g_object_ref (state);
}
if (state->col_count <= 0) {
- g_object_unref(state);
+ g_object_unref (state);
state = specification->state;
- g_object_ref(state);
+ g_object_ref (state);
}
} else {
state = specification->state;
- g_object_ref(state);
+ g_object_ref (state);
}
e_table = et_real_construct (e_table, etm, ete, specification, state);
e_table->spec = specification;
- g_object_unref(state);
+ g_object_unref (state);
return e_table;
}
@@ -1864,10 +1864,10 @@ e_table_new (ETableModel *etm,
{
ETable *e_table;
- g_return_val_if_fail(etm != NULL, NULL);
- g_return_val_if_fail(E_IS_TABLE_MODEL(etm), NULL);
- g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), NULL);
- g_return_val_if_fail(spec != NULL, NULL);
+ g_return_val_if_fail (etm != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE_MODEL (etm), NULL);
+ g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), NULL);
+ g_return_val_if_fail (spec != NULL, NULL);
e_table = g_object_new (E_TABLE_TYPE, NULL);
@@ -1904,10 +1904,10 @@ e_table_new_from_spec_file (ETableModel *etm,
{
ETable *e_table;
- g_return_val_if_fail(etm != NULL, NULL);
- g_return_val_if_fail(E_IS_TABLE_MODEL(etm), NULL);
- g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), NULL);
- g_return_val_if_fail(spec_fn != NULL, NULL);
+ g_return_val_if_fail (etm != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE_MODEL (etm), NULL);
+ g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), NULL);
+ g_return_val_if_fail (spec_fn != NULL, NULL);
e_table = g_object_new (E_TABLE_TYPE, NULL);
@@ -1949,7 +1949,7 @@ et_build_grouping_spec (ETable *e_table)
node = grouping;
for (i = 0; i < group_count; i++) {
- ETableSortColumn column = e_table_sort_info_grouping_get_nth(e_table->sort_info, i);
+ ETableSortColumn column = e_table_sort_info_grouping_get_nth (e_table->sort_info, i);
xmlNode *new_node = xmlNewChild(node, NULL, "group", NULL);
e_xml_set_integer_prop_by_name (new_node, "column", column.column);
@@ -1958,7 +1958,7 @@ et_build_grouping_spec (ETable *e_table)
}
for (i = 0; i < sort_count; i++) {
- ETableSortColumn column = e_table_sort_info_sorting_get_nth(e_table->sort_info, i);
+ ETableSortColumn column = e_table_sort_info_sorting_get_nth (e_table->sort_info, i);
xmlNode *new_node = xmlNewChild(node, NULL, "leaf", NULL);
e_xml_set_integer_prop_by_name (new_node, "column", column.column);
@@ -1994,8 +1994,8 @@ e_table_get_specification (ETable *e_table)
xmlChar *buffer;
gint size;
- g_return_val_if_fail(e_table != NULL, NULL);
- g_return_val_if_fail(E_IS_TABLE(e_table), NULL);
+ g_return_val_if_fail (e_table != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE (e_table), NULL);
doc = et_build_tree (e_table);
xmlDocDumpMemory (doc, &buffer, &size);
@@ -2010,13 +2010,13 @@ e_table_set_specification (ETable *e_table, const gchar *spec)
xmlDoc *xmlSpec;
gint ret;
- g_return_val_if_fail(e_table != NULL, -1);
- g_return_val_if_fail(E_IS_TABLE(e_table), -1);
- g_return_val_if_fail(spec != NULL, -1);
+ g_return_val_if_fail (e_table != NULL, -1);
+ g_return_val_if_fail (E_IS_TABLE (e_table), -1);
+ g_return_val_if_fail (spec != NULL, -1);
/* doesn't work yet, sigh */
- xmlSpec = xmlParseMemory ((gchar *)spec, strlen(spec));
- ret = et_real_set_specification(e_table, xmlSpec);
+ xmlSpec = xmlParseMemory ((gchar *)spec, strlen (spec));
+ ret = et_real_set_specification (e_table, xmlSpec);
xmlFreeDoc (xmlSpec);
return ret;
@@ -2027,9 +2027,9 @@ e_table_save_specification (ETable *e_table, const gchar *filename)
{
xmlDoc *doc = et_build_tree (e_table);
- g_return_if_fail(e_table != NULL);
- g_return_if_fail(E_IS_TABLE(e_table));
- g_return_if_fail(filename != NULL);
+ g_return_if_fail (e_table != NULL);
+ g_return_if_fail (E_IS_TABLE (e_table));
+ g_return_if_fail (filename != NULL);
e_xml_save_file (filename, doc);
@@ -2042,9 +2042,9 @@ e_table_load_specification (ETable *e_table, gchar *filename)
xmlDoc *xmlSpec;
gint ret;
- g_return_val_if_fail(e_table != NULL, -1);
- g_return_val_if_fail(E_IS_TABLE(e_table), -1);
- g_return_val_if_fail(filename != NULL, -1);
+ g_return_val_if_fail (e_table != NULL, -1);
+ g_return_val_if_fail (E_IS_TABLE (e_table), -1);
+ g_return_val_if_fail (filename != NULL, -1);
/* doesn't work yet, yay */
#ifdef G_OS_WIN32
@@ -2056,7 +2056,7 @@ e_table_load_specification (ETable *e_table, gchar *filename)
#else
xmlSpec = xmlParseFile (filename);
#endif
- ret = et_real_set_specification(e_table, xmlSpec);
+ ret = et_real_set_specification (e_table, xmlSpec);
xmlFreeDoc (xmlSpec);
return ret;
@@ -2073,11 +2073,11 @@ e_table_load_specification (ETable *e_table, gchar *filename)
void
e_table_set_cursor_row (ETable *e_table, gint row)
{
- g_return_if_fail(e_table != NULL);
- g_return_if_fail(E_IS_TABLE(e_table));
- g_return_if_fail(row >= 0);
+ g_return_if_fail (e_table != NULL);
+ g_return_if_fail (E_IS_TABLE (e_table));
+ g_return_if_fail (row >= 0);
- g_object_set(e_table->selection,
+ g_object_set (e_table->selection,
"cursor_row", row,
NULL);
}
@@ -2095,10 +2095,10 @@ gint
e_table_get_cursor_row (ETable *e_table)
{
gint row;
- g_return_val_if_fail(e_table != NULL, -1);
- g_return_val_if_fail(E_IS_TABLE(e_table), -1);
+ g_return_val_if_fail (e_table != NULL, -1);
+ g_return_val_if_fail (E_IS_TABLE (e_table), -1);
- g_object_get(e_table->selection,
+ g_object_get (e_table->selection,
"cursor_row", &row,
NULL);
return row;
@@ -2122,10 +2122,10 @@ e_table_selected_row_foreach (ETable *e_table,
EForeachFunc callback,
gpointer closure)
{
- g_return_if_fail(e_table != NULL);
- g_return_if_fail(E_IS_TABLE(e_table));
+ g_return_if_fail (e_table != NULL);
+ g_return_if_fail (E_IS_TABLE (e_table));
- e_selection_model_foreach(E_SELECTION_MODEL (e_table->selection),
+ e_selection_model_foreach (E_SELECTION_MODEL (e_table->selection),
callback,
closure);
}
@@ -2142,10 +2142,10 @@ e_table_selected_row_foreach (ETable *e_table,
gint
e_table_selected_count (ETable *e_table)
{
- g_return_val_if_fail(e_table != NULL, -1);
- g_return_val_if_fail(E_IS_TABLE(e_table), -1);
+ g_return_val_if_fail (e_table != NULL, -1);
+ g_return_val_if_fail (E_IS_TABLE (e_table), -1);
- return e_selection_model_selected_count(E_SELECTION_MODEL (e_table->selection));
+ return e_selection_model_selected_count (E_SELECTION_MODEL (e_table->selection));
}
/**
@@ -2190,10 +2190,10 @@ e_table_invert_selection (ETable *table)
EPrintable *
e_table_get_printable (ETable *e_table)
{
- g_return_val_if_fail(e_table != NULL, NULL);
- g_return_val_if_fail(E_IS_TABLE(e_table), NULL);
+ g_return_val_if_fail (e_table != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE (e_table), NULL);
- return e_table_group_get_printable(e_table->group);
+ return e_table_group_get_printable (e_table->group);
}
/**
@@ -2206,7 +2206,7 @@ e_table_get_printable (ETable *e_table)
void
e_table_right_click_up (ETable *table)
{
- e_selection_model_right_click_up(E_SELECTION_MODEL(table->selection));
+ e_selection_model_right_click_up (E_SELECTION_MODEL (table->selection));
}
/**
@@ -2220,7 +2220,7 @@ e_table_commit_click_to_add (ETable *table)
{
et_eti_leave_edit (table);
if (table->click_to_add)
- e_table_click_to_add_commit(E_TABLE_CLICK_TO_ADD(table->click_to_add));
+ e_table_click_to_add_commit (E_TABLE_CLICK_TO_ADD (table->click_to_add));
}
static void
@@ -2266,7 +2266,7 @@ et_set_property (GObject *object,
case PROP_LENGTH_THRESHOLD:
etable->length_threshold = g_value_get_int (value);
if (etable->group) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etable->group),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etable->group),
"length_threshold", etable->length_threshold,
NULL);
}
@@ -2274,7 +2274,7 @@ et_set_property (GObject *object,
case PROP_UNIFORM_ROW_HEIGHT:
etable->uniform_row_height = g_value_get_boolean (value);
if (etable->group) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etable->group),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etable->group),
"uniform_row_height", etable->uniform_row_height,
NULL);
}
@@ -2295,7 +2295,7 @@ et_set_property (GObject *object,
if (etable->use_click_to_add) {
etable->click_to_add = gnome_canvas_item_new
- (GNOME_CANVAS_GROUP(etable->canvas_vbox),
+ (GNOME_CANVAS_GROUP (etable->canvas_vbox),
e_table_click_to_add_get_type (),
"header", etable->header,
"model", etable->model,
@@ -2303,10 +2303,10 @@ et_set_property (GObject *object,
NULL);
if (etable->use_click_to_add_end)
- e_canvas_vbox_add_item (E_CANVAS_VBOX(etable->canvas_vbox),
+ e_canvas_vbox_add_item (E_CANVAS_VBOX (etable->canvas_vbox),
etable->click_to_add);
else
- e_canvas_vbox_add_item_start (E_CANVAS_VBOX(etable->canvas_vbox),
+ e_canvas_vbox_add_item_start (E_CANVAS_VBOX (etable->canvas_vbox),
etable->click_to_add);
g_signal_connect (G_OBJECT (etable->click_to_add), "cursor_change",
@@ -2332,14 +2332,14 @@ set_scroll_adjustments (ETable *table,
if (table->table_canvas != NULL) {
gtk_layout_set_hadjustment (
- GTK_LAYOUT(table->table_canvas), hadjustment);
+ GTK_LAYOUT (table->table_canvas), hadjustment);
gtk_layout_set_vadjustment (
- GTK_LAYOUT(table->table_canvas), vadjustment);
+ GTK_LAYOUT (table->table_canvas), vadjustment);
}
if (table->header_canvas != NULL)
gtk_layout_set_hadjustment (
- GTK_LAYOUT(table->header_canvas), hadjustment);
+ GTK_LAYOUT (table->header_canvas), hadjustment);
}
/**
@@ -2357,19 +2357,19 @@ gint
e_table_get_next_row (ETable *e_table,
gint model_row)
{
- g_return_val_if_fail(e_table != NULL, -1);
- g_return_val_if_fail(E_IS_TABLE(e_table), -1);
+ g_return_val_if_fail (e_table != NULL, -1);
+ g_return_val_if_fail (E_IS_TABLE (e_table), -1);
if (e_table->sorter) {
gint i;
- i = e_sorter_model_to_sorted(E_SORTER (e_table->sorter), model_row);
+ i = e_sorter_model_to_sorted (E_SORTER (e_table->sorter), model_row);
i++;
- if (i < e_table_model_row_count(e_table->model)) {
- return e_sorter_sorted_to_model(E_SORTER (e_table->sorter), i);
+ if (i < e_table_model_row_count (e_table->model)) {
+ return e_sorter_sorted_to_model (E_SORTER (e_table->sorter), i);
} else
return -1;
} else
- if (model_row < e_table_model_row_count(e_table->model) - 1)
+ if (model_row < e_table_model_row_count (e_table->model) - 1)
return model_row + 1;
else
return -1;
@@ -2391,15 +2391,15 @@ gint
e_table_get_prev_row (ETable *e_table,
gint model_row)
{
- g_return_val_if_fail(e_table != NULL, -1);
- g_return_val_if_fail(E_IS_TABLE(e_table), -1);
+ g_return_val_if_fail (e_table != NULL, -1);
+ g_return_val_if_fail (E_IS_TABLE (e_table), -1);
if (e_table->sorter) {
gint i;
- i = e_sorter_model_to_sorted(E_SORTER (e_table->sorter), model_row);
+ i = e_sorter_model_to_sorted (E_SORTER (e_table->sorter), model_row);
i--;
if (i >= 0)
- return e_sorter_sorted_to_model(E_SORTER (e_table->sorter), i);
+ return e_sorter_sorted_to_model (E_SORTER (e_table->sorter), i);
else
return -1;
} else
@@ -2420,11 +2420,11 @@ gint
e_table_model_to_view_row (ETable *e_table,
gint model_row)
{
- g_return_val_if_fail(e_table != NULL, -1);
- g_return_val_if_fail(E_IS_TABLE(e_table), -1);
+ g_return_val_if_fail (e_table != NULL, -1);
+ g_return_val_if_fail (E_IS_TABLE (e_table), -1);
if (e_table->sorter)
- return e_sorter_model_to_sorted(E_SORTER (e_table->sorter), model_row);
+ return e_sorter_model_to_sorted (E_SORTER (e_table->sorter), model_row);
else
return model_row;
}
@@ -2443,8 +2443,8 @@ gint
e_table_view_to_model_row (ETable *e_table,
gint view_row)
{
- g_return_val_if_fail(e_table != NULL, -1);
- g_return_val_if_fail(E_IS_TABLE(e_table), -1);
+ g_return_val_if_fail (e_table != NULL, -1);
+ g_return_val_if_fail (E_IS_TABLE (e_table), -1);
if (e_table->sorter)
return e_sorter_sorted_to_model (E_SORTER (e_table->sorter), view_row);
@@ -2669,10 +2669,10 @@ e_table_drag_get_data (ETable *table,
GdkAtom target,
guint32 time)
{
- g_return_if_fail(table != NULL);
- g_return_if_fail(E_IS_TABLE(table));
+ g_return_if_fail (table != NULL);
+ g_return_if_fail (E_IS_TABLE (table));
- gtk_drag_get_data(GTK_WIDGET(table),
+ gtk_drag_get_data (GTK_WIDGET (table),
context,
target,
time);
@@ -2749,8 +2749,8 @@ e_table_drag_highlight (ETable *table,
void
e_table_drag_unhighlight (ETable *table)
{
- g_return_if_fail(table != NULL);
- g_return_if_fail(E_IS_TABLE(table));
+ g_return_if_fail (table != NULL);
+ g_return_if_fail (E_IS_TABLE (table));
if (table->drop_highlight) {
gtk_object_destroy (GTK_OBJECT (table->drop_highlight));
@@ -2764,10 +2764,10 @@ void e_table_drag_dest_set (ETable *table,
gint n_targets,
GdkDragAction actions)
{
- g_return_if_fail(table != NULL);
- g_return_if_fail(E_IS_TABLE(table));
+ g_return_if_fail (table != NULL);
+ g_return_if_fail (E_IS_TABLE (table));
- gtk_drag_dest_set(GTK_WIDGET(table),
+ gtk_drag_dest_set (GTK_WIDGET (table),
flags,
targets,
n_targets,
@@ -2779,10 +2779,10 @@ void e_table_drag_dest_set_proxy (ETable *table,
GdkDragProtocol protocol,
gboolean use_coordinates)
{
- g_return_if_fail(table != NULL);
- g_return_if_fail(E_IS_TABLE(table));
+ g_return_if_fail (table != NULL);
+ g_return_if_fail (E_IS_TABLE (table));
- gtk_drag_dest_set_proxy(GTK_WIDGET(table),
+ gtk_drag_dest_set_proxy (GTK_WIDGET (table),
proxy_window,
protocol,
use_coordinates);
@@ -2796,10 +2796,10 @@ void e_table_drag_dest_set_proxy (ETable *table,
void
e_table_drag_dest_unset (GtkWidget *widget)
{
- g_return_if_fail(widget != NULL);
- g_return_if_fail(E_IS_TABLE(widget));
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (E_IS_TABLE (widget));
- gtk_drag_dest_unset(widget);
+ gtk_drag_dest_unset (widget);
}
/* Source side */
@@ -2858,10 +2858,10 @@ e_table_drag_source_set (ETable *table,
ETableDragSourceSite *site;
GtkWidget *canvas;
- g_return_if_fail(table != NULL);
- g_return_if_fail(E_IS_TABLE(table));
+ g_return_if_fail (table != NULL);
+ g_return_if_fail (E_IS_TABLE (table));
- canvas = GTK_WIDGET(table->table_canvas);
+ canvas = GTK_WIDGET (table->table_canvas);
site = table->site;
gtk_widget_add_events (canvas,
@@ -2901,7 +2901,7 @@ e_table_drag_source_unset (ETable *table)
ETableDragSourceSite *site;
g_return_if_fail (table != NULL);
- g_return_if_fail (E_IS_TABLE(table));
+ g_return_if_fail (E_IS_TABLE (table));
site = table->site;
@@ -2943,12 +2943,12 @@ e_table_drag_begin (ETable *table,
GdkEvent *event)
{
g_return_val_if_fail (table != NULL, NULL);
- g_return_val_if_fail (E_IS_TABLE(table), NULL);
+ g_return_val_if_fail (E_IS_TABLE (table), NULL);
table->drag_row = row;
table->drag_col = col;
- return gtk_drag_begin(GTK_WIDGET(table),
+ return gtk_drag_begin (GTK_WIDGET (table),
targets,
actions,
button,
@@ -2960,7 +2960,7 @@ et_drag_begin (GtkWidget *widget,
GdkDragContext *context,
ETable *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_BEGIN], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_BEGIN], 0,
et->drag_row, et->drag_col, context);
}
@@ -2969,34 +2969,34 @@ et_drag_end (GtkWidget *widget,
GdkDragContext *context,
ETable *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_END], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_END], 0,
et->drag_row, et->drag_col, context);
}
static void
-et_drag_data_get(GtkWidget *widget,
+et_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
guint time,
ETable *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_DATA_GET], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_DATA_GET], 0,
et->drag_row, et->drag_col, context, selection_data,
info, time);
}
static void
-et_drag_data_delete(GtkWidget *widget,
+et_drag_data_delete (GtkWidget *widget,
GdkDragContext *context,
ETable *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_DATA_DELETE], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_DATA_DELETE], 0,
et->drag_row, et->drag_col, context);
}
static gboolean
-do_drag_motion(ETable *et,
+do_drag_motion (ETable *et,
GdkDragContext *context,
gint x,
gint y,
@@ -3008,12 +3008,12 @@ do_drag_motion(ETable *et,
e_table_get_cell_at (et, x, y, &row, &col);
if (row != et->drop_row && col != et->drop_row) {
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_LEAVE], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_LEAVE], 0,
et->drop_row, et->drop_col, context, time);
}
et->drop_row = row;
et->drop_col = col;
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_MOTION], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_MOTION], 0,
et->drop_row, et->drop_col, context, x, y, time, &ret_val);
return ret_val;
@@ -3125,12 +3125,12 @@ context_connect (ETable *et, GdkDragContext *context)
}
static void
-et_drag_leave(GtkWidget *widget,
+et_drag_leave (GtkWidget *widget,
GdkDragContext *context,
guint time,
ETable *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_LEAVE], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_LEAVE], 0,
et->drop_row, et->drop_col, context, time);
et->drop_row = -1;
et->drop_col = -1;
@@ -3139,7 +3139,7 @@ et_drag_leave(GtkWidget *widget,
}
static gboolean
-et_drag_motion(GtkWidget *widget,
+et_drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
@@ -3178,7 +3178,7 @@ et_drag_motion(GtkWidget *widget,
}
static gboolean
-et_drag_drop(GtkWidget *widget,
+et_drag_drop (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
@@ -3191,14 +3191,14 @@ et_drag_drop(GtkWidget *widget,
e_table_get_cell_at (et, x, y, &row, &col);
if (row != et->drop_row && col != et->drop_row) {
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_LEAVE], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_LEAVE], 0,
et->drop_row, et->drop_col, context, time);
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_MOTION], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_MOTION], 0,
row, col, context, x, y, time, &ret_val);
}
et->drop_row = row;
et->drop_col = col;
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_DROP], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_DROP], 0,
et->drop_row, et->drop_col, context, x, y, time, &ret_val);
et->drop_row = -1;
et->drop_col = -1;
@@ -3209,7 +3209,7 @@ et_drag_drop(GtkWidget *widget,
}
static void
-et_drag_data_received(GtkWidget *widget,
+et_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
@@ -3222,7 +3222,7 @@ et_drag_data_received(GtkWidget *widget,
e_table_get_cell_at (et, x, y, &row, &col);
- g_signal_emit (G_OBJECT (et), et_signals [TABLE_DRAG_DATA_RECEIVED], 0,
+ g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_DATA_RECEIVED], 0,
row, col, context, x, y, selection_data, info, time);
}
@@ -3267,7 +3267,7 @@ e_table_class_init (ETableClass *class)
class->table_drag_drop = NULL;
class->table_drag_data_received = NULL;
- et_signals [CURSOR_CHANGE] =
+ et_signals[CURSOR_CHANGE] =
g_signal_new ("cursor_change",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3276,7 +3276,7 @@ e_table_class_init (ETableClass *class)
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
- et_signals [CURSOR_ACTIVATED] =
+ et_signals[CURSOR_ACTIVATED] =
g_signal_new ("cursor_activated",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3285,7 +3285,7 @@ e_table_class_init (ETableClass *class)
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
- et_signals [SELECTION_CHANGE] =
+ et_signals[SELECTION_CHANGE] =
g_signal_new ("selection_change",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3294,7 +3294,7 @@ e_table_class_init (ETableClass *class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- et_signals [DOUBLE_CLICK] =
+ et_signals[DOUBLE_CLICK] =
g_signal_new ("double_click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3304,7 +3304,7 @@ e_table_class_init (ETableClass *class)
G_TYPE_NONE, 3, G_TYPE_INT,
G_TYPE_INT, GDK_TYPE_EVENT);
- et_signals [RIGHT_CLICK] =
+ et_signals[RIGHT_CLICK] =
g_signal_new ("right_click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3314,7 +3314,7 @@ e_table_class_init (ETableClass *class)
G_TYPE_BOOLEAN, 3, G_TYPE_INT,
G_TYPE_INT, GDK_TYPE_EVENT);
- et_signals [CLICK] =
+ et_signals[CLICK] =
g_signal_new ("click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3324,7 +3324,7 @@ e_table_class_init (ETableClass *class)
G_TYPE_BOOLEAN, 3, G_TYPE_INT,
G_TYPE_INT, GDK_TYPE_EVENT);
- et_signals [KEY_PRESS] =
+ et_signals[KEY_PRESS] =
g_signal_new ("key_press",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3334,7 +3334,7 @@ e_table_class_init (ETableClass *class)
G_TYPE_BOOLEAN, 3, G_TYPE_INT,
G_TYPE_INT, GDK_TYPE_EVENT);
- et_signals [START_DRAG] =
+ et_signals[START_DRAG] =
g_signal_new ("start_drag",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3344,7 +3344,7 @@ e_table_class_init (ETableClass *class)
G_TYPE_BOOLEAN, 3, G_TYPE_INT,
G_TYPE_INT, GDK_TYPE_EVENT);
- et_signals [STATE_CHANGE] =
+ et_signals[STATE_CHANGE] =
g_signal_new ("state_change",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3353,7 +3353,7 @@ e_table_class_init (ETableClass *class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- et_signals [WHITE_SPACE_EVENT] =
+ et_signals[WHITE_SPACE_EVENT] =
g_signal_new ("white_space_event",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,