aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-16 23:25:56 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-09-04 19:34:32 +0800
commitfcbbdfbd18e15b4ee8322a0217cf03a689a5e033 (patch)
treee16cd2a2279558c6a2bfb6ca39fcbaac4c85ba59 /widgets/table
parentf78417c48861759d7b0c4535ecd3febe4638a7d3 (diff)
downloadgsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.gz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.bz2
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.lz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.xz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.zst
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-cell-checkbox.c10
-rw-r--r--widgets/table/e-cell-combo.c103
-rw-r--r--widgets/table/e-cell-date-edit.c130
-rw-r--r--widgets/table/e-cell-date-edit.h10
-rw-r--r--widgets/table/e-cell-date.c14
-rw-r--r--widgets/table/e-cell-hbox.c30
-rw-r--r--widgets/table/e-cell-number.c11
-rw-r--r--widgets/table/e-cell-percent.c18
-rw-r--r--widgets/table/e-cell-pixbuf.c77
-rw-r--r--widgets/table/e-cell-popup.c102
-rw-r--r--widgets/table/e-cell-popup.h8
-rw-r--r--widgets/table/e-cell-size.c11
-rw-r--r--widgets/table/e-cell-text.c273
-rw-r--r--widgets/table/e-cell-text.h8
-rw-r--r--widgets/table/e-cell-tree.c94
-rw-r--r--widgets/table/e-cell-vbox.c27
-rw-r--r--widgets/table/e-cell.c163
-rw-r--r--widgets/table/e-cell.h2
-rw-r--r--widgets/table/e-popup-menu.c12
-rw-r--r--widgets/table/e-table-click-to-add.c47
-rw-r--r--widgets/table/e-table-col.c10
-rw-r--r--widgets/table/e-table-col.h10
-rw-r--r--widgets/table/e-table-column-specification.c4
-rw-r--r--widgets/table/e-table-config.c104
-rw-r--r--widgets/table/e-table-extras.c8
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c27
-rw-r--r--widgets/table/e-table-field-chooser-item.c55
-rw-r--r--widgets/table/e-table-field-chooser-item.h2
-rw-r--r--widgets/table/e-table-field-chooser.c26
-rw-r--r--widgets/table/e-table-group-container.c213
-rw-r--r--widgets/table/e-table-group-container.h2
-rw-r--r--widgets/table/e-table-group-leaf.c58
-rw-r--r--widgets/table/e-table-group.c71
-rw-r--r--widgets/table/e-table-header-item.c176
-rw-r--r--widgets/table/e-table-header-item.h4
-rw-r--r--widgets/table/e-table-header-utils.c37
-rw-r--r--widgets/table/e-table-header-utils.h2
-rw-r--r--widgets/table/e-table-header.c86
-rw-r--r--widgets/table/e-table-item.c402
-rw-r--r--widgets/table/e-table-item.h12
-rw-r--r--widgets/table/e-table-memory-callbacks.c54
-rw-r--r--widgets/table/e-table-memory-store.c95
-rw-r--r--widgets/table/e-table-memory.c14
-rw-r--r--widgets/table/e-table-model.c60
-rw-r--r--widgets/table/e-table-one.c32
-rw-r--r--widgets/table/e-table-search.c7
-rw-r--r--widgets/table/e-table-selection-model.c85
-rw-r--r--widgets/table/e-table-selection-model.h2
-rw-r--r--widgets/table/e-table-sort-info.c42
-rw-r--r--widgets/table/e-table-sorted-variable.c20
-rw-r--r--widgets/table/e-table-sorted.c36
-rw-r--r--widgets/table/e-table-sorter.c61
-rw-r--r--widgets/table/e-table-sorting-utils.c75
-rw-r--r--widgets/table/e-table-specification.c10
-rw-r--r--widgets/table/e-table-state.c20
-rw-r--r--widgets/table/e-table-subset-variable.c44
-rw-r--r--widgets/table/e-table-subset.c150
-rw-r--r--widgets/table/e-table-utils.c9
-rw-r--r--widgets/table/e-table-without.c73
-rw-r--r--widgets/table/e-table.c499
-rw-r--r--widgets/table/e-table.h4
-rw-r--r--widgets/table/e-tree-memory-callbacks.c79
-rw-r--r--widgets/table/e-tree-memory.c82
-rw-r--r--widgets/table/e-tree-model.c128
-rw-r--r--widgets/table/e-tree-selection-model.c132
-rw-r--r--widgets/table/e-tree-sorted.c237
-rw-r--r--widgets/table/e-tree-table-adapter.c253
-rw-r--r--widgets/table/e-tree.c441
-rw-r--r--widgets/table/gal-a11y-e-cell-popup.c12
-rw-r--r--widgets/table/gal-a11y-e-cell-registry.c20
-rw-r--r--widgets/table/gal-a11y-e-cell-toggle.c18
-rw-r--r--widgets/table/gal-a11y-e-cell-tree.c20
-rw-r--r--widgets/table/gal-a11y-e-cell-vbox.c15
-rw-r--r--widgets/table/gal-a11y-e-cell.c90
-rw-r--r--widgets/table/gal-a11y-e-table-click-to-add-factory.c2
-rw-r--r--widgets/table/gal-a11y-e-table-click-to-add.c18
-rw-r--r--widgets/table/gal-a11y-e-table-column-header.c10
-rw-r--r--widgets/table/gal-a11y-e-table-factory.c2
-rw-r--r--widgets/table/gal-a11y-e-table-item-factory.c2
-rw-r--r--widgets/table/gal-a11y-e-table-item.c184
-rw-r--r--widgets/table/gal-a11y-e-table.c19
-rw-r--r--widgets/table/gal-a11y-e-tree-factory.c2
-rw-r--r--widgets/table/gal-a11y-e-tree.c14
83 files changed, 3635 insertions, 1996 deletions
diff --git a/widgets/table/e-cell-checkbox.c b/widgets/table/e-cell-checkbox.c
index 7969e2b4f0..9e775761c7 100644
--- a/widgets/table/e-cell-checkbox.c
+++ b/widgets/table/e-cell-checkbox.c
@@ -42,9 +42,13 @@ G_DEFINE_TYPE (ECellCheckbox, e_cell_checkbox, E_TYPE_CELL_TOGGLE)
static GdkPixbuf *checks[2];
static void
-ecc_print (ECellView *ecell_view, GtkPrintContext *context,
- gint model_col, gint view_col, gint row,
- gdouble width, gdouble height)
+ecc_print (ECellView *ecell_view,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width,
+ gdouble height)
{
cairo_t *cr = gtk_print_context_get_cairo_context (context);
const gint value = GPOINTER_TO_INT (
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index f759185a56..2617cfafdf 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -109,7 +109,7 @@ static void e_cell_combo_restart_edit (ECellCombo *ecc);
G_DEFINE_TYPE (ECellCombo, e_cell_combo, E_TYPE_CELL_POPUP)
static void
-e_cell_combo_class_init (ECellComboClass *class)
+e_cell_combo_class_init (ECellComboClass *class)
{
ECellPopupClass *ecpc = E_CELL_POPUP_CLASS (class);
GObjectClass *object_class = G_OBJECT_CLASS (class);
@@ -120,7 +120,7 @@ e_cell_combo_class_init (ECellComboClass *class)
}
static void
-e_cell_combo_init (ECellCombo *ecc)
+e_cell_combo_init (ECellCombo *ecc)
{
GtkWidget *frame;
AtkObject *a11y;
@@ -129,7 +129,7 @@ e_cell_combo_init (ECellCombo *ecc)
GtkScrolledWindow *scrolled_window;
/* We create one popup window for the ECell, since there will only
- ever be one popup in use at a time. */
+ * ever be one popup in use at a time. */
ecc->popup_window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_type_hint (
@@ -292,10 +292,10 @@ e_cell_combo_do_popup (ECellPopup *ecp,
}
static void
-e_cell_combo_select_matching_item (ECellCombo *ecc)
+e_cell_combo_select_matching_item (ECellCombo *ecc)
{
ECellPopup *ecp = E_CELL_POPUP (ecc);
- ECellView *ecv = (ECellView*) ecp->popup_cell_view;
+ ECellView *ecv = (ECellView *) ecp->popup_cell_view;
ECellText *ecell_text = E_CELL_TEXT (ecp->child);
ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
ETableCol *ecol;
@@ -342,7 +342,9 @@ e_cell_combo_select_matching_item (ECellCombo *ecc)
}
static void
-e_cell_combo_show_popup (ECellCombo *ecc, gint row, gint view_col)
+e_cell_combo_show_popup (ECellCombo *ecc,
+ gint row,
+ gint view_col)
{
GdkWindow *window;
GtkAllocation allocation;
@@ -379,13 +381,13 @@ e_cell_combo_show_popup (ECellCombo *ecc, gint row, gint view_col)
/* Calculates the size and position of the popup window (like GtkCombo). */
static void
-e_cell_combo_get_popup_pos (ECellCombo *ecc,
- gint row,
- gint view_col,
- gint *x,
- gint *y,
- gint *height,
- gint *width)
+e_cell_combo_get_popup_pos (ECellCombo *ecc,
+ gint row,
+ gint view_col,
+ gint *x,
+ gint *y,
+ gint *height,
+ gint *width)
{
ECellPopup *ecp = E_CELL_POPUP (ecc);
ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
@@ -448,7 +450,7 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
avail_height = gdk_screen_height () - *y;
/* We'll use the entire screen width if needed, but we save space for
- the vertical scrollbar in case we need to show that. */
+ * the vertical scrollbar in case we need to show that. */
screen_width = gdk_screen_width ();
avail_width = screen_width - scrollbar_width;
@@ -481,7 +483,7 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
*width = column_width;
/* If it is larger than the available width, use that instead and show
- the horizontal scrollbar. */
+ * the horizontal scrollbar. */
if (*width > avail_width) {
*width = avail_width;
show_hscroll = TRUE;
@@ -506,11 +508,11 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
/* Check if it fits in the available height. */
if (work_height + list_requisition.height > avail_height) {
/* It doesn't fit, so we see if we have the minimum space
- needed. */
+ * needed. */
if (work_height + min_height > avail_height
&& *y - row_height > avail_height) {
/* We don't, so we show the popup above the cell
- instead of below it. */
+ * instead of below it. */
avail_height = *y - row_height;
*y -= (work_height + list_requisition.height
+ row_height);
@@ -526,7 +528,7 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
}
/* We try to line it up with the right edge of the column, but we don't
- want it to go off the edges of the screen. */
+ * want it to go off the edges of the screen. */
if (*x > screen_width)
*x = screen_width;
*x -= *width;
@@ -540,7 +542,8 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
}
static void
-e_cell_combo_selection_changed (GtkTreeSelection *selection, ECellCombo *ecc)
+e_cell_combo_selection_changed (GtkTreeSelection *selection,
+ ECellCombo *ecc)
{
GtkTreeIter iter;
GtkTreeModel *model;
@@ -554,25 +557,25 @@ e_cell_combo_selection_changed (GtkTreeSelection *selection, ECellCombo *ecc)
}
/* This handles button press events in the popup window.
- Note that since we have a pointer grab on this window, we also get button
- press events for windows outside the application here, so we hide the popup
- window if that happens. We also get propagated events from child widgets
- which we ignore. */
+ * Note that since we have a pointer grab on this window, we also get button
+ * press events for windows outside the application here, so we hide the popup
+ * window if that happens. We also get propagated events from child widgets
+ * which we ignore. */
static gint
-e_cell_combo_button_press (GtkWidget *popup_window,
- GdkEvent *event,
- ECellCombo *ecc)
+e_cell_combo_button_press (GtkWidget *popup_window,
+ GdkEvent *event,
+ ECellCombo *ecc)
{
GtkWidget *event_widget;
event_widget = gtk_get_event_widget (event);
/* If the button press was for a widget inside the popup list, but
- not the popup window itself, then we ignore the event and return
- FALSE. Otherwise we will hide the popup.
- Note that since we have a pointer grab on the popup list, button
- presses outside the application will be reported to this window,
- which is why we hide the popup in this case. */
+ * not the popup window itself, then we ignore the event and return
+ * FALSE. Otherwise we will hide the popup.
+ * Note that since we have a pointer grab on the popup list, button
+ * presses outside the application will be reported to this window,
+ * which is why we hide the popup in this case. */
while (event_widget) {
event_widget = gtk_widget_get_parent (event_widget);
if (event_widget == ecc->popup_tree_view)
@@ -588,10 +591,10 @@ e_cell_combo_button_press (GtkWidget *popup_window,
d(g_print("%s: popup_shown = FALSE\n", __FUNCTION__));
/* We don't want to update the cell here. Since the list is in browse
- mode there will always be one item selected, so when we popup the
- list one item is selected even if it doesn't match the current text
- in the cell. So if you click outside the popup (which is what has
- happened here) it is better to not update the cell. */
+ * mode there will always be one item selected, so when we popup the
+ * list one item is selected even if it doesn't match the current text
+ * in the cell. So if you click outside the popup (which is what has
+ * happened here) it is better to not update the cell. */
/*e_cell_combo_update_cell (ecc);*/
e_cell_combo_restart_edit (ecc);
@@ -599,16 +602,16 @@ e_cell_combo_button_press (GtkWidget *popup_window,
}
/* This handles button release events in the popup window. If the button is
- released inside the list, we want to hide the popup window and update the
- cell with the new selection. */
+ * released inside the list, we want to hide the popup window and update the
+ * cell with the new selection. */
static gint
-e_cell_combo_button_release (GtkWidget *popup_window,
- GdkEventButton *event,
- ECellCombo *ecc)
+e_cell_combo_button_release (GtkWidget *popup_window,
+ GdkEventButton *event,
+ ECellCombo *ecc)
{
GtkWidget *event_widget;
- event_widget = gtk_get_event_widget ((GdkEvent*) event);
+ event_widget = gtk_get_event_widget ((GdkEvent *) event);
/* See if the button was released in the list (or its children). */
while (event_widget && event_widget != ecc->popup_tree_view)
@@ -619,7 +622,7 @@ e_cell_combo_button_release (GtkWidget *popup_window,
return FALSE;
/* The button was released inside the list, so we hide the popup and
- update the cell to reflect the new selection. */
+ * update the cell to reflect the new selection. */
gtk_grab_remove (ecc->popup_window);
gdk_pointer_ungrab (event->time);
gdk_keyboard_ungrab (event->time);
@@ -635,11 +638,11 @@ e_cell_combo_button_release (GtkWidget *popup_window,
}
/* This handles key press events in the popup window. If the Escape key is
- pressed we hide the popup, and do not change the cell contents. */
+ * pressed we hide the popup, and do not change the cell contents. */
static gint
-e_cell_combo_key_press (GtkWidget *popup_window,
- GdkEventKey *event,
- ECellCombo *ecc)
+e_cell_combo_key_press (GtkWidget *popup_window,
+ GdkEventKey *event,
+ ECellCombo *ecc)
{
/* If the Escape key is pressed we hide the popup. */
if (event->keyval != GDK_KEY_Escape
@@ -670,10 +673,10 @@ e_cell_combo_key_press (GtkWidget *popup_window,
}
static void
-e_cell_combo_update_cell (ECellCombo *ecc)
+e_cell_combo_update_cell (ECellCombo *ecc)
{
ECellPopup *ecp = E_CELL_POPUP (ecc);
- ECellView *ecv = (ECellView*) ecp->popup_cell_view;
+ ECellView *ecv = (ECellView *) ecp->popup_cell_view;
ECellText *ecell_text = E_CELL_TEXT (ecp->child);
ETableItem *eti = E_TABLE_ITEM (ecv->e_table_item_view);
ETableCol *ecol;
@@ -708,11 +711,11 @@ e_cell_combo_update_cell (ECellCombo *ecc)
}
static void
-e_cell_combo_restart_edit (ECellCombo *ecc)
+e_cell_combo_restart_edit (ECellCombo *ecc)
{
/* This doesn't work. ETable stops the edit straight-away again. */
#if 0
- ECellView *ecv = (ECellView*) ecc->popup_cell_view;
+ ECellView *ecv = (ECellView *) ecc->popup_cell_view;
ETableItem *eti = E_TABLE_ITEM (ecv->e_table_item_view);
e_table_item_enter_edit (eti, ecc->popup_view_col, ecc->popup_row);
diff --git a/widgets/table/e-cell-date-edit.c b/widgets/table/e-cell-date-edit.c
index 7517ad0e9c..3035652116 100644
--- a/widgets/table/e-cell-date-edit.c
+++ b/widgets/table/e-cell-date-edit.c
@@ -219,7 +219,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
ecde->time_callback_destroy = NULL;
/* We create one popup window for the ECell, since there will only
- ever be one popup in use at a time. */
+ * ever be one popup in use at a time. */
ecde->popup_window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_type_hint (GTK_WINDOW (ecde->popup_window),
@@ -299,7 +299,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
now_button = gtk_button_new_with_label (_("Now"));
gtk_container_add (GTK_CONTAINER (bbox), now_button);
gtk_widget_show (now_button);
- g_signal_connect((now_button), "clicked",
+ g_signal_connect ((now_button), "clicked",
G_CALLBACK (e_cell_date_edit_on_now_clicked),
ecde);
ecde->now_button = now_button;
@@ -307,7 +307,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
today_button = gtk_button_new_with_label (_("Today"));
gtk_container_add (GTK_CONTAINER (bbox), today_button);
gtk_widget_show (today_button);
- g_signal_connect((today_button), "clicked",
+ g_signal_connect ((today_button), "clicked",
G_CALLBACK (e_cell_date_edit_on_today_clicked),
ecde);
ecde->today_button = today_button;
@@ -316,7 +316,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
none_button = gtk_button_new_with_label (C_("table-date", "None"));
gtk_container_add (GTK_CONTAINER (bbox), none_button);
gtk_widget_show (none_button);
- g_signal_connect((none_button), "clicked",
+ g_signal_connect ((none_button), "clicked",
G_CALLBACK (e_cell_date_edit_on_none_clicked),
ecde);
ecde->none_button = none_button;
@@ -324,7 +324,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
ok_button = gtk_button_new_with_label (_("OK"));
gtk_container_add (GTK_CONTAINER (bbox), ok_button);
gtk_widget_show (ok_button);
- g_signal_connect((ok_button), "clicked",
+ g_signal_connect ((ok_button), "clicked",
G_CALLBACK (e_cell_date_edit_on_ok_clicked),
ecde);
@@ -346,16 +346,16 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
* Returns: an ECellDateEdit object.
*/
ECell *
-e_cell_date_edit_new (void)
+e_cell_date_edit_new (void)
{
return g_object_new (e_cell_date_edit_get_type (), NULL);
}
static void
-e_cell_date_edit_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
+e_cell_date_edit_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ECellDateEdit *ecde;
@@ -389,10 +389,10 @@ e_cell_date_edit_get_property (GObject *object,
}
static void
-e_cell_date_edit_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
+e_cell_date_edit_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ECellDateEdit *ecde;
gint ivalue;
@@ -477,10 +477,10 @@ e_cell_date_edit_dispose (GObject *object)
}
static gint
-e_cell_date_edit_do_popup (ECellPopup *ecp,
- GdkEvent *event,
- gint row,
- gint view_col)
+e_cell_date_edit_do_popup (ECellPopup *ecp,
+ GdkEvent *event,
+ gint row,
+ gint view_col)
{
ECellDateEdit *ecde = E_CELL_DATE_EDIT (ecp);
GdkWindow *window;
@@ -499,11 +499,11 @@ e_cell_date_edit_do_popup (ECellPopup *ecp,
}
static void
-e_cell_date_edit_set_popup_values (ECellDateEdit *ecde)
+e_cell_date_edit_set_popup_values (ECellDateEdit *ecde)
{
ECellPopup *ecp = E_CELL_POPUP (ecde);
ECellText *ecell_text = E_CELL_TEXT (ecp->child);
- ECellView *ecv = (ECellView*) ecp->popup_cell_view;
+ ECellView *ecv = (ECellView *) ecp->popup_cell_view;
ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
ETableCol *ecol;
gchar *cell_text;
@@ -519,7 +519,7 @@ e_cell_date_edit_set_popup_values (ECellDateEdit *ecde)
ecol->col_idx, ecp->popup_row);
/* Try to parse just a date first. If the value is only a date, we
- use a DATE value. */
+ * use a DATE value. */
status = e_time_parse_date (cell_text, &date_tm);
if (status == E_TIME_PARSE_INVALID) {
is_date = FALSE;
@@ -527,7 +527,7 @@ e_cell_date_edit_set_popup_values (ECellDateEdit *ecde)
}
/* If there is no date and time set, or the date is invalid, we clear
- the selections, else we select the appropriate date & time. */
+ * the selections, else we select the appropriate date & time. */
calitem = E_CALENDAR_ITEM (E_CALENDAR (ecde->calendar)->calitem);
if (status == E_TIME_PARSE_NONE || status == E_TIME_PARSE_INVALID) {
gtk_entry_set_text (GTK_ENTRY (ecde->time_entry), "");
@@ -562,8 +562,8 @@ e_cell_date_edit_set_popup_values (ECellDateEdit *ecde)
}
static void
-e_cell_date_edit_select_matching_time (ECellDateEdit *ecde,
- gchar *time)
+e_cell_date_edit_select_matching_time (ECellDateEdit *ecde,
+ gchar *time)
{
gboolean found = FALSE;
gboolean valid;
@@ -605,9 +605,9 @@ e_cell_date_edit_select_matching_time (ECellDateEdit *ecde,
}
static void
-e_cell_date_edit_show_popup (ECellDateEdit *ecde,
- gint row,
- gint view_col)
+e_cell_date_edit_show_popup (ECellDateEdit *ecde,
+ gint row,
+ gint view_col)
{
GdkWindow *window;
gint x, y, width, height;
@@ -631,13 +631,13 @@ e_cell_date_edit_show_popup (ECellDateEdit *ecde,
/* Calculates the size and position of the popup window (like GtkCombo). */
static void
-e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
- gint row,
- gint view_col,
- gint *x,
- gint *y,
- gint *height,
- gint *width)
+e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
+ gint row,
+ gint view_col,
+ gint *x,
+ gint *y,
+ gint *height,
+ gint *width)
{
ECellPopup *ecp = E_CELL_POPUP (ecde);
ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
@@ -672,7 +672,7 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
*x += x1;
/* The ETable positions don't include the grid lines, I think, so we
- add 1. */
+ * add 1. */
scrollable = GTK_SCROLLABLE (&GNOME_CANVAS (canvas)->layout);
adjustment = gtk_scrollable_get_vadjustment (scrollable);
value = (gint) gtk_adjustment_get_value (adjustment);
@@ -681,7 +681,7 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
avail_height = gdk_screen_height () - *y;
/* We'll use the entire screen width if needed, but we save space for
- the vertical scrollbar in case we need to show that. */
+ * the vertical scrollbar in case we need to show that. */
screen_width = gdk_screen_width ();
gtk_widget_get_preferred_size (ecde->popup_window, &popup_requisition, NULL);
@@ -696,10 +696,10 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
/* Check if it fits in the available height. */
if (popup_requisition.height > avail_height) {
/* It doesn't fit, so we see if we have the minimum space
- needed. */
+ * needed. */
if (*y - row_height > avail_height) {
/* We don't, so we show the popup above the cell
- instead of below it. */
+ * instead of below it. */
*y -= (popup_requisition.height + row_height);
if (*y < 0)
*y = 0;
@@ -707,7 +707,7 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
}
/* We try to line it up with the right edge of the column, but we don't
- want it to go off the edges of the screen. */
+ * want it to go off the edges of the screen. */
if (*x > screen_width)
*x = screen_width;
*x -= *width;
@@ -718,11 +718,11 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
}
/* This handles key press events in the popup window. If the Escape key is
- pressed we hide the popup, and do not change the cell contents. */
+ * pressed we hide the popup, and do not change the cell contents. */
static gint
-e_cell_date_edit_key_press (GtkWidget *popup_window,
- GdkEventKey *event,
- ECellDateEdit *ecde)
+e_cell_date_edit_key_press (GtkWidget *popup_window,
+ GdkEventKey *event,
+ ECellDateEdit *ecde)
{
/* If the Escape key is pressed we hide the popup. */
if (event->keyval != GDK_KEY_Escape)
@@ -734,16 +734,16 @@ e_cell_date_edit_key_press (GtkWidget *popup_window,
}
/* This handles button press events in the popup window. If the button is
- pressed outside the popup, we hide it and do not change the cell contents.
+ * pressed outside the popup, we hide it and do not change the cell contents.
*/
static gint
-e_cell_date_edit_button_press (GtkWidget *popup_window,
- GdkEventButton *event,
- ECellDateEdit *ecde)
+e_cell_date_edit_button_press (GtkWidget *popup_window,
+ GdkEventButton *event,
+ ECellDateEdit *ecde)
{
GtkWidget *event_widget;
- event_widget = gtk_get_event_widget ((GdkEvent*) event);
+ event_widget = gtk_get_event_widget ((GdkEvent *) event);
if (gtk_widget_get_toplevel (event_widget) != popup_window) {
e_cell_date_edit_hide_popup (ecde);
}
@@ -752,9 +752,9 @@ e_cell_date_edit_button_press (GtkWidget *popup_window,
}
/* Clears the time list and rebuilds it using the lower_hour, upper_hour
- and use_24_hour_format settings. */
+ * and use_24_hour_format settings. */
static void
-e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde)
+e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde)
{
GtkListStore *store;
gchar buffer[40];
@@ -774,7 +774,7 @@ e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde)
for (hour = ecde->lower_hour; hour <= ecde->upper_hour; hour++) {
/* We don't want to display midnight at the end, since that is
- really in the next day. */
+ * really in the next day. */
if (hour == 24)
break;
@@ -798,8 +798,8 @@ e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde)
}
static void
-e_cell_date_edit_on_ok_clicked (GtkWidget *button,
- ECellDateEdit *ecde)
+e_cell_date_edit_on_ok_clicked (GtkWidget *button,
+ ECellDateEdit *ecde)
{
ECalendarItem *calitem;
GDate start_date, end_date;
@@ -860,7 +860,7 @@ e_cell_date_edit_show_time_invalid_warning (ECellDateEdit *ecde)
buffer, sizeof (buffer));
/* FIXME: Fix transient settings - I'm not sure it works with popup
- windows. Maybe we need to use a normal window without decorations.*/
+ * windows. Maybe we need to use a normal window without decorations.*/
dialog = gtk_message_dialog_new (
GTK_WINDOW (ecde->popup_window),
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -937,7 +937,7 @@ e_cell_date_edit_update_cell (ECellDateEdit *ecde,
{
ECellPopup *ecp = E_CELL_POPUP (ecde);
ECellText *ecell_text = E_CELL_TEXT (ecp->child);
- ECellView *ecv = (ECellView*) ecp->popup_cell_view;
+ ECellView *ecv = (ECellView *) ecp->popup_cell_view;
ETableItem *eti = E_TABLE_ITEM (ecv->e_table_item_view);
ETableCol *ecol;
gchar *old_text;
@@ -991,10 +991,10 @@ e_cell_date_edit_hide_popup (ECellDateEdit *ecde)
}
/* These freeze and thaw the rebuilding of the time list. They are useful when
- setting several properties which result in rebuilds of the list, e.g. the
- lower_hour, upper_hour and use_24_hour_format properties. */
+ * setting several properties which result in rebuilds of the list, e.g. the
+ * lower_hour, upper_hour and use_24_hour_format properties. */
void
-e_cell_date_edit_freeze (ECellDateEdit *ecde)
+e_cell_date_edit_freeze (ECellDateEdit *ecde)
{
g_return_if_fail (E_IS_CELL_DATE_EDIT (ecde));
@@ -1002,7 +1002,7 @@ e_cell_date_edit_freeze (ECellDateEdit *ecde)
}
void
-e_cell_date_edit_thaw (ECellDateEdit *ecde)
+e_cell_date_edit_thaw (ECellDateEdit *ecde)
{
g_return_if_fail (E_IS_CELL_DATE_EDIT (ecde));
@@ -1015,13 +1015,13 @@ e_cell_date_edit_thaw (ECellDateEdit *ecde)
}
/* Sets a callback to use to get the current time. This is useful if the
- application needs to use its own timezone data rather than rely on the
- Unix timezone. */
+ * application needs to use its own timezone data rather than rely on the
+ * Unix timezone. */
void
-e_cell_date_edit_set_get_time_callback (ECellDateEdit *ecde,
- ECellDateEditGetTimeCallback cb,
- gpointer data,
- GDestroyNotify destroy)
+e_cell_date_edit_set_get_time_callback (ECellDateEdit *ecde,
+ ECellDateEditGetTimeCallback cb,
+ gpointer data,
+ GDestroyNotify destroy)
{
g_return_if_fail (E_IS_CELL_DATE_EDIT (ecde));
diff --git a/widgets/table/e-cell-date-edit.h b/widgets/table/e-cell-date-edit.h
index 5224b0ddff..186302d79a 100644
--- a/widgets/table/e-cell-date-edit.h
+++ b/widgets/table/e-cell-date-edit.h
@@ -84,7 +84,7 @@ struct _ECellDateEdit {
gboolean need_time_list_rebuild;
/* The freeze count for rebuilding the time list. We only rebuild when
- this is 0. */
+ * this is 0. */
gint freeze_count;
ECellDateEditGetTimeCallback time_callback;
@@ -100,14 +100,14 @@ GType e_cell_date_edit_get_type (void) G_GNUC_CONST;
ECell * e_cell_date_edit_new (void);
/* These freeze and thaw the rebuilding of the time list. They are useful when
- setting several properties which result in rebuilds of the list, e.g. the
- lower_hour, upper_hour and use_24_hour_format properties. */
+ * setting several properties which result in rebuilds of the list, e.g. the
+ * lower_hour, upper_hour and use_24_hour_format properties. */
void e_cell_date_edit_freeze (ECellDateEdit *ecde);
void e_cell_date_edit_thaw (ECellDateEdit *ecde);
/* Sets a callback to use to get the current time. This is useful if the
- application needs to use its own timezone data rather than rely on the
- Unix timezone. */
+ * application needs to use its own timezone data rather than rely on the
+ * Unix timezone. */
void e_cell_date_edit_set_get_time_callback
(ECellDateEdit *ecde,
ECellDateEditGetTimeCallback cb,
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c
index fb3dd9fc71..79534aff45 100644
--- a/widgets/table/e-cell-date.c
+++ b/widgets/table/e-cell-date.c
@@ -39,7 +39,10 @@
G_DEFINE_TYPE (ECellDate, e_cell_date, E_TYPE_CELL_TEXT)
static gchar *
-ecd_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
+ecd_get_text (ECellText *cell,
+ ETableModel *model,
+ gint col,
+ gint row)
{
time_t date = GPOINTER_TO_INT (e_table_model_value_at (model, col, row));
const gchar *fmt_component, *fmt_part = NULL;
@@ -59,7 +62,8 @@ ecd_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
}
static void
-ecd_free_text (ECellText *cell, gchar *text)
+ecd_free_text (ECellText *cell,
+ gchar *text)
{
g_free (text);
}
@@ -104,7 +108,8 @@ e_cell_date_init (ECellDate *ecd)
* Returns: an ECell object that can be used to render dates.
*/
ECell *
-e_cell_date_new (const gchar *fontname, GtkJustification justify)
+e_cell_date_new (const gchar *fontname,
+ GtkJustification justify)
{
ECellDate *ecd = g_object_new (E_TYPE_CELL_DATE, NULL);
@@ -114,7 +119,8 @@ e_cell_date_new (const gchar *fontname, GtkJustification justify)
}
void
-e_cell_date_set_format_component (ECellDate *ecd, const gchar *fmt_component)
+e_cell_date_set_format_component (ECellDate *ecd,
+ const gchar *fmt_component)
{
g_return_if_fail (ecd != NULL);
diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c
index c8485b983a..a8eb4ccb76 100644
--- a/widgets/table/e-cell-hbox.c
+++ b/widgets/table/e-cell-hbox.c
@@ -50,7 +50,9 @@ G_DEFINE_TYPE (ECellHbox, e_cell_hbox, E_TYPE_CELL)
* ECell::new_view method
*/
static ECellView *
-ecv_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view)
+ecv_new_view (ECell *ecell,
+ ETableModel *table_model,
+ gpointer e_table_item_view)
{
ECellHbox *ecv = E_CELL_HBOX (ecell);
ECellHboxView *hbox_view = g_new0 (ECellHboxView, 1);
@@ -155,11 +157,11 @@ ecv_draw (ECellView *ecell_view,
gint subcell_offset = 0;
gint i;
- gint allotted_width = x2-x1;
+ gint allotted_width = x2 - x1;
for (i = 0; i < hbox_view->subcell_view_count; i++) {
/* Now cause our subcells to draw their contents,
- shifted by subcell_offset pixels */
+ * shifted by subcell_offset pixels */
gint width = allotted_width * hbox_view->def_size_cols[i] / 100;
/* e_cell_max_width_by_row (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col, row);
if (width < hbox_view->def_size_cols[i])
@@ -180,7 +182,13 @@ ecv_draw (ECellView *ecell_view,
* ECell::event method
*/
static gint
-ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions)
+ecv_event (ECellView *ecell_view,
+ GdkEvent *event,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ ECellActions *actions)
{
ECellHboxView *hbox_view = (ECellHboxView *) ecell_view;
gint y = 0;
@@ -217,7 +225,10 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
* ECell::height method
*/
static gint
-ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+ecv_height (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
ECellHboxView *hbox_view = (ECellHboxView *) ecell_view;
gint height = 0, max_height = 0;
@@ -234,7 +245,9 @@ ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
* ECell::max_width method
*/
static gint
-ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col)
+ecv_max_width (ECellView *ecell_view,
+ gint model_col,
+ gint view_col)
{
ECellHboxView *hbox_view = (ECellHboxView *) ecell_view;
gint width = 0;
@@ -321,7 +334,10 @@ e_cell_hbox_new (void)
}
void
-e_cell_hbox_append (ECellHbox *hbox, ECell *subcell, gint model_col, gint size)
+e_cell_hbox_append (ECellHbox *hbox,
+ ECell *subcell,
+ gint model_col,
+ gint size)
{
hbox->subcell_count++;
diff --git a/widgets/table/e-cell-number.c b/widgets/table/e-cell-number.c
index 7944bbea51..6e2f685a86 100644
--- a/widgets/table/e-cell-number.c
+++ b/widgets/table/e-cell-number.c
@@ -35,7 +35,10 @@
G_DEFINE_TYPE (ECellNumber, e_cell_number, E_TYPE_CELL_TEXT)
static gchar *
-ecn_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
+ecn_get_text (ECellText *cell,
+ ETableModel *model,
+ gint col,
+ gint row)
{
gpointer value;
@@ -45,7 +48,8 @@ ecn_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
}
static void
-ecn_free_text (ECellText *cell, gchar *text)
+ecn_free_text (ECellText *cell,
+ gchar *text)
{
g_free (text);
}
@@ -78,7 +82,8 @@ e_cell_number_init (ECellNumber *cell_number)
* Returns: an ECell object that can be used to render numbers.
*/
ECell *
-e_cell_number_new (const gchar *fontname, GtkJustification justify)
+e_cell_number_new (const gchar *fontname,
+ GtkJustification justify)
{
ECellNumber *ecn = g_object_new (E_TYPE_CELL_NUMBER, NULL);
diff --git a/widgets/table/e-cell-percent.c b/widgets/table/e-cell-percent.c
index 5b54527f67..61543b0e0c 100644
--- a/widgets/table/e-cell-percent.c
+++ b/widgets/table/e-cell-percent.c
@@ -41,7 +41,10 @@
G_DEFINE_TYPE (ECellPercent, e_cell_percent, E_TYPE_CELL_TEXT)
static gchar *
-ecp_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
+ecp_get_text (ECellText *cell,
+ ETableModel *model,
+ gint col,
+ gint row)
{
gint percent;
static gchar buffer[8];
@@ -59,7 +62,8 @@ ecp_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
}
static void
-ecp_free_text (ECellText *cell, gchar *text)
+ecp_free_text (ECellText *cell,
+ gchar *text)
{
/* Do Nothing. */
}
@@ -79,8 +83,11 @@ show_percent_warning (void)
}
static void
-ecp_set_value (ECellText *cell, ETableModel *model, gint col, gint row,
- const gchar *text)
+ecp_set_value (ECellText *cell,
+ ETableModel *model,
+ gint col,
+ gint row,
+ const gchar *text)
{
gint matched, percent;
gboolean empty = TRUE;
@@ -141,7 +148,8 @@ e_cell_percent_init (ECellPercent *ecp)
* Returns: an ECell object that can be used to render numbers.
*/
ECell *
-e_cell_percent_new (const gchar *fontname, GtkJustification justify)
+e_cell_percent_new (const gchar *fontname,
+ GtkJustification justify)
{
ECellPercent *ecn = g_object_new (E_TYPE_CELL_PERCENT, NULL);
diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c
index 9a9e31c7e4..b2cf3e2a2d 100644
--- a/widgets/table/e-cell-pixbuf.c
+++ b/widgets/table/e-cell-pixbuf.c
@@ -66,7 +66,9 @@ e_cell_pixbuf_new (void)
*/
static ECellView *
-pixbuf_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view)
+pixbuf_new_view (ECell *ecell,
+ ETableModel *table_model,
+ gpointer e_table_item_view)
{
ECellPixbufView *pixbuf_view = g_new0 (ECellPixbufView, 1);
ETableItem *eti = E_TABLE_ITEM (e_table_item_view);
@@ -99,9 +101,16 @@ pixbuf_kill_view (ECellView *ecell_view)
}
static void
-pixbuf_draw (ECellView *ecell_view, cairo_t *cr,
- gint model_col, gint view_col, gint row, ECellFlags flags,
- gint x1, gint y1, gint x2, gint y2)
+pixbuf_draw (ECellView *ecell_view,
+ cairo_t *cr,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2)
{
GdkPixbuf *cell_pixbuf;
gint real_x, real_y;
@@ -124,14 +133,14 @@ pixbuf_draw (ECellView *ecell_view, cairo_t *cr,
/* We center the pixbuf within our allocated space */
if (x2 - x1 > pix_w) {
gint diff = (x2 - x1) - pix_w;
- real_x = x1 + diff/2;
+ real_x = x1 + diff / 2;
} else {
real_x = x1;
}
if (y2 - y1 > pix_h) {
gint diff = (y2 - y1) - pix_h;
- real_y = y1 + diff/2;
+ real_y = y1 + diff / 2;
} else {
real_y = y1;
}
@@ -143,9 +152,13 @@ pixbuf_draw (ECellView *ecell_view, cairo_t *cr,
}
static gint
-pixbuf_event (ECellView *ecell_view, GdkEvent *event,
- gint model_col, gint view_col, gint row,
- ECellFlags flags, ECellActions *actions)
+pixbuf_event (ECellView *ecell_view,
+ GdkEvent *event,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ ECellActions *actions)
{
/* noop */
@@ -153,7 +166,10 @@ pixbuf_event (ECellView *ecell_view, GdkEvent *event,
}
static gint
-pixbuf_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+pixbuf_height (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
GdkPixbuf *pixbuf;
if (row == -1) {
@@ -176,9 +192,13 @@ pixbuf_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
* ECell::print method
*/
static void
-pixbuf_print (ECellView *ecell_view, GtkPrintContext *context,
- gint model_col, gint view_col, gint row,
- gdouble width, gdouble height)
+pixbuf_print (ECellView *ecell_view,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width,
+ gdouble height)
{
GdkPixbuf *pixbuf;
gint scale;
@@ -197,9 +217,12 @@ pixbuf_print (ECellView *ecell_view, GtkPrintContext *context,
}
static gdouble
-pixbuf_print_height (ECellView *ecell_view, GtkPrintContext *context,
- gint model_col, gint view_col, gint row,
- gdouble width)
+pixbuf_print_height (ECellView *ecell_view,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width)
{
GdkPixbuf *pixbuf;
@@ -220,7 +243,9 @@ pixbuf_print_height (ECellView *ecell_view, GtkPrintContext *context,
}
static gint
-pixbuf_max_width (ECellView *ecell_view, gint model_col, gint view_col)
+pixbuf_max_width (ECellView *ecell_view,
+ gint model_col,
+ gint view_col)
{
gint pw;
gint num_rows, i;
@@ -249,15 +274,15 @@ pixbuf_max_width (ECellView *ecell_view, gint model_col, gint view_col)
static void
pixbuf_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ECellPixbuf *pixbuf;
pixbuf = E_CELL_PIXBUF (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_SELECTED_COLUMN:
pixbuf->selected_column = g_value_get_int (value);
break;
@@ -278,15 +303,15 @@ pixbuf_set_property (GObject *object,
/* Get_arg handler for the pixbuf item */
static void
pixbuf_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ECellPixbuf *pixbuf;
pixbuf = E_CELL_PIXBUF (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_SELECTED_COLUMN:
g_value_set_int (value, pixbuf->selected_column);
break;
@@ -300,7 +325,7 @@ pixbuf_get_property (GObject *object,
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index b3ba9bdfac..65440b2465 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -49,7 +49,7 @@
static void e_cell_popup_dispose (GObject *object);
-static ECellView* ecp_new_view (ECell *ecell,
+static ECellView * ecp_new_view (ECell *ecell,
ETableModel *table_model,
void *e_table_item_view);
static void ecp_kill_view (ECellView *ecv);
@@ -111,7 +111,7 @@ static gint e_cell_popup_do_popup (ECellPopupView *ecp_view,
G_DEFINE_TYPE (ECellPopup, e_cell_popup, E_TYPE_CELL)
static void
-e_cell_popup_class_init (ECellPopupClass *class)
+e_cell_popup_class_init (ECellPopupClass *class)
{
ECellClass *ecc = E_CELL_CLASS (class);
@@ -137,7 +137,7 @@ e_cell_popup_class_init (ECellPopupClass *class)
}
static void
-e_cell_popup_init (ECellPopup *ecp)
+e_cell_popup_init (ECellPopup *ecp)
{
ecp->popup_shown = FALSE;
ecp->popup_model = NULL;
@@ -172,7 +172,9 @@ e_cell_popup_dispose (GObject *object)
* ECell::new_view method
*/
static ECellView *
-ecp_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view)
+ecp_new_view (ECell *ecell,
+ ETableModel *table_model,
+ gpointer e_table_item_view)
{
ECellPopup *ecp = E_CELL_POPUP (ecell);
ECellPopupView *ecp_view;
@@ -191,7 +193,7 @@ ecp_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view
ecp_view->child_view = e_cell_new_view (ecp->child, table_model,
e_table_item_view);
- return (ECellView*) ecp_view;
+ return (ECellView *) ecp_view;
}
/*
@@ -247,9 +249,16 @@ ecp_unrealize (ECellView *ecv)
* ECell::draw method
*/
static void
-ecp_draw (ECellView *ecv, cairo_t *cr,
- gint model_col, gint view_col, gint row, ECellFlags flags,
- gint x1, gint y1, gint x2, gint y2)
+ecp_draw (ECellView *ecv,
+ cairo_t *cr,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2)
{
ECellPopup *ecp = E_CELL_POPUP (ecv->ecell);
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -263,7 +272,7 @@ ecp_draw (ECellView *ecv, cairo_t *cr,
canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (ecv->e_table_item_view)->canvas);
/* Display the popup arrow if we are the cursor cell, or the popup
- is shown for this cell. */
+ * is shown for this cell. */
show_popup_arrow =
e_table_model_is_cell_editable (
ecv->e_table_model, model_col, row) &&
@@ -318,8 +327,13 @@ ecp_draw (ECellView *ecv, cairo_t *cr,
* ECell::event method
*/
static gint
-ecp_event (ECellView *ecv, GdkEvent *event, gint model_col, gint view_col,
- gint row, ECellFlags flags, ECellActions *actions)
+ecp_event (ECellView *ecv,
+ GdkEvent *event,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ ECellActions *actions)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
ECellPopup *ecp = E_CELL_POPUP (ecp_view->cell_view.ecell);
@@ -335,7 +349,7 @@ ecp_event (ECellView *ecv, GdkEvent *event, gint model_col, gint view_col,
view_col + 1);
/* FIXME: The event coords seem to be relative to the
- text within the cell, so we have to add 4. */
+ * text within the cell, so we have to add 4. */
if (event->button.x + 4 >= width - E_CELL_POPUP_ARROW_WIDTH) {
return e_cell_popup_do_popup (ecp_view, event, row, view_col);
}
@@ -360,7 +374,10 @@ ecp_event (ECellView *ecv, GdkEvent *event, gint model_col, gint view_col,
* ECell::height method
*/
static gint
-ecp_height (ECellView *ecv, gint model_col, gint view_col, gint row)
+ecp_height (ECellView *ecv,
+ gint model_col,
+ gint view_col,
+ gint row)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -371,7 +388,10 @@ ecp_height (ECellView *ecv, gint model_col, gint view_col, gint row)
* ECellView::enter_edit method
*/
static gpointer
-ecp_enter_edit (ECellView *ecv, gint model_col, gint view_col, gint row)
+ecp_enter_edit (ECellView *ecv,
+ gint model_col,
+ gint view_col,
+ gint row)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -382,8 +402,11 @@ ecp_enter_edit (ECellView *ecv, gint model_col, gint view_col, gint row)
* ECellView::leave_edit method
*/
static void
-ecp_leave_edit (ECellView *ecv, gint model_col, gint view_col, gint row,
- gpointer edit_context)
+ecp_leave_edit (ECellView *ecv,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer edit_context)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -392,8 +415,13 @@ ecp_leave_edit (ECellView *ecv, gint model_col, gint view_col, gint row,
}
static void
-ecp_print (ECellView *ecv, GtkPrintContext *context,
- gint model_col, gint view_col, gint row, gdouble width, gdouble height)
+ecp_print (ECellView *ecv,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width,
+ gdouble height)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -402,9 +430,12 @@ ecp_print (ECellView *ecv, GtkPrintContext *context,
}
static gdouble
-ecp_print_height (ECellView *ecv, GtkPrintContext *context,
- gint model_col, gint view_col, gint row,
- gdouble width)
+ecp_print_height (ECellView *ecv,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -414,8 +445,8 @@ ecp_print_height (ECellView *ecv, GtkPrintContext *context,
static gint
ecp_max_width (ECellView *ecv,
- gint model_col,
- gint view_col)
+ gint model_col,
+ gint view_col)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -423,15 +454,16 @@ ecp_max_width (ECellView *ecv,
}
static gchar *
-ecp_get_bg_color (ECellView *ecell_view, gint row)
+ecp_get_bg_color (ECellView *ecell_view,
+ gint row)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecell_view;
return e_cell_get_bg_color (ecp_view->child_view, row);
}
-ECell*
-e_cell_popup_get_child (ECellPopup *ecp)
+ECell *
+e_cell_popup_get_child (ECellPopup *ecp)
{
g_return_val_if_fail (E_IS_CELL_POPUP (ecp), NULL);
@@ -439,8 +471,8 @@ e_cell_popup_get_child (ECellPopup *ecp)
}
void
-e_cell_popup_set_child (ECellPopup *ecp,
- ECell *child)
+e_cell_popup_set_child (ECellPopup *ecp,
+ ECell *child)
{
g_return_if_fail (E_IS_CELL_POPUP (ecp));
@@ -452,10 +484,10 @@ e_cell_popup_set_child (ECellPopup *ecp,
}
static gint
-e_cell_popup_do_popup (ECellPopupView *ecp_view,
- GdkEvent *event,
- gint row,
- gint view_col)
+e_cell_popup_do_popup (ECellPopupView *ecp_view,
+ GdkEvent *event,
+ gint row,
+ gint view_col)
{
ECellPopup *ecp = E_CELL_POPUP (ecp_view->cell_view.ecell);
gint (*popup_func) (ECellPopup *ecp, GdkEvent *event, gint row, gint view_col);
@@ -472,7 +504,7 @@ e_cell_popup_do_popup (ECellPopupView *ecp_view,
}
/* This redraws the popup cell. Only use this if you know popup_view_col and
- popup_row are valid. */
+ * popup_row are valid. */
void
e_cell_popup_queue_cell_redraw (ECellPopup *ecp)
{
@@ -486,8 +518,8 @@ e_cell_popup_queue_cell_redraw (ECellPopup *ecp)
}
void
-e_cell_popup_set_shown (ECellPopup *ecp,
- gboolean shown)
+e_cell_popup_set_shown (ECellPopup *ecp,
+ gboolean shown)
{
ecp->popup_shown = shown;
e_cell_popup_queue_cell_redraw (ecp);
diff --git a/widgets/table/e-cell-popup.h b/widgets/table/e-cell-popup.h
index 6d04fb3c8d..bc99196eaf 100644
--- a/widgets/table/e-cell-popup.h
+++ b/widgets/table/e-cell-popup.h
@@ -66,13 +66,13 @@ struct _ECellPopup {
ECell *child;
/* This is TRUE if the popup window is shown for the cell being
- edited. While shown we display the arrow indented. */
+ * edited. While shown we display the arrow indented. */
gboolean popup_shown;
/* This is TRUE if the popup arrow is shown for the cell being edited.
- This is needed to stop the first click on the cell from popping up
- the popup window. We only popup the window after we have drawn the
- arrow. */
+ * This is needed to stop the first click on the cell from popping up
+ * the popup window. We only popup the window after we have drawn the
+ * arrow. */
gboolean popup_arrow_shown;
/* The view in which the popup is shown. */
diff --git a/widgets/table/e-cell-size.c b/widgets/table/e-cell-size.c
index d596713977..b330a95a96 100644
--- a/widgets/table/e-cell-size.c
+++ b/widgets/table/e-cell-size.c
@@ -34,7 +34,10 @@
G_DEFINE_TYPE (ECellSize, e_cell_size, E_TYPE_CELL_TEXT)
static gchar *
-ecd_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
+ecd_get_text (ECellText *cell,
+ ETableModel *model,
+ gint col,
+ gint row)
{
gint size = GPOINTER_TO_INT (e_table_model_value_at (model, col, row));
gfloat fsize;
@@ -53,7 +56,8 @@ ecd_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
}
static void
-ecd_free_text (ECellText *cell, gchar *text)
+ecd_free_text (ECellText *cell,
+ gchar *text)
{
g_free (text);
}
@@ -98,7 +102,8 @@ e_cell_size_init (ECellSize *e_cell_size)
*
* Returns: an ECell object that can be used to render file sizes. */
ECell *
-e_cell_size_new (const gchar *fontname, GtkJustification justify)
+e_cell_size_new (const gchar *fontname,
+ GtkJustification justify)
{
ECellSize *ecd = g_object_new (E_TYPE_CELL_SIZE, NULL);
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 9d652372d0..7e391c3ba9 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -205,33 +205,42 @@ static gboolean e_cell_text_retrieve_surrounding_cb (GtkIMContext *context, ECel
static gboolean e_cell_text_delete_surrounding_cb (GtkIMContext *context, gint offset, gint n_chars, ECellTextView *text_view);
static void _insert (ECellTextView *text_view, const gchar *string, gint value);
static void _delete_selection (ECellTextView *text_view);
-static PangoAttrList* build_attr_list (ECellTextView *text_view, gint row, gint text_length);
+static PangoAttrList * build_attr_list (ECellTextView *text_view, gint row, gint text_length);
static void update_im_cursor_location (ECellTextView *tv);
static gchar *
-ect_real_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
+ect_real_get_text (ECellText *cell,
+ ETableModel *model,
+ gint col,
+ gint row)
{
return e_table_model_value_at (model, col, row);
}
static void
-ect_real_free_text (ECellText *cell, gchar *text)
+ect_real_free_text (ECellText *cell,
+ gchar *text)
{
}
/* This is the default method for setting the ETableModel value based on
- the text in the ECellText. This simply uses the text as it is - it assumes
- the value in the model is a gchar *. Subclasses may parse the text into
- data structures to pass to the model. */
+ * the text in the ECellText. This simply uses the text as it is - it assumes
+ * the value in the model is a gchar *. Subclasses may parse the text into
+ * data structures to pass to the model. */
static void
-ect_real_set_value (ECellText *cell, ETableModel *model, gint col, gint row,
- const gchar *text)
+ect_real_set_value (ECellText *cell,
+ ETableModel *model,
+ gint col,
+ gint row,
+ const gchar *text)
{
e_table_model_set_value_at (model, col, row, text);
}
static void
-ect_queue_redraw (ECellTextView *text_view, gint view_col, gint view_row)
+ect_queue_redraw (ECellTextView *text_view,
+ gint view_col,
+ gint view_row)
{
e_table_item_redraw_range (
text_view->cell_view.e_table_item_view,
@@ -242,7 +251,8 @@ ect_queue_redraw (ECellTextView *text_view, gint view_col, gint view_row)
* Shuts down the editing process
*/
static void
-ect_stop_editing (ECellTextView *text_view, gboolean commit)
+ect_stop_editing (ECellTextView *text_view,
+ gboolean commit)
{
GdkWindow *window;
CellEdit *edit = text_view->edit;
@@ -319,7 +329,9 @@ ect_cancel_edit (ECellTextView *text_view)
* ECell::new_view method
*/
static ECellView *
-ect_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view)
+ect_new_view (ECell *ecell,
+ ETableModel *table_model,
+ gpointer e_table_item_view)
{
ECellTextView *text_view = g_new0 (ECellTextView, 1);
GnomeCanvas *canvas = GNOME_CANVAS_ITEM (e_table_item_view)->canvas;
@@ -388,8 +400,10 @@ ect_unrealize (ECellView *ecv)
}
-static PangoAttrList*
-build_attr_list (ECellTextView *text_view, gint row, gint text_length)
+static PangoAttrList *
+build_attr_list (ECellTextView *text_view,
+ gint row,
+ gint text_length)
{
ECellView *ecell_view = (ECellView *) text_view;
@@ -434,7 +448,10 @@ build_attr_list (ECellTextView *text_view, gint row, gint text_length)
}
static PangoLayout *
-layout_with_preedit (ECellTextView *text_view, gint row, const gchar *text, gint width)
+layout_with_preedit (ECellTextView *text_view,
+ gint row,
+ const gchar *text,
+ gint width)
{
CellEdit *edit = text_view->edit;
PangoAttrList *attrs;
@@ -463,9 +480,9 @@ layout_with_preedit (ECellTextView *text_view, gint row, const gchar *text, gint
*/
if (mlen < text_length) {
- if (!g_utf8_validate (text+mlen, -1, NULL)) {
+ if (!g_utf8_validate (text + mlen, -1, NULL)) {
gchar *tc;
- tc = g_utf8_find_next_char (text+mlen,NULL);
+ tc = g_utf8_find_next_char (text + mlen,NULL);
if (tc) {
mlen = (gint) (tc - text);
}
@@ -495,7 +512,10 @@ layout_with_preedit (ECellTextView *text_view, gint row, const gchar *text, gint
}
static PangoLayout *
-build_layout (ECellTextView *text_view, gint row, const gchar *text, gint width)
+build_layout (ECellTextView *text_view,
+ gint row,
+ const gchar *text,
+ gint width)
{
ECellView *ecell_view = (ECellView *) text_view;
ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
@@ -560,7 +580,11 @@ build_layout (ECellTextView *text_view, gint row, const gchar *text, gint width)
}
static PangoLayout *
-generate_layout (ECellTextView *text_view, gint model_col, gint view_col, gint row, gint width)
+generate_layout (ECellTextView *text_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gint width)
{
ECellView *ecell_view = (ECellView *) text_view;
ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
@@ -583,7 +607,10 @@ generate_layout (ECellTextView *text_view, gint model_col, gint view_col, gint r
}
static void
-draw_cursor (cairo_t *cr, gint x1, gint y1, PangoRectangle rect)
+draw_cursor (cairo_t *cr,
+ gint x1,
+ gint y1,
+ PangoRectangle rect)
{
gdouble scaled_x;
gdouble scaled_y;
@@ -602,7 +629,8 @@ draw_cursor (cairo_t *cr, gint x1, gint y1, PangoRectangle rect)
}
static gboolean
-show_pango_rectangle (CellEdit *edit, PangoRectangle rect)
+show_pango_rectangle (CellEdit *edit,
+ PangoRectangle rect)
{
gint x1 = rect.x / PANGO_SCALE;
gint x2 = (rect.x + rect.width) / PANGO_SCALE;
@@ -664,9 +692,16 @@ get_vertical_spacing (GtkWidget *canvas)
* ECell::draw method
*/
static void
-ect_draw (ECellView *ecell_view, cairo_t *cr,
- gint model_col, gint view_col, gint row, ECellFlags flags,
- gint x1, gint y1, gint x2, gint y2)
+ect_draw (ECellView *ecell_view,
+ cairo_t *cr,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2)
{
PangoLayout *layout;
ECellTextView *text_view = (ECellTextView *) ecell_view;
@@ -771,7 +806,8 @@ ect_draw (ECellView *ecell_view, cairo_t *cr,
* Get the background color
*/
static gchar *
-ect_get_bg_color (ECellView *ecell_view, gint row)
+ect_get_bg_color (ECellView *ecell_view,
+ gint row)
{
ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
gchar *color_spec;
@@ -811,7 +847,13 @@ key_begins_editing (GdkEventKey *event)
* ECell::event method
*/
static gint
-ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions)
+ect_event (ECellView *ecell_view,
+ GdkEvent *event,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ ECellActions *actions)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
ETextEventProcessorEvent e_tep_event;
@@ -849,7 +891,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
if (edit_display && edit->im_context &&
gtk_im_context_filter_keypress (\
edit->im_context,
- (GdkEventKey*) event)) {
+ (GdkEventKey *) event)) {
edit->need_im_reset = TRUE;
if (preedit_len && flags & E_CELL_PREEDIT)
@@ -1022,7 +1064,10 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
* ECell::height method
*/
static gint
-ect_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+ect_height (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
gint height;
@@ -1038,7 +1083,10 @@ ect_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
* ECellView::enter_edit method
*/
static gpointer
-ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+ect_enter_edit (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
CellEdit *edit;
@@ -1127,7 +1175,11 @@ ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
* ECellView::leave_edit method
*/
static void
-ect_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context)
+ect_leave_edit (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer edit_context)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
CellEdit *edit = text_view->edit;
@@ -1153,7 +1205,11 @@ ect_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row,
* ECellView::save_state method
*/
static gpointer
-ect_save_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context)
+ect_save_state (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer edit_context)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
CellEdit *edit = text_view->edit;
@@ -1169,7 +1225,12 @@ ect_save_state (ECellView *ecell_view, gint model_col, gint view_col, gint row,
* ECellView::load_state method
*/
static void
-ect_load_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context, gpointer save_state)
+ect_load_state (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer edit_context,
+ gpointer save_state)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
CellEdit *edit = text_view->edit;
@@ -1188,14 +1249,21 @@ ect_load_state (ECellView *ecell_view, gint model_col, gint view_col, gint row,
* ECellView::free_state method
*/
static void
-ect_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state)
+ect_free_state (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer save_state)
{
g_free (save_state);
}
static void
-get_font_size (PangoLayout *layout, PangoFontDescription *font, const gchar *text,
- gdouble *width, gdouble *height)
+get_font_size (PangoLayout *layout,
+ PangoFontDescription *font,
+ const gchar *text,
+ gdouble *width,
+ gdouble *height)
{
gint w;
gint h;
@@ -1213,9 +1281,13 @@ get_font_size (PangoLayout *layout, PangoFontDescription *font, const gchar *tex
}
static void
-ect_print (ECellView *ecell_view, GtkPrintContext *context,
- gint model_col, gint view_col, gint row,
- gdouble width, gdouble height)
+ect_print (ECellView *ecell_view,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width,
+ gdouble height)
{
PangoFontDescription *font_des;
PangoLayout *layout;
@@ -1263,7 +1335,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
dir = pango_find_base_dir (string, strlen (string));
if (underline) {
- ly = ty + (gdouble) pango_font_metrics_get_underline_position (font_metrics)/(gdouble) PANGO_SCALE;
+ ly = ty + (gdouble) pango_font_metrics_get_underline_position (font_metrics) / (gdouble) PANGO_SCALE;
cairo_new_path (cr);
if (dir == PANGO_DIRECTION_RTL) {
cairo_move_to (cr, width - 2, ly + text_height + 6);
@@ -1273,12 +1345,12 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
cairo_move_to (cr, 2, ly + text_height + 6);
cairo_line_to (cr, MIN (2 + text_width, width - 2), ly + text_height + 6);
}
- cairo_set_line_width (cr, (gdouble) pango_font_metrics_get_underline_thickness (font_metrics)/(gdouble) PANGO_SCALE);
+ cairo_set_line_width (cr, (gdouble) pango_font_metrics_get_underline_thickness (font_metrics) / (gdouble) PANGO_SCALE);
cairo_stroke (cr);
}
if (strikeout) {
- ly = ty + (gdouble) pango_font_metrics_get_strikethrough_position (font_metrics)/(gdouble) PANGO_SCALE;
+ ly = ty + (gdouble) pango_font_metrics_get_strikethrough_position (font_metrics) / (gdouble) PANGO_SCALE;
cairo_new_path (cr);
if (dir == PANGO_DIRECTION_RTL) {
cairo_move_to (cr, width - 2, ly + text_height + 6);
@@ -1288,13 +1360,13 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
cairo_move_to (cr, 2, ly + text_height + 6);
cairo_line_to (cr, MIN (2 + text_width, width - 2), ly + text_height + 6);
}
- cairo_set_line_width (cr,(gdouble) pango_font_metrics_get_strikethrough_thickness (font_metrics)/(gdouble) PANGO_SCALE);
+ cairo_set_line_width (cr,(gdouble) pango_font_metrics_get_strikethrough_thickness (font_metrics) / (gdouble) PANGO_SCALE);
cairo_stroke (cr);
}
cairo_move_to (cr, 2, text_height- 5);
- pango_layout_set_width (layout, (width - 4)*PANGO_SCALE);
+ pango_layout_set_width (layout, (width - 4) * PANGO_SCALE);
pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
pango_cairo_show_layout (cr, layout);
cairo_restore (cr);
@@ -1305,9 +1377,12 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
}
static gdouble
-ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
- gint model_col, gint view_col, gint row,
- gdouble width)
+ect_print_height (ECellView *ecell_view,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width)
{
/*
* Font size is 16 by default. To leave some margin for cell
@@ -1321,7 +1396,7 @@ ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
gchar *string;
gdouble text_width = 0.0, text_height = 0.0;
- gint lines=1;
+ gint lines = 1;
string = e_cell_text_get_text (ect, ecell_view->e_table_model, model_col, row);
@@ -1334,15 +1409,15 @@ ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
/* Checking if the text width goes beyond the column width to increase the
* number of lines.
*/
- if ( text_width > width-4)
- lines = (text_width / (width-4)) + 1;
- return 16*lines + 8;
+ if ( text_width > width - 4)
+ lines = (text_width / (width - 4)) + 1;
+ return 16 *lines + 8;
}
static gint
ect_max_width (ECellView *ecell_view,
- gint model_col,
- gint view_col)
+ gint model_col,
+ gint view_col)
{
/* New ECellText */
ECellTextView *text_view = (ECellTextView *) ecell_view;
@@ -1367,9 +1442,9 @@ ect_max_width (ECellView *ecell_view,
static gint
ect_max_width_by_row (ECellView *ecell_view,
- gint model_col,
- gint view_col,
- gint row)
+ gint model_col,
+ gint view_col,
+ gint row)
{
/* New ECellText */
ECellTextView *text_view = (ECellTextView *) ecell_view;
@@ -1399,15 +1474,15 @@ ect_finalize (GObject *object)
/* Set_arg handler for the text item */
static void
ect_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ECellText *text;
text = E_CELL_TEXT (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_STRIKEOUT_COLUMN:
text->strikeout_column = g_value_get_int (value);
break;
@@ -1440,15 +1515,15 @@ ect_set_property (GObject *object,
/* Get_arg handler for the text item */
static void
ect_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ECellText *text;
text = E_CELL_TEXT (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_STRIKEOUT_COLUMN:
g_value_set_int (value, text->strikeout_column);
break;
@@ -1474,7 +1549,7 @@ ect_get_property (GObject *object,
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -1597,11 +1672,11 @@ e_cell_text_class_init (ECellTextClass *class)
static void
e_cell_text_get_cursor_locations (ECellTextView *tv,
- GdkRectangle *strong_pos,
- GdkRectangle *weak_pos)
+ GdkRectangle *strong_pos,
+ GdkRectangle *weak_pos)
{
GdkRectangle area;
- CellEdit *edit=tv->edit;
+ CellEdit *edit = tv->edit;
ECellView *cell_view = (ECellView *) tv;
ETableItem *item = E_TABLE_ITEM ((cell_view)->e_table_item_view);
GnomeCanvasItem *parent_item = GNOME_CANVAS_ITEM (item)->parent;
@@ -1647,7 +1722,7 @@ e_cell_text_get_cursor_locations (ECellTextView *tv,
static void
update_im_cursor_location (ECellTextView *tv)
{
- CellEdit *edit=tv->edit;
+ CellEdit *edit = tv->edit;
GdkRectangle area;
e_cell_text_get_cursor_locations (tv, &area, NULL);
@@ -1657,11 +1732,11 @@ update_im_cursor_location (ECellTextView *tv)
static void
e_cell_text_preedit_changed_cb (GtkIMContext *context,
- ECellTextView *tv)
+ ECellTextView *tv)
{
gchar *preedit_string;
gint cursor_pos;
- CellEdit *edit=tv->edit;
+ CellEdit *edit = tv->edit;
gtk_im_context_get_preedit_string (edit->im_context, &preedit_string,
NULL, &cursor_pos);
@@ -1675,8 +1750,8 @@ e_cell_text_preedit_changed_cb (GtkIMContext *context,
static void
e_cell_text_commit_cb (GtkIMContext *context,
- const gchar *str,
- ECellTextView *tv)
+ const gchar *str,
+ ECellTextView *tv)
{
CellEdit *edit = tv->edit;
ETextEventProcessorCommand command;
@@ -1693,7 +1768,7 @@ e_cell_text_commit_cb (GtkIMContext *context,
static gboolean
e_cell_text_retrieve_surrounding_cb (GtkIMContext *context,
- ECellTextView *tv)
+ ECellTextView *tv)
{
CellEdit *edit = tv->edit;
@@ -1707,10 +1782,10 @@ e_cell_text_retrieve_surrounding_cb (GtkIMContext *context,
}
static gboolean
-e_cell_text_delete_surrounding_cb (GtkIMContext *context,
- gint offset,
- gint n_chars,
- ECellTextView *tv)
+e_cell_text_delete_surrounding_cb (GtkIMContext *context,
+ gint offset,
+ gint n_chars,
+ ECellTextView *tv)
{
gint begin_pos, end_pos;
glong text_len;
@@ -1774,7 +1849,8 @@ e_cell_text_init (ECellText *ect)
* Returns: an ECell object that can be used to render strings.
*/
ECell *
-e_cell_text_new (const gchar *fontname, GtkJustification justify)
+e_cell_text_new (const gchar *fontname,
+ GtkJustification justify)
{
ECellText *ect = g_object_new (E_TYPE_CELL_TEXT, NULL);
@@ -1861,7 +1937,9 @@ e_cell_text_set_value (ECellText *cell,
/* position is in BYTES */
static gint
-get_position_from_xy (CellEdit *edit, gint x, gint y)
+get_position_from_xy (CellEdit *edit,
+ gint x,
+ gint y)
{
gint index;
gint trailing;
@@ -1955,7 +2033,8 @@ _blink_scroll_timeout (gpointer data)
}
static gint
-next_word (CellEdit *edit, gint start)
+next_word (CellEdit *edit,
+ gint start)
{
gchar *p;
gint length;
@@ -1977,7 +2056,8 @@ next_word (CellEdit *edit, gint start)
}
static gint
-_get_position (ECellTextView *text_view, ETextEventProcessorCommand *command)
+_get_position (ECellTextView *text_view,
+ ETextEventProcessorCommand *command)
{
gint length;
CellEdit *edit = text_view->edit;
@@ -2144,14 +2224,16 @@ _delete_selection (ECellTextView *text_view)
edit->selection_end = edit->selection_start;
- g_signal_emit (VIEW_TO_CELL (text_view), signals[TEXT_DELETED], 0, text_view, edit->selection_start, ep-sp, edit->row, edit->model_col);
+ g_signal_emit (VIEW_TO_CELL (text_view), signals[TEXT_DELETED], 0, text_view, edit->selection_start, ep - sp, edit->row, edit->model_col);
}
/* fixme: */
/* NB! We expect value to be length IN BYTES */
static void
-_insert (ECellTextView *text_view, const gchar *string, gint value)
+_insert (ECellTextView *text_view,
+ const gchar *string,
+ gint value)
{
CellEdit *edit = text_view->edit;
gchar *temp;
@@ -2173,11 +2255,14 @@ _insert (ECellTextView *text_view, const gchar *string, gint value)
edit->selection_start += value;
edit->selection_end = edit->selection_start;
- g_signal_emit (VIEW_TO_CELL (text_view), signals[TEXT_INSERTED], 0, text_view, edit->selection_end-value, value, edit->row, edit->model_col);
+ g_signal_emit (VIEW_TO_CELL (text_view), signals[TEXT_INSERTED], 0, text_view, edit->selection_end - value, value, edit->row, edit->model_col);
}
static void
-capitalize (CellEdit *edit, gint start, gint end, ETextEventProcessorCaps type)
+capitalize (CellEdit *edit,
+ gint start,
+ gint end,
+ ETextEventProcessorCaps type)
{
ECellTextView *text_view = edit->text_view;
@@ -2228,7 +2313,9 @@ capitalize (CellEdit *edit, gint start, gint end, ETextEventProcessorCaps type)
}
static void
-e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *command, gpointer data)
+e_cell_text_view_command (ETextEventProcessor *tep,
+ ETextEventProcessorCommand *command,
+ gpointer data)
{
CellEdit *edit = (CellEdit *) data;
ECellTextView *text_view = edit->text_view;
@@ -2240,7 +2327,7 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *
gint sel_start, sel_end;
/* If the EText isn't editable, then ignore any commands that would
- modify the text. */
+ * modify the text. */
if (!ect->editable && (command->action == E_TEP_DELETE
|| command->action == E_TEP_INSERT
|| command->action == E_TEP_PASTE
@@ -2372,7 +2459,11 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *
}
static void
-e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection, gchar *data, gint length)
+e_cell_text_view_supply_selection (CellEdit *edit,
+ guint time,
+ GdkAtom selection,
+ gchar *data,
+ gint length)
{
#if DO_SELECTION
GtkClipboard *clipboard;
@@ -2390,8 +2481,8 @@ e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection
#ifdef DO_SELECTION
static void
paste_received (GtkClipboard *clipboard,
- const gchar *text,
- gpointer data)
+ const gchar *text,
+ gpointer data)
{
CellEdit *edit;
@@ -2412,7 +2503,9 @@ paste_received (GtkClipboard *clipboard,
#endif
static void
-e_cell_text_view_get_selection (CellEdit *edit, GdkAtom selection, guint32 time)
+e_cell_text_view_get_selection (CellEdit *edit,
+ GdkAtom selection,
+ guint32 time)
{
#if DO_SELECTION
gtk_clipboard_request_text (gtk_widget_get_clipboard (GTK_WIDGET (edit->text_view->canvas),
diff --git a/widgets/table/e-cell-text.h b/widgets/table/e-cell-text.h
index 7645a0064b..850d0caf29 100644
--- a/widgets/table/e-cell-text.h
+++ b/widgets/table/e-cell-text.h
@@ -87,8 +87,8 @@ struct _ECellText {
gint bold_column;
/* This column in the ETable should return a string specifying a color,
- either a color name like "red" or a color spec like "rgb:F/0/0".
- See the XParseColor man page for the formats available. */
+ * either a color name like "red" or a color spec like "rgb:F/0/0".
+ * See the XParseColor man page for the formats available. */
gint color_column;
gint bg_color_column;
};
@@ -132,8 +132,8 @@ ECell * e_cell_text_construct (ECellText *cell,
GtkJustification justify);
/* Gets the value from the model and converts it into a string. In ECellText
- itself, the value is assumed to be a gchar * and so needs no conversion.
- In subclasses the ETableModel value may be a more complicated datatype. */
+ * itself, the value is assumed to be a gchar * and so needs no conversion.
+ * In subclasses the ETableModel value may be a more complicated datatype. */
gchar * e_cell_text_get_text (ECellText *cell,
ETableModel *model,
gint col,
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index 77f25ae387..e4bb093912 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -71,25 +71,29 @@ e_cell_tree_view_get_subcell_view (ECellView *ect)
}
static ETreePath
-e_cell_tree_get_node (ETableModel *table_model, gint row)
+e_cell_tree_get_node (ETableModel *table_model,
+ gint row)
{
return e_table_model_value_at (table_model, -1, row);
}
-static ETreeModel*
-e_cell_tree_get_tree_model (ETableModel *table_model, gint row)
+static ETreeModel *
+e_cell_tree_get_tree_model (ETableModel *table_model,
+ gint row)
{
return e_table_model_value_at (table_model, -2, row);
}
static ETreeTableAdapter *
-e_cell_tree_get_tree_table_adapter (ETableModel *table_model, gint row)
+e_cell_tree_get_tree_table_adapter (ETableModel *table_model,
+ gint row)
{
return e_table_model_value_at (table_model, -3, row);
}
static gint
-visible_depth_of_node (ETableModel *model, gint row)
+visible_depth_of_node (ETableModel *model,
+ gint row)
{
ETreeModel *tree_model = e_cell_tree_get_tree_model (model, row);
ETreeTableAdapter *adapter = e_cell_tree_get_tree_table_adapter (model, row);
@@ -99,10 +103,11 @@ visible_depth_of_node (ETableModel *model, gint row)
}
/* If this is changed to not include the width of the expansion pixmap
- if the path is not expandable, then max_width needs to change as
- well. */
+ * if the path is not expandable, then max_width needs to change as
+ * well. */
static gint
-offset_of_node (ETableModel *table_model, gint row)
+offset_of_node (ETableModel *table_model,
+ gint row)
{
ETreeModel *tree_model = e_cell_tree_get_tree_model (table_model, row);
ETreePath path = e_cell_tree_get_node (table_model, row);
@@ -119,7 +124,9 @@ offset_of_node (ETableModel *table_model, gint row)
* ECell::new_view method
*/
static ECellView *
-ect_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view)
+ect_new_view (ECell *ecell,
+ ETableModel *table_model,
+ gpointer e_table_item_view)
{
ECellTree *ect = E_CELL_TREE (ecell);
ECellTreeView *tree_view = g_new0 (ECellTreeView, 1);
@@ -283,7 +290,7 @@ ect_draw (ECellView *ecell_view,
}
/* Now cause our subcell to draw its contents, shifted by
- subcell_offset pixels */
+ * subcell_offset pixels */
e_cell_draw (tree_view->subcell_view, cr,
model_col, view_col, row, flags,
x1 + subcell_offset, y1, x2, y2);
@@ -292,7 +299,8 @@ ect_draw (ECellView *ecell_view,
}
static void
-adjust_event_position (GdkEvent *event, gint offset)
+adjust_event_position (GdkEvent *event,
+ gint offset)
{
switch (event->type) {
case GDK_BUTTON_PRESS:
@@ -310,7 +318,9 @@ adjust_event_position (GdkEvent *event, gint offset)
}
static gboolean
-event_in_expander (GdkEvent *event, gint offset, gint height)
+event_in_expander (GdkEvent *event,
+ gint offset,
+ gint height)
{
switch (event->type) {
case GDK_BUTTON_PRESS:
@@ -329,7 +339,10 @@ event_in_expander (GdkEvent *event, gint offset, gint height)
* ECell::height method
*/
static gint
-ect_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+ect_height (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
@@ -381,7 +394,13 @@ animate_expander (gpointer data)
* ECell::event method
*/
static gint
-ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions)
+ect_event (ECellView *ecell_view,
+ GdkEvent *event,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ ECellActions *actions)
{
GtkLayout *layout;
GdkWindow *window;
@@ -504,7 +523,9 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
* ECell::max_width method
*/
static gint
-ect_max_width (ECellView *ecell_view, gint model_col, gint view_col)
+ect_max_width (ECellView *ecell_view,
+ gint model_col,
+ gint view_col)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
gint row;
@@ -578,7 +599,8 @@ ect_max_width (ECellView *ecell_view, gint model_col, gint view_col)
* ECellView::get_bg_color method
*/
static gchar *
-ect_get_bg_color (ECellView *ecell_view, gint row)
+ect_get_bg_color (ECellView *ecell_view,
+ gint row)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
@@ -589,7 +611,10 @@ ect_get_bg_color (ECellView *ecell_view, gint row)
* ECellView::enter_edit method
*/
static gpointer
-ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+ect_enter_edit (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
/* just defer to our subcell's view */
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
@@ -601,7 +626,11 @@ ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
* ECellView::leave_edit method
*/
static void
-ect_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context)
+ect_leave_edit (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer edit_context)
{
/* just defer to our subcell's view */
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
@@ -610,9 +639,13 @@ ect_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row,
}
static void
-ect_print (ECellView *ecell_view, GtkPrintContext *context,
- gint model_col, gint view_col, gint row,
- gdouble width, gdouble height)
+ect_print (ECellView *ecell_view,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width,
+ gdouble height)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
cairo_t *cr = gtk_print_context_get_cairo_context (context);
@@ -650,8 +683,8 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
}
/* now traverse back up to the root of the tree, checking at
- each level if the node has siblings, and drawing the
- correct vertical pipe for it's configuration. */
+ * each level if the node has siblings, and drawing the
+ * correct vertical pipe for it's configuration. */
node = e_tree_model_node_get_parent (tree_model, node);
depth = visible_depth_of_node (ecell_view->e_table_model, row) - 1;
offset -= INDENT_AMOUNT;
@@ -700,9 +733,12 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
}
static gdouble
-ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
- gint model_col, gint view_col, gint row,
- gdouble width)
+ect_print_height (ECellView *ecell_view,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width)
{
return 12; /* XXX */
}
@@ -766,8 +802,8 @@ e_cell_tree_init (ECellTree *ect)
**/
void
e_cell_tree_construct (ECellTree *ect,
- gboolean draw_lines,
- ECell *subcell)
+ gboolean draw_lines,
+ ECell *subcell)
{
ect->subcell = subcell;
if (subcell)
@@ -792,7 +828,7 @@ e_cell_tree_construct (ECellTree *ect,
**/
ECell *
e_cell_tree_new (gboolean draw_lines,
- ECell *subcell)
+ ECell *subcell)
{
ECellTree *ect = g_object_new (E_TYPE_CELL_TREE, NULL);
diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c
index 1c0cbc62ca..9830a06aff 100644
--- a/widgets/table/e-cell-vbox.c
+++ b/widgets/table/e-cell-vbox.c
@@ -46,7 +46,9 @@ G_DEFINE_TYPE (ECellVbox, e_cell_vbox, E_TYPE_CELL)
* ECell::new_view method
*/
static ECellView *
-ecv_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view)
+ecv_new_view (ECell *ecell,
+ ETableModel *table_model,
+ gpointer e_table_item_view)
{
ECellVbox *ecv = E_CELL_VBOX (ecell);
ECellVboxView *vbox_view = g_new0 (ECellVboxView, 1);
@@ -151,7 +153,7 @@ ecv_draw (ECellView *ecell_view,
for (i = 0; i < vbox_view->subcell_view_count; i++) {
/* Now cause our subcells to draw their contents,
- shifted by subcell_offset pixels */
+ * shifted by subcell_offset pixels */
gint height;
height = e_cell_height (
@@ -173,7 +175,13 @@ ecv_draw (ECellView *ecell_view,
* ECell::event method
*/
static gint
-ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions)
+ecv_event (ECellView *ecell_view,
+ GdkEvent *event,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ ECellActions *actions)
{
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
gint y = 0;
@@ -208,7 +216,10 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
* ECell::height method
*/
static gint
-ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+ecv_height (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
gint height = 0;
@@ -224,7 +235,9 @@ ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
* ECell::max_width method
*/
static gint
-ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col)
+ecv_max_width (ECellView *ecell_view,
+ gint model_col,
+ gint view_col)
{
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
gint max_width = 0;
@@ -312,7 +325,9 @@ e_cell_vbox_new (void)
}
void
-e_cell_vbox_append (ECellVbox *vbox, ECell *subcell, gint model_col)
+e_cell_vbox_append (ECellVbox *vbox,
+ ECell *subcell,
+ gint model_col)
{
vbox->subcell_count++;
diff --git a/widgets/table/e-cell.c b/widgets/table/e-cell.c
index cbc0bfc0ae..88762f6a7a 100644
--- a/widgets/table/e-cell.c
+++ b/widgets/table/e-cell.c
@@ -36,7 +36,9 @@ G_DEFINE_TYPE (ECell, e_cell, G_TYPE_OBJECT)
#define ECVIEW_EC_CLASS(v) (E_CELL_GET_CLASS (v->ecell))
static ECellView *
-ec_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view)
+ec_new_view (ECell *ecell,
+ ETableModel *table_model,
+ gpointer e_table_item_view)
{
return NULL;
}
@@ -57,15 +59,28 @@ ec_unrealize (ECellView *e_cell)
}
static void
-ec_draw (ECellView *ecell_view, cairo_t *cr,
- gint model_col, gint view_col, gint row, ECellFlags flags,
- gint x1, gint y1, gint x2, gint y2)
+ec_draw (ECellView *ecell_view,
+ cairo_t *cr,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2)
{
g_critical ("e-cell-draw invoked");
}
static gint
-ec_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions)
+ec_event (ECellView *ecell_view,
+ GdkEvent *event,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ ECellActions *actions)
{
g_critical ("e-cell-event invoked");
@@ -73,7 +88,10 @@ ec_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col,
}
static gint
-ec_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+ec_height (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
g_critical ("e-cell-height invoked");
@@ -81,7 +99,14 @@ ec_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
}
static void
-ec_focus (ECellView *ecell_view, gint model_col, gint view_col, gint row, gint x1, gint y1, gint x2, gint y2)
+ec_focus (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2)
{
ecell_view->focus_col = view_col;
ecell_view->focus_row = row;
@@ -103,29 +128,49 @@ ec_unfocus (ECellView *ecell_view)
}
static gpointer
-ec_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+ec_enter_edit (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
return NULL;
}
static void
-ec_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context)
+ec_leave_edit (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer context)
{
}
static gpointer
-ec_save_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context)
+ec_save_state (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer context)
{
return NULL;
}
static void
-ec_load_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context, gpointer save_state)
+ec_load_state (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer context,
+ gpointer save_state)
{
}
static void
-ec_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state)
+ec_free_state (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer save_state)
{
}
@@ -172,7 +217,13 @@ e_cell_init (ECell *cell)
* Returns: processing state from the GdkEvent handling.
*/
gint
-e_cell_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions)
+e_cell_event (ECellView *ecell_view,
+ GdkEvent *event,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ ECellActions *actions)
{
return ECVIEW_EC_CLASS (ecell_view)->event (
ecell_view, event, model_col, view_col, row, flags, actions);
@@ -194,7 +245,9 @@ e_cell_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_
* Returns: a new ECellView for this @ecell on the @table_model displayed on the @e_table_item_view.
*/
ECellView *
-e_cell_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view)
+e_cell_new_view (ECell *ecell,
+ ETableModel *table_model,
+ gpointer e_table_item_view)
{
return E_CELL_GET_CLASS (ecell)->new_view (
ecell, table_model, e_table_item_view);
@@ -260,9 +313,16 @@ e_cell_unrealize (ECellView *ecell_view)
* flags include alignments and justifications.
*/
void
-e_cell_draw (ECellView *ecell_view, cairo_t *cr,
- gint model_col, gint view_col, gint row, ECellFlags flags,
- gint x1, gint y1, gint x2, gint y2)
+e_cell_draw (ECellView *ecell_view,
+ cairo_t *cr,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2)
{
g_return_if_fail (ecell_view != NULL);
g_return_if_fail (row >= 0);
@@ -288,9 +348,13 @@ e_cell_draw (ECellView *ecell_view, cairo_t *cr,
* FIXME:
*/
void
-e_cell_print (ECellView *ecell_view, GtkPrintContext *context,
- gint model_col, gint view_col, gint row,
- gdouble width, gdouble height)
+e_cell_print (ECellView *ecell_view,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width,
+ gdouble height)
{
if (ECVIEW_EC_CLASS (ecell_view)->print)
ECVIEW_EC_CLASS (ecell_view)->print (ecell_view, context, model_col, view_col, row, width, height);
@@ -302,9 +366,12 @@ e_cell_print (ECellView *ecell_view, GtkPrintContext *context,
* FIXME:
*/
gdouble
-e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context,
- gint model_col, gint view_col, gint row,
- gdouble width)
+e_cell_print_height (ECellView *ecell_view,
+ GtkPrintContext *context,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gdouble width)
{
if (ECVIEW_EC_CLASS (ecell_view)->print_height)
return ECVIEW_EC_CLASS (ecell_view)->print_height
@@ -324,7 +391,10 @@ e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context,
* @view_col, @row.
*/
gint
-e_cell_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+e_cell_height (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
return ECVIEW_EC_CLASS (ecell_view)->height (ecell_view, model_col, view_col, row);
}
@@ -340,7 +410,10 @@ e_cell_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
* @model_col, @row rendered at @view_col, @row.
*/
gpointer
-e_cell_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+e_cell_enter_edit (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
return ECVIEW_EC_CLASS (ecell_view)->enter_edit (ecell_view, model_col, view_col, row);
}
@@ -357,7 +430,11 @@ e_cell_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint ro
* rendered at @view_col, @row.
*/
void
-e_cell_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context)
+e_cell_leave_edit (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer edit_context)
{
ECVIEW_EC_CLASS (ecell_view)->leave_edit (ecell_view, model_col, view_col, row, edit_context);
}
@@ -377,7 +454,11 @@ e_cell_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint ro
* or scrolling.
*/
gpointer
-e_cell_save_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context)
+e_cell_save_state (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer edit_context)
{
if (ECVIEW_EC_CLASS (ecell_view)->save_state)
return ECVIEW_EC_CLASS (ecell_view)->save_state (ecell_view, model_col, view_col, row, edit_context);
@@ -397,7 +478,12 @@ e_cell_save_state (ECellView *ecell_view, gint model_col, gint view_col, gint ro
* Requests that the ECellView load from the given save state.
*/
void
-e_cell_load_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context, gpointer save_state)
+e_cell_load_state (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer edit_context,
+ gpointer save_state)
{
if (ECVIEW_EC_CLASS (ecell_view)->load_state)
ECVIEW_EC_CLASS (ecell_view)->load_state (ecell_view, model_col, view_col, row, edit_context, save_state);
@@ -415,7 +501,11 @@ e_cell_load_state (ECellView *ecell_view, gint model_col, gint view_col, gint ro
* Requests that the ECellView free the given save state.
*/
void
-e_cell_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state)
+e_cell_free_state (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gpointer save_state)
{
if (ECVIEW_EC_CLASS (ecell_view)->free_state)
ECVIEW_EC_CLASS (ecell_view)->free_state (ecell_view, model_col, view_col, row, save_state);
@@ -431,7 +521,9 @@ e_cell_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint ro
* is being rendered as @view_col
*/
gint
-e_cell_max_width (ECellView *ecell_view, gint model_col, gint view_col)
+e_cell_max_width (ECellView *ecell_view,
+ gint model_col,
+ gint view_col)
{
return ECVIEW_EC_CLASS (ecell_view)->max_width
(ecell_view, model_col, view_col);
@@ -448,7 +540,10 @@ e_cell_max_width (ECellView *ecell_view, gint model_col, gint view_col)
* is being rendered as @view_col for the data in @row.
*/
gint
-e_cell_max_width_by_row (ECellView *ecell_view, gint model_col, gint view_col, gint row)
+e_cell_max_width_by_row (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row)
{
if (ECVIEW_EC_CLASS (ecell_view)->max_width_by_row)
return ECVIEW_EC_CLASS (ecell_view)->max_width_by_row
@@ -474,7 +569,8 @@ e_cell_max_width_by_row_implemented (ECellView *ecell_view)
}
gchar *
-e_cell_get_bg_color (ECellView *ecell_view, gint row)
+e_cell_get_bg_color (ECellView *ecell_view,
+ gint row)
{
if (ECVIEW_EC_CLASS (ecell_view)->get_bg_color)
return ECVIEW_EC_CLASS (ecell_view)->get_bg_color (ecell_view, row);
@@ -483,7 +579,8 @@ e_cell_get_bg_color (ECellView *ecell_view, gint row)
}
void
-e_cell_style_set (ECellView *ecell_view, GtkStyle *previous_style)
+e_cell_style_set (ECellView *ecell_view,
+ GtkStyle *previous_style)
{
if (ECVIEW_EC_CLASS (ecell_view)->style_set)
ECVIEW_EC_CLASS (ecell_view)->style_set (ecell_view, previous_style);
diff --git a/widgets/table/e-cell.h b/widgets/table/e-cell.h
index 3a41db0afe..830184c06d 100644
--- a/widgets/table/e-cell.h
+++ b/widgets/table/e-cell.h
@@ -92,7 +92,7 @@ struct _ECellView {
gint focus_x1, focus_y1, focus_x2, focus_y2;
gint focus_col, focus_row;
- void (*kill_view_cb) (struct _ECellView*, gpointer );
+ void (*kill_view_cb) (struct _ECellView *, gpointer );
GList *kill_view_cb_data;
};
diff --git a/widgets/table/e-popup-menu.c b/widgets/table/e-popup-menu.c
index 07589b1589..a4cfec07e9 100644
--- a/widgets/table/e-popup-menu.c
+++ b/widgets/table/e-popup-menu.c
@@ -38,7 +38,9 @@
* Creates an item with an optional icon
*/
static void
-make_item (GtkMenu *menu, GtkMenuItem *item, const gchar *name)
+make_item (GtkMenu *menu,
+ GtkMenuItem *item,
+ const gchar *name)
{
GtkWidget *label;
@@ -57,10 +59,10 @@ make_item (GtkMenu *menu, GtkMenuItem *item, const gchar *name)
GtkMenu *
e_popup_menu_create_with_domain (EPopupMenu *menu_list,
- guint32 disable_mask,
- guint32 hide_mask,
- gpointer default_closure,
- const gchar *domain)
+ guint32 disable_mask,
+ guint32 hide_mask,
+ gpointer default_closure,
+ const gchar *domain)
{
GtkMenu *menu = GTK_MENU (gtk_menu_new ());
gboolean last_item_separator = TRUE;
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 662a9c50a5..8defc2c479 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -63,7 +63,10 @@ enum {
};
static void
-etcta_cursor_change (GObject *object, gint row, gint col, ETableClickToAdd *etcta)
+etcta_cursor_change (GObject *object,
+ gint row,
+ gint col,
+ ETableClickToAdd *etcta)
{
g_signal_emit (etcta,
etcta_signals[CURSOR_CHANGE], 0,
@@ -71,7 +74,8 @@ etcta_cursor_change (GObject *object, gint row, gint col, ETableClickToAdd *etct
}
static void
-etcta_style_set (ETableClickToAdd *etcta, GtkStyle *previous_style)
+etcta_style_set (ETableClickToAdd *etcta,
+ GtkStyle *previous_style)
{
GtkWidget *widget;
GtkStyle *style;
@@ -94,7 +98,8 @@ etcta_style_set (ETableClickToAdd *etcta, GtkStyle *previous_style)
}
static void
-etcta_add_table_header (ETableClickToAdd *etcta, ETableHeader *header)
+etcta_add_table_header (ETableClickToAdd *etcta,
+ ETableHeader *header)
{
etcta->eth = header;
if (etcta->eth)
@@ -116,7 +121,8 @@ etcta_drop_table_header (ETableClickToAdd *etcta)
}
static void
-etcta_add_one (ETableClickToAdd *etcta, ETableModel *one)
+etcta_add_one (ETableClickToAdd *etcta,
+ ETableModel *one)
{
etcta->one = one;
if (etcta->one)
@@ -143,7 +149,8 @@ etcta_drop_one (ETableClickToAdd *etcta)
}
static void
-etcta_add_model (ETableClickToAdd *etcta, ETableModel *model)
+etcta_add_model (ETableClickToAdd *etcta,
+ ETableModel *model)
{
etcta->model = model;
if (etcta->model)
@@ -161,7 +168,8 @@ etcta_drop_model (ETableClickToAdd *etcta)
}
static void
-etcta_add_message (ETableClickToAdd *etcta, const gchar *message)
+etcta_add_message (ETableClickToAdd *etcta,
+ const gchar *message)
{
etcta->message = g_strdup (message);
}
@@ -191,7 +199,7 @@ etcta_dispose (GObject *object)
static void
etcta_set_property (GObject *object,
- guint prop_id,
+ guint property_id,
const GValue *value,
GParamSpec *pspec)
{
@@ -201,7 +209,7 @@ etcta_set_property (GObject *object,
item = GNOME_CANVAS_ITEM (object);
etcta = E_TABLE_CLICK_TO_ADD (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_HEADER:
etcta_drop_table_header (etcta);
etcta_add_table_header (etcta, E_TABLE_HEADER (g_value_get_object (value)));
@@ -230,7 +238,7 @@ etcta_set_property (GObject *object,
NULL);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
return;
}
@@ -270,13 +278,16 @@ create_rect_and_text (ETableClickToAdd *etcta)
}
static void
-etcta_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+etcta_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableClickToAdd *etcta;
etcta = E_TABLE_CLICK_TO_ADD (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_HEADER:
g_value_set_object (value, etcta->eth);
break;
@@ -293,7 +304,7 @@ etcta_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *p
g_value_set_double (value, etcta->height);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -376,7 +387,7 @@ finish_editing (ETableClickToAdd *etcta)
"cursor_mode", E_CURSOR_SPREADSHEET,
NULL);
- g_signal_connect(etcta->row, "key_press",
+ g_signal_connect (etcta->row, "key_press",
G_CALLBACK (item_key_press), etcta);
set_initial_selection (etcta);
@@ -386,7 +397,8 @@ finish_editing (ETableClickToAdd *etcta)
/* Handles the events on the ETableClickToAdd, particularly
* it creates the ETableItem and passes in some events. */
static gint
-etcta_event (GnomeCanvasItem *item, GdkEvent *e)
+etcta_event (GnomeCanvasItem *item,
+ GdkEvent *e)
{
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
@@ -424,7 +436,7 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
"cursor_mode", E_CURSOR_SPREADSHEET,
NULL);
- g_signal_connect(etcta->row, "key_press",
+ g_signal_connect (etcta->row, "key_press",
G_CALLBACK (item_key_press), etcta);
e_canvas_item_grab_focus (GNOME_CANVAS_ITEM (etcta->row), TRUE);
@@ -462,7 +474,8 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
}
static void
-etcta_reflow (GnomeCanvasItem *item, gint flags)
+etcta_reflow (GnomeCanvasItem *item,
+ gint flags)
{
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
@@ -583,7 +596,7 @@ etcta_init (ETableClickToAdd *etcta)
etcta->height = 6;
etcta->selection = e_table_selection_model_new ();
- g_signal_connect(etcta->selection, "cursor_changed",
+ g_signal_connect (etcta->selection, "cursor_changed",
G_CALLBACK (etcta_cursor_change), etcta);
e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (etcta), etcta_reflow);
diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c
index 7296408594..fc7da9c9f5 100644
--- a/widgets/table/e-table-col.c
+++ b/widgets/table/e-table-col.c
@@ -82,13 +82,13 @@ etc_dispose (GObject *object)
static void
etc_set_property (GObject *object,
- guint prop_id,
+ guint property_id,
const GValue *value,
GParamSpec *pspec)
{
ETableCol *etc = E_TABLE_COL (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_COMPARE_COL:
etc->compare_col = g_value_get_int (value);
break;
@@ -99,18 +99,18 @@ etc_set_property (GObject *object,
static void
etc_get_property (GObject *object,
- guint prop_id,
+ guint property_id,
GValue *value,
GParamSpec *pspec)
{
ETableCol *etc = E_TABLE_COL (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_COMPARE_COL:
g_value_set_int (value, etc->compare_col);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
diff --git a/widgets/table/e-table-col.h b/widgets/table/e-table-col.h
index b82886a5ca..042137b40a 100644
--- a/widgets/table/e-table-col.h
+++ b/widgets/table/e-table-col.h
@@ -73,11 +73,11 @@ struct _ETableCol {
GCompareDataFunc compare;
ETableSearchFunc search;
- guint selected:1;
- guint resizable:1;
- guint disabled:1;
- guint sortable:1;
- guint groupable:1;
+ guint selected : 1;
+ guint resizable : 1;
+ guint disabled : 1;
+ guint sortable : 1;
+ guint groupable : 1;
gint col_idx;
gint compare_col;
diff --git a/widgets/table/e-table-column-specification.c b/widgets/table/e-table-column-specification.c
index 7fb0756085..cd7e07acca 100644
--- a/widgets/table/e-table-column-specification.c
+++ b/widgets/table/e-table-column-specification.c
@@ -102,7 +102,7 @@ e_table_column_specification_new (void)
void
e_table_column_specification_load_from_node (ETableColumnSpecification *etcs,
- const xmlNode *node)
+ const xmlNode *node)
{
free_strings (etcs);
@@ -128,7 +128,7 @@ e_table_column_specification_load_from_node (ETableColumnSpecification *etcs,
xmlNode *
e_table_column_specification_save_to_node (ETableColumnSpecification *specification,
- xmlNode *parent)
+ xmlNode *parent)
{
xmlNode *node;
if (parent)
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 4bfb80d1e9..4e9fe81117 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -94,7 +94,8 @@ config_finalize (GObject *object)
}
static void
-e_table_config_changed (ETableConfig *config, ETableState *state)
+e_table_config_changed (ETableConfig *config,
+ ETableState *state)
{
g_return_if_fail (E_IS_TABLE_CONFIG (config));
@@ -113,13 +114,13 @@ config_dialog_changed (ETableConfig *config)
static void
config_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableConfig *config = E_TABLE_CONFIG (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_STATE:
g_value_set_object (value, config->state);
break;
@@ -156,7 +157,8 @@ e_table_config_class_init (ETableConfigClass *class)
}
static void
-configure_combo_box_add (GtkComboBox *combo_box, const gchar *item,
+configure_combo_box_add (GtkComboBox *combo_box,
+ const gchar *item,
const gchar *value)
{
GtkTreeRowReference *reference;
@@ -203,7 +205,8 @@ configure_combo_box_get_active (GtkComboBox *combo_box)
}
static void
-configure_combo_box_set_active (GtkComboBox *combo_box, const gchar *value)
+configure_combo_box_set_active (GtkComboBox *combo_box,
+ const gchar *value)
{
GtkTreeRowReference *reference;
GHashTable *index;
@@ -231,7 +234,8 @@ configure_combo_box_set_active (GtkComboBox *combo_box, const gchar *value)
}
static ETableColumnSpecification *
-find_column_in_spec (ETableSpecification *spec, gint model_col)
+find_column_in_spec (ETableSpecification *spec,
+ gint model_col)
{
ETableColumnSpecification **column;
@@ -248,7 +252,8 @@ find_column_in_spec (ETableSpecification *spec, gint model_col)
}
static gint
-find_model_column_by_name (ETableSpecification *spec, const gchar *s)
+find_model_column_by_name (ETableSpecification *spec,
+ const gchar *s)
{
ETableColumnSpecification **column;
@@ -263,7 +268,8 @@ find_model_column_by_name (ETableSpecification *spec, const gchar *s)
}
static void
-update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
+update_sort_and_group_config_dialog (ETableConfig *config,
+ gboolean is_sort)
{
ETableConfigSortWidgets *widgets;
gint count, i;
@@ -328,7 +334,7 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
d = GTK_TOGGLE_BUTTON (
widgets[i].radio_descending);
- gtk_toggle_button_set_active (col.ascending ? a:d, 1);
+ gtk_toggle_button_set_active (col.ascending ? a : d, 1);
} else {
GtkToggleButton *t;
@@ -428,7 +434,7 @@ config_group_info_update (ETableConfig *config)
col.ascending ?
_("(Ascending)") : _("(Descending)"));
- if ((i+1) != count)
+ if ((i + 1) != count)
g_string_append (res, ", ");
}
if (res->str[0] == 0)
@@ -492,7 +498,8 @@ config_fields_info_update (ETableConfig *config)
}
static void
-do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
+do_sort_and_group_config_dialog (ETableConfig *config,
+ gboolean is_sort)
{
GtkDialog *dialog;
gint response, running = 1;
@@ -682,32 +689,38 @@ e_table_proxy_etable_available_new (ETableModel *store)
}
static void
-config_button_fields (GtkWidget *widget, ETableConfig *config)
+config_button_fields (GtkWidget *widget,
+ ETableConfig *config)
{
do_fields_config_dialog (config);
}
static void
-config_button_sort (GtkWidget *widget, ETableConfig *config)
+config_button_sort (GtkWidget *widget,
+ ETableConfig *config)
{
do_sort_and_group_config_dialog (config, TRUE);
}
static void
-config_button_group (GtkWidget *widget, ETableConfig *config)
+config_button_group (GtkWidget *widget,
+ ETableConfig *config)
{
do_sort_and_group_config_dialog (config, FALSE);
}
static void
-dialog_destroyed (gpointer data, GObject *where_object_was)
+dialog_destroyed (gpointer data,
+ GObject *where_object_was)
{
ETableConfig *config = data;
g_object_unref (config);
}
static void
-dialog_response (GtkWidget *dialog, gint response_id, ETableConfig *config)
+dialog_response (GtkWidget *dialog,
+ gint response_id,
+ ETableConfig *config)
{
if (response_id == GTK_RESPONSE_APPLY
|| response_id == GTK_RESPONSE_OK) {
@@ -760,14 +773,13 @@ connect_button (ETableConfig *config,
{
GtkWidget *button = e_builder_get_widget (builder, widget_name);
- if (button) {
- g_signal_connect (G_OBJECT (button), "clicked",
- cback, config);
- }
+ if (button)
+ g_signal_connect (button, "clicked", cback, config);
}
static gint
-get_source_model_col_index (ETableConfig *config, gint idx)
+get_source_model_col_index (ETableConfig *config,
+ gint idx)
{
gint visible_index;
ETableModel *src_model;
@@ -781,7 +793,8 @@ get_source_model_col_index (ETableConfig *config, gint idx)
}
static void
-sort_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *sort)
+sort_combo_changed (GtkComboBox *combo_box,
+ ETableConfigSortWidgets *sort)
{
ETableConfig *config = sort->e_table_config;
ETableSortInfo *sort_info = config->temp_state->sort_info;
@@ -819,7 +832,8 @@ sort_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *sort)
}
static void
-sort_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *sort)
+sort_ascending_toggled (GtkToggleButton *t,
+ ETableConfigSortWidgets *sort)
{
ETableConfig *config = sort->e_table_config;
ETableSortInfo *si = config->temp_state->sort_info;
@@ -833,7 +847,8 @@ sort_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *sort)
}
static void
-configure_sort_dialog (ETableConfig *config, GtkBuilder *builder)
+configure_sort_dialog (ETableConfig *config,
+ GtkBuilder *builder)
{
GSList *l;
gint i;
@@ -904,7 +919,8 @@ configure_sort_dialog (ETableConfig *config, GtkBuilder *builder)
}
static void
-group_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *group)
+group_combo_changed (GtkComboBox *combo_box,
+ ETableConfigSortWidgets *group)
{
ETableConfig *config = group->e_table_config;
ETableSortInfo *sort_info = config->temp_state->sort_info;
@@ -942,7 +958,8 @@ group_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *group)
}
static void
-group_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *group)
+group_ascending_toggled (GtkToggleButton *t,
+ ETableConfigSortWidgets *group)
{
ETableConfig *config = group->e_table_config;
ETableSortInfo *si = config->temp_state->sort_info;
@@ -956,7 +973,8 @@ group_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *group)
}
static void
-configure_group_dialog (ETableConfig *config, GtkBuilder *builder)
+configure_group_dialog (ETableConfig *config,
+ GtkBuilder *builder)
{
GSList *l;
gint i;
@@ -1027,14 +1045,16 @@ configure_group_dialog (ETableConfig *config, GtkBuilder *builder)
}
static void
-add_column (gint model_row, gpointer closure)
+add_column (gint model_row,
+ gpointer closure)
{
GList **columns = closure;
*columns = g_list_prepend (*columns, GINT_TO_POINTER (model_row));
}
static void
-config_button_add (GtkWidget *widget, ETableConfig *config)
+config_button_add (GtkWidget *widget,
+ ETableConfig *config)
{
GList *columns = NULL;
GList *column;
@@ -1070,7 +1090,8 @@ config_button_add (GtkWidget *widget, ETableConfig *config)
}
static void
-config_button_remove (GtkWidget *widget, ETableConfig *config)
+config_button_remove (GtkWidget *widget,
+ ETableConfig *config)
{
GList *columns = NULL;
GList *column;
@@ -1103,7 +1124,8 @@ config_button_remove (GtkWidget *widget, ETableConfig *config)
}
static void
-config_button_up (GtkWidget *widget, ETableConfig *config)
+config_button_up (GtkWidget *widget,
+ ETableConfig *config)
{
GList *columns = NULL;
GList *column;
@@ -1158,7 +1180,8 @@ config_button_up (GtkWidget *widget, ETableConfig *config)
}
static void
-config_button_down (GtkWidget *widget, ETableConfig *config)
+config_button_down (GtkWidget *widget,
+ ETableConfig *config)
{
GList *columns = NULL;
GList *column;
@@ -1211,7 +1234,8 @@ config_button_down (GtkWidget *widget, ETableConfig *config)
}
static void
-configure_fields_dialog (ETableConfig *config, GtkBuilder *builder)
+configure_fields_dialog (ETableConfig *config,
+ GtkBuilder *builder)
{
GtkWidget *scrolled;
GtkWidget *etable;
@@ -1341,11 +1365,11 @@ e_table_config_init (ETableConfig *config)
}
ETableConfig *
-e_table_config_construct (ETableConfig *config,
- const gchar *header,
- ETableSpecification *spec,
- ETableState *state,
- GtkWindow *parent_window)
+e_table_config_construct (ETableConfig *config,
+ const gchar *header,
+ ETableSpecification *spec,
+ ETableState *state,
+ GtkWindow *parent_window)
{
ETableColumnSpecification **column;
diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c
index b07651a22c..f3e55cf8cf 100644
--- a/widgets/table/e-table-extras.c
+++ b/widgets/table/e-table-extras.c
@@ -156,7 +156,9 @@ e_string_search (gconstpointer haystack,
}
static gint
-e_table_str_case_compare (gconstpointer x, gconstpointer y, gpointer cmp_cache)
+e_table_str_case_compare (gconstpointer x,
+ gconstpointer y,
+ gpointer cmp_cache)
{
const gchar *cx = NULL, *cy = NULL;
@@ -190,7 +192,9 @@ e_table_str_case_compare (gconstpointer x, gconstpointer y, gpointer cmp_cache)
}
static gint
-e_table_collate_compare (gconstpointer x, gconstpointer y, gpointer cmp_cache)
+e_table_collate_compare (gconstpointer x,
+ gconstpointer y,
+ gpointer cmp_cache)
{
const gchar *cx = NULL, *cy = NULL;
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index b4ac8e53ef..354095b0c8 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -32,8 +32,8 @@
#include "e-table-field-chooser-dialog.h"
-static void e_table_field_chooser_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_table_field_chooser_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+static void e_table_field_chooser_dialog_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void e_table_field_chooser_dialog_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void e_table_field_chooser_dialog_dispose (GObject *object);
static void e_table_field_chooser_dialog_response (GtkDialog *dialog, gint id);
@@ -53,7 +53,7 @@ e_table_field_chooser_dialog_class_init (ETableFieldChooserDialogClass *class)
GObjectClass *object_class;
GtkDialogClass *dialog_class;
- object_class = (GObjectClass*) class;
+ object_class = (GObjectClass *) class;
dialog_class = GTK_DIALOG_CLASS (class);
object_class->dispose = e_table_field_chooser_dialog_dispose;
@@ -119,7 +119,7 @@ e_table_field_chooser_dialog_init (ETableFieldChooserDialog *e_table_field_choos
gtk_window_set_title (GTK_WINDOW (dialog), _("Add a Column"));
}
-GtkWidget*
+GtkWidget *
e_table_field_chooser_dialog_new (void)
{
return g_object_new (E_TYPE_TABLE_FIELD_CHOOSER_DIALOG, NULL);
@@ -146,10 +146,13 @@ e_table_field_chooser_dialog_dispose (GObject *object)
}
static void
-e_table_field_chooser_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+e_table_field_chooser_dialog_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ETableFieldChooserDialog *etfcd = E_TABLE_FIELD_CHOOSER_DIALOG (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_DND_CODE:
g_free (etfcd->dnd_code);
etfcd->dnd_code = g_strdup (g_value_get_string (value));
@@ -192,10 +195,13 @@ e_table_field_chooser_dialog_set_property (GObject *object, guint prop_id, const
}
static void
-e_table_field_chooser_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+e_table_field_chooser_dialog_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableFieldChooserDialog *etfcd = E_TABLE_FIELD_CHOOSER_DIALOG (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_DND_CODE:
g_value_set_string (value, etfcd->dnd_code);
break;
@@ -206,13 +212,14 @@ e_table_field_chooser_dialog_get_property (GObject *object, guint prop_id, GValu
g_value_set_object (value, etfcd->header);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
-e_table_field_chooser_dialog_response (GtkDialog *dialog, gint id)
+e_table_field_chooser_dialog_response (GtkDialog *dialog,
+ gint id)
{
if (id == GTK_RESPONSE_OK)
gtk_widget_destroy (GTK_WIDGET (dialog));
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index e2dc6f1721..ecc414853c 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -89,7 +89,8 @@ etfci_dispose (GObject *object)
}
static gint
-etfci_find_button (ETableFieldChooserItem *etfci, gdouble loc)
+etfci_find_button (ETableFieldChooserItem *etfci,
+ gdouble loc)
{
gint i;
gint count;
@@ -148,7 +149,8 @@ etfci_rebuild_combined (ETableFieldChooserItem *etfci)
}
static void
-etfci_reflow (GnomeCanvasItem *item, gint flags)
+etfci_reflow (GnomeCanvasItem *item,
+ gint flags)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
gdouble old_height;
@@ -345,7 +347,7 @@ etfci_add_table_header (ETableFieldChooserItem *etfci,
static void
etfci_set_property (GObject *object,
- guint prop_id,
+ guint property_id,
const GValue *value,
GParamSpec *pspec)
{
@@ -355,7 +357,7 @@ etfci_set_property (GObject *object,
item = GNOME_CANVAS_ITEM (object);
etfci = E_TABLE_FIELD_CHOOSER_ITEM (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_FULL_HEADER:
etfci_drop_full_header (etfci);
if (g_value_get_object (value))
@@ -385,13 +387,16 @@ etfci_set_property (GObject *object,
}
static void
-etfci_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+etfci_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableFieldChooserItem *etfci;
etfci = E_TABLE_FIELD_CHOOSER_ITEM (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_DND_CODE:
g_value_set_string (value, etfci->dnd_code);
@@ -403,18 +408,18 @@ etfci_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *p
g_value_set_double (value, etfci->height);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
-etfci_drag_data_get (GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- ETableFieldChooserItem *etfci)
+etfci_drag_data_get (GtkWidget *widget,
+ GdkDragContext *context,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ ETableFieldChooserItem *etfci)
{
if (etfci->drag_col != -1) {
gchar *string = g_strdup_printf("%d", etfci->drag_col);
@@ -428,9 +433,9 @@ etfci_drag_data_get (GtkWidget *widget,
}
static void
-etfci_drag_end (GtkWidget *canvas,
- GdkDragContext *context,
- ETableFieldChooserItem *etfci)
+etfci_drag_end (GtkWidget *canvas,
+ GdkDragContext *context,
+ ETableFieldChooserItem *etfci)
{
etfci->drag_col = -1;
}
@@ -529,13 +534,19 @@ etfci_draw (GnomeCanvasItem *item,
}
static GnomeCanvasItem *
-etfci_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy)
+etfci_point (GnomeCanvasItem *item,
+ gdouble x,
+ gdouble y,
+ gint cx,
+ gint cy)
{
return item;
}
static gboolean
-etfci_maybe_start_drag (ETableFieldChooserItem *etfci, gint x, gint y)
+etfci_maybe_start_drag (ETableFieldChooserItem *etfci,
+ gint x,
+ gint y)
{
if (!etfci->maybe_drag)
return FALSE;
@@ -548,7 +559,10 @@ etfci_maybe_start_drag (ETableFieldChooserItem *etfci, gint x, gint y)
}
static void
-etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, gdouble x, gdouble y)
+etfci_start_drag (ETableFieldChooserItem *etfci,
+ GdkEvent *event,
+ gdouble x,
+ gdouble y)
{
GtkWidget *widget = GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas);
GtkTargetList *list;
@@ -622,7 +636,8 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, gdouble x, gdo
* Handles the events on the ETableFieldChooserItem
*/
static gint
-etfci_event (GnomeCanvasItem *item, GdkEvent *e)
+etfci_event (GnomeCanvasItem *item,
+ GdkEvent *e)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
GnomeCanvas *canvas = item->canvas;
diff --git a/widgets/table/e-table-field-chooser-item.h b/widgets/table/e-table-field-chooser-item.h
index 066dd52ffb..f08b94ac6f 100644
--- a/widgets/table/e-table-field-chooser-item.h
+++ b/widgets/table/e-table-field-chooser-item.h
@@ -74,7 +74,7 @@ struct _ETableFieldChooserItem {
/*
* For dragging columns
*/
- guint maybe_drag:1;
+ guint maybe_drag : 1;
gint click_x, click_y;
gint drag_col;
guint drag_data_get_id;
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index 2f945bb079..5e2cb13880 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -36,8 +36,8 @@
#include "e-table-field-chooser.h"
#include "e-table-field-chooser-item.h"
-static void e_table_field_chooser_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_table_field_chooser_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+static void e_table_field_chooser_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void e_table_field_chooser_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void e_table_field_chooser_dispose (GObject *object);
/* The arguments we take */
@@ -55,7 +55,7 @@ e_table_field_chooser_class_init (ETableFieldChooserClass *class)
{
GObjectClass *object_class;
- object_class = (GObjectClass*) class;
+ object_class = (GObjectClass *) class;
object_class->set_property = e_table_field_chooser_set_property;
object_class->get_property = e_table_field_chooser_get_property;
@@ -202,7 +202,7 @@ e_table_field_chooser_init (ETableFieldChooser *etfc)
"dnd_code", etfc->dnd_code,
NULL );
- g_signal_connect( etfc->canvas, "reflow",
+ g_signal_connect ( etfc->canvas, "reflow",
G_CALLBACK ( resize ),
etfc);
@@ -238,18 +238,21 @@ e_table_field_chooser_dispose (GObject *object)
G_OBJECT_CLASS (e_table_field_chooser_parent_class)->dispose (object);
}
-GtkWidget*
+GtkWidget *
e_table_field_chooser_new (void)
{
return g_object_new (E_TYPE_TABLE_FIELD_CHOOSER, NULL);
}
static void
-e_table_field_chooser_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+e_table_field_chooser_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ETableFieldChooser *etfc = E_TABLE_FIELD_CHOOSER (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_DND_CODE:
g_free (etfc->dnd_code);
etfc->dnd_code = g_strdup (g_value_get_string (value));
@@ -292,11 +295,14 @@ e_table_field_chooser_set_property (GObject *object, guint prop_id, const GValue
}
static void
-e_table_field_chooser_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+e_table_field_chooser_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableFieldChooser *etfc = E_TABLE_FIELD_CHOOSER (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_DND_CODE:
g_value_set_string (value, etfc->dnd_code);
break;
@@ -307,7 +313,7 @@ e_table_field_chooser_get_property (GObject *object, guint prop_id, GValue *valu
g_value_set_object (value, etfc->header);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 0a933769f9..d874834db1 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -68,8 +68,8 @@ static EPrintable *
etgc_get_printable (ETableGroup *etg);
static void
-e_table_group_container_child_node_free (ETableGroupContainer *etgc,
- ETableGroupContainerChildNode *child_node)
+e_table_group_container_child_node_free (ETableGroupContainer *etgc,
+ ETableGroupContainerChildNode *child_node)
{
ETableGroup *etg = E_TABLE_GROUP (etgc);
ETableGroup *child = child_node->child;
@@ -141,10 +141,13 @@ etgc_dispose (GObject *object)
* This routine constructs the new %ETableGroupContainer.
*/
void
-e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContainer *etgc,
- ETableHeader *full_header,
- ETableHeader *header,
- ETableModel *model, ETableSortInfo *sort_info, gint n)
+e_table_group_container_construct (GnomeCanvasGroup *parent,
+ ETableGroupContainer *etgc,
+ ETableHeader *full_header,
+ ETableHeader *header,
+ ETableModel *model,
+ ETableSortInfo *sort_info,
+ gint n)
{
ETableCol *col;
ETableSortColumn column = e_table_sort_info_grouping_get_nth (sort_info, n);
@@ -186,9 +189,12 @@ e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContaine
* Returns: The new %ETableGroupContainer.
*/
ETableGroup *
-e_table_group_container_new (GnomeCanvasGroup *parent, ETableHeader *full_header,
- ETableHeader *header,
- ETableModel *model, ETableSortInfo *sort_info, gint n)
+e_table_group_container_new (GnomeCanvasGroup *parent,
+ ETableHeader *full_header,
+ ETableHeader *header,
+ ETableModel *model,
+ ETableSortInfo *sort_info,
+ gint n)
{
ETableGroupContainer *etgc;
@@ -202,7 +208,8 @@ e_table_group_container_new (GnomeCanvasGroup *parent, ETableHeader *full_header
}
static gint
-etgc_event (GnomeCanvasItem *item, GdkEvent *event)
+etgc_event (GnomeCanvasItem *item,
+ GdkEvent *event)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (item);
gboolean return_val = TRUE;
@@ -338,17 +345,18 @@ etgc_unrealize (GnomeCanvasItem *item)
}
static void
-compute_text (ETableGroupContainer *etgc, ETableGroupContainerChildNode *child_node)
+compute_text (ETableGroupContainer *etgc,
+ ETableGroupContainerChildNode *child_node)
{
gchar *text;
if (etgc->ecol->text) {
/* Translators: This text is used as a special row when an ETable
- has turned on grouping on a column, which has set a title.
- The first %s is replaced with a column title.
- The second %s is replaced with an actual group value.
- Finally the %d is replaced with count of items in this group.
- Example: "Family name: Smith (13 items)"
+ * has turned on grouping on a column, which has set a title.
+ * The first %s is replaced with a column title.
+ * The second %s is replaced with an actual group value.
+ * Finally the %d is replaced with count of items in this group.
+ * Example: "Family name: Smith (13 items)"
*/
text = g_strdup_printf (ngettext("%s: %s (%d item)",
"%s: %s (%d items)",
@@ -357,10 +365,10 @@ compute_text (ETableGroupContainer *etgc, ETableGroupContainerChildNode *child_n
(gint) child_node->count);
} else {
/* Translators: This text is used as a special row when an ETable
- has turned on grouping on a column, which doesn't have set a title.
- The %s is replaced with an actual group value.
- The %d is replaced with count of items in this group.
- Example: "Smith (13 items)"
+ * has turned on grouping on a column, which doesn't have set a title.
+ * The %s is replaced with an actual group value.
+ * The %d is replaced with count of items in this group.
+ * Example: "Smith (13 items)"
*/
text = g_strdup_printf (ngettext("%s (%d item)",
"%s (%d items)",
@@ -375,56 +383,74 @@ compute_text (ETableGroupContainer *etgc, ETableGroupContainerChildNode *child_n
}
static void
-child_cursor_change (ETableGroup *etg, gint row,
- ETableGroupContainer *etgc)
+child_cursor_change (ETableGroup *etg,
+ gint row,
+ ETableGroupContainer *etgc)
{
e_table_group_cursor_change (E_TABLE_GROUP (etgc), row);
}
static void
-child_cursor_activated (ETableGroup *etg, gint row,
- ETableGroupContainer *etgc)
+child_cursor_activated (ETableGroup *etg,
+ gint row,
+ ETableGroupContainer *etgc)
{
e_table_group_cursor_activated (E_TABLE_GROUP (etgc), row);
}
static void
-child_double_click (ETableGroup *etg, gint row, gint col, GdkEvent *event,
- ETableGroupContainer *etgc)
+child_double_click (ETableGroup *etg,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETableGroupContainer *etgc)
{
e_table_group_double_click (E_TABLE_GROUP (etgc), row, col, event);
}
static gboolean
-child_right_click (ETableGroup *etg, gint row, gint col, GdkEvent *event,
- ETableGroupContainer *etgc)
+child_right_click (ETableGroup *etg,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETableGroupContainer *etgc)
{
return e_table_group_right_click (E_TABLE_GROUP (etgc), row, col, event);
}
static gboolean
-child_click (ETableGroup *etg, gint row, gint col, GdkEvent *event,
- ETableGroupContainer *etgc)
+child_click (ETableGroup *etg,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETableGroupContainer *etgc)
{
return e_table_group_click (E_TABLE_GROUP (etgc), row, col, event);
}
static gboolean
-child_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event,
- ETableGroupContainer *etgc)
+child_key_press (ETableGroup *etg,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETableGroupContainer *etgc)
{
return e_table_group_key_press (E_TABLE_GROUP (etgc), row, col, event);
}
static gboolean
-child_start_drag (ETableGroup *etg, gint row, gint col, GdkEvent *event,
- ETableGroupContainer *etgc)
+child_start_drag (ETableGroup *etg,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETableGroupContainer *etgc)
{
return e_table_group_start_drag (E_TABLE_GROUP (etgc), row, col, event);
}
static ETableGroupContainerChildNode *
-create_child_node (ETableGroupContainer *etgc, gpointer val)
+create_child_node (ETableGroupContainer *etgc,
+ gpointer val)
{
ETableGroup *child;
ETableGroupContainerChildNode *child_node;
@@ -478,7 +504,8 @@ create_child_node (ETableGroupContainer *etgc, gpointer val)
}
static void
-etgc_add (ETableGroup *etg, gint row)
+etgc_add (ETableGroup *etg,
+ gint row)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
gpointer val = e_table_model_value_at (etg->model, etgc->ecol->col_idx, row);
@@ -522,7 +549,9 @@ etgc_add (ETableGroup *etg, gint row)
}
static void
-etgc_add_array (ETableGroup *etg, const gint *array, gint count)
+etgc_add_array (ETableGroup *etg,
+ const gint *array,
+ gint count)
{
gint i;
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
@@ -589,7 +618,8 @@ etgc_add_all (ETableGroup *etg)
}
static gboolean
-etgc_remove (ETableGroup *etg, gint row)
+etgc_remove (ETableGroup *etg,
+ gint row)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
GList *list;
@@ -630,7 +660,9 @@ etgc_row_count (ETableGroup *etg)
}
static void
-etgc_increment (ETableGroup *etg, gint position, gint amount)
+etgc_increment (ETableGroup *etg,
+ gint position,
+ gint amount)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
GList *list;
@@ -641,7 +673,9 @@ etgc_increment (ETableGroup *etg, gint position, gint amount)
}
static void
-etgc_decrement (ETableGroup *etg, gint position, gint amount)
+etgc_decrement (ETableGroup *etg,
+ gint position,
+ gint amount)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
GList *list;
@@ -652,7 +686,9 @@ etgc_decrement (ETableGroup *etg, gint position, gint amount)
}
static void
-etgc_set_focus (ETableGroup *etg, EFocus direction, gint view_col)
+etgc_set_focus (ETableGroup *etg,
+ EFocus direction,
+ gint view_col)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
if (etgc->children) {
@@ -683,7 +719,11 @@ etgc_get_focus_column (ETableGroup *etg)
}
static void
-etgc_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col)
+etgc_compute_location (ETableGroup *etg,
+ gint *x,
+ gint *y,
+ gint *row,
+ gint *col)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
@@ -709,7 +749,9 @@ etgc_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col)
}
static void
-etgc_get_mouse_over (ETableGroup *etg, gint *row, gint *col)
+etgc_get_mouse_over (ETableGroup *etg,
+ gint *row,
+ gint *col)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
@@ -740,7 +782,13 @@ etgc_get_mouse_over (ETableGroup *etg, gint *row, gint *col)
}
static void
-etgc_get_cell_geometry (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y, gint *width, gint *height)
+etgc_get_cell_geometry (ETableGroup *etg,
+ gint *row,
+ gint *col,
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
@@ -773,13 +821,16 @@ static void etgc_thaw (ETableGroup *etg)
}
static void
-etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+etgc_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ETableGroup *etg = E_TABLE_GROUP (object);
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (object);
GList *list;
- switch (prop_id) {
+ switch (property_id) {
case PROP_FROZEN:
if (g_value_get_boolean (value))
etg->frozen = TRUE;
@@ -887,12 +938,15 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp
}
static void
-etgc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+etgc_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableGroup *etg = E_TABLE_GROUP (object);
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_FROZEN:
g_value_set_boolean (value, etg->frozen);
break;
@@ -909,7 +963,7 @@ etgc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *ps
g_value_set_boolean (value, etgc->uniform_row_height);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -1029,7 +1083,8 @@ etgc_class_init (ETableGroupContainerClass *class)
}
static void
-etgc_reflow (GnomeCanvasItem *item, gint flags)
+etgc_reflow (GnomeCanvasItem *item,
+ gint flags)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (item);
gboolean frozen;
@@ -1136,7 +1191,9 @@ etgc_init (ETableGroupContainer *container)
}
void
-e_table_group_apply_to_leafs (ETableGroup *etg, ETableGroupLeafFn fn, gpointer closure)
+e_table_group_apply_to_leafs (ETableGroup *etg,
+ ETableGroupLeafFn fn,
+ gpointer closure)
{
if (E_IS_TABLE_GROUP_CONTAINER (etg)) {
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
@@ -1170,7 +1227,11 @@ typedef struct {
#if 0
static gint
-gp_draw_rect (GtkPrintContext *context, gdouble x, gdouble y, gdouble width, gdouble height)
+gp_draw_rect (GtkPrintContext *context,
+ gdouble x,
+ gdouble y,
+ gdouble width,
+ gdouble height)
{
cairo_t *cr;
cr = gtk_print_context_get_cairo_context (context);
@@ -1184,12 +1245,12 @@ gp_draw_rect (GtkPrintContext *context, gdouble x, gdouble y, gdouble width, gdo
#define TEXT_AREA_HEIGHT (TEXT_HEIGHT + 4)
static void
-e_table_group_container_print_page (EPrintable *ep,
- GtkPrintContext *context,
- gdouble width,
- gdouble height,
- gboolean quantize,
- ETGCPrintContext *groupcontext)
+e_table_group_container_print_page (EPrintable *ep,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble height,
+ gboolean quantize,
+ ETGCPrintContext *groupcontext)
{
cairo_t *cr;
GtkPageSetup *setup;
@@ -1283,7 +1344,7 @@ e_table_group_container_print_page (EPrintable *ep,
cairo_rectangle (cr, 0, child_margin, width - 2 * TEXT_AREA_HEIGHT, child_height + child_margin + 20);
cairo_clip (cr);
- e_printable_print_page (child_printable, context, width-2 * TEXT_AREA_HEIGHT, child_margin, quantize);
+ e_printable_print_page (child_printable, context, width - 2 * TEXT_AREA_HEIGHT, child_margin, quantize);
yd -= child_height + TEXT_AREA_HEIGHT;
if (e_printable_data_left (child_printable)) {
@@ -1319,16 +1380,16 @@ e_table_group_container_print_page (EPrintable *ep,
}
static gboolean
-e_table_group_container_data_left (EPrintable *ep,
- ETGCPrintContext *groupcontext)
+e_table_group_container_data_left (EPrintable *ep,
+ ETGCPrintContext *groupcontext)
{
g_signal_stop_emission_by_name(ep, "data_left");
return groupcontext->child != NULL;
}
static void
-e_table_group_container_reset (EPrintable *ep,
- ETGCPrintContext *groupcontext)
+e_table_group_container_reset (EPrintable *ep,
+ ETGCPrintContext *groupcontext)
{
groupcontext->child = groupcontext->etgc->children;
if (groupcontext->child_printable)
@@ -1337,12 +1398,12 @@ e_table_group_container_reset (EPrintable *ep,
}
static gdouble
-e_table_group_container_height (EPrintable *ep,
- GtkPrintContext *context,
- gdouble width,
- gdouble max_height,
- gboolean quantize,
- ETGCPrintContext *groupcontext)
+e_table_group_container_height (EPrintable *ep,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble max_height,
+ gboolean quantize,
+ ETGCPrintContext *groupcontext)
{
gdouble height = 0;
gdouble child_height;
@@ -1405,12 +1466,12 @@ e_table_group_container_height (EPrintable *ep,
}
static gboolean
-e_table_group_container_will_fit (EPrintable *ep,
- GtkPrintContext *context,
- gdouble width,
- gdouble max_height,
- gboolean quantize,
- ETGCPrintContext *groupcontext)
+e_table_group_container_will_fit (EPrintable *ep,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble max_height,
+ gboolean quantize,
+ ETGCPrintContext *groupcontext)
{
gboolean will_fit = TRUE;
gdouble child_height;
@@ -1476,7 +1537,7 @@ e_table_group_container_will_fit (EPrintable *ep,
static void
e_table_group_container_printable_destroy (gpointer data,
- GObject *where_object_was)
+ GObject *where_object_was)
{
ETGCPrintContext *groupcontext = data;
diff --git a/widgets/table/e-table-group-container.h b/widgets/table/e-table-group-container.h
index 5ea0910ef0..ac5f7c9033 100644
--- a/widgets/table/e-table-group-container.h
+++ b/widgets/table/e-table-group-container.h
@@ -95,7 +95,7 @@ struct _ETableGroupContainer {
/*
* State: the ETableGroup is open or closed
*/
- guint open:1;
+ guint open : 1;
};
struct _ETableGroupContainerClass {
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c
index bf4f1553aa..27a62bbb16 100644
--- a/widgets/table/e-table-group-leaf.c
+++ b/widgets/table/e-table-group-leaf.c
@@ -114,11 +114,11 @@ etgl_dispose (GObject *object)
static void
e_table_group_leaf_construct (GnomeCanvasGroup *parent,
- ETableGroupLeaf *etgl,
- ETableHeader *full_header,
- ETableHeader *header,
- ETableModel *model,
- ETableSortInfo *sort_info)
+ ETableGroupLeaf *etgl,
+ ETableHeader *full_header,
+ ETableHeader *header,
+ ETableModel *model,
+ ETableSortInfo *sort_info)
{
etgl->is_grouped =
(e_table_sort_info_grouping_get_count (sort_info) > 0);
@@ -262,7 +262,8 @@ etgl_click (GObject *object,
}
static void
-etgl_reflow (GnomeCanvasItem *item, gint flags)
+etgl_reflow (GnomeCanvasItem *item,
+ gint flags)
{
ETableGroupLeaf *leaf = E_TABLE_GROUP_LEAF (item);
@@ -330,7 +331,8 @@ etgl_realize (GnomeCanvasItem *item)
}
static void
-etgl_add (ETableGroup *etg, gint row)
+etgl_add (ETableGroup *etg,
+ gint row)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
@@ -341,7 +343,9 @@ etgl_add (ETableGroup *etg, gint row)
}
static void
-etgl_add_array (ETableGroup *etg, const gint *array, gint count)
+etgl_add_array (ETableGroup *etg,
+ const gint *array,
+ gint count)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
@@ -363,7 +367,8 @@ etgl_add_all (ETableGroup *etg)
}
static gboolean
-etgl_remove (ETableGroup *etg, gint row)
+etgl_remove (ETableGroup *etg,
+ gint row)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
@@ -375,7 +380,9 @@ etgl_remove (ETableGroup *etg, gint row)
}
static void
-etgl_increment (ETableGroup *etg, gint position, gint amount)
+etgl_increment (ETableGroup *etg,
+ gint position,
+ gint amount)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
@@ -387,7 +394,9 @@ etgl_increment (ETableGroup *etg, gint position, gint amount)
}
static void
-etgl_decrement (ETableGroup *etg, gint position, gint amount)
+etgl_decrement (ETableGroup *etg,
+ gint position,
+ gint amount)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
@@ -407,7 +416,9 @@ etgl_row_count (ETableGroup *etg)
}
static void
-etgl_set_focus (ETableGroup *etg, EFocus direction, gint view_col)
+etgl_set_focus (ETableGroup *etg,
+ EFocus direction,
+ gint view_col)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
@@ -437,7 +448,11 @@ etgl_get_printable (ETableGroup *etg)
}
static void
-etgl_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col)
+etgl_compute_location (ETableGroup *etg,
+ gint *x,
+ gint *y,
+ gint *row,
+ gint *col)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
@@ -445,7 +460,9 @@ etgl_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col)
}
static void
-etgl_get_mouse_over (ETableGroup *etg, gint *row, gint *col)
+etgl_get_mouse_over (ETableGroup *etg,
+ gint *row,
+ gint *col)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
@@ -473,14 +490,14 @@ etgl_get_cell_geometry (ETableGroup *etg,
static void
etgl_set_property (GObject *object,
- guint prop_id,
+ guint property_id,
const GValue *value,
GParamSpec *pspec)
{
ETableGroup *etg = E_TABLE_GROUP (object);
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_FROZEN:
etg->frozen = g_value_get_boolean (value);
break;
@@ -574,12 +591,15 @@ etgl_set_property (GObject *object,
}
static void
-etgl_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+etgl_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableGroup *etg = E_TABLE_GROUP (object);
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_FROZEN:
g_value_set_boolean (value, etg->frozen);
break;
@@ -595,7 +615,7 @@ etgl_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *ps
case PROP_UNIFORM_ROW_HEIGHT:
g_value_set_boolean (value, etgl->uniform_row_height);
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index 8fd56bc7b1..8d820f861a 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -99,11 +99,11 @@ etg_dispose (GObject *object)
*/
ETableGroup *
e_table_group_new (GnomeCanvasGroup *parent,
- ETableHeader *full_header,
- ETableHeader *header,
- ETableModel *model,
- ETableSortInfo *sort_info,
- gint n)
+ ETableHeader *full_header,
+ ETableHeader *header,
+ ETableModel *model,
+ ETableSortInfo *sort_info,
+ gint n)
{
g_return_val_if_fail (model != NULL, NULL);
@@ -128,10 +128,10 @@ e_table_group_new (GnomeCanvasGroup *parent,
*/
void
e_table_group_construct (GnomeCanvasGroup *parent,
- ETableGroup *etg,
- ETableHeader *full_header,
- ETableHeader *header,
- ETableModel *model)
+ ETableGroup *etg,
+ ETableHeader *full_header,
+ ETableHeader *header,
+ ETableModel *model)
{
etg->full_header = full_header;
g_object_ref (etg->full_header);
@@ -139,9 +139,7 @@ e_table_group_construct (GnomeCanvasGroup *parent,
g_object_ref (etg->header);
etg->model = model;
g_object_ref (etg->model);
- g_object_set (G_OBJECT (etg),
- "parent", parent,
- NULL);
+ g_object_set (etg, "parent", parent, NULL);
}
/**
@@ -154,7 +152,7 @@ e_table_group_construct (GnomeCanvasGroup *parent,
*/
void
e_table_group_add (ETableGroup *etg,
- gint row)
+ gint row)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
@@ -174,8 +172,8 @@ e_table_group_add (ETableGroup *etg,
*/
void
e_table_group_add_array (ETableGroup *etg,
- const gint *array,
- gint count)
+ const gint *array,
+ gint count)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
@@ -214,7 +212,7 @@ e_table_group_add_all (ETableGroup *etg)
*/
gboolean
e_table_group_remove (ETableGroup *etg,
- gint row)
+ gint row)
{
g_return_val_if_fail (etg != NULL, FALSE);
g_return_val_if_fail (E_IS_TABLE_GROUP (etg), FALSE);
@@ -235,8 +233,8 @@ e_table_group_remove (ETableGroup *etg,
*/
void
e_table_group_increment (ETableGroup *etg,
- gint position,
- gint amount)
+ gint position,
+ gint amount)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
@@ -257,8 +255,8 @@ e_table_group_increment (ETableGroup *etg,
*/
void
e_table_group_decrement (ETableGroup *etg,
- gint position,
- gint amount)
+ gint position,
+ gint amount)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
@@ -296,8 +294,8 @@ e_table_group_row_count (ETableGroup *etg)
*/
void
e_table_group_set_focus (ETableGroup *etg,
- EFocus direction,
- gint view_col)
+ EFocus direction,
+ gint view_col)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
@@ -390,7 +388,9 @@ e_table_group_compute_location (ETableGroup *etg,
}
void
-e_table_group_get_mouse_over (ETableGroup *etg, gint *row, gint *col)
+e_table_group_get_mouse_over (ETableGroup *etg,
+ gint *row,
+ gint *col)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
@@ -414,13 +414,13 @@ e_table_group_get_mouse_over (ETableGroup *etg, gint *row, gint *col)
* removed from the value row points to.
*/
void
-e_table_group_get_cell_geometry (ETableGroup *etg,
- gint *row,
- gint *col,
- gint *x,
- gint *y,
- gint *width,
- gint *height)
+e_table_group_get_cell_geometry (ETableGroup *etg,
+ gint *row,
+ gint *col,
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
@@ -437,7 +437,8 @@ e_table_group_get_cell_geometry (ETableGroup *etg,
* This routine emits the "cursor_change" signal.
*/
void
-e_table_group_cursor_change (ETableGroup *e_table_group, gint row)
+e_table_group_cursor_change (ETableGroup *e_table_group,
+ gint row)
{
g_return_if_fail (e_table_group != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (e_table_group));
@@ -455,7 +456,8 @@ e_table_group_cursor_change (ETableGroup *e_table_group, gint row)
* This routine emits the "cursor_activated" signal.
*/
void
-e_table_group_cursor_activated (ETableGroup *e_table_group, gint row)
+e_table_group_cursor_activated (ETableGroup *e_table_group,
+ gint row)
{
g_return_if_fail (e_table_group != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (e_table_group));
@@ -614,7 +616,8 @@ e_table_group_get_header (ETableGroup *etg)
}
static gint
-etg_event (GnomeCanvasItem *item, GdkEvent *event)
+etg_event (GnomeCanvasItem *item,
+ GdkEvent *event)
{
ETableGroup *etg = E_TABLE_GROUP (item);
gboolean return_val = TRUE;
@@ -638,7 +641,7 @@ etg_event (GnomeCanvasItem *item, GdkEvent *event)
}
static gboolean
-etg_get_focus (ETableGroup *etg)
+etg_get_focus (ETableGroup *etg)
{
return etg->has_focus;
}
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 16633f967c..11d8f31f81 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -101,7 +101,8 @@ static void scroll_off (ETableHeaderItem *ethi);
static void scroll_on (ETableHeaderItem *ethi, guint scroll_direction);
static void
-ethi_dispose (GObject *object) {
+ethi_dispose (GObject *object)
+{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (object);
ethi_drop_table_header (ethi);
@@ -223,7 +224,8 @@ ethi_update (GnomeCanvasItem *item,
}
static void
-ethi_font_set (ETableHeaderItem *ethi, PangoFontDescription *font_desc)
+ethi_font_set (ETableHeaderItem *ethi,
+ PangoFontDescription *font_desc)
{
if (ethi->font_desc)
pango_font_description_free (ethi->font_desc);
@@ -252,19 +254,23 @@ ethi_drop_table_header (ETableHeaderItem *ethi)
}
static void
-structure_changed (ETableHeader *header, ETableHeaderItem *ethi)
+structure_changed (ETableHeader *header,
+ ETableHeaderItem *ethi)
{
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
}
static void
-dimension_changed (ETableHeader *header, gint col, ETableHeaderItem *ethi)
+dimension_changed (ETableHeader *header,
+ gint col,
+ ETableHeaderItem *ethi)
{
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
}
static void
-ethi_add_table_header (ETableHeaderItem *ethi, ETableHeader *header)
+ethi_add_table_header (ETableHeaderItem *ethi,
+ ETableHeader *header)
{
ethi->eth = header;
g_object_ref (ethi->eth);
@@ -282,16 +288,17 @@ ethi_add_table_header (ETableHeaderItem *ethi, ETableHeader *header)
}
static void
-ethi_sort_info_changed (ETableSortInfo *sort_info, ETableHeaderItem *ethi)
+ethi_sort_info_changed (ETableSortInfo *sort_info,
+ ETableHeaderItem *ethi)
{
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
}
static void
ethi_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GnomeCanvasItem *item;
ETableHeaderItem *ethi;
@@ -299,7 +306,7 @@ ethi_set_property (GObject *object,
item = GNOME_CANVAS_ITEM (object);
ethi = E_TABLE_HEADER_ITEM (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_TABLE_HEADER:
ethi_drop_table_header (ethi);
ethi_add_table_header (ethi, E_TABLE_HEADER (g_value_get_object (value)));
@@ -364,15 +371,15 @@ ethi_set_property (GObject *object,
static void
ethi_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableHeaderItem *ethi;
ethi = E_TABLE_HEADER_ITEM (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_FULL_HEADER:
g_value_set_object (value, ethi->full_header);
break;
@@ -380,13 +387,14 @@ ethi_get_property (GObject *object,
g_value_set_string (value, ethi->dnd_code);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static gint
-ethi_find_col_by_x (ETableHeaderItem *ethi, gint x)
+ethi_find_col_by_x (ETableHeaderItem *ethi,
+ gint x)
{
const gint cols = e_table_header_count (ethi->eth);
gint x1 = 0;
@@ -416,7 +424,8 @@ ethi_find_col_by_x (ETableHeaderItem *ethi, gint x)
}
static gint
-ethi_find_col_by_x_nearest (ETableHeaderItem *ethi, gint x)
+ethi_find_col_by_x_nearest (ETableHeaderItem *ethi,
+ gint x)
{
const gint cols = e_table_header_count (ethi->eth);
gint x1 = 0;
@@ -473,7 +482,9 @@ make_shaped_window_from_xpm (const gchar **xpm)
}
static void
-ethi_add_drop_marker (ETableHeaderItem *ethi, gint col, gboolean recreate)
+ethi_add_drop_marker (ETableHeaderItem *ethi,
+ gint col,
+ gboolean recreate)
{
GnomeCanvas *canvas;
GtkAdjustment *adjustment;
@@ -536,7 +547,7 @@ ethi_add_destroy_marker (ETableHeaderItem *ethi)
"x1", x1 + 1,
"y1", (gdouble) 1,
"x2", (gdouble) x1 + e_table_header_col_diff (
- ethi->eth, ethi->drag_col, ethi->drag_col+1) - 2,
+ ethi->eth, ethi->drag_col, ethi->drag_col + 1) - 2,
"y2", (gdouble) ethi->height - 2,
"fill_color_rgba", 0xFF000080,
@@ -555,7 +566,9 @@ ethi_remove_destroy_marker (ETableHeaderItem *ethi)
#if 0
static gboolean
-moved (ETableHeaderItem *ethi, guint col, guint model_col)
+moved (ETableHeaderItem *ethi,
+ guint col,
+ guint model_col)
{
if (col == -1)
return TRUE;
@@ -667,7 +680,8 @@ scroll_timeout (gpointer data)
}
static void
-scroll_on (ETableHeaderItem *ethi, guint scroll_direction)
+scroll_on (ETableHeaderItem *ethi,
+ guint scroll_direction)
{
if (ethi->scroll_idle_id == 0 || scroll_direction != ethi->scroll_direction) {
if (ethi->scroll_idle_id != 0)
@@ -786,13 +800,13 @@ ethi_drag_end (GtkWidget *canvas,
static void
ethi_drag_data_received (GtkWidget *canvas,
- GdkDragContext *drag_context,
- gint x,
- gint y,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- ETableHeaderItem *ethi)
+ GdkDragContext *drag_context,
+ gint x,
+ gint y,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ ETableHeaderItem *ethi)
{
const guchar *data;
gint found = FALSE;
@@ -836,11 +850,11 @@ ethi_drag_data_received (GtkWidget *canvas,
static void
ethi_drag_data_get (GtkWidget *canvas,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- ETableHeaderItem *ethi)
+ GdkDragContext *context,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ ETableHeaderItem *ethi)
{
if (ethi->drag_col != -1) {
ETableCol *ecol = e_table_header_get_column (ethi->eth, ethi->drag_col);
@@ -857,11 +871,11 @@ ethi_drag_data_get (GtkWidget *canvas,
static gboolean
ethi_drag_drop (GtkWidget *canvas,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time,
- ETableHeaderItem *ethi)
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ ETableHeaderItem *ethi)
{
gboolean successful = FALSE;
@@ -1059,7 +1073,11 @@ ethi_draw (GnomeCanvasItem *item,
}
static GnomeCanvasItem *
-ethi_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy)
+ethi_point (GnomeCanvasItem *item,
+ gdouble x,
+ gdouble y,
+ gint cx,
+ gint cy)
{
return item;
}
@@ -1089,7 +1107,7 @@ is_pointer_on_division (ETableHeaderItem *ethi,
total += ecol->width;
- if ((total - TOLERANCE < pos)&& (pos < total + TOLERANCE)) {
+ if ((total - TOLERANCE < pos) && (pos < total + TOLERANCE)) {
if (return_col)
*return_col = col;
if (the_total)
@@ -1110,7 +1128,8 @@ is_pointer_on_division (ETableHeaderItem *ethi,
#define convert(c,sx,sy,x,y) gnome_canvas_w2c (c,sx,sy,x,y)
static void
-set_cursor (ETableHeaderItem *ethi, gint pos)
+set_cursor (ETableHeaderItem *ethi,
+ gint pos)
{
GnomeCanvas *canvas;
GdkWindow *window;
@@ -1133,7 +1152,7 @@ set_cursor (ETableHeaderItem *ethi, gint pos)
gint c = col + 1;
/* Column is not resizable if all columns after it
- are also not resizable */
+ * are also not resizable */
for (; c <= last_col; c++) {
ETableCol *ecol2;
@@ -1162,7 +1181,8 @@ ethi_end_resize (ETableHeaderItem *ethi)
}
static gboolean
-ethi_maybe_start_drag (ETableHeaderItem *ethi, GdkEventMotion *event)
+ethi_maybe_start_drag (ETableHeaderItem *ethi,
+ GdkEventMotion *event)
{
if (!ethi->maybe_drag)
return FALSE;
@@ -1180,7 +1200,8 @@ ethi_maybe_start_drag (ETableHeaderItem *ethi, GdkEventMotion *event)
}
static void
-ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
+ethi_start_drag (ETableHeaderItem *ethi,
+ GdkEvent *event)
{
GtkWidget *widget = GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas);
GtkTargetList *list;
@@ -1281,7 +1302,8 @@ typedef struct {
} EthiHeaderInfo;
static void
-ethi_popup_sort_ascending (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_sort_ascending (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
ETableCol *col;
gint model_col = -1;
@@ -1336,7 +1358,8 @@ ethi_popup_sort_ascending (GtkWidget *widget, EthiHeaderInfo *info)
}
static void
-ethi_popup_sort_descending (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_sort_descending (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
ETableCol *col;
gint model_col=-1;
@@ -1391,7 +1414,8 @@ ethi_popup_sort_descending (GtkWidget *widget, EthiHeaderInfo *info)
}
static void
-ethi_popup_unsort (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_unsort (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
ETableHeaderItem *ethi = info->ethi;
@@ -1400,7 +1424,8 @@ ethi_popup_unsort (GtkWidget *widget, EthiHeaderInfo *info)
}
static void
-ethi_popup_group_field (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_group_field (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
ETableCol *col;
gint model_col;
@@ -1417,18 +1442,21 @@ ethi_popup_group_field (GtkWidget *widget, EthiHeaderInfo *info)
}
static void
-ethi_popup_group_box (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_group_box (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
}
static void
-ethi_popup_remove_column (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_remove_column (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
e_table_header_remove (info->ethi->eth, info->col);
}
static void
-ethi_popup_field_chooser (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_field_chooser (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
GtkWidget *etfcd = info->ethi->etfcd.widget;
@@ -1453,12 +1481,14 @@ ethi_popup_field_chooser (GtkWidget *widget, EthiHeaderInfo *info)
}
static void
-ethi_popup_alignment (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_alignment (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
}
static void
-ethi_popup_best_fit (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_best_fit (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
ETableHeaderItem *ethi = info->ethi;
gint width;
@@ -1474,19 +1504,22 @@ ethi_popup_best_fit (GtkWidget *widget, EthiHeaderInfo *info)
}
static void
-ethi_popup_format_columns (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_format_columns (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
}
static void
-config_destroyed (gpointer data, GObject *where_object_was)
+config_destroyed (gpointer data,
+ GObject *where_object_was)
{
ETableHeaderItem *ethi = data;
ethi->config = NULL;
}
static void
-apply_changes (ETableConfig *config, ETableHeaderItem *ethi)
+apply_changes (ETableConfig *config,
+ ETableHeaderItem *ethi)
{
gchar *state = e_table_state_save_to_string (config->state);
@@ -1501,7 +1534,8 @@ apply_changes (ETableConfig *config, ETableHeaderItem *ethi)
}
static void
-ethi_popup_customize_view (GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_customize_view (GtkWidget *widget,
+ EthiHeaderInfo *info)
{
ETableHeaderItem *ethi = info->ethi;
ETableState *state;
@@ -1531,7 +1565,8 @@ ethi_popup_customize_view (GtkWidget *widget, EthiHeaderInfo *info)
}
static void
-free_popup_info (GtkWidget *w, EthiHeaderInfo *info)
+free_popup_info (GtkWidget *w,
+ EthiHeaderInfo *info)
{
g_free (info);
}
@@ -1580,7 +1615,8 @@ static EPopupMenu ethi_context_menu[] = {
};
static void
-sort_by_id (GtkWidget *menu_item, ETableHeaderItem *ethi)
+sort_by_id (GtkWidget *menu_item,
+ ETableHeaderItem *ethi)
{
ETableCol *ecol;
gboolean clearfirst;
@@ -1606,13 +1642,15 @@ sort_by_id (GtkWidget *menu_item, ETableHeaderItem *ethi)
}
static void
-popup_custom (GtkWidget *menu_item, EthiHeaderInfo *info)
+popup_custom (GtkWidget *menu_item,
+ EthiHeaderInfo *info)
{
ethi_popup_customize_view (menu_item, info);
}
static void
-ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
+ethi_header_context_menu (ETableHeaderItem *ethi,
+ GdkEventButton *event)
{
EthiHeaderInfo *info = g_new (EthiHeaderInfo, 1);
GtkMenu *popup;
@@ -1664,9 +1702,9 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
gtk_widget_show (menu_item);
gtk_menu_shell_prepend (GTK_MENU_SHELL (sub_menu), menu_item);
/* Headers */
- for (ncol = 0; ncol<ethi->full_header->col_count; ncol++)
+ for (ncol = 0; ncol < ethi->full_header->col_count; ncol++)
{
- gchar *text=NULL;
+ gchar *text = NULL;
if (!ethi->full_header->columns[ncol]->sortable ||
ethi->full_header->columns[ncol]->disabled)
@@ -1704,14 +1742,15 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
}
static void
-ethi_button_pressed (ETableHeaderItem *ethi, GdkEventButton *event)
+ethi_button_pressed (ETableHeaderItem *ethi,
+ GdkEventButton *event)
{
- g_signal_emit (ethi,
- ethi_signals[BUTTON_PRESSED], 0, event);
+ g_signal_emit (ethi, ethi_signals[BUTTON_PRESSED], 0, event);
}
void
-ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
+ethi_change_sort_state (ETableHeaderItem *ethi,
+ ETableCol *col)
{
gint model_col = -1;
gint length;
@@ -1793,7 +1832,8 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
* Handles the events on the ETableHeaderItem, particularly it handles resizing
*/
static gint
-ethi_event (GnomeCanvasItem *item, GdkEvent *e)
+ethi_event (GnomeCanvasItem *item,
+ GdkEvent *e)
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
GnomeCanvas *canvas = item->canvas;
diff --git a/widgets/table/e-table-header-item.h b/widgets/table/e-table-header-item.h
index 96f167b4e8..be8e10820a 100644
--- a/widgets/table/e-table-header-item.h
+++ b/widgets/table/e-table-header-item.h
@@ -84,8 +84,8 @@ struct _ETableHeaderItem {
/*
* For dragging columns
*/
- guint maybe_drag:1;
- guint dnd_ready:1;
+ guint maybe_drag : 1;
+ guint dnd_ready : 1;
gint click_x, click_y;
gint drag_col, drop_col, drag_mark;
guint drag_motion_id;
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index 659677eceb..34f93a701b 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -35,8 +35,9 @@
#include "e-table-defines.h"
#include "e-table-header-utils.h"
-static PangoLayout*
-build_header_layout (GtkWidget *widget, const gchar *str)
+static PangoLayout *
+build_header_layout (GtkWidget *widget,
+ const gchar *str)
{
PangoLayout *layout;
@@ -69,7 +70,8 @@ build_header_layout (GtkWidget *widget, const gchar *str)
* Return value: The height of the button, in pixels.
**/
gdouble
-e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget)
+e_table_header_compute_height (ETableCol *ecol,
+ GtkWidget *widget)
{
gint ythick;
gint height;
@@ -112,9 +114,14 @@ e_table_header_width_extras (GtkStyle *style)
*/
#if 0
static GdkPixmap *
-make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc,
- GdkPixbuf *pixbuf, GdkColor *bg, gint width, gint height,
- gint dither_xofs, gint dither_yofs)
+make_composite_pixmap (GdkDrawable *drawable,
+ GdkGC *gc,
+ GdkPixbuf *pixbuf,
+ GdkColor *bg,
+ gint width,
+ gint height,
+ gint dither_xofs,
+ gint dither_yofs)
{
gint pwidth, pheight;
GdkPixmap *pixmap;
@@ -240,12 +247,18 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc,
* Draws a button suitable for a table header.
**/
void
-e_table_header_draw_button (cairo_t *cr, ETableCol *ecol,
- GtkStyle *style, GtkStateType state,
- GtkWidget *widget,
- gint x, gint y, gint width, gint height,
- gint button_width, gint button_height,
- ETableColArrow arrow)
+e_table_header_draw_button (cairo_t *cr,
+ ETableCol *ecol,
+ GtkStyle *style,
+ GtkStateType state,
+ GtkWidget *widget,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ gint button_width,
+ gint button_height,
+ ETableColArrow arrow)
{
gint xthick, ythick;
gint inner_x, inner_y;
diff --git a/widgets/table/e-table-header-utils.h b/widgets/table/e-table-header-utils.h
index cfa568bcdd..c3b2de89c7 100644
--- a/widgets/table/e-table-header-utils.h
+++ b/widgets/table/e-table-header-utils.h
@@ -34,7 +34,7 @@ gdouble e_table_header_compute_height (ETableCol *ecol,
GtkWidget *widget);
gdouble e_table_header_width_extras (GtkStyle *style);
void e_table_header_draw_button (cairo_t *cr,
- ETableCol*ecol,
+ ETableCol *ecol,
GtkStyle *style,
GtkStateType state,
GtkWidget *widget,
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index 90dec061c1..aab0971518 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -63,13 +63,16 @@ struct two_ints {
};
static void
-eth_set_width (ETableHeader *eth, gint width)
+eth_set_width (ETableHeader *eth,
+ gint width)
{
eth->width = width;
}
static void
-dequeue (ETableHeader *eth, gint *column, gint *width)
+dequeue (ETableHeader *eth,
+ gint *column,
+ gint *width)
{
GSList *head;
struct two_ints *store;
@@ -110,7 +113,9 @@ dequeue_idle (ETableHeader *eth)
}
static void
-enqueue (ETableHeader *eth, gint column, gint width)
+enqueue (ETableHeader *eth,
+ gint column,
+ gint width)
{
struct two_ints *store;
store = g_new (struct two_ints, 1);
@@ -129,7 +134,9 @@ enqueue (ETableHeader *eth, gint column, gint width)
}
void
-e_table_header_set_size (ETableHeader *eth, gint idx, gint size)
+e_table_header_set_size (ETableHeader *eth,
+ gint idx,
+ gint size)
{
g_return_if_fail (eth != NULL);
g_return_if_fail (E_IS_TABLE_HEADER (eth));
@@ -138,12 +145,14 @@ e_table_header_set_size (ETableHeader *eth, gint idx, gint size)
}
static void
-eth_do_remove (ETableHeader *eth, gint idx, gboolean do_unref)
+eth_do_remove (ETableHeader *eth,
+ gint idx,
+ gboolean do_unref)
{
if (do_unref)
g_object_unref (eth->columns[idx]);
- memmove (&eth->columns[idx], &eth->columns[idx+1],
+ memmove (&eth->columns[idx], &eth->columns[idx + 1],
sizeof (ETableCol *) * (eth->col_count - idx - 1));
eth->col_count--;
}
@@ -189,17 +198,21 @@ eth_finalize (GObject *object)
}
static void
-eth_group_info_changed (ETableSortInfo *info, ETableHeader *eth)
+eth_group_info_changed (ETableSortInfo *info,
+ ETableHeader *eth)
{
enqueue (eth, -1, eth->nominal_width);
}
static void
-eth_set_property (GObject *object, guint prop_id, const GValue *val, GParamSpec *pspec)
+eth_set_property (GObject *object,
+ guint property_id,
+ const GValue *val,
+ GParamSpec *pspec)
{
ETableHeader *eth = E_TABLE_HEADER (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_WIDTH:
eth->nominal_width = g_value_get_double (val);
enqueue (eth, -1, eth->nominal_width);
@@ -219,9 +232,9 @@ eth_set_property (GObject *object, guint prop_id, const GValue *val, GParamSpec
eth->sort_info = E_TABLE_SORT_INFO (g_value_get_object (val));
if (eth->sort_info) {
g_object_ref (eth->sort_info);
- eth->sort_info_group_change_id
- = g_signal_connect(G_OBJECT(eth->sort_info), "group_info_changed",
- G_CALLBACK (eth_group_info_changed), eth);
+ eth->sort_info_group_change_id = g_signal_connect (
+ eth->sort_info, "group_info_changed",
+ G_CALLBACK (eth_group_info_changed), eth);
}
enqueue (eth, -1, eth->nominal_width);
break;
@@ -231,11 +244,14 @@ eth_set_property (GObject *object, guint prop_id, const GValue *val, GParamSpec
}
static void
-eth_get_property (GObject *object, guint prop_id, GValue *val, GParamSpec *pspec)
+eth_get_property (GObject *object,
+ guint property_id,
+ GValue *val,
+ GParamSpec *pspec)
{
ETableHeader *eth = E_TABLE_HEADER (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_SORT_INFO:
g_value_set_object (val, G_OBJECT (eth->sort_info));
break;
@@ -246,7 +262,7 @@ eth_get_property (GObject *object, guint prop_id, GValue *val, GParamSpec *pspec
g_value_set_double (val, eth->width_extras);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -363,9 +379,11 @@ eth_update_offsets (ETableHeader *eth)
}
static void
-eth_do_insert (ETableHeader *eth, gint pos, ETableCol *val)
+eth_do_insert (ETableHeader *eth,
+ gint pos,
+ ETableCol *val)
{
- memmove (&eth->columns[pos+1], &eth->columns[pos],
+ memmove (&eth->columns[pos + 1], &eth->columns[pos],
sizeof (ETableCol *) * (eth->col_count - pos));
eth->columns[pos] = val;
eth->col_count++;
@@ -386,7 +404,9 @@ eth_do_insert (ETableHeader *eth, gint pos, ETableCol *val)
* The ETableCol is assumed
*/
void
-e_table_header_add_column (ETableHeader *eth, ETableCol *tc, gint pos)
+e_table_header_add_column (ETableHeader *eth,
+ ETableCol *tc,
+ gint pos)
{
g_return_if_fail (eth != NULL);
g_return_if_fail (E_IS_TABLE_HEADER (eth));
@@ -418,7 +438,8 @@ e_table_header_add_column (ETableHeader *eth, ETableCol *tc, gint pos)
* Returns: The ETableCol at @column in the @eth object
*/
ETableCol *
-e_table_header_get_column (ETableHeader *eth, gint column)
+e_table_header_get_column (ETableHeader *eth,
+ gint column)
{
g_return_val_if_fail (eth != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), NULL);
@@ -440,7 +461,8 @@ e_table_header_get_column (ETableHeader *eth, gint column)
* Returns: The ETableCol with col_idx = @col_idx in the @eth object
*/
ETableCol *
-e_table_header_get_column_by_col_idx (ETableHeader *eth, gint col_idx)
+e_table_header_get_column_by_col_idx (ETableHeader *eth,
+ gint col_idx)
{
gint i;
g_return_val_if_fail (eth != NULL, NULL);
@@ -483,7 +505,8 @@ e_table_header_count (ETableHeader *eth)
* Returns: the column in the model that the @col column
* in the ETableHeader points to. */
gint
-e_table_header_index (ETableHeader *eth, gint col)
+e_table_header_index (ETableHeader *eth,
+ gint col)
{
g_return_val_if_fail (eth != NULL, -1);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), -1);
@@ -504,7 +527,8 @@ e_table_header_index (ETableHeader *eth, gint col)
* if no column inside this ETableHeader contains that pixel.
*/
gint
-e_table_header_get_index_at (ETableHeader *eth, gint x_offset)
+e_table_header_get_index_at (ETableHeader *eth,
+ gint x_offset)
{
gint i, total;
@@ -629,7 +653,9 @@ e_table_header_min_width (ETableHeader *eth)
* and "structure_change" will be emmited
*/
void
-e_table_header_move (ETableHeader *eth, gint source_index, gint target_index)
+e_table_header_move (ETableHeader *eth,
+ gint source_index,
+ gint target_index)
{
ETableCol *old;
@@ -663,7 +689,8 @@ e_table_header_move (ETableHeader *eth, gint source_index, gint target_index)
* This emmits the "structure_change" signal on the @eth object.
*/
void
-e_table_header_remove (ETableHeader *eth, gint idx)
+e_table_header_remove (ETableHeader *eth,
+ gint idx)
{
g_return_if_fail (eth != NULL);
g_return_if_fail (E_IS_TABLE_HEADER (eth));
@@ -679,14 +706,17 @@ e_table_header_remove (ETableHeader *eth, gint idx)
* FIXME: deprecated?
*/
void
-e_table_header_set_selection (ETableHeader *eth, gboolean allow_selection)
+e_table_header_set_selection (ETableHeader *eth,
+ gboolean allow_selection)
{
g_return_if_fail (eth != NULL);
g_return_if_fail (E_IS_TABLE_HEADER (eth));
}
static void
-eth_set_size (ETableHeader *eth, gint idx, gint size)
+eth_set_size (ETableHeader *eth,
+ gint idx,
+ gint size)
{
gdouble expansion;
gdouble old_expansion;
@@ -824,7 +854,9 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
* @eth ETableHeader object
*/
gint
-e_table_header_col_diff (ETableHeader *eth, gint start_col, gint end_col)
+e_table_header_col_diff (ETableHeader *eth,
+ gint start_col,
+ gint end_col)
{
gint total, col;
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index ac46df2cd3..25ea433a66 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -67,8 +67,8 @@ static void eti_check_cursor_bounds (ETableItem *eti);
static void eti_cancel_drag_due_to_model_change (ETableItem *eti);
/* FIXME: Do an analysis of which cell functions are needed before
- realize and make sure that all of them are doable by all the cells
- and that all of the others are only done after realization. */
+ * realize and make sure that all of them are doable by all the cells
+ * and that all of the others are only done after realization. */
enum {
CURSOR_CHANGE,
@@ -122,9 +122,9 @@ static void e_table_item_redraw_row (ETableItem *eti, gint row);
#define ETI_ROW_HEIGHT(eti,row) ((eti)->uniform_row_height ? ETI_SINGLE_ROW_HEIGHT ((eti)) : ETI_MULTIPLE_ROW_HEIGHT((eti),(row)))
/* tweak_hsv is a really tweaky function. it modifies its first argument, which
- should be the color you want tweaked. delta_h, delta_s and delta_v specify
- how much you want their respective channels modified (and in what direction).
- if it can't do the specified modification, it does it in the oppositon direction */
+ * should be the color you want tweaked. delta_h, delta_s and delta_v specify
+ * how much you want their respective channels modified (and in what direction).
+ * if it can't do the specified modification, it does it in the oppositon direction */
static void
e_hsv_tweak (GdkColor *color,
gdouble delta_h,
@@ -165,7 +165,8 @@ e_hsv_tweak (GdkColor *color,
}
inline static gint
-model_to_view_row (ETableItem *eti, gint row)
+model_to_view_row (ETableItem *eti,
+ gint row)
{
gint i;
if (row == -1)
@@ -187,7 +188,8 @@ model_to_view_row (ETableItem *eti, gint row)
}
inline static gint
-view_to_model_row (ETableItem *eti, gint row)
+view_to_model_row (ETableItem *eti,
+ gint row)
{
if (eti->uses_source_model) {
ETableSubset *etss = E_TABLE_SUBSET (eti->table_model);
@@ -201,7 +203,8 @@ view_to_model_row (ETableItem *eti, gint row)
}
inline static gint
-model_to_view_col (ETableItem *eti, gint col)
+model_to_view_col (ETableItem *eti,
+ gint col)
{
gint i;
if (col == -1)
@@ -215,14 +218,17 @@ model_to_view_col (ETableItem *eti, gint col)
}
inline static gint
-view_to_model_col (ETableItem *eti, gint col)
+view_to_model_col (ETableItem *eti,
+ gint col)
{
ETableCol *ecol = e_table_header_get_column (eti->header, col);
return ecol ? ecol->col_idx : -1;
}
static void
-grab_cancelled (ECanvas *canvas, GnomeCanvasItem *item, gpointer data)
+grab_cancelled (ECanvas *canvas,
+ GnomeCanvasItem *item,
+ gpointer data)
{
ETableItem *eti = data;
@@ -230,7 +236,8 @@ grab_cancelled (ECanvas *canvas, GnomeCanvasItem *item, gpointer data)
}
inline static void
-eti_grab (ETableItem *eti, guint32 time)
+eti_grab (ETableItem *eti,
+ guint32 time)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
d(g_print ("%s: time: %d\n", __FUNCTION__, time));
@@ -253,7 +260,8 @@ eti_grab (ETableItem *eti, guint32 time)
}
inline static void
-eti_ungrab (ETableItem *eti, guint32 time)
+eti_ungrab (ETableItem *eti,
+ guint32 time)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
d(g_print ("%s: time: %d\n", __FUNCTION__, time));
@@ -286,7 +294,11 @@ eti_editing (ETableItem *eti)
}
inline static GdkColor *
-eti_get_cell_background_color (ETableItem *eti, gint row, gint col, gboolean selected, gboolean *allocatedp)
+eti_get_cell_background_color (ETableItem *eti,
+ gint row,
+ gint col,
+ gboolean selected,
+ gboolean *allocatedp)
{
ECellView *ecell_view = eti->cell_views[col];
GtkWidget *canvas;
@@ -334,7 +346,11 @@ eti_get_cell_background_color (ETableItem *eti, gint row, gint col, gboolean sel
}
inline static GdkColor *
-eti_get_cell_foreground_color (ETableItem *eti, gint row, gint col, gboolean selected, gboolean *allocated)
+eti_get_cell_foreground_color (ETableItem *eti,
+ gint row,
+ gint col,
+ gboolean selected,
+ gboolean *allocated)
{
GtkWidget *canvas;
GdkColor *foreground;
@@ -381,7 +397,7 @@ eti_free_save_state (ETableItem *eti)
* we might want to avoid realizing each e-cell.
*/
static void
-eti_realize_cell_views ( ETableItem *eti)
+eti_realize_cell_views (ETableItem *eti)
{
GnomeCanvasItem *item;
gint i;
@@ -470,7 +486,11 @@ eti_detach_cell_views (ETableItem *eti)
}
static void
-eti_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2)
+eti_bounds (GnomeCanvasItem *item,
+ gdouble *x1,
+ gdouble *y1,
+ gdouble *x2,
+ gdouble *y2)
{
cairo_matrix_t i2c;
ETableItem *eti = E_TABLE_ITEM (item);
@@ -487,7 +507,8 @@ eti_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdoubl
}
static void
-eti_reflow (GnomeCanvasItem *item, gint flags)
+eti_reflow (GnomeCanvasItem *item,
+ gint flags)
{
ETableItem *eti = E_TABLE_ITEM (item);
@@ -518,7 +539,9 @@ eti_reflow (GnomeCanvasItem *item, gint flags)
* GnomeCanvasItem::update method
*/
static void
-eti_update (GnomeCanvasItem *item, const cairo_matrix_t *i2c, gint flags)
+eti_update (GnomeCanvasItem *item,
+ const cairo_matrix_t *i2c,
+ gint flags)
{
ETableItem *eti = E_TABLE_ITEM (item);
gdouble x1, x2, y1, y2;
@@ -652,7 +675,8 @@ eti_remove_header_model (ETableItem *eti)
* used as a separator between rows
*/
static gint
-eti_row_height_real (ETableItem *eti, gint row)
+eti_row_height_real (ETableItem *eti,
+ gint row)
{
const gint cols = e_table_header_count (eti->header);
gint col;
@@ -744,7 +768,8 @@ calculate_height_cache (ETableItem *eti)
* used as a separator between rows
*/
static gint
-eti_row_height (ETableItem *eti, gint row)
+eti_row_height (ETableItem *eti,
+ gint row)
{
if (eti->uniform_row_height) {
eti->uniform_row_height_cache = eti_row_height_real (eti, -1);
@@ -826,7 +851,11 @@ eti_get_height (ETableItem *eti)
}
static void
-eti_item_region_redraw (ETableItem *eti, gint x0, gint y0, gint x1, gint y1)
+eti_item_region_redraw (ETableItem *eti,
+ gint x0,
+ gint y0,
+ gint x1,
+ gint y1)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
gdouble dx1, dy1, dx2, dy2;
@@ -847,7 +876,9 @@ eti_item_region_redraw (ETableItem *eti, gint x0, gint y0, gint x1, gint y1)
* Computes the distance between @start_row and @end_row in pixels
*/
gint
-e_table_item_row_diff (ETableItem *eti, gint start_row, gint end_row)
+e_table_item_row_diff (ETableItem *eti,
+ gint start_row,
+ gint end_row)
{
gint height_extra = eti->horizontal_draw_grid ? 1 : 0;
@@ -870,10 +901,14 @@ e_table_item_row_diff (ETableItem *eti, gint start_row, gint end_row)
static void
eti_get_region (ETableItem *eti,
- gint start_col, gint start_row,
- gint end_col, gint end_row,
- gint *x1p, gint *y1p,
- gint *x2p, gint *y2p)
+ gint start_col,
+ gint start_row,
+ gint end_col,
+ gint end_row,
+ gint *x1p,
+ gint *y1p,
+ gint *x2p,
+ gint *y2p)
{
gint x1, y1, x2, y2;
@@ -903,8 +938,11 @@ eti_get_region (ETableItem *eti,
*/
static void
eti_request_region_redraw (ETableItem *eti,
- gint start_col, gint start_row,
- gint end_col, gint end_row, gint border)
+ gint start_col,
+ gint start_row,
+ gint end_col,
+ gint end_row,
+ gint border)
{
gint x1, y1, x2, y2;
@@ -930,8 +968,11 @@ eti_request_region_redraw (ETableItem *eti,
*/
static void
eti_request_region_show (ETableItem *eti,
- gint start_col, gint start_row,
- gint end_col, gint end_row, gint delay)
+ gint start_col,
+ gint start_row,
+ gint end_col,
+ gint end_row,
+ gint delay)
{
gint x1, y1, x2, y2;
@@ -947,7 +988,8 @@ eti_request_region_show (ETableItem *eti,
}
static void
-eti_show_cursor (ETableItem *eti, gint delay)
+eti_show_cursor (ETableItem *eti,
+ gint delay)
{
GnomeCanvasItem *item;
gint cursor_row;
@@ -1028,7 +1070,8 @@ eti_check_cursor_bounds (ETableItem *eti)
}
static void
-eti_maybe_show_cursor (ETableItem *eti, gint delay)
+eti_maybe_show_cursor (ETableItem *eti,
+ gint delay)
{
d(g_print ("%s: cursor on screen: %s\n", __FUNCTION__, eti->cursor_on_screen ? "TRUE" : "FALSE"));
if (eti->cursor_on_screen)
@@ -1101,7 +1144,8 @@ eti_unfreeze (ETableItem *eti)
* Callback routine: invoked before the ETableModel suffers a change
*/
static void
-eti_table_model_pre_change (ETableModel *table_model, ETableItem *eti)
+eti_table_model_pre_change (ETableModel *table_model,
+ ETableItem *eti)
{
eti_cancel_drag_due_to_model_change (eti);
eti_check_cursor_bounds (eti);
@@ -1116,7 +1160,8 @@ eti_table_model_pre_change (ETableModel *table_model, ETableItem *eti)
* Callback routine: invoked when the ETableModel has not suffered a change
*/
static void
-eti_table_model_no_change (ETableModel *table_model, ETableItem *eti)
+eti_table_model_no_change (ETableModel *table_model,
+ ETableItem *eti)
{
eti_unfreeze (eti);
}
@@ -1126,7 +1171,8 @@ eti_table_model_no_change (ETableModel *table_model, ETableItem *eti)
*/
static void
-eti_table_model_changed (ETableModel *table_model, ETableItem *eti)
+eti_table_model_changed (ETableModel *table_model,
+ ETableItem *eti)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
@@ -1150,7 +1196,9 @@ eti_table_model_changed (ETableModel *table_model, ETableItem *eti)
}
static void
-eti_table_model_row_changed (ETableModel *table_model, gint row, ETableItem *eti)
+eti_table_model_row_changed (ETableModel *table_model,
+ gint row,
+ ETableItem *eti)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
@@ -1170,7 +1218,10 @@ eti_table_model_row_changed (ETableModel *table_model, gint row, ETableItem *eti
}
static void
-eti_table_model_cell_changed (ETableModel *table_model, gint col, gint row, ETableItem *eti)
+eti_table_model_cell_changed (ETableModel *table_model,
+ gint col,
+ gint row,
+ ETableItem *eti)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
@@ -1190,7 +1241,10 @@ eti_table_model_cell_changed (ETableModel *table_model, gint col, gint row, ETab
}
static void
-eti_table_model_rows_inserted (ETableModel *table_model, gint row, gint count, ETableItem *eti)
+eti_table_model_rows_inserted (ETableModel *table_model,
+ gint row,
+ gint count,
+ ETableItem *eti)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
@@ -1219,7 +1273,10 @@ eti_table_model_rows_inserted (ETableModel *table_model, gint row, gint count, E
}
static void
-eti_table_model_rows_deleted (ETableModel *table_model, gint row, gint count, ETableItem *eti)
+eti_table_model_rows_deleted (ETableModel *table_model,
+ gint row,
+ gint count,
+ ETableItem *eti)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
@@ -1257,8 +1314,10 @@ eti_table_model_rows_deleted (ETableModel *table_model, gint row, gint count, ET
*/
void
e_table_item_redraw_range (ETableItem *eti,
- gint start_col, gint start_row,
- gint end_col, gint end_row)
+ gint start_col,
+ gint start_row,
+ gint end_col,
+ gint end_row)
{
gint border;
gint cursor_col, cursor_row;
@@ -1284,14 +1343,15 @@ e_table_item_redraw_range (ETableItem *eti,
static void
e_table_item_redraw_row (ETableItem *eti,
- gint row)
+ gint row)
{
if (row != -1)
e_table_item_redraw_range (eti, 0, row, eti->cols - 1, row);
}
static void
-eti_add_table_model (ETableItem *eti, ETableModel *table_model)
+eti_add_table_model (ETableItem *eti,
+ ETableModel *table_model)
{
g_return_if_fail (eti->table_model == NULL);
@@ -1344,7 +1404,8 @@ eti_add_table_model (ETableItem *eti, ETableModel *table_model)
}
static void
-eti_add_selection_model (ETableItem *eti, ESelectionModel *selection)
+eti_add_selection_model (ETableItem *eti,
+ ESelectionModel *selection)
{
g_return_if_fail (eti->selection == NULL);
@@ -1373,7 +1434,9 @@ eti_add_selection_model (ETableItem *eti, ESelectionModel *selection)
}
static void
-eti_header_dim_changed (ETableHeader *eth, gint col, ETableItem *eti)
+eti_header_dim_changed (ETableHeader *eth,
+ gint col,
+ ETableItem *eti)
{
eti->needs_compute_width = 1;
e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti));
@@ -1382,7 +1445,8 @@ eti_header_dim_changed (ETableHeader *eth, gint col, ETableItem *eti)
}
static void
-eti_header_structure_changed (ETableHeader *eth, ETableItem *eti)
+eti_header_structure_changed (ETableHeader *eth,
+ ETableItem *eti)
{
eti->cols = e_table_header_count (eti->header);
@@ -1409,7 +1473,9 @@ eti_header_structure_changed (ETableHeader *eth, ETableItem *eti)
}
static gint
-eti_request_column_width (ETableHeader *eth, gint col, ETableItem *eti)
+eti_request_column_width (ETableHeader *eth,
+ gint col,
+ ETableItem *eti)
{
gint width = 0;
@@ -1421,7 +1487,8 @@ eti_request_column_width (ETableHeader *eth, gint col, ETableItem *eti)
}
static void
-eti_add_header_model (ETableItem *eti, ETableHeader *header)
+eti_add_header_model (ETableItem *eti,
+ ETableHeader *header)
{
g_return_if_fail (eti->header == NULL);
@@ -1475,13 +1542,16 @@ eti_dispose (GObject *object)
}
static void
-eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+eti_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (object);
ETableItem *eti = E_TABLE_ITEM (object);
gint cursor_col;
- switch (prop_id) {
+ switch (property_id) {
case PROP_TABLE_HEADER:
eti_remove_header_model (eti);
eti_add_header_model (eti, E_TABLE_HEADER (g_value_get_object (value)));
@@ -1558,14 +1628,17 @@ eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe
}
static void
-eti_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+eti_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableItem *eti;
gint row;
eti = E_TABLE_ITEM (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_WIDTH:
g_value_set_double (value, eti->width);
break;
@@ -1585,7 +1658,7 @@ eti_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *psp
g_value_set_boolean (value, eti->uniform_row_height);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -1666,7 +1739,9 @@ static const gchar gray50_bits[] = {
0x02, 0x01, };
static gboolean
-eti_tree_unfreeze (GtkWidget *widget, GdkEvent *event, ETableItem *eti)
+eti_tree_unfreeze (GtkWidget *widget,
+ GdkEvent *event,
+ ETableItem *eti)
{
if (widget)
@@ -1745,8 +1820,13 @@ eti_unrealize (GnomeCanvasItem *item)
}
static void
-eti_draw_grid_line (ETableItem *eti, cairo_t *cr, GtkStyle *style,
- gint x1, gint y1, gint x2, gint y2)
+eti_draw_grid_line (ETableItem *eti,
+ cairo_t *cr,
+ GtkStyle *style,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2)
{
cairo_save (cr);
@@ -1761,7 +1841,12 @@ eti_draw_grid_line (ETableItem *eti, cairo_t *cr, GtkStyle *style,
}
static void
-eti_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, gint y, gint width, gint height)
+eti_draw (GnomeCanvasItem *item,
+ cairo_t *cr,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
ETableItem *eti = E_TABLE_ITEM (item);
const gint rows = eti->rows;
@@ -1915,26 +2000,26 @@ eti_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, gint y, gint width, gint h
}
x1 = xd;
- y1 = yd+1;
+ y1 = yd + 1;
x2 = x1 + ecol->width;
- y2 = yd+height;
+ y2 = yd + height;
background = eti_get_cell_background_color (eti, row, col, col_selected, &free_background);
cairo_save (cr);
pat = cairo_pattern_create_linear (0, y1, 0, y2);
- cairo_pattern_add_color_stop_rgba (pat, 0.0, background->red/65535.0 ,
- background->green/65535.0,
- background->blue/65535.0, selected ? 0.8: 1.0);
+ cairo_pattern_add_color_stop_rgba (pat, 0.0, background->red / 65535.0 ,
+ background->green / 65535.0,
+ background->blue / 65535.0, selected ? 0.8: 1.0);
if (selected)
- cairo_pattern_add_color_stop_rgba (pat, 0.5, background->red/65535.0 ,
- background->green/65535.0,
- background->blue/65535.0, 0.9);
-
- cairo_pattern_add_color_stop_rgba (pat, 1, background->red/65535.0 ,
- background->green/65535.0,
- background->blue/65535.0, selected ? 0.8 : 1.0);
- cairo_rectangle (cr, x1, y1, ecol->width, height-1);
+ cairo_pattern_add_color_stop_rgba (pat, 0.5, background->red / 65535.0 ,
+ background->green / 65535.0,
+ background->blue / 65535.0, 0.9);
+
+ cairo_pattern_add_color_stop_rgba (pat, 1, background->red / 65535.0 ,
+ background->green / 65535.0,
+ background->blue / 65535.0, selected ? 0.8 : 1.0);
+ cairo_rectangle (cr, x1, y1, ecol->width, height - 1);
cairo_set_source (cr, pat);
cairo_fill_preserve (cr);
cairo_pattern_destroy (pat);
@@ -1944,17 +2029,17 @@ eti_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, gint y, gint width, gint h
cairo_save (cr);
cairo_set_line_width (cr, 1.0);
- cairo_set_source_rgba (cr, background->red/65535.0 ,
- background->green/65535.0,
- background->blue/65535.0, 1);
+ cairo_set_source_rgba (cr, background->red / 65535.0 ,
+ background->green / 65535.0,
+ background->blue / 65535.0, 1);
cairo_move_to (cr, x1, y1);
cairo_line_to (cr, x2, y1);
cairo_stroke (cr);
cairo_set_line_width (cr, 1.0);
- cairo_set_source_rgba (cr, background->red/65535.0 ,
- background->green/65535.0,
- background->blue/65535.0, 1);
+ cairo_set_source_rgba (cr, background->red / 65535.0 ,
+ background->green / 65535.0,
+ background->blue / 65535.0, 1);
cairo_move_to (cr, x1, y2);
cairo_line_to (cr, x2, y2);
cairo_stroke (cr);
@@ -1991,7 +2076,7 @@ eti_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, gint y, gint width, gint h
if (view_to_model_row (eti, row) == cursor_row) {
f_x1 = floor (eti_base_x) - x;
f_x2 = floor (lower_right_x) - x;
- f_y1 = yd+1;
+ f_y1 = yd + 1;
f_y2 = yd + height;
f_found = TRUE;
}
@@ -2055,13 +2140,23 @@ eti_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, gint y, gint width, gint h
}
static GnomeCanvasItem *
-eti_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy)
+eti_point (GnomeCanvasItem *item,
+ gdouble x,
+ gdouble y,
+ gint cx,
+ gint cy)
{
return item;
}
static gboolean
-find_cell (ETableItem *eti, gdouble x, gdouble y, gint *view_col_res, gint *view_row_res, gdouble *x1_res, gdouble *y1_res)
+find_cell (ETableItem *eti,
+ gdouble x,
+ gdouble y,
+ gint *view_col_res,
+ gint *view_row_res,
+ gdouble *x1_res,
+ gdouble *y1_res)
{
const gint cols = eti->cols;
const gint rows = eti->rows;
@@ -2127,7 +2222,9 @@ find_cell (ETableItem *eti, gdouble x, gdouble y, gint *view_col_res, gint *view
}
static void
-eti_cursor_move (ETableItem *eti, gint row, gint column)
+eti_cursor_move (ETableItem *eti,
+ gint row,
+ gint column)
{
e_table_item_leave_edit_(eti);
e_table_item_focus (eti, view_to_model_col (eti, column), view_to_model_row (eti, row), 0);
@@ -2158,7 +2255,14 @@ eti_cursor_move_right (ETableItem *eti)
}
static gint
-eti_e_cell_event (ETableItem *item, ECellView *ecell_view, GdkEvent *event, gint time, gint model_col, gint view_col, gint row, ECellFlags flags)
+eti_e_cell_event (ETableItem *item,
+ ECellView *ecell_view,
+ GdkEvent *event,
+ gint time,
+ gint model_col,
+ gint view_col,
+ gint row,
+ ECellFlags flags)
{
ECellActions actions = 0;
gint ret_val;
@@ -2184,7 +2288,8 @@ eti_e_cell_event (ETableItem *item, ECellView *ecell_view, GdkEvent *event,
/* FIXME: cursor */
static gint
-eti_event (GnomeCanvasItem *item, GdkEvent *e)
+eti_event (GnomeCanvasItem *item,
+ GdkEvent *e)
{
ETableItem *eti = E_TABLE_ITEM (item);
ECellView *ecell_view;
@@ -2786,7 +2891,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
}
static void
-eti_style_set (ETableItem *eti, GtkStyle *previous_style)
+eti_style_set (ETableItem *eti,
+ GtkStyle *previous_style)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
@@ -3057,13 +3163,18 @@ eti_class_init (ETableItemClass *class)
* This routine sets the cursor of the %ETableItem canvas item.
*/
void
-e_table_item_set_cursor (ETableItem *eti, gint col, gint row)
+e_table_item_set_cursor (ETableItem *eti,
+ gint col,
+ gint row)
{
e_table_item_focus (eti, col, view_to_model_row (eti, row), 0);
}
static void
-e_table_item_focus (ETableItem *eti, gint col, gint row, GdkModifierType state)
+e_table_item_focus (ETableItem *eti,
+ gint col,
+ gint row,
+ GdkModifierType state)
{
g_return_if_fail (eti != NULL);
g_return_if_fail (E_IS_TABLE_ITEM (eti));
@@ -3107,7 +3218,10 @@ e_table_item_get_focused_column (ETableItem *eti)
}
static void
-eti_cursor_change (ESelectionModel *selection, gint row, gint col, ETableItem *eti)
+eti_cursor_change (ESelectionModel *selection,
+ gint row,
+ gint col,
+ ETableItem *eti)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
gint view_row;
@@ -3146,7 +3260,10 @@ eti_cursor_change (ESelectionModel *selection, gint row, gint col, ETableItem *e
}
static void
-eti_cursor_activated (ESelectionModel *selection, gint row, gint col, ETableItem *eti)
+eti_cursor_activated (ESelectionModel *selection,
+ gint row,
+ gint col,
+ ETableItem *eti)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
gint view_row;
@@ -3178,7 +3295,8 @@ eti_cursor_activated (ESelectionModel *selection, gint row, gint col, ETableItem
}
static void
-eti_selection_change (ESelectionModel *selection, ETableItem *eti)
+eti_selection_change (ESelectionModel *selection,
+ ETableItem *eti)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
@@ -3190,7 +3308,9 @@ eti_selection_change (ESelectionModel *selection, ETableItem *eti)
}
static void
-eti_selection_row_change (ESelectionModel *selection, gint row, ETableItem *eti)
+eti_selection_row_change (ESelectionModel *selection,
+ gint row,
+ ETableItem *eti)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
@@ -3212,7 +3332,9 @@ eti_selection_row_change (ESelectionModel *selection, gint row, ETableItem *eti)
* column and row.
*/
void
-e_table_item_enter_edit (ETableItem *eti, gint col, gint row)
+e_table_item_enter_edit (ETableItem *eti,
+ gint col,
+ gint row)
{
g_return_if_fail (eti != NULL);
g_return_if_fail (E_IS_TABLE_ITEM (eti));
@@ -3276,14 +3398,14 @@ e_table_item_leave_edit (ETableItem *eti)
* is removed from the value y points to.
*/
void
-e_table_item_compute_location (ETableItem *eti,
- gint *x,
- gint *y,
- gint *row,
- gint *col)
+e_table_item_compute_location (ETableItem *eti,
+ gint *x,
+ gint *y,
+ gint *row,
+ gint *col)
{
/* Save the grabbed row but make sure that we don't get flawed
- results because the cursor is grabbed. */
+ * results because the cursor is grabbed. */
gint grabbed_row = eti->grabbed_row;
eti->grabbed_row = -1;
@@ -3300,15 +3422,15 @@ e_table_item_compute_location (ETableItem *eti,
* the position inside the item too.
**/
void
-e_table_item_compute_mouse_over (ETableItem *eti,
- gint x,
- gint y,
- gint *row,
- gint *col)
+e_table_item_compute_mouse_over (ETableItem *eti,
+ gint x,
+ gint y,
+ gint *row,
+ gint *col)
{
gdouble realx, realy;
/* Save the grabbed row but make sure that we don't get flawed
- results because the cursor is grabbed. */
+ * results because the cursor is grabbed. */
gint grabbed_row = eti->grabbed_row;
eti->grabbed_row = -1;
@@ -3326,13 +3448,13 @@ e_table_item_compute_mouse_over (ETableItem *eti,
}
void
-e_table_item_get_cell_geometry (ETableItem *eti,
- gint *row,
- gint *col,
- gint *x,
- gint *y,
- gint *width,
- gint *height)
+e_table_item_get_cell_geometry (ETableItem *eti,
+ gint *row,
+ gint *col,
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height)
{
if (eti->rows > *row) {
if (x)
@@ -3356,7 +3478,8 @@ typedef struct {
} ETableItemPrintContext;
static gdouble *
-e_table_item_calculate_print_widths (ETableHeader *eth, gdouble width)
+e_table_item_calculate_print_widths (ETableHeader *eth,
+ gdouble width)
{
gint i;
gdouble extra;
@@ -3375,14 +3498,17 @@ e_table_item_calculate_print_widths (ETableHeader *eth, gdouble width)
widths[i] = eth->columns[i]->min_width * scale;
}
for (i = 0; i <= last_resizable; i++) {
- widths[i] += extra * (eth->columns[i]->resizable ? eth->columns[i]->expansion : 0)/expansion;
+ widths[i] += extra * (eth->columns[i]->resizable ? eth->columns[i]->expansion : 0) / expansion;
}
return widths;
}
static gdouble
-eti_printed_row_height (ETableItem *eti, gdouble *widths, GtkPrintContext *context, gint row)
+eti_printed_row_height (ETableItem *eti,
+ gdouble *widths,
+ GtkPrintContext *context,
+ gint row)
{
gint col;
gint cols = eti->cols;
@@ -3400,7 +3526,11 @@ eti_printed_row_height (ETableItem *eti, gdouble *widths, GtkPrintContext *conte
#define CHECK(x) if((x) == -1) return -1;
static gint
-gp_draw_rect (GtkPrintContext *context, gdouble x, gdouble y, gdouble width, gdouble height)
+gp_draw_rect (GtkPrintContext *context,
+ gdouble x,
+ gdouble y,
+ gdouble width,
+ gdouble height)
{
cairo_t *cr;
cr = gtk_print_context_get_cairo_context (context);
@@ -3413,12 +3543,12 @@ gp_draw_rect (GtkPrintContext *context, gdouble x, gdouble y, gdouble width, gdo
}
static void
-e_table_item_print_page (EPrintable *ep,
- GtkPrintContext *context,
- gdouble width,
- gdouble height,
- gboolean quantize,
- ETableItemPrintContext *itemcontext)
+e_table_item_print_page (EPrintable *ep,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble height,
+ gboolean quantize,
+ ETableItemPrintContext *itemcontext)
{
ETableItem *eti = itemcontext->item;
const gint rows = eti->rows;
@@ -3503,8 +3633,8 @@ e_table_item_print_page (EPrintable *ep,
}
static gboolean
-e_table_item_data_left (EPrintable *ep,
- ETableItemPrintContext *itemcontext)
+e_table_item_data_left (EPrintable *ep,
+ ETableItemPrintContext *itemcontext)
{
ETableItem *item = itemcontext->item;
gint rows_printed = itemcontext->rows_printed;
@@ -3514,19 +3644,19 @@ e_table_item_data_left (EPrintable *ep,
}
static void
-e_table_item_reset (EPrintable *ep,
- ETableItemPrintContext *itemcontext)
+e_table_item_reset (EPrintable *ep,
+ ETableItemPrintContext *itemcontext)
{
itemcontext->rows_printed = 0;
}
static gdouble
-e_table_item_height (EPrintable *ep,
- GtkPrintContext *context,
- gdouble width,
- gdouble max_height,
- gboolean quantize,
- ETableItemPrintContext *itemcontext)
+e_table_item_height (EPrintable *ep,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble max_height,
+ gboolean quantize,
+ ETableItemPrintContext *itemcontext)
{
ETableItem *item = itemcontext->item;
const gint rows = item->rows;
@@ -3571,12 +3701,12 @@ e_table_item_height (EPrintable *ep,
}
static gboolean
-e_table_item_will_fit (EPrintable *ep,
- GtkPrintContext *context,
- gdouble width,
- gdouble max_height,
- gboolean quantize,
- ETableItemPrintContext *itemcontext)
+e_table_item_will_fit (EPrintable *ep,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble max_height,
+ gboolean quantize,
+ ETableItemPrintContext *itemcontext)
{
ETableItem *item = itemcontext->item;
const gint rows = item->rows;
@@ -3622,7 +3752,7 @@ e_table_item_will_fit (EPrintable *ep,
static void
e_table_item_printable_destroy (gpointer data,
- GObject *where_object_was)
+ GObject *where_object_was)
{
ETableItemPrintContext *itemcontext = data;
diff --git a/widgets/table/e-table-item.h b/widgets/table/e-table-item.h
index d2fd2c56d6..26a181dd64 100644
--- a/widgets/table/e-table-item.h
+++ b/widgets/table/e-table-item.h
@@ -94,12 +94,12 @@ struct _ETableItem {
/* View row, -1 means unknown */
gint old_cursor_row;
- guint alternating_row_colors:1;
- guint horizontal_draw_grid:1;
- guint vertical_draw_grid:1;
- guint draw_focus:1;
- guint uniform_row_height:1;
- guint cell_views_realized:1;
+ guint alternating_row_colors : 1;
+ guint horizontal_draw_grid : 1;
+ guint vertical_draw_grid : 1;
+ guint draw_focus : 1;
+ guint uniform_row_height : 1;
+ guint cell_views_realized : 1;
guint needs_redraw : 1;
guint needs_compute_height : 1;
diff --git a/widgets/table/e-table-memory-callbacks.c b/widgets/table/e-table-memory-callbacks.c
index bc85c7d39a..279d0a505e 100644
--- a/widgets/table/e-table-memory-callbacks.c
+++ b/widgets/table/e-table-memory-callbacks.c
@@ -43,7 +43,9 @@ etmc_column_count (ETableModel *etm)
}
static gpointer
-etmc_value_at (ETableModel *etm, gint col, gint row)
+etmc_value_at (ETableModel *etm,
+ gint col,
+ gint row)
{
ETableMemoryCallbacks *etmc = E_TABLE_MEMORY_CALLBACKS (etm);
@@ -54,7 +56,10 @@ etmc_value_at (ETableModel *etm, gint col, gint row)
}
static void
-etmc_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
+etmc_set_value_at (ETableModel *etm,
+ gint col,
+ gint row,
+ gconstpointer val)
{
ETableMemoryCallbacks *etmc = E_TABLE_MEMORY_CALLBACKS (etm);
@@ -63,7 +68,9 @@ etmc_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
}
static gboolean
-etmc_is_cell_editable (ETableModel *etm, gint col, gint row)
+etmc_is_cell_editable (ETableModel *etm,
+ gint col,
+ gint row)
{
ETableMemoryCallbacks *etmc = E_TABLE_MEMORY_CALLBACKS (etm);
@@ -75,7 +82,9 @@ etmc_is_cell_editable (ETableModel *etm, gint col, gint row)
/* The default for etmc_duplicate_value is to return the raw value. */
static gpointer
-etmc_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
+etmc_duplicate_value (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableMemoryCallbacks *etmc = E_TABLE_MEMORY_CALLBACKS (etm);
@@ -86,7 +95,9 @@ etmc_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
}
static void
-etmc_free_value (ETableModel *etm, gint col, gpointer value)
+etmc_free_value (ETableModel *etm,
+ gint col,
+ gpointer value)
{
ETableMemoryCallbacks *etmc = E_TABLE_MEMORY_CALLBACKS (etm);
@@ -95,7 +106,8 @@ etmc_free_value (ETableModel *etm, gint col, gpointer value)
}
static gpointer
-etmc_initialize_value (ETableModel *etm, gint col)
+etmc_initialize_value (ETableModel *etm,
+ gint col)
{
ETableMemoryCallbacks *etmc = E_TABLE_MEMORY_CALLBACKS (etm);
@@ -106,7 +118,9 @@ etmc_initialize_value (ETableModel *etm, gint col)
}
static gboolean
-etmc_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
+etmc_value_is_empty (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableMemoryCallbacks *etmc = E_TABLE_MEMORY_CALLBACKS (etm);
@@ -117,7 +131,9 @@ etmc_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
}
static gchar *
-etmc_value_to_string (ETableModel *etm, gint col, gconstpointer value)
+etmc_value_to_string (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableMemoryCallbacks *etmc = E_TABLE_MEMORY_CALLBACKS (etm);
@@ -128,7 +144,9 @@ etmc_value_to_string (ETableModel *etm, gint col, gconstpointer value)
}
static void
-etmc_append_row (ETableModel *etm, ETableModel *source, gint row)
+etmc_append_row (ETableModel *etm,
+ ETableModel *source,
+ gint row)
{
ETableMemoryCallbacks *etmc = E_TABLE_MEMORY_CALLBACKS (etm);
@@ -189,15 +207,15 @@ e_table_memory_callbacks_init (ETableMemoryCallbacks *etmc)
*/
ETableModel *
e_table_memory_callbacks_new (ETableMemoryCallbacksColumnCountFn col_count,
- ETableMemoryCallbacksValueAtFn value_at,
- ETableMemoryCallbacksSetValueAtFn set_value_at,
- ETableMemoryCallbacksIsCellEditableFn is_cell_editable,
- ETableMemoryCallbacksDuplicateValueFn duplicate_value,
- ETableMemoryCallbacksFreeValueFn free_value,
- ETableMemoryCallbacksInitializeValueFn initialize_value,
- ETableMemoryCallbacksValueIsEmptyFn value_is_empty,
- ETableMemoryCallbacksValueToStringFn value_to_string,
- gpointer data)
+ ETableMemoryCallbacksValueAtFn value_at,
+ ETableMemoryCallbacksSetValueAtFn set_value_at,
+ ETableMemoryCallbacksIsCellEditableFn is_cell_editable,
+ ETableMemoryCallbacksDuplicateValueFn duplicate_value,
+ ETableMemoryCallbacksFreeValueFn free_value,
+ ETableMemoryCallbacksInitializeValueFn initialize_value,
+ ETableMemoryCallbacksValueIsEmptyFn value_is_empty,
+ ETableMemoryCallbacksValueToStringFn value_to_string,
+ gpointer data)
{
ETableMemoryCallbacks *et;
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c
index dc77e13410..55f96f5862 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -41,7 +41,9 @@ struct _ETableMemoryStorePrivate {
G_DEFINE_TYPE (ETableMemoryStore, e_table_memory_store, E_TYPE_TABLE_MEMORY)
static gpointer
-duplicate_value (ETableMemoryStore *etms, gint col, gconstpointer val)
+duplicate_value (ETableMemoryStore *etms,
+ gint col,
+ gconstpointer val)
{
switch (etms->priv->columns[col].type) {
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING:
@@ -65,7 +67,9 @@ duplicate_value (ETableMemoryStore *etms, gint col, gconstpointer val)
}
static void
-free_value (ETableMemoryStore *etms, gint col, gpointer value)
+free_value (ETableMemoryStore *etms,
+ gint col,
+ gpointer value)
{
switch (etms->priv->columns[col].type) {
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING:
@@ -97,7 +101,9 @@ etms_column_count (ETableModel *etm)
}
static gpointer
-etms_value_at (ETableModel *etm, gint col, gint row)
+etms_value_at (ETableModel *etm,
+ gint col,
+ gint row)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE (etm);
@@ -105,7 +111,10 @@ etms_value_at (ETableModel *etm, gint col, gint row)
}
static void
-etms_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
+etms_set_value_at (ETableModel *etm,
+ gint col,
+ gint row,
+ gconstpointer val)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE (etm);
@@ -117,7 +126,9 @@ etms_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
}
static gboolean
-etms_is_cell_editable (ETableModel *etm, gint col, gint row)
+etms_is_cell_editable (ETableModel *etm,
+ gint col,
+ gint row)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE (etm);
@@ -126,7 +137,9 @@ etms_is_cell_editable (ETableModel *etm, gint col, gint row)
/* The default for etms_duplicate_value is to return the raw value. */
static gpointer
-etms_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
+etms_duplicate_value (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE (etm);
@@ -134,7 +147,9 @@ etms_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
}
static void
-etms_free_value (ETableModel *etm, gint col, gpointer value)
+etms_free_value (ETableModel *etm,
+ gint col,
+ gpointer value)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE (etm);
@@ -142,7 +157,8 @@ etms_free_value (ETableModel *etm, gint col, gpointer value)
}
static gpointer
-etms_initialize_value (ETableModel *etm, gint col)
+etms_initialize_value (ETableModel *etm,
+ gint col)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE (etm);
@@ -163,7 +179,9 @@ etms_initialize_value (ETableModel *etm, gint col)
}
static gboolean
-etms_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
+etms_value_is_empty (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE (etm);
@@ -184,7 +202,9 @@ etms_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
}
static gchar *
-etms_value_to_string (ETableModel *etm, gint col, gconstpointer value)
+etms_value_to_string (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE (etm);
@@ -205,7 +225,9 @@ etms_value_to_string (ETableModel *etm, gint col, gconstpointer value)
}
static void
-etms_append_row (ETableModel *etm, ETableModel *source, gint row)
+etms_append_row (ETableModel *etm,
+ ETableModel *source,
+ gint row)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE (etm);
gpointer *new_data;
@@ -310,7 +332,8 @@ e_table_memory_store_new (ETableMemoryStoreColumnInfo *columns)
}
ETableModel *
-e_table_memory_store_construct (ETableMemoryStore *etms, ETableMemoryStoreColumnInfo *columns)
+e_table_memory_store_construct (ETableMemoryStore *etms,
+ ETableMemoryStoreColumnInfo *columns)
{
gint i;
for (i = 0; columns[i].type != E_TABLE_MEMORY_STORE_COLUMN_TYPE_TERMINATOR; i++)
@@ -325,7 +348,10 @@ e_table_memory_store_construct (ETableMemoryStore *etms, ETableMemoryStoreColumn
}
void
-e_table_memory_store_adopt_value_at (ETableMemoryStore *etms, gint col, gint row, gpointer value)
+e_table_memory_store_adopt_value_at (ETableMemoryStore *etms,
+ gint col,
+ gint row,
+ gpointer value)
{
e_table_model_pre_change (E_TABLE_MODEL (etms));
@@ -336,7 +362,10 @@ e_table_memory_store_adopt_value_at (ETableMemoryStore *etms, gint col, gint row
/* The size of these arrays is the number of columns. */
void
-e_table_memory_store_insert_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data)
+e_table_memory_store_insert_array (ETableMemoryStore *etms,
+ gint row,
+ gpointer *store,
+ gpointer data)
{
gint row_count;
gint i;
@@ -357,7 +386,10 @@ e_table_memory_store_insert_array (ETableMemoryStore *etms, gint row, gpointer *
}
void
-e_table_memory_store_insert (ETableMemoryStore *etms, gint row, gpointer data, ...)
+e_table_memory_store_insert (ETableMemoryStore *etms,
+ gint row,
+ gpointer data,
+ ...)
{
gpointer *store;
va_list args;
@@ -377,7 +409,10 @@ e_table_memory_store_insert (ETableMemoryStore *etms, gint row, gpointer data, .
}
void
-e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data)
+e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms,
+ gint row,
+ gpointer *store,
+ gpointer data)
{
gint row_count;
gint i;
@@ -398,7 +433,10 @@ e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms, gint row, gpoi
}
void
-e_table_memory_store_insert_adopt (ETableMemoryStore *etms, gint row, gpointer data, ...)
+e_table_memory_store_insert_adopt (ETableMemoryStore *etms,
+ gint row,
+ gpointer data,
+ ...)
{
gpointer *store;
va_list args;
@@ -429,7 +467,10 @@ e_table_memory_store_insert_adopt (ETableMemoryStore *etms, gint row, gpointer d
*
*/
void
-e_table_memory_store_change_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data)
+e_table_memory_store_change_array (ETableMemoryStore *etms,
+ gint row,
+ gpointer *store,
+ gpointer data)
{
gint i;
@@ -456,7 +497,10 @@ e_table_memory_store_change_array (ETableMemoryStore *etms, gint row, gpointer *
* pass in etms->col_count args.
*/
void
-e_table_memory_store_change (ETableMemoryStore *etms, gint row, gpointer data, ...)
+e_table_memory_store_change (ETableMemoryStore *etms,
+ gint row,
+ gpointer data,
+ ...)
{
gpointer *store;
va_list args;
@@ -490,7 +534,10 @@ e_table_memory_store_change (ETableMemoryStore *etms, gint row, gpointer data, .
* duplicate the data.
*/
void
-e_table_memory_store_change_adopt_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data)
+e_table_memory_store_change_adopt_array (ETableMemoryStore *etms,
+ gint row,
+ gpointer *store,
+ gpointer data)
{
gint i;
@@ -515,7 +562,10 @@ e_table_memory_store_change_adopt_array (ETableMemoryStore *etms, gint row, gpoi
* must pass in etms->col_count args.
*/
void
-e_table_memory_store_change_adopt (ETableMemoryStore *etms, gint row, gpointer data, ...)
+e_table_memory_store_change_adopt (ETableMemoryStore *etms,
+ gint row,
+ gpointer data,
+ ...)
{
gpointer *store;
va_list args;
@@ -537,7 +587,8 @@ e_table_memory_store_change_adopt (ETableMemoryStore *etms, gint row, gpointer d
}
void
-e_table_memory_store_remove (ETableMemoryStore *etms, gint row)
+e_table_memory_store_remove (ETableMemoryStore *etms,
+ gint row)
{
ETableModel *model;
gint column_count, row_count;
diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c
index cc62a6d0b5..28f10264f8 100644
--- a/widgets/table/e-table-memory.c
+++ b/widgets/table/e-table-memory.c
@@ -113,7 +113,8 @@ e_table_memory_new (void)
* Return value:
**/
gpointer
-e_table_memory_get_data (ETableMemory *etmm, gint row)
+e_table_memory_get_data (ETableMemory *etmm,
+ gint row)
{
g_return_val_if_fail (row >= 0, NULL);
g_return_val_if_fail (row < etmm->priv->num_rows, NULL);
@@ -130,7 +131,9 @@ e_table_memory_get_data (ETableMemory *etmm, gint row)
*
**/
void
-e_table_memory_set_data (ETableMemory *etmm, gint row, gpointer data)
+e_table_memory_set_data (ETableMemory *etmm,
+ gint row,
+ gpointer data)
{
g_return_if_fail (row >= 0);
g_return_if_fail (row < etmm->priv->num_rows);
@@ -151,8 +154,8 @@ e_table_memory_set_data (ETableMemory *etmm, gint row, gpointer data)
**/
void
e_table_memory_insert (ETableMemory *etmm,
- gint row,
- gpointer data)
+ gint row,
+ gpointer data)
{
g_return_if_fail (row >= -1);
g_return_if_fail (row <= etmm->priv->num_rows);
@@ -185,7 +188,8 @@ e_table_memory_insert (ETableMemory *etmm,
* Return value:
**/
gpointer
-e_table_memory_remove (ETableMemory *etmm, gint row)
+e_table_memory_remove (ETableMemory *etmm,
+ gint row)
{
gpointer ret;
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c
index 77b462ec2a..6f44379858 100644
--- a/widgets/table/e-table-model.c
+++ b/widgets/table/e-table-model.c
@@ -90,7 +90,9 @@ e_table_model_row_count (ETableModel *e_table_model)
*
*/
void
-e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, gint row)
+e_table_model_append_row (ETableModel *e_table_model,
+ ETableModel *source,
+ gint row)
{
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
@@ -119,7 +121,9 @@ e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, gint
* rows_inserted and no_change don't affect any data in this way.
**/
gpointer
-e_table_model_value_at (ETableModel *e_table_model, gint col, gint row)
+e_table_model_value_at (ETableModel *e_table_model,
+ gint col,
+ gint row)
{
g_return_val_if_fail (e_table_model != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL);
@@ -143,7 +147,10 @@ e_table_model_value_at (ETableModel *e_table_model, gint col, gint row)
* be a pointer to a set of data, or a datum that fits inside a gpointer .
*/
void
-e_table_model_set_value_at (ETableModel *e_table_model, gint col, gint row, gconstpointer value)
+e_table_model_set_value_at (ETableModel *e_table_model,
+ gint col,
+ gint row,
+ gconstpointer value)
{
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
@@ -161,7 +168,9 @@ e_table_model_set_value_at (ETableModel *e_table_model, gint col, gint row, gcon
* edited, %FALSE otherwise
*/
gboolean
-e_table_model_is_cell_editable (ETableModel *e_table_model, gint col, gint row)
+e_table_model_is_cell_editable (ETableModel *e_table_model,
+ gint col,
+ gint row)
{
g_return_val_if_fail (e_table_model != NULL, FALSE);
g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), FALSE);
@@ -170,7 +179,9 @@ e_table_model_is_cell_editable (ETableModel *e_table_model, gint col, gint row)
}
gpointer
-e_table_model_duplicate_value (ETableModel *e_table_model, gint col, gconstpointer value)
+e_table_model_duplicate_value (ETableModel *e_table_model,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (e_table_model != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL);
@@ -182,7 +193,9 @@ e_table_model_duplicate_value (ETableModel *e_table_model, gint col, gconstpoint
}
void
-e_table_model_free_value (ETableModel *e_table_model, gint col, gpointer value)
+e_table_model_free_value (ETableModel *e_table_model,
+ gint col,
+ gpointer value)
{
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
@@ -204,7 +217,8 @@ e_table_model_has_save_id (ETableModel *e_table_model)
}
gchar *
-e_table_model_get_save_id (ETableModel *e_table_model, gint row)
+e_table_model_get_save_id (ETableModel *e_table_model,
+ gint row)
{
g_return_val_if_fail (e_table_model != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL);
@@ -228,7 +242,8 @@ e_table_model_has_change_pending (ETableModel *e_table_model)
}
gpointer
-e_table_model_initialize_value (ETableModel *e_table_model, gint col)
+e_table_model_initialize_value (ETableModel *e_table_model,
+ gint col)
{
g_return_val_if_fail (e_table_model != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL);
@@ -240,7 +255,9 @@ e_table_model_initialize_value (ETableModel *e_table_model, gint col)
}
gboolean
-e_table_model_value_is_empty (ETableModel *e_table_model, gint col, gconstpointer value)
+e_table_model_value_is_empty (ETableModel *e_table_model,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (e_table_model != NULL, FALSE);
g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), FALSE);
@@ -252,7 +269,9 @@ e_table_model_value_is_empty (ETableModel *e_table_model, gint col, gconstpointe
}
gchar *
-e_table_model_value_to_string (ETableModel *e_table_model, gint col, gconstpointer value)
+e_table_model_value_to_string (ETableModel *e_table_model,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (e_table_model != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL);
@@ -462,7 +481,8 @@ e_table_model_changed (ETableModel *e_table_model)
* object
*/
void
-e_table_model_row_changed (ETableModel *e_table_model, gint row)
+e_table_model_row_changed (ETableModel *e_table_model,
+ gint row)
{
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
@@ -490,7 +510,9 @@ e_table_model_row_changed (ETableModel *e_table_model, gint row)
* object
*/
void
-e_table_model_cell_changed (ETableModel *e_table_model, gint col, gint row)
+e_table_model_cell_changed (ETableModel *e_table_model,
+ gint col,
+ gint row)
{
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
@@ -518,7 +540,9 @@ e_table_model_cell_changed (ETableModel *e_table_model, gint col, gint row)
* @e_table_model object
*/
void
-e_table_model_rows_inserted (ETableModel *e_table_model, gint row, gint count)
+e_table_model_rows_inserted (ETableModel *e_table_model,
+ gint row,
+ gint count)
{
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
@@ -544,7 +568,8 @@ e_table_model_rows_inserted (ETableModel *e_table_model, gint row, gint count)
* the "model_rows_inserted" signal on the @e_table_model object
*/
void
-e_table_model_row_inserted (ETableModel *e_table_model, gint row)
+e_table_model_row_inserted (ETableModel *e_table_model,
+ gint row)
{
e_table_model_rows_inserted (e_table_model, row, 1);
}
@@ -561,7 +586,9 @@ e_table_model_row_inserted (ETableModel *e_table_model, gint row)
* @e_table_model object
*/
void
-e_table_model_rows_deleted (ETableModel *e_table_model, gint row, gint count)
+e_table_model_rows_deleted (ETableModel *e_table_model,
+ gint row,
+ gint count)
{
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
@@ -587,7 +614,8 @@ e_table_model_rows_deleted (ETableModel *e_table_model, gint row, gint count)
* the "model_rows_deleted" signal on the @e_table_model object
*/
void
-e_table_model_row_deleted (ETableModel *e_table_model, gint row)
+e_table_model_row_deleted (ETableModel *e_table_model,
+ gint row)
{
e_table_model_rows_deleted (e_table_model, row, 1);
}
diff --git a/widgets/table/e-table-one.c b/widgets/table/e-table-one.c
index 7683b935a4..ff38d94131 100644
--- a/widgets/table/e-table-one.c
+++ b/widgets/table/e-table-one.c
@@ -49,7 +49,9 @@ one_row_count (ETableModel *etm)
}
static gpointer
-one_value_at (ETableModel *etm, gint col, gint row)
+one_value_at (ETableModel *etm,
+ gint col,
+ gint row)
{
ETableOne *one = E_TABLE_ONE (etm);
@@ -60,7 +62,10 @@ one_value_at (ETableModel *etm, gint col, gint row)
}
static void
-one_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
+one_set_value_at (ETableModel *etm,
+ gint col,
+ gint row,
+ gconstpointer val)
{
ETableOne *one = E_TABLE_ONE (etm);
@@ -71,7 +76,9 @@ one_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
}
static gboolean
-one_is_cell_editable (ETableModel *etm, gint col, gint row)
+one_is_cell_editable (ETableModel *etm,
+ gint col,
+ gint row)
{
ETableOne *one = E_TABLE_ONE (etm);
@@ -83,7 +90,9 @@ one_is_cell_editable (ETableModel *etm, gint col, gint row)
/* The default for one_duplicate_value is to return the raw value. */
static gpointer
-one_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
+one_duplicate_value (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableOne *one = E_TABLE_ONE (etm);
@@ -94,7 +103,9 @@ one_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
}
static void
-one_free_value (ETableModel *etm, gint col, gpointer value)
+one_free_value (ETableModel *etm,
+ gint col,
+ gpointer value)
{
ETableOne *one = E_TABLE_ONE (etm);
@@ -103,7 +114,8 @@ one_free_value (ETableModel *etm, gint col, gpointer value)
}
static gpointer
-one_initialize_value (ETableModel *etm, gint col)
+one_initialize_value (ETableModel *etm,
+ gint col)
{
ETableOne *one = E_TABLE_ONE (etm);
@@ -114,7 +126,9 @@ one_initialize_value (ETableModel *etm, gint col)
}
static gboolean
-one_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
+one_value_is_empty (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableOne *one = E_TABLE_ONE (etm);
@@ -125,7 +139,9 @@ one_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
}
static gchar *
-one_value_to_string (ETableModel *etm, gint col, gconstpointer value)
+one_value_to_string (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableOne *one = E_TABLE_ONE (etm);
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index 955547fd7f..99f282c76f 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -32,8 +32,6 @@
#define d(x)
-d (static gint depth = 0)
-
struct _ETableSearchPrivate {
guint timeout_id;
@@ -49,6 +47,8 @@ enum {
LAST_SIGNAL
};
+d (static gint depth = 0)
+
static guint e_table_search_signals[LAST_SIGNAL] = { 0, };
static gboolean
@@ -174,7 +174,8 @@ e_table_search_new (void)
* Returns: the number of columns in the table search.
*/
void
-e_table_search_input_character (ETableSearch *ets, gunichar character)
+e_table_search_input_character (ETableSearch *ets,
+ gunichar character)
{
gchar character_utf8[7];
gchar *temp_string;
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index b8f33c639e..0320663e8e 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -44,7 +44,8 @@ enum {
};
static void
-save_to_hash (gint model_row, gpointer closure)
+save_to_hash (gint model_row,
+ gpointer closure)
{
ETableSelectionModel *etsm = closure;
const gchar *key = e_table_model_get_save_id (etsm->model, model_row);
@@ -65,7 +66,8 @@ free_hash (ETableSelectionModel *etsm)
}
static void
-model_pre_change (ETableModel *etm, ETableSelectionModel *etsm)
+model_pre_change (ETableModel *etm,
+ ETableSelectionModel *etsm)
{
free_hash (etsm);
@@ -131,7 +133,8 @@ model_changed_idle (ETableSelectionModel *etsm)
}
static void
-model_changed (ETableModel *etm, ETableSelectionModel *etsm)
+model_changed (ETableModel *etm,
+ ETableSelectionModel *etsm)
{
e_selection_model_clear (E_SELECTION_MODEL (etsm));
if (!etsm->model_changed_idle_id && etm && e_table_model_has_save_id (etm)) {
@@ -140,27 +143,38 @@ model_changed (ETableModel *etm, ETableSelectionModel *etsm)
}
static void
-model_row_changed (ETableModel *etm, gint row, ETableSelectionModel *etsm)
+model_row_changed (ETableModel *etm,
+ gint row,
+ ETableSelectionModel *etsm)
{
free_hash (etsm);
}
static void
-model_cell_changed (ETableModel *etm, gint col, gint row, ETableSelectionModel *etsm)
+model_cell_changed (ETableModel *etm,
+ gint col,
+ gint row,
+ ETableSelectionModel *etsm)
{
free_hash (etsm);
}
#if 1
static void
-model_rows_inserted (ETableModel *etm, gint row, gint count, ETableSelectionModel *etsm)
+model_rows_inserted (ETableModel *etm,
+ gint row,
+ gint count,
+ ETableSelectionModel *etsm)
{
e_selection_model_array_insert_rows (E_SELECTION_MODEL_ARRAY (etsm), row, count);
free_hash (etsm);
}
static void
-model_rows_deleted (ETableModel *etm, gint row, gint count, ETableSelectionModel *etsm)
+model_rows_deleted (ETableModel *etm,
+ gint row,
+ gint count,
+ ETableSelectionModel *etsm)
{
e_selection_model_array_delete_rows (E_SELECTION_MODEL_ARRAY (etsm), row, count);
free_hash (etsm);
@@ -169,36 +183,49 @@ model_rows_deleted (ETableModel *etm, gint row, gint count, ETableSelectionModel
#else
static void
-model_rows_inserted (ETableModel *etm, gint row, gint count, ETableSelectionModel *etsm)
+model_rows_inserted (ETableModel *etm,
+ gint row,
+ gint count,
+ ETableSelectionModel *etsm)
{
model_changed (etm, etsm);
}
static void
-model_rows_deleted (ETableModel *etm, gint row, gint count, ETableSelectionModel *etsm)
+model_rows_deleted (ETableModel *etm,
+ gint row,
+ gint count,
+ ETableSelectionModel *etsm)
{
model_changed (etm, etsm);
}
#endif
inline static void
-add_model (ETableSelectionModel *etsm, ETableModel *model)
+add_model (ETableSelectionModel *etsm,
+ ETableModel *model)
{
etsm->model = model;
if (model) {
g_object_ref (model);
- etsm->model_pre_change_id = g_signal_connect(G_OBJECT(model), "model_pre_change",
- G_CALLBACK (model_pre_change), etsm);
- etsm->model_changed_id = g_signal_connect(G_OBJECT(model), "model_changed",
- G_CALLBACK (model_changed), etsm);
- etsm->model_row_changed_id = g_signal_connect(G_OBJECT(model), "model_row_changed",
- G_CALLBACK (model_row_changed), etsm);
- etsm->model_cell_changed_id = g_signal_connect(G_OBJECT(model), "model_cell_changed",
- G_CALLBACK (model_cell_changed), etsm);
- etsm->model_rows_inserted_id = g_signal_connect(G_OBJECT(model), "model_rows_inserted",
- G_CALLBACK (model_rows_inserted), etsm);
- etsm->model_rows_deleted_id = g_signal_connect(G_OBJECT(model), "model_rows_deleted",
- G_CALLBACK (model_rows_deleted), etsm);
+ etsm->model_pre_change_id = g_signal_connect (
+ model, "model_pre_change",
+ G_CALLBACK (model_pre_change), etsm);
+ etsm->model_changed_id = g_signal_connect (
+ model, "model_changed",
+ G_CALLBACK (model_changed), etsm);
+ etsm->model_row_changed_id = g_signal_connect (
+ model, "model_row_changed",
+ G_CALLBACK (model_row_changed), etsm);
+ etsm->model_cell_changed_id = g_signal_connect (
+ model, "model_cell_changed",
+ G_CALLBACK (model_cell_changed), etsm);
+ etsm->model_rows_inserted_id = g_signal_connect (
+ model, "model_rows_inserted",
+ G_CALLBACK (model_rows_inserted), etsm);
+ etsm->model_rows_deleted_id = g_signal_connect (
+ model, "model_rows_deleted",
+ G_CALLBACK (model_rows_deleted), etsm);
}
e_selection_model_array_confirm_row_count (E_SELECTION_MODEL_ARRAY (etsm));
}
@@ -244,11 +271,14 @@ etsm_dispose (GObject *object)
}
static void
-etsm_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+etsm_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableSelectionModel *etsm = E_TABLE_SELECTION_MODEL (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_MODEL:
g_value_set_object (value, etsm->model);
break;
@@ -259,11 +289,14 @@ etsm_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *ps
}
static void
-etsm_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+etsm_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ETableSelectionModel *etsm = E_TABLE_SELECTION_MODEL (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_MODEL:
drop_model (etsm);
add_model (etsm, g_value_get_object (value) ? E_TABLE_MODEL (g_value_get_object (value)) : NULL);
diff --git a/widgets/table/e-table-selection-model.h b/widgets/table/e-table-selection-model.h
index f144980f03..02309c047a 100644
--- a/widgets/table/e-table-selection-model.h
+++ b/widgets/table/e-table-selection-model.h
@@ -35,7 +35,7 @@
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_TABLE_SELECTION_MODEL, ETableSelectionModel))
#define E_TABLE_SELECTION_MODEL_CLASS(cls) \
- (G_TYPE-CHECK_CLASS_CAST \
+ (G_TYPE - CHECK_CLASS_CAST \
((cls), E_TYPE_TABLE_SELECTION_MODEL, ETableSelectionModelClass))
#define E_IS_TABLE_SELECTION_MODEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE \
diff --git a/widgets/table/e-table-sort-info.c b/widgets/table/e-table-sort-info.c
index b488dbce06..cac2586b8a 100644
--- a/widgets/table/e-table-sort-info.c
+++ b/widgets/table/e-table-sort-info.c
@@ -141,7 +141,7 @@ e_table_sort_info_group_info_changed (ETableSortInfo *info)
* trigger any signals that might have been queued.
*/
void
-e_table_sort_info_freeze (ETableSortInfo *info)
+e_table_sort_info_freeze (ETableSortInfo *info)
{
info->frozen++;
}
@@ -158,7 +158,7 @@ e_table_sort_info_freeze (ETableSortInfo *info)
* this object.
*/
void
-e_table_sort_info_thaw (ETableSortInfo *info)
+e_table_sort_info_thaw (ETableSortInfo *info)
{
info->frozen--;
if (info->frozen != 0)
@@ -190,7 +190,8 @@ e_table_sort_info_grouping_get_count (ETableSortInfo *info)
}
static void
-e_table_sort_info_grouping_real_truncate (ETableSortInfo *info, gint length)
+e_table_sort_info_grouping_real_truncate (ETableSortInfo *info,
+ gint length)
{
if (length < info->group_count) {
info->group_count = length;
@@ -210,7 +211,8 @@ e_table_sort_info_grouping_real_truncate (ETableSortInfo *info, gint length)
* criteria in the object.
*/
void
-e_table_sort_info_grouping_truncate (ETableSortInfo *info, gint length)
+e_table_sort_info_grouping_truncate (ETableSortInfo *info,
+ gint length)
{
e_table_sort_info_grouping_real_truncate (info, length);
e_table_sort_info_group_info_changed (info);
@@ -224,7 +226,8 @@ e_table_sort_info_grouping_truncate (ETableSortInfo *info, gint length)
* Returns: the description of the @n-th grouping criteria in the @info object.
*/
ETableSortColumn
-e_table_sort_info_grouping_get_nth (ETableSortInfo *info, gint n)
+e_table_sort_info_grouping_get_nth (ETableSortInfo *info,
+ gint n)
{
if (info->can_group && n < info->group_count) {
return info->groupings[n];
@@ -244,7 +247,9 @@ e_table_sort_info_grouping_get_nth (ETableSortInfo *info, gint n)
* whether it is ascending or descending).
*/
void
-e_table_sort_info_grouping_set_nth (ETableSortInfo *info, gint n, ETableSortColumn column)
+e_table_sort_info_grouping_set_nth (ETableSortInfo *info,
+ gint n,
+ ETableSortColumn column)
{
if (n >= info->group_count) {
e_table_sort_info_grouping_real_truncate (info, n + 1);
@@ -266,7 +271,8 @@ e_table_sort_info_sorting_get_count (ETableSortInfo *info)
}
static void
-e_table_sort_info_sorting_real_truncate (ETableSortInfo *info, gint length)
+e_table_sort_info_sorting_real_truncate (ETableSortInfo *info,
+ gint length)
{
if (length < info->sort_count) {
info->sort_count = length;
@@ -286,7 +292,8 @@ e_table_sort_info_sorting_real_truncate (ETableSortInfo *info, gint length)
* criteria in the object.
*/
void
-e_table_sort_info_sorting_truncate (ETableSortInfo *info, gint length)
+e_table_sort_info_sorting_truncate (ETableSortInfo *info,
+ gint length)
{
e_table_sort_info_sorting_real_truncate (info, length);
e_table_sort_info_sort_info_changed (info);
@@ -300,7 +307,8 @@ e_table_sort_info_sorting_truncate (ETableSortInfo *info, gint length)
* Returns: the description of the @n-th grouping criteria in the @info object.
*/
ETableSortColumn
-e_table_sort_info_sorting_get_nth (ETableSortInfo *info, gint n)
+e_table_sort_info_sorting_get_nth (ETableSortInfo *info,
+ gint n)
{
if (n < info->sort_count) {
return info->sortings[n];
@@ -320,7 +328,9 @@ e_table_sort_info_sorting_get_nth (ETableSortInfo *info, gint n)
* column number and whether it is ascending or descending).
*/
void
-e_table_sort_info_sorting_set_nth (ETableSortInfo *info, gint n, ETableSortColumn column)
+e_table_sort_info_sorting_set_nth (ETableSortInfo *info,
+ gint n,
+ ETableSortColumn column)
{
if (n >= info->sort_count) {
e_table_sort_info_sorting_real_truncate (info, n + 1);
@@ -356,8 +366,8 @@ e_table_sort_info_new (void)
*/
void
e_table_sort_info_load_from_node (ETableSortInfo *info,
- xmlNode *node,
- gdouble state_version)
+ xmlNode *node,
+ gdouble state_version)
{
gint i;
xmlNode *grouping;
@@ -412,7 +422,7 @@ e_table_sort_info_load_from_node (ETableSortInfo *info,
*/
xmlNode *
e_table_sort_info_save_to_node (ETableSortInfo *info,
- xmlNode *parent)
+ xmlNode *parent)
{
xmlNode *grouping;
gint i;
@@ -461,14 +471,14 @@ e_table_sort_info_duplicate (ETableSortInfo *info)
}
void
-e_table_sort_info_set_can_group (ETableSortInfo *info,
- gboolean can_group)
+e_table_sort_info_set_can_group (ETableSortInfo *info,
+ gboolean can_group)
{
info->can_group = can_group;
}
gboolean
-e_table_sort_info_get_can_group (ETableSortInfo *info)
+e_table_sort_info_get_can_group (ETableSortInfo *info)
{
return info->can_group;
}
diff --git a/widgets/table/e-table-sorted-variable.c b/widgets/table/e-table-sorted-variable.c
index 0ed35c95a6..7792795477 100644
--- a/widgets/table/e-table-sorted-variable.c
+++ b/widgets/table/e-table-sorted-variable.c
@@ -122,8 +122,8 @@ etsv_insert_idle (ETableSortedVariable *etsv)
}
static void
-etsv_add (ETableSubsetVariable *etssv,
- gint row)
+etsv_add (ETableSubsetVariable *etssv,
+ gint row)
{
ETableModel *etm = E_TABLE_MODEL (etssv);
ETableSubset *etss = E_TABLE_SUBSET (etssv);
@@ -139,7 +139,7 @@ etsv_add (ETableSubsetVariable *etssv,
i = etss->n_map;
if (etsv->sort_idle_id == 0) {
/* this is to see if we're inserting a lot of things between idle loops.
- If we are, we're busy, its faster to just append and perform a full sort later */
+ * If we are, we're busy, its faster to just append and perform a full sort later */
etsv->insert_count++;
if (etsv->insert_count > ETSV_INSERT_MAX) {
/* schedule a sort, and append instead */
@@ -160,7 +160,7 @@ etsv_add (ETableSubsetVariable *etssv,
}
static void
-etsv_add_all (ETableSubsetVariable *etssv)
+etsv_add_all (ETableSubsetVariable *etssv)
{
ETableModel *etm = E_TABLE_MODEL (etssv);
ETableSubset *etss = E_TABLE_SUBSET (etssv);
@@ -187,7 +187,9 @@ etsv_add_all (ETableSubsetVariable *etssv)
}
ETableModel *
-e_table_sorted_variable_new (ETableModel *source, ETableHeader *full_header, ETableSortInfo *sort_info)
+e_table_sorted_variable_new (ETableModel *source,
+ ETableHeader *full_header,
+ ETableSortInfo *sort_info)
{
ETableSortedVariable *etsv = g_object_new (E_TYPE_TABLE_SORTED_VARIABLE, NULL);
ETableSubsetVariable *etssv = E_TABLE_SUBSET_VARIABLE (etsv);
@@ -202,14 +204,16 @@ e_table_sorted_variable_new (ETableModel *source, ETableHeader *full_header, ETa
etsv->full_header = full_header;
g_object_ref (etsv->full_header);
- etsv->sort_info_changed_id = g_signal_connect (G_OBJECT (sort_info), "sort_info_changed",
- G_CALLBACK (etsv_sort_info_changed), etsv);
+ etsv->sort_info_changed_id = g_signal_connect (
+ sort_info, "sort_info_changed",
+ G_CALLBACK (etsv_sort_info_changed), etsv);
return E_TABLE_MODEL (etsv);
}
static void
-etsv_sort_info_changed (ETableSortInfo *info, ETableSortedVariable *etsv)
+etsv_sort_info_changed (ETableSortInfo *info,
+ ETableSortedVariable *etsv)
{
etsv_sort (etsv);
}
diff --git a/widgets/table/e-table-sorted.c b/widgets/table/e-table-sorted.c
index 61ea10c082..fe5f644dbf 100644
--- a/widgets/table/e-table-sorted.c
+++ b/widgets/table/e-table-sorted.c
@@ -125,7 +125,9 @@ ets_insert_idle (ETableSorted *ets)
}
ETableModel *
-e_table_sorted_new (ETableModel *source, ETableHeader *full_header, ETableSortInfo *sort_info)
+e_table_sorted_new (ETableModel *source,
+ ETableHeader *full_header,
+ ETableSortInfo *sort_info)
{
ETableSorted *ets = g_object_new (E_TYPE_TABLE_SORTED, NULL);
ETableSubset *etss = E_TABLE_SUBSET (ets);
@@ -145,20 +147,23 @@ e_table_sorted_new (ETableModel *source, ETableHeader *full_header, ETableSortIn
ets_proxy_model_changed (etss, source);
- ets->sort_info_changed_id = g_signal_connect (G_OBJECT (sort_info), "sort_info_changed",
- G_CALLBACK (ets_sort_info_changed), ets);
+ ets->sort_info_changed_id = g_signal_connect (
+ sort_info, "sort_info_changed",
+ G_CALLBACK (ets_sort_info_changed), ets);
return E_TABLE_MODEL (ets);
}
static void
-ets_sort_info_changed (ETableSortInfo *info, ETableSorted *ets)
+ets_sort_info_changed (ETableSortInfo *info,
+ ETableSorted *ets)
{
ets_sort (ets);
}
static void
-ets_proxy_model_changed (ETableSubset *subset, ETableModel *source)
+ets_proxy_model_changed (ETableSubset *subset,
+ ETableModel *source)
{
gint rows, i;
@@ -179,7 +184,9 @@ ets_proxy_model_changed (ETableSubset *subset, ETableModel *source)
}
static void
-ets_proxy_model_row_changed (ETableSubset *subset, ETableModel *source, gint row)
+ets_proxy_model_row_changed (ETableSubset *subset,
+ ETableModel *source,
+ gint row)
{
if (!E_TABLE_SORTED (subset)->sort_idle_id)
E_TABLE_SORTED (subset)->sort_idle_id = g_idle_add_full (50, (GSourceFunc) ets_sort_idle, subset, NULL);
@@ -189,7 +196,10 @@ ets_proxy_model_row_changed (ETableSubset *subset, ETableModel *source, gint row
}
static void
-ets_proxy_model_cell_changed (ETableSubset *subset, ETableModel *source, gint col, gint row)
+ets_proxy_model_cell_changed (ETableSubset *subset,
+ ETableModel *source,
+ gint col,
+ gint row)
{
ETableSorted *ets = E_TABLE_SORTED (subset);
if (e_table_sorting_utils_affects_sort (ets->sort_info, ets->full_header, col))
@@ -199,7 +209,10 @@ ets_proxy_model_cell_changed (ETableSubset *subset, ETableModel *source, gint co
}
static void
-ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, gint row, gint count)
+ets_proxy_model_rows_inserted (ETableSubset *etss,
+ ETableModel *source,
+ gint row,
+ gint count)
{
ETableModel *etm = E_TABLE_MODEL (etss);
ETableSorted *ets = E_TABLE_SORTED (etss);
@@ -228,7 +241,7 @@ ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, gint row
i = etss->n_map;
if (ets->sort_idle_id == 0) {
/* this is to see if we're inserting a lot of things between idle loops.
- If we are, we're busy, its faster to just append and perform a full sort later */
+ * If we are, we're busy, its faster to just append and perform a full sort later */
ets->insert_count++;
if (ets->insert_count > ETS_INSERT_MAX) {
/* schedule a sort, and append instead */
@@ -259,7 +272,10 @@ ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, gint row
}
static void
-ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, gint row, gint count)
+ets_proxy_model_rows_deleted (ETableSubset *etss,
+ ETableModel *source,
+ gint row,
+ gint count)
{
ETableModel *etm = E_TABLE_MODEL (etss);
gint i;
diff --git a/widgets/table/e-table-sorter.c b/widgets/table/e-table-sorter.c
index d74dbd3d04..418ce3a5e8 100644
--- a/widgets/table/e-table-sorter.c
+++ b/widgets/table/e-table-sorter.c
@@ -115,11 +115,14 @@ ets_dispose (GObject *object)
}
static void
-ets_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+ets_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ETableSorter *ets = E_TABLE_SORTER (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_SORT_INFO:
if (ets->sort_info) {
if (ets->sort_info_changed_id)
@@ -144,10 +147,13 @@ ets_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe
}
static void
-ets_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+ets_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETableSorter *ets = E_TABLE_SORTER (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_SORT_INFO:
g_value_set_object (value, ets->sort_info);
break;
@@ -197,7 +203,9 @@ ets_init (ETableSorter *ets)
}
ETableSorter *
-e_table_sorter_new (ETableModel *source, ETableHeader *full_header, ETableSortInfo *sort_info)
+e_table_sorter_new (ETableModel *source,
+ ETableHeader *full_header,
+ ETableSortInfo *sort_info)
{
ETableSorter *ets = g_object_new (E_TYPE_TABLE_SORTER, NULL);
@@ -227,37 +235,50 @@ e_table_sorter_new (ETableModel *source, ETableHeader *full_header, ETableSortIn
}
static void
-ets_model_changed (ETableModel *etm, ETableSorter *ets)
+ets_model_changed (ETableModel *etm,
+ ETableSorter *ets)
{
ets_clean (ets);
}
static void
-ets_model_row_changed (ETableModel *etm, gint row, ETableSorter *ets)
+ets_model_row_changed (ETableModel *etm,
+ gint row,
+ ETableSorter *ets)
{
ets_clean (ets);
}
static void
-ets_model_cell_changed (ETableModel *etm, gint col, gint row, ETableSorter *ets)
+ets_model_cell_changed (ETableModel *etm,
+ gint col,
+ gint row,
+ ETableSorter *ets)
{
ets_clean (ets);
}
static void
-ets_model_rows_inserted (ETableModel *etm, gint row, gint count, ETableSorter *ets)
+ets_model_rows_inserted (ETableModel *etm,
+ gint row,
+ gint count,
+ ETableSorter *ets)
{
ets_clean (ets);
}
static void
-ets_model_rows_deleted (ETableModel *etm, gint row, gint count, ETableSorter *ets)
+ets_model_rows_deleted (ETableModel *etm,
+ gint row,
+ gint count,
+ ETableSorter *ets)
{
ets_clean (ets);
}
static void
-ets_sort_info_changed (ETableSortInfo *info, ETableSorter *ets)
+ets_sort_info_changed (ETableSortInfo *info,
+ ETableSorter *ets)
{
d(g_print ("sort info changed\n"));
ets_clean (ets);
@@ -275,7 +296,9 @@ struct qsort_data {
/* FIXME: Make it not cache the second and later columns (as if anyone cares.) */
static gint
-qsort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data)
+qsort_callback (gconstpointer data1,
+ gconstpointer data2,
+ gpointer user_data)
{
struct qsort_data *qd = (struct qsort_data *) user_data;
gint row1 = *(gint *) data1;
@@ -390,7 +413,8 @@ ets_backsort (ETableSorter *ets)
}
static gint
-ets_model_to_sorted (ESorter *es, gint row)
+ets_model_to_sorted (ESorter *es,
+ gint row)
{
ETableSorter *ets = E_TABLE_SORTER (es);
gint rows = e_table_model_row_count (ets->source);
@@ -408,7 +432,8 @@ ets_model_to_sorted (ESorter *es, gint row)
}
static gint
-ets_sorted_to_model (ESorter *es, gint row)
+ets_sorted_to_model (ESorter *es,
+ gint row)
{
ETableSorter *ets = E_TABLE_SORTER (es);
gint rows = e_table_model_row_count (ets->source);
@@ -426,7 +451,9 @@ ets_sorted_to_model (ESorter *es, gint row)
}
static void
-ets_get_model_to_sorted_array (ESorter *es, gint **array, gint *count)
+ets_get_model_to_sorted_array (ESorter *es,
+ gint **array,
+ gint *count)
{
ETableSorter *ets = E_TABLE_SORTER (es);
if (array || count) {
@@ -440,7 +467,9 @@ ets_get_model_to_sorted_array (ESorter *es, gint **array, gint *count)
}
static void
-ets_get_sorted_to_model_array (ESorter *es, gint **array, gint *count)
+ets_get_sorted_to_model_array (ESorter *es,
+ gint **array,
+ gint *count)
{
ETableSorter *ets = E_TABLE_SORTER (es);
if (array || count) {
diff --git a/widgets/table/e-table-sorting-utils.c b/widgets/table/e-table-sorting-utils.c
index e654f94b9c..a94c45f7b0 100644
--- a/widgets/table/e-table-sorting-utils.c
+++ b/widgets/table/e-table-sorting-utils.c
@@ -35,7 +35,12 @@
/* This takes source rows. */
static gint
-etsu_compare (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint row1, gint row2, gpointer cmp_cache)
+etsu_compare (ETableModel *source,
+ ETableSortInfo *sort_info,
+ ETableHeader *full_header,
+ gint row1,
+ gint row2,
+ gpointer cmp_cache)
{
gint j;
gint sort_count = e_table_sort_info_sorting_get_count (sort_info);
@@ -84,7 +89,9 @@ typedef struct {
/* FIXME: Make it not cache the second and later columns (as if anyone cares.) */
static gint
-e_sort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data)
+e_sort_callback (gconstpointer data1,
+ gconstpointer data2,
+ gpointer user_data)
{
gint row1 = *(gint *) data1;
gint row2 = *(gint *) data2;
@@ -111,7 +118,11 @@ e_sort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data)
}
void
-e_table_sorting_utils_sort (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint *map_table, gint rows)
+e_table_sorting_utils_sort (ETableModel *source,
+ ETableSortInfo *sort_info,
+ ETableHeader *full_header,
+ gint *map_table,
+ gint rows)
{
gint total_rows;
gint i;
@@ -158,9 +169,9 @@ e_table_sorting_utils_sort (ETableModel *source, ETableSortInfo *sort_info, ETab
}
gboolean
-e_table_sorting_utils_affects_sort (ETableSortInfo *sort_info,
- ETableHeader *full_header,
- gint col)
+e_table_sorting_utils_affects_sort (ETableSortInfo *sort_info,
+ ETableHeader *full_header,
+ gint col)
{
gint j;
gint cols;
@@ -186,7 +197,12 @@ e_table_sorting_utils_affects_sort (ETableSortInfo *sort_info,
/* FIXME: This could be done in time log n instead of time n with a binary search. */
gint
-e_table_sorting_utils_insert (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint *map_table, gint rows, gint row)
+e_table_sorting_utils_insert (ETableModel *source,
+ ETableSortInfo *sort_info,
+ ETableHeader *full_header,
+ gint *map_table,
+ gint rows,
+ gint row)
{
gint i;
gpointer cmp_cache = e_table_sorting_utils_create_cmp_cache ();
@@ -203,7 +219,12 @@ e_table_sorting_utils_insert (ETableModel *source, ETableSortInfo *sort_info, ET
/* FIXME: This could be done in time log n instead of time n with a binary search. */
gint
-e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint *map_table, gint rows, gint view_row)
+e_table_sorting_utils_check_position (ETableModel *source,
+ ETableSortInfo *sort_info,
+ ETableHeader *full_header,
+ gint *map_table,
+ gint rows,
+ gint view_row)
{
gint i;
gint row;
@@ -231,7 +252,12 @@ e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_
/* This takes source rows. */
static gint
-etsu_tree_compare (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath path1, ETreePath path2, gpointer cmp_cache)
+etsu_tree_compare (ETreeModel *source,
+ ETableSortInfo *sort_info,
+ ETableHeader *full_header,
+ ETreePath path1,
+ ETreePath path2,
+ gpointer cmp_cache)
{
gint j;
gint sort_count = e_table_sort_info_sorting_get_count (sort_info);
@@ -257,7 +283,9 @@ etsu_tree_compare (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *
}
static gint
-e_sort_tree_callback (gconstpointer data1, gconstpointer data2, gpointer user_data)
+e_sort_tree_callback (gconstpointer data1,
+ gconstpointer data2,
+ gpointer user_data)
{
ETreePath *path1 = *(ETreePath *) data1;
ETreePath *path2 = *(ETreePath *) data2;
@@ -267,7 +295,11 @@ e_sort_tree_callback (gconstpointer data1, gconstpointer data2, gpointer user_da
}
void
-e_table_sorting_utils_tree_sort (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, gint count)
+e_table_sorting_utils_tree_sort (ETreeModel *source,
+ ETableSortInfo *sort_info,
+ ETableHeader *full_header,
+ ETreePath *map_table,
+ gint count)
{
ETableSortClosure closure;
gint cols;
@@ -331,7 +363,12 @@ e_table_sorting_utils_tree_sort (ETreeModel *source, ETableSortInfo *sort_info,
/* FIXME: This could be done in time log n instead of time n with a binary search. */
gint
-e_table_sorting_utils_tree_check_position (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, gint count, gint old_index)
+e_table_sorting_utils_tree_check_position (ETreeModel *source,
+ ETableSortInfo *sort_info,
+ ETableHeader *full_header,
+ ETreePath *map_table,
+ gint count,
+ gint old_index)
{
gint i;
ETreePath path;
@@ -357,7 +394,12 @@ e_table_sorting_utils_tree_check_position (ETreeModel *source, ETableSortInfo *s
/* FIXME: This does not pay attention to making sure that it's a stable insert. This needs to be fixed. */
gint
-e_table_sorting_utils_tree_insert (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, gint count, ETreePath path)
+e_table_sorting_utils_tree_insert (ETreeModel *source,
+ ETableSortInfo *sort_info,
+ ETableHeader *full_header,
+ ETreePath *map_table,
+ gint count,
+ ETreePath path)
{
gsize start;
gsize end;
@@ -418,7 +460,9 @@ e_table_sorting_utils_free_cmp_cache (gpointer cmp_cache)
* Note: Given @value will be stolen and later freed with g_free.
**/
void
-e_table_sorting_utils_add_to_cmp_cache (gpointer cmp_cache, const gchar *key, gchar *value)
+e_table_sorting_utils_add_to_cmp_cache (gpointer cmp_cache,
+ const gchar *key,
+ gchar *value)
{
g_return_if_fail (cmp_cache != NULL);
g_return_if_fail (key != NULL);
@@ -436,7 +480,8 @@ e_table_sorting_utils_add_to_cmp_cache (gpointer cmp_cache, const gchar *key, gc
* with a key.
**/
const gchar *
-e_table_sorting_utils_lookup_cmp_cache (gpointer cmp_cache, const gchar *key)
+e_table_sorting_utils_lookup_cmp_cache (gpointer cmp_cache,
+ const gchar *key)
{
g_return_val_if_fail (key != NULL, NULL);
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index 76c268ad11..03f0e4503b 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -129,7 +129,7 @@ e_table_specification_new (void)
*/
gboolean
e_table_specification_load_from_file (ETableSpecification *specification,
- const gchar *filename)
+ const gchar *filename)
{
xmlDoc *doc;
@@ -156,7 +156,7 @@ e_table_specification_load_from_file (ETableSpecification *specification,
*/
gboolean
e_table_specification_load_from_string (ETableSpecification *specification,
- const gchar *xml)
+ const gchar *xml)
{
xmlDoc *doc;
doc = xmlParseMemory ( (gchar *) xml, strlen (xml));
@@ -180,7 +180,7 @@ e_table_specification_load_from_string (ETableSpecification *specification,
*/
void
e_table_specification_load_from_node (ETableSpecification *specification,
- const xmlNode *node)
+ const xmlNode *node)
{
gchar *temp;
xmlNode *children;
@@ -285,7 +285,7 @@ e_table_specification_load_from_node (ETableSpecification *specification,
*/
gint
e_table_specification_save_to_file (ETableSpecification *specification,
- const gchar *filename)
+ const gchar *filename)
{
xmlDoc *doc;
gint ret;
@@ -349,7 +349,7 @@ e_table_specification_save_to_string (ETableSpecification *specification)
*/
xmlNode *
e_table_specification_save_to_node (ETableSpecification *specification,
- xmlDoc *doc)
+ xmlDoc *doc)
{
xmlNode *node;
const gchar *s;
diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c
index 0bb311b8c4..785c807442 100644
--- a/widgets/table/e-table-state.c
+++ b/widgets/table/e-table-state.c
@@ -116,8 +116,8 @@ e_table_state_vanilla (gint col_count)
}
gboolean
-e_table_state_load_from_file (ETableState *state,
- const gchar *filename)
+e_table_state_load_from_file (ETableState *state,
+ const gchar *filename)
{
xmlDoc *doc;
@@ -135,8 +135,8 @@ e_table_state_load_from_file (ETableState *state,
}
void
-e_table_state_load_from_string (ETableState *state,
- const gchar *xml)
+e_table_state_load_from_string (ETableState *state,
+ const gchar *xml)
{
xmlDoc *doc;
@@ -158,7 +158,7 @@ typedef struct {
void
e_table_state_load_from_node (ETableState *state,
- const xmlNode *node)
+ const xmlNode *node)
{
xmlNode *children;
GList *list = NULL, *iterator;
@@ -215,8 +215,8 @@ e_table_state_load_from_node (ETableState *state,
}
void
-e_table_state_save_to_file (ETableState *state,
- const gchar *filename)
+e_table_state_save_to_file (ETableState *state,
+ const gchar *filename)
{
xmlDoc *doc;
@@ -231,7 +231,7 @@ e_table_state_save_to_file (ETableState *state,
}
gchar *
-e_table_state_save_to_string (ETableState *state)
+e_table_state_save_to_string (ETableState *state)
{
gchar *ret_val;
xmlChar *string;
@@ -251,8 +251,8 @@ e_table_state_save_to_string (ETableState *state)
}
xmlNode *
-e_table_state_save_to_node (ETableState *state,
- xmlNode *parent)
+e_table_state_save_to_node (ETableState *state,
+ xmlNode *parent)
{
gint i;
xmlNode *node;
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c
index 99fed4ba02..a40859b492 100644
--- a/widgets/table/e-table-subset-variable.c
+++ b/widgets/table/e-table-subset-variable.c
@@ -40,8 +40,8 @@ G_DEFINE_TYPE (ETableSubsetVariable, etssv, E_TYPE_TABLE_SUBSET)
#define INCREMENT_AMOUNT 10
static void
-etssv_add (ETableSubsetVariable *etssv,
- gint row)
+etssv_add (ETableSubsetVariable *etssv,
+ gint row)
{
ETableModel *etm = E_TABLE_MODEL (etssv);
ETableSubset *etss = E_TABLE_SUBSET (etssv);
@@ -62,8 +62,8 @@ etssv_add (ETableSubsetVariable *etssv,
static void
etssv_add_array (ETableSubsetVariable *etssv,
- const gint *array,
- gint count)
+ const gint *array,
+ gint count)
{
ETableModel *etm = E_TABLE_MODEL (etssv);
ETableSubset *etss = E_TABLE_SUBSET (etssv);
@@ -84,7 +84,7 @@ etssv_add_array (ETableSubsetVariable *etssv,
}
static void
-etssv_add_all (ETableSubsetVariable *etssv)
+etssv_add_all (ETableSubsetVariable *etssv)
{
ETableModel *etm = E_TABLE_MODEL (etssv);
ETableSubset *etss = E_TABLE_SUBSET (etssv);
@@ -107,8 +107,8 @@ etssv_add_all (ETableSubsetVariable *etssv)
}
static gboolean
-etssv_remove (ETableSubsetVariable *etssv,
- gint row)
+etssv_remove (ETableSubsetVariable *etssv,
+ gint row)
{
ETableModel *etm = E_TABLE_MODEL (etssv);
ETableSubset *etss = E_TABLE_SUBSET (etssv);
@@ -147,7 +147,7 @@ etssv_init (ETableSubsetVariable *etssv)
ETableModel *
e_table_subset_variable_construct (ETableSubsetVariable *etssv,
- ETableModel *source)
+ ETableModel *source)
{
if (e_table_subset_construct (E_TABLE_SUBSET (etssv), source, 1) == NULL)
return NULL;
@@ -170,8 +170,8 @@ e_table_subset_variable_new (ETableModel *source)
}
void
-e_table_subset_variable_add (ETableSubsetVariable *etssv,
- gint row)
+e_table_subset_variable_add (ETableSubsetVariable *etssv,
+ gint row)
{
g_return_if_fail (etssv != NULL);
g_return_if_fail (E_IS_TABLE_SUBSET_VARIABLE (etssv));
@@ -181,9 +181,9 @@ e_table_subset_variable_add (ETableSubsetVariable *etssv,
}
void
-e_table_subset_variable_add_array (ETableSubsetVariable *etssv,
- const gint *array,
- gint count)
+e_table_subset_variable_add_array (ETableSubsetVariable *etssv,
+ const gint *array,
+ gint count)
{
g_return_if_fail (etssv != NULL);
g_return_if_fail (E_IS_TABLE_SUBSET_VARIABLE (etssv));
@@ -193,7 +193,7 @@ e_table_subset_variable_add_array (ETableSubsetVariable *etssv,
}
void
-e_table_subset_variable_add_all (ETableSubsetVariable *etssv)
+e_table_subset_variable_add_all (ETableSubsetVariable *etssv)
{
g_return_if_fail (etssv != NULL);
g_return_if_fail (E_IS_TABLE_SUBSET_VARIABLE (etssv));
@@ -203,8 +203,8 @@ e_table_subset_variable_add_all (ETableSubsetVariable *etssv)
}
gboolean
-e_table_subset_variable_remove (ETableSubsetVariable *etssv,
- gint row)
+e_table_subset_variable_remove (ETableSubsetVariable *etssv,
+ gint row)
{
g_return_val_if_fail (etssv != NULL, FALSE);
g_return_val_if_fail (E_IS_TABLE_SUBSET_VARIABLE (etssv), FALSE);
@@ -224,7 +224,7 @@ e_table_subset_variable_clear (ETableSubsetVariable *etssv)
e_table_model_pre_change (etm);
etss->n_map = 0;
g_free (etss->map_table);
- etss->map_table = (gint *) g_new (unsigned int, 1);
+ etss->map_table = (gint *) g_new (guint, 1);
etssv->n_vals_allocated = 1;
e_table_model_changed (etm);
@@ -232,8 +232,8 @@ e_table_subset_variable_clear (ETableSubsetVariable *etssv)
void
e_table_subset_variable_increment (ETableSubsetVariable *etssv,
- gint position,
- gint amount)
+ gint position,
+ gint amount)
{
gint i;
ETableSubset *etss = E_TABLE_SUBSET (etssv);
@@ -245,8 +245,8 @@ e_table_subset_variable_increment (ETableSubsetVariable *etssv,
void
e_table_subset_variable_decrement (ETableSubsetVariable *etssv,
- gint position,
- gint amount)
+ gint position,
+ gint amount)
{
gint i;
ETableSubset *etss = E_TABLE_SUBSET (etssv);
@@ -258,7 +258,7 @@ e_table_subset_variable_decrement (ETableSubsetVariable *etssv,
void
e_table_subset_variable_set_allocation (ETableSubsetVariable *etssv,
- gint total)
+ gint total)
{
ETableSubset *etss = E_TABLE_SUBSET (etssv);
if (total <= 0)
diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c
index 03871771f6..9a26020296 100644
--- a/widgets/table/e-table-subset.c
+++ b/widgets/table/e-table-subset.c
@@ -52,7 +52,8 @@ G_DEFINE_TYPE (ETableSubset, etss, E_TYPE_TABLE_MODEL)
#define MAP_ROW(etss, row) (row == -1 ? -1 : etss->map_table[row])
static gint
-etss_get_view_row (ETableSubset *etss, gint row)
+etss_get_view_row (ETableSubset *etss,
+ gint row)
{
const gint n = etss->n_map;
const gint * const map_table = etss->map_table;
@@ -150,7 +151,9 @@ etss_row_count (ETableModel *etm)
}
static gpointer
-etss_value_at (ETableModel *etm, gint col, gint row)
+etss_value_at (ETableModel *etm,
+ gint col,
+ gint row)
{
ETableSubset *etss = (ETableSubset *) etm;
@@ -162,7 +165,10 @@ etss_value_at (ETableModel *etm, gint col, gint row)
}
static void
-etss_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
+etss_set_value_at (ETableModel *etm,
+ gint col,
+ gint row,
+ gconstpointer val)
{
ETableSubset *etss = (ETableSubset *) etm;
@@ -174,7 +180,9 @@ etss_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
}
static gboolean
-etss_is_cell_editable (ETableModel *etm, gint col, gint row)
+etss_is_cell_editable (ETableModel *etm,
+ gint col,
+ gint row)
{
ETableSubset *etss = (ETableSubset *) etm;
@@ -190,7 +198,8 @@ etss_has_save_id (ETableModel *etm)
}
static gchar *
-etss_get_save_id (ETableModel *etm, gint row)
+etss_get_save_id (ETableModel *etm,
+ gint row)
{
ETableSubset *etss = (ETableSubset *) etm;
@@ -203,14 +212,18 @@ etss_get_save_id (ETableModel *etm, gint row)
}
static void
-etss_append_row (ETableModel *etm, ETableModel *source, gint row)
+etss_append_row (ETableModel *etm,
+ ETableModel *source,
+ gint row)
{
ETableSubset *etss = (ETableSubset *) etm;
e_table_model_append_row (etss->source, source, row);
}
static gpointer
-etss_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
+etss_duplicate_value (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableSubset *etss = (ETableSubset *) etm;
@@ -218,7 +231,9 @@ etss_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
}
static void
-etss_free_value (ETableModel *etm, gint col, gpointer value)
+etss_free_value (ETableModel *etm,
+ gint col,
+ gpointer value)
{
ETableSubset *etss = (ETableSubset *) etm;
@@ -226,7 +241,8 @@ etss_free_value (ETableModel *etm, gint col, gpointer value)
}
static gpointer
-etss_initialize_value (ETableModel *etm, gint col)
+etss_initialize_value (ETableModel *etm,
+ gint col)
{
ETableSubset *etss = (ETableSubset *) etm;
@@ -234,7 +250,9 @@ etss_initialize_value (ETableModel *etm, gint col)
}
static gboolean
-etss_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
+etss_value_is_empty (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableSubset *etss = (ETableSubset *) etm;
@@ -242,7 +260,9 @@ etss_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
}
static gchar *
-etss_value_to_string (ETableModel *etm, gint col, gconstpointer value)
+etss_value_to_string (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETableSubset *etss = (ETableSubset *) etm;
@@ -291,25 +311,30 @@ etss_init (ETableSubset *etss)
}
static void
-etss_proxy_model_pre_change_real (ETableSubset *etss, ETableModel *etm)
+etss_proxy_model_pre_change_real (ETableSubset *etss,
+ ETableModel *etm)
{
e_table_model_pre_change (E_TABLE_MODEL (etss));
}
static void
-etss_proxy_model_no_change_real (ETableSubset *etss, ETableModel *etm)
+etss_proxy_model_no_change_real (ETableSubset *etss,
+ ETableModel *etm)
{
e_table_model_no_change (E_TABLE_MODEL (etss));
}
static void
-etss_proxy_model_changed_real (ETableSubset *etss, ETableModel *etm)
+etss_proxy_model_changed_real (ETableSubset *etss,
+ ETableModel *etm)
{
e_table_model_changed (E_TABLE_MODEL (etss));
}
static void
-etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, gint row)
+etss_proxy_model_row_changed_real (ETableSubset *etss,
+ ETableModel *etm,
+ gint row)
{
gint view_row = etss_get_view_row (etss, row);
if (view_row != -1)
@@ -319,7 +344,10 @@ etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, gint ro
}
static void
-etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, gint col, gint row)
+etss_proxy_model_cell_changed_real (ETableSubset *etss,
+ ETableModel *etm,
+ gint col,
+ gint row)
{
gint view_row = etss_get_view_row (etss, row);
if (view_row != -1)
@@ -329,68 +357,90 @@ etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, gint c
}
static void
-etss_proxy_model_rows_inserted_real (ETableSubset *etss, ETableModel *etm, gint row, gint count)
+etss_proxy_model_rows_inserted_real (ETableSubset *etss,
+ ETableModel *etm,
+ gint row,
+ gint count)
{
e_table_model_no_change (E_TABLE_MODEL (etss));
}
static void
-etss_proxy_model_rows_deleted_real (ETableSubset *etss, ETableModel *etm, gint row, gint count)
+etss_proxy_model_rows_deleted_real (ETableSubset *etss,
+ ETableModel *etm,
+ gint row,
+ gint count)
{
e_table_model_no_change (E_TABLE_MODEL (etss));
}
static void
-etss_proxy_model_pre_change (ETableModel *etm, ETableSubset *etss)
+etss_proxy_model_pre_change (ETableModel *etm,
+ ETableSubset *etss)
{
if (ETSS_CLASS (etss)->proxy_model_pre_change)
(ETSS_CLASS (etss)->proxy_model_pre_change) (etss, etm);
}
static void
-etss_proxy_model_no_change (ETableModel *etm, ETableSubset *etss)
+etss_proxy_model_no_change (ETableModel *etm,
+ ETableSubset *etss)
{
if (ETSS_CLASS (etss)->proxy_model_no_change)
(ETSS_CLASS (etss)->proxy_model_no_change) (etss, etm);
}
static void
-etss_proxy_model_changed (ETableModel *etm, ETableSubset *etss)
+etss_proxy_model_changed (ETableModel *etm,
+ ETableSubset *etss)
{
if (ETSS_CLASS (etss)->proxy_model_changed)
(ETSS_CLASS (etss)->proxy_model_changed) (etss, etm);
}
static void
-etss_proxy_model_row_changed (ETableModel *etm, gint row, ETableSubset *etss)
+etss_proxy_model_row_changed (ETableModel *etm,
+ gint row,
+ ETableSubset *etss)
{
if (ETSS_CLASS (etss)->proxy_model_row_changed)
(ETSS_CLASS (etss)->proxy_model_row_changed) (etss, etm, row);
}
static void
-etss_proxy_model_cell_changed (ETableModel *etm, gint col, gint row, ETableSubset *etss)
+etss_proxy_model_cell_changed (ETableModel *etm,
+ gint col,
+ gint row,
+ ETableSubset *etss)
{
if (ETSS_CLASS (etss)->proxy_model_cell_changed)
(ETSS_CLASS (etss)->proxy_model_cell_changed) (etss, etm, col, row);
}
static void
-etss_proxy_model_rows_inserted (ETableModel *etm, gint row, gint col, ETableSubset *etss)
+etss_proxy_model_rows_inserted (ETableModel *etm,
+ gint row,
+ gint col,
+ ETableSubset *etss)
{
if (ETSS_CLASS (etss)->proxy_model_rows_inserted)
(ETSS_CLASS (etss)->proxy_model_rows_inserted) (etss, etm, row, col);
}
static void
-etss_proxy_model_rows_deleted (ETableModel *etm, gint row, gint col, ETableSubset *etss)
+etss_proxy_model_rows_deleted (ETableModel *etm,
+ gint row,
+ gint col,
+ ETableSubset *etss)
{
if (ETSS_CLASS (etss)->proxy_model_rows_deleted)
(ETSS_CLASS (etss)->proxy_model_rows_deleted) (etss, etm, row, col);
}
ETableModel *
-e_table_subset_construct (ETableSubset *etss, ETableModel *source, gint nvals)
+e_table_subset_construct (ETableSubset *etss,
+ ETableModel *source,
+ gint nvals)
{
guint *buffer;
gint i;
@@ -410,26 +460,34 @@ e_table_subset_construct (ETableSubset *etss, ETableModel *source, gint nvals)
for (i = 0; i < nvals; i++)
etss->map_table[i] = i;
- etss->table_model_pre_change_id = g_signal_connect (G_OBJECT (source), "model_pre_change",
- G_CALLBACK (etss_proxy_model_pre_change), etss);
- etss->table_model_no_change_id = g_signal_connect (G_OBJECT (source), "model_no_change",
- G_CALLBACK (etss_proxy_model_no_change), etss);
- etss->table_model_changed_id = g_signal_connect (G_OBJECT (source), "model_changed",
- G_CALLBACK (etss_proxy_model_changed), etss);
- etss->table_model_row_changed_id = g_signal_connect (G_OBJECT (source), "model_row_changed",
- G_CALLBACK (etss_proxy_model_row_changed), etss);
- etss->table_model_cell_changed_id = g_signal_connect (G_OBJECT (source), "model_cell_changed",
- G_CALLBACK (etss_proxy_model_cell_changed), etss);
- etss->table_model_rows_inserted_id = g_signal_connect (G_OBJECT (source), "model_rows_inserted",
- G_CALLBACK (etss_proxy_model_rows_inserted), etss);
- etss->table_model_rows_deleted_id = g_signal_connect (G_OBJECT (source), "model_rows_deleted",
- G_CALLBACK (etss_proxy_model_rows_deleted), etss);
+ etss->table_model_pre_change_id = g_signal_connect (
+ source, "model_pre_change",
+ G_CALLBACK (etss_proxy_model_pre_change), etss);
+ etss->table_model_no_change_id = g_signal_connect (
+ source, "model_no_change",
+ G_CALLBACK (etss_proxy_model_no_change), etss);
+ etss->table_model_changed_id = g_signal_connect (
+ source, "model_changed",
+ G_CALLBACK (etss_proxy_model_changed), etss);
+ etss->table_model_row_changed_id = g_signal_connect (
+ source, "model_row_changed",
+ G_CALLBACK (etss_proxy_model_row_changed), etss);
+ etss->table_model_cell_changed_id = g_signal_connect (
+ source, "model_cell_changed",
+ G_CALLBACK (etss_proxy_model_cell_changed), etss);
+ etss->table_model_rows_inserted_id = g_signal_connect (
+ source, "model_rows_inserted",
+ G_CALLBACK (etss_proxy_model_rows_inserted), etss);
+ etss->table_model_rows_deleted_id = g_signal_connect (
+ source, "model_rows_deleted",
+ G_CALLBACK (etss_proxy_model_rows_deleted), etss);
return E_TABLE_MODEL (etss);
}
ETableModel *
-e_table_subset_new (ETableModel *source, const gint nvals)
+e_table_subset_new (ETableModel *source,
+ const gint nvals)
{
ETableSubset *etss = g_object_new (E_TYPE_TABLE_SUBSET, NULL);
@@ -442,8 +500,8 @@ e_table_subset_new (ETableModel *source, const gint nvals)
}
gint
-e_table_subset_model_to_view_row (ETableSubset *ets,
- gint model_row)
+e_table_subset_model_to_view_row (ETableSubset *ets,
+ gint model_row)
{
gint i;
for (i = 0; i < ets->n_map; i++) {
@@ -454,8 +512,8 @@ e_table_subset_model_to_view_row (ETableSubset *ets,
}
gint
-e_table_subset_view_to_model_row (ETableSubset *ets,
- gint view_row)
+e_table_subset_view_to_model_row (ETableSubset *ets,
+ gint view_row)
{
if (view_row >= 0 && view_row < ets->n_map)
return ets->map_table[view_row];
@@ -476,7 +534,7 @@ e_table_subset_get_toplevel (ETableSubset *table)
}
void
-e_table_subset_print_debugging (ETableSubset *table_model)
+e_table_subset_print_debugging (ETableSubset *table_model)
{
gint i;
for (i = 0; i < table_model->n_map; i++) {
diff --git a/widgets/table/e-table-utils.c b/widgets/table/e-table-utils.c
index d84b244fdf..007803585e 100644
--- a/widgets/table/e-table-utils.c
+++ b/widgets/table/e-table-utils.c
@@ -81,8 +81,8 @@ e_table_state_to_header (GtkWidget *widget,
static ETableCol *
et_col_spec_to_col (ETableColumnSpecification *col_spec,
- ETableExtras *ete,
- const gchar *domain)
+ ETableExtras *ete,
+ const gchar *domain)
{
ETableCol *col = NULL;
ECell *cell = NULL;
@@ -146,7 +146,7 @@ et_col_spec_to_col (ETableColumnSpecification *col_spec,
ETableHeader *
e_table_spec_to_full_header (ETableSpecification *spec,
- ETableExtras *ete)
+ ETableExtras *ete)
{
ETableHeader *nh;
gint column;
@@ -170,7 +170,8 @@ e_table_spec_to_full_header (ETableSpecification *spec,
}
static gboolean
-check_col (ETableCol *col, gpointer user_data)
+check_col (ETableCol *col,
+ gpointer user_data)
{
return col->search ? TRUE : FALSE;
}
diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c
index 59d254c862..785feb456b 100644
--- a/widgets/table/e-table-without.c
+++ b/widgets/table/e-table-without.c
@@ -53,7 +53,8 @@ struct _ETableWithoutPrivate {
};
static gboolean
-check (ETableWithout *etw, gint model_row)
+check (ETableWithout *etw,
+ gint model_row)
{
gboolean ret_val;
gpointer key;
@@ -70,7 +71,9 @@ check (ETableWithout *etw, gint model_row)
}
static gboolean
-check_with_key (ETableWithout *etw, gpointer key, gint model_row)
+check_with_key (ETableWithout *etw,
+ gpointer key,
+ gint model_row)
{
gboolean ret_val;
gpointer key2;
@@ -90,14 +93,16 @@ check_with_key (ETableWithout *etw, gpointer key, gint model_row)
}
static gint
-etw_view_to_model_row (ETableWithout *etw, gint view_row)
+etw_view_to_model_row (ETableWithout *etw,
+ gint view_row)
{
ETableSubset *etss = E_TABLE_SUBSET (etw);
return etss->map_table[view_row];
}
static void
-add_row (ETableWithout *etw, gint model_row)
+add_row (ETableWithout *etw,
+ gint model_row)
{
ETableSubset *etss = E_TABLE_SUBSET (etw);
@@ -111,7 +116,8 @@ add_row (ETableWithout *etw, gint model_row)
}
static void
-remove_row (ETableWithout *etw, gint view_row)
+remove_row (ETableWithout *etw,
+ gint view_row)
{
ETableSubset *etss = E_TABLE_SUBSET (etw);
@@ -126,8 +132,8 @@ remove_row (ETableWithout *etw, gint view_row)
static void
delete_hash_element (gpointer key,
- gpointer value,
- gpointer closure)
+ gpointer value,
+ gpointer closure)
{
ETableWithout *etw = closure;
if (etw->priv->free_duplicated_key_func)
@@ -209,7 +215,8 @@ etw_proxy_model_rows_deleted (ETableSubset *etss,
}
static void
-etw_proxy_model_changed (ETableSubset *etss, ETableModel *etm)
+etw_proxy_model_changed (ETableSubset *etss,
+ ETableModel *etm)
{
gint i; /* Model row */
gint j; /* View row */
@@ -256,15 +263,15 @@ etw_init (ETableWithout *etw)
}
ETableModel *
-e_table_without_construct (ETableWithout *etw,
- ETableModel *source,
- GHashFunc hash_func,
- GCompareFunc compare_func,
- ETableWithoutGetKeyFunc get_key_func,
- ETableWithoutDuplicateKeyFunc duplicate_key_func,
- ETableWithoutFreeKeyFunc free_gotten_key_func,
- ETableWithoutFreeKeyFunc free_duplicated_key_func,
- void *closure)
+e_table_without_construct (ETableWithout *etw,
+ ETableModel *source,
+ GHashFunc hash_func,
+ GCompareFunc compare_func,
+ ETableWithoutGetKeyFunc get_key_func,
+ ETableWithoutDuplicateKeyFunc duplicate_key_func,
+ ETableWithoutFreeKeyFunc free_gotten_key_func,
+ ETableWithoutFreeKeyFunc free_duplicated_key_func,
+ gpointer closure)
{
if (e_table_subset_construct (E_TABLE_SUBSET (etw), source, 1) == NULL)
return NULL;
@@ -284,14 +291,14 @@ e_table_without_construct (ETableWithout *etw,
}
ETableModel *
-e_table_without_new (ETableModel *source,
- GHashFunc hash_func,
- GCompareFunc compare_func,
- ETableWithoutGetKeyFunc get_key_func,
- ETableWithoutDuplicateKeyFunc duplicate_key_func,
- ETableWithoutFreeKeyFunc free_gotten_key_func,
- ETableWithoutFreeKeyFunc free_duplicated_key_func,
- void *closure)
+e_table_without_new (ETableModel *source,
+ GHashFunc hash_func,
+ GCompareFunc compare_func,
+ ETableWithoutGetKeyFunc get_key_func,
+ ETableWithoutDuplicateKeyFunc duplicate_key_func,
+ ETableWithoutFreeKeyFunc free_gotten_key_func,
+ ETableWithoutFreeKeyFunc free_duplicated_key_func,
+ gpointer closure)
{
ETableWithout *etw = g_object_new (E_TYPE_TABLE_WITHOUT, NULL);
@@ -312,8 +319,9 @@ e_table_without_new (ETableModel *source,
return (ETableModel *) etw;
}
-void e_table_without_hide (ETableWithout *etw,
- void *key)
+void
+e_table_without_hide (ETableWithout *etw,
+ gpointer key)
{
gint i; /* View row */
ETableSubset *etss = E_TABLE_SUBSET (etw);
@@ -331,8 +339,9 @@ void e_table_without_hide (ETableWithout *etw,
}
/* An adopted key will later be freed using the free_duplicated_key function. */
-void e_table_without_hide_adopt (ETableWithout *etw,
- void *key)
+void
+e_table_without_hide_adopt (ETableWithout *etw,
+ gpointer key)
{
gint i; /* View row */
ETableSubset *etss = E_TABLE_SUBSET (etw);
@@ -347,8 +356,8 @@ void e_table_without_hide_adopt (ETableWithout *etw,
}
void
-e_table_without_show (ETableWithout *etw,
- void *key)
+e_table_without_show (ETableWithout *etw,
+ gpointer key)
{
gint i; /* Model row */
ETableSubset *etss = E_TABLE_SUBSET (etw);
@@ -372,7 +381,7 @@ e_table_without_show (ETableWithout *etw,
}
void
-e_table_without_show_all (ETableWithout *etw)
+e_table_without_show_all (ETableWithout *etw)
{
gint i; /* Model row */
gint row_count;
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index f755cbc451..472681796f 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -232,7 +232,9 @@ current_search_col (ETable *et)
}
static void
-et_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural)
+et_get_preferred_width (GtkWidget *widget,
+ gint *minimum,
+ gint *natural)
{
ETable *et = E_TABLE (widget);
@@ -246,7 +248,9 @@ et_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural)
}
static void
-et_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natural)
+et_get_preferred_height (GtkWidget *widget,
+ gint *minimum,
+ gint *natural)
{
GTK_WIDGET_CLASS (e_table_parent_class)->
get_preferred_height (widget, minimum, natural);
@@ -262,7 +266,8 @@ set_header_width (ETable *et)
}
static void
-structure_changed (ETableHeader *header, ETable *et)
+structure_changed (ETableHeader *header,
+ ETable *et)
{
e_table_state_change (et);
set_header_width (et);
@@ -270,14 +275,17 @@ structure_changed (ETableHeader *header, ETable *et)
}
static void
-expansion_changed (ETableHeader *header, ETable *et)
+expansion_changed (ETableHeader *header,
+ ETable *et)
{
e_table_state_change (et);
set_header_width (et);
}
static void
-dimension_changed (ETableHeader *header, gint total_width, ETable *et)
+dimension_changed (ETableHeader *header,
+ gint total_width,
+ ETable *et)
{
set_header_width (et);
}
@@ -303,7 +311,8 @@ disconnect_header (ETable *e_table)
}
static void
-connect_header (ETable *e_table, ETableState *state)
+connect_header (ETable *e_table,
+ ETableState *state)
{
if (e_table->header != NULL)
disconnect_header (e_table);
@@ -311,15 +320,15 @@ connect_header (ETable *e_table, ETableState *state)
e_table->header = e_table_state_to_header (
GTK_WIDGET (e_table), e_table->full_header, state);
- e_table->structure_change_id =
- g_signal_connect (G_OBJECT (e_table->header), "structure_change",
- G_CALLBACK (structure_changed), e_table);
- e_table->expansion_change_id =
- g_signal_connect (G_OBJECT (e_table->header), "expansion_change",
- G_CALLBACK (expansion_changed), e_table);
- e_table->dimension_change_id =
- g_signal_connect (G_OBJECT (e_table->header), "dimension_change",
- G_CALLBACK (dimension_changed), e_table);
+ e_table->structure_change_id = g_signal_connect (
+ e_table->header, "structure_change",
+ G_CALLBACK (structure_changed), e_table);
+ e_table->expansion_change_id = g_signal_connect (
+ e_table->header, "expansion_change",
+ G_CALLBACK (expansion_changed), e_table);
+ e_table->dimension_change_id = g_signal_connect (
+ e_table->header, "dimension_change",
+ G_CALLBACK (dimension_changed), e_table);
}
static void
@@ -499,7 +508,8 @@ et_search_search (ETableSearch *search,
}
static void
-et_search_accept (ETableSearch *search, ETable *et)
+et_search_accept (ETableSearch *search,
+ ETable *et)
{
gint cursor;
ETableCol *col = current_search_col (et);
@@ -521,12 +531,12 @@ init_search (ETable *e_table)
e_table->search = e_table_search_new ();
- e_table->search_search_id =
- g_signal_connect (G_OBJECT (e_table->search), "search",
- G_CALLBACK (et_search_search), e_table);
- e_table->search_accept_id =
- g_signal_connect (G_OBJECT (e_table->search), "accept",
- G_CALLBACK (et_search_accept), e_table);
+ e_table->search_search_id = g_signal_connect (
+ e_table->search, "search",
+ G_CALLBACK (et_search_search), e_table);
+ e_table->search_accept_id = g_signal_connect (
+ e_table->search, "accept",
+ G_CALLBACK (et_search_accept), e_table);
}
static void
@@ -610,7 +620,8 @@ et_grab_focus (GtkWidget *widget)
/* Focus handler for the ETable */
static gint
-et_focus (GtkWidget *container, GtkDirectionType direction)
+et_focus (GtkWidget *container,
+ GtkDirectionType direction)
{
ETable *e_table;
@@ -647,7 +658,9 @@ set_header_canvas_width (ETable *e_table)
}
static void
-header_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETable *e_table)
+header_canvas_size_allocate (GtkWidget *widget,
+ GtkAllocation *alloc,
+ ETable *e_table)
{
GtkAllocation allocation;
@@ -657,9 +670,9 @@ header_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETable *e_
GTK_WIDGET (e_table->header_canvas), &allocation);
/* When the header item is created ->height == 0,
- as the font is only created when everything is realized.
- So we set the usize here as well, so that the size of the
- header is correct */
+ * as the font is only created when everything is realized.
+ * So we set the usize here as well, so that the size of the
+ * header is correct */
if (allocation.height != E_TABLE_HEADER_ITEM (e_table->header_item)->height)
g_object_set (
e_table->header_canvas, "height-request",
@@ -668,7 +681,8 @@ header_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETable *e_
}
static void
-group_info_changed (ETableSortInfo *info, ETable *et)
+group_info_changed (ETableSortInfo *info,
+ ETable *et)
{
gboolean will_be_grouped = e_table_sort_info_grouping_get_count (info) > 0;
clear_current_search_col (et);
@@ -684,7 +698,8 @@ group_info_changed (ETableSortInfo *info, ETable *et)
}
static void
-sort_info_changed (ETableSortInfo *info, ETable *et)
+sort_info_changed (ETableSortInfo *info,
+ ETable *et)
{
clear_current_search_col (et);
e_table_state_change (et);
@@ -751,8 +766,9 @@ table_canvas_reflow_idle (ETable *e_table)
}
static void
-table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
- ETable *e_table)
+table_canvas_size_allocate (GtkWidget *widget,
+ GtkAllocation *alloc,
+ ETable *e_table)
{
gdouble width;
gdouble height;
@@ -782,7 +798,8 @@ table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
}
static void
-table_canvas_reflow (GnomeCanvas *canvas, ETable *e_table)
+table_canvas_reflow (GnomeCanvas *canvas,
+ ETable *e_table)
{
if (!e_table->reflow_idle_id)
e_table->reflow_idle_id = g_idle_add_full (
@@ -791,7 +808,10 @@ table_canvas_reflow (GnomeCanvas *canvas, ETable *e_table)
}
static void
-click_to_add_cursor_change (ETableClickToAdd *etcta, gint row, gint col, ETable *et)
+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));
@@ -800,7 +820,9 @@ click_to_add_cursor_change (ETableClickToAdd *etcta, gint row, gint col, ETable
}
static void
-group_cursor_change (ETableGroup *etg, gint row, ETable *et)
+group_cursor_change (ETableGroup *etg,
+ gint row,
+ ETable *et)
{
ETableCursorLoc old_cursor_loc;
@@ -814,19 +836,29 @@ group_cursor_change (ETableGroup *etg, gint row, ETable *et)
}
static void
-group_cursor_activated (ETableGroup *etg, gint row, ETable *et)
+group_cursor_activated (ETableGroup *etg,
+ gint row,
+ ETable *et)
{
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)
+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);
}
static gboolean
-group_right_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
+group_right_click (ETableGroup *etg,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETable *et)
{
gboolean return_val = FALSE;
@@ -838,7 +870,11 @@ group_right_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable
}
static gboolean
-group_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
+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);
@@ -846,7 +882,11 @@ group_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
}
static gboolean
-group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
+group_key_press (ETableGroup *etg,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETable *et)
{
gboolean return_val = FALSE;
GdkEventKey *key = (GdkEventKey *) event;
@@ -923,7 +963,11 @@ group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *
}
static gboolean
-group_start_drag (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
+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,
@@ -932,7 +976,8 @@ group_start_drag (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable
}
static void
-et_table_model_changed (ETableModel *model, ETable *et)
+et_table_model_changed (ETableModel *model,
+ ETable *et)
{
et->need_rebuild = TRUE;
if (!et->rebuild_idle_id) {
@@ -943,7 +988,9 @@ et_table_model_changed (ETableModel *model, ETable *et)
}
static void
-et_table_row_changed (ETableModel *table_model, gint row, ETable *et)
+et_table_row_changed (ETableModel *table_model,
+ gint row,
+ ETable *et)
{
if (!et->need_rebuild) {
if (e_table_group_remove (et->group, row))
@@ -953,13 +1000,19 @@ et_table_row_changed (ETableModel *table_model, gint row, ETable *et)
}
static void
-et_table_cell_changed (ETableModel *table_model, gint view_col, gint row, ETable *et)
+et_table_cell_changed (ETableModel *table_model,
+ gint view_col,
+ gint row,
+ ETable *et)
{
et_table_row_changed (table_model, row, et);
}
static void
-et_table_rows_inserted (ETableModel *table_model, gint row, gint count, ETable *et)
+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);
@@ -974,7 +1027,10 @@ et_table_rows_inserted (ETableModel *table_model, gint row, gint count, ETable *
}
static void
-et_table_rows_deleted (ETableModel *table_model, gint row, gint count, ETable *et)
+et_table_rows_deleted (ETableModel *table_model,
+ gint row,
+ gint count,
+ ETable *et)
{
gint row_count = e_table_model_row_count (table_model);
if (!et->need_rebuild) {
@@ -1022,20 +1078,27 @@ et_build_groups (ETable *et)
"selection_model", et->selection,
NULL);
- g_signal_connect (G_OBJECT (et->group), "cursor_change",
- G_CALLBACK (group_cursor_change), et);
- g_signal_connect (G_OBJECT (et->group), "cursor_activated",
- G_CALLBACK (group_cursor_activated), et);
- g_signal_connect (G_OBJECT (et->group), "double_click",
- G_CALLBACK (group_double_click), et);
- g_signal_connect (G_OBJECT (et->group), "right_click",
- G_CALLBACK (group_right_click), et);
- g_signal_connect (G_OBJECT (et->group), "click",
- G_CALLBACK (group_click), et);
- g_signal_connect (G_OBJECT (et->group), "key_press",
- G_CALLBACK (group_key_press), et);
- g_signal_connect (G_OBJECT (et->group), "start_drag",
- G_CALLBACK (group_start_drag), et);
+ g_signal_connect (
+ et->group, "cursor_change",
+ G_CALLBACK (group_cursor_change), et);
+ g_signal_connect (
+ et->group, "cursor_activated",
+ G_CALLBACK (group_cursor_activated), et);
+ g_signal_connect (
+ et->group, "double_click",
+ G_CALLBACK (group_double_click), et);
+ g_signal_connect (
+ et->group, "right_click",
+ G_CALLBACK (group_right_click), et);
+ g_signal_connect (
+ et->group, "click",
+ G_CALLBACK (group_click), et);
+ g_signal_connect (
+ et->group, "key_press",
+ G_CALLBACK (group_key_press), et);
+ g_signal_connect (
+ et->group, "start_drag",
+ G_CALLBACK (group_start_drag), et);
if (!(et->is_grouped) && was_grouped)
et_disconnect_model (et);
@@ -1102,7 +1165,8 @@ changed_idle (gpointer data)
}
static void
-et_canvas_realize (GtkWidget *canvas, ETable *e_table)
+et_canvas_realize (GtkWidget *canvas,
+ ETable *e_table)
{
GtkWidget *widget;
GtkStyle *style;
@@ -1120,7 +1184,9 @@ et_canvas_realize (GtkWidget *canvas, ETable *e_table)
}
static gboolean
-white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETable *e_table)
+white_item_event (GnomeCanvasItem *white_item,
+ GdkEvent *event,
+ ETable *e_table)
{
gboolean return_val = 0;
g_signal_emit (G_OBJECT (e_table), et_signals[WHITE_SPACE_EVENT], 0,
@@ -1143,7 +1209,9 @@ et_eti_leave_edit (ETable *et)
}
static gint
-et_canvas_root_event (GnomeCanvasItem *root, GdkEvent *event, ETable *e_table)
+et_canvas_root_event (GnomeCanvasItem *root,
+ GdkEvent *event,
+ ETable *e_table)
{
switch (event->type) {
case GDK_BUTTON_PRESS:
@@ -1188,7 +1256,9 @@ focus_first_etable_item (ETableGroup *group)
* always, and also give the focus to some ETableItem if we get focused.
*/
static gint
-table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data)
+table_canvas_focus_event_cb (GtkWidget *widget,
+ GdkEventFocus *event,
+ gpointer data)
{
GnomeCanvas *canvas;
ECanvas *ecanvas;
@@ -1232,7 +1302,9 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d
}
static gboolean
-canvas_vbox_event (ECanvasVbox *vbox, GdkEventKey *key, ETable *etable)
+canvas_vbox_event (ECanvasVbox *vbox,
+ GdkEventKey *key,
+ ETable *etable)
{
if (key->type != GDK_KEY_PRESS &&
key->type != GDK_KEY_RELEASE) {
@@ -1254,7 +1326,9 @@ canvas_vbox_event (ECanvasVbox *vbox, GdkEventKey *key, ETable *etable)
}
static gboolean
-click_to_add_event (ETableClickToAdd *etcta, GdkEventKey *key, ETable *etable)
+click_to_add_event (ETableClickToAdd *etcta,
+ GdkEventKey *key,
+ ETable *etable)
{
if (key->type != GDK_KEY_PRESS &&
key->type != GDK_KEY_RELEASE) {
@@ -1284,50 +1358,53 @@ click_to_add_event (ETableClickToAdd *etcta, GdkEventKey *key, ETable *etable)
}
static void
-e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *header,
- ETableModel *model)
+e_table_setup_table (ETable *e_table,
+ ETableHeader *full_header,
+ ETableHeader *header,
+ ETableModel *model)
{
GtkWidget *widget;
GtkStyle *style;
e_table->table_canvas = GNOME_CANVAS (e_canvas_new ());
g_signal_connect (
- G_OBJECT (e_table->table_canvas), "size_allocate",
+ e_table->table_canvas, "size_allocate",
G_CALLBACK (table_canvas_size_allocate), e_table);
g_signal_connect (
- G_OBJECT (e_table->table_canvas), "focus_in_event",
+ e_table->table_canvas, "focus_in_event",
G_CALLBACK (table_canvas_focus_event_cb), e_table);
g_signal_connect (
- G_OBJECT (e_table->table_canvas), "focus_out_event",
+ e_table->table_canvas, "focus_out_event",
G_CALLBACK (table_canvas_focus_event_cb), e_table);
g_signal_connect (
- G_OBJECT (e_table), "drag_begin",
+ e_table, "drag_begin",
G_CALLBACK (et_drag_begin), e_table);
g_signal_connect (
- G_OBJECT (e_table), "drag_end",
+ e_table, "drag_end",
G_CALLBACK (et_drag_end), e_table);
g_signal_connect (
- G_OBJECT (e_table), "drag_data_get",
+ e_table, "drag_data_get",
G_CALLBACK (et_drag_data_get), e_table);
g_signal_connect (
- G_OBJECT (e_table), "drag_data_delete",
+ e_table, "drag_data_delete",
G_CALLBACK (et_drag_data_delete), e_table);
g_signal_connect (
- G_OBJECT (e_table), "drag_motion",
+ e_table, "drag_motion",
G_CALLBACK (et_drag_motion), e_table);
g_signal_connect (
- G_OBJECT (e_table), "drag_leave",
+ e_table, "drag_leave",
G_CALLBACK (et_drag_leave), e_table);
g_signal_connect (
- G_OBJECT (e_table), "drag_drop",
+ e_table, "drag_drop",
G_CALLBACK (et_drag_drop), e_table);
g_signal_connect (
- G_OBJECT (e_table), "drag_data_received",
+ e_table, "drag_data_received",
G_CALLBACK (et_drag_data_received), e_table);
- g_signal_connect (G_OBJECT(e_table->table_canvas), "reflow",
- G_CALLBACK (table_canvas_reflow), e_table);
+ g_signal_connect (
+ e_table->table_canvas, "reflow",
+ G_CALLBACK (table_canvas_reflow), e_table);
widget = GTK_WIDGET (e_table->table_canvas);
style = gtk_widget_get_style (widget);
@@ -1340,14 +1417,17 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h
"fill_color_gdk", &style->base[GTK_STATE_NORMAL],
NULL);
- g_signal_connect (G_OBJECT (e_table->white_item), "event",
- G_CALLBACK (white_item_event), e_table);
+ g_signal_connect (
+ e_table->white_item, "event",
+ 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_signal_connect (
+ e_table->table_canvas, "realize",
+ 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_signal_connect (
+ gnome_canvas_root (e_table->table_canvas), "event",
+ G_CALLBACK (et_canvas_root_event), e_table);
e_table->canvas_vbox = gnome_canvas_item_new (
gnome_canvas_root (e_table->table_canvas),
@@ -1389,7 +1469,8 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h
}
static void
-e_table_fill_table (ETable *e_table, ETableModel *model)
+e_table_fill_table (ETable *e_table,
+ ETableModel *model)
{
e_table_group_add_all (e_table->group);
}
@@ -1404,7 +1485,8 @@ 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;
@@ -1434,12 +1516,13 @@ e_table_set_state_object (ETable *e_table, ETableState *state)
if (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",
- G_CALLBACK (group_info_changed), e_table);
- e_table->sort_info_change_id =
- g_signal_connect (G_OBJECT (e_table->sort_info), "sort_info_changed",
- G_CALLBACK (sort_info_changed), e_table);
+ e_table->group_info_change_id = g_signal_connect (
+ e_table->sort_info, "group_info_changed",
+ G_CALLBACK (group_info_changed), e_table);
+
+ e_table->sort_info_change_id = g_signal_connect (
+ e_table->sort_info, "sort_info_changed",
+ G_CALLBACK (sort_info_changed), e_table);
}
else
e_table->sort_info = NULL;
@@ -1474,8 +1557,8 @@ e_table_set_state_object (ETable *e_table, ETableState *state)
*
**/
void
-e_table_set_state (ETable *e_table,
- const gchar *state_str)
+e_table_set_state (ETable *e_table,
+ const gchar *state_str)
{
ETableState *state;
@@ -1501,8 +1584,8 @@ e_table_set_state (ETable *e_table,
*
**/
void
-e_table_load_state (ETable *e_table,
- const gchar *filename)
+e_table_load_state (ETable *e_table,
+ const gchar *filename)
{
ETableState *state;
@@ -1592,8 +1675,8 @@ gchar *e_table_get_state (ETable *e_table
*
**/
void
-e_table_save_state (ETable *e_table,
- const gchar *filename)
+e_table_save_state (ETable *e_table,
+ const gchar *filename)
{
ETableState *state;
@@ -1603,20 +1686,26 @@ e_table_save_state (ETable *e_table,
}
static void
-et_selection_model_selection_changed (ETableGroup *etg, ETable *et)
+et_selection_model_selection_changed (ETableGroup *etg,
+ ETable *et)
{
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)
+et_selection_model_selection_row_changed (ETableGroup *etg,
+ gint row,
+ ETable *et)
{
g_signal_emit (G_OBJECT (et), et_signals[SELECTION_CHANGE], 0);
}
static ETable *
-et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
- ETableSpecification *specification, ETableState *state)
+et_real_construct (ETable *e_table,
+ ETableModel *etm,
+ ETableExtras *ete,
+ ETableSpecification *specification,
+ ETableState *state)
{
gint row = 0;
gint col_count, i;
@@ -1751,8 +1840,11 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
* The passed in value @e_table or %NULL if there's an error.
**/
ETable *
-e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
- const gchar *spec_str, const gchar *state_str)
+e_table_construct (ETable *e_table,
+ ETableModel *etm,
+ ETableExtras *ete,
+ const gchar *spec_str,
+ const gchar *state_str)
{
ETableSpecification *specification;
ETableState *state;
@@ -1811,8 +1903,11 @@ e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
* The passed in value @e_table or %NULL if there's an error.
**/
ETable *
-e_table_construct_from_spec_file (ETable *e_table, ETableModel *etm, ETableExtras *ete,
- const gchar *spec_fn, const gchar *state_fn)
+e_table_construct_from_spec_file (ETable *e_table,
+ ETableModel *etm,
+ ETableExtras *ete,
+ const gchar *spec_fn,
+ const gchar *state_fn)
{
ETableSpecification *specification;
ETableState *state;
@@ -2027,7 +2122,8 @@ e_table_get_specification (ETable *e_table)
}
gint
-e_table_set_specification (ETable *e_table, const gchar *spec)
+e_table_set_specification (ETable *e_table,
+ const gchar *spec)
{
xmlDoc *xmlSpec;
gint ret;
@@ -2045,7 +2141,8 @@ e_table_set_specification (ETable *e_table, const gchar *spec)
}
void
-e_table_save_specification (ETable *e_table, const gchar *filename)
+e_table_save_specification (ETable *e_table,
+ const gchar *filename)
{
xmlDoc *doc = et_build_tree (e_table);
@@ -2059,7 +2156,8 @@ e_table_save_specification (ETable *e_table, const gchar *filename)
}
gint
-e_table_load_specification (ETable *e_table, gchar *filename)
+e_table_load_specification (ETable *e_table,
+ gchar *filename)
{
xmlDoc *xmlSpec;
gint ret;
@@ -2093,7 +2191,8 @@ e_table_load_specification (ETable *e_table, gchar *filename)
* Sets the cursor row and the selection to the given row number.
**/
void
-e_table_set_cursor_row (ETable *e_table, gint row)
+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));
@@ -2140,9 +2239,9 @@ e_table_get_cursor_row (ETable *e_table)
* and then act upon that list. (In inverse order if it's rows.)
**/
void
-e_table_selected_row_foreach (ETable *e_table,
- EForeachFunc callback,
- gpointer closure)
+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));
@@ -2162,7 +2261,7 @@ e_table_selected_row_foreach (ETable *e_table,
* The number of rows selected.
**/
gint
-e_table_selected_count (ETable *e_table)
+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);
@@ -2248,13 +2347,13 @@ e_table_commit_click_to_add (ETable *table)
static void
et_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETable *etable = E_TABLE (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_MODEL:
g_value_set_object (value, etable->model);
break;
@@ -2311,13 +2410,13 @@ typedef struct {
static void
et_set_property (GObject *object,
- guint prop_id,
+ guint property_id,
const GValue *value,
GParamSpec *pspec)
{
ETable *etable = E_TABLE (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_LENGTH_THRESHOLD:
etable->length_threshold = g_value_get_int (value);
if (etable->group) {
@@ -2418,8 +2517,8 @@ et_set_property (GObject *object,
* The model row number.
**/
gint
-e_table_get_next_row (ETable *e_table,
- gint model_row)
+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);
@@ -2452,8 +2551,8 @@ e_table_get_next_row (ETable *e_table,
* The model row number.
**/
gint
-e_table_get_prev_row (ETable *e_table,
- gint model_row)
+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);
@@ -2481,8 +2580,8 @@ e_table_get_prev_row (ETable *e_table,
* The view row number.
**/
gint
-e_table_model_to_view_row (ETable *e_table,
- gint model_row)
+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);
@@ -2504,8 +2603,8 @@ e_table_model_to_view_row (ETable *e_table,
* The model row number.
**/
gint
-e_table_view_to_model_row (ETable *e_table,
- gint view_row)
+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);
@@ -2529,8 +2628,10 @@ e_table_view_to_model_row (ETable *e_table,
**/
void
e_table_get_cell_at (ETable *table,
- gint x, gint y,
- gint *row_return, gint *col_return)
+ gint x,
+ gint y,
+ gint *row_return,
+ gint *col_return)
{
GtkAdjustment *adjustment;
GtkScrollable *scrollable;
@@ -2571,9 +2672,12 @@ e_table_get_cell_at (ETable *table,
**/
void
e_table_get_cell_geometry (ETable *table,
- gint row, gint col,
- gint *x_return, gint *y_return,
- gint *width_return, gint *height_return)
+ gint row,
+ gint col,
+ gint *x_return,
+ gint *y_return,
+ gint *width_return,
+ gint *height_return)
{
GtkAllocation allocation;
GtkAdjustment *adjustment;
@@ -2614,7 +2718,9 @@ e_table_get_cell_geometry (ETable *table,
* based on the mouse motion information in the group.
**/
void
-e_table_get_mouse_over_cell (ETable *table, gint *row, gint *col)
+e_table_get_mouse_over_cell (ETable *table,
+ gint *row,
+ gint *col)
{
g_return_if_fail (table != NULL);
g_return_if_fail (E_IS_TABLE (table));
@@ -2724,12 +2830,12 @@ struct _GtkDragSourceInfo
*
**/
void
-e_table_drag_get_data (ETable *table,
- gint row,
- gint col,
- GdkDragContext *context,
- GdkAtom target,
- guint32 time)
+e_table_drag_get_data (ETable *table,
+ gint row,
+ gint col,
+ GdkDragContext *context,
+ GdkAtom target,
+ guint32 time)
{
g_return_if_fail (table != NULL);
g_return_if_fail (E_IS_TABLE (table));
@@ -2751,8 +2857,8 @@ e_table_drag_get_data (ETable *table,
**/
void
e_table_drag_highlight (ETable *table,
- gint row,
- gint col)
+ gint row,
+ gint col)
{
GtkAllocation allocation;
GtkAdjustment *adjustment;
@@ -2867,7 +2973,10 @@ e_table_drag_dest_unset (GtkWidget *widget)
/* Source side */
static gint
-et_real_start_drag (ETable *table, gint row, gint col, GdkEvent *event)
+et_real_start_drag (ETable *table,
+ gint row,
+ gint col,
+ GdkEvent *event)
{
GtkDragSourceInfo *info;
GdkDragContext *context;
@@ -2910,11 +3019,11 @@ et_real_start_drag (ETable *table, gint row, gint col, GdkEvent *event)
* Registers this table as a drag site, and possibly adds default behaviors.
**/
void
-e_table_drag_source_set (ETable *table,
- GdkModifierType start_button_mask,
- const GtkTargetEntry *targets,
- gint n_targets,
- GdkDragAction actions)
+e_table_drag_source_set (ETable *table,
+ GdkModifierType start_button_mask,
+ const GtkTargetEntry *targets,
+ gint n_targets,
+ GdkDragAction actions)
{
ETableDragSourceSite *site;
GtkWidget *canvas;
@@ -2995,13 +3104,13 @@ e_table_drag_source_unset (ETable *table)
* The drag context.
**/
GdkDragContext *
-e_table_drag_begin (ETable *table,
- gint row,
- gint col,
- GtkTargetList *targets,
- GdkDragAction actions,
- gint button,
- GdkEvent *event)
+e_table_drag_begin (ETable *table,
+ gint row,
+ gint col,
+ GtkTargetList *targets,
+ GdkDragAction actions,
+ gint button,
+ GdkEvent *event)
{
g_return_val_if_fail (table != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE (table), NULL);
@@ -3018,8 +3127,8 @@ e_table_drag_begin (ETable *table,
static void
et_drag_begin (GtkWidget *widget,
- GdkDragContext *context,
- ETable *et)
+ GdkDragContext *context,
+ ETable *et)
{
g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_BEGIN], 0,
et->drag_row, et->drag_col, context);
@@ -3027,8 +3136,8 @@ et_drag_begin (GtkWidget *widget,
static void
et_drag_end (GtkWidget *widget,
- GdkDragContext *context,
- ETable *et)
+ GdkDragContext *context,
+ ETable *et)
{
g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_END], 0,
et->drag_row, et->drag_col, context);
@@ -3036,11 +3145,11 @@ et_drag_end (GtkWidget *widget,
static void
et_drag_data_get (GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- ETable *et)
+ GdkDragContext *context,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ ETable *et)
{
g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_DATA_GET], 0,
et->drag_row, et->drag_col, context, selection_data,
@@ -3049,8 +3158,8 @@ et_drag_data_get (GtkWidget *widget,
static void
et_drag_data_delete (GtkWidget *widget,
- GdkDragContext *context,
- ETable *et)
+ GdkDragContext *context,
+ ETable *et)
{
g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_DATA_DELETE], 0,
et->drag_row, et->drag_col, context);
@@ -3058,10 +3167,10 @@ et_drag_data_delete (GtkWidget *widget,
static gboolean
do_drag_motion (ETable *et,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time)
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time)
{
gboolean ret_val;
gint row = -1, col = -1;
@@ -3141,7 +3250,8 @@ scroll_timeout (gpointer data)
}
static void
-scroll_on (ETable *et, guint scroll_direction)
+scroll_on (ETable *et,
+ guint scroll_direction)
{
if (et->scroll_idle_id == 0 || scroll_direction != et->scroll_direction) {
if (et->scroll_idle_id != 0)
@@ -3177,7 +3287,8 @@ context_destroyed (gpointer data)
}
static void
-context_connect (ETable *et, GdkDragContext *context)
+context_connect (ETable *et,
+ GdkDragContext *context)
{
if (g_dataset_get_data (context, "e-table") == NULL) {
g_object_ref (et);
@@ -3187,9 +3298,9 @@ context_connect (ETable *et, GdkDragContext *context)
static void
et_drag_leave (GtkWidget *widget,
- GdkDragContext *context,
- guint time,
- ETable *et)
+ GdkDragContext *context,
+ guint time,
+ ETable *et)
{
g_signal_emit (G_OBJECT (et), et_signals[TABLE_DRAG_LEAVE], 0,
et->drop_row, et->drop_col, context, time);
@@ -3201,11 +3312,11 @@ et_drag_leave (GtkWidget *widget,
static gboolean
et_drag_motion (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time,
- ETable *et)
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ ETable *et)
{
GtkAllocation allocation;
gboolean ret_val;
@@ -3240,11 +3351,11 @@ et_drag_motion (GtkWidget *widget,
static gboolean
et_drag_drop (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time,
- ETable *et)
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ ETable *et)
{
gboolean ret_val;
gint row, col;
@@ -3271,13 +3382,13 @@ et_drag_drop (GtkWidget *widget,
static void
et_drag_data_received (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- ETable *et)
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ ETable *et)
{
gint row, col;
diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h
index 99daf6d1e5..e1e4e0eb8f 100644
--- a/widgets/table/e-table.h
+++ b/widgets/table/e-table.h
@@ -121,8 +121,8 @@ struct _ETable {
gint length_threshold;
gint rebuild_idle_id;
- guint need_rebuild:1;
- guint size_allocated:1;
+ guint need_rebuild : 1;
+ guint size_allocated : 1;
/*
* Configuration settings
diff --git a/widgets/table/e-tree-memory-callbacks.c b/widgets/table/e-tree-memory-callbacks.c
index 7281f3d327..9f8d7d468a 100644
--- a/widgets/table/e-tree-memory-callbacks.c
+++ b/widgets/table/e-tree-memory-callbacks.c
@@ -34,7 +34,8 @@
G_DEFINE_TYPE (ETreeMemoryCallbacks, e_tree_memory_callbacks, E_TYPE_TREE_MEMORY)
static GdkPixbuf *
-etmc_icon_at (ETreeModel *etm, ETreePath node)
+etmc_icon_at (ETreeModel *etm,
+ ETreePath node)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -64,7 +65,8 @@ etmc_has_save_id (ETreeModel *etm)
}
static gchar *
-etmc_get_save_id (ETreeModel *etm, ETreePath node)
+etmc_get_save_id (ETreeModel *etm,
+ ETreePath node)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -86,7 +88,8 @@ etmc_has_get_node_by_id (ETreeModel *etm)
}
static ETreePath
-etmc_get_node_by_id (ETreeModel *etm, const gchar *save_id)
+etmc_get_node_by_id (ETreeModel *etm,
+ const gchar *save_id)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -97,7 +100,9 @@ etmc_get_node_by_id (ETreeModel *etm, const gchar *save_id)
}
static gpointer
-etmc_sort_value_at (ETreeModel *etm, ETreePath node, gint col)
+etmc_sort_value_at (ETreeModel *etm,
+ ETreePath node,
+ gint col)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -108,7 +113,9 @@ etmc_sort_value_at (ETreeModel *etm, ETreePath node, gint col)
}
static gpointer
-etmc_value_at (ETreeModel *etm, ETreePath node, gint col)
+etmc_value_at (ETreeModel *etm,
+ ETreePath node,
+ gint col)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -116,7 +123,10 @@ etmc_value_at (ETreeModel *etm, ETreePath node, gint col)
}
static void
-etmc_set_value_at (ETreeModel *etm, ETreePath node, gint col, gconstpointer val)
+etmc_set_value_at (ETreeModel *etm,
+ ETreePath node,
+ gint col,
+ gconstpointer val)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -124,7 +134,9 @@ etmc_set_value_at (ETreeModel *etm, ETreePath node, gint col, gconstpointer val)
}
static gboolean
-etmc_is_editable (ETreeModel *etm, ETreePath node, gint col)
+etmc_is_editable (ETreeModel *etm,
+ ETreePath node,
+ gint col)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -133,7 +145,9 @@ etmc_is_editable (ETreeModel *etm, ETreePath node, gint col)
/* The default for etmc_duplicate_value is to return the raw value. */
static gpointer
-etmc_duplicate_value (ETreeModel *etm, gint col, gconstpointer value)
+etmc_duplicate_value (ETreeModel *etm,
+ gint col,
+ gconstpointer value)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -144,7 +158,9 @@ etmc_duplicate_value (ETreeModel *etm, gint col, gconstpointer value)
}
static void
-etmc_free_value (ETreeModel *etm, gint col, gpointer value)
+etmc_free_value (ETreeModel *etm,
+ gint col,
+ gpointer value)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -153,7 +169,8 @@ etmc_free_value (ETreeModel *etm, gint col, gpointer value)
}
static gpointer
-etmc_initialize_value (ETreeModel *etm, gint col)
+etmc_initialize_value (ETreeModel *etm,
+ gint col)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -164,7 +181,9 @@ etmc_initialize_value (ETreeModel *etm, gint col)
}
static gboolean
-etmc_value_is_empty (ETreeModel *etm, gint col, gconstpointer value)
+etmc_value_is_empty (ETreeModel *etm,
+ gint col,
+ gconstpointer value)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -175,7 +194,9 @@ etmc_value_is_empty (ETreeModel *etm, gint col, gconstpointer value)
}
static gchar *
-etmc_value_to_string (ETreeModel *etm, gint col, gconstpointer value)
+etmc_value_to_string (ETreeModel *etm,
+ gint col,
+ gconstpointer value)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS (etm);
@@ -240,28 +261,28 @@ e_tree_memory_callbacks_init (ETreeMemoryCallbacks *etmc)
*
*/
ETreeModel *
-e_tree_memory_callbacks_new (ETreeMemoryCallbacksIconAtFn icon_at,
+e_tree_memory_callbacks_new (ETreeMemoryCallbacksIconAtFn icon_at,
- ETreeMemoryCallbacksColumnCountFn column_count,
+ ETreeMemoryCallbacksColumnCountFn column_count,
- ETreeMemoryCallbacksHasSaveIdFn has_save_id,
- ETreeMemoryCallbacksGetSaveIdFn get_save_id,
+ ETreeMemoryCallbacksHasSaveIdFn has_save_id,
+ ETreeMemoryCallbacksGetSaveIdFn get_save_id,
- ETreeMemoryCallbacksHasGetNodeByIdFn has_get_node_by_id,
- ETreeMemoryCallbacksGetNodeByIdFn get_node_by_id,
+ ETreeMemoryCallbacksHasGetNodeByIdFn has_get_node_by_id,
+ ETreeMemoryCallbacksGetNodeByIdFn get_node_by_id,
- ETreeMemoryCallbacksValueAtFn sort_value_at,
- ETreeMemoryCallbacksValueAtFn value_at,
- ETreeMemoryCallbacksSetValueAtFn set_value_at,
- ETreeMemoryCallbacksIsEditableFn is_editable,
+ ETreeMemoryCallbacksValueAtFn sort_value_at,
+ ETreeMemoryCallbacksValueAtFn value_at,
+ ETreeMemoryCallbacksSetValueAtFn set_value_at,
+ ETreeMemoryCallbacksIsEditableFn is_editable,
- ETreeMemoryCallbacksDuplicateValueFn duplicate_value,
- ETreeMemoryCallbacksFreeValueFn free_value,
- ETreeMemoryCallbacksInitializeValueFn initialize_value,
- ETreeMemoryCallbacksValueIsEmptyFn value_is_empty,
- ETreeMemoryCallbacksValueToStringFn value_to_string,
+ ETreeMemoryCallbacksDuplicateValueFn duplicate_value,
+ ETreeMemoryCallbacksFreeValueFn free_value,
+ ETreeMemoryCallbacksInitializeValueFn initialize_value,
+ ETreeMemoryCallbacksValueIsEmptyFn value_is_empty,
+ ETreeMemoryCallbacksValueToStringFn value_to_string,
- gpointer model_data)
+ gpointer model_data)
{
ETreeMemoryCallbacks *etmc;
@@ -290,6 +311,6 @@ e_tree_memory_callbacks_new (ETreeMemoryCallbacksIconAtFn icon_at,
etmc->model_data = model_data;
- return (ETreeModel*) etmc;
+ return (ETreeModel *) etmc;
}
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index 4b9a977f05..43fb41b29c 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -81,7 +81,8 @@ struct _ETreeMemoryPrivate {
/* ETreeMemoryPath functions */
static inline void
-check_children (ETreeMemory *memory, ETreePath node)
+check_children (ETreeMemory *memory,
+ ETreePath node)
{
ETreeMemoryPath *path = node;
if (!path->children_computed) {
@@ -236,14 +237,16 @@ etmm_get_root (ETreeModel *etm)
}
static ETreePath
-etmm_get_parent (ETreeModel *etm, ETreePath node)
+etmm_get_parent (ETreeModel *etm,
+ ETreePath node)
{
ETreeMemoryPath *path = node;
return path->parent;
}
static ETreePath
-etmm_get_first_child (ETreeModel *etm, ETreePath node)
+etmm_get_first_child (ETreeModel *etm,
+ ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -252,7 +255,8 @@ etmm_get_first_child (ETreeModel *etm, ETreePath node)
}
static ETreePath
-etmm_get_last_child (ETreeModel *etm, ETreePath node)
+etmm_get_last_child (ETreeModel *etm,
+ ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -261,28 +265,32 @@ etmm_get_last_child (ETreeModel *etm, ETreePath node)
}
static ETreePath
-etmm_get_next (ETreeModel *etm, ETreePath node)
+etmm_get_next (ETreeModel *etm,
+ ETreePath node)
{
ETreeMemoryPath *path = node;
return path->next_sibling;
}
static ETreePath
-etmm_get_prev (ETreeModel *etm, ETreePath node)
+etmm_get_prev (ETreeModel *etm,
+ ETreePath node)
{
ETreeMemoryPath *path = node;
return path->prev_sibling;
}
static gboolean
-etmm_is_root (ETreeModel *etm, ETreePath node)
+etmm_is_root (ETreeModel *etm,
+ ETreePath node)
{
ETreeMemoryPath *path = node;
return e_tree_memory_path_depth (path) == 0;
}
static gboolean
-etmm_is_expandable (ETreeModel *etm, ETreePath node)
+etmm_is_expandable (ETreeModel *etm,
+ ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -291,7 +299,9 @@ etmm_is_expandable (ETreeModel *etm, ETreePath node)
}
static guint
-etmm_get_children (ETreeModel *etm, ETreePath node, ETreePath **nodes)
+etmm_get_children (ETreeModel *etm,
+ ETreePath node,
+ ETreePath **nodes)
{
ETreeMemoryPath *path = node;
guint n_children;
@@ -314,7 +324,8 @@ etmm_get_children (ETreeModel *etm, ETreePath node, ETreePath **nodes)
}
static guint
-etmm_depth (ETreeModel *etm, ETreePath path)
+etmm_depth (ETreeModel *etm,
+ ETreePath path)
{
return e_tree_memory_path_depth (path);
}
@@ -338,7 +349,8 @@ etmm_clear_children_computed (ETreeMemoryPath *path)
}
static void
-etmm_node_request_collapse (ETreeModel *etm, ETreePath node)
+etmm_node_request_collapse (ETreeModel *etm,
+ ETreePath node)
{
ETreeModelClass *parent_class;
@@ -430,7 +442,8 @@ e_tree_memory_new (void)
* the value of @expanded.
*/
void
-e_tree_memory_set_expanded_default (ETreeMemory *etree, gboolean expanded)
+e_tree_memory_set_expanded_default (ETreeMemory *etree,
+ gboolean expanded)
{
g_return_if_fail (etree != NULL);
@@ -447,7 +460,8 @@ e_tree_memory_set_expanded_default (ETreeMemory *etree, gboolean expande
* Return value:
**/
gpointer
-e_tree_memory_node_get_data (ETreeMemory *etmm, ETreePath node)
+e_tree_memory_node_get_data (ETreeMemory *etmm,
+ ETreePath node)
{
ETreeMemoryPath *path = node;
@@ -465,7 +479,9 @@ e_tree_memory_node_get_data (ETreeMemory *etmm, ETreePath node)
*
**/
void
-e_tree_memory_node_set_data (ETreeMemory *etmm, ETreePath node, gpointer node_data)
+e_tree_memory_node_set_data (ETreeMemory *etmm,
+ ETreePath node,
+ gpointer node_data)
{
ETreeMemoryPath *path = node;
@@ -487,9 +503,9 @@ e_tree_memory_node_set_data (ETreeMemory *etmm, ETreePath node, gpointer node_da
**/
ETreePath
e_tree_memory_node_insert (ETreeMemory *tree_model,
- ETreePath parent_node,
- gint position,
- gpointer node_data)
+ ETreePath parent_node,
+ gint position,
+ gpointer node_data)
{
ETreeMemoryPrivate *priv;
ETreeMemoryPath *new_path;
@@ -550,9 +566,9 @@ e_tree_memory_node_insert_id (ETreeMemory *etree,
**/
ETreePath
e_tree_memory_node_insert_before (ETreeMemory *etree,
- ETreePath parent,
- ETreePath sibling,
- gpointer node_data)
+ ETreePath parent,
+ ETreePath sibling,
+ gpointer node_data)
{
ETreeMemoryPath *child;
ETreeMemoryPath *parent_path = parent;
@@ -574,7 +590,8 @@ e_tree_memory_node_insert_before (ETreeMemory *etree,
/* just blows away child data, doesn't take into account unlinking/etc */
static void
-child_free (ETreeMemory *etree, ETreeMemoryPath *node)
+child_free (ETreeMemory *etree,
+ ETreeMemoryPath *node)
{
ETreeMemoryPath *child, *next;
@@ -602,7 +619,8 @@ child_free (ETreeMemory *etree, ETreeMemoryPath *node)
* Return value:
**/
gpointer
-e_tree_memory_node_remove (ETreeMemory *etree, ETreePath node)
+e_tree_memory_node_remove (ETreeMemory *etree,
+ ETreePath node)
{
ETreeMemoryPath *path = node;
ETreeMemoryPath *parent = path->parent;
@@ -622,7 +640,7 @@ e_tree_memory_node_remove (ETreeMemory *etree, ETreePath node)
}
/* unlink this node - we only have to unlink the root node being removed,
- since the others are only references from this node */
+ * since the others are only references from this node */
e_tree_path_unlink (path);
/*printf("removing %d nodes from position %d\n", visible, base);*/
@@ -647,7 +665,9 @@ typedef struct {
} MemoryAndClosure;
static gint
-sort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data)
+sort_callback (gconstpointer data1,
+ gconstpointer data2,
+ gpointer user_data)
{
ETreePath path1 = *(ETreePath *) data1;
ETreePath path2 = *(ETreePath *) data2;
@@ -656,10 +676,10 @@ sort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data)
}
void
-e_tree_memory_sort_node (ETreeMemory *etmm,
- ETreePath node,
- ETreeMemorySortCallback callback,
- gpointer user_data)
+e_tree_memory_sort_node (ETreeMemory *etmm,
+ ETreePath node,
+ ETreeMemorySortCallback callback,
+ gpointer user_data)
{
ETreeMemoryPath **children;
ETreeMemoryPath *child;
@@ -716,9 +736,9 @@ e_tree_memory_sort_node (ETreeMemory *etmm,
}
void
-e_tree_memory_set_node_destroy_func (ETreeMemory *etmm,
- GFunc destroy_func,
- gpointer user_data)
+e_tree_memory_set_node_destroy_func (ETreeMemory *etmm,
+ GFunc destroy_func,
+ gpointer user_data)
{
etmm->priv->destroy_func = destroy_func;
etmm->priv->destroy_user_data = user_data;
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 8772e5309f..b37ce4bf17 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -223,7 +223,7 @@ e_tree_model_init (ETreeModel *tree_model)
* Return value:
**/
void
-e_tree_model_pre_change (ETreeModel *tree_model)
+e_tree_model_pre_change (ETreeModel *tree_model)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
@@ -243,7 +243,7 @@ e_tree_model_pre_change (ETreeModel *tree_model)
* Return value:
**/
void
-e_tree_model_no_change (ETreeModel *tree_model)
+e_tree_model_no_change (ETreeModel *tree_model)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
@@ -263,7 +263,7 @@ e_tree_model_no_change (ETreeModel *tree_model)
* Return value:
**/
void
-e_tree_model_rebuilt (ETreeModel *tree_model)
+e_tree_model_rebuilt (ETreeModel *tree_model)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
@@ -282,7 +282,8 @@ e_tree_model_rebuilt (ETreeModel *tree_model)
* Return value:
**/
void
-e_tree_model_node_changed (ETreeModel *tree_model, ETreePath node)
+e_tree_model_node_changed (ETreeModel *tree_model,
+ ETreePath node)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
@@ -302,7 +303,8 @@ e_tree_model_node_changed (ETreeModel *tree_model, ETreePath node)
* Return value:
**/
void
-e_tree_model_node_data_changed (ETreeModel *tree_model, ETreePath node)
+e_tree_model_node_data_changed (ETreeModel *tree_model,
+ ETreePath node)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
@@ -322,7 +324,9 @@ e_tree_model_node_data_changed (ETreeModel *tree_model, ETreePath node)
* Return value:
**/
void
-e_tree_model_node_col_changed (ETreeModel *tree_model, ETreePath node, gint col)
+e_tree_model_node_col_changed (ETreeModel *tree_model,
+ ETreePath node,
+ gint col)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
@@ -342,8 +346,8 @@ e_tree_model_node_col_changed (ETreeModel *tree_model, ETreePath node, gint col
**/
void
e_tree_model_node_inserted (ETreeModel *tree_model,
- ETreePath parent_node,
- ETreePath inserted_node)
+ ETreePath parent_node,
+ ETreePath inserted_node)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
@@ -363,7 +367,10 @@ e_tree_model_node_inserted (ETreeModel *tree_model,
*
**/
void
-e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETreePath removed_node, gint old_position)
+e_tree_model_node_removed (ETreeModel *tree_model,
+ ETreePath parent_node,
+ ETreePath removed_node,
+ gint old_position)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
@@ -382,7 +389,8 @@ e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETree
*
**/
void
-e_tree_model_node_deleted (ETreeModel *tree_model, ETreePath deleted_node)
+e_tree_model_node_deleted (ETreeModel *tree_model,
+ ETreePath deleted_node)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
@@ -400,7 +408,8 @@ e_tree_model_node_deleted (ETreeModel *tree_model, ETreePath deleted_node)
*
**/
void
-e_tree_model_node_request_collapse (ETreeModel *tree_model, ETreePath collapsed_node)
+e_tree_model_node_request_collapse (ETreeModel *tree_model,
+ ETreePath collapsed_node)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
@@ -455,7 +464,8 @@ e_tree_model_get_root (ETreeModel *etree)
* Return value:
**/
ETreePath
-e_tree_model_node_get_parent (ETreeModel *etree, ETreePath node)
+e_tree_model_node_get_parent (ETreeModel *etree,
+ ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
if (ETM_CLASS (etree)->get_parent)
@@ -474,7 +484,8 @@ e_tree_model_node_get_parent (ETreeModel *etree, ETreePath node)
* Return value:
**/
ETreePath
-e_tree_model_node_get_first_child (ETreeModel *etree, ETreePath node)
+e_tree_model_node_get_first_child (ETreeModel *etree,
+ ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
@@ -495,7 +506,8 @@ e_tree_model_node_get_first_child (ETreeModel *etree, ETreePath node)
* Return value:
**/
ETreePath
-e_tree_model_node_get_last_child (ETreeModel *etree, ETreePath node)
+e_tree_model_node_get_last_child (ETreeModel *etree,
+ ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
@@ -516,7 +528,8 @@ e_tree_model_node_get_last_child (ETreeModel *etree, ETreePath node)
* Return value:
**/
ETreePath
-e_tree_model_node_get_next (ETreeModel *etree, ETreePath node)
+e_tree_model_node_get_next (ETreeModel *etree,
+ ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
@@ -537,7 +550,8 @@ e_tree_model_node_get_next (ETreeModel *etree, ETreePath node)
* Return value:
**/
ETreePath
-e_tree_model_node_get_prev (ETreeModel *etree, ETreePath node)
+e_tree_model_node_get_prev (ETreeModel *etree,
+ ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
@@ -558,7 +572,8 @@ e_tree_model_node_get_prev (ETreeModel *etree, ETreePath node)
* Return value:
**/
gboolean
-e_tree_model_node_is_root (ETreeModel *etree, ETreePath node)
+e_tree_model_node_is_root (ETreeModel *etree,
+ ETreePath node)
{
g_return_val_if_fail (etree != NULL, FALSE);
@@ -578,7 +593,8 @@ e_tree_model_node_is_root (ETreeModel *etree, ETreePath node)
* Return value:
**/
gboolean
-e_tree_model_node_is_expandable (ETreeModel *etree, ETreePath node)
+e_tree_model_node_is_expandable (ETreeModel *etree,
+ ETreePath node)
{
g_return_val_if_fail (etree != NULL, FALSE);
g_return_val_if_fail (node != NULL, FALSE);
@@ -590,7 +606,9 @@ e_tree_model_node_is_expandable (ETreeModel *etree, ETreePath node)
}
guint
-e_tree_model_node_get_children (ETreeModel *etree, ETreePath node, ETreePath **nodes)
+e_tree_model_node_get_children (ETreeModel *etree,
+ ETreePath node,
+ ETreePath **nodes)
{
g_return_val_if_fail (etree != NULL, 0);
if (ETM_CLASS (etree)->get_children)
@@ -609,7 +627,8 @@ e_tree_model_node_get_children (ETreeModel *etree, ETreePath node, ETreePath **n
* Return value:
**/
guint
-e_tree_model_node_depth (ETreeModel *etree, ETreePath node)
+e_tree_model_node_depth (ETreeModel *etree,
+ ETreePath node)
{
g_return_val_if_fail (etree != NULL, 0);
g_return_val_if_fail (E_IS_TREE_MODEL (etree), 0);
@@ -630,7 +649,8 @@ e_tree_model_node_depth (ETreeModel *etree, ETreePath node)
* return values: the GdkPixbuf associated with this node.
*/
GdkPixbuf *
-e_tree_model_icon_at (ETreeModel *etree, ETreePath node)
+e_tree_model_icon_at (ETreeModel *etree,
+ ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
@@ -711,7 +731,8 @@ e_tree_model_has_save_id (ETreeModel *etree)
* return values: The save id for this path.
*/
gchar *
-e_tree_model_get_save_id (ETreeModel *etree, ETreePath node)
+e_tree_model_get_save_id (ETreeModel *etree,
+ ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
@@ -755,7 +776,8 @@ e_tree_model_has_get_node_by_id (ETreeModel *etree)
* return values: The path for this save id.
*/
ETreePath
-e_tree_model_get_node_by_id (ETreeModel *etree, const gchar *save_id)
+e_tree_model_get_node_by_id (ETreeModel *etree,
+ const gchar *save_id)
{
g_return_val_if_fail (etree != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
@@ -807,7 +829,9 @@ e_tree_model_has_change_pending (ETreeModel *etree)
* node_removed, and no_change don't affect any data in this way.
**/
gpointer
-e_tree_model_sort_value_at (ETreeModel *etree, ETreePath node, gint col)
+e_tree_model_sort_value_at (ETreeModel *etree,
+ ETreePath node,
+ gint col)
{
g_return_val_if_fail (etree != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
@@ -838,7 +862,9 @@ e_tree_model_sort_value_at (ETreeModel *etree, ETreePath node, gint col)
* node_removed, and no_change don't affect any data in this way.
**/
gpointer
-e_tree_model_value_at (ETreeModel *etree, ETreePath node, gint col)
+e_tree_model_value_at (ETreeModel *etree,
+ ETreePath node,
+ gint col)
{
g_return_val_if_fail (etree != NULL, NULL);
g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL);
@@ -850,7 +876,10 @@ e_tree_model_value_at (ETreeModel *etree, ETreePath node, gint col)
}
void
-e_tree_model_set_value_at (ETreeModel *etree, ETreePath node, gint col, gconstpointer val)
+e_tree_model_set_value_at (ETreeModel *etree,
+ ETreePath node,
+ gint col,
+ gconstpointer val)
{
g_return_if_fail (etree != NULL);
g_return_if_fail (E_IS_TREE_MODEL (etree));
@@ -869,7 +898,9 @@ e_tree_model_set_value_at (ETreeModel *etree, ETreePath node, gint col, gconstpo
* Return value:
**/
gboolean
-e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, gint col)
+e_tree_model_node_is_editable (ETreeModel *etree,
+ ETreePath node,
+ gint col)
{
g_return_val_if_fail (etree != NULL, FALSE);
@@ -889,7 +920,9 @@ e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, gint col)
* Return value:
**/
gpointer
-e_tree_model_duplicate_value (ETreeModel *etree, gint col, gconstpointer value)
+e_tree_model_duplicate_value (ETreeModel *etree,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (etree != NULL, NULL);
@@ -909,7 +942,9 @@ e_tree_model_duplicate_value (ETreeModel *etree, gint col, gconstpointer value)
* Return value:
**/
void
-e_tree_model_free_value (ETreeModel *etree, gint col, gpointer value)
+e_tree_model_free_value (ETreeModel *etree,
+ gint col,
+ gpointer value)
{
g_return_if_fail (etree != NULL);
@@ -927,7 +962,8 @@ e_tree_model_free_value (ETreeModel *etree, gint col, gpointer value)
* Return value:
**/
gpointer
-e_tree_model_initialize_value (ETreeModel *etree, gint col)
+e_tree_model_initialize_value (ETreeModel *etree,
+ gint col)
{
g_return_val_if_fail (etree != NULL, NULL);
@@ -947,7 +983,9 @@ e_tree_model_initialize_value (ETreeModel *etree, gint col)
* Return value:
**/
gboolean
-e_tree_model_value_is_empty (ETreeModel *etree, gint col, gconstpointer value)
+e_tree_model_value_is_empty (ETreeModel *etree,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (etree != NULL, TRUE);
@@ -967,7 +1005,9 @@ e_tree_model_value_is_empty (ETreeModel *etree, gint col, gconstpointer value)
* Return value:
**/
gchar *
-e_tree_model_value_to_string (ETreeModel *etree, gint col, gconstpointer value)
+e_tree_model_value_to_string (ETreeModel *etree,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail(etree != NULL, g_strdup(""));
@@ -987,7 +1027,10 @@ e_tree_model_value_to_string (ETreeModel *etree, gint col, gconstpointer value)
*
**/
void
-e_tree_model_node_traverse (ETreeModel *model, ETreePath path, ETreePathFunc func, gpointer data)
+e_tree_model_node_traverse (ETreeModel *model,
+ ETreePath path,
+ ETreePathFunc func,
+ gpointer data)
{
ETreePath child;
@@ -1019,7 +1062,10 @@ e_tree_model_node_traverse (ETreeModel *model, ETreePath path, ETreePathFunc fun
*
**/
void
-e_tree_model_node_traverse_preorder (ETreeModel *model, ETreePath path, ETreePathFunc func, gpointer data)
+e_tree_model_node_traverse_preorder (ETreeModel *model,
+ ETreePath path,
+ ETreePathFunc func,
+ gpointer data)
{
ETreePath child;
@@ -1052,7 +1098,12 @@ e_tree_model_node_traverse_preorder (ETreeModel *model, ETreePath path, ETreePat
*
**/
static ETreePath
-e_tree_model_node_real_traverse (ETreeModel *model, ETreePath path, ETreePath end_path, gboolean forward_direction, ETreePathFunc func, gpointer data)
+e_tree_model_node_real_traverse (ETreeModel *model,
+ ETreePath path,
+ ETreePath end_path,
+ gboolean forward_direction,
+ ETreePathFunc func,
+ gpointer data)
{
ETreePath child;
@@ -1095,7 +1146,12 @@ e_tree_model_node_real_traverse (ETreeModel *model, ETreePath path, ETreePath en
*
**/
ETreePath
-e_tree_model_node_find (ETreeModel *model, ETreePath path, ETreePath end_path, gboolean forward_direction, ETreePathFunc func, gpointer data)
+e_tree_model_node_find (ETreeModel *model,
+ ETreePath path,
+ ETreePath end_path,
+ gboolean forward_direction,
+ ETreePathFunc func,
+ gpointer data)
{
ETreePath result;
ETreePath next;
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index dd00fca2e0..9d04086b2f 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -79,7 +79,9 @@ clear_selection (ETreeSelectionModel *etsm)
}
static void
-change_one_path (ETreeSelectionModel *etsm, ETreePath path, gboolean grow)
+change_one_path (ETreeSelectionModel *etsm,
+ ETreePath path,
+ gboolean grow)
{
if (!path)
return;
@@ -91,7 +93,8 @@ change_one_path (ETreeSelectionModel *etsm, ETreePath path, gboolean grow)
}
static void
-select_single_path (ETreeSelectionModel *etsm, ETreePath path)
+select_single_path (ETreeSelectionModel *etsm,
+ ETreePath path)
{
clear_selection (etsm);
change_one_path (etsm, path, TRUE);
@@ -100,7 +103,9 @@ select_single_path (ETreeSelectionModel *etsm, ETreePath path)
}
static void
-select_range (ETreeSelectionModel *etsm, gint start, gint end)
+select_range (ETreeSelectionModel *etsm,
+ gint start,
+ gint end)
{
gint i;
@@ -125,7 +130,8 @@ free_id (ETreeSelectionModel *etsm)
}
static void
-restore_cursor (ETreeSelectionModel *etsm, ETreeModel *etm)
+restore_cursor (ETreeSelectionModel *etsm,
+ ETreeModel *etm)
{
clear_selection (etsm);
etsm->priv->cursor_path = NULL;
@@ -153,7 +159,8 @@ restore_cursor (ETreeSelectionModel *etsm, ETreeModel *etm)
}
static void
-etsm_pre_change (ETreeModel *etm, ETreeSelectionModel *etsm)
+etsm_pre_change (ETreeModel *etm,
+ ETreeSelectionModel *etsm)
{
g_free (etsm->priv->cursor_save_id);
etsm->priv->cursor_save_id = NULL;
@@ -164,49 +171,67 @@ etsm_pre_change (ETreeModel *etm, ETreeSelectionModel *etsm)
}
static void
-etsm_no_change (ETreeModel *etm, ETreeSelectionModel *etsm)
+etsm_no_change (ETreeModel *etm,
+ ETreeSelectionModel *etsm)
{
free_id (etsm);
}
static void
-etsm_node_changed (ETreeModel *etm, ETreePath node, ETreeSelectionModel *etsm)
+etsm_node_changed (ETreeModel *etm,
+ ETreePath node,
+ ETreeSelectionModel *etsm)
{
restore_cursor (etsm, etm);
}
static void
-etsm_node_data_changed (ETreeModel *etm, ETreePath node, ETreeSelectionModel *etsm)
+etsm_node_data_changed (ETreeModel *etm,
+ ETreePath node,
+ ETreeSelectionModel *etsm)
{
free_id (etsm);
}
static void
-etsm_node_col_changed (ETreeModel *etm, ETreePath node, gint col, ETreeSelectionModel *etsm)
+etsm_node_col_changed (ETreeModel *etm,
+ ETreePath node,
+ gint col,
+ ETreeSelectionModel *etsm)
{
free_id (etsm);
}
static void
-etsm_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETreeSelectionModel *etsm)
+etsm_node_inserted (ETreeModel *etm,
+ ETreePath parent,
+ ETreePath child,
+ ETreeSelectionModel *etsm)
{
restore_cursor (etsm, etm);
}
static void
-etsm_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, gint old_position, ETreeSelectionModel *etsm)
+etsm_node_removed (ETreeModel *etm,
+ ETreePath parent,
+ ETreePath child,
+ gint old_position,
+ ETreeSelectionModel *etsm)
{
restore_cursor (etsm, etm);
}
static void
-etsm_node_deleted (ETreeModel *etm, ETreePath child, ETreeSelectionModel *etsm)
+etsm_node_deleted (ETreeModel *etm,
+ ETreePath child,
+ ETreeSelectionModel *etsm)
{
restore_cursor (etsm, etm);
}
static void
-add_model (ETreeSelectionModel *etsm, ETreeModel *model)
+add_model (ETreeSelectionModel *etsm,
+ ETreeModel *model)
{
ETreeSelectionModelPrivate *priv = etsm->priv;
@@ -298,11 +323,14 @@ etsm_finalize (GObject *object)
}
static void
-etsm_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+etsm_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_CURSOR_ROW:
g_value_set_int (value, get_cursor_row (etsm));
break;
@@ -322,12 +350,15 @@ etsm_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *ps
}
static void
-etsm_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+etsm_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ESelectionModel *esm = E_SELECTION_MODEL (object);
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_CURSOR_ROW:
e_selection_model_do_something (esm, g_value_get_int (value), etsm->priv->cursor_col, 0);
break;
@@ -348,7 +379,8 @@ etsm_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp
}
static gboolean
-etsm_is_path_selected (ETreeSelectionModel *etsm, ETreePath path)
+etsm_is_path_selected (ETreeSelectionModel *etsm,
+ ETreePath path)
{
if (path && g_hash_table_lookup (etsm->priv->paths, path))
return TRUE;
@@ -367,7 +399,7 @@ etsm_is_path_selected (ETreeSelectionModel *etsm, ETreePath path)
*/
static gboolean
etsm_is_row_selected (ESelectionModel *selection,
- gint row)
+ gint row)
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (selection);
ETreePath path;
@@ -387,7 +419,9 @@ typedef struct {
} ModelAndCallback;
static void
-etsm_row_foreach_cb (gpointer key, gpointer value, gpointer user_data)
+etsm_row_foreach_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
ETreePath path = key;
ModelAndCallback *mac = user_data;
@@ -407,8 +441,8 @@ etsm_row_foreach_cb (gpointer key, gpointer value, gpointer user_data)
*/
static void
etsm_foreach (ESelectionModel *selection,
- EForeachFunc callback,
- gpointer closure)
+ EForeachFunc callback,
+ gpointer closure)
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (selection);
ModelAndCallback mac;
@@ -520,7 +554,9 @@ etsm_invert_selection (ESelectionModel *selection)
}
static void
-etsm_change_one_row (ESelectionModel *selection, gint row, gboolean grow)
+etsm_change_one_row (ESelectionModel *selection,
+ gint row,
+ gboolean grow)
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (selection);
ETreePath path;
@@ -538,7 +574,9 @@ etsm_change_one_row (ESelectionModel *selection, gint row, gboolean grow)
}
static void
-etsm_change_cursor (ESelectionModel *selection, gint row, gint col)
+etsm_change_cursor (ESelectionModel *selection,
+ gint row,
+ gint col)
{
ETreeSelectionModel *etsm;
@@ -569,7 +607,8 @@ etsm_cursor_col (ESelectionModel *selection)
}
static void
-etsm_get_rows (gint row, gpointer d)
+etsm_get_rows (gint row,
+ gpointer d)
{
gint **rowp = d;
@@ -578,7 +617,8 @@ etsm_get_rows (gint row, gpointer d)
}
static void
-etsm_select_single_row (ESelectionModel *selection, gint row)
+etsm_select_single_row (ESelectionModel *selection,
+ gint row)
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (selection);
ETreePath path = e_tree_table_adapter_node_at_row (etsm->priv->etta, row);
@@ -587,7 +627,7 @@ etsm_select_single_row (ESelectionModel *selection, gint row)
g_return_if_fail (path != NULL);
/* we really only care about the size=1 case (cursor changed),
- but this doesn't cost much */
+ * but this doesn't cost much */
size = g_hash_table_size (etsm->priv->paths);
if (size > 0 && size <= 5) {
rowp = rows;
@@ -596,13 +636,13 @@ etsm_select_single_row (ESelectionModel *selection, gint row)
select_single_path (etsm, path);
- if (size>5) {
+ if (size > 5) {
e_selection_model_selection_changed (E_SELECTION_MODEL (etsm));
} else {
if (rowp) {
gint *p = rows;
- while (p<rowp)
+ while (p < rowp)
e_selection_model_selection_row_changed ((ESelectionModel *) etsm, *p++);
}
e_selection_model_selection_row_changed ((ESelectionModel *) etsm, row);
@@ -610,7 +650,8 @@ etsm_select_single_row (ESelectionModel *selection, gint row)
}
static void
-etsm_toggle_single_row (ESelectionModel *selection, gint row)
+etsm_toggle_single_row (ESelectionModel *selection,
+ gint row)
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (selection);
ETreePath path = e_tree_table_adapter_node_at_row (etsm->priv->etta, row);
@@ -628,7 +669,8 @@ etsm_toggle_single_row (ESelectionModel *selection, gint row)
}
static void
-etsm_real_move_selection_end (ETreeSelectionModel *etsm, gint row)
+etsm_real_move_selection_end (ETreeSelectionModel *etsm,
+ gint row)
{
ETreePath end_path = e_tree_table_adapter_node_at_row (etsm->priv->etta, row);
gint start;
@@ -641,7 +683,8 @@ etsm_real_move_selection_end (ETreeSelectionModel *etsm, gint row)
}
static void
-etsm_move_selection_end (ESelectionModel *selection, gint row)
+etsm_move_selection_end (ESelectionModel *selection,
+ gint row)
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (selection);
@@ -652,7 +695,8 @@ etsm_move_selection_end (ESelectionModel *selection, gint row)
}
static void
-etsm_set_selection_end (ESelectionModel *selection, gint row)
+etsm_set_selection_end (ESelectionModel *selection,
+ gint row)
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (selection);
@@ -670,7 +714,9 @@ struct foreach_path_t {
};
static void
-foreach_path (gpointer key, gpointer value, gpointer data)
+foreach_path (gpointer key,
+ gpointer value,
+ gpointer data)
{
ETreePath path = key;
struct foreach_path_t *c = data;
@@ -678,7 +724,9 @@ foreach_path (gpointer key, gpointer value, gpointer data)
}
void
-e_tree_selection_model_foreach (ETreeSelectionModel *etsm, ETreeForeachFunc callback, gpointer closure)
+e_tree_selection_model_foreach (ETreeSelectionModel *etsm,
+ ETreeForeachFunc callback,
+ gpointer closure)
{
if (etsm->priv->paths) {
struct foreach_path_t c;
@@ -690,7 +738,8 @@ e_tree_selection_model_foreach (ETreeSelectionModel *etsm, ETreeForeachFunc call
}
void
-e_tree_selection_model_select_single_path (ETreeSelectionModel *etsm, ETreePath path)
+e_tree_selection_model_select_single_path (ETreeSelectionModel *etsm,
+ ETreePath path)
{
select_single_path (etsm, path);
@@ -698,12 +747,13 @@ e_tree_selection_model_select_single_path (ETreeSelectionModel *etsm, ETreePath
}
void
-e_tree_selection_model_select_paths (ETreeSelectionModel *etsm, GPtrArray *paths)
+e_tree_selection_model_select_paths (ETreeSelectionModel *etsm,
+ GPtrArray *paths)
{
ETreePath path;
gint i;
- for (i=0;i<paths->len;i++) {
+ for (i = 0; i < paths->len; i++) {
path = paths->pdata[i];
change_one_path (etsm, path, TRUE);
}
@@ -712,7 +762,8 @@ e_tree_selection_model_select_paths (ETreeSelectionModel *etsm, GPtrArray *paths
}
void
-e_tree_selection_model_add_to_selection (ETreeSelectionModel *etsm, ETreePath path)
+e_tree_selection_model_add_to_selection (ETreeSelectionModel *etsm,
+ ETreePath path)
{
change_one_path (etsm, path, TRUE);
@@ -720,7 +771,8 @@ e_tree_selection_model_add_to_selection (ETreeSelectionModel *etsm, ETreePath pa
}
void
-e_tree_selection_model_change_cursor (ETreeSelectionModel *etsm, ETreePath path)
+e_tree_selection_model_change_cursor (ETreeSelectionModel *etsm,
+ ETreePath path)
{
gint row;
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index c92bb45c65..72b4cba091 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -169,7 +169,8 @@ ets_insert_idle (ETreeSorted *ets)
#define CHECK_AROUND_LAST_ACCESS
static inline ETreeSortedPath *
-check_last_access (ETreeSorted *ets, ETreePath corresponding)
+check_last_access (ETreeSorted *ets,
+ ETreePath corresponding)
{
#ifdef CHECK_AROUND_LAST_ACCESS
ETreeSortedPath *parent;
@@ -211,7 +212,8 @@ check_last_access (ETreeSorted *ets, ETreePath corresponding)
}
static ETreeSortedPath *
-find_path (ETreeSorted *ets, ETreePath corresponding)
+find_path (ETreeSorted *ets,
+ ETreePath corresponding)
{
gint depth;
ETreePath *sequence;
@@ -268,7 +270,9 @@ find_path (ETreeSorted *ets, ETreePath corresponding)
}
static ETreeSortedPath *
-find_child_path (ETreeSorted *ets, ETreeSortedPath *parent, ETreePath corresponding)
+find_child_path (ETreeSorted *ets,
+ ETreeSortedPath *parent,
+ ETreePath corresponding)
{
gint i;
@@ -287,7 +291,8 @@ find_child_path (ETreeSorted *ets, ETreeSortedPath *parent, ETreePath correspond
}
static ETreeSortedPath *
-find_or_create_path (ETreeSorted *ets, ETreePath corresponding)
+find_or_create_path (ETreeSorted *ets,
+ ETreePath corresponding)
{
gint depth;
ETreePath *sequence;
@@ -367,7 +372,8 @@ free_path (ETreeSortedPath *path)
}
static ETreeSortedPath *
-new_path (ETreeSortedPath *parent, ETreePath corresponding)
+new_path (ETreeSortedPath *parent,
+ ETreePath corresponding)
{
ETreeSortedPath *path;
@@ -388,7 +394,8 @@ new_path (ETreeSortedPath *parent, ETreePath corresponding)
}
static gboolean
-reposition_path (ETreeSorted *ets, ETreeSortedPath *path)
+reposition_path (ETreeSorted *ets,
+ ETreeSortedPath *path)
{
gint new_index;
gint old_index = path->position;
@@ -442,7 +449,8 @@ reposition_path (ETreeSorted *ets, ETreeSortedPath *path)
}
static void
-regenerate_children (ETreeSorted *ets, ETreeSortedPath *path)
+regenerate_children (ETreeSorted *ets,
+ ETreeSortedPath *path)
{
ETreeSortedPath **children;
gint i;
@@ -455,7 +463,8 @@ regenerate_children (ETreeSorted *ets, ETreeSortedPath *path)
}
static void
-generate_children (ETreeSorted *ets, ETreeSortedPath *path)
+generate_children (ETreeSorted *ets,
+ ETreeSortedPath *path)
{
ETreePath child;
gint i;
@@ -484,7 +493,11 @@ generate_children (ETreeSorted *ets, ETreeSortedPath *path)
}
static void
-resort_node (ETreeSorted *ets, ETreeSortedPath *path, gboolean resort_all_children, gboolean needs_regen, gboolean send_signals)
+resort_node (ETreeSorted *ets,
+ ETreeSortedPath *path,
+ gboolean resort_all_children,
+ gboolean needs_regen,
+ gboolean send_signals)
{
gboolean needs_resort;
if (path) {
@@ -532,7 +545,8 @@ resort_node (ETreeSorted *ets, ETreeSortedPath *path, gboolean resort_all_childr
}
static void
-mark_path_child_needs_resort (ETreeSorted *ets, ETreeSortedPath *path)
+mark_path_child_needs_resort (ETreeSorted *ets,
+ ETreeSortedPath *path)
{
if (path == NULL)
return;
@@ -543,7 +557,10 @@ mark_path_child_needs_resort (ETreeSorted *ets, ETreeSortedPath *path)
}
static void
-mark_path_needs_resort (ETreeSorted *ets, ETreeSortedPath *path, gboolean needs_regen, gboolean resort_all_children)
+mark_path_needs_resort (ETreeSorted *ets,
+ ETreeSortedPath *path,
+ gboolean needs_regen,
+ gboolean resort_all_children)
{
if (path == NULL)
return;
@@ -556,7 +573,10 @@ mark_path_needs_resort (ETreeSorted *ets, ETreeSortedPath *path, gboolean needs_
}
static void
-schedule_resort (ETreeSorted *ets, ETreeSortedPath *path, gboolean needs_regen, gboolean resort_all_children)
+schedule_resort (ETreeSorted *ets,
+ ETreeSortedPath *path,
+ gboolean needs_regen,
+ gboolean resort_all_children)
{
ets->priv->insert_count = 0;
if (ets->priv->insert_idle_id != 0) {
@@ -681,14 +701,16 @@ ets_get_root (ETreeModel *etm)
}
static ETreePath
-ets_get_parent (ETreeModel *etm, ETreePath node)
+ets_get_parent (ETreeModel *etm,
+ ETreePath node)
{
ETreeSortedPath *path = node;
return path->parent;
}
static ETreePath
-ets_get_first_child (ETreeModel *etm, ETreePath node)
+ets_get_first_child (ETreeModel *etm,
+ ETreePath node)
{
ETreeSortedPath *path = node;
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -703,7 +725,8 @@ ets_get_first_child (ETreeModel *etm, ETreePath node)
}
static ETreePath
-ets_get_last_child (ETreeModel *etm, ETreePath node)
+ets_get_last_child (ETreeModel *etm,
+ ETreePath node)
{
ETreeSortedPath *path = node;
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -718,7 +741,8 @@ ets_get_last_child (ETreeModel *etm, ETreePath node)
}
static ETreePath
-ets_get_next (ETreeModel *etm, ETreePath node)
+ets_get_next (ETreeModel *etm,
+ ETreePath node)
{
ETreeSortedPath *path = node;
ETreeSortedPath *parent = path->parent;
@@ -732,7 +756,8 @@ ets_get_next (ETreeModel *etm, ETreePath node)
}
static ETreePath
-ets_get_prev (ETreeModel *etm, ETreePath node)
+ets_get_prev (ETreeModel *etm,
+ ETreePath node)
{
ETreeSortedPath *path = node;
ETreeSortedPath *parent = path->parent;
@@ -746,7 +771,8 @@ ets_get_prev (ETreeModel *etm, ETreePath node)
}
static gboolean
-ets_is_root (ETreeModel *etm, ETreePath node)
+ets_is_root (ETreeModel *etm,
+ ETreePath node)
{
ETreeSortedPath *path = node;
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -755,7 +781,8 @@ ets_is_root (ETreeModel *etm, ETreePath node)
}
static gboolean
-ets_is_expandable (ETreeModel *etm, ETreePath node)
+ets_is_expandable (ETreeModel *etm,
+ ETreePath node)
{
ETreeSortedPath *path = node;
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -769,7 +796,9 @@ ets_is_expandable (ETreeModel *etm, ETreePath node)
}
static guint
-ets_get_children (ETreeModel *etm, ETreePath node, ETreePath **nodes)
+ets_get_children (ETreeModel *etm,
+ ETreePath node,
+ ETreePath **nodes)
{
ETreeSortedPath *path = node;
guint n_children;
@@ -793,7 +822,8 @@ ets_get_children (ETreeModel *etm, ETreePath node, ETreePath **nodes)
}
static guint
-ets_depth (ETreeModel *etm, ETreePath node)
+ets_depth (ETreeModel *etm,
+ ETreePath node)
{
ETreeSortedPath *path = node;
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -802,7 +832,8 @@ ets_depth (ETreeModel *etm, ETreePath node)
}
static GdkPixbuf *
-ets_icon_at (ETreeModel *etm, ETreePath node)
+ets_icon_at (ETreeModel *etm,
+ ETreePath node)
{
ETreeSortedPath *path = node;
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -833,7 +864,8 @@ ets_has_save_id (ETreeModel *etm)
}
static gchar *
-ets_get_save_id (ETreeModel *etm, ETreePath node)
+ets_get_save_id (ETreeModel *etm,
+ ETreePath node)
{
ETreeSorted *ets = E_TREE_SORTED (etm);
ETreeSortedPath *path = node;
@@ -852,7 +884,8 @@ ets_has_get_node_by_id (ETreeModel *etm)
}
static ETreePath
-ets_get_node_by_id (ETreeModel *etm, const gchar *save_id)
+ets_get_node_by_id (ETreeModel *etm,
+ const gchar *save_id)
{
ETreeSorted *ets = E_TREE_SORTED (etm);
ETreePath node;
@@ -871,7 +904,9 @@ ets_has_change_pending (ETreeModel *etm)
}
static gpointer
-ets_value_at (ETreeModel *etm, ETreePath node, gint col)
+ets_value_at (ETreeModel *etm,
+ ETreePath node,
+ gint col)
{
ETreeSorted *ets = E_TREE_SORTED (etm);
ETreeSortedPath *path = node;
@@ -880,7 +915,10 @@ ets_value_at (ETreeModel *etm, ETreePath node, gint col)
}
static void
-ets_set_value_at (ETreeModel *etm, ETreePath node, gint col, gconstpointer val)
+ets_set_value_at (ETreeModel *etm,
+ ETreePath node,
+ gint col,
+ gconstpointer val)
{
ETreeSorted *ets = E_TREE_SORTED (etm);
ETreeSortedPath *path = node;
@@ -889,7 +927,9 @@ ets_set_value_at (ETreeModel *etm, ETreePath node, gint col, gconstpointer val)
}
static gboolean
-ets_is_editable (ETreeModel *etm, ETreePath node, gint col)
+ets_is_editable (ETreeModel *etm,
+ ETreePath node,
+ gint col)
{
ETreeSorted *ets = E_TREE_SORTED (etm);
ETreeSortedPath *path = node;
@@ -899,7 +939,9 @@ ets_is_editable (ETreeModel *etm, ETreePath node, gint col)
/* The default for ets_duplicate_value is to return the raw value. */
static gpointer
-ets_duplicate_value (ETreeModel *etm, gint col, gconstpointer value)
+ets_duplicate_value (ETreeModel *etm,
+ gint col,
+ gconstpointer value)
{
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -907,7 +949,9 @@ ets_duplicate_value (ETreeModel *etm, gint col, gconstpointer value)
}
static void
-ets_free_value (ETreeModel *etm, gint col, gpointer value)
+ets_free_value (ETreeModel *etm,
+ gint col,
+ gpointer value)
{
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -915,7 +959,8 @@ ets_free_value (ETreeModel *etm, gint col, gpointer value)
}
static gpointer
-ets_initialize_value (ETreeModel *etm, gint col)
+ets_initialize_value (ETreeModel *etm,
+ gint col)
{
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -923,7 +968,9 @@ ets_initialize_value (ETreeModel *etm, gint col)
}
static gboolean
-ets_value_is_empty (ETreeModel *etm, gint col, gconstpointer value)
+ets_value_is_empty (ETreeModel *etm,
+ gint col,
+ gconstpointer value)
{
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -931,7 +978,9 @@ ets_value_is_empty (ETreeModel *etm, gint col, gconstpointer value)
}
static gchar *
-ets_value_to_string (ETreeModel *etm, gint col, gconstpointer value)
+ets_value_to_string (ETreeModel *etm,
+ gint col,
+ gconstpointer value)
{
ETreeSorted *ets = E_TREE_SORTED (etm);
@@ -941,19 +990,23 @@ ets_value_to_string (ETreeModel *etm, gint col, gconstpointer value)
/* Proxy functions */
static void
-ets_proxy_pre_change (ETreeModel *etm, ETreeSorted *ets)
+ets_proxy_pre_change (ETreeModel *etm,
+ ETreeSorted *ets)
{
e_tree_model_pre_change (E_TREE_MODEL (ets));
}
static void
-ets_proxy_no_change (ETreeModel *etm, ETreeSorted *ets)
+ets_proxy_no_change (ETreeModel *etm,
+ ETreeSorted *ets)
{
e_tree_model_no_change (E_TREE_MODEL (ets));
}
static void
-ets_proxy_node_changed (ETreeModel *etm, ETreePath node, ETreeSorted *ets)
+ets_proxy_node_changed (ETreeModel *etm,
+ ETreePath node,
+ ETreeSorted *ets)
{
ets->priv->last_access = NULL;
d(g_print("Setting last access %p. (ets_proxy_node_changed)\n", ets->priv->last_access));
@@ -984,7 +1037,9 @@ ets_proxy_node_changed (ETreeModel *etm, ETreePath node, ETreeSorted *ets)
}
static void
-ets_proxy_node_data_changed (ETreeModel *etm, ETreePath node, ETreeSorted *ets)
+ets_proxy_node_data_changed (ETreeModel *etm,
+ ETreePath node,
+ ETreeSorted *ets)
{
ETreeSortedPath *path = find_path (ets, node);
@@ -998,7 +1053,10 @@ ets_proxy_node_data_changed (ETreeModel *etm, ETreePath node, ETreeSorted *ets)
}
static void
-ets_proxy_node_col_changed (ETreeModel *etm, ETreePath node, gint col, ETreeSorted *ets)
+ets_proxy_node_col_changed (ETreeModel *etm,
+ ETreePath node,
+ gint col,
+ ETreeSorted *ets)
{
ETreeSortedPath *path = find_path (ets, node);
@@ -1015,7 +1073,10 @@ ets_proxy_node_col_changed (ETreeModel *etm, ETreePath node, gint col, ETreeSort
}
static void
-ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETreeSorted *ets)
+ets_proxy_node_inserted (ETreeModel *etm,
+ ETreePath parent,
+ ETreePath child,
+ ETreeSorted *ets)
{
ETreeSortedPath *parent_path = find_path (ets, parent);
@@ -1083,7 +1144,11 @@ ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETr
}
static void
-ets_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, gint old_position, ETreeSorted *ets)
+ets_proxy_node_removed (ETreeModel *etm,
+ ETreePath parent,
+ ETreePath child,
+ gint old_position,
+ ETreeSorted *ets)
{
ETreeSortedPath *parent_path = find_path (ets, parent);
ETreeSortedPath *path;
@@ -1120,13 +1185,17 @@ ets_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, gint
}
static void
-ets_proxy_node_deleted (ETreeModel *etm, ETreePath child, ETreeSorted *ets)
+ets_proxy_node_deleted (ETreeModel *etm,
+ ETreePath child,
+ ETreeSorted *ets)
{
e_tree_model_node_deleted (E_TREE_MODEL (ets), NULL);
}
static void
-ets_proxy_node_request_collapse (ETreeModel *etm, ETreePath node, ETreeSorted *ets)
+ets_proxy_node_request_collapse (ETreeModel *etm,
+ ETreePath node,
+ ETreeSorted *ets)
{
ETreeSortedPath *path = find_path (ets, node);
if (path) {
@@ -1135,7 +1204,8 @@ ets_proxy_node_request_collapse (ETreeModel *etm, ETreePath node, ETreeSorted *e
}
static void
-ets_sort_info_changed (ETableSortInfo *sort_info, ETreeSorted *ets)
+ets_sort_info_changed (ETableSortInfo *sort_info,
+ ETreeSorted *ets)
{
schedule_resort (ets, ets->priv->root, TRUE, TRUE);
}
@@ -1216,7 +1286,10 @@ e_tree_sorted_init (ETreeSorted *ets)
*
**/
void
-e_tree_sorted_construct (ETreeSorted *ets, ETreeModel *source, ETableHeader *full_header, ETableSortInfo *sort_info)
+e_tree_sorted_construct (ETreeSorted *ets,
+ ETreeModel *source,
+ ETableHeader *full_header,
+ ETableSortInfo *sort_info)
{
ets->priv->source = source;
if (source)
@@ -1228,24 +1301,33 @@ e_tree_sorted_construct (ETreeSorted *ets, ETreeModel *source, ETableHeader *ful
e_tree_sorted_set_sort_info (ets, sort_info);
- ets->priv->tree_model_pre_change_id = g_signal_connect (G_OBJECT (source), "pre_change",
- G_CALLBACK (ets_proxy_pre_change), ets);
- ets->priv->tree_model_no_change_id = g_signal_connect (G_OBJECT (source), "no_change",
- G_CALLBACK (ets_proxy_no_change), ets);
- ets->priv->tree_model_node_changed_id = g_signal_connect (G_OBJECT (source), "node_changed",
- G_CALLBACK (ets_proxy_node_changed), ets);
- ets->priv->tree_model_node_data_changed_id = g_signal_connect (G_OBJECT (source), "node_data_changed",
- G_CALLBACK (ets_proxy_node_data_changed), ets);
- ets->priv->tree_model_node_col_changed_id = g_signal_connect (G_OBJECT (source), "node_col_changed",
- G_CALLBACK (ets_proxy_node_col_changed), ets);
- ets->priv->tree_model_node_inserted_id = g_signal_connect (G_OBJECT (source), "node_inserted",
- G_CALLBACK (ets_proxy_node_inserted), ets);
- ets->priv->tree_model_node_removed_id = g_signal_connect (G_OBJECT (source), "node_removed",
- G_CALLBACK (ets_proxy_node_removed), ets);
- ets->priv->tree_model_node_deleted_id = g_signal_connect (G_OBJECT (source), "node_deleted",
- G_CALLBACK (ets_proxy_node_deleted), ets);
- ets->priv->tree_model_node_request_collapse_id = g_signal_connect (G_OBJECT (source), "node_request_collapse",
- G_CALLBACK (ets_proxy_node_request_collapse), ets);
+ ets->priv->tree_model_pre_change_id = g_signal_connect (
+ source, "pre_change",
+ G_CALLBACK (ets_proxy_pre_change), ets);
+ ets->priv->tree_model_no_change_id = g_signal_connect (
+ source, "no_change",
+ G_CALLBACK (ets_proxy_no_change), ets);
+ ets->priv->tree_model_node_changed_id = g_signal_connect (
+ source, "node_changed",
+ G_CALLBACK (ets_proxy_node_changed), ets);
+ ets->priv->tree_model_node_data_changed_id = g_signal_connect (
+ source, "node_data_changed",
+ G_CALLBACK (ets_proxy_node_data_changed), ets);
+ ets->priv->tree_model_node_col_changed_id = g_signal_connect (
+ source, "node_col_changed",
+ G_CALLBACK (ets_proxy_node_col_changed), ets);
+ ets->priv->tree_model_node_inserted_id = g_signal_connect (
+ source, "node_inserted",
+ G_CALLBACK (ets_proxy_node_inserted), ets);
+ ets->priv->tree_model_node_removed_id = g_signal_connect (
+ source, "node_removed",
+ G_CALLBACK (ets_proxy_node_removed), ets);
+ ets->priv->tree_model_node_deleted_id = g_signal_connect (
+ source, "node_deleted",
+ G_CALLBACK (ets_proxy_node_deleted), ets);
+ ets->priv->tree_model_node_request_collapse_id = g_signal_connect (
+ source, "node_request_collapse",
+ G_CALLBACK (ets_proxy_node_request_collapse), ets);
}
@@ -1257,7 +1339,9 @@ e_tree_sorted_construct (ETreeSorted *ets, ETreeModel *source, ETableHeader *ful
* return values: a newly constructed ETreeSorted.
*/
ETreeSorted *
-e_tree_sorted_new (ETreeModel *source, ETableHeader *full_header, ETableSortInfo *sort_info)
+e_tree_sorted_new (ETreeModel *source,
+ ETableHeader *full_header,
+ ETableSortInfo *sort_info)
{
ETreeSorted *ets = g_object_new (E_TYPE_TREE_SORTED, NULL);
@@ -1267,8 +1351,8 @@ e_tree_sorted_new (ETreeModel *source, ETableHeader *full_header, ETableSortInfo
}
ETreePath
-e_tree_sorted_view_to_model_path (ETreeSorted *ets,
- ETreePath view_path)
+e_tree_sorted_view_to_model_path (ETreeSorted *ets,
+ ETreePath view_path)
{
ETreeSortedPath *path = view_path;
if (path) {
@@ -1280,23 +1364,23 @@ e_tree_sorted_view_to_model_path (ETreeSorted *ets,
}
ETreePath
-e_tree_sorted_model_to_view_path (ETreeSorted *ets,
- ETreePath model_path)
+e_tree_sorted_model_to_view_path (ETreeSorted *ets,
+ ETreePath model_path)
{
return find_or_create_path (ets, model_path);
}
gint
-e_tree_sorted_orig_position (ETreeSorted *ets,
- ETreePath path)
+e_tree_sorted_orig_position (ETreeSorted *ets,
+ ETreePath path)
{
ETreeSortedPath *sorted_path = path;
return sorted_path->orig_position;
}
gint
-e_tree_sorted_node_num_children (ETreeSorted *ets,
- ETreePath path)
+e_tree_sorted_node_num_children (ETreeSorted *ets,
+ ETreePath path)
{
ETreeSortedPath *sorted_path = path;
@@ -1308,7 +1392,8 @@ e_tree_sorted_node_num_children (ETreeSorted *ets,
}
void
-e_tree_sorted_node_resorted (ETreeSorted *sorted, ETreePath node)
+e_tree_sorted_node_resorted (ETreeSorted *sorted,
+ ETreePath node)
{
g_return_if_fail (sorted != NULL);
g_return_if_fail (E_IS_TREE_SORTED (sorted));
@@ -1317,7 +1402,8 @@ e_tree_sorted_node_resorted (ETreeSorted *sorted, ETreePath node)
}
void
-e_tree_sorted_set_sort_info (ETreeSorted *ets, ETableSortInfo *sort_info)
+e_tree_sorted_set_sort_info (ETreeSorted *ets,
+ ETableSortInfo *sort_info)
{
g_return_if_fail (ets != NULL);
@@ -1333,15 +1419,16 @@ e_tree_sorted_set_sort_info (ETreeSorted *ets, ETableSortInfo *sort_info)
ets->priv->sort_info = sort_info;
if (sort_info) {
g_object_ref (sort_info);
- ets->priv->sort_info_changed_id = g_signal_connect (G_OBJECT (ets->priv->sort_info), "sort_info_changed",
- G_CALLBACK (ets_sort_info_changed), ets);
+ ets->priv->sort_info_changed_id = g_signal_connect (
+ ets->priv->sort_info, "sort_info_changed",
+ G_CALLBACK (ets_sort_info_changed), ets);
}
if (ets->priv->root)
schedule_resort (ets, ets->priv->root, TRUE, TRUE);
}
-ETableSortInfo*
+ETableSortInfo *
e_tree_sorted_get_sort_info (ETreeSorted *ets)
{
return ets->priv->sort_info;
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 4cfd74fe68..1b87211c7b 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -98,7 +98,8 @@ struct _ETreeTableAdapterPrivate {
static void etta_sort_info_changed (ETableSortInfo *sort_info, ETreeTableAdapter *etta);
static GNode *
-lookup_gnode (ETreeTableAdapter *etta, ETreePath path)
+lookup_gnode (ETreeTableAdapter *etta,
+ ETreePath path)
{
GNode *gnode;
@@ -111,7 +112,8 @@ lookup_gnode (ETreeTableAdapter *etta, ETreePath path)
}
static void
-resize_map (ETreeTableAdapter *etta, gint size)
+resize_map (ETreeTableAdapter *etta,
+ gint size)
{
if (size > etta->priv->n_vals_allocated) {
etta->priv->n_vals_allocated = MAX (etta->priv->n_vals_allocated + INCREMENT_AMOUNT, size);
@@ -122,7 +124,10 @@ resize_map (ETreeTableAdapter *etta, gint size)
}
static void
-move_map_elements (ETreeTableAdapter *etta, gint to, gint from, gint count)
+move_map_elements (ETreeTableAdapter *etta,
+ gint to,
+ gint from,
+ gint count)
{
if (count <= 0 || from >= etta->priv->n_map)
return;
@@ -131,7 +136,9 @@ move_map_elements (ETreeTableAdapter *etta, gint to, gint from, gint count)
}
static gint
-fill_map (ETreeTableAdapter *etta, gint index, GNode *gnode)
+fill_map (ETreeTableAdapter *etta,
+ gint index,
+ GNode *gnode)
{
GNode *p;
@@ -155,7 +162,8 @@ remap_indices (ETreeTableAdapter *etta)
}
static node_t *
-get_node (ETreeTableAdapter *etta, ETreePath path)
+get_node (ETreeTableAdapter *etta,
+ ETreePath path)
{
GNode *gnode = lookup_gnode (etta, path);
@@ -166,7 +174,9 @@ get_node (ETreeTableAdapter *etta, ETreePath path)
}
static void
-resort_node (ETreeTableAdapter *etta, GNode *gnode, gboolean recurse)
+resort_node (ETreeTableAdapter *etta,
+ GNode *gnode,
+ gboolean recurse)
{
node_t *node = (node_t *) gnode->data;
ETreePath *paths, path;
@@ -217,7 +227,8 @@ resort_node (ETreeTableAdapter *etta, GNode *gnode, gboolean recurse)
}
static gint
-get_row (ETreeTableAdapter *etta, ETreePath path)
+get_row (ETreeTableAdapter *etta,
+ ETreePath path)
{
node_t *node = get_node (etta, path);
if (!node)
@@ -230,7 +241,8 @@ get_row (ETreeTableAdapter *etta, ETreePath path)
}
static ETreePath
-get_path (ETreeTableAdapter *etta, gint row)
+get_path (ETreeTableAdapter *etta,
+ gint row)
{
if (row == -1 && etta->priv->n_map > 0)
row = etta->priv->n_map - 1;
@@ -241,7 +253,8 @@ get_path (ETreeTableAdapter *etta, gint row)
}
static void
-kill_gnode (GNode *node, ETreeTableAdapter *etta)
+kill_gnode (GNode *node,
+ ETreeTableAdapter *etta)
{
g_hash_table_remove (etta->priv->nodes, ((node_t *) node->data)->path);
@@ -258,7 +271,8 @@ kill_gnode (GNode *node, ETreeTableAdapter *etta)
}
static void
-update_child_counts (GNode *gnode, gint delta)
+update_child_counts (GNode *gnode,
+ gint delta)
{
while (gnode) {
node_t *node = (node_t *) gnode->data;
@@ -268,7 +282,8 @@ update_child_counts (GNode *gnode, gint delta)
}
static gint
-delete_children (ETreeTableAdapter *etta, GNode *gnode)
+delete_children (ETreeTableAdapter *etta,
+ GNode *gnode)
{
node_t *node = (node_t *) gnode->data;
gint to_remove = node ? node->num_visible_children : 0;
@@ -286,7 +301,9 @@ delete_children (ETreeTableAdapter *etta, GNode *gnode)
}
static void
-delete_node (ETreeTableAdapter *etta, ETreePath parent, ETreePath path)
+delete_node (ETreeTableAdapter *etta,
+ ETreePath parent,
+ ETreePath path)
{
gint to_remove = 1;
gint parent_row = get_row (etta, parent);
@@ -325,7 +342,8 @@ delete_node (ETreeTableAdapter *etta, ETreePath parent, ETreePath path)
}
static GNode *
-create_gnode (ETreeTableAdapter *etta, ETreePath path)
+create_gnode (ETreeTableAdapter *etta,
+ ETreePath path)
{
GNode *gnode;
node_t *node;
@@ -343,7 +361,8 @@ create_gnode (ETreeTableAdapter *etta, ETreePath path)
}
static gint
-insert_children (ETreeTableAdapter *etta, GNode *gnode)
+insert_children (ETreeTableAdapter *etta,
+ GNode *gnode)
{
ETreePath path, tmp;
gint count = 0;
@@ -365,7 +384,8 @@ insert_children (ETreeTableAdapter *etta, GNode *gnode)
}
static void
-generate_tree (ETreeTableAdapter *etta, ETreePath path)
+generate_tree (ETreeTableAdapter *etta,
+ ETreePath path)
{
GNode *gnode;
node_t *node;
@@ -394,7 +414,9 @@ generate_tree (ETreeTableAdapter *etta, ETreePath path)
}
static void
-insert_node (ETreeTableAdapter *etta, ETreePath parent, ETreePath path)
+insert_node (ETreeTableAdapter *etta,
+ ETreePath parent,
+ ETreePath path)
{
GNode *gnode, *parent_gnode;
node_t *node, *parent_node;
@@ -467,7 +489,8 @@ typedef struct {
} check_expanded_closure;
static gboolean
-check_expanded (GNode *gnode, gpointer data)
+check_expanded (GNode *gnode,
+ gpointer data)
{
check_expanded_closure *closure = (check_expanded_closure *) data;
node_t *node = (node_t *) gnode->data;
@@ -479,7 +502,8 @@ check_expanded (GNode *gnode, gpointer data)
}
static void
-update_node (ETreeTableAdapter *etta, ETreePath path)
+update_node (ETreeTableAdapter *etta,
+ ETreePath path)
{
check_expanded_closure closure;
ETreePath parent = e_tree_model_node_get_parent (etta->priv->source, path);
@@ -595,7 +619,8 @@ etta_has_save_id (ETableModel *etm)
}
static gchar *
-etta_get_save_id (ETableModel *etm, gint row)
+etta_get_save_id (ETableModel *etm,
+ gint row)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *) etm;
@@ -619,7 +644,9 @@ etta_row_count (ETableModel *etm)
}
static gpointer
-etta_value_at (ETableModel *etm, gint col, gint row)
+etta_value_at (ETableModel *etm,
+ gint col,
+ gint row)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *) etm;
@@ -638,7 +665,10 @@ etta_value_at (ETableModel *etm, gint col, gint row)
}
static void
-etta_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
+etta_set_value_at (ETableModel *etm,
+ gint col,
+ gint row,
+ gconstpointer val)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *) etm;
@@ -646,7 +676,9 @@ etta_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
}
static gboolean
-etta_is_cell_editable (ETableModel *etm, gint col, gint row)
+etta_is_cell_editable (ETableModel *etm,
+ gint col,
+ gint row)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *) etm;
@@ -654,12 +686,16 @@ etta_is_cell_editable (ETableModel *etm, gint col, gint row)
}
static void
-etta_append_row (ETableModel *etm, ETableModel *source, gint row)
+etta_append_row (ETableModel *etm,
+ ETableModel *source,
+ gint row)
{
}
static gpointer
-etta_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
+etta_duplicate_value (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *) etm;
@@ -667,7 +703,9 @@ etta_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
}
static void
-etta_free_value (ETableModel *etm, gint col, gpointer value)
+etta_free_value (ETableModel *etm,
+ gint col,
+ gpointer value)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *) etm;
@@ -675,7 +713,8 @@ etta_free_value (ETableModel *etm, gint col, gpointer value)
}
static gpointer
-etta_initialize_value (ETableModel *etm, gint col)
+etta_initialize_value (ETableModel *etm,
+ gint col)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *) etm;
@@ -683,7 +722,9 @@ etta_initialize_value (ETableModel *etm, gint col)
}
static gboolean
-etta_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
+etta_value_is_empty (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *) etm;
@@ -691,7 +732,9 @@ etta_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
}
static gchar *
-etta_value_to_string (ETableModel *etm, gint col, gconstpointer value)
+etta_value_to_string (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *) etm;
@@ -752,19 +795,22 @@ etta_init (ETreeTableAdapter *etta)
}
static void
-etta_proxy_pre_change (ETreeModel *etm, ETreeTableAdapter *etta)
+etta_proxy_pre_change (ETreeModel *etm,
+ ETreeTableAdapter *etta)
{
e_table_model_pre_change (E_TABLE_MODEL (etta));
}
static void
-etta_proxy_no_change (ETreeModel *etm, ETreeTableAdapter *etta)
+etta_proxy_no_change (ETreeModel *etm,
+ ETreeTableAdapter *etta)
{
e_table_model_no_change (E_TABLE_MODEL (etta));
}
static void
-etta_proxy_rebuilt (ETreeModel *etm, ETreeTableAdapter *etta)
+etta_proxy_rebuilt (ETreeModel *etm,
+ ETreeTableAdapter *etta)
{
if (!etta->priv->root)
return;
@@ -783,7 +829,9 @@ resort_model (ETreeTableAdapter *etta)
}
static void
-etta_proxy_node_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter *etta)
+etta_proxy_node_changed (ETreeModel *etm,
+ ETreePath path,
+ ETreeTableAdapter *etta)
{
update_node (etta, path);
e_table_model_changed (E_TABLE_MODEL (etta));
@@ -796,7 +844,9 @@ etta_proxy_node_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter *ett
}
static void
-etta_proxy_node_data_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter *etta)
+etta_proxy_node_data_changed (ETreeModel *etm,
+ ETreePath path,
+ ETreeTableAdapter *etta)
{
gint row = get_row (etta, path);
@@ -809,7 +859,10 @@ etta_proxy_node_data_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter
}
static void
-etta_proxy_node_col_changed (ETreeModel *etm, ETreePath path, gint col, ETreeTableAdapter *etta)
+etta_proxy_node_col_changed (ETreeModel *etm,
+ ETreePath path,
+ gint col,
+ ETreeTableAdapter *etta)
{
gint row = get_row (etta, path);
@@ -822,7 +875,10 @@ etta_proxy_node_col_changed (ETreeModel *etm, ETreePath path, gint col, ETreeTab
}
static void
-etta_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETreeTableAdapter *etta)
+etta_proxy_node_inserted (ETreeModel *etm,
+ ETreePath parent,
+ ETreePath child,
+ ETreeTableAdapter *etta)
{
if (e_tree_model_node_is_root (etm, child))
generate_tree (etta, child);
@@ -833,26 +889,33 @@ etta_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ET
}
static void
-etta_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, gint old_position, ETreeTableAdapter *etta)
+etta_proxy_node_removed (ETreeModel *etm,
+ ETreePath parent,
+ ETreePath child,
+ gint old_position,
+ ETreeTableAdapter *etta)
{
delete_node (etta, parent, child);
e_table_model_changed (E_TABLE_MODEL (etta));
}
static void
-etta_proxy_node_request_collapse (ETreeModel *etm, ETreePath node, ETreeTableAdapter *etta)
+etta_proxy_node_request_collapse (ETreeModel *etm,
+ ETreePath node,
+ ETreeTableAdapter *etta)
{
e_tree_table_adapter_node_set_expanded (etta, node, FALSE);
}
static void
-etta_sort_info_changed (ETableSortInfo *sort_info, ETreeTableAdapter *etta)
+etta_sort_info_changed (ETableSortInfo *sort_info,
+ ETreeTableAdapter *etta)
{
if (!etta->priv->root)
return;
/* the function is called also internally, with sort_info = NULL,
- thus skip those in signal emit */
+ * thus skip those in signal emit */
if (sort_info) {
gboolean handled = FALSE;
@@ -869,7 +932,10 @@ etta_sort_info_changed (ETableSortInfo *sort_info, ETreeTableAdapter *etta)
}
ETableModel *
-e_tree_table_adapter_construct (ETreeTableAdapter *etta, ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *header)
+e_tree_table_adapter_construct (ETreeTableAdapter *etta,
+ ETreeModel *source,
+ ETableSortInfo *sort_info,
+ ETableHeader *header)
{
ETreePath root;
@@ -879,8 +945,9 @@ e_tree_table_adapter_construct (ETreeTableAdapter *etta, ETreeModel *source, ETa
etta->priv->sort_info = sort_info;
if (sort_info) {
g_object_ref (sort_info);
- etta->priv->sort_info_changed_id = g_signal_connect (G_OBJECT (sort_info), "sort_info_changed",
- G_CALLBACK (etta_sort_info_changed), etta);
+ etta->priv->sort_info_changed_id = g_signal_connect (
+ sort_info, "sort_info_changed",
+ G_CALLBACK (etta_sort_info_changed), etta);
}
etta->priv->header = header;
@@ -894,30 +961,41 @@ e_tree_table_adapter_construct (ETreeTableAdapter *etta, ETreeModel *source, ETa
if (root)
generate_tree (etta, root);
- etta->priv->pre_change_id = g_signal_connect(G_OBJECT(source), "pre_change",
- G_CALLBACK (etta_proxy_pre_change), etta);
- etta->priv->no_change_id = g_signal_connect (G_OBJECT (source), "no_change",
- G_CALLBACK (etta_proxy_no_change), etta);
- etta->priv->rebuilt_id = g_signal_connect (G_OBJECT (source), "rebuilt",
- G_CALLBACK (etta_proxy_rebuilt), etta);
- etta->priv->node_changed_id = g_signal_connect (G_OBJECT (source), "node_changed",
- G_CALLBACK (etta_proxy_node_changed), etta);
- etta->priv->node_data_changed_id = g_signal_connect (G_OBJECT (source), "node_data_changed",
- G_CALLBACK (etta_proxy_node_data_changed), etta);
- etta->priv->node_col_changed_id = g_signal_connect (G_OBJECT (source), "node_col_changed",
- G_CALLBACK (etta_proxy_node_col_changed), etta);
- etta->priv->node_inserted_id = g_signal_connect (G_OBJECT (source), "node_inserted",
- G_CALLBACK (etta_proxy_node_inserted), etta);
- etta->priv->node_removed_id = g_signal_connect (G_OBJECT (source), "node_removed",
- G_CALLBACK (etta_proxy_node_removed), etta);
- etta->priv->node_request_collapse_id = g_signal_connect (G_OBJECT (source), "node_request_collapse",
- G_CALLBACK (etta_proxy_node_request_collapse), etta);
+ etta->priv->pre_change_id = g_signal_connect (
+ source, "pre_change",
+ G_CALLBACK (etta_proxy_pre_change), etta);
+ etta->priv->no_change_id = g_signal_connect (
+ source, "no_change",
+ G_CALLBACK (etta_proxy_no_change), etta);
+ etta->priv->rebuilt_id = g_signal_connect (
+ source, "rebuilt",
+ G_CALLBACK (etta_proxy_rebuilt), etta);
+ etta->priv->node_changed_id = g_signal_connect (
+ source, "node_changed",
+ G_CALLBACK (etta_proxy_node_changed), etta);
+ etta->priv->node_data_changed_id = g_signal_connect (
+ source, "node_data_changed",
+ G_CALLBACK (etta_proxy_node_data_changed), etta);
+ etta->priv->node_col_changed_id = g_signal_connect (
+ source, "node_col_changed",
+ G_CALLBACK (etta_proxy_node_col_changed), etta);
+ etta->priv->node_inserted_id = g_signal_connect (
+ source, "node_inserted",
+ G_CALLBACK (etta_proxy_node_inserted), etta);
+ etta->priv->node_removed_id = g_signal_connect (
+ source, "node_removed",
+ G_CALLBACK (etta_proxy_node_removed), etta);
+ etta->priv->node_request_collapse_id = g_signal_connect (
+ source, "node_request_collapse",
+ G_CALLBACK (etta_proxy_node_request_collapse), etta);
return E_TABLE_MODEL (etta);
}
ETableModel *
-e_tree_table_adapter_new (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *header)
+e_tree_table_adapter_new (ETreeModel *source,
+ ETableSortInfo *sort_info,
+ ETableHeader *header)
{
ETreeTableAdapter *etta = g_object_new (E_TYPE_TREE_TABLE_ADAPTER, NULL);
@@ -933,7 +1011,9 @@ typedef struct {
} TreeAndRoot;
static void
-save_expanded_state_func (gpointer keyp, gpointer value, gpointer data)
+save_expanded_state_func (gpointer keyp,
+ gpointer value,
+ gpointer data)
{
ETreePath path = keyp;
node_t *node = ((GNode *) value)->data;
@@ -974,7 +1054,8 @@ e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta)
}
void
-e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const gchar *filename)
+e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta,
+ const gchar *filename)
{
xmlDoc *doc;
@@ -988,7 +1069,8 @@ e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const gchar *
}
static xmlDoc *
-open_file (ETreeTableAdapter *etta, const gchar *filename)
+open_file (ETreeTableAdapter *etta,
+ const gchar *filename)
{
xmlDoc *doc;
xmlNode *root;
@@ -1034,7 +1116,8 @@ open_file (ETreeTableAdapter *etta, const gchar *filename)
/* state: <0 ... collapse; 0 ... use default; >0 ... expand */
void
-e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta, gint state)
+e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta,
+ gint state)
{
g_return_if_fail (etta != NULL);
@@ -1042,7 +1125,8 @@ e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta, gint state)
}
void
-e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *doc)
+e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta,
+ xmlDoc *doc)
{
xmlNode *root, *child;
gboolean model_default;
@@ -1104,7 +1188,8 @@ e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *d
}
void
-e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const gchar *filename)
+e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta,
+ const gchar *filename)
{
xmlDoc *doc;
@@ -1120,7 +1205,8 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const gchar *
}
void
-e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta, gboolean visible)
+e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta,
+ gboolean visible)
{
gint size;
@@ -1145,7 +1231,9 @@ e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta, gboolean vi
}
void
-e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ETreePath path, gboolean expanded)
+e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta,
+ ETreePath path,
+ gboolean expanded)
{
GNode *gnode = lookup_gnode (etta, path);
node_t *node;
@@ -1203,7 +1291,9 @@ e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ETreePath path,
}
void
-e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter *etta, ETreePath path, gboolean expanded)
+e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter *etta,
+ ETreePath path,
+ gboolean expanded)
{
ETreePath children;
@@ -1217,13 +1307,15 @@ e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter *etta, ETreePa
}
ETreePath
-e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta, gint row)
+e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta,
+ gint row)
{
return get_path (etta, row);
}
gint
-e_tree_table_adapter_row_of_node (ETreeTableAdapter *etta, ETreePath path)
+e_tree_table_adapter_row_of_node (ETreeTableAdapter *etta,
+ ETreePath path)
{
return get_row (etta, path);
}
@@ -1235,7 +1327,8 @@ e_tree_table_adapter_root_node_is_visible (ETreeTableAdapter *etta)
}
void
-e_tree_table_adapter_show_node (ETreeTableAdapter *etta, ETreePath path)
+e_tree_table_adapter_show_node (ETreeTableAdapter *etta,
+ ETreePath path)
{
ETreePath parent;
@@ -1248,7 +1341,8 @@ e_tree_table_adapter_show_node (ETreeTableAdapter *etta, ETreePath path)
}
gboolean
-e_tree_table_adapter_node_is_expanded (ETreeTableAdapter *etta, ETreePath path)
+e_tree_table_adapter_node_is_expanded (ETreeTableAdapter *etta,
+ ETreePath path)
{
node_t *node = get_node (etta, path);
if (!e_tree_model_node_is_expandable (etta->priv->source, path) || !node)
@@ -1258,7 +1352,8 @@ e_tree_table_adapter_node_is_expanded (ETreeTableAdapter *etta, ETreePath path)
}
void
-e_tree_table_adapter_set_sort_info (ETreeTableAdapter *etta, ETableSortInfo *sort_info)
+e_tree_table_adapter_set_sort_info (ETreeTableAdapter *etta,
+ ETableSortInfo *sort_info)
{
if (etta->priv->sort_info) {
g_signal_handler_disconnect (G_OBJECT (etta->priv->sort_info),
@@ -1269,8 +1364,9 @@ e_tree_table_adapter_set_sort_info (ETreeTableAdapter *etta, ETableSortInfo *sor
etta->priv->sort_info = sort_info;
if (sort_info) {
g_object_ref (sort_info);
- etta->priv->sort_info_changed_id = g_signal_connect(G_OBJECT(sort_info), "sort_info_changed",
- G_CALLBACK (etta_sort_info_changed), etta);
+ etta->priv->sort_info_changed_id = g_signal_connect (
+ sort_info, "sort_info_changed",
+ G_CALLBACK (etta_sort_info_changed), etta);
}
if (!etta->priv->root)
@@ -1299,7 +1395,8 @@ e_tree_table_adapter_get_header (ETreeTableAdapter *etta)
}
ETreePath
-e_tree_table_adapter_node_get_next (ETreeTableAdapter *etta, ETreePath path)
+e_tree_table_adapter_node_get_next (ETreeTableAdapter *etta,
+ ETreePath path)
{
GNode *node = lookup_gnode (etta, path);
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 996a6b1e51..770b2ad653 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -303,13 +303,15 @@ e_tree_state_change (ETree *et)
}
static void
-change_trigger (GObject *object, ETree *et)
+change_trigger (GObject *object,
+ ETree *et)
{
e_tree_state_change (et);
}
static void
-search_col_change_trigger (GObject *object, ETree *et)
+search_col_change_trigger (GObject *object,
+ ETree *et)
{
clear_current_search_col (et);
e_tree_state_change (et);
@@ -343,7 +345,8 @@ disconnect_header (ETree *e_tree)
}
static void
-connect_header (ETree *e_tree, ETableState *state)
+connect_header (ETree *e_tree,
+ ETableState *state)
{
GValue *val = g_new0 (GValue, 1);
@@ -489,7 +492,9 @@ typedef struct {
} SearchSearchStruct;
static gboolean
-search_search_callback (ETreeModel *model, ETreePath path, gpointer data)
+search_search_callback (ETreeModel *model,
+ ETreePath path,
+ gpointer data)
{
SearchSearchStruct *cb_data = data;
gconstpointer value;
@@ -561,7 +566,8 @@ et_search_search (ETableSearch *search,
}
static void
-et_search_accept (ETableSearch *search, ETree *et)
+et_search_accept (ETableSearch *search,
+ ETree *et)
{
ETableCol *col = current_search_col (et);
gint cursor;
@@ -609,12 +615,13 @@ e_tree_init (ETree *e_tree)
e_tree->priv->search = e_table_search_new ();
- e_tree->priv->search_search_id =
- g_signal_connect (G_OBJECT (e_tree->priv->search), "search",
- G_CALLBACK (et_search_search), e_tree);
- e_tree->priv->search_accept_id =
- g_signal_connect (G_OBJECT (e_tree->priv->search), "accept",
- G_CALLBACK (et_search_accept), e_tree);
+ e_tree->priv->search_search_id = g_signal_connect (
+ e_tree->priv->search, "search",
+ G_CALLBACK (et_search_search), e_tree);
+
+ e_tree->priv->search_accept_id = g_signal_connect (
+ e_tree->priv->search, "accept",
+ G_CALLBACK (et_search_accept), e_tree);
e_tree->priv->always_search = g_getenv ("GAL_ALWAYS_SEARCH") ? TRUE : FALSE;
}
@@ -632,7 +639,8 @@ et_grab_focus (GtkWidget *widget)
/* Focus handler for the ETree */
static gint
-et_focus (GtkWidget *container, GtkDirectionType direction)
+et_focus (GtkWidget *container,
+ GtkDirectionType direction)
{
ETree *e_tree;
@@ -670,7 +678,9 @@ set_header_canvas_width (ETree *e_tree)
}
static void
-header_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETree *e_tree)
+header_canvas_size_allocate (GtkWidget *widget,
+ GtkAllocation *alloc,
+ ETree *e_tree)
{
GtkAllocation allocation;
@@ -680,9 +690,9 @@ header_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETree *e_t
gtk_widget_get_allocation (widget, &allocation);
/* When the header item is created ->height == 0,
- as the font is only created when everything is realized.
- So we set the usize here as well, so that the size of the
- header is correct */
+ * as the font is only created when everything is realized.
+ * So we set the usize here as well, so that the size of the
+ * header is correct */
if (allocation.height != E_TABLE_HEADER_ITEM (e_tree->priv->header_item)->height)
gtk_widget_set_size_request (
widget, -1,
@@ -804,8 +814,9 @@ tree_canvas_reflow_idle (ETree *e_tree)
}
static void
-tree_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
- ETree *e_tree)
+tree_canvas_size_allocate (GtkWidget *widget,
+ GtkAllocation *alloc,
+ ETree *e_tree)
{
gdouble width;
gdouble height;
@@ -831,7 +842,8 @@ tree_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
}
static void
-tree_canvas_reflow (GnomeCanvas *canvas, ETree *e_tree)
+tree_canvas_reflow (GnomeCanvas *canvas,
+ ETree *e_tree)
{
if (!e_tree->priv->reflow_idle_id)
e_tree->priv->reflow_idle_id = g_idle_add_full (
@@ -840,7 +852,9 @@ tree_canvas_reflow (GnomeCanvas *canvas, ETree *e_tree)
}
static void
-item_cursor_change (ETableItem *eti, gint row, ETree *et)
+item_cursor_change (ETableItem *eti,
+ gint row,
+ ETree *et)
{
ETreePath path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
@@ -848,7 +862,9 @@ item_cursor_change (ETableItem *eti, gint row, ETree *et)
}
static void
-item_cursor_activated (ETableItem *eti, gint row, ETree *et)
+item_cursor_activated (ETableItem *eti,
+ gint row,
+ ETree *et)
{
ETreePath path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
@@ -856,7 +872,11 @@ item_cursor_activated (ETableItem *eti, gint row, ETree *et)
}
static void
-item_double_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
+item_double_click (ETableItem *eti,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETree *et)
{
ETreePath path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
@@ -864,7 +884,11 @@ item_double_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *
}
static gboolean
-item_right_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
+item_right_click (ETableItem *eti,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETree *et)
{
ETreePath path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
gboolean return_val = 0;
@@ -877,7 +901,11 @@ item_right_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *e
}
static gboolean
-item_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
+item_click (ETableItem *eti,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETree *et)
{
gboolean return_val = 0;
ETreePath path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
@@ -889,7 +917,11 @@ item_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
}
static gint
-item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
+item_key_press (ETableItem *eti,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETree *et)
{
gint return_val = 0;
GdkEventKey *key = (GdkEventKey *) event;
@@ -1000,7 +1032,11 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
}
static gint
-item_start_drag (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
+item_start_drag (ETableItem *eti,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETree *et)
{
ETreePath path;
gint return_val = 0;
@@ -1015,7 +1051,8 @@ item_start_drag (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et
}
static void
-et_selection_model_selection_changed (ETableSelectionModel *etsm, ETree *et)
+et_selection_model_selection_changed (ETableSelectionModel *etsm,
+ ETree *et)
{
g_signal_emit (et, et_signals[SELECTION_CHANGE], 0);
}
@@ -1064,7 +1101,8 @@ et_build_item (ETree *et)
}
static void
-et_canvas_style_set (GtkWidget *widget, GtkStyle *prev_style)
+et_canvas_style_set (GtkWidget *widget,
+ GtkStyle *prev_style)
{
GtkStyle *style;
@@ -1077,7 +1115,9 @@ et_canvas_style_set (GtkWidget *widget, GtkStyle *prev_style)
}
static gboolean
-white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETree *e_tree)
+white_item_event (GnomeCanvasItem *white_item,
+ GdkEvent *event,
+ ETree *e_tree)
{
gboolean return_val = 0;
g_signal_emit (e_tree,
@@ -1087,7 +1127,9 @@ white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETree *e_tree)
}
static gint
-et_canvas_root_event (GnomeCanvasItem *root, GdkEvent *event, ETree *e_tree)
+et_canvas_root_event (GnomeCanvasItem *root,
+ GdkEvent *event,
+ ETree *e_tree)
{
switch (event->type) {
case GDK_BUTTON_PRESS:
@@ -1115,7 +1157,9 @@ et_canvas_root_event (GnomeCanvasItem *root, GdkEvent *event, ETree *e_tree)
* and give the focus to some ETableItem.
*/
static gint
-table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data)
+table_canvas_focus_event_cb (GtkWidget *widget,
+ GdkEventFocus *event,
+ gpointer data)
{
GnomeCanvas *canvas;
ETree *tree;
@@ -1213,7 +1257,8 @@ e_tree_setup_table (ETree *e_tree)
* search column is cleared.
*/
void
-e_tree_set_search_column (ETree *e_tree, gint col)
+e_tree_set_search_column (ETree *e_tree,
+ gint col)
{
if (col == -1) {
clear_current_search_col (e_tree);
@@ -1226,7 +1271,8 @@ e_tree_set_search_column (ETree *e_tree, gint col)
}
void
-e_tree_set_state_object (ETree *e_tree, ETableState *state)
+e_tree_set_state_object (ETree *e_tree,
+ ETableState *state)
{
GValue *val;
GtkAllocation allocation;
@@ -1271,8 +1317,8 @@ e_tree_set_state_object (ETree *e_tree, ETableState *state)
* #ETree object.
*/
void
-e_tree_set_state (ETree *e_tree,
- const gchar *state_str)
+e_tree_set_state (ETree *e_tree,
+ const gchar *state_str)
{
ETableState *state;
@@ -1298,8 +1344,8 @@ e_tree_set_state (ETree *e_tree,
* @e_tree object.
*/
void
-e_tree_load_state (ETree *e_tree,
- const gchar *filename)
+e_tree_load_state (ETree *e_tree,
+ const gchar *filename)
{
ETableState *state;
@@ -1388,8 +1434,8 @@ e_tree_get_state (ETree *e_tree)
* @filename.
**/
void
-e_tree_save_state (ETree *e_tree,
- const gchar *filename)
+e_tree_save_state (ETree *e_tree,
+ const gchar *filename)
{
ETableState *state;
@@ -1413,26 +1459,35 @@ e_tree_get_spec (ETree *e_tree)
}
static void
-et_table_model_changed (ETableModel *model, ETree *et)
+et_table_model_changed (ETableModel *model,
+ ETree *et)
{
if (et->priv->horizontal_scrolling)
e_table_header_update_horizontal (et->priv->header);
}
static void
-et_table_row_changed (ETableModel *table_model, gint row, ETree *et)
+et_table_row_changed (ETableModel *table_model,
+ gint row,
+ ETree *et)
{
et_table_model_changed (table_model, et);
}
static void
-et_table_cell_changed (ETableModel *table_model, gint view_col, gint row, ETree *et)
+et_table_cell_changed (ETableModel *table_model,
+ gint view_col,
+ gint row,
+ ETree *et)
{
et_table_model_changed (table_model, et);
}
static void
-et_table_rows_deleted (ETableModel *table_model, gint row, gint count, ETree *et)
+et_table_rows_deleted (ETableModel *table_model,
+ gint row,
+ gint count,
+ ETree *et)
{
ETreePath * node, * prev_node;
@@ -1441,7 +1496,7 @@ et_table_rows_deleted (ETableModel *table_model, gint row, gint count, ETree *et
|| row == 0)
return;
- prev_node = e_tree_node_at_row (et, row-1);
+ prev_node = e_tree_node_at_row (et, row - 1);
node = e_tree_get_cursor (et);
/* Check if the cursor is a child of the node directly before the
@@ -1479,8 +1534,11 @@ et_connect_to_etta (ETree *et)
}
static gboolean
-et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
- ETableSpecification *specification, ETableState *state)
+et_real_construct (ETree *e_tree,
+ ETreeModel *etm,
+ ETableExtras *ete,
+ ETableSpecification *specification,
+ ETableState *state)
{
GtkAdjustment *adjustment;
GtkScrollable *scrollable;
@@ -1525,9 +1583,9 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
"cursor_mode", specification->cursor_mode,
NULL);
- g_signal_connect(e_tree->priv->selection, "selection_changed",
+ g_signal_connect (e_tree->priv->selection, "selection_changed",
G_CALLBACK (et_selection_model_selection_changed), e_tree);
- g_signal_connect(e_tree->priv->selection, "selection_row_changed",
+ g_signal_connect (e_tree->priv->selection, "selection_row_changed",
G_CALLBACK (et_selection_model_selection_row_changed), e_tree);
if (!specification->no_headers) {
@@ -1578,8 +1636,11 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
* Return value: %TRUE on success, %FALSE if an error occurred
**/
gboolean
-e_tree_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
- const gchar *spec_str, const gchar *state_str)
+e_tree_construct (ETree *e_tree,
+ ETreeModel *etm,
+ ETableExtras *ete,
+ const gchar *spec_str,
+ const gchar *state_str)
{
ETableSpecification *specification;
ETableState *state;
@@ -1637,8 +1698,11 @@ e_tree_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
* Return value: %TRUE on success, %FALSE if an error occurred
**/
gboolean
-e_tree_construct_from_spec_file (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
- const gchar *spec_fn, const gchar *state_fn)
+e_tree_construct_from_spec_file (ETree *e_tree,
+ ETreeModel *etm,
+ ETableExtras *ete,
+ const gchar *spec_fn,
+ const gchar *state_fn)
{
ETableSpecification *specification;
ETableState *state;
@@ -1707,7 +1771,10 @@ e_tree_construct_from_spec_file (ETree *e_tree, ETreeModel *etm, ETableExtras *e
* The newly created #ETree or %NULL if there's an error.
**/
GtkWidget *
-e_tree_new (ETreeModel *etm, ETableExtras *ete, const gchar *spec, const gchar *state)
+e_tree_new (ETreeModel *etm,
+ ETableExtras *ete,
+ const gchar *spec,
+ const gchar *state)
{
ETree *e_tree;
@@ -1779,7 +1846,8 @@ e_tree_show_cursor_after_reflow (ETree *e_tree)
}
void
-e_tree_set_cursor (ETree *e_tree, ETreePath path)
+e_tree_set_cursor (ETree *e_tree,
+ ETreePath path)
{
#ifndef E_TREE_USE_TREE_SELECTION
gint row;
@@ -1829,9 +1897,9 @@ e_tree_get_cursor (ETree *e_tree)
}
void
-e_tree_selected_row_foreach (ETree *e_tree,
- EForeachFunc callback,
- gpointer closure)
+e_tree_selected_row_foreach (ETree *e_tree,
+ EForeachFunc callback,
+ gpointer closure)
{
g_return_if_fail (e_tree != NULL);
g_return_if_fail (E_IS_TREE (e_tree));
@@ -1843,9 +1911,9 @@ e_tree_selected_row_foreach (ETree *e_tree,
#ifdef E_TREE_USE_TREE_SELECTION
void
-e_tree_selected_path_foreach (ETree *e_tree,
- ETreeForeachFunc callback,
- gpointer closure)
+e_tree_selected_path_foreach (ETree *e_tree,
+ ETreeForeachFunc callback,
+ gpointer closure)
{
g_return_if_fail (e_tree != NULL);
g_return_if_fail (E_IS_TREE (e_tree));
@@ -1858,9 +1926,9 @@ e_tree_selected_path_foreach (ETree *e_tree,
/* Standard functions */
static void
et_foreach_recurse (ETreeModel *model,
- ETreePath path,
- ETreeForeachFunc callback,
- gpointer closure)
+ ETreePath path,
+ ETreeForeachFunc callback,
+ gpointer closure)
{
ETreePath child;
@@ -1874,8 +1942,8 @@ et_foreach_recurse (ETreeModel *model,
void
e_tree_path_foreach (ETree *e_tree,
- ETreeForeachFunc callback,
- gpointer closure)
+ ETreeForeachFunc callback,
+ gpointer closure)
{
ETreePath root;
@@ -1903,13 +1971,13 @@ e_tree_get_printable (ETree *e_tree)
static void
et_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ETree *etree = E_TREE (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_ETTA:
g_value_set_object (value, etree->priv->etta);
break;
@@ -1952,7 +2020,7 @@ et_get_property (GObject *object,
g_value_set_enum (value, 0);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
@@ -1964,13 +2032,13 @@ typedef struct {
static void
et_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ETree *etree = E_TREE (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_LENGTH_THRESHOLD:
etree->priv->length_threshold = g_value_get_int (value);
if (etree->priv->item) {
@@ -2051,8 +2119,8 @@ et_set_property (GObject *object,
}
gint
-e_tree_get_next_row (ETree *e_tree,
- gint model_row)
+e_tree_get_next_row (ETree *e_tree,
+ gint model_row)
{
g_return_val_if_fail (e_tree != NULL, -1);
g_return_val_if_fail (E_IS_TREE (e_tree), -1);
@@ -2079,8 +2147,8 @@ e_tree_get_next_row (ETree *e_tree,
}
gint
-e_tree_get_prev_row (ETree *e_tree,
- gint model_row)
+e_tree_get_prev_row (ETree *e_tree,
+ gint model_row)
{
g_return_val_if_fail (e_tree != NULL, -1);
g_return_val_if_fail (E_IS_TREE (e_tree), -1);
@@ -2098,8 +2166,8 @@ e_tree_get_prev_row (ETree *e_tree,
}
gint
-e_tree_model_to_view_row (ETree *e_tree,
- gint model_row)
+e_tree_model_to_view_row (ETree *e_tree,
+ gint model_row)
{
g_return_val_if_fail (e_tree != NULL, -1);
g_return_val_if_fail (E_IS_TREE (e_tree), -1);
@@ -2111,8 +2179,8 @@ e_tree_model_to_view_row (ETree *e_tree,
}
gint
-e_tree_view_to_model_row (ETree *e_tree,
- gint view_row)
+e_tree_view_to_model_row (ETree *e_tree,
+ gint view_row)
{
g_return_val_if_fail (e_tree != NULL, -1);
g_return_val_if_fail (E_IS_TREE (e_tree), -1);
@@ -2124,7 +2192,8 @@ e_tree_view_to_model_row (ETree *e_tree,
}
gboolean
-e_tree_node_is_expanded (ETree *et, ETreePath path)
+e_tree_node_is_expanded (ETree *et,
+ ETreePath path)
{
g_return_val_if_fail (path, FALSE);
@@ -2132,7 +2201,9 @@ e_tree_node_is_expanded (ETree *et, ETreePath path)
}
void
-e_tree_node_set_expanded (ETree *et, ETreePath path, gboolean expanded)
+e_tree_node_set_expanded (ETree *et,
+ ETreePath path,
+ gboolean expanded)
{
g_return_if_fail (et != NULL);
g_return_if_fail (E_IS_TREE (et));
@@ -2141,7 +2212,9 @@ e_tree_node_set_expanded (ETree *et, ETreePath path, gboolean expanded)
}
void
-e_tree_node_set_expanded_recurse (ETree *et, ETreePath path, gboolean expanded)
+e_tree_node_set_expanded_recurse (ETree *et,
+ ETreePath path,
+ gboolean expanded)
{
g_return_if_fail (et != NULL);
g_return_if_fail (E_IS_TREE (et));
@@ -2150,7 +2223,8 @@ e_tree_node_set_expanded_recurse (ETree *et, ETreePath path, gboolean expanded)
}
void
-e_tree_root_node_set_visible (ETree *et, gboolean visible)
+e_tree_root_node_set_visible (ETree *et,
+ gboolean visible)
{
g_return_if_fail (et != NULL);
g_return_if_fail (E_IS_TREE (et));
@@ -2159,7 +2233,8 @@ e_tree_root_node_set_visible (ETree *et, gboolean visible)
}
ETreePath
-e_tree_node_at_row (ETree *et, gint row)
+e_tree_node_at_row (ETree *et,
+ gint row)
{
ETreePath path;
@@ -2169,7 +2244,8 @@ e_tree_node_at_row (ETree *et, gint row)
}
gint
-e_tree_row_of_node (ETree *et, ETreePath path)
+e_tree_row_of_node (ETree *et,
+ ETreePath path)
{
return e_tree_table_adapter_row_of_node (et->priv->etta, path);
}
@@ -2181,7 +2257,8 @@ e_tree_root_node_is_visible (ETree *et)
}
void
-e_tree_show_node (ETree *et, ETreePath path)
+e_tree_show_node (ETree *et,
+ ETreePath path)
{
g_return_if_fail (et != NULL);
g_return_if_fail (E_IS_TREE (et));
@@ -2190,7 +2267,8 @@ e_tree_show_node (ETree *et, ETreePath path)
}
void
-e_tree_save_expanded_state (ETree *et, gchar *filename)
+e_tree_save_expanded_state (ETree *et,
+ gchar *filename)
{
g_return_if_fail (et != NULL);
g_return_if_fail (E_IS_TREE (et));
@@ -2199,7 +2277,8 @@ e_tree_save_expanded_state (ETree *et, gchar *filename)
}
void
-e_tree_load_expanded_state (ETree *et, gchar *filename)
+e_tree_load_expanded_state (ETree *et,
+ gchar *filename)
{
e_tree_table_adapter_load_expanded_state (et->priv->etta, filename);
}
@@ -2214,7 +2293,8 @@ e_tree_save_expanded_state_xml (ETree *et)
}
void
-e_tree_load_expanded_state_xml (ETree *et, xmlDoc *doc)
+e_tree_load_expanded_state_xml (ETree *et,
+ xmlDoc *doc)
{
g_return_if_fail (et != NULL);
g_return_if_fail (E_IS_TREE (et));
@@ -2224,10 +2304,11 @@ e_tree_load_expanded_state_xml (ETree *et, xmlDoc *doc)
}
/* state: <0 ... collapse; 0 ... no force - use default; >0 ... expand;
- when using this, be sure to reset to 0 once no forcing is required
- anymore, aka the build of the tree is done */
+ * when using this, be sure to reset to 0 once no forcing is required
+ * anymore, aka the build of the tree is done */
void
-e_tree_force_expanded_state (ETree *et, gint state)
+e_tree_force_expanded_state (ETree *et,
+ gint state)
{
e_tree_table_adapter_force_expanded_state (et->priv->etta, state);
}
@@ -2245,7 +2326,11 @@ e_tree_get_tooltip (ETree *et)
}
static ETreePath
-find_next_in_range (ETree *et, gint start, gint end, ETreePathFunc func, gpointer data)
+find_next_in_range (ETree *et,
+ gint start,
+ gint end,
+ ETreePathFunc func,
+ gpointer data)
{
ETreePath path;
gint row;
@@ -2260,7 +2345,11 @@ find_next_in_range (ETree *et, gint start, gint end, ETreePathFunc func, gpointe
}
static ETreePath
-find_prev_in_range (ETree *et, gint start, gint end, ETreePathFunc func, gpointer data)
+find_prev_in_range (ETree *et,
+ gint start,
+ gint end,
+ ETreePathFunc func,
+ gpointer data)
{
ETreePath path;
gint row;
@@ -2372,7 +2461,7 @@ e_tree_get_table_adapter (ETree *et)
}
ETableItem *
-e_tree_get_item (ETree * et)
+e_tree_get_item (ETree *et)
{
g_return_val_if_fail (et != NULL, NULL);
g_return_val_if_fail (E_IS_TREE (et), NULL);
@@ -2381,7 +2470,7 @@ e_tree_get_item (ETree * et)
}
GnomeCanvasItem *
-e_tree_get_header_item (ETree * et)
+e_tree_get_header_item (ETree *et)
{
g_return_val_if_fail (et != NULL, NULL);
g_return_val_if_fail (E_IS_TREE (et), NULL);
@@ -2458,12 +2547,12 @@ struct _GtkDragSourceInfo
/* Target */
void
-e_tree_drag_get_data (ETree *tree,
- gint row,
- gint col,
- GdkDragContext *context,
- GdkAtom target,
- guint32 time)
+e_tree_drag_get_data (ETree *tree,
+ gint row,
+ gint col,
+ GdkDragContext *context,
+ GdkAtom target,
+ guint32 time)
{
g_return_if_fail (tree != NULL);
g_return_if_fail (E_IS_TREE (tree));
@@ -2486,8 +2575,8 @@ e_tree_drag_get_data (ETree *tree,
*/
void
e_tree_drag_highlight (ETree *tree,
- gint row,
- gint col)
+ gint row,
+ gint col)
{
GtkAllocation allocation;
GtkAdjustment *adjustment;
@@ -2596,7 +2685,11 @@ e_tree_drag_dest_unset (GtkWidget *widget)
/* Source side */
static gint
-et_real_start_drag (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event)
+et_real_start_drag (ETree *tree,
+ gint row,
+ ETreePath path,
+ gint col,
+ GdkEvent *event)
{
GtkDragSourceInfo *info;
GdkDragContext *context;
@@ -2629,11 +2722,11 @@ et_real_start_drag (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *e
}
void
-e_tree_drag_source_set (ETree *tree,
- GdkModifierType start_button_mask,
- const GtkTargetEntry *targets,
- gint n_targets,
- GdkDragAction actions)
+e_tree_drag_source_set (ETree *tree,
+ GdkModifierType start_button_mask,
+ const GtkTargetEntry *targets,
+ gint n_targets,
+ GdkDragAction actions)
{
ETreeDragSourceSite *site;
GtkWidget *canvas;
@@ -2692,13 +2785,13 @@ e_tree_drag_source_unset (ETree *tree)
*/
GdkDragContext *
-e_tree_drag_begin (ETree *tree,
- gint row,
- gint col,
- GtkTargetList *targets,
- GdkDragAction actions,
- gint button,
- GdkEvent *event)
+e_tree_drag_begin (ETree *tree,
+ gint row,
+ gint col,
+ GtkTargetList *targets,
+ GdkDragAction actions,
+ gint button,
+ GdkEvent *event)
{
ETreePath path;
g_return_val_if_fail (tree != NULL, NULL);
@@ -2730,8 +2823,10 @@ e_tree_drag_begin (ETree *tree,
**/
void
e_tree_get_cell_at (ETree *tree,
- gint x, gint y,
- gint *row_return, gint *col_return)
+ gint x,
+ gint y,
+ gint *row_return,
+ gint *col_return)
{
GtkAdjustment *adjustment;
GtkScrollable *scrollable;
@@ -2777,9 +2872,12 @@ e_tree_get_cell_at (ETree *tree,
**/
void
e_tree_get_cell_geometry (ETree *tree,
- gint row, gint col,
- gint *x_return, gint *y_return,
- gint *width_return, gint *height_return)
+ gint row,
+ gint col,
+ gint *x_return,
+ gint *y_return,
+ gint *width_return,
+ gint *height_return)
{
GtkAdjustment *adjustment;
GtkScrollable *scrollable;
@@ -2811,8 +2909,8 @@ e_tree_get_cell_geometry (ETree *tree,
static void
et_drag_begin (GtkWidget *widget,
- GdkDragContext *context,
- ETree *et)
+ GdkDragContext *context,
+ ETree *et)
{
g_signal_emit (et,
et_signals[TREE_DRAG_BEGIN], 0,
@@ -2824,8 +2922,8 @@ et_drag_begin (GtkWidget *widget,
static void
et_drag_end (GtkWidget *widget,
- GdkDragContext *context,
- ETree *et)
+ GdkDragContext *context,
+ ETree *et)
{
g_signal_emit (et,
et_signals[TREE_DRAG_END], 0,
@@ -2837,11 +2935,11 @@ et_drag_end (GtkWidget *widget,
static void
et_drag_data_get (GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- ETree *et)
+ GdkDragContext *context,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ ETree *et)
{
g_signal_emit (et,
et_signals[TREE_DRAG_DATA_GET], 0,
@@ -2856,8 +2954,8 @@ et_drag_data_get (GtkWidget *widget,
static void
et_drag_data_delete (GtkWidget *widget,
- GdkDragContext *context,
- ETree *et)
+ GdkDragContext *context,
+ ETree *et)
{
g_signal_emit (et,
et_signals[TREE_DRAG_DATA_DELETE], 0,
@@ -2869,10 +2967,10 @@ et_drag_data_delete (GtkWidget *widget,
static gboolean
do_drag_motion (ETree *et,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time)
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time)
{
gboolean ret_val = FALSE;
gint row, col;
@@ -2973,7 +3071,8 @@ scroll_timeout (gpointer data)
}
static void
-scroll_on (ETree *et, guint scroll_direction)
+scroll_on (ETree *et,
+ guint scroll_direction)
{
if (et->priv->scroll_idle_id == 0 ||
scroll_direction != et->priv->scroll_direction) {
@@ -3027,7 +3126,9 @@ hover_timeout (gpointer data)
}
static void
-hover_on (ETree *et, gint x, gint y)
+hover_on (ETree *et,
+ gint x,
+ gint y)
{
et->priv->hover_x = x;
et->priv->hover_y = y;
@@ -3046,7 +3147,8 @@ hover_off (ETree *et)
}
static void
-collapse_drag (ETree *et, ETreePath drop)
+collapse_drag (ETree *et,
+ ETreePath drop)
{
GList *list;
@@ -3085,7 +3187,8 @@ collapse_drag (ETree *et, ETreePath drop)
}
static void
-context_destroyed (gpointer data, GObject *ctx)
+context_destroyed (gpointer data,
+ GObject *ctx)
{
ETree *et = data;
if (et->priv) {
@@ -3101,7 +3204,8 @@ context_destroyed (gpointer data, GObject *ctx)
}
static void
-context_connect (ETree *et, GdkDragContext *context)
+context_connect (ETree *et,
+ GdkDragContext *context)
{
if (context == et->priv->last_drop_context)
return;
@@ -3118,9 +3222,9 @@ context_connect (ETree *et, GdkDragContext *context)
static void
et_drag_leave (GtkWidget *widget,
- GdkDragContext *context,
- guint time,
- ETree *et)
+ GdkDragContext *context,
+ guint time,
+ ETree *et)
{
g_signal_emit (et,
et_signals[TREE_DRAG_LEAVE], 0,
@@ -3138,11 +3242,11 @@ et_drag_leave (GtkWidget *widget,
static gboolean
et_drag_motion (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time,
- ETree *et)
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ ETree *et)
{
GtkAllocation allocation;
gint ret_val;
@@ -3186,11 +3290,11 @@ et_drag_motion (GtkWidget *widget,
static gboolean
et_drag_drop (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time,
- ETree *et)
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ ETree *et)
{
gboolean ret_val = FALSE;
gint row, col;
@@ -3248,13 +3352,13 @@ et_drag_drop (GtkWidget *widget,
static void
et_drag_data_received (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- ETree *et)
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ ETree *et)
{
gint row, col;
ETreePath path;
@@ -3602,7 +3706,9 @@ e_tree_class_init (ETreeClass *class)
}
static void
-tree_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETree *tree)
+tree_size_allocate (GtkWidget *widget,
+ GtkAllocation *alloc,
+ ETree *tree)
{
gdouble width;
@@ -3629,7 +3735,8 @@ tree_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETree *tree)
* Creates an info message in table area, or removes old.
**/
void
-e_tree_set_info_message (ETree *tree, const gchar *info_message)
+e_tree_set_info_message (ETree *tree,
+ const gchar *info_message)
{
GtkAllocation allocation;
GtkWidget *widget;
diff --git a/widgets/table/gal-a11y-e-cell-popup.c b/widgets/table/gal-a11y-e-cell-popup.c
index f1c2540820..b1232a6b84 100644
--- a/widgets/table/gal-a11y-e-cell-popup.c
+++ b/widgets/table/gal-a11y-e-cell-popup.c
@@ -83,16 +83,16 @@ gal_a11y_e_cell_popup_class_init (GalA11yECellPopupClass *class)
AtkObject *
gal_a11y_e_cell_popup_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- gint model_col,
- gint view_col,
- gint row)
+ ECellView *cell_view,
+ AtkObject *parent,
+ gint model_col,
+ gint view_col,
+ gint row)
{
AtkObject *a11y;
GalA11yECell *cell;
ECellPopup *popupcell;
- ECellView* child_view = NULL;
+ ECellView * child_view = NULL;
popupcell= E_CELL_POPUP (cell_view->ecell);
diff --git a/widgets/table/gal-a11y-e-cell-registry.c b/widgets/table/gal-a11y-e-cell-registry.c
index 79ad4cacb2..ce533882ab 100644
--- a/widgets/table/gal-a11y-e-cell-registry.c
+++ b/widgets/table/gal-a11y-e-cell-registry.c
@@ -108,13 +108,13 @@ init_default_registry (void)
}
AtkObject *
-gal_a11y_e_cell_registry_get_object (GalA11yECellRegistry *registry,
- ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- gint model_col,
- gint view_col,
- gint row)
+gal_a11y_e_cell_registry_get_object (GalA11yECellRegistry *registry,
+ ETableItem *item,
+ ECellView *cell_view,
+ AtkObject *parent,
+ gint model_col,
+ gint view_col,
+ gint row)
{
GalA11yECellRegistryFunc func = NULL;
GType type;
@@ -137,9 +137,9 @@ gal_a11y_e_cell_registry_get_object (GalA11yECellRegistry *registry,
}
void
-gal_a11y_e_cell_registry_add_cell_type (GalA11yECellRegistry *registry,
- GType type,
- GalA11yECellRegistryFunc func)
+gal_a11y_e_cell_registry_add_cell_type (GalA11yECellRegistry *registry,
+ GType type,
+ GalA11yECellRegistryFunc func)
{
if (registry == NULL) {
init_default_registry ();
diff --git a/widgets/table/gal-a11y-e-cell-toggle.c b/widgets/table/gal-a11y-e-cell-toggle.c
index 98fcdcd92f..991d3c0721 100644
--- a/widgets/table/gal-a11y-e-cell-toggle.c
+++ b/widgets/table/gal-a11y-e-cell-toggle.c
@@ -122,9 +122,9 @@ toggle_cell_action (GalA11yECell *cell)
static void
model_change_cb (ETableModel *etm,
- gint col,
- gint row,
- GalA11yECell *cell)
+ gint col,
+ gint row,
+ GalA11yECell *cell)
{
gint value;
@@ -143,13 +143,13 @@ model_change_cb (ETableModel *etm,
}
}
-AtkObject*
+AtkObject *
gal_a11y_e_cell_toggle_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- gint model_col,
- gint view_col,
- gint row)
+ ECellView *cell_view,
+ AtkObject *parent,
+ gint model_col,
+ gint view_col,
+ gint row)
{
AtkObject *a11y;
GalA11yECell *cell;
diff --git a/widgets/table/gal-a11y-e-cell-tree.c b/widgets/table/gal-a11y-e-cell-tree.c
index 70880fc0cc..148731d4b8 100644
--- a/widgets/table/gal-a11y-e-cell-tree.c
+++ b/widgets/table/gal-a11y-e-cell-tree.c
@@ -43,8 +43,8 @@ static AtkObjectClass *a11y_parent_class;
static void
ectr_model_row_changed_cb (ETableModel *etm,
- gint row,
- GalA11yECell *a11y)
+ gint row,
+ GalA11yECell *a11y)
{
ETreePath node;
ETreeModel *tree_model;
@@ -88,7 +88,7 @@ kill_view_cb (ECellView *subcell_view,
static void
ectr_subcell_weak_ref (GalA11yECellTree *a11y,
- GalA11yECell *subcell_a11y)
+ GalA11yECell *subcell_a11y)
{
ECellView *subcell_view = subcell_a11y ? subcell_a11y->cell_view : NULL;
if (subcell_a11y && subcell_view && subcell_view->kill_view_cb_data)
@@ -184,11 +184,11 @@ gal_a11y_e_cell_tree_get_type (void)
AtkObject *
gal_a11y_e_cell_tree_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- gint model_col,
- gint view_col,
- gint row)
+ ECellView *cell_view,
+ AtkObject *parent,
+ gint model_col,
+ gint view_col,
+ gint row)
{
AtkObject *subcell_a11y;
GalA11yECellTree *a11y;
@@ -236,8 +236,8 @@ gal_a11y_e_cell_tree_new (ETableItem *item,
subcell_a11y = NULL;
/* create a companion a11y object, this object has type GalA11yECellTree
- and it connects to some signals to determine whether a tree cell is
- expanded or collapsed */
+ * and it connects to some signals to determine whether a tree cell is
+ * expanded or collapsed */
a11y = g_object_new (gal_a11y_e_cell_tree_get_type (), NULL);
gal_a11y_e_cell_construct (ATK_OBJECT (a11y),
item,
diff --git a/widgets/table/gal-a11y-e-cell-vbox.c b/widgets/table/gal-a11y-e-cell-vbox.c
index e663bb1f1f..d0b9d26036 100644
--- a/widgets/table/gal-a11y-e-cell-vbox.c
+++ b/widgets/table/gal-a11y-e-cell-vbox.c
@@ -63,8 +63,9 @@ subcell_destroyed (gpointer data)
gaev->a11y_subcells[cell->view_col] = NULL;
}
-static AtkObject*
-ecv_ref_child (AtkObject *a11y, gint i)
+static AtkObject *
+ecv_ref_child (AtkObject *a11y,
+ gint i)
{
GalA11yECellVbox *gaev = GAL_A11Y_E_CELL_VBOX (a11y);
GalA11yECell *gaec = GAL_A11Y_E_CELL (a11y);
@@ -117,11 +118,11 @@ ecv_dispose (GObject *object)
}
/* AtkComponet interface */
-static AtkObject*
+static AtkObject *
ecv_ref_accessible_at_point (AtkComponent *component,
- gint x,
- gint y,
- AtkCoordType coord_type)
+ gint x,
+ gint y,
+ AtkCoordType coord_type)
{
gint x0, y0, width, height;
gint subcell_height, i;
@@ -227,6 +228,6 @@ AtkObject *gal_a11y_e_cell_vbox_new (ETableItem *item,
gaev = GAL_A11Y_E_CELL_VBOX (a11y);
ecvv = (ECellVboxView *) (gaec->cell_view);
gaev->a11y_subcell_count = ecvv->subcell_view_count;
- gaev->a11y_subcells = g_malloc0 (sizeof (AtkObject *)*gaev->a11y_subcell_count);
+ gaev->a11y_subcells = g_malloc0 (sizeof (AtkObject *) * gaev->a11y_subcell_count);
return a11y;
}
diff --git a/widgets/table/gal-a11y-e-cell.c b/widgets/table/gal-a11y-e-cell.c
index e48977f026..4a75c97ce4 100644
--- a/widgets/table/gal-a11y-e-cell.c
+++ b/widgets/table/gal-a11y-e-cell.c
@@ -42,7 +42,8 @@ static GObjectClass *parent_class;
#if 0
static void
-unref_item (gpointer user_data, GObject *obj_loc)
+unref_item (gpointer user_data,
+ GObject *obj_loc)
{
GalA11yECell *a11y = GAL_A11Y_E_CELL (user_data);
a11y->item = NULL;
@@ -50,7 +51,8 @@ unref_item (gpointer user_data, GObject *obj_loc)
}
static void
-unref_cell (gpointer user_data, GObject *obj_loc)
+unref_cell (gpointer user_data,
+ GObject *obj_loc)
{
GalA11yECell *a11y = GAL_A11Y_E_CELL (user_data);
a11y->cell_view = NULL;
@@ -104,7 +106,7 @@ gal_a11y_e_cell_dispose (GObject *object)
/* Static functions */
static const gchar *
-gal_a11y_e_cell_get_name (AtkObject * a11y)
+gal_a11y_e_cell_get_name (AtkObject *a11y)
{
GalA11yECell *cell = GAL_A11Y_E_CELL (a11y);
ETableCol *ecol;
@@ -133,7 +135,7 @@ gal_a11y_e_cell_ref_state_set (AtkObject *accessible)
return cell->state_set;
}
-static AtkObject*
+static AtkObject *
gal_a11y_e_cell_get_parent (AtkObject *accessible)
{
GalA11yECell *a11y = GAL_A11Y_E_CELL (accessible);
@@ -154,11 +156,11 @@ gal_a11y_e_cell_get_index_in_parent (AtkObject *accessible)
/* Component IFace */
static void
gal_a11y_e_cell_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height,
+ AtkCoordType coord_type)
{
GalA11yECell *a11y = GAL_A11Y_E_CELL (component);
GtkWidget *tableOrTree;
@@ -267,7 +269,7 @@ gal_a11y_e_cell_init (GalA11yECell *a11y)
static ActionInfo *
_gal_a11y_e_cell_get_action_info (GalA11yECell *cell,
- gint index)
+ gint index)
{
GList *list_node;
@@ -282,7 +284,7 @@ _gal_a11y_e_cell_get_action_info (GalA11yECell *cell,
static void
_gal_a11y_e_cell_destroy_action_info (gpointer action_info,
- gpointer user_data)
+ gpointer user_data)
{
ActionInfo *info = (ActionInfo *) action_info;
@@ -294,11 +296,11 @@ _gal_a11y_e_cell_destroy_action_info (gpointer action_info,
}
gboolean
-gal_a11y_e_cell_add_action ( GalA11yECell * cell,
- const gchar *action_name,
- const gchar *action_description,
- const gchar *action_keybinding,
- ACTION_FUNC action_func)
+gal_a11y_e_cell_add_action (GalA11yECell *cell,
+ const gchar *action_name,
+ const gchar *action_description,
+ const gchar *action_keybinding,
+ ACTION_FUNC action_func)
{
ActionInfo *info;
g_return_val_if_fail (GAL_A11Y_IS_E_CELL (cell), FALSE);
@@ -325,7 +327,7 @@ gal_a11y_e_cell_add_action ( GalA11yECell * cell,
gboolean
gal_a11y_e_cell_remove_action (GalA11yECell *cell,
- gint action_index)
+ gint action_index)
{
GList *list_node;
@@ -342,7 +344,7 @@ gal_a11y_e_cell_remove_action (GalA11yECell *cell,
gboolean
gal_a11y_e_cell_remove_action_by_name (GalA11yECell *cell,
- const gchar *action_name)
+ const gchar *action_name)
{
GList *list_node;
gboolean action_found= FALSE;
@@ -377,7 +379,7 @@ gal_a11y_e_cell_action_get_n_actions (AtkAction *action)
static const gchar *
gal_a11y_e_cell_action_get_name (AtkAction *action,
- gint index)
+ gint index)
{
GalA11yECell *cell = GAL_A11Y_E_CELL (action);
ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
@@ -389,7 +391,7 @@ gal_a11y_e_cell_action_get_name (AtkAction *action,
static const gchar *
gal_a11y_e_cell_action_get_description (AtkAction *action,
- gint index)
+ gint index)
{
GalA11yECell *cell = GAL_A11Y_E_CELL (action);
ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
@@ -400,9 +402,9 @@ gal_a11y_e_cell_action_get_description (AtkAction *action,
}
static gboolean
-gal_a11y_e_cell_action_set_description (AtkAction *action,
- gint index,
- const gchar *desc)
+gal_a11y_e_cell_action_set_description (AtkAction *action,
+ gint index,
+ const gchar *desc)
{
GalA11yECell *cell = GAL_A11Y_E_CELL (action);
ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
@@ -416,7 +418,7 @@ gal_a11y_e_cell_action_set_description (AtkAction *action,
static const gchar *
gal_a11y_e_cell_action_get_keybinding (AtkAction *action,
- gint index)
+ gint index)
{
GalA11yECell *cell = GAL_A11Y_E_CELL (action);
ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
@@ -445,7 +447,7 @@ idle_do_action (gpointer data)
static gboolean
gal_a11y_e_cell_action_do_action (AtkAction *action,
- gint index)
+ gint index)
{
GalA11yECell *cell = GAL_A11Y_E_CELL (action);
ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
@@ -493,9 +495,9 @@ gal_a11y_e_cell_type_add_action_interface (GType type)
}
gboolean
-gal_a11y_e_cell_add_state (GalA11yECell *cell,
- AtkStateType state_type,
- gboolean emit_signal)
+gal_a11y_e_cell_add_state (GalA11yECell *cell,
+ AtkStateType state_type,
+ gboolean emit_signal)
{
if (!atk_state_set_contains_state (cell->state_set, state_type)) {
gboolean rc;
@@ -510,7 +512,7 @@ gal_a11y_e_cell_add_state (GalA11yECell *cell,
if (emit_signal) {
atk_object_notify_state_change (ATK_OBJECT (cell), state_type, TRUE);
/* If state_type is ATK_STATE_VISIBLE, additional
- notification */
+ * notification */
if (state_type == ATK_STATE_VISIBLE)
g_signal_emit_by_name (cell, "visible_data_changed");
}
@@ -522,9 +524,9 @@ gal_a11y_e_cell_add_state (GalA11yECell *cell,
}
gboolean
-gal_a11y_e_cell_remove_state (GalA11yECell *cell,
- AtkStateType state_type,
- gboolean emit_signal)
+gal_a11y_e_cell_remove_state (GalA11yECell *cell,
+ AtkStateType state_type,
+ gboolean emit_signal)
{
if (atk_state_set_contains_state (cell->state_set, state_type)) {
gboolean rc;
@@ -592,11 +594,11 @@ gal_a11y_e_cell_get_type (void)
AtkObject *
gal_a11y_e_cell_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- gint model_col,
- gint view_col,
- gint row)
+ ECellView *cell_view,
+ AtkObject *parent,
+ gint model_col,
+ gint view_col,
+ gint row)
{
AtkObject *a11y;
@@ -613,13 +615,13 @@ gal_a11y_e_cell_new (ETableItem *item,
}
void
-gal_a11y_e_cell_construct (AtkObject *object,
- ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- gint model_col,
- gint view_col,
- gint row)
+gal_a11y_e_cell_construct (AtkObject *object,
+ ETableItem *item,
+ ECellView *cell_view,
+ AtkObject *parent,
+ gint model_col,
+ gint view_col,
+ gint row)
{
GalA11yECell *a11y = GAL_A11Y_E_CELL (object);
a11y->item = item;
diff --git a/widgets/table/gal-a11y-e-table-click-to-add-factory.c b/widgets/table/gal-a11y-e-table-click-to-add-factory.c
index c71199cebb..1a4b418adf 100644
--- a/widgets/table/gal-a11y-e-table-click-to-add-factory.c
+++ b/widgets/table/gal-a11y-e-table-click-to-add-factory.c
@@ -45,7 +45,7 @@ gal_a11y_e_table_click_to_add_factory_get_accessible_type (void)
return GAL_A11Y_TYPE_E_TABLE_CLICK_TO_ADD;
}
-static AtkObject*
+static AtkObject *
gal_a11y_e_table_click_to_add_factory_create_accessible (GObject *obj)
{
AtkObject * atk_object;
diff --git a/widgets/table/gal-a11y-e-table-click-to-add.c b/widgets/table/gal-a11y-e-table-click-to-add.c
index a947415c15..e4b5255e4c 100644
--- a/widgets/table/gal-a11y-e-table-click-to-add.c
+++ b/widgets/table/gal-a11y-e-table-click-to-add.c
@@ -56,7 +56,7 @@ etcta_get_n_actions (AtkAction *action)
static const gchar *
etcta_get_description (AtkAction *action,
- gint i)
+ gint i)
{
if (i == 0)
return _("click to add");
@@ -65,7 +65,8 @@ etcta_get_description (AtkAction *action,
}
static const gchar *
-etcta_action_get_name (AtkAction *action, gint i)
+etcta_action_get_name (AtkAction *action,
+ gint i)
{
if (i == 0)
return _("click");
@@ -105,7 +106,8 @@ idle_do_action (gpointer data)
}
static gboolean
-etcta_do_action (AtkAction * action, gint i)
+etcta_do_action (AtkAction *action,
+ gint i)
{
g_return_val_if_fail (i == 0, FALSE);
@@ -252,7 +254,9 @@ gal_a11y_e_table_click_to_add_get_type (void)
}
static gboolean
-etcta_event (GnomeCanvasItem *item, GdkEvent *e, gpointer data)
+etcta_event (GnomeCanvasItem *item,
+ GdkEvent *e,
+ gpointer data)
{
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
GalA11yETableClickToAdd *a11y;
@@ -285,8 +289,10 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e, gpointer data)
}
static void
-etcta_selection_cursor_changed (ESelectionModel *esm, gint row, gint col,
- GalA11yETableClickToAdd *a11y)
+etcta_selection_cursor_changed (ESelectionModel *esm,
+ gint row,
+ gint col,
+ GalA11yETableClickToAdd *a11y)
{
ETableClickToAdd *etcta;
AtkObject *row_a11y;
diff --git a/widgets/table/gal-a11y-e-table-column-header.c b/widgets/table/gal-a11y-e-table-column-header.c
index ccbfffadc9..8e13fd6865 100644
--- a/widgets/table/gal-a11y-e-table-column-header.c
+++ b/widgets/table/gal-a11y-e-table-column-header.c
@@ -67,7 +67,8 @@ gal_a11y_e_table_column_header_ref_state_set (AtkObject *accessible)
}
static void
-gal_a11y_e_table_column_header_real_initialize (AtkObject *obj, gpointer data)
+gal_a11y_e_table_column_header_real_initialize (AtkObject *obj,
+ gpointer data)
{
ATK_OBJECT_CLASS (parent_class)->initialize (obj, data);
}
@@ -110,7 +111,7 @@ etch_a11y_get_gobject (AtkGObjectAccessible *accessible)
static gboolean
gal_a11y_e_table_column_header_do_action (AtkAction *action,
- gint i)
+ gint i)
{
gboolean return_value = TRUE;
GtkWidget *widget;
@@ -148,7 +149,7 @@ gal_a11y_e_table_column_header_get_n_actions (AtkAction *action)
static const gchar *
gal_a11y_e_table_column_header_action_get_name (AtkAction *action,
- gint i)
+ gint i)
{
const gchar *return_value;
@@ -209,7 +210,8 @@ gal_a11y_e_table_column_header_get_type (void)
}
AtkObject *
-gal_a11y_e_table_column_header_new (ETableCol *ecol, ETableItem *item)
+gal_a11y_e_table_column_header_new (ETableCol *ecol,
+ ETableItem *item)
{
GalA11yETableColumnHeader *a11y;
AtkObject *accessible;
diff --git a/widgets/table/gal-a11y-e-table-factory.c b/widgets/table/gal-a11y-e-table-factory.c
index e89bb799bb..2270cbaa5b 100644
--- a/widgets/table/gal-a11y-e-table-factory.c
+++ b/widgets/table/gal-a11y-e-table-factory.c
@@ -39,7 +39,7 @@ gal_a11y_e_table_factory_get_accessible_type (void)
return GAL_A11Y_TYPE_E_TABLE;
}
-static AtkObject*
+static AtkObject *
gal_a11y_e_table_factory_create_accessible (GObject *obj)
{
AtkObject *accessible;
diff --git a/widgets/table/gal-a11y-e-table-item-factory.c b/widgets/table/gal-a11y-e-table-item-factory.c
index 3aeab505f3..a38269bd81 100644
--- a/widgets/table/gal-a11y-e-table-item-factory.c
+++ b/widgets/table/gal-a11y-e-table-item-factory.c
@@ -45,7 +45,7 @@ gal_a11y_e_table_item_factory_get_accessible_type (void)
return GAL_A11Y_TYPE_E_TABLE_ITEM;
}
-static AtkObject*
+static AtkObject *
gal_a11y_e_table_item_factory_create_accessible (GObject *obj)
{
AtkObject *accessible;
diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c
index e296882e65..5b0e565714 100644
--- a/widgets/table/gal-a11y-e-table-item.c
+++ b/widgets/table/gal-a11y-e-table-item.c
@@ -68,10 +68,11 @@ static gboolean gal_a11y_e_table_item_ref_selection (GalA11yETableItem *a11y,
ESelectionModel *selection);
static gboolean gal_a11y_e_table_item_unref_selection (GalA11yETableItem *a11y);
-static AtkObject* eti_ref_at (AtkTable *table, gint row, gint column);
+static AtkObject * eti_ref_at (AtkTable *table, gint row, gint column);
static void
-item_finalized (gpointer user_data, GObject *gone_item)
+item_finalized (gpointer user_data,
+ GObject *gone_item)
{
GalA11yETableItem *a11y;
GalA11yETableItemPrivate *priv;
@@ -103,7 +104,8 @@ eti_ref_state_set (AtkObject *accessible)
}
inline static gint
-view_to_model_row (ETableItem *eti, gint row)
+view_to_model_row (ETableItem *eti,
+ gint row)
{
if (eti->uses_source_model) {
ETableSubset *etss = E_TABLE_SUBSET (eti->table_model);
@@ -117,14 +119,16 @@ view_to_model_row (ETableItem *eti, gint row)
}
inline static gint
-view_to_model_col (ETableItem *eti, gint col)
+view_to_model_col (ETableItem *eti,
+ gint col)
{
ETableCol *ecol = e_table_header_get_column (eti->header, col);
return ecol ? ecol->col_idx : -1;
}
inline static gint
-model_to_view_row (ETableItem *eti, gint row)
+model_to_view_row (ETableItem *eti,
+ gint row)
{
gint i;
if (row == -1)
@@ -146,7 +150,8 @@ model_to_view_row (ETableItem *eti, gint row)
}
inline static gint
-model_to_view_col (ETableItem *eti, gint col)
+model_to_view_col (ETableItem *eti,
+ gint col)
{
gint i;
if (col == -1)
@@ -235,8 +240,9 @@ eti_get_n_children (AtkObject *accessible)
(atk_table_get_n_rows (ATK_TABLE (accessible)) + 1);
}
-static AtkObject*
-eti_ref_child (AtkObject *accessible, gint index)
+static AtkObject *
+eti_ref_child (AtkObject *accessible,
+ gint index)
{
ETableItem *item;
gint col, row;
@@ -264,11 +270,11 @@ eti_ref_child (AtkObject *accessible, gint index)
static void
eti_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height,
+ AtkCoordType coord_type)
{
ETableItem *item;
AtkObject *parent;
@@ -294,11 +300,11 @@ eti_get_extents (AtkComponent *component,
}
}
-static AtkObject*
+static AtkObject *
eti_ref_accessible_at_point (AtkComponent *component,
- gint x,
- gint y,
- AtkCoordType coord_type)
+ gint x,
+ gint y,
+ AtkCoordType coord_type)
{
gint row = -1;
gint col = -1;
@@ -349,11 +355,13 @@ cell_destroyed (gpointer data)
}
/* atk table */
-static AtkObject*
-eti_ref_at (AtkTable *table, gint row, gint column)
+static AtkObject *
+eti_ref_at (AtkTable *table,
+ gint row,
+ gint column)
{
ETableItem *item;
- AtkObject* ret;
+ AtkObject * ret;
GalA11yETableItemPrivate *priv = GET_PRIVATE (table);
if (atk_state_set_contains_state (priv->state_set, ATK_STATE_DEFUNCT))
@@ -399,7 +407,9 @@ eti_ref_at (AtkTable *table, gint row, gint column)
}
static gint
-eti_get_index_at (AtkTable *table, gint row, gint column)
+eti_get_index_at (AtkTable *table,
+ gint row,
+ gint column)
{
ETableItem *item;
@@ -411,7 +421,8 @@ eti_get_index_at (AtkTable *table, gint row, gint column)
}
static gint
-eti_get_column_at_index (AtkTable *table, gint index)
+eti_get_column_at_index (AtkTable *table,
+ gint index)
{
ETableItem *item;
@@ -423,7 +434,8 @@ eti_get_column_at_index (AtkTable *table, gint index)
}
static gint
-eti_get_row_at_index (AtkTable *table, gint index)
+eti_get_row_at_index (AtkTable *table,
+ gint index)
{
ETableItem *item;
@@ -460,8 +472,8 @@ eti_get_n_rows (AtkTable *table)
static gint
eti_get_column_extent_at (AtkTable *table,
- gint row,
- gint column)
+ gint row,
+ gint column)
{
ETableItem *item;
gint width;
@@ -483,8 +495,8 @@ eti_get_column_extent_at (AtkTable *table,
static gint
eti_get_row_extent_at (AtkTable *table,
- gint row,
- gint column)
+ gint row,
+ gint column)
{
ETableItem *item;
gint height;
@@ -513,7 +525,7 @@ eti_get_caption (AtkTable *table)
static const gchar *
eti_get_column_description (AtkTable *table,
- gint column)
+ gint column)
{
ETableItem *item;
ETableCol *ecol;
@@ -528,7 +540,8 @@ eti_get_column_description (AtkTable *table,
}
static AtkObject *
-eti_get_column_header (AtkTable *table, gint column)
+eti_get_column_header (AtkTable *table,
+ gint column)
{
ETableItem *item;
ETableCol *ecol;
@@ -548,7 +561,7 @@ eti_get_column_header (AtkTable *table, gint column)
static const gchar *
eti_get_row_description (AtkTable *table,
- gint row)
+ gint row)
{
/* Unimplemented */
return NULL;
@@ -556,7 +569,7 @@ eti_get_row_description (AtkTable *table,
static AtkObject *
eti_get_row_header (AtkTable *table,
- gint row)
+ gint row)
{
/* Unimplemented */
return NULL;
@@ -570,7 +583,8 @@ eti_get_summary (AtkTable *table)
}
static gboolean
-table_is_row_selected (AtkTable *table, gint row)
+table_is_row_selected (AtkTable *table,
+ gint row)
{
ETableItem *item;
GalA11yETableItemPrivate *priv = GET_PRIVATE (table);
@@ -590,13 +604,16 @@ table_is_row_selected (AtkTable *table, gint row)
}
static gboolean
-table_is_selected (AtkTable *table, gint row, gint column)
+table_is_selected (AtkTable *table,
+ gint row,
+ gint column)
{
return table_is_row_selected (table, row);
}
static gint
-table_get_selected_rows (AtkTable *table, gint **rows_selected)
+table_get_selected_rows (AtkTable *table,
+ gint **rows_selected)
{
ETableItem *item;
gint n_selected, row, index_selected;
@@ -625,7 +642,8 @@ table_get_selected_rows (AtkTable *table, gint **rows_selected)
}
static gboolean
-table_add_row_selection (AtkTable *table, gint row)
+table_add_row_selection (AtkTable *table,
+ gint row)
{
ETableItem *item;
@@ -642,7 +660,8 @@ table_add_row_selection (AtkTable *table, gint row)
}
static gboolean
-table_remove_row_selection (AtkTable *table, gint row)
+table_remove_row_selection (AtkTable *table,
+ gint row)
{
ETableItem *item;
GalA11yETableItemPrivate *priv = GET_PRIVATE (table);
@@ -698,8 +717,10 @@ eti_atk_component_iface_init (AtkComponentIface *iface)
}
static void
-eti_rows_inserted (ETableModel * model, gint row, gint count,
- AtkObject * table_item)
+eti_rows_inserted (ETableModel *model,
+ gint row,
+ gint count,
+ AtkObject *table_item)
{
gint n_cols,n_rows,i,j;
GalA11yETableItem * item_a11y;
@@ -725,7 +746,7 @@ eti_rows_inserted (ETableModel * model, gint row, gint count,
for (j = 0; j < n_cols; j++) {
g_signal_emit_by_name (table_item,
"children_changed::add",
- ( ((i + 1)*n_cols) + j), NULL, NULL);
+ ( ((i + 1) * n_cols) + j), NULL, NULL);
}
}
@@ -733,8 +754,10 @@ eti_rows_inserted (ETableModel * model, gint row, gint count,
}
static void
-eti_rows_deleted (ETableModel * model, gint row, gint count,
- AtkObject * table_item)
+eti_rows_deleted (ETableModel *model,
+ gint row,
+ gint count,
+ AtkObject *table_item)
{
gint i,j, n_rows, n_cols, old_nrows;
ETableItem *item = E_TABLE_ITEM (
@@ -746,7 +769,7 @@ eti_rows_deleted (ETableModel * model, gint row, gint count,
old_nrows = GET_PRIVATE (table_item)->rows;
- g_return_if_fail ( row+count <= old_nrows);
+ g_return_if_fail ( row + count <= old_nrows);
g_return_if_fail (old_nrows == n_rows + count);
GET_PRIVATE (table_item)->rows = n_rows;
@@ -757,7 +780,7 @@ eti_rows_deleted (ETableModel * model, gint row, gint count,
for (j = 0; j < n_cols; j++) {
g_signal_emit_by_name (table_item,
"children_changed::remove",
- ( ((i + 1)*n_cols) + j), NULL, NULL);
+ ( ((i + 1) * n_cols) + j), NULL, NULL);
}
}
g_signal_emit_by_name (table_item, "visible-data-changed");
@@ -765,7 +788,9 @@ eti_rows_deleted (ETableModel * model, gint row, gint count,
}
static void
-eti_tree_model_node_changed_cb (ETreeModel *model, ETreePath node, ETableItem *eti)
+eti_tree_model_node_changed_cb (ETreeModel *model,
+ ETreePath node,
+ ETableItem *eti)
{
AtkObject *atk_obj;
GalA11yETableItem *a11y;
@@ -793,10 +818,11 @@ enum {
* 3. Emit signals
*/
static void
-eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
+eti_header_structure_changed (ETableHeader *eth,
+ AtkObject *a11y)
{
- gboolean reorder_found=FALSE, added_found=FALSE, removed_found=FALSE;
+ gboolean reorder_found = FALSE, added_found = FALSE, removed_found = FALSE;
GalA11yETableItem * a11y_item;
ETableCol ** cols, **prev_cols;
GalA11yETableItemPrivate *priv;
@@ -876,7 +902,7 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
g_signal_emit_by_name (
G_OBJECT (a11y_item),
"children_changed::remove",
- ((j+1)*prev_n_cols+i),
+ ((j + 1) * prev_n_cols + i),
NULL, NULL);
}
}
@@ -892,7 +918,7 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
g_signal_emit_by_name (
G_OBJECT (a11y_item),
"children_changed::add",
- ((j+1)*n_cols+i),
+ ((j + 1) * n_cols + i),
NULL, NULL);
}
}
@@ -910,7 +936,7 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
static void
eti_real_initialize (AtkObject *obj,
- gpointer data)
+ gpointer data)
{
ETableItem * eti;
ETableModel * model;
@@ -920,14 +946,15 @@ eti_real_initialize (AtkObject *obj,
model = eti->table_model;
- g_signal_connect (model, "model-rows-inserted",
- G_CALLBACK (eti_rows_inserted),
- obj);
- g_signal_connect (model, "model-rows-deleted",
- G_CALLBACK (eti_rows_deleted),
- obj);
- g_signal_connect (G_OBJECT (eti->header), "structure_change",
- G_CALLBACK (eti_header_structure_changed), obj);
+ g_signal_connect (
+ model, "model-rows-inserted",
+ G_CALLBACK (eti_rows_inserted), obj);
+ g_signal_connect (
+ model, "model-rows-deleted",
+ G_CALLBACK (eti_rows_deleted), obj);
+ g_signal_connect (
+ eti->header, "structure_change",
+ G_CALLBACK (eti_header_structure_changed), obj);
}
@@ -1084,10 +1111,12 @@ gal_a11y_e_table_item_new (ETableItem *item)
return NULL;
if (item) {
- g_signal_connect (G_OBJECT(item), "selection_model_removed",
- G_CALLBACK (eti_a11y_selection_model_removed_cb), NULL);
- g_signal_connect (G_OBJECT(item), "selection_model_added",
- G_CALLBACK (eti_a11y_selection_model_added_cb), NULL);
+ g_signal_connect (
+ item, "selection_model_removed",
+ G_CALLBACK (eti_a11y_selection_model_removed_cb), NULL);
+ g_signal_connect (
+ item, "selection_model_added",
+ G_CALLBACK (eti_a11y_selection_model_added_cb), NULL);
if (item->selection)
gal_a11y_e_table_item_ref_selection (a11y,
item->selection);
@@ -1104,8 +1133,9 @@ gal_a11y_e_table_item_new (ETableItem *item)
if (E_IS_TREE (GET_PRIVATE (a11y)->widget)) {
ETreeModel *model;
model = e_tree_get_model (E_TREE (GET_PRIVATE (a11y)->widget));
- g_signal_connect (G_OBJECT(model), "node_changed",
- G_CALLBACK (eti_tree_model_node_changed_cb), item);
+ g_signal_connect (
+ model, "node_changed",
+ G_CALLBACK (eti_tree_model_node_changed_cb), item);
accessible->role = ATK_ROLE_TREE_TABLE;
} else if (E_IS_TABLE (GET_PRIVATE (a11y)->widget)) {
accessible->role = ATK_ROLE_TABLE;
@@ -1126,7 +1156,7 @@ gal_a11y_e_table_item_new (ETableItem *item)
static gboolean
gal_a11y_e_table_item_ref_selection (GalA11yETableItem *a11y,
- ESelectionModel *selection)
+ ESelectionModel *selection)
{
GalA11yETableItemPrivate *priv;
@@ -1174,8 +1204,9 @@ gal_a11y_e_table_item_unref_selection (GalA11yETableItem *a11y)
/* callbacks */
static void
-eti_a11y_selection_model_removed_cb (ETableItem *eti, ESelectionModel *selection,
- gpointer data)
+eti_a11y_selection_model_removed_cb (ETableItem *eti,
+ ESelectionModel *selection,
+ gpointer data)
{
AtkObject *atk_obj;
GalA11yETableItem *a11y;
@@ -1191,8 +1222,9 @@ eti_a11y_selection_model_removed_cb (ETableItem *eti, ESelectionModel *selection
}
static void
-eti_a11y_selection_model_added_cb (ETableItem *eti, ESelectionModel *selection,
- gpointer data)
+eti_a11y_selection_model_added_cb (ETableItem *eti,
+ ESelectionModel *selection,
+ gpointer data)
{
AtkObject *atk_obj;
GalA11yETableItem *a11y;
@@ -1209,7 +1241,8 @@ eti_a11y_selection_model_added_cb (ETableItem *eti, ESelectionModel *selection,
}
static void
-eti_a11y_selection_changed_cb (ESelectionModel *selection, GalA11yETableItem *a11y)
+eti_a11y_selection_changed_cb (ESelectionModel *selection,
+ GalA11yETableItem *a11y)
{
GalA11yETableItemPrivate *priv = GET_PRIVATE (a11y);
@@ -1223,7 +1256,9 @@ eti_a11y_selection_changed_cb (ESelectionModel *selection, GalA11yETableItem *a1
static void
eti_a11y_cursor_changed_cb (ESelectionModel *selection,
- gint row, gint col, GalA11yETableItem *a11y)
+ gint row,
+ gint col,
+ GalA11yETableItem *a11y)
{
ETableItem *item;
GalA11yETableItemPrivate *priv = GET_PRIVATE (a11y);
@@ -1255,7 +1290,8 @@ static void atk_selection_interface_init (AtkSelectionIface *iface)
}
static gboolean
-selection_add_selection (AtkSelection *selection, gint index)
+selection_add_selection (AtkSelection *selection,
+ gint index)
{
AtkTable *table;
gint row, col, cursor_row, cursor_col, model_row, model_col;
@@ -1315,7 +1351,8 @@ selection_clear_selection (AtkSelection *selection)
}
static AtkObject *
-selection_ref_selection (AtkSelection *selection, gint index)
+selection_ref_selection (AtkSelection *selection,
+ gint index)
{
AtkTable *table;
gint row, col;
@@ -1343,7 +1380,8 @@ selection_get_selection_count (AtkSelection *selection)
}
static gboolean
-selection_is_child_selected (AtkSelection *selection, gint i)
+selection_is_child_selected (AtkSelection *selection,
+ gint i)
{
gint row;
diff --git a/widgets/table/gal-a11y-e-table.c b/widgets/table/gal-a11y-e-table.c
index 436de1ec0f..6ba51303ed 100644
--- a/widgets/table/gal-a11y-e-table.c
+++ b/widgets/table/gal-a11y-e-table.c
@@ -70,8 +70,9 @@ find_first_table_item (ETableGroup *group)
return NULL;
}
-static AtkObject*
-eti_get_accessible (ETableItem *eti, AtkObject *parent)
+static AtkObject *
+eti_get_accessible (ETableItem *eti,
+ AtkObject *parent)
{
AtkObject *a11y = NULL;
@@ -110,11 +111,11 @@ init_child_item (GalA11yETable *a11y)
return FALSE;
}
-static AtkObject*
-et_ref_accessible_at_point (AtkComponent *component,
- gint x,
- gint y,
- AtkCoordType coord_type)
+static AtkObject *
+et_ref_accessible_at_point (AtkComponent *component,
+ gint x,
+ gint y,
+ AtkCoordType coord_type)
{
GalA11yETable *a11y = GAL_A11Y_E_TABLE (component);
if (GET_PRIVATE (a11y)->child_item)
@@ -146,9 +147,9 @@ et_get_n_children (AtkObject *accessible)
return n;
}
-static AtkObject*
+static AtkObject *
et_ref_child (AtkObject *accessible,
- gint i)
+ gint i)
{
GalA11yETable *a11y = GAL_A11Y_E_TABLE (accessible);
ETable * et;
diff --git a/widgets/table/gal-a11y-e-tree-factory.c b/widgets/table/gal-a11y-e-tree-factory.c
index 4e22c1ca70..00ce55c8c0 100644
--- a/widgets/table/gal-a11y-e-tree-factory.c
+++ b/widgets/table/gal-a11y-e-tree-factory.c
@@ -38,7 +38,7 @@ gal_a11y_e_tree_factory_get_accessible_type (void)
return GAL_A11Y_TYPE_E_TREE;
}
-static AtkObject*
+static AtkObject *
gal_a11y_e_tree_factory_create_accessible (GObject *obj)
{
AtkObject *accessible;
diff --git a/widgets/table/gal-a11y-e-tree.c b/widgets/table/gal-a11y-e-tree.c
index f26c525550..12697f4535 100644
--- a/widgets/table/gal-a11y-e-tree.c
+++ b/widgets/table/gal-a11y-e-tree.c
@@ -61,11 +61,11 @@ init_child_item (GalA11yETree *a11y)
}
}
-static AtkObject*
-et_ref_accessible_at_point (AtkComponent *component,
- gint x,
- gint y,
- AtkCoordType coord_type)
+static AtkObject *
+et_ref_accessible_at_point (AtkComponent *component,
+ gint x,
+ gint y,
+ AtkCoordType coord_type)
{
GalA11yETree *a11y = GAL_A11Y_E_TREE (component);
init_child_item (a11y);
@@ -78,9 +78,9 @@ et_get_n_children (AtkObject *accessible)
return 1;
}
-static AtkObject*
+static AtkObject *
et_ref_child (AtkObject *accessible,
- gint i)
+ gint i)
{
GalA11yETree *a11y = GAL_A11Y_E_TREE (accessible);
if (i != 0)