aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-example-1.c
diff options
context:
space:
mode:
authorMichael Meeks <mmeeks@src.gnome.org>2000-03-28 05:28:57 +0800
committerMichael Meeks <mmeeks@src.gnome.org>2000-03-28 05:28:57 +0800
commite3219d0bb2d2b1baac480b95b57bfeacf8afa777 (patch)
tree47e9a95538584675b1418ee143dbc5a3ecb9f75b /widgets/table/e-table-example-1.c
parentf4f97585105ad09ea539905f6b430e55d5a7cfbb (diff)
downloadgsoc2013-evolution-e3219d0bb2d2b1baac480b95b57bfeacf8afa777.tar
gsoc2013-evolution-e3219d0bb2d2b1baac480b95b57bfeacf8afa777.tar.gz
gsoc2013-evolution-e3219d0bb2d2b1baac480b95b57bfeacf8afa777.tar.bz2
gsoc2013-evolution-e3219d0bb2d2b1baac480b95b57bfeacf8afa777.tar.lz
gsoc2013-evolution-e3219d0bb2d2b1baac480b95b57bfeacf8afa777.tar.xz
gsoc2013-evolution-e3219d0bb2d2b1baac480b95b57bfeacf8afa777.tar.zst
gsoc2013-evolution-e3219d0bb2d2b1baac480b95b57bfeacf8afa777.zip
Fix nasty rendering bugs,
Implement bbox calcs for e-tabel-item Clean style lots svn path=/trunk/; revision=2194
Diffstat (limited to 'widgets/table/e-table-example-1.c')
-rw-r--r--widgets/table/e-table-example-1.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/widgets/table/e-table-example-1.c b/widgets/table/e-table-example-1.c
index 413fde3aba..c1abc70c93 100644
--- a/widgets/table/e-table-example-1.c
+++ b/widgets/table/e-table-example-1.c
@@ -77,7 +77,7 @@ The headers will be hard coded, as will be the example data.
<grouping> <leaf column=\"1\" ascending=\"1\"/> </grouping> \
</ETableSpecification>"
-char *headers[COLS] = {
+char *headers [COLS] = {
"Email",
"Full Name",
"Address",
@@ -91,7 +91,7 @@ char *headers[COLS] = {
3 Phone
*/
-char *table_data[ROWS][COLS];
+char *table_data [ROWS] [COLS];
/*
* ETableSimple callbacks
@@ -119,15 +119,15 @@ my_row_count (ETableModel *etc, void *data)
static void *
my_value_at (ETableModel *etc, int col, int row, void *data)
{
- return (void *) table_data [row][col];
+ return (void *) 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)
{
- g_free (table_data [row][col]);
- table_data [row][col] = g_strdup (val);
+ g_free (table_data [row] [col]);
+ table_data [row] [col] = g_strdup (val);
}
/* This function returns whether a particular cell is editable. */
@@ -141,14 +141,14 @@ my_is_cell_editable (ETableModel *etc, int col, int row, void *data)
static void *
my_duplicate_value (ETableModel *etc, int col, const void *value, void *data)
{
- return g_strdup(value);
+ 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)
{
- g_free(value);
+ g_free (value);
}
/* This function is for when the model is unfrozen. This can mostly
@@ -160,7 +160,7 @@ my_thaw (ETableModel *etc, void *data)
/* We create a window containing our new table. */
static void
-create_table()
+create_table (void)
{
GtkWidget *e_table, *window, *frame;
ECell *cell_left_just;
@@ -170,9 +170,8 @@ create_table()
/* First we fill in the simple data. */
for ( i = 0; i < ROWS; i++ ) {
- for ( j = 0; j < COLS; j++ ) {
- table_data[i][j] = g_strdup("");
- }
+ for ( j = 0; j < COLS; j++ )
+ table_data [i] [j] = g_strdup ("");
}
/* Next we create our model. This uses the functions we defined
earlier. */
@@ -201,7 +200,7 @@ create_table()
/* Next we create a column object for each view column and add
them to the header. We don't create a column object for
the importance column since it will not be shown. */
- for (i = 0; i < COLS; i++){
+ for (i = 0; i < COLS; i++) {
/* Create the column. */
ETableCol *ecol = e_table_col_new (
i, headers [i],