diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-09-11 23:50:51 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-09-12 02:14:04 +0800 |
commit | ebcce86769d174cce6e881740c5e9bcedce28e06 (patch) | |
tree | b2cc2d18ceb0c3bd3e78f5b768c1b6926b69bb4a /e-util | |
parent | 1e3deb31476cf0026011876327be83e9a47847ee (diff) | |
download | gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.gz gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.bz2 gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.lz gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.xz gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.zst gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.zip |
Coding style and whitespace cleanups.
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-datetime-format.c | 26 | ||||
-rw-r--r-- | e-util/e-event.c | 5 | ||||
-rw-r--r-- | e-util/e-html-utils.c | 2 | ||||
-rw-r--r-- | e-util/e-import.h | 29 | ||||
-rw-r--r-- | e-util/e-logger.c | 4 | ||||
-rw-r--r-- | e-util/e-non-intrusive-error-dialog.h | 2 | ||||
-rw-r--r-- | e-util/e-signature-list.c | 2 | ||||
-rw-r--r-- | e-util/gtk-compat.h | 3 |
8 files changed, 43 insertions, 30 deletions
diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c index c41fc08c41..a277e93fdb 100644 --- a/e-util/e-datetime-format.c +++ b/e-util/e-datetime-format.c @@ -85,10 +85,10 @@ ensure_loaded (void) keys = g_key_file_get_keys (keyfile, KEYS_GROUPNAME, NULL, NULL); if (keys) { - for (i = 0; keys [i]; i++) { - str = g_key_file_get_string (keyfile, KEYS_GROUPNAME, keys [i], NULL); + for (i = 0; keys[i]; i++) { + str = g_key_file_get_string (keyfile, KEYS_GROUPNAME, keys[i], NULL); if (str) - g_hash_table_insert (key2fmt, g_strdup (keys [i]), str); + g_hash_table_insert (key2fmt, g_strdup (keys[i]), str); } g_strfreev (keys); @@ -240,11 +240,11 @@ format_internal (const gchar *key, DTFormatKind kind, time_t tvalue, struct tm * } fmt = get_format_internal (key, kind); - for (i = 0; fmt [i]; i++) { - if (fmt [i] == '%') { - if (fmt [i + 1] == '%') { + for (i = 0; fmt[i]; i++) { + if (fmt[i] == '%') { + if (fmt[i + 1] == '%') { i++; - } else if (fmt [i + 1] == 'a' && fmt [i + 2] == 'd' && (fmt [i + 3] == 0 || !g_ascii_isalpha (fmt [i + 3]))) { + } else if (fmt[i + 1] == 'a' && fmt[i + 2] == 'd' && (fmt[i + 3] == 0 || !g_ascii_isalpha (fmt[i + 3]))) { gchar *ad; /* "%ad" for abbreviated date */ @@ -262,7 +262,7 @@ format_internal (const gchar *key, DTFormatKind kind, time_t tvalue, struct tm * ad = format_relative_date (tvalue, ttoday, &value, &today); if (ad) g_string_append (use_fmt, ad); - else if (g_ascii_isspace (fmt [i + 3])) + else if (g_ascii_isspace (fmt[i + 3])) i++; g_free (ad); @@ -285,7 +285,7 @@ format_internal (const gchar *key, DTFormatKind kind, time_t tvalue, struct tm * static void fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind) { - const gchar *date_items [] = { + const gchar *date_items[] = { N_ ("Use locale default"), "%m/%d/%y", /* American style */ "%m/%d/%Y", /* American style, full year */ @@ -295,7 +295,7 @@ fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind) NULL }; - const gchar *time_items [] = { + const gchar *time_items[] = { N_ ("Use locale default"), "%I:%M:%S %p", /* 12hours style */ "%I:%M %p", /* 12hours style, without seconds */ @@ -304,7 +304,7 @@ fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind) NULL }; - const gchar *datetime_items [] = { + const gchar *datetime_items[] = { N_ ("Use locale default"), "%m/%d/%y %I:%M:%S %p", /* American style */ "%m/%d/%Y %I:%M:%S %p", /* American style, full year */ @@ -321,7 +321,7 @@ fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind) NULL }; - const gchar *shortdate_items [] = { + const gchar *shortdate_items[] = { "%A, %B %d", "%A, %d %B", "%a, %b %d", @@ -354,7 +354,7 @@ fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind) fmt = get_format_internal (key, kind); - for (i = 0; items [i]; i++) { + for (i = 0; items[i]; i++) { if (i == 0) { gtk_combo_box_append_text ((GtkComboBox *) combo, _(items[i])); } else { diff --git a/e-util/e-event.c b/e-util/e-event.c index 6d0ece99bf..5e4a2b6c09 100644 --- a/e-util/e-event.c +++ b/e-util/e-event.c @@ -451,14 +451,13 @@ emph_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root) EEventHookClass *class; GSList *items = NULL; - g_return_val_if_fail (((EEventHookClass *)G_OBJECT_GET_CLASS (eph))->event != NULL, -1); - d(printf("loading event hook\n")); if (((EPluginHookClass *)e_event_hook_parent_class)->construct (eph, ep, root) == -1) return -1; - class = (EEventHookClass *)G_OBJECT_GET_CLASS (eph); + class = E_EVENT_HOOK_GET_CLASS (eph); + g_return_val_if_fail (class->event != NULL, -1); node = root->children; while (node) { diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c index f6743b9f75..8a859ac378 100644 --- a/e-util/e-html-utils.c +++ b/e-util/e-html-utils.c @@ -240,7 +240,7 @@ e_text_to_html_full (const gchar *input, guint flags, guint32 color) saw_citation = is_citation (cur, saw_citation); if (saw_citation) { if (!colored) { - gchar font [25]; + gchar font[25]; g_snprintf (font, 25, "<FONT COLOR=\"#%06x\">", color); diff --git a/e-util/e-import.h b/e-util/e-import.h index 57bb79450d..ea3f22cbdf 100644 --- a/e-util/e-import.h +++ b/e-util/e-import.h @@ -54,14 +54,26 @@ typedef struct _EImportImporter EImportImporter; typedef struct _EImportFactory EImportFactory; typedef struct _EImportTarget EImportTarget; -typedef void (*EImportCompleteFunc)(EImport *ei, gpointer data); -typedef void (*EImportStatusFunc)(EImport *ei, const gchar *what, gint pc, gpointer data); +typedef void (*EImportCompleteFunc) (EImport *ei, + gpointer data); +typedef void (*EImportStatusFunc) (EImport *ei, + const gchar *what, + gint pc, + gpointer data); -typedef void (*EImportFactoryFunc)(EImport *ei, gpointer data); -typedef void (*EImportImporterFunc)(EImportImporter *importer, gpointer data); -typedef gboolean (*EImportSupportedFunc)(EImport *ei, EImportTarget *, EImportImporter *im); -typedef GtkWidget *(*EImportWidgetFunc)(EImport *ei, EImportTarget *, EImportImporter *im); -typedef void (*EImportImportFunc)(EImport *ei, EImportTarget *, EImportImporter *im); +typedef void (*EImportFactoryFunc) (EImport *ei, + gpointer data); +typedef void (*EImportImporterFunc) (EImportImporter *importer, + gpointer data); +typedef gboolean (*EImportSupportedFunc) (EImport *ei, + EImportTarget *, + EImportImporter *im); +typedef GtkWidget * (*EImportWidgetFunc) (EImport *ei, + EImportTarget *, + EImportImporter *im); +typedef void (*EImportImportFunc) (EImport *ei, + EImportTarget *, + EImportImporter *im); /* The global target types, implementors may add additional ones */ enum _e_import_target_t { @@ -76,7 +88,8 @@ enum _e_import_target_t { * @type: target type * @priority: Priority of importer. Higher values will be processed first. * @supported: Callback to see if this target is supported by the importer. - * @get_widget: A widget factory for this importer, if it needs any extra information in the assistant. It will update the target. + * @get_widget: A widget factory for this importer, if it needs any extra + * information in the assistant. It will update the target. * @import: Run the import. * @cancel: Cancel the import. * @get_preview: Callback to create a preview widget for just importing data. diff --git a/e-util/e-logger.c b/e-util/e-logger.c index 6dd08c722d..b29595a70f 100644 --- a/e-util/e-logger.c +++ b/e-util/e-logger.c @@ -255,13 +255,13 @@ e_logger_get_logs (ELogger *logger, break; len = strlen (tmp); - if (len > 0 && tmp [len - 1] != '\n' && !feof (fp)) { + if (len > 0 && tmp[len - 1] != '\n' && !feof (fp)) { /* there are more characters on a row than 249, so read them all */ GString *str = g_string_sized_new (1024); g_string_append (str, tmp); - while (!feof (fp) && len > 0 && tmp [len - 1] != '\n') { + while (!feof (fp) && len > 0 && tmp[len - 1] != '\n') { tmp = fgets (buf, sizeof (buf), fp); if (!tmp) break; diff --git a/e-util/e-non-intrusive-error-dialog.h b/e-util/e-non-intrusive-error-dialog.h index 2b03a7ec7c..58456a13af 100644 --- a/e-util/e-non-intrusive-error-dialog.h +++ b/e-util/e-non-intrusive-error-dialog.h @@ -34,7 +34,7 @@ struct _log_data { const gchar *text; const gchar *stock_id; GdkPixbuf *pbuf; -} ldata [] = { +} ldata[] = { { E_LOG_ERROR, N_("Error"), N_("Errors"), GTK_STOCK_DIALOG_ERROR }, { E_LOG_WARNING, N_("Warning"), N_("Warnings and Errors"), GTK_STOCK_DIALOG_WARNING }, { E_LOG_DEBUG, N_("Debug"), N_("Error, Warnings and Debug messages"), GTK_STOCK_DIALOG_INFO } diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c index 2c8fb5160d..bcc476bfc8 100644 --- a/e-util/e-signature-list.c +++ b/e-util/e-signature-list.c @@ -44,7 +44,7 @@ enum { LAST_SIGNAL }; -static guint signals [LAST_SIGNAL] = { 0 }; +static guint signals[LAST_SIGNAL] = { 0 }; static void e_signature_list_finalize (GObject *object); static void e_signature_list_dispose (GObject *object); diff --git a/e-util/gtk-compat.h b/e-util/gtk-compat.h index 7dc61f3a84..d66ff15d08 100644 --- a/e-util/gtk-compat.h +++ b/e-util/gtk-compat.h @@ -21,7 +21,8 @@ #endif #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION == 21 && GTK_MICRO_VERSION == 1 -#define gdk_drag_context_get_selected_action(context) gdk_drag_context_get_action(context) +#define gdk_drag_context_get_selected_action(context) \ + gdk_drag_context_get_action(context) #endif #if GTK_CHECK_VERSION (2,90,5) |