aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-04 11:47:27 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-01-05 09:22:21 +0800
commit5c80f1534b435ff5c1c9cc88eb9f5c5c1124f82a (patch)
tree92b05ad7116690bf2da53a0fa6ba813fcbea50c7 /widgets/table
parent69945127d8a7933512bb14eb20ff85354704b5cc (diff)
downloadgsoc2013-evolution-5c80f1534b435ff5c1c9cc88eb9f5c5c1124f82a.tar
gsoc2013-evolution-5c80f1534b435ff5c1c9cc88eb9f5c5c1124f82a.tar.gz
gsoc2013-evolution-5c80f1534b435ff5c1c9cc88eb9f5c5c1124f82a.tar.bz2
gsoc2013-evolution-5c80f1534b435ff5c1c9cc88eb9f5c5c1124f82a.tar.lz
gsoc2013-evolution-5c80f1534b435ff5c1c9cc88eb9f5c5c1124f82a.tar.xz
gsoc2013-evolution-5c80f1534b435ff5c1c9cc88eb9f5c5c1124f82a.tar.zst
gsoc2013-evolution-5c80f1534b435ff5c1c9cc88eb9f5c5c1124f82a.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-cell-popup.c27
-rw-r--r--widgets/table/e-table-click-to-add.c16
-rw-r--r--widgets/table/e-table-extras.c30
3 files changed, 52 insertions, 21 deletions
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index 45c6d07377..c4ca572a85 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -212,14 +212,16 @@ ecp_kill_view (ECellView *ecv)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
- if (ecp_view->cell_view.kill_view_cb)
- (ecp_view->cell_view.kill_view_cb)(ecv, ecp_view->cell_view.kill_view_cb_data);
+ if (ecp_view->cell_view.kill_view_cb)
+ ecp_view->cell_view.kill_view_cb (
+ ecv, ecp_view->cell_view.kill_view_cb_data);
- if (ecp_view->cell_view.kill_view_cb_data)
- g_list_free(ecp_view->cell_view.kill_view_cb_data);
+ if (ecp_view->cell_view.kill_view_cb_data)
+ g_list_free (ecp_view->cell_view.kill_view_cb_data);
if (ecp_view->child_view)
e_cell_kill_view (ecp_view->child_view);
+
g_free (ecp_view);
}
@@ -261,14 +263,18 @@ ecp_draw (ECellView *ecv, GdkDrawable *drawable,
{
ECellPopup *ecp = E_CELL_POPUP (ecv->ecell);
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
- GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (ecv->e_table_item_view)->canvas);
+ GtkWidget *canvas;
GtkShadowType shadow;
GdkRectangle rect;
gboolean show_popup_arrow;
+ canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (ecv->e_table_item_view)->canvas);
+
/* Display the popup arrow if we are the cursor cell, or the popup
is shown for this cell. */
- show_popup_arrow = e_table_model_is_cell_editable (ecv->e_table_model, model_col, row) &&
+ show_popup_arrow =
+ e_table_model_is_cell_editable (
+ ecv->e_table_model, model_col, row) &&
(flags & E_CELL_CURSOR ||
(ecp->popup_shown && ecp->popup_view_col == view_col
&& ecp->popup_row == row
@@ -486,10 +492,13 @@ e_cell_popup_do_popup (ECellPopupView *ecp_view,
void
e_cell_popup_queue_cell_redraw (ECellPopup *ecp)
{
- ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
+ ETableItem *eti;
+
+ eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
- e_table_item_redraw_range (eti, ecp->popup_view_col, ecp->popup_row,
- ecp->popup_view_col, ecp->popup_row);
+ e_table_item_redraw_range (
+ eti, ecp->popup_view_col, ecp->popup_row,
+ ecp->popup_view_col, ecp->popup_row);
}
void
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 7cceadcec8..c71e10bde4 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -187,7 +187,10 @@ etcta_dispose (GObject *object)
}
static void
-etcta_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+etcta_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GnomeCanvasItem *item;
ETableClickToAdd *etcta;
@@ -311,7 +314,11 @@ etcta_unrealize (GnomeCanvasItem *item)
static void finish_editing (ETableClickToAdd *etcta);
static gint
-item_key_press (ETableItem *item, gint row, gint 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:
@@ -368,9 +375,8 @@ finish_editing (ETableClickToAdd *etcta)
}
}
-/*
- * Handles the events on the ETableClickToAdd, particularly it creates the ETableItem and passes in some events.
- */
+/* Handles the events on the ETableClickToAdd, particularly
+ * it creates the ETableItem and passes in some events. */
static gint
etcta_event (GnomeCanvasItem *item, GdkEvent *e)
{
diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c
index 9d9b7ee65c..a02ac45e42 100644
--- a/widgets/table/e-table-extras.c
+++ b/widgets/table/e-table-extras.c
@@ -163,6 +163,8 @@ safe_unref (gpointer object)
static void
ete_init (ETableExtras *extras)
{
+ ECell *cell;
+
extras->priv = E_TABLE_EXTRAS_GET_PRIVATE (extras);
extras->priv->cells = g_hash_table_new_full (
@@ -193,13 +195,27 @@ ete_init (ETableExtras *extras)
e_table_extras_add_search(extras, "string", e_string_search);
- e_table_extras_add_cell(extras, "checkbox", e_cell_checkbox_new());
- e_table_extras_add_cell(extras, "date", e_cell_date_new (NULL, GTK_JUSTIFY_LEFT));
- e_table_extras_add_cell(extras, "number", e_cell_number_new (NULL, GTK_JUSTIFY_RIGHT));
- e_table_extras_add_cell(extras, "pixbuf", e_cell_pixbuf_new ());
- e_table_extras_add_cell(extras, "size", e_cell_size_new (NULL, GTK_JUSTIFY_RIGHT));
- e_table_extras_add_cell(extras, "string", e_cell_text_new (NULL, GTK_JUSTIFY_LEFT));
- e_table_extras_add_cell(extras, "tree-string", e_cell_tree_new (NULL, NULL, TRUE, e_cell_text_new (NULL, GTK_JUSTIFY_LEFT)));
+ cell = e_cell_checkbox_new ();
+ e_table_extras_add_cell(extras, "checkbox", cell);
+
+ cell = e_cell_date_new (NULL, GTK_JUSTIFY_LEFT);
+ e_table_extras_add_cell(extras, "date", cell);
+
+ cell = e_cell_number_new (NULL, GTK_JUSTIFY_RIGHT);
+ e_table_extras_add_cell(extras, "number", cell);
+
+ cell = e_cell_pixbuf_new ();
+ e_table_extras_add_cell(extras, "pixbuf", cell);
+
+ cell = e_cell_size_new (NULL, GTK_JUSTIFY_RIGHT);
+ e_table_extras_add_cell(extras, "size", cell);
+
+ cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
+ e_table_extras_add_cell(extras, "string", cell);
+
+ cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
+ cell = e_cell_tree_new (NULL, NULL, TRUE, cell);
+ e_table_extras_add_cell(extras, "tree-string", cell);
}
ETableExtras *