aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 23:13:25 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-29 00:13:23 +0800
commitfad4af8a3d4c6f50f7bcceca8d545eb17d6fd056 (patch)
treeae78be371695c3dc18847b87d3f014f985aa3a40 /widgets/table
parent6f5464f34ceec9e5701e3e3e651a40f9e6b3a072 (diff)
downloadgsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.gz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.bz2
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.lz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.xz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.zst
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.zip
Prefer GLib basic types over C types.
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-cell-checkbox.c4
-rw-r--r--widgets/table/e-cell-combo.c30
-rw-r--r--widgets/table/e-cell-date.c14
-rw-r--r--widgets/table/e-cell-date.h2
-rw-r--r--widgets/table/e-cell-hbox.c50
-rw-r--r--widgets/table/e-cell-hbox.h16
-rw-r--r--widgets/table/e-cell-number.c8
-rw-r--r--widgets/table/e-cell-number.h2
-rw-r--r--widgets/table/e-cell-pixbuf.c28
-rw-r--r--widgets/table/e-cell-pixbuf.h6
-rw-r--r--widgets/table/e-cell-popup.c56
-rw-r--r--widgets/table/e-cell-popup.h2
-rw-r--r--widgets/table/e-cell-size.c8
-rw-r--r--widgets/table/e-cell-size.h2
-rw-r--r--widgets/table/e-cell-text.c246
-rw-r--r--widgets/table/e-cell-text.h38
-rw-r--r--widgets/table/e-cell-toggle.c48
-rw-r--r--widgets/table/e-cell-toggle.h12
-rw-r--r--widgets/table/e-cell-tree.c78
-rw-r--r--widgets/table/e-cell-vbox.c76
-rw-r--r--widgets/table/e-cell-vbox.h10
-rw-r--r--widgets/table/e-cell.c74
-rw-r--r--widgets/table/e-cell.h146
-rw-r--r--widgets/table/e-table-click-to-add.c4
-rw-r--r--widgets/table/e-table-click-to-add.h2
-rw-r--r--widgets/table/e-table-col.c8
-rw-r--r--widgets/table/e-table-col.h40
-rw-r--r--widgets/table/e-table-column-specification.c62
-rw-r--r--widgets/table/e-table-column-specification.h20
-rw-r--r--widgets/table/e-table-column.c42
-rw-r--r--widgets/table/e-table-config-field.c10
-rw-r--r--widgets/table/e-table-config-field.h2
-rw-r--r--widgets/table/e-table-config.c78
-rw-r--r--widgets/table/e-table-config.h10
-rw-r--r--widgets/table/e-table-example-1.c46
-rw-r--r--widgets/table/e-table-example-2.c50
-rw-r--r--widgets/table/e-table-extras.c8
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c2
-rw-r--r--widgets/table/e-table-field-chooser-item.c38
-rw-r--r--widgets/table/e-table-field-chooser-item.h8
-rw-r--r--widgets/table/e-table-group-container.c56
-rw-r--r--widgets/table/e-table-group-container.h12
-rw-r--r--widgets/table/e-table-group-leaf.c6
-rw-r--r--widgets/table/e-table-group-leaf.h16
-rw-r--r--widgets/table/e-table-group.c22
-rw-r--r--widgets/table/e-table-group.h54
-rw-r--r--widgets/table/e-table-header-item.c148
-rw-r--r--widgets/table/e-table-header-item.h24
-rw-r--r--widgets/table/e-table-header-utils.c56
-rw-r--r--widgets/table/e-table-header-utils.h12
-rw-r--r--widgets/table/e-table-header.c122
-rw-r--r--widgets/table/e-table-header.h54
-rw-r--r--widgets/table/e-table-item.c294
-rw-r--r--widgets/table/e-table-item.h146
-rw-r--r--widgets/table/e-table-memory-callbacks.c30
-rw-r--r--widgets/table/e-table-memory-callbacks.h24
-rw-r--r--widgets/table/e-table-memory-store.c142
-rw-r--r--widgets/table/e-table-memory-store.h22
-rw-r--r--widgets/table/e-table-memory.c10
-rw-r--r--widgets/table/e-table-memory.h8
-rw-r--r--widgets/table/e-table-model.c50
-rw-r--r--widgets/table/e-table-model.h88
-rw-r--r--widgets/table/e-table-one.c42
-rw-r--r--widgets/table/e-table-scrolled.c16
-rw-r--r--widgets/table/e-table-scrolled.h16
-rw-r--r--widgets/table/e-table-search.c10
-rw-r--r--widgets/table/e-table-search.h2
-rw-r--r--widgets/table/e-table-selection-model.c22
-rw-r--r--widgets/table/e-table-simple.c50
-rw-r--r--widgets/table/e-table-simple.h40
-rw-r--r--widgets/table/e-table-sort-info.c62
-rw-r--r--widgets/table/e-table-sort-info.h12
-rw-r--r--widgets/table/e-table-sorted-variable.c8
-rw-r--r--widgets/table/e-table-sorted-variable.h4
-rw-r--r--widgets/table/e-table-sorted.c26
-rw-r--r--widgets/table/e-table-sorted.h4
-rw-r--r--widgets/table/e-table-sorter.c70
-rw-r--r--widgets/table/e-table-sorter.h20
-rw-r--r--widgets/table/e-table-sorting-utils.c92
-rw-r--r--widgets/table/e-table-sorting-utils.h34
-rw-r--r--widgets/table/e-table-specification.c102
-rw-r--r--widgets/table/e-table-specification.h14
-rw-r--r--widgets/table/e-table-state.c54
-rw-r--r--widgets/table/e-table-state.h14
-rw-r--r--widgets/table/e-table-subset-variable.c14
-rw-r--r--widgets/table/e-table-subset-variable.h2
-rw-r--r--widgets/table/e-table-subset.c96
-rw-r--r--widgets/table/e-table-subset.h44
-rw-r--r--widgets/table/e-table-tooltip.h8
-rw-r--r--widgets/table/e-table-tree.h6
-rw-r--r--widgets/table/e-table-utils.c16
-rw-r--r--widgets/table/e-table-without.c44
-rw-r--r--widgets/table/e-table-without.h6
-rw-r--r--widgets/table/e-table.c152
-rw-r--r--widgets/table/e-table.h144
-rw-r--r--widgets/table/e-tree-memory-callbacks.c34
-rw-r--r--widgets/table/e-tree-memory-callbacks.h28
-rw-r--r--widgets/table/e-tree-memory.c20
-rw-r--r--widgets/table/e-tree-memory.h8
-rw-r--r--widgets/table/e-tree-model.c34
-rw-r--r--widgets/table/e-tree-model.h52
-rw-r--r--widgets/table/e-tree-scrolled.c16
-rw-r--r--widgets/table/e-tree-scrolled.h16
-rw-r--r--widgets/table/e-tree-selection-model.c22
-rw-r--r--widgets/table/e-tree-simple.c26
-rw-r--r--widgets/table/e-tree-simple.h8
-rw-r--r--widgets/table/e-tree-sorted-variable.c44
-rw-r--r--widgets/table/e-tree-sorted-variable.h10
-rw-r--r--widgets/table/e-tree-sorted.c120
-rw-r--r--widgets/table/e-tree-sorted.h4
-rw-r--r--widgets/table/e-tree-table-adapter.c140
-rw-r--r--widgets/table/e-tree-table-adapter.h10
-rw-r--r--widgets/table/e-tree.c168
-rw-r--r--widgets/table/e-tree.h108
114 files changed, 2448 insertions, 2448 deletions
diff --git a/widgets/table/e-cell-checkbox.c b/widgets/table/e-cell-checkbox.c
index 09e2187b82..583793e85f 100644
--- a/widgets/table/e-cell-checkbox.c
+++ b/widgets/table/e-cell-checkbox.c
@@ -41,11 +41,11 @@ static GdkPixbuf *checks [2];
static void
ecc_print (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width, double height)
{
cairo_t *cr = gtk_print_context_get_cairo_context (context);
- const int value = GPOINTER_TO_INT (
+ const gint value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
cairo_save (cr);
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 80d6294b2d..638058621d 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -78,15 +78,15 @@ static void e_cell_combo_dispose (GObject *object);
static gint e_cell_combo_do_popup (ECellPopup *ecp,
GdkEvent *event,
- int row,
- int view_col);
+ gint row,
+ gint view_col);
static void e_cell_combo_select_matching_item (ECellCombo *ecc);
static void e_cell_combo_show_popup (ECellCombo *ecc,
- int row,
- int view_col);
+ gint row,
+ gint view_col);
static void e_cell_combo_get_popup_pos (ECellCombo *ecc,
- int row,
- int view_col,
+ gint row,
+ gint view_col,
gint *x,
gint *y,
gint *height,
@@ -100,7 +100,7 @@ static gint e_cell_combo_button_press (GtkWidget *popup_window,
static gint e_cell_combo_button_release (GtkWidget *popup_window,
GdkEventButton *event,
ECellCombo *ecc);
-static int e_cell_combo_key_press (GtkWidget *popup_window,
+static gint e_cell_combo_key_press (GtkWidget *popup_window,
GdkEventKey *event,
ECellCombo *ecc);
@@ -240,7 +240,7 @@ e_cell_combo_set_popdown_strings (ECellCombo *ecc,
for (elem = strings; elem; elem = elem->next) {
GtkTreeIter iter;
- char *utf8_text = elem->data;
+ gchar *utf8_text = elem->data;
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter, 0, utf8_text, -1);
@@ -251,8 +251,8 @@ e_cell_combo_set_popdown_strings (ECellCombo *ecc,
static gint
e_cell_combo_do_popup (ECellPopup *ecp,
GdkEvent *event,
- int row,
- int view_col)
+ gint row,
+ gint view_col)
{
ECellCombo *ecc = E_CELL_COMBO (ecp);
guint32 time;
@@ -297,7 +297,7 @@ e_cell_combo_select_matching_item (ECellCombo *ecc)
ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
ETableCol *ecol;
gboolean found = FALSE;
- char *cell_text;
+ gchar *cell_text;
gboolean valid;
GtkTreeSelection *selection;
GtkTreeIter iter;
@@ -313,7 +313,7 @@ e_cell_combo_select_matching_item (ECellCombo *ecc)
for (valid = gtk_tree_model_get_iter_first (model, &iter);
valid && !found;
valid = gtk_tree_model_iter_next (model, &iter)) {
- char *str = NULL;
+ gchar *str = NULL;
gtk_tree_model_get (model, &iter, 0, &str, -1);
@@ -336,7 +336,7 @@ e_cell_combo_select_matching_item (ECellCombo *ecc)
}
static void
-e_cell_combo_show_popup (ECellCombo *ecc, int row, int view_col)
+e_cell_combo_show_popup (ECellCombo *ecc, gint row, gint view_col)
{
gint x, y, width, height, old_width, old_height;
@@ -366,8 +366,8 @@ e_cell_combo_show_popup (ECellCombo *ecc, int row, int view_col)
/* Calculates the size and position of the popup window (like GtkCombo). */
static void
e_cell_combo_get_popup_pos (ECellCombo *ecc,
- int row,
- int view_col,
+ gint row,
+ gint view_col,
gint *x,
gint *y,
gint *height,
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c
index 92c0dd98b6..6e95a1f5ea 100644
--- a/widgets/table/e-cell-date.c
+++ b/widgets/table/e-cell-date.c
@@ -40,15 +40,15 @@ G_DEFINE_TYPE (ECellDate, e_cell_date, E_CELL_TEXT_TYPE)
#define localtime_r(timep, result) (localtime (timep) ? memcpy ((result), localtime (timep), sizeof (*(result))) : 0)
#endif
-static char *
-ecd_get_text(ECellText *cell, ETableModel *model, int col, int row)
+static gchar *
+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));
time_t nowdate = time(NULL);
time_t yesdate;
struct tm then, now, yesterday;
- char buf[100];
- char *temp;
+ gchar buf[100];
+ gchar *temp;
gboolean done = FALSE;
if (date == 0) {
@@ -83,7 +83,7 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row)
}
}
if (!done) {
- int i;
+ gint i;
for (i = 2; i < 7; i++) {
yesdate = nowdate - 60 * 60 * 24 * i;
localtime_r (&yesdate, &yesterday);
@@ -111,7 +111,7 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row)
}
static void
-ecd_free_text(ECellText *cell, char *text)
+ecd_free_text(ECellText *cell, gchar *text)
{
g_free(text);
}
@@ -156,7 +156,7 @@ e_cell_date_init (ECellDate *ecd)
* Returns: an ECell object that can be used to render dates.
*/
ECell *
-e_cell_date_new (const char *fontname, GtkJustification justify)
+e_cell_date_new (const gchar *fontname, GtkJustification justify)
{
ECellDate *ecd = g_object_new (E_CELL_DATE_TYPE, NULL);
diff --git a/widgets/table/e-cell-date.h b/widgets/table/e-cell-date.h
index fece501726..968e387198 100644
--- a/widgets/table/e-cell-date.h
+++ b/widgets/table/e-cell-date.h
@@ -43,7 +43,7 @@ typedef struct {
} ECellDateClass;
GType e_cell_date_get_type (void);
-ECell *e_cell_date_new (const char *fontname, GtkJustification justify);
+ECell *e_cell_date_new (const gchar *fontname, GtkJustification justify);
G_END_DECLS
diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c
index f84d8761c7..273343aaa1 100644
--- a/widgets/table/e-cell-hbox.c
+++ b/widgets/table/e-cell-hbox.c
@@ -48,11 +48,11 @@ G_DEFINE_TYPE (ECellHbox, e_cell_hbox, E_CELL_TYPE)
* ECell::new_view method
*/
static ECellView *
-ecv_new_view (ECell *ecell, ETableModel *table_model, void *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);
- int i;
+ gint i;
hbox_view->cell_view.ecell = ecell;
hbox_view->cell_view.e_table_model = table_model;
@@ -82,7 +82,7 @@ static void
ecv_kill_view (ECellView *ecv)
{
ECellHboxView *hbox_view = (ECellHboxView *) ecv;
- int i;
+ gint i;
if (hbox_view->cell_view.kill_view_cb)
(hbox_view->cell_view.kill_view_cb)(ecv, hbox_view->cell_view.kill_view_cb_data);
@@ -107,7 +107,7 @@ static void
ecv_realize (ECellView *ecell_view)
{
ECellHboxView *hbox_view = (ECellHboxView *) ecell_view;
- int i;
+ gint i;
/* realize our subcell view */
for (i = 0; i < hbox_view->subcell_view_count; i++)
@@ -124,7 +124,7 @@ static void
ecv_unrealize (ECellView *ecv)
{
ECellHboxView *hbox_view = (ECellHboxView *) ecv;
- int i;
+ gint i;
/* unrealize our subcell view. */
for (i = 0; i < hbox_view->subcell_view_count; i++)
@@ -139,19 +139,19 @@ ecv_unrealize (ECellView *ecv)
*/
static void
ecv_draw (ECellView *ecell_view, GdkDrawable *drawable,
- int model_col, int view_col, int row, ECellFlags flags,
- int x1, int y1, int x2, int y2)
+ gint model_col, gint view_col, gint row, ECellFlags flags,
+ gint x1, gint y1, gint x2, gint y2)
{
ECellHboxView *hbox_view = (ECellHboxView *)ecell_view;
- int subcell_offset = 0;
- int i;
- int allotted_width = x2-x1;
+ gint subcell_offset = 0;
+ gint i;
+ 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 */
- int width = allotted_width * hbox_view->def_size_cols[i] / 100;
+ 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])
width = hbox_view->def_size_cols[i];
@@ -168,12 +168,12 @@ ecv_draw (ECellView *ecell_view, GdkDrawable *drawable,
* ECell::event method
*/
static gint
-ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int 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;
- int y = 0;
- int i;
- int subcell_offset = 0;
+ gint y = 0;
+ gint i;
+ gint subcell_offset = 0;
switch (event->type) {
case GDK_BUTTON_PRESS:
@@ -191,7 +191,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
}
for (i = 0; i < hbox_view->subcell_view_count; i++) {
- int width = e_cell_max_width_by_row (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col, row);
+ gint width = 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])
width = hbox_view->def_size_cols[i];
if (y < subcell_offset + width)
@@ -205,11 +205,11 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
* ECell::height method
*/
static int
-ecv_height (ECellView *ecell_view, int model_col, int view_col, int row)
+ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
ECellHboxView *hbox_view = (ECellHboxView *)ecell_view;
- int height = 0, max_height = 0;
- int i;
+ gint height = 0, max_height = 0;
+ gint i;
for (i = 0; i < hbox_view->subcell_view_count; i++) {
height = e_cell_height (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col, row);
@@ -222,14 +222,14 @@ ecv_height (ECellView *ecell_view, int model_col, int view_col, int row)
* ECell::max_width method
*/
static int
-ecv_max_width (ECellView *ecell_view, int model_col, int view_col)
+ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col)
{
ECellHboxView *hbox_view = (ECellHboxView *)ecell_view;
- int width = 0;
- int i;
+ gint width = 0;
+ gint i;
for (i = 0; i < hbox_view->subcell_view_count; i++) {
- int cell_width = e_cell_max_width (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col);
+ gint cell_width = e_cell_max_width (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col);
if (cell_width < hbox_view->def_size_cols[i])
cell_width = hbox_view->def_size_cols[i];
@@ -246,7 +246,7 @@ static void
ecv_dispose (GObject *object)
{
ECellHbox *ecv = E_CELL_HBOX (object);
- int i;
+ gint i;
/* destroy our subcell */
for (i = 0; i < ecv->subcell_count; i++)
@@ -305,7 +305,7 @@ e_cell_hbox_new (void)
}
void
-e_cell_hbox_append (ECellHbox *hbox, ECell *subcell, int model_col, int size)
+e_cell_hbox_append (ECellHbox *hbox, ECell *subcell, gint model_col, gint size)
{
hbox->subcell_count ++;
diff --git a/widgets/table/e-cell-hbox.h b/widgets/table/e-cell-hbox.h
index dc726960fa..366d01fffe 100644
--- a/widgets/table/e-cell-hbox.h
+++ b/widgets/table/e-cell-hbox.h
@@ -38,18 +38,18 @@ G_BEGIN_DECLS
typedef struct {
ECell parent;
- int subcell_count;
+ gint subcell_count;
ECell **subcells;
- int *model_cols;
- int *def_size_cols;
+ gint *model_cols;
+ gint *def_size_cols;
} ECellHbox;
typedef struct {
ECellView cell_view;
- int subcell_view_count;
+ gint subcell_view_count;
ECellView **subcell_views;
- int *model_cols;
- int *def_size_cols;
+ gint *model_cols;
+ gint *def_size_cols;
} ECellHboxView;
typedef struct {
@@ -60,8 +60,8 @@ GType e_cell_hbox_get_type (void);
ECell *e_cell_hbox_new (void);
void e_cell_hbox_append (ECellHbox *vbox,
ECell *subcell,
- int model_col,
- int size);
+ gint model_col,
+ gint size);
G_END_DECLS
diff --git a/widgets/table/e-cell-number.c b/widgets/table/e-cell-number.c
index 56754a05e5..63f55eb1c4 100644
--- a/widgets/table/e-cell-number.c
+++ b/widgets/table/e-cell-number.c
@@ -32,14 +32,14 @@
G_DEFINE_TYPE (ECellNumber, e_cell_number, E_CELL_TEXT_TYPE)
-static char *
-ecn_get_text(ECellText *cell, ETableModel *model, int col, int row)
+static gchar *
+ecn_get_text(ECellText *cell, ETableModel *model, gint col, gint row)
{
return e_format_number(GPOINTER_TO_INT (e_table_model_value_at(model, col, row)));
}
static void
-ecn_free_text(ECellText *cell, char *text)
+ecn_free_text(ECellText *cell, gchar *text)
{
g_free(text);
}
@@ -72,7 +72,7 @@ e_cell_number_init (ECellNumber *cell_number)
* Returns: an ECell object that can be used to render numbers.
*/
ECell *
-e_cell_number_new (const char *fontname, GtkJustification justify)
+e_cell_number_new (const gchar *fontname, GtkJustification justify)
{
ECellNumber *ecn = g_object_new (E_CELL_NUMBER_TYPE, NULL);
diff --git a/widgets/table/e-cell-number.h b/widgets/table/e-cell-number.h
index 75471f7a2c..fcba9f517a 100644
--- a/widgets/table/e-cell-number.h
+++ b/widgets/table/e-cell-number.h
@@ -43,7 +43,7 @@ typedef struct {
} ECellNumberClass;
GType e_cell_number_get_type (void);
-ECell *e_cell_number_new (const char *fontname, GtkJustification justify);
+ECell *e_cell_number_new (const gchar *fontname, GtkJustification justify);
G_END_DECLS
diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c
index ea141305b9..cf90909d6f 100644
--- a/widgets/table/e-cell-pixbuf.c
+++ b/widgets/table/e-cell-pixbuf.c
@@ -76,7 +76,7 @@ e_cell_pixbuf_construct (ECellPixbuf *ecp)
*/
static ECellView *
-pixbuf_new_view (ECell *ecell, ETableModel *table_model, void *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);
@@ -109,12 +109,12 @@ pixbuf_kill_view (ECellView *ecell_view)
static void
pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable,
- int model_col, int view_col, int row, ECellFlags flags,
- int x1, int y1, int x2, int y2)
+ gint model_col, gint view_col, gint row, ECellFlags flags,
+ gint x1, gint y1, gint x2, gint y2)
{
GdkPixbuf *cell_pixbuf;
- int real_x, real_y, real_w, real_h;
- int pix_w, pix_h;
+ gint real_x, real_y, real_w, real_h;
+ gint pix_w, pix_h;
cairo_t *cr;
cell_pixbuf = e_table_model_value_at (ecell_view->e_table_model,
@@ -133,7 +133,7 @@ pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable,
/* We center the pixbuf within our allocated space */
if (x2 - x1 > pix_w) {
- int diff = (x2 - x1) - pix_w;
+ gint diff = (x2 - x1) - pix_w;
real_x = x1 + diff/2;
real_w = pix_w;
} else {
@@ -142,7 +142,7 @@ pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable,
}
if (y2 - y1 > pix_h) {
- int diff = (y2 - y1) - pix_h;
+ gint diff = (y2 - y1) - pix_h;
real_y = y1 + diff/2;
real_h = pix_h;
} else {
@@ -160,7 +160,7 @@ pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable,
static gint
pixbuf_event (ECellView *ecell_view, GdkEvent *event,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
ECellFlags flags, ECellActions *actions)
{
/* noop */
@@ -169,7 +169,7 @@ pixbuf_event (ECellView *ecell_view, GdkEvent *event,
}
static gint
-pixbuf_height (ECellView *ecell_view, int model_col, int view_col, int row)
+pixbuf_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
GdkPixbuf *pixbuf;
if (row == -1) {
@@ -193,11 +193,11 @@ pixbuf_height (ECellView *ecell_view, int model_col, int view_col, int row)
*/
static void
pixbuf_print (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width, double height)
{
GdkPixbuf *pixbuf;
- int scale;
+ gint scale;
cairo_t *cr = gtk_print_context_get_cairo_context (context);
pixbuf = (GdkPixbuf *) e_table_model_value_at (ecell_view->e_table_model, 1, row);
@@ -214,7 +214,7 @@ pixbuf_print (ECellView *ecell_view, GtkPrintContext *context,
static gdouble
pixbuf_print_height (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width)
{
GdkPixbuf *pixbuf;
@@ -236,9 +236,9 @@ pixbuf_print_height (ECellView *ecell_view, GtkPrintContext *context,
}
static gint
-pixbuf_max_width (ECellView *ecell_view, int model_col, int view_col)
+pixbuf_max_width (ECellView *ecell_view, gint model_col, gint view_col)
{
- int pw;
+ gint pw;
gint num_rows, i;
gint max_width = -1;
diff --git a/widgets/table/e-cell-pixbuf.h b/widgets/table/e-cell-pixbuf.h
index 850e9d535d..f6d3c5173d 100644
--- a/widgets/table/e-cell-pixbuf.h
+++ b/widgets/table/e-cell-pixbuf.h
@@ -39,9 +39,9 @@ typedef struct _ECellPixbufClass ECellPixbufClass;
struct _ECellPixbuf {
ECell parent;
- int selected_column;
- int focused_column;
- int unselected_column;
+ gint selected_column;
+ gint focused_column;
+ gint unselected_column;
};
struct _ECellPixbufClass {
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index 8a8918dc70..5fcd13fce4 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -76,7 +76,7 @@ static int ecp_height (ECellView *ecv,
int model_col,
int view_col,
int row);
-static void* ecp_enter_edit (ECellView *ecv,
+static gpointer ecp_enter_edit (ECellView *ecv,
int model_col,
int view_col,
int row);
@@ -107,12 +107,12 @@ static void ecp_show_tooltip (ECellView *ecv,
int row,
int col_width,
ETableTooltip *tooltip);
-static char *ecp_get_bg_color (ECellView *ecell_view, int row);
+static gchar *ecp_get_bg_color (ECellView *ecell_view, gint row);
static gint e_cell_popup_do_popup (ECellPopupView *ecp_view,
GdkEvent *event,
- int row,
- int model_col);
+ gint row,
+ gint model_col);
G_DEFINE_TYPE (ECellPopup, e_cell_popup, E_CELL_TYPE)
@@ -189,7 +189,7 @@ e_cell_popup_dispose (GObject *object)
* ECell::new_view method
*/
static ECellView *
-ecp_new_view (ECell *ecell, ETableModel *table_model, void *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;
@@ -267,8 +267,8 @@ ecp_unrealize (ECellView *ecv)
*/
static void
ecp_draw (ECellView *ecv, GdkDrawable *drawable,
- int model_col, int view_col, int row, ECellFlags flags,
- int x1, int y1, int x2, int y2)
+ 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;
@@ -326,13 +326,13 @@ ecp_draw (ECellView *ecv, GdkDrawable *drawable,
* ECell::event method
*/
static gint
-ecp_event (ECellView *ecv, GdkEvent *event, int model_col, int view_col,
- int 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);
ETableItem *eti = E_TABLE_ITEM (ecv->e_table_item_view);
- int width;
+ gint width;
switch (event->type) {
case GDK_BUTTON_PRESS:
@@ -369,7 +369,7 @@ ecp_event (ECellView *ecv, GdkEvent *event, int model_col, int view_col,
* ECell::height method
*/
static int
-ecp_height (ECellView *ecv, int model_col, int view_col, int row)
+ecp_height (ECellView *ecv, gint model_col, gint view_col, gint row)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -380,8 +380,8 @@ ecp_height (ECellView *ecv, int model_col, int view_col, int row)
/*
* ECellView::enter_edit method
*/
-static void *
-ecp_enter_edit (ECellView *ecv, int model_col, int view_col, int row)
+static gpointer
+ecp_enter_edit (ECellView *ecv, gint model_col, gint view_col, gint row)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -393,8 +393,8 @@ ecp_enter_edit (ECellView *ecv, int model_col, int view_col, int row)
* ECellView::leave_edit method
*/
static void
-ecp_leave_edit (ECellView *ecv, int model_col, int view_col, int row,
- void *edit_context)
+ecp_leave_edit (ECellView *ecv, gint model_col, gint view_col, gint row,
+ gpointer edit_context)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -405,7 +405,7 @@ ecp_leave_edit (ECellView *ecv, int model_col, int view_col, int row,
static void
ecp_print (ECellView *ecv, GtkPrintContext *context,
- int model_col, int view_col, int row, double width, double height)
+ gint model_col, gint view_col, gint row, double width, double height)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -416,7 +416,7 @@ ecp_print (ECellView *ecv, GtkPrintContext *context,
static gdouble
ecp_print_height (ECellView *ecv, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -428,8 +428,8 @@ ecp_print_height (ECellView *ecv, GtkPrintContext *context,
static int
ecp_max_width (ECellView *ecv,
- int model_col,
- int view_col)
+ gint model_col,
+ gint view_col)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -439,10 +439,10 @@ ecp_max_width (ECellView *ecv,
static void
ecp_show_tooltip (ECellView *ecv,
- int model_col,
- int view_col,
- int row,
- int col_width,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gint col_width,
ETableTooltip *tooltip)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -451,8 +451,8 @@ ecp_show_tooltip (ECellView *ecv,
col_width, tooltip);
}
-static char *
-ecp_get_bg_color (ECellView *ecell_view, int row)
+static gchar *
+ecp_get_bg_color (ECellView *ecell_view, gint row)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecell_view;
@@ -487,11 +487,11 @@ e_cell_popup_set_child (ECellPopup *ecp,
static gint
e_cell_popup_do_popup (ECellPopupView *ecp_view,
GdkEvent *event,
- int row,
- int view_col)
+ gint row,
+ gint view_col)
{
ECellPopup *ecp = E_CELL_POPUP (ecp_view->cell_view.ecell);
- gint (*popup_func) (ECellPopup *ecp, GdkEvent *event, int row, int view_col);
+ gint (*popup_func) (ECellPopup *ecp, GdkEvent *event, gint row, gint view_col);
ecp->popup_cell_view = ecp_view;
diff --git a/widgets/table/e-cell-popup.h b/widgets/table/e-cell-popup.h
index c1262a1234..b1e40a9845 100644
--- a/widgets/table/e-cell-popup.h
+++ b/widgets/table/e-cell-popup.h
@@ -71,7 +71,7 @@ typedef struct {
ECellClass parent_class;
/* Virtual function for subclasses to override. */
- gint (*popup) (ECellPopup *ecp, GdkEvent *event, int row, int view_col);
+ gint (*popup) (ECellPopup *ecp, GdkEvent *event, gint row, gint view_col);
} ECellPopupClass;
diff --git a/widgets/table/e-cell-size.c b/widgets/table/e-cell-size.c
index ca4078512f..1fa949ec6a 100644
--- a/widgets/table/e-cell-size.c
+++ b/widgets/table/e-cell-size.c
@@ -31,8 +31,8 @@
G_DEFINE_TYPE (ECellSize, e_cell_size, E_CELL_TEXT_TYPE)
-static char *
-ecd_get_text(ECellText *cell, ETableModel *model, int col, int row)
+static gchar *
+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;
@@ -51,7 +51,7 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row)
}
static void
-ecd_free_text(ECellText *cell, char *text)
+ecd_free_text(ECellText *cell, gchar *text)
{
g_free(text);
}
@@ -96,7 +96,7 @@ 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 char *fontname, GtkJustification justify)
+e_cell_size_new (const gchar *fontname, GtkJustification justify)
{
ECellSize *ecd = g_object_new (E_CELL_SIZE_TYPE, NULL);
diff --git a/widgets/table/e-cell-size.h b/widgets/table/e-cell-size.h
index ed0d279f6b..2b335d7717 100644
--- a/widgets/table/e-cell-size.h
+++ b/widgets/table/e-cell-size.h
@@ -44,7 +44,7 @@ typedef struct {
} ECellSizeClass;
GType e_cell_size_get_type (void);
-ECell *e_cell_size_new (const char *fontname, GtkJustification justify);
+ECell *e_cell_size_new (const gchar *fontname, GtkJustification justify);
G_END_DECLS
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 3a03fe51e7..409f933dae 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -73,10 +73,10 @@
/* This defines a line of text */
struct line {
- char *text; /* Line's text UTF-8, it is a pointer into the text->text string */
- int length; /* Line's length in BYTES */
- int width; /* Line's width in pixels */
- int ellipsis_length; /* Length before adding ellipsis in BYTES */
+ gchar *text; /* Line's text UTF-8, it is a pointer into the text->text string */
+ gint length; /* Line's length in BYTES */
+ gint width; /* Line's width in pixels */
+ gint ellipsis_length; /* Length before adding ellipsis in BYTES */
};
/* Object argument IDs */
@@ -116,9 +116,9 @@ G_DEFINE_TYPE (ECellText, e_cell_text, E_CELL_TYPE)
typedef struct {
gpointer lines; /* Text split into lines (private field) */
- int num_lines; /* Number of lines of text */
- int max_width;
- int ref_count;
+ gint num_lines; /* Number of lines of text */
+ gint max_width;
+ gint ref_count;
} ECellTextLineBreaks;
@@ -138,7 +138,7 @@ typedef struct {
CellEdit *edit;
- int xofs, yofs; /* This gets added to the x
+ gint xofs, yofs; /* This gets added to the x
and y for the cell text. */
double ellipsis_width[2]; /* The width of the ellipsis. */
} ECellTextView;
@@ -147,26 +147,26 @@ struct _CellEdit {
ECellTextView *text_view;
- int model_col, view_col, row;
- int cell_width;
+ gint model_col, view_col, row;
+ gint cell_width;
PangoLayout *layout;
- char *text;
+ gchar *text;
- char *old_text;
+ gchar *old_text;
/*
* Where the editing is taking place
*/
- int xofs_edit, yofs_edit; /* Offset because of editing.
+ gint xofs_edit, yofs_edit; /* Offset because of editing.
This is negative compared
to the other offsets. */
/* This needs to be reworked a bit once we get line wrapping. */
- int selection_start; /* Start of selection - IN BYTES */
- int selection_end; /* End of selection - IN BYTES */
+ gint selection_start; /* Start of selection - IN BYTES */
+ gint selection_end; /* End of selection - IN BYTES */
gboolean select_by_word; /* Current selection is by word */
/* This section is for drag scrolling and blinking cursor. */
@@ -200,7 +200,7 @@ struct _CellEdit {
static void e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *command, gpointer data);
static void e_cell_text_view_get_selection (CellEdit *edit, GdkAtom selection, guint32 time);
-static void e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection, char *data, gint length);
+static void e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection, gchar *data, gint length);
static void _get_tep (CellEdit *edit);
@@ -213,13 +213,13 @@ static void e_cell_text_preedit_changed_cb (GtkIMContext *context, ECellTextView
static void e_cell_text_commit_cb (GtkIMContext *context, const gchar *str, ECellTextView *text_view);
static gboolean e_cell_text_retrieve_surrounding_cb (GtkIMContext *context, ECellTextView *text_view);
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, int value);
+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, int row, int text_length);
+static PangoAttrList* build_attr_list (ECellTextView *text_view, gint row, gint text_length);
static void update_im_cursor_location (ECellTextView *tv);
-char *
-e_cell_text_get_text (ECellText *cell, ETableModel *model, int col, int row)
+gchar *
+e_cell_text_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
{
if (ECT_CLASS(cell)->get_text)
return ECT_CLASS(cell)->get_text (cell, model, col, row);
@@ -228,44 +228,44 @@ e_cell_text_get_text (ECellText *cell, ETableModel *model, int col, int row)
}
void
-e_cell_text_free_text (ECellText *cell, char *text)
+e_cell_text_free_text (ECellText *cell, gchar *text)
{
if (ECT_CLASS(cell)->free_text)
ECT_CLASS(cell)->free_text (cell, text);
}
void
-e_cell_text_set_value (ECellText *cell, ETableModel *model, int col, int row,
- const char *text)
+e_cell_text_set_value (ECellText *cell, ETableModel *model, gint col, gint row,
+ const gchar *text)
{
if (ECT_CLASS(cell)->set_value)
ECT_CLASS(cell)->set_value (cell, model, col, row, text);
}
-static char *
-ect_real_get_text (ECellText *cell, ETableModel *model, int col, int row)
+static gchar *
+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, char *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 char*. Subclasses may parse the text into
+ 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, int col, int row,
- const char *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, int view_col, int 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,
@@ -279,8 +279,8 @@ static void
ect_stop_editing (ECellTextView *text_view, gboolean commit)
{
CellEdit *edit = text_view->edit;
- int row, view_col, model_col;
- char *old_text, *text;
+ gint row, view_col, model_col;
+ gchar *old_text, *text;
if (!edit)
return;
@@ -350,7 +350,7 @@ ect_cancel_edit (ECellTextView *text_view)
* ECell::new_view method
*/
static ECellView *
-ect_new_view (ECell *ecell, ETableModel *table_model, void *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;
@@ -456,7 +456,7 @@ ect_free_color (gchar *color_spec, GdkColor *color, GdkColormap *colormap)
static PangoAttrList*
-build_attr_list (ECellTextView *text_view, int row, int text_length)
+build_attr_list (ECellTextView *text_view, gint row, gint text_length)
{
ECellView *ecell_view = (ECellView *) text_view;
@@ -501,7 +501,7 @@ build_attr_list (ECellTextView *text_view, int row, int text_length)
}
static PangoLayout *
-layout_with_preedit (ECellTextView *text_view, int row, const char *text, gint width)
+layout_with_preedit (ECellTextView *text_view, gint row, const gchar *text, gint width)
{
CellEdit *edit = text_view->edit;
PangoAttrList *attrs ;
@@ -563,7 +563,7 @@ layout_with_preedit (ECellTextView *text_view, int row, const char *text, gint w
}
static PangoLayout *
-build_layout (ECellTextView *text_view, int row, const char *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);
@@ -592,13 +592,13 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width)
if (ect->font_name)
{
PangoFontDescription *desc = NULL, *fixed_desc = NULL;
- char *fixed_family = NULL;
+ gchar *fixed_family = NULL;
gint fixed_size = 0;
gboolean fixed_points = TRUE;
fixed_desc = pango_font_description_from_string (ect->font_name);
if (fixed_desc) {
- fixed_family = (char *)pango_font_description_get_family (fixed_desc);
+ fixed_family = (gchar *)pango_font_description_get_family (fixed_desc);
fixed_size = pango_font_description_get_size (fixed_desc);
fixed_points = !pango_font_description_get_size_is_absolute (fixed_desc);
}
@@ -637,7 +637,7 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width)
}
static PangoLayout *
-generate_layout (ECellTextView *text_view, int model_col, int view_col, int row, int 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);
@@ -650,7 +650,7 @@ generate_layout (ECellTextView *text_view, int model_col, int view_col, int row,
}
if (row >= 0) {
- char *temp = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row);
+ gchar *temp = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row);
layout = build_layout (text_view, row, temp ? temp : "?", width);
e_cell_text_free_text(ect, temp);
} else
@@ -661,10 +661,10 @@ generate_layout (ECellTextView *text_view, int model_col, int view_col, int row,
static void
-draw_pango_rectangle (GdkDrawable *drawable, GdkGC *gc, int x1, int y1, PangoRectangle rect)
+draw_pango_rectangle (GdkDrawable *drawable, GdkGC *gc, gint x1, gint y1, PangoRectangle rect)
{
- int width = rect.width / PANGO_SCALE;
- int height = rect.height / PANGO_SCALE;
+ gint width = rect.width / PANGO_SCALE;
+ gint height = rect.height / PANGO_SCALE;
if (width <= 0)
width = 1;
if (height <= 0)
@@ -676,15 +676,15 @@ draw_pango_rectangle (GdkDrawable *drawable, GdkGC *gc, int x1, int y1, PangoRec
static gboolean
show_pango_rectangle (CellEdit *edit, PangoRectangle rect)
{
- int x1 = rect.x / PANGO_SCALE;
- int x2 = (rect.x + rect.width) / PANGO_SCALE;
+ gint x1 = rect.x / PANGO_SCALE;
+ gint x2 = (rect.x + rect.width) / PANGO_SCALE;
#if 0
- int y1 = rect.y / PANGO_SCALE;
- int y2 = (rect.y + rect.height) / PANGO_SCALE;
+ gint y1 = rect.y / PANGO_SCALE;
+ gint y2 = (rect.y + rect.height) / PANGO_SCALE;
#endif
- int new_xofs_edit = edit->xofs_edit;
- int new_yofs_edit = edit->yofs_edit;
+ gint new_xofs_edit = edit->xofs_edit;
+ gint new_yofs_edit = edit->yofs_edit;
if (x1 < new_xofs_edit)
new_xofs_edit = x1;
@@ -717,8 +717,8 @@ show_pango_rectangle (CellEdit *edit, PangoRectangle rect)
*/
static void
ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
- int model_col, int view_col, int row, ECellFlags flags,
- int x1, int y1, int x2, int y2)
+ 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;
@@ -728,7 +728,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
GdkColor *foreground;
GtkWidget *canvas = GTK_WIDGET (text_view->canvas);
GdkRectangle clip_rect;
- int x_origin, y_origin;
+ gint x_origin, y_origin;
selected = flags & E_CELL_SELECTED;
@@ -741,7 +741,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
foreground = &canvas->style->text [GTK_STATE_NORMAL];
if (ect->color_column != -1) {
- char *color_spec;
+ gchar *color_spec;
GdkColor *cell_foreground;
color_spec = e_table_model_value_at (ecell_view->e_table_model,
@@ -783,7 +783,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
if (edit && edit->view_col == view_col && edit->row == row) {
if (edit->selection_start != edit->selection_end) {
- int start_index, end_index;
+ gint start_index, end_index;
PangoLayoutLine *line;
gint *ranges;
gint n_ranges, i;
@@ -861,7 +861,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
* Get the background color
*/
static gchar *
-ect_get_bg_color(ECellView *ecell_view, int row)
+ect_get_bg_color(ECellView *ecell_view, gint row)
{
ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
gchar *color_spec;
@@ -902,7 +902,7 @@ key_begins_editing (GdkEventKey *event)
* ECell::event method
*/
static gint
-ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int 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;
@@ -1146,7 +1146,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
* ECell::height method
*/
static int
-ect_height (ECellView *ecell_view, int model_col, int view_col, int row)
+ect_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
gint height;
@@ -1161,13 +1161,13 @@ ect_height (ECellView *ecell_view, int model_col, int view_col, int row)
/*
* ECellView::enter_edit method
*/
-static void *
-ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
+static gpointer
+ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
CellEdit *edit;
ECellText *ect = E_CELL_TEXT(ecell_view->ecell);
- char *temp;
+ gchar *temp;
edit = g_new0 (CellEdit, 1);
text_view->edit = edit;
@@ -1238,7 +1238,7 @@ ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
* ECellView::leave_edit method
*/
static void
-ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *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;
@@ -1255,13 +1255,13 @@ ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, voi
/*
* ECellView::save_state method
*/
-static void *
-ect_save_state (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context)
+static gpointer
+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;
- int *save_state = g_new (int, 2);
+ gint *save_state = g_new (int, 2);
save_state[0] = edit->selection_start;
save_state[1] = edit->selection_end;
@@ -1272,12 +1272,12 @@ ect_save_state (ECellView *ecell_view, int model_col, int view_col, int row, voi
* ECellView::load_state method
*/
static void
-ect_load_state (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context, void *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;
- int length;
- int *selection = save_state;
+ gint length;
+ gint *selection = save_state;
length = strlen (edit->text);
@@ -1291,7 +1291,7 @@ ect_load_state (ECellView *ecell_view, int model_col, int view_col, int row, voi
* ECellView::free_state method
*/
static void
-ect_free_state (ECellView *ecell_view, int model_col, int view_col, int row, void *save_state)
+ect_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state)
{
g_free (save_state);
}
@@ -1308,11 +1308,11 @@ get_font_description_for_size (double h)
}
static void
-get_font_size (PangoLayout *layout, PangoFontDescription *font, const char *text,
+get_font_size (PangoLayout *layout, PangoFontDescription *font, const gchar *text,
double *width, double *height)
{
- int w;
- int h;
+ gint w;
+ gint h;
g_return_if_fail (layout != NULL);
pango_layout_set_font_description (layout, font);
@@ -1328,7 +1328,7 @@ get_font_size (PangoLayout *layout, PangoFontDescription *font, const char *text
static void
ect_print (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width, double height)
{
PangoFontDescription *font_des = get_font_description_for_size (12);
@@ -1341,7 +1341,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
PangoDirection dir;
gboolean strikeout, underline;
cairo_t *cr;
- char *string;
+ gchar *string;
double ty, ly, text_width = 0.0, text_height = 0.0;
@@ -1417,7 +1417,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
static gdouble
ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width)
{
/*
@@ -1432,20 +1432,20 @@ ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
static int
ect_max_width (ECellView *ecell_view,
- int model_col,
- int view_col)
+ gint model_col,
+ gint view_col)
{
/* New ECellText */
ECellTextView *text_view = (ECellTextView *) ecell_view;
- int row;
- int number_of_rows;
- int max_width = 0;
+ gint row;
+ gint number_of_rows;
+ gint max_width = 0;
number_of_rows = e_table_model_row_count (ecell_view->e_table_model);
for (row = 0; row < number_of_rows; row++) {
PangoLayout *layout = generate_layout (text_view, model_col, view_col, row, 0);
- int width;
+ gint width;
pango_layout_get_pixel_size (layout, &width, NULL);
@@ -1458,13 +1458,13 @@ ect_max_width (ECellView *ecell_view,
static int
ect_max_width_by_row (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row)
+ gint model_col,
+ gint view_col,
+ gint row)
{
/* New ECellText */
ECellTextView *text_view = (ECellTextView *) ecell_view;
- int width;
+ gint width;
PangoLayout *layout;
if (row >= e_table_model_row_count (ecell_view->e_table_model))
@@ -1519,10 +1519,10 @@ tooltip_event (GtkWidget *window,
static void
ect_show_tooltip (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row,
- int col_width,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gint col_width,
ETableTooltip *tooltip)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
@@ -1530,7 +1530,7 @@ ect_show_tooltip (ECellView *ecell_view,
double i2c[6];
ArtPoint origin = {0, 0};
ArtPoint pixel_origin;
- int canvas_x, canvas_y;
+ gint canvas_x, canvas_y;
GnomeCanvasItem *tooltip_text;
double tooltip_width;
double tooltip_height;
@@ -1540,7 +1540,7 @@ ect_show_tooltip (ECellView *ecell_view,
ECellText *ect = E_CELL_TEXT(ecell_view->ecell);
GtkWidget *window;
PangoLayout *layout;
- int width, height;
+ gint width, height;
tooltip->timer = 0;
@@ -1733,7 +1733,7 @@ ect_get_property (GObject *object,
}
}
-static char *ellipsis_default = NULL;
+static gchar *ellipsis_default = NULL;
static gboolean use_ellipsis_default = TRUE;
static void
@@ -1741,7 +1741,7 @@ e_cell_text_class_init (ECellTextClass *klass)
{
ECellClass *ecc = E_CELL_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- const char *ellipsis_env;
+ const gchar *ellipsis_env;
object_class->finalize = ect_finalize;
@@ -1972,7 +1972,7 @@ e_cell_text_delete_surrounding_cb (GtkIMContext *context,
gint n_chars,
ECellTextView *tv)
{
- int begin_pos, end_pos;
+ gint begin_pos, end_pos;
glong text_len;
CellEdit *edit = tv->edit;
@@ -2020,7 +2020,7 @@ e_cell_text_init (ECellText *ect)
* Returns: The ECellText.
*/
ECell *
-e_cell_text_construct (ECellText *cell, const char *fontname, GtkJustification justify)
+e_cell_text_construct (ECellText *cell, const gchar *fontname, GtkJustification justify)
{
if(!cell)
return E_CELL(NULL);
@@ -2037,7 +2037,7 @@ e_cell_text_construct (ECellText *cell, const char *fontname, GtkJustification j
*
* Creates a new ECell renderer that can be used to render strings that
* that come from the model. The value returned from the model is
- * interpreted as being a char *.
+ * interpreted as being a gchar *.
*
* The ECellText object support a large set of properties that can be
* configured through the Gtk argument system and allows the user to have
@@ -2056,7 +2056,7 @@ e_cell_text_construct (ECellText *cell, const char *fontname, GtkJustification j
* Returns: an ECell object that can be used to render strings.
*/
ECell *
-e_cell_text_new (const char *fontname, GtkJustification justify)
+e_cell_text_new (const gchar *fontname, GtkJustification justify)
{
ECellText *ect = g_object_new (E_CELL_TEXT_TYPE, NULL);
@@ -2072,9 +2072,9 @@ e_cell_text_new (const char *fontname, GtkJustification justify)
static gint
get_position_from_xy (CellEdit *edit, gint x, gint y)
{
- int index;
- int trailing;
- const char *text;
+ gint index;
+ gint trailing;
+ const gchar *text;
PangoLayout *layout = generate_layout (edit->text_view, edit->model_col, edit->view_col, edit->row, edit->cell_width);
ECellTextView *text_view = edit->text_view;
@@ -2102,7 +2102,7 @@ _blink_scroll_timeout (gpointer data)
gulong current_time;
gboolean scroll = FALSE;
gboolean redraw = FALSE;
- int width, height;
+ gint width, height;
g_timer_elapsed (edit->timer, &current_time);
@@ -2164,10 +2164,10 @@ _blink_scroll_timeout (gpointer data)
}
static int
-next_word (CellEdit *edit, int start)
+next_word (CellEdit *edit, gint start)
{
- char *p;
- int length;
+ gchar *p;
+ gint length;
length = strlen (edit->text);
if (start >= length)
@@ -2188,12 +2188,12 @@ next_word (CellEdit *edit, int start)
static int
_get_position (ECellTextView *text_view, ETextEventProcessorCommand *command)
{
- int length;
+ gint length;
CellEdit *edit = text_view->edit;
gchar *p;
- int unival;
- int index;
- int trailing;
+ gint unival;
+ gint index;
+ gint trailing;
switch (command->position) {
@@ -2360,10 +2360,10 @@ _delete_selection (ECellTextView *text_view)
/* NB! We expect value to be length IN BYTES */
static void
-_insert (ECellTextView *text_view, const gchar *string, int value)
+_insert (ECellTextView *text_view, const gchar *string, gint value)
{
CellEdit *edit = text_view->edit;
- char *temp;
+ gchar *temp;
if (value <= 0) return;
@@ -2386,16 +2386,16 @@ _insert (ECellTextView *text_view, const gchar *string, int value)
}
static void
-capitalize (CellEdit *edit, int start, int end, ETextEventProcessorCaps type)
+capitalize (CellEdit *edit, gint start, gint end, ETextEventProcessorCaps type)
{
ECellTextView *text_view = edit->text_view;
gboolean first = TRUE;
- int character_length = g_utf8_strlen (edit->text + start, start - end);
- const char *p = edit->text + start;
- const char *text_end = edit->text + end;
- char *new_text = g_new0 (char, character_length * 6 + 1);
- char *output = new_text;
+ gint character_length = g_utf8_strlen (edit->text + start, start - end);
+ const gchar *p = edit->text + start;
+ const gchar *text_end = edit->text + end;
+ gchar *new_text = g_new0 (char, character_length * 6 + 1);
+ gchar *output = new_text;
while (p && *p && p < text_end && g_unichar_validate (g_utf8_get_char (p))) {
gunichar unival = g_utf8_get_char (p);
@@ -2446,7 +2446,7 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *
gboolean change = FALSE;
gboolean redraw = FALSE;
- int sel_start, sel_end;
+ gint sel_start, sel_end;
/* If the EText isn't editable, then ignore any commands that would
modify the text. */
@@ -2540,8 +2540,8 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *
if (edit->selection_start == edit->selection_end) {
capitalize (edit, edit->selection_start, next_word (edit, edit->selection_start), command->value);
} else {
- int selection_start = MIN (edit->selection_start, edit->selection_end);
- int selection_end = edit->selection_start + edit->selection_end - selection_start; /* Slightly faster than MAX */
+ gint selection_start = MIN (edit->selection_start, edit->selection_end);
+ gint selection_end = edit->selection_start + edit->selection_end - selection_start; /* Slightly faster than MAX */
capitalize (edit, selection_start, selection_end, command->value);
}
if (edit->timer) {
@@ -2581,7 +2581,7 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *
}
static void
-e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection, char *data, gint length)
+e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection, gchar *data, gint length)
{
#if DO_SELECTION
GtkClipboard *clipboard;
@@ -2612,7 +2612,7 @@ paste_received (GtkClipboard *clipboard,
ETextEventProcessorCommand command;
command.action = E_TEP_INSERT;
command.position = E_TEP_SELECTION;
- command.string = (char *)text;
+ command.string = (gchar *)text;
command.value = strlen (text);
command.time = GDK_CURRENT_TIME;
e_cell_text_view_command (edit->tep, &command, edit);
@@ -2736,8 +2736,8 @@ e_cell_text_set_selection (ECellView *cell_view,
* @cell_view: the given cell view
* @col: column of the given cell in the view
* @row: row of the given cell in the view
- * @start: a pointer to an int value indicates the start offset of the selection
- * @end: a pointer to an int value indicates the end offset of the selection
+ * @start: a pointer to an gint value indicates the start offset of the selection
+ * @end: a pointer to an gint value indicates the end offset of the selection
*
* Gets the selection of given text cell.
* If the current editing cell is not the given cell, this function
@@ -2875,7 +2875,7 @@ e_cell_text_delete_selection (ECellView *cell_view, gint col, gint row)
*
* This API is most likely to be used by a11y implementations.
*/
-char *
+gchar *
e_cell_text_get_text_by_view (ECellView *cell_view, gint col, gint row)
{
ECellTextView *ectv;
diff --git a/widgets/table/e-cell-text.h b/widgets/table/e-cell-text.h
index d92b025aa5..df4a6f827c 100644
--- a/widgets/table/e-cell-text.h
+++ b/widgets/table/e-cell-text.h
@@ -54,27 +54,27 @@ typedef struct {
ECell parent;
GtkJustification justify;
- char *font_name;
+ gchar *font_name;
double x, y; /* Position at anchor */
gulong pixel; /* Fill color */
/* Clip handling */
- char *ellipsis; /* The ellipsis characters. NULL = "...". */
+ gchar *ellipsis; /* The ellipsis characters. NULL = "...". */
guint use_ellipsis : 1; /* Whether to use the ellipsis. */
guint editable : 1; /* Whether the text can be edited. */
- int strikeout_column;
- int underline_column;
- int bold_column;
+ gint strikeout_column;
+ gint underline_column;
+ 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. */
- int color_column;
- int bg_color_column;
+ gint color_column;
+ gint bg_color_column;
/* This stores the colors we have allocated. */
GHashTable *colors;
@@ -83,28 +83,28 @@ typedef struct {
typedef struct {
ECellClass parent_class;
- char *(*get_text) (ECellText *cell, ETableModel *model, int col, int row);
- void (*free_text) (ECellText *cell, char *text);
- void (*set_value) (ECellText *cell, ETableModel *model, int col, int row, const char *text);
+ gchar *(*get_text) (ECellText *cell, ETableModel *model, gint col, gint row);
+ void (*free_text) (ECellText *cell, gchar *text);
+ void (*set_value) (ECellText *cell, ETableModel *model, gint col, gint row, const gchar *text);
/* signal handlers */
- void (*text_inserted) (ECellText *cell, ECellView *cell_view, int pos, int len, int row, int model_col);
- void (*text_deleted) (ECellText *cell, ECellView *cell_view, int pos, int len, int row, int model_col);
+ void (*text_inserted) (ECellText *cell, ECellView *cell_view, gint pos, gint len, gint row, gint model_col);
+ void (*text_deleted) (ECellText *cell, ECellView *cell_view, gint pos, gint len, gint row, gint model_col);
} ECellTextClass;
GType e_cell_text_get_type (void);
-ECell *e_cell_text_new (const char *fontname, GtkJustification justify);
-ECell *e_cell_text_construct(ECellText *cell, const char *fontname, GtkJustification justify);
+ECell *e_cell_text_new (const gchar *fontname, GtkJustification justify);
+ECell *e_cell_text_construct(ECellText *cell, const gchar *fontname, GtkJustification justify);
/* Gets the value from the model and converts it into a string. In ECellText
- itself, the value is assumed to be a char* and so needs no conversion.
+ 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. */
-char *e_cell_text_get_text (ECellText *cell, ETableModel *model, int col, int row);
+char *e_cell_text_get_text (ECellText *cell, ETableModel *model, gint col, gint row);
/* Frees the value returned by e_cell_text_get_text(). */
-void e_cell_text_free_text (ECellText *cell, char *text);
+void e_cell_text_free_text (ECellText *cell, gchar *text);
/* Sets the ETableModel value, based on the given string. */
-void e_cell_text_set_value (ECellText *cell, ETableModel *model, int col, int row, const char *text);
+void e_cell_text_set_value (ECellText *cell, ETableModel *model, gint col, gint row, const gchar *text);
/* Sets the selection of given text cell */
gboolean e_cell_text_set_selection (ECellView *cell_view, gint col, gint row, gint start, gint end);
@@ -122,7 +122,7 @@ void e_cell_text_paste_clipboard (ECellView *cell_view, gint col, gint row);
void e_cell_text_delete_selection (ECellView *cell_view, gint col, gint row);
/* get text directly from view, both col and row are model format */
-char *e_cell_text_get_text_by_view (ECellView *cell_view, gint col, gint row);
+gchar *e_cell_text_get_text_by_view (ECellView *cell_view, gint col, gint row);
G_END_DECLS
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index 69dc1b27bb..4248666ce6 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -50,7 +50,7 @@ typedef struct {
* ECell::realize method
*/
static ECellView *
-etog_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
+etog_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view)
{
ECellToggleView *toggle_view = g_new0 (ECellToggleView, 1);
ETableItem *eti = E_TABLE_ITEM (e_table_item_view);
@@ -109,17 +109,17 @@ etog_unrealize (ECellView *ecv)
*/
static void
etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
- int model_col, int view_col, int row, ECellFlags flags,
- int x1, int y1, int x2, int y2)
+ gint model_col, gint view_col, gint row, ECellFlags flags,
+ gint x1, gint y1, gint x2, gint y2)
{
ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell);
ECellToggleView *toggle_view = (ECellToggleView *) ecell_view;
GdkPixbuf *image;
- int x, y, width, height;
- int cache_seq;
+ gint x, y, width, height;
+ gint cache_seq;
cairo_t *cr;
- const int value = GPOINTER_TO_INT (
+ const gint value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
if (value < 0 || value >= toggle->n_states){
@@ -168,7 +168,7 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
}
static void
-etog_set_value (ECellToggleView *toggle_view, int model_col, int view_col, int row, int value)
+etog_set_value (ECellToggleView *toggle_view, gint model_col, gint view_col, gint row, gint value)
{
ECell *ecell = toggle_view->cell_view.ecell;
ECellToggle *toggle = E_CELL_TOGGLE (ecell);
@@ -184,11 +184,11 @@ etog_set_value (ECellToggleView *toggle_view, int model_col, int view_col, int r
* ECell::event method
*/
static gint
-etog_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions)
+etog_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions)
{
ECellToggleView *toggle_view = (ECellToggleView *) ecell_view;
- void *_value = e_table_model_value_at (ecell_view->e_table_model, model_col, row);
- const int value = GPOINTER_TO_INT (_value);
+ gpointer _value = e_table_model_value_at (ecell_view->e_table_model, model_col, row);
+ const gint value = GPOINTER_TO_INT (_value);
#if 0
if (!(flags & E_CELL_EDITING))
@@ -216,7 +216,7 @@ etog_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
* ECell::height method
*/
static int
-etog_height (ECellView *ecell_view, int model_col, int view_col, int row)
+etog_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell);
@@ -228,13 +228,13 @@ etog_height (ECellView *ecell_view, int model_col, int view_col, int row)
*/
static void
etog_print (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width, double height)
{
ECellToggle *toggle = E_CELL_TOGGLE(ecell_view->ecell);
GdkPixbuf *image;
double image_width, image_height;
- const int value = GPOINTER_TO_INT (
+ const gint value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
cairo_t *cr;
@@ -264,7 +264,7 @@ etog_print (ECellView *ecell_view, GtkPrintContext *context,
static gdouble
etog_print_height (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width)
{
ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell);
@@ -276,16 +276,16 @@ etog_print_height (ECellView *ecell_view, GtkPrintContext *context,
* ECell::max_width method
*/
static int
-etog_max_width (ECellView *ecell_view, int model_col, int view_col)
+etog_max_width (ECellView *ecell_view, gint model_col, gint view_col)
{
ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell);
- int max_width = 0;
- int number_of_rows;
- int row;
+ gint max_width = 0;
+ gint number_of_rows;
+ gint row;
number_of_rows = e_table_model_row_count (ecell_view->e_table_model);
for (row = 0; row < number_of_rows; row++) {
- void *value = e_table_model_value_at (ecell_view->e_table_model,
+ gpointer value = e_table_model_value_at (ecell_view->e_table_model,
model_col, row);
max_width = MAX (max_width, gdk_pixbuf_get_width (toggle->images[GPOINTER_TO_INT (value)]));
}
@@ -297,7 +297,7 @@ static void
etog_finalize (GObject *object)
{
ECellToggle *etog = E_CELL_TOGGLE (object);
- int i;
+ gint i;
for (i = 0; i < etog->n_states; i++)
g_object_unref (etog->images [i]);
@@ -351,10 +351,10 @@ e_cell_toggle_init (ECellToggle *etog)
* arguments.
*/
void
-e_cell_toggle_construct (ECellToggle *etog, int border, int n_states, GdkPixbuf **images)
+e_cell_toggle_construct (ECellToggle *etog, gint border, gint n_states, GdkPixbuf **images)
{
- int max_height = 0;
- int i;
+ gint max_height = 0;
+ gint i;
etog->border = border;
etog->n_states = n_states;
@@ -389,7 +389,7 @@ e_cell_toggle_construct (ECellToggle *etog, int border, int n_states, GdkPixbuf
* toggle cells.
*/
ECell *
-e_cell_toggle_new (int border, int n_states, GdkPixbuf **images)
+e_cell_toggle_new (gint border, gint n_states, GdkPixbuf **images)
{
ECellToggle *etog = g_object_new (E_CELL_TOGGLE_TYPE, NULL);
diff --git a/widgets/table/e-cell-toggle.h b/widgets/table/e-cell-toggle.h
index 97d16dc659..96e3d01a55 100644
--- a/widgets/table/e-cell-toggle.h
+++ b/widgets/table/e-cell-toggle.h
@@ -41,11 +41,11 @@ G_BEGIN_DECLS
typedef struct {
ECell parent;
- int border;
- int n_states;
+ gint border;
+ gint n_states;
GdkPixbuf **images;
- int height;
+ gint height;
} ECellToggle;
typedef struct {
@@ -53,9 +53,9 @@ typedef struct {
} ECellToggleClass;
GType e_cell_toggle_get_type (void);
-ECell *e_cell_toggle_new (int border, int n_states, GdkPixbuf **images);
-void e_cell_toggle_construct (ECellToggle *etog, int border,
- int n_states, GdkPixbuf **images);
+ECell *e_cell_toggle_new (gint border, gint n_states, GdkPixbuf **images);
+void e_cell_toggle_construct (ECellToggle *etog, gint border,
+ gint n_states, GdkPixbuf **images);
G_END_DECLS
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index eb7e428fb9..0b61253c61 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -76,25 +76,25 @@ e_cell_tree_view_get_subcell_view (ECellView *ect)
}
static ETreePath
-e_cell_tree_get_node (ETableModel *table_model, int 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, int row)
+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, int row)
+e_cell_tree_get_tree_table_adapter (ETableModel *table_model, gint row)
{
return e_table_model_value_at (table_model, -3, row);
}
static int
-visible_depth_of_node (ETableModel *model, int 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);
@@ -107,7 +107,7 @@ visible_depth_of_node (ETableModel *model, int row)
if the path is not expandable, then max_width needs to change as
well. */
static gint
-offset_of_node (ETableModel *table_model, int 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);
@@ -124,7 +124,7 @@ offset_of_node (ETableModel *table_model, int row)
* ECell::new_view method
*/
static ECellView *
-ect_new_view (ECell *ecell, ETableModel *table_model, void *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);
@@ -209,7 +209,7 @@ static void
draw_retro_expander (ECellTreeView *ectv, GdkDrawable *drawable, gboolean expanded, GdkRectangle *rect)
{
GdkPixbuf *image;
- int image_width, image_height;
+ gint image_width, image_height;
ECellTree *ect = E_CELL_TREE(ectv->cell_view.ecell);
image = expanded ? ect->open_pixbuf : ect->closed_pixbuf;
@@ -243,8 +243,8 @@ draw_expander (ECellTreeView *ectv, GdkDrawable *drawable, GtkExpanderStyle expa
*/
static void
ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
- int model_col, int view_col, int row, ECellFlags flags,
- int x1, int y1, int x2, int y2)
+ gint model_col, gint view_col, gint row, ECellFlags flags,
+ gint x1, gint y1, gint x2, gint y2)
{
ECellTreeView *tree_view = (ECellTreeView *)ecell_view;
ETreeModel *tree_model = e_cell_tree_get_tree_model(ecell_view->e_table_model, row);
@@ -256,14 +256,14 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
GdkColor *foreground;
gboolean selected;
- int offset, subcell_offset;
+ gint offset, subcell_offset;
selected = flags & E_CELL_SELECTED;
/* only draw the tree effects if we're the active sort */
if (/* XXX */ TRUE) {
GdkPixbuf *node_image;
- int node_image_width = 0, node_image_height = 0;
+ gint node_image_width = 0, node_image_height = 0;
ETreePath parent_node;
ETree *tree = E_TREE (canvas->parent);
@@ -307,7 +307,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
/* draw our lines */
if (tree_view->retro_look && E_CELL_TREE(tree_view->cell_view.ecell)->draw_lines) {
- int depth;
+ gint depth;
if (visible_depth_of_node (ecell_view->e_table_model, row) > 0
|| e_tree_model_node_get_children (tree_model, node, NULL) > 0)
@@ -428,7 +428,7 @@ event_in_expander (GdkEvent *event, gint offset, gint height)
* ECell::height method
*/
static int
-ect_height (ECellView *ecell_view, int model_col, int view_col, int row)
+ect_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
@@ -468,13 +468,13 @@ animate_expander (gpointer data)
* ECell::event method
*/
static gint
-ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions)
+ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row);
ETreeTableAdapter *etta = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row);
ETreePath node = e_cell_tree_get_node (ecell_view->e_table_model, row);
- int offset = offset_of_node (ecell_view->e_table_model, row);
+ gint offset = offset_of_node (ecell_view->e_table_model, row);
gint result;
switch (event->type) {
@@ -489,7 +489,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
gint tmp_row = row;
GdkRectangle area;
animate_closure_t *closure = g_new0 (animate_closure_t, 1);
- int hgt;
+ gint hgt;
e_table_item_get_cell_geometry (tree_view->cell_view.e_table_item_view,
&tmp_row, &view_col, &area.x, &area.y, NULL, &area.height);
@@ -568,14 +568,14 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
* ECell::max_width method
*/
static int
-ect_max_width (ECellView *ecell_view, int model_col, int view_col)
+ect_max_width (ECellView *ecell_view, gint model_col, gint view_col)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
- int row;
- int number_of_rows;
- int max_width = 0;
- int width = 0;
- int subcell_max_width = 0;
+ gint row;
+ gint number_of_rows;
+ gint max_width = 0;
+ gint width = 0;
+ gint subcell_max_width = 0;
gboolean per_row = e_cell_max_width_by_row_implemented (tree_view->subcell_view);
number_of_rows = e_table_model_row_count (ecell_view->e_table_model);
@@ -587,9 +587,9 @@ ect_max_width (ECellView *ecell_view, int model_col, int view_col)
ETreeModel *tree_model = e_cell_tree_get_tree_model(ecell_view->e_table_model, row);
ETreePath node;
GdkPixbuf *node_image;
- int node_image_width = 0;
+ gint node_image_width = 0;
- int offset, subcell_offset;
+ gint offset, subcell_offset;
#if 0
gboolean expanded, expandable;
ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row);
@@ -642,13 +642,13 @@ ect_max_width (ECellView *ecell_view, int model_col, int view_col)
* ECellView::show_tooltip method
*/
static void
-ect_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row,
- int col_width, ETableTooltip *tooltip)
+ect_show_tooltip (ECellView *ecell_view, gint model_col, gint view_col, gint row,
+ gint col_width, ETableTooltip *tooltip)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row);
ETreePath node = e_cell_tree_get_node (ecell_view->e_table_model, row);
- int offset = offset_of_node (ecell_view->e_table_model, row);
+ gint offset = offset_of_node (ecell_view->e_table_model, row);
GdkPixbuf *node_image;
node_image = e_tree_model_icon_at (tree_model, node);
@@ -662,8 +662,8 @@ ect_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row,
/*
* ECellView::get_bg_color method
*/
-static char *
-ect_get_bg_color (ECellView *ecell_view, int row)
+static gchar *
+ect_get_bg_color (ECellView *ecell_view, gint row)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
@@ -673,8 +673,8 @@ ect_get_bg_color (ECellView *ecell_view, int row)
/*
* ECellView::enter_edit method
*/
-static void *
-ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
+static gpointer
+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;
@@ -686,7 +686,7 @@ ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
* ECellView::leave_edit method
*/
static void
-ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *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;
@@ -696,7 +696,7 @@ ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, voi
static void
ect_print (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width, double height)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
@@ -708,14 +708,14 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row);
ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row);
ETreePath node = e_cell_tree_get_node (ecell_view->e_table_model, row);
- int offset = offset_of_node (ecell_view->e_table_model, row);
- int subcell_offset = offset;
+ gint offset = offset_of_node (ecell_view->e_table_model, row);
+ gint subcell_offset = offset;
gboolean expandable = e_tree_model_node_is_expandable (tree_model, node);
gboolean expanded = e_tree_table_adapter_node_is_expanded (tree_table_adapter, node);
/* draw our lines */
if (E_CELL_TREE(tree_view->cell_view.ecell)->draw_lines) {
- int depth;
+ gint depth;
if (!e_tree_model_node_is_root (tree_model, node)
|| e_tree_model_node_get_children (tree_model, node, NULL) > 0) {
@@ -791,7 +791,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
static gdouble
ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width)
{
return 12; /* XXX */
@@ -878,11 +878,11 @@ e_cell_tree_construct (ECellTree *ect,
if (open_pixbuf)
ect->open_pixbuf = open_pixbuf;
else
- ect->open_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)tree_expanded_xpm);
+ ect->open_pixbuf = gdk_pixbuf_new_from_xpm_data ((const gchar **)tree_expanded_xpm);
if (closed_pixbuf)
ect->closed_pixbuf = closed_pixbuf;
else
- ect->closed_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)tree_unexpanded_xpm);
+ ect->closed_pixbuf = gdk_pixbuf_new_from_xpm_data ((const gchar **)tree_unexpanded_xpm);
ect->draw_lines = draw_lines;
}
diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c
index 1fd770ab6a..cfd9ddde72 100644
--- a/widgets/table/e-cell-vbox.c
+++ b/widgets/table/e-cell-vbox.c
@@ -44,11 +44,11 @@ G_DEFINE_TYPE (ECellVbox, e_cell_vbox, E_CELL_TYPE)
* ECell::new_view method
*/
static ECellView *
-ecv_new_view (ECell *ecell, ETableModel *table_model, void *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);
- int i;
+ gint i;
vbox_view->cell_view.ecell = ecell;
vbox_view->cell_view.e_table_model = table_model;
@@ -76,7 +76,7 @@ static void
ecv_kill_view (ECellView *ecv)
{
ECellVboxView *vbox_view = (ECellVboxView *) ecv;
- int i;
+ gint i;
if (vbox_view->cell_view.kill_view_cb)
(vbox_view->cell_view.kill_view_cb)(ecv, vbox_view->cell_view.kill_view_cb_data);
@@ -100,7 +100,7 @@ static void
ecv_realize (ECellView *ecell_view)
{
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
- int i;
+ gint i;
/* realize our subcell view */
for (i = 0; i < vbox_view->subcell_view_count; i++)
@@ -117,7 +117,7 @@ static void
ecv_unrealize (ECellView *ecv)
{
ECellVboxView *vbox_view = (ECellVboxView *) ecv;
- int i;
+ gint i;
/* unrealize our subcell view. */
for (i = 0; i < vbox_view->subcell_view_count; i++)
@@ -132,18 +132,18 @@ ecv_unrealize (ECellView *ecv)
*/
static void
ecv_draw (ECellView *ecell_view, GdkDrawable *drawable,
- int model_col, int view_col, int row, ECellFlags flags,
- int x1, int y1, int x2, int y2)
+ gint model_col, gint view_col, gint row, ECellFlags flags,
+ gint x1, gint y1, gint x2, gint y2)
{
ECellVboxView *vbox_view = (ECellVboxView *)ecell_view;
- int subcell_offset = 0;
- int i;
+ gint subcell_offset = 0;
+ gint i;
for (i = 0; i < vbox_view->subcell_view_count; i++) {
/* Now cause our subcells to draw their contents,
shifted by subcell_offset pixels */
- int height = e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row);
+ gint height = e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row);
e_cell_draw (vbox_view->subcell_views[i], drawable,
vbox_view->model_cols[i], view_col, row, flags,
x1, y1 + subcell_offset, x2, y1 + subcell_offset + height);
@@ -156,12 +156,12 @@ ecv_draw (ECellView *ecell_view, GdkDrawable *drawable,
* ECell::event method
*/
static gint
-ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int 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;
- int y = 0;
- int i;
- int subcell_offset = 0;
+ gint y = 0;
+ gint i;
+ gint subcell_offset = 0;
switch (event->type) {
case GDK_BUTTON_PRESS:
@@ -180,7 +180,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
for (i = 0; i < vbox_view->subcell_view_count; i++) {
- int height = e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row);
+ gint height = e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row);
if (y < subcell_offset + height)
return e_cell_event(vbox_view->subcell_views[i], event, vbox_view->model_cols[i], view_col, row, flags, actions);
subcell_offset += height;
@@ -192,11 +192,11 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
* ECell::height method
*/
static int
-ecv_height (ECellView *ecell_view, int model_col, int view_col, int row)
+ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
ECellVboxView *vbox_view = (ECellVboxView *)ecell_view;
- int height = 0;
- int i;
+ gint height = 0;
+ gint i;
for (i = 0; i < vbox_view->subcell_view_count; i++) {
height += e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row);
@@ -208,14 +208,14 @@ ecv_height (ECellView *ecell_view, int model_col, int view_col, int row)
* ECell::max_width method
*/
static int
-ecv_max_width (ECellView *ecell_view, int model_col, int view_col)
+ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col)
{
ECellVboxView *vbox_view = (ECellVboxView *)ecell_view;
- int max_width = 0;
- int i;
+ gint max_width = 0;
+ gint i;
for (i = 0; i < vbox_view->subcell_view_count; i++) {
- int width = e_cell_max_width (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col);
+ gint width = e_cell_max_width (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col);
max_width = MAX(width, max_width);
}
@@ -227,13 +227,13 @@ ecv_max_width (ECellView *ecell_view, int model_col, int view_col)
* ECellView::show_tooltip method
*/
static void
-ecv_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row,
- int col_width, ETableTooltip *tooltip)
+ecv_show_tooltip (ECellView *ecell_view, gint model_col, gint view_col, gint row,
+ gint col_width, ETableTooltip *tooltip)
{
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
EVboxModel *vbox_model = e_cell_vbox_get_vbox_model (ecell_view->e_table_model, row);
EVboxPath node = e_cell_vbox_get_node (ecell_view->e_table_model, row);
- int offset = offset_of_node (ecell_view->e_table_model, row);
+ gint offset = offset_of_node (ecell_view->e_table_model, row);
GdkPixbuf *node_image;
node_image = e_vbox_model_icon_at (vbox_model, node);
@@ -247,8 +247,8 @@ ecv_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row,
/*
* ECellView::get_bg_color method
*/
-static char *
-ecv_get_bg_color (ECellView *ecell_view, int row)
+static gchar *
+ecv_get_bg_color (ECellView *ecell_view, gint row)
{
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
@@ -258,8 +258,8 @@ ecv_get_bg_color (ECellView *ecell_view, int row)
/*
* ECellView::enter_edit method
*/
-static void *
-ecv_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
+static gpointer
+ecv_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
/* just defer to our subcell's view */
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
@@ -271,7 +271,7 @@ ecv_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
* ECellView::leave_edit method
*/
static void
-ecv_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context)
+ecv_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context)
{
/* just defer to our subcell's view */
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
@@ -281,7 +281,7 @@ ecv_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, voi
static void
ecv_print (ECellView *ecell_view, GnomePrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width, double height)
{
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
@@ -290,14 +290,14 @@ ecv_print (ECellView *ecell_view, GnomePrintContext *context,
EVboxModel *vbox_model = e_cell_vbox_get_vbox_model (ecell_view->e_table_model, row);
EVboxTableAdapter *vbox_table_adapter = e_cell_vbox_get_vbox_table_adapter(ecell_view->e_table_model, row);
EVboxPath node = e_cell_vbox_get_node (ecell_view->e_table_model, row);
- int offset = offset_of_node (ecell_view->e_table_model, row);
- int subcell_offset = offset;
+ gint offset = offset_of_node (ecell_view->e_table_model, row);
+ gint subcell_offset = offset;
gboolean expandable = e_vbox_model_node_is_expandable (vbox_model, node);
gboolean expanded = e_vbox_table_adapter_node_is_expanded (vbox_table_adapter, node);
/* draw our lines */
if (E_CELL_VBOX(vbox_view->cell_view.ecell)->draw_lines) {
- int depth;
+ gint depth;
if (!e_vbox_model_node_is_root (vbox_model, node)
|| e_vbox_model_node_get_children (vbox_model, node, NULL) > 0) {
@@ -348,7 +348,7 @@ ecv_print (ECellView *ecell_view, GnomePrintContext *context,
GdkPixbuf *image = (expanded
? E_CELL_VBOX(vbox_view->cell_view.ecell)->open_pixbuf
: E_CELL_VBOX(vbox_view->cell_view.ecell)->closed_pixbuf);
- int image_width, image_height, image_rowstride;
+ gint image_width, image_height, image_rowstride;
guchar *image_pixels;
image_width = gdk_pixbuf_get_width(image);
@@ -379,7 +379,7 @@ ecv_print (ECellView *ecell_view, GnomePrintContext *context,
static gdouble
ecv_print_height (ECellView *ecell_view, GnomePrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width)
{
return 12; /* XXX */
@@ -393,7 +393,7 @@ static void
ecv_dispose (GObject *object)
{
ECellVbox *ecv = E_CELL_VBOX (object);
- int i;
+ gint i;
/* destroy our subcell */
for (i = 0; i < ecv->subcell_count; i++)
@@ -473,7 +473,7 @@ e_cell_vbox_new (void)
}
void
-e_cell_vbox_append (ECellVbox *vbox, ECell *subcell, int model_col)
+e_cell_vbox_append (ECellVbox *vbox, ECell *subcell, gint model_col)
{
vbox->subcell_count ++;
diff --git a/widgets/table/e-cell-vbox.h b/widgets/table/e-cell-vbox.h
index ae774dbb7c..58aa523c58 100644
--- a/widgets/table/e-cell-vbox.h
+++ b/widgets/table/e-cell-vbox.h
@@ -43,16 +43,16 @@ G_BEGIN_DECLS
typedef struct {
ECell parent;
- int subcell_count;
+ gint subcell_count;
ECell **subcells;
- int *model_cols;
+ gint *model_cols;
} ECellVbox;
typedef struct {
ECellView cell_view;
- int subcell_view_count;
+ gint subcell_view_count;
ECellView **subcell_views;
- int *model_cols;
+ gint *model_cols;
} ECellVboxView;
typedef struct {
@@ -63,7 +63,7 @@ GType e_cell_vbox_get_type (void);
ECell *e_cell_vbox_new (void);
void e_cell_vbox_append (ECellVbox *vbox,
ECell *subcell,
- int model_col);
+ gint model_col);
G_END_DECLS
diff --git a/widgets/table/e-cell.c b/widgets/table/e-cell.c
index 41ffe86685..1152a42e1a 100644
--- a/widgets/table/e-cell.c
+++ b/widgets/table/e-cell.c
@@ -33,7 +33,7 @@ G_DEFINE_TYPE (ECell, e_cell, GTK_TYPE_OBJECT)
#define ECVIEW_EC_CLASS(v) (E_CELL_GET_CLASS (v->ecell))
static ECellView *
-ec_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
+ec_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view)
{
return NULL;
}
@@ -55,14 +55,14 @@ ec_unrealize (ECellView *e_cell)
static void
ec_draw (ECellView *ecell_view, GdkDrawable *drawable,
- int model_col, int view_col, int row, ECellFlags flags,
- int x1, int y1, int x2, int y2)
+ 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, int model_col, int view_col, int 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");
@@ -70,7 +70,7 @@ ec_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, i
}
static gint
-ec_height (ECellView *ecell_view, int model_col, int view_col, int row)
+ec_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
g_critical ("e-cell-height invoked");
@@ -78,7 +78,7 @@ ec_height (ECellView *ecell_view, int model_col, int view_col, int row)
}
static void
-ec_focus (ECellView *ecell_view, int model_col, int view_col, int row, int x1, int y1, int x2, int 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;
@@ -99,35 +99,35 @@ ec_unfocus (ECellView *ecell_view)
ecell_view->focus_y2 = -1;
}
-static void *
-ec_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
+static gpointer
+ec_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
return NULL;
}
static void
-ec_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *context)
+ec_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context)
{
}
-static void *
-ec_save_state (ECellView *ecell_view, int model_col, int view_col, int row, void *context)
+static gpointer
+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, int model_col, int view_col, int row, void *context, void *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, int model_col, int view_col, int row, void *save_state)
+ec_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state)
{
}
static void
-ec_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row, int col_width, ETableTooltip *tooltip)
+ec_show_tooltip (ECellView *ecell_view, gint model_col, gint view_col, gint row, gint col_width, ETableTooltip *tooltip)
{
/* Do nothing */
}
@@ -176,7 +176,7 @@ e_cell_init (ECell *cell)
* Returns: processing state from the GdkEvent handling.
*/
gint
-e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int 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);
@@ -198,7 +198,7 @@ e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_co
* 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, void *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);
@@ -265,8 +265,8 @@ e_cell_unrealize (ECellView *ecell_view)
*/
void
e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable,
- int model_col, int view_col, int row, ECellFlags flags,
- int x1, int y1, int x2, int y2)
+ 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);
@@ -289,7 +289,7 @@ e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable,
*/
void
e_cell_print (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width, double height)
{
if (ECVIEW_EC_CLASS(ecell_view)->print)
@@ -303,7 +303,7 @@ e_cell_print (ECellView *ecell_view, GtkPrintContext *context,
*/
gdouble
e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
double width)
{
if (ECVIEW_EC_CLASS(ecell_view)->print_height)
@@ -323,8 +323,8 @@ e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context,
* Returns: the height of the cell at @model_col, @row rendered at
* @view_col, @row.
*/
-int
-e_cell_height (ECellView *ecell_view, int model_col, int view_col, int row)
+gint
+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);
}
@@ -339,8 +339,8 @@ e_cell_height (ECellView *ecell_view, int model_col, int view_col, int row)
* Notifies the ECellView that it is about to enter editing mode for
* @model_col, @row rendered at @view_col, @row.
*/
-void *
-e_cell_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
+gpointer
+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 +357,7 @@ e_cell_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
* rendered at @view_col, @row.
*/
void
-e_cell_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *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);
}
@@ -372,12 +372,12 @@ e_cell_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row,
*
* Returns: The save state.
*
- * Requests that the ECellView return a void * representing the state
+ * Requests that the ECellView return a gpointer representing the state
* of the ECell. This is primarily intended for things like selection
* or scrolling.
*/
-void *
-e_cell_save_state (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context)
+gpointer
+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 +397,7 @@ e_cell_save_state (ECellView *ecell_view, int model_col, int view_col, int row,
* Requests that the ECellView load from the given save state.
*/
void
-e_cell_load_state (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context, void *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 +415,7 @@ e_cell_load_state (ECellView *ecell_view, int model_col, int view_col, int row,
* Requests that the ECellView free the given save state.
*/
void
-e_cell_free_state (ECellView *ecell_view, int model_col, int view_col, int row, void *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);
@@ -430,8 +430,8 @@ e_cell_free_state (ECellView *ecell_view, int model_col, int view_col, int row,
* Returns: the maximum width for the ECellview at @model_col which
* is being rendered as @view_col
*/
-int
-e_cell_max_width (ECellView *ecell_view, int model_col, int view_col)
+gint
+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);
@@ -447,8 +447,8 @@ e_cell_max_width (ECellView *ecell_view, int model_col, int view_col)
* Returns: the maximum width for the ECellview at @model_col which
* is being rendered as @view_col for the data in @row.
*/
-int
-e_cell_max_width_by_row (ECellView *ecell_view, int model_col, int view_col, int row)
+gint
+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,15 +474,15 @@ e_cell_max_width_by_row_implemented (ECellView *ecell_view)
}
void
-e_cell_show_tooltip (ECellView *ecell_view, int model_col, int view_col,
- int row, int col_width, ETableTooltip *tooltip)
+e_cell_show_tooltip (ECellView *ecell_view, gint model_col, gint view_col,
+ gint row, gint col_width, ETableTooltip *tooltip)
{
ECVIEW_EC_CLASS(ecell_view)->show_tooltip
(ecell_view, model_col, view_col, row, col_width, tooltip);
}
gchar *
-e_cell_get_bg_color(ECellView *ecell_view, int 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);
diff --git a/widgets/table/e-cell.h b/widgets/table/e-cell.h
index 5a0005095e..614e1ebe0e 100644
--- a/widgets/table/e-cell.h
+++ b/widgets/table/e-cell.h
@@ -38,7 +38,7 @@ G_BEGIN_DECLS
#define E_IS_CELL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_CELL_TYPE))
typedef gboolean (*ETableSearchFunc) (gconstpointer haystack,
- const char *needle);
+ const gchar *needle);
typedef enum {
E_CELL_SELECTED = 1 << 0,
@@ -87,35 +87,35 @@ typedef struct _ECellView {
typedef struct {
GtkObjectClass parent_class;
- ECellView *(*new_view) (ECell *ecell, ETableModel *table_model, void *e_table_item_view);
+ ECellView *(*new_view) (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view);
void (*kill_view) (ECellView *ecell_view);
void (*realize) (ECellView *ecell_view);
void (*unrealize) (ECellView *ecell_view);
void (*draw) (ECellView *ecell_view, GdkDrawable *drawable,
- int model_col, int view_col, int row,
- ECellFlags flags, int x1, int y1, int x2, int y2);
- gint (*event) (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions);
- void (*focus) (ECellView *ecell_view, int model_col, int view_col,
- int row, int x1, int y1, int x2, int y2);
+ gint model_col, gint view_col, gint row,
+ ECellFlags flags, gint x1, gint y1, gint x2, gint y2);
+ gint (*event) (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions);
+ void (*focus) (ECellView *ecell_view, gint model_col, gint view_col,
+ gint row, gint x1, gint y1, gint x2, gint y2);
void (*unfocus) (ECellView *ecell_view);
- int (*height) (ECellView *ecell_view, int model_col, int view_col, int row);
+ gint (*height) (ECellView *ecell_view, gint model_col, gint view_col, gint row);
- void *(*enter_edit) (ECellView *ecell_view, int model_col, int view_col, int row);
- void (*leave_edit) (ECellView *ecell_view, int model_col, int view_col, int row, void *context);
- void *(*save_state) (ECellView *ecell_view, int model_col, int view_col, int row, void *context);
- void (*load_state) (ECellView *ecell_view, int model_col, int view_col, int row, void *context, void *save_state);
- void (*free_state) (ECellView *ecell_view, int model_col, int view_col, int row, void *save_state);
+ void *(*enter_edit) (ECellView *ecell_view, gint model_col, gint view_col, gint row);
+ void (*leave_edit) (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context);
+ void *(*save_state) (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context);
+ void (*load_state) (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context, gpointer save_state);
+ void (*free_state) (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state);
void (*print) (ECellView *ecell_view, GtkPrintContext *context,
- int model_col, int view_col, int row,
+ gint model_col, gint view_col, gint row,
gdouble width, gdouble height);
gdouble (*print_height) (ECellView *ecell_view,GtkPrintContext *context,
- int model_col, int view_col, int row, gdouble width);
- int (*max_width) (ECellView *ecell_view, int model_col, int view_col);
- int (*max_width_by_row) (ECellView *ecell_view, int model_col, int view_col, int row);
- void (*show_tooltip) (ECellView *ecell_view, int model_col, int view_col, int row, int col_width, ETableTooltip *tooltip);
- gchar *(*get_bg_color) (ECellView *ecell_view, int row);
+ gint model_col, gint view_col, gint row, gdouble width);
+ gint (*max_width) (ECellView *ecell_view, gint model_col, gint view_col);
+ gint (*max_width_by_row) (ECellView *ecell_view, gint model_col, gint view_col, gint row);
+ void (*show_tooltip) (ECellView *ecell_view, gint model_col, gint view_col, gint row, gint col_width, ETableTooltip *tooltip);
+ gchar *(*get_bg_color) (ECellView *ecell_view, gint row);
void (*style_set) (ECellView *ecell_view, GtkStyle *previous_style);
} ECellClass;
@@ -131,92 +131,92 @@ void e_cell_kill_view (ECellView *ecell_view);
/* Cell View methods. */
gint e_cell_event (ECellView *ecell_view,
GdkEvent *event,
- int model_col,
- int view_col,
- int row,
+ gint model_col,
+ gint view_col,
+ gint row,
ECellFlags flags,
ECellActions *actions);
void e_cell_realize (ECellView *ecell_view);
void e_cell_unrealize (ECellView *ecell_view);
void e_cell_draw (ECellView *ecell_view,
GdkDrawable *drawable,
- int model_col,
- int view_col,
- int row,
+ gint model_col,
+ gint view_col,
+ gint row,
ECellFlags flags,
- int x1,
- int y1,
- int x2,
- int y2);
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2);
void e_cell_print (ECellView *ecell_view,
GtkPrintContext *context,
- int model_col,
- int view_col,
- int row,
+ gint model_col,
+ gint view_col,
+ gint row,
double width,
double height);
gdouble e_cell_print_height (ECellView *ecell_view,
GtkPrintContext *context,
- int model_col,
- int view_col,
- int row,
+ gint model_col,
+ gint view_col,
+ gint row,
gdouble width);
-int e_cell_max_width (ECellView *ecell_view,
- int model_col,
- int view_col);
-int e_cell_max_width_by_row (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row);
+gint e_cell_max_width (ECellView *ecell_view,
+ gint model_col,
+ gint view_col);
+gint e_cell_max_width_by_row (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row);
gboolean e_cell_max_width_by_row_implemented (ECellView *ecell_view);
void e_cell_show_tooltip (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row,
- int col_width,
+ gint model_col,
+ gint view_col,
+ gint row,
+ gint col_width,
ETableTooltip *tooltip);
gchar *e_cell_get_bg_color (ECellView *ecell_view,
- int row);
+ gint row);
void e_cell_style_set (ECellView *ecell_view,
GtkStyle *previous_style);
void e_cell_focus (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row,
- int x1,
- int y1,
- int x2,
- int y2);
+ gint model_col,
+ gint view_col,
+ gint row,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2);
void e_cell_unfocus (ECellView *ecell_view);
-int e_cell_height (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row);
+gint e_cell_height (ECellView *ecell_view,
+ gint model_col,
+ gint view_col,
+ gint row);
void *e_cell_enter_edit (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row);
+ gint model_col,
+ gint view_col,
+ gint row);
void e_cell_leave_edit (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row,
+ gint model_col,
+ gint view_col,
+ gint row,
void *edit_context);
void *e_cell_save_state (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row,
+ gint model_col,
+ gint view_col,
+ gint row,
void *edit_context);
void e_cell_load_state (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row,
+ gint model_col,
+ gint view_col,
+ gint row,
void *edit_context,
void *state);
void e_cell_free_state (ECellView *ecell_view,
- int model_col,
- int view_col,
- int row,
+ gint model_col,
+ gint view_col,
+ gint row,
void *state);
G_END_DECLS
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 879b8c34af..10a0ba8223 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -314,7 +314,7 @@ etcta_unrealize (GnomeCanvasItem *item)
static void finish_editing (ETableClickToAdd *etcta);
static int
-item_key_press (ETableItem *item, int row, int col, GdkEvent *event, ETableClickToAdd *etcta)
+item_key_press (ETableItem *item, gint row, gint col, GdkEvent *event, ETableClickToAdd *etcta)
{
switch (event->key.keyval) {
case GDK_Return:
@@ -451,7 +451,7 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
}
static void
-etcta_reflow (GnomeCanvasItem *item, int flags)
+etcta_reflow (GnomeCanvasItem *item, gint flags)
{
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
diff --git a/widgets/table/e-table-click-to-add.h b/widgets/table/e-table-click-to-add.h
index 31dded1989..17ac7f7fe3 100644
--- a/widgets/table/e-table-click-to-add.h
+++ b/widgets/table/e-table-click-to-add.h
@@ -46,7 +46,7 @@ typedef struct {
ETableModel *model; /* The backend model. */
ETableHeader *eth; /* This is just to give to the ETableItem. */
- char *message;
+ gchar *message;
GnomeCanvasItem *row; /* If row is NULL, we're sitting with no data and a "Click here" message. */
GnomeCanvasItem *text; /* If text is NULL, row shouldn't be. */
diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c
index d844f53c45..de1cc48b18 100644
--- a/widgets/table/e-table-col.c
+++ b/widgets/table/e-table-col.c
@@ -139,8 +139,8 @@ e_table_col_init (ETableCol *etc)
* Returns: the newly created ETableCol object.
*/
ETableCol *
-e_table_col_new (int col_idx, const char *text, double expansion, int min_width,
- ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, int priority)
+e_table_col_new (gint col_idx, const gchar *text, double expansion, gint min_width,
+ ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, gint priority)
{
ETableCol *etc;
@@ -200,8 +200,8 @@ e_table_col_new (int col_idx, const char *text, double expansion, int min_width,
* Returns: the newly created ETableCol object.
*/
ETableCol *
-e_table_col_new_with_pixbuf (int col_idx, const char *text, GdkPixbuf *pixbuf, double expansion, int min_width,
- ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, int priority)
+e_table_col_new_with_pixbuf (gint col_idx, const gchar *text, GdkPixbuf *pixbuf, double expansion, gint min_width,
+ ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, gint priority)
{
ETableCol *etc;
diff --git a/widgets/table/e-table-col.h b/widgets/table/e-table-col.h
index f7d892d317..8e514675d5 100644
--- a/widgets/table/e-table-col.h
+++ b/widgets/table/e-table-col.h
@@ -47,23 +47,23 @@ typedef enum {
*/
typedef struct {
GObject base;
- char *text;
+ gchar *text;
GdkPixbuf *pixbuf;
- int min_width;
- int width;
+ gint min_width;
+ gint width;
double expansion;
short x;
GCompareFunc compare;
ETableSearchFunc search;
- unsigned int is_pixbuf:1;
- unsigned int selected:1;
- unsigned int resizable:1;
- unsigned int disabled:1;
- unsigned int sortable:1;
- unsigned int groupable:1;
- int col_idx;
- int compare_col;
- int priority;
+ guint is_pixbuf:1;
+ guint selected:1;
+ guint resizable:1;
+ guint disabled:1;
+ guint sortable:1;
+ guint groupable:1;
+ gint col_idx;
+ gint compare_col;
+ gint priority;
GtkJustification justification;
@@ -75,25 +75,25 @@ typedef struct {
} ETableColClass;
GType e_table_col_get_type (void);
-ETableCol *e_table_col_new (int col_idx,
- const char *text,
+ETableCol *e_table_col_new (gint col_idx,
+ const gchar *text,
double expansion,
- int min_width,
+ gint min_width,
ECell *ecell,
GCompareFunc compare,
gboolean resizable,
gboolean disabled,
- int priority);
-ETableCol *e_table_col_new_with_pixbuf (int col_idx,
- const char *text,
+ gint priority);
+ETableCol *e_table_col_new_with_pixbuf (gint col_idx,
+ const gchar *text,
GdkPixbuf *pixbuf,
double expansion,
- int min_width,
+ gint min_width,
ECell *ecell,
GCompareFunc compare,
gboolean resizable,
gboolean disabled,
- int priority);
+ gint priority);
G_END_DECLS
diff --git a/widgets/table/e-table-column-specification.c b/widgets/table/e-table-column-specification.c
index c48451587f..0f6acd7fc6 100644
--- a/widgets/table/e-table-column-specification.c
+++ b/widgets/table/e-table-column-specification.c
@@ -106,21 +106,21 @@ e_table_column_specification_load_from_node (ETableColumnSpecification *etcs,
{
free_strings(etcs);
- etcs->model_col = e_xml_get_integer_prop_by_name (node, (const unsigned char *)"model_col");
- etcs->compare_col = e_xml_get_integer_prop_by_name_with_default (node, (const unsigned char *)"compare_col", etcs->model_col);
- etcs->title = e_xml_get_string_prop_by_name (node, (const unsigned char *)"_title");
- etcs->pixbuf = e_xml_get_string_prop_by_name (node, (const unsigned char *)"pixbuf");
-
- etcs->expansion = e_xml_get_double_prop_by_name (node, (const unsigned char *)"expansion");
- etcs->minimum_width = e_xml_get_integer_prop_by_name (node, (const unsigned char *)"minimum_width");
- etcs->resizable = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"resizable");
- etcs->disabled = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"disabled");
-
- etcs->cell = e_xml_get_string_prop_by_name (node, (const unsigned char *)"cell");
- etcs->compare = e_xml_get_string_prop_by_name (node, (const unsigned char *)"compare");
- etcs->search = e_xml_get_string_prop_by_name (node, (const unsigned char *)"search");
- etcs->sortable = e_xml_get_string_prop_by_name (node, (const unsigned char *)"sortable");
- etcs->priority = e_xml_get_integer_prop_by_name_with_default (node, (const unsigned char *)"priority", 0);
+ etcs->model_col = e_xml_get_integer_prop_by_name (node, (const guchar *)"model_col");
+ etcs->compare_col = e_xml_get_integer_prop_by_name_with_default (node, (const guchar *)"compare_col", etcs->model_col);
+ etcs->title = e_xml_get_string_prop_by_name (node, (const guchar *)"_title");
+ etcs->pixbuf = e_xml_get_string_prop_by_name (node, (const guchar *)"pixbuf");
+
+ etcs->expansion = e_xml_get_double_prop_by_name (node, (const guchar *)"expansion");
+ etcs->minimum_width = e_xml_get_integer_prop_by_name (node, (const guchar *)"minimum_width");
+ etcs->resizable = e_xml_get_bool_prop_by_name (node, (const guchar *)"resizable");
+ etcs->disabled = e_xml_get_bool_prop_by_name (node, (const guchar *)"disabled");
+
+ etcs->cell = e_xml_get_string_prop_by_name (node, (const guchar *)"cell");
+ etcs->compare = e_xml_get_string_prop_by_name (node, (const guchar *)"compare");
+ etcs->search = e_xml_get_string_prop_by_name (node, (const guchar *)"search");
+ etcs->sortable = e_xml_get_string_prop_by_name (node, (const guchar *)"sortable");
+ etcs->priority = e_xml_get_integer_prop_by_name_with_default (node, (const guchar *)"priority", 0);
if (etcs->title == NULL)
etcs->title = g_strdup("");
@@ -132,26 +132,26 @@ e_table_column_specification_save_to_node (ETableColumnSpecification *specificat
{
xmlNode *node;
if (parent)
- node = xmlNewChild(parent, NULL, (const unsigned char *)"ETableColumn", NULL);
+ node = xmlNewChild(parent, NULL, (const guchar *)"ETableColumn", NULL);
else
- node = xmlNewNode(NULL, (const unsigned char *)"ETableColumn");
+ node = xmlNewNode(NULL, (const guchar *)"ETableColumn");
- e_xml_set_integer_prop_by_name(node, (const unsigned char *)"model_col", specification->model_col);
+ e_xml_set_integer_prop_by_name(node, (const guchar *)"model_col", specification->model_col);
if (specification->compare_col != specification->model_col)
- e_xml_set_integer_prop_by_name(node, (const unsigned char *)"compare_col", specification->compare_col);
- e_xml_set_string_prop_by_name(node, (const unsigned char *)"_title", specification->title);
- e_xml_set_string_prop_by_name(node, (const unsigned char *)"pixbuf", specification->pixbuf);
-
- e_xml_set_double_prop_by_name(node, (const unsigned char *)"expansion", specification->expansion);
- e_xml_set_integer_prop_by_name(node, (const unsigned char *)"minimum_width", specification->minimum_width);
- e_xml_set_bool_prop_by_name(node, (const unsigned char *)"resizable", specification->resizable);
- e_xml_set_bool_prop_by_name(node, (const unsigned char *)"disabled", specification->disabled);
-
- e_xml_set_string_prop_by_name(node, (const unsigned char *)"cell", specification->cell);
- e_xml_set_string_prop_by_name(node, (const unsigned char *)"compare", specification->compare);
- e_xml_set_string_prop_by_name(node, (const unsigned char *)"search", specification->search);
+ e_xml_set_integer_prop_by_name(node, (const guchar *)"compare_col", specification->compare_col);
+ e_xml_set_string_prop_by_name(node, (const guchar *)"_title", specification->title);
+ e_xml_set_string_prop_by_name(node, (const guchar *)"pixbuf", specification->pixbuf);
+
+ e_xml_set_double_prop_by_name(node, (const guchar *)"expansion", specification->expansion);
+ e_xml_set_integer_prop_by_name(node, (const guchar *)"minimum_width", specification->minimum_width);
+ e_xml_set_bool_prop_by_name(node, (const guchar *)"resizable", specification->resizable);
+ e_xml_set_bool_prop_by_name(node, (const guchar *)"disabled", specification->disabled);
+
+ e_xml_set_string_prop_by_name(node, (const guchar *)"cell", specification->cell);
+ e_xml_set_string_prop_by_name(node, (const guchar *)"compare", specification->compare);
+ e_xml_set_string_prop_by_name(node, (const guchar *)"search", specification->search);
if (specification->priority != 0)
- e_xml_set_integer_prop_by_name (node, (const unsigned char *)"priority", specification->priority);
+ e_xml_set_integer_prop_by_name (node, (const guchar *)"priority", specification->priority);
return node;
}
diff --git a/widgets/table/e-table-column-specification.h b/widgets/table/e-table-column-specification.h
index 688e194825..7ea6f23dc4 100644
--- a/widgets/table/e-table-column-specification.h
+++ b/widgets/table/e-table-column-specification.h
@@ -38,21 +38,21 @@ G_BEGIN_DECLS
typedef struct {
GObject base;
- int model_col;
- int compare_col;
- char *title;
- char *pixbuf;
+ gint model_col;
+ gint compare_col;
+ gchar *title;
+ gchar *pixbuf;
double expansion;
- int minimum_width;
+ gint minimum_width;
guint resizable : 1;
guint disabled : 1;
- char *cell;
- char *compare;
- char *search;
- char *sortable;
- int priority;
+ gchar *cell;
+ gchar *compare;
+ gchar *search;
+ gchar *sortable;
+ gint priority;
} ETableColumnSpecification;
typedef struct {
diff --git a/widgets/table/e-table-column.c b/widgets/table/e-table-column.c
index d2180d88e5..0969a79410 100644
--- a/widgets/table/e-table-column.c
+++ b/widgets/table/e-table-column.c
@@ -38,7 +38,7 @@ static void
e_table_column_finalize (GObject *object)
{
ETableColumn *etc = E_TABLE_COLUMN (object);
- const int cols = etc->col_count;
+ const gint cols = etc->col_count;
/*
* Destroy listeners
@@ -82,7 +82,7 @@ e_table_column_class_init (GtkObjectClass *object_class)
}
static void
-etc_do_insert (ETableColumn *etc, int pos, ETableCol *val)
+etc_do_insert (ETableColumn *etc, gint pos, ETableCol *val)
{
memcpy (&etc->columns [pos+1], &etc->columns [pos],
sizeof (ETableCol *) * (etc->col_count - pos));
@@ -90,7 +90,7 @@ etc_do_insert (ETableColumn *etc, int pos, ETableCol *val)
}
void
-e_table_column_add_column (ETableColumn *etc, ETableCol *tc, int pos)
+e_table_column_add_column (ETableColumn *etc, ETableCol *tc, gint pos)
{
ETableCol **new_ptr;
@@ -109,7 +109,7 @@ e_table_column_add_column (ETableColumn *etc, ETableCol *tc, int pos)
}
ETableCol *
-e_table_column_get_column (ETableColumn *etc, int column)
+e_table_column_get_column (ETableColumn *etc, gint column)
{
g_return_val_if_fail (etc != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), NULL);
@@ -123,7 +123,7 @@ e_table_column_get_column (ETableColumn *etc, int column)
return etc->columns [column];
}
-int
+gint
e_table_column_count (ETableColumn *etc)
{
g_return_val_if_fail (etc != NULL, 0);
@@ -132,10 +132,10 @@ e_table_column_count (ETableColumn *etc)
return etc->col_count;
}
-int
-e_table_column_index (ETableColumn *etc, const char *identifier)
+gint
+e_table_column_index (ETableColumn *etc, const gchar *identifier)
{
- int i;
+ gint i;
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
@@ -151,10 +151,10 @@ e_table_column_index (ETableColumn *etc, const char *identifier)
return -1;
}
-int
-e_table_column_get_index_at (ETableColumn *etc, int x_offset)
+gint
+e_table_column_get_index_at (ETableColumn *etc, gint x_offset)
{
- int i, total;
+ gint i, total;
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
@@ -175,7 +175,7 @@ ETableCol **
e_table_column_get_columns (ETableColumn *etc)
{
ETableCol **ret;
- int i;
+ gint i;
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
@@ -196,11 +196,11 @@ e_table_column_selection_ok (ETableColumn *etc)
return etc->selectable;
}
-int
+gint
ve_table_column_get_selected (ETableColumn *etc)
{
- int i;
- int selected = 0;
+ gint i;
+ gint selected = 0;
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
@@ -213,10 +213,10 @@ ve_table_column_get_selected (ETableColumn *etc)
return selected;
}
-int
+gint
e_table_column_total_width (ETableColumn *etc)
{
- int total;
+ gint total;
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
@@ -229,7 +229,7 @@ e_table_column_total_width (ETableColumn *etc)
}
static void
-etc_do_remove (ETableColumn *etc, int idx)
+etc_do_remove (ETableColumn *etc, gint idx)
{
memcpy (&etc->columns [idx], &etc->columns [idx+1],
sizeof (ETableCol *) * etc->col_count - idx);
@@ -237,7 +237,7 @@ etc_do_remove (ETableColumn *etc, int idx)
}
void
-e_table_column_move (ETableColumn *etc, int source_index, int target_index)
+e_table_column_move (ETableColumn *etc, gint source_index, gint target_index)
{
g_return_if_fail (etc != NULL);
g_return_if_fail (E_IS_TABLE_COLUMN (etc));
@@ -253,7 +253,7 @@ e_table_column_move (ETableColumn *etc, int source_index, int target_index)
}
void
-e_table_column_remove (ETableColumn *etc, int idx)
+e_table_column_remove (ETableColumn *etc, gint idx)
{
g_return_if_fail (etc != NULL);
g_return_if_fail (E_IS_TABLE_COLUMN (etc));
@@ -270,7 +270,7 @@ e_table_column_set_selection (ETableColumn *etc, gboolean allow_selection);
}
void
-e_table_column_set_size (ETableColumn *etc, int idx, int size)
+e_table_column_set_size (ETableColumn *etc, gint idx, gint size)
{
g_return_if_fail (etc != NULL);
g_return_if_fail (E_IS_TABLE_COLUMN (etc));
diff --git a/widgets/table/e-table-config-field.c b/widgets/table/e-table-config-field.c
index 6d3e5611da..0fd82bf0ed 100644
--- a/widgets/table/e-table-config-field.c
+++ b/widgets/table/e-table-config-field.c
@@ -120,7 +120,7 @@ etcf_truncate (ETableConfigField *etcf)
static void
etcf_set_sensitivity(ETableConfigField *etcf)
{
- int count = etcf_get_count(etcf);
+ gint count = etcf_get_count(etcf);
if (etcf->n >= count) {
gtk_widget_set_sensitive(etcf->radio_ascending, FALSE);
@@ -138,7 +138,7 @@ etcf_set_sensitivity(ETableConfigField *etcf)
static void
toggled(GtkWidget *widget, ETableConfigField *etcf)
{
- int count;
+ gint count;
count = etcf_get_count(etcf);
if (count > etcf->n) {
@@ -176,11 +176,11 @@ changed(GtkWidget *widget, ETableConfigField *etcf)
static void
etcf_setup(ETableConfigField *etcf)
{
- int count;
+ gint count;
GList *list = NULL;
ETableColumnSpecification **column;
ETableColumnSpecification *chosen_column = NULL;
- int model_col = -1;
+ gint model_col = -1;
etcf_set_sensitivity(etcf);
@@ -228,7 +228,7 @@ e_table_config_field_construct_nth (ETableConfigField *etcf,
ETableSpecification *spec,
ETableSortInfo *sort_info,
gboolean grouping,
- int n)
+ gint n)
{
GtkWidget *frame;
GtkWidget *internal_hbox;
diff --git a/widgets/table/e-table-config-field.h b/widgets/table/e-table-config-field.h
index 9fbd21d694..eb13da90ab 100644
--- a/widgets/table/e-table-config-field.h
+++ b/widgets/table/e-table-config-field.h
@@ -41,7 +41,7 @@ typedef struct {
ETableSpecification *spec;
ETableSortInfo *sort_info;
guint grouping : 1;
- int n;
+ gint n;
GtkWidget *combo;
GtkWidget *radio_ascending;
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 06f98066bb..23ff88d2bd 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -233,7 +233,7 @@ configure_combo_box_set_active (GtkComboBox *combo_box, const gchar *value)
}
static ETableColumnSpecification *
-find_column_in_spec (ETableSpecification *spec, int model_col)
+find_column_in_spec (ETableSpecification *spec, gint model_col)
{
ETableColumnSpecification **column;
@@ -250,7 +250,7 @@ find_column_in_spec (ETableSpecification *spec, int model_col)
}
static int
-find_model_column_by_name (ETableSpecification *spec, const char *s)
+find_model_column_by_name (ETableSpecification *spec, const gchar *s)
{
ETableColumnSpecification **column;
@@ -268,7 +268,7 @@ static void
update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
{
ETableConfigSortWidgets *widgets;
- int count, i;
+ gint count, i;
if (is_sort){
count = e_table_sort_info_sorting_get_count (
@@ -362,7 +362,7 @@ config_sort_info_update (ETableConfig *config)
{
ETableSortInfo *info = config->state->sort_info;
GString *res;
- int count, i;
+ gint count, i;
count = e_table_sort_info_sorting_get_count (info);
res = g_string_new ("");
@@ -401,7 +401,7 @@ config_group_info_update (ETableConfig *config)
{
ETableSortInfo *info = config->state->sort_info;
GString *res;
- int count, i;
+ gint count, i;
if (!e_table_sort_info_get_can_group (info))
return;
@@ -439,7 +439,7 @@ config_group_info_update (ETableConfig *config)
static void
setup_fields (ETableConfig *config)
{
- int i;
+ gint i;
e_table_model_freeze ((ETableModel *)config->available_model);
e_table_model_freeze ((ETableModel *)config->shown_model);
@@ -466,7 +466,7 @@ config_fields_info_update (ETableConfig *config)
{
ETableColumnSpecification **column;
GString *res = g_string_new ("");
- int i, j;
+ gint i, j;
for (i = 0; i < config->state->col_count; i++){
for (j = 0, column = config->source_spec->columns; *column; column++, j++){
@@ -493,7 +493,7 @@ static void
do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
{
GtkDialog *dialog;
- int response, running = 1;
+ gint response, running = 1;
config->temp_state = e_table_state_duplicate (config->state);
@@ -554,7 +554,7 @@ do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
static void
do_fields_config_dialog (ETableConfig *config)
{
- int response, running = 1;
+ gint response, running = 1;
gtk_widget_ensure_style (config->dialog_show_fields);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (config->dialog_show_fields)->vbox), 0);
@@ -604,12 +604,12 @@ static ETableModel *global_store; /* Glade better not be reentrant any time soo
static void
create_global_store (ETableConfig *config)
{
- int i;
+ gint i;
global_store = e_table_memory_store_new (store_columns);
for (i = 0; config->source_spec->columns[i]; i++) {
- char *text;
+ gchar *text;
if (config->source_spec->columns[i]->disabled)
continue;
@@ -693,7 +693,7 @@ dialog_destroyed (gpointer data, GObject *where_object_was)
}
static void
-dialog_response (GtkWidget *dialog, int response_id, ETableConfig *config)
+dialog_response (GtkWidget *dialog, gint response_id, ETableConfig *config)
{
if (response_id == GTK_RESPONSE_APPLY
|| response_id == GTK_RESPONSE_OK) {
@@ -741,7 +741,7 @@ e_table_proxy_gtk_combo_text_new (void)
#if 0
static GtkWidget *
-configure_dialog (GladeXML *gui, const char *widget_name, ETableConfig *config)
+configure_dialog (GladeXML *gui, const gchar *widget_name, ETableConfig *config)
{
GtkWidget *w;
@@ -752,7 +752,7 @@ configure_dialog (GladeXML *gui, const char *widget_name, ETableConfig *config)
#endif
static void
-connect_button (ETableConfig *config, GladeXML *gui, const char *widget_name, GCallback cback)
+connect_button (ETableConfig *config, GladeXML *gui, const gchar *widget_name, GCallback cback)
{
GtkWidget *button = glade_xml_get_widget (gui, widget_name);
@@ -779,14 +779,14 @@ sort_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *sort)
ETableConfig *config = sort->e_table_config;
ETableSortInfo *sort_info = config->temp_state->sort_info;
ETableConfigSortWidgets *base = &config->sort[0];
- int idx = sort - base;
+ gint idx = sort - base;
gchar *s;
s = configure_combo_box_get_active (combo_box);
if (s != NULL) {
ETableSortColumn c;
- int col;
+ gint col;
col = find_model_column_by_name (config->source_spec, s);
if (col == -1){
@@ -815,7 +815,7 @@ sort_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *sort)
ETableConfig *config = sort->e_table_config;
ETableSortInfo *si = config->temp_state->sort_info;
ETableConfigSortWidgets *base = &config->sort[0];
- int idx = sort - base;
+ gint idx = sort - base;
ETableSortColumn c;
c = e_table_sort_info_sorting_get_nth (si, idx);
@@ -827,10 +827,10 @@ static void
configure_sort_dialog (ETableConfig *config, GladeXML *gui)
{
GSList *l;
- int i;
+ gint i;
for (i = 0; i < 4; i++){
- char buffer [80];
+ gchar buffer [80];
snprintf (buffer, sizeof (buffer), "sort-combo-%d", i + 1);
config->sort [i].combo = glade_xml_get_widget (gui, buffer);
@@ -858,7 +858,7 @@ configure_sort_dialog (ETableConfig *config, GladeXML *gui)
}
for (l = config->column_names; l; l = l->next){
- char *label = l->data;
+ gchar *label = l->data;
for (i = 0; i < 4; i++){
configure_combo_box_add (
@@ -889,14 +889,14 @@ group_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *group)
ETableConfig *config = group->e_table_config;
ETableSortInfo *sort_info = config->temp_state->sort_info;
ETableConfigSortWidgets *base = &config->group[0];
- int idx = group - base;
+ gint idx = group - base;
gchar *s;
s = configure_combo_box_get_active (combo_box);
if (s != NULL) {
ETableSortColumn c;
- int col;
+ gint col;
col = find_model_column_by_name (config->source_spec, s);
if (col == -1){
@@ -925,7 +925,7 @@ group_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *group)
ETableConfig *config = group->e_table_config;
ETableSortInfo *si = config->temp_state->sort_info;
ETableConfigSortWidgets *base = &config->group[0];
- int idx = group - base;
+ gint idx = group - base;
ETableSortColumn c;
c = e_table_sort_info_grouping_get_nth (si, idx);
@@ -937,10 +937,10 @@ static void
configure_group_dialog (ETableConfig *config, GladeXML *gui)
{
GSList *l;
- int i;
+ gint i;
for (i = 0; i < 4; i++){
- char buffer [80];
+ gchar buffer [80];
snprintf (buffer, sizeof (buffer), "group-combo-%d", i + 1);
config->group [i].combo = glade_xml_get_widget (gui, buffer);
@@ -976,7 +976,7 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui)
for (l = config->column_names; l; l = l->next){
- char *label = l->data;
+ gchar *label = l->data;
for (i = 0; i < 4; i++){
configure_combo_box_add (
@@ -1002,7 +1002,7 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui)
}
static void
-add_column (int model_row, gpointer closure)
+add_column (gint model_row, gpointer closure)
{
GList **columns = closure;
*columns = g_list_prepend (*columns, GINT_TO_POINTER (model_row));
@@ -1013,8 +1013,8 @@ config_button_add (GtkWidget *widget, ETableConfig *config)
{
GList *columns = NULL;
GList *column;
- int count;
- int i;
+ gint count;
+ gint i;
e_table_selected_row_foreach (config->available, add_column, &columns);
columns = g_list_reverse (columns);
@@ -1045,7 +1045,7 @@ config_button_remove (GtkWidget *widget, ETableConfig *config)
e_table_selected_row_foreach (config->shown, add_column, &columns);
for (column = columns; column; column = column->next) {
- int row = GPOINTER_TO_INT (column->data);
+ gint row = GPOINTER_TO_INT (column->data);
memmove (config->temp_state->columns + row, config->temp_state->columns + row + 1, sizeof (int) * (config->temp_state->col_count - row - 1));
memmove (config->temp_state->expansions + row, config->temp_state->expansions + row + 1, sizeof (double) * (config->temp_state->col_count - row - 1));
@@ -1064,11 +1064,11 @@ config_button_up (GtkWidget *widget, ETableConfig *config)
{
GList *columns = NULL;
GList *column;
- int *new_shown;
+ gint *new_shown;
double *new_expansions;
- int next_col;
+ gint next_col;
double next_expansion;
- int i;
+ gint i;
e_table_selected_row_foreach (config->shown, add_column, &columns);
@@ -1119,11 +1119,11 @@ config_button_down (GtkWidget *widget, ETableConfig *config)
{
GList *columns = NULL;
GList *column;
- int *new_shown;
+ gint *new_shown;
double *new_expansions;
- int next_col;
+ gint next_col;
double next_expansion;
- int i;
+ gint i;
e_table_selected_row_foreach (config->shown, add_column, &columns);
@@ -1274,7 +1274,7 @@ e_table_config_init (ETableConfig *config)
ETableConfig *
e_table_config_construct (ETableConfig *config,
- const char *header,
+ const gchar *header,
ETableSpecification *spec,
ETableState *state,
GtkWindow *parent_window)
@@ -1298,7 +1298,7 @@ e_table_config_construct (ETableConfig *config,
config->domain = g_strdup (spec->domain);
for (column = config->source_spec->columns; *column; column++){
- char *label = (*column)->title;
+ gchar *label = (*column)->title;
if ((*column)->disabled)
continue;
@@ -1330,7 +1330,7 @@ e_table_config_construct (ETableConfig *config,
* Returns: The config object.
*/
ETableConfig *
-e_table_config_new (const char *header,
+e_table_config_new (const gchar *header,
ETableSpecification *spec,
ETableState *state,
GtkWindow *parent_window)
diff --git a/widgets/table/e-table-config.h b/widgets/table/e-table-config.h
index d5366bf999..72357fb8f6 100644
--- a/widgets/table/e-table-config.h
+++ b/widgets/table/e-table-config.h
@@ -47,14 +47,14 @@ typedef struct {
GtkWidget *radio_descending;
GtkWidget *view_check; /* Only for group dialog */
guint changed_id, toggled_id;
- void *e_table_config;
+ gpointer e_table_config;
} ETableConfigSortWidgets;
typedef struct {
GObject parent;
- char *header;
+ gchar *header;
/*
* Our various dialog boxes
@@ -81,7 +81,7 @@ typedef struct {
ETableWithout *available_model;
ETable *shown;
ETableSubsetVariable *shown_model;
- char *domain;
+ gchar *domain;
/*
* List of valid column names
@@ -97,12 +97,12 @@ typedef struct {
} ETableConfigClass;
GType e_table_config_get_type (void);
-ETableConfig *e_table_config_new (const char *header,
+ETableConfig *e_table_config_new (const gchar *header,
ETableSpecification *spec,
ETableState *state,
GtkWindow *parent_window);
ETableConfig *e_table_config_construct (ETableConfig *etco,
- const char *header,
+ const gchar *header,
ETableSpecification *spec,
ETableState *state,
GtkWindow *parent_window);
diff --git a/widgets/table/e-table-example-1.c b/widgets/table/e-table-example-1.c
index b1eae4cc40..b870967099 100644
--- a/widgets/table/e-table-example-1.c
+++ b/widgets/table/e-table-example-1.c
@@ -41,10 +41,10 @@
* class, you simply create a new object of the ETableSimple class. You
* give it a bunch of functions that act as callbacks.
*
- * You also get to pass a void * to ETableSimple and it gets passed to
+ * You also get to pass a gpointer to ETableSimple and it gets passed to
* your callbacks. This would be for having multiple models of the same
* type. This is just an example though, so we statically define all the
- * data and ignore the void *data parameter.
+ * data and ignore the gpointer data parameter.
*
* In our example we will be creating a table model with 6 columns and 10
* rows. This corresponds to having 6 different types of information and
@@ -99,7 +99,7 @@
<grouping> <leaf column=\"1\" ascending=\"true\"/> </grouping> \
</ETableSpecification>"
-char *headers [COLS] = {
+gchar *headers [COLS] = {
"Email",
"Full Name",
"Address",
@@ -114,7 +114,7 @@ char *headers [COLS] = {
* 3 Phone
*/
-char *table_data [ROWS] [COLS];
+gchar *table_data [ROWS] [COLS];
/*
* ETableSimple callbacks
@@ -128,28 +128,28 @@ char *table_data [ROWS] [COLS];
/* This function returns the number of columns in our ETableModel. */
static int
-my_col_count (ETableModel *etc, void *data)
+my_col_count (ETableModel *etc, gpointer data)
{
return COLS;
}
/* This function returns the number of rows in our ETableModel. */
static int
-my_row_count (ETableModel *etc, void *data)
+my_row_count (ETableModel *etc, gpointer data)
{
return ROWS;
}
/* This function returns the value at a particular point in our ETableModel. */
-static void *
-my_value_at (ETableModel *etc, int col, int row, void *data)
+static gpointer
+my_value_at (ETableModel *etc, gint col, gint row, gpointer data)
{
- return (void *) table_data [row] [col];
+ return (gpointer) table_data [row] [col];
}
/* This function sets the value at a particular point in our ETableModel. */
static void
-my_set_value_at (ETableModel *etc, int col, int row, const void *val, void *data)
+my_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val, gpointer data)
{
g_free (table_data [row] [col]);
table_data [row] [col] = g_strdup (val);
@@ -157,42 +157,42 @@ my_set_value_at (ETableModel *etc, int col, int row, const void *val, void *data
/* This function returns whether a particular cell is editable. */
static gboolean
-my_is_cell_editable (ETableModel *etc, int col, int row, void *data)
+my_is_cell_editable (ETableModel *etc, gint col, gint row, gpointer data)
{
return TRUE;
}
/* This function duplicates the value passed to it. */
-static void *
-my_duplicate_value (ETableModel *etc, int col, const void *value, void *data)
+static gpointer
+my_duplicate_value (ETableModel *etc, gint col, gconstpointer value, gpointer data)
{
return g_strdup (value);
}
/* This function frees the value passed to it. */
static void
-my_free_value (ETableModel *etc, int col, void *value, void *data)
+my_free_value (ETableModel *etc, gint col, gpointer value, gpointer data)
{
g_free (value);
}
/* This function creates an empty value. */
-static void *
-my_initialize_value (ETableModel *etc, int col, void *data)
+static gpointer
+my_initialize_value (ETableModel *etc, gint col, gpointer data)
{
return g_strdup ("");
}
/* This function reports if a value is empty. */
static gboolean
-my_value_is_empty (ETableModel *etc, int col, const void *value, void *data)
+my_value_is_empty (ETableModel *etc, gint col, gconstpointer value, gpointer data)
{
- return !(value && *(char *)value);
+ return !(value && *(gchar *)value);
}
/* This function reports if a value is empty. */
-static char *
-my_value_to_string (ETableModel *etc, int col, const void *value, void *data)
+static gchar *
+my_value_to_string (ETableModel *etc, gint col, gconstpointer value, gpointer data)
{
return g_strdup(value);
}
@@ -204,7 +204,7 @@ create_table (void)
GtkWidget *e_table, *window, *frame;
ECell *cell_left_just;
ETableHeader *e_table_header;
- int i, j;
+ gint i, j;
ETableModel *e_table_model = NULL;
/* First we fill in the simple data. */
@@ -287,8 +287,8 @@ create_table (void)
/* This is the main function which just initializes gnome and call our create_table function */
-int
-main (int argc, char *argv [])
+gint
+main (gint argc, gchar *argv [])
{
gnome_init ("TableExample", "TableExample", argc, argv);
e_cursors_init ();
diff --git a/widgets/table/e-table-example-2.c b/widgets/table/e-table-example-2.c
index ac12886813..ca4128590c 100644
--- a/widgets/table/e-table-example-2.c
+++ b/widgets/table/e-table-example-2.c
@@ -43,10 +43,10 @@ the ETableSimple class. Instead of creating your own ETableModel
class, you simply create a new object of the ETableSimple class. You
give it a bunch of functions that act as callbacks.
-You also get to pass a void * to ETableSimple and it gets passed to
+You also get to pass a gpointer to ETableSimple and it gets passed to
your callbacks. This would be for having multiple models of the same
type. This is just an example though, so we statically define all the
-data and ignore the void *data parameter.
+data and ignore the gpointer data parameter.
In our example we will be creating a table model with 6 columns and 10
rows. This corresponds to having 6 different types of information and
@@ -100,7 +100,7 @@ The headers will be hard coded, as will be the example data.
<grouping> <leaf column=\"1\" ascending=\"true\"/> </grouping> \
</ETableSpecification>"
-char *headers[VIEW_COLS] = {
+gchar *headers[VIEW_COLS] = {
"Email",
"Full Name",
"Address",
@@ -119,7 +119,7 @@ char *headers[VIEW_COLS] = {
Importance field.
*/
-char *table_data[ROWS][VIEW_COLS];
+gchar *table_data[ROWS][VIEW_COLS];
gboolean importance_data[ROWS];
/*
@@ -134,19 +134,19 @@ static GdkColor *color1;
static GdkColor *color2;
static int
-my_col_count (ETableModel *etc, void *data)
+my_col_count (ETableModel *etc, gpointer data)
{
return VIRTUAL_COLS;
}
static int
-my_row_count (ETableModel *etc, void *data)
+my_row_count (ETableModel *etc, gpointer data)
{
return ROWS;
}
-static void *
-my_value_at (ETableModel *etc, int col, int row, void *data)
+static gpointer
+my_value_at (ETableModel *etc, gint col, gint row, gpointer data)
{
if (col == COLOR_COLUMN){
if (importance_data[row]){
@@ -157,12 +157,12 @@ my_value_at (ETableModel *etc, int col, int row, void *data)
} else if (col == IMPORTANCE_COLUMN){
return (gpointer) importance_data[row];
} else {
- return (void *) table_data [row][col];
+ return (gpointer) table_data [row][col];
}
}
static void
-my_set_value_at (ETableModel *etc, int col, int row, const void *val, void *data)
+my_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val, gpointer data)
{
if (col == COLOR_COLUMN){
} else if (col == IMPORTANCE_COLUMN){
@@ -174,7 +174,7 @@ my_set_value_at (ETableModel *etc, int col, int row, const void *val, void *data
}
static gboolean
-my_is_cell_editable (ETableModel *etc, int col, int row, void *data)
+my_is_cell_editable (ETableModel *etc, gint col, gint row, gpointer data)
{
if (col == IMPORTANCE_COLUMN)
return FALSE;
@@ -182,20 +182,20 @@ my_is_cell_editable (ETableModel *etc, int col, int row, void *data)
return TRUE;
}
-static void *
-my_duplicate_value (ETableModel *etc, int col, const void *value, void *data)
+static gpointer
+my_duplicate_value (ETableModel *etc, gint col, gconstpointer value, gpointer data)
{
if (col == COLOR_COLUMN){
- return (void *) value;
+ return (gpointer) value;
} else if (col == IMPORTANCE_COLUMN){
- return (void *) value;
+ return (gpointer) value;
} else {
return g_strdup (value);
}
}
static void
-my_free_value (ETableModel *etc, int col, void *value, void *data)
+my_free_value (ETableModel *etc, gint col, gpointer value, gpointer data)
{
if (col == COLOR_COLUMN){
} else if (col == IMPORTANCE_COLUMN){
@@ -204,8 +204,8 @@ my_free_value (ETableModel *etc, int col, void *value, void *data)
}
}
-static void *
-my_initialize_value (ETableModel *etc, int col, void *data)
+static gpointer
+my_initialize_value (ETableModel *etc, gint col, gpointer data)
{
if (col == COLOR_COLUMN){
return NULL;
@@ -217,19 +217,19 @@ my_initialize_value (ETableModel *etc, int col, void *data)
}
static gboolean
-my_value_is_empty (ETableModel *etc, int col, const void *value, void *data)
+my_value_is_empty (ETableModel *etc, gint col, gconstpointer value, gpointer data)
{
if (col == COLOR_COLUMN){
return value == NULL;
} else if (col == IMPORTANCE_COLUMN){
return value == NULL;
} else {
- return !(value && *(char *)value);
+ return !(value && *(gchar *)value);
}
}
-static char *
-my_value_to_string (ETableModel *etc, int col, const void *value, void *data)
+static gchar *
+my_value_to_string (ETableModel *etc, gint col, gconstpointer value, gpointer data)
{
if (col == COLOR_COLUMN){
return g_strdup_printf("%d", (int) value);
@@ -248,7 +248,7 @@ create_table ()
ECell *cell_left_just;
ECell *cell_checkbox;
ETableHeader *e_table_header;
- int i, j;
+ gint i, j;
ETableModel *e_table_model = NULL;
ETableCol *ecol;
GdkPixbuf *pixbuf;
@@ -333,8 +333,8 @@ create_table ()
-int
-main (int argc, char *argv [])
+gint
+main (gint argc, gchar *argv [])
{
gnome_init ("TableExample", "TableExample", argc, argv);
e_cursors_init ();
diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c
index 0099b23656..78513792f8 100644
--- a/widgets/table/e-table-extras.c
+++ b/widgets/table/e-table-extras.c
@@ -83,8 +83,8 @@ ete_class_init (ETableExtrasClass *klass)
static gint
e_strint_compare(gconstpointer data1, gconstpointer data2)
{
- int int1 = atoi(data1);
- int int2 = atoi(data2);
+ gint int1 = atoi(data1);
+ gint int2 = atoi(data2);
return e_int_compare(GINT_TO_POINTER(int1), GINT_TO_POINTER(int2));
}
@@ -124,9 +124,9 @@ g_utf8_strncasecmp (const gchar *s1,
}
static gboolean
-e_string_search(gconstpointer haystack, const char *needle)
+e_string_search(gconstpointer haystack, const gchar *needle)
{
- int length;
+ gint length;
if (haystack == NULL)
return FALSE;
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index 61dedd4e12..e3c059d748 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -208,7 +208,7 @@ e_table_field_chooser_dialog_get_property (GObject *object, guint prop_id, GValu
}
static void
-e_table_field_chooser_dialog_response (GtkDialog *dialog, int 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 99b61f9ffa..9c62064b27 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -94,8 +94,8 @@ etfci_dispose (GObject *object)
static gint
etfci_find_button (ETableFieldChooserItem *etfci, double loc)
{
- int i;
- int count;
+ gint i;
+ gint count;
double height = 0;
count = e_table_header_count(etfci->combined_header);
@@ -115,9 +115,9 @@ etfci_find_button (ETableFieldChooserItem *etfci, double loc)
static void
etfci_rebuild_combined (ETableFieldChooserItem *etfci)
{
- int count;
+ gint count;
GHashTable *hash;
- int i;
+ gint i;
if (etfci->combined_header != NULL)
g_object_unref (etfci->combined_header);
@@ -151,8 +151,8 @@ etfci_reflow (GnomeCanvasItem *item, gint flags)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
double old_height;
- int i;
- int count;
+ gint i;
+ gint count;
double height = 0;
etfci_rebuild_combined (etfci);
@@ -178,7 +178,7 @@ etfci_reflow (GnomeCanvasItem *item, gint flags)
}
static void
-etfci_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
+etfci_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
double i2c [6];
@@ -255,7 +255,7 @@ full_header_structure_changed (ETableHeader *header, ETableFieldChooserItem *etf
}
static void
-full_header_dimension_changed (ETableHeader *header, int col, ETableFieldChooserItem *etfci)
+full_header_dimension_changed (ETableHeader *header, gint col, ETableFieldChooserItem *etfci)
{
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
}
@@ -305,7 +305,7 @@ table_header_structure_changed (ETableHeader *header, ETableFieldChooserItem *et
}
static void
-table_header_dimension_changed (ETableHeader *header, int col, ETableFieldChooserItem *etfci)
+table_header_dimension_changed (ETableHeader *header, gint col, ETableFieldChooserItem *etfci)
{
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
}
@@ -396,7 +396,7 @@ etfci_drag_data_get (GtkWidget *widget,
gtk_selection_data_set(selection_data,
GDK_SELECTION_TYPE_STRING,
sizeof(string[0]),
- (unsigned char *)string,
+ (guchar *)string,
strlen(string));
g_free(string);
}
@@ -449,13 +449,13 @@ etfci_unrealize (GnomeCanvasItem *item)
}
static void
-etfci_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height)
+etfci_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
GnomeCanvas *canvas = item->canvas;
- int rows;
- int y1, y2;
- int row;
+ gint rows;
+ gint y1, y2;
+ gint row;
GtkStyle *style;
GtkStateType state;
@@ -495,7 +495,7 @@ etfci_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int widt
}
static double
-etfci_point (GnomeCanvasItem *item, double x, double y, int cx, int cy,
+etfci_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy,
GnomeCanvasItem **actual_item)
{
*actual_item = item;
@@ -503,7 +503,7 @@ etfci_point (GnomeCanvasItem *item, double x, double y, int cx, int cy,
}
static gboolean
-etfci_maybe_start_drag (ETableFieldChooserItem *etfci, int x, int y)
+etfci_maybe_start_drag (ETableFieldChooserItem *etfci, gint x, gint y)
{
if (!etfci->maybe_drag)
return FALSE;
@@ -523,8 +523,8 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, double x, doub
GdkDragContext *context;
ETableCol *ecol;
GdkPixmap *pixmap;
- int drag_col;
- int button_height;
+ gint drag_col;
+ gint button_height;
GtkTargetEntry etfci_drag_types [] = {
{ (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
@@ -580,7 +580,7 @@ etfci_event (GnomeCanvasItem *item, GdkEvent *e)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
GnomeCanvas *canvas = item->canvas;
- int x, y;
+ gint x, y;
switch (e->type){
case GDK_MOTION_NOTIFY:
diff --git a/widgets/table/e-table-field-chooser-item.h b/widgets/table/e-table-field-chooser-item.h
index 3b9937bf3c..d0cbbd9f75 100644
--- a/widgets/table/e-table-field-chooser-item.h
+++ b/widgets/table/e-table-field-chooser-item.h
@@ -49,8 +49,8 @@ typedef struct {
/*
* Ids
*/
- int full_header_structure_change_id, full_header_dimension_change_id;
- int table_header_structure_change_id, table_header_dimension_change_id;
+ gint full_header_structure_change_id, full_header_dimension_change_id;
+ gint table_header_structure_change_id, table_header_dimension_change_id;
gchar *dnd_code;
@@ -58,8 +58,8 @@ typedef struct {
* For dragging columns
*/
guint maybe_drag:1;
- int click_x, click_y;
- int drag_col;
+ gint click_x, click_y;
+ gint drag_col;
guint drag_data_get_id;
guint drag_end_id;
} ETableFieldChooserItem;
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 5af40532f8..28b7f4e45f 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -142,7 +142,7 @@ void
e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContainer *etgc,
ETableHeader *full_header,
ETableHeader *header,
- ETableModel *model, ETableSortInfo *sort_info, int n)
+ ETableModel *model, ETableSortInfo *sort_info, gint n)
{
ETableCol *col;
ETableSortColumn column = e_table_sort_info_grouping_get_nth(sort_info, n);
@@ -184,7 +184,7 @@ e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContaine
ETableGroup *
e_table_group_container_new (GnomeCanvasGroup *parent, ETableHeader *full_header,
ETableHeader *header,
- ETableModel *model, ETableSortInfo *sort_info, int n)
+ ETableModel *model, ETableSortInfo *sort_info, gint n)
{
ETableGroupContainer *etgc;
@@ -359,56 +359,56 @@ compute_text (ETableGroupContainer *etgc, ETableGroupContainerChildNode *child_n
}
static void
-child_cursor_change (ETableGroup *etg, int row,
+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, int row,
+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, int row, int col, GdkEvent *event,
+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 gint
-child_right_click (ETableGroup *etg, int row, int col, GdkEvent *event,
+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 gint
-child_click (ETableGroup *etg, int row, int col, GdkEvent *event,
+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 gint
-child_key_press (ETableGroup *etg, int row, int col, GdkEvent *event,
+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 gint
-child_start_drag (ETableGroup *etg, int row, int col, GdkEvent *event,
+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, void *val)
+create_child_node (ETableGroupContainer *etgc, gpointer val)
{
ETableGroup *child;
ETableGroupContainerChildNode *child_node;
@@ -466,15 +466,15 @@ static void
etgc_add (ETableGroup *etg, gint row)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
- void *val = e_table_model_value_at (etg->model, etgc->ecol->col_idx, row);
+ gpointer val = e_table_model_value_at (etg->model, etgc->ecol->col_idx, row);
GCompareFunc comp = etgc->ecol->compare;
GList *list = etgc->children;
ETableGroup *child;
ETableGroupContainerChildNode *child_node;
- int i = 0;
+ gint i = 0;
for (; list; list = g_list_next (list), i++){
- int comp_val;
+ gint comp_val;
child_node = list->data;
comp_val = (*comp)(child_node->key, val);
@@ -504,12 +504,12 @@ etgc_add (ETableGroup *etg, gint row)
}
static void
-etgc_add_array (ETableGroup *etg, const int *array, int count)
+etgc_add_array (ETableGroup *etg, const gint *array, gint count)
{
- int i;
+ gint i;
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
- void *lastval = NULL;
- int laststart = 0;
+ gpointer lastval = NULL;
+ gint laststart = 0;
GCompareFunc comp = etgc->ecol->compare;
ETableGroupContainerChildNode *child_node;
ETableGroup *child;
@@ -523,8 +523,8 @@ etgc_add_array (ETableGroup *etg, const int *array, int count)
lastval = e_table_model_value_at (etg->model, etgc->ecol->col_idx, array[0]);
for (i = 1; i < count; i++) {
- void *val = e_table_model_value_at (etg->model, etgc->ecol->col_idx, array[i]);
- int comp_val;
+ gpointer val = e_table_model_value_at (etg->model, etgc->ecol->col_idx, array[i]);
+ gint comp_val;
comp_val = (*comp)(lastval, val);
if (comp_val != 0) {
@@ -558,8 +558,8 @@ etgc_add_all (ETableGroup *etg)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
ESorter *sorter = etgc->selection_model->sorter;
- int *array;
- int count;
+ gint *array;
+ gint count;
e_sorter_get_sorted_to_model_array(sorter, &array, &count);
@@ -661,7 +661,7 @@ etgc_get_focus_column (ETableGroup *etg)
}
static void
-etgc_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col)
+etgc_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
@@ -687,7 +687,7 @@ etgc_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col)
}
static void
-etgc_get_mouse_over (ETableGroup *etg, int *row, int *col)
+etgc_get_mouse_over (ETableGroup *etg, gint *row, gint *col)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
@@ -697,7 +697,7 @@ etgc_get_mouse_over (ETableGroup *etg, int *row, int *col)
*col = -1;
if (etgc->children) {
- int row_plus = 0;
+ gint row_plus = 0;
GList *list;
for (list = etgc->children; list; list = list->next) {
@@ -718,11 +718,11 @@ etgc_get_mouse_over (ETableGroup *etg, int *row, int *col)
}
static void
-etgc_get_cell_geometry (ETableGroup *etg, int *row, int *col, int *x, int *y, int *width, int *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);
- int ypos;
+ gint ypos;
ypos = 0;
@@ -731,7 +731,7 @@ etgc_get_cell_geometry (ETableGroup *etg, int *row, int *col, int *x, int *y, in
for (list = etgc->children; list; list = list->next) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data;
ETableGroup *child = child_node->child;
- int thisy;
+ gint thisy;
e_table_group_get_cell_geometry (child, row, col, x, &thisy, width, height);
ypos += thisy;
@@ -1115,7 +1115,7 @@ etgc_init (ETableGroupContainer *container)
}
void
-e_table_group_apply_to_leafs (ETableGroup *etg, ETableGroupLeafFn fn, void *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);
diff --git a/widgets/table/e-table-group-container.h b/widgets/table/e-table-group-container.h
index 69791e376b..168b2f8a5a 100644
--- a/widgets/table/e-table-group-container.h
+++ b/widgets/table/e-table-group-container.h
@@ -62,8 +62,8 @@ typedef struct {
gdouble width, height, minimum_width;
ETableSortInfo *sort_info;
- int n;
- int length_threshold;
+ gint n;
+ gint length_threshold;
ESelectionModel *selection_model;
@@ -86,8 +86,8 @@ typedef struct {
typedef struct {
ETableGroup *child;
- void *key;
- char *string;
+ gpointer key;
+ gchar *string;
GnomeCanvasItem *text;
GnomeCanvasItem *rect;
gint count;
@@ -95,11 +95,11 @@ typedef struct {
ETableGroup *e_table_group_container_new (GnomeCanvasGroup *parent, ETableHeader *full_header, ETableHeader *header,
- ETableModel *model, ETableSortInfo *sort_info, int n);
+ ETableModel *model, ETableSortInfo *sort_info, gint n);
void e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContainer *etgc,
ETableHeader *full_header,
ETableHeader *header,
- ETableModel *model, ETableSortInfo *sort_info, int n);
+ ETableModel *model, ETableSortInfo *sort_info, gint n);
GType e_table_group_container_get_type (void);
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c
index 6076030737..5e269e284e 100644
--- a/widgets/table/e-table-group-leaf.c
+++ b/widgets/table/e-table-group-leaf.c
@@ -400,7 +400,7 @@ etgl_get_printable (ETableGroup *etg)
}
static void
-etgl_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col)
+etgl_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
@@ -408,7 +408,7 @@ etgl_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col)
}
static void
-etgl_get_mouse_over (ETableGroup *etg, int *row, int *col)
+etgl_get_mouse_over (ETableGroup *etg, gint *row, gint *col)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
@@ -421,7 +421,7 @@ etgl_get_mouse_over (ETableGroup *etg, int *row, int *col)
}
static void
-etgl_get_cell_geometry (ETableGroup *etg, int *row, int *col, int *x, int *y, int *width, int *height)
+etgl_get_cell_geometry (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y, gint *width, gint *height)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
diff --git a/widgets/table/e-table-group-leaf.h b/widgets/table/e-table-group-leaf.h
index e19bf8cdb8..8d05874c01 100644
--- a/widgets/table/e-table-group-leaf.h
+++ b/widgets/table/e-table-group-leaf.h
@@ -49,7 +49,7 @@ typedef struct {
gdouble width;
gdouble minimum_width;
- int length_threshold;
+ gint length_threshold;
ETableSubset *ets;
guint is_grouped : 1;
@@ -61,13 +61,13 @@ typedef struct {
guint uniform_row_height : 1;
ECursorMode cursor_mode;
- int etgl_cursor_change_id;
- int etgl_cursor_activated_id;
- int etgl_double_click_id;
- int etgl_right_click_id;
- int etgl_click_id;
- int etgl_key_press_id;
- int etgl_start_drag_id;
+ gint etgl_cursor_change_id;
+ gint etgl_cursor_activated_id;
+ gint etgl_double_click_id;
+ gint etgl_right_click_id;
+ gint etgl_click_id;
+ gint etgl_key_press_id;
+ gint etgl_start_drag_id;
ESelectionModel *selection_model;
} ETableGroupLeaf;
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index 5cc03e90fc..a1d965b57a 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -101,7 +101,7 @@ e_table_group_new (GnomeCanvasGroup *parent,
ETableHeader *header,
ETableModel *model,
ETableSortInfo *sort_info,
- int n)
+ gint n)
{
g_return_val_if_fail (model != NULL, NULL);
@@ -170,8 +170,8 @@ e_table_group_add (ETableGroup *etg,
*/
void
e_table_group_add_array (ETableGroup *etg,
- const int *array,
- int count)
+ const gint *array,
+ gint count)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
@@ -372,7 +372,7 @@ e_table_group_get_printable (ETableGroup *etg)
* %ETableGroup is removed from the value y points to.
*/
void
-e_table_group_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col)
+e_table_group_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
@@ -382,7 +382,7 @@ e_table_group_compute_location (ETableGroup *etg, int *x, int *y, int *row, int
}
void
-e_table_group_get_mouse_over (ETableGroup *etg, int *row, int *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));
@@ -407,12 +407,12 @@ e_table_group_get_mouse_over (ETableGroup *etg, int *row, int *col)
*/
void
e_table_group_get_cell_geometry (ETableGroup *etg,
- int *row,
- int *col,
- int *x,
- int *y,
- int *width,
- int *height)
+ 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));
diff --git a/widgets/table/e-table-group.h b/widgets/table/e-table-group.h
index 36868f7d35..7bf139e666 100644
--- a/widgets/table/e-table-group.h
+++ b/widgets/table/e-table-group.h
@@ -69,17 +69,17 @@ typedef struct {
GnomeCanvasGroupClass parent_class;
/* Signals */
- void (*cursor_change) (ETableGroup *etg, int row);
- void (*cursor_activated) (ETableGroup *etg, int row);
- void (*double_click) (ETableGroup *etg, int row, int col, GdkEvent *event);
- gint (*right_click) (ETableGroup *etg, int row, int col, GdkEvent *event);
- gint (*click) (ETableGroup *etg, int row, int col, GdkEvent *event);
- gint (*key_press) (ETableGroup *etg, int row, int col, GdkEvent *event);
- gint (*start_drag) (ETableGroup *etg, int row, int col, GdkEvent *event);
+ void (*cursor_change) (ETableGroup *etg, gint row);
+ void (*cursor_activated) (ETableGroup *etg, gint row);
+ void (*double_click) (ETableGroup *etg, gint row, gint col, GdkEvent *event);
+ gint (*right_click) (ETableGroup *etg, gint row, gint col, GdkEvent *event);
+ gint (*click) (ETableGroup *etg, gint row, gint col, GdkEvent *event);
+ gint (*key_press) (ETableGroup *etg, gint row, gint col, GdkEvent *event);
+ gint (*start_drag) (ETableGroup *etg, gint row, gint col, GdkEvent *event);
/* Virtual functions. */
void (*add) (ETableGroup *etg, gint row);
- void (*add_array) (ETableGroup *etg, const int *array, int count);
+ void (*add_array) (ETableGroup *etg, const gint *array, gint count);
void (*add_all) (ETableGroup *etg);
gboolean (*remove) (ETableGroup *etg, gint row);
gint (*row_count) (ETableGroup *etg);
@@ -89,9 +89,9 @@ typedef struct {
gboolean (*get_focus) (ETableGroup *etg);
gint (*get_focus_column) (ETableGroup *etg);
EPrintable *(*get_printable) (ETableGroup *etg);
- void (*compute_location) (ETableGroup *etg, int *x, int *y, int *row, int *col);
- void (*get_mouse_over) (ETableGroup *etg, int *row, int *col);
- void (*get_cell_geometry) (ETableGroup *etg, int *row, int *col, int *x, int *y, int *width, int *height);
+ void (*compute_location) (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col);
+ void (*get_mouse_over) (ETableGroup *etg, gint *row, gint *col);
+ void (*get_cell_geometry) (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y, gint *width, gint *height);
} ETableGroupClass;
@@ -99,8 +99,8 @@ typedef struct {
void e_table_group_add (ETableGroup *etg,
gint row);
void e_table_group_add_array (ETableGroup *etg,
- const int *array,
- int count);
+ const gint *array,
+ gint count);
void e_table_group_add_all (ETableGroup *etg);
gboolean e_table_group_remove (ETableGroup *etg,
gint row);
@@ -119,26 +119,26 @@ gint e_table_group_get_focus_column (ETableGroup *etg);
ETableHeader *e_table_group_get_header (ETableGroup *etg);
EPrintable *e_table_group_get_printable (ETableGroup *etg);
void e_table_group_compute_location (ETableGroup *etg,
- int *x,
- int *y,
- int *row,
- int *col);
+ gint *x,
+ gint *y,
+ gint *row,
+ gint *col);
void e_table_group_get_mouse_over(ETableGroup *etg,
- int *row,
- int *col);
+ gint *row,
+ gint *col);
void e_table_group_get_cell_geometry (ETableGroup *etg,
- int *row,
- int *col,
- int *x,
- int *y,
- int *width,
- int *height);
+ gint *row,
+ gint *col,
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height);
ETableGroup *e_table_group_new (GnomeCanvasGroup *parent,
ETableHeader *full_header,
ETableHeader *header,
ETableModel *model,
ETableSortInfo *sort_info,
- int n);
+ gint n);
void e_table_group_construct (GnomeCanvasGroup *parent,
ETableGroup *etg,
ETableHeader *full_header,
@@ -172,7 +172,7 @@ gint e_table_group_start_drag (ETableGroup *etg,
GdkEvent *event);
GType e_table_group_get_type (void);
-typedef void (*ETableGroupLeafFn) (void *e_table_item, void *closure);
+typedef void (*ETableGroupLeafFn) (gpointer e_table_item, gpointer closure);
void e_table_group_apply_to_leafs (ETableGroup *etg,
ETableGroupLeafFn fn,
void *closure);
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 62c00f94a4..d569e8dd9e 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -155,8 +155,8 @@ static int
e_table_header_item_get_height (ETableHeaderItem *ethi)
{
ETableHeader *eth;
- int numcols, col;
- int maxheight;
+ gint numcols, col;
+ gint maxheight;
g_return_val_if_fail (ethi != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER_ITEM (ethi), 0);
@@ -168,7 +168,7 @@ e_table_header_item_get_height (ETableHeaderItem *ethi)
for (col = 0; col < numcols; col++) {
ETableCol *ecol = e_table_header_get_column (eth, col);
- int height;
+ gint height;
height = e_table_header_compute_height (ecol,
GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas));
@@ -181,7 +181,7 @@ e_table_header_item_get_height (ETableHeaderItem *ethi)
}
static void
-ethi_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
+ethi_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags)
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
@@ -260,7 +260,7 @@ structure_changed (ETableHeader *header, ETableHeaderItem *ethi)
}
static void
-dimension_changed (ETableHeader *header, int col, ETableHeaderItem *ethi)
+dimension_changed (ETableHeader *header, gint col, ETableHeaderItem *ethi)
{
gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(ethi));
}
@@ -388,11 +388,11 @@ ethi_get_property (GObject *object,
}
static int
-ethi_find_col_by_x (ETableHeaderItem *ethi, int x)
+ethi_find_col_by_x (ETableHeaderItem *ethi, gint x)
{
- const int cols = e_table_header_count (ethi->eth);
- int x1 = 0;
- int col;
+ const gint cols = e_table_header_count (ethi->eth);
+ gint x1 = 0;
+ gint col;
d(g_print ("%s:%d: x = %d, x1 = %d\n", __FUNCTION__, __LINE__, x, x1));
@@ -418,11 +418,11 @@ ethi_find_col_by_x (ETableHeaderItem *ethi, int x)
}
static int
-ethi_find_col_by_x_nearest (ETableHeaderItem *ethi, int x)
+ethi_find_col_by_x_nearest (ETableHeaderItem *ethi, gint x)
{
- const int cols = e_table_header_count (ethi->eth);
- int x1 = 0;
- int col;
+ const gint cols = e_table_header_count (ethi->eth);
+ gint x1 = 0;
+ gint col;
x1 += ethi->group_indent_width;
@@ -455,7 +455,7 @@ ethi_remove_drop_marker (ETableHeaderItem *ethi)
}
static GtkWidget *
-make_shaped_window_from_xpm (const char **xpm)
+make_shaped_window_from_xpm (const gchar **xpm)
{
GdkPixbuf *pixbuf;
GdkPixmap *pixmap;
@@ -483,10 +483,10 @@ make_shaped_window_from_xpm (const char **xpm)
}
static void
-ethi_add_drop_marker (ETableHeaderItem *ethi, int col, gboolean recreate)
+ethi_add_drop_marker (ETableHeaderItem *ethi, gint col, gboolean recreate)
{
- int rx, ry;
- int x;
+ gint rx, ry;
+ gint x;
if (!recreate && ethi->drag_mark == col)
return;
@@ -518,7 +518,7 @@ ethi_add_drop_marker (ETableHeaderItem *ethi, int col, gboolean recreate)
#define gray50_width 2
#define gray50_height 2
-static char gray50_bits [] = {
+static gchar gray50_bits [] = {
0x02, 0x01, };
static void
@@ -592,7 +592,7 @@ do_drag_motion(ETableHeaderItem *ethi,
if ((x >= 0) && (x <= (ethi->width)) &&
(y >= 0) && (y <= (ethi->height))){
- int col;
+ gint col;
d(g_print("In header\n"));
col = ethi_find_col_by_x_nearest (ethi, x);
@@ -626,7 +626,7 @@ static gboolean
scroll_timeout (gpointer data)
{
ETableHeaderItem *ethi = data;
- int dx = 0;
+ gint dx = 0;
GtkAdjustment *h, *v;
double value;
@@ -701,7 +701,7 @@ ethi_drag_motion (GtkWidget *widget, GdkDragContext *context,
gint x, gint y, guint time,
ETableHeaderItem *ethi)
{
- char *droptype, *headertype;
+ gchar *droptype, *headertype;
guint direction = 0;
gdk_drag_status (context, 0, time);
@@ -768,15 +768,15 @@ ethi_drag_data_received (GtkWidget *canvas,
guint time,
ETableHeaderItem *ethi)
{
- int found = FALSE;
- int count;
- int column;
- int drop_col;
- int i;
+ gint found = FALSE;
+ gint count;
+ gint column;
+ gint drop_col;
+ gint i;
if (data->data) {
count = e_table_header_count(ethi->eth);
- column = atoi((char *)data->data);
+ column = atoi((gchar *)data->data);
drop_col = ethi->drop_col;
ethi->drop_col = -1;
@@ -820,7 +820,7 @@ ethi_drag_data_get (GtkWidget *canvas,
gtk_selection_data_set(selection_data,
GDK_SELECTION_TYPE_STRING,
sizeof(string[0]),
- (unsigned char *)string,
+ (guchar *)string,
strlen(string));
g_free(string);
}
@@ -838,7 +838,7 @@ ethi_drag_drop (GtkWidget *canvas,
if ((x >= 0) && (x <= (ethi->width)) &&
(y >= 0) && (y <= (ethi->height))){
- int col;
+ gint col;
col = ethi_find_col_by_x_nearest (ethi, x);
@@ -847,7 +847,7 @@ ethi_drag_drop (GtkWidget *canvas,
ethi->drop_col = col;
if (col != -1) {
- char *target = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code);
+ gchar *target = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code);
d(g_print ("ethi - %s\n", target));
gtk_drag_get_data (canvas, context, gdk_atom_intern(target, FALSE), time);
g_free (target);
@@ -935,19 +935,19 @@ ethi_unrealize (GnomeCanvasItem *item)
}
static void
-ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height)
+ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height)
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
GnomeCanvas *canvas = item->canvas;
- const int cols = e_table_header_count (ethi->eth);
- int x1, x2;
- int col;
+ const gint cols = e_table_header_count (ethi->eth);
+ gint x1, x2;
+ gint col;
GHashTable *arrows = g_hash_table_new (NULL, NULL);
if (ethi->sort_info) {
- int length = e_table_sort_info_grouping_get_count(ethi->sort_info);
- int i;
+ gint length = e_table_sort_info_grouping_get_count(ethi->sort_info);
+ gint i;
for (i = 0; i < length; i++) {
ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i);
g_hash_table_insert (arrows,
@@ -972,7 +972,7 @@ ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width
x2 += ethi->group_indent_width;
for (col = 0; col < cols; col++, x1 = x2){
ETableCol *ecol = e_table_header_get_column (ethi->eth, col);
- int col_width;
+ gint col_width;
col_width = ecol->width;
@@ -1002,7 +1002,7 @@ ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width
}
static double
-ethi_point (GnomeCanvasItem *item, double x, double y, int cx, int cy,
+ethi_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy,
GnomeCanvasItem **actual_item)
{
*actual_item = item;
@@ -1017,10 +1017,10 @@ ethi_point (GnomeCanvasItem *item, double x, double y, int cx, int cy,
* then the ETableCol that actually contains this point is returned here
*/
static gboolean
-is_pointer_on_division (ETableHeaderItem *ethi, int pos, int *the_total, int *return_col)
+is_pointer_on_division (ETableHeaderItem *ethi, gint pos, gint *the_total, gint *return_col)
{
- const int cols = e_table_header_count (ethi->eth);
- int col, total;
+ const gint cols = e_table_header_count (ethi->eth);
+ gint col, total;
total = 0;
for (col = 0; col < cols; col++){
@@ -1052,9 +1052,9 @@ is_pointer_on_division (ETableHeaderItem *ethi, int pos, int *the_total, int *re
#define convert(c,sx,sy,x,y) gnome_canvas_w2c (c,sx,sy,x,y)
static void
-set_cursor (ETableHeaderItem *ethi, int pos)
+set_cursor (ETableHeaderItem *ethi, gint pos)
{
- int col;
+ gint col;
GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas);
gboolean resizable = FALSE;
@@ -1063,12 +1063,12 @@ set_cursor (ETableHeaderItem *ethi, int pos)
return;
if (is_pointer_on_division (ethi, pos, NULL, &col)) {
- int last_col = ethi->eth->col_count - 1;
+ gint last_col = ethi->eth->col_count - 1;
ETableCol *ecol = e_table_header_get_column (ethi->eth, col);
/* Last column is not resizable */
if (ecol->resizable && col != last_col) {
- int c = col + 1;
+ gint c = col + 1;
/* Column is not resizable if all columns after it
are also not resizable */
@@ -1125,9 +1125,9 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
GtkTargetList *list;
GdkDragContext *context;
ETableCol *ecol;
- int col_width;
+ gint col_width;
GdkPixmap *pixmap;
- int group_indent = 0;
+ gint group_indent = 0;
GHashTable *arrows = g_hash_table_new (NULL, NULL);
GtkTargetEntry ethi_drag_types [] = {
@@ -1140,8 +1140,8 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
return;
if (ethi->sort_info) {
- int length = e_table_sort_info_grouping_get_count(ethi->sort_info);
- int i;
+ gint length = e_table_sort_info_grouping_get_count(ethi->sort_info);
+ gint i;
for (i = 0; i < length; i++) {
ETableSortColumn column =
e_table_sort_info_grouping_get_nth(
@@ -1205,17 +1205,17 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
typedef struct {
ETableHeaderItem *ethi;
- int col;
+ gint col;
} EthiHeaderInfo;
static void
ethi_popup_sort_ascending(GtkWidget *widget, EthiHeaderInfo *info)
{
ETableCol *col;
- int model_col = -1;
- int length;
- int i;
- int found = FALSE;
+ gint model_col = -1;
+ gint length;
+ gint i;
+ gint found = FALSE;
ETableHeaderItem *ethi = info->ethi;
col = e_table_header_get_column (ethi->eth, info->col);
@@ -1267,10 +1267,10 @@ static void
ethi_popup_sort_descending(GtkWidget *widget, EthiHeaderInfo *info)
{
ETableCol *col;
- int model_col=-1;
- int length;
- int i;
- int found = FALSE;
+ gint model_col=-1;
+ gint length;
+ gint i;
+ gint found = FALSE;
ETableHeaderItem *ethi = info->ethi;
col = e_table_header_get_column (ethi->eth, info->col);
@@ -1331,7 +1331,7 @@ static void
ethi_popup_group_field(GtkWidget *widget, EthiHeaderInfo *info)
{
ETableCol *col;
- int model_col;
+ gint model_col;
ETableHeaderItem *ethi = info->ethi;
ETableSortColumn column;
@@ -1389,7 +1389,7 @@ static void
ethi_popup_best_fit(GtkWidget *widget, EthiHeaderInfo *info)
{
ETableHeaderItem *ethi = info->ethi;
- int width;
+ gint width;
g_signal_emit_by_name (ethi->eth,
"request_width",
@@ -1416,7 +1416,7 @@ config_destroyed (gpointer data, GObject *where_object_was)
static void
apply_changes (ETableConfig *config, ETableHeaderItem *ethi)
{
- char *state = e_table_state_save_to_string (config->state);
+ gchar *state = e_table_state_save_to_string (config->state);
if (ethi->table)
e_table_set_state (ethi->table, state);
@@ -1489,7 +1489,7 @@ static EPopupMenu ethi_context_menu [] = {
static void
sort_by_id (GtkWidget *menu_item, ETableHeaderItem *ethi)
{
- int col = GPOINTER_TO_INT (g_object_get_data(G_OBJECT (menu_item), "col-number"));
+ gint col = GPOINTER_TO_INT (g_object_get_data(G_OBJECT (menu_item), "col-number"));
ETableCol *ecol;
gboolean clearfirst;
@@ -1520,7 +1520,7 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
EthiHeaderInfo *info = g_new (EthiHeaderInfo, 1);
ETableCol *col;
GtkMenu *popup;
- int ncol, sort_count, sort_col;
+ gint ncol, sort_count, sort_col;
GtkWidget *menu_item, *sub_menu;
ETableSortColumn column;
gboolean ascending = TRUE;
@@ -1571,7 +1571,7 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
/* Headers */
for (ncol = 0; ncol<ethi->full_header->col_count; ncol++)
{
- char *text=NULL;
+ gchar *text=NULL;
if (!ethi->full_header->columns[ncol]->sortable ||
ethi->full_header->columns[ncol]->disabled)
@@ -1610,9 +1610,9 @@ ethi_button_pressed (ETableHeaderItem *ethi, GdkEventButton *event)
void
ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
{
- int model_col = -1;
- int length;
- int i;
+ gint model_col = -1;
+ gint length;
+ gint i;
gboolean found = FALSE;
if (col == NULL)
@@ -1625,7 +1625,7 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
for (i = 0; i < length; i++) {
ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i);
if (model_col == column.column || model_col == -1){
- int ascending = column.ascending;
+ gint ascending = column.ascending;
ascending = ! ascending;
column.ascending = ascending;
e_table_sort_info_grouping_set_nth(ethi->sort_info, i, column);
@@ -1641,14 +1641,14 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
ETableSortColumn column = e_table_sort_info_sorting_get_nth(ethi->sort_info, i);
if (model_col == column.column || model_col == -1){
- int ascending = column.ascending;
+ gint ascending = column.ascending;
if (ascending == 0 && model_col != -1){
/*
* This means the user has clicked twice
* already, lets kill sorting of this column now.
*/
- int j;
+ gint j;
for (j = i + 1; j < length; j++)
e_table_sort_info_sorting_set_nth (ethi->sort_info,
@@ -1688,8 +1688,8 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
GnomeCanvas *canvas = item->canvas;
const gboolean resizing = ETHI_RESIZING (ethi);
- int x, y, start, col;
- int was_maybe_drag = 0;
+ gint x, y, start, col;
+ gint was_maybe_drag = 0;
switch (e->type){
case GDK_ENTER_NOTIFY:
@@ -1706,7 +1706,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
convert (canvas, e->motion.x, e->motion.y, &x, &y);
if (resizing){
- int new_width;
+ gint new_width;
if (ethi->resize_guide == NULL){
/* Quick hack until I actually bind the views */
@@ -1776,7 +1776,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
if (e->button.button != 1)
break;
else {
- int width = 0;
+ gint width = 0;
g_signal_emit_by_name (ethi->eth,
"request_width",
(int)ethi->resize_col, &width);
diff --git a/widgets/table/e-table-header-item.h b/widgets/table/e-table-header-item.h
index 24a86939d8..db2aeb3508 100644
--- a/widgets/table/e-table-header-item.h
+++ b/widgets/table/e-table-header-item.h
@@ -51,26 +51,26 @@ typedef struct {
/*
* Used during resizing; Could be shorts
*/
- int resize_col;
- int resize_start_pos;
- int resize_min_width;
+ gint resize_col;
+ gint resize_start_pos;
+ gint resize_min_width;
GtkObject *resize_guide;
- int group_indent_width;
+ gint group_indent_width;
/*
* Ids
*/
- int structure_change_id, dimension_change_id;
+ gint structure_change_id, dimension_change_id;
/*
* For dragging columns
*/
guint maybe_drag:1;
guint dnd_ready:1;
- int click_x, click_y;
- int drag_col, drop_col, drag_mark;
+ gint click_x, click_y;
+ gint drag_col, drop_col, drag_mark;
guint drag_motion_id, drag_end_id, drag_leave_id, drag_drop_id, drag_data_received_id, drag_data_get_id;
guint sort_info_changed_id, group_info_changed_id;
GnomeCanvasItem *remove_item;
@@ -84,11 +84,11 @@ typedef struct {
ETableSortInfo *sort_info;
guint scroll_direction : 4;
- int last_drop_x;
- int last_drop_y;
- int last_drop_time;
+ gint last_drop_x;
+ gint last_drop_y;
+ gint last_drop_time;
GdkDragContext *last_drop_context;
- int scroll_idle_id;
+ gint scroll_idle_id;
/* For adding fields. */
ETableHeader *full_header;
@@ -102,7 +102,7 @@ typedef struct {
} etfcd;
/* For keyboard navigation*/
- int selected_col;
+ gint selected_col;
} ETableHeaderItem;
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index ae5ebf871f..8044b73bfc 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -35,7 +35,7 @@
#include "e-table-header-utils.h"
static PangoLayout*
-build_header_layout (GtkWidget *widget, const char *str)
+build_header_layout (GtkWidget *widget, const gchar *str)
{
PangoLayout *layout;
@@ -70,8 +70,8 @@ build_header_layout (GtkWidget *widget, const char *str)
double
e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget)
{
- int ythick;
- int height;
+ gint ythick;
+ gint height;
PangoLayout *layout;
g_return_val_if_fail (ecol != NULL, -1);
@@ -111,13 +111,13 @@ e_table_header_width_extras (GtkStyle *style)
*/
static GdkPixmap *
make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc,
- GdkPixbuf *pixbuf, GdkColor *bg, int width, int height,
- int dither_xofs, int dither_yofs)
+ GdkPixbuf *pixbuf, GdkColor *bg, gint width, gint height,
+ gint dither_xofs, gint dither_yofs)
{
- int pwidth, pheight;
+ gint pwidth, pheight;
GdkPixmap *pixmap;
GdkPixbuf *tmp;
- int color;
+ gint color;
pwidth = gdk_pixbuf_get_width (pixbuf);
pheight = gdk_pixbuf_get_height (pixbuf);
@@ -141,7 +141,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc,
16,
color, color);
} else {
- int x, y, rowstride;
+ gint x, y, rowstride;
GdkPixbuf *fade;
guchar *pixels;
@@ -162,7 +162,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc,
for (y = 0; y < height; y++) {
guchar *p;
- int yfactor;
+ gint yfactor;
p = pixels + y * rowstride;
@@ -172,7 +172,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc,
yfactor = height;
for (x = 0; x < width; x++) {
- int xfactor;
+ gint xfactor;
if (width < pwidth)
xfactor = width - x;
@@ -238,12 +238,12 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc,
**/
static void
e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget,
- int x, int y, PangoLayout *layout, char *str,
- int max_width, gboolean center)
+ gint x, gint y, PangoLayout *layout, gchar *str,
+ gint max_width, gboolean center)
{
- int width;
- int height;
- int index;
+ gint width;
+ gint height;
+ gint index;
GSList *lines;
PangoLayoutLine *line;
@@ -257,7 +257,7 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget,
gdk_gc_set_clip_rectangle (gc, NULL);
if (width <= max_width) {
- int xpos;
+ gint xpos;
if (center)
xpos = x + (max_width - width) / 2;
@@ -268,8 +268,8 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget,
xpos, y,
layout);
} else {
- int arrow_width;
- int i;
+ gint arrow_width;
+ gint i;
if (max_width < ARROW_WIDTH + 1)
arrow_width = max_width - 1;
@@ -323,13 +323,13 @@ void
e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
GtkStyle *style, GtkStateType state,
GtkWidget *widget,
- int x, int y, int width, int height,
- int button_width, int button_height,
+ gint x, gint y, gint width, gint height,
+ gint button_width, gint button_height,
ETableColArrow arrow)
{
- int xthick, ythick;
- int inner_x, inner_y;
- int inner_width, inner_height;
+ gint xthick, ythick;
+ gint inner_x, inner_y;
+ gint inner_width, inner_height;
GdkGC *gc;
PangoLayout *layout;
static gpointer g_label = NULL;
@@ -385,7 +385,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
case E_TABLE_COL_ARROW_UP:
case E_TABLE_COL_ARROW_DOWN: {
- int arrow_width, arrow_height;
+ gint arrow_width, arrow_height;
arrow_width = MIN (MIN_ARROW_SIZE, inner_width);
arrow_height = MIN (MIN_ARROW_SIZE, inner_height);
@@ -413,9 +413,9 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
/* Pixbuf or label */
if (ecol->is_pixbuf) {
- int pwidth, pheight;
- int clip_width, clip_height;
- int xpos;
+ gint pwidth, pheight;
+ gint clip_width, clip_height;
+ gint xpos;
GdkPixmap *pixmap;
g_return_if_fail (ecol->pixbuf != NULL);
@@ -429,7 +429,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
xpos = inner_x;
if (inner_width - pwidth > 11) {
- int ypos;
+ gint ypos;
pango_layout_get_pixel_size (layout, &width, NULL);
diff --git a/widgets/table/e-table-header-utils.h b/widgets/table/e-table-header-utils.h
index 2ae1f79b1b..7804bd12c5 100644
--- a/widgets/table/e-table-header-utils.h
+++ b/widgets/table/e-table-header-utils.h
@@ -40,12 +40,12 @@ void e_table_header_draw_button (GdkDrawable *drawable,
GtkStyle *style,
GtkStateType state,
GtkWidget *widget,
- int x,
- int y,
- int width,
- int height,
- int button_width,
- int button_height,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ gint button_width,
+ gint button_height,
ETableColArrow arrow);
#ifdef __cplusplus
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index 6fd40ae0fa..b931f48e20 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -49,7 +49,7 @@ enum {
LAST_SIGNAL
};
-static void eth_set_size (ETableHeader *eth, int idx, int size);
+static void eth_set_size (ETableHeader *eth, gint idx, gint size);
static void eth_calc_widths (ETableHeader *eth);
static guint eth_signals [LAST_SIGNAL] = { 0, };
@@ -57,18 +57,18 @@ static guint eth_signals [LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE (ETableHeader, e_table_header, G_TYPE_OBJECT)
struct two_ints {
- int column;
- int width;
+ gint column;
+ gint width;
};
static void
-eth_set_width (ETableHeader *eth, int width)
+eth_set_width (ETableHeader *eth, gint width)
{
eth->width = width;
}
static void
-dequeue (ETableHeader *eth, int *column, int *width)
+dequeue (ETableHeader *eth, gint *column, gint *width)
{
GSList *head;
struct two_ints *store;
@@ -88,7 +88,7 @@ dequeue (ETableHeader *eth, int *column, int *width)
static gboolean
dequeue_idle (ETableHeader *eth)
{
- int column, width;
+ gint column, width;
dequeue (eth, &column, &width);
while (eth->change_queue && ((struct two_ints *) eth->change_queue->data)->column == column)
@@ -108,7 +108,7 @@ dequeue_idle (ETableHeader *eth)
}
static void
-enqueue (ETableHeader *eth, int column, int width)
+enqueue (ETableHeader *eth, gint column, gint width)
{
struct two_ints *store;
store = g_new(struct two_ints, 1);
@@ -125,7 +125,7 @@ enqueue (ETableHeader *eth, int column, int width)
}
void
-e_table_header_set_size (ETableHeader *eth, int idx, int 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));
@@ -134,7 +134,7 @@ e_table_header_set_size (ETableHeader *eth, int idx, int size)
}
static void
-eth_do_remove (ETableHeader *eth, int idx, gboolean do_unref)
+eth_do_remove (ETableHeader *eth, gint idx, gboolean do_unref)
{
if (do_unref)
g_object_unref (eth->columns [idx]);
@@ -148,8 +148,8 @@ static void
eth_finalize (GObject *object)
{
ETableHeader *eth = E_TABLE_HEADER (object);
- const int cols = eth->col_count;
- int i;
+ const gint cols = eth->col_count;
+ gint i;
if (eth->sort_info) {
if (eth->sort_info_group_change_id)
@@ -345,8 +345,8 @@ e_table_header_new (void)
static void
eth_update_offsets (ETableHeader *eth)
{
- int i;
- int x = 0;
+ gint i;
+ gint x = 0;
for (i = 0; i < eth->col_count; i++){
ETableCol *etc = eth->columns [i];
@@ -357,7 +357,7 @@ eth_update_offsets (ETableHeader *eth)
}
static void
-eth_do_insert (ETableHeader *eth, int pos, ETableCol *val)
+eth_do_insert (ETableHeader *eth, gint pos, ETableCol *val)
{
memmove (&eth->columns [pos+1], &eth->columns [pos],
sizeof (ETableCol *) * (eth->col_count - pos));
@@ -380,7 +380,7 @@ eth_do_insert (ETableHeader *eth, int pos, ETableCol *val)
* The ETableCol is assumed
*/
void
-e_table_header_add_column (ETableHeader *eth, ETableCol *tc, int 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));
@@ -411,7 +411,7 @@ e_table_header_add_column (ETableHeader *eth, ETableCol *tc, int pos)
* Returns: The ETableCol at @column in the @eth object
*/
ETableCol *
-e_table_header_get_column (ETableHeader *eth, int 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);
@@ -433,9 +433,9 @@ e_table_header_get_column (ETableHeader *eth, int column)
* Returns: The ETableCol with col_idx = @col_idx in the @eth object
*/
ETableCol *
-e_table_header_get_column_by_col_idx (ETableHeader *eth, int col_idx)
+e_table_header_get_column_by_col_idx (ETableHeader *eth, gint col_idx)
{
- int i;
+ gint i;
g_return_val_if_fail (eth != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), NULL);
@@ -454,7 +454,7 @@ e_table_header_get_column_by_col_idx (ETableHeader *eth, int col_idx)
*
* Returns: the number of columns in this ETableHeader.
*/
-int
+gint
e_table_header_count (ETableHeader *eth)
{
g_return_val_if_fail (eth != NULL, 0);
@@ -475,8 +475,8 @@ e_table_header_count (ETableHeader *eth)
*
* Returns: the column in the model that the @col column
* in the ETableHeader points to. */
-int
-e_table_header_index (ETableHeader *eth, int col)
+gint
+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);
@@ -496,10 +496,10 @@ e_table_header_index (ETableHeader *eth, int col)
* Returns: the column that contains pixel @x_offset, or -1
* if no column inside this ETableHeader contains that pixel.
*/
-int
-e_table_header_get_index_at (ETableHeader *eth, int x_offset)
+gint
+e_table_header_get_index_at (ETableHeader *eth, gint x_offset)
{
- int i, total;
+ gint i, total;
g_return_val_if_fail (eth != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
@@ -529,7 +529,7 @@ ETableCol **
e_table_header_get_columns (ETableHeader *eth)
{
ETableCol **ret;
- int i;
+ gint i;
g_return_val_if_fail (eth != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), NULL);
@@ -551,11 +551,11 @@ e_table_header_get_columns (ETableHeader *eth)
*
* Returns: The number of selected columns in the @eth object.
*/
-int
+gint
e_table_header_get_selected (ETableHeader *eth)
{
- int i;
- int selected = 0;
+ gint i;
+ gint selected = 0;
g_return_val_if_fail (eth != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
@@ -575,10 +575,10 @@ e_table_header_get_selected (ETableHeader *eth)
* Returns: the number of pixels used by the @eth object
* when rendered on screen
*/
-int
+gint
e_table_header_total_width (ETableHeader *eth)
{
- int total, i;
+ gint total, i;
g_return_val_if_fail (eth != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
@@ -596,10 +596,10 @@ e_table_header_total_width (ETableHeader *eth)
*
* Returns: the minimum number of pixels required by the @eth object.
**/
-int
+gint
e_table_header_min_width (ETableHeader *eth)
{
- int total, i;
+ gint total, i;
g_return_val_if_fail (eth != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
@@ -622,7 +622,7 @@ e_table_header_min_width (ETableHeader *eth)
* and "structure_change" will be emmited
*/
void
-e_table_header_move (ETableHeader *eth, int source_index, int target_index)
+e_table_header_move (ETableHeader *eth, gint source_index, gint target_index)
{
ETableCol *old;
@@ -654,7 +654,7 @@ e_table_header_move (ETableHeader *eth, int source_index, int target_index)
* This emmits the "structure_change" signal on the @eth object.
*/
void
-e_table_header_remove (ETableHeader *eth, int idx)
+e_table_header_remove (ETableHeader *eth, gint idx)
{
g_return_if_fail (eth != NULL);
g_return_if_fail (E_IS_TABLE_HEADER (eth));
@@ -677,16 +677,16 @@ e_table_header_set_selection (ETableHeader *eth, gboolean allow_selection)
}
static void
-eth_set_size (ETableHeader *eth, int idx, int size)
+eth_set_size (ETableHeader *eth, gint idx, gint size)
{
double expansion;
double old_expansion;
- int min_width;
- int left_width;
- int total_extra;
- int expandable_count;
- int usable_width;
- int i;
+ gint min_width;
+ gint left_width;
+ gint total_extra;
+ gint expandable_count;
+ gint usable_width;
+ gint i;
g_return_if_fail (eth != NULL);
g_return_if_fail (E_IS_TABLE_HEADER (eth));
g_return_if_fail (idx >= 0);
@@ -813,10 +813,10 @@ eth_set_size (ETableHeader *eth, int idx, int size)
* Returns: the number of pixels between @start_col and @end_col on the
* @eth ETableHeader object
*/
-int
-e_table_header_col_diff (ETableHeader *eth, int start_col, int end_col)
+gint
+e_table_header_col_diff (ETableHeader *eth, gint start_col, gint end_col)
{
- int total, col;
+ gint total, col;
g_return_val_if_fail (eth != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
@@ -838,13 +838,13 @@ e_table_header_col_diff (ETableHeader *eth, int start_col, int end_col)
static void
eth_calc_widths (ETableHeader *eth)
{
- int i;
- int extra;
+ gint i;
+ gint extra;
double expansion;
- int last_position = 0;
+ gint last_position = 0;
double next_position = 0;
- int last_resizable = -1;
- int *widths;
+ gint last_resizable = -1;
+ gint *widths;
gboolean changed;
widths = g_new (int, eth->col_count);
@@ -887,13 +887,13 @@ eth_calc_widths (ETableHeader *eth)
void
e_table_header_update_horizontal (ETableHeader *eth)
{
- int i;
- int cols;
+ gint i;
+ gint cols;
cols = eth->col_count;
for (i = 0; i < cols; i++) {
- int width = 0;
+ gint width = 0;
g_signal_emit_by_name (G_OBJECT (eth),
"request_width",
@@ -905,13 +905,13 @@ e_table_header_update_horizontal (ETableHeader *eth)
g_signal_emit (G_OBJECT (eth), eth_signals [EXPANSION_CHANGE], 0);
}
-int
+gint
e_table_header_prioritized_column (ETableHeader *eth)
{
- int best_model_col = 0;
- int best_priority;
- int i;
- int count;
+ gint best_model_col = 0;
+ gint best_priority;
+ gint i;
+ gint count;
count = e_table_header_count (eth);
if (count == 0)
@@ -919,7 +919,7 @@ e_table_header_prioritized_column (ETableHeader *eth)
best_priority = e_table_header_get_column (eth, 0)->priority;
best_model_col = e_table_header_get_column (eth, 0)->col_idx;
for (i = 1; i < count; i++) {
- int priority = e_table_header_get_column (eth, i)->priority;
+ gint priority = e_table_header_get_column (eth, i)->priority;
if (priority > best_priority) {
best_priority = priority;
best_model_col = e_table_header_get_column (eth, i)->col_idx;
@@ -932,9 +932,9 @@ ETableCol *
e_table_header_prioritized_column_selected (ETableHeader *eth, ETableColCheckFunc check_func, gpointer user_data)
{
ETableCol *best_col = NULL;
- int best_priority = G_MININT;
- int i;
- int count;
+ gint best_priority = G_MININT;
+ gint i;
+ gint count;
count = e_table_header_count (eth);
if (count == 0)
diff --git a/widgets/table/e-table-header.h b/widgets/table/e-table-header.h
index 00b145ef87..d724c2710f 100644
--- a/widgets/table/e-table-header.h
+++ b/widgets/table/e-table-header.h
@@ -49,13 +49,13 @@ typedef gboolean (*ETableColCheckFunc) (ETableCol *col, gpointer user_data);
struct _ETableHeader {
GObject base;
- int col_count;
- int width;
- int nominal_width;
- int width_extras;
+ gint col_count;
+ gint width;
+ gint nominal_width;
+ gint width_extras;
ETableSortInfo *sort_info;
- int sort_info_group_change_id;
+ gint sort_info_group_change_id;
ETableCol **columns;
@@ -67,9 +67,9 @@ typedef struct {
GObjectClass parent_class;
void (*structure_change) (ETableHeader *eth);
- void (*dimension_change) (ETableHeader *eth, int width);
+ void (*dimension_change) (ETableHeader *eth, gint width);
void (*expansion_change) (ETableHeader *eth);
- int (*request_width) (ETableHeader *eth, int col);
+ gint (*request_width) (ETableHeader *eth, gint col);
} ETableHeaderClass;
GType e_table_header_get_type (void);
@@ -77,39 +77,39 @@ ETableHeader *e_table_header_new (void);
void e_table_header_add_column (ETableHeader *eth,
ETableCol *tc,
- int pos);
+ gint pos);
ETableCol *e_table_header_get_column (ETableHeader *eth,
- int column);
+ gint column);
ETableCol *e_table_header_get_column_by_col_idx (ETableHeader *eth,
- int col_idx);
-int e_table_header_count (ETableHeader *eth);
-int e_table_header_index (ETableHeader *eth,
- int col);
-int e_table_header_get_index_at (ETableHeader *eth,
- int x_offset);
+ gint col_idx);
+gint e_table_header_count (ETableHeader *eth);
+gint e_table_header_index (ETableHeader *eth,
+ gint col);
+gint e_table_header_get_index_at (ETableHeader *eth,
+ gint x_offset);
ETableCol **e_table_header_get_columns (ETableHeader *eth);
-int e_table_header_get_selected (ETableHeader *eth);
+gint e_table_header_get_selected (ETableHeader *eth);
-int e_table_header_total_width (ETableHeader *eth);
-int e_table_header_min_width (ETableHeader *eth);
+gint e_table_header_total_width (ETableHeader *eth);
+gint e_table_header_min_width (ETableHeader *eth);
void e_table_header_move (ETableHeader *eth,
- int source_index,
- int target_index);
+ gint source_index,
+ gint target_index);
void e_table_header_remove (ETableHeader *eth,
- int idx);
+ gint idx);
void e_table_header_set_size (ETableHeader *eth,
- int idx,
- int size);
+ gint idx,
+ gint size);
void e_table_header_set_selection (ETableHeader *eth,
gboolean allow_selection);
-int e_table_header_col_diff (ETableHeader *eth,
- int start_col,
- int end_col);
+gint e_table_header_col_diff (ETableHeader *eth,
+ gint start_col,
+ gint end_col);
void e_table_header_calc_widths (ETableHeader *eth);
GList *e_table_header_get_selected_indexes (ETableHeader *eth);
void e_table_header_update_horizontal (ETableHeader *eth);
-int e_table_header_prioritized_column (ETableHeader *eth);
+gint e_table_header_prioritized_column (ETableHeader *eth);
ETableCol *e_table_header_prioritized_column_selected (ETableHeader *eth,
ETableColCheckFunc check_func,
gpointer user_data);
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index ce2484cafb..987b9610b3 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -108,23 +108,23 @@ enum {
#define TRIPLE_CLICK_TIME 500
-static int eti_get_height (ETableItem *eti);
-static int eti_row_height (ETableItem *eti, int row);
-static void e_table_item_focus (ETableItem *eti, int col, int row, GdkModifierType state);
-static void eti_cursor_change (ESelectionModel *selection, int row, int col, ETableItem *eti);
-static void eti_cursor_activated (ESelectionModel *selection, int row, int col, ETableItem *eti);
+static gint eti_get_height (ETableItem *eti);
+static gint eti_row_height (ETableItem *eti, gint row);
+static void e_table_item_focus (ETableItem *eti, gint col, gint row, GdkModifierType state);
+static void eti_cursor_change (ESelectionModel *selection, gint row, gint col, ETableItem *eti);
+static void eti_cursor_activated (ESelectionModel *selection, gint row, gint col, ETableItem *eti);
static void eti_selection_change (ESelectionModel *selection, ETableItem *eti);
-static void eti_selection_row_change (ESelectionModel *selection, int row, ETableItem *eti);
-static void e_table_item_redraw_row (ETableItem *eti, int row);
+static void eti_selection_row_change (ESelectionModel *selection, gint row, ETableItem *eti);
+static void e_table_item_redraw_row (ETableItem *eti, gint row);
#define ETI_SINGLE_ROW_HEIGHT(eti) ((eti)->uniform_row_height_cache != -1 ? (eti)->uniform_row_height_cache : eti_row_height((eti), -1))
#define ETI_MULTIPLE_ROW_HEIGHT(eti,row) ((eti)->height_cache && (eti)->height_cache[(row)] != -1 ? (eti)->height_cache[(row)] : eti_row_height((eti),(row)))
#define ETI_ROW_HEIGHT(eti,row) ((eti)->uniform_row_height ? ETI_SINGLE_ROW_HEIGHT ((eti)) : ETI_MULTIPLE_ROW_HEIGHT((eti),(row)))
inline static gint
-model_to_view_row(ETableItem *eti, int row)
+model_to_view_row(ETableItem *eti, gint row)
{
- int i;
+ gint i;
if (row == -1)
return -1;
if (eti->uses_source_model) {
@@ -144,7 +144,7 @@ model_to_view_row(ETableItem *eti, int row)
}
inline static gint
-view_to_model_row(ETableItem *eti, int row)
+view_to_model_row(ETableItem *eti, gint row)
{
if (eti->uses_source_model) {
ETableSubset *etss = E_TABLE_SUBSET(eti->table_model);
@@ -158,9 +158,9 @@ view_to_model_row(ETableItem *eti, int row)
}
inline static gint
-model_to_view_col(ETableItem *eti, int col)
+model_to_view_col(ETableItem *eti, gint col)
{
- int i;
+ gint i;
if (col == -1)
return -1;
for (i = 0; i < eti->cols; i++) {
@@ -172,7 +172,7 @@ model_to_view_col(ETableItem *eti, int col)
}
inline static gint
-view_to_model_col(ETableItem *eti, int 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;
@@ -243,7 +243,7 @@ eti_editing (ETableItem *eti)
}
inline static GdkColor *
-eti_get_cell_background_color (ETableItem *eti, int row, int 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 = GTK_WIDGET(GNOME_CANVAS_ITEM(eti)->canvas);
@@ -291,7 +291,7 @@ eti_get_cell_background_color (ETableItem *eti, int row, int col, gboolean selec
}
inline static GdkColor *
-eti_get_cell_foreground_color (ETableItem *eti, int row, int col, gboolean selected, gboolean *allocated)
+eti_get_cell_foreground_color (ETableItem *eti, gint row, gint col, gboolean selected, gboolean *allocated)
{
GtkWidget *canvas = GTK_WIDGET(GNOME_CANVAS_ITEM(eti)->canvas);
GdkColor *foreground;
@@ -336,7 +336,7 @@ eti_free_save_state (ETableItem *eti)
static void
eti_realize_cell_views ( ETableItem *eti)
{
- int i;
+ gint i;
if (eti->cell_views_realized)
return;
@@ -352,7 +352,7 @@ eti_realize_cell_views ( ETableItem *eti)
static void
eti_attach_cell_views (ETableItem *eti)
{
- int i;
+ gint i;
g_return_if_fail (eti->header);
g_return_if_fail (eti->table_model);
@@ -390,7 +390,7 @@ eti_attach_cell_views (ETableItem *eti)
static void
eti_unrealize_cell_views (ETableItem *eti)
{
- int i;
+ gint i;
if (eti->cell_views_realized == 0)
return;
@@ -405,7 +405,7 @@ eti_unrealize_cell_views (ETableItem *eti)
static void
eti_detach_cell_views (ETableItem *eti)
{
- int i;
+ gint i;
eti_free_save_state (eti);
@@ -449,7 +449,7 @@ eti_reflow (GnomeCanvasItem *item, gint flags)
ETableItem *eti = E_TABLE_ITEM (item);
if (eti->needs_compute_height) {
- int new_height = eti_get_height (eti);
+ gint new_height = eti_get_height (eti);
if (new_height != eti->height) {
eti->height = new_height;
@@ -460,7 +460,7 @@ eti_reflow (GnomeCanvasItem *item, gint flags)
eti->needs_compute_height = 0;
}
if (eti->needs_compute_width) {
- int new_width = e_table_header_total_width(eti->header);
+ gint new_width = e_table_header_total_width(eti->header);
if (new_width != eti->width) {
eti->width = new_width;
e_canvas_item_request_parent_reflow (GNOME_CANVAS_ITEM (eti));
@@ -475,7 +475,7 @@ eti_reflow (GnomeCanvasItem *item, gint flags)
* GnomeCanvasItem::update method
*/
static void
-eti_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
+eti_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags)
{
ArtPoint o1, o2;
ETableItem *eti = E_TABLE_ITEM (item);
@@ -610,11 +610,11 @@ eti_remove_header_model (ETableItem *eti)
* used as a separator between rows
*/
static int
-eti_row_height_real (ETableItem *eti, int row)
+eti_row_height_real (ETableItem *eti, gint row)
{
- const int cols = e_table_header_count (eti->header);
- int col;
- int h, max_h;
+ const gint cols = e_table_header_count (eti->header);
+ gint col;
+ gint h, max_h;
g_return_val_if_fail (cols == 0 || eti->cell_views, 0);
@@ -632,7 +632,7 @@ eti_row_height_real (ETableItem *eti, int row)
static void
confirm_height_cache (ETableItem *eti)
{
- int i;
+ gint i;
if (eti->uniform_row_height || eti->height_cache)
return;
@@ -645,8 +645,8 @@ confirm_height_cache (ETableItem *eti)
static gboolean
height_cache_idle(ETableItem *eti)
{
- int changed = 0;
- int i;
+ gint changed = 0;
+ gint i;
confirm_height_cache(eti);
for (i = eti->height_cache_idle_count; i < eti->rows; i++) {
if (eti->height_cache[i] == -1) {
@@ -699,7 +699,7 @@ calculate_height_cache (ETableItem *eti)
* used as a separator between rows
*/
static int
-eti_row_height (ETableItem *eti, int row)
+eti_row_height (ETableItem *eti, gint row)
{
if (eti->uniform_row_height) {
eti->uniform_row_height_cache = eti_row_height_real (eti, -1);
@@ -737,21 +737,21 @@ eti_row_height (ETableItem *eti, int row)
static int
eti_get_height (ETableItem *eti)
{
- const int rows = eti->rows;
- int height_extra = eti->horizontal_draw_grid ? 1 : 0;
+ const gint rows = eti->rows;
+ gint height_extra = eti->horizontal_draw_grid ? 1 : 0;
if (rows == 0)
return 0;
if (eti->uniform_row_height) {
- int row_height = eti_row_height(eti, -1);
+ gint row_height = eti_row_height(eti, -1);
return ((row_height + height_extra) * rows + height_extra);
} else {
- int height;
- int row;
+ gint height;
+ gint row;
if (eti->length_threshold != -1){
if (rows > eti->length_threshold){
- int row_height = eti_row_height(eti, 0);
+ gint row_height = eti_row_height(eti, 0);
if (eti->height_cache) {
height = 0;
for (row = 0; row < rows; row++) {
@@ -781,7 +781,7 @@ eti_get_height (ETableItem *eti)
}
static void
-eti_item_region_redraw (ETableItem *eti, int x0, int y0, int x1, int y1)
+eti_item_region_redraw (ETableItem *eti, gint x0, gint y0, gint x1, gint y1)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
ArtDRect rect;
@@ -801,10 +801,10 @@ eti_item_region_redraw (ETableItem *eti, int x0, int y0, int x1, int y1)
/*
* Computes the distance between @start_row and @end_row in pixels
*/
-int
-e_table_item_row_diff (ETableItem *eti, int start_row, int end_row)
+gint
+e_table_item_row_diff (ETableItem *eti, gint start_row, gint end_row)
{
- int height_extra = eti->horizontal_draw_grid ? 1 : 0;
+ gint height_extra = eti->horizontal_draw_grid ? 1 : 0;
if (start_row < 0)
start_row = 0;
@@ -814,7 +814,7 @@ e_table_item_row_diff (ETableItem *eti, int start_row, int end_row)
if (eti->uniform_row_height) {
return ((end_row - start_row) * (eti_row_height(eti, -1) + height_extra));
} else {
- int row, total;
+ gint row, total;
total = 0;
for (row = start_row; row < end_row; row++)
total += eti_row_height (eti, row) + height_extra;
@@ -825,12 +825,12 @@ e_table_item_row_diff (ETableItem *eti, int start_row, int end_row)
static void
eti_get_region (ETableItem *eti,
- int start_col, int start_row,
- int end_col, int end_row,
- int *x1p, int *y1p,
- int *x2p, int *y2p)
+ gint start_col, gint start_row,
+ gint end_col, gint end_row,
+ gint *x1p, gint *y1p,
+ gint *x2p, gint *y2p)
{
- int x1, y1, x2, y2;
+ gint x1, y1, x2, y2;
x1 = e_table_header_col_diff (eti->header, 0, start_col);
y1 = e_table_item_row_diff (eti, 0, start_row);
@@ -858,10 +858,10 @@ eti_get_region (ETableItem *eti,
*/
static void
eti_request_region_redraw (ETableItem *eti,
- int start_col, int start_row,
- int end_col, int end_row, int border)
+ gint start_col, gint start_row,
+ gint end_col, gint end_row, gint border)
{
- int x1, y1, x2, y2;
+ gint x1, y1, x2, y2;
if (eti->rows > 0) {
@@ -885,10 +885,10 @@ eti_request_region_redraw (ETableItem *eti,
*/
static void
eti_request_region_show (ETableItem *eti,
- int start_col, int start_row,
- int end_col, int end_row, int delay)
+ gint start_col, gint start_row,
+ gint end_col, gint end_row, gint delay)
{
- int x1, y1, x2, y2;
+ gint x1, y1, x2, y2;
eti_get_region (eti,
start_col, start_row,
@@ -902,9 +902,9 @@ eti_request_region_show (ETableItem *eti,
}
static void
-eti_show_cursor (ETableItem *eti, int delay)
+eti_show_cursor (ETableItem *eti, gint delay)
{
- int cursor_row;
+ gint cursor_row;
if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
return;
@@ -953,8 +953,8 @@ eti_check_cursor_on_screen (ETableItem *eti)
static void
eti_check_cursor_bounds (ETableItem *eti)
{
- int x1, y1, x2, y2;
- int cursor_row;
+ gint x1, y1, x2, y2;
+ gint cursor_row;
if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
return;
@@ -1002,7 +1002,7 @@ eti_check_cursor_bounds (ETableItem *eti)
}
static void
-eti_maybe_show_cursor(ETableItem *eti, int 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)
@@ -1122,7 +1122,7 @@ eti_table_model_changed (ETableModel *table_model, ETableItem *eti)
}
static void
-eti_table_model_row_changed (ETableModel *table_model, int row, ETableItem *eti)
+eti_table_model_row_changed (ETableModel *table_model, gint row, ETableItem *eti)
{
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) {
eti_unfreeze (eti);
@@ -1140,7 +1140,7 @@ eti_table_model_row_changed (ETableModel *table_model, int row, ETableItem *eti)
}
static void
-eti_table_model_cell_changed (ETableModel *table_model, int col, int row, ETableItem *eti)
+eti_table_model_cell_changed (ETableModel *table_model, gint col, gint row, ETableItem *eti)
{
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) {
eti_unfreeze (eti);
@@ -1158,7 +1158,7 @@ eti_table_model_cell_changed (ETableModel *table_model, int col, int row, ETable
}
static void
-eti_table_model_rows_inserted (ETableModel *table_model, int row, int count, ETableItem *eti)
+eti_table_model_rows_inserted (ETableModel *table_model, gint row, gint count, ETableItem *eti)
{
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) {
eti_unfreeze (eti);
@@ -1167,7 +1167,7 @@ eti_table_model_rows_inserted (ETableModel *table_model, int row, int count, ETa
eti->rows = e_table_model_row_count (eti->table_model);
if (eti->height_cache) {
- int i;
+ gint i;
eti->height_cache = g_renew(int, eti->height_cache, eti->rows);
memmove(eti->height_cache + row + count, eti->height_cache + row, (eti->rows - count - row) * sizeof(int));
for (i = row; i < row + count; i++)
@@ -1185,7 +1185,7 @@ eti_table_model_rows_inserted (ETableModel *table_model, int row, int count, ETa
}
static void
-eti_table_model_rows_deleted (ETableModel *table_model, int row, int count, ETableItem *eti)
+eti_table_model_rows_deleted (ETableModel *table_model, gint row, gint count, ETableItem *eti)
{
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) {
eti_unfreeze (eti);
@@ -1221,11 +1221,11 @@ eti_table_model_rows_deleted (ETableModel *table_model, int row, int count, ETab
*/
void
e_table_item_redraw_range (ETableItem *eti,
- int start_col, int start_row,
- int end_col, int end_row)
+ gint start_col, gint start_row,
+ gint end_col, gint end_row)
{
- int border;
- int cursor_col, cursor_row;
+ gint border;
+ gint cursor_col, cursor_row;
g_return_if_fail (eti != NULL);
g_return_if_fail (E_IS_TABLE_ITEM (eti));
@@ -1248,7 +1248,7 @@ e_table_item_redraw_range (ETableItem *eti,
static void
e_table_item_redraw_row (ETableItem *eti,
- int row)
+ gint row)
{
if (row != -1)
e_table_item_redraw_range (eti, 0, row, eti->cols - 1, row);
@@ -1337,7 +1337,7 @@ eti_add_selection_model (ETableItem *eti, ESelectionModel *selection)
}
static void
-eti_header_dim_changed (ETableHeader *eth, int 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));
@@ -1373,9 +1373,9 @@ eti_header_structure_changed (ETableHeader *eth, ETableItem *eti)
}
static int
-eti_request_column_width (ETableHeader *eth, int col, ETableItem *eti)
+eti_request_column_width (ETableHeader *eth, gint col, ETableItem *eti)
{
- int width = 0;
+ gint width = 0;
if (eti->cell_views && eti->cell_views_realized) {
width = e_cell_max_width (eti->cell_views[col], view_to_model_col(eti, col), col);
@@ -1462,7 +1462,7 @@ static void
eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
ETableItem *eti;
- int cursor_col;
+ gint cursor_col;
eti = E_TABLE_ITEM (object);
@@ -1546,7 +1546,7 @@ static void
eti_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
ETableItem *eti;
- int row;
+ gint row;
eti = E_TABLE_ITEM (object);
@@ -1653,7 +1653,7 @@ eti_init (ETableItem *eti)
#define gray50_width 2
#define gray50_height 2
-static const char gray50_bits[] = {
+static const gchar gray50_bits[] = {
0x02, 0x01, };
static void
@@ -1729,7 +1729,7 @@ eti_realize (GnomeCanvasItem *item)
free_height_cache(eti);
if (item->canvas->focused_item == NULL && eti->selection) {
- int row;
+ gint row;
row = e_selection_model_cursor_row (E_SELECTION_MODEL (eti->selection));
row = model_to_view_row(eti, row);
@@ -1815,21 +1815,21 @@ eti_unrealize (GnomeCanvasItem *item)
static void
-eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height)
+eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height)
{
ETableItem *eti = E_TABLE_ITEM (item);
- const int rows = eti->rows;
- const int cols = eti->cols;
- int row, col;
- int first_col, last_col, x_offset;
- int first_row, last_row, y_offset, yd;
- int x1, x2;
- int f_x1, f_x2, f_y1, f_y2;
+ const gint rows = eti->rows;
+ const gint cols = eti->cols;
+ gint row, col;
+ gint first_col, last_col, x_offset;
+ gint first_row, last_row, y_offset, yd;
+ gint x1, x2;
+ gint f_x1, f_x2, f_y1, f_y2;
gboolean f_found;
double i2c [6];
ArtPoint eti_base, eti_base_item, lower_right;
GtkWidget *canvas = GTK_WIDGET(item->canvas);
- int height_extra = eti->horizontal_draw_grid ? 1 : 0;
+ gint height_extra = eti->horizontal_draw_grid ? 1 : 0;
cairo_t *cr;
cr = gdk_cairo_create (drawable);
@@ -1888,7 +1888,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
if (last_row > eti->rows)
last_row = eti->rows;
} else {
- int y1, y2;
+ gint y1, y2;
y_offset = 0;
first_row = -1;
@@ -1934,7 +1934,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
yd += height_extra;
for (row = first_row; row < last_row; row++){
- int xd;
+ gint xd;
gboolean selected;
gint cursor_col, cursor_row;
@@ -1957,7 +1957,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
ECellFlags flags;
gboolean free_background;
GdkColor *background;
- int x1, x2, y1, y2;
+ gint x1, x2, y1, y2;
cairo_pattern_t *pat;
switch (eti->cursor_mode) {
@@ -2082,7 +2082,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
}
if (eti->vertical_draw_grid){
- int xd = x_offset;
+ gint xd = x_offset;
for (col = first_col; col <= last_col; col++){
ETableCol *ecol = e_table_header_get_column (eti->header, col);
@@ -2113,7 +2113,7 @@ exit:
}
static double
-eti_point (GnomeCanvasItem *item, double x, double y, int cx, int cy,
+eti_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy,
GnomeCanvasItem **actual_item)
{
*actual_item = item;
@@ -2122,14 +2122,14 @@ eti_point (GnomeCanvasItem *item, double x, double y, int cx, int cy,
}
static gboolean
-find_cell (ETableItem *eti, double x, double y, int *view_col_res, int *view_row_res, double *x1_res, double *y1_res)
+find_cell (ETableItem *eti, double x, double y, gint *view_col_res, gint *view_row_res, double *x1_res, double *y1_res)
{
- const int cols = eti->cols;
- const int rows = eti->rows;
+ const gint cols = eti->cols;
+ const gint rows = eti->rows;
gdouble x1, y1, x2, y2;
- int col, row;
+ gint col, row;
- int height_extra = eti->horizontal_draw_grid ? 1 : 0;
+ gint height_extra = eti->horizontal_draw_grid ? 1 : 0;
/* FIXME: this routine is inneficient, fix later */
@@ -2200,7 +2200,7 @@ eti_cursor_move (ETableItem *eti, gint row, gint column)
static void
eti_cursor_move_left (ETableItem *eti)
{
- int cursor_col, cursor_row;
+ gint cursor_col, cursor_row;
g_object_get(eti->selection,
"cursor_col", &cursor_col,
"cursor_row", &cursor_row,
@@ -2212,7 +2212,7 @@ eti_cursor_move_left (ETableItem *eti)
static void
eti_cursor_move_right (ETableItem *eti)
{
- int cursor_col, cursor_row;
+ gint cursor_col, cursor_row;
g_object_get(eti->selection,
"cursor_col", &cursor_col,
"cursor_row", &cursor_row,
@@ -2229,7 +2229,7 @@ _do_tooltip (ETableItem *eti)
gboolean free_color;
ETableCol *ecol;
gboolean selected;
- int cursor_row, cursor_col;
+ gint cursor_row, cursor_col;
e_canvas_hide_tooltip (E_CANVAS(GNOME_CANVAS_ITEM(eti)->canvas));
@@ -2287,7 +2287,7 @@ _do_tooltip (ETableItem *eti)
#endif
static gint
-eti_e_cell_event (ETableItem *item, ECellView *ecell_view, GdkEvent *event, int time, int model_col, int view_col, int 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;
@@ -2330,7 +2330,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
double x1, y1;
double realx, realy;
GdkEventButton button;
- int col, row;
+ gint col, row;
gint cursor_row, cursor_col;
gint new_cursor_row, new_cursor_col;
ECellFlags flags = 0;
@@ -2457,7 +2457,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_BUTTON_RELEASE: {
double x1, y1;
- int col, row;
+ gint col, row;
gint cursor_row, cursor_col;
d(g_print("%s: GDK_BUTTON_RELEASE received, button %d\n", __FUNCTION__, e->button.button));
@@ -2540,7 +2540,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
}
case GDK_2BUTTON_PRESS: {
- int model_col, model_row;
+ gint model_col, model_row;
#if 0
double x1, y1;
#endif
@@ -2596,7 +2596,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
break;
}
case GDK_MOTION_NOTIFY: {
- int col, row, flags;
+ gint col, row, flags;
double x1, y1;
gint cursor_col, cursor_row;
@@ -2956,8 +2956,8 @@ eti_style_set (ETableItem *eti, GtkStyle *previous_style)
return;
if (eti->cell_views_realized) {
- int i;
- int n_cells = eti->n_cells;
+ gint i;
+ gint n_cells = eti->n_cells;
for (i = 0; i < n_cells; i++) {
e_cell_style_set (eti->cell_views[i], previous_style);
@@ -3209,13 +3209,13 @@ eti_class_init (ETableItemClass *klass)
* This routine sets the cursor of the %ETableItem canvas item.
*/
void
-e_table_item_set_cursor (ETableItem *eti, int col, int 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, int col, int 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));
@@ -3246,7 +3246,7 @@ e_table_item_focus (ETableItem *eti, int col, int row, GdkModifierType state)
gint
e_table_item_get_focused_column (ETableItem *eti)
{
- int cursor_col;
+ gint cursor_col;
g_return_val_if_fail (eti != NULL, -1);
g_return_val_if_fail (E_IS_TABLE_ITEM (eti), -1);
@@ -3259,9 +3259,9 @@ e_table_item_get_focused_column (ETableItem *eti)
}
static void
-eti_cursor_change (ESelectionModel *selection, int row, int col, ETableItem *eti)
+eti_cursor_change (ESelectionModel *selection, gint row, gint col, ETableItem *eti)
{
- int view_row;
+ gint view_row;
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
return;
@@ -3297,10 +3297,10 @@ eti_cursor_change (ESelectionModel *selection, int row, int col, ETableItem *eti
}
static void
-eti_cursor_activated (ESelectionModel *selection, int row, int col, ETableItem *eti)
+eti_cursor_activated (ESelectionModel *selection, gint row, gint col, ETableItem *eti)
{
- int view_row;
- int view_col;
+ gint view_row;
+ gint view_col;
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
return;
@@ -3338,7 +3338,7 @@ eti_selection_change (ESelectionModel *selection, ETableItem *eti)
}
static void
-eti_selection_row_change (ESelectionModel *selection, int row, ETableItem *eti)
+eti_selection_row_change (ESelectionModel *selection, gint row, ETableItem *eti)
{
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
return;
@@ -3359,7 +3359,7 @@ eti_selection_row_change (ESelectionModel *selection, int row, ETableItem *eti)
* column and row.
*/
void
-e_table_item_enter_edit (ETableItem *eti, int col, int 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));
@@ -3384,8 +3384,8 @@ e_table_item_enter_edit (ETableItem *eti, int col, int row)
void
e_table_item_leave_edit (ETableItem *eti)
{
- int col, row;
- void *edit_ctx;
+ gint col, row;
+ gpointer edit_ctx;
g_return_if_fail (eti != NULL);
g_return_if_fail (E_IS_TABLE_ITEM (eti));
@@ -3424,14 +3424,14 @@ e_table_item_leave_edit (ETableItem *eti)
*/
void
e_table_item_compute_location (ETableItem *eti,
- int *x,
- int *y,
- int *row,
- int *col)
+ 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. */
- int grabbed_row = eti->grabbed_row;
+ gint grabbed_row = eti->grabbed_row;
eti->grabbed_row = -1;
if (!find_cell (eti, *x, *y, col, row, NULL, NULL)) {
@@ -3448,15 +3448,15 @@ e_table_item_compute_location (ETableItem *eti,
**/
void
e_table_item_compute_mouse_over (ETableItem *eti,
- int x,
- int y,
- int *row,
- int *col)
+ gint x,
+ gint y,
+ gint *row,
+ gint *col)
{
double realx, realy;
/* Save the grabbed row but make sure that we don't get flawed
results because the cursor is grabbed. */
- int grabbed_row = eti->grabbed_row;
+ gint grabbed_row = eti->grabbed_row;
eti->grabbed_row = -1;
realx = x;
@@ -3474,12 +3474,12 @@ e_table_item_compute_mouse_over (ETableItem *eti,
void
e_table_item_get_cell_geometry (ETableItem *eti,
- int *row,
- int *col,
- int *x,
- int *y,
- int *width,
- int *height)
+ gint *row,
+ gint *col,
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height)
{
if (eti->rows > *row) {
if (x)
@@ -3499,16 +3499,16 @@ e_table_item_get_cell_geometry (ETableItem *eti,
typedef struct {
ETableItem *item;
- int rows_printed;
+ gint rows_printed;
} ETableItemPrintContext;
static gdouble *
e_table_item_calculate_print_widths (ETableHeader *eth, gdouble width)
{
- int i;
+ gint i;
double extra;
double expansion;
- int last_resizable = -1;
+ gint last_resizable = -1;
gdouble scale = 1.0L;
gdouble *widths = g_new(gdouble, e_table_header_count(eth));
/* - 1 to account for the last pixel border. */
@@ -3531,8 +3531,8 @@ e_table_item_calculate_print_widths (ETableHeader *eth, gdouble width)
static gdouble
eti_printed_row_height (ETableItem *eti, gdouble *widths, GtkPrintContext *context, gint row)
{
- int col;
- int cols = eti->cols;
+ gint col;
+ gint cols = eti->cols;
gdouble height = 0;
for (col = 0; col < cols; col++) {
ECellView *ecell_view = eti->cell_views [col];
@@ -3568,11 +3568,11 @@ e_table_item_print_page (EPrintable *ep,
ETableItemPrintContext *itemcontext)
{
ETableItem *eti = itemcontext->item;
- const int rows = eti->rows;
- const int cols = eti->cols;
+ const gint rows = eti->rows;
+ const gint cols = eti->cols;
gdouble max_height;
- int rows_printed = itemcontext->rows_printed;
- int row, col, next_page = 0;
+ gint rows_printed = itemcontext->rows_printed;
+ gint row, col, next_page = 0;
double yd = height;
cairo_t *cr;
gdouble *widths;
@@ -3655,7 +3655,7 @@ e_table_item_data_left (EPrintable *ep,
ETableItemPrintContext *itemcontext)
{
ETableItem *item = itemcontext->item;
- int rows_printed = itemcontext->rows_printed;
+ gint rows_printed = itemcontext->rows_printed;
g_signal_stop_emission_by_name(ep, "data_left");
return rows_printed < item->rows;
@@ -3677,10 +3677,10 @@ e_table_item_height (EPrintable *ep,
ETableItemPrintContext *itemcontext)
{
ETableItem *item = itemcontext->item;
- const int rows = item->rows;
- int rows_printed = itemcontext->rows_printed;
+ const gint rows = item->rows;
+ gint rows_printed = itemcontext->rows_printed;
gdouble *widths;
- int row;
+ gint row;
gdouble yd = 0;
widths = e_table_item_calculate_print_widths (itemcontext->item->header, width);
@@ -3727,10 +3727,10 @@ e_table_item_will_fit (EPrintable *ep,
ETableItemPrintContext *itemcontext)
{
ETableItem *item = itemcontext->item;
- const int rows = item->rows;
- int rows_printed = itemcontext->rows_printed;
+ const gint rows = item->rows;
+ gint rows_printed = itemcontext->rows_printed;
gdouble *widths;
- int row;
+ gint row;
gdouble yd = 0;
gboolean ret_val = TRUE;
diff --git a/widgets/table/e-table-item.h b/widgets/table/e-table-item.h
index befadb77ca..0536367c99 100644
--- a/widgets/table/e-table-item.h
+++ b/widgets/table/e-table-item.h
@@ -49,41 +49,41 @@ typedef struct {
ETableModel *source_model;
ESelectionModel *selection;
- int x1, y1;
- int minimum_width, width, height;
+ gint x1, y1;
+ gint minimum_width, width, height;
- int cols, rows;
+ gint cols, rows;
- int click_count;
+ gint click_count;
/*
* Ids for the signals we connect to
*/
- int header_dim_change_id;
- int header_structure_change_id;
- int header_request_width_id;
- int table_model_pre_change_id;
- int table_model_no_change_id;
- int table_model_change_id;
- int table_model_row_change_id;
- int table_model_cell_change_id;
- int table_model_rows_inserted_id;
- int table_model_rows_deleted_id;
-
- int selection_change_id;
- int selection_row_change_id;
- int cursor_change_id;
- int cursor_activated_id;
+ gint header_dim_change_id;
+ gint header_structure_change_id;
+ gint header_request_width_id;
+ gint table_model_pre_change_id;
+ gint table_model_no_change_id;
+ gint table_model_change_id;
+ gint table_model_row_change_id;
+ gint table_model_cell_change_id;
+ gint table_model_rows_inserted_id;
+ gint table_model_rows_deleted_id;
+
+ gint selection_change_id;
+ gint selection_row_change_id;
+ gint cursor_change_id;
+ gint cursor_activated_id;
guint cursor_idle_id;
/* View row, -1 means unknown */
- int old_cursor_row;
+ gint old_cursor_row;
- int hadjustment_change_id;
- int hadjustment_value_change_id;
- int vadjustment_change_id;
- int vadjustment_value_change_id;
+ gint hadjustment_change_id;
+ gint hadjustment_value_change_id;
+ gint vadjustment_change_id;
+ gint vadjustment_value_change_id;
GdkGC *fill_gc;
GdkGC *grid_gc;
@@ -117,52 +117,52 @@ typedef struct {
guint queue_show_cursor : 1;
guint grab_cancelled : 1;
- int frozen_count;
+ gint frozen_count;
- int cursor_x1;
- int cursor_y1;
- int cursor_x2;
- int cursor_y2;
+ gint cursor_x1;
+ gint cursor_y1;
+ gint cursor_x2;
+ gint cursor_y2;
- int drag_col;
- int drag_row;
- int drag_x;
- int drag_y;
+ gint drag_col;
+ gint drag_row;
+ gint drag_x;
+ gint drag_y;
guint drag_state;
/*
* Realized views, per column
*/
ECellView **cell_views;
- int n_cells;
+ gint n_cells;
- int *height_cache;
- int uniform_row_height_cache;
- int height_cache_idle_id;
- int height_cache_idle_count;
+ gint *height_cache;
+ gint uniform_row_height_cache;
+ gint height_cache_idle_id;
+ gint height_cache_idle_count;
/*
* Lengh Threshold: above this, we stop computing correctly
* the size
*/
- int length_threshold;
+ gint length_threshold;
gint row_guess;
ECursorMode cursor_mode;
- int motion_col, motion_row;
+ gint motion_col, motion_row;
/*
* During editing
*/
- int editing_col, editing_row;
+ gint editing_col, editing_row;
void *edit_ctx;
- int save_col, save_row;
+ gint save_col, save_row;
void *save_state;
- int grabbed_col, grabbed_row;
- int grabbed_count;
+ gint grabbed_col, grabbed_row;
+ gint grabbed_count;
/*
* Tooltip
@@ -174,13 +174,13 @@ typedef struct {
typedef struct {
GnomeCanvasItemClass parent_class;
- void (*cursor_change) (ETableItem *eti, int row);
- void (*cursor_activated) (ETableItem *eti, int row);
- void (*double_click) (ETableItem *eti, int row, int col, GdkEvent *event);
- gint (*right_click) (ETableItem *eti, int row, int col, GdkEvent *event);
- gint (*click) (ETableItem *eti, int row, int col, GdkEvent *event);
- gint (*key_press) (ETableItem *eti, int row, int col, GdkEvent *event);
- gint (*start_drag) (ETableItem *eti, int row, int col, GdkEvent *event);
+ void (*cursor_change) (ETableItem *eti, gint row);
+ void (*cursor_activated) (ETableItem *eti, gint row);
+ void (*double_click) (ETableItem *eti, gint row, gint col, GdkEvent *event);
+ gint (*right_click) (ETableItem *eti, gint row, gint col, GdkEvent *event);
+ gint (*click) (ETableItem *eti, gint row, gint col, GdkEvent *event);
+ gint (*key_press) (ETableItem *eti, gint row, gint col, GdkEvent *event);
+ gint (*start_drag) (ETableItem *eti, gint row, gint col, GdkEvent *event);
void (*style_set) (ETableItem *eti, GtkStyle *previous_style);
void (*selection_model_removed) (ETableItem *eti, ESelectionModel *selection);
void (*selection_model_added) (ETableItem *eti, ESelectionModel *selection);
@@ -192,40 +192,40 @@ GType e_table_item_get_type (void);
* Focus
*/
void e_table_item_set_cursor (ETableItem *eti,
- int col,
- int row);
+ gint col,
+ gint row);
gint e_table_item_get_focused_column (ETableItem *eti);
void e_table_item_leave_edit (ETableItem *eti);
void e_table_item_enter_edit (ETableItem *eti,
- int col,
- int row);
+ gint col,
+ gint row);
void e_table_item_redraw_range (ETableItem *eti,
- int start_col,
- int start_row,
- int end_col,
- int end_row);
+ gint start_col,
+ gint start_row,
+ gint end_col,
+ gint end_row);
EPrintable *e_table_item_get_printable (ETableItem *eti);
void e_table_item_compute_location (ETableItem *eti,
- int *x,
- int *y,
- int *row,
- int *col);
+ gint *x,
+ gint *y,
+ gint *row,
+ gint *col);
void e_table_item_compute_mouse_over (ETableItem *eti,
- int x,
- int y,
- int *row,
- int *col);
+ gint x,
+ gint y,
+ gint *row,
+ gint *col);
void e_table_item_get_cell_geometry (ETableItem *eti,
- int *row,
- int *col,
- int *x,
- int *y,
- int *width,
- int *height);
+ gint *row,
+ gint *col,
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height);
int e_table_item_row_diff (ETableItem *eti,
int start_row,
diff --git a/widgets/table/e-table-memory-callbacks.c b/widgets/table/e-table-memory-callbacks.c
index b1833aa2e1..c06303ca4b 100644
--- a/widgets/table/e-table-memory-callbacks.c
+++ b/widgets/table/e-table-memory-callbacks.c
@@ -40,8 +40,8 @@ etmc_column_count (ETableModel *etm)
return 0;
}
-static void *
-etmc_value_at (ETableModel *etm, int col, int row)
+static gpointer
+etmc_value_at (ETableModel *etm, gint col, gint row)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
@@ -52,7 +52,7 @@ etmc_value_at (ETableModel *etm, int col, int row)
}
static void
-etmc_set_value_at (ETableModel *etm, int col, int row, const void *val)
+etmc_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
@@ -61,7 +61,7 @@ etmc_set_value_at (ETableModel *etm, int col, int row, const void *val)
}
static gboolean
-etmc_is_cell_editable (ETableModel *etm, int col, int row)
+etmc_is_cell_editable (ETableModel *etm, gint col, gint row)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
@@ -72,19 +72,19 @@ etmc_is_cell_editable (ETableModel *etm, int col, int row)
}
/* The default for etmc_duplicate_value is to return the raw value. */
-static void *
-etmc_duplicate_value (ETableModel *etm, int col, const void *value)
+static gpointer
+etmc_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
if (etmc->duplicate_value)
return etmc->duplicate_value (etm, col, value, etmc->data);
else
- return (void *)value;
+ return (gpointer)value;
}
static void
-etmc_free_value (ETableModel *etm, int col, void *value)
+etmc_free_value (ETableModel *etm, gint col, gpointer value)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
@@ -92,8 +92,8 @@ etmc_free_value (ETableModel *etm, int col, void *value)
etmc->free_value (etm, col, value, etmc->data);
}
-static void *
-etmc_initialize_value (ETableModel *etm, int col)
+static gpointer
+etmc_initialize_value (ETableModel *etm, gint col)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
@@ -104,7 +104,7 @@ etmc_initialize_value (ETableModel *etm, int col)
}
static gboolean
-etmc_value_is_empty (ETableModel *etm, int col, const void *value)
+etmc_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
@@ -114,8 +114,8 @@ etmc_value_is_empty (ETableModel *etm, int col, const void *value)
return FALSE;
}
-static char *
-etmc_value_to_string (ETableModel *etm, int col, const void *value)
+static gchar *
+etmc_value_to_string (ETableModel *etm, gint col, gconstpointer value)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
@@ -126,7 +126,7 @@ etmc_value_to_string (ETableModel *etm, int col, const void *value)
}
static void
-etmc_append_row (ETableModel *etm, ETableModel *source, int row)
+etmc_append_row (ETableModel *etm, ETableModel *source, gint row)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
@@ -194,7 +194,7 @@ e_table_memory_callbacks_new (ETableMemoryCalbacksColumnCountFn col_count,
ETableMemoryCalbacksInitializeValueFn initialize_value,
ETableMemoryCalbacksValueIsEmptyFn value_is_empty,
ETableMemoryCalbacksValueToStringFn value_to_string,
- void *data)
+ gpointer data)
{
ETableMemoryCalbacks *et;
diff --git a/widgets/table/e-table-memory-callbacks.h b/widgets/table/e-table-memory-callbacks.h
index bfeacb284c..97e2e53421 100644
--- a/widgets/table/e-table-memory-callbacks.h
+++ b/widgets/table/e-table-memory-callbacks.h
@@ -34,18 +34,18 @@ G_BEGIN_DECLS
#define E_IS_TABLE_MEMORY_CALLBACKS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_MEMORY_CALLBACKS_TYPE))
#define E_TABLE_MEMORY_CALLBACKS_GET_CLASS(k) (G_TYPE_INSTANCE_GET_CLASS((k), E_TABLE_MEMORY_CALLBACKS_TYPE, ETableMemoryCalbacksClass))
-typedef int (*ETableMemoryCalbacksColumnCountFn) (ETableModel *etm, void *data);
-typedef void (*ETableMemoryCalbacksAppendRowFn) (ETableModel *etm, ETableModel *model, int row, void *data);
+typedef gint (*ETableMemoryCalbacksColumnCountFn) (ETableModel *etm, gpointer data);
+typedef void (*ETableMemoryCalbacksAppendRowFn) (ETableModel *etm, ETableModel *model, gint row, gpointer data);
-typedef void *(*ETableMemoryCalbacksValueAtFn) (ETableModel *etm, int col, int row, void *data);
-typedef void (*ETableMemoryCalbacksSetValueAtFn) (ETableModel *etm, int col, int row, const void *val, void *data);
-typedef gboolean (*ETableMemoryCalbacksIsCellEditableFn) (ETableModel *etm, int col, int row, void *data);
+typedef void *(*ETableMemoryCalbacksValueAtFn) (ETableModel *etm, gint col, gint row, gpointer data);
+typedef void (*ETableMemoryCalbacksSetValueAtFn) (ETableModel *etm, gint col, gint row, gconstpointer val, gpointer data);
+typedef gboolean (*ETableMemoryCalbacksIsCellEditableFn) (ETableModel *etm, gint col, gint row, gpointer data);
-typedef void *(*ETableMemoryCalbacksDuplicateValueFn) (ETableModel *etm, int col, const void *val, void *data);
-typedef void (*ETableMemoryCalbacksFreeValueFn) (ETableModel *etm, int col, void *val, void *data);
-typedef void *(*ETableMemoryCalbacksInitializeValueFn) (ETableModel *etm, int col, void *data);
-typedef gboolean (*ETableMemoryCalbacksValueIsEmptyFn) (ETableModel *etm, int col, const void *val, void *data);
-typedef char *(*ETableMemoryCalbacksValueToStringFn) (ETableModel *etm, int col, const void *val, void *data);
+typedef void *(*ETableMemoryCalbacksDuplicateValueFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data);
+typedef void (*ETableMemoryCalbacksFreeValueFn) (ETableModel *etm, gint col, gpointer val, gpointer data);
+typedef void *(*ETableMemoryCalbacksInitializeValueFn) (ETableModel *etm, gint col, gpointer data);
+typedef gboolean (*ETableMemoryCalbacksValueIsEmptyFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data);
+typedef gchar *(*ETableMemoryCalbacksValueToStringFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data);
typedef struct {
ETableMemory parent;
@@ -62,7 +62,7 @@ typedef struct {
ETableMemoryCalbacksInitializeValueFn initialize_value;
ETableMemoryCalbacksValueIsEmptyFn value_is_empty;
ETableMemoryCalbacksValueToStringFn value_to_string;
- void *data;
+ gpointer data;
} ETableMemoryCalbacks;
typedef struct {
@@ -82,7 +82,7 @@ ETableModel *e_table_memory_callbacks_new (ETableMemoryCalbacksColumnCountFn col
ETableMemoryCalbacksInitializeValueFn initialize_value,
ETableMemoryCalbacksValueIsEmptyFn value_is_empty,
ETableMemoryCalbacksValueToStringFn value_to_string,
- void *data);
+ gpointer data);
G_END_DECLS
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c
index 284823bc3d..622de851c0 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -31,27 +31,27 @@
#define STORE_LOCATOR(etms, col, row) (*((etms)->priv->store + (row) * (etms)->priv->col_count + (col)))
struct _ETableMemoryStorePrivate {
- int col_count;
+ gint col_count;
ETableMemoryStoreColumnInfo *columns;
- void **store;
+ gpointer *store;
};
G_DEFINE_TYPE (ETableMemoryStore, e_table_memory_store, E_TABLE_MEMORY_TYPE)
-static void *
-duplicate_value (ETableMemoryStore *etms, int col, const void *val)
+static gpointer
+duplicate_value (ETableMemoryStore *etms, gint col, gconstpointer val)
{
switch (etms->priv->columns[col].type) {
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING:
return g_strdup (val);
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_PIXBUF:
if (val)
- g_object_ref ((void *) val);
- return (void *) val;
+ g_object_ref ((gpointer) val);
+ return (gpointer) val;
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_OBJECT:
if (val)
- g_object_ref ((void *) val);
- return (void *) val;
+ g_object_ref ((gpointer) val);
+ return (gpointer) val;
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_CUSTOM:
if (etms->priv->columns[col].custom.duplicate_value)
return etms->priv->columns[col].custom.duplicate_value (E_TABLE_MODEL (etms), col, val, NULL);
@@ -59,11 +59,11 @@ duplicate_value (ETableMemoryStore *etms, int col, const void *val)
default:
break;
}
- return (void *) val;
+ return (gpointer) val;
}
static void
-free_value (ETableMemoryStore *etms, int col, void *value)
+free_value (ETableMemoryStore *etms, gint col, gpointer value)
{
switch (etms->priv->columns[col].type) {
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING:
@@ -95,8 +95,8 @@ etms_column_count (ETableModel *etm)
return etms->priv->col_count;
}
-static void *
-etms_value_at (ETableModel *etm, int col, int row)
+static gpointer
+etms_value_at (ETableModel *etm, gint col, gint row)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
@@ -104,7 +104,7 @@ etms_value_at (ETableModel *etm, int col, int row)
}
static void
-etms_set_value_at (ETableModel *etm, int col, int row, const void *val)
+etms_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
@@ -116,7 +116,7 @@ etms_set_value_at (ETableModel *etm, int col, int row, const void *val)
}
static gboolean
-etms_is_cell_editable (ETableModel *etm, int col, int row)
+etms_is_cell_editable (ETableModel *etm, gint col, gint row)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
@@ -124,8 +124,8 @@ etms_is_cell_editable (ETableModel *etm, int col, int row)
}
/* The default for etms_duplicate_value is to return the raw value. */
-static void *
-etms_duplicate_value (ETableModel *etm, int col, const void *value)
+static gpointer
+etms_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
@@ -133,15 +133,15 @@ etms_duplicate_value (ETableModel *etm, int col, const void *value)
}
static void
-etms_free_value (ETableModel *etm, int col, void *value)
+etms_free_value (ETableModel *etm, gint col, gpointer value)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
free_value (etms, col, value);
}
-static void *
-etms_initialize_value (ETableModel *etm, int col)
+static gpointer
+etms_initialize_value (ETableModel *etm, gint col)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
@@ -162,13 +162,13 @@ etms_initialize_value (ETableModel *etm, int col)
}
static gboolean
-etms_value_is_empty (ETableModel *etm, int col, const void *value)
+etms_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
switch (etms->priv->columns[col].type) {
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING:
- return !(value && *(char *) value);
+ return !(value && *(gchar *) value);
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_PIXBUF:
return value == NULL;
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_CUSTOM:
@@ -182,8 +182,8 @@ etms_value_is_empty (ETableModel *etm, int col, const void *value)
return value == NULL;
}
-static char *
-etms_value_to_string (ETableModel *etm, int col, const void *value)
+static gchar *
+etms_value_to_string (ETableModel *etm, gint col, gconstpointer value)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
@@ -204,14 +204,14 @@ etms_value_to_string (ETableModel *etm, int col, const void *value)
}
static void
-etms_append_row (ETableModel *etm, ETableModel *source, int row)
+etms_append_row (ETableModel *etm, ETableModel *source, gint row)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
- void **new_data;
- int i;
- int row_count;
+ gpointer *new_data;
+ gint i;
+ gint row_count;
- new_data = g_new (void *, etms->priv->col_count);
+ new_data = g_new (gpointer , etms->priv->col_count);
for (i = 0; i < etms->priv->col_count; i++) {
new_data[i] = e_table_model_value_at (source, i, row);
@@ -311,7 +311,7 @@ e_table_memory_store_new (ETableMemoryStoreColumnInfo *columns)
ETableModel *
e_table_memory_store_construct (ETableMemoryStore *etms, ETableMemoryStoreColumnInfo *columns)
{
- int i;
+ gint i;
for (i = 0; columns[i].type != E_TABLE_MEMORY_STORE_COLUMN_TYPE_TERMINATOR; i++)
/* Intentionally blank */;
etms->priv->col_count = i;
@@ -325,7 +325,7 @@ e_table_memory_store_construct (ETableMemoryStore *etms, ETableMemoryStoreColumn
void
-e_table_memory_store_adopt_value_at (ETableMemoryStore *etms, int col, int row, void *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,18 +336,18 @@ e_table_memory_store_adopt_value_at (ETableMemoryStore *etms, int col, int row,
/* The size of these arrays is the number of columns. */
void
-e_table_memory_store_insert_array (ETableMemoryStore *etms, int row, void **store, gpointer data)
+e_table_memory_store_insert_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data)
{
- int row_count;
- int i;
+ gint row_count;
+ gint i;
row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) + 1;
if (row == -1)
row = row_count - 1;
- etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (void *));
+ etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (gpointer));
memmove (etms->priv->store + etms->priv->col_count * (row + 1),
etms->priv->store + etms->priv->col_count * row,
- etms->priv->col_count * (row_count - row - 1) * sizeof (void *));
+ etms->priv->col_count * (row_count - row - 1) * sizeof (gpointer));
for (i = 0; i < etms->priv->col_count; i++) {
STORE_LOCATOR(etms, i, row) = duplicate_value(etms, i, store[i]);
@@ -357,17 +357,17 @@ e_table_memory_store_insert_array (ETableMemoryStore *etms, int row, void **stor
}
void
-e_table_memory_store_insert (ETableMemoryStore *etms, int row, gpointer data, ...)
+e_table_memory_store_insert (ETableMemoryStore *etms, gint row, gpointer data, ...)
{
- void **store;
+ gpointer *store;
va_list args;
- int i;
+ gint i;
- store = g_new (void *, etms->priv->col_count + 1);
+ store = g_new (gpointer , etms->priv->col_count + 1);
va_start (args, data);
for (i = 0; i < etms->priv->col_count; i++) {
- store[i] = va_arg (args, void *);
+ store[i] = va_arg (args, gpointer );
}
va_end (args);
@@ -377,18 +377,18 @@ e_table_memory_store_insert (ETableMemoryStore *etms, int row, gpointer data, ..
}
void
-e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms, int row, void **store, gpointer data)
+e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data)
{
- int row_count;
- int i;
+ gint row_count;
+ gint i;
row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) + 1;
if (row == -1)
row = row_count - 1;
- etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (void *));
+ etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (gpointer));
memmove (etms->priv->store + etms->priv->col_count * (row + 1),
etms->priv->store + etms->priv->col_count * row,
- etms->priv->col_count * (row_count - row - 1) * sizeof (void *));
+ etms->priv->col_count * (row_count - row - 1) * sizeof (gpointer));
for (i = 0; i < etms->priv->col_count; i++) {
STORE_LOCATOR(etms, i, row) = store[i];
@@ -398,17 +398,17 @@ e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms, int row, void
}
void
-e_table_memory_store_insert_adopt (ETableMemoryStore *etms, int row, gpointer data, ...)
+e_table_memory_store_insert_adopt (ETableMemoryStore *etms, gint row, gpointer data, ...)
{
- void **store;
+ gpointer *store;
va_list args;
- int i;
+ gint i;
- store = g_new (void *, etms->priv->col_count + 1);
+ store = g_new (gpointer , etms->priv->col_count + 1);
va_start (args, data);
for (i = 0; i < etms->priv->col_count; i++) {
- store[i] = va_arg (args, void *);
+ store[i] = va_arg (args, gpointer );
}
va_end (args);
@@ -429,9 +429,9 @@ e_table_memory_store_insert_adopt (ETableMemoryStore *etms, int row, gpointer da
*
*/
void
-e_table_memory_store_change_array (ETableMemoryStore *etms, int row, void **store, gpointer data)
+e_table_memory_store_change_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data)
{
- int i;
+ gint i;
g_return_if_fail (row >= 0 && row < e_table_model_row_count (E_TABLE_MODEL (etms)));
@@ -456,19 +456,19 @@ e_table_memory_store_change_array (ETableMemoryStore *etms, int row, void **stor
* pass in etms->col_count args.
*/
void
-e_table_memory_store_change (ETableMemoryStore *etms, int row, gpointer data, ...)
+e_table_memory_store_change (ETableMemoryStore *etms, gint row, gpointer data, ...)
{
- void **store;
+ gpointer *store;
va_list args;
- int i;
+ gint i;
g_return_if_fail (row >= 0 && row < e_table_model_row_count (E_TABLE_MODEL (etms)));
- store = g_new0 (void *, etms->priv->col_count + 1);
+ store = g_new0 (gpointer , etms->priv->col_count + 1);
va_start (args, data);
for (i = 0; i < etms->priv->col_count; i++) {
- store[i] = va_arg (args, void *);
+ store[i] = va_arg (args, gpointer );
}
va_end (args);
@@ -490,9 +490,9 @@ e_table_memory_store_change (ETableMemoryStore *etms, int row, gpointer data, ..
* duplicate the data.
*/
void
-e_table_memory_store_change_adopt_array (ETableMemoryStore *etms, int row, void **store, gpointer data)
+e_table_memory_store_change_adopt_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data)
{
- int i;
+ gint i;
g_return_if_fail (row >= 0 && row < e_table_model_row_count (E_TABLE_MODEL (etms)));
@@ -515,19 +515,19 @@ e_table_memory_store_change_adopt_array (ETableMemoryStore *etms, int row, void
* must pass in etms->col_count args.
*/
void
-e_table_memory_store_change_adopt (ETableMemoryStore *etms, int row, gpointer data, ...)
+e_table_memory_store_change_adopt (ETableMemoryStore *etms, gint row, gpointer data, ...)
{
- void **store;
+ gpointer *store;
va_list args;
- int i;
+ gint i;
g_return_if_fail (row >= 0 && row < e_table_model_row_count (E_TABLE_MODEL (etms)));
- store = g_new0 (void *, etms->priv->col_count + 1);
+ store = g_new0 (gpointer , etms->priv->col_count + 1);
va_start (args, data);
for (i = 0; i < etms->priv->col_count; i++) {
- store[i] = va_arg (args, void *);
+ store[i] = va_arg (args, gpointer );
}
va_end (args);
@@ -537,11 +537,11 @@ e_table_memory_store_change_adopt (ETableMemoryStore *etms, int row, gpointer da
}
void
-e_table_memory_store_remove (ETableMemoryStore *etms, int row)
+e_table_memory_store_remove (ETableMemoryStore *etms, gint row)
{
ETableModel *model;
- int column_count, row_count;
- int i;
+ gint column_count, row_count;
+ gint i;
model = E_TABLE_MODEL (etms);
column_count = e_table_model_column_count (model);
@@ -552,8 +552,8 @@ e_table_memory_store_remove (ETableMemoryStore *etms, int row)
row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) - 1;
memmove (etms->priv->store + etms->priv->col_count * row,
etms->priv->store + etms->priv->col_count * (row + 1),
- etms->priv->col_count * (row_count - row) * sizeof (void *));
- etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (void *));
+ etms->priv->col_count * (row_count - row) * sizeof (gpointer));
+ etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (gpointer));
e_table_memory_remove (E_TABLE_MEMORY (etms), row);
}
@@ -562,8 +562,8 @@ void
e_table_memory_store_clear (ETableMemoryStore *etms)
{
ETableModel *model;
- int row_count, column_count;
- int i, j;
+ gint row_count, column_count;
+ gint i, j;
model = E_TABLE_MODEL (etms);
row_count = e_table_model_row_count (model);
diff --git a/widgets/table/e-table-memory-store.h b/widgets/table/e-table-memory-store.h
index f197e11fe6..96da50f71c 100644
--- a/widgets/table/e-table-memory-store.h
+++ b/widgets/table/e-table-memory-store.h
@@ -92,45 +92,45 @@ ETableModel *e_table_memory_store_construct (ETableMemoryStore
/* Adopt a value instead of copying it. */
void e_table_memory_store_adopt_value_at (ETableMemoryStore *etms,
- int col,
- int row,
+ gint col,
+ gint row,
void *value);
/* The size of these arrays is the number of columns. */
void e_table_memory_store_insert_array (ETableMemoryStore *etms,
- int row,
+ gint row,
void **store,
gpointer data);
void e_table_memory_store_insert (ETableMemoryStore *etms,
- int row,
+ gint row,
gpointer data,
...);
void e_table_memory_store_insert_adopt (ETableMemoryStore *etms,
- int row,
+ gint row,
gpointer data,
...);
void e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms,
- int row,
+ gint row,
void **store,
gpointer data);
void e_table_memory_store_change_array (ETableMemoryStore *etms,
- int row,
+ gint row,
void **store,
gpointer data);
void e_table_memory_store_change (ETableMemoryStore *etms,
- int row,
+ gint row,
gpointer data,
...);
void e_table_memory_store_change_adopt (ETableMemoryStore *etms,
- int row,
+ gint row,
gpointer data,
...);
void e_table_memory_store_change_adopt_array (ETableMemoryStore *etms,
- int row,
+ gint row,
void **store,
gpointer data);
void e_table_memory_store_remove (ETableMemoryStore *etms,
- int row);
+ gint row);
void e_table_memory_store_clear (ETableMemoryStore *etms);
G_END_DECLS
diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c
index 3fb85a9553..98fd65c460 100644
--- a/widgets/table/e-table-memory.c
+++ b/widgets/table/e-table-memory.c
@@ -41,7 +41,7 @@ G_DEFINE_TYPE (ETableMemory, e_table_memory, E_TABLE_MODEL_TYPE)
struct ETableMemoryPriv {
gpointer *data;
- int num_rows;
+ gint num_rows;
gint frozen;
};
@@ -120,7 +120,7 @@ e_table_memory_new (void)
* Return value:
**/
gpointer
-e_table_memory_get_data (ETableMemory *etmm, int 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);
@@ -137,7 +137,7 @@ e_table_memory_get_data (ETableMemory *etmm, int row)
*
**/
void
-e_table_memory_set_data (ETableMemory *etmm, int 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);
@@ -158,7 +158,7 @@ e_table_memory_set_data (ETableMemory *etmm, int row, gpointer data)
**/
void
e_table_memory_insert (ETableMemory *etmm,
- int row,
+ gint row,
gpointer data)
{
g_return_if_fail(row >= -1);
@@ -189,7 +189,7 @@ e_table_memory_insert (ETableMemory *etmm,
* Return value:
**/
gpointer
-e_table_memory_remove (ETableMemory *etmm, int row)
+e_table_memory_remove (ETableMemory *etmm, gint row)
{
gpointer ret;
diff --git a/widgets/table/e-table-memory.h b/widgets/table/e-table-memory.h
index 889eec5d33..07a79b6856 100644
--- a/widgets/table/e-table-memory.h
+++ b/widgets/table/e-table-memory.h
@@ -55,19 +55,19 @@ ETableMemory *e_table_memory_new (void);
/* row operations */
void e_table_memory_insert (ETableMemory *etable,
- int row,
+ gint row,
gpointer data);
gpointer e_table_memory_remove (ETableMemory *etable,
- int row);
+ gint row);
void e_table_memory_clear (ETableMemory *etable);
/* Freeze and thaw */
void e_table_memory_freeze (ETableMemory *etable);
void e_table_memory_thaw (ETableMemory *etable);
gpointer e_table_memory_get_data (ETableMemory *etm,
- int row);
+ gint row);
void e_table_memory_set_data (ETableMemory *etm,
- int row,
+ gint row,
gpointer data);
G_END_DECLS
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c
index efe097c4e1..2badb768c9 100644
--- a/widgets/table/e-table-model.c
+++ b/widgets/table/e-table-model.c
@@ -59,7 +59,7 @@ static guint e_table_model_signals [LAST_SIGNAL] = { 0, };
*
* Returns: the number of columns in the table model.
*/
-int
+gint
e_table_model_column_count (ETableModel *e_table_model)
{
g_return_val_if_fail (e_table_model != NULL, 0);
@@ -75,7 +75,7 @@ e_table_model_column_count (ETableModel *e_table_model)
*
* Returns: the number of rows in the Table model.
*/
-int
+gint
e_table_model_row_count (ETableModel *e_table_model)
{
g_return_val_if_fail (e_table_model != NULL, 0);
@@ -92,7 +92,7 @@ e_table_model_row_count (ETableModel *e_table_model)
*
*/
void
-e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, int 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));
@@ -120,8 +120,8 @@ e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, int r
* data in that cell. rows_deleted affects all data in those rows.
* rows_inserted and no_change don't affect any data in this way.
**/
-void *
-e_table_model_value_at (ETableModel *e_table_model, int col, int row)
+gpointer
+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);
@@ -142,10 +142,10 @@ e_table_model_value_at (ETableModel *e_table_model, int col, int row)
*
* There should be an agreement between the Table Model and the user
* of this function about the data being stored. Typically it will
- * be a pointer to a set of data, or a datum that fits inside a void *.
+ * 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, int col, int row, const void *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));
@@ -163,7 +163,7 @@ e_table_model_set_value_at (ETableModel *e_table_model, int col, int row, const
* edited, %FALSE otherwise
*/
gboolean
-e_table_model_is_cell_editable (ETableModel *e_table_model, int col, int 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);
@@ -172,8 +172,8 @@ e_table_model_is_cell_editable (ETableModel *e_table_model, int col, int row)
}
-void *
-e_table_model_duplicate_value (ETableModel *e_table_model, int col, const void *value)
+gpointer
+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);
@@ -185,7 +185,7 @@ e_table_model_duplicate_value (ETableModel *e_table_model, int col, const void *
}
void
-e_table_model_free_value (ETableModel *e_table_model, int col, void *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));
@@ -206,8 +206,8 @@ e_table_model_has_save_id (ETableModel *e_table_model)
return FALSE;
}
-char *
-e_table_model_get_save_id (ETableModel *e_table_model, int row)
+gchar *
+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);
@@ -230,8 +230,8 @@ e_table_model_has_change_pending(ETableModel *e_table_model)
return FALSE;
}
-void *
-e_table_model_initialize_value (ETableModel *e_table_model, int col)
+gpointer
+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);
@@ -243,7 +243,7 @@ e_table_model_initialize_value (ETableModel *e_table_model, int col)
}
gboolean
-e_table_model_value_is_empty (ETableModel *e_table_model, int col, const void *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);
@@ -254,8 +254,8 @@ e_table_model_value_is_empty (ETableModel *e_table_model, int col, const void *v
return FALSE;
}
-char *
-e_table_model_value_to_string (ETableModel *e_table_model, int col, const void *value)
+gchar *
+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);
@@ -381,7 +381,7 @@ e_table_model_init (ETableModel *e_table_model)
static void
print_tabs (void)
{
- int i;
+ gint i;
for (i = 0; i < depth; i++)
g_print("\t");
}
@@ -475,7 +475,7 @@ e_table_model_changed (ETableModel *e_table_model)
* object
*/
void
-e_table_model_row_changed (ETableModel *e_table_model, int 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));
@@ -503,7 +503,7 @@ e_table_model_row_changed (ETableModel *e_table_model, int row)
* object
*/
void
-e_table_model_cell_changed (ETableModel *e_table_model, int col, int 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));
@@ -531,7 +531,7 @@ e_table_model_cell_changed (ETableModel *e_table_model, int col, int row)
* @e_table_model object
*/
void
-e_table_model_rows_inserted (ETableModel *e_table_model, int row, int 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));
@@ -557,7 +557,7 @@ e_table_model_rows_inserted (ETableModel *e_table_model, int row, int count)
* the "model_rows_inserted" signal on the @e_table_model object
*/
void
-e_table_model_row_inserted (ETableModel *e_table_model, int row)
+e_table_model_row_inserted (ETableModel *e_table_model, gint row)
{
e_table_model_rows_inserted(e_table_model, row, 1);
}
@@ -574,7 +574,7 @@ e_table_model_row_inserted (ETableModel *e_table_model, int row)
* @e_table_model object
*/
void
-e_table_model_rows_deleted (ETableModel *e_table_model, int row, int 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));
@@ -600,7 +600,7 @@ e_table_model_rows_deleted (ETableModel *e_table_model, int row, int count)
* the "model_rows_deleted" signal on the @e_table_model object
*/
void
-e_table_model_row_deleted (ETableModel *e_table_model, int 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-model.h b/widgets/table/e-table-model.h
index d647eee4e1..571c2f8a12 100644
--- a/widgets/table/e-table-model.h
+++ b/widgets/table/e-table-model.h
@@ -45,29 +45,29 @@ typedef struct {
/*
* Virtual methods
*/
- int (*column_count) (ETableModel *etm);
- int (*row_count) (ETableModel *etm);
- void (*append_row) (ETableModel *etm, ETableModel *source, int row);
+ gint (*column_count) (ETableModel *etm);
+ gint (*row_count) (ETableModel *etm);
+ void (*append_row) (ETableModel *etm, ETableModel *source, gint row);
- void *(*value_at) (ETableModel *etm, int col, int row);
- void (*set_value_at) (ETableModel *etm, int col, int row, const void *value);
- gboolean (*is_cell_editable) (ETableModel *etm, int col, int row);
+ void *(*value_at) (ETableModel *etm, gint col, gint row);
+ void (*set_value_at) (ETableModel *etm, gint col, gint row, gconstpointer value);
+ gboolean (*is_cell_editable) (ETableModel *etm, gint col, gint row);
gboolean (*has_save_id) (ETableModel *etm);
- gchar *(*get_save_id) (ETableModel *etm, int row);
+ gchar *(*get_save_id) (ETableModel *etm, gint row);
gboolean (*has_change_pending) (ETableModel *etm);
/* Allocate a copy of the given value. */
- void *(*duplicate_value) (ETableModel *etm, int col, const void *value);
+ void *(*duplicate_value) (ETableModel *etm, gint col, gconstpointer value);
/* Free an allocated value. */
- void (*free_value) (ETableModel *etm, int col, void *value);
+ void (*free_value) (ETableModel *etm, gint col, gpointer value);
/* Return an allocated empty value. */
- void *(*initialize_value) (ETableModel *etm, int col);
+ void *(*initialize_value) (ETableModel *etm, gint col);
/* Return TRUE if value is equivalent to an empty cell. */
- gboolean (*value_is_empty) (ETableModel *etm, int col, const void *value);
+ gboolean (*value_is_empty) (ETableModel *etm, gint col, gconstpointer value);
/* Return an allocated string. */
- char *(*value_to_string) (ETableModel *etm, int col, const void *value);
+ gchar *(*value_to_string) (ETableModel *etm, gint col, gconstpointer value);
/*
@@ -87,39 +87,39 @@ typedef struct {
void (*model_no_change) (ETableModel *etm);
void (*model_changed) (ETableModel *etm);
- void (*model_row_changed) (ETableModel *etm, int row);
- void (*model_cell_changed) (ETableModel *etm, int col, int row);
- void (*model_rows_inserted) (ETableModel *etm, int row, int count);
- void (*model_rows_deleted) (ETableModel *etm, int row, int count);
+ void (*model_row_changed) (ETableModel *etm, gint row);
+ void (*model_cell_changed) (ETableModel *etm, gint col, gint row);
+ void (*model_rows_inserted) (ETableModel *etm, gint row, gint count);
+ void (*model_rows_deleted) (ETableModel *etm, gint row, gint count);
} ETableModelClass;
GType e_table_model_get_type (void);
/**/
-int e_table_model_column_count (ETableModel *e_table_model);
-const char *e_table_model_column_name (ETableModel *e_table_model,
- int col);
-int e_table_model_row_count (ETableModel *e_table_model);
+gint e_table_model_column_count (ETableModel *e_table_model);
+const gchar *e_table_model_column_name (ETableModel *e_table_model,
+ gint col);
+gint e_table_model_row_count (ETableModel *e_table_model);
void e_table_model_append_row (ETableModel *e_table_model,
ETableModel *source,
- int row);
+ gint row);
/**/
void *e_table_model_value_at (ETableModel *e_table_model,
- int col,
- int row);
+ gint col,
+ gint row);
void e_table_model_set_value_at (ETableModel *e_table_model,
- int col,
- int row,
+ gint col,
+ gint row,
const void *value);
gboolean e_table_model_is_cell_editable (ETableModel *e_table_model,
- int col,
- int row);
+ gint col,
+ gint row);
/**/
gboolean e_table_model_has_save_id (ETableModel *etm);
-char *e_table_model_get_save_id (ETableModel *etm,
- int row);
+gchar *e_table_model_get_save_id (ETableModel *etm,
+ gint row);
/**/
gboolean e_table_model_has_change_pending (ETableModel *etm);
@@ -127,18 +127,18 @@ gboolean e_table_model_has_change_pending (ETableModel *etm);
/**/
void *e_table_model_duplicate_value (ETableModel *e_table_model,
- int col,
+ gint col,
const void *value);
void e_table_model_free_value (ETableModel *e_table_model,
- int col,
+ gint col,
void *value);
void *e_table_model_initialize_value (ETableModel *e_table_model,
- int col);
+ gint col);
gboolean e_table_model_value_is_empty (ETableModel *e_table_model,
- int col,
+ gint col,
const void *value);
-char *e_table_model_value_to_string (ETableModel *e_table_model,
- int col,
+gchar *e_table_model_value_to_string (ETableModel *e_table_model,
+ gint col,
const void *value);
/*
@@ -148,22 +148,22 @@ void e_table_model_pre_change (ETableModel *e_table_model);
void e_table_model_no_change (ETableModel *e_table_model);
void e_table_model_changed (ETableModel *e_table_model);
void e_table_model_row_changed (ETableModel *e_table_model,
- int row);
+ gint row);
void e_table_model_cell_changed (ETableModel *e_table_model,
- int col,
- int row);
+ gint col,
+ gint row);
void e_table_model_rows_inserted (ETableModel *e_table_model,
-int row,
-int count);
+gint row,
+gint count);
void e_table_model_rows_deleted (ETableModel *e_table_model,
-int row,
-int count);
+gint row,
+gint count);
/**/
void e_table_model_row_inserted (ETableModel *e_table_model,
-int row);
+gint row);
void e_table_model_row_deleted (ETableModel *e_table_model,
-int row);
+gint row);
void e_table_model_freeze (ETableModel *e_table_model);
void e_table_model_thaw (ETableModel *e_table_model);
diff --git a/widgets/table/e-table-one.c b/widgets/table/e-table-one.c
index 56cd8b6549..c8cea32963 100644
--- a/widgets/table/e-table-one.c
+++ b/widgets/table/e-table-one.c
@@ -46,8 +46,8 @@ one_row_count (ETableModel *etm)
return 1;
}
-static void *
-one_value_at (ETableModel *etm, int col, int row)
+static gpointer
+one_value_at (ETableModel *etm, gint col, gint row)
{
ETableOne *one = E_TABLE_ONE(etm);
@@ -58,7 +58,7 @@ one_value_at (ETableModel *etm, int col, int row)
}
static void
-one_set_value_at (ETableModel *etm, int col, int row, const void *val)
+one_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
{
ETableOne *one = E_TABLE_ONE(etm);
@@ -69,7 +69,7 @@ one_set_value_at (ETableModel *etm, int col, int row, const void *val)
}
static gboolean
-one_is_cell_editable (ETableModel *etm, int col, int row)
+one_is_cell_editable (ETableModel *etm, gint col, gint row)
{
ETableOne *one = E_TABLE_ONE(etm);
@@ -80,19 +80,19 @@ one_is_cell_editable (ETableModel *etm, int col, int row)
}
/* The default for one_duplicate_value is to return the raw value. */
-static void *
-one_duplicate_value (ETableModel *etm, int col, const void *value)
+static gpointer
+one_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
{
ETableOne *one = E_TABLE_ONE(etm);
if (one->source)
return e_table_model_duplicate_value(one->source, col, value);
else
- return (void *)value;
+ return (gpointer)value;
}
static void
-one_free_value (ETableModel *etm, int col, void *value)
+one_free_value (ETableModel *etm, gint col, gpointer value)
{
ETableOne *one = E_TABLE_ONE(etm);
@@ -100,8 +100,8 @@ one_free_value (ETableModel *etm, int col, void *value)
e_table_model_free_value(one->source, col, value);
}
-static void *
-one_initialize_value (ETableModel *etm, int col)
+static gpointer
+one_initialize_value (ETableModel *etm, gint col)
{
ETableOne *one = E_TABLE_ONE(etm);
@@ -112,7 +112,7 @@ one_initialize_value (ETableModel *etm, int col)
}
static gboolean
-one_value_is_empty (ETableModel *etm, int col, const void *value)
+one_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
{
ETableOne *one = E_TABLE_ONE(etm);
@@ -122,8 +122,8 @@ one_value_is_empty (ETableModel *etm, int col, const void *value)
return FALSE;
}
-static char *
-one_value_to_string (ETableModel *etm, int col, const void *value)
+static gchar *
+one_value_to_string (ETableModel *etm, gint col, gconstpointer value)
{
ETableOne *one = E_TABLE_ONE(etm);
@@ -146,8 +146,8 @@ one_dispose (GObject *object)
if (one->data) {
- int i;
- int col_count;
+ gint i;
+ gint col_count;
if (one->source) {
col_count = e_table_model_column_count(one->source);
@@ -199,14 +199,14 @@ ETableModel *
e_table_one_new (ETableModel *source)
{
ETableOne *eto;
- int col_count;
- int i;
+ gint col_count;
+ gint i;
eto = g_object_new (E_TABLE_ONE_TYPE, NULL);
eto->source = source;
col_count = e_table_model_column_count(source);
- eto->data = g_new(void *, col_count);
+ eto->data = g_new(gpointer , col_count);
for (i = 0; i < col_count; i++) {
eto->data[i] = e_table_model_initialize_value(source, i);
}
@@ -221,9 +221,9 @@ void
e_table_one_commit (ETableOne *one)
{
if (one->source) {
- int empty = TRUE;
- int col;
- int cols = e_table_model_column_count(one->source);
+ gint empty = TRUE;
+ gint col;
+ gint cols = e_table_model_column_count(one->source);
for (col = 0; col < cols; col++) {
if (!e_table_model_value_is_empty(one->source, col, one->data[col])) {
empty = FALSE;
diff --git a/widgets/table/e-table-scrolled.c b/widgets/table/e-table-scrolled.c
index 42425efd9a..778041d73c 100644
--- a/widgets/table/e-table-scrolled.c
+++ b/widgets/table/e-table-scrolled.c
@@ -71,8 +71,8 @@ e_table_scrolled_real_construct (ETableScrolled *ets)
ETableScrolled *e_table_scrolled_construct (ETableScrolled *ets,
ETableModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state)
+ const gchar *spec,
+ const gchar *state)
{
g_return_val_if_fail(ets != NULL, NULL);
g_return_val_if_fail(E_IS_TABLE_SCROLLED(ets), NULL);
@@ -90,8 +90,8 @@ ETableScrolled *e_table_scrolled_construct (ETableScrolled *e
GtkWidget *e_table_scrolled_new (ETableModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state)
+ const gchar *spec,
+ const gchar *state)
{
ETableScrolled *ets;
@@ -113,8 +113,8 @@ GtkWidget *e_table_scrolled_new (ETableModel *e
ETableScrolled *e_table_scrolled_construct_from_spec_file (ETableScrolled *ets,
ETableModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn)
+ const gchar *spec_fn,
+ const gchar *state_fn)
{
g_return_val_if_fail(ets != NULL, NULL);
g_return_val_if_fail(E_IS_TABLE_SCROLLED(ets), NULL);
@@ -132,8 +132,8 @@ ETableScrolled *e_table_scrolled_construct_from_spec_file (ETableScrolled *e
GtkWidget *e_table_scrolled_new_from_spec_file (ETableModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn)
+ const gchar *spec_fn,
+ const gchar *state_fn)
{
ETableScrolled *ets;
diff --git a/widgets/table/e-table-scrolled.h b/widgets/table/e-table-scrolled.h
index d2f5024495..71e50b8cdd 100644
--- a/widgets/table/e-table-scrolled.h
+++ b/widgets/table/e-table-scrolled.h
@@ -51,22 +51,22 @@ GType e_table_scrolled_get_type (void);
ETableScrolled *e_table_scrolled_construct (ETableScrolled *ets,
ETableModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state);
+ const gchar *spec,
+ const gchar *state);
GtkWidget *e_table_scrolled_new (ETableModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state);
+ const gchar *spec,
+ const gchar *state);
ETableScrolled *e_table_scrolled_construct_from_spec_file (ETableScrolled *ets,
ETableModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn);
+ const gchar *spec_fn,
+ const gchar *state_fn);
GtkWidget *e_table_scrolled_new_from_spec_file (ETableModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn);
+ const gchar *spec_fn,
+ const gchar *state_fn);
ETable *e_table_scrolled_get_table (ETableScrolled *ets);
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index 401e0fd33f..e11510371a 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -35,7 +35,7 @@ d(static gint depth = 0)
struct _ETableSearchPrivate {
guint timeout_id;
- char *search_string;
+ gchar *search_string;
gunichar last_character;
};
@@ -50,7 +50,7 @@ enum {
static guint e_table_search_signals [LAST_SIGNAL] = { 0, };
static gboolean
-e_table_search_search (ETableSearch *e_table_search, char *string, ETableSearchFlags flags)
+e_table_search_search (ETableSearch *e_table_search, gchar *string, ETableSearchFlags flags)
{
gboolean ret_val;
g_return_val_if_fail (e_table_search != NULL, FALSE);
@@ -172,8 +172,8 @@ e_table_search_new (void)
void
e_table_search_input_character (ETableSearch *ets, gunichar character)
{
- char character_utf8[7];
- char *temp_string;
+ gchar character_utf8[7];
+ gchar *temp_string;
g_return_if_fail (ets != NULL);
g_return_if_fail (E_IS_TABLE_SEARCH (ets));
@@ -202,7 +202,7 @@ e_table_search_input_character (ETableSearch *ets, gunichar character)
gboolean
e_table_search_backspace (ETableSearch *ets)
{
- char *end;
+ gchar *end;
g_return_val_if_fail (ets != NULL, FALSE);
g_return_val_if_fail (E_IS_TABLE_SEARCH (ets), FALSE);
diff --git a/widgets/table/e-table-search.h b/widgets/table/e-table-search.h
index 9866d07f94..798d81bd2d 100644
--- a/widgets/table/e-table-search.h
+++ b/widgets/table/e-table-search.h
@@ -53,7 +53,7 @@ typedef struct {
/*
* Signals
*/
- gboolean (*search) (ETableSearch *ets, char *string /* utf8 */, ETableSearchFlags flags);
+ gboolean (*search) (ETableSearch *ets, gchar *string /* utf8 */, ETableSearchFlags flags);
void (*accept) (ETableSearch *ets);
} ETableSearchClass;
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index 7f6ab4d782..22ec5af7d5 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -42,7 +42,7 @@ enum {
};
static void
-save_to_hash(int 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);
@@ -95,10 +95,10 @@ model_changed_idle(ETableSelectionModel *etsm)
e_selection_model_clear(E_SELECTION_MODEL(etsm));
if (etsm->cursor_id && etm && e_table_model_has_save_id(etm)) {
- int row_count = e_table_model_row_count(etm);
- int cursor_row = -1;
- int cursor_col = -1;
- int i;
+ gint row_count = e_table_model_row_count(etm);
+ gint cursor_row = -1;
+ gint cursor_col = -1;
+ gint i;
e_selection_model_array_confirm_row_count(E_SELECTION_MODEL_ARRAY(etsm));
for (i = 0; i < row_count; i++) {
gchar *save_id = e_table_model_get_save_id(etm, i);
@@ -138,27 +138,27 @@ model_changed(ETableModel *etm, ETableSelectionModel *etsm)
}
static void
-model_row_changed(ETableModel *etm, int row, ETableSelectionModel *etsm)
+model_row_changed(ETableModel *etm, gint row, ETableSelectionModel *etsm)
{
free_hash(etsm);
}
static void
-model_cell_changed(ETableModel *etm, int col, int 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, int row, int 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, int row, int 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);
@@ -167,13 +167,13 @@ model_rows_deleted(ETableModel *etm, int row, int count, ETableSelectionModel *e
#else
static void
-model_rows_inserted(ETableModel *etm, int row, int 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, int row, int count, ETableSelectionModel *etsm)
+model_rows_deleted(ETableModel *etm, gint row, gint count, ETableSelectionModel *etsm)
{
model_changed(etm, etsm);
}
diff --git a/widgets/table/e-table-simple.c b/widgets/table/e-table-simple.c
index a220769ded..f2eceb9314 100644
--- a/widgets/table/e-table-simple.c
+++ b/widgets/table/e-table-simple.c
@@ -53,7 +53,7 @@ simple_row_count (ETableModel *etm)
}
static void
-simple_append_row (ETableModel *etm, ETableModel *source, int row)
+simple_append_row (ETableModel *etm, ETableModel *source, gint row)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
@@ -61,8 +61,8 @@ simple_append_row (ETableModel *etm, ETableModel *source, int row)
simple->append_row (etm, source, row, simple->data);
}
-static void *
-simple_value_at (ETableModel *etm, int col, int row)
+static gpointer
+simple_value_at (ETableModel *etm, gint col, gint row)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
@@ -73,7 +73,7 @@ simple_value_at (ETableModel *etm, int col, int row)
}
static void
-simple_set_value_at (ETableModel *etm, int col, int row, const void *val)
+simple_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
@@ -82,7 +82,7 @@ simple_set_value_at (ETableModel *etm, int col, int row, const void *val)
}
static gboolean
-simple_is_cell_editable (ETableModel *etm, int col, int row)
+simple_is_cell_editable (ETableModel *etm, gint col, gint row)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
@@ -103,8 +103,8 @@ simple_has_save_id (ETableModel *etm)
return FALSE;
}
-static char *
-simple_get_save_id (ETableModel *etm, int row)
+static gchar *
+simple_get_save_id (ETableModel *etm, gint row)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
@@ -115,19 +115,19 @@ simple_get_save_id (ETableModel *etm, int row)
}
/* The default for simple_duplicate_value is to return the raw value. */
-static void *
-simple_duplicate_value (ETableModel *etm, int col, const void *value)
+static gpointer
+simple_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
if (simple->duplicate_value)
return simple->duplicate_value (etm, col, value, simple->data);
else
- return (void *)value;
+ return (gpointer)value;
}
static void
-simple_free_value (ETableModel *etm, int col, void *value)
+simple_free_value (ETableModel *etm, gint col, gpointer value)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
@@ -135,8 +135,8 @@ simple_free_value (ETableModel *etm, int col, void *value)
simple->free_value (etm, col, value, simple->data);
}
-static void *
-simple_initialize_value (ETableModel *etm, int col)
+static gpointer
+simple_initialize_value (ETableModel *etm, gint col)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
@@ -147,7 +147,7 @@ simple_initialize_value (ETableModel *etm, int col)
}
static gboolean
-simple_value_is_empty (ETableModel *etm, int col, const void *value)
+simple_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
@@ -157,8 +157,8 @@ simple_value_is_empty (ETableModel *etm, int col, const void *value)
return FALSE;
}
-static char *
-simple_value_to_string (ETableModel *etm, int col, const void *value)
+static gchar *
+simple_value_to_string (ETableModel *etm, gint col, gconstpointer value)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
@@ -266,32 +266,32 @@ e_table_simple_new (ETableSimpleColumnCountFn col_count,
return (ETableModel *) et;
}
-void *
-e_table_simple_string_duplicate_value (ETableModel *etm, int col, const void *val, void *data)
+gpointer
+e_table_simple_string_duplicate_value (ETableModel *etm, gint col, gconstpointer val, gpointer data)
{
return g_strdup (val);
}
void
-e_table_simple_string_free_value (ETableModel *etm, int col, void *val, void *data)
+e_table_simple_string_free_value (ETableModel *etm, gint col, gpointer val, gpointer data)
{
g_free (val);
}
-void *
-e_table_simple_string_initialize_value (ETableModel *etm, int col, void *data)
+gpointer
+e_table_simple_string_initialize_value (ETableModel *etm, gint col, gpointer data)
{
return g_strdup ("");
}
gboolean
-e_table_simple_string_value_is_empty (ETableModel *etm, int col, const void *val, void *data)
+e_table_simple_string_value_is_empty (ETableModel *etm, gint col, gconstpointer val, gpointer data)
{
- return !(val && * (char *) val);
+ return !(val && * (gchar *) val);
}
-char *
-e_table_simple_string_value_to_string (ETableModel *etm, int col, const void *val, void *data)
+gchar *
+e_table_simple_string_value_to_string (ETableModel *etm, gint col, gconstpointer val, gpointer data)
{
return g_strdup (val);
}
diff --git a/widgets/table/e-table-simple.h b/widgets/table/e-table-simple.h
index 453a90a54d..c93b313a82 100644
--- a/widgets/table/e-table-simple.h
+++ b/widgets/table/e-table-simple.h
@@ -36,22 +36,22 @@ G_BEGIN_DECLS
#define E_IS_TABLE_SIMPLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_SIMPLE_TYPE))
#define E_TABLE_SIMPLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), E_TABLE_SIMPLE_TYPE, ETableSimpleClass))
-typedef int (*ETableSimpleColumnCountFn) (ETableModel *etm, void *data);
-typedef int (*ETableSimpleRowCountFn) (ETableModel *etm, void *data);
-typedef void (*ETableSimpleAppendRowFn) (ETableModel *etm, ETableModel *model, int row, void *data);
+typedef gint (*ETableSimpleColumnCountFn) (ETableModel *etm, gpointer data);
+typedef gint (*ETableSimpleRowCountFn) (ETableModel *etm, gpointer data);
+typedef void (*ETableSimpleAppendRowFn) (ETableModel *etm, ETableModel *model, gint row, gpointer data);
-typedef void *(*ETableSimpleValueAtFn) (ETableModel *etm, int col, int row, void *data);
-typedef void (*ETableSimpleSetValueAtFn) (ETableModel *etm, int col, int row, const void *val, void *data);
-typedef gboolean (*ETableSimpleIsCellEditableFn) (ETableModel *etm, int col, int row, void *data);
+typedef void *(*ETableSimpleValueAtFn) (ETableModel *etm, gint col, gint row, gpointer data);
+typedef void (*ETableSimpleSetValueAtFn) (ETableModel *etm, gint col, gint row, gconstpointer val, gpointer data);
+typedef gboolean (*ETableSimpleIsCellEditableFn) (ETableModel *etm, gint col, gint row, gpointer data);
-typedef gboolean (*ETableSimpleHasSaveIdFn) (ETableModel *etm, void *data);
-typedef char *(*ETableSimpleGetSaveIdFn) (ETableModel *etm, int row, void *data);
+typedef gboolean (*ETableSimpleHasSaveIdFn) (ETableModel *etm, gpointer data);
+typedef gchar *(*ETableSimpleGetSaveIdFn) (ETableModel *etm, gint row, gpointer data);
-typedef void *(*ETableSimpleDuplicateValueFn) (ETableModel *etm, int col, const void *val, void *data);
-typedef void (*ETableSimpleFreeValueFn) (ETableModel *etm, int col, void *val, void *data);
-typedef void *(*ETableSimpleInitializeValueFn) (ETableModel *etm, int col, void *data);
-typedef gboolean (*ETableSimpleValueIsEmptyFn) (ETableModel *etm, int col, const void *val, void *data);
-typedef char *(*ETableSimpleValueToStringFn) (ETableModel *etm, int col, const void *val, void *data);
+typedef void *(*ETableSimpleDuplicateValueFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data);
+typedef void (*ETableSimpleFreeValueFn) (ETableModel *etm, gint col, gpointer val, gpointer data);
+typedef void *(*ETableSimpleInitializeValueFn) (ETableModel *etm, gint col, gpointer data);
+typedef gboolean (*ETableSimpleValueIsEmptyFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data);
+typedef gchar *(*ETableSimpleValueToStringFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data);
typedef struct {
ETableModel parent;
@@ -72,7 +72,7 @@ typedef struct {
ETableSimpleInitializeValueFn initialize_value;
ETableSimpleValueIsEmptyFn value_is_empty;
ETableSimpleValueToStringFn value_to_string;
- void *data;
+ gpointer data;
} ETableSimple;
typedef struct {
@@ -98,22 +98,22 @@ ETableModel *e_table_simple_new (ETableSimpleColumnCountFn
/* Helper functions for if your values are all just strings. */
void *e_table_simple_string_duplicate_value (ETableModel *etm,
- int col,
+ gint col,
const void *val,
void *data);
void e_table_simple_string_free_value (ETableModel *etm,
- int col,
+ gint col,
void *val,
void *data);
void *e_table_simple_string_initialize_value (ETableModel *etm,
- int col,
+ gint col,
void *data);
gboolean e_table_simple_string_value_is_empty (ETableModel *etm,
- int col,
+ gint col,
const void *val,
void *data);
-char *e_table_simple_string_value_to_string (ETableModel *etm,
- int col,
+gchar *e_table_simple_string_value_to_string (ETableModel *etm,
+ gint col,
const void *val,
void *data);
diff --git a/widgets/table/e-table-sort-info.c b/widgets/table/e-table-sort-info.c
index 8d722038e3..bed0c5d679 100644
--- a/widgets/table/e-table-sort-info.c
+++ b/widgets/table/e-table-sort-info.c
@@ -188,7 +188,7 @@ e_table_sort_info_grouping_get_count (ETableSortInfo *info)
}
static void
-e_table_sort_info_grouping_real_truncate (ETableSortInfo *info, int length)
+e_table_sort_info_grouping_real_truncate (ETableSortInfo *info, gint length)
{
if (length < info->group_count) {
info->group_count = length;
@@ -208,7 +208,7 @@ e_table_sort_info_grouping_real_truncate (ETableSortInfo *info, int length)
* criteria in the object.
*/
void
-e_table_sort_info_grouping_truncate (ETableSortInfo *info, int 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);
@@ -222,7 +222,7 @@ e_table_sort_info_grouping_truncate (ETableSortInfo *info, int length)
* Returns: the description of the @n-th grouping criteria in the @info object.
*/
ETableSortColumn
-e_table_sort_info_grouping_get_nth (ETableSortInfo *info, int n)
+e_table_sort_info_grouping_get_nth (ETableSortInfo *info, gint n)
{
if (info->can_group && n < info->group_count) {
return info->groupings[n];
@@ -242,7 +242,7 @@ e_table_sort_info_grouping_get_nth (ETableSortInfo *info, int n)
* whether it is ascending or descending).
*/
void
-e_table_sort_info_grouping_set_nth (ETableSortInfo *info, int 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);
@@ -265,7 +265,7 @@ e_table_sort_info_sorting_get_count (ETableSortInfo *info)
}
static void
-e_table_sort_info_sorting_real_truncate (ETableSortInfo *info, int length)
+e_table_sort_info_sorting_real_truncate (ETableSortInfo *info, gint length)
{
if (length < info->sort_count) {
info->sort_count = length;
@@ -285,7 +285,7 @@ e_table_sort_info_sorting_real_truncate (ETableSortInfo *info, int length)
* criteria in the object.
*/
void
-e_table_sort_info_sorting_truncate (ETableSortInfo *info, int 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);
@@ -299,7 +299,7 @@ e_table_sort_info_sorting_truncate (ETableSortInfo *info, int length)
* Returns: the description of the @n-th grouping criteria in the @info object.
*/
ETableSortColumn
-e_table_sort_info_sorting_get_nth (ETableSortInfo *info, int n)
+e_table_sort_info_sorting_get_nth (ETableSortInfo *info, gint n)
{
if (n < info->sort_count) {
return info->sortings[n];
@@ -319,7 +319,7 @@ e_table_sort_info_sorting_get_nth (ETableSortInfo *info, int n)
* column number and whether it is ascending or descending).
*/
void
-e_table_sort_info_sorting_set_nth (ETableSortInfo *info, int 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);
@@ -358,22 +358,22 @@ e_table_sort_info_load_from_node (ETableSortInfo *info,
xmlNode *node,
gdouble state_version)
{
- int i;
+ gint i;
xmlNode *grouping;
if (state_version <= 0.05) {
i = 0;
- for (grouping = node->xmlChildrenNode; grouping && !strcmp ((char *)grouping->name, "group"); grouping = grouping->xmlChildrenNode) {
+ for (grouping = node->xmlChildrenNode; grouping && !strcmp ((gchar *)grouping->name, "group"); grouping = grouping->xmlChildrenNode) {
ETableSortColumn column;
- column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column");
- column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending");
+ column.column = e_xml_get_integer_prop_by_name (grouping, (const guchar *)"column");
+ column.ascending = e_xml_get_bool_prop_by_name (grouping, (const guchar *)"ascending");
e_table_sort_info_grouping_set_nth(info, i++, column);
}
i = 0;
- for (; grouping && !strcmp ((char *)grouping->name, "leaf"); grouping = grouping->xmlChildrenNode) {
+ for (; grouping && !strcmp ((gchar *)grouping->name, "leaf"); grouping = grouping->xmlChildrenNode) {
ETableSortColumn column;
- column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column");
- column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending");
+ column.column = e_xml_get_integer_prop_by_name (grouping, (const guchar *)"column");
+ column.ascending = e_xml_get_bool_prop_by_name (grouping, (const guchar *)"ascending");
e_table_sort_info_sorting_set_nth(info, i++, column);
}
} else {
@@ -385,13 +385,13 @@ e_table_sort_info_load_from_node (ETableSortInfo *info,
if (grouping->type != XML_ELEMENT_NODE)
continue;
- if (!strcmp ((char *)grouping->name, "group")) {
- column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column");
- column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending");
+ if (!strcmp ((gchar *)grouping->name, "group")) {
+ column.column = e_xml_get_integer_prop_by_name (grouping, (const guchar *)"column");
+ column.ascending = e_xml_get_bool_prop_by_name (grouping, (const guchar *)"ascending");
e_table_sort_info_grouping_set_nth(info, gcnt++, column);
- } else if (!strcmp ((char *)grouping->name, "leaf")) {
- column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column");
- column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending");
+ } else if (!strcmp ((gchar *)grouping->name, "leaf")) {
+ column.column = e_xml_get_integer_prop_by_name (grouping, (const guchar *)"column");
+ column.ascending = e_xml_get_bool_prop_by_name (grouping, (const guchar *)"ascending");
e_table_sort_info_sorting_set_nth(info, scnt++, column);
}
}
@@ -414,26 +414,26 @@ e_table_sort_info_save_to_node (ETableSortInfo *info,
xmlNode *parent)
{
xmlNode *grouping;
- int i;
- const int sort_count = e_table_sort_info_sorting_get_count (info);
- const int group_count = e_table_sort_info_grouping_get_count (info);
+ gint i;
+ const gint sort_count = e_table_sort_info_sorting_get_count (info);
+ const gint group_count = e_table_sort_info_grouping_get_count (info);
- grouping = xmlNewChild (parent, NULL, (const unsigned char *)"grouping", NULL);
+ grouping = xmlNewChild (parent, NULL, (const guchar *)"grouping", NULL);
for (i = 0; i < group_count; i++) {
ETableSortColumn column = e_table_sort_info_grouping_get_nth(info, i);
- xmlNode *new_node = xmlNewChild(grouping, NULL, (const unsigned char *)"group", NULL);
+ xmlNode *new_node = xmlNewChild(grouping, NULL, (const guchar *)"group", NULL);
- e_xml_set_integer_prop_by_name (new_node, (const unsigned char *)"column", column.column);
- e_xml_set_bool_prop_by_name (new_node, (const unsigned char *)"ascending", column.ascending);
+ e_xml_set_integer_prop_by_name (new_node, (const guchar *)"column", column.column);
+ e_xml_set_bool_prop_by_name (new_node, (const guchar *)"ascending", column.ascending);
}
for (i = 0; i < sort_count; i++) {
ETableSortColumn column = e_table_sort_info_sorting_get_nth(info, i);
- xmlNode *new_node = xmlNewChild(grouping, NULL, (const unsigned char *)"leaf", NULL);
+ xmlNode *new_node = xmlNewChild(grouping, NULL, (const guchar *)"leaf", NULL);
- e_xml_set_integer_prop_by_name (new_node, (const unsigned char *)"column", column.column);
- e_xml_set_bool_prop_by_name (new_node, (const unsigned char *)"ascending", column.ascending);
+ e_xml_set_integer_prop_by_name (new_node, (const guchar *)"column", column.column);
+ e_xml_set_bool_prop_by_name (new_node, (const guchar *)"ascending", column.ascending);
}
return grouping;
diff --git a/widgets/table/e-table-sort-info.h b/widgets/table/e-table-sort-info.h
index 4a0dde4d88..d9ffec9be2 100644
--- a/widgets/table/e-table-sort-info.h
+++ b/widgets/table/e-table-sort-info.h
@@ -74,20 +74,20 @@ void e_table_sort_info_thaw (ETableSortInfo *info)
guint e_table_sort_info_grouping_get_count (ETableSortInfo *info);
void e_table_sort_info_grouping_truncate (ETableSortInfo *info,
- int length);
+ gint length);
ETableSortColumn e_table_sort_info_grouping_get_nth (ETableSortInfo *info,
- int n);
+ gint n);
void e_table_sort_info_grouping_set_nth (ETableSortInfo *info,
- int n,
+ gint n,
ETableSortColumn column);
guint e_table_sort_info_sorting_get_count (ETableSortInfo *info);
void e_table_sort_info_sorting_truncate (ETableSortInfo *info,
- int length);
+ gint length);
ETableSortColumn e_table_sort_info_sorting_get_nth (ETableSortInfo *info,
- int n);
+ gint n);
void e_table_sort_info_sorting_set_nth (ETableSortInfo *info,
- int n,
+ gint n,
ETableSortColumn column);
ETableSortInfo *e_table_sort_info_new (void);
diff --git a/widgets/table/e-table-sorted-variable.c b/widgets/table/e-table-sorted-variable.c
index 02a2e8bf26..82b2d5b37d 100644
--- a/widgets/table/e-table-sorted-variable.c
+++ b/widgets/table/e-table-sorted-variable.c
@@ -127,7 +127,7 @@ etsv_add (ETableSubsetVariable *etssv,
ETableModel *etm = E_TABLE_MODEL(etssv);
ETableSubset *etss = E_TABLE_SUBSET(etssv);
ETableSortedVariable *etsv = E_TABLE_SORTED_VARIABLE (etssv);
- int i;
+ gint i;
e_table_model_pre_change (etm);
@@ -164,8 +164,8 @@ etsv_add_all (ETableSubsetVariable *etssv)
ETableModel *etm = E_TABLE_MODEL(etssv);
ETableSubset *etss = E_TABLE_SUBSET(etssv);
ETableSortedVariable *etsv = E_TABLE_SORTED_VARIABLE (etssv);
- int rows;
- int i;
+ gint rows;
+ gint i;
e_table_model_pre_change(etm);
@@ -217,7 +217,7 @@ static void
etsv_sort(ETableSortedVariable *etsv)
{
ETableSubset *etss = E_TABLE_SUBSET(etsv);
- static int reentering = 0;
+ static gint reentering = 0;
if (reentering)
return;
reentering = 1;
diff --git a/widgets/table/e-table-sorted-variable.h b/widgets/table/e-table-sorted-variable.h
index 53744dce72..48bb0e3aa0 100644
--- a/widgets/table/e-table-sorted-variable.h
+++ b/widgets/table/e-table-sorted-variable.h
@@ -46,8 +46,8 @@ typedef struct {
ETableHeader *full_header;
- int sort_info_changed_id;
- int sort_idle_id;
+ gint sort_info_changed_id;
+ gint sort_idle_id;
int insert_idle_id;
int insert_count;
diff --git a/widgets/table/e-table-sorted.c b/widgets/table/e-table-sorted.c
index 076863adfb..7eceeb875f 100644
--- a/widgets/table/e-table-sorted.c
+++ b/widgets/table/e-table-sorted.c
@@ -44,10 +44,10 @@ G_DEFINE_TYPE (ETableSorted, ets, E_TABLE_SUBSET_TYPE)
static void ets_sort_info_changed (ETableSortInfo *info, ETableSorted *ets);
static void ets_sort (ETableSorted *ets);
static void ets_proxy_model_changed (ETableSubset *etss, ETableModel *source);
-static void ets_proxy_model_row_changed (ETableSubset *etss, ETableModel *source, int row);
-static void ets_proxy_model_cell_changed (ETableSubset *etss, ETableModel *source, int col, int row);
-static void ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, int row, int count);
-static void ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, int row, int count);
+static void ets_proxy_model_row_changed (ETableSubset *etss, ETableModel *source, gint row);
+static void ets_proxy_model_cell_changed (ETableSubset *etss, ETableModel *source, gint col, gint row);
+static void ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, gint row, gint count);
+static void ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, gint row, gint count);
static void
ets_dispose (GObject *object)
@@ -158,7 +158,7 @@ ets_sort_info_changed (ETableSortInfo *info, ETableSorted *ets)
static void
ets_proxy_model_changed (ETableSubset *subset, ETableModel *source)
{
- int rows, i;
+ gint rows, i;
rows = e_table_model_row_count(source);
@@ -177,7 +177,7 @@ ets_proxy_model_changed (ETableSubset *subset, ETableModel *source)
}
static void
-ets_proxy_model_row_changed (ETableSubset *subset, ETableModel *source, int 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);
@@ -187,7 +187,7 @@ ets_proxy_model_row_changed (ETableSubset *subset, ETableModel *source, int row)
}
static void
-ets_proxy_model_cell_changed (ETableSubset *subset, ETableModel *source, int col, int 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))
@@ -197,11 +197,11 @@ ets_proxy_model_cell_changed (ETableSubset *subset, ETableModel *source, int col
}
static void
-ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, int row, int 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);
- int i;
+ gint i;
gboolean full_change = FALSE;
if (count == 0) {
@@ -257,12 +257,12 @@ ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, int row,
}
static void
-ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, int row, int count)
+ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, gint row, gint count)
{
ETableModel *etm = E_TABLE_MODEL(etss);
- int i;
+ gint i;
gboolean shift;
- int j;
+ gint j;
shift = row == etss->n_map - count;
@@ -297,7 +297,7 @@ static void
ets_sort(ETableSorted *ets)
{
ETableSubset *etss = E_TABLE_SUBSET(ets);
- static int reentering = 0;
+ static gint reentering = 0;
if (reentering)
return;
reentering = 1;
diff --git a/widgets/table/e-table-sorted.h b/widgets/table/e-table-sorted.h
index 031d9c9647..cb802768d8 100644
--- a/widgets/table/e-table-sorted.h
+++ b/widgets/table/e-table-sorted.h
@@ -46,8 +46,8 @@ typedef struct {
ETableHeader *full_header;
- int sort_info_changed_id;
- int sort_idle_id;
+ gint sort_info_changed_id;
+ gint sort_idle_id;
int insert_idle_id;
int insert_count;
diff --git a/widgets/table/e-table-sorter.c b/widgets/table/e-table-sorter.c
index 154d5a2581..8851f31209 100644
--- a/widgets/table/e-table-sorter.c
+++ b/widgets/table/e-table-sorter.c
@@ -45,19 +45,19 @@ G_DEFINE_TYPE (ETableSorter, ets, E_SORTER_TYPE)
#define INCREMENT_AMOUNT 100
static void ets_model_changed (ETableModel *etm, ETableSorter *ets);
-static void ets_model_row_changed (ETableModel *etm, int row, ETableSorter *ets);
-static void ets_model_cell_changed (ETableModel *etm, int col, int row, ETableSorter *ets);
-static void ets_model_rows_inserted (ETableModel *etm, int row, int count, ETableSorter *ets);
-static void ets_model_rows_deleted (ETableModel *etm, int row, int count, ETableSorter *ets);
+static void ets_model_row_changed (ETableModel *etm, gint row, ETableSorter *ets);
+static void ets_model_cell_changed (ETableModel *etm, gint col, gint row, ETableSorter *ets);
+static void ets_model_rows_inserted (ETableModel *etm, gint row, gint count, ETableSorter *ets);
+static void ets_model_rows_deleted (ETableModel *etm, gint row, gint count, ETableSorter *ets);
static void ets_sort_info_changed (ETableSortInfo *info, ETableSorter *ets);
static void ets_clean (ETableSorter *ets);
static void ets_sort (ETableSorter *ets);
static void ets_backsort (ETableSorter *ets);
-static gint ets_model_to_sorted (ESorter *sorter, int row);
-static gint ets_sorted_to_model (ESorter *sorter, int row);
-static void ets_get_model_to_sorted_array (ESorter *sorter, int **array, int *count);
-static void ets_get_sorted_to_model_array (ESorter *sorter, int **array, int *count);
+static gint ets_model_to_sorted (ESorter *sorter, gint row);
+static gint ets_sorted_to_model (ESorter *sorter, gint row);
+static void ets_get_model_to_sorted_array (ESorter *sorter, gint **array, gint *count);
+static void ets_get_sorted_to_model_array (ESorter *sorter, gint **array, gint *count);
static gboolean ets_needs_sorting (ESorter *ets);
static void
@@ -230,25 +230,25 @@ ets_model_changed (ETableModel *etm, ETableSorter *ets)
}
static void
-ets_model_row_changed (ETableModel *etm, int row, ETableSorter *ets)
+ets_model_row_changed (ETableModel *etm, gint row, ETableSorter *ets)
{
ets_clean(ets);
}
static void
-ets_model_cell_changed (ETableModel *etm, int col, int 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, int row, int 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, int row, int count, ETableSorter *ets)
+ets_model_rows_deleted (ETableModel *etm, gint row, gint count, ETableSorter *ets)
{
ets_clean(ets);
}
@@ -261,22 +261,22 @@ ets_sort_info_changed (ETableSortInfo *info, ETableSorter *ets)
}
static ETableSorter *ets_closure;
-static void **vals_closure;
-static int cols_closure;
-static int *ascending_closure;
+static gpointer *vals_closure;
+static gint cols_closure;
+static gint *ascending_closure;
static GCompareFunc *compare_closure;
/* FIXME: Make it not cache the second and later columns (as if anyone cares.) */
static int
-qsort_callback(const void *data1, const void *data2)
+qsort_callback(gconstpointer data1, gconstpointer data2)
{
- gint row1 = *(int *)data1;
- gint row2 = *(int *)data2;
- int j;
- int sort_count = e_table_sort_info_sorting_get_count(ets_closure->sort_info) + e_table_sort_info_grouping_get_count(ets_closure->sort_info);
- int comp_val = 0;
- int ascending = 1;
+ gint row1 = *(gint *)data1;
+ gint row2 = *(gint *)data2;
+ gint j;
+ gint sort_count = e_table_sort_info_sorting_get_count(ets_closure->sort_info) + e_table_sort_info_grouping_get_count(ets_closure->sort_info);
+ gint comp_val = 0;
+ gint ascending = 1;
for (j = 0; j < sort_count; j++) {
comp_val = (*(compare_closure[j]))(vals_closure[cols_closure * row1 + j], vals_closure[cols_closure * row2 + j]);
ascending = ascending_closure[j];
@@ -310,11 +310,11 @@ ets_clean(ETableSorter *ets)
static void
ets_sort(ETableSorter *ets)
{
- int rows;
- int i;
- int j;
- int cols;
- int group_cols;
+ gint rows;
+ gint i;
+ gint j;
+ gint cols;
+ gint group_cols;
if (ets->sorted)
return;
@@ -330,7 +330,7 @@ ets_sort(ETableSorter *ets)
cols_closure = cols;
ets_closure = ets;
- vals_closure = g_new(void *, rows * cols);
+ vals_closure = g_new(gpointer , rows * cols);
ascending_closure = g_new(int, cols);
compare_closure = g_new(GCompareFunc, cols);
@@ -365,7 +365,7 @@ ets_sort(ETableSorter *ets)
static void
ets_backsort(ETableSorter *ets)
{
- int i, rows;
+ gint i, rows;
if (ets->backsorted)
return;
@@ -382,10 +382,10 @@ ets_backsort(ETableSorter *ets)
static gint
-ets_model_to_sorted (ESorter *es, int row)
+ets_model_to_sorted (ESorter *es, gint row)
{
ETableSorter *ets = E_TABLE_SORTER(es);
- int rows = e_table_model_row_count(ets->source);
+ gint rows = e_table_model_row_count(ets->source);
g_return_val_if_fail(row >= 0, -1);
g_return_val_if_fail(row < rows, -1);
@@ -400,10 +400,10 @@ ets_model_to_sorted (ESorter *es, int row)
}
static gint
-ets_sorted_to_model (ESorter *es, int row)
+ets_sorted_to_model (ESorter *es, gint row)
{
ETableSorter *ets = E_TABLE_SORTER(es);
- int rows = e_table_model_row_count(ets->source);
+ gint rows = e_table_model_row_count(ets->source);
g_return_val_if_fail(row >= 0, -1);
g_return_val_if_fail(row < rows, -1);
@@ -418,7 +418,7 @@ ets_sorted_to_model (ESorter *es, int row)
}
static void
-ets_get_model_to_sorted_array (ESorter *es, int **array, int *count)
+ets_get_model_to_sorted_array (ESorter *es, gint **array, gint *count)
{
ETableSorter *ets = E_TABLE_SORTER(es);
if (array || count) {
@@ -432,7 +432,7 @@ ets_get_model_to_sorted_array (ESorter *es, int **array, int *count)
}
static void
-ets_get_sorted_to_model_array (ESorter *es, int **array, int *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-sorter.h b/widgets/table/e-table-sorter.h
index 245539e36f..067da103f9 100644
--- a/widgets/table/e-table-sorter.h
+++ b/widgets/table/e-table-sorter.h
@@ -46,18 +46,18 @@ typedef struct {
ETableSortInfo *sort_info;
/* If needs_sorting is 0, then model_to_sorted and sorted_to_model are no-ops. */
- int needs_sorting;
+ gint needs_sorting;
- int *sorted;
- int *backsorted;
+ gint *sorted;
+ gint *backsorted;
- int table_model_changed_id;
- int table_model_row_changed_id;
- int table_model_cell_changed_id;
- int table_model_rows_inserted_id;
- int table_model_rows_deleted_id;
- int sort_info_changed_id;
- int group_info_changed_id;
+ gint table_model_changed_id;
+ gint table_model_row_changed_id;
+ gint table_model_cell_changed_id;
+ gint table_model_rows_inserted_id;
+ gint table_model_rows_deleted_id;
+ gint sort_info_changed_id;
+ gint group_info_changed_id;
} ETableSorter;
typedef struct {
diff --git a/widgets/table/e-table-sorting-utils.c b/widgets/table/e-table-sorting-utils.c
index d04144d5ad..a8ab92bf94 100644
--- a/widgets/table/e-table-sorting-utils.c
+++ b/widgets/table/e-table-sorting-utils.c
@@ -32,12 +32,12 @@
/* This takes source rows. */
static int
-etsu_compare(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, int row1, int row2)
+etsu_compare(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint row1, gint row2)
{
- int j;
- int sort_count = e_table_sort_info_sorting_get_count(sort_info);
- int comp_val = 0;
- int ascending = 1;
+ gint j;
+ gint sort_count = e_table_sort_info_sorting_get_count(sort_info);
+ gint comp_val = 0;
+ gint ascending = 1;
for (j = 0; j < sort_count; j++) {
ETableSortColumn column = e_table_sort_info_sorting_get_nth(sort_info, j);
@@ -63,9 +63,9 @@ etsu_compare(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_
}
typedef struct {
- int cols;
- void **vals;
- int *ascending;
+ gint cols;
+ gpointer *vals;
+ gint *ascending;
GCompareFunc *compare;
} ETableSortClosure;
@@ -78,15 +78,15 @@ typedef struct {
/* FIXME: Make it not cache the second and later columns (as if anyone cares.) */
static int
-e_sort_callback(const void *data1, const void *data2, gpointer user_data)
+e_sort_callback(gconstpointer data1, gconstpointer data2, gpointer user_data)
{
- gint row1 = *(int *)data1;
- gint row2 = *(int *)data2;
+ gint row1 = *(gint *)data1;
+ gint row2 = *(gint *)data2;
ETableSortClosure *closure = user_data;
- int j;
- int sort_count = closure->cols;
- int comp_val = 0;
- int ascending = 1;
+ gint j;
+ gint sort_count = closure->cols;
+ gint comp_val = 0;
+ gint ascending = 1;
for (j = 0; j < sort_count; j++) {
comp_val = (*(closure->compare[j]))(closure->vals[closure->cols * row1 + j], closure->vals[closure->cols * row2 + j]);
ascending = closure->ascending[j];
@@ -105,12 +105,12 @@ e_sort_callback(const void *data1, const void *data2, gpointer user_data)
}
void
-e_table_sorting_utils_sort(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, int *map_table, int rows)
+e_table_sorting_utils_sort(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint *map_table, gint rows)
{
- int total_rows;
- int i;
- int j;
- int cols;
+ gint total_rows;
+ gint i;
+ gint j;
+ gint cols;
ETableSortClosure closure;
g_return_if_fail(source != NULL);
@@ -124,7 +124,7 @@ e_table_sorting_utils_sort(ETableModel *source, ETableSortInfo *sort_info, ETabl
cols = e_table_sort_info_sorting_get_count(sort_info);
closure.cols = cols;
- closure.vals = g_new(void *, total_rows * cols);
+ closure.vals = g_new(gpointer , total_rows * cols);
closure.ascending = g_new(int, cols);
closure.compare = g_new(GCompareFunc, cols);
@@ -152,10 +152,10 @@ e_table_sorting_utils_sort(ETableModel *source, ETableSortInfo *sort_info, ETabl
gboolean
e_table_sorting_utils_affects_sort (ETableSortInfo *sort_info,
ETableHeader *full_header,
- int col)
+ gint col)
{
- int j;
- int cols;
+ gint j;
+ gint cols;
g_return_val_if_fail(sort_info != NULL, TRUE);
g_return_val_if_fail(E_IS_TABLE_SORT_INFO(sort_info), TRUE);
@@ -178,10 +178,10 @@ 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. */
-int
-e_table_sorting_utils_insert(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, int *map_table, int rows, int row)
+gint
+e_table_sorting_utils_insert(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint *map_table, gint rows, gint row)
{
- int i;
+ gint i;
i = 0;
/* handle insertions when we have a 'sort group' */
@@ -192,11 +192,11 @@ e_table_sorting_utils_insert(ETableModel *source, ETableSortInfo *sort_info, ETa
}
/* FIXME: This could be done in time log n instead of time n with a binary search. */
-int
-e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, int *map_table, int rows, int view_row)
+gint
+e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint *map_table, gint rows, gint view_row)
{
- int i;
- int row;
+ gint i;
+ gint row;
i = view_row;
row = map_table[i];
@@ -221,10 +221,10 @@ e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_
static int
etsu_tree_compare(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath path1, ETreePath path2)
{
- int j;
- int sort_count = e_table_sort_info_sorting_get_count(sort_info);
- int comp_val = 0;
- int ascending = 1;
+ gint j;
+ gint sort_count = e_table_sort_info_sorting_get_count(sort_info);
+ gint comp_val = 0;
+ gint ascending = 1;
for (j = 0; j < sort_count; j++) {
ETableSortColumn column = e_table_sort_info_sorting_get_nth(sort_info, j);
@@ -244,7 +244,7 @@ etsu_tree_compare(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *f
}
static int
-e_sort_tree_callback(const void *data1, const void *data2, gpointer user_data)
+e_sort_tree_callback(gconstpointer data1, gconstpointer data2, gpointer user_data)
{
ETreePath *path1 = *(ETreePath *)data1;
ETreePath *path2 = *(ETreePath *)data2;
@@ -254,12 +254,12 @@ e_sort_tree_callback(const void *data1, const void *data2, gpointer user_data)
}
void
-e_table_sorting_utils_tree_sort(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, int count)
+e_table_sorting_utils_tree_sort(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, gint count)
{
ETableSortClosure closure;
- int cols;
- int i, j;
- int *map;
+ gint cols;
+ gint i, j;
+ gint *map;
ETreePath *map_copy;
g_return_if_fail(source != NULL);
g_return_if_fail(E_IS_TREE_MODEL(source));
@@ -271,7 +271,7 @@ e_table_sorting_utils_tree_sort(ETreeModel *source, ETableSortInfo *sort_info, E
cols = e_table_sort_info_sorting_get_count(sort_info);
closure.cols = cols;
- closure.vals = g_new(void *, count * cols);
+ closure.vals = g_new(gpointer , count * cols);
closure.ascending = g_new(int, cols);
closure.compare = g_new(GCompareFunc, cols);
@@ -315,10 +315,10 @@ e_table_sorting_utils_tree_sort(ETreeModel *source, ETableSortInfo *sort_info, E
}
/* FIXME: This could be done in time log n instead of time n with a binary search. */
-int
-e_table_sorting_utils_tree_check_position (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, int count, int old_index)
+gint
+e_table_sorting_utils_tree_check_position (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, gint count, gint old_index)
{
- int i;
+ gint i;
ETreePath path;
i = old_index;
@@ -337,8 +337,8 @@ 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. */
-int
-e_table_sorting_utils_tree_insert(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, int count, ETreePath path)
+gint
+e_table_sorting_utils_tree_insert(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, gint count, ETreePath path)
{
size_t start;
size_t end;
diff --git a/widgets/table/e-table-sorting-utils.h b/widgets/table/e-table-sorting-utils.h
index a0f43fb232..d348d4b6b1 100644
--- a/widgets/table/e-table-sorting-utils.h
+++ b/widgets/table/e-table-sorting-utils.h
@@ -31,27 +31,27 @@ G_BEGIN_DECLS
#include <table/e-table-header.h>
gboolean e_table_sorting_utils_affects_sort (ETableSortInfo *sort_info,
ETableHeader *full_header,
- int col);
+ gint col);
void e_table_sorting_utils_sort (ETableModel *source,
ETableSortInfo *sort_info,
ETableHeader *full_header,
- int *map_table,
- int rows);
-int e_table_sorting_utils_insert (ETableModel *source,
+ gint *map_table,
+ gint rows);
+gint e_table_sorting_utils_insert (ETableModel *source,
ETableSortInfo *sort_info,
ETableHeader *full_header,
- int *map_table,
- int rows,
- int row);
-int e_table_sorting_utils_check_position (ETableModel *source,
+ gint *map_table,
+ gint rows,
+ gint row);
+gint e_table_sorting_utils_check_position (ETableModel *source,
ETableSortInfo *sort_info,
ETableHeader *full_header,
- int *map_table,
- int rows,
- int view_row);
+ gint *map_table,
+ gint rows,
+ gint view_row);
@@ -59,18 +59,18 @@ void e_table_sorting_utils_tree_sort (ETreeModel *source,
ETableSortInfo *sort_info,
ETableHeader *full_header,
ETreePath *map_table,
- int count);
-int e_table_sorting_utils_tree_check_position (ETreeModel *source,
+ gint count);
+gint e_table_sorting_utils_tree_check_position (ETreeModel *source,
ETableSortInfo *sort_info,
ETableHeader *full_header,
ETreePath *map_table,
- int count,
- int old_index);
-int e_table_sorting_utils_tree_insert (ETreeModel *source,
+ gint count,
+ gint old_index);
+gint e_table_sorting_utils_tree_insert (ETreeModel *source,
ETableSortInfo *sort_info,
ETableHeader *full_header,
ETreePath *map_table,
- int count,
+ gint count,
ETreePath path);
G_END_DECLS
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index f966b3ca6f..fd57f5b130 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -45,7 +45,7 @@ static void
etsp_finalize (GObject *object)
{
ETableSpecification *etsp = E_TABLE_SPECIFICATION (object);
- int i;
+ gint i;
if (etsp->columns) {
for (i = 0; etsp->columns[i]; i++) {
@@ -128,7 +128,7 @@ e_table_specification_new (void)
*/
gboolean
e_table_specification_load_from_file (ETableSpecification *specification,
- const char *filename)
+ const gchar *filename)
{
xmlDoc *doc;
@@ -155,10 +155,10 @@ e_table_specification_load_from_file (ETableSpecification *specification,
*/
gboolean
e_table_specification_load_from_string (ETableSpecification *specification,
- const char *xml)
+ const gchar *xml)
{
xmlDoc *doc;
- doc = xmlParseMemory ( (char *) xml, strlen (xml));
+ doc = xmlParseMemory ( (gchar *) xml, strlen (xml));
if (doc) {
xmlNode *node = xmlDocGetRootElement (doc);
e_table_specification_load_from_node (specification, node);
@@ -181,29 +181,29 @@ void
e_table_specification_load_from_node (ETableSpecification *specification,
const xmlNode *node)
{
- char *temp;
+ gchar *temp;
xmlNode *children;
GList *list = NULL, *list2;
- int i;
-
- specification->no_headers = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"no-headers");
- specification->click_to_add = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"click-to-add");
- specification->click_to_add_end = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"click-to-add-end") && specification->click_to_add;
- specification->alternating_row_colors = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"alternating-row-colors", TRUE);
- specification->horizontal_draw_grid = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"horizontal-draw-grid");
- specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"vertical-draw-grid");
- if (e_xml_get_bool_prop_by_name_with_default(node, (const unsigned char *)"draw-grid", TRUE) ==
- e_xml_get_bool_prop_by_name_with_default(node, (const unsigned char *)"draw-grid", FALSE)) {
+ gint i;
+
+ specification->no_headers = e_xml_get_bool_prop_by_name (node, (const guchar *)"no-headers");
+ specification->click_to_add = e_xml_get_bool_prop_by_name (node, (const guchar *)"click-to-add");
+ specification->click_to_add_end = e_xml_get_bool_prop_by_name (node, (const guchar *)"click-to-add-end") && specification->click_to_add;
+ specification->alternating_row_colors = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"alternating-row-colors", TRUE);
+ specification->horizontal_draw_grid = e_xml_get_bool_prop_by_name (node, (const guchar *)"horizontal-draw-grid");
+ specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, (const guchar *)"vertical-draw-grid");
+ if (e_xml_get_bool_prop_by_name_with_default(node, (const guchar *)"draw-grid", TRUE) ==
+ e_xml_get_bool_prop_by_name_with_default(node, (const guchar *)"draw-grid", FALSE)) {
specification->horizontal_draw_grid =
- specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"draw-grid");
+ specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, (const guchar *)"draw-grid");
}
- specification->draw_focus = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"draw-focus", TRUE);
- specification->horizontal_scrolling = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"horizontal-scrolling", FALSE);
- specification->horizontal_resize = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"horizontal-resize", FALSE);
- specification->allow_grouping = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"allow-grouping", TRUE);
+ specification->draw_focus = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"draw-focus", TRUE);
+ specification->horizontal_scrolling = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"horizontal-scrolling", FALSE);
+ specification->horizontal_resize = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"horizontal-resize", FALSE);
+ specification->allow_grouping = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"allow-grouping", TRUE);
specification->selection_mode = GTK_SELECTION_MULTIPLE;
- temp = e_xml_get_string_prop_by_name (node, (const unsigned char *)"selection-mode");
+ temp = e_xml_get_string_prop_by_name (node, (const guchar *)"selection-mode");
if (temp && !g_ascii_strcasecmp (temp, "single")) {
specification->selection_mode = GTK_SELECTION_SINGLE;
} else if (temp && !g_ascii_strcasecmp (temp, "browse")) {
@@ -214,7 +214,7 @@ e_table_specification_load_from_node (ETableSpecification *specification,
g_free (temp);
specification->cursor_mode = E_CURSOR_SIMPLE;
- temp = e_xml_get_string_prop_by_name (node, (const unsigned char *)"cursor-mode");
+ temp = e_xml_get_string_prop_by_name (node, (const guchar *)"cursor-mode");
if (temp && !g_ascii_strcasecmp (temp, "line")) {
specification->cursor_mode = E_CURSOR_LINE;
} else if (temp && !g_ascii_strcasecmp (temp, "spreadsheet")) {
@@ -225,12 +225,12 @@ e_table_specification_load_from_node (ETableSpecification *specification,
g_free (specification->click_to_add_message);
specification->click_to_add_message =
e_xml_get_string_prop_by_name (
- node, (const unsigned char *)"_click-to-add-message");
+ node, (const guchar *)"_click-to-add-message");
g_free (specification->domain);
specification->domain =
e_xml_get_string_prop_by_name (
- node, (const unsigned char *)"gettext-domain");
+ node, (const guchar *)"gettext-domain");
if (specification->domain && !*specification->domain) {
g_free (specification->domain);
specification->domain = NULL;
@@ -248,12 +248,12 @@ e_table_specification_load_from_node (ETableSpecification *specification,
specification->columns = NULL;
for (children = node->xmlChildrenNode; children; children = children->next) {
- if (!strcmp ((char *)children->name, "ETableColumn")) {
+ if (!strcmp ((gchar *)children->name, "ETableColumn")) {
ETableColumnSpecification *col_spec = e_table_column_specification_new ();
e_table_column_specification_load_from_node (col_spec, children);
list = g_list_append (list, col_spec);
- } else if (specification->state == NULL && !strcmp ((char *)children->name, "ETableState")) {
+ } else if (specification->state == NULL && !strcmp ((gchar *)children->name, "ETableState")) {
specification->state = e_table_state_new ();
e_table_state_load_from_node (specification->state, children);
e_table_sort_info_set_can_group (specification->state->sort_info, specification->allow_grouping);
@@ -282,18 +282,18 @@ e_table_specification_load_from_node (ETableSpecification *specification,
*
* Returns: 0 on success or -1 on error.
*/
-int
+gint
e_table_specification_save_to_file (ETableSpecification *specification,
- const char *filename)
+ const gchar *filename)
{
xmlDoc *doc;
- int ret;
+ gint ret;
g_return_val_if_fail (specification != NULL, -1);
g_return_val_if_fail (filename != NULL, -1);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), -1);
- if ((doc = xmlNewDoc ((const unsigned char *)"1.0")) == NULL)
+ if ((doc = xmlNewDoc ((const guchar *)"1.0")) == NULL)
return -1;
xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc));
@@ -315,18 +315,18 @@ e_table_specification_save_to_file (ETableSpecification *specification,
* representation of @specification. This stringified representation
* uses XML as a convenience.
*/
-char *
+gchar *
e_table_specification_save_to_string (ETableSpecification *specification)
{
- char *ret_val;
+ gchar *ret_val;
xmlChar *string;
- int length;
+ gint length;
xmlDoc *doc;
g_return_val_if_fail (specification != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL);
- doc = xmlNewDoc ((const unsigned char *)"1.0");
+ doc = xmlNewDoc ((const guchar *)"1.0");
xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc));
xmlDocDumpMemory (doc, &string, &length);
@@ -357,17 +357,17 @@ e_table_specification_save_to_node (ETableSpecification *specification,
g_return_val_if_fail (specification != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL);
- node = xmlNewNode (NULL, (const unsigned char *)"ETableSpecification");
- e_xml_set_bool_prop_by_name (node, (const unsigned char *)"no-headers", specification->no_headers);
- e_xml_set_bool_prop_by_name (node, (const unsigned char *)"click-to-add", specification->click_to_add);
- e_xml_set_bool_prop_by_name (node, (const unsigned char *)"click-to-add-end", specification->click_to_add_end && specification->click_to_add);
- e_xml_set_bool_prop_by_name (node, (const unsigned char *)"alternating-row-colors", specification->alternating_row_colors);
- e_xml_set_bool_prop_by_name (node, (const unsigned char *)"horizontal-draw-grid", specification->horizontal_draw_grid);
- e_xml_set_bool_prop_by_name (node, (const unsigned char *)"vertical-draw-grid", specification->vertical_draw_grid);
- e_xml_set_bool_prop_by_name (node, (const unsigned char *)"draw-focus", specification->draw_focus);
- e_xml_set_bool_prop_by_name (node, (const unsigned char *)"horizontal-scrolling", specification->horizontal_scrolling);
- e_xml_set_bool_prop_by_name (node, (const unsigned char *)"horizontal-resize", specification->horizontal_resize);
- e_xml_set_bool_prop_by_name (node, (const unsigned char *)"allow-grouping", specification->allow_grouping);
+ node = xmlNewNode (NULL, (const guchar *)"ETableSpecification");
+ e_xml_set_bool_prop_by_name (node, (const guchar *)"no-headers", specification->no_headers);
+ e_xml_set_bool_prop_by_name (node, (const guchar *)"click-to-add", specification->click_to_add);
+ e_xml_set_bool_prop_by_name (node, (const guchar *)"click-to-add-end", specification->click_to_add_end && specification->click_to_add);
+ e_xml_set_bool_prop_by_name (node, (const guchar *)"alternating-row-colors", specification->alternating_row_colors);
+ e_xml_set_bool_prop_by_name (node, (const guchar *)"horizontal-draw-grid", specification->horizontal_draw_grid);
+ e_xml_set_bool_prop_by_name (node, (const guchar *)"vertical-draw-grid", specification->vertical_draw_grid);
+ e_xml_set_bool_prop_by_name (node, (const guchar *)"draw-focus", specification->draw_focus);
+ e_xml_set_bool_prop_by_name (node, (const guchar *)"horizontal-scrolling", specification->horizontal_scrolling);
+ e_xml_set_bool_prop_by_name (node, (const guchar *)"horizontal-resize", specification->horizontal_resize);
+ e_xml_set_bool_prop_by_name (node, (const guchar *)"allow-grouping", specification->allow_grouping);
switch (specification->selection_mode){
case GTK_SELECTION_SINGLE:
@@ -380,18 +380,18 @@ e_table_specification_save_to_node (ETableSpecification *specification,
case GTK_SELECTION_EXTENDED:
s = "extended";
}
- xmlSetProp (node, (const unsigned char *)"selection-mode", (unsigned char *)s);
+ xmlSetProp (node, (const guchar *)"selection-mode", (guchar *)s);
if (specification->cursor_mode == E_CURSOR_LINE)
s = "line";
else
s = "cell";
- xmlSetProp (node, (const unsigned char *)"cursor-mode", (unsigned char *)s);
+ xmlSetProp (node, (const guchar *)"cursor-mode", (guchar *)s);
- xmlSetProp (node, (const unsigned char *)"_click-to-add-message", (unsigned char *)specification->click_to_add_message);
- xmlSetProp (node, (const unsigned char *)"gettext-domain", (unsigned char *)specification->domain);
+ xmlSetProp (node, (const guchar *)"_click-to-add-message", (guchar *)specification->click_to_add_message);
+ xmlSetProp (node, (const guchar *)"gettext-domain", (guchar *)specification->domain);
if (specification->columns){
- int i;
+ gint i;
for (i = 0; specification->columns [i]; i++)
e_table_column_specification_save_to_node (
@@ -417,7 +417,7 @@ ETableSpecification *
e_table_specification_duplicate (ETableSpecification *spec)
{
ETableSpecification *new_spec;
- char *spec_str;
+ gchar *spec_str;
g_return_val_if_fail (spec != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (spec), NULL);
diff --git a/widgets/table/e-table-specification.h b/widgets/table/e-table-specification.h
index 580cbc6ba3..c2ca7a018d 100644
--- a/widgets/table/e-table-specification.h
+++ b/widgets/table/e-table-specification.h
@@ -59,8 +59,8 @@ typedef struct {
GtkSelectionMode selection_mode;
ECursorMode cursor_mode;
- char *click_to_add_message;
- char *domain;
+ gchar *click_to_add_message;
+ gchar *domain;
} ETableSpecification;
typedef struct {
@@ -71,15 +71,15 @@ GType e_table_specification_get_type (void);
ETableSpecification *e_table_specification_new (void);
gboolean e_table_specification_load_from_file (ETableSpecification *specification,
- const char *filename);
+ const gchar *filename);
gboolean e_table_specification_load_from_string (ETableSpecification *specification,
- const char *xml);
+ const gchar *xml);
void e_table_specification_load_from_node (ETableSpecification *specification,
const xmlNode *node);
-int e_table_specification_save_to_file (ETableSpecification *specification,
- const char *filename);
-char *e_table_specification_save_to_string (ETableSpecification *specification);
+gint e_table_specification_save_to_file (ETableSpecification *specification,
+ const gchar *filename);
+gchar *e_table_specification_save_to_string (ETableSpecification *specification);
xmlNode *e_table_specification_save_to_node (ETableSpecification *specification,
xmlDoc *doc);
ETableSpecification *e_table_specification_duplicate (ETableSpecification *spec);
diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c
index e9440ecd55..6cbdcbacb9 100644
--- a/widgets/table/e-table-state.c
+++ b/widgets/table/e-table-state.c
@@ -94,10 +94,10 @@ e_table_state_new (void)
}
ETableState *
-e_table_state_vanilla (int col_count)
+e_table_state_vanilla (gint col_count)
{
GString *str;
- int i;
+ gint i;
ETableState *res;
str = g_string_new ("<ETableState>\n");
@@ -115,7 +115,7 @@ e_table_state_vanilla (int col_count)
gboolean
e_table_state_load_from_file (ETableState *state,
- const char *filename)
+ const gchar *filename)
{
xmlDoc *doc;
@@ -131,11 +131,11 @@ e_table_state_load_from_file (ETableState *state,
void
e_table_state_load_from_string (ETableState *state,
- const char *xml)
+ const gchar *xml)
{
xmlDoc *doc;
- doc = xmlParseMemory ((char *) xml, strlen(xml));
+ doc = xmlParseMemory ((gchar *) xml, strlen(xml));
if (doc) {
xmlNode *node = xmlDocGetRootElement(doc);
e_table_state_load_from_node(state, node);
@@ -144,7 +144,7 @@ e_table_state_load_from_string (ETableState *state,
}
typedef struct {
- int column;
+ gint column;
double expansion;
} int_and_double;
@@ -155,10 +155,10 @@ e_table_state_load_from_node (ETableState *state,
xmlNode *children;
GList *list = NULL, *iterator;
gdouble state_version;
- int i;
+ gint i;
state_version = e_xml_get_double_prop_by_name_with_default (
- node, (const unsigned char *)"state-version", STATE_VERSION);
+ node, (const guchar *)"state-version", STATE_VERSION);
if (state->sort_info)
g_object_unref (state->sort_info);
@@ -166,18 +166,18 @@ e_table_state_load_from_node (ETableState *state,
state->sort_info = NULL;
children = node->xmlChildrenNode;
for (; children; children = children->next) {
- if (!strcmp ((char *)children->name, "column")) {
+ if (!strcmp ((gchar *)children->name, "column")) {
int_and_double *column_info = g_new(int_and_double, 1);
column_info->column = e_xml_get_integer_prop_by_name(
- children, (const unsigned char *)"source");
+ children, (const guchar *)"source");
column_info->expansion =
e_xml_get_double_prop_by_name_with_default(
- children, (const unsigned char *)"expansion", 1);
+ children, (const guchar *)"expansion", 1);
list = g_list_append (list, column_info);
} else if (state->sort_info == NULL &&
- !strcmp ((char *)children->name, "grouping")) {
+ !strcmp ((gchar *)children->name, "grouping")) {
state->sort_info = e_table_sort_info_new();
e_table_sort_info_load_from_node(
state->sort_info, children, state_version);
@@ -205,11 +205,11 @@ e_table_state_load_from_node (ETableState *state,
void
e_table_state_save_to_file (ETableState *state,
- const char *filename)
+ const gchar *filename)
{
xmlDoc *doc;
- if ((doc = xmlNewDoc ((const unsigned char *)"1.0")) == NULL)
+ if ((doc = xmlNewDoc ((const guchar *)"1.0")) == NULL)
return;
xmlDocSetRootElement (doc, e_table_state_save_to_node (state, NULL));
@@ -219,15 +219,15 @@ e_table_state_save_to_file (ETableState *state,
xmlFreeDoc (doc);
}
-char *
+gchar *
e_table_state_save_to_string (ETableState *state)
{
- char *ret_val;
+ gchar *ret_val;
xmlChar *string;
- int length;
+ gint length;
xmlDoc *doc;
- doc = xmlNewDoc((const unsigned char *)"1.0");
+ doc = xmlNewDoc((const guchar *)"1.0");
xmlDocSetRootElement(doc, e_table_state_save_to_node(state, NULL));
xmlDocDumpMemory(doc, &string, &length);
xmlFreeDoc(doc);
@@ -241,25 +241,25 @@ xmlNode *
e_table_state_save_to_node (ETableState *state,
xmlNode *parent)
{
- int i;
+ gint i;
xmlNode *node;
if (parent)
- node = xmlNewChild (parent, NULL, (const unsigned char *)"ETableState", NULL);
+ node = xmlNewChild (parent, NULL, (const guchar *)"ETableState", NULL);
else
- node = xmlNewNode (NULL, (const unsigned char *)"ETableState");
+ node = xmlNewNode (NULL, (const guchar *)"ETableState");
- e_xml_set_double_prop_by_name(node, (const unsigned char *)"state-version", STATE_VERSION);
+ e_xml_set_double_prop_by_name(node, (const guchar *)"state-version", STATE_VERSION);
for (i = 0; i < state->col_count; i++) {
- int column = state->columns[i];
+ gint column = state->columns[i];
double expansion = state->expansions[i];
xmlNode *new_node;
- new_node = xmlNewChild(node, NULL, (const unsigned char *)"column", NULL);
- e_xml_set_integer_prop_by_name (new_node, (const unsigned char *)"source", column);
+ new_node = xmlNewChild(node, NULL, (const guchar *)"column", NULL);
+ e_xml_set_integer_prop_by_name (new_node, (const guchar *)"source", column);
if (expansion >= -1)
- e_xml_set_double_prop_by_name(new_node, (const unsigned char *)"expansion", expansion);
+ e_xml_set_double_prop_by_name(new_node, (const guchar *)"expansion", expansion);
}
@@ -280,7 +280,7 @@ ETableState *
e_table_state_duplicate (ETableState *state)
{
ETableState *new_state;
- char *copy;
+ gchar *copy;
g_return_val_if_fail (state != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_STATE (state), NULL);
diff --git a/widgets/table/e-table-state.h b/widgets/table/e-table-state.h
index 7a320c56ba..da3f11b93c 100644
--- a/widgets/table/e-table-state.h
+++ b/widgets/table/e-table-state.h
@@ -40,8 +40,8 @@ typedef struct {
GObject base;
ETableSortInfo *sort_info;
- int col_count;
- int *columns;
+ gint col_count;
+ gint *columns;
double *expansions;
} ETableState;
@@ -52,18 +52,18 @@ typedef struct {
GType e_table_state_get_type (void);
ETableState *e_table_state_new (void);
-ETableState *e_table_state_vanilla (int col_count);
+ETableState *e_table_state_vanilla (gint col_count);
gboolean e_table_state_load_from_file (ETableState *state,
- const char *filename);
+ const gchar *filename);
void e_table_state_load_from_string (ETableState *state,
- const char *xml);
+ const gchar *xml);
void e_table_state_load_from_node (ETableState *state,
const xmlNode *node);
void e_table_state_save_to_file (ETableState *state,
- const char *filename);
-char *e_table_state_save_to_string (ETableState *state);
+ const gchar *filename);
+gchar *e_table_state_save_to_string (ETableState *state);
xmlNode *e_table_state_save_to_node (ETableState *state,
xmlNode *parent);
ETableState *e_table_state_duplicate (ETableState *state);
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c
index b088d8302a..93faeac0f8 100644
--- a/widgets/table/e-table-subset-variable.c
+++ b/widgets/table/e-table-subset-variable.c
@@ -63,7 +63,7 @@ etssv_add_array (ETableSubsetVariable *etssv,
{
ETableModel *etm = E_TABLE_MODEL(etssv);
ETableSubset *etss = E_TABLE_SUBSET(etssv);
- int i;
+ gint i;
e_table_model_pre_change(etm);
@@ -82,8 +82,8 @@ etssv_add_all (ETableSubsetVariable *etssv)
{
ETableModel *etm = E_TABLE_MODEL(etssv);
ETableSubset *etss = E_TABLE_SUBSET(etssv);
- int rows;
- int i;
+ gint rows;
+ gint i;
e_table_model_pre_change(etm);
@@ -104,7 +104,7 @@ etssv_remove (ETableSubsetVariable *etssv,
{
ETableModel *etm = E_TABLE_MODEL(etssv);
ETableSubset *etss = E_TABLE_SUBSET(etssv);
- int i;
+ gint i;
for (i = 0; i < etss->n_map; i++){
if (etss->map_table[i] == row) {
@@ -213,7 +213,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 = (int *)g_new (unsigned int, 1);
+ etss->map_table = (gint *)g_new (unsigned int, 1);
etssv->n_vals_allocated = 1;
e_table_model_changed (etm);
@@ -224,7 +224,7 @@ e_table_subset_variable_increment (ETableSubsetVariable *etssv,
gint position,
gint amount)
{
- int i;
+ gint i;
ETableSubset *etss = E_TABLE_SUBSET(etssv);
for (i = 0; i < etss->n_map; i++) {
if (etss->map_table[i] >= position)
@@ -237,7 +237,7 @@ e_table_subset_variable_decrement (ETableSubsetVariable *etssv,
gint position,
gint amount)
{
- int i;
+ gint i;
ETableSubset *etss = E_TABLE_SUBSET(etssv);
for (i = 0; i < etss->n_map; i++) {
if (etss->map_table[i] >= position)
diff --git a/widgets/table/e-table-subset-variable.h b/widgets/table/e-table-subset-variable.h
index 1aed0d3cb3..4654fb5d67 100644
--- a/widgets/table/e-table-subset-variable.h
+++ b/widgets/table/e-table-subset-variable.h
@@ -38,7 +38,7 @@ G_BEGIN_DECLS
typedef struct {
ETableSubset base;
- int n_vals_allocated;
+ gint n_vals_allocated;
} ETableSubsetVariable;
typedef struct {
diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c
index 1cec532d03..bf137e0ef8 100644
--- a/widgets/table/e-table-subset.c
+++ b/widgets/table/e-table-subset.c
@@ -33,10 +33,10 @@
static void etss_proxy_model_pre_change_real (ETableSubset *etss, ETableModel *etm);
static void etss_proxy_model_no_change_real (ETableSubset *etss, ETableModel *etm);
static void etss_proxy_model_changed_real (ETableSubset *etss, ETableModel *etm);
-static void etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, int row);
-static void etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, int col, int row);
-static void etss_proxy_model_rows_inserted_real (ETableSubset *etss, ETableModel *etm, int row, int count);
-static void etss_proxy_model_rows_deleted_real (ETableSubset *etss, ETableModel *etm, int row, int count);
+static void etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, gint row);
+static void etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, gint col, gint row);
+static void etss_proxy_model_rows_inserted_real (ETableSubset *etss, ETableModel *etm, gint row, gint count);
+static void etss_proxy_model_rows_deleted_real (ETableSubset *etss, ETableModel *etm, gint row, gint count);
#define d(x)
@@ -50,15 +50,15 @@ G_DEFINE_TYPE (ETableSubset, etss, E_TABLE_MODEL_TYPE)
#define MAP_ROW(etss, row) (row == -1 ? -1 : etss->map_table[row])
static gint
-etss_get_view_row (ETableSubset *etss, int row)
+etss_get_view_row (ETableSubset *etss, gint row)
{
- const int n = etss->n_map;
- const int * const map_table = etss->map_table;
- int i;
+ const gint n = etss->n_map;
+ const gint * const map_table = etss->map_table;
+ gint i;
- int end = MIN(etss->n_map, etss->last_access + 10);
- int start = MAX(0, etss->last_access - 10);
- int initial = MAX (MIN (etss->last_access, end), start);
+ gint end = MIN(etss->n_map, etss->last_access + 10);
+ gint start = MAX(0, etss->last_access - 10);
+ gint initial = MAX (MIN (etss->last_access, end), start);
for (i = initial; i < end; i++) {
if (map_table [i] == row){
@@ -147,8 +147,8 @@ etss_row_count (ETableModel *etm)
return etss->n_map;
}
-static void *
-etss_value_at (ETableModel *etm, int col, int row)
+static gpointer
+etss_value_at (ETableModel *etm, gint col, gint row)
{
ETableSubset *etss = (ETableSubset *)etm;
@@ -160,7 +160,7 @@ etss_value_at (ETableModel *etm, int col, int row)
}
static void
-etss_set_value_at (ETableModel *etm, int col, int row, const void *val)
+etss_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
{
ETableSubset *etss = (ETableSubset *)etm;
@@ -172,7 +172,7 @@ etss_set_value_at (ETableModel *etm, int col, int row, const void *val)
}
static gboolean
-etss_is_cell_editable (ETableModel *etm, int col, int row)
+etss_is_cell_editable (ETableModel *etm, gint col, gint row)
{
ETableSubset *etss = (ETableSubset *)etm;
@@ -187,8 +187,8 @@ etss_has_save_id (ETableModel *etm)
return TRUE;
}
-static char *
-etss_get_save_id (ETableModel *etm, int row)
+static gchar *
+etss_get_save_id (ETableModel *etm, gint row)
{
ETableSubset *etss = (ETableSubset *)etm;
@@ -201,14 +201,14 @@ etss_get_save_id (ETableModel *etm, int row)
}
static void
-etss_append_row (ETableModel *etm, ETableModel *source, int row)
+etss_append_row (ETableModel *etm, ETableModel *source, gint row)
{
ETableSubset *etss = (ETableSubset *)etm;
e_table_model_append_row (etss->source, source, row);
}
-static void *
-etss_duplicate_value (ETableModel *etm, int col, const void *value)
+static gpointer
+etss_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
{
ETableSubset *etss = (ETableSubset *)etm;
@@ -216,15 +216,15 @@ etss_duplicate_value (ETableModel *etm, int col, const void *value)
}
static void
-etss_free_value (ETableModel *etm, int col, void *value)
+etss_free_value (ETableModel *etm, gint col, gpointer value)
{
ETableSubset *etss = (ETableSubset *)etm;
e_table_model_free_value (etss->source, col, value);
}
-static void *
-etss_initialize_value (ETableModel *etm, int col)
+static gpointer
+etss_initialize_value (ETableModel *etm, gint col)
{
ETableSubset *etss = (ETableSubset *)etm;
@@ -232,15 +232,15 @@ etss_initialize_value (ETableModel *etm, int col)
}
static gboolean
-etss_value_is_empty (ETableModel *etm, int col, const void *value)
+etss_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
{
ETableSubset *etss = (ETableSubset *)etm;
return e_table_model_value_is_empty (etss->source, col, value);
}
-static char *
-etss_value_to_string (ETableModel *etm, int col, const void *value)
+static gchar *
+etss_value_to_string (ETableModel *etm, gint col, gconstpointer value)
{
ETableSubset *etss = (ETableSubset *)etm;
@@ -307,9 +307,9 @@ etss_proxy_model_changed_real (ETableSubset *etss, ETableModel *etm)
}
static void
-etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, int row)
+etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, gint row)
{
- int view_row = etss_get_view_row (etss, row);
+ gint view_row = etss_get_view_row (etss, row);
if (view_row != -1)
e_table_model_row_changed (E_TABLE_MODEL (etss), view_row);
else
@@ -317,9 +317,9 @@ etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, int row
}
static void
-etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, int col, int row)
+etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, gint col, gint row)
{
- int view_row = etss_get_view_row (etss, row);
+ gint view_row = etss_get_view_row (etss, row);
if (view_row != -1)
e_table_model_cell_changed (E_TABLE_MODEL (etss), col, view_row);
else
@@ -327,13 +327,13 @@ etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, int co
}
static void
-etss_proxy_model_rows_inserted_real (ETableSubset *etss, ETableModel *etm, int row, int 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, int row, int count)
+etss_proxy_model_rows_deleted_real (ETableSubset *etss, ETableModel *etm, gint row, gint count)
{
e_table_model_no_change (E_TABLE_MODEL (etss));
}
@@ -360,46 +360,46 @@ etss_proxy_model_changed (ETableModel *etm, ETableSubset *etss)
}
static void
-etss_proxy_model_row_changed (ETableModel *etm, int 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, int row, int col, ETableSubset *etss)
+etss_proxy_model_cell_changed (ETableModel *etm, gint row, gint col, 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, int row, int 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, int row, int 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, int nvals)
+e_table_subset_construct (ETableSubset *etss, ETableModel *source, gint nvals)
{
- unsigned int *buffer;
- int i;
+ guint *buffer;
+ gint i;
if (nvals) {
- buffer = (unsigned int *) g_malloc (sizeof (unsigned int) * nvals);
+ buffer = (guint *) g_malloc (sizeof (unsigned int) * nvals);
if (buffer == NULL)
return NULL;
} else
buffer = NULL;
- etss->map_table = (int *)buffer;
+ etss->map_table = (gint *)buffer;
etss->n_map = nvals;
etss->source = source;
g_object_ref (source);
@@ -427,7 +427,7 @@ e_table_subset_construct (ETableSubset *etss, ETableModel *source, int nvals)
}
ETableModel *
-e_table_subset_new (ETableModel *source, const int nvals)
+e_table_subset_new (ETableModel *source, const gint nvals)
{
ETableSubset *etss = g_object_new (E_TABLE_SUBSET_TYPE, NULL);
@@ -439,11 +439,11 @@ e_table_subset_new (ETableModel *source, const int nvals)
return (ETableModel *) etss;
}
-int
+gint
e_table_subset_model_to_view_row (ETableSubset *ets,
- int model_row)
+ gint model_row)
{
- int i;
+ gint i;
for (i = 0; i < ets->n_map; i++) {
if (ets->map_table[i] == model_row)
return i;
@@ -451,9 +451,9 @@ e_table_subset_model_to_view_row (ETableSubset *ets,
return -1;
}
-int
+gint
e_table_subset_view_to_model_row (ETableSubset *ets,
- int view_row)
+ gint view_row)
{
if (view_row >= 0 && view_row < ets->n_map)
return ets->map_table[view_row];
@@ -476,7 +476,7 @@ e_table_subset_get_toplevel (ETableSubset *table)
void
e_table_subset_print_debugging (ETableSubset *table_model)
{
- int i;
+ gint i;
for (i = 0; i < table_model->n_map; i++) {
g_print("%8d\n", table_model->map_table[i]);
}
diff --git a/widgets/table/e-table-subset.h b/widgets/table/e-table-subset.h
index 83c9af4d99..dd345732e2 100644
--- a/widgets/table/e-table-subset.h
+++ b/widgets/table/e-table-subset.h
@@ -41,18 +41,18 @@ typedef struct {
ETableModel base;
ETableModel *source;
- int n_map;
- int *map_table;
-
- int last_access;
-
- int table_model_pre_change_id;
- int table_model_no_change_id;
- int table_model_changed_id;
- int table_model_row_changed_id;
- int table_model_cell_changed_id;
- int table_model_rows_inserted_id;
- int table_model_rows_deleted_id;
+ gint n_map;
+ gint *map_table;
+
+ gint last_access;
+
+ gint table_model_pre_change_id;
+ gint table_model_no_change_id;
+ gint table_model_changed_id;
+ gint table_model_row_changed_id;
+ gint table_model_cell_changed_id;
+ gint table_model_rows_inserted_id;
+ gint table_model_rows_deleted_id;
} ETableSubset;
typedef struct {
@@ -61,23 +61,23 @@ typedef struct {
void (*proxy_model_pre_change) (ETableSubset *etss, ETableModel *etm);
void (*proxy_model_no_change) (ETableSubset *etss, ETableModel *etm);
void (*proxy_model_changed) (ETableSubset *etss, ETableModel *etm);
- void (*proxy_model_row_changed) (ETableSubset *etss, ETableModel *etm, int row);
- void (*proxy_model_cell_changed) (ETableSubset *etss, ETableModel *etm, int col, int row);
- void (*proxy_model_rows_inserted) (ETableSubset *etss, ETableModel *etm, int row, int count);
- void (*proxy_model_rows_deleted) (ETableSubset *etss, ETableModel *etm, int row, int count);
+ void (*proxy_model_row_changed) (ETableSubset *etss, ETableModel *etm, gint row);
+ void (*proxy_model_cell_changed) (ETableSubset *etss, ETableModel *etm, gint col, gint row);
+ void (*proxy_model_rows_inserted) (ETableSubset *etss, ETableModel *etm, gint row, gint count);
+ void (*proxy_model_rows_deleted) (ETableSubset *etss, ETableModel *etm, gint row, gint count);
} ETableSubsetClass;
GType e_table_subset_get_type (void);
ETableModel *e_table_subset_new (ETableModel *etm,
- int n_vals);
+ gint n_vals);
ETableModel *e_table_subset_construct (ETableSubset *ets,
ETableModel *source,
- int nvals);
+ gint nvals);
-int e_table_subset_model_to_view_row (ETableSubset *ets,
- int model_row);
-int e_table_subset_view_to_model_row (ETableSubset *ets,
- int view_row);
+gint e_table_subset_model_to_view_row (ETableSubset *ets,
+ gint model_row);
+gint e_table_subset_view_to_model_row (ETableSubset *ets,
+ gint view_row);
ETableModel *e_table_subset_get_toplevel (ETableSubset *table_model);
diff --git a/widgets/table/e-table-tooltip.h b/widgets/table/e-table-tooltip.h
index 5b2acbf584..27dcf26db2 100644
--- a/widgets/table/e-table-tooltip.h
+++ b/widgets/table/e-table-tooltip.h
@@ -29,10 +29,10 @@ G_BEGIN_DECLS
typedef struct {
gint timer;
- int col, row;
- int row_height;
- int x, y;
- int cx, cy;
+ gint col, row;
+ gint row_height;
+ gint x, y;
+ gint cx, cy;
GdkColor *foreground;
GdkColor *background;
GnomeCanvasItem *eti;
diff --git a/widgets/table/e-table-tree.h b/widgets/table/e-table-tree.h
index 864359bf33..178c2a3ba2 100644
--- a/widgets/table/e-table-tree.h
+++ b/widgets/table/e-table-tree.h
@@ -29,7 +29,7 @@
G_BEGIN_DECLS
typedef struct {
- char *title;
+ gchar *title;
union {
ETableModel *table;
@@ -40,8 +40,8 @@ typedef struct {
guint is_leaf :1;
} ETableGroup;
-ETableGroup *e_table_group_new (const char *title, ETableModel *table);
-ETableGroup *e_table_group_new_leaf (const char *title);
+ETableGroup *e_table_group_new (const gchar *title, ETableModel *table);
+ETableGroup *e_table_group_new_leaf (const gchar *title);
G_END_DECLS
diff --git a/widgets/table/e-table-utils.c b/widgets/table/e-table-utils.c
index 6e87a2a6ce..784f1f5b66 100644
--- a/widgets/table/e-table-utils.c
+++ b/widgets/table/e-table-utils.c
@@ -36,8 +36,8 @@ ETableHeader *
e_table_state_to_header (GtkWidget *widget, ETableHeader *full_header, ETableState *state)
{
ETableHeader *nh;
- const int max_cols = e_table_header_count (full_header);
- int column;
+ const gint max_cols = e_table_header_count (full_header);
+ gint column;
GValue *val = g_new0 (GValue, 1);
g_return_val_if_fail (widget, NULL);
@@ -51,7 +51,7 @@ e_table_state_to_header (GtkWidget *widget, ETableHeader *full_header, ETableSta
g_free (val);
for (column = 0; column < state->col_count; column++) {
- int col;
+ gint col;
double expansion;
ETableCol *table_col;
@@ -75,7 +75,7 @@ e_table_state_to_header (GtkWidget *widget, ETableHeader *full_header, ETableSta
static ETableCol *
et_col_spec_to_col (ETableColumnSpecification *col_spec,
ETableExtras *ete,
- const char *domain)
+ const gchar *domain)
{
ETableCol *col = NULL;
ECell *cell = NULL;
@@ -90,7 +90,7 @@ et_col_spec_to_col (ETableColumnSpecification *col_spec,
search = e_table_extras_get_search(ete, col_spec->search);
if (cell && compare) {
- char *title = dgettext (domain, col_spec->title);
+ gchar *title = dgettext (domain, col_spec->title);
title = g_strdup (title);
@@ -132,7 +132,7 @@ e_table_spec_to_full_header (ETableSpecification *spec,
ETableExtras *ete)
{
ETableHeader *nh;
- int column;
+ gint column;
g_return_val_if_fail (spec, NULL);
g_return_val_if_fail (ete, NULL);
@@ -161,8 +161,8 @@ check_col (ETableCol *col, gpointer user_data)
ETableCol *
e_table_util_calculate_current_search_col (ETableHeader *header, ETableHeader *full_header, ETableSortInfo *sort_info, gboolean always_search)
{
- int i;
- int count;
+ gint i;
+ gint count;
ETableCol *col = NULL;
count = e_table_sort_info_grouping_get_count (sort_info);
for (i = 0; i < count; i++) {
diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c
index 7d9c5bfce7..6b856274a4 100644
--- a/widgets/table/e-table-without.c
+++ b/widgets/table/e-table-without.c
@@ -47,14 +47,14 @@ struct _ETableWithoutPrivate {
ETableWithoutFreeKeyFunc free_gotten_key_func;
ETableWithoutFreeKeyFunc free_duplicated_key_func;
- void *closure;
+ gpointer closure;
};
static gboolean
-check (ETableWithout *etw, int model_row)
+check (ETableWithout *etw, gint model_row)
{
gboolean ret_val;
- void *key;
+ gpointer key;
ETableSubset *etss = E_TABLE_SUBSET (etw);
if (etw->priv->get_key_func)
@@ -68,10 +68,10 @@ check (ETableWithout *etw, int model_row)
}
static gboolean
-check_with_key (ETableWithout *etw, void *key, int model_row)
+check_with_key (ETableWithout *etw, gpointer key, gint model_row)
{
gboolean ret_val;
- void *key2;
+ gpointer key2;
ETableSubset *etss = E_TABLE_SUBSET (etw);
if (etw->priv->get_key_func)
@@ -88,14 +88,14 @@ check_with_key (ETableWithout *etw, void *key, int model_row)
}
static gint
-etw_view_to_model_row (ETableWithout *etw, int 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, int model_row)
+add_row (ETableWithout *etw, gint model_row)
{
ETableSubset *etss = E_TABLE_SUBSET (etw);
@@ -109,7 +109,7 @@ add_row (ETableWithout *etw, int model_row)
}
static void
-remove_row (ETableWithout *etw, int view_row)
+remove_row (ETableWithout *etw, gint view_row)
{
ETableSubset *etss = E_TABLE_SUBSET (etw);
@@ -149,9 +149,9 @@ etw_dispose (GObject *object)
}
static void
-etw_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *etm, int model_row, int count)
+etw_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *etm, gint model_row, gint count)
{
- int i;
+ gint i;
ETableWithout *etw = E_TABLE_WITHOUT (etss);
gboolean shift = FALSE;
@@ -177,9 +177,9 @@ etw_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *etm, int model_r
}
static void
-etw_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *etm, int model_row, int count)
+etw_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *etm, gint model_row, gint count)
{
- int i; /* View row */
+ gint i; /* View row */
ETableWithout *etw = E_TABLE_WITHOUT (etss);
gboolean shift = FALSE;
@@ -201,9 +201,9 @@ etw_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *etm, int model_ro
static void
etw_proxy_model_changed (ETableSubset *etss, ETableModel *etm)
{
- int i; /* Model row */
- int j; /* View row */
- int row_count;
+ gint i; /* Model row */
+ gint j; /* View row */
+ gint row_count;
ETableWithout *etw = E_TABLE_WITHOUT (etss);
g_free (etss->map_table);
@@ -306,7 +306,7 @@ e_table_without_new (ETableModel *source,
void e_table_without_hide (ETableWithout *etw,
void *key)
{
- int i; /* View row */
+ gint i; /* View row */
ETableSubset *etss = E_TABLE_SUBSET (etw);
if (etw->priv->duplicate_key_func)
@@ -325,7 +325,7 @@ void e_table_without_hide (ETableWithout *etw,
void e_table_without_hide_adopt (ETableWithout *etw,
void *key)
{
- int i; /* View row */
+ gint i; /* View row */
ETableSubset *etss = E_TABLE_SUBSET (etw);
g_hash_table_insert (etw->priv->hash, key, key);
@@ -341,10 +341,10 @@ void
e_table_without_show (ETableWithout *etw,
void *key)
{
- int i; /* Model row */
+ gint i; /* Model row */
ETableSubset *etss = E_TABLE_SUBSET (etw);
- int count;
- void *old_key;
+ gint count;
+ gpointer old_key;
count = e_table_model_row_count (etss->source);
@@ -365,8 +365,8 @@ e_table_without_show (ETableWithout *etw,
void
e_table_without_show_all (ETableWithout *etw)
{
- int i; /* Model row */
- int row_count;
+ gint i; /* Model row */
+ gint row_count;
ETableSubset *etss = E_TABLE_SUBSET (etw);
e_table_model_pre_change (E_TABLE_MODEL (etw));
diff --git a/widgets/table/e-table-without.h b/widgets/table/e-table-without.h
index c43bdab332..e4aabbd64d 100644
--- a/widgets/table/e-table-without.h
+++ b/widgets/table/e-table-without.h
@@ -38,10 +38,10 @@ extern "C" {
#define E_IS_TABLE_WITHOUT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_WITHOUT_TYPE))
typedef struct _ETableWithoutPrivate ETableWithoutPrivate;
-typedef void *(*ETableWithoutGetKeyFunc) (ETableModel *source,
- int row,
+typedef gpointer (*ETableWithoutGetKeyFunc) (ETableModel *source,
+ gint row,
void *closure);
-typedef void *(*ETableWithoutDuplicateKeyFunc) (const void *key,
+typedef gpointer (*ETableWithoutDuplicateKeyFunc) (const void *key,
void *closure);
typedef void (*ETableWithoutFreeKeyFunc) (void *key,
void *closure);
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index b48fd454f1..1c86a4415c 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -253,7 +253,7 @@ expansion_changed (ETableHeader *header, ETable *et)
}
static void
-dimension_changed (ETableHeader *header, int total_width, ETable *et)
+dimension_changed (ETableHeader *header, gint total_width, ETable *et)
{
set_header_width (et);
}
@@ -405,9 +405,9 @@ et_unrealize (GtkWidget *widget)
}
static gboolean
-check_row (ETable *et, int model_row, int col, ETableSearchFunc search, char *string)
+check_row (ETable *et, gint model_row, gint col, ETableSearchFunc search, gchar *string)
{
- const void *value;
+ gconstpointer value;
value = e_table_model_value_at (et->model, col, model_row);
@@ -415,11 +415,11 @@ check_row (ETable *et, int model_row, int col, ETableSearchFunc search, char *st
}
static gboolean
-et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, ETable *et)
+et_search_search (ETableSearch *search, gchar *string, ETableSearchFlags flags, ETable *et)
{
- int cursor;
- int rows;
- int i;
+ gint cursor;
+ gint rows;
+ gint i;
ETableCol *col = current_search_col (et);
if (col == NULL)
@@ -437,7 +437,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E
cursor = e_sorter_model_to_sorted (E_SORTER (et->sorter), cursor);
for (i = cursor + 1; i < rows; i++) {
- int model_row = e_sorter_sorted_to_model (E_SORTER (et->sorter), i);
+ gint model_row = e_sorter_sorted_to_model (E_SORTER (et->sorter), i);
if (check_row (et, model_row, col->col_idx, col->search, string)) {
e_selection_model_select_as_key_press(E_SELECTION_MODEL (et->selection), model_row, col->col_idx, GDK_CONTROL_MASK);
return TRUE;
@@ -445,7 +445,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E
}
for (i = 0; i < cursor; i++) {
- int model_row = e_sorter_sorted_to_model (E_SORTER (et->sorter), i);
+ gint model_row = e_sorter_sorted_to_model (E_SORTER (et->sorter), i);
if (check_row (et, model_row, col->col_idx, col->search, string)) {
e_selection_model_select_as_key_press(E_SELECTION_MODEL (et->selection), model_row, col->col_idx, GDK_CONTROL_MASK);
return TRUE;
@@ -461,7 +461,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E
static void
et_search_accept (ETableSearch *search, ETable *et)
{
- int cursor;
+ gint cursor;
ETableCol *col = current_search_col (et);
if (col == NULL)
@@ -651,7 +651,7 @@ sort_info_changed (ETableSortInfo *info, ETable *et)
static void
e_table_setup_header (ETable *e_table)
{
- char *pointer;
+ gchar *pointer;
e_table->header_canvas = GNOME_CANVAS (e_canvas_new ());
gtk_widget_show (GTK_WIDGET (e_table->header_canvas));
@@ -740,7 +740,7 @@ table_canvas_reflow (GnomeCanvas *canvas, ETable *e_table)
}
static void
-click_to_add_cursor_change (ETableClickToAdd *etcta, int row, int 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));
@@ -749,7 +749,7 @@ click_to_add_cursor_change (ETableClickToAdd *etcta, int row, int col, ETable *e
}
static void
-group_cursor_change (ETableGroup *etg, int row, ETable *et)
+group_cursor_change (ETableGroup *etg, gint row, ETable *et)
{
ETableCursorLoc old_cursor_loc;
@@ -763,39 +763,39 @@ group_cursor_change (ETableGroup *etg, int row, ETable *et)
}
static void
-group_cursor_activated (ETableGroup *etg, int 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, int row, int 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 gint
-group_right_click (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et)
+group_right_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
{
- int return_val = 0;
+ gint return_val = 0;
g_signal_emit (G_OBJECT (et), et_signals [RIGHT_CLICK], 0, row, col, event, &return_val);
return return_val;
}
static gint
-group_click (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et)
+group_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
{
- int return_val = 0;
+ gint return_val = 0;
g_signal_emit (G_OBJECT (et), et_signals [CLICK], 0, row, col, event, &return_val);
return return_val;
}
static gint
-group_key_press (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et)
+group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
{
- int return_val = 0;
+ gint return_val = 0;
GdkEventKey *key = (GdkEventKey *) event;
- int y, row_local, col_local;
+ gint y, row_local, col_local;
GtkAdjustment *vadj;
switch (key->keyval) {
@@ -849,9 +849,9 @@ group_key_press (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et
}
static gint
-group_start_drag (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et)
+group_start_drag (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et)
{
- int return_val = 0;
+ gint return_val = 0;
g_signal_emit (G_OBJECT (et), et_signals [START_DRAG], 0,
row, col, event, &return_val);
return return_val;
@@ -869,7 +869,7 @@ et_table_model_changed (ETableModel *model, ETable *et)
}
static void
-et_table_row_changed (ETableModel *table_model, int 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))
@@ -879,18 +879,18 @@ et_table_row_changed (ETableModel *table_model, int row, ETable *et)
}
static void
-et_table_cell_changed (ETableModel *table_model, int view_col, int 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, int row, int count, ETable *et)
+et_table_rows_inserted (ETableModel *table_model, gint row, gint count, ETable *et)
{
/* This number has already been decremented. */
- int row_count = e_table_model_row_count(table_model);
+ gint row_count = e_table_model_row_count(table_model);
if (!et->need_rebuild) {
- int i;
+ gint i;
if (row != row_count - count)
e_table_group_increment(et->group, row, count);
for (i = 0; i < count; i++)
@@ -900,11 +900,11 @@ et_table_rows_inserted (ETableModel *table_model, int row, int count, ETable *et
}
static void
-et_table_rows_deleted (ETableModel *table_model, int row, int count, ETable *et)
+et_table_rows_deleted (ETableModel *table_model, gint row, gint count, ETable *et)
{
- int row_count = e_table_model_row_count(table_model);
+ gint row_count = e_table_model_row_count(table_model);
if (!et->need_rebuild) {
- int i;
+ gint i;
for (i = 0; i < count; i++)
e_table_group_remove (et->group, row + i);
if (row != row_count)
@@ -1024,7 +1024,7 @@ et_canvas_realize (GtkWidget *canvas, ETable *e_table)
static gint
white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETable *e_table)
{
- int return_val = 0;
+ gint return_val = 0;
g_signal_emit (GTK_OBJECT (e_table), et_signals [WHITE_SPACE_EVENT], 0,
event, &return_val);
return return_val;
@@ -1421,8 +1421,8 @@ ETableState *
e_table_get_state_object (ETable *e_table)
{
ETableState *state;
- int full_col_count;
- int i, j;
+ gint full_col_count;
+ gint i, j;
state = e_table_state_new();
if (state->sort_info)
@@ -1498,7 +1498,7 @@ et_selection_model_selection_changed (ETableGroup *etg, ETable *et)
}
static void
-et_selection_model_selection_row_changed (ETableGroup *etg, int 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);
}
@@ -1507,8 +1507,8 @@ static ETable *
et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
ETableSpecification *specification, ETableState *state)
{
- int row = 0;
- int col_count, i;
+ gint row = 0;
+ gint col_count, i;
GValue *val = g_new0 (GValue, 1);
g_value_init (val, G_TYPE_OBJECT);
@@ -1633,7 +1633,7 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
**/
ETable *
e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
- const char *spec_str, const char *state_str)
+ const gchar *spec_str, const gchar *state_str)
{
ETableSpecification *specification;
ETableState *state;
@@ -1693,7 +1693,7 @@ e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
**/
ETable *
e_table_construct_from_spec_file (ETable *e_table, ETableModel *etm, ETableExtras *ete,
- const char *spec_fn, const char *state_fn)
+ const gchar *spec_fn, const gchar *state_fn)
{
ETableSpecification *specification;
ETableState *state;
@@ -1758,7 +1758,7 @@ e_table_construct_from_spec_file (ETable *e_table, ETableModel *etm, ETableExtra
* The newly created #ETable or %NULL if there's an error.
**/
GtkWidget *
-e_table_new (ETableModel *etm, ETableExtras *ete, const char *spec, const char *state)
+e_table_new (ETableModel *etm, ETableExtras *ete, const gchar *spec, const gchar *state)
{
ETable *e_table;
@@ -1795,7 +1795,7 @@ e_table_new (ETableModel *etm, ETableExtras *ete, const char *spec, const char *
* The newly created #ETable or %NULL if there's an error.
**/
GtkWidget *
-e_table_new_from_spec_file (ETableModel *etm, ETableExtras *ete, const char *spec_fn, const char *state_fn)
+e_table_new_from_spec_file (ETableModel *etm, ETableExtras *ete, const gchar *spec_fn, const gchar *state_fn)
{
ETable *e_table;
@@ -1836,9 +1836,9 @@ et_build_grouping_spec (ETable *e_table)
{
xmlNode *node;
xmlNode *grouping;
- int i;
- const int sort_count = e_table_sort_info_sorting_get_count (e_table->sort_info);
- const int group_count = e_table_sort_info_grouping_get_count (e_table->sort_info);
+ gint i;
+ const gint sort_count = e_table_sort_info_sorting_get_count (e_table->sort_info);
+ const gint group_count = e_table_sort_info_grouping_get_count (e_table->sort_info);
grouping = xmlNewNode (NULL, "grouping");
node = grouping;
@@ -1899,18 +1899,18 @@ e_table_get_specification (ETable *e_table)
return buffer;
}
-int
-e_table_set_specification (ETable *e_table, const char *spec)
+gint
+e_table_set_specification (ETable *e_table, const gchar *spec)
{
xmlDoc *xmlSpec;
- int ret;
+ gint ret;
g_return_val_if_fail(e_table != NULL, -1);
g_return_val_if_fail(E_IS_TABLE(e_table), -1);
g_return_val_if_fail(spec != NULL, -1);
/* doesn't work yet, sigh */
- xmlSpec = xmlParseMemory ((char *)spec, strlen(spec));
+ xmlSpec = xmlParseMemory ((gchar *)spec, strlen(spec));
ret = et_real_set_specification(e_table, xmlSpec);
xmlFreeDoc (xmlSpec);
@@ -1918,7 +1918,7 @@ e_table_set_specification (ETable *e_table, const char *spec)
}
void
-e_table_save_specification (ETable *e_table, const char *filename)
+e_table_save_specification (ETable *e_table, const gchar *filename)
{
xmlDoc *doc = et_build_tree (e_table);
@@ -1931,11 +1931,11 @@ e_table_save_specification (ETable *e_table, const char *filename)
xmlFreeDoc (doc);
}
-int
+gint
e_table_load_specification (ETable *e_table, gchar *filename)
{
xmlDoc *xmlSpec;
- int ret;
+ gint ret;
g_return_val_if_fail(e_table != NULL, -1);
g_return_val_if_fail(E_IS_TABLE(e_table), -1);
@@ -1966,7 +1966,7 @@ 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, int 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));
@@ -1986,10 +1986,10 @@ e_table_set_cursor_row (ETable *e_table, int row)
* Return value:
* Cursor row
**/
-int
+gint
e_table_get_cursor_row (ETable *e_table)
{
- int row;
+ gint row;
g_return_val_if_fail(e_table != NULL, -1);
g_return_val_if_fail(E_IS_TABLE(e_table), -1);
@@ -2146,7 +2146,7 @@ et_get_property (GObject *object,
}
typedef struct {
- char *arg;
+ gchar *arg;
gboolean setting;
} bool_closure;
@@ -2260,7 +2260,7 @@ e_table_get_next_row (ETable *e_table,
g_return_val_if_fail(E_IS_TABLE(e_table), -1);
if (e_table->sorter) {
- int i;
+ gint i;
i = e_sorter_model_to_sorted(E_SORTER (e_table->sorter), model_row);
i++;
if (i < e_table_model_row_count(e_table->model)) {
@@ -2294,7 +2294,7 @@ e_table_get_prev_row (ETable *e_table,
g_return_val_if_fail(E_IS_TABLE(e_table), -1);
if (e_table->sorter) {
- int i;
+ gint i;
i = e_sorter_model_to_sorted(E_SORTER (e_table->sorter), model_row);
i--;
if (i >= 0)
@@ -2364,8 +2364,8 @@ e_table_view_to_model_row (ETable *e_table,
**/
void
e_table_get_cell_at (ETable *table,
- int x, int y,
- int *row_return, int *col_return)
+ gint x, gint y,
+ gint *row_return, gint *col_return)
{
g_return_if_fail (table != NULL);
g_return_if_fail (E_IS_TABLE (table));
@@ -2395,9 +2395,9 @@ e_table_get_cell_at (ETable *table,
**/
void
e_table_get_cell_geometry (ETable *table,
- int row, int col,
- int *x_return, int *y_return,
- int *width_return, int *height_return)
+ gint row, gint col,
+ gint *x_return, gint *y_return,
+ gint *width_return, gint *height_return)
{
g_return_if_fail (table != NULL);
g_return_if_fail (E_IS_TABLE (table));
@@ -2419,7 +2419,7 @@ e_table_get_cell_geometry (ETable *table,
* Similar to e_table_get_cell_at, only here we check based on the mouse motion information in the group.
**/
void
-e_table_get_mouse_over_cell (ETable *table, int *row, int *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));
@@ -2532,8 +2532,8 @@ struct _GtkDragSourceInfo
**/
void
e_table_drag_get_data (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context,
GdkAtom target,
guint32 time)
@@ -2558,14 +2558,14 @@ e_table_drag_get_data (ETable *table,
**/
void
e_table_drag_highlight (ETable *table,
- int row,
- int col)
+ gint row,
+ gint col)
{
g_return_if_fail(table != NULL);
g_return_if_fail(E_IS_TABLE(table));
if (row != -1) {
- int x, y, width, height;
+ gint x, y, width, height;
if (col == -1) {
e_table_get_cell_geometry (table, row, 0, &x, &y, &width, &height);
x = 0;
@@ -2665,7 +2665,7 @@ e_table_drag_dest_unset (GtkWidget *widget)
/* Source side */
static gint
-et_real_start_drag (ETable *table, int row, int col, GdkEvent *event)
+et_real_start_drag (ETable *table, gint row, gint col, GdkEvent *event)
{
GtkDragSourceInfo *info;
GdkDragContext *context;
@@ -2795,8 +2795,8 @@ e_table_drag_source_unset (ETable *table)
**/
GdkDragContext *
e_table_drag_begin (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GtkTargetList *targets,
GdkDragAction actions,
gint button,
@@ -2863,7 +2863,7 @@ do_drag_motion(ETable *et,
guint time)
{
gboolean ret_val;
- int row = -1, col = -1;
+ gint row = -1, col = -1;
e_table_get_cell_at (et, x, y, &row, &col);
@@ -2883,7 +2883,7 @@ static gboolean
scroll_timeout (gpointer data)
{
ETable *et = data;
- int dx = 0, dy = 0;
+ gint dx = 0, dy = 0;
GtkAdjustment *h, *v;
double hvalue, vvalue;
@@ -3027,7 +3027,7 @@ et_drag_drop(GtkWidget *widget,
ETable *et)
{
gboolean ret_val;
- int row, col;
+ gint row, col;
e_table_get_cell_at (et, x, y, &row, &col);
@@ -3059,7 +3059,7 @@ et_drag_data_received(GtkWidget *widget,
guint time,
ETable *et)
{
- int row, col;
+ gint row, col;
e_table_get_cell_at (et, x, y, &row, &col);
diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h
index 4894085330..7d3d0ff8cb 100644
--- a/widgets/table/e-table.h
+++ b/widgets/table/e-table.h
@@ -80,21 +80,21 @@ typedef struct {
guint search_search_id;
guint search_accept_id;
- int table_model_change_id;
- int table_row_change_id;
- int table_cell_change_id;
- int table_rows_inserted_id;
- int table_rows_deleted_id;
+ gint table_model_change_id;
+ gint table_row_change_id;
+ gint table_cell_change_id;
+ gint table_rows_inserted_id;
+ gint table_rows_deleted_id;
- int group_info_change_id;
- int sort_info_change_id;
+ gint group_info_change_id;
+ gint sort_info_change_id;
- int structure_change_id;
- int expansion_change_id;
- int dimension_change_id;
+ gint structure_change_id;
+ gint expansion_change_id;
+ gint dimension_change_id;
- int reflow_idle_id;
- int scroll_idle_id;
+ gint reflow_idle_id;
+ gint scroll_idle_id;
GnomeCanvas *header_canvas, *table_canvas;
@@ -131,41 +131,41 @@ typedef struct {
guint always_search : 1;
guint search_col_set : 1;
- char *click_to_add_message;
+ gchar *click_to_add_message;
GnomeCanvasItem *click_to_add;
gboolean use_click_to_add;
gboolean use_click_to_add_end;
ECursorMode cursor_mode;
- int drop_row;
- int drop_col;
+ gint drop_row;
+ gint drop_col;
GnomeCanvasItem *drop_highlight;
- int last_drop_x;
- int last_drop_y;
- int last_drop_time;
+ gint last_drop_x;
+ gint last_drop_y;
+ gint last_drop_time;
GdkDragContext *last_drop_context;
- int drag_row;
- int drag_col;
+ gint drag_row;
+ gint drag_col;
ETableDragSourceSite *site;
- int header_width;
+ gint header_width;
- char *domain;
+ gchar *domain;
} ETable;
typedef struct {
GtkTableClass parent_class;
- void (*cursor_change) (ETable *et, int row);
- void (*cursor_activated) (ETable *et, int row);
+ void (*cursor_change) (ETable *et, gint row);
+ void (*cursor_activated) (ETable *et, gint row);
void (*selection_change) (ETable *et);
- void (*double_click) (ETable *et, int row, int col, GdkEvent *event);
- gint (*right_click) (ETable *et, int row, int col, GdkEvent *event);
- gint (*click) (ETable *et, int row, int col, GdkEvent *event);
- gint (*key_press) (ETable *et, int row, int col, GdkEvent *event);
- gint (*start_drag) (ETable *et, int row, int col, GdkEvent *event);
+ void (*double_click) (ETable *et, gint row, gint col, GdkEvent *event);
+ gint (*right_click) (ETable *et, gint row, gint col, GdkEvent *event);
+ gint (*click) (ETable *et, gint row, gint col, GdkEvent *event);
+ gint (*key_press) (ETable *et, gint row, gint col, GdkEvent *event);
+ gint (*start_drag) (ETable *et, gint row, gint col, GdkEvent *event);
void (*state_change) (ETable *et);
gint (*white_space_event) (ETable *et, GdkEvent *event);
@@ -175,48 +175,48 @@ typedef struct {
/* Source side drag signals */
void (* table_drag_begin) (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context);
void (* table_drag_end) (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context);
void (* table_drag_data_get) (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
guint time);
void (* table_drag_data_delete) (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context);
/* Target side drag signals */
void (* table_drag_leave) (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context,
guint time);
gboolean (* table_drag_motion) (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context,
gint x,
gint y,
guint time);
gboolean (* table_drag_drop) (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context,
gint x,
gint y,
guint time);
void (* table_drag_data_received) (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context,
gint x,
gint y,
@@ -228,23 +228,23 @@ GType e_table_get_type (void);
ETable *e_table_construct (ETable *e_table,
ETableModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state);
+ const gchar *spec,
+ const gchar *state);
GtkWidget *e_table_new (ETableModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state);
+ const gchar *spec,
+ const gchar *state);
/* Create an ETable using files. */
ETable *e_table_construct_from_spec_file (ETable *e_table,
ETableModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn);
+ const gchar *spec_fn,
+ const gchar *state_fn);
GtkWidget *e_table_new_from_spec_file (ETableModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn);
+ const gchar *spec_fn,
+ const gchar *state_fn);
/* To save the state */
gchar *e_table_get_state (ETable *e_table);
@@ -260,10 +260,10 @@ void e_table_set_state_object (ETable *e_tabl
void e_table_load_state (ETable *e_table,
const gchar *filename);
void e_table_set_cursor_row (ETable *e_table,
- int row);
+ gint row);
/* -1 means we don't have the cursor. This is in model rows. */
-int e_table_get_cursor_row (ETable *e_table);
+gint e_table_get_cursor_row (ETable *e_table);
void e_table_selected_row_foreach (ETable *e_table,
EForeachFunc callback,
gpointer closure);
@@ -278,18 +278,18 @@ gint e_table_model_to_view_row (ETable *e_tabl
gint e_table_view_to_model_row (ETable *e_table,
gint view_row);
void e_table_get_cell_at (ETable *table,
- int x,
- int y,
- int *row_return,
- int *col_return);
-void e_table_get_mouse_over_cell (ETable *table, int *row, int *col);
+ gint x,
+ gint y,
+ gint *row_return,
+ gint *col_return);
+void e_table_get_mouse_over_cell (ETable *table, gint *row, gint *col);
void e_table_get_cell_geometry (ETable *table,
- int row,
- int col,
- int *x_return,
- int *y_return,
- int *width_return,
- int *height_return);
+ gint row,
+ gint col,
+ gint *x_return,
+ gint *y_return,
+ gint *width_return,
+ gint *height_return);
/* Useful accessor functions. */
ESelectionModel *e_table_get_selection_model (ETable *table);
@@ -297,14 +297,14 @@ ESelectionModel *e_table_get_selection_model (ETable *table)
/* Drag & drop stuff. */
/* Target */
void e_table_drag_get_data (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context,
GdkAtom target,
guint32 time);
void e_table_drag_highlight (ETable *table,
- int row,
- int col); /* col == -1 to highlight entire row. */
+ gint row,
+ gint col); /* col == -1 to highlight entire row. */
void e_table_drag_unhighlight (ETable *table);
void e_table_drag_dest_set (ETable *table,
GtkDestDefaults flags,
@@ -333,8 +333,8 @@ void e_table_drag_source_unset (ETable *table)
* as a GtkTargetList
*/
GdkDragContext *e_table_drag_begin (ETable *table,
- int row,
- int col,
+ gint row,
+ gint col,
GtkTargetList *targets,
GdkDragAction actions,
gint button,
diff --git a/widgets/table/e-tree-memory-callbacks.c b/widgets/table/e-tree-memory-callbacks.c
index 08d703b7ff..25175c9797 100644
--- a/widgets/table/e-tree-memory-callbacks.c
+++ b/widgets/table/e-tree-memory-callbacks.c
@@ -62,7 +62,7 @@ etmc_has_save_id (ETreeModel *etm)
return FALSE;
}
-static char *
+static gchar *
etmc_get_save_id (ETreeModel *etm, ETreePath node)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
@@ -85,7 +85,7 @@ etmc_has_get_node_by_id (ETreeModel *etm)
}
static ETreePath
-etmc_get_node_by_id (ETreeModel *etm, const char *save_id)
+etmc_get_node_by_id (ETreeModel *etm, const gchar *save_id)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
@@ -95,8 +95,8 @@ etmc_get_node_by_id (ETreeModel *etm, const char *save_id)
return NULL;
}
-static void *
-etmc_sort_value_at (ETreeModel *etm, ETreePath node, int col)
+static gpointer
+etmc_sort_value_at (ETreeModel *etm, ETreePath node, gint col)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
@@ -106,8 +106,8 @@ etmc_sort_value_at (ETreeModel *etm, ETreePath node, int col)
return etmc->value_at (etm, node, col, etmc->model_data);
}
-static void *
-etmc_value_at (ETreeModel *etm, ETreePath node, int col)
+static gpointer
+etmc_value_at (ETreeModel *etm, ETreePath node, gint col)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
@@ -115,7 +115,7 @@ etmc_value_at (ETreeModel *etm, ETreePath node, int col)
}
static void
-etmc_set_value_at (ETreeModel *etm, ETreePath node, int col, const void *val)
+etmc_set_value_at (ETreeModel *etm, ETreePath node, gint col, gconstpointer val)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
@@ -123,7 +123,7 @@ etmc_set_value_at (ETreeModel *etm, ETreePath node, int col, const void *val)
}
static gboolean
-etmc_is_editable (ETreeModel *etm, ETreePath node, int col)
+etmc_is_editable (ETreeModel *etm, ETreePath node, gint col)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
@@ -132,19 +132,19 @@ etmc_is_editable (ETreeModel *etm, ETreePath node, int col)
/* The default for etmc_duplicate_value is to return the raw value. */
-static void *
-etmc_duplicate_value (ETreeModel *etm, int col, const void *value)
+static gpointer
+etmc_duplicate_value (ETreeModel *etm, gint col, gconstpointer value)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
if (etmc->duplicate_value)
return etmc->duplicate_value (etm, col, value, etmc->model_data);
else
- return (void *)value;
+ return (gpointer)value;
}
static void
-etmc_free_value (ETreeModel *etm, int col, void *value)
+etmc_free_value (ETreeModel *etm, gint col, gpointer value)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
@@ -152,8 +152,8 @@ etmc_free_value (ETreeModel *etm, int col, void *value)
etmc->free_value (etm, col, value, etmc->model_data);
}
-static void *
-etmc_initialize_value (ETreeModel *etm, int col)
+static gpointer
+etmc_initialize_value (ETreeModel *etm, gint col)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
@@ -164,7 +164,7 @@ etmc_initialize_value (ETreeModel *etm, int col)
}
static gboolean
-etmc_value_is_empty (ETreeModel *etm, int col, const void *value)
+etmc_value_is_empty (ETreeModel *etm, gint col, gconstpointer value)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
@@ -174,8 +174,8 @@ etmc_value_is_empty (ETreeModel *etm, int col, const void *value)
return FALSE;
}
-static char *
-etmc_value_to_string (ETreeModel *etm, int col, const void *value)
+static gchar *
+etmc_value_to_string (ETreeModel *etm, gint col, gconstpointer value)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
diff --git a/widgets/table/e-tree-memory-callbacks.h b/widgets/table/e-tree-memory-callbacks.h
index f74a472642..a7705795af 100644
--- a/widgets/table/e-tree-memory-callbacks.h
+++ b/widgets/table/e-tree-memory-callbacks.h
@@ -36,25 +36,25 @@ extern "C" {
#define E_IS_TREE_MEMORY_CALLBACKS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TREE_MEMORY_CALLBACKS_TYPE))
-typedef GdkPixbuf* (*ETreeMemoryCallbacksIconAtFn) (ETreeModel *etree, ETreePath path, void *model_data);
+typedef GdkPixbuf* (*ETreeMemoryCallbacksIconAtFn) (ETreeModel *etree, ETreePath path, gpointer model_data);
-typedef gint (*ETreeMemoryCallbacksColumnCountFn) (ETreeModel *etree, void *model_data);
+typedef gint (*ETreeMemoryCallbacksColumnCountFn) (ETreeModel *etree, gpointer model_data);
-typedef gboolean (*ETreeMemoryCallbacksHasSaveIdFn) (ETreeModel *etree, void *model_data);
-typedef gchar *(*ETreeMemoryCallbacksGetSaveIdFn) (ETreeModel *etree, ETreePath path, void *model_data);
+typedef gboolean (*ETreeMemoryCallbacksHasSaveIdFn) (ETreeModel *etree, gpointer model_data);
+typedef gchar *(*ETreeMemoryCallbacksGetSaveIdFn) (ETreeModel *etree, ETreePath path, gpointer model_data);
-typedef gboolean (*ETreeMemoryCallbacksHasGetNodeByIdFn) (ETreeModel *etree, void *model_data);
-typedef ETreePath (*ETreeMemoryCallbacksGetNodeByIdFn) (ETreeModel *etree, const char *save_id, void *model_data);
+typedef gboolean (*ETreeMemoryCallbacksHasGetNodeByIdFn) (ETreeModel *etree, gpointer model_data);
+typedef ETreePath (*ETreeMemoryCallbacksGetNodeByIdFn) (ETreeModel *etree, const gchar *save_id, gpointer model_data);
-typedef void* (*ETreeMemoryCallbacksValueAtFn) (ETreeModel *etree, ETreePath path, int col, void *model_data);
-typedef void (*ETreeMemoryCallbacksSetValueAtFn) (ETreeModel *etree, ETreePath path, int col, const void *val, void *model_data);
-typedef gboolean (*ETreeMemoryCallbacksIsEditableFn) (ETreeModel *etree, ETreePath path, int col, void *model_data);
+typedef gpointer (*ETreeMemoryCallbacksValueAtFn) (ETreeModel *etree, ETreePath path, gint col, gpointer model_data);
+typedef void (*ETreeMemoryCallbacksSetValueAtFn) (ETreeModel *etree, ETreePath path, gint col, gconstpointer val, gpointer model_data);
+typedef gboolean (*ETreeMemoryCallbacksIsEditableFn) (ETreeModel *etree, ETreePath path, gint col, gpointer model_data);
-typedef void *(*ETreeMemoryCallbacksDuplicateValueFn) (ETreeModel *etm, int col, const void *val, void *data);
-typedef void (*ETreeMemoryCallbacksFreeValueFn) (ETreeModel *etm, int col, void *val, void *data);
-typedef void *(*ETreeMemoryCallbacksInitializeValueFn) (ETreeModel *etm, int col, void *data);
-typedef gboolean (*ETreeMemoryCallbacksValueIsEmptyFn) (ETreeModel *etm, int col, const void *val, void *data);
-typedef char *(*ETreeMemoryCallbacksValueToStringFn) (ETreeModel *etm, int col, const void *val, void *data);
+typedef void *(*ETreeMemoryCallbacksDuplicateValueFn) (ETreeModel *etm, gint col, gconstpointer val, gpointer data);
+typedef void (*ETreeMemoryCallbacksFreeValueFn) (ETreeModel *etm, gint col, gpointer val, gpointer data);
+typedef void *(*ETreeMemoryCallbacksInitializeValueFn) (ETreeModel *etm, gint col, gpointer data);
+typedef gboolean (*ETreeMemoryCallbacksValueIsEmptyFn) (ETreeModel *etm, gint col, gconstpointer val, gpointer data);
+typedef gchar *(*ETreeMemoryCallbacksValueToStringFn) (ETreeModel *etm, gint col, gconstpointer val, gpointer data);
typedef struct {
ETreeMemory parent;
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index 99c9ef9895..728392f7b0 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -87,7 +87,7 @@ check_children (ETreeMemory *memory, ETreePath node)
static int
e_tree_memory_path_depth (ETreeMemoryPath *path)
{
- int depth = 0;
+ gint depth = 0;
g_return_val_if_fail(path != NULL, -1);
@@ -97,7 +97,7 @@ e_tree_memory_path_depth (ETreeMemoryPath *path)
}
static void
-e_tree_memory_path_insert (ETreeMemoryPath *parent, int position, ETreeMemoryPath *child)
+e_tree_memory_path_insert (ETreeMemoryPath *parent, gint position, ETreeMemoryPath *child)
{
g_return_if_fail (position <= parent->num_children && position >= -1);
@@ -299,7 +299,7 @@ etmm_get_children (ETreeModel *etm, ETreePath node, ETreePath **nodes)
if (nodes) {
ETreeMemoryPath *p;
- int i = 0;
+ gint i = 0;
(*nodes) = g_new (ETreePath, n_children);
for (p = path->first_child; p; p = p->next_sibling) {
@@ -486,7 +486,7 @@ 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,
- int position,
+ gint position,
gpointer node_data)
{
ETreeMemoryPriv *priv;
@@ -522,7 +522,7 @@ e_tree_memory_node_insert (ETreeMemory *tree_model,
return new_path;
}
-ETreePath e_tree_memory_node_insert_id (ETreeMemory *etree, ETreePath parent, int position, gpointer node_data, char *id)
+ETreePath e_tree_memory_node_insert_id (ETreeMemory *etree, ETreePath parent, gint position, gpointer node_data, gchar *id)
{
return e_tree_memory_node_insert(etree, parent, position, node_data);
}
@@ -547,7 +547,7 @@ e_tree_memory_node_insert_before (ETreeMemory *etree,
ETreeMemoryPath *child;
ETreeMemoryPath *parent_path = parent;
ETreeMemoryPath *sibling_path = sibling;
- int position = 0;
+ gint position = 0;
g_return_val_if_fail(etree != NULL, NULL);
@@ -598,7 +598,7 @@ e_tree_memory_node_remove (ETreeMemory *etree, ETreePath node)
ETreeMemoryPath *parent = path->parent;
ETreeMemoryPath *sibling;
gpointer ret = path->node_data;
- int old_position = 0;
+ gint old_position = 0;
g_return_val_if_fail(etree != NULL, NULL);
@@ -637,7 +637,7 @@ typedef struct {
} MemoryAndClosure;
static int
-sort_callback(const void *data1, const void *data2, gpointer user_data)
+sort_callback(gconstpointer data1, gconstpointer data2, gpointer user_data)
{
ETreePath path1 = *(ETreePath *)data1;
ETreePath path2 = *(ETreePath *)data2;
@@ -653,8 +653,8 @@ e_tree_memory_sort_node (ETreeMemory *etmm,
{
ETreeMemoryPath **children;
ETreeMemoryPath *child;
- int count;
- int i;
+ gint count;
+ gint i;
ETreeMemoryPath *path = node;
MemoryAndClosure mac;
ETreeMemoryPath *last;
diff --git a/widgets/table/e-tree-memory.h b/widgets/table/e-tree-memory.h
index 2c82d1c8d1..0a56c8d37e 100644
--- a/widgets/table/e-tree-memory.h
+++ b/widgets/table/e-tree-memory.h
@@ -41,7 +41,7 @@ typedef struct ETreeMemory ETreeMemory;
typedef struct ETreeMemoryPriv ETreeMemoryPriv;
typedef struct ETreeMemoryClass ETreeMemoryClass;
-typedef int (*ETreeMemorySortCallback) (ETreeMemory *etmm, ETreePath path1, ETreePath path2, gpointer closure);
+typedef gint (*ETreeMemorySortCallback) (ETreeMemory *etmm, ETreePath path1, ETreePath path2, gpointer closure);
struct ETreeMemory {
ETreeModel base;
@@ -63,13 +63,13 @@ ETreeMemory *e_tree_memory_new (void);
/* node operations */
ETreePath e_tree_memory_node_insert (ETreeMemory *etree,
ETreePath parent,
- int position,
+ gint position,
gpointer node_data);
ETreePath e_tree_memory_node_insert_id (ETreeMemory *etree,
ETreePath parent,
- int position,
+ gint position,
gpointer node_data,
- char *id);
+ gchar *id);
ETreePath e_tree_memory_node_insert_before (ETreeMemory *etree,
ETreePath parent,
ETreePath sibling,
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index bd35358874..9482fe9789 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -320,7 +320,7 @@ 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, int 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));
@@ -361,7 +361,7 @@ e_tree_model_node_inserted (ETreeModel *tree_model,
*
**/
void
-e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETreePath removed_node, int 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));
@@ -754,7 +754,7 @@ 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 char *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);
@@ -805,8 +805,8 @@ e_tree_model_has_change_pending (ETreeModel *etree)
* affects the data in that node for that column. node_inserted,
* node_removed, and no_change don't affect any data in this way.
**/
-void *
-e_tree_model_sort_value_at (ETreeModel *etree, ETreePath node, int col)
+gpointer
+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);
@@ -836,8 +836,8 @@ e_tree_model_sort_value_at (ETreeModel *etree, ETreePath node, int col)
* affects the data in that node for that column. node_inserted,
* node_removed, and no_change don't affect any data in this way.
**/
-void *
-e_tree_model_value_at (ETreeModel *etree, ETreePath node, int col)
+gpointer
+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);
@@ -849,7 +849,7 @@ e_tree_model_value_at (ETreeModel *etree, ETreePath node, int col)
}
void
-e_tree_model_set_value_at (ETreeModel *etree, ETreePath node, int col, const void *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));
@@ -868,7 +868,7 @@ e_tree_model_set_value_at (ETreeModel *etree, ETreePath node, int col, const voi
* Return value:
**/
gboolean
-e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, int col)
+e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, gint col)
{
g_return_val_if_fail(etree != NULL, FALSE);
@@ -887,8 +887,8 @@ e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, int col)
*
* Return value:
**/
-void *
-e_tree_model_duplicate_value (ETreeModel *etree, int col, const void *value)
+gpointer
+e_tree_model_duplicate_value (ETreeModel *etree, gint col, gconstpointer value)
{
g_return_val_if_fail(etree != NULL, NULL);
@@ -908,7 +908,7 @@ e_tree_model_duplicate_value (ETreeModel *etree, int col, const void *value)
* Return value:
**/
void
-e_tree_model_free_value (ETreeModel *etree, int col, void *value)
+e_tree_model_free_value (ETreeModel *etree, gint col, gpointer value)
{
g_return_if_fail(etree != NULL);
@@ -925,8 +925,8 @@ e_tree_model_free_value (ETreeModel *etree, int col, void *value)
*
* Return value:
**/
-void *
-e_tree_model_initialize_value (ETreeModel *etree, int col)
+gpointer
+e_tree_model_initialize_value (ETreeModel *etree, gint col)
{
g_return_val_if_fail(etree != NULL, NULL);
@@ -946,7 +946,7 @@ e_tree_model_initialize_value (ETreeModel *etree, int col)
* Return value:
**/
gboolean
-e_tree_model_value_is_empty (ETreeModel *etree, int col, const void *value)
+e_tree_model_value_is_empty (ETreeModel *etree, gint col, gconstpointer value)
{
g_return_val_if_fail(etree != NULL, TRUE);
@@ -965,8 +965,8 @@ e_tree_model_value_is_empty (ETreeModel *etree, int col, const void *value)
*
* Return value:
**/
-char *
-e_tree_model_value_to_string (ETreeModel *etree, int col, const void *value)
+gchar *
+e_tree_model_value_to_string (ETreeModel *etree, gint col, gconstpointer value)
{
g_return_val_if_fail(etree != NULL, g_strdup(""));
diff --git a/widgets/table/e-tree-model.h b/widgets/table/e-tree-model.h
index ed34933cb1..fdd7f26a66 100644
--- a/widgets/table/e-tree-model.h
+++ b/widgets/table/e-tree-model.h
@@ -39,7 +39,7 @@ G_BEGIN_DECLS
#define E_IS_TREE_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TREE_MODEL_TYPE))
#define E_TREE_MODEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), E_TREE_MODEL_TYPE, ETreeModelClass))
-typedef void * ETreePath;
+typedef gpointer ETreePath;
typedef struct ETreeModel ETreeModel;
typedef struct ETreeModelClass ETreeModelClass;
typedef gint (*ETreePathCompareFunc)(ETreeModel *model, ETreePath path1, ETreePath path2);
@@ -77,23 +77,23 @@ struct ETreeModelClass {
gchar *(*get_save_id) (ETreeModel *etm, ETreePath node);
gboolean (*has_get_node_by_id) (ETreeModel *etm);
- ETreePath (*get_node_by_id) (ETreeModel *etm, const char *save_id);
+ ETreePath (*get_node_by_id) (ETreeModel *etm, const gchar *save_id);
gboolean (*has_change_pending) (ETreeModel *etm);
/*
* ETable analogs
*/
- void *(*sort_value_at) (ETreeModel *etm, ETreePath node, int col);
- void *(*value_at) (ETreeModel *etm, ETreePath node, int col);
- void (*set_value_at) (ETreeModel *etm, ETreePath node, int col, const void *val);
- gboolean (*is_editable) (ETreeModel *etm, ETreePath node, int col);
+ void *(*sort_value_at) (ETreeModel *etm, ETreePath node, gint col);
+ void *(*value_at) (ETreeModel *etm, ETreePath node, gint col);
+ void (*set_value_at) (ETreeModel *etm, ETreePath node, gint col, gconstpointer val);
+ gboolean (*is_editable) (ETreeModel *etm, ETreePath node, gint col);
- void *(*duplicate_value) (ETreeModel *etm, int col, const void *value);
- void (*free_value) (ETreeModel *etm, int col, void *value);
- void *(*initialize_value) (ETreeModel *etm, int col);
- gboolean (*value_is_empty) (ETreeModel *etm, int col, const void *value);
- char *(*value_to_string) (ETreeModel *etm, int col, const void *value);
+ void *(*duplicate_value) (ETreeModel *etm, gint col, gconstpointer value);
+ void (*free_value) (ETreeModel *etm, gint col, gpointer value);
+ void *(*initialize_value) (ETreeModel *etm, gint col);
+ gboolean (*value_is_empty) (ETreeModel *etm, gint col, gconstpointer value);
+ gchar *(*value_to_string) (ETreeModel *etm, gint col, gconstpointer value);
/*
* Signals
@@ -108,9 +108,9 @@ struct ETreeModelClass {
void (*no_change) (ETreeModel *etm);
void (*node_changed) (ETreeModel *etm, ETreePath node);
void (*node_data_changed) (ETreeModel *etm, ETreePath node);
- void (*node_col_changed) (ETreeModel *etm, ETreePath node, int col);
+ void (*node_col_changed) (ETreeModel *etm, ETreePath node, gint col);
void (*node_inserted) (ETreeModel *etm, ETreePath parent, ETreePath inserted_node);
- void (*node_removed) (ETreeModel *etm, ETreePath parent, ETreePath removed_node, int old_position);
+ void (*node_removed) (ETreeModel *etm, ETreePath parent, ETreePath removed_node, gint old_position);
void (*node_deleted) (ETreeModel *etm, ETreePath deleted_node);
void (*rebuilt) (ETreeModel *etm);
@@ -156,34 +156,34 @@ gchar *e_tree_model_get_save_id (ETreeModel *model,
ETreePath node);
gboolean e_tree_model_has_get_node_by_id (ETreeModel *model);
ETreePath e_tree_model_get_node_by_id (ETreeModel *model,
- const char *save_id);
+ const gchar *save_id);
gboolean e_tree_model_has_change_pending (ETreeModel *model);
void *e_tree_model_sort_value_at (ETreeModel *etree,
ETreePath node,
- int col);
+ gint col);
void *e_tree_model_value_at (ETreeModel *etree,
ETreePath node,
- int col);
+ gint col);
void e_tree_model_set_value_at (ETreeModel *etree,
ETreePath node,
- int col,
+ gint col,
const void *val);
gboolean e_tree_model_node_is_editable (ETreeModel *etree,
ETreePath node,
- int col);
+ gint col);
void *e_tree_model_duplicate_value (ETreeModel *etree,
- int col,
+ gint col,
const void *value);
void e_tree_model_free_value (ETreeModel *etree,
- int col,
+ gint col,
void *value);
void *e_tree_model_initialize_value (ETreeModel *etree,
- int col);
+ gint col);
gboolean e_tree_model_value_is_empty (ETreeModel *etree,
- int col,
+ gint col,
const void *value);
-char *e_tree_model_value_to_string (ETreeModel *etree,
- int col,
+gchar *e_tree_model_value_to_string (ETreeModel *etree,
+ gint col,
const void *value);
/* depth first traversal of path's descendents, calling func on each one */
@@ -214,14 +214,14 @@ void e_tree_model_node_data_changed (ETreeModel *tree_model,
ETreePath node);
void e_tree_model_node_col_changed (ETreeModel *tree_model,
ETreePath node,
- int col);
+ gint col);
void e_tree_model_node_inserted (ETreeModel *tree_model,
ETreePath parent_node,
ETreePath inserted_node);
void e_tree_model_node_removed (ETreeModel *tree_model,
ETreePath parent_node,
ETreePath removed_node,
- int old_position);
+ gint old_position);
void e_tree_model_node_deleted (ETreeModel *tree_model,
ETreePath deleted_node);
void e_tree_model_node_request_collapse (ETreeModel *tree_model,
diff --git a/widgets/table/e-tree-scrolled.c b/widgets/table/e-tree-scrolled.c
index 18267a42c3..fc729ab411 100644
--- a/widgets/table/e-tree-scrolled.c
+++ b/widgets/table/e-tree-scrolled.c
@@ -73,8 +73,8 @@ gboolean
e_tree_scrolled_construct (ETreeScrolled *ets,
ETreeModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state)
+ const gchar *spec,
+ const gchar *state)
{
g_return_val_if_fail(ets != NULL, FALSE);
g_return_val_if_fail(E_IS_TREE_SCROLLED(ets), FALSE);
@@ -93,8 +93,8 @@ e_tree_scrolled_construct (ETreeScrolled *ets,
GtkWidget *e_tree_scrolled_new (ETreeModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state)
+ const gchar *spec,
+ const gchar *state)
{
ETreeScrolled *ets;
@@ -120,8 +120,8 @@ gboolean
e_tree_scrolled_construct_from_spec_file (ETreeScrolled *ets,
ETreeModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn)
+ const gchar *spec_fn,
+ const gchar *state_fn)
{
g_return_val_if_fail(ets != NULL, FALSE);
g_return_val_if_fail(E_IS_TREE_SCROLLED(ets), FALSE);
@@ -140,8 +140,8 @@ e_tree_scrolled_construct_from_spec_file (ETreeScrolled *ets,
GtkWidget *e_tree_scrolled_new_from_spec_file (ETreeModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn)
+ const gchar *spec_fn,
+ const gchar *state_fn)
{
ETreeScrolled *ets;
diff --git a/widgets/table/e-tree-scrolled.h b/widgets/table/e-tree-scrolled.h
index 5d4b8de36f..197dd9a083 100644
--- a/widgets/table/e-tree-scrolled.h
+++ b/widgets/table/e-tree-scrolled.h
@@ -51,22 +51,22 @@ GType e_tree_scrolled_get_type (void);
gboolean e_tree_scrolled_construct (ETreeScrolled *ets,
ETreeModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state);
+ const gchar *spec,
+ const gchar *state);
GtkWidget *e_tree_scrolled_new (ETreeModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state);
+ const gchar *spec,
+ const gchar *state);
gboolean e_tree_scrolled_construct_from_spec_file (ETreeScrolled *ets,
ETreeModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn);
+ const gchar *spec_fn,
+ const gchar *state_fn);
GtkWidget *e_tree_scrolled_new_from_spec_file (ETreeModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn);
+ const gchar *spec_fn,
+ const gchar *state_fn);
ETree *e_tree_scrolled_get_tree (ETreeScrolled *ets);
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index 1d694f9b60..68316f72bb 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -179,7 +179,7 @@ etsm_node_data_changed (ETreeModel *etm, ETreePath node, ETreeSelectionModel *et
}
static void
-etsm_node_col_changed (ETreeModel *etm, ETreePath node, int col, ETreeSelectionModel *etsm)
+etsm_node_col_changed (ETreeModel *etm, ETreePath node, gint col, ETreeSelectionModel *etsm)
{
free_id (etsm);
}
@@ -191,7 +191,7 @@ etsm_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETreeSel
}
static void
-etsm_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, int old_position, ETreeSelectionModel *etsm)
+etsm_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, gint old_position, ETreeSelectionModel *etsm)
{
restore_cursor (etsm, etm);
}
@@ -392,7 +392,7 @@ etsm_row_foreach_cb (gpointer key, gpointer value, gpointer user_data)
{
ETreePath path = key;
ModelAndCallback *mac = user_data;
- int row = e_tree_table_adapter_row_of_node(mac->etsm->priv->etta, path);
+ gint row = e_tree_table_adapter_row_of_node(mac->etsm->priv->etta, path);
if (row >= 0)
mac->callback(row, mac->closure);
}
@@ -521,7 +521,7 @@ etsm_invert_selection (ESelectionModel *selection)
}
static void
-etsm_change_one_row(ESelectionModel *selection, int row, gboolean grow)
+etsm_change_one_row(ESelectionModel *selection, gint row, gboolean grow)
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL(selection);
ETreePath path;
@@ -539,7 +539,7 @@ etsm_change_one_row(ESelectionModel *selection, int row, gboolean grow)
}
static void
-etsm_change_cursor (ESelectionModel *selection, int row, int col)
+etsm_change_cursor (ESelectionModel *selection, gint row, gint col)
{
ETreeSelectionModel *etsm;
@@ -570,9 +570,9 @@ etsm_cursor_col (ESelectionModel *selection)
}
static void
-etsm_get_rows(int row, void *d)
+etsm_get_rows(gint row, gpointer d)
{
- int **rowp = d;
+ gint **rowp = d;
**rowp = row;
(*rowp)++;
@@ -583,7 +583,7 @@ 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);
- int rows[5], *rowp = NULL, size;
+ gint rows[5], *rowp = NULL, size;
g_return_if_fail (path != NULL);
@@ -601,7 +601,7 @@ etsm_select_single_row (ESelectionModel *selection, gint row)
e_selection_model_selection_changed(E_SELECTION_MODEL(etsm));
} else {
if (rowp) {
- int *p = rows;
+ gint *p = rows;
while (p<rowp)
e_selection_model_selection_row_changed((ESelectionModel *)etsm, *p++);
@@ -702,7 +702,7 @@ void
e_tree_selection_model_select_paths (ETreeSelectionModel *etsm, GPtrArray *paths)
{
ETreePath path;
- int i;
+ gint i;
for (i=0;i<paths->len;i++) {
path = paths->pdata[i];
@@ -723,7 +723,7 @@ e_tree_selection_model_add_to_selection (ETreeSelectionModel *etsm, ETreePath pa
void
e_tree_selection_model_change_cursor (ETreeSelectionModel *etsm, ETreePath path)
{
- int row;
+ gint row;
etsm->priv->cursor_path = path;
diff --git a/widgets/table/e-tree-simple.c b/widgets/table/e-tree-simple.c
index 3252a3db18..2704b7ea24 100644
--- a/widgets/table/e-tree-simple.c
+++ b/widgets/table/e-tree-simple.c
@@ -39,19 +39,19 @@ simple_column_count (ETableModel *etm)
}
/* The default for simple_duplicate_value is to return the raw value. */
-static void *
-simple_duplicate_value (ETableModel *etm, int col, const void *value)
+static gpointer
+simple_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
if (simple->duplicate_value)
return simple->duplicate_value (etm, col, value, simple->model_data);
else
- return (void *)value;
+ return (gpointer)value;
}
static void
-simple_free_value (ETableModel *etm, int col, void *value)
+simple_free_value (ETableModel *etm, gint col, gpointer value)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
@@ -59,8 +59,8 @@ simple_free_value (ETableModel *etm, int col, void *value)
simple->free_value (etm, col, value, simple->model_data);
}
-static void *
-simple_initialize_value (ETableModel *etm, int col)
+static gpointer
+simple_initialize_value (ETableModel *etm, gint col)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
@@ -71,7 +71,7 @@ simple_initialize_value (ETableModel *etm, int col)
}
static gboolean
-simple_value_is_empty (ETableModel *etm, int col, const void *value)
+simple_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
@@ -81,8 +81,8 @@ simple_value_is_empty (ETableModel *etm, int col, const void *value)
return FALSE;
}
-static char *
-simple_value_to_string (ETableModel *etm, int col, const void *value)
+static gchar *
+simple_value_to_string (ETableModel *etm, gint col, gconstpointer value)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
@@ -92,8 +92,8 @@ simple_value_to_string (ETableModel *etm, int col, const void *value)
return g_strdup ("");
}
-static void *
-simple_value_at (ETreeModel *etm, ETreePath *node, int col)
+static gpointer
+simple_value_at (ETreeModel *etm, ETreePath *node, gint col)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
@@ -109,7 +109,7 @@ simple_icon_at (ETreeModel *etm, ETreePath *node)
}
static void
-simple_set_value_at (ETreeModel *etm, ETreePath *node, int col, const void *val)
+simple_set_value_at (ETreeModel *etm, ETreePath *node, gint col, gconstpointer val)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
@@ -117,7 +117,7 @@ simple_set_value_at (ETreeModel *etm, ETreePath *node, int col, const void *val)
}
static gboolean
-simple_is_editable (ETreeModel *etm, ETreePath *node, int col)
+simple_is_editable (ETreeModel *etm, ETreePath *node, gint col)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
diff --git a/widgets/table/e-tree-simple.h b/widgets/table/e-tree-simple.h
index bb64aa18a2..47a5e6bdf1 100644
--- a/widgets/table/e-tree-simple.h
+++ b/widgets/table/e-tree-simple.h
@@ -37,10 +37,10 @@ G_BEGIN_DECLS
#define E_TREE_SIMPLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), E_TREE_SIMPLE_TYPE, ETreeSimpleClass))
-typedef GdkPixbuf* (*ETreeSimpleIconAtFn) (ETreeModel *etree, ETreePath *path, void *model_data);
-typedef void* (*ETreeSimpleValueAtFn) (ETreeModel *etree, ETreePath *path, int col, void *model_data);
-typedef void (*ETreeSimpleSetValueAtFn) (ETreeModel *etree, ETreePath *path, int col, const void *val, void *model_data);
-typedef gboolean (*ETreeSimpleIsEditableFn) (ETreeModel *etree, ETreePath *path, int col, void *model_data);
+typedef GdkPixbuf* (*ETreeSimpleIconAtFn) (ETreeModel *etree, ETreePath *path, gpointer model_data);
+typedef gpointer (*ETreeSimpleValueAtFn) (ETreeModel *etree, ETreePath *path, gint col, gpointer model_data);
+typedef void (*ETreeSimpleSetValueAtFn) (ETreeModel *etree, ETreePath *path, gint col, gconstpointer val, gpointer model_data);
+typedef gboolean (*ETreeSimpleIsEditableFn) (ETreeModel *etree, ETreePath *path, gint col, gpointer model_data);
typedef struct {
ETreeModel parent;
diff --git a/widgets/table/e-tree-sorted-variable.c b/widgets/table/e-tree-sorted-variable.c
index 432a7897e4..0bc82506e8 100644
--- a/widgets/table/e-tree-sorted-variable.c
+++ b/widgets/table/e-tree-sorted-variable.c
@@ -48,8 +48,8 @@ struct ETreeSortedVariablePrivate {
static void etsv_proxy_model_changed (ETableModel *etm, ETreeSortedVariable *etsv);
#if 0
-static void etsv_proxy_model_row_changed (ETableModel *etm, int row, ETreeSortedVariable *etsv);
-static void etsv_proxy_model_cell_changed (ETableModel *etm, int col, int row, ETreeSortedVariable *etsv);
+static void etsv_proxy_model_row_changed (ETableModel *etm, gint row, ETreeSortedVariable *etsv);
+static void etsv_proxy_model_cell_changed (ETableModel *etm, gint col, gint row, ETreeSortedVariable *etsv);
#endif
static void etsv_sort_info_changed (ETableSortInfo *info, ETreeSortedVariable *etsv);
static void etsv_sort (ETreeSortedVariable *etsv);
@@ -186,7 +186,7 @@ etsv_proxy_model_changed (ETableModel *etm, ETreeSortedVariable *etsv)
}
#if 0
static void
-etsv_proxy_model_row_changed (ETableModel *etm, int row, ETreeSortedVariable *etsv)
+etsv_proxy_model_row_changed (ETableModel *etm, gint row, ETreeSortedVariable *etsv)
{
ETreeSortedVariable *etsv = E_TABLE_SUBSET_VARIABLE(etsv);
@@ -195,7 +195,7 @@ etsv_proxy_model_row_changed (ETableModel *etm, int row, ETreeSortedVariable *et
}
static void
-etsv_proxy_model_cell_changed (ETableModel *etm, int col, int row, ETreeSortedVariable *etsv)
+etsv_proxy_model_cell_changed (ETableModel *etm, gint col, gint row, ETreeSortedVariable *etsv)
{
ETreeSortedVariable *etsv = E_TABLE_SUBSET_VARIABLE(etsv);
@@ -214,10 +214,10 @@ etsv_sort_info_changed (ETableSortInfo *info, ETreeSortedVariable *etsv)
static int
etsv_compare(ETreeSortedVariable *etsv, const ETreePath *path1, const ETreePath *path2)
{
- int j;
- int sort_count = e_table_sort_info_sorting_get_count(etsv->sort_info);
- int comp_val = 0;
- int ascending = 1;
+ gint j;
+ gint sort_count = e_table_sort_info_sorting_get_count(etsv->sort_info);
+ gint comp_val = 0;
+ gint ascending = 1;
for (j = 0; j < sort_count; j++) {
ETableSortColumn column = e_table_sort_info_sorting_get_nth(etsv->sort_info, j);
@@ -244,18 +244,18 @@ etsv_compare(ETreeSortedVariable *etsv, const ETreePath *path1, const ETreePath
static ETreeSortedVariable *etsv_closure;
-int cols_closure;
-int *ascending_closure;
-int *col_idx_closure;
+gint cols_closure;
+gint *ascending_closure;
+gint *col_idx_closure;
GCompareFunc *compare_closure;
static int
etsv_compare_closure(const ETreePath *path1, const ETreePath *path2)
{
- int j;
- int sort_count = e_table_sort_info_sorting_get_count(etsv_closure->sort_info);
- int comp_val = 0;
- int ascending = 1;
+ gint j;
+ gint sort_count = e_table_sort_info_sorting_get_count(etsv_closure->sort_info);
+ gint comp_val = 0;
+ gint ascending = 1;
for (j = 0; j < sort_count; j++) {
comp_val = (*(compare_closure[j]))(e_tree_model_value_at (etsv_closure->source, path1, col_idx_closure[j]),
@@ -276,7 +276,7 @@ etsv_compare_closure(const ETreePath *path1, const ETreePath *path2)
}
static int
-qsort_callback(const void *data1, const void *data2)
+qsort_callback(gconstpointer data1, gconstpointer data2)
{
GNode *node1 = *(GNode **)data1;
GNode *node2 = *(GNode **)data2;
@@ -284,7 +284,7 @@ qsort_callback(const void *data1, const void *data2)
}
static int
-qsort_callback_source(const void *data1, const void *data2)
+qsort_callback_source(gconstpointer data1, gconstpointer data2)
{
return etsv_compare_closure(data1, data2);
}
@@ -292,8 +292,8 @@ qsort_callback_source(const void *data1, const void *data2)
static void
etsv_setup_closures(ETreeSortedVariable *etsv)
{
- int j;
- int cols;
+ gint j;
+ gint cols;
cols = e_table_sort_info_sorting_get_count(etsv->sort_info);
cols_closure = cols;
@@ -367,7 +367,7 @@ etsv_sort_tree(ETreeSortedVariable *etsv, GNode *root)
static void
etsv_sort(ETreeSortedVariable *etsv)
{
- static int reentering = 0;
+ static gint reentering = 0;
if (reentering)
return;
reentering = 1;
@@ -440,8 +440,8 @@ etsv_add_all_node (ETreeSortedVariable *etsv, ETreePath *path, GNode *node)
{
ETreeModel *source = etsv->source;
ETreePath **children;
- int n;
- int i;
+ gint n;
+ gint i;
n = e_tree_model_node_get_children(source, path, &children);
qsort(children, n, sizeof(ETreePath *), qsort_callback_source);
diff --git a/widgets/table/e-tree-sorted-variable.h b/widgets/table/e-tree-sorted-variable.h
index 15f9d8e8af..2d5af111d9 100644
--- a/widgets/table/e-tree-sorted-variable.h
+++ b/widgets/table/e-tree-sorted-variable.h
@@ -46,11 +46,11 @@ typedef struct {
ETableHeader *full_header;
- int table_model_changed_id;
- int table_model_row_changed_id;
- int table_model_cell_changed_id;
- int sort_info_changed_id;
- int sort_idle_id;
+ gint table_model_changed_id;
+ gint table_model_row_changed_id;
+ gint table_model_cell_changed_id;
+ gint sort_info_changed_id;
+ gint sort_idle_id;
int insert_idle_id;
int insert_count;
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index 092fa87b9b..3ec12c8360 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -66,8 +66,8 @@ struct ETreeSortedPath {
ETreeSortedPath *parent;
gint num_children;
ETreeSortedPath **children;
- int position;
- int orig_position;
+ gint position;
+ gint orig_position;
guint needs_resort : 1;
guint child_needs_resort : 1;
@@ -84,20 +84,20 @@ struct ETreeSortedPriv {
ETreeSortedPath *last_access;
- int tree_model_pre_change_id;
- int tree_model_no_change_id;
- int tree_model_node_changed_id;
- int tree_model_node_data_changed_id;
- int tree_model_node_col_changed_id;
- int tree_model_node_inserted_id;
- int tree_model_node_removed_id;
- int tree_model_node_deleted_id;
- int tree_model_node_request_collapse_id;
-
- int sort_info_changed_id;
- int sort_idle_id;
- int insert_idle_id;
- int insert_count;
+ gint tree_model_pre_change_id;
+ gint tree_model_no_change_id;
+ gint tree_model_node_changed_id;
+ gint tree_model_node_data_changed_id;
+ gint tree_model_node_col_changed_id;
+ gint tree_model_node_inserted_id;
+ gint tree_model_node_removed_id;
+ gint tree_model_node_deleted_id;
+ gint tree_model_node_request_collapse_id;
+
+ gint sort_info_changed_id;
+ gint sort_idle_id;
+ gint insert_idle_id;
+ gint insert_count;
guint in_resort_idle : 1;
guint nested_resort_idle : 1;
@@ -184,11 +184,11 @@ check_last_access (ETreeSorted *ets, ETreePath corresponding)
#ifdef CHECK_AROUND_LAST_ACCESS
parent = ets->priv->last_access->parent;
if (parent && parent->children) {
- int position = ets->priv->last_access->position;
- int end = MIN(parent->num_children, position + 10);
- int start = MAX(0, position - 10);
- int initial = MAX (MIN (position, end), start);
- int i;
+ gint position = ets->priv->last_access->position;
+ gint end = MIN(parent->num_children, position + 10);
+ gint start = MAX(0, position - 10);
+ gint initial = MAX (MIN (position, end), start);
+ gint i;
for (i = initial; i < end; i++) {
if (parent->children[i] && parent->children[i]->corresponding == corresponding) {
@@ -211,9 +211,9 @@ check_last_access (ETreeSorted *ets, ETreePath corresponding)
static ETreeSortedPath *
find_path(ETreeSorted *ets, ETreePath corresponding)
{
- int depth;
+ gint depth;
ETreePath *sequence;
- int i;
+ gint i;
ETreeSortedPath *path;
ETreeSortedPath *check_last;
@@ -238,7 +238,7 @@ find_path(ETreeSorted *ets, ETreePath corresponding)
path = ets->priv->root;
for (i = depth - 1; i >= 0 && path != NULL; i --) {
- int j;
+ gint j;
if (path->num_children == -1) {
path = NULL;
@@ -268,7 +268,7 @@ find_path(ETreeSorted *ets, ETreePath corresponding)
static ETreeSortedPath *
find_child_path(ETreeSorted *ets, ETreeSortedPath *parent, ETreePath corresponding)
{
- int i;
+ gint i;
if (corresponding == NULL)
return NULL;
@@ -287,9 +287,9 @@ find_child_path(ETreeSorted *ets, ETreeSortedPath *parent, ETreePath correspondi
static ETreeSortedPath *
find_or_create_path(ETreeSorted *ets, ETreePath corresponding)
{
- int depth;
+ gint depth;
ETreePath *sequence;
- int i;
+ gint i;
ETreeSortedPath *path;
ETreeSortedPath *check_last;
@@ -314,7 +314,7 @@ find_or_create_path(ETreeSorted *ets, ETreePath corresponding)
path = ets->priv->root;
for (i = depth - 1; i >= 0 && path != NULL; i --) {
- int j;
+ gint j;
if (path->num_children == -1) {
generate_children(ets, path);
@@ -343,7 +343,7 @@ find_or_create_path(ETreeSorted *ets, ETreePath corresponding)
static void
free_children (ETreeSortedPath *path)
{
- int i;
+ gint i;
if (path == NULL)
return;
@@ -388,8 +388,8 @@ new_path (ETreeSortedPath *parent, ETreePath corresponding)
static gboolean
reposition_path (ETreeSorted *ets, ETreeSortedPath *path)
{
- int new_index;
- int old_index = path->position;
+ gint new_index;
+ gint old_index = path->position;
ETreeSortedPath *parent = path->parent;
gboolean changed = FALSE;
if (parent) {
@@ -412,7 +412,7 @@ reposition_path (ETreeSorted *ets, ETreeSortedPath *path)
old_index);
if (new_index > old_index) {
- int i;
+ gint i;
ets->priv->insert_count++;
memmove(parent->children + old_index, parent->children + old_index + 1, sizeof (ETreePath) * (new_index - old_index));
parent->children[new_index] = path;
@@ -422,7 +422,7 @@ reposition_path (ETreeSorted *ets, ETreeSortedPath *path)
e_tree_model_node_changed(E_TREE_MODEL(ets), parent);
e_tree_sorted_node_resorted(ets, parent);
} else if (new_index < old_index) {
- int i;
+ gint i;
ets->priv->insert_count++;
memmove(parent->children + new_index + 1, parent->children + new_index, sizeof (ETreePath) * (old_index - new_index));
parent->children[new_index] = path;
@@ -443,7 +443,7 @@ static void
regenerate_children(ETreeSorted *ets, ETreeSortedPath *path)
{
ETreeSortedPath **children;
- int i;
+ gint i;
children = g_new(ETreeSortedPath *, path->num_children);
for (i = 0; i < path->num_children; i++)
@@ -456,8 +456,8 @@ static void
generate_children(ETreeSorted *ets, ETreeSortedPath *path)
{
ETreePath child;
- int i;
- int count;
+ gint i;
+ gint count;
free_children(path);
@@ -492,7 +492,7 @@ resort_node (ETreeSorted *ets, ETreeSortedPath *path, gboolean resort_all_childr
if (needs_resort && send_signals)
e_tree_model_pre_change(E_TREE_MODEL(ets));
if (needs_resort) {
- int i;
+ gint i;
d(g_print("Start sort of node %p\n", path));
if (needs_regen)
regenerate_children(ets, path);
@@ -511,7 +511,7 @@ resort_node (ETreeSorted *ets, ETreeSortedPath *path, gboolean resort_all_childr
if (path->resort_all_children)
resort_all_children = TRUE;
if ((resort_all_children || path->child_needs_resort) && path->num_children >= 0) {
- int i;
+ gint i;
for (i = 0; i < path->num_children; i++) {
resort_node(ets, path->children[i], resort_all_children, needs_regen, send_signals && !needs_resort);
}
@@ -779,7 +779,7 @@ ets_get_children (ETreeModel *etm, ETreePath node, ETreePath **nodes)
n_children = path->num_children;
if (nodes) {
- int i;
+ gint i;
(*nodes) = g_malloc (sizeof (ETreePath) * n_children);
for (i = 0; i < n_children; i ++) {
@@ -851,7 +851,7 @@ ets_has_get_node_by_id (ETreeModel *etm)
}
static ETreePath
-ets_get_node_by_id (ETreeModel *etm, const char *save_id)
+ets_get_node_by_id (ETreeModel *etm, const gchar *save_id)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
ETreePath node;
@@ -870,8 +870,8 @@ ets_has_change_pending (ETreeModel *etm)
}
-static void *
-ets_value_at (ETreeModel *etm, ETreePath node, int col)
+static gpointer
+ets_value_at (ETreeModel *etm, ETreePath node, gint col)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
ETreeSortedPath *path = node;
@@ -880,7 +880,7 @@ ets_value_at (ETreeModel *etm, ETreePath node, int col)
}
static void
-ets_set_value_at (ETreeModel *etm, ETreePath node, int col, const void *val)
+ets_set_value_at (ETreeModel *etm, ETreePath node, gint col, gconstpointer val)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
ETreeSortedPath *path = node;
@@ -889,7 +889,7 @@ ets_set_value_at (ETreeModel *etm, ETreePath node, int col, const void *val)
}
static gboolean
-ets_is_editable (ETreeModel *etm, ETreePath node, int col)
+ets_is_editable (ETreeModel *etm, ETreePath node, gint col)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
ETreeSortedPath *path = node;
@@ -899,8 +899,8 @@ ets_is_editable (ETreeModel *etm, ETreePath node, int col)
/* The default for ets_duplicate_value is to return the raw value. */
-static void *
-ets_duplicate_value (ETreeModel *etm, int col, const void *value)
+static gpointer
+ets_duplicate_value (ETreeModel *etm, gint col, gconstpointer value)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
@@ -908,15 +908,15 @@ ets_duplicate_value (ETreeModel *etm, int col, const void *value)
}
static void
-ets_free_value (ETreeModel *etm, int col, void *value)
+ets_free_value (ETreeModel *etm, gint col, gpointer value)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
e_tree_model_free_value (ets->priv->source, col, value);
}
-static void *
-ets_initialize_value (ETreeModel *etm, int col)
+static gpointer
+ets_initialize_value (ETreeModel *etm, gint col)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
@@ -924,15 +924,15 @@ ets_initialize_value (ETreeModel *etm, int col)
}
static gboolean
-ets_value_is_empty (ETreeModel *etm, int col, const void *value)
+ets_value_is_empty (ETreeModel *etm, gint col, gconstpointer value)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
return e_tree_model_value_is_empty (ets->priv->source, col, value);
}
-static char *
-ets_value_to_string (ETreeModel *etm, int col, const void *value)
+static gchar *
+ets_value_to_string (ETreeModel *etm, gint col, gconstpointer value)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
@@ -999,7 +999,7 @@ ets_proxy_node_data_changed (ETreeModel *etm, ETreePath node, ETreeSorted *ets)
}
static void
-ets_proxy_node_col_changed (ETreeModel *etm, ETreePath node, int col, ETreeSorted *ets)
+ets_proxy_node_col_changed (ETreeModel *etm, ETreePath node, gint col, ETreeSorted *ets)
{
ETreeSortedPath *path = find_path(ets, node);
@@ -1021,10 +1021,10 @@ ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETr
ETreeSortedPath *parent_path = find_path(ets, parent);
if (parent_path && parent_path->num_children != -1) {
- int i;
- int j;
+ gint i;
+ gint j;
ETreeSortedPath *path;
- int position = parent_path->num_children;
+ gint position = parent_path->num_children;
ETreePath counter;
for (counter = e_tree_model_node_get_next(etm, child);
@@ -1084,7 +1084,7 @@ ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETr
}
static void
-ets_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, int 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;
@@ -1098,7 +1098,7 @@ ets_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, int
ets->priv->last_access = NULL;
if (path && parent_path && parent_path->num_children != -1) {
- int i;
+ gint i;
for (i = 0; i < parent_path->num_children; i++) {
if (parent_path->children[i]->orig_position > old_position)
parent_path->children[i]->orig_position --;
@@ -1313,7 +1313,7 @@ e_tree_sorted_model_to_view_path (ETreeSorted *ets,
return find_or_create_path(ets, model_path);
}
-int
+gint
e_tree_sorted_orig_position (ETreeSorted *ets,
ETreePath path)
{
@@ -1321,7 +1321,7 @@ e_tree_sorted_orig_position (ETreeSorted *ets,
return sorted_path->orig_position;
}
-int
+gint
e_tree_sorted_node_num_children (ETreeSorted *ets,
ETreePath path)
{
diff --git a/widgets/table/e-tree-sorted.h b/widgets/table/e-tree-sorted.h
index 1e286b7e75..45adbef1fb 100644
--- a/widgets/table/e-tree-sorted.h
+++ b/widgets/table/e-tree-sorted.h
@@ -69,9 +69,9 @@ ETreePath e_tree_sorted_view_to_model_path (ETreeSorted *ets,
ETreePath view_path);
ETreePath e_tree_sorted_model_to_view_path (ETreeSorted *ets,
ETreePath model_path);
-int e_tree_sorted_orig_position (ETreeSorted *ets,
+gint e_tree_sorted_orig_position (ETreeSorted *ets,
ETreePath path);
-int e_tree_sorted_node_num_children (ETreeSorted *ets,
+gint e_tree_sorted_node_num_children (ETreeSorted *ets,
ETreePath path);
void e_tree_sorted_node_resorted (ETreeSorted *tree_model,
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 7cfeab33ed..2018ea59bb 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -60,8 +60,8 @@ struct ETreeTableAdapterPriv {
ETableSortInfo *sort_info;
ETableHeader *header;
- int n_map;
- int n_vals_allocated;
+ gint n_map;
+ gint n_vals_allocated;
node_t **map_table;
GHashTable *nodes;
GNode *root;
@@ -69,22 +69,22 @@ struct ETreeTableAdapterPriv {
guint root_visible : 1;
guint remap_needed : 1;
- int last_access;
+ gint last_access;
- int pre_change_id;
- int no_change_id;
+ gint pre_change_id;
+ gint no_change_id;
int rebuilt_id;
- int node_changed_id;
- int node_data_changed_id;
- int node_col_changed_id;
- int node_inserted_id;
- int node_removed_id;
- int node_request_collapse_id;
- int sort_info_changed_id;
+ gint node_changed_id;
+ gint node_data_changed_id;
+ gint node_col_changed_id;
+ gint node_inserted_id;
+ gint node_removed_id;
+ gint node_request_collapse_id;
+ gint sort_info_changed_id;
guint resort_idle_id;
- int force_expanded_state; /* use this instead of model's default if not 0; <0 ... collapse, >0 ... expand */
+ gint force_expanded_state; /* use this instead of model's default if not 0; <0 ... collapse, >0 ... expand */
};
static void etta_sort_info_changed (ETableSortInfo *sort_info, ETreeTableAdapter *etta);
@@ -103,7 +103,7 @@ lookup_gnode(ETreeTableAdapter *etta, ETreePath path)
}
static void
-resize_map(ETreeTableAdapter *etta, int 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);
@@ -114,7 +114,7 @@ resize_map(ETreeTableAdapter *etta, int size)
}
static void
-move_map_elements(ETreeTableAdapter *etta, int to, int from, int count)
+move_map_elements(ETreeTableAdapter *etta, gint to, gint from, gint count)
{
if (count <= 0 || from >= etta->priv->n_map)
return;
@@ -140,7 +140,7 @@ fill_map(ETreeTableAdapter *etta, gint index, GNode *gnode)
static void
remap_indices(ETreeTableAdapter *etta)
{
- int i;
+ gint i;
for (i = 0; i < etta->priv->n_map; i++)
etta->priv->map_table[i]->index = i;
etta->priv->remap_needed = FALSE;
@@ -163,7 +163,7 @@ resort_node(ETreeTableAdapter *etta, GNode *gnode, gboolean recurse)
node_t *node = (node_t *)gnode->data;
ETreePath *paths, path;
GNode *prev, *curr;
- int i, count;
+ gint i, count;
gboolean sort_needed;
if (node->num_visible_children == 0)
@@ -222,7 +222,7 @@ get_row(ETreeTableAdapter *etta, ETreePath path)
}
static ETreePath
-get_path (ETreeTableAdapter *etta, int row)
+get_path (ETreeTableAdapter *etta, gint row)
{
if (row == -1 && etta->priv->n_map > 0)
row = etta->priv->n_map - 1;
@@ -263,7 +263,7 @@ static int
delete_children(ETreeTableAdapter *etta, GNode *gnode)
{
node_t *node = (node_t *)gnode->data;
- int to_remove = node ? node->num_visible_children : 0;
+ gint to_remove = node ? node->num_visible_children : 0;
if (to_remove == 0)
return 0;
@@ -280,9 +280,9 @@ delete_children(ETreeTableAdapter *etta, GNode *gnode)
static void
delete_node(ETreeTableAdapter *etta, ETreePath parent, ETreePath path)
{
- int to_remove = 1;
- int parent_row = get_row(etta, parent);
- int row = get_row(etta, path);
+ gint to_remove = 1;
+ gint parent_row = get_row(etta, parent);
+ gint row = get_row(etta, path);
GNode *gnode = lookup_gnode(etta, path);
GNode *parent_gnode = lookup_gnode(etta, parent);
@@ -338,8 +338,8 @@ static gint
insert_children(ETreeTableAdapter *etta, GNode *gnode)
{
ETreePath path, tmp;
- int count = 0;
- int pos = 0;
+ gint count = 0;
+ gint pos = 0;
path = ((node_t *)gnode->data)->path;
for (tmp = e_tree_model_node_get_first_child(etta->priv->source, path);
@@ -361,7 +361,7 @@ generate_tree(ETreeTableAdapter *etta, ETreePath path)
{
GNode *gnode;
node_t *node;
- int size;
+ gint size;
e_table_model_pre_change(E_TABLE_MODEL(etta));
@@ -391,7 +391,7 @@ insert_node(ETreeTableAdapter *etta, ETreePath parent, ETreePath path)
GNode *gnode, *parent_gnode;
node_t *node, *parent_node;
gboolean expandable;
- int size, row;
+ gint size, row;
e_table_model_pre_change(E_TABLE_MODEL(etta));
@@ -583,7 +583,7 @@ etta_has_save_id (ETableModel *etm)
}
static gchar *
-etta_get_save_id (ETableModel *etm, int row)
+etta_get_save_id (ETableModel *etm, gint row)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *)etm;
@@ -607,8 +607,8 @@ etta_row_count (ETableModel *etm)
return etta->priv->n_map;
}
-static void *
-etta_value_at (ETableModel *etm, int col, int row)
+static gpointer
+etta_value_at (ETableModel *etm, gint col, gint row)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *)etm;
@@ -627,7 +627,7 @@ etta_value_at (ETableModel *etm, int col, int row)
}
static void
-etta_set_value_at (ETableModel *etm, int col, int row, const void *val)
+etta_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *)etm;
@@ -635,7 +635,7 @@ etta_set_value_at (ETableModel *etm, int col, int row, const void *val)
}
static gboolean
-etta_is_cell_editable (ETableModel *etm, int col, int row)
+etta_is_cell_editable (ETableModel *etm, gint col, gint row)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *)etm;
@@ -643,12 +643,12 @@ etta_is_cell_editable (ETableModel *etm, int col, int row)
}
static void
-etta_append_row (ETableModel *etm, ETableModel *source, int row)
+etta_append_row (ETableModel *etm, ETableModel *source, gint row)
{
}
-static void *
-etta_duplicate_value (ETableModel *etm, int col, const void *value)
+static gpointer
+etta_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *)etm;
@@ -656,15 +656,15 @@ etta_duplicate_value (ETableModel *etm, int col, const void *value)
}
static void
-etta_free_value (ETableModel *etm, int col, void *value)
+etta_free_value (ETableModel *etm, gint col, gpointer value)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *)etm;
e_tree_model_free_value (etta->priv->source, col, value);
}
-static void *
-etta_initialize_value (ETableModel *etm, int col)
+static gpointer
+etta_initialize_value (ETableModel *etm, gint col)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *)etm;
@@ -672,15 +672,15 @@ etta_initialize_value (ETableModel *etm, int col)
}
static gboolean
-etta_value_is_empty (ETableModel *etm, int col, const void *value)
+etta_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *)etm;
return e_tree_model_value_is_empty (etta->priv->source, col, value);
}
-static char *
-etta_value_to_string (ETableModel *etm, int col, const void *value)
+static gchar *
+etta_value_to_string (ETableModel *etm, gint col, gconstpointer value)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *)etm;
@@ -793,7 +793,7 @@ etta_proxy_node_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter *ett
static void
etta_proxy_node_data_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter *etta)
{
- int row = get_row(etta, path);
+ gint row = get_row(etta, path);
if (row == -1) {
e_table_model_no_change(E_TABLE_MODEL(etta));
@@ -804,9 +804,9 @@ etta_proxy_node_data_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter
}
static void
-etta_proxy_node_col_changed (ETreeModel *etm, ETreePath path, int col, ETreeTableAdapter *etta)
+etta_proxy_node_col_changed (ETreeModel *etm, ETreePath path, gint col, ETreeTableAdapter *etta)
{
- int row = get_row(etta, path);
+ gint row = get_row(etta, path);
if (row == -1) {
e_table_model_no_change(E_TABLE_MODEL(etta));
@@ -828,7 +828,7 @@ etta_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ET
}
static void
-etta_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, int 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));
@@ -926,8 +926,8 @@ save_expanded_state_func (gpointer keyp, gpointer value, gpointer data)
if (node->expanded != tar->expanded_default) {
gchar *save_id = e_tree_model_get_save_id(tar->model, path);
- xmlnode = xmlNewChild (tar->root, NULL, (const unsigned char *)"node", NULL);
- e_xml_set_string_prop_by_name(xmlnode, (const unsigned char *)"id", save_id);
+ xmlnode = xmlNewChild (tar->root, NULL, (const guchar *)"node", NULL);
+ e_xml_set_string_prop_by_name(xmlnode, (const guchar *)"id", save_id);
g_free(save_id);
}
}
@@ -941,16 +941,16 @@ e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta)
g_return_val_if_fail (etta != NULL, NULL);
- doc = xmlNewDoc ((const unsigned char *)"1.0");
- root = xmlNewDocNode (doc, NULL, (const unsigned char *)"expanded_state", NULL);
+ doc = xmlNewDoc ((const guchar *)"1.0");
+ root = xmlNewDocNode (doc, NULL, (const guchar *)"expanded_state", NULL);
xmlDocSetRootElement (doc, root);
tar.model = etta->priv->source;
tar.root = root;
tar.expanded_default = e_tree_model_get_expanded_default(etta->priv->source);
- e_xml_set_integer_prop_by_name (root, (const unsigned char *)"vers", 2);
- e_xml_set_bool_prop_by_name (root, (const unsigned char *)"default", tar.expanded_default);
+ e_xml_set_integer_prop_by_name (root, (const guchar *)"vers", 2);
+ e_xml_set_bool_prop_by_name (root, (const guchar *)"default", tar.expanded_default);
g_hash_table_foreach (etta->priv->nodes, save_expanded_state_func, &tar);
@@ -958,7 +958,7 @@ e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta)
}
void
-e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *filename)
+e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const gchar *filename)
{
xmlDoc *doc;
@@ -972,11 +972,11 @@ e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *f
}
static xmlDoc *
-open_file (ETreeTableAdapter *etta, const char *filename)
+open_file (ETreeTableAdapter *etta, const gchar *filename)
{
xmlDoc *doc;
xmlNode *root;
- int vers;
+ gint vers;
gboolean model_default, saved_default;
if (!g_file_test (filename, G_FILE_TEST_EXISTS))
@@ -996,18 +996,18 @@ open_file (ETreeTableAdapter *etta, const char *filename)
return NULL;
root = xmlDocGetRootElement (doc);
- if (root == NULL || strcmp ((char *)root->name, "expanded_state")) {
+ if (root == NULL || strcmp ((gchar *)root->name, "expanded_state")) {
xmlFreeDoc (doc);
return NULL;
}
- vers = e_xml_get_integer_prop_by_name_with_default (root, (const unsigned char *)"vers", 0);
+ vers = e_xml_get_integer_prop_by_name_with_default (root, (const guchar *)"vers", 0);
if (vers > 2) {
xmlFreeDoc (doc);
return NULL;
}
model_default = e_tree_model_get_expanded_default (etta->priv->source);
- saved_default = e_xml_get_bool_prop_by_name_with_default (root, (const unsigned char *)"default", !model_default);
+ saved_default = e_xml_get_bool_prop_by_name_with_default (root, (const guchar *)"default", !model_default);
if (saved_default != model_default) {
xmlFreeDoc (doc);
return NULL;
@@ -1018,7 +1018,7 @@ open_file (ETreeTableAdapter *etta, const char *filename)
/* state: <0 ... collapse; 0 ... use default; >0 ... expand */
void
-e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta, int state)
+e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta, gint state)
{
g_return_if_fail (etta != NULL);
@@ -1041,10 +1041,10 @@ e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *d
model_default = e_tree_model_get_expanded_default(etta->priv->source);
- if (!strcmp ((char *)root->name, "expanded_state")) {
- char *state;
+ if (!strcmp ((gchar *)root->name, "expanded_state")) {
+ gchar *state;
- state = e_xml_get_string_prop_by_name_with_default (root, (const unsigned char *)"default", "");
+ state = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"default", "");
if (state[0] == 't')
file_default = TRUE;
@@ -1062,15 +1062,15 @@ e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *d
}
for (child = root->xmlChildrenNode; child; child = child->next) {
- char *id;
+ gchar *id;
ETreePath path;
- if (strcmp ((char *)child->name, "node")) {
+ if (strcmp ((gchar *)child->name, "node")) {
d(g_warning ("unknown node '%s' in %s", child->name, filename));
continue;
}
- id = e_xml_get_string_prop_by_name_with_default (child, (const unsigned char *)"id", "");
+ id = e_xml_get_string_prop_by_name_with_default (child, (const guchar *)"id", "");
if (!strcmp(id, "")) {
g_free(id);
@@ -1088,7 +1088,7 @@ e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *d
}
void
-e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *filename)
+e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const gchar *filename)
{
xmlDoc *doc;
@@ -1106,7 +1106,7 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *f
void
e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta, gboolean visible)
{
- int size;
+ gint size;
g_return_if_fail (etta != NULL);
@@ -1133,7 +1133,7 @@ e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ETreePath path,
{
GNode *gnode = lookup_gnode(etta, path);
node_t *node;
- int row;
+ gint row;
if (!expanded && (!gnode || (e_tree_model_node_is_root (etta->priv->source, path) && !etta->priv->root_visible)))
return;
@@ -1163,7 +1163,7 @@ e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ETreePath path,
if (expanded) {
- int num_children = insert_children(etta, gnode);
+ gint num_children = insert_children(etta, gnode);
update_child_counts(gnode, num_children);
if (etta->priv->sort_info && e_table_sort_info_sorting_get_count(etta->priv->sort_info) > 0)
resort_node(etta, gnode, TRUE);
@@ -1175,7 +1175,7 @@ e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ETreePath path,
} else
e_table_model_no_change(E_TABLE_MODEL(etta));
} else {
- int num_children = delete_children(etta, gnode);
+ gint num_children = delete_children(etta, gnode);
if (num_children == 0) {
e_table_model_no_change(E_TABLE_MODEL(etta));
return;
@@ -1202,12 +1202,12 @@ e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter *etta, ETreePa
}
ETreePath
-e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta, int row)
+e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta, gint row)
{
return get_path(etta, row);
}
-int
+gint
e_tree_table_adapter_row_of_node (ETreeTableAdapter *etta, ETreePath path)
{
return get_row(etta, path);
diff --git a/widgets/table/e-tree-table-adapter.h b/widgets/table/e-tree-table-adapter.h
index 13ab5787c0..6a0f67bca8 100644
--- a/widgets/table/e-tree-table-adapter.h
+++ b/widgets/table/e-tree-table-adapter.h
@@ -72,12 +72,12 @@ void e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter
ETreePath path,
gboolean expanded);
void e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta,
- int state);
+ gint state);
void e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta,
gboolean visible);
ETreePath e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta,
- int row);
-int e_tree_table_adapter_row_of_node (ETreeTableAdapter *etta,
+ gint row);
+gint e_tree_table_adapter_row_of_node (ETreeTableAdapter *etta,
ETreePath path);
gboolean e_tree_table_adapter_root_node_is_visible (ETreeTableAdapter *etta);
@@ -85,9 +85,9 @@ void e_tree_table_adapter_show_node (ETreeTableAdapter
ETreePath path);
void e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta,
- const char *filename);
+ const gchar *filename);
void e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta,
- const char *filename);
+ const gchar *filename);
xmlDoc *e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta);
void e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *doc);
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index e58ac1bdd9..725654b90e 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -130,14 +130,14 @@ struct ETreePriv {
guint search_search_id;
guint search_accept_id;
- int reflow_idle_id;
- int scroll_idle_id;
- int hover_idle_id;
+ gint reflow_idle_id;
+ gint scroll_idle_id;
+ gint hover_idle_id;
- int table_model_change_id;
- int table_row_change_id;
- int table_cell_change_id;
- int table_rows_delete_id;
+ gint table_model_change_id;
+ gint table_row_change_id;
+ gint table_cell_change_id;
+ gint table_rows_delete_id;
GnomeCanvasItem *info_text;
guint info_text_resize_id;
@@ -173,22 +173,22 @@ struct ETreePriv {
ECursorMode cursor_mode;
- int drop_row;
+ gint drop_row;
ETreePath drop_path;
- int drop_col;
+ gint drop_col;
GnomeCanvasItem *drop_highlight;
- int last_drop_x;
- int last_drop_y;
- int last_drop_time;
+ gint last_drop_x;
+ gint last_drop_y;
+ gint last_drop_time;
GdkDragContext *last_drop_context;
- int hover_x;
- int hover_y;
+ gint hover_x;
+ gint hover_y;
- int drag_row;
+ gint drag_row;
ETreePath drag_path;
- int drag_col;
+ gint drag_col;
ETreeDragSourceSite *site;
GList *expanded_list;
@@ -243,7 +243,7 @@ static void et_drag_data_received(GtkWidget *widget,
static void scroll_off (ETree *et);
static void scroll_on (ETree *et, guint scroll_direction);
static void hover_off (ETree *et);
-static void hover_on (ETree *et, int x, int y);
+static void hover_on (ETree *et, gint x, gint y);
static void context_destroyed (gpointer data, GObject *ctx);
static void
@@ -451,14 +451,14 @@ et_unrealize (GtkWidget *widget)
typedef struct {
ETree *et;
- char *string;
+ gchar *string;
} SearchSearchStruct;
static gboolean
search_search_callback (ETreeModel *model, ETreePath path, gpointer data)
{
SearchSearchStruct *cb_data = data;
- const void *value;
+ gconstpointer value;
ETableCol *col = current_search_col (cb_data->et);
value = e_tree_model_value_at (model, path, cb_data->et->priv->current_search_col->col_idx);
@@ -467,7 +467,7 @@ search_search_callback (ETreeModel *model, ETreePath path, gpointer data)
}
static gboolean
-et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, ETree *et)
+et_search_search (ETableSearch *search, gchar *string, ETableSearchFlags flags, ETree *et)
{
ETreePath cursor;
ETreePath found;
@@ -483,7 +483,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E
cursor = e_tree_get_cursor (et);
if (cursor && (flags & E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST)) {
- const void *value;
+ gconstpointer value;
value = e_tree_model_value_at (et->priv->model, cursor, col->col_idx);
@@ -497,7 +497,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E
found = e_tree_model_node_find (et->priv->model, NULL, cursor, E_TREE_FIND_NEXT_FORWARD, search_search_callback, &cb_data);
if (found && found != cursor) {
- int model_row;
+ gint model_row;
e_tree_table_adapter_show_node (et->priv->etta, found);
model_row = e_tree_table_adapter_row_of_node (et->priv->etta, found);
@@ -507,7 +507,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E
e_selection_model_select_as_key_press(E_SELECTION_MODEL (et->priv->selection), model_row, col->col_idx, GDK_CONTROL_MASK);
return TRUE;
} else if (cursor && !(flags & E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST)) {
- const void *value;
+ gconstpointer value;
value = e_tree_model_value_at (et->priv->model, cursor, col->col_idx);
@@ -520,7 +520,7 @@ static void
et_search_accept (ETableSearch *search, ETree *et)
{
ETableCol *col = current_search_col (et);
- int cursor;
+ gint cursor;
if (col == NULL)
return;
@@ -698,7 +698,7 @@ header_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETree *e_t
static void
e_tree_setup_header (ETree *e_tree)
{
- char *pointer;
+ gchar *pointer;
e_tree->priv->header_canvas = GNOME_CANVAS (e_canvas_new ());
GTK_WIDGET_UNSET_FLAGS (e_tree->priv->header_canvas, GTK_CAN_FOCUS);
@@ -785,8 +785,8 @@ tree_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
x = y = w = h = 0;
if (path) {
- int row = e_tree_row_of_node(e_tree, path);
- int col = 0;
+ gint row = e_tree_row_of_node(e_tree, path);
+ gint col = 0;
if (row >= 0)
e_table_item_get_cell_geometry (E_TABLE_ITEM (e_tree->priv->item),
@@ -805,7 +805,7 @@ tree_canvas_reflow (GnomeCanvas *canvas, ETree *e_tree)
}
static void
-item_cursor_change (ETableItem *eti, int 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);
g_signal_emit (et,
@@ -814,7 +814,7 @@ item_cursor_change (ETableItem *eti, int row, ETree *et)
}
static void
-item_cursor_activated (ETableItem *eti, int 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);
g_signal_emit (et,
@@ -824,7 +824,7 @@ item_cursor_activated (ETableItem *eti, int row, ETree *et)
}
static void
-item_double_click (ETableItem *eti, int row, int 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);
g_signal_emit (et,
@@ -833,9 +833,9 @@ item_double_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et
}
static gint
-item_right_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
+item_right_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
{
- int return_val = 0;
+ gint return_val = 0;
ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
g_signal_emit (et,
et_signals [RIGHT_CLICK], 0,
@@ -844,9 +844,9 @@ item_right_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
}
static gint
-item_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
+item_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
{
- int return_val = 0;
+ gint return_val = 0;
ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
g_signal_emit (et,
et_signals [CLICK], 0,
@@ -855,12 +855,12 @@ item_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
}
static gint
-item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
+item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
{
- int return_val = 0;
+ gint return_val = 0;
GdkEventKey *key = (GdkEventKey *) event;
ETreePath path;
- int y, row_local, col_local;
+ gint y, row_local, col_local;
GtkAdjustment *vadj;
switch (key->keyval) {
@@ -945,7 +945,7 @@ item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
}
static gint
-item_start_drag (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
+item_start_drag (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
{
ETreePath path;
gint return_val = 0;
@@ -967,7 +967,7 @@ et_selection_model_selection_changed (ETableSelectionModel *etsm, ETree *et)
}
static void
-et_selection_model_selection_row_changed (ETableSelectionModel *etsm, int row, ETree *et)
+et_selection_model_selection_row_changed (ETableSelectionModel *etsm, gint row, ETree *et)
{
g_signal_emit (et,
et_signals [SELECTION_CHANGE], 0);
@@ -1018,7 +1018,7 @@ et_canvas_style_set (GtkWidget *widget, GtkStyle *prev_style)
static gint
white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETree *e_tree)
{
- int return_val = 0;
+ gint return_val = 0;
g_signal_emit (e_tree,
et_signals [WHITE_SPACE_EVENT], 0,
event, &return_val);
@@ -1252,8 +1252,8 @@ ETableState *
e_tree_get_state_object (ETree *e_tree)
{
ETableState *state;
- int full_col_count;
- int i, j;
+ gint full_col_count;
+ gint i, j;
state = e_table_state_new();
state->sort_info = e_tree->priv->sort_info;
@@ -1342,19 +1342,19 @@ et_table_model_changed (ETableModel *model, ETree *et)
}
static void
-et_table_row_changed (ETableModel *table_model, int 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, int view_col, int 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, int row, int count, ETree *et)
+et_table_rows_deleted (ETableModel *table_model, gint row, gint count, ETree *et)
{
ETreePath * node, * prev_node;
@@ -1400,7 +1400,7 @@ static gboolean
et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
ETableSpecification *specification, ETableState *state)
{
- int row = 0;
+ gint row = 0;
if (ete)
g_object_ref(ete);
@@ -1494,7 +1494,7 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
**/
gboolean
e_tree_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
- const char *spec_str, const char *state_str)
+ const gchar *spec_str, const gchar *state_str)
{
ETableSpecification *specification;
ETableState *state;
@@ -1553,7 +1553,7 @@ e_tree_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
**/
gboolean
e_tree_construct_from_spec_file (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
- const char *spec_fn, const char *state_fn)
+ const gchar *spec_fn, const gchar *state_fn)
{
ETableSpecification *specification;
ETableState *state;
@@ -1622,7 +1622,7 @@ 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 char *spec, const char *state)
+e_tree_new (ETreeModel *etm, ETableExtras *ete, const gchar *spec, const gchar *state)
{
ETree *e_tree;
@@ -1662,7 +1662,7 @@ e_tree_new (ETreeModel *etm, ETableExtras *ete, const char *spec, const char *st
* The newly created #ETree or %NULL if there's an error.
**/
GtkWidget *
-e_tree_new_from_spec_file (ETreeModel *etm, ETableExtras *ete, const char *spec_fn, const char *state_fn)
+e_tree_new_from_spec_file (ETreeModel *etm, ETableExtras *ete, const gchar *spec_fn, const gchar *state_fn)
{
ETree *e_tree;
@@ -1685,7 +1685,7 @@ void
e_tree_set_cursor (ETree *e_tree, ETreePath path)
{
#ifndef E_TREE_USE_TREE_SELECTION
- int row;
+ gint row;
#endif
g_return_if_fail(e_tree != NULL);
g_return_if_fail(E_IS_TREE(e_tree));
@@ -1712,7 +1712,7 @@ e_tree_get_cursor (ETree *e_tree)
#ifdef E_TREE_USE_TREE_SELECTION
return e_tree_selection_model_get_cursor (E_TREE_SELECTION_MODEL(e_tree->priv->selection));
#else
- int row;
+ gint row;
ETreePath path;
g_return_val_if_fail(e_tree != NULL, NULL);
g_return_val_if_fail(E_IS_TREE(e_tree), NULL);
@@ -1825,7 +1825,7 @@ et_get_property (GObject *object,
}
typedef struct {
- char *arg;
+ gchar *arg;
gboolean setting;
} bool_closure;
@@ -1926,7 +1926,7 @@ e_tree_get_next_row (ETree *e_tree,
g_return_val_if_fail(E_IS_TREE(e_tree), -1);
if (e_tree->priv->sorter) {
- int i;
+ gint i;
i = e_sorter_model_to_sorted(E_SORTER (e_tree->priv->sorter), model_row);
i++;
if (i < e_table_model_row_count(E_TABLE_MODEL(e_tree->priv->etta))) {
@@ -1948,7 +1948,7 @@ e_tree_get_prev_row (ETree *e_tree,
g_return_val_if_fail(E_IS_TREE(e_tree), -1);
if (e_tree->priv->sorter) {
- int i;
+ gint i;
i = e_sorter_model_to_sorted(E_SORTER (e_tree->priv->sorter), model_row);
i--;
if (i >= 0)
@@ -2022,7 +2022,7 @@ e_tree_root_node_set_visible (ETree *et, gboolean visible)
}
ETreePath
-e_tree_node_at_row (ETree *et, int row)
+e_tree_node_at_row (ETree *et, gint row)
{
ETreePath path;
@@ -2031,7 +2031,7 @@ e_tree_node_at_row (ETree *et, int row)
return path;
}
-int
+gint
e_tree_row_of_node (ETree *et, ETreePath path)
{
return e_tree_table_adapter_row_of_node (et->priv->etta, path);
@@ -2053,7 +2053,7 @@ e_tree_show_node (ETree *et, ETreePath path)
}
void
-e_tree_save_expanded_state (ETree *et, char *filename)
+e_tree_save_expanded_state (ETree *et, gchar *filename)
{
g_return_if_fail (et != NULL);
g_return_if_fail (E_IS_TREE(et));
@@ -2062,7 +2062,7 @@ e_tree_save_expanded_state (ETree *et, char *filename)
}
void
-e_tree_load_expanded_state (ETree *et, char *filename)
+e_tree_load_expanded_state (ETree *et, gchar *filename)
{
e_tree_table_adapter_load_expanded_state (et->priv->etta, filename);
}
@@ -2090,7 +2090,7 @@ e_tree_load_expanded_state_xml (ETree *et, xmlDoc *doc)
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, int state)
+e_tree_force_expanded_state (ETree *et, gint state)
{
e_tree_table_adapter_force_expanded_state (et->priv->etta, state);
}
@@ -2321,8 +2321,8 @@ struct _GtkDragSourceInfo
void
e_tree_drag_get_data (ETree *tree,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context,
GdkAtom target,
guint32 time)
@@ -2348,14 +2348,14 @@ e_tree_drag_get_data (ETree *tree,
*/
void
e_tree_drag_highlight (ETree *tree,
- int row,
- int col)
+ gint row,
+ gint col)
{
g_return_if_fail(tree != NULL);
g_return_if_fail(E_IS_TREE(tree));
if (row != -1) {
- int x, y, width, height;
+ gint x, y, width, height;
if (col == -1) {
e_tree_get_cell_geometry (tree, row, 0, &x, &y, &width, &height);
x = 0;
@@ -2447,7 +2447,7 @@ e_tree_drag_dest_unset (GtkWidget *widget)
/* Source side */
static gint
-et_real_start_drag (ETree *tree, int row, ETreePath path, int col, GdkEvent *event)
+et_real_start_drag (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event)
{
GtkDragSourceInfo *info;
GdkDragContext *context;
@@ -2545,8 +2545,8 @@ e_tree_drag_source_unset (ETree *tree)
GdkDragContext *
e_tree_drag_begin (ETree *tree,
- int row,
- int col,
+ gint row,
+ gint col,
GtkTargetList *targets,
GdkDragAction actions,
gint button,
@@ -2582,8 +2582,8 @@ e_tree_drag_begin (ETree *tree,
**/
void
e_tree_get_cell_at (ETree *tree,
- int x, int y,
- int *row_return, int *col_return)
+ gint x, gint y,
+ gint *row_return, gint *col_return)
{
g_return_if_fail (tree != NULL);
g_return_if_fail (E_IS_TREE (tree));
@@ -2617,9 +2617,9 @@ e_tree_get_cell_at (ETree *tree,
**/
void
e_tree_get_cell_geometry (ETree *tree,
- int row, int col,
- int *x_return, int *y_return,
- int *width_return, int *height_return)
+ gint row, gint col,
+ gint *x_return, gint *y_return,
+ gint *width_return, gint *height_return)
{
g_return_if_fail (tree != NULL);
g_return_if_fail (E_IS_TREE (tree));
@@ -2703,7 +2703,7 @@ do_drag_motion(ETree *et,
guint time)
{
gboolean ret_val = FALSE;
- int row, col;
+ gint row, col;
ETreePath path;
e_tree_get_cell_at (et,
@@ -2744,7 +2744,7 @@ static gboolean
scroll_timeout (gpointer data)
{
ETree *et = data;
- int dx = 0, dy = 0;
+ gint dx = 0, dy = 0;
GtkAdjustment *v, *h;
double vvalue, hvalue;
@@ -2803,9 +2803,9 @@ static gboolean
hover_timeout (gpointer data)
{
ETree *et = data;
- int x = et->priv->hover_x;
- int y = et->priv->hover_y;
- int row, col;
+ gint x = et->priv->hover_x;
+ gint y = et->priv->hover_y;
+ gint row, col;
ETreePath path;
e_tree_get_cell_at (et,
@@ -2827,7 +2827,7 @@ hover_timeout (gpointer data)
}
static void
-hover_on (ETree *et, int x, int y)
+hover_on (ETree *et, gint x, gint y)
{
et->priv->hover_x = x;
et->priv->hover_y = y;
@@ -2856,7 +2856,7 @@ collapse_drag (ETree *et, ETreePath drop)
}
for (list = et->priv->expanded_list; list; list = list->next) {
- char *save_id = list->data;
+ gchar *save_id = list->data;
ETreePath path;
path = e_tree_model_get_node_by_id (et->priv->model, save_id);
@@ -2938,7 +2938,7 @@ et_drag_motion(GtkWidget *widget,
guint time,
ETree *et)
{
- int ret_val;
+ gint ret_val;
guint direction = 0;
et->priv->last_drop_x = x;
@@ -2988,7 +2988,7 @@ et_drag_drop(GtkWidget *widget,
ETree *et)
{
gboolean ret_val = FALSE;
- int row, col;
+ gint row, col;
ETreePath path;
e_tree_get_cell_at(et,
x,
@@ -3051,7 +3051,7 @@ et_drag_data_received(GtkWidget *widget,
guint time,
ETree *et)
{
- int row, col;
+ gint row, col;
ETreePath path;
e_tree_get_cell_at(et,
x,
@@ -3420,7 +3420,7 @@ 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 char *info_message)
+e_tree_set_info_message (ETree *tree, const gchar *info_message)
{
g_return_if_fail (tree != NULL);
g_return_if_fail (tree->priv != NULL);
diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h
index 426cf9c44d..6bcc21706e 100644
--- a/widgets/table/e-tree.h
+++ b/widgets/table/e-tree.h
@@ -60,14 +60,14 @@ typedef struct {
typedef struct {
GtkTableClass parent_class;
- void (*cursor_change) (ETree *et, int row, ETreePath path);
- void (*cursor_activated) (ETree *et, int row, ETreePath path);
+ void (*cursor_change) (ETree *et, gint row, ETreePath path);
+ void (*cursor_activated) (ETree *et, gint row, ETreePath path);
void (*selection_change) (ETree *et);
- void (*double_click) (ETree *et, int row, ETreePath path, int col, GdkEvent *event);
- gint (*right_click) (ETree *et, int row, ETreePath path, int col, GdkEvent *event);
- gint (*click) (ETree *et, int row, ETreePath path, int col, GdkEvent *event);
- gint (*key_press) (ETree *et, int row, ETreePath path, int col, GdkEvent *event);
- gint (*start_drag) (ETree *et, int row, ETreePath path, int col, GdkEvent *event);
+ void (*double_click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event);
+ gint (*right_click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event);
+ gint (*click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event);
+ gint (*key_press) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event);
+ gint (*start_drag) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event);
gint (*state_change) (ETree *et);
gint (*white_space_event) (ETree *et, GdkEvent *event);
@@ -77,56 +77,56 @@ typedef struct {
/* Source side drag signals */
void (* tree_drag_begin) (ETree *tree,
- int row,
+ gint row,
ETreePath path,
- int col,
+ gint col,
GdkDragContext *context);
void (* tree_drag_end) (ETree *tree,
- int row,
+ gint row,
ETreePath path,
- int col,
+ gint col,
GdkDragContext *context);
void (* tree_drag_data_get) (ETree *tree,
- int row,
+ gint row,
ETreePath path,
- int col,
+ gint col,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
guint time);
void (* tree_drag_data_delete) (ETree *tree,
- int row,
+ gint row,
ETreePath path,
- int col,
+ gint col,
GdkDragContext *context);
/* Target side drag signals */
void (* tree_drag_leave) (ETree *tree,
- int row,
+ gint row,
ETreePath path,
- int col,
+ gint col,
GdkDragContext *context,
guint time);
gboolean (* tree_drag_motion) (ETree *tree,
- int row,
+ gint row,
ETreePath path,
- int col,
+ gint col,
GdkDragContext *context,
gint x,
gint y,
guint time);
gboolean (* tree_drag_drop) (ETree *tree,
- int row,
+ gint row,
ETreePath path,
- int col,
+ gint col,
GdkDragContext *context,
gint x,
gint y,
guint time);
void (* tree_drag_data_received) (ETree *tree,
- int row,
+ gint row,
ETreePath path,
- int col,
+ gint col,
GdkDragContext *context,
gint x,
gint y,
@@ -139,23 +139,23 @@ GType e_tree_get_type (void);
gboolean e_tree_construct (ETree *e_tree,
ETreeModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state);
+ const gchar *spec,
+ const gchar *state);
GtkWidget *e_tree_new (ETreeModel *etm,
ETableExtras *ete,
- const char *spec,
- const char *state);
+ const gchar *spec,
+ const gchar *state);
/* Create an ETree using files. */
gboolean e_tree_construct_from_spec_file (ETree *e_tree,
ETreeModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn);
+ const gchar *spec_fn,
+ const gchar *state_fn);
GtkWidget *e_tree_new_from_spec_file (ETreeModel *etm,
ETableExtras *ete,
- const char *spec_fn,
- const char *state_fn);
+ const gchar *spec_fn,
+ const gchar *state_fn);
/* To save the state */
gchar *e_tree_get_state (ETree *e_tree);
@@ -200,17 +200,17 @@ gint e_tree_model_to_view_row (ETree *e_tree,
gint e_tree_view_to_model_row (ETree *e_tree,
gint view_row);
void e_tree_get_cell_at (ETree *tree,
- int x,
- int y,
- int *row_return,
- int *col_return);
+ gint x,
+ gint y,
+ gint *row_return,
+ gint *col_return);
void e_tree_get_cell_geometry (ETree *tree,
- int row,
- int col,
- int *x_return,
- int *y_return,
- int *width_return,
- int *height_return);
+ gint row,
+ gint col,
+ gint *x_return,
+ gint *y_return,
+ gint *width_return,
+ gint *height_return);
/* Useful accessors */
ETreeModel * e_tree_get_model (ETree *et);
@@ -220,14 +220,14 @@ ETreeTableAdapter *e_tree_get_table_adapter (ETree *et);
/* Drag & drop stuff. */
/* Target */
void e_tree_drag_get_data (ETree *tree,
- int row,
- int col,
+ gint row,
+ gint col,
GdkDragContext *context,
GdkAtom target,
guint32 time);
void e_tree_drag_highlight (ETree *tree,
- int row,
- int col); /* col == -1 to highlight entire row. */
+ gint row,
+ gint col); /* col == -1 to highlight entire row. */
void e_tree_drag_unhighlight (ETree *tree);
void e_tree_drag_dest_set (ETree *tree,
GtkDestDefaults flags,
@@ -256,8 +256,8 @@ void e_tree_drag_source_unset (ETree *tree);
* as a GtkTargetList
*/
GdkDragContext *e_tree_drag_begin (ETree *tree,
- int row,
- int col,
+ gint row,
+ gint col,
GtkTargetList *targets,
GdkDragAction actions,
gint button,
@@ -275,23 +275,23 @@ void e_tree_node_set_expanded_recurse (ETree *et,
void e_tree_root_node_set_visible (ETree *et,
gboolean visible);
ETreePath e_tree_node_at_row (ETree *et,
- int row);
-int e_tree_row_of_node (ETree *et,
+ gint row);
+gint e_tree_row_of_node (ETree *et,
ETreePath path);
gboolean e_tree_root_node_is_visible (ETree *et);
void e_tree_show_node (ETree *et,
ETreePath path);
void e_tree_save_expanded_state (ETree *et,
- char *filename);
+ gchar *filename);
void e_tree_load_expanded_state (ETree *et,
- char *filename);
+ gchar *filename);
xmlDoc *e_tree_save_expanded_state_xml (ETree *et);
void e_tree_load_expanded_state_xml (ETree *et, xmlDoc *doc);
-int e_tree_row_count (ETree *et);
+gint e_tree_row_count (ETree *et);
GtkWidget *e_tree_get_tooltip (ETree *et);
-void e_tree_force_expanded_state (ETree *et, int state);
+void e_tree_force_expanded_state (ETree *et, gint state);
typedef enum {
E_TREE_FIND_NEXT_BACKWARD = 0,
@@ -311,7 +311,7 @@ ETableItem * e_tree_get_item(ETree * et);
GnomeCanvasItem * e_tree_get_header_item(ETree * et);
-void e_tree_set_info_message (ETree *tree, const char *info_message);
+void e_tree_set_info_message (ETree *tree, const gchar *info_message);
G_END_DECLS