aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-11 23:50:51 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-12 02:14:04 +0800
commitebcce86769d174cce6e881740c5e9bcedce28e06 (patch)
treeb2cc2d18ceb0c3bd3e78f5b768c1b6926b69bb4a /widgets/misc
parent1e3deb31476cf0026011876327be83e9a47847ee (diff)
downloadgsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.gz
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.zst
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.zip
Coding style and whitespace cleanups.
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-buffer-tagger.c22
-rw-r--r--widgets/misc/e-calendar-item.c8
-rw-r--r--widgets/misc/e-canvas-background.c8
-rw-r--r--widgets/misc/e-canvas.c2
-rw-r--r--widgets/misc/e-dateedit.c2
-rw-r--r--widgets/misc/e-popup-menu.c2
-rw-r--r--widgets/misc/e-printable.c22
-rw-r--r--widgets/misc/ea-calendar-item.c19
-rw-r--r--widgets/misc/ea-cell-table.c16
9 files changed, 51 insertions, 50 deletions
diff --git a/widgets/misc/e-buffer-tagger.c b/widgets/misc/e-buffer-tagger.c
index b3d5a4e61e..217ffdb05b 100644
--- a/widgets/misc/e-buffer-tagger.c
+++ b/widgets/misc/e-buffer-tagger.c
@@ -51,7 +51,7 @@ struct _MagicInsertMatch
typedef struct _MagicInsertMatch MagicInsertMatch;
-static MagicInsertMatch mim [] = {
+static MagicInsertMatch mim[] = {
/* prefixed expressions */
{ "(news|telnet|nntp|file|http|ftp|sftp|https|webcal)://([-a-z0-9]+(:[-a-z0-9]+)?@)?[-a-z0-9.]+[-a-z0-9](:[0-9]*)?(([.])?/[-a-z0-9_$.+!*(),;:@%&=?/~#']*[^]'.}>\\) ,?!;:\"]?)?", NULL, NULL },
{ "(sip|h323|callto):([-_a-z0-9.'\\+]+(:[0-9]{1,5})?(/[-_a-z0-9.']+)?)(@([-_a-z0-9.%=?]+|([0-9]{1,3}.){3}[0-9]{1,3})?)?(:[0-9]{1,5})?", NULL, NULL },
@@ -72,11 +72,11 @@ init_magic_links (void)
return;
for (i = 0; i < G_N_ELEMENTS (mim); i++) {
- mim [i].preg = g_new0 (regex_t, 1);
- if (regcomp (mim [i].preg, mim [i].regex, REG_EXTENDED | REG_ICASE)) {
+ mim[i].preg = g_new0 (regex_t, 1);
+ if (regcomp (mim[i].preg, mim[i].regex, REG_EXTENDED | REG_ICASE)) {
/* error */
- g_free (mim [i].preg);
- mim [i].preg = 0;
+ g_free (mim[i].preg);
+ mim[i].preg = 0;
}
}
}
@@ -87,7 +87,7 @@ markup_text (GtkTextBuffer *buffer)
GtkTextIter start, end;
gchar *text;
gint i;
- regmatch_t pmatch [2];
+ regmatch_t pmatch[2];
gboolean any;
const gchar *str;
gint offset = 0;
@@ -104,14 +104,14 @@ markup_text (GtkTextBuffer *buffer)
while (any) {
any = FALSE;
for (i = 0; i < G_N_ELEMENTS (mim); i++) {
- if (mim [i].preg && !regexec (mim [i].preg, str, 2, pmatch, 0)) {
- gtk_text_buffer_get_iter_at_offset (buffer, &start, offset + pmatch [0].rm_so);
- gtk_text_buffer_get_iter_at_offset (buffer, &end, offset + pmatch [0].rm_eo);
+ if (mim[i].preg && !regexec (mim[i].preg, str, 2, pmatch, 0)) {
+ gtk_text_buffer_get_iter_at_offset (buffer, &start, offset + pmatch[0].rm_so);
+ gtk_text_buffer_get_iter_at_offset (buffer, &end, offset + pmatch[0].rm_eo);
gtk_text_buffer_apply_tag_by_name (buffer, E_BUFFER_TAGGER_LINK_TAG, &start, &end);
any = TRUE;
- str += pmatch [0].rm_eo;
- offset += pmatch [0].rm_eo;
+ str += pmatch[0].rm_eo;
+ offset += pmatch[0].rm_eo;
break;
}
}
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index d346117a8b..f362046ee3 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -1326,7 +1326,7 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
for (day = 0; day < 7; day++) {
layout_set_day_text (calitem, layout, day_index);
gdk_draw_layout (drawable, fg_gc,
- text_x - calitem->day_widths [day_index],
+ text_x - calitem->day_widths[day_index],
text_y,
layout);
text_x += (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
@@ -1368,11 +1368,11 @@ get_digit_fomat ()
gint minor = 0;
gint revision = 0;
- major = atoi (split [0]);
- minor = atoi (split [1]);
+ major = atoi (split[0]);
+ minor = atoi (split[1]);
if (g_strv_length (split) > 2)
- revision = atoi (split [2]);
+ revision = atoi (split[2]);
g_strfreev (split);
if (major > 2 || minor > 2 || (minor == 2 && revision > 2)) {
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index 6d4a9de5e4..eba6d32659 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -66,7 +66,7 @@ enum {
LAST_SIGNAL
};
-static guint ecb_signals [LAST_SIGNAL] = { 0, };
+static guint ecb_signals[LAST_SIGNAL] = { 0, };
enum {
PROP_0,
@@ -93,7 +93,7 @@ get_color (ECanvasBackground *ecb)
static void
ecb_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2)
{
- gdouble i2c [6];
+ gdouble i2c[6];
ArtPoint c1, c2, i1, i2;
ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item);
@@ -380,7 +380,7 @@ ecb_draw (GnomeCanvasItem *item,
{
ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item);
gint x1, x2, y1, y2;
- gdouble i2c [6];
+ gdouble i2c[6];
ArtPoint upper_left, lower_right, ecb_base_point;
/*
@@ -520,7 +520,7 @@ ecb_class_init (ECanvasBackgroundClass *ecb_class)
"Y2",
0.0, G_MAXDOUBLE, 0.0,
G_PARAM_READWRITE));
- ecb_signals [STYLE_SET] =
+ ecb_signals[STYLE_SET] =
g_signal_new ("style_set",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 261d92cf12..11d6c55271 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -727,7 +727,7 @@ idle_handler (gpointer data)
/* Reset idle id */
canvas->idle_id = 0;
- g_signal_emit (canvas, signals [REFLOW], 0);
+ g_signal_emit (canvas, signals[REFLOW], 0);
GDK_THREADS_LEAVE ();
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 77f337e4aa..8c870bb7ad 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -1829,7 +1829,7 @@ on_date_entry_focus_out (GtkEntry *entry,
if (dedit->priv->has_been_changed) {
/* The previous one didn't emit changed signal,
* but we want it even here, thus doing itself. */
- g_signal_emit (dedit, signals [CHANGED], 0);
+ g_signal_emit (dedit, signals[CHANGED], 0);
dedit->priv->has_been_changed = FALSE;
}
} else {
diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c
index bea993e457..7a74edb84a 100644
--- a/widgets/misc/e-popup-menu.c
+++ b/widgets/misc/e-popup-menu.c
@@ -95,7 +95,7 @@ e_popup_menu_create_with_domain (EPopupMenu *menu_list,
separator = !strcmp ("", menu_list[i].name);
- if ((!(separator && last_item_separator)) && !(menu_list [i].disable_mask & hide_mask)) {
+ if ((!(separator && last_item_separator)) && !(menu_list[i].disable_mask & hide_mask)) {
GtkWidget *item = NULL;
if (!separator) {
diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c
index eb10c8c1fe..bc3233a38a 100644
--- a/widgets/misc/e-printable.c
+++ b/widgets/misc/e-printable.c
@@ -44,14 +44,14 @@ enum {
LAST_SIGNAL
};
-static guint e_printable_signals [LAST_SIGNAL] = { 0, };
+static guint e_printable_signals[LAST_SIGNAL] = { 0, };
static void
e_printable_class_init (EPrintableClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- e_printable_signals [PRINT_PAGE] =
+ e_printable_signals[PRINT_PAGE] =
g_signal_new ("print_page",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -61,7 +61,7 @@ e_printable_class_init (EPrintableClass *klass)
G_TYPE_NONE, 4, G_TYPE_OBJECT, G_TYPE_DOUBLE,
G_TYPE_DOUBLE, G_TYPE_BOOLEAN);
- e_printable_signals [DATA_LEFT] =
+ e_printable_signals[DATA_LEFT] =
g_signal_new ("data_left",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -70,7 +70,7 @@ e_printable_class_init (EPrintableClass *klass)
e_marshal_BOOLEAN__NONE,
G_TYPE_BOOLEAN, 0, G_TYPE_NONE);
- e_printable_signals [RESET] =
+ e_printable_signals[RESET] =
g_signal_new ("reset",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -79,7 +79,7 @@ e_printable_class_init (EPrintableClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0, G_TYPE_NONE);
- e_printable_signals [HEIGHT] =
+ e_printable_signals[HEIGHT] =
g_signal_new ("height",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -89,7 +89,7 @@ e_printable_class_init (EPrintableClass *klass)
G_TYPE_DOUBLE, 4, G_TYPE_OBJECT, G_TYPE_DOUBLE,
G_TYPE_DOUBLE, G_TYPE_BOOLEAN);
- e_printable_signals [WILL_FIT] =
+ e_printable_signals[WILL_FIT] =
g_signal_new ("will_fit",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -129,7 +129,7 @@ e_printable_print_page (EPrintable *e_printable,
g_return_if_fail (E_IS_PRINTABLE (e_printable));
g_signal_emit (e_printable,
- e_printable_signals [PRINT_PAGE], 0,
+ e_printable_signals[PRINT_PAGE], 0,
context,
width,
height,
@@ -145,7 +145,7 @@ e_printable_data_left (EPrintable *e_printable)
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE);
g_signal_emit (e_printable,
- e_printable_signals [DATA_LEFT], 0,
+ e_printable_signals[DATA_LEFT], 0,
&ret_val);
return ret_val;
@@ -158,7 +158,7 @@ e_printable_reset (EPrintable *e_printable)
g_return_if_fail (E_IS_PRINTABLE (e_printable));
g_signal_emit (e_printable,
- e_printable_signals [RESET], 0);
+ e_printable_signals[RESET], 0);
}
gdouble
@@ -174,7 +174,7 @@ e_printable_height (EPrintable *e_printable,
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), -1);
g_signal_emit (e_printable,
- e_printable_signals [HEIGHT], 0,
+ e_printable_signals[HEIGHT], 0,
context,
width,
max_height,
@@ -197,7 +197,7 @@ e_printable_will_fit (EPrintable *e_printable,
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE);
g_signal_emit (e_printable,
- e_printable_signals [WILL_FIT], 0,
+ e_printable_signals[WILL_FIT], 0,
context,
width,
max_height,
diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c
index cde4e78494..97528a5639 100644
--- a/widgets/misc/ea-calendar-item.c
+++ b/widgets/misc/ea-calendar-item.c
@@ -350,18 +350,19 @@ ea_calendar_item_get_description (AtkObject *accessible)
static AtkStateSet*
ea_calendar_item_ref_state_set (AtkObject *accessible)
{
- AtkStateSet *state_set;
- GObject *g_obj;
+ AtkStateSet *state_set;
+ GObject *g_obj;
- state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (accessible);
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible));
- if (!g_obj)
- return state_set;
+ state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (accessible);
+ g_obj = atk_gobject_accessible_get_object (
+ ATK_GOBJECT_ACCESSIBLE (accessible));
+ if (!g_obj)
+ return state_set;
- atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
- atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
+ atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
+ atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
- return state_set;
+ return state_set;
}
static gint
diff --git a/widgets/misc/ea-cell-table.c b/widgets/misc/ea-cell-table.c
index be859943fd..b183ef9671 100644
--- a/widgets/misc/ea-cell-table.c
+++ b/widgets/misc/ea-cell-table.c
@@ -38,15 +38,15 @@ ea_cell_table_create (gint rows, gint columns, gboolean column_first)
cell_data->column_labels = g_new0 (gchar *, columns);
for (index = columns -1; index >= 0; --index)
- cell_data->column_labels [index] = NULL;
+ cell_data->column_labels[index] = NULL;
cell_data->row_labels = g_new0 (gchar *, rows);
for (index = rows -1; index >= 0; --index)
- cell_data->row_labels [index] = NULL;
+ cell_data->row_labels[index] = NULL;
cell_data->cells = g_new0 (gpointer, (columns * rows));
for (index = (columns * rows) -1; index >= 0; --index)
- cell_data->cells [index] = NULL;
+ cell_data->cells[index] = NULL;
return cell_data;
}
@@ -57,13 +57,13 @@ ea_cell_table_destroy (EaCellTable * cell_data)
g_return_if_fail (cell_data);
for (index = 0; index < cell_data->columns; ++index)
- if (cell_data->column_labels [index])
- g_free (cell_data->column_labels [index]);
+ if (cell_data->column_labels[index])
+ g_free (cell_data->column_labels[index]);
g_free (cell_data->column_labels);
for (index = 0; index < cell_data->rows; ++index)
- if (cell_data->row_labels [index])
- g_free (cell_data->row_labels [index]);
+ if (cell_data->row_labels[index])
+ g_free (cell_data->row_labels[index]);
g_free (cell_data->row_labels);
for (index = (cell_data->columns * cell_data->rows) -1;
@@ -119,7 +119,7 @@ ea_cell_table_get_cell_at_index (EaCellTable * cell_data,
g_return_val_if_fail (cell_data, NULL);
if (index >=0 && index < (cell_data->columns * cell_data->rows))
- return cell_data->cells [index];
+ return cell_data->cells[index];
return NULL;
}