aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-06-20 18:56:06 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-20 20:06:19 +0800
commit5d0878967ee21a039ef599222b1cf3eb606354d4 (patch)
tree790cfcbf63fea7292740f182dd612ab20244f6e8 /widgets
parentf5f2132d60cdd1884c6343f759aadfd38a159e04 (diff)
downloadgsoc2013-evolution-5d0878967ee21a039ef599222b1cf3eb606354d4.tar
gsoc2013-evolution-5d0878967ee21a039ef599222b1cf3eb606354d4.tar.gz
gsoc2013-evolution-5d0878967ee21a039ef599222b1cf3eb606354d4.tar.bz2
gsoc2013-evolution-5d0878967ee21a039ef599222b1cf3eb606354d4.tar.lz
gsoc2013-evolution-5d0878967ee21a039ef599222b1cf3eb606354d4.tar.xz
gsoc2013-evolution-5d0878967ee21a039ef599222b1cf3eb606354d4.tar.zst
gsoc2013-evolution-5d0878967ee21a039ef599222b1cf3eb606354d4.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-table-group-leaf.c45
-rw-r--r--widgets/table/gal-a11y-e-table-factory.c1
-rw-r--r--widgets/table/gal-a11y-e-tree-factory.c1
-rw-r--r--widgets/text/e-text-model.c37
-rw-r--r--widgets/text/gal-a11y-e-text-factory.c1
-rw-r--r--widgets/text/gal-a11y-e-text.c43
6 files changed, 84 insertions, 44 deletions
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c
index 0b0c0f4a59..7d0f079cb6 100644
--- a/widgets/table/e-table-group-leaf.c
+++ b/widgets/table/e-table-group-leaf.c
@@ -187,13 +187,17 @@ etgl_double_click (GtkObject *object, gint model_row, gint model_col, GdkEvent *
}
static gboolean
-etgl_key_press (GtkObject *object, gint row, gint col, GdkEvent *event, ETableGroupLeaf *etgl)
+etgl_key_press (GtkObject *object,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETableGroupLeaf *etgl)
{
if (row < E_TABLE_SUBSET(etgl->ets)->n_map && row >= 0)
- return e_table_group_key_press (E_TABLE_GROUP(etgl),
- E_TABLE_SUBSET(etgl->ets)->map_table[row],
- col,
- event);
+ return e_table_group_key_press (
+ E_TABLE_GROUP(etgl),
+ E_TABLE_SUBSET(etgl->ets)->map_table[row],
+ col, event);
else
return FALSE;
}
@@ -219,7 +223,11 @@ etgl_right_click (GtkObject *object, gint view_row, gint model_col, GdkEvent *ev
}
static gboolean
-etgl_click (GtkObject *object, gint row, gint col, GdkEvent *event, ETableGroupLeaf *etgl)
+etgl_click (GtkObject *object,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ ETableGroupLeaf *etgl)
{
if (row < E_TABLE_SUBSET(etgl->ets)->n_map)
return e_table_group_click (E_TABLE_GROUP(etgl),
@@ -349,7 +357,9 @@ etgl_increment (ETableGroup *etg, gint position, gint amount)
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
if (E_IS_TABLE_SUBSET_VARIABLE(etgl->ets)) {
- e_table_subset_variable_increment (E_TABLE_SUBSET_VARIABLE(etgl->ets), position, amount);
+ e_table_subset_variable_increment (
+ E_TABLE_SUBSET_VARIABLE (etgl->ets),
+ position, amount);
}
}
@@ -359,7 +369,9 @@ etgl_decrement (ETableGroup *etg, gint position, gint amount)
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
if (E_IS_TABLE_SUBSET_VARIABLE(etgl->ets)) {
- e_table_subset_variable_decrement (E_TABLE_SUBSET_VARIABLE(etgl->ets), position, amount);
+ e_table_subset_variable_decrement (
+ E_TABLE_SUBSET_VARIABLE (etgl->ets),
+ position, amount);
}
}
@@ -377,7 +389,9 @@ etgl_set_focus (ETableGroup *etg, EFocus direction, gint view_col)
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
if (direction == E_FOCUS_END) {
- e_table_item_set_cursor (etgl->item, view_col, e_table_model_row_count(E_TABLE_MODEL(etgl->ets)) - 1);
+ e_table_item_set_cursor (
+ etgl->item, view_col,
+ e_table_model_row_count (E_TABLE_MODEL(etgl->ets)) - 1);
} else {
e_table_item_set_cursor (etgl->item, view_col, 0);
}
@@ -421,7 +435,13 @@ etgl_get_mouse_over (ETableGroup *etg, gint *row, gint *col)
}
static void
-etgl_get_cell_geometry (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y, gint *width, gint *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);
@@ -429,7 +449,10 @@ etgl_get_cell_geometry (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y
}
static void
-etgl_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+etgl_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ETableGroup *etg = E_TABLE_GROUP (object);
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (object);
diff --git a/widgets/table/gal-a11y-e-table-factory.c b/widgets/table/gal-a11y-e-table-factory.c
index f459f3b67c..5e99c13bb9 100644
--- a/widgets/table/gal-a11y-e-table-factory.c
+++ b/widgets/table/gal-a11y-e-table-factory.c
@@ -26,7 +26,6 @@
#include "gal-a11y-e-table.h"
#include "gal-a11y-e-table-factory.h"
-#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETableFactoryClass))
static AtkObjectFactoryClass *parent_class;
#define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
diff --git a/widgets/table/gal-a11y-e-tree-factory.c b/widgets/table/gal-a11y-e-tree-factory.c
index 8dc06e2936..e3cf441974 100644
--- a/widgets/table/gal-a11y-e-tree-factory.c
+++ b/widgets/table/gal-a11y-e-tree-factory.c
@@ -25,7 +25,6 @@
#include "gal-a11y-e-tree.h"
#include "gal-a11y-e-tree-factory.h"
-#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETreeFactoryClass))
static AtkObjectFactoryClass *parent_class;
#define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c
index e4ab873d9d..5f3b88d366 100644
--- a/widgets/text/e-text-model.c
+++ b/widgets/text/e-text-model.c
@@ -48,15 +48,26 @@ struct _ETextModelPrivate {
GString *text;
};
-static void e_text_model_dispose (GObject *object);
+static void e_text_model_dispose (GObject *object);
-static gint e_text_model_real_validate_position (ETextModel *, gint pos);
-static const gchar *e_text_model_real_get_text (ETextModel *model);
-static gint e_text_model_real_get_text_length (ETextModel *model);
-static void e_text_model_real_set_text (ETextModel *model, const gchar *text);
-static void e_text_model_real_insert (ETextModel *model, gint postion, const gchar *text);
-static void e_text_model_real_insert_length (ETextModel *model, gint postion, const gchar *text, gint length);
-static void e_text_model_real_delete (ETextModel *model, gint postion, gint length);
+static gint e_text_model_real_validate_position
+ (ETextModel *, gint pos);
+static const gchar *
+ e_text_model_real_get_text (ETextModel *model);
+static gint e_text_model_real_get_text_length
+ (ETextModel *model);
+static void e_text_model_real_set_text (ETextModel *model,
+ const gchar *text);
+static void e_text_model_real_insert (ETextModel *model,
+ gint postion,
+ const gchar *text);
+static void e_text_model_real_insert_length (ETextModel *model,
+ gint postion,
+ const gchar *text,
+ gint length);
+static void e_text_model_real_delete (ETextModel *model,
+ gint postion,
+ gint length);
G_DEFINE_TYPE (ETextModel, e_text_model, G_TYPE_OBJECT)
@@ -219,7 +230,10 @@ e_text_model_real_insert (ETextModel *model, gint position, const gchar *text)
}
static void
-e_text_model_real_insert_length (ETextModel *model, gint position, const gchar *text, gint length)
+e_text_model_real_insert_length (ETextModel *model,
+ gint position,
+ const gchar *text,
+ gint length)
{
EReposInsertShift repos;
gint model_len = e_text_model_real_get_text_length (model);
@@ -392,7 +406,10 @@ e_text_model_insert (ETextModel *model, gint position, const gchar *text)
}
void
-e_text_model_insert_length (ETextModel *model, gint position, const gchar *text, gint length)
+e_text_model_insert_length (ETextModel *model,
+ gint position,
+ const gchar *text,
+ gint length)
{
g_return_if_fail (model != NULL);
g_return_if_fail (E_IS_TEXT_MODEL (model));
diff --git a/widgets/text/gal-a11y-e-text-factory.c b/widgets/text/gal-a11y-e-text-factory.c
index 2df9241014..d68e2ce549 100644
--- a/widgets/text/gal-a11y-e-text-factory.c
+++ b/widgets/text/gal-a11y-e-text-factory.c
@@ -25,7 +25,6 @@
#include "gal-a11y-e-text-factory.h"
#include "gal-a11y-e-text.h"
-#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETextFactoryClass))
static AtkObjectFactoryClass *parent_class;
#define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
diff --git a/widgets/text/gal-a11y-e-text.c b/widgets/text/gal-a11y-e-text.c
index e368e7d68b..9145ed8b41 100644
--- a/widgets/text/gal-a11y-e-text.c
+++ b/widgets/text/gal-a11y-e-text.c
@@ -33,13 +33,11 @@
#include "gal-a11y-e-text.h"
#include "gal-a11y-e-text-factory.h"
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETextClass))
static GObjectClass *parent_class;
static AtkComponentIface *component_parent_iface;
static GType parent_type;
static gint priv_offset;
static GQuark quark_accessible_object = 0;
-#define GET_PRIVATE(object) ((GalA11yETextPrivate *) (((gchar *) object) + priv_offset))
#define PARENT_TYPE (parent_type)
struct _GalA11yETextPrivate {
@@ -63,7 +61,8 @@ et_get_extents (AtkComponent *component,
gint *height,
AtkCoordType coord_type)
{
- EText *item = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component)));
+ EText *item = E_TEXT (atk_gobject_accessible_get_object (
+ ATK_GOBJECT_ACCESSIBLE (component)));
gdouble real_width;
gdouble real_height;
gint fake_width;
@@ -92,7 +91,8 @@ et_get_extents (AtkComponent *component,
static const gchar *
et_get_full_text (AtkText *text)
{
- EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
+ EText *etext = E_TEXT (atk_gobject_accessible_get_object (
+ ATK_GOBJECT_ACCESSIBLE (text)));
ETextModel *model;
const gchar *full_text;
@@ -107,7 +107,8 @@ static void
et_set_full_text (AtkEditableText *text,
const gchar *full_text)
{
- EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
+ EText *etext = E_TEXT (atk_gobject_accessible_get_object (
+ ATK_GOBJECT_ACCESSIBLE (text)));
ETextModel *model;
g_object_get (etext, "model", &model, NULL);
@@ -655,7 +656,8 @@ et_get_offset_at_point (AtkText *text,
static gint
et_get_n_selections (AtkText *text)
{
- EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
+ EText *etext = E_TEXT (atk_gobject_accessible_get_object (
+ ATK_GOBJECT_ACCESSIBLE (text)));
if (etext->selection_start !=
etext->selection_end)
return 1;
@@ -836,7 +838,9 @@ et_insert_text (AtkEditableText *text,
if (full_text == NULL)
return;
- result = g_strdup_printf ("%.*s%.*s%s", *position, full_text, length, string, full_text + *position);
+ result = g_strdup_printf (
+ "%.*s%.*s%s", *position, full_text,
+ length, string, full_text + *position);
et_set_full_text (text, result);
@@ -1033,21 +1037,18 @@ et_class_init (GalA11yETextClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
AtkObjectClass *atk_class = ATK_OBJECT_CLASS (klass);
- quark_accessible_object = g_quark_from_static_string ("gtk-accessible-object");
- parent_class = g_type_class_ref (PARENT_TYPE);
- component_parent_iface = g_type_interface_peek(parent_class, ATK_TYPE_COMPONENT);
- object_class->dispose = et_dispose;
- atk_class->initialize = et_real_initialize;
+ quark_accessible_object =
+ g_quark_from_static_string ("gtk-accessible-object");
+ parent_class = g_type_class_ref (PARENT_TYPE);
+ component_parent_iface =
+ g_type_interface_peek (parent_class, ATK_TYPE_COMPONENT);
+ object_class->dispose = et_dispose;
+ atk_class->initialize = et_real_initialize;
}
static void
et_init (GalA11yEText *a11y)
{
-#if 0
- GalA11yETextPrivate *priv;
-
- priv = GET_PRIVATE (a11y);
-#endif
}
/**
@@ -1096,11 +1097,13 @@ gal_a11y_e_text_get_type (void)
NULL
};
- factory = atk_registry_get_factory (atk_get_default_registry (), GNOME_TYPE_CANVAS_ITEM);
+ factory = atk_registry_get_factory (
+ atk_get_default_registry (), GNOME_TYPE_CANVAS_ITEM);
parent_type = atk_object_factory_get_accessible_type (factory);
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yEText", &info, 0,
- sizeof (GalA11yETextPrivate), &priv_offset);
+ type = gal_a11y_type_register_static_with_private (
+ PARENT_TYPE, "GalA11yEText", &info, 0,
+ sizeof (GalA11yETextPrivate), &priv_offset);
g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
g_type_add_interface_static (type, ATK_TYPE_TEXT, &atk_text_info);