aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-12 02:56:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-13 20:28:58 +0800
commitcd53ba990035bdb4861d9660917d457533d4ecb2 (patch)
treed9c9da2208f4a921c514497ea92d27e3d88481d1
parentb2b27cfa1bfcd6efdac30d2745a6e8cd4e6de134 (diff)
downloadgsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.gz
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.bz2
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.lz
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.xz
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.tar.zst
gsoc2013-evolution-cd53ba990035bdb4861d9660917d457533d4ecb2.zip
Coding style cleanups.
-rw-r--r--a11y/ea-factory.h8
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c32
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.h2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c92
-rw-r--r--addressbook/gui/contact-editor/eab-editor.c2
-rw-r--r--addressbook/gui/contact-editor/test-editor.c4
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.h2
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c2
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c52
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c10
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.h4
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c70
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c56
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c24
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c72
-rw-r--r--addressbook/gui/widgets/e-minicard-label.h2
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c78
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c30
-rw-r--r--addressbook/gui/widgets/e-minicard.c204
-rw-r--r--addressbook/gui/widgets/ea-addressbook-view.c6
-rw-r--r--addressbook/gui/widgets/ea-addressbook-view.h2
-rw-r--r--addressbook/gui/widgets/ea-addressbook.c2
-rw-r--r--addressbook/gui/widgets/ea-minicard-view.c14
-rw-r--r--addressbook/gui/widgets/ea-minicard-view.h2
-rw-r--r--addressbook/gui/widgets/ea-minicard.c10
-rw-r--r--addressbook/gui/widgets/ea-minicard.h2
-rw-r--r--addressbook/gui/widgets/eab-config.c16
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c4
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c2
-rw-r--r--addressbook/importers/evolution-addressbook-importers.h10
-rw-r--r--addressbook/importers/evolution-csv-importer.c192
-rw-r--r--addressbook/importers/evolution-ldif-importer.c102
-rw-r--r--addressbook/importers/evolution-vcard-importer.c58
-rw-r--r--addressbook/printing/e-contact-print.c58
-rw-r--r--addressbook/util/addressbook.c6
-rw-r--r--addressbook/util/eab-book-util.c4
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c18
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c12
-rw-r--r--calendar/gui/alarm-notify/notify-main.c2
-rw-r--r--calendar/gui/calendar-config.c6
-rw-r--r--calendar/gui/calendar-config.h10
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c6
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c4
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c2
-rw-r--r--calendar/gui/dialogs/comp-editor.c24
-rw-r--r--calendar/gui/dialogs/comp-editor.h2
-rw-r--r--calendar/gui/dialogs/event-editor.c16
-rw-r--r--calendar/gui/dialogs/event-page.c48
-rw-r--r--calendar/gui/dialogs/memo-page.c28
-rw-r--r--calendar/gui/dialogs/recurrence-page.c2
-rw-r--r--calendar/gui/dialogs/save-comp.c4
-rw-r--r--calendar/gui/dialogs/task-details-page.c4
-rw-r--r--calendar/gui/dialogs/task-editor.c12
-rw-r--r--calendar/gui/dialogs/task-page.c32
-rw-r--r--calendar/gui/dialogs/task-page.h2
-rw-r--r--calendar/gui/e-cal-component-preview.h2
-rw-r--r--calendar/gui/e-cal-config.c6
-rw-r--r--calendar/gui/e-cal-list-view.c2
-rw-r--r--calendar/gui/e-cal-model.c2
-rw-r--r--calendar/gui/e-cal-model.h4
-rw-r--r--calendar/gui/e-calendar-view.c12
-rw-r--r--calendar/gui/e-calendar-view.h2
-rw-r--r--calendar/gui/e-cell-date-edit-text.c2
-rw-r--r--calendar/gui/e-day-view-main-item.c2
-rw-r--r--calendar/gui/e-day-view-top-item.h4
-rw-r--r--calendar/gui/e-day-view.c32
-rw-r--r--calendar/gui/e-day-view.h8
-rw-r--r--calendar/gui/e-itip-control.c12
-rw-r--r--calendar/gui/e-meeting-list-view.c14
-rw-r--r--calendar/gui/e-meeting-time-sel.h4
-rw-r--r--calendar/gui/e-memo-table.c2
-rw-r--r--calendar/gui/e-task-table.c2
-rw-r--r--calendar/gui/e-week-view-event-item.c2
-rw-r--r--calendar/gui/e-week-view-layout.c2
-rw-r--r--calendar/gui/e-week-view-layout.h2
-rw-r--r--calendar/gui/e-week-view-main-item.c2
-rw-r--r--calendar/gui/e-week-view-titles-item.h2
-rw-r--r--calendar/gui/e-week-view.c16
-rw-r--r--calendar/gui/e-week-view.h10
-rw-r--r--calendar/gui/ea-cal-view-event.c10
-rw-r--r--calendar/gui/ea-cal-view.c16
-rw-r--r--calendar/gui/ea-calendar-helpers.c4
-rw-r--r--calendar/gui/ea-calendar.c12
-rw-r--r--calendar/gui/ea-day-view-cell.c4
-rw-r--r--calendar/gui/ea-day-view-main-item.c16
-rw-r--r--calendar/gui/ea-day-view.c2
-rw-r--r--calendar/gui/ea-gnome-calendar.c4
-rw-r--r--calendar/gui/ea-week-view-cell.c4
-rw-r--r--calendar/gui/ea-week-view-main-item.c18
-rw-r--r--calendar/gui/ea-week-view.c2
-rw-r--r--calendar/gui/gnome-cal.c8
-rw-r--r--calendar/gui/gnome-cal.h4
-rw-r--r--calendar/gui/itip-utils.c20
-rw-r--r--calendar/gui/print.c10
-rw-r--r--calendar/gui/weekday-picker.c2
-rw-r--r--calendar/importers/evolution-calendar-importer.h6
-rw-r--r--calendar/importers/icalendar-importer.c108
-rw-r--r--capplet/anjal-settings-main.c14
-rw-r--r--capplet/settings/anjal-mail-view.c12
-rw-r--r--capplet/settings/mail-account-view.c284
-rw-r--r--capplet/settings/mail-account-view.h2
-rw-r--r--capplet/settings/mail-capplet-shell.c14
-rw-r--r--capplet/settings/mail-decoration.c20
-rw-r--r--capplet/settings/mail-guess-servers.c34
-rw-r--r--capplet/settings/mail-settings-view.c46
-rw-r--r--capplet/settings/mail-settings-view.h2
-rw-r--r--capplet/settings/mail-view.c56
-rw-r--r--capplet/settings/mail-view.h2
-rw-r--r--e-util/gtk-compat.h2
-rw-r--r--em-format/em-format-quote.c16
-rw-r--r--em-format/em-format.c328
-rw-r--r--mail/e-mail-backend.c2
-rw-r--r--mail/e-mail-browser.h2
-rw-r--r--mail/e-mail-message-pane.c6
-rw-r--r--mail/e-mail-migrate.c38
-rw-r--r--mail/e-mail-notebook-view.c90
-rw-r--r--mail/e-mail-pane.c2
-rw-r--r--mail/e-mail-reader-utils.c4
-rw-r--r--mail/e-mail-reader.h4
-rw-r--r--mail/e-mail-store.c2
-rw-r--r--mail/e-mail-view.h2
-rw-r--r--mail/em-account-editor.c62
-rw-r--r--mail/em-composer-utils.c102
-rw-r--r--mail/em-composer-utils.h2
-rw-r--r--mail/em-config.c64
-rw-r--r--mail/em-config.h10
-rw-r--r--mail/em-event.c46
-rw-r--r--mail/em-event.h12
-rw-r--r--mail/em-filter-context.c108
-rw-r--r--mail/em-filter-editor.c2
-rw-r--r--mail/em-filter-folder-element.c110
-rw-r--r--mail/em-filter-rule.c242
-rw-r--r--mail/em-filter-source-element.c178
-rw-r--r--mail/em-folder-properties.c28
-rw-r--r--mail/em-folder-selector.c28
-rw-r--r--mail/em-folder-tree-model.c12
-rw-r--r--mail/em-folder-tree-model.h2
-rw-r--r--mail/em-folder-tree.c176
-rw-r--r--mail/em-folder-tree.h8
-rw-r--r--mail/em-folder-utils.c26
-rw-r--r--mail/em-format-hook.c92
-rw-r--r--mail/em-format-hook.h4
-rw-r--r--mail/em-format-html-display.c148
-rw-r--r--mail/em-format-html-print.h2
-rw-r--r--mail/em-format-html.c424
-rw-r--r--mail/em-format-html.h6
-rw-r--r--mail/em-inline-filter.c82
-rw-r--r--mail/em-subscribe-editor.c212
-rw-r--r--mail/em-subscribe-editor.h2
-rw-r--r--mail/em-sync-stream.c2
-rw-r--r--mail/em-utils.c250
-rw-r--r--mail/em-utils.h26
-rw-r--r--mail/em-vfolder-context.c14
-rw-r--r--mail/em-vfolder-rule.c260
-rw-r--r--mail/importers/elm-importer.c110
-rw-r--r--mail/importers/evolution-mbox-importer.c90
-rw-r--r--mail/importers/mail-importer.c138
-rw-r--r--mail/importers/mail-importer.h12
-rw-r--r--mail/importers/pine-importer.c156
-rw-r--r--mail/mail-autofilter.c60
-rw-r--r--mail/mail-autofilter.h12
-rw-r--r--mail/mail-config.c8
-rw-r--r--mail/mail-folder-cache.c220
-rw-r--r--mail/mail-mt.c192
-rw-r--r--mail/mail-mt.h18
-rw-r--r--mail/mail-ops.c274
-rw-r--r--mail/mail-ops.h10
-rw-r--r--mail/mail-send-recv.c204
-rw-r--r--mail/mail-session.c80
-rw-r--r--mail/mail-tools.c40
-rw-r--r--mail/mail-vfolder.c374
-rw-r--r--mail/mail-vfolder.h6
-rw-r--r--mail/message-list.c536
-rw-r--r--plugins/attachment-reminder/attachment-reminder.c20
-rw-r--r--plugins/audio-inline/audio-inline.c8
-rw-r--r--plugins/backup-restore/backup-restore.c16
-rw-r--r--plugins/backup-restore/backup.c12
-rw-r--r--plugins/bogo-junk-plugin/bf-junk-filter.c6
-rw-r--r--plugins/contacts-map/contacts-map.c6
-rw-r--r--plugins/contacts-map/geo-utils.c2
-rw-r--r--plugins/dbx-import/dbx-importer.c158
-rw-r--r--plugins/email-custom-header/email-custom-header.c66
-rw-r--r--plugins/external-editor/external-editor.c22
-rw-r--r--plugins/google-account-setup/google-contacts-source.c2
-rw-r--r--plugins/groupwise-features/addressbook-groupwise.c2
-rw-r--r--plugins/groupwise-features/camel-gw-listener.c18
-rw-r--r--plugins/groupwise-features/groupwise-account-setup.c16
-rw-r--r--plugins/groupwise-features/gw-ui.c2
-rw-r--r--plugins/groupwise-features/install-shared.c18
-rw-r--r--plugins/groupwise-features/junk-mail-settings.c4
-rw-r--r--plugins/groupwise-features/junk-settings.c42
-rw-r--r--plugins/groupwise-features/mail-retract.c4
-rw-r--r--plugins/groupwise-features/mail-send-options.c2
-rw-r--r--plugins/groupwise-features/proxy-login.c30
-rw-r--r--plugins/groupwise-features/proxy-login.h2
-rw-r--r--plugins/groupwise-features/proxy.c42
-rw-r--r--plugins/groupwise-features/proxy.h2
-rw-r--r--plugins/groupwise-features/share-folder-common.c38
-rw-r--r--plugins/groupwise-features/share-folder.c88
-rw-r--r--plugins/groupwise-features/share-folder.h2
-rw-r--r--plugins/groupwise-features/status-track.c28
-rw-r--r--plugins/imap-features/imap-headers.c28
-rw-r--r--plugins/itip-formatter/itip-formatter.c48
-rw-r--r--plugins/mail-notification/mail-notification.c20
-rw-r--r--plugins/mailing-list-actions/mailing-list-actions.c2
-rw-r--r--plugins/mark-all-read/mark-all-read.c4
-rw-r--r--plugins/plugin-manager/plugin-manager.c2
-rw-r--r--plugins/prefer-plain/prefer-plain.c64
-rw-r--r--plugins/profiler/profiler.c4
-rw-r--r--plugins/pst-import/pst-importer.c42
-rw-r--r--plugins/publish-calendar/publish-format-fb.c2
-rw-r--r--plugins/publish-calendar/url-editor-dialog.c60
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c18
-rw-r--r--plugins/save-calendar/csv-format.c16
-rw-r--r--plugins/save-calendar/rdf-format.c2
-rw-r--r--plugins/save-calendar/save-calendar.c2
-rw-r--r--plugins/templates/templates.c24
-rw-r--r--plugins/tnef-attachments/tnef-plugin.c512
-rw-r--r--plugins/webdav-account-setup/webdav-contacts-source.c90
-rw-r--r--smime/gui/ca-trust-dialog.c6
-rw-r--r--smime/gui/cert-trust-dialog.c32
-rw-r--r--smime/gui/certificate-manager.c66
-rw-r--r--smime/gui/e-cert-selector.c70
-rw-r--r--smime/lib/e-asn1-object.c2
-rw-r--r--smime/lib/e-cert-db.c218
-rw-r--r--smime/lib/e-cert-trust.c74
-rw-r--r--smime/lib/e-cert.c94
-rw-r--r--smime/lib/e-cert.h2
-rw-r--r--smime/lib/e-pkcs12.c30
229 files changed, 5163 insertions, 5163 deletions
diff --git a/a11y/ea-factory.h b/a11y/ea-factory.h
index e234368a98..30f00e7f8d 100644
--- a/a11y/ea-factory.h
+++ b/a11y/ea-factory.h
@@ -96,12 +96,12 @@ type_as_function ## _factory_get_type (void) \
}
#define EA_FACTORY(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTA(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTB(type, type_as_function, opt_create_accessible)
+ EA_FACTORY_PARTA (type, type_as_function, opt_create_accessible) \
+ EA_FACTORY_PARTB (type, type_as_function, opt_create_accessible)
#define EA_FACTORY_GOBJECT(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTA_GOBJECT(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTB(type, type_as_function, opt_create_accessible)
+ EA_FACTORY_PARTA_GOBJECT (type, type_as_function, opt_create_accessible) \
+ EA_FACTORY_PARTB (type, type_as_function, opt_create_accessible)
#define EA_SET_FACTORY(obj_type, type_as_function) \
{ \
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index 74cf45eee3..47d7e3a3d6 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -28,8 +28,8 @@
#include "e-contact-editor-fullname.h"
-static void fill_in_info(EContactEditorFullname *editor);
-static void extract_info(EContactEditorFullname *editor);
+static void fill_in_info (EContactEditorFullname *editor);
+static void extract_info (EContactEditorFullname *editor);
/* The arguments we take */
enum {
@@ -55,11 +55,11 @@ e_contact_editor_fullname_set_property (GObject *object,
switch (property_id) {
case PROP_NAME:
- e_contact_name_free(e_contact_editor_fullname->name);
+ e_contact_name_free (e_contact_editor_fullname->name);
if (g_value_get_pointer (value) != NULL) {
- e_contact_editor_fullname->name = e_contact_name_copy(g_value_get_pointer (value));
- fill_in_info(e_contact_editor_fullname);
+ e_contact_editor_fullname->name = e_contact_name_copy (g_value_get_pointer (value));
+ fill_in_info (e_contact_editor_fullname);
}
else {
e_contact_editor_fullname->name = NULL;
@@ -118,8 +118,8 @@ e_contact_editor_fullname_get_property (GObject *object,
switch (property_id) {
case PROP_NAME:
- extract_info(e_contact_editor_fullname);
- g_value_set_pointer (value, e_contact_name_copy(e_contact_editor_fullname->name));
+ extract_info (e_contact_editor_fullname);
+ g_value_set_pointer (value, e_contact_name_copy (e_contact_editor_fullname->name));
break;
case PROP_EDITABLE:
g_value_set_boolean (value, e_contact_editor_fullname->editable ? TRUE : FALSE);
@@ -133,15 +133,15 @@ e_contact_editor_fullname_get_property (GObject *object,
static void
e_contact_editor_fullname_dispose (GObject *object)
{
- EContactEditorFullname *e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME(object);
+ EContactEditorFullname *e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object);
if (e_contact_editor_fullname->builder) {
- g_object_unref(e_contact_editor_fullname->builder);
+ g_object_unref (e_contact_editor_fullname->builder);
e_contact_editor_fullname->builder = NULL;
}
if (e_contact_editor_fullname->name) {
- e_contact_name_free(e_contact_editor_fullname->name);
+ e_contact_name_free (e_contact_editor_fullname->name);
e_contact_editor_fullname->name = NULL;
}
@@ -261,14 +261,14 @@ fill_in_field (EContactEditorFullname *editor,
if (entry) {
if (string)
- gtk_entry_set_text(entry, string);
+ gtk_entry_set_text (entry, string);
else
gtk_entry_set_text(entry, "");
}
}
static void
-fill_in_info(EContactEditorFullname *editor)
+fill_in_info (EContactEditorFullname *editor)
{
EContactName *name = editor->name;
if (name) {
@@ -284,7 +284,7 @@ static gchar *
extract_field (EContactEditorFullname *editor,
const gchar *field)
{
- GtkWidget *widget = e_builder_get_widget(editor->builder, field);
+ GtkWidget *widget = e_builder_get_widget (editor->builder, field);
GtkEntry *entry = NULL;
if (GTK_IS_ENTRY (widget))
@@ -293,17 +293,17 @@ extract_field (EContactEditorFullname *editor,
entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget)));
if (entry)
- return g_strdup (gtk_entry_get_text(entry));
+ return g_strdup (gtk_entry_get_text (entry));
else
return NULL;
}
static void
-extract_info(EContactEditorFullname *editor)
+extract_info (EContactEditorFullname *editor)
{
EContactName *name = editor->name;
if (!name) {
- name = e_contact_name_new();
+ name = e_contact_name_new ();
editor->name = name;
}
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.h b/addressbook/gui/contact-editor/e-contact-editor-fullname.h
index db45b08857..8fb7acfa1e 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.h
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.h
@@ -63,7 +63,7 @@ struct _EContactEditorFullnameClass
GtkDialogClass parent_class;
};
-GtkWidget *e_contact_editor_fullname_new(const EContactName *name);
+GtkWidget *e_contact_editor_fullname_new (const EContactName *name);
GType e_contact_editor_fullname_get_type (void);
G_END_DECLS
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 85558a2530..be5ff41fdd 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -88,7 +88,7 @@ static GtkWindow* e_contact_editor_get_window (EABEditor *editor);
static void save_contact (EContactEditor *ce, gboolean should_close);
static void entry_activated (EContactEditor *editor);
-static void set_entry_text(EContactEditor *editor, GtkEntry *entry, const gchar *string);
+static void set_entry_text (EContactEditor *editor, GtkEntry *entry, const gchar *string);
static void sensitize_ok (EContactEditor *ce);
static EABEditorClass *parent_class = NULL;
@@ -464,7 +464,7 @@ name_to_style (const EContactName *name, const gchar *company, gint style)
string = g_strjoinv(" ", strings);
break;
case 3:
- string = g_strdup(company);
+ string = g_strdup (company);
break;
case 4: /* Fall Through */
case 5:
@@ -483,7 +483,7 @@ name_to_style (const EContactName *name, const gchar *company, gint style)
string = g_strdup_printf("%s (%s)", substring, company);
else
string = g_strdup_printf("%s (%s)", company, substring);
- g_free(substring);
+ g_free (substring);
break;
default:
string = g_strdup("");
@@ -502,7 +502,7 @@ file_as_get_style (EContactEditor *editor)
const gchar *company;
gint i;
- if (!(file_as && GTK_IS_ENTRY(file_as)))
+ if (!(file_as && GTK_IS_ENTRY (file_as)))
return -1;
company = gtk_entry_get_text (GTK_ENTRY (company_w));
@@ -510,12 +510,12 @@ file_as_get_style (EContactEditor *editor)
for (i = 0; i < 6; i++) {
trystring = name_to_style (name, company, i);
- if (!strcmp(trystring, filestring)) {
- g_free(trystring);
- g_free(filestring);
+ if (!strcmp (trystring, filestring)) {
+ g_free (trystring);
+ g_free (filestring);
return i;
}
- g_free(trystring);
+ g_free (trystring);
}
g_free (filestring);
return -1;
@@ -2413,7 +2413,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
e_image_chooser_get_image_data (E_IMAGE_CHOOSER (widget),
&img_buff, &photo.data.inlined.length)) {
GdkPixbuf *pixbuf, *new;
- GdkPixbufLoader *loader = gdk_pixbuf_loader_new();
+ GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
photo.data.inlined.data = (guchar *)img_buff;
img_buff = NULL;
@@ -2449,7 +2449,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
if (new) {
GdkPixbufFormat *format = gdk_pixbuf_loader_get_format (loader);
gchar *format_name = gdk_pixbuf_format_get_name (format);
- g_free(photo.data.inlined.data);
+ g_free (photo.data.inlined.data);
gdk_pixbuf_save_to_buffer (new, &img_buff,
&photo.data.inlined.length,
format_name, NULL, NULL);
@@ -2781,22 +2781,22 @@ full_name_response (GtkDialog *dialog, gint response, EContactEditor *editor)
"name", &name,
NULL);
- style = file_as_get_style(editor);
+ style = file_as_get_style (editor);
fname_widget = e_builder_get_widget(editor->builder, "entry-fullname");
if (fname_widget && GTK_IS_ENTRY (fname_widget)) {
- gchar *full_name = e_contact_name_to_string(name);
- const gchar *old_full_name = gtk_entry_get_text (GTK_ENTRY(fname_widget));
+ gchar *full_name = e_contact_name_to_string (name);
+ const gchar *old_full_name = gtk_entry_get_text (GTK_ENTRY (fname_widget));
if (strcmp (full_name, old_full_name))
gtk_entry_set_text (GTK_ENTRY (fname_widget), full_name);
- g_free(full_name);
+ g_free (full_name);
}
- e_contact_name_free(editor->name);
+ e_contact_name_free (editor->name);
editor->name = name;
- file_as_set_style(editor, style);
+ file_as_set_style (editor, style);
}
gtk_widget_destroy (GTK_WIDGET (dialog));
editor->fullname_dialog = NULL;
@@ -2849,12 +2849,12 @@ categories_response (GtkDialog *dialog, gint response, EContactEditor *editor)
if (response == GTK_RESPONSE_OK) {
categories = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog));
- if (entry && GTK_IS_ENTRY(entry))
+ if (entry && GTK_IS_ENTRY (entry))
gtk_entry_set_text (GTK_ENTRY (entry), categories);
else
e_contact_set (editor->contact, E_CONTACT_CATEGORIES, (gchar *)categories);
}
- gtk_widget_destroy(GTK_WIDGET(dialog));
+ gtk_widget_destroy (GTK_WIDGET (dialog));
editor->categories_dialog = NULL;
}
@@ -2863,7 +2863,7 @@ categories_editor_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer
{
if (widget) {
if (GTK_IS_WIDGET (widget))
- gtk_widget_destroy(widget);
+ gtk_widget_destroy (widget);
}
return TRUE;
}
@@ -2875,13 +2875,13 @@ categories_clicked (GtkWidget *button, EContactEditor *editor)
GtkDialog *dialog;
GtkWidget *entry = e_builder_get_widget(editor->builder, "entry-categories");
- if (entry && GTK_IS_ENTRY(entry))
- categories = g_strdup (gtk_entry_get_text(GTK_ENTRY(entry)));
+ if (entry && GTK_IS_ENTRY (entry))
+ categories = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
else if (editor->contact)
categories = e_contact_get (editor->contact, E_CONTACT_CATEGORIES);
if (editor->categories_dialog != NULL) {
- gtk_window_present (GTK_WINDOW(editor->categories_dialog));
+ gtk_window_present (GTK_WINDOW (editor->categories_dialog));
g_free (categories);
return;
}else if (!(dialog = GTK_DIALOG (e_categories_dialog_new (categories)))) {
@@ -2899,7 +2899,7 @@ categories_clicked (GtkWidget *button, EContactEditor *editor)
g_signal_connect_swapped (EAB_EDITOR (editor), "editor_closed",
G_CALLBACK (categories_editor_delete_event_cb), GTK_WIDGET (dialog));
- gtk_widget_show(GTK_WIDGET(dialog));
+ gtk_widget_show (GTK_WIDGET (dialog));
g_free (categories);
editor->categories_dialog = GTK_WIDGET (dialog);
@@ -3010,7 +3010,7 @@ image_clicked (GtkWidget *button, EContactEditor *editor)
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
no_image, GTK_RESPONSE_NO,
NULL);
- preview = GTK_IMAGE (gtk_image_new());
+ preview = GTK_IMAGE (gtk_image_new ());
gtk_file_chooser_set_preview_widget ((GtkFileChooser *)editor->file_selector, GTK_WIDGET (preview));
g_signal_connect (editor->file_selector, "update-preview",
G_CALLBACK (update_preview_cb), preview);
@@ -3403,14 +3403,14 @@ show_help_cb (GtkWidget *widget, gpointer data)
}
static GList *
-add_to_tab_order(GList *list, GtkBuilder *builder, const gchar *name)
+add_to_tab_order (GList *list, GtkBuilder *builder, const gchar *name)
{
- GtkWidget *widget = e_builder_get_widget(builder, name);
- return g_list_prepend(list, widget);
+ GtkWidget *widget = e_builder_get_widget (builder, name);
+ return g_list_prepend (list, widget);
}
static void
-setup_tab_order(GtkBuilder *builder)
+setup_tab_order (GtkBuilder *builder)
{
GtkWidget *container;
GList *list = NULL;
@@ -3433,9 +3433,9 @@ setup_tab_order(GtkBuilder *builder)
list = add_to_tab_order(list, builder, "entry-homepage");
list = add_to_tab_order(list, builder, "button-fulladdr");
list = add_to_tab_order(list, builder, "text-address");
- list = g_list_reverse(list);
- e_container_change_tab_order(GTK_CONTAINER(container), list);
- g_list_free(list);
+ list = g_list_reverse (list);
+ e_container_change_tab_order (GTK_CONTAINER (container), list);
+ g_list_free (list);
}
*/
@@ -3522,7 +3522,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
* through a constructor property. */
shell = e_shell_get_default ();
- e_contact_editor->name = e_contact_name_new();
+ e_contact_editor->name = e_contact_name_new ();
e_contact_editor->contact = NULL;
e_contact_editor->changed = FALSE;
@@ -3539,7 +3539,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
e_contact_editor->builder = builder;
- setup_tab_order(builder);
+ setup_tab_order (builder);
e_contact_editor->app = e_builder_get_widget (builder, "contact editor");
widget = e_contact_editor->app;
@@ -3604,7 +3604,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
static void
e_contact_editor_dispose (GObject *object)
{
- EContactEditor *e_contact_editor = E_CONTACT_EDITOR(object);
+ EContactEditor *e_contact_editor = E_CONTACT_EDITOR (object);
if (e_contact_editor->file_selector != NULL) {
gtk_widget_destroy (e_contact_editor->file_selector);
@@ -3612,7 +3612,7 @@ e_contact_editor_dispose (GObject *object)
}
if (e_contact_editor->writable_fields) {
- g_object_unref(e_contact_editor->writable_fields);
+ g_object_unref (e_contact_editor->writable_fields);
e_contact_editor->writable_fields = NULL;
}
if (e_contact_editor->required_fields) {
@@ -3620,28 +3620,28 @@ e_contact_editor_dispose (GObject *object)
e_contact_editor->required_fields = NULL;
}
if (e_contact_editor->contact) {
- g_object_unref(e_contact_editor->contact);
+ g_object_unref (e_contact_editor->contact);
e_contact_editor->contact = NULL;
}
if (e_contact_editor->source_book) {
- g_object_unref(e_contact_editor->source_book);
+ g_object_unref (e_contact_editor->source_book);
e_contact_editor->source_book = NULL;
}
if (e_contact_editor->target_book) {
g_signal_handler_disconnect (e_contact_editor->target_book, e_contact_editor->target_editable_id);
- g_object_unref(e_contact_editor->target_book);
+ g_object_unref (e_contact_editor->target_book);
e_contact_editor->target_book = NULL;
}
if (e_contact_editor->name) {
- e_contact_name_free(e_contact_editor->name);
+ e_contact_name_free (e_contact_editor->name);
e_contact_editor->name = NULL;
}
if (e_contact_editor->builder) {
- g_object_unref(e_contact_editor->builder);
+ g_object_unref (e_contact_editor->builder);
e_contact_editor->builder = NULL;
}
@@ -3753,7 +3753,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
break;
if (editor->source_book)
- g_object_unref(editor->source_book);
+ g_object_unref (editor->source_book);
editor->source_book = source_book;
g_object_ref (editor->source_book);
@@ -3795,7 +3795,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
if (editor->target_book) {
g_signal_handler_disconnect (editor->target_book, editor->target_editable_id);
- g_object_unref(editor->target_book);
+ g_object_unref (editor->target_book);
}
editor->target_book = target_book;
@@ -3827,8 +3827,8 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
case PROP_CONTACT:
if (editor->contact)
- g_object_unref(editor->contact);
- editor->contact = e_contact_duplicate(E_CONTACT(g_value_get_object (value)));
+ g_object_unref (editor->contact);
+ editor->contact = e_contact_duplicate (E_CONTACT (g_value_get_object (value)));
fill_in_all (editor);
editor->changed = FALSE;
break;
@@ -3860,13 +3860,13 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
}
case PROP_WRITABLE_FIELDS:
if (editor->writable_fields)
- g_object_unref(editor->writable_fields);
+ g_object_unref (editor->writable_fields);
editor->writable_fields = g_value_get_object (value);
if (editor->writable_fields)
g_object_ref (editor->writable_fields);
else
- editor->writable_fields = e_list_new(NULL, NULL, NULL);
+ editor->writable_fields = e_list_new (NULL, NULL, NULL);
sensitize_all (editor);
break;
diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c
index f2765f40a6..b5e5232e00 100644
--- a/addressbook/gui/contact-editor/eab-editor.c
+++ b/addressbook/gui/contact-editor/eab-editor.c
@@ -356,7 +356,7 @@ eab_editor_get_window (EABEditor *editor)
}
/* This function prompts for saving if editor conents are in changed state and
- save or discards or cancels(just returns with out doing anything) according
+ save or discards or cancels (just returns with out doing anything) according
to user input. Editor gets destroyed in case of save and discard case. */
gboolean
diff --git a/addressbook/gui/contact-editor/test-editor.c b/addressbook/gui/contact-editor/test-editor.c
index 7a438a85bc..3078aaaaec 100644
--- a/addressbook/gui/contact-editor/test-editor.c
+++ b/addressbook/gui/contact-editor/test-editor.c
@@ -76,7 +76,7 @@ editor_closed_cb (EContactEditor *ce, gpointer data)
exit (0);
}
-gint main( gint argc, gchar *argv[] )
+gint main ( gint argc, gchar *argv[] )
{
gchar *cardstr;
EContactEditor *ce;
@@ -98,7 +98,7 @@ gint main( gint argc, gchar *argv[] )
g_signal_connect (ce, "editor_closed",
G_CALLBACK (editor_closed_cb), NULL);
- gtk_main();
+ gtk_main ();
/* Not reached. */
return 0;
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.h b/addressbook/gui/contact-list-editor/e-contact-list-model.h
index 1f7c35a7be..43d3288756 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.h
+++ b/addressbook/gui/contact-list-editor/e-contact-list-model.h
@@ -65,7 +65,7 @@ void e_contact_list_model_add_destination
EDestination *dest);
void e_contact_list_model_add_email (EContactListModel *model,
const gchar *email);
-void e_contact_list_model_add_contact(EContactListModel *model,
+void e_contact_list_model_add_contact (EContactListModel *model,
EContact *contact,
gint email_num);
void e_contact_list_model_remove_row (EContactListModel *model,
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index bc686986e2..d5ba1a5f84 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -692,7 +692,7 @@ use_common_book_cb (EBook *book, const GError *error, gpointer closure)
query_parts[p] = NULL;
qj = g_strjoinv (" ", query_parts);
for (i = 0; query_parts[i] != NULL; i++)
- g_free(query_parts[i]);
+ g_free (query_parts[i]);
if (p > 1) {
gchar *s;
s = g_strdup_printf ("(or %s)", qj);
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
index ca21dee30b..9932134469 100644
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ b/addressbook/gui/merging/eab-contact-merging.c
@@ -222,7 +222,7 @@ mergeit (EContactMergingLookup *lookup)
gint value = 0, result;
dialog = (GtkDialog *)(gtk_dialog_new_with_buttons (_("Merge Contact"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL));
- gtk_container_set_border_width (GTK_CONTAINER(dialog), 5);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
content_area = gtk_dialog_get_content_area (dialog);
@@ -266,7 +266,7 @@ mergeit (EContactMergingLookup *lookup)
break;
case 1:
/*New contact has email that is NOT equal to email in duplicate contact*/
- if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str))) {
+ if ((str && *str) && (g_ascii_strcasecmp (e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str))) {
use_field = E_CONTACT_EMAIL_2;
break;
}
@@ -275,8 +275,8 @@ mergeit (EContactMergingLookup *lookup)
case 2:
/*New contact has email and it is equal to neither of the 2 emails in the duplicate contact*/
if ((str && *str) &&
- (g_ascii_strcasecmp(str,e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1))) &&
- (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str))) {
+ (g_ascii_strcasecmp (str,e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1))) &&
+ (g_ascii_strcasecmp (e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str))) {
use_field = E_CONTACT_EMAIL_3;
break;
}
@@ -285,19 +285,19 @@ mergeit (EContactMergingLookup *lookup)
case 3:
/*New contact has email and it is equal to none of the 3 emails in the duplicate contact*/
if ((str && *str) &&
- (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str)) &&
- (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str)) &&
- (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_3),str)))
+ (g_ascii_strcasecmp (e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str)) &&
+ (g_ascii_strcasecmp (e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str)) &&
+ (g_ascii_strcasecmp (e_contact_get_const (lookup->match, E_CONTACT_EMAIL_3),str)))
use_field = E_CONTACT_EMAIL_4;
else
continue;
}
label = gtk_label_new (_("Email"));
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)label, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1);
- dropdown = gtk_combo_box_new_text();
+ dropdown = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string);
data = g_new0 (dropdown_data, 1);
@@ -311,34 +311,34 @@ mergeit (EContactMergingLookup *lookup)
g_signal_connect (dropdown, "changed", G_CALLBACK(dropdown_changed), data);
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)dropdown, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)dropdown, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 1, 2, row, row + 1);
gtk_widget_show ((GtkWidget *)dropdown);
continue;
}
- if (((field == E_CONTACT_FULL_NAME) && (!g_ascii_strcasecmp(string, string1)))) {
+ if (((field == E_CONTACT_FULL_NAME) && (!g_ascii_strcasecmp (string, string1)))) {
row++;
- label = gtk_label_new (e_contact_pretty_name(field));
+ label = gtk_label_new (e_contact_pretty_name (field));
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)label, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1);
label = gtk_label_new (string);
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)label, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget*)hbox, 1, 2, row, row + 1);
continue;
}
/*for all string fields except name and email*/
- if (!(string1 && *string1) || (g_ascii_strcasecmp(string, string1))) {
+ if (!(string1 && *string1) || (g_ascii_strcasecmp (string, string1))) {
row++;
- label = gtk_label_new (e_contact_pretty_name(field));
+ label = gtk_label_new (e_contact_pretty_name (field));
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)label, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1);
data = g_new0 (dropdown_data, 1);
- dropdown = gtk_combo_box_new_text();
+ dropdown = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string);
e_contact_set (lookup->match, field, string);
@@ -356,7 +356,7 @@ mergeit (EContactMergingLookup *lookup)
g_signal_connect (dropdown, "changed", G_CALLBACK(dropdown_changed), data);
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)dropdown, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)dropdown, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 1, 2, row, row + 1);
gtk_widget_show_all ((GtkWidget *)dropdown);
}
@@ -409,23 +409,23 @@ check_if_same (EContact *contact, EContact *match)
case 0:
return FALSE;
case 1:
- if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)))
+ if ((str && *str) && (g_ascii_strcasecmp (e_contact_get_const (match, E_CONTACT_EMAIL_1),str)))
return FALSE;
case 2:
- if ((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) &&
- (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str)))
+ if ((str && *str) && (g_ascii_strcasecmp (str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) &&
+ (g_ascii_strcasecmp (e_contact_get_const (match, E_CONTACT_EMAIL_2),str)))
return FALSE;
case 3:
- if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) &&
- (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str)) &&
- (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_3),str)))
+ if ((str && *str) && (g_ascii_strcasecmp (e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) &&
+ (g_ascii_strcasecmp (e_contact_get_const (match, E_CONTACT_EMAIL_2),str)) &&
+ (g_ascii_strcasecmp (e_contact_get_const (match, E_CONTACT_EMAIL_3),str)))
return FALSE;
}
}
else {
string = (gchar *)e_contact_get_const (contact, field);
string1 = (gchar *)e_contact_get_const (match, field);
- if ((string && *string) && (string1 && *string1) && (g_ascii_strcasecmp(string1,string)))
+ if ((string && *string) && (string1 && *string1) && (g_ascii_strcasecmp (string1,string)))
return FALSE;
/*if the field entry exist in either of the contacts,we'll have to give the choice and thus merge button should be sensitive*/
else if ((string && *string) && !(string1 && *string1))
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index 7cb962827b..7fa827aa39 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -92,7 +92,7 @@ free_data (EAddressbookModel *model)
}
static void
-remove_book_view(EAddressbookModel *model)
+remove_book_view (EAddressbookModel *model)
{
if (model->priv->book_view && model->priv->create_contact_id)
g_signal_handler_disconnect (
@@ -178,7 +178,7 @@ create_contact (EBookView *book_view,
}
static void
-remove_contact(EBookView *book_view,
+remove_contact (EBookView *book_view,
GList *ids,
EAddressbookModel *model)
{
@@ -229,7 +229,7 @@ remove_contact(EBookView *book_view,
}
static void
-modify_contact(EBookView *book_view,
+modify_contact (EBookView *book_view,
const GList *contact_list,
EAddressbookModel *model)
{
@@ -365,7 +365,7 @@ addressbook_model_idle_cb (EAddressbookModel *model)
if (limit_str && *limit_str)
limit = atoi (limit_str);
- remove_book_view(model);
+ remove_book_view (model);
if (model->priv->first_get_view) {
model->priv->first_get_view = FALSE;
@@ -456,7 +456,7 @@ addressbook_model_get_property (GObject *object,
static void
addressbook_model_dispose (GObject *object)
{
- EAddressbookModel *model = E_ADDRESSBOOK_MODEL(object);
+ EAddressbookModel *model = E_ADDRESSBOOK_MODEL (object);
remove_book_view (model);
free_data (model);
diff --git a/addressbook/gui/widgets/e-addressbook-model.h b/addressbook/gui/widgets/e-addressbook-model.h
index 8dcc4060e0..44b22df4cd 100644
--- a/addressbook/gui/widgets/e-addressbook-model.h
+++ b/addressbook/gui/widgets/e-addressbook-model.h
@@ -104,8 +104,8 @@ gint e_addressbook_model_find (EAddressbookModel *model,
EBook * e_addressbook_model_get_book (EAddressbookModel *model);
void e_addressbook_model_set_book (EAddressbookModel *model,
EBook *book);
-gboolean e_addressbook_model_get_editable(EAddressbookModel *model);
-void e_addressbook_model_set_editable(EAddressbookModel *model,
+gboolean e_addressbook_model_get_editable (EAddressbookModel *model);
+void e_addressbook_model_set_editable (EAddressbookModel *model,
gboolean editable);
gchar * e_addressbook_model_get_query (EAddressbookModel *model);
void e_addressbook_model_set_query (EAddressbookModel *model,
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index 60ef7d0026..928d9aa023 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -59,7 +59,7 @@ enum {
static guint signals[LAST_SIGNAL] = {0, };
static void
-unlink_model(EAddressbookReflowAdapter *adapter)
+unlink_model (EAddressbookReflowAdapter *adapter)
{
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
@@ -108,9 +108,9 @@ text_height (PangoLayout *layout, const gchar *text)
}
static void
-addressbook_dispose(GObject *object)
+addressbook_dispose (GObject *object)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
unlink_model (adapter);
}
@@ -124,7 +124,7 @@ addressbook_set_width (EReflowModel *erm, gint width)
static gint
addressbook_count (EReflowModel *erm)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
return e_addressbook_model_contact_count (priv->model);
@@ -134,7 +134,7 @@ addressbook_count (EReflowModel *erm)
static gint
addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
EContactField field;
gint count = 0;
@@ -146,9 +146,9 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
layout = gtk_widget_create_pango_layout (
GTK_WIDGET (GNOME_CANVAS_ITEM (parent)->canvas), "");
- string = e_contact_get(contact, E_CONTACT_FILE_AS);
+ string = e_contact_get (contact, E_CONTACT_FILE_AS);
height = text_height (layout, string ? string : "") + 10.0;
- g_free(string);
+ g_free (string);
for (field = E_CONTACT_FULL_NAME;
field != E_CONTACT_LAST_SIMPLE_STRING && count < 5; field++) {
@@ -156,12 +156,12 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME)
continue;
- string = e_contact_get(contact, field);
+ string = e_contact_get (contact, field);
if (string && *string) {
gint this_height;
gint field_text_height;
- this_height = text_height (layout, e_contact_pretty_name(field));
+ this_height = text_height (layout, e_contact_pretty_name (field));
field_text_height = text_height (layout, string);
if (this_height < field_text_height)
@@ -184,7 +184,7 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
static gint
addressbook_compare (EReflowModel *erm, gint n1, gint n2)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
EContact *contact1, *contact2;
@@ -201,7 +201,7 @@ addressbook_compare (EReflowModel *erm, gint n1, gint n2)
file_as1 = e_contact_get_const (contact1, E_CONTACT_FILE_AS);
file_as2 = e_contact_get_const (contact2, E_CONTACT_FILE_AS);
if (file_as1 && file_as2)
- return g_utf8_collate(file_as1, file_as2);
+ return g_utf8_collate (file_as1, file_as2);
if (file_as1)
return -1;
if (file_as2)
@@ -209,7 +209,7 @@ addressbook_compare (EReflowModel *erm, gint n1, gint n2)
uid1 = e_contact_get_const (contact1, E_CONTACT_UID);
uid2 = e_contact_get_const (contact2, E_CONTACT_UID);
if (uid1 && uid2)
- return strcmp(uid1, uid2);
+ return strcmp (uid1, uid2);
if (uid1)
return -1;
if (uid2)
@@ -248,19 +248,19 @@ adapter_open_contact (EMinicard *card,
static GnomeCanvasItem *
addressbook_incarnate (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
GnomeCanvasItem *item;
- item = gnome_canvas_item_new(parent,
- e_minicard_get_type(),
+ item = gnome_canvas_item_new (parent,
+ e_minicard_get_type (),
"contact", e_addressbook_model_contact_at (priv->model, i),
"editable", e_addressbook_model_get_editable (priv->model),
NULL);
#if 0
g_signal_connect (item, "selected",
- G_CALLBACK(card_selected), 0, emvm);
+ G_CALLBACK (card_selected), 0, emvm);
#endif
g_signal_connect (item, "drag_begin",
@@ -275,10 +275,10 @@ addressbook_incarnate (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
static void
addressbook_reincarnate (EReflowModel *erm, gint i, GnomeCanvasItem *item)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- gnome_canvas_item_set(item,
+ gnome_canvas_item_set (item,
"contact", e_addressbook_model_contact_at (priv->model, i),
NULL);
}
@@ -353,7 +353,7 @@ addressbook_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
switch (prop_id) {
@@ -384,7 +384,7 @@ addressbook_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
switch (prop_id) {
@@ -453,7 +453,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class)
signals[DRAG_BEGIN] =
g_signal_new ("drag_begin",
- G_OBJECT_CLASS_TYPE(object_class),
+ G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EAddressbookReflowAdapterClass, drag_begin),
NULL, NULL,
@@ -481,7 +481,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class)
static void
e_addressbook_reflow_adapter_init (GtkObject *object)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
EAddressbookReflowAdapterPrivate *priv;
priv = adapter->priv = g_new0 (EAddressbookReflowAdapterPrivate, 1);
@@ -528,29 +528,29 @@ e_addressbook_reflow_adapter_construct (EAddressbookReflowAdapter *adapter,
priv->model = model;
g_object_ref (priv->model);
- priv->create_contact_id = g_signal_connect(priv->model,
+ priv->create_contact_id = g_signal_connect (priv->model,
"contact_added",
- G_CALLBACK(create_contact),
+ G_CALLBACK (create_contact),
adapter);
- priv->remove_contact_id = g_signal_connect(priv->model,
+ priv->remove_contact_id = g_signal_connect (priv->model,
"contacts_removed",
- G_CALLBACK(remove_contacts),
+ G_CALLBACK (remove_contacts),
adapter);
- priv->modify_contact_id = g_signal_connect(priv->model,
+ priv->modify_contact_id = g_signal_connect (priv->model,
"contact_changed",
- G_CALLBACK(modify_contact),
+ G_CALLBACK (modify_contact),
adapter);
- priv->model_changed_id = g_signal_connect(priv->model,
+ priv->model_changed_id = g_signal_connect (priv->model,
"model_changed",
- G_CALLBACK(model_changed),
+ G_CALLBACK (model_changed),
adapter);
- priv->search_started_id = g_signal_connect(priv->model,
+ priv->search_started_id = g_signal_connect (priv->model,
"search_started",
- G_CALLBACK(search_started),
+ G_CALLBACK (search_started),
adapter);
- priv->search_result_id = g_signal_connect(priv->model,
+ priv->search_result_id = g_signal_connect (priv->model,
"search_result",
- G_CALLBACK(search_result),
+ G_CALLBACK (search_result),
adapter);
}
@@ -563,7 +563,7 @@ e_addressbook_reflow_adapter_new (EAddressbookModel *model)
e_addressbook_reflow_adapter_construct (et, model);
- return E_REFLOW_MODEL(et);
+ return E_REFLOW_MODEL (et);
}
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
index 88e6554299..156f30753e 100644
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c
@@ -44,7 +44,7 @@ static ETableModelClass *parent_class;
#define COLS (E_CONTACT_FIELD_LAST)
static void
-unlink_model(EAddressbookTableAdapter *adapter)
+unlink_model (EAddressbookTableAdapter *adapter)
{
EAddressbookTableAdapterPrivate *priv = adapter->priv;
@@ -68,12 +68,12 @@ unlink_model(EAddressbookTableAdapter *adapter)
}
static void
-addressbook_dispose(GObject *object)
+addressbook_dispose (GObject *object)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(object);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (object);
if (adapter->priv) {
- unlink_model(adapter);
+ unlink_model (adapter);
g_hash_table_remove_all (adapter->priv->emails);
g_hash_table_destroy (adapter->priv->emails);
@@ -97,7 +97,7 @@ addressbook_col_count (ETableModel *etc)
static gint
addressbook_row_count (ETableModel *etc)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
return e_addressbook_model_contact_count (priv->model);
@@ -107,14 +107,14 @@ addressbook_row_count (ETableModel *etc)
static gpointer
addressbook_value_at (ETableModel *etc, gint col, gint row)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
const gchar *value;
if (col >= COLS || row >= e_addressbook_model_contact_count (priv->model))
return NULL;
- value = e_contact_get_const((EContact*)e_addressbook_model_contact_at (priv->model, row), col);
+ value = e_contact_get_const ((EContact*)e_addressbook_model_contact_at (priv->model, row), col);
if (value && *value && (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3)) {
gchar *val = g_hash_table_lookup (priv->emails, value);
@@ -153,7 +153,7 @@ contact_modified_cb (EBook* book, const GError *error,
static void
addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
if (e_addressbook_model_get_editable (priv->model)) {
@@ -166,7 +166,7 @@ addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer va
if (!contact)
return;
- e_table_model_pre_change(etc);
+ e_table_model_pre_change (etc);
if (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3) {
const gchar *old_value = e_contact_get_const (contact, col);
@@ -176,14 +176,14 @@ addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer va
g_hash_table_remove (priv->emails, old_value);
}
- e_contact_set(contact, col, (gpointer) val);
+ e_contact_set (contact, col, (gpointer) val);
eab_merging_book_commit_contact (e_addressbook_model_get_book (priv->model),
contact, contact_modified_cb, etc);
g_object_unref (contact);
/* XXX do we need this? shouldn't the commit_contact generate a changed signal? */
- e_table_model_cell_changed(etc, col, row);
+ e_table_model_cell_changed (etc, col, row);
}
}
@@ -192,7 +192,7 @@ static gboolean
addressbook_is_cell_editable (ETableModel *etc, gint col, gint row)
{
#if 0
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
const EContact *contact;
@@ -201,7 +201,7 @@ addressbook_is_cell_editable (ETableModel *etc, gint col, gint row)
else
contact = NULL;
- if (!e_addressbook_model_editable(priv->model))
+ if (!e_addressbook_model_editable (priv->model))
return FALSE;
else if (contact && e_contact_get ((EContact *) contact, E_CONTACT_IS_LIST))
/* we only allow editing of the name and file as for
@@ -217,7 +217,7 @@ addressbook_is_cell_editable (ETableModel *etc, gint col, gint row)
static void
addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etm);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etm);
EAddressbookTableAdapterPrivate *priv = adapter->priv;
EContact *contact;
gint col;
@@ -238,14 +238,14 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
static gpointer
addressbook_duplicate_value (ETableModel *etc, gint col, gconstpointer value)
{
- return g_strdup(value);
+ return g_strdup (value);
}
/* This function frees the value passed to it. */
static void
addressbook_free_value (ETableModel *etc, gint col, gpointer value)
{
- g_free(value);
+ g_free (value);
}
static gpointer
@@ -263,7 +263,7 @@ addressbook_value_is_empty (ETableModel *etc, gint col, gconstpointer value)
static gchar *
addressbook_value_to_string (ETableModel *etc, gint col, gconstpointer value)
{
- return g_strdup(value);
+ return g_strdup (value);
}
static void
@@ -291,7 +291,7 @@ eab_table_adapter_class_init (GObjectClass *object_class)
static void
eab_table_adapter_init (GObject *object)
{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(object);
+ EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (object);
EAddressbookTableAdapterPrivate *priv;
priv = adapter->priv = g_new0 (EAddressbookTableAdapterPrivate, 1);
@@ -385,21 +385,21 @@ eab_table_adapter_construct (EAddressbookTableAdapter *adapter,
priv->model = model;
g_object_ref (priv->model);
- priv->create_contact_id = g_signal_connect(priv->model,
+ priv->create_contact_id = g_signal_connect (priv->model,
"contact_added",
- G_CALLBACK(create_contact),
+ G_CALLBACK (create_contact),
adapter);
- priv->remove_contact_id = g_signal_connect(priv->model,
+ priv->remove_contact_id = g_signal_connect (priv->model,
"contacts_removed",
- G_CALLBACK(remove_contacts),
+ G_CALLBACK (remove_contacts),
adapter);
- priv->modify_contact_id = g_signal_connect(priv->model,
+ priv->modify_contact_id = g_signal_connect (priv->model,
"contact_changed",
- G_CALLBACK(modify_contact),
+ G_CALLBACK (modify_contact),
adapter);
- priv->model_changed_id = g_signal_connect(priv->model,
+ priv->model_changed_id = g_signal_connect (priv->model,
"model_changed",
- G_CALLBACK(model_changed),
+ G_CALLBACK (model_changed),
adapter);
priv->emails = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, (GDestroyNotify) g_free);
@@ -410,9 +410,9 @@ eab_table_adapter_new (EAddressbookModel *model)
{
EAddressbookTableAdapter *et;
- et = g_object_new(E_TYPE_AB_TABLE_ADAPTER, NULL);
+ et = g_object_new (E_TYPE_AB_TABLE_ADAPTER, NULL);
eab_table_adapter_construct (et, model);
- return E_TABLE_MODEL(et);
+ return E_TABLE_MODEL (et);
}
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 810e56f7b5..bb6e58f7b6 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -316,13 +316,13 @@ addressbook_view_create_table_view (EAddressbookView *view,
g_signal_connect (
widget, "double_click",
- G_CALLBACK(table_double_click), view);
+ G_CALLBACK (table_double_click), view);
g_signal_connect (
widget, "right_click",
- G_CALLBACK(table_right_click), view);
+ G_CALLBACK (table_right_click), view);
g_signal_connect (
widget, "white_space_event",
- G_CALLBACK(table_white_space_event), view);
+ G_CALLBACK (table_white_space_event), view);
g_signal_connect_swapped (
widget, "selection_change",
G_CALLBACK (addressbook_view_emit_selection_change), view);
@@ -748,7 +748,7 @@ addressbook_view_class_init (EAddressbookViewClass *class)
parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (EAddressbookViewPrivate));
- object_class = G_OBJECT_CLASS(class);
+ object_class = G_OBJECT_CLASS (class);
object_class->set_property = addressbook_view_set_property;
object_class->get_property = addressbook_view_get_property;
object_class->dispose = addressbook_view_dispose;
@@ -1174,7 +1174,7 @@ contact_print_button_draw_page (GtkPrintOperation *operation,
while (e_printable_data_left (printable)) {
cairo_save (cr);
- contact_page_draw_footer(operation,context,page_nr++);
+ contact_page_draw_footer (operation,context,page_nr++);
e_printable_print_page (
printable, context, page_width - 16, top_margin + 10, TRUE);
cairo_restore (cr);
@@ -1336,7 +1336,7 @@ addressbook_view_confirm_delete (GtkWindow *parent,
}
void
-e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
+e_addressbook_view_delete_selection (EAddressbookView *view, gboolean is_delete)
{
GList *list, *l;
gboolean plural = FALSE, is_list = FALSE;
@@ -1360,7 +1360,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
list = e_addressbook_view_get_selected (view);
contact = list->data;
- if (g_list_next(list))
+ if (g_list_next (list))
plural = TRUE;
else
name = e_contact_get (contact, E_CONTACT_FILE_AS);
@@ -1382,7 +1382,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
/* confirm delete */
if (is_delete && !addressbook_view_confirm_delete (
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET(view))),
+ GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))),
plural, is_list, name)) {
g_free (name);
g_list_foreach (list, (GFunc) g_object_unref, NULL);
@@ -1393,7 +1393,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
if (e_book_check_static_capability (book, "bulk-remove")) {
GList *ids = NULL;
- for (l=list;l;l=g_list_next(l)) {
+ for (l=list;l;l=g_list_next (l)) {
contact = l->data;
ids = g_list_prepend (ids, (gchar *)e_contact_get_const (contact, E_CONTACT_UID));
@@ -1408,7 +1408,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
g_list_free (ids);
}
else {
- for (l=list;l;l=g_list_next(l)) {
+ for (l=list;l;l=g_list_next (l)) {
contact = l->data;
/* Remove the card. */
e_book_remove_contact_async (book,
@@ -1437,7 +1437,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
select = e_table_model_to_view_row (E_TABLE (etable), row);
/* Sets the cursor, before the deleted row if its the last row */
- if (select == e_table_model_row_count (E_TABLE(etable)->model) - 1)
+ if (select == e_table_model_row_count (E_TABLE (etable)->model) - 1)
select = select - 1;
else
select = select + 1;
@@ -1539,7 +1539,7 @@ view_transfer_contacts (EAddressbookView *view,
eab_transfer_contacts (book, contacts, delete_from_source, parent);
- g_object_unref(book);
+ g_object_unref (book);
}
void
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 3f562a3c47..35b0525e51 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -40,10 +40,10 @@ static void e_minicard_label_get_property (GObject *object, guint prop_id, GVal
static gboolean e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event);
static void e_minicard_label_realize (GnomeCanvasItem *item);
static void e_minicard_label_unrealize (GnomeCanvasItem *item);
-static void e_minicard_label_reflow(GnomeCanvasItem *item, gint flags);
+static void e_minicard_label_reflow (GnomeCanvasItem *item, gint flags);
static void e_minicard_label_style_set (EMinicardLabel *label, GtkStyle *previous_style);
-static void e_minicard_label_resize_children( EMinicardLabel *e_minicard_label );
+static void e_minicard_label_resize_children ( EMinicardLabel *e_minicard_label );
static void set_colors (EMinicardLabel *label);
@@ -193,7 +193,7 @@ e_minicard_label_init (EMinicardLabel *minicard_label)
minicard_label->max_field_name_length = -1;
- e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(minicard_label), e_minicard_label_reflow);
+ e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (minicard_label), e_minicard_label_reflow);
}
static void
@@ -208,12 +208,12 @@ e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *va
switch (prop_id) {
case PROP_WIDTH:
e_minicard_label->width = g_value_get_double (value);
- e_minicard_label_resize_children(e_minicard_label);
+ e_minicard_label_resize_children (e_minicard_label);
e_canvas_item_request_reflow (item);
break;
case PROP_HAS_FOCUS:
if (e_minicard_label->field && (g_value_get_boolean (value) != E_FOCUS_NONE))
- e_canvas_item_grab_focus(e_minicard_label->field, FALSE);
+ e_canvas_item_grab_focus (e_minicard_label->field, FALSE);
break;
case PROP_FIELD:
gnome_canvas_item_set( e_minicard_label->field, "text", g_value_get_string (value), NULL );
@@ -285,16 +285,16 @@ e_minicard_label_realize (GnomeCanvasItem *item)
GnomeCanvasGroup *group;
e_minicard_label = E_MINICARD_LABEL (item);
- group = GNOME_CANVAS_GROUP( item );
+ group = GNOME_CANVAS_GROUP ( item );
- if (GNOME_CANVAS_ITEM_CLASS( parent_class )->realize)
- (* GNOME_CANVAS_ITEM_CLASS( parent_class )->realize) (item);
+ if (GNOME_CANVAS_ITEM_CLASS ( parent_class )->realize)
+ (* GNOME_CANVAS_ITEM_CLASS ( parent_class )->realize) (item);
- e_canvas_item_request_reflow(item);
+ e_canvas_item_request_reflow (item);
e_minicard_label->rect =
- gnome_canvas_item_new( group,
- gnome_canvas_rect_get_type(),
+ gnome_canvas_item_new ( group,
+ gnome_canvas_rect_get_type (),
"x1", (double) 0,
"y1", (double) 0,
"x2", (double) e_minicard_label->width - 1,
@@ -302,8 +302,8 @@ e_minicard_label_realize (GnomeCanvasItem *item)
"outline_color", NULL,
NULL );
e_minicard_label->fieldname =
- gnome_canvas_item_new( group,
- e_text_get_type(),
+ gnome_canvas_item_new ( group,
+ e_text_get_type (),
"anchor", GTK_ANCHOR_NW,
"clip_width", (double) ( e_minicard_label->width / 2 - 4 ),
"clip", TRUE,
@@ -312,11 +312,11 @@ e_minicard_label_realize (GnomeCanvasItem *item)
"draw_background", FALSE,
"im_context", E_CANVAS (item->canvas)->im_context,
NULL );
- e_canvas_item_move_absolute(e_minicard_label->fieldname, 2, 1);
+ e_canvas_item_move_absolute (e_minicard_label->fieldname, 2, 1);
e_minicard_label->field =
- gnome_canvas_item_new( group,
- e_text_get_type(),
+ gnome_canvas_item_new ( group,
+ e_text_get_type (),
"anchor", GTK_ANCHOR_NW,
"clip_width", (double) ( ( e_minicard_label->width + 1 ) / 2 - 4 ),
"clip", TRUE,
@@ -326,18 +326,18 @@ e_minicard_label_realize (GnomeCanvasItem *item)
"draw_background", FALSE,
"im_context", E_CANVAS (item->canvas)->im_context,
NULL );
- e_canvas_item_move_absolute(e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1);
+ e_canvas_item_move_absolute (e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1);
set_colors (e_minicard_label);
- e_canvas_item_request_reflow(item);
+ e_canvas_item_request_reflow (item);
}
static void
e_minicard_label_unrealize (GnomeCanvasItem *item)
{
- if (GNOME_CANVAS_ITEM_CLASS( parent_class )->unrealize)
- (* GNOME_CANVAS_ITEM_CLASS( parent_class )->unrealize) (item);
+ if (GNOME_CANVAS_ITEM_CLASS ( parent_class )->unrealize)
+ (* GNOME_CANVAS_ITEM_CLASS ( parent_class )->unrealize) (item);
}
static gboolean
@@ -356,7 +356,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
parent = GNOME_CANVAS_ITEM (e_minicard_label)->parent;
if (parent)
- e_canvas_item_grab_focus(parent, FALSE);
+ e_canvas_item_grab_focus (parent, FALSE);
}
break;
case GDK_FOCUS_CHANGE: {
@@ -383,14 +383,14 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
break;
}
- if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event)
- return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event);
+ if (GNOME_CANVAS_ITEM_CLASS ( parent_class )->event)
+ return (* GNOME_CANVAS_ITEM_CLASS ( parent_class )->event) (item, event);
else
return 0;
}
static void
-e_minicard_label_resize_children(EMinicardLabel *e_minicard_label)
+e_minicard_label_resize_children (EMinicardLabel *e_minicard_label)
{
gdouble left_width;
gdouble fieldnamewidth;
@@ -403,10 +403,10 @@ e_minicard_label_resize_children(EMinicardLabel *e_minicard_label)
fieldnamewidth = (double) MAX ( left_width, 0 );
fieldwidth = (double) MAX ( e_minicard_label->width - 8 - left_width, 0 );
- gnome_canvas_item_set( e_minicard_label->fieldname,
+ gnome_canvas_item_set ( e_minicard_label->fieldname,
"clip_width", is_rtl ? fieldwidth : fieldnamewidth,
NULL );
- gnome_canvas_item_set( e_minicard_label->field,
+ gnome_canvas_item_set ( e_minicard_label->field,
"clip_width", is_rtl ? fieldnamewidth : fieldwidth,
NULL );
}
@@ -461,9 +461,9 @@ e_minicard_label_style_set (EMinicardLabel *label, GtkStyle *previous_style)
}
static void
-e_minicard_label_reflow(GnomeCanvasItem *item, gint flags)
+e_minicard_label_reflow (GnomeCanvasItem *item, gint flags)
{
- EMinicardLabel *e_minicard_label = E_MINICARD_LABEL(item);
+ EMinicardLabel *e_minicard_label = E_MINICARD_LABEL (item);
gint old_height;
gdouble text_height;
@@ -471,13 +471,13 @@ e_minicard_label_reflow(GnomeCanvasItem *item, gint flags)
old_height = e_minicard_label->height;
- g_object_get(e_minicard_label->fieldname,
+ g_object_get (e_minicard_label->fieldname,
"text_height", &text_height,
NULL);
e_minicard_label->height = text_height;
- g_object_get(e_minicard_label->field,
+ g_object_get (e_minicard_label->field,
"text_height", &text_height,
NULL);
@@ -485,12 +485,12 @@ e_minicard_label_reflow(GnomeCanvasItem *item, gint flags)
e_minicard_label->height = text_height;
e_minicard_label->height += 3;
- gnome_canvas_item_set( e_minicard_label->rect,
+ gnome_canvas_item_set ( e_minicard_label->rect,
"x2", (double) e_minicard_label->width - 1,
"y2", (double) e_minicard_label->height - 1,
NULL );
- gnome_canvas_item_set( e_minicard_label->fieldname,
+ gnome_canvas_item_set ( e_minicard_label->fieldname,
"clip_height", (double) e_minicard_label->height - 3,
NULL );
@@ -499,16 +499,16 @@ e_minicard_label_reflow(GnomeCanvasItem *item, gint flags)
else
left_width = e_minicard_label->width / 2 - 4;
- e_canvas_item_move_absolute(e_minicard_label->field, left_width + 6, 1);
+ e_canvas_item_move_absolute (e_minicard_label->field, left_width + 6, 1);
if (old_height != e_minicard_label->height)
- e_canvas_item_request_parent_reflow(item);
+ e_canvas_item_request_parent_reflow (item);
}
GnomeCanvasItem *
-e_minicard_label_new(GnomeCanvasGroup *parent)
+e_minicard_label_new (GnomeCanvasGroup *parent)
{
- GnomeCanvasItem *item = gnome_canvas_item_new(parent, e_minicard_label_get_type(), NULL);
+ GnomeCanvasItem *item = gnome_canvas_item_new (parent, e_minicard_label_get_type (), NULL);
return item;
}
diff --git a/addressbook/gui/widgets/e-minicard-label.h b/addressbook/gui/widgets/e-minicard-label.h
index b6101a48ee..a845419833 100644
--- a/addressbook/gui/widgets/e-minicard-label.h
+++ b/addressbook/gui/widgets/e-minicard-label.h
@@ -73,7 +73,7 @@ struct _EMinicardLabelClass
};
GType e_minicard_label_get_type (void);
-GnomeCanvasItem *e_minicard_label_new(GnomeCanvasGroup *parent);
+GnomeCanvasItem *e_minicard_label_new (GnomeCanvasGroup *parent);
void e_minicard_label_construct (GnomeCanvasItem *item);
G_END_DECLS
diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c
index c2741d48d6..6751fc99fd 100644
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ b/addressbook/gui/widgets/e-minicard-view-widget.c
@@ -225,20 +225,20 @@ e_minicard_view_widget_set_property (GObject *object,
if (emvw->book)
g_object_unref (emvw->book);
if (g_value_get_object (value)) {
- emvw->book = E_BOOK(g_value_get_object (value));
+ emvw->book = E_BOOK (g_value_get_object (value));
if (emvw->book)
- g_object_ref(emvw->book);
+ g_object_ref (emvw->book);
} else
emvw->book = NULL;
if (emvw->emv)
- g_object_set(emvw->emv,
+ g_object_set (emvw->emv,
"book", emvw->book,
NULL);
break;
case PROP_QUERY:
- emvw->query = g_strdup(g_value_get_string (value));
+ emvw->query = g_strdup (g_value_get_string (value));
if (emvw->emv)
- g_object_set(emvw->emv,
+ g_object_set (emvw->emv,
"query", emvw->query,
NULL);
break;
@@ -295,14 +295,14 @@ e_minicard_view_widget_get_property (GObject *object,
static void
e_minicard_view_widget_dispose (GObject *object)
{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(object);
+ EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (object);
if (view->book) {
g_object_unref (view->book);
view->book = NULL;
}
if (view->query) {
- g_free(view->query);
+ g_free (view->query);
view->query = NULL;
}
@@ -311,8 +311,8 @@ e_minicard_view_widget_dispose (GObject *object)
view->adapter = NULL;
}
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
@@ -360,7 +360,7 @@ right_click (EMinicardView *view, GdkEvent *event, EMinicardViewWidget *widget)
static void
e_minicard_view_widget_style_set (GtkWidget *widget, GtkStyle *previous_style)
{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
+ EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (widget);
GtkStyle *style;
style = gtk_widget_get_style (widget);
@@ -370,34 +370,34 @@ e_minicard_view_widget_style_set (GtkWidget *widget, GtkStyle *previous_style)
view->background, "fill_color_gdk",
&style->base[GTK_STATE_NORMAL], NULL);
- if (GTK_WIDGET_CLASS(parent_class)->style_set)
- GTK_WIDGET_CLASS(parent_class)->style_set (widget, previous_style);
+ if (GTK_WIDGET_CLASS (parent_class)->style_set)
+ GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
}
static void
e_minicard_view_widget_realize (GtkWidget *widget)
{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
+ EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (widget);
GtkStyle *style = gtk_widget_get_style (widget);
- view->background = gnome_canvas_item_new(gnome_canvas_root( GNOME_CANVAS(view) ),
- e_canvas_background_get_type(),
+ view->background = gnome_canvas_item_new (gnome_canvas_root ( GNOME_CANVAS (view) ),
+ e_canvas_background_get_type (),
"fill_color_gdk", &style->base[GTK_STATE_NORMAL],
NULL );
- view->emv = gnome_canvas_item_new(
- gnome_canvas_root( GNOME_CANVAS(view) ),
- e_minicard_view_get_type(),
+ view->emv = gnome_canvas_item_new (
+ gnome_canvas_root ( GNOME_CANVAS (view) ),
+ e_minicard_view_get_type (),
"height", (double) 100,
"minimum_width", (double) 100,
"adapter", view->adapter,
"column_width", view->column_width,
NULL );
- g_signal_connect (E_REFLOW(view->emv)->selection,
+ g_signal_connect (E_REFLOW (view->emv)->selection,
"selection_changed",
G_CALLBACK (selection_change), view);
- g_signal_connect (E_REFLOW(view->emv)->selection,
+ g_signal_connect (E_REFLOW (view->emv)->selection,
"selection_row_changed",
G_CALLBACK (selection_row_change), view);
g_signal_connect (view->emv,
@@ -413,49 +413,49 @@ e_minicard_view_widget_realize (GtkWidget *widget)
"right_click",
G_CALLBACK (right_click), view);
- if (GTK_WIDGET_CLASS(parent_class)->realize)
- GTK_WIDGET_CLASS(parent_class)->realize (widget);
+ if (GTK_WIDGET_CLASS (parent_class)->realize)
+ GTK_WIDGET_CLASS (parent_class)->realize (widget);
}
static void
-e_minicard_view_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
+e_minicard_view_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
- if (GTK_WIDGET_CLASS(parent_class)->size_allocate)
- GTK_WIDGET_CLASS(parent_class)->size_allocate (widget, allocation);
+ if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
+ GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);
if (gtk_widget_get_realized (widget)) {
gdouble width;
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
+ EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (widget);
- gnome_canvas_item_set( view->emv,
+ gnome_canvas_item_set ( view->emv,
"height", (double) allocation->height,
NULL );
- gnome_canvas_item_set( view->emv,
+ gnome_canvas_item_set ( view->emv,
"minimum_width", (double) allocation->width,
NULL );
- g_object_get(view->emv,
+ g_object_get (view->emv,
"width", &width,
NULL);
- width = MAX(width, allocation->width);
+ width = MAX (width, allocation->width);
gnome_canvas_set_scroll_region (GNOME_CANVAS (view), 0, 0, width - 1, allocation->height - 1);
}
}
static void
-e_minicard_view_widget_reflow(ECanvas *canvas)
+e_minicard_view_widget_reflow (ECanvas *canvas)
{
gdouble width;
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(canvas);
+ EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (canvas);
GtkAllocation allocation;
- if (E_CANVAS_CLASS(parent_class)->reflow)
- E_CANVAS_CLASS(parent_class)->reflow (canvas);
+ if (E_CANVAS_CLASS (parent_class)->reflow)
+ E_CANVAS_CLASS (parent_class)->reflow (canvas);
g_object_get (view->emv, "width", &width, NULL);
gtk_widget_get_allocation (GTK_WIDGET (canvas), &allocation);
gnome_canvas_set_scroll_region (
- GNOME_CANVAS(canvas), 0, 0,
+ GNOME_CANVAS (canvas), 0, 0,
MAX (width, allocation.width) - 1,
allocation.height - 1);
}
@@ -479,13 +479,13 @@ e_minicard_view_widget_get_view (EMinicardViewWidget *view)
}
static gboolean
-e_minicard_view_widget_real_focus_in_event(GtkWidget *widget, GdkEventFocus *event)
+e_minicard_view_widget_real_focus_in_event (GtkWidget *widget, GdkEventFocus *event)
{
GnomeCanvas *canvas;
EMinicardViewWidget *view;
canvas = GNOME_CANVAS (widget);
- view = E_MINICARD_VIEW_WIDGET(widget);
+ view = E_MINICARD_VIEW_WIDGET (widget);
if (!canvas->focused_item) {
EReflow *reflow = E_REFLOW (view->emv);
@@ -497,8 +497,8 @@ e_minicard_view_widget_real_focus_in_event(GtkWidget *widget, GdkEventFocus *eve
}
}
- if (GTK_WIDGET_CLASS(parent_class)->focus_in_event)
- return GTK_WIDGET_CLASS(parent_class)->focus_in_event (widget, event);
+ if (GTK_WIDGET_CLASS (parent_class)->focus_in_event)
+ return GTK_WIDGET_CLASS (parent_class)->focus_in_event (widget, event);
return FALSE;
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 18dbc20523..5f542ae66e 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -36,7 +36,7 @@
#include "e-util/e-util.h"
#include "ea-addressbook.h"
-static void e_minicard_view_drag_data_get(GtkWidget *widget,
+static void e_minicard_view_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
@@ -76,7 +76,7 @@ static GtkTargetEntry drag_types[] = {
};
static void
-e_minicard_view_drag_data_get(GtkWidget *widget,
+e_minicard_view_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
@@ -85,7 +85,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget,
{
GdkAtom target;
- if (!E_IS_MINICARD_VIEW(view))
+ if (!E_IS_MINICARD_VIEW (view))
return;
target = gtk_selection_data_get_target (selection_data);
@@ -334,7 +334,7 @@ e_minicard_view_get_property (GObject *object,
static void
e_minicard_view_dispose (GObject *object)
{
- EMinicardView *view = E_MINICARD_VIEW(object);
+ EMinicardView *view = E_MINICARD_VIEW (object);
clear_drag_data (view);
@@ -364,8 +364,8 @@ e_minicard_view_dispose (GObject *object)
view->stop_state_id = 0;
view->adapter = NULL;
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static guint
@@ -410,8 +410,8 @@ e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event)
break;
}
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->event)
- return GNOME_CANVAS_ITEM_CLASS(parent_class)->event(item, event);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->event)
+ return GNOME_CANVAS_ITEM_CLASS (parent_class)->event (item, event);
else
return FALSE;
}
@@ -435,7 +435,7 @@ e_minicard_view_selection_event (EReflow *reflow,
gint i;
for (i = 0; i < reflow->count; i++) {
if (reflow->items[i] == item) {
- e_selection_model_maybe_do_something(reflow->selection, i, 0, 0);
+ e_selection_model_maybe_do_something (reflow->selection, i, 0, 0);
break;
}
}
@@ -445,7 +445,7 @@ e_minicard_view_selection_event (EReflow *reflow,
if (event->button.button == 3) {
return_val = e_minicard_view_right_click (view, event);
if (!return_val)
- e_selection_model_right_click_up(reflow->selection);
+ e_selection_model_right_click_up (reflow->selection);
}
break;
default:
@@ -485,8 +485,8 @@ do_remove (gint i, gpointer user_data)
static gint
compare_to_utf_str (EMinicard *card, const gchar *utf_str)
{
- g_return_val_if_fail(card != NULL, 0);
- g_return_val_if_fail(E_IS_MINICARD(card), 0);
+ g_return_val_if_fail (card != NULL, 0);
+ g_return_val_if_fail (E_IS_MINICARD (card), 0);
if (g_unichar_isdigit (g_utf8_get_char (utf_str))) {
return 1;
@@ -494,7 +494,7 @@ compare_to_utf_str (EMinicard *card, const gchar *utf_str)
if (card->card) {
gchar *file_as;
- g_object_get(card->card,
+ g_object_get (card->card,
"file_as", &file_as,
NULL);
if (file_as)
@@ -583,7 +583,7 @@ e_minicard_view_class_init (EMinicardViewClass *klass)
/* GnomeCanvasItem method overrides */
/* init the accessibility support for e_minicard_view */
- e_minicard_view_a11y_init();
+ e_minicard_view_a11y_init ();
}
static void
@@ -623,7 +623,7 @@ e_minicard_view_get_type (void)
}
void
-e_minicard_view_remove_selection(EMinicardView *view,
+e_minicard_view_remove_selection (EMinicardView *view,
EBookAsyncCallback cb,
gpointer closure)
{
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 0f3a27b798..e5b5fa8310 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -52,8 +52,8 @@ static void e_minicard_unrealize (GnomeCanvasItem *item);
static void e_minicard_reflow ( GnomeCanvasItem *item, gint flags );
static void e_minicard_style_set (EMinicard *minicard, GtkStyle *previous_style);
-static void e_minicard_resize_children( EMinicard *e_minicard );
-static void remodel( EMinicard *e_minicard );
+static void e_minicard_resize_children ( EMinicard *e_minicard );
+static void remodel ( EMinicard *e_minicard );
static gint e_minicard_drag_begin (EMinicard *minicard, GdkEvent *event);
@@ -64,10 +64,10 @@ static gpointer parent_class;
#define LIST_ICON_NAME "stock_contact-list"
static void
-e_minicard_field_destroy(EMinicardField *field)
+e_minicard_field_destroy (EMinicardField *field)
{
- gtk_object_destroy(GTK_OBJECT(field->label));
- g_free(field);
+ gtk_object_destroy (GTK_OBJECT (field->label));
+ g_free (field);
}
/* The arguments we take */
@@ -239,7 +239,7 @@ e_minicard_class_init (EMinicardClass *class)
GTK_TYPE_STYLE);
/* init the accessibility support for e_minicard */
- e_minicard_a11y_init();
+ e_minicard_a11y_init ();
}
static void
@@ -261,7 +261,7 @@ e_minicard_init (EMinicard *minicard)
minicard->changed = FALSE;
- e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(minicard), e_minicard_reflow);
+ e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (minicard), e_minicard_reflow);
}
static void
@@ -301,7 +301,7 @@ static void
set_has_cursor (EMinicard *minicard, gboolean has_cursor)
{
if (!minicard->has_focus && has_cursor)
- e_canvas_item_grab_focus(GNOME_CANVAS_ITEM (minicard), FALSE);
+ e_canvas_item_grab_focus (GNOME_CANVAS_ITEM (minicard), FALSE);
minicard->has_cursor = has_cursor;
}
@@ -320,27 +320,27 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
case PROP_WIDTH:
if (e_minicard->width != g_value_get_double (value)) {
e_minicard->width = g_value_get_double (value);
- e_minicard_resize_children(e_minicard);
+ e_minicard_resize_children (e_minicard);
if (item->flags & GNOME_CANVAS_ITEM_REALIZED)
- e_canvas_item_request_reflow(item);
+ e_canvas_item_request_reflow (item);
}
break;
case PROP_HAS_FOCUS:
if (e_minicard->fields) {
- if ( g_value_get_int(value) == E_FOCUS_START ||
- g_value_get_int(value) == E_FOCUS_CURRENT) {
- gnome_canvas_item_set(E_MINICARD_FIELD(e_minicard->fields->data)->label,
+ if ( g_value_get_int (value) == E_FOCUS_START ||
+ g_value_get_int (value) == E_FOCUS_CURRENT) {
+ gnome_canvas_item_set (E_MINICARD_FIELD (e_minicard->fields->data)->label,
"has_focus", g_value_get_int (value),
NULL);
} else if (g_value_get_int (value) == E_FOCUS_END) {
- gnome_canvas_item_set(E_MINICARD_FIELD(g_list_last(e_minicard->fields)->data)->label,
+ gnome_canvas_item_set (E_MINICARD_FIELD (g_list_last (e_minicard->fields)->data)->label,
"has_focus", g_value_get_int (value),
NULL);
}
}
else {
if (!e_minicard->has_focus)
- e_canvas_item_grab_focus(item, FALSE);
+ e_canvas_item_grab_focus (item, FALSE);
}
break;
case PROP_SELECTED:
@@ -370,8 +370,8 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
e_minicard->contact = contact;
- remodel(e_minicard);
- e_canvas_item_request_reflow(item);
+ remodel (e_minicard);
+ e_canvas_item_request_reflow (item);
e_minicard->changed = FALSE;
break;
default:
@@ -426,8 +426,8 @@ e_minicard_dispose (GObject *object)
e_minicard = E_MINICARD (object);
if (e_minicard->fields) {
- g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL);
- g_list_free(e_minicard->fields);
+ g_list_foreach (e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL);
+ g_list_free (e_minicard->fields);
e_minicard->fields = NULL;
}
@@ -487,12 +487,12 @@ e_minicard_realize (GnomeCanvasItem *item)
canvas = GNOME_CANVAS_ITEM (item)->canvas;
style = gtk_widget_get_style (GTK_WIDGET (canvas));
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize)
- (* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->realize)
+ (* GNOME_CANVAS_ITEM_CLASS (parent_class)->realize) (item);
e_minicard->rect =
- gnome_canvas_item_new( group,
- gnome_canvas_rect_get_type(),
+ gnome_canvas_item_new ( group,
+ gnome_canvas_rect_get_type (),
"x1", (double) 0,
"y1", (double) 0,
"x2", (double) MAX (e_minicard->width - 1, 0),
@@ -501,8 +501,8 @@ e_minicard_realize (GnomeCanvasItem *item)
NULL );
e_minicard->header_rect =
- gnome_canvas_item_new( group,
- gnome_canvas_rect_get_type(),
+ gnome_canvas_item_new ( group,
+ gnome_canvas_rect_get_type (),
"x1", (double) 2,
"y1", (double) 2,
"x2", (double) MAX (e_minicard->width - 3, 0),
@@ -511,8 +511,8 @@ e_minicard_realize (GnomeCanvasItem *item)
NULL );
e_minicard->header_text =
- gnome_canvas_item_new( group,
- e_text_get_type(),
+ gnome_canvas_item_new ( group,
+ e_text_get_type (),
"anchor", GTK_ANCHOR_NW,
"width", (double) MAX( e_minicard->width - 12, 0 ),
"clip", TRUE,
@@ -522,25 +522,25 @@ e_minicard_realize (GnomeCanvasItem *item)
"draw_background", FALSE,
NULL );
- e_canvas_item_move_absolute(e_minicard->header_text, 6, 6);
+ e_canvas_item_move_absolute (e_minicard->header_text, 6, 6);
e_minicard->list_icon =
gnome_canvas_item_new ( group,
- gnome_canvas_pixbuf_get_type(),
+ gnome_canvas_pixbuf_get_type (),
"pixbuf", e_minicard->list_icon_pixbuf,
NULL);
set_selected (e_minicard, e_minicard->selected);
- remodel(e_minicard);
- e_canvas_item_request_reflow(item);
+ remodel (e_minicard);
+ e_canvas_item_request_reflow (item);
}
static void
e_minicard_unrealize (GnomeCanvasItem *item)
{
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize)
- (* GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) (item);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize)
+ (* GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) (item);
}
void
@@ -567,7 +567,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
/* Chris: When EMinicard gets the cursor, if it doesn't have the focus, it should take it. */
e_minicard->has_focus = TRUE;
if (!e_minicard->selected) {
- e_minicard_selected(e_minicard, event);
+ e_minicard_selected (e_minicard, event);
}
}
else {
@@ -577,13 +577,13 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
break;
case GDK_BUTTON_PRESS: {
if (1 <= event->button.button && event->button.button <= 2) {
- gint ret_val = e_minicard_selected(e_minicard, event);
+ gint ret_val = e_minicard_selected (e_minicard, event);
GdkEventMask mask = ((1 << (4 + event->button.button)) |
GDK_POINTER_MOTION_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK);
- e_canvas_item_grab_focus(item, TRUE);
+ e_canvas_item_grab_focus (item, TRUE);
if (gnome_canvas_item_grab (GNOME_CANVAS_ITEM (e_minicard),
mask, NULL, event->button.time)) {
@@ -596,14 +596,14 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
e_minicard->drag_button_down = TRUE;
return ret_val;
} else if (event->button.button == 3) {
- gint ret_val = e_minicard_selected(e_minicard, event);
+ gint ret_val = e_minicard_selected (e_minicard, event);
if (ret_val != 0)
return ret_val;
}
break;
}
case GDK_BUTTON_RELEASE:
- e_minicard_selected(e_minicard, event);
+ e_minicard_selected (e_minicard, event);
if (e_minicard->drag_button == event->button.button) {
e_minicard->drag_button = 0;
e_minicard->drag_button_down = FALSE;
@@ -622,7 +622,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
abs (e_minicard->button_y - event->motion.y)) > 3) {
gint ret_val;
- ret_val = e_minicard_drag_begin(e_minicard, event);
+ ret_val = e_minicard_drag_begin (e_minicard, event);
e_minicard->drag_button_down = FALSE;
@@ -642,7 +642,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
event->key.keyval == GDK_ISO_Left_Tab) {
EMinicardView *view = E_MINICARD_VIEW (item->parent);
- EReflow *reflow = E_REFLOW(view);
+ EReflow *reflow = E_REFLOW (view);
if (reflow == NULL) {
return FALSE;
@@ -679,7 +679,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
return FALSE;
}
else {
- gint row_count = e_selection_model_row_count(reflow->selection);
+ gint row_count = e_selection_model_row_count (reflow->selection);
gint model_index = e_selection_model_cursor_row (reflow->selection);
gint view_index = e_sorter_model_to_sorted (reflow->selection->sorter, model_index);
@@ -696,7 +696,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
NULL);
}
- e_canvas_item_grab_focus(reflow->items[model_index], FALSE);
+ e_canvas_item_grab_focus (reflow->items[model_index], FALSE);
return TRUE;
}
}
@@ -711,31 +711,31 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
break;
}
- if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event)
- return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event);
+ if (GNOME_CANVAS_ITEM_CLASS ( parent_class )->event)
+ return (* GNOME_CANVAS_ITEM_CLASS ( parent_class )->event) (item, event);
else
return FALSE;
}
static void
-e_minicard_resize_children( EMinicard *e_minicard )
+e_minicard_resize_children ( EMinicard *e_minicard )
{
GList *list;
gboolean is_list = GPOINTER_TO_INT (e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST));
if (e_minicard->header_text) {
- gnome_canvas_item_set( e_minicard->header_text,
+ gnome_canvas_item_set ( e_minicard->header_text,
"width", ((double) e_minicard->width - 12
- (is_list ? e_minicard->list_icon_size : 0.0)),
NULL );
}
if (e_minicard->list_icon) {
- e_canvas_item_move_absolute(e_minicard->list_icon,
+ e_canvas_item_move_absolute (e_minicard->list_icon,
e_minicard->width - e_minicard->list_icon_size - 3,
3);
}
- for (list = e_minicard->fields; list; list = g_list_next( list )) {
- gnome_canvas_item_set( E_MINICARD_FIELD( list->data )->label,
+ for (list = e_minicard->fields; list; list = g_list_next ( list )) {
+ gnome_canvas_item_set ( E_MINICARD_FIELD ( list->data )->label,
"width", (double) e_minicard->width - 4.0,
NULL );
}
@@ -751,12 +751,12 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width)
gchar *string;
gboolean is_rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL);
- group = GNOME_CANVAS_GROUP( e_minicard );
+ group = GNOME_CANVAS_GROUP ( e_minicard );
name = g_strdup_printf("%s:", e_contact_pretty_name (field));
string = e_contact_get (e_minicard->contact, field);
- new_item = e_minicard_label_new(group);
+ new_item = e_minicard_label_new (group);
if (e_minicard->contact && e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST))
gnome_canvas_item_set (new_item,
@@ -776,22 +776,22 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width)
NULL );
#ifdef notyet
- g_object_set(E_MINICARD_LABEL(new_item)->field,
+ g_object_set (E_MINICARD_LABEL (new_item)->field,
"allow_newlines", e_card_simple_get_allow_newlines (e_minicard->contact, field),
NULL);
#endif
- g_object_set_data(G_OBJECT (E_MINICARD_LABEL(new_item)->field),
+ g_object_set_data (G_OBJECT (E_MINICARD_LABEL (new_item)->field),
"EMinicard:field",
- GINT_TO_POINTER(field));
+ GINT_TO_POINTER (field));
- minicard_field = g_new(EMinicardField, 1);
+ minicard_field = g_new (EMinicardField, 1);
minicard_field->field = field;
minicard_field->label = new_item;
- e_minicard->fields = g_list_append( e_minicard->fields, minicard_field);
- e_canvas_item_move_absolute(new_item, 2, e_minicard->height);
- g_free(name);
- g_free(string);
+ e_minicard->fields = g_list_append ( e_minicard->fields, minicard_field);
+ e_canvas_item_move_absolute (new_item, 2, e_minicard->height);
+ g_free (name);
+ g_free (string);
}
static const gchar *
@@ -818,7 +818,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g
gint count =0;
gboolean is_rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL);
GList *emails = e_contact_get (e_minicard->contact, E_CONTACT_EMAIL);
- group = GNOME_CANVAS_GROUP( e_minicard );
+ group = GNOME_CANVAS_GROUP ( e_minicard );
for (l=email_list, le=emails; l!=NULL && count < limit && le!=NULL; l = l->next, le=le->next) {
const gchar *tmp;
@@ -844,7 +844,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g
string = g_strdup (le->data);
}
- new_item = e_minicard_label_new(group);
+ new_item = e_minicard_label_new (group);
gnome_canvas_item_set (new_item,
"fieldname", is_rtl ? string : name,
@@ -855,20 +855,20 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g
NULL );
#ifdef notyet
- g_object_set(E_MINICARD_LABEL(new_item)->field,
+ g_object_set (E_MINICARD_LABEL (new_item)->field,
"allow_newlines", e_card_simple_get_allow_newlines (e_minicard->contact, field),
NULL);
#endif
- g_object_set_data(G_OBJECT (E_MINICARD_LABEL(new_item)->field),
+ g_object_set_data (G_OBJECT (E_MINICARD_LABEL (new_item)->field),
"EMinicard:field",
- GINT_TO_POINTER(E_CONTACT_EMAIL));
+ GINT_TO_POINTER (E_CONTACT_EMAIL));
- minicard_field = g_new(EMinicardField, 1);
+ minicard_field = g_new (EMinicardField, 1);
minicard_field->field = E_CONTACT_EMAIL;
minicard_field->label = new_item;
- e_minicard->fields = g_list_append( e_minicard->fields, minicard_field);
- e_canvas_item_move_absolute(new_item, 2, e_minicard->height);
+ e_minicard->fields = g_list_append ( e_minicard->fields, minicard_field);
+ e_canvas_item_move_absolute (new_item, 2, e_minicard->height);
count++;
if (!is_list)
g_free (name);
@@ -903,14 +903,14 @@ get_left_width (EMinicard *e_minicard, gboolean is_list)
pango_layout_get_pixel_size (layout, &this_width, NULL);
if (width < this_width)
width = this_width;
- g_free(name);
+ g_free (name);
}
g_object_unref (layout);
return width;
}
static void
-remodel( EMinicard *e_minicard )
+remodel ( EMinicard *e_minicard )
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (e_minicard);
gint count = 0;
@@ -931,7 +931,7 @@ remodel( EMinicard *e_minicard )
gnome_canvas_item_set (e_minicard->header_text,
"text", file_as ? file_as : "",
NULL );
- g_free(file_as);
+ g_free (file_as);
}
if (e_minicard->contact && e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST))
@@ -967,18 +967,18 @@ remodel( EMinicard *e_minicard )
GList *this_list = list;
gchar *string;
- string = e_contact_get(e_minicard->contact, field);
+ string = e_contact_get (e_minicard->contact, field);
if (string && *string) {
- e_minicard->fields = g_list_append(e_minicard->fields, minicard_field);
- g_object_set(minicard_field->label,
+ e_minicard->fields = g_list_append (e_minicard->fields, minicard_field);
+ g_object_set (minicard_field->label,
"field", string,
NULL);
count++;
} else {
- e_minicard_field_destroy(minicard_field);
+ e_minicard_field_destroy (minicard_field);
}
- list = g_list_delete_link(list, this_list);
- g_free(string);
+ list = g_list_delete_link (list, this_list);
+ g_free (string);
} else {
gchar *string;
if (left_width == -1) {
@@ -998,25 +998,25 @@ remodel( EMinicard *e_minicard )
count = count + g_list_length (email);
g_list_free (email);
} else {
- string = e_contact_get(e_minicard->contact, field);
+ string = e_contact_get (e_minicard->contact, field);
if (string && *string) {
- add_field(e_minicard, field, left_width);
+ add_field (e_minicard, field, left_width);
count++;
}
- g_free(string);
+ g_free (string);
}
}
}
- g_list_foreach(list, (GFunc) e_minicard_field_destroy, NULL);
- g_list_free(list);
+ g_list_foreach (list, (GFunc) e_minicard_field_destroy, NULL);
+ g_list_free (list);
}
}
static void
-e_minicard_reflow(GnomeCanvasItem *item, gint flags)
+e_minicard_reflow (GnomeCanvasItem *item, gint flags)
{
- EMinicard *e_minicard = E_MINICARD(item);
+ EMinicard *e_minicard = E_MINICARD (item);
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
GList *list;
@@ -1025,46 +1025,46 @@ e_minicard_reflow(GnomeCanvasItem *item, gint flags)
old_height = e_minicard->height;
- g_object_get(e_minicard->header_text,
+ g_object_get (e_minicard->header_text,
"text_height", &text_height,
NULL);
e_minicard->height = text_height + 10.0;
- gnome_canvas_item_set(e_minicard->header_rect,
+ gnome_canvas_item_set (e_minicard->header_rect,
"y2", text_height + 9.0,
NULL);
- for (list = e_minicard->fields; list; list = g_list_next(list)) {
- EMinicardField *field = E_MINICARD_FIELD(list->data);
+ for (list = e_minicard->fields; list; list = g_list_next (list)) {
+ EMinicardField *field = E_MINICARD_FIELD (list->data);
/* Why not use the item that is passed in? */
GnomeCanvasItem *item = field->label;
g_object_get (item,
"height", &text_height,
NULL);
- e_canvas_item_move_absolute(item, 2, e_minicard->height);
+ e_canvas_item_move_absolute (item, 2, e_minicard->height);
e_minicard->height += text_height;
}
e_minicard->height += 2;
- gnome_canvas_item_set(e_minicard->rect,
+ gnome_canvas_item_set (e_minicard->rect,
"x2", (double) e_minicard->width - 1.0,
"y2", (double) e_minicard->height - 1.0,
NULL);
- gnome_canvas_item_set(e_minicard->header_rect,
+ gnome_canvas_item_set (e_minicard->header_rect,
"x2", (double) e_minicard->width - 3.0,
NULL);
if (old_height != e_minicard->height)
- e_canvas_item_request_parent_reflow(item);
+ e_canvas_item_request_parent_reflow (item);
}
}
const gchar *
e_minicard_get_card_id (EMinicard *minicard)
{
- g_return_val_if_fail(minicard != NULL, NULL);
- g_return_val_if_fail(E_IS_MINICARD(minicard), NULL);
+ g_return_val_if_fail (minicard != NULL, NULL);
+ g_return_val_if_fail (E_IS_MINICARD (minicard), NULL);
if (minicard->contact) {
return e_contact_get_const (minicard->contact, E_CONTACT_UID);
@@ -1078,28 +1078,28 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2)
{
gint cmp = 0;
- g_return_val_if_fail(minicard1 != NULL, 0);
- g_return_val_if_fail(E_IS_MINICARD(minicard1), 0);
- g_return_val_if_fail(minicard2 != NULL, 0);
- g_return_val_if_fail(E_IS_MINICARD(minicard2), 0);
+ g_return_val_if_fail (minicard1 != NULL, 0);
+ g_return_val_if_fail (E_IS_MINICARD (minicard1), 0);
+ g_return_val_if_fail (minicard2 != NULL, 0);
+ g_return_val_if_fail (E_IS_MINICARD (minicard2), 0);
if (minicard1->contact && minicard2->contact) {
gchar *file_as1, *file_as2;
- g_object_get(minicard1->contact,
+ g_object_get (minicard1->contact,
"file_as", &file_as1,
NULL);
- g_object_get(minicard2->contact,
+ g_object_get (minicard2->contact,
"file_as", &file_as2,
NULL);
if (file_as1 && file_as2)
- cmp = g_utf8_collate(file_as1, file_as2);
+ cmp = g_utf8_collate (file_as1, file_as2);
else if (file_as1)
cmp = -1;
else if (file_as2)
cmp = 1;
else
- cmp = strcmp(e_minicard_get_card_id(minicard1), e_minicard_get_card_id(minicard2));
+ cmp = strcmp (e_minicard_get_card_id (minicard1), e_minicard_get_card_id (minicard2));
g_free (file_as1);
g_free (file_as2);
@@ -1120,7 +1120,7 @@ e_minicard_selected (EMinicard *minicard, GdkEvent *event)
* it.
*/
if (signal_id != 0) {
- g_signal_emit(item->parent,
+ g_signal_emit (item->parent,
signal_id, 0,
item, event, &ret_val);
}
diff --git a/addressbook/gui/widgets/ea-addressbook-view.c b/addressbook/gui/widgets/ea-addressbook-view.c
index b2d7ebb171..f0096e6489 100644
--- a/addressbook/gui/widgets/ea-addressbook-view.c
+++ b/addressbook/gui/widgets/ea-addressbook-view.c
@@ -88,7 +88,7 @@ ea_ab_view_class_init (EAddressbookViewClass *class)
static G_CONST_RETURN gchar *
ea_ab_view_get_name (AtkObject *accessible)
{
- g_return_val_if_fail (EA_IS_AB_VIEW(accessible), NULL);
+ g_return_val_if_fail (EA_IS_AB_VIEW (accessible), NULL);
if (accessible->name)
return accessible->name;
@@ -110,8 +110,8 @@ ea_ab_view_new (GObject *obj)
GObject *object;
AtkObject *accessible;
- g_return_val_if_fail(obj != NULL, NULL);
- g_return_val_if_fail (E_IS_ADDRESSBOOK_VIEW(obj), NULL);
+ g_return_val_if_fail (obj != NULL, NULL);
+ g_return_val_if_fail (E_IS_ADDRESSBOOK_VIEW (obj), NULL);
object = g_object_new (EA_TYPE_AB_VIEW, NULL);
diff --git a/addressbook/gui/widgets/ea-addressbook-view.h b/addressbook/gui/widgets/ea-addressbook-view.h
index 6179b6758e..db9e008ab1 100644
--- a/addressbook/gui/widgets/ea-addressbook-view.h
+++ b/addressbook/gui/widgets/ea-addressbook-view.h
@@ -48,7 +48,7 @@ struct _EaABViewClass
};
GType ea_ab_view_get_type (void);
-AtkObject* ea_ab_view_new(GObject *obj);
+AtkObject* ea_ab_view_new (GObject *obj);
G_END_DECLS
diff --git a/addressbook/gui/widgets/ea-addressbook.c b/addressbook/gui/widgets/ea-addressbook.c
index 14fc4c1ca3..797d76d956 100644
--- a/addressbook/gui/widgets/ea-addressbook.c
+++ b/addressbook/gui/widgets/ea-addressbook.c
@@ -47,7 +47,7 @@ void e_minicard_view_a11y_init (void)
if (atk_get_root ()) {
g_signal_add_emission_hook (g_signal_lookup ("event",
- e_minicard_get_type()),
+ e_minicard_get_type ()),
0, ea_addressbook_focus_watcher,
NULL, (GDestroyNotify) NULL);
}
diff --git a/addressbook/gui/widgets/ea-minicard-view.c b/addressbook/gui/widgets/ea-minicard-view.c
index 52624296a3..bb38b64ecc 100644
--- a/addressbook/gui/widgets/ea-minicard-view.c
+++ b/addressbook/gui/widgets/ea-minicard-view.c
@@ -42,7 +42,7 @@ static void ea_minicard_view_class_init (EaMinicardViewClass *klass);
static gint ea_minicard_view_get_n_children (AtkObject *obj);
static AtkObject *ea_minicard_view_ref_child (AtkObject *obj, gint i);
-static AtkStateSet *ea_minicard_view_ref_state_set(AtkObject *obj);
+static AtkStateSet *ea_minicard_view_ref_state_set (AtkObject *obj);
static void atk_selection_interface_init (AtkSelectionIface *iface);
static gboolean selection_interface_add_selection (AtkSelection *selection,
@@ -170,14 +170,14 @@ ea_minicard_view_get_name (AtkObject *accessible)
ATK_OBJECT_CLASS (parent_class)->set_name (accessible, string);
g_free (string);
- g_object_unref(book);
+ g_object_unref (book);
return accessible->name;
}
static G_CONST_RETURN gchar *
ea_minicard_view_get_description (AtkObject *accessible)
{
- g_return_val_if_fail (EA_IS_MINICARD_VIEW(accessible), NULL);
+ g_return_val_if_fail (EA_IS_MINICARD_VIEW (accessible), NULL);
if (accessible->description)
return accessible->description;
@@ -190,7 +190,7 @@ ea_minicard_view_new (GObject *obj)
GObject *object;
AtkObject *accessible;
- g_return_val_if_fail (E_IS_MINICARD_VIEW(obj), NULL);
+ g_return_val_if_fail (E_IS_MINICARD_VIEW (obj), NULL);
object = g_object_new (EA_TYPE_MINICARD_VIEW, NULL);
accessible = ATK_OBJECT (object);
atk_object_initialize (accessible, obj);
@@ -208,7 +208,7 @@ ea_minicard_view_get_n_children (AtkObject *accessible)
g_return_val_if_fail (EA_IS_MINICARD_VIEW (accessible), -1);
reflow = E_REFLOW (atk_gobject_accessible_get_object (
- ATK_GOBJECT_ACCESSIBLE(accessible)));
+ ATK_GOBJECT_ACCESSIBLE (accessible)));
if (!reflow)
return -1;
@@ -309,7 +309,7 @@ selection_interface_clear_selection (AtkSelection *selection)
EReflow *reflow = NULL;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (selection);
- reflow = E_REFLOW(atk_gobject_accessible_get_object (atk_gobj));
+ reflow = E_REFLOW (atk_gobject_accessible_get_object (atk_gobj));
if (!reflow)
return FALSE;
@@ -347,7 +347,7 @@ selection_interface_is_child_selected (AtkSelection *selection, gint i)
EReflow *reflow = NULL;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (selection);
- reflow = E_REFLOW(atk_gobject_accessible_get_object (atk_gobj));
+ reflow = E_REFLOW (atk_gobject_accessible_get_object (atk_gobj));
if (!reflow)
return FALSE;
diff --git a/addressbook/gui/widgets/ea-minicard-view.h b/addressbook/gui/widgets/ea-minicard-view.h
index cc8eaecae7..320c74d15e 100644
--- a/addressbook/gui/widgets/ea-minicard-view.h
+++ b/addressbook/gui/widgets/ea-minicard-view.h
@@ -49,7 +49,7 @@ struct _EaMinicardViewClass
GType ea_minicard_view_get_type (void);
-AtkObject* ea_minicard_view_new(GObject *obj);
+AtkObject* ea_minicard_view_new (GObject *obj);
G_END_DECLS
diff --git a/addressbook/gui/widgets/ea-minicard.c b/addressbook/gui/widgets/ea-minicard.c
index 19ee25b9e5..9bf6742247 100644
--- a/addressbook/gui/widgets/ea-minicard.c
+++ b/addressbook/gui/widgets/ea-minicard.c
@@ -139,11 +139,11 @@ ea_minicard_get_name (AtkObject *accessible)
gchar *string;
EMinicard *card;
- g_return_val_if_fail (EA_IS_MINICARD(accessible), NULL);
+ g_return_val_if_fail (EA_IS_MINICARD (accessible), NULL);
memset (name, '\0', BUFFERSIZE);
- card = E_MINICARD(atk_gobject_accessible_get_object
- (ATK_GOBJECT_ACCESSIBLE(accessible)));
+ card = E_MINICARD (atk_gobject_accessible_get_object
+ (ATK_GOBJECT_ACCESSIBLE (accessible)));
if (!card)
return NULL;
@@ -186,8 +186,8 @@ ea_minicard_new (GObject *obj)
GObject *object;
AtkObject *accessible;
- g_return_val_if_fail(obj != NULL, NULL);
- g_return_val_if_fail (E_IS_MINICARD(obj), NULL);
+ g_return_val_if_fail (obj != NULL, NULL);
+ g_return_val_if_fail (E_IS_MINICARD (obj), NULL);
object = g_object_new (EA_TYPE_MINICARD, NULL);
accessible = ATK_OBJECT (object);
diff --git a/addressbook/gui/widgets/ea-minicard.h b/addressbook/gui/widgets/ea-minicard.h
index 8b49ab6284..d4c96fa787 100644
--- a/addressbook/gui/widgets/ea-minicard.h
+++ b/addressbook/gui/widgets/ea-minicard.h
@@ -49,7 +49,7 @@ struct _EaMinicardClass
};
GType ea_minicard_get_type (void);
-AtkObject* ea_minicard_new(GObject *obj);
+AtkObject* ea_minicard_new (GObject *obj);
G_END_DECLS
diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c
index f47a696195..79ba6c8445 100644
--- a/addressbook/gui/widgets/eab-config.c
+++ b/addressbook/gui/widgets/eab-config.c
@@ -42,7 +42,7 @@ ecp_init (GObject *o)
static void
ecp_target_free (EConfig *ec, EConfigTarget *t)
{
- struct _EABConfigPrivate *p = _PRIVATE(ec);
+ struct _EABConfigPrivate *p = _PRIVATE (ec);
if (ec->target == t) {
switch (t->type) {
@@ -50,7 +50,7 @@ ecp_target_free (EConfig *ec, EConfigTarget *t)
EABConfigTargetSource *s = (EABConfigTargetSource *)t;
if (p->source_changed_id) {
- g_signal_handler_disconnect(s->source, p->source_changed_id);
+ g_signal_handler_disconnect (s->source, p->source_changed_id);
p->source_changed_id = 0;
}
break; }
@@ -70,17 +70,17 @@ ecp_target_free (EConfig *ec, EConfigTarget *t)
}
static void
-ecp_source_changed(struct _ESource *source, EConfig *ec)
+ecp_source_changed (struct _ESource *source, EConfig *ec)
{
- e_config_target_changed(ec, E_CONFIG_TARGET_CHANGED_STATE);
+ e_config_target_changed (ec, E_CONFIG_TARGET_CHANGED_STATE);
}
static void
ecp_set_target (EConfig *ec, EConfigTarget *t)
{
- struct _EABConfigPrivate *p = _PRIVATE(ec);
+ struct _EABConfigPrivate *p = _PRIVATE (ec);
- ((EConfigClass *)ecp_parent_class)->set_target(ec, t);
+ ((EConfigClass *)ecp_parent_class)->set_target (ec, t);
if (t) {
switch (t->type) {
@@ -99,7 +99,7 @@ ecp_class_init (GObjectClass *klass)
((EConfigClass *)klass)->set_target = ecp_set_target;
((EConfigClass *)klass)->target_free = ecp_target_free;
- g_type_class_add_private(klass, sizeof(struct _EABConfigPrivate));
+ g_type_class_add_private (klass, sizeof (struct _EABConfigPrivate));
}
GType
@@ -127,7 +127,7 @@ eab_config_get_type (void)
EABConfig *
eab_config_new (gint type, const gchar *menuid)
{
- EABConfig *ecp = g_object_new (eab_config_get_type(), NULL);
+ EABConfig *ecp = g_object_new (eab_config_get_type (), NULL);
e_config_construct (&ecp->config, type, menuid);
return ecp;
}
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index 9ca8033291..4cf5219e71 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -312,7 +312,7 @@ do_delete (gpointer data, gpointer user_data)
const gchar *id;
id = e_contact_get_const (contact, E_CONTACT_UID);
- e_book_remove_contact(book, id, NULL);
+ e_book_remove_contact (book, id, NULL);
}
static void
@@ -374,7 +374,7 @@ do_copy (gpointer data, gpointer user_data)
book = process->destination;
process->count++;
- eab_merging_book_add_contact(book, contact, contact_added_cb, process);
+ eab_merging_book_add_contact (book, contact, contact_added_cb, process);
}
static void
diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c
index e5fe93d380..baf62eca4e 100644
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ b/addressbook/gui/widgets/gal-view-minicard.c
@@ -140,7 +140,7 @@ view_minicard_clone (GalView *view)
GalViewMinicard *view_minicard;
GalViewMinicard *clone;
- view_minicard = GAL_VIEW_MINICARD(view);
+ view_minicard = GAL_VIEW_MINICARD (view);
clone = g_object_new (GAL_TYPE_VIEW_MINICARD, NULL);
clone->column_width = view_minicard->column_width;
diff --git a/addressbook/importers/evolution-addressbook-importers.h b/addressbook/importers/evolution-addressbook-importers.h
index adaa62931a..8278e67b12 100644
--- a/addressbook/importers/evolution-addressbook-importers.h
+++ b/addressbook/importers/evolution-addressbook-importers.h
@@ -18,11 +18,11 @@
*
*/
-struct _EImportImporter *evolution_ldif_importer_peek(void);
-struct _EImportImporter *evolution_vcard_importer_peek(void);
-struct _EImportImporter *evolution_csv_outlook_importer_peek(void);
-struct _EImportImporter *evolution_csv_mozilla_importer_peek(void);
-struct _EImportImporter *evolution_csv_evolution_importer_peek(void);
+struct _EImportImporter *evolution_ldif_importer_peek (void);
+struct _EImportImporter *evolution_vcard_importer_peek (void);
+struct _EImportImporter *evolution_csv_outlook_importer_peek (void);
+struct _EImportImporter *evolution_csv_mozilla_importer_peek (void);
+struct _EImportImporter *evolution_csv_evolution_importer_peek (void);
/* private utility function for importers only */
struct _GtkWidget *evolution_contact_importer_get_preview_widget (const GList *contacts);
diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c
index 20025c81ec..3e86679c96 100644
--- a/addressbook/importers/evolution-csv-importer.c
+++ b/addressbook/importers/evolution-csv-importer.c
@@ -69,7 +69,7 @@ typedef struct {
static gint importer;
static gchar delimiter;
-static void csv_import_done(CSVImporter *gci);
+static void csv_import_done (CSVImporter *gci);
typedef struct {
const gchar *csv_attribute;
@@ -266,7 +266,7 @@ static import_fields csv_fields_evolution[] = {
};
static void
-add_to_notes(EContact *contact, const gchar *field_text, gchar *val)
+add_to_notes (EContact *contact, const gchar *field_text, gchar *val)
{
GString *new_text;
@@ -274,14 +274,14 @@ add_to_notes(EContact *contact, const gchar *field_text, gchar *val)
return;
new_text = g_string_new (e_contact_get_const (contact, E_CONTACT_NOTE));
- if (strlen(new_text->str) != 0)
- new_text = g_string_append_c(new_text, '\n');
- new_text = g_string_append(new_text, field_text);
- new_text = g_string_append_c(new_text, ':');
- new_text = g_string_append(new_text, val);
-
- e_contact_set(contact, E_CONTACT_NOTE, new_text->str);
- g_string_free(new_text, TRUE);
+ if (strlen (new_text->str) != 0)
+ new_text = g_string_append_c (new_text, '\n');
+ new_text = g_string_append (new_text, field_text);
+ new_text = g_string_append_c (new_text, ':');
+ new_text = g_string_append (new_text, val);
+
+ e_contact_set (contact, E_CONTACT_NOTE, new_text->str);
+ g_string_free (new_text, TRUE);
}
/* @str: a date string in the format MM-DD-YYYY or MMDDYYYY */
@@ -293,7 +293,7 @@ date_from_string (const gchar *str)
g_return_val_if_fail (str != NULL, NULL);
- date = e_contact_date_new();
+ date = e_contact_date_new ();
if (g_ascii_isdigit (str[i]) && g_ascii_isdigit (str[i+1])) {
date->month = str[i] * 10 + str[i+1] - '0' * 11;
@@ -424,10 +424,10 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
home_street = g_string_new("");
work_street = g_string_new("");
other_street = g_string_new("");
- home_address = g_new0(EContactAddress, 1);
- work_address = g_new0(EContactAddress, 1);
- other_address = g_new0(EContactAddress, 1);
- bday = g_new0(EContactDate, 1);
+ home_address = g_new0 (EContactAddress, 1);
+ work_address = g_new0 (EContactAddress, 1);
+ other_address = g_new0 (EContactAddress, 1);
+ bday = g_new0 (EContactDate, 1);
if (!g_utf8_validate (pptr, -1, NULL)) {
do_free = g_convert (pptr, -1, "UTF-8", "ISO-8859-1", NULL, NULL, NULL);
@@ -492,87 +492,87 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
switch (flags) {
case FLAG_HOME_ADDRESS|FLAG_STREET:
- if (strlen(home_street->str) != 0) {
+ if (strlen (home_street->str) != 0) {
home_street = g_string_append(home_street, ",\n");
}
- home_street = g_string_append(home_street, value->str);
+ home_street = g_string_append (home_street, value->str);
break;
case FLAG_HOME_ADDRESS|FLAG_CITY:
- home_address->locality = g_strdup(value->str);
+ home_address->locality = g_strdup (value->str);
break;
case FLAG_HOME_ADDRESS|FLAG_STATE:
- home_address->region = g_strdup(value->str);
+ home_address->region = g_strdup (value->str);
break;
case FLAG_HOME_ADDRESS|FLAG_POSTAL_CODE:
- home_address->code = g_strdup(value->str);
+ home_address->code = g_strdup (value->str);
break;
case FLAG_HOME_ADDRESS|FLAG_POBOX:
- home_address->po = g_strdup(value->str);
+ home_address->po = g_strdup (value->str);
break;
case FLAG_HOME_ADDRESS|FLAG_COUNTRY:
- home_address->country = g_strdup(value->str);
+ home_address->country = g_strdup (value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_STREET:
- if (strlen(work_street->str) != 0) {
+ if (strlen (work_street->str) != 0) {
work_street = g_string_append(work_street, ",\n");
}
- work_street = g_string_append(work_street, value->str);
+ work_street = g_string_append (work_street, value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_CITY:
- work_address->locality = g_strdup(value->str);
+ work_address->locality = g_strdup (value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_STATE:
- work_address->region = g_strdup(value->str);
+ work_address->region = g_strdup (value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_POSTAL_CODE:
- work_address->code = g_strdup(value->str);
+ work_address->code = g_strdup (value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_POBOX:
- work_address->po = g_strdup(value->str);
+ work_address->po = g_strdup (value->str);
break;
case FLAG_WORK_ADDRESS|FLAG_COUNTRY:
- work_address->country = g_strdup(value->str);
+ work_address->country = g_strdup (value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_STREET:
- if (strlen(other_street->str) != 0) {
+ if (strlen (other_street->str) != 0) {
other_street = g_string_append(other_street, ",\n");
}
- other_street = g_string_append(other_street, value->str);
+ other_street = g_string_append (other_street, value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_CITY:
- other_address->locality = g_strdup(value->str);
+ other_address->locality = g_strdup (value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_STATE:
- other_address->region = g_strdup(value->str);
+ other_address->region = g_strdup (value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_POSTAL_CODE:
- other_address->code = g_strdup(value->str);
+ other_address->code = g_strdup (value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_POBOX:
- other_address->po = g_strdup(value->str);
+ other_address->po = g_strdup (value->str);
break;
case FLAG_OTHER_ADDRESS|FLAG_COUNTRY:
- other_address->country = g_strdup(value->str);
+ other_address->country = g_strdup (value->str);
break;
case FLAG_DATE_BDAY:
- e_contact_set(contact, E_CONTACT_BIRTH_DATE, date_from_string(value->str));
+ e_contact_set (contact, E_CONTACT_BIRTH_DATE, date_from_string (value->str));
break;
case FLAG_DATE_ANNIVERSARY:
- e_contact_set(contact, E_CONTACT_ANNIVERSARY, date_from_string(value->str));
+ e_contact_set (contact, E_CONTACT_ANNIVERSARY, date_from_string (value->str));
break;
case FLAG_BIRTH_DAY:
- bday->day = atoi(value->str);
+ bday->day = atoi (value->str);
break;
case FLAG_BIRTH_YEAR:
- bday->year = atoi(value->str);
+ bday->year = atoi (value->str);
break;
case FLAG_BIRTH_MONTH:
- bday->month = atoi(value->str);
+ bday->month = atoi (value->str);
break;
case FLAG_INVALID:
@@ -585,17 +585,17 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
}
}
ii++;
- g_string_free(value, TRUE);
+ g_string_free (value, TRUE);
}
- if (strlen(home_street->str) != 0)
- home_address->street = g_strdup(home_street->str);
- if (strlen(work_street->str) != 0)
- work_address->street = g_strdup(work_street->str);
- if (strlen(other_street->str) != 0)
- other_address->street = g_strdup(other_street->str);
- g_string_free(home_street, TRUE);
- g_string_free(work_street, TRUE);
- g_string_free(other_street, TRUE);
+ if (strlen (home_street->str) != 0)
+ home_address->street = g_strdup (home_street->str);
+ if (strlen (work_street->str) != 0)
+ work_address->street = g_strdup (work_street->str);
+ if (strlen (other_street->str) != 0)
+ other_address->street = g_strdup (other_street->str);
+ g_string_free (home_street, TRUE);
+ g_string_free (work_street, TRUE);
+ g_string_free (other_street, TRUE);
if (home_address->locality || home_address->country ||
home_address->code || home_address->region || home_address->street)
@@ -609,7 +609,7 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
if (importer != OUTLOOK_IMPORTER) {
if (bday->day || bday->year || bday->month)
- e_contact_set(contact, E_CONTACT_BIRTH_DATE, bday);
+ e_contact_set (contact, E_CONTACT_BIRTH_DATE, bday);
}
g_free (do_free);
@@ -618,7 +618,7 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) {
}
static EContact *
-getNextCSVEntry(CSVImporter *gci, FILE *f) {
+getNextCSVEntry (CSVImporter *gci, FILE *f) {
EContact *contact = NULL;
GString *line;
GString *str;
@@ -679,40 +679,40 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) {
g_string_free (line, TRUE);
- if (strlen(str->str) == 0) {
- g_string_free(str, TRUE);
+ if (strlen (str->str) == 0) {
+ g_string_free (str, TRUE);
return NULL;
}
- contact = e_contact_new();
+ contact = e_contact_new ();
buf = str->str;
if (!parseLine (gci, contact, buf)) {
- g_object_unref(contact);
+ g_object_unref (contact);
return NULL;
}
gci->count++;
- g_string_free(str, TRUE);
+ g_string_free (str, TRUE);
return contact;
}
static gboolean
-csv_import_contacts(gpointer d) {
+csv_import_contacts (gpointer d) {
CSVImporter *gci = d;
EContact *contact = NULL;
- while ((contact = getNextCSVEntry(gci, gci->file))) {
- e_book_add_contact(gci->book, contact, NULL);
- gci->contacts = g_slist_prepend(gci->contacts, contact);
+ while ((contact = getNextCSVEntry (gci, gci->file))) {
+ e_book_add_contact (gci->book, contact, NULL);
+ gci->contacts = g_slist_prepend (gci->contacts, contact);
}
if (contact == NULL) {
gci->state = 1;
}
if (gci->state == 1) {
- csv_import_done(gci);
+ csv_import_done (gci);
return FALSE;
}
else {
@@ -727,12 +727,12 @@ static void
primary_selection_changed_cb (ESourceSelector *selector, EImportTarget *target)
{
g_datalist_set_data_full(&target->data, "csv-source",
- g_object_ref(e_source_selector_peek_primary_selection(selector)),
+ g_object_ref (e_source_selector_peek_primary_selection (selector)),
g_object_unref);
}
static GtkWidget *
-csv_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
+csv_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *vbox, *selector;
ESource *primary;
@@ -751,7 +751,7 @@ csv_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
primary = g_datalist_get_data(&target->data, "csv-source");
if (primary == NULL) {
primary = e_source_list_peek_source_any (source_list);
- g_object_ref(primary);
+ g_object_ref (primary);
g_datalist_set_data_full(&target->data, "csv-source", primary, g_object_unref);
}
e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (selector), primary);
@@ -771,7 +771,7 @@ static const gchar *supported_extensions[4] = {
};
static gboolean
-csv_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
+csv_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
{
gchar *ext;
gint i;
@@ -787,12 +787,12 @@ csv_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
if (strncmp(s->uri_src, "file:///", 8) != 0)
return FALSE;
- ext = strrchr(s->uri_src, '.');
+ ext = strrchr (s->uri_src, '.');
if (ext == NULL)
return FALSE;
for (i = 0; supported_extensions[i] != NULL; i++) {
- if (g_ascii_strcasecmp(supported_extensions[i], ext) == 0) {
+ if (g_ascii_strcasecmp (supported_extensions[i], ext) == 0) {
if (i == 0) {
delimiter = CSV_FILE_DELIMITER;
}
@@ -807,21 +807,21 @@ csv_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
}
static void
-csv_import_done(CSVImporter *gci)
+csv_import_done (CSVImporter *gci)
{
if (gci->idle_id)
- g_source_remove(gci->idle_id);
+ g_source_remove (gci->idle_id);
fclose (gci->file);
- g_object_unref(gci->book);
- g_slist_foreach(gci->contacts, (GFunc) g_object_unref, NULL);
- g_slist_free(gci->contacts);
+ g_object_unref (gci->book);
+ g_slist_foreach (gci->contacts, (GFunc) g_object_unref, NULL);
+ g_slist_free (gci->contacts);
if (gci->fields_map)
g_hash_table_destroy (gci->fields_map);
- e_import_complete(gci->import, gci->target);
- g_object_unref(gci->import);
+ e_import_complete (gci->import, gci->target);
+ g_object_unref (gci->import);
g_free (gci);
}
@@ -844,7 +844,7 @@ csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
book = e_book_new(g_datalist_get_data(&target->data, "csv-source"), NULL);
if (book == NULL) {
g_message("Couldn't Create EBook");
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
g_free (filename);
return;
}
@@ -853,51 +853,51 @@ csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
g_free (filename);
if (file == NULL) {
g_message("Can't open .csv file");
- e_import_complete(ei, target);
- g_object_unref(book);
+ e_import_complete (ei, target);
+ g_object_unref (book);
return;
}
- gci = g_malloc0(sizeof(*gci));
+ gci = g_malloc0 (sizeof (*gci));
g_datalist_set_data(&target->data, "csv-data", gci);
- gci->import = g_object_ref(ei);
+ gci->import = g_object_ref (ei);
gci->target = target;
gci->book = book;
gci->file = file;
gci->fields_map = NULL;
gci->count = 0;
- fseek(file, 0, SEEK_END);
- gci->size = ftell(file);
- fseek(file, 0, SEEK_SET);
+ fseek (file, 0, SEEK_END);
+ gci->size = ftell (file);
+ fseek (file, 0, SEEK_SET);
- e_book_open(gci->book, FALSE, NULL);
+ e_book_open (gci->book, FALSE, NULL);
gci->idle_id = g_idle_add (csv_import_contacts, gci);
}
static void
-outlook_csv_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+outlook_csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
importer = OUTLOOK_IMPORTER;
- csv_import(ei, target, im);
+ csv_import (ei, target, im);
}
static void
-mozilla_csv_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+mozilla_csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
importer = MOZILLA_IMPORTER;
- csv_import(ei, target, im);
+ csv_import (ei, target, im);
}
static void
-evolution_csv_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+evolution_csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
importer = EVOLUTION_IMPORTER;
- csv_import(ei, target, im);
+ csv_import (ei, target, im);
}
static void
-csv_cancel(EImport *ei, EImportTarget *target, EImportImporter *im) {
+csv_cancel (EImport *ei, EImportTarget *target, EImportImporter *im) {
CSVImporter *gci = g_datalist_get_data(&target->data, "csv-data");
if (gci)
@@ -932,7 +932,7 @@ csv_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
gci->file = file;
gci->fields_map = NULL;
gci->count = 0;
- fseek(file, 0, SEEK_END);
+ fseek (file, 0, SEEK_END);
gci->size = ftell (file);
fseek (file, 0, SEEK_SET);
@@ -1003,7 +1003,7 @@ static EImportImporter csv_evolution_importer = {
};
EImportImporter *
-evolution_csv_outlook_importer_peek(void)
+evolution_csv_outlook_importer_peek (void)
{
csv_outlook_importer.name = _("Outlook CSV or Tab (.csv, .tab)");
csv_outlook_importer.description = _("Outlook CSV and Tab Importer");
@@ -1012,7 +1012,7 @@ evolution_csv_outlook_importer_peek(void)
}
EImportImporter *
-evolution_csv_mozilla_importer_peek(void)
+evolution_csv_mozilla_importer_peek (void)
{
csv_mozilla_importer.name = _("Mozilla CSV or Tab (.csv, .tab)");
csv_mozilla_importer.description = _("Mozilla CSV and Tab Importer");
@@ -1021,7 +1021,7 @@ evolution_csv_mozilla_importer_peek(void)
}
EImportImporter *
-evolution_csv_evolution_importer_peek(void)
+evolution_csv_evolution_importer_peek (void)
{
csv_evolution_importer.name = _("Evolution CSV or Tab (.csv, .tab)");
csv_evolution_importer.description = _("Evolution CSV and Tab Importer");
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c
index 9eb9ca5bb6..5d42ff7a00 100644
--- a/addressbook/importers/evolution-ldif-importer.c
+++ b/addressbook/importers/evolution-ldif-importer.c
@@ -69,7 +69,7 @@ typedef struct {
GSList *list_iterator;
} LDIFImporter;
-static void ldif_import_done(LDIFImporter *gci);
+static void ldif_import_done (LDIFImporter *gci);
static struct {
const gchar *ldif_attribute;
@@ -129,7 +129,7 @@ ldif_fields[] = {
};
static GString *
-getValue( gchar **src )
+getValue ( gchar **src )
{
GString *dest = g_string_new("");
gchar *s = *src;
@@ -254,16 +254,16 @@ parseLine (GHashTable *dn_contact_hash, EContact *contact,
return FALSE;
}
- colon = (gchar *)strchr( ptr, ':' );
+ colon = (gchar *)strchr ( ptr, ':' );
if (colon) {
gint i;
*colon = 0;
value = colon + 1;
- while (isspace(*value))
+ while (isspace (*value))
value++;
- ldif_value = getValue(&value );
+ ldif_value = getValue (&value );
field_handled = FALSE;
for (i = 0; i < G_N_ELEMENTS (ldif_fields); i++) {
@@ -342,7 +342,7 @@ parseLine (GHashTable *dn_contact_hash, EContact *contact,
}
static EContact *
-getNextLDIFEntry(GHashTable *dn_contact_hash, FILE *f )
+getNextLDIFEntry (GHashTable *dn_contact_hash, FILE *f )
{
EContact *contact;
EContactAddress *work_address, *home_address;
@@ -353,7 +353,7 @@ getNextLDIFEntry(GHashTable *dn_contact_hash, FILE *f )
str = g_string_new ("");
/* read from the file until we get to a blank line (or eof) */
while (!feof (f)) {
- if (!fgets (line, sizeof(line), f))
+ if (!fgets (line, sizeof (line), f))
break;
if (line[0] == '\n' || (line[0] == '\r' && line[1] == '\n'))
break;
@@ -469,7 +469,7 @@ add_to_notes (EContact *contact, EContactField field)
}
static gboolean
-ldif_import_contacts(gpointer d)
+ldif_import_contacts (gpointer d)
{
LDIFImporter *gci = d;
EContact *contact;
@@ -480,15 +480,15 @@ ldif_import_contacts(gpointer d)
ones till the end */
if (gci->state == 0) {
- while (count < 50 && (contact = getNextLDIFEntry(gci->dn_contact_hash, gci->file))) {
+ while (count < 50 && (contact = getNextLDIFEntry (gci->dn_contact_hash, gci->file))) {
if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
- gci->list_contacts = g_slist_prepend(gci->list_contacts, contact);
+ gci->list_contacts = g_slist_prepend (gci->list_contacts, contact);
} else {
- add_to_notes(contact, E_CONTACT_OFFICE);
- add_to_notes(contact, E_CONTACT_SPOUSE);
- add_to_notes(contact, E_CONTACT_BLOG_URL);
- e_book_add_contact(gci->book, contact, NULL);
- gci->contacts = g_slist_prepend(gci->contacts, contact);
+ add_to_notes (contact, E_CONTACT_OFFICE);
+ add_to_notes (contact, E_CONTACT_SPOUSE);
+ add_to_notes (contact, E_CONTACT_BLOG_URL);
+ e_book_add_contact (gci->book, contact, NULL);
+ gci->contacts = g_slist_prepend (gci->contacts, contact);
}
count++;
}
@@ -500,8 +500,8 @@ ldif_import_contacts(gpointer d)
if (gci->state == 1) {
for (iter = gci->list_iterator;count < 50 && iter;iter=iter->next) {
contact = iter->data;
- resolve_list_card(gci, contact);
- e_book_add_contact(gci->book, contact, NULL);
+ resolve_list_card (gci, contact);
+ e_book_add_contact (gci->book, contact, NULL);
count++;
}
gci->list_iterator = iter;
@@ -509,7 +509,7 @@ ldif_import_contacts(gpointer d)
gci->state = 2;
}
if (gci->state == 2) {
- ldif_import_done(gci);
+ ldif_import_done (gci);
return FALSE;
} else {
e_import_status (
@@ -523,12 +523,12 @@ static void
primary_selection_changed_cb (ESourceSelector *selector, EImportTarget *target)
{
g_datalist_set_data_full(&target->data, "ldif-source",
- g_object_ref(e_source_selector_peek_primary_selection(selector)),
+ g_object_ref (e_source_selector_peek_primary_selection (selector)),
g_object_unref);
}
static GtkWidget *
-ldif_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
+ldif_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *vbox, *selector;
ESource *primary;
@@ -547,7 +547,7 @@ ldif_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
primary = g_datalist_get_data(&target->data, "ldif-source");
if (primary == NULL) {
primary = e_source_list_peek_source_any (source_list);
- g_object_ref(primary);
+ g_object_ref (primary);
g_datalist_set_data_full (
&target->data, "ldif-source", primary,
(GDestroyNotify) g_object_unref);
@@ -570,7 +570,7 @@ static const gchar *supported_extensions[3] = {
};
static gboolean
-ldif_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
+ldif_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
{
gchar *ext;
gint i;
@@ -586,12 +586,12 @@ ldif_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
if (strncmp(s->uri_src, "file:///", 8) != 0)
return FALSE;
- ext = strrchr(s->uri_src, '.');
+ ext = strrchr (s->uri_src, '.');
if (ext == NULL)
return FALSE;
for (i = 0; supported_extensions[i] != NULL; i++) {
- if (g_ascii_strcasecmp(supported_extensions[i], ext) == 0)
+ if (g_ascii_strcasecmp (supported_extensions[i], ext) == 0)
return TRUE;
}
@@ -599,27 +599,27 @@ ldif_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
}
static void
-ldif_import_done(LDIFImporter *gci)
+ldif_import_done (LDIFImporter *gci)
{
if (gci->idle_id)
- g_source_remove(gci->idle_id);
+ g_source_remove (gci->idle_id);
fclose (gci->file);
- g_object_unref(gci->book);
- g_slist_foreach(gci->contacts, (GFunc) g_object_unref, NULL);
- g_slist_foreach(gci->list_contacts, (GFunc) g_object_unref, NULL);
- g_slist_free(gci->contacts);
- g_slist_free(gci->list_contacts);
- g_hash_table_destroy(gci->dn_contact_hash);
+ g_object_unref (gci->book);
+ g_slist_foreach (gci->contacts, (GFunc) g_object_unref, NULL);
+ g_slist_foreach (gci->list_contacts, (GFunc) g_object_unref, NULL);
+ g_slist_free (gci->contacts);
+ g_slist_free (gci->list_contacts);
+ g_hash_table_destroy (gci->dn_contact_hash);
- e_import_complete(gci->import, gci->target);
- g_object_unref(gci->import);
+ e_import_complete (gci->import, gci->target);
+ g_object_unref (gci->import);
g_free (gci);
}
static void
-ldif_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+ldif_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
LDIFImporter *gci;
EBook *book;
@@ -630,43 +630,43 @@ ldif_import(EImport *ei, EImportTarget *target, EImportImporter *im)
book = e_book_new(g_datalist_get_data(&target->data, "ldif-source"), NULL);
if (book == NULL) {
g_message(G_STRLOC ":Couldn't create EBook.");
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
- filename = g_filename_from_uri(s->uri_src, NULL, NULL);
+ filename = g_filename_from_uri (s->uri_src, NULL, NULL);
if (filename != NULL) {
file = g_fopen(filename, "r");
g_free (filename);
}
if (file == NULL) {
g_message(G_STRLOC ":Can't open .ldif file");
- e_import_complete(ei, target);
- g_object_unref(book);
+ e_import_complete (ei, target);
+ g_object_unref (book);
return;
}
- gci = g_malloc0(sizeof(*gci));
+ gci = g_malloc0 (sizeof (*gci));
g_datalist_set_data(&target->data, "ldif-data", gci);
- gci->import = g_object_ref(ei);
+ gci->import = g_object_ref (ei);
gci->target = target;
gci->book = book;
gci->file = file;
- fseek(file, 0, SEEK_END);
- gci->size = ftell(file);
- fseek(file, 0, SEEK_SET);
+ fseek (file, 0, SEEK_END);
+ gci->size = ftell (file);
+ fseek (file, 0, SEEK_SET);
gci->dn_contact_hash = g_hash_table_new_full (
g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
(GDestroyNotify) NULL);
- e_book_open(gci->book, FALSE, NULL);
+ e_book_open (gci->book, FALSE, NULL);
- gci->idle_id = g_idle_add(ldif_import_contacts, gci);
+ gci->idle_id = g_idle_add (ldif_import_contacts, gci);
}
static void
-ldif_cancel(EImport *ei, EImportTarget *target, EImportImporter *im)
+ldif_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
{
LDIFImporter *gci = g_datalist_get_data(&target->data, "ldif-data");
@@ -706,9 +706,9 @@ ldif_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
while (contact = getNextLDIFEntry (dn_contact_hash, file), contact != NULL) {
if (!e_contact_get (contact, E_CONTACT_IS_LIST)) {
- add_to_notes(contact, E_CONTACT_OFFICE);
- add_to_notes(contact, E_CONTACT_SPOUSE);
- add_to_notes(contact, E_CONTACT_BLOG_URL);
+ add_to_notes (contact, E_CONTACT_OFFICE);
+ add_to_notes (contact, E_CONTACT_SPOUSE);
+ add_to_notes (contact, E_CONTACT_BLOG_URL);
}
contacts = g_list_prepend (contacts, contact);
@@ -737,7 +737,7 @@ static EImportImporter ldif_importer = {
};
EImportImporter *
-evolution_ldif_importer_peek(void)
+evolution_ldif_importer_peek (void)
{
ldif_importer.name = _("LDAP Data Interchange Format (.ldif)");
ldif_importer.description = _("Evolution LDIF importer");
diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c
index 1bcd6d6540..efdf3b362c 100644
--- a/addressbook/importers/evolution-vcard-importer.c
+++ b/addressbook/importers/evolution-vcard-importer.c
@@ -64,7 +64,7 @@ typedef struct {
EBook *book;
} VCardImporter;
-static void vcard_import_done(VCardImporter *gci);
+static void vcard_import_done (VCardImporter *gci);
static void
add_to_notes (EContact *contact, EContactField field)
@@ -91,7 +91,7 @@ add_to_notes (EContact *contact, EContactField field)
}
static void
-vcard_import_contact(VCardImporter *gci, EContact *contact)
+vcard_import_contact (VCardImporter *gci, EContact *contact)
{
EContactPhoto *photo;
GList *attrs, *attr;
@@ -239,7 +239,7 @@ vcard_import_contact(VCardImporter *gci, EContact *contact)
}
static gboolean
-vcard_import_contacts(gpointer data)
+vcard_import_contacts (gpointer data)
{
VCardImporter *gci = data;
gint count = 0;
@@ -247,7 +247,7 @@ vcard_import_contacts(gpointer data)
if (gci->state == 0) {
while (count < 50 && iterator) {
- vcard_import_contact(gci, iterator->data);
+ vcard_import_contact (gci, iterator->data);
count++;
iterator = iterator->next;
}
@@ -257,7 +257,7 @@ vcard_import_contacts(gpointer data)
gci->state = 1;
}
if (gci->state == 1) {
- vcard_import_done(gci);
+ vcard_import_done (gci);
return FALSE;
} else {
e_import_status (
@@ -385,12 +385,12 @@ static void
primary_selection_changed_cb (ESourceSelector *selector, EImportTarget *target)
{
g_datalist_set_data_full(&target->data, "vcard-source",
- g_object_ref(e_source_selector_peek_primary_selection(selector)),
+ g_object_ref (e_source_selector_peek_primary_selection (selector)),
g_object_unref);
}
static GtkWidget *
-vcard_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
+vcard_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *vbox, *selector;
ESource *primary;
@@ -409,7 +409,7 @@ vcard_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
primary = g_datalist_get_data(&target->data, "vcard-source");
if (primary == NULL) {
primary = e_source_list_peek_source_any (source_list);
- g_object_ref(primary);
+ g_object_ref (primary);
g_datalist_set_data_full (
&target->data, "vcard-source", primary,
(GDestroyNotify) g_object_unref);
@@ -428,7 +428,7 @@ vcard_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
}
static gboolean
-vcard_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
+vcard_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
{
EImportTargetURI *s;
gchar *filename;
@@ -447,29 +447,29 @@ vcard_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
filename = g_filename_from_uri (s->uri_src, NULL, NULL);
if (filename == NULL)
return FALSE;
- retval = (guess_vcard_encoding(filename) != VCARD_ENCODING_NONE);
+ retval = (guess_vcard_encoding (filename) != VCARD_ENCODING_NONE);
g_free (filename);
return retval;
}
static void
-vcard_import_done(VCardImporter *gci)
+vcard_import_done (VCardImporter *gci)
{
if (gci->idle_id)
- g_source_remove(gci->idle_id);
+ g_source_remove (gci->idle_id);
g_object_unref (gci->book);
g_list_foreach (gci->contactlist, (GFunc) g_object_unref, NULL);
g_list_free (gci->contactlist);
- e_import_complete(gci->import, gci->target);
- g_object_unref(gci->import);
+ e_import_complete (gci->import, gci->target);
+ g_object_unref (gci->import);
g_free (gci);
}
static void
-vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+vcard_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
VCardImporter *gci;
gchar *contents;
@@ -478,18 +478,18 @@ vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
EImportTargetURI *s = (EImportTargetURI *)target;
gchar *filename;
- filename = g_filename_from_uri(s->uri_src, NULL, NULL);
+ filename = g_filename_from_uri (s->uri_src, NULL, NULL);
if (filename == NULL) {
g_message(G_STRLOC ": Couldn't get filename from URI '%s'", s->uri_src);
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
- encoding = guess_vcard_encoding(filename);
+ encoding = guess_vcard_encoding (filename);
if (encoding == VCARD_ENCODING_NONE) {
g_free (filename);
/* This check is superfluous, we've already
* checked otherwise we can't get here ... */
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
@@ -497,22 +497,22 @@ vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
if (book == NULL) {
g_message(G_STRLOC ":Couldn't create EBook.");
g_free (filename);
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
if (!g_file_get_contents (filename, &contents, NULL, NULL)) {
g_message (G_STRLOC ":Couldn't read file.");
g_free (filename);
- e_import_complete(ei, target);
- g_object_unref(book);
+ e_import_complete (ei, target);
+ g_object_unref (book);
return;
}
g_free (filename);
- gci = g_malloc0(sizeof(*gci));
+ gci = g_malloc0 (sizeof (*gci));
g_datalist_set_data(&target->data, "vcard-data", gci);
- gci->import = g_object_ref(ei);
+ gci->import = g_object_ref (ei);
gci->target = target;
gci->book = book;
@@ -535,16 +535,16 @@ vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
gci->contactlist = eab_contact_list_from_string (contents);
g_free (contents);
gci->iterator = gci->contactlist;
- gci->total = g_list_length(gci->contactlist);
+ gci->total = g_list_length (gci->contactlist);
if (gci->iterator)
- gci->idle_id = g_idle_add(vcard_import_contacts, gci);
+ gci->idle_id = g_idle_add (vcard_import_contacts, gci);
else
- vcard_import_done(gci);
+ vcard_import_done (gci);
}
static void
-vcard_cancel(EImport *ei, EImportTarget *target, EImportImporter *im)
+vcard_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
{
VCardImporter *gci = g_datalist_get_data(&target->data, "vcard-data");
@@ -618,7 +618,7 @@ static EImportImporter vcard_importer = {
};
EImportImporter *
-evolution_vcard_importer_peek(void)
+evolution_vcard_importer_peek (void)
{
vcard_importer.name = _("vCard (.vcf, .gcrd)");
vcard_importer.description = _("Evolution vCard Importer");
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index b1e38c7e52..672db9ab41 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -293,7 +293,7 @@ e_contact_print_contact (EContact *contact,
page_height = gtk_page_setup_get_page_height (setup, GTK_UNIT_POINTS);
cr = gtk_print_context_get_cairo_context (ctxt->context);
- cairo_save(cr);
+ cairo_save (cr);
ctxt->y += get_font_height (ctxt->style->headings_font) * .2;
file_as = e_contact_get (contact, E_CONTACT_FILE_AS);
@@ -393,7 +393,7 @@ contacts_added (EBookView *book_view,
EContactPrintContext *ctxt)
{
while (contact_list != NULL) {
- ctxt->contact_list = g_list_insert_sorted(
+ ctxt->contact_list = g_list_insert_sorted (
ctxt->contact_list,
g_object_ref (contact_list->data),
(GCompareFunc) contact_compare);
@@ -509,12 +509,12 @@ e_contact_build_style (EContactPrintStyle *style)
g_free (filename);
if (styledoc) {
- xmlNodePtr stylenode = xmlDocGetRootElement(styledoc);
+ xmlNodePtr stylenode = xmlDocGetRootElement (styledoc);
xmlNodePtr node;
for (node = stylenode->children; node; node = node->next) {
gchar *data = (gchar *)xmlNodeGetContent ( node );
if (!strcmp( (gchar *)node->name, "title" )) {
- get_string(data, &(style->title));
+ get_string (data, &(style->title));
} else if (!strcmp( (gchar *)node->name, "type" )) {
if (g_ascii_strcasecmp (data, "cards") == 0)
style->type = E_CONTACT_PRINT_TYPE_CARDS;
@@ -523,35 +523,35 @@ e_contact_build_style (EContactPrintStyle *style)
else if (g_ascii_strcasecmp (data, "phone_list") == 0)
style->type = E_CONTACT_PRINT_TYPE_PHONE_LIST;
} else if (!strcmp( (gchar *)node->name, "sections_start_new_page" )) {
- style->sections_start_new_page = get_bool(data);
+ style->sections_start_new_page = get_bool (data);
} else if (!strcmp( (gchar *)node->name, "num_columns" )) {
- style->num_columns = get_integer(data);
+ style->num_columns = get_integer (data);
} else if (!strcmp( (gchar *)node->name, "blank_forms" )) {
- style->blank_forms = get_integer(data);
+ style->blank_forms = get_integer (data);
} else if (!strcmp( (gchar *)node->name, "letter_headings" )) {
- style->letter_headings = get_bool(data);
+ style->letter_headings = get_bool (data);
} else if (!strcmp( (gchar *)node->name, "headings_font" )) {
- get_font( data, &(style->headings_font) );
+ get_font ( data, &(style->headings_font) );
} else if (!strcmp( (gchar *)node->name, "body_font" )) {
- get_font( data, &(style->body_font) );
+ get_font ( data, &(style->body_font) );
} else if (!strcmp( (gchar *)node->name, "print_using_grey" )) {
- style->print_using_grey = get_bool(data);
+ style->print_using_grey = get_bool (data);
} else if (!strcmp( (gchar *)node->name, "paper_width" )) {
- style->paper_width = get_float(data);
+ style->paper_width = get_float (data);
} else if (!strcmp( (gchar *)node->name, "paper_height" )) {
- style->paper_height = get_float(data);
+ style->paper_height = get_float (data);
} else if (!strcmp( (gchar *)node->name, "top_margin" )) {
- style->top_margin = get_float(data);
+ style->top_margin = get_float (data);
} else if (!strcmp( (gchar *)node->name, "left_margin" )) {
- style->left_margin = get_float(data);
+ style->left_margin = get_float (data);
} else if (!strcmp( (gchar *)node->name, "bottom_margin" )) {
- style->bottom_margin = get_float(data);
+ style->bottom_margin = get_float (data);
} else if (!strcmp( (gchar *)node->name, "right_margin" )) {
- style->right_margin = get_float(data);
+ style->right_margin = get_float (data);
} else if (!strcmp( (gchar *)node->name, "page_width" )) {
- style->page_width = get_float(data);
+ style->page_width = get_float (data);
} else if (!strcmp( (gchar *)node->name, "page_height" )) {
- style->page_height = get_float(data);
+ style->page_height = get_float (data);
} else if (!strcmp( (gchar *)node->name, "orientation" )) {
if (data) {
style->orientation_portrait =
@@ -560,28 +560,28 @@ e_contact_build_style (EContactPrintStyle *style)
style->orientation_portrait = TRUE;
}
} else if (!strcmp( (gchar *)node->name, "header_font" )) {
- get_font( data, &(style->header_font) );
+ get_font ( data, &(style->header_font) );
} else if (!strcmp( (gchar *)node->name, "left_header" )) {
- get_string(data, &(style->left_header));
+ get_string (data, &(style->left_header));
} else if (!strcmp( (gchar *)node->name, "center_header" )) {
- get_string(data, &(style->center_header));
+ get_string (data, &(style->center_header));
} else if (!strcmp( (gchar *)node->name, "right_header" )) {
- get_string(data, &(style->right_header));
+ get_string (data, &(style->right_header));
} else if (!strcmp( (gchar *)node->name, "footer_font" )) {
- get_font( data, &(style->footer_font) );
+ get_font ( data, &(style->footer_font) );
} else if (!strcmp( (gchar *)node->name, "left_footer" )) {
- get_string(data, &(style->left_footer));
+ get_string (data, &(style->left_footer));
} else if (!strcmp( (gchar *)node->name, "center_footer" )) {
- get_string(data, &(style->center_footer));
+ get_string (data, &(style->center_footer));
} else if (!strcmp( (gchar *)node->name, "right_footer" )) {
- get_string(data, &(style->right_footer));
+ get_string (data, &(style->right_footer));
} else if (!strcmp( (gchar *)node->name, "reverse_on_even_pages" )) {
- style->reverse_on_even_pages = get_bool(data);
+ style->reverse_on_even_pages = get_bool (data);
}
if (data)
xmlFree (data);
}
- xmlFreeDoc(styledoc);
+ xmlFreeDoc (styledoc);
}
}
diff --git a/addressbook/util/addressbook.c b/addressbook/util/addressbook.c
index 077e629f6e..a6673fcda0 100644
--- a/addressbook/util/addressbook.c
+++ b/addressbook/util/addressbook.c
@@ -103,7 +103,7 @@ load_source_auth_cb (EBook *book, const GError *error, gpointer closure)
"%s", _("Accessing LDAP Server anonymously"));
g_signal_connect (
dialog, "response",
- G_CALLBACK(gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_widget_destroy), NULL);
gtk_widget_show (dialog);
error = NULL;
@@ -179,7 +179,7 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
gchar *pass_dup = NULL;
const gchar *auth;
const gchar *user;
- gchar *uri = remove_parameters_from_uri(e_book_get_uri (book));
+ gchar *uri = remove_parameters_from_uri (e_book_get_uri (book));
const gchar *auth_domain = e_source_get_property (source, "auth-domain");
const gchar *component_name;
@@ -256,7 +256,7 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
static void
auth_required_cb (EBook *book, gpointer data)
{
- LoadSourceData *load_source_data = g_new0(LoadSourceData, 1);
+ LoadSourceData *load_source_data = g_new0 (LoadSourceData, 1);
load_source_data->source = g_object_ref (g_object_ref (e_book_get_source (book)));
load_source_data->cancelled = FALSE;
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
index 3cd301bd70..ffe310d1c6 100644
--- a/addressbook/util/eab-book-util.c
+++ b/addressbook/util/eab-book-util.c
@@ -396,8 +396,8 @@ eab_query_address_default (const gchar *email,
gint
e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len)
{
- gchar *s1 = g_utf8_casefold(str1, len);
- gchar *s2 = g_utf8_casefold(str2, len);
+ gchar *s1 = g_utf8_casefold (str1, len);
+ gchar *s2 = g_utf8_casefold (str2, len);
gint rv;
rv = g_utf8_collate (s1, s2);
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index aa42987caa..551c064078 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -281,7 +281,7 @@ notified_alarms_dialog_new (void)
e_buffer_tagger_connect (GTK_TEXT_VIEW (an->description));
- gtk_tree_view_set_model (GTK_TREE_VIEW(an->treeview), model);
+ gtk_tree_view_set_model (GTK_TREE_VIEW (an->treeview), model);
gtk_window_set_keep_above (GTK_WINDOW (an->dialog), TRUE);
@@ -383,7 +383,7 @@ add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigge
funcinfo->func = func;
funcinfo->func_data = func_data;
- gtk_list_store_append (GTK_LIST_STORE(model), &iter);
+ gtk_list_store_append (GTK_LIST_STORE (model), &iter);
current_zone = config_data_get_timezone ();
start = timet_to_str_with_zone (occur_start, current_zone);
@@ -393,17 +393,17 @@ add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigge
summary, start, str_time);
g_free (start);
g_free (end);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter,
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
ALARM_DISPLAY_COLUMN, to_display, -1);
g_free (to_display);
g_free (str_time);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_SUMMARY_COLUMN, summary, -1);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_DESCRIPTION_COLUMN, description, -1);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_LOCATION_COLUMN, location, -1);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_START_COLUMN, occur_start, -1);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_END_COLUMN, occur_end, -1);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_FUNCINFO_COLUMN, funcinfo, -1);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, ALARM_SUMMARY_COLUMN, summary, -1);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, ALARM_DESCRIPTION_COLUMN, description, -1);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, ALARM_LOCATION_COLUMN, location, -1);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, ALARM_START_COLUMN, occur_start, -1);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, ALARM_END_COLUMN, occur_end, -1);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, ALARM_FUNCINFO_COLUMN, funcinfo, -1);
return iter;
}
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 9b397ca415..7dc63abf6f 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -187,7 +187,7 @@ message_push (Message *msg)
* use a static ring-buffer so we can call this twice
* in a printf without getting nonsense results.
*/
-d(#define DEBUGGING_ON)
+d (#define DEBUGGING_ON)
#ifdef DEBUGGING_ON
static const gchar *
e_ctime (const time_t *timep)
@@ -482,7 +482,7 @@ add_component_alarms (ClientAlarms *ca, ECalComponentAlarms *alarms)
ECalComponentAlarmInstance *instance;
gpointer alarm_id;
QueuedAlarm *qa;
- d(time_t tnow = time(NULL));
+ d (time_t tnow = time (NULL));
instance = l->data;
@@ -594,7 +594,7 @@ load_alarms_for_today (ClientAlarms *ca)
day_end = time_day_end_with_zone (now, zone);
d(printf("%s:%d (load_alarms_for_today) - From %s to %s\n",__FILE__, __LINE__,
- g_strdup (ctime (&from)), g_strdup (e_ctime(&day_end))));
+ g_strdup (ctime (&from)), g_strdup (e_ctime (&day_end))));
load_alarms (ca, from, day_end);
}
@@ -1607,7 +1607,7 @@ popup_notification (time_t trigger, CompQueuedAlarms *cqa,
}
n = notify_notification_new (summary, body, "stock_appointment-reminder", NULL);
- if (!notify_notification_show(n, NULL))
+ if (!notify_notification_show (n, NULL))
g_warning ("Could not send notification to daemon\n");
/* create the private structure */
@@ -1659,7 +1659,7 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa,
flag = 1;
#ifdef HAVE_CANBERRA
ca_context_play (
- ca_gtk_context_get(), 0,
+ ca_gtk_context_get (), 0,
CA_PROP_MEDIA_FILENAME, filename, NULL);
#endif
}
@@ -1986,7 +1986,7 @@ alarm_queue_add_async (struct _alarm_client_msg *msg)
ca = lookup_client (client);
if (ca) {
/* We already have it. Unref the passed one*/
- g_object_unref(client);
+ g_object_unref (client);
return;
}
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c
index eb0f52425d..8c56abaff2 100644
--- a/calendar/gui/alarm-notify/notify-main.c
+++ b/calendar/gui/alarm-notify/notify-main.c
@@ -78,7 +78,7 @@ main (gint argc, gchar **argv)
* this once that is fixed. */
/* Initialize Camel's type system. */
- camel_object_get_type();
+ camel_object_get_type ();
icon_theme = gtk_icon_theme_get_default ();
gtk_icon_theme_append_search_path (icon_theme, EVOLUTION_ICONDIR);
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index dcc2677610..a98e55d999 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -197,7 +197,7 @@ calendar_config_get_24_hour_format (void)
/* If the locale defines 'am' and 'pm' strings then the user has the
choice of 12-hour or 24-hour time format, with 12-hour as the
default. If the locale doesn't have 'am' and 'pm' strings we have
- to use 24-hour format, or strftime()/strptime() won't work. */
+ to use 24-hour format, or strftime ()/strptime () won't work. */
if (calendar_config_locale_supports_12_hour_format ())
return gconf_client_get_bool (config, CALENDAR_CONFIG_24HOUR, NULL);
@@ -345,7 +345,7 @@ calendar_config_set_month_hpane_pos (gint hpane_pos)
GSList *
calendar_config_get_tasks_selected (void)
{
- calendar_config_init();
+ calendar_config_init ();
return gconf_client_get_list (config, CALENDAR_CONFIG_TASKS_SELECTED_TASKS, GCONF_VALUE_STRING, NULL);
}
@@ -589,7 +589,7 @@ calendar_config_set_default_reminder_units (CalUnits units)
{
calendar_config_init ();
- gconf_client_set_string (config, CALENDAR_CONFIG_DEFAULT_REMINDER_UNITS, units_to_string(units), NULL);
+ gconf_client_set_string (config, CALENDAR_CONFIG_DEFAULT_REMINDER_UNITS, units_to_string (units), NULL);
}
/**
diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h
index 191abfa813..6ca9457af9 100644
--- a/calendar/gui/calendar-config.h
+++ b/calendar/gui/calendar-config.h
@@ -114,11 +114,11 @@ void calendar_config_set_memos_selected (GSList *selected);
gboolean calendar_config_get_hide_completed_tasks (void);
void calendar_config_set_hide_completed_tasks (gboolean hide);
-CalUnits calendar_config_get_hide_completed_tasks_units(void);
-void calendar_config_set_hide_completed_tasks_units(CalUnits units);
+CalUnits calendar_config_get_hide_completed_tasks_units (void);
+void calendar_config_set_hide_completed_tasks_units (CalUnits units);
-gint calendar_config_get_hide_completed_tasks_value(void);
-void calendar_config_set_hide_completed_tasks_value(gint value);
+gint calendar_config_get_hide_completed_tasks_value (void);
+void calendar_config_set_hide_completed_tasks_value (gint value);
gchar * calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed);
@@ -141,7 +141,7 @@ void calendar_config_set_free_busy (GSList * url_list);
/* Returns TRUE if the locale has 'am' and 'pm' strings defined, i.e. it
supports 12-hour time format. */
-gboolean calendar_config_locale_supports_12_hour_format(void);
+gboolean calendar_config_locale_supports_12_hour_format (void);
void calendar_config_set_dir_path (const gchar *);
gchar * calendar_config_get_dir_path (void);
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index f7827413b7..acb4423f71 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -481,7 +481,7 @@ malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
/* remove the X-EVOLUTION-NEEDS-DESCRIPTION property, so that
* we don't re-set the alarm's description */
icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
- icalprop = icalcomponent_get_first_property(icalcomp, ICAL_X_PROPERTY);
+ icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
while (icalprop) {
const gchar *x_name;
@@ -527,7 +527,7 @@ alarm_to_malarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm )
e_destination_set_email (dest, a->value);
}
e_destination_store_append_destination (destination_store, dest);
- g_object_unref(GTK_OBJECT (dest));
+ g_object_unref (GTK_OBJECT (dest));
}
e_cal_component_free_attendee_list (attendee_list);
}
@@ -1217,7 +1217,7 @@ alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm)
e_load_ui_builder_definition (dialog.builder, "alarm-dialog.ui");
if (!get_widgets (&dialog)) {
- g_object_unref(dialog.builder);
+ g_object_unref (dialog.builder);
return FALSE;
}
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
index b8588d666d..0fb09c6c29 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.c
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -271,7 +271,7 @@ alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store)
e_load_ui_builder_definition (dialog.builder, "alarm-list-dialog.ui");
if (!get_widgets (&dialog)) {
- g_object_unref(dialog.builder);
+ g_object_unref (dialog.builder);
return FALSE;
}
@@ -316,7 +316,7 @@ alarm_list_dialog_peek (ECal *ecal, EAlarmList *list_store)
e_load_ui_builder_definition (dialog->builder, "alarm-list-dialog.ui");
if (!get_widgets (dialog)) {
- g_object_unref(dialog->builder);
+ g_object_unref (dialog->builder);
return NULL;
}
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
index 6d3adfe733..259533877a 100644
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ b/calendar/gui/dialogs/comp-editor-util.c
@@ -223,7 +223,7 @@ comp_editor_strip_categories (const gchar *categories)
start = p;
end = p;
} else
- end = g_utf8_next_char(p) - 1;
+ end = g_utf8_next_char (p) - 1;
}
}
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 6c5092e508..69cb2f2479 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -428,7 +428,7 @@ save_comp (CompEditor *editor)
}
/* retrieve all timezones */
- if (IS_COMP_EDITOR_PAGE(l->data))
+ if (IS_COMP_EDITOR_PAGE (l->data))
comp_editor_page_fill_timezones (l->data, timezones);
}
@@ -520,7 +520,7 @@ save_comp (CompEditor *editor)
GTK_BUTTONS_OK,
"%s", (error != NULL) ? error->message :
_("Could not update object"));
- gtk_dialog_run (GTK_DIALOG(dialog));
+ gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
if (error)
@@ -810,15 +810,15 @@ action_save_cb (GtkAction *action,
gboolean response = 1;
/*FIXME: Cannot use mail functions from calendar!!!! */
#if 0
- ECalComponentVType vtype = e_cal_component_get_vtype(editor->priv->comp);
+ ECalComponentVType vtype = e_cal_component_get_vtype (editor->priv->comp);
if (vtype == E_CAL_COMPONENT_EVENT)
- response = em_utils_prompt_user((GtkWindow *)widget,
+ response = em_utils_prompt_user ((GtkWindow *)widget,
NULL,
"calendar:ask-send-event-pending-download",
NULL);
else
- response = em_utils_prompt_user((GtkWindow *)widget,
+ response = em_utils_prompt_user ((GtkWindow *)widget,
NULL,
"calendar:ask-send-task-pending-download",
NULL);
@@ -1872,7 +1872,7 @@ prompt_and_save_changes (CompEditor *editor, gboolean send)
if (!priv->changed)
return TRUE;
- switch (save_component_dialog (GTK_WINDOW(editor), priv->comp)) {
+ switch (save_component_dialog (GTK_WINDOW (editor), priv->comp)) {
case GTK_RESPONSE_YES: /* Save */
if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only) {
e_alert_run_dialog_for_args (
@@ -2341,7 +2341,7 @@ comp_editor_append_widget (CompEditor *editor,
g_signal_connect (
page, "map",
G_CALLBACK (page_mapped_cb), page);
- g_signal_connect(
+ g_signal_connect (
page, "unmap",
G_CALLBACK (page_unmapped_cb), page);
*/
@@ -2408,7 +2408,7 @@ comp_editor_append_page (CompEditor *editor,
g_signal_connect (
page_widget, "map",
G_CALLBACK (page_mapped_cb), page);
- g_signal_connect(
+ g_signal_connect (
page_widget, "unmap",
G_CALLBACK (page_unmapped_cb), page);
@@ -2642,7 +2642,7 @@ fill_widgets (CompEditor *editor)
action, G_CALLBACK (action_classification_cb), editor);
for (iter = priv->pages; iter != NULL; iter = iter->next) {
- if (IS_COMP_EDITOR_PAGE(iter->data))
+ if (IS_COMP_EDITOR_PAGE (iter->data))
comp_editor_page_fill_widgets (iter->data, priv->comp);
}
@@ -2699,7 +2699,7 @@ set_attendees_for_delegation (ECalComponent *comp,
const gchar *attendee = icalproperty_get_attendee (prop);
const gchar *delfrom = NULL;
- param = icalproperty_get_first_parameter(prop, ICAL_DELEGATEDFROM_PARAMETER);
+ param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDFROM_PARAMETER);
if (param)
delfrom = icalparameter_get_delegatedfrom (param);
if (!(g_str_equal (itip_strip_mailto (attendee), address) ||
@@ -2901,7 +2901,7 @@ comp_editor_get_current_comp (CompEditor *editor, gboolean *correct)
comp_editor_copy_new_attendees (comp, priv->comp);
if (priv->changed) {
for (l = priv->pages; l != NULL; l = l->next) {
- if (IS_COMP_EDITOR_PAGE(l->data))
+ if (IS_COMP_EDITOR_PAGE (l->data))
all_ok = comp_editor_page_fill_component (l->data, comp) && all_ok;
}
}
@@ -3076,7 +3076,7 @@ page_dates_changed_cb (CompEditor *editor,
GList *l;
for (l = priv->pages; l != NULL; l = l->next)
- if (page != (CompEditorPage *) l->data && IS_COMP_EDITOR_PAGE(l->data))
+ if (page != (CompEditorPage *) l->data && IS_COMP_EDITOR_PAGE (l->data))
comp_editor_page_set_dates (l->data, dates);
if (!priv->warned && priv->existing_org && !priv->user_org &&
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
index bd26ce8b66..09ced8f533 100644
--- a/calendar/gui/dialogs/comp-editor.h
+++ b/calendar/gui/dialogs/comp-editor.h
@@ -150,7 +150,7 @@ void comp_editor_delete_comp (CompEditor *editor);
gboolean comp_editor_send_comp (CompEditor *editor,
ECalComponentItipMethod method,
gboolean strip_alarms);
-GSList * comp_editor_get_mime_attach_list(CompEditor *editor);
+GSList * comp_editor_get_mime_attach_list (CompEditor *editor);
gboolean comp_editor_close (CompEditor *editor);
void comp_editor_sensitize_attachment_bar
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 396b9b8d08..2e727ebbbc 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -326,7 +326,7 @@ event_editor_constructor (GType type,
G_CALLBACK (gtk_widget_hide), NULL);
g_signal_connect (
priv->recur_window, "delete-event",
- G_CALLBACK(gtk_widget_hide_on_delete), NULL);
+ G_CALLBACK (gtk_widget_hide_on_delete), NULL);
content_area =
gtk_dialog_get_content_area (GTK_DIALOG (priv->recur_window));
@@ -358,7 +358,7 @@ event_editor_constructor (GType type,
/* Alarm page */
alarm_page = event_page_get_alarm_page (priv->event_page);
comp_editor_append_widget (editor, alarm_page, _("Alarm"), TRUE);
- g_object_unref(alarm_page);
+ g_object_unref (alarm_page);
}
@@ -383,7 +383,7 @@ event_editor_constructor (GType type,
if (e_shell_get_express_mode (shell)) {
attendee_page = event_page_get_attendee_page (priv->event_page);
comp_editor_append_widget (editor, attendee_page, _("Attendees"), TRUE);
- g_object_unref(attendee_page);
+ g_object_unref (attendee_page);
}
}
@@ -673,18 +673,18 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
EIterator *it;
accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)accounts);
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
+ for (it = e_list_get_iterator ((EList *)accounts);
+ e_iterator_is_valid (it);
+ e_iterator_next (it)) {
EMeetingAttendee *ia;
- account = (EAccount*)e_iterator_get(it);
+ account = (EAccount*)e_iterator_get (it);
ia = e_meeting_store_find_attendee (priv->model, account->id->address, &row);
if (ia != NULL)
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_STATUS);
}
- g_object_unref(it);
+ g_object_unref (it);
} else if (e_cal_get_organizer_must_attend (client)) {
EMeetingAttendee *ia;
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index b221368f94..e4e034fd16 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -455,7 +455,7 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD
e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->start_timezone),
start_zone);
def_zone = calendar_config_get_icaltimezone ();
- if (!def_zone || !start_zone || strcmp (icaltimezone_get_tzid(def_zone), icaltimezone_get_tzid (start_zone)))
+ if (!def_zone || !start_zone || strcmp (icaltimezone_get_tzid (def_zone), icaltimezone_get_tzid (start_zone)))
homezone = FALSE;
action = comp_editor_get_action (editor, "view-time-zone");
@@ -952,8 +952,8 @@ get_current_account (EventPage *epage)
if (!str)
return NULL;
- for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) {
- EAccount *a = (EAccount *)e_iterator_get(it);
+ for (it = e_list_get_iterator ((EList *)priv->accounts); e_iterator_is_valid (it); e_iterator_next (it)) {
+ EAccount *a = (EAccount *)e_iterator_get (it);
gchar *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
if (!g_ascii_strcasecmp (full, str)) {
@@ -1659,8 +1659,8 @@ static
void update_end_time_combo (EventPage *epage)
{
EventPagePrivate *priv;
- struct icaltimetype start_tt = icaltime_null_time();
- struct icaltimetype end_tt = icaltime_null_time();
+ struct icaltimetype start_tt = icaltime_null_time ();
+ struct icaltimetype end_tt = icaltime_null_time ();
time_t start_timet,end_timet;
gint hours,minutes;
@@ -1709,7 +1709,7 @@ hour_minute_changed (EventPage *epage)
{
EventPagePrivate *priv;
gint for_hours, for_minutes;
- struct icaltimetype end_tt = icaltime_null_time();
+ struct icaltimetype end_tt = icaltime_null_time ();
priv = epage->priv;
@@ -1892,7 +1892,7 @@ remove_clicked_cb (GtkButton *btn, EventPage *epage)
for (tmp = paths; tmp; tmp=tmp->next) {
path = tmp->data;
- gtk_tree_model_get_iter (GTK_TREE_MODEL(priv->model), &iter, path);
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter, E_MEETING_STORE_ADDRESS_COL, &address, -1);
ia = e_meeting_store_find_attendee (priv->model, address, NULL);
@@ -2014,8 +2014,8 @@ void
event_page_set_all_day_event (EventPage *epage, gboolean all_day)
{
EventPagePrivate *priv = epage->priv;
- struct icaltimetype start_tt = icaltime_null_time();
- struct icaltimetype end_tt = icaltime_null_time();
+ struct icaltimetype start_tt = icaltime_null_time ();
+ struct icaltimetype end_tt = icaltime_null_time ();
CompEditor *editor;
GtkAction *action;
gboolean date_set;
@@ -2171,7 +2171,7 @@ event_page_set_info_string (EventPage *epage, const gchar *icon, const gchar *ms
priv = epage->priv;
gtk_image_set_from_stock (GTK_IMAGE (priv->info_icon), icon, GTK_ICON_SIZE_BUTTON);
- gtk_label_set_markup (GTK_LABEL(priv->info_string), msg);
+ gtk_label_set_markup (GTK_LABEL (priv->info_string), msg);
if (msg && icon)
gtk_widget_show (priv->info_hbox);
@@ -2415,8 +2415,8 @@ static void
times_updated (EventPage *epage, gboolean adjust_end_time)
{
EventPagePrivate *priv;
- struct icaltimetype start_tt = icaltime_null_time();
- struct icaltimetype end_tt = icaltime_null_time();
+ struct icaltimetype start_tt = icaltime_null_time ();
+ struct icaltimetype end_tt = icaltime_null_time ();
gboolean date_set, all_day_event;
gboolean set_start_date = FALSE, set_end_date = FALSE;
icaltimezone *start_zone;
@@ -2660,7 +2660,7 @@ source_changed_cb (ESourceComboBox *source_combo_box, EventPage *epage)
if (client) {
gchar *backend_addr = NULL;
- e_cal_get_cal_address(client, &backend_addr, NULL);
+ e_cal_get_cal_address (client, &backend_addr, NULL);
if (priv->is_meeting)
event_page_select_organizer (epage, backend_addr);
@@ -2979,7 +2979,7 @@ init_widgets (EventPage *epage)
update_end_time_combo ( epage);
/* Hour and Minute selector */
- gtk_spin_button_set_range( (GtkSpinButton*) priv->hour_selector, 0, G_MAXINT);
+ gtk_spin_button_set_range ( (GtkSpinButton*) priv->hour_selector, 0, G_MAXINT);
g_signal_connect (priv->hour_selector, "value-changed", G_CALLBACK (hour_sel_changed), epage);
g_signal_connect (priv->minute_selector, "value-changed", G_CALLBACK (minute_sel_changed), epage);
@@ -3081,7 +3081,7 @@ event_page_select_organizer (EventPage *epage, const gchar *backend_address)
ESource *source = NULL;
const gchar *user_addr = NULL;
- def_account = itip_addresses_get_default();
+ def_account = itip_addresses_get_default ();
if (def_account && def_account->enabled)
def_address = g_strdup_printf("%s <%s>", def_account->id->name, def_account->id->address);
@@ -3159,12 +3159,12 @@ event_page_construct (EventPage *epage, EMeetingStore *model)
}
priv->accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)priv->accounts);
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
+ for (it = e_list_get_iterator ((EList *)priv->accounts);
+ e_iterator_is_valid (it);
+ e_iterator_next (it)) {
gchar *full = NULL;
- a = (EAccount *)e_iterator_get(it);
+ a = (EAccount *)e_iterator_get (it);
/* skip disabled accounts */
if (!a->enabled)
@@ -3172,10 +3172,10 @@ event_page_construct (EventPage *epage, EMeetingStore *model)
full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
- priv->address_strings = g_list_append(priv->address_strings, full);
+ priv->address_strings = g_list_append (priv->address_strings, full);
}
- g_object_unref(it);
+ g_object_unref (it);
if (priv->address_strings) {
GList *l;
@@ -3331,7 +3331,7 @@ event_page_get_alarm_page (EventPage *epage)
tmp = GW("dialog-vbox1");
alarm_page = GW("vbox2");
- g_object_ref(alarm_page);
+ g_object_ref (alarm_page);
gtk_container_remove ((GtkContainer *)tmp, alarm_page);
return alarm_page;
@@ -3349,8 +3349,8 @@ event_page_get_attendee_page (EventPage *epage)
priv = epage->priv;
apage = priv->list_box;
- g_object_ref(apage);
- gtk_container_remove ((GtkContainer *)gtk_widget_get_parent(apage), apage);
+ g_object_ref (apage);
+ gtk_container_remove ((GtkContainer *)gtk_widget_get_parent (apage), apage);
gtk_widget_hide (priv->attendee_box);
return apage;
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 735566b837..b7e3095e3f 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -564,8 +564,8 @@ get_current_account (MemoPage *page)
if (!str)
return NULL;
- for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) {
- EAccount *a = (EAccount *)e_iterator_get(it);
+ for (it = e_list_get_iterator ((EList *)priv->accounts); e_iterator_is_valid (it); e_iterator_next (it)) {
+ EAccount *a = (EAccount *)e_iterator_get (it);
gchar *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
if (!g_ascii_strcasecmp (full, str)) {
@@ -659,7 +659,7 @@ memo_page_fill_component (CompEditorPage *page,
if (i == 50 && uc && uc < (gunichar)-2)
sumText.value = txt = g_strdup_printf ("%.*s...", idxToUse, str);
else
- sumText.value = txt = g_strndup(str, idxToUse);
+ sumText.value = txt = g_strndup (str, idxToUse);
sumText.altrep = NULL;
@@ -670,7 +670,7 @@ memo_page_fill_component (CompEditorPage *page,
e_cal_component_set_description_list (comp, &l);
- g_free(txt);
+ g_free (txt);
}
if (str)
@@ -779,7 +779,7 @@ memo_page_set_info_string (MemoPage *mpage, const gchar *icon, const gchar *msg)
priv = mpage->priv;
gtk_image_set_from_stock (GTK_IMAGE (priv->info_icon), icon, GTK_ICON_SIZE_BUTTON);
- gtk_label_set_markup (GTK_LABEL(priv->info_string), msg);
+ gtk_label_set_markup (GTK_LABEL (priv->info_string), msg);
if (msg && icon)
gtk_widget_show (priv->info_hbox);
@@ -914,7 +914,7 @@ source_changed_cb (ESourceComboBox *source_combo_box,
if (client) {
gchar *backend_addr = NULL;
- e_cal_get_cal_address(client, &backend_addr, NULL);
+ e_cal_get_cal_address (client, &backend_addr, NULL);
if (flags & COMP_EDITOR_IS_SHARED)
memo_page_select_organizer (mpage, backend_addr);
@@ -1012,7 +1012,7 @@ init_widgets (MemoPage *mpage)
e_buffer_tagger_connect (view);
/* Categories button */
- g_signal_connect(
+ g_signal_connect (
priv->categories_btn, "clicked",
G_CALLBACK (categories_clicked_cb), mpage);
@@ -1096,7 +1096,7 @@ memo_page_select_organizer (MemoPage *mpage, const gchar *backend_address)
ESource *source = NULL;
const gchar *user_addr = NULL;
- def_account = itip_addresses_get_default();
+ def_account = itip_addresses_get_default ();
if (def_account && def_account->enabled)
def_address = g_strdup_printf("%s <%s>", def_account->id->name, def_account->id->address);
@@ -1169,12 +1169,12 @@ memo_page_construct (MemoPage *mpage)
if (flags & COMP_EDITOR_IS_SHARED) {
priv->accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)priv->accounts);
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
+ for (it = e_list_get_iterator ((EList *)priv->accounts);
+ e_iterator_is_valid (it);
+ e_iterator_next (it)) {
gchar *full = NULL;
- a = (EAccount *)e_iterator_get(it);
+ a = (EAccount *)e_iterator_get (it);
/* skip disabled accounts */
if (!a->enabled)
@@ -1182,10 +1182,10 @@ memo_page_construct (MemoPage *mpage)
full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
- priv->address_strings = g_list_append(priv->address_strings, full);
+ priv->address_strings = g_list_append (priv->address_strings, full);
}
- g_object_unref(it);
+ g_object_unref (it);
if (priv->address_strings) {
GList *l;
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index c5944af194..555ca073c8 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -270,7 +270,7 @@ preview_recur (RecurrencePage *rpage)
tag_calendar_by_comp (E_CALENDAR (priv->preview_calendar), comp,
client, zone, TRUE, FALSE);
- g_object_unref(comp);
+ g_object_unref (comp);
}
static GObject *
diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c
index 823bd4be52..0f9a6fba8e 100644
--- a/calendar/gui/dialogs/save-comp.c
+++ b/calendar/gui/dialogs/save-comp.c
@@ -43,12 +43,12 @@
GtkResponseType
save_component_dialog (GtkWindow *parent, ECalComponent *comp)
{
- ECalComponentVType vtype = e_cal_component_get_vtype(comp);
+ ECalComponentVType vtype = e_cal_component_get_vtype (comp);
CompEditorFlags flags;
switch (vtype) {
case E_CAL_COMPONENT_EVENT:
- flags = comp_editor_get_flags (COMP_EDITOR(parent));
+ flags = comp_editor_get_flags (COMP_EDITOR (parent));
if (flags & COMP_EDITOR_MEETING)
return e_alert_run_dialog_for_args (parent, "calendar:prompt-save-meeting", NULL);
else
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 35ec225c19..ec63458d81 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -365,7 +365,7 @@ task_details_page_fill_component (CompEditorPage *page,
/* COMPLETED today or before */
icaltoday = icaltime_current_time_with_zone (zone);
icaltimezone_convert_time (&icaltoday, zone,
- icaltimezone_get_utc_timezone());
+ icaltimezone_get_utc_timezone ());
if (icaltime_compare_date_only (icalcomplete, icaltoday) > 0) {
comp_editor_page_display_validation_error (
@@ -498,7 +498,7 @@ complete_date_changed (TaskDetailsPage *tdpage, time_t ctime, gboolean complete)
{
CompEditorPageDates dates = {NULL, NULL, NULL, NULL};
icaltimezone *zone;
- struct icaltimetype completed_tt = icaltime_null_time();
+ struct icaltimetype completed_tt = icaltime_null_time ();
/* Get the current time in UTC. */
zone = icaltimezone_get_utc_timezone ();
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 5a9849db8e..476fb060d4 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -335,7 +335,7 @@ task_editor_init (TaskEditor *te)
G_CALLBACK (gtk_widget_hide), NULL);
g_signal_connect (
te->priv->task_details_window, "delete-event",
- G_CALLBACK(gtk_widget_hide), NULL);
+ G_CALLBACK (gtk_widget_hide), NULL);
te->priv->task_details_page = task_details_page_new (editor);
content_area = gtk_dialog_get_content_area (
@@ -434,18 +434,18 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
EIterator *it;
accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)accounts);
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
+ for (it = e_list_get_iterator ((EList *)accounts);
+ e_iterator_is_valid (it);
+ e_iterator_next (it)) {
EMeetingAttendee *ia;
- account = (EAccount*)e_iterator_get(it);
+ account = (EAccount*)e_iterator_get (it);
ia = e_meeting_store_find_attendee (priv->model, account->id->address, &row);
if (ia != NULL)
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_STATUS);
}
- g_object_unref(it);
+ g_object_unref (it);
} else if (e_cal_get_organizer_must_attend (client)) {
EMeetingAttendee *ia;
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 85c6bb15b8..7777f23dd0 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -483,8 +483,8 @@ get_current_account (TaskPage *page)
if (!str)
return NULL;
- for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) {
- EAccount *a = (EAccount *)e_iterator_get(it);
+ for (it = e_list_get_iterator ((EList *)priv->accounts); e_iterator_is_valid (it); e_iterator_next (it)) {
+ EAccount *a = (EAccount *)e_iterator_get (it);
gchar *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
if (!g_ascii_strcasecmp (full, str)) {
@@ -1184,7 +1184,7 @@ remove_clicked_cb (GtkButton *btn, TaskPage *page)
for (tmp = paths; tmp; tmp=tmp->next) {
path = tmp->data;
- gtk_tree_model_get_iter (GTK_TREE_MODEL(priv->model), &iter, path);
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter, E_MEETING_STORE_ADDRESS_COL, &address, -1);
ia = e_meeting_store_find_attendee (priv->model, address, NULL);
@@ -1357,7 +1357,7 @@ task_page_set_info_string (TaskPage *tpage, const gchar *icon, const gchar *msg)
priv = tpage->priv;
gtk_image_set_from_stock (GTK_IMAGE (priv->info_icon), icon, GTK_ICON_SIZE_BUTTON);
- gtk_label_set_markup (GTK_LABEL(priv->info_string), msg);
+ gtk_label_set_markup (GTK_LABEL (priv->info_string), msg);
if (msg && icon)
gtk_widget_show (priv->info_hbox);
@@ -1489,8 +1489,8 @@ date_changed_cb (EDateEdit *dedit,
CompEditorPageDates dates;
gboolean date_set, time_set;
ECalComponentDateTime start_dt, due_dt;
- struct icaltimetype start_tt = icaltime_null_time();
- struct icaltimetype due_tt = icaltime_null_time();
+ struct icaltimetype start_tt = icaltime_null_time ();
+ struct icaltimetype due_tt = icaltime_null_time ();
if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (tpage)))
return;
@@ -1624,8 +1624,8 @@ static void
times_updated (TaskPage *tpage, gboolean adjust_end_time)
{
TaskPagePrivate *priv;
- struct icaltimetype start_tt = icaltime_null_time();
- struct icaltimetype end_tt = icaltime_null_time();
+ struct icaltimetype start_tt = icaltime_null_time ();
+ struct icaltimetype end_tt = icaltime_null_time ();
gboolean date_set;
gboolean set_start_date = FALSE, set_end_date = FALSE, adjust_by_hour;
icaltimezone *zone;
@@ -1756,7 +1756,7 @@ source_changed_cb (ESourceComboBox *source_combo_box, TaskPage *tpage)
if (client) {
gchar *backend_addr = NULL;
- e_cal_get_cal_address(client, &backend_addr, NULL);
+ e_cal_get_cal_address (client, &backend_addr, NULL);
if (priv->is_assignment)
task_page_select_organizer (tpage, backend_addr);
@@ -1984,7 +1984,7 @@ task_page_select_organizer (TaskPage *tpage, const gchar *backend_address)
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tpage));
client = comp_editor_get_client (editor);
- def_account = itip_addresses_get_default();
+ def_account = itip_addresses_get_default ();
if (def_account && def_account->enabled)
def_address = g_strdup_printf("%s <%s>", def_account->id->name, def_account->id->address);
@@ -2061,12 +2061,12 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client)
}
priv->accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)priv->accounts);
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
+ for (it = e_list_get_iterator ((EList *)priv->accounts);
+ e_iterator_is_valid (it);
+ e_iterator_next (it)) {
gchar *full = NULL;
- a = (EAccount *)e_iterator_get(it);
+ a = (EAccount *)e_iterator_get (it);
/* skip disabled accounts */
if (!a->enabled)
@@ -2074,10 +2074,10 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client)
full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
- priv->address_strings = g_list_append(priv->address_strings, full);
+ priv->address_strings = g_list_append (priv->address_strings, full);
}
- g_object_unref(it);
+ g_object_unref (it);
if (priv->address_strings) {
GList *l;
diff --git a/calendar/gui/dialogs/task-page.h b/calendar/gui/dialogs/task-page.h
index 273c316879..0be9b8538b 100644
--- a/calendar/gui/dialogs/task-page.h
+++ b/calendar/gui/dialogs/task-page.h
@@ -80,7 +80,7 @@ void task_page_show_options (TaskPage *page);
void task_page_hide_options (TaskPage *page);
void task_page_set_assignment (TaskPage *page,
gboolean set);
-void task_page_send_options_clicked_cb(TaskPage *tpage);
+void task_page_send_options_clicked_cb (TaskPage *tpage);
void task_page_set_view_role (TaskPage *page,
gboolean state);
void task_page_set_view_status (TaskPage *page,
diff --git a/calendar/gui/e-cal-component-preview.h b/calendar/gui/e-cal-component-preview.h
index 03798a4727..89888afde0 100644
--- a/calendar/gui/e-cal-component-preview.h
+++ b/calendar/gui/e-cal-component-preview.h
@@ -65,7 +65,7 @@ struct _ECalComponentPreviewClass {
void (* selection_changed) (ECalComponentPreview *preview, gint n_selected);
};
-GType e_cal_component_preview_get_type(void);
+GType e_cal_component_preview_get_type (void);
GtkWidget * e_cal_component_preview_new (void);
icaltimezone * e_cal_component_preview_get_default_timezone
(ECalComponentPreview *preview);
diff --git a/calendar/gui/e-cal-config.c b/calendar/gui/e-cal-config.c
index a8d2ad169f..0454706fec 100644
--- a/calendar/gui/e-cal-config.c
+++ b/calendar/gui/e-cal-config.c
@@ -86,9 +86,9 @@ ecp_source_changed (struct _ESource *source, EConfig *ec)
static void
ecp_set_target (EConfig *ec, EConfigTarget *t)
{
- struct _ECalConfigPrivate *p = _PRIVATE(ec);
+ struct _ECalConfigPrivate *p = _PRIVATE (ec);
- ((EConfigClass *)ecp_parent_class)->set_target(ec, t);
+ ((EConfigClass *)ecp_parent_class)->set_target (ec, t);
if (t) {
switch (t->type) {
@@ -138,7 +138,7 @@ e_cal_config_get_type (void)
ECalConfig *
e_cal_config_new (gint type, const gchar *menuid)
{
- ECalConfig *ecp = g_object_new (e_cal_config_get_type(), NULL);
+ ECalConfig *ecp = g_object_new (e_cal_config_get_type (), NULL);
e_config_construct (&ecp->config, type, menuid);
return ecp;
}
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index 2cd5ad0b77..2efc7c2dff 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -174,7 +174,7 @@ setup_e_table (ECalListView *cal_list_view)
/* Create the header columns */
- extras = e_table_extras_new();
+ extras = e_table_extras_new ();
/* Normal string fields */
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 70d20c30b8..9cb8352c33 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -2690,7 +2690,7 @@ e_cal_model_component_class_init (ECalModelComponentClass *class)
static void
e_cal_model_component_finalize (GObject *object)
{
- ECalModelComponent *comp_data = E_CAL_MODEL_COMPONENT(object);
+ ECalModelComponent *comp_data = E_CAL_MODEL_COMPONENT (object);
if (comp_data->client) {
g_object_unref (comp_data->client);
diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h
index 2750006f06..ec883a7df2 100644
--- a/calendar/gui/e-cal-model.h
+++ b/calendar/gui/e-cal-model.h
@@ -191,7 +191,7 @@ void e_cal_model_set_flags (ECalModel *model,
icaltimezone * e_cal_model_get_timezone (ECalModel *model);
void e_cal_model_set_timezone (ECalModel *model,
icaltimezone *zone);
-void e_cal_model_set_default_category(ECalModel *model,
+void e_cal_model_set_default_category (ECalModel *model,
const gchar *default_cat);
gboolean e_cal_model_get_use_24_hour_format
(ECalModel *model);
@@ -240,7 +240,7 @@ ECalModelComponent *
e_cal_model_get_component_for_uid
(ECalModel *model,
const ECalComponentId *id);
-gchar * e_cal_model_date_value_to_string(ECalModel *model,
+gchar * e_cal_model_date_value_to_string (ECalModel *model,
gconstpointer value);
void e_cal_model_generate_instances (ECalModel *model,
time_t start,
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 2bc7eef003..4555ef9a81 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -977,7 +977,7 @@ e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart
case GNOME_CAL_MONTH_VIEW:
case GNOME_CAL_LIST_VIEW:
if (old_dtstart.is_date && old_dtend.is_date
- && memcmp (&ic_dur, &ic_oneday, sizeof(ic_dur)) == 0)
+ && memcmp (&ic_dur, &ic_oneday, sizeof (ic_dur)) == 0)
all_day_event = TRUE;
else {
icaltimetype new_time = icaltime_from_timet_with_zone (dtstart, FALSE, default_zone);
@@ -1271,7 +1271,7 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
e_cal_get_timezone (event->comp_data->client, dt.tzid, &zone, &error);
if (error) {
zone = e_calendar_view_get_timezone (cal_view);
- g_clear_error(&error);
+ g_clear_error (&error);
}
} else
zone = e_calendar_view_get_timezone (cal_view);
@@ -1331,7 +1331,7 @@ e_calendar_view_open_event (ECalendarView *cal_view)
ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
if (event && is_comp_data_valid (event))
e_calendar_view_edit_appointment (cal_view, event->comp_data->client,
- event->comp_data->icalcomp, icalcomponent_get_first_property(event->comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY) != NULL);
+ event->comp_data->icalcomp, icalcomponent_get_first_property (event->comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY) != NULL);
g_list_free (selected);
}
@@ -1646,7 +1646,7 @@ tooltip_grab (GtkWidget *tooltip, GdkEventKey *event, ECalendarView *view)
if (!widget)
return TRUE;
- gdk_keyboard_ungrab(GDK_CURRENT_TIME);
+ gdk_keyboard_ungrab (GDK_CURRENT_TIME);
gtk_widget_destroy (widget);
g_object_set_data (G_OBJECT (view), "tooltip-window", NULL);
@@ -1860,7 +1860,7 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
e_cal_component_get_organizer (newcomp, &organiser);
if (organiser.cn) {
gchar *ptr;
- ptr = strchr(organiser.value, ':');
+ ptr = strchr (organiser.value, ':');
if (ptr) {
ptr++;
@@ -1912,7 +1912,7 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
t_start = icaltime_as_timet_with_zone (*dtstart.value, zone);
t_end = icaltime_as_timet_with_zone (*dtend.value, zone);
- tmp1 = get_label(dtstart.value, zone, default_zone);
+ tmp1 = get_label (dtstart.value, zone, default_zone);
tmp = calculate_time (t_start, t_end);
/* To Translators: It will display "Time: ActualStartDateAndTime (DurationOfTheMeeting)"*/
diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h
index 1ba1727eba..9d455a8395 100644
--- a/calendar/gui/e-calendar-view.h
+++ b/calendar/gui/e-calendar-view.h
@@ -217,7 +217,7 @@ void e_calendar_view_new_appointment_full
gboolean meeting,
gboolean no_past_date);
void e_calendar_view_new_appointment (ECalendarView *cal_view);
-void e_calendar_view_edit_appointment(ECalendarView *cal_view,
+void e_calendar_view_edit_appointment (ECalendarView *cal_view,
ECal *client,
icalcomponent *icalcomp,
gboolean meeting);
diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c
index 867cb89e81..724e154648 100644
--- a/calendar/gui/e-cell-date-edit-text.c
+++ b/calendar/gui/e-cell-date-edit-text.c
@@ -126,7 +126,7 @@ cell_date_edit_text_get_text (ECellText *cell,
/* Note that although the property may be in a different
timezone, we convert it to the current timezone to display
it in the table. If the user actually edits the value,
- it will be set to the current timezone. See set_value(). */
+ it will be set to the current timezone. See set_value (). */
tmp_tm = icaltimetype_to_tm_with_zone (&dv->tt, dv->zone, timezone);
return e_datetime_format_format_tm (
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 0229f51602..7914fc06b5 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -1125,7 +1125,7 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item,
grid_x1 = day_view->day_offsets[0] - x;
grid_x2 = day_view->day_offsets[day_view->days_shown] - x;
- cairo_save(cr);
+ cairo_save (cr);
gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_BG_GRID]);
diff --git a/calendar/gui/e-day-view-top-item.h b/calendar/gui/e-day-view-top-item.h
index 64d56b135f..983a66fabb 100644
--- a/calendar/gui/e-day-view-top-item.h
+++ b/calendar/gui/e-day-view-top-item.h
@@ -70,8 +70,8 @@ void e_day_view_top_item_get_day_label
gint day,
gchar *buffer,
gint buffer_len);
-EDayView * e_day_view_top_item_get_day_view(EDayViewTopItem *top_item);
-void e_day_view_top_item_set_day_view(EDayViewTopItem *top_item,
+EDayView * e_day_view_top_item_get_day_view (EDayViewTopItem *top_item);
+void e_day_view_top_item_set_day_view (EDayViewTopItem *top_item,
EDayView *day_view);
gboolean e_day_view_top_item_get_show_dates
(EDayViewTopItem *top_item);
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 85513a2c74..b685210a6e 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -109,7 +109,7 @@ static GtkTargetEntry target_table[] = {
static void e_day_view_destroy (GtkObject *object);
static void e_day_view_realize (GtkWidget *widget);
-static void e_day_view_set_colors(EDayView *day_view, GtkWidget *widget);
+static void e_day_view_set_colors (EDayView *day_view, GtkWidget *widget);
static void e_day_view_unrealize (GtkWidget *widget);
static void e_day_view_style_set (GtkWidget *widget,
GtkStyle *previous_style);
@@ -1432,7 +1432,7 @@ e_day_view_realize (GtkWidget *widget)
/* Allocate the colors. */
- e_day_view_set_colors(day_view, widget);
+ e_day_view_set_colors (day_view, widget);
gdk_gc_set_colormap (day_view->main_gc, colormap);
@@ -1461,7 +1461,7 @@ e_day_view_realize (GtkWidget *widget)
}
static void
-e_day_view_set_colors(EDayView *day_view, GtkWidget *widget)
+e_day_view_set_colors (EDayView *day_view, GtkWidget *widget)
{
GtkStyle *style;
@@ -1611,7 +1611,7 @@ e_day_view_style_set (GtkWidget *widget,
(*GTK_WIDGET_CLASS (e_day_view_parent_class)->style_set)(widget, previous_style);
day_view = E_DAY_VIEW (widget);
- e_day_view_set_colors(day_view, widget);
+ e_day_view_set_colors (day_view, widget);
for (week_day = 0; week_day < E_DAY_VIEW_MAX_DAYS; week_day++) {
for (event_num = 0; event_num < day_view->events[week_day]->len; event_num++) {
@@ -4917,7 +4917,7 @@ e_day_view_reshape_long_event (EDayView *day_view,
g_object_set_data (G_OBJECT (event->canvas_item), "event-day", GINT_TO_POINTER (E_DAY_VIEW_LONG_EVENT));
g_signal_connect (event->canvas_item, "event",
G_CALLBACK (e_day_view_on_text_item_event), day_view);
- g_signal_emit_by_name (G_OBJECT(day_view),
+ g_signal_emit_by_name (G_OBJECT (day_view),
"event_added", event);
e_day_view_update_long_event_label (day_view, event_num);
@@ -4974,7 +4974,7 @@ e_day_view_reshape_long_event (EDayView *day_view,
"clip_width", (gdouble) text_w,
"clip_height", (gdouble) item_h,
NULL);
- e_canvas_item_move_absolute(event->canvas_item,
+ e_canvas_item_move_absolute (event->canvas_item,
text_x, item_y);
g_object_unref (layout);
@@ -5068,7 +5068,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
num_icons++;
num_icons += cal_comp_util_get_n_icons (comp, NULL);
- g_object_unref(comp);
+ g_object_unref (comp);
}
if (num_icons > 0) {
@@ -5104,7 +5104,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
g_object_set_data (G_OBJECT (event->canvas_item), "event-day", GINT_TO_POINTER (day));
g_signal_connect (event->canvas_item, "event",
G_CALLBACK (e_day_view_on_text_item_event), day_view);
- g_signal_emit_by_name (G_OBJECT(day_view),
+ g_signal_emit_by_name (G_OBJECT (day_view),
"event_added", event);
e_day_view_update_event_label (day_view, day, event_num);
@@ -5116,7 +5116,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
"clip_height", (gdouble) item_h,
"x_offset", (gdouble) icons_offset,
NULL);
- e_canvas_item_move_absolute(event->canvas_item,
+ e_canvas_item_move_absolute (event->canvas_item,
item_x, item_y);
}
}
@@ -5442,7 +5442,7 @@ e_day_view_key_press (GtkWidget *widget, GdkEventKey *event)
static void
e_day_view_goto_start_of_work_day (EDayView *day_view)
{
- g_return_if_fail(day_view!=NULL);
+ g_return_if_fail (day_view!=NULL);
if (day_view->selection_in_top_canvas)
return;
@@ -5492,7 +5492,7 @@ e_day_view_goto_end_of_work_day (EDayView *day_view)
static void
e_day_view_change_duration_to_start_of_work_day (EDayView *day_view)
{
- g_return_if_fail(day_view != NULL);
+ g_return_if_fail (day_view != NULL);
if (day_view->selection_in_top_canvas)
return;
@@ -5525,7 +5525,7 @@ e_day_view_change_duration_to_start_of_work_day (EDayView *day_view)
static void
e_day_view_change_duration_to_end_of_work_day (EDayView *day_view)
{
- g_return_if_fail(day_view != NULL);
+ g_return_if_fail (day_view != NULL);
if (day_view->selection_in_top_canvas)
return;
@@ -5604,7 +5604,7 @@ e_day_view_focus (GtkWidget *widget, GtkDirectionType direction)
if ((new_day == -1) && (new_event_num == -1)) {
/* focus should go to the day view widget itself
*/
- gtk_widget_grab_focus (GTK_WIDGET(day_view));
+ gtk_widget_grab_focus (GTK_WIDGET (day_view));
return TRUE;
}
@@ -5732,7 +5732,7 @@ e_day_view_get_next_tab_event (EDayView *day_view, GtkDirectionType direction,
g_return_val_if_fail (day_out != NULL, FALSE);
g_return_val_if_fail (event_num_out != NULL, FALSE);
- days_shown = e_day_view_get_days_shown(day_view);
+ days_shown = e_day_view_get_days_shown (day_view);
*day_out = -1;
*event_num_out = -1;
@@ -6144,7 +6144,7 @@ e_day_view_start_editing_event (EDayView *day_view,
/* We must grab the focus before setting the initial text, since
grabbing the focus will result in a call to
- e_day_view_on_editing_started(), which will reset the text to get
+ e_day_view_on_editing_started (), which will reset the text to get
rid of the start and end times. */
e_canvas_item_grab_focus (event->canvas_item, TRUE);
@@ -7175,7 +7175,7 @@ e_day_view_get_event_position (EDayView *day_view,
if (event->num_columns == 0)
return FALSE;
- e_day_view_get_event_rows(day_view, day, event_num, &start_row, &end_row);
+ e_day_view_get_event_rows (day_view, day, event_num, &start_row, &end_row);
cols_in_row = day_view->cols_per_row[day][start_row];
start_col = event->start_row_or_col;
diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h
index aee8be0683..4e70f46531 100644
--- a/calendar/gui/e-day-view.h
+++ b/calendar/gui/e-day-view.h
@@ -125,7 +125,7 @@ typedef enum
The full format is like 'Thursday 12 September'. The abbreviated format is
like 'Thu 12 Sep'. The no weekday format is like '12 Sep'. The short format
is like '12'. The actual format used is determined in
- e_day_view_recalc_cell_sizes(), once we know the font being used. */
+ e_day_view_recalc_cell_sizes (), once we know the font being used. */
typedef enum
{
E_DAY_VIEW_DATE_FULL,
@@ -259,7 +259,7 @@ struct _EDayView {
/* These are set to FALSE whenever an event in the corresponding array
is changed. Any function that needs the events sorted calls
- e_day_view_ensure_events_sorted(). */
+ e_day_view_ensure_events_sorted (). */
gboolean long_events_sorted;
gboolean events_sorted[E_DAY_VIEW_MAX_DAYS];
@@ -537,8 +537,8 @@ void e_day_view_set_work_day_end_minute (EDayView *day_view,
/* Whether we display the Marcus Bains Line in the main canvas and time
canvas. */
void e_day_view_marcus_bains_update (EDayView *day_view);
-gboolean e_day_view_marcus_bains_get_show_line(EDayView *day_view);
-void e_day_view_marcus_bains_set_show_line(EDayView *day_view,
+gboolean e_day_view_marcus_bains_get_show_line (EDayView *day_view);
+void e_day_view_marcus_bains_set_show_line (EDayView *day_view,
gboolean show_line);
const gchar *
e_day_view_marcus_bains_get_day_view_color
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index dd9516f7bf..838445d1b9 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -585,9 +585,9 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par
g_free (delegator_clean);
} else {
- it = e_list_get_iterator((EList *)priv->accounts);
- while (e_iterator_is_valid(it)) {
- const EAccount *account = e_iterator_get(it);
+ it = e_list_get_iterator ((EList *)priv->accounts);
+ while (e_iterator_is_valid (it)) {
+ const EAccount *account = e_iterator_get (it);
/* Check for a matching address */
if (attendee_clean != NULL
@@ -600,7 +600,7 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par
g_free (attendee_clean);
g_free (name_clean);
g_free (my_alt_address);
- g_object_unref(it);
+ g_object_unref (it);
return;
}
@@ -609,9 +609,9 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par
&& !g_ascii_strcasecmp (account->id->name, name_clean))
my_alt_address = g_strdup (attendee_clean);
- e_iterator_next(it);
+ e_iterator_next (it);
}
- g_object_unref(it);
+ g_object_unref (it);
}
g_free (attendee_clean);
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index d0f172c81d..8d233cf1ef 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -542,7 +542,7 @@ build_table (EMeetingListView *lview)
NULL);
col = gtk_tree_view_get_column (view, pos -1);
gtk_tree_view_column_set_resizable (col, TRUE);
- gtk_tree_view_column_set_reorderable(col, TRUE);
+ gtk_tree_view_column_set_reorderable (col, TRUE);
gtk_tree_view_column_set_expand (col, TRUE);
g_object_set (col, "min-width", 50, NULL);
g_object_set_data (G_OBJECT (col), "mtg-store-col", GINT_TO_POINTER (E_MEETING_STORE_ATTENDEE_COL));
@@ -559,7 +559,7 @@ build_table (EMeetingListView *lview)
NULL);
col = gtk_tree_view_get_column (view, pos -1);
gtk_tree_view_column_set_resizable (col, TRUE);
- gtk_tree_view_column_set_reorderable(col, TRUE);
+ gtk_tree_view_column_set_reorderable (col, TRUE);
g_object_set_data (G_OBJECT (col), "mtg-store-col", GINT_TO_POINTER (E_MEETING_STORE_TYPE_COL));
g_signal_connect (renderer, "edited", G_CALLBACK (type_edited_cb), view);
g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_TYPE_COL), renderer);
@@ -571,7 +571,7 @@ build_table (EMeetingListView *lview)
NULL);
col = gtk_tree_view_get_column (view, pos -1);
gtk_tree_view_column_set_resizable (col, TRUE);
- gtk_tree_view_column_set_reorderable(col, TRUE);
+ gtk_tree_view_column_set_reorderable (col, TRUE);
g_object_set_data (G_OBJECT (col), "mtg-store-col", GINT_TO_POINTER (E_MEETING_STORE_ROLE_COL));
g_signal_connect (renderer, "edited", G_CALLBACK (role_edited_cb), view);
g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_ROLE_COL), renderer);
@@ -584,7 +584,7 @@ build_table (EMeetingListView *lview)
NULL);
col = gtk_tree_view_get_column (view, pos -1);
gtk_tree_view_column_set_resizable (col, TRUE);
- gtk_tree_view_column_set_reorderable(col, TRUE);
+ gtk_tree_view_column_set_reorderable (col, TRUE);
g_object_set_data (G_OBJECT (col), "mtg-store-col", GINT_TO_POINTER (E_MEETING_STORE_RSVP_COL));
g_signal_connect (renderer, "edited", G_CALLBACK (rsvp_edited_cb), view);
g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_RSVP_COL), renderer);
@@ -596,7 +596,7 @@ build_table (EMeetingListView *lview)
NULL);
col = gtk_tree_view_get_column (view, pos -1);
gtk_tree_view_column_set_resizable (col, TRUE);
- gtk_tree_view_column_set_reorderable(col, TRUE);
+ gtk_tree_view_column_set_reorderable (col, TRUE);
g_object_set_data (G_OBJECT (col), "mtg-store-col", GINT_TO_POINTER (E_MEETING_STORE_STATUS_COL));
g_signal_connect (renderer, "edited", G_CALLBACK (status_edited_cb), view);
g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_STATUS_COL), renderer);
@@ -695,7 +695,7 @@ e_meeting_list_view_new (EMeetingStore *store)
build_table (view);
}
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(view));
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
g_signal_connect (selection, "changed", G_CALLBACK (row_activated_cb), view);
return view;
}
@@ -831,7 +831,7 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role
if (!g_ascii_strcasecmp (attr, "icscalendar")) {
/* FIXME: this does not work, have to use first
- e_destination_use_contact() */
+ e_destination_use_contact () */
contact = e_destination_get_contact (dest);
if (contact) {
attendee = e_contact_get (contact, E_CONTACT_FREEBUSY_URL);
diff --git a/calendar/gui/e-meeting-time-sel.h b/calendar/gui/e-meeting-time-sel.h
index dc1f2c8eeb..efd7671f3d 100644
--- a/calendar/gui/e-meeting-time-sel.h
+++ b/calendar/gui/e-meeting-time-sel.h
@@ -70,7 +70,7 @@ G_BEGIN_DECLS
/* This is used to specify the format used when displaying the dates.
The full format is like 'Sunday, September 12, 1999'. The abbreviated format
is like 'Sun 12/9/99'. The short format is like '12/9/99'. The actual
- format used is determined in e_meeting_time_selector_style_set(), once we
+ format used is determined in e_meeting_time_selector_style_set (), once we
know the font being used. */
typedef enum
{
@@ -228,7 +228,7 @@ struct _EMeetingTimeSelector {
/* These are the x pixel coordinates in the entire scroll region of
the start and end times. Set to meeting_positions_valid to FALSE to
invalidate. They will then be recomputed when needed. Always access
- with e_meeting_time_selector_get_meeting_time_positions(). */
+ with e_meeting_time_selector_get_meeting_time_positions (). */
gint meeting_positions_valid;
gint meeting_positions_in_scroll_area;
gint meeting_start_x;
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index 8355aa9616..f2df4d6697 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -520,7 +520,7 @@ memo_table_query_tooltip (GtkWidget *widget,
e_cal_component_get_organizer (new_comp, &organizer);
if (organizer.cn) {
gchar *ptr;
- ptr = strchr( organizer.value, ':');
+ ptr = strchr ( organizer.value, ':');
if (ptr) {
ptr++;
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index d1c03563a2..6441d4f450 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -737,7 +737,7 @@ task_table_query_tooltip (GtkWidget *widget,
e_cal_component_get_organizer (new_comp, &organizer);
if (organizer.cn) {
gchar *ptr;
- ptr = strchr( organizer.value, ':');
+ ptr = strchr ( organizer.value, ':');
if (ptr) {
ptr++;
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 4aa2cb065c..926bd1fe95 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -506,7 +506,7 @@ week_view_event_item_draw_icons (EWeekViewEventItem *event_item,
g_slist_free (categories_pixbufs);
cairo_destroy (cr);
- g_object_unref(comp);
+ g_object_unref (comp);
gdk_gc_set_clip_mask (gc, NULL);
}
diff --git a/calendar/gui/e-week-view-layout.c b/calendar/gui/e-week-view-layout.c
index 743f890485..52db8c19fa 100644
--- a/calendar/gui/e-week-view-layout.c
+++ b/calendar/gui/e-week-view-layout.c
@@ -410,7 +410,7 @@ e_week_view_layout_get_day_position (gint day,
/* Returns TRUE if the event span is visible or FALSE if it isn't.
It also returns the number of days of the span that are visible.
Usually this can easily be determined by the start & end days and row of
- the span, which are set in e_week_view_layout_event(). Though we need a
+ the span, which are set in e_week_view_layout_event (). Though we need a
special case for the weekends when they are compressed, since the span may
not fit. */
gboolean
diff --git a/calendar/gui/e-week-view-layout.h b/calendar/gui/e-week-view-layout.h
index 67975b2b20..98bf1ccb3a 100644
--- a/calendar/gui/e-week-view-layout.h
+++ b/calendar/gui/e-week-view-layout.h
@@ -43,7 +43,7 @@ GArray* e_week_view_layout_events (GArray *events,
/* Returns which 'cell' in the table the day appears in. Note that most days
have a height of 2 rows, but Sat/Sun are sometimes compressed so they have
a height of only 1 row. */
-void e_week_view_layout_get_day_position(gint day,
+void e_week_view_layout_get_day_position (gint day,
gboolean multi_week_view,
gint weeks_shown,
gint display_start_day,
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index 3522790401..a42b60ea40 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -266,7 +266,7 @@ week_view_main_item_draw_day (EWeekViewMainItem *main_item,
layout = pango_cairo_create_layout (cr);
pango_layout_set_font_description (layout, font_desc);
pango_layout_set_text (layout, buffer, -1);
- pango_layout_set_markup (layout, buffer, strlen(buffer));
+ pango_layout_set_markup (layout, buffer, strlen (buffer));
} else {
g_date_strftime (buffer, sizeof (buffer),
format_string ? format_string : "%d", date);
diff --git a/calendar/gui/e-week-view-titles-item.h b/calendar/gui/e-week-view-titles-item.h
index d4cc111117..d6862bde95 100644
--- a/calendar/gui/e-week-view-titles-item.h
+++ b/calendar/gui/e-week-view-titles-item.h
@@ -65,7 +65,7 @@ struct _EWeekViewTitlesItemClass {
GnomeCanvasItemClass parent_class;
};
-GType e_week_view_titles_item_get_type(void);
+GType e_week_view_titles_item_get_type (void);
EWeekView * e_week_view_titles_item_get_week_view
(EWeekViewTitlesItem *titles_item);
void e_week_view_titles_item_set_week_view
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 91abad1b50..83b9fa2d59 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -86,7 +86,7 @@ typedef struct {
static void e_week_view_destroy (GtkObject *object);
static void e_week_view_realize (GtkWidget *widget);
-static void e_week_view_set_colors(EWeekView *week_view, GtkWidget *widget);
+static void e_week_view_set_colors (EWeekView *week_view, GtkWidget *widget);
static void e_week_view_unrealize (GtkWidget *widget);
static void e_week_view_style_set (GtkWidget *widget,
GtkStyle *previous_style);
@@ -915,7 +915,7 @@ e_week_view_realize (GtkWidget *widget)
colormap = gtk_widget_get_colormap (widget);
/* Allocate the colors. */
- e_week_view_set_colors(week_view, widget);
+ e_week_view_set_colors (week_view, widget);
gdk_gc_set_colormap (week_view->main_gc, colormap);
@@ -949,7 +949,7 @@ color_inc (GdkColor c, gint amount)
}
static void
-e_week_view_set_colors(EWeekView *week_view, GtkWidget *widget)
+e_week_view_set_colors (EWeekView *week_view, GtkWidget *widget)
{
GtkStyle *style;
@@ -1086,7 +1086,7 @@ e_week_view_style_set (GtkWidget *widget,
week_view = E_WEEK_VIEW (widget);
style = gtk_widget_get_style (widget);
- e_week_view_set_colors(week_view, widget);
+ e_week_view_set_colors (week_view, widget);
if (week_view->spans) {
for (span_num = 0; span_num < week_view->spans->len;
span_num++) {
@@ -1546,7 +1546,7 @@ e_week_view_focus (GtkWidget *widget, GtkDirectionType direction)
current_day = span->start_day;
if ((week_view->focused_jump_button != current_day) &&
- e_week_view_is_jump_button_visible(week_view, current_day)) {
+ e_week_view_is_jump_button_visible (week_view, current_day)) {
/* focus go to the jump button */
e_week_view_stop_editing_event (week_view);
@@ -2316,7 +2316,7 @@ e_week_view_get_day_position (EWeekView *week_view,
/* Returns the bounding box for a span of an event. Usually this can easily
be determined by the start & end days and row of the span, which are set in
- e_week_view_layout_event(). Though we need a special case for the weekends
+ e_week_view_layout_event (). Though we need a special case for the weekends
when they are compressed, since the span may not fit.
The bounding box includes the entire width of the days in the view (but
not the vertical line down the right of the last day), though the displayed
@@ -3179,7 +3179,7 @@ e_week_view_reshape_event_span (EWeekView *week_view,
g_signal_connect (span->text_item, "event",
G_CALLBACK (e_week_view_on_text_item_event),
week_view);
- g_signal_emit_by_name (G_OBJECT(week_view),
+ g_signal_emit_by_name (G_OBJECT (week_view),
"event_added", event);
}
@@ -3978,7 +3978,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
if (string_is_empty (text) && !on_server) {
e_cal_component_get_uid (comp, &uid);
- g_signal_handlers_disconnect_by_func(item, e_week_view_on_text_item_event, week_view);
+ g_signal_handlers_disconnect_by_func (item, e_week_view_on_text_item_event, week_view);
e_week_view_foreach_event_with_uid (week_view, uid,
e_week_view_remove_event_cb, NULL);
week_view->event_destroyed = TRUE;
diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h
index 0712e1ac6f..83d058e2d7 100644
--- a/calendar/gui/e-week-view.h
+++ b/calendar/gui/e-week-view.h
@@ -260,7 +260,7 @@ struct _EWeekView {
PangoFontDescription *small_font_desc;
/* The widths of various pieces of text, used to determine which of
- several date formats to display, set in e_week_view_style_set(). */
+ several date formats to display, set in e_week_view_style_set (). */
gint space_width; /* One space character ' '. */
gint colon_width; /* Size of ':' in the font. */
gint slash_width; /* Size of '/' in the font. */
@@ -390,8 +390,8 @@ void e_week_view_set_multi_week_view (EWeekView *week_view,
gboolean multi_week_view);
/* Whether to update the base date when the time range changes */
-gboolean e_week_view_get_update_base_date(EWeekView *week_view);
-void e_week_view_set_update_base_date(EWeekView *week_view,
+gboolean e_week_view_get_update_base_date (EWeekView *week_view);
+void e_week_view_set_update_base_date (EWeekView *week_view,
gboolean update_base_date);
/* The number of weeks shown in the multi-week view. */
@@ -401,8 +401,8 @@ void e_week_view_set_weeks_shown (EWeekView *week_view,
/* Whether the weekend (Sat/Sun) should be compressed into 1 cell in the Month
view. In the Week view they are always compressed. */
-gboolean e_week_view_get_compress_weekend(EWeekView *week_view);
-void e_week_view_set_compress_weekend(EWeekView *week_view,
+gboolean e_week_view_get_compress_weekend (EWeekView *week_view);
+void e_week_view_set_compress_weekend (EWeekView *week_view,
gboolean compress_weekend);
/* Whether we display event end times. */
diff --git a/calendar/gui/ea-cal-view-event.c b/calendar/gui/ea-cal-view-event.c
index 3b36d7a07f..229d3822d5 100644
--- a/calendar/gui/ea-cal-view-event.c
+++ b/calendar/gui/ea-cal-view-event.c
@@ -253,8 +253,8 @@ ea_cal_view_event_dispose (GObject *object)
a11y->state_set = NULL;
}
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static G_CONST_RETURN gchar *
@@ -276,7 +276,7 @@ ea_cal_view_event_get_name (AtkObject *accessible)
g_obj = atk_gobject_accessible_get_object (atk_gobj);
if (!g_obj || !E_IS_TEXT (g_obj))
return NULL;
- event = ea_calendar_helpers_get_cal_view_event_from (GNOME_CANVAS_ITEM(g_obj));
+ event = ea_calendar_helpers_get_cal_view_event_from (GNOME_CANVAS_ITEM (g_obj));
if (!is_comp_data_valid (event))
return NULL;
@@ -356,7 +356,7 @@ ea_cal_view_event_get_index_in_parent (AtkObject *accessible)
ECalendarViewEvent *cal_view_event;
g_return_val_if_fail (EA_IS_CAL_VIEW_EVENT (accessible), -1);
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible));
+ g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible));
if (!g_obj)
/* defunct object*/
return -1;
@@ -459,7 +459,7 @@ ea_cal_view_get_extents (AtkComponent *component,
g_return_if_fail (EA_IS_CAL_VIEW_EVENT (component));
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component));
+ g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component));
if (!g_obj)
/* defunct object*/
return;
diff --git a/calendar/gui/ea-cal-view.c b/calendar/gui/ea-cal-view.c
index 21b35e4e17..08dba44340 100644
--- a/calendar/gui/ea-cal-view.c
+++ b/calendar/gui/ea-cal-view.c
@@ -49,11 +49,11 @@ static void atk_action_interface_init (AtkActionIface *iface);
static gboolean action_interface_do_action (AtkAction *action, gint i);
static gint action_interface_get_n_actions (AtkAction *action);
static G_CONST_RETURN gchar *
-action_interface_get_description(AtkAction *action, gint i);
+action_interface_get_description (AtkAction *action, gint i);
static G_CONST_RETURN gchar *
action_interface_get_keybinding (AtkAction *action, gint i);
static G_CONST_RETURN gchar *
-action_interface_action_get_name(AtkAction *action, gint i);
+action_interface_action_get_name (AtkAction *action, gint i);
static gpointer parent_class = NULL;
@@ -185,7 +185,7 @@ ea_cal_view_get_parent (AtkObject *accessible)
cal_view = E_CALENDAR_VIEW (widget);
gnomeCalendar = e_calendar_view_get_calendar (cal_view);
- return gtk_widget_get_accessible (GTK_WIDGET(gnomeCalendar));
+ return gtk_widget_get_accessible (GTK_WIDGET (gnomeCalendar));
}
static void
@@ -197,7 +197,7 @@ ea_cal_view_event_changed_cb (ECalendarView *cal_view, ECalendarViewEvent *event
g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- atk_obj = gtk_widget_get_accessible (GTK_WIDGET(cal_view));
+ atk_obj = gtk_widget_get_accessible (GTK_WIDGET (cal_view));
if (!EA_IS_CAL_VIEW (atk_obj))
return;
@@ -235,7 +235,7 @@ ea_cal_view_event_added_cb (ECalendarView *cal_view, ECalendarViewEvent *event,
g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- atk_obj = gtk_widget_get_accessible (GTK_WIDGET(cal_view));
+ atk_obj = gtk_widget_get_accessible (GTK_WIDGET (cal_view));
if (!EA_IS_CAL_VIEW (atk_obj))
return;
@@ -274,7 +274,7 @@ idle_dates_changed (gpointer data)
g_return_val_if_fail (data, FALSE);
g_return_val_if_fail (EA_IS_CAL_VIEW (data), FALSE);
- ea_cal_view = ATK_OBJECT(data);
+ ea_cal_view = ATK_OBJECT (data);
if (ea_cal_view->name) {
g_free (ea_cal_view->name);
@@ -382,7 +382,7 @@ action_interface_get_n_actions (AtkAction *action)
}
static G_CONST_RETURN gchar *
-action_interface_get_description(AtkAction *action, gint index)
+action_interface_get_description (AtkAction *action, gint index)
{
return action_interface_action_get_name (action, index);
}
@@ -425,7 +425,7 @@ action_interface_get_keybinding (AtkAction *action, gint index)
}
static G_CONST_RETURN gchar *
-action_interface_action_get_name(AtkAction *action, gint i)
+action_interface_action_get_name (AtkAction *action, gint i)
{
if (i >= 0 && i < CAL_VIEW_ACTION_NUM)
return action_name[i];
diff --git a/calendar/gui/ea-calendar-helpers.c b/calendar/gui/ea-calendar-helpers.c
index e8d91df217..05285da26f 100644
--- a/calendar/gui/ea-calendar-helpers.c
+++ b/calendar/gui/ea-calendar-helpers.c
@@ -55,7 +55,7 @@ ea_calendar_helpers_get_accessible_for (GnomeCanvasItem *canvas_item)
if (E_IS_TEXT (canvas_item)) {
atk_obj = ea_cal_view_event_new (g_obj);
}
- else if (GNOME_IS_CANVAS_PIXBUF(canvas_item)) {
+ else if (GNOME_IS_CANVAS_PIXBUF (canvas_item)) {
atk_obj = ea_jump_button_new (g_obj);
}
else
@@ -86,7 +86,7 @@ ea_calendar_helpers_get_cal_view_from (GnomeCanvasItem *canvas_item)
/* canvas_item->canvas is the ECanvas for day view */
/* parent of canvas_item->canvas is the EDayView or EWeekView widget */
canvas = canvas_item->canvas;
- view_widget = gtk_widget_get_parent (GTK_WIDGET(canvas));
+ view_widget = gtk_widget_get_parent (GTK_WIDGET (canvas));
if (!view_widget || !E_IS_CALENDAR_VIEW (view_widget))
return NULL;
diff --git a/calendar/gui/ea-calendar.c b/calendar/gui/ea-calendar.c
index 84ce9d8f6b..68b6abb28a 100644
--- a/calendar/gui/ea-calendar.c
+++ b/calendar/gui/ea-calendar.c
@@ -59,7 +59,7 @@ gnome_calendar_a11y_init (void)
/* we only add focus watcher when accessibility is enabled
*/
if (atk_get_root ()) {
- EA_SET_FACTORY (gnome_calendar_get_type(), ea_gnome_calendar);
+ EA_SET_FACTORY (gnome_calendar_get_type (), ea_gnome_calendar);
/* force loading some types */
e_text_type = g_type_class_ref (E_TYPE_TEXT);
@@ -76,11 +76,11 @@ gnome_calendar_a11y_init (void)
0, ea_calendar_focus_watcher,
NULL, (GDestroyNotify) NULL);
g_signal_add_emission_hook (g_signal_lookup ("event-after",
- e_day_view_get_type()),
+ e_day_view_get_type ()),
0, ea_calendar_focus_watcher,
NULL, (GDestroyNotify) NULL);
g_signal_add_emission_hook (g_signal_lookup ("event",
- e_day_view_main_item_get_type()),
+ e_day_view_main_item_get_type ()),
0, ea_calendar_focus_watcher,
NULL, (GDestroyNotify) NULL);
g_signal_add_emission_hook (g_signal_lookup ("event-after",
@@ -88,7 +88,7 @@ gnome_calendar_a11y_init (void)
0, ea_calendar_focus_watcher,
NULL, (GDestroyNotify) NULL);
g_signal_add_emission_hook (g_signal_lookup ("event",
- e_week_view_main_item_get_type()),
+ e_week_view_main_item_get_type ()),
0, ea_calendar_focus_watcher,
NULL, (GDestroyNotify) NULL);
@@ -98,13 +98,13 @@ gnome_calendar_a11y_init (void)
void
e_cal_view_a11y_init (void)
{
- EA_SET_FACTORY (e_calendar_view_get_type(), ea_cal_view);
+ EA_SET_FACTORY (e_calendar_view_get_type (), ea_cal_view);
}
void
e_day_view_a11y_init (void)
{
- EA_SET_FACTORY (e_day_view_get_type(), ea_day_view);
+ EA_SET_FACTORY (e_day_view_get_type (), ea_day_view);
}
void
diff --git a/calendar/gui/ea-day-view-cell.c b/calendar/gui/ea-day-view-cell.c
index 609b515526..84f0c4d115 100644
--- a/calendar/gui/ea-day-view-cell.c
+++ b/calendar/gui/ea-day-view-cell.c
@@ -246,7 +246,7 @@ ea_day_view_cell_ref_state_set (AtkObject *obj)
gint parent_x, parent_y, parent_width, parent_height;
state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (obj);
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(obj));
+ g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (obj));
if (!g_obj)
return state_set;
@@ -337,7 +337,7 @@ component_interface_get_extents (AtkComponent *component,
g_return_if_fail (EA_IS_DAY_VIEW_CELL (component));
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component));
+ g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component));
if (!g_obj)
/* defunct object*/
return;
diff --git a/calendar/gui/ea-day-view-main-item.c b/calendar/gui/ea-day-view-main-item.c
index 861b83746b..a4cb0267d9 100644
--- a/calendar/gui/ea-day-view-main-item.c
+++ b/calendar/gui/ea-day-view-main-item.c
@@ -29,7 +29,7 @@
#include <glib/gi18n.h>
/* EaDayViewMainItem */
-static void ea_day_view_main_item_class_init(EaDayViewMainItemClass *klass);
+static void ea_day_view_main_item_class_init (EaDayViewMainItemClass *klass);
static void ea_day_view_main_item_finalize (GObject *object);
static G_CONST_RETURN gchar *
@@ -191,7 +191,7 @@ ea_day_view_main_item_get_type (void)
*/
factory = atk_registry_get_factory (atk_get_default_registry (),
- e_day_view_main_item_get_type());
+ e_day_view_main_item_get_type ());
derived_atk_type = atk_object_factory_get_accessible_type (factory);
g_type_query (derived_atk_type, &query);
@@ -370,7 +370,7 @@ ea_day_view_main_item_ref_child (AtkObject *accessible, gint index)
ea_cell_table_set_cell_at_index (cell_data, index, cell);
g_object_unref (cell);
}
- return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT(cell)));
+ return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT (cell)));
}
static AtkObject *
@@ -597,12 +597,12 @@ ea_day_view_main_item_get_cell_data (EaDayViewMainItem *ea_main_item)
main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
day_view = e_day_view_main_item_get_day_view (main_item);
- cell_data = g_object_get_data (G_OBJECT(ea_main_item),
+ cell_data = g_object_get_data (G_OBJECT (ea_main_item),
"ea-day-view-cell-table");
if (!cell_data) {
cell_data = ea_cell_table_create (day_view->rows,
day_view->days_shown, TRUE);
- g_object_set_data (G_OBJECT(ea_main_item),
+ g_object_set_data (G_OBJECT (ea_main_item),
"ea-day-view-cell-table", cell_data);
}
return cell_data;
@@ -615,10 +615,10 @@ ea_day_view_main_item_destory_cell_data (EaDayViewMainItem *ea_main_item)
g_return_if_fail (ea_main_item);
- cell_data = g_object_get_data (G_OBJECT(ea_main_item),
+ cell_data = g_object_get_data (G_OBJECT (ea_main_item),
"ea-day-view-cell-table");
if (cell_data) {
- g_object_set_data (G_OBJECT(ea_main_item),
+ g_object_set_data (G_OBJECT (ea_main_item),
"ea-day-view-cell-table", NULL);
ea_cell_table_destroy (cell_data);
}
@@ -648,7 +648,7 @@ component_interface_get_extents (AtkComponent *component,
g_return_if_fail (EA_IS_DAY_VIEW_MAIN_ITEM (component));
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component));
+ g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component));
if (!g_obj)
/* defunct object*/
return;
diff --git a/calendar/gui/ea-day-view.c b/calendar/gui/ea-day-view.c
index 47969205a8..e34eaa6366 100644
--- a/calendar/gui/ea-day-view.c
+++ b/calendar/gui/ea-day-view.c
@@ -70,7 +70,7 @@ ea_day_view_get_type (void)
*/
factory = atk_registry_get_factory (atk_get_default_registry (),
- e_calendar_view_get_type());
+ e_calendar_view_get_type ());
derived_atk_type = atk_object_factory_get_accessible_type (factory);
g_type_query (derived_atk_type, &query);
diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c
index 9c7d9f8601..e7492a07ee 100644
--- a/calendar/gui/ea-gnome-calendar.c
+++ b/calendar/gui/ea-gnome-calendar.c
@@ -302,7 +302,7 @@ ea_gnome_calendar_ref_child (AtkObject *obj, gint i)
break;
}
if (child)
- g_object_ref(child);
+ g_object_ref (child);
return child;
}
@@ -316,7 +316,7 @@ ea_gcal_dates_change_cb (GnomeCalendar *gcal, gpointer data)
g_return_if_fail (EA_IS_GNOME_CALENDAR (data));
new_name = ea_gnome_calendar_get_label_description (gcal);
- atk_object_set_name (ATK_OBJECT(data), new_name);
+ atk_object_set_name (ATK_OBJECT (data), new_name);
g_signal_emit_by_name (data, "visible_data_changed");
#ifdef ACC_DEBUG
diff --git a/calendar/gui/ea-week-view-cell.c b/calendar/gui/ea-week-view-cell.c
index de4c244ebf..32f5fb1f75 100644
--- a/calendar/gui/ea-week-view-cell.c
+++ b/calendar/gui/ea-week-view-cell.c
@@ -258,7 +258,7 @@ ea_week_view_cell_ref_state_set (AtkObject *obj)
gint parent_x, parent_y, parent_width, parent_height;
state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (obj);
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(obj));
+ g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (obj));
if (!g_obj)
return state_set;
@@ -348,7 +348,7 @@ component_interface_get_extents (AtkComponent *component,
g_return_if_fail (EA_IS_WEEK_VIEW_CELL (component));
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component));
+ g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component));
if (!g_obj)
/* defunct object*/
return;
diff --git a/calendar/gui/ea-week-view-main-item.c b/calendar/gui/ea-week-view-main-item.c
index 1db4d8b5be..84a4ea1191 100644
--- a/calendar/gui/ea-week-view-main-item.c
+++ b/calendar/gui/ea-week-view-main-item.c
@@ -39,7 +39,7 @@ static G_CONST_RETURN gchar *
static gint ea_week_view_main_item_get_n_children
(AtkObject *accessible);
static AtkObject *
- ea_week_view_main_item_ref_child(AtkObject *accessible,
+ ea_week_view_main_item_ref_child (AtkObject *accessible,
gint i);
static AtkObject *
ea_week_view_main_item_get_parent
@@ -72,7 +72,7 @@ static gint table_interface_get_index_at (AtkTable *table,
static gint table_interface_get_column_at_index
(AtkTable *table,
gint index);
-static gint table_interface_get_row_at_index(AtkTable *table,
+static gint table_interface_get_row_at_index (AtkTable *table,
gint index);
static AtkObject *
table_interface_ref_at (AtkTable *table,
@@ -226,7 +226,7 @@ ea_week_view_main_item_get_type (void)
*/
factory = atk_registry_get_factory (atk_get_default_registry (),
- e_week_view_main_item_get_type());
+ e_week_view_main_item_get_type ());
derived_atk_type = atk_object_factory_get_accessible_type (factory);
g_type_query (derived_atk_type, &query);
@@ -405,7 +405,7 @@ ea_week_view_main_item_ref_child (AtkObject *accessible, gint index)
g_object_unref (cell);
}
- return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT(cell)));
+ return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT (cell)));
}
static AtkObject *
@@ -607,11 +607,11 @@ ea_week_view_main_item_get_cell_data (EaWeekViewMainItem *ea_main_item)
main_item = E_WEEK_VIEW_MAIN_ITEM (g_obj);
week_view = e_week_view_main_item_get_week_view (main_item);
- cell_data = g_object_get_data (G_OBJECT(ea_main_item),
+ cell_data = g_object_get_data (G_OBJECT (ea_main_item),
"ea-week-view-cell-table");
if (!cell_data) {
cell_data = ea_cell_table_create (week_view->weeks_shown, 7, TRUE);
- g_object_set_data (G_OBJECT(ea_main_item),
+ g_object_set_data (G_OBJECT (ea_main_item),
"ea-week-view-cell-table", cell_data);
}
return cell_data;
@@ -624,10 +624,10 @@ ea_week_view_main_item_destory_cell_data (EaWeekViewMainItem *ea_main_item)
g_return_if_fail (ea_main_item);
- cell_data = g_object_get_data (G_OBJECT(ea_main_item),
+ cell_data = g_object_get_data (G_OBJECT (ea_main_item),
"ea-week-view-cell-table");
if (cell_data) {
- g_object_set_data (G_OBJECT(ea_main_item),
+ g_object_set_data (G_OBJECT (ea_main_item),
"ea-week-view-cell-table", NULL);
ea_cell_table_destroy (cell_data);
}
@@ -657,7 +657,7 @@ component_interface_get_extents (AtkComponent *component,
g_return_if_fail (EA_IS_WEEK_VIEW_MAIN_ITEM (component));
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component));
+ g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component));
if (!g_obj)
/* defunct object*/
return;
diff --git a/calendar/gui/ea-week-view.c b/calendar/gui/ea-week-view.c
index e6683f5ddd..e34894f9ce 100644
--- a/calendar/gui/ea-week-view.c
+++ b/calendar/gui/ea-week-view.c
@@ -70,7 +70,7 @@ ea_week_view_get_type (void)
*/
factory = atk_registry_get_factory (atk_get_default_registry (),
- e_calendar_view_get_type());
+ e_calendar_view_get_type ());
derived_atk_type = atk_object_factory_get_accessible_type (factory);
g_type_query (derived_atk_type, &query);
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 1195e04612..8feaa3f850 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1379,7 +1379,7 @@ process_completed_tasks (GnomeCalendar *gcal, gboolean config_changed)
#if 0 /* KILL-BONOBO */
GnomeCalendarPrivate *priv;
- g_return_if_fail (GNOME_IS_CALENDAR(gcal));
+ g_return_if_fail (GNOME_IS_CALENDAR (gcal));
priv = gcal->priv;
@@ -1596,7 +1596,7 @@ gnome_calendar_goto_date (GnomeCalendar *gcal,
gboolean need_updating = FALSE;
icaltimezone *timezone;
- g_return_if_fail (GNOME_IS_CALENDAR(gcal));
+ g_return_if_fail (GNOME_IS_CALENDAR (gcal));
model = gnome_calendar_get_model (gcal);
week_start_day = e_cal_model_get_week_start_day (model);
@@ -1920,9 +1920,9 @@ gnome_calendar_display_view (GnomeCalendar *gcal,
}
static void
-non_intrusive_error_remove(GtkWidget *w, gpointer data)
+non_intrusive_error_remove (GtkWidget *w, gpointer data)
{
- g_hash_table_remove(non_intrusive_error_table, data);
+ g_hash_table_remove (non_intrusive_error_table, data);
}
GtkWidget *
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
index 52047a0e19..042282bc70 100644
--- a/calendar/gui/gnome-cal.h
+++ b/calendar/gui/gnome-cal.h
@@ -135,7 +135,7 @@ void gnome_calendar_next (GnomeCalendar *gcal);
void gnome_calendar_previous (GnomeCalendar *gcal);
void gnome_calendar_goto (GnomeCalendar *gcal,
time_t new_time);
-void gnome_calendar_update_view_times(GnomeCalendar *gcal,
+void gnome_calendar_update_view_times (GnomeCalendar *gcal,
time_t start_time);
void gnome_calendar_dayjump (GnomeCalendar *gcal,
time_t time);
@@ -149,7 +149,7 @@ void gnome_calendar_display_view (GnomeCalendar *gcal,
GnomeCalendarViewType view_type);
struct _ECalendarView *
- gnome_calendar_get_calendar_view(GnomeCalendar *gcal,
+ gnome_calendar_get_calendar_view (GnomeCalendar *gcal,
GnomeCalendarViewType view_type);
gboolean gnome_calendar_get_range_selected
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 1c4ced6105..448d394d9a 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -78,7 +78,7 @@ itip_addresses_get (void)
EAccount *
itip_addresses_get_default (void)
{
- return (EAccount *)e_account_list_get_default(itip_addresses_get());
+ return (EAccount *)e_account_list_get_default (itip_addresses_get ());
}
gboolean
@@ -109,7 +109,7 @@ itip_organizer_is_user_ex (ECalComponent *comp, ECal *client, gboolean skip_cap_
return FALSE;
}
- user_org = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
+ user_org = e_account_list_find (itip_addresses_get (), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
}
return user_org;
@@ -134,7 +134,7 @@ itip_sentby_is_user (ECalComponent *comp, ECal *client)
e_cal_component_get_organizer (comp, &organizer);
if (organizer.sentby != NULL) {
strip = itip_strip_mailto (organizer.sentby);
- user_sentby = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
+ user_sentby = e_account_list_find (itip_addresses_get (), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
}
return user_sentby;
@@ -229,10 +229,10 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client)
address = NULL;
}
- for (it = e_list_get_iterator((EList *)al);
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
- a = (EAccount *) e_iterator_get(it);
+ for (it = e_list_get_iterator ((EList *)al);
+ e_iterator_is_valid (it);
+ e_iterator_next (it)) {
+ a = (EAccount *) e_iterator_get (it);
if (!a->enabled)
continue;
@@ -881,7 +881,7 @@ comp_limit_attendees (ECalComponent *comp)
attendee_text = g_strdup (itip_strip_mailto (attendee));
g_free (attendee);
attendee_text = g_strstrip (attendee_text);
- found = match = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, attendee_text) != NULL;
+ found = match = e_account_list_find (itip_addresses_get (), E_ACCOUNT_FIND_ID_ADDRESS, attendee_text) != NULL;
if (!found) {
param = icalproperty_get_first_parameter (prop, ICAL_SENTBY_PARAMETER);
@@ -889,11 +889,11 @@ comp_limit_attendees (ECalComponent *comp)
attendee_sentby = icalparameter_get_sentby (param);
attendee_sentby_text = g_strdup (itip_strip_mailto (attendee_sentby));
attendee_sentby_text = g_strstrip (attendee_sentby_text);
- found = match = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, attendee_sentby_text) != NULL;
+ found = match = e_account_list_find (itip_addresses_get (), E_ACCOUNT_FIND_ID_ADDRESS, attendee_sentby_text) != NULL;
}
}
- g_free(attendee_text);
+ g_free (attendee_text);
g_free (attendee_sentby_text);
if (!match)
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 84ad29c8b9..5457f0a305 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -438,7 +438,7 @@ print_text (GtkPrintContext *context, PangoFontDescription *desc,
cairo_move_to (cr, x1, y1);
pango_cairo_show_layout (cr, layout);
- cairo_stroke(cr);
+ cairo_stroke (cr);
cairo_restore (cr);
@@ -518,7 +518,7 @@ static const gchar *days[] = {
format the date 'nicely' and consistently for various headers
*/
static gchar *
-format_date(time_t time, gint flags, gchar *buffer, gint bufflen)
+format_date (time_t time, gint flags, gchar *buffer, gint bufflen)
{
icaltimezone *zone = calendar_config_get_icaltimezone ();
gchar fmt[64];
@@ -533,7 +533,7 @@ format_date(time_t time, gint flags, gchar *buffer, gint bufflen)
if (flags & DATE_DAY) {
if (flags & DATE_DAYNAME)
strcat(fmt, " ");
- strcat(fmt, gettext(days[tm.tm_mday-1]));
+ strcat (fmt, gettext (days[tm.tm_mday-1]));
}
if (flags & DATE_MONTH) {
if (flags & (DATE_DAY|DATE_DAYNAME))
@@ -547,7 +547,7 @@ format_date(time_t time, gint flags, gchar *buffer, gint bufflen)
strcat(fmt, " ");
strcat(fmt, "%Y");
}
- e_utf8_strftime(buffer, bufflen, fmt, &tm);
+ e_utf8_strftime (buffer, bufflen, fmt, &tm);
buffer[bufflen - 1] = '\0';
return buffer;
@@ -1401,7 +1401,7 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
max_font_size = ((top - bottom) / pdi.rows) - 4;
else
max_font_size = ((bottom - top ) / pdi.rows) - 4;
- font_size = MIN(DAY_NORMAL_FONT_SIZE, max_font_size);
+ font_size = MIN (DAY_NORMAL_FONT_SIZE, max_font_size);
font = get_font_for_size (font_size, PANGO_WEIGHT_NORMAL);
for (i = 0; i < pdi.events[0]->len; i++) {
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index 69ba5b79f3..699bfb21b9 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -431,7 +431,7 @@ day_event_cb (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
priv = wp->priv;
if (event->type == GDK_KEY_PRESS)
- return handle_key_press_event(wp, event);
+ return handle_key_press_event (wp, event);
if (!(event->type == GDK_BUTTON_PRESS && event->button.button == 1))
return FALSE;
diff --git a/calendar/importers/evolution-calendar-importer.h b/calendar/importers/evolution-calendar-importer.h
index 7874a809fd..1bc16f120d 100644
--- a/calendar/importers/evolution-calendar-importer.h
+++ b/calendar/importers/evolution-calendar-importer.h
@@ -26,10 +26,10 @@
G_BEGIN_DECLS
-struct _EImportImporter *ical_importer_peek(void);
-struct _EImportImporter *vcal_importer_peek(void);
+struct _EImportImporter *ical_importer_peek (void);
+struct _EImportImporter *vcal_importer_peek (void);
-struct _EImportImporter *gnome_calendar_importer_peek(void);
+struct _EImportImporter *gnome_calendar_importer_peek (void);
G_END_DECLS
diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c
index 38db4cad92..45de793778 100644
--- a/calendar/importers/icalendar-importer.c
+++ b/calendar/importers/icalendar-importer.c
@@ -97,13 +97,13 @@ is_icalcomp_usable (icalcomponent *icalcomp)
}
static void
-ivcal_import_done(ICalImporter *ici)
+ivcal_import_done (ICalImporter *ici)
{
g_object_unref (ici->client);
icalcomponent_free (ici->icalcomp);
- e_import_complete(ici->import, ici->target);
- g_object_unref(ici->import);
+ e_import_complete (ici->import, ici->target);
+ g_object_unref (ici->import);
g_free (ici);
}
@@ -206,22 +206,22 @@ static void
button_toggled_cb (GtkWidget *widget, struct _selector_data *sd)
{
g_datalist_set_data_full(&sd->target->data, "primary-source",
- g_object_ref(e_source_selector_peek_primary_selection((ESourceSelector *)sd->selector)),
+ g_object_ref (e_source_selector_peek_primary_selection ((ESourceSelector *)sd->selector)),
g_object_unref);
g_datalist_set_data(&sd->target->data, "primary-type", GINT_TO_POINTER(import_type_map[sd->page]));
- gtk_notebook_set_current_page((GtkNotebook *)sd->notebook, sd->page);
+ gtk_notebook_set_current_page ((GtkNotebook *)sd->notebook, sd->page);
}
static void
primary_selection_changed_cb (ESourceSelector *selector, EImportTarget *target)
{
g_datalist_set_data_full(&target->data, "primary-source",
- g_object_ref(e_source_selector_peek_primary_selection(selector)),
+ g_object_ref (e_source_selector_peek_primary_selection (selector)),
g_object_unref);
}
static GtkWidget *
-ivcal_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
+ivcal_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *vbox, *hbox, *first = NULL;
GSList *group = NULL;
@@ -251,9 +251,9 @@ ivcal_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
selector = e_source_selector_new (source_list);
e_source_selector_show_selection (E_SOURCE_SELECTOR (selector), FALSE);
- scrolled = gtk_scrolled_window_new(NULL, NULL);
- gtk_scrolled_window_set_policy((GtkScrolledWindow *)scrolled, GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
- gtk_container_add((GtkContainer *)scrolled, selector);
+ scrolled = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy ((GtkScrolledWindow *)scrolled, GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
+ gtk_container_add ((GtkContainer *)scrolled, selector);
gtk_notebook_append_page (GTK_NOTEBOOK (nb), scrolled, NULL);
/* FIXME What if no sources? */
@@ -265,7 +265,7 @@ ivcal_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
rb = gtk_radio_button_new_with_label (group, _(import_type_strings[i]));
gtk_box_pack_start (GTK_BOX (hbox), rb, FALSE, FALSE, 6);
- sd = g_malloc0(sizeof(*sd));
+ sd = g_malloc0 (sizeof (*sd));
sd->target = target;
sd->selector = selector;
sd->notebook = nb;
@@ -283,7 +283,7 @@ ivcal_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
g_object_unref (source_list);
}
if (first)
- gtk_toggle_button_set_active((GtkToggleButton *)first, TRUE);
+ gtk_toggle_button_set_active ((GtkToggleButton *)first, TRUE);
gtk_widget_show_all (vbox);
@@ -291,7 +291,7 @@ ivcal_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
}
static gboolean
-ivcal_import_items(gpointer d)
+ivcal_import_items (gpointer d)
{
ICalImporter *ici = d;
@@ -312,24 +312,24 @@ ivcal_import_items(gpointer d)
g_return_val_if_reached (FALSE);
}
- ivcal_import_done(ici);
+ ivcal_import_done (ici);
ici->idle_id = 0;
return FALSE;
}
static void
-ivcal_opened(ECal *ecal, const GError *error, ICalImporter *ici)
+ivcal_opened (ECal *ecal, const GError *error, ICalImporter *ici)
{
if (!ici->cancelled && !error) {
e_import_status(ici->import, ici->target, _("Importing..."), 0);
- ici->idle_id = g_idle_add(ivcal_import_items, ici);
+ ici->idle_id = g_idle_add (ivcal_import_items, ici);
} else
- ivcal_import_done(ici);
+ ivcal_import_done (ici);
}
static void
-ivcal_import(EImport *ei, EImportTarget *target, icalcomponent *icalcomp)
+ivcal_import (EImport *ei, EImportTarget *target, icalcomponent *icalcomp)
{
ECal *client;
ECalSourceType type;
@@ -338,27 +338,27 @@ ivcal_import(EImport *ei, EImportTarget *target, icalcomponent *icalcomp)
client = e_auth_new_cal_from_source (g_datalist_get_data(&target->data, "primary-source"), type);
if (client) {
- ICalImporter *ici = g_malloc0(sizeof(*ici));
+ ICalImporter *ici = g_malloc0 (sizeof (*ici));
ici->import = ei;
g_datalist_set_data(&target->data, "ivcal-data", ici);
- g_object_ref(ei);
+ g_object_ref (ei);
ici->target = target;
ici->icalcomp = icalcomp;
ici->client = client;
ici->source_type = type;
e_import_status(ei, target, _("Opening calendar"), 0);
g_signal_connect(client, "cal-opened-ex", G_CALLBACK(ivcal_opened), ici);
- e_cal_open_async(client, TRUE);
+ e_cal_open_async (client, TRUE);
return;
} else {
- icalcomponent_free(icalcomp);
- e_import_complete(ei, target);
+ icalcomponent_free (icalcomp);
+ e_import_complete (ei, target);
}
}
static void
-ivcal_cancel(EImport *ei, EImportTarget *target, EImportImporter *im)
+ivcal_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
{
ICalImporter *ici = g_datalist_get_data(&target->data, "ivcal-data");
@@ -372,7 +372,7 @@ ivcal_cancel(EImport *ei, EImportTarget *target, EImportImporter *im)
*/
static gboolean
-ical_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
+ical_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
{
gchar *filename;
gchar *contents;
@@ -414,7 +414,7 @@ ical_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
}
static void
-ical_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+ical_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
gchar *filename;
gchar *contents;
@@ -423,13 +423,13 @@ ical_import(EImport *ei, EImportTarget *target, EImportImporter *im)
filename = g_filename_from_uri (s->uri_src, NULL, NULL);
if (!filename) {
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
if (!g_file_get_contents (filename, &contents, NULL, NULL)) {
g_free (filename);
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
g_free (filename);
@@ -438,9 +438,9 @@ ical_import(EImport *ei, EImportTarget *target, EImportImporter *im)
g_free (contents);
if (icalcomp)
- ivcal_import(ei, target, icalcomp);
+ ivcal_import (ei, target, icalcomp);
else
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
}
static GtkWidget *
@@ -488,7 +488,7 @@ static EImportImporter ical_importer = {
};
EImportImporter *
-ical_importer_peek(void)
+ical_importer_peek (void)
{
ical_importer.name = _("iCalendar files (.ics)");
ical_importer.description = _("Evolution iCalendar importer");
@@ -502,7 +502,7 @@ ical_importer_peek(void)
*/
static gboolean
-vcal_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
+vcal_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
{
gchar *filename;
gchar *contents;
@@ -525,7 +525,7 @@ vcal_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
/* Z: Wow, this is *efficient* */
- if (g_file_get_contents(filename, &contents, NULL, NULL)) {
+ if (g_file_get_contents (filename, &contents, NULL, NULL)) {
VObject *vcal;
icalcomponent *icalcomp;
@@ -599,24 +599,24 @@ load_vcalendar_file (const gchar *filename)
}
static void
-vcal_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+vcal_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
gchar *filename;
icalcomponent *icalcomp;
EImportTargetURI *s = (EImportTargetURI *)target;
- filename = g_filename_from_uri(s->uri_src, NULL, NULL);
+ filename = g_filename_from_uri (s->uri_src, NULL, NULL);
if (!filename) {
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
return;
}
- icalcomp = load_vcalendar_file(filename);
+ icalcomp = load_vcalendar_file (filename);
g_free (filename);
if (icalcomp)
- ivcal_import(ei, target, icalcomp);
+ ivcal_import (ei, target, icalcomp);
else
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
}
static GtkWidget *
@@ -657,7 +657,7 @@ static EImportImporter vcal_importer = {
};
EImportImporter *
-vcal_importer_peek(void)
+vcal_importer_peek (void)
{
vcal_importer.name = _("vCalendar files (.vcs)");
vcal_importer.description = _("Evolution vCalendar importer");
@@ -668,7 +668,7 @@ vcal_importer_peek(void)
/* ********************************************************************** */
static gboolean
-gnome_calendar_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
+gnome_calendar_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
{
gchar *filename;
gboolean res;
@@ -677,14 +677,14 @@ gnome_calendar_supported(EImport *ei, EImportTarget *target, EImportImporter *im
return FALSE;
filename = g_build_filename(g_get_home_dir (), "user-cal.vcf", NULL);
- res = g_file_test(filename, G_FILE_TEST_IS_REGULAR);
+ res = g_file_test (filename, G_FILE_TEST_IS_REGULAR);
g_free (filename);
return res;
}
static void
-gnome_calendar_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+gnome_calendar_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
icalcomponent *icalcomp = NULL;
gchar *filename;
@@ -728,7 +728,7 @@ gnome_calendar_import(EImport *ei, EImportTarget *target, EImportImporter *im)
if (!icalcomp)
goto out;
- ici = g_malloc0(sizeof(*ici));
+ ici = g_malloc0 (sizeof (*ici));
g_datalist_set_data_full(&target->data, "gnomecal-data", ici, g_free);
/* Wait for client to finish opening the calendar & tasks folders. */
@@ -752,7 +752,7 @@ gnome_calendar_import(EImport *ei, EImportTarget *target, EImportImporter *im)
&& tasks_state == E_CAL_LOAD_LOADED)
break;
- g_usleep(1000000);
+ g_usleep (1000000);
if (ici->cancelled)
goto out;
}
@@ -788,23 +788,23 @@ gnome_calendar_import(EImport *ei, EImportTarget *target, EImportImporter *im)
if (tasks_client)
g_object_unref (tasks_client);
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
}
static void
-calendar_toggle_cb(GtkToggleButton *tb, EImportTarget *target)
+calendar_toggle_cb (GtkToggleButton *tb, EImportTarget *target)
{
g_datalist_set_data(&target->data, "gnomecal-do-cal", GINT_TO_POINTER(gtk_toggle_button_get_active(tb)));
}
static void
-tasks_toggle_cb(GtkToggleButton *tb, EImportTarget *target)
+tasks_toggle_cb (GtkToggleButton *tb, EImportTarget *target)
{
g_datalist_set_data(&target->data, "gnomecal-do-tasks", GINT_TO_POINTER(gtk_toggle_button_get_active(tb)));
}
static GtkWidget *
-gnome_calendar_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
+gnome_calendar_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *hbox, *w;
GConfClient *gconf;
@@ -813,7 +813,7 @@ gnome_calendar_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im
gconf = gconf_client_get_default ();
done_cal = gconf_client_get_bool (gconf, "/apps/evolution/importer/gnome-calendar/calendar", NULL);
done_tasks = gconf_client_get_bool (gconf, "/apps/evolution/importer/gnome-calendar/tasks", NULL);
- g_object_unref(gconf);
+ g_object_unref (gconf);
g_datalist_set_data(&target->data, "gnomecal-do-cal", GINT_TO_POINTER(!done_cal));
g_datalist_set_data(&target->data, "gnomecal-do-tasks", GINT_TO_POINTER(!done_tasks));
@@ -821,12 +821,12 @@ gnome_calendar_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im
hbox = gtk_hbox_new (FALSE, 2);
w = gtk_check_button_new_with_label (_("Calendar Events"));
- gtk_toggle_button_set_active((GtkToggleButton *)w, !done_cal);
+ gtk_toggle_button_set_active ((GtkToggleButton *)w, !done_cal);
g_signal_connect (w, "toggled", G_CALLBACK (calendar_toggle_cb), target);
gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
w = gtk_check_button_new_with_label (_("Tasks"));
- gtk_toggle_button_set_active((GtkToggleButton *)w, !done_tasks);
+ gtk_toggle_button_set_active ((GtkToggleButton *)w, !done_tasks);
g_signal_connect (w, "toggled", G_CALLBACK (tasks_toggle_cb), target);
gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
@@ -836,7 +836,7 @@ gnome_calendar_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im
}
static void
-gnome_calendar_cancel(EImport *ei, EImportTarget *target, EImportImporter *im)
+gnome_calendar_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
{
ICalIntelligentImporter *ici = g_datalist_get_data(&target->data, "gnomecal-data");
@@ -855,7 +855,7 @@ static EImportImporter gnome_calendar_importer = {
};
EImportImporter *
-gnome_calendar_importer_peek(void)
+gnome_calendar_importer_peek (void)
{
gnome_calendar_importer.name = _("Gnome Calendar");
gnome_calendar_importer.description = _("Evolution Calendar intelligent importer");
diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c
index 86eedfaecf..f380e2bf7a 100644
--- a/capplet/anjal-settings-main.c
+++ b/capplet/anjal-settings-main.c
@@ -136,14 +136,14 @@ check_and_set_default_mail (void)
GConfClient *client = gconf_client_get_default ();
gchar *mailer;
- mailer = gconf_client_get_string(client, GCONF_KEY_MAILTO_COMMAND, NULL);
+ mailer = gconf_client_get_string (client, GCONF_KEY_MAILTO_COMMAND, NULL);
if (mailer && *mailer && (strcmp (mailer, ANJAL_MAILTO_COMMAND) == 0)) {
g_object_unref (client);
return; /* Anjal is the default mailer */
}
- gconf_client_set_bool(client, GCONF_KEY_MAILTO_ENABLED, TRUE, NULL);
- gconf_client_set_string(client, GCONF_KEY_MAILTO_COMMAND, ANJAL_MAILTO_COMMAND, NULL);
+ gconf_client_set_bool (client, GCONF_KEY_MAILTO_ENABLED, TRUE, NULL);
+ gconf_client_set_string (client, GCONF_KEY_MAILTO_COMMAND, ANJAL_MAILTO_COMMAND, NULL);
g_object_unref (client);
}
@@ -161,7 +161,7 @@ idle_cb (MailCappletShell *mshell G_GNUC_UNUSED)
static void
create_default_shell (void)
{
- main_window = mail_capplet_shell_new(socket_id, FALSE, TRUE);
+ main_window = mail_capplet_shell_new (socket_id, FALSE, TRUE);
if (!socket_id)
gtk_widget_show (main_window);
g_idle_add ((GSourceFunc) idle_cb, remaining_args);
@@ -219,15 +219,15 @@ main (gint argc, gchar *argv[])
if (!gtk_init_with_args (&argc, &argv, _("Anjal email client"), entries, NULL, &error)) {
g_error ("Unable to start Anjal: %s\n", error->message);
- g_error_free(error);
+ g_error_free (error);
}
if (!g_thread_get_initialized ())
g_thread_init (NULL);
- client = gconf_client_get_default();
+ client = gconf_client_get_default ();
- e_passwords_init();
+ e_passwords_init ();
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default(), PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "anjal" G_DIR_SEPARATOR_S "icons");
categories_icon_theme_hack ();
diff --git a/capplet/settings/anjal-mail-view.c b/capplet/settings/anjal-mail-view.c
index 9f96bcd6ef..92c811b69a 100644
--- a/capplet/settings/anjal-mail-view.c
+++ b/capplet/settings/anjal-mail-view.c
@@ -41,7 +41,7 @@ G_DEFINE_TYPE (AnjalMailView, anjal_mail_view, GTK_TYPE_NOTEBOOK)
static void
anjal_mail_view_init (AnjalMailView *shell)
{
- shell->priv = g_new0(AnjalMailViewPrivate, 1);
+ shell->priv = g_new0 (AnjalMailViewPrivate, 1);
shell->priv->started = TRUE;
}
@@ -107,30 +107,30 @@ anjal_mail_view_set_folder_uri (AnjalMailView *mv, const gchar *uri)
if (!mv || !uri)
return;
- ANJAL_MAIL_VIEW_GET_CLASS(mv)->set_folder_uri (mv, uri);
+ ANJAL_MAIL_VIEW_GET_CLASS (mv)->set_folder_uri (mv, uri);
}
void
anjal_mail_view_set_folder_tree_widget (AnjalMailView *mv, GtkWidget *tree)
{
- ANJAL_MAIL_VIEW_GET_CLASS(mv)->set_folder_tree_widget (mv, tree);
+ ANJAL_MAIL_VIEW_GET_CLASS (mv)->set_folder_tree_widget (mv, tree);
}
void
anjal_mail_view_set_folder_tree (AnjalMailView *mv, GtkWidget *tree)
{
- ANJAL_MAIL_VIEW_GET_CLASS(mv)->set_folder_tree (mv, (EMFolderTree *)tree);
+ ANJAL_MAIL_VIEW_GET_CLASS (mv)->set_folder_tree (mv, (EMFolderTree *)tree);
}
void
anjal_mail_view_set_search (AnjalMailView *view, const gchar *search)
{
- ANJAL_MAIL_VIEW_GET_CLASS(view)->set_search (view, search);
+ ANJAL_MAIL_VIEW_GET_CLASS (view)->set_search (view, search);
}
void
anjal_mail_view_init_search (AnjalMailView *mv, GtkWidget *search)
{
- ANJAL_MAIL_VIEW_GET_CLASS(mv)->init_search (mv, search);
+ ANJAL_MAIL_VIEW_GET_CLASS (mv)->init_search (mv, search);
}
diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c
index 1dc638ebe4..9cf9d47754 100644
--- a/capplet/settings/mail-account-view.c
+++ b/capplet/settings/mail-account-view.c
@@ -81,7 +81,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
static void
mail_account_view_init (MailAccountView *shell)
{
- shell->priv = g_new0(MailAccountViewPrivate, 1);
+ shell->priv = g_new0 (MailAccountViewPrivate, 1);
shell->priv->is_gmail = FALSE;
shell->priv->is_yahoo = FALSE;
@@ -93,7 +93,7 @@ mail_account_view_finalize (GObject *object)
{
MailAccountView *shell = (MailAccountView *)object;
- g_free(shell->priv->username);
+ g_free (shell->priv->username);
G_OBJECT_CLASS (mail_account_view_parent_class)->finalize (object);
}
@@ -139,10 +139,10 @@ struct _server_prefill {
static gint
check_servers (gchar *server)
{
- gint len = G_N_ELEMENTS(std_server), i;
+ gint len = G_N_ELEMENTS (std_server), i;
for (i=0; i<len; i++) {
- if (strstr(server, std_server[i].key) != NULL)
+ if (strstr (server, std_server[i].key) != NULL)
return i;
}
@@ -157,8 +157,8 @@ save_identity (MailAccountView *view)
static gint
validate_identity (MailAccountView *view)
{
- gchar *user = (gchar *)e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_ID_NAME);
- gchar *email = (gchar *)e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_ID_ADDRESS);
+ gchar *user = (gchar *)e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_NAME);
+ gchar *email = (gchar *)e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_ADDRESS);
gchar *tmp;
const gchar *pwd = gtk_entry_get_text ((GtkEntry *)view->password);
@@ -171,7 +171,7 @@ validate_identity (MailAccountView *view)
if (!pwd || !*pwd)
return ERROR_NO_PASSWORD;
- tmp = strchr(email, '@');
+ tmp = strchr (email, '@');
if (!tmp || tmp[1] == 0)
return ERROR_INVALID_EMAIL;
@@ -239,8 +239,8 @@ setup_yahoo_account (MailAccountView *mav)
{
GConfClient *gconf = gconf_client_get_default ();
- mav->priv->do_gcontacts = gtk_toggle_button_get_active((GtkToggleButton *)mav->priv->gcontacts);
- mav->priv->do_calendar = gtk_toggle_button_get_active((GtkToggleButton *)mav->priv->calendar);
+ mav->priv->do_gcontacts = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->gcontacts);
+ mav->priv->do_calendar = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->calendar);
if (mav->priv->do_calendar) {
ESourceList *slist;
@@ -248,7 +248,7 @@ setup_yahoo_account (MailAccountView *mav)
ESource *calendar;
gchar *sanitize_uname, *abs_uri, *rel_uri;
GSList *ids, *temp;
- const gchar *email = e_account_get_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_ID_ADDRESS);
+ const gchar *email = e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_ID_ADDRESS);
slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources");
sgrp = e_source_list_peek_group_by_base_uri (slist, "caldav://");
@@ -274,10 +274,10 @@ setup_yahoo_account (MailAccountView *mav)
sanitize_uname = sanitize_user_mail (email);
abs_uri = g_strdup_printf ("caldav://%s@caldav.calendar.yahoo.com/dav/%s/Calendar/%s/", sanitize_uname, email, gtk_entry_get_text((GtkEntry *)mav->priv->yahoo_cal_entry));
- e_passwords_add_password (abs_uri, gtk_entry_get_text((GtkEntry *)mav->password));
+ e_passwords_add_password (abs_uri, gtk_entry_get_text ((GtkEntry *)mav->password));
e_passwords_remember_password ("Calendar", abs_uri);
- rel_uri = g_strdup_printf (YAHOO_CALENDAR_LOCATION, sanitize_uname, email, gtk_entry_get_text((GtkEntry *)mav->priv->yahoo_cal_entry));
+ rel_uri = g_strdup_printf (YAHOO_CALENDAR_LOCATION, sanitize_uname, email, gtk_entry_get_text ((GtkEntry *)mav->priv->yahoo_cal_entry));
e_source_set_relative_uri (calendar, rel_uri);
e_source_group_add_source (sgrp, calendar, -1);
@@ -292,12 +292,12 @@ setup_yahoo_account (MailAccountView *mav)
g_free (temp->data);
g_slist_free (ids);
- g_free(abs_uri);
- g_free(rel_uri);
- g_free(sanitize_uname);
- g_object_unref(slist);
- g_object_unref(sgrp);
- g_object_unref(calendar);
+ g_free (abs_uri);
+ g_free (rel_uri);
+ g_free (sanitize_uname);
+ g_object_unref (slist);
+ g_object_unref (sgrp);
+ g_object_unref (calendar);
} else
printf("Not setting up Yahoo Calendar\n");
@@ -324,15 +324,15 @@ setup_yahoo_account (MailAccountView *mav)
e_source_set_relative_uri (abook, mav->priv->username);
rel_uri = g_strdup_printf("google://%s/", mav->priv->username);
- e_passwords_add_password (rel_uri, gtk_entry_get_text((GtkEntry *)mav->password));
+ e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *)mav->password));
e_passwords_remember_password ("Addressbook", rel_uri);
e_source_group_add_source (sgrp, abook, -1);
e_source_list_sync (slist, NULL);
- g_free(rel_uri);
- g_object_unref(slist);
- g_object_unref(sgrp);
- g_object_unref(abook);
+ g_free (rel_uri);
+ g_object_unref (slist);
+ g_object_unref (sgrp);
+ g_object_unref (abook);
}
@@ -344,8 +344,8 @@ setup_google_accounts (MailAccountView *mav)
{
GConfClient *gconf = gconf_client_get_default ();
- mav->priv->do_gcontacts = gtk_toggle_button_get_active((GtkToggleButton *)mav->priv->gcontacts);
- mav->priv->do_calendar = gtk_toggle_button_get_active((GtkToggleButton *)mav->priv->calendar);
+ mav->priv->do_gcontacts = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->gcontacts);
+ mav->priv->do_calendar = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->calendar);
if (mav->priv->do_calendar) {
ESourceList *slist;
@@ -378,7 +378,7 @@ setup_google_accounts (MailAccountView *mav)
abs_uri = g_strdup_printf (CALENDAR_CALDAV_URI, sanitize_uname, mav->priv->username);
e_source_set_absolute_uri (calendar, abs_uri);
- e_passwords_add_password (abs_uri, gtk_entry_get_text((GtkEntry *)mav->password));
+ e_passwords_add_password (abs_uri, gtk_entry_get_text ((GtkEntry *)mav->password));
e_passwords_remember_password ("Calendar", abs_uri);
rel_uri = g_strconcat ("https", GMAIL_CALENDAR_LOCATION, sanitize_uname, CALENDAR_DEFAULT_PATH, NULL);
e_source_set_relative_uri (calendar, rel_uri);
@@ -395,12 +395,12 @@ setup_google_accounts (MailAccountView *mav)
g_free (temp->data);
g_slist_free (ids);
- g_free(abs_uri);
- g_free(rel_uri);
- g_free(sanitize_uname);
- g_object_unref(slist);
- g_object_unref(sgrp);
- g_object_unref(calendar);
+ g_free (abs_uri);
+ g_free (rel_uri);
+ g_free (sanitize_uname);
+ g_object_unref (slist);
+ g_object_unref (sgrp);
+ g_object_unref (calendar);
} else
printf("Not setting up Google Calendar\n");
@@ -427,15 +427,15 @@ setup_google_accounts (MailAccountView *mav)
e_source_set_relative_uri (abook, mav->priv->username);
rel_uri = g_strdup_printf("google://%s/", mav->priv->username);
- e_passwords_add_password (rel_uri, gtk_entry_get_text((GtkEntry *)mav->password));
+ e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *)mav->password));
e_passwords_remember_password ("Addressbook", rel_uri);
e_source_group_add_source (sgrp, abook, -1);
e_source_list_sync (slist, NULL);
- g_free(rel_uri);
- g_object_unref(slist);
- g_object_unref(sgrp);
- g_object_unref(abook);
+ g_free (rel_uri);
+ g_object_unref (slist);
+ g_object_unref (sgrp);
+ g_object_unref (abook);
}
@@ -453,8 +453,8 @@ create_review (MailAccountView *view)
CamelURL *url;
gchar *buff;
- uri = (gchar *)e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_SOURCE_URL);
- if (!uri || (url = camel_url_new(uri, NULL)) == NULL)
+ uri = (gchar *)e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_SOURCE_URL);
+ if (!uri || (url = camel_url_new (uri, NULL)) == NULL)
return NULL;
table = gtk_table_new (4,2, FALSE);
@@ -465,25 +465,25 @@ create_review (MailAccountView *view)
gtk_label_set_markup ((GtkLabel *)label, buff);
g_free (buff);
gtk_widget_show (label);
- PACK_BOXF(label)
+ PACK_BOXF (label)
gtk_table_attach ((GtkTable *)table, box, 0, 1, 0, 1, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Name:"));
gtk_widget_show (label);
- PACK_BOX(label);
+ PACK_BOX (label);
gtk_table_attach ((GtkTable *)table, box, 0, 1, 1, 2, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
- entry = gtk_label_new(e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_ID_NAME));
- gtk_widget_show(entry);
- PACK_BOX(entry)
+ entry = gtk_label_new (e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_NAME));
+ gtk_widget_show (entry);
+ PACK_BOX (entry)
gtk_table_attach ((GtkTable *)table, box, 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Email address:"));
gtk_widget_show (label);
- PACK_BOX(label)
+ PACK_BOX (label)
gtk_table_attach ((GtkTable *)table, box, 0, 1, 2, 3, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
- entry = gtk_label_new (e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_ID_ADDRESS));
- gtk_widget_show(entry);
- PACK_BOX(entry)
+ entry = gtk_label_new (e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_ADDRESS));
+ gtk_widget_show (entry);
+ PACK_BOX (entry)
gtk_table_attach ((GtkTable *)table, box, 1, 2, 2, 3, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (NULL);
@@ -491,7 +491,7 @@ create_review (MailAccountView *view)
gtk_label_set_markup ((GtkLabel *)label, buff);
g_free (buff);
gtk_widget_show (label);
- PACK_BOXF(label);
+ PACK_BOXF (label);
gtk_table_attach ((GtkTable *)table, box, 0, 1, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (NULL);
@@ -499,50 +499,50 @@ create_review (MailAccountView *view)
gtk_label_set_markup ((GtkLabel *)label, buff);
g_free (buff);
gtk_widget_show (label);
- PACK_BOXF(label);
+ PACK_BOXF (label);
gtk_table_attach ((GtkTable *)table, box, 1, 2, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Server type:"));
gtk_widget_show (label);
- PACK_BOX(label);
+ PACK_BOX (label);
gtk_table_attach ((GtkTable *)table, box, 0, 1, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->protocol);
- gtk_widget_show(entry);
- PACK_BOX(entry)
+ gtk_widget_show (entry);
+ PACK_BOX (entry)
gtk_table_attach ((GtkTable *)table, box, 1, 2, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Server address:"));
gtk_widget_show (label);
- PACK_BOX(label);
+ PACK_BOX (label);
gtk_table_attach ((GtkTable *)table, box, 0, 1, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->host);
- gtk_widget_show(entry);
- PACK_BOX(entry);
+ gtk_widget_show (entry);
+ PACK_BOX (entry);
gtk_table_attach ((GtkTable *)table, box, 1, 2, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Username:"));
gtk_widget_show (label);
- PACK_BOX(label);
+ PACK_BOX (label);
gtk_table_attach ((GtkTable *)table, box, 0, 1, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->user);
- gtk_widget_show(entry);
- PACK_BOX(entry);
+ gtk_widget_show (entry);
+ PACK_BOX (entry);
gtk_table_attach ((GtkTable *)table, box, 1, 2, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
label = gtk_label_new (_("Use encryption:"));
gtk_widget_show (label);
- PACK_BOX(label);
+ PACK_BOX (label);
gtk_table_attach ((GtkTable *)table, box, 0, 1, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
enc = (gchar *)camel_url_get_param(url, "use_ssl");
entry = gtk_label_new (enc ? enc : _("never"));
- gtk_widget_show(entry);
- PACK_BOX(entry);
+ gtk_widget_show (entry);
+ PACK_BOX (entry);
gtk_table_attach ((GtkTable *)table, box, 1, 2, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
- view->priv->username = g_strdup(url->user);
- camel_url_free(url);
- uri =(gchar *) e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_TRANSPORT_URL);
- if (!uri || (url = camel_url_new(uri, NULL)) == NULL)
+ view->priv->username = g_strdup (url->user);
+ camel_url_free (url);
+ uri =(gchar *) e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_TRANSPORT_URL);
+ if (!uri || (url = camel_url_new (uri, NULL)) == NULL)
return NULL;
label = gtk_label_new (NULL);
@@ -550,40 +550,40 @@ create_review (MailAccountView *view)
gtk_label_set_markup ((GtkLabel *)label, buff);
g_free (buff);
gtk_widget_show (label);
- PACK_BOXF(label);
+ PACK_BOXF (label);
gtk_table_attach ((GtkTable *)table, box, 2, 3, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->protocol);
- gtk_widget_show(entry);
- PACK_BOX(entry)
+ gtk_widget_show (entry);
+ PACK_BOX (entry)
gtk_table_attach ((GtkTable *)table, box, 2, 3, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->host);
- gtk_widget_show(entry);
- PACK_BOX(entry);
+ gtk_widget_show (entry);
+ PACK_BOX (entry);
gtk_table_attach ((GtkTable *)table, box, 2, 3, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
entry = gtk_label_new (url->user);
- gtk_widget_show(entry);
- PACK_BOX(entry);
+ gtk_widget_show (entry);
+ PACK_BOX (entry);
gtk_table_attach ((GtkTable *)table, box, 2, 3, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
enc = (gchar *)camel_url_get_param(url, "use_ssl");
entry = gtk_label_new (enc ? enc : _("never"));
- gtk_widget_show(entry);
- PACK_BOX(entry);
+ gtk_widget_show (entry);
+ PACK_BOX (entry);
gtk_table_attach ((GtkTable *)table, box, 2, 3, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
/*
label = gtk_label_new (_("Organization:"));
gtk_widget_show (label);
entry = gtk_entry_new ();
- gtk_widget_show(entry);
+ gtk_widget_show (entry);
gtk_table_attach (table, label, 0, 1, 3, 4, GTK_SHRINK, GTK_SHRINK, INDENTATION, 0);
gtk_table_attach (table, entry, 1, 2, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0);
*/
- gtk_widget_show(table);
+ gtk_widget_show (table);
return table;
}
@@ -640,38 +640,38 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
}
if (mav->current_page == MAV_LAST - 1) {
- gchar *uri = (gchar *)e_account_get_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_SOURCE_URL);
+ gchar *uri = (gchar *)e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_URL);
CamelURL *url;
- e_account_set_string (em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_NAME, e_account_get_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_ID_ADDRESS));
- if (uri != NULL && (url = camel_url_new(uri, NULL)) != NULL) {
+ e_account_set_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_NAME, e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_ID_ADDRESS));
+ if (uri != NULL && (url = camel_url_new (uri, NULL)) != NULL) {
camel_url_set_param(url, "check_all", "1");
camel_url_set_param(url, "sync_offline", "1");
if (!mav->original) {
- e_account_set_bool(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_SOURCE_AUTO_CHECK, TRUE);
+ e_account_set_bool (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_AUTO_CHECK, TRUE);
}
if (!mav->original && strcmp(url->protocol, "pop") == 0) {
- e_account_set_bool (em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_SOURCE_KEEP_ON_SERVER, TRUE);
+ e_account_set_bool (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_KEEP_ON_SERVER, TRUE);
}
- uri = camel_url_to_string(url, 0);
- e_account_set_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_SOURCE_URL, uri);
- g_free(uri);
- camel_url_free(url);
+ uri = camel_url_to_string (url, 0);
+ e_account_set_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_URL, uri);
+ g_free (uri);
+ camel_url_free (url);
}
if (!mav->original) {
- EAccount *account = em_account_editor_get_modified_account(mav->edit);
+ EAccount *account = em_account_editor_get_modified_account (mav->edit);
CamelURL *aurl;
gchar *surl;
/* Save the password ahead of time */
aurl = camel_url_new (account->source->url, NULL);
- surl = camel_url_to_string(aurl, CAMEL_URL_HIDE_ALL);
- e_passwords_add_password (surl, gtk_entry_get_text((GtkEntry *)mav->password));
+ surl = camel_url_to_string (aurl, CAMEL_URL_HIDE_ALL);
+ e_passwords_add_password (surl, gtk_entry_get_text ((GtkEntry *)mav->password));
e_passwords_remember_password ("Mail", surl);
- camel_url_free(aurl);
- g_free(surl);
+ camel_url_free (aurl);
+ g_free (surl);
}
if (mav->priv->is_gmail && !mav->original)
@@ -694,17 +694,17 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
if (mav->current_page == MAV_LAST - 1) {
MAVPage *page = mav->pages[mav->current_page];
GtkWidget *tmp;
- EAccount *account = em_account_editor_get_modified_account(mav->edit);
+ EAccount *account = em_account_editor_get_modified_account (mav->edit);
if (page->main)
gtk_widget_destroy (page->main);
- tmp = mail_account_pages[mav->current_page].create_page(mav);
+ tmp = mail_account_pages[mav->current_page].create_page (mav);
page->main = gtk_hbox_new (FALSE, 0);
gtk_widget_show (page->main);
- gtk_box_pack_start((GtkBox *)page->main, tmp, FALSE, FALSE, 0);
- gtk_widget_show(tmp);
- gtk_box_pack_start((GtkBox *)page->box, page->main, FALSE, FALSE, 3);
+ gtk_box_pack_start ((GtkBox *)page->main, tmp, FALSE, FALSE, 0);
+ gtk_widget_show (tmp);
+ gtk_box_pack_start ((GtkBox *)page->box, page->main, FALSE, FALSE, 3);
if (mav->priv->is_gmail) {
gtk_widget_destroy (mav->priv->gcontacts);
@@ -740,13 +740,13 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Google account settings:"));
gtk_label_set_markup ((GtkLabel *)tmp, buff);
g_free (buff);
- gtk_widget_show(tmp);
+ gtk_widget_show (tmp);
#define PACK_IN_BOX(wid,child,num) { GtkWidget *tbox; tbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)tbox, child, FALSE, FALSE, num); gtk_widget_show (tbox); gtk_box_pack_start ((GtkBox *)wid, tbox, FALSE, FALSE, 0); }
- PACK_IN_BOX(page->box,tmp,12);
- PACK_IN_BOX(page->box,mav->priv->gcontacts,24);
- PACK_IN_BOX(page->box,mav->priv->calendar,24);
+ PACK_IN_BOX (page->box,tmp,12);
+ PACK_IN_BOX (page->box,mav->priv->gcontacts,24);
+ PACK_IN_BOX (page->box,mav->priv->calendar,24);
#undef PACK_IN_BOX
#define PACK_IN_BOX(wid,child1,child2,num1,num2) { GtkWidget *tbox; tbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)tbox, child1, FALSE, FALSE, num1); gtk_box_pack_start ((GtkBox *)tbox, child2, FALSE, FALSE, num2); gtk_widget_show_all (tbox); gtk_box_pack_start ((GtkBox *)wid, tbox, FALSE, FALSE, 0); }
@@ -778,20 +778,20 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Yahoo account settings:"));
gtk_label_set_markup ((GtkLabel *)tmp, buff);
g_free (buff);
- gtk_widget_show(tmp);
+ gtk_widget_show (tmp);
#define PACK_IN_BOX(wid,child,num) { GtkWidget *tbox; tbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)tbox, child, FALSE, FALSE, num); gtk_widget_show (tbox); gtk_box_pack_start ((GtkBox *)wid, tbox, FALSE, FALSE, 0); }
#define PACK_IN_BOX_AND_TEXT(txt, child,num) { GtkWidget *txtlbl = gtk_label_new (txt); tmpbox = gtk_hbox_new (FALSE, 12); gtk_box_pack_start ((GtkBox *)tmpbox, txtlbl, FALSE, FALSE, num); gtk_box_pack_start ((GtkBox *)tmpbox, child, FALSE, FALSE, num); gtk_widget_show_all (tmpbox);}
- PACK_IN_BOX(page->box,tmp,12);
- PACK_IN_BOX(page->box,mav->priv->calendar,24);
+ PACK_IN_BOX (page->box,tmp,12);
+ PACK_IN_BOX (page->box,mav->priv->calendar,24);
mav->priv->yahoo_cal_entry = gtk_entry_new ();
gtk_widget_show (mav->priv->yahoo_cal_entry);
- PACK_IN_BOX(page->box,mav->priv->gmail_info_label, 24);
+ PACK_IN_BOX (page->box,mav->priv->gmail_info_label, 24);
PACK_IN_BOX_AND_TEXT(_("Yahoo Calendar name:"), mav->priv->yahoo_cal_entry, 0);
- PACK_IN_BOX(page->box, tmpbox, 24);
- cal_name = g_strdup(e_account_get_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_ID_NAME));
+ PACK_IN_BOX (page->box, tmpbox, 24);
+ cal_name = g_strdup (e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_ID_NAME));
cal_name = g_strdelimit(cal_name, " ", '_');
gtk_entry_set_text ((GtkEntry *)mav->priv->yahoo_cal_entry, cal_name);
g_free (cal_name);
@@ -808,7 +808,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
mav->pages[mav->current_page]->done = TRUE;
if (mail_account_pages[mav->current_page].path) {
- if (!mav->original && em_account_editor_check(mav->edit, mail_account_pages[mav->current_page].path))
+ if (!mav->original && em_account_editor_check (mav->edit, mail_account_pages[mav->current_page].path))
mav_next_pressed (NULL, mav);
}
}
@@ -831,9 +831,9 @@ mav_prev_pressed (GtkButton *button, MailAccountView *mav)
}
static GtkWidget *
-mav_construct_page(MailAccountView *view, MAVPageType type)
+mav_construct_page (MailAccountView *view, MAVPageType type)
{
- MAVPage *page = g_new0(MAVPage, 1);
+ MAVPage *page = g_new0 (MAVPage, 1);
GtkWidget *box, *tmp, *error_box;
gchar *str;
@@ -852,24 +852,24 @@ mav_construct_page(MailAccountView *view, MAVPageType type)
gtk_widget_show (error_box);
box = gtk_hbox_new (FALSE, 12);
- gtk_widget_show(box);
- gtk_box_pack_start((GtkBox *)page->box, box, FALSE, FALSE, 12);
+ gtk_widget_show (box);
+ gtk_box_pack_start ((GtkBox *)page->box, box, FALSE, FALSE, 12);
tmp = gtk_label_new (NULL);
str = g_strdup_printf("<span size=\"xx-large\" weight=\"heavy\">%s</span>", _(mail_account_pages[type].head));
gtk_label_set_markup ((GtkLabel *)tmp, str);
- g_free(str);
+ g_free (str);
gtk_widget_show (tmp);
- gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 12);
+ gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 12);
box = gtk_hbox_new (FALSE, 12);
- gtk_widget_show(box);
- gtk_box_pack_start((GtkBox *)page->box, box, FALSE, FALSE, 12);
+ gtk_widget_show (box);
+ gtk_box_pack_start ((GtkBox *)page->box, box, FALSE, FALSE, 12);
tmp = gtk_label_new (_(mail_account_pages[type].detail));
gtk_widget_set_size_request (tmp, 600, -1);
gtk_label_set_line_wrap ((GtkLabel *)tmp, TRUE);
gtk_label_set_line_wrap_mode ((GtkLabel *)tmp, PANGO_WRAP_WORD);
- gtk_widget_show(tmp);
- gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 12);
+ gtk_widget_show (tmp);
+ gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 12);
page->main = NULL;
if (mail_account_pages[type].create_page && mail_account_pages[type].path) {
@@ -877,7 +877,7 @@ mav_construct_page(MailAccountView *view, MAVPageType type)
gtk_box_pack_start ((GtkBox *)page->box, tmp, FALSE, FALSE, 3);
page->main = gtk_hbox_new (FALSE, 0);
gtk_widget_show (page->main);
- gtk_box_pack_start((GtkBox *)page->main, tmp, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)page->main, tmp, FALSE, FALSE, 0);
}
if (mail_account_pages[type].fill_page) {
@@ -885,33 +885,33 @@ mav_construct_page(MailAccountView *view, MAVPageType type)
}
if ((view->original && mail_account_pages[type].prev_edit) || mail_account_pages[type].prev) {
- box = gtk_hbox_new(FALSE, 0);
+ box = gtk_hbox_new (FALSE, 0);
if (FALSE) {
tmp = gtk_image_new_from_icon_name ("go-previous", GTK_ICON_SIZE_BUTTON);
- gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 0);
}
tmp = gtk_label_new (_(view->original ? mail_account_pages[type].prev_edit : mail_account_pages[type].prev));
- gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3);
+ gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 3);
page->prev = gtk_button_new ();
gtk_container_add ((GtkContainer *)page->prev, box);
- gtk_widget_show_all(page->prev);
+ gtk_widget_show_all (page->prev);
g_signal_connect(page->prev, "clicked", G_CALLBACK(mav_prev_pressed), view);
}
if ((view->original && mail_account_pages[type].next_edit) || mail_account_pages[type].next) {
- box = gtk_hbox_new(FALSE, 0);
+ box = gtk_hbox_new (FALSE, 0);
tmp = gtk_label_new (_(view->original ? mail_account_pages[type].next_edit : mail_account_pages[type].next));
- gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3);
+ gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 3);
if (FALSE) {
tmp = gtk_image_new_from_icon_name ("go-next", GTK_ICON_SIZE_BUTTON);
- gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 0);
}
page->next = gtk_button_new ();
gtk_widget_set_can_default (page->next, TRUE);
g_signal_connect (page->next, "hierarchy-changed",
G_CALLBACK (gtk_widget_grab_default), NULL);
gtk_container_add ((GtkContainer *)page->next, box);
- gtk_widget_show_all(page->next);
+ gtk_widget_show_all (page->next);
g_signal_connect(page->next, "clicked", G_CALLBACK(mav_next_pressed), view);
}
@@ -922,7 +922,7 @@ mav_construct_page(MailAccountView *view, MAVPageType type)
gtk_box_pack_end ((GtkBox *)box, page->next, FALSE, FALSE, 12);
gtk_widget_show (box);
gtk_box_pack_end ((GtkBox *)page->box, box, FALSE, FALSE, 6);
- gtk_widget_show(page->box);
+ gtk_widget_show (page->box);
gtk_box_pack_end ((GtkBox *)page->box, error_box, FALSE, FALSE, 2);
return (GtkWidget *)page;
}
@@ -930,20 +930,20 @@ mav_construct_page(MailAccountView *view, MAVPageType type)
static ServerData *
emae_check_servers (const gchar *email)
{
- ServerData *sdata = g_new0(ServerData, 1);
- EmailProvider *provider = g_new0(EmailProvider, 1);
- gchar *dupe = g_strdup(email);
+ ServerData *sdata = g_new0 (ServerData, 1);
+ EmailProvider *provider = g_new0 (EmailProvider, 1);
+ gchar *dupe = g_strdup (email);
gchar *tmp;
/* FIXME: Find a way to free the provider once given to account settings. */
provider->email = (gchar *)email;
- tmp = strchr(email, '@');
+ tmp = strchr (email, '@');
tmp++;
provider->domain = tmp;
- tmp = strchr(dupe, '@');
+ tmp = strchr (dupe, '@');
*tmp = 0;
- provider->username = (gchar *)g_quark_to_string(g_quark_from_string(dupe));
- g_free(dupe);
+ provider->username = (gchar *)g_quark_to_string (g_quark_from_string (dupe));
+ g_free (dupe);
if (!mail_guess_servers (provider)) {
g_free (provider);
@@ -1045,8 +1045,8 @@ mail_account_view_construct (MailAccountView *view)
gtk_widget_hide (e_config_create_widget (E_CONFIG (view->edit->config)));
view->edit->emae_check_servers = emae_check_servers;
if (!view->original) {
- e_account_set_bool (em_account_editor_get_modified_account(view->edit), E_ACCOUNT_SOURCE_SAVE_PASSWD, TRUE);
- e_account_set_bool (em_account_editor_get_modified_account(view->edit), E_ACCOUNT_TRANSPORT_SAVE_PASSWD, TRUE);
+ e_account_set_bool (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_SOURCE_SAVE_PASSWD, TRUE);
+ e_account_set_bool (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_TRANSPORT_SAVE_PASSWD, TRUE);
}
em_account_editor_check (view->edit, mail_account_pages[0].path);
view->pages[0]->done = TRUE;
@@ -1063,8 +1063,8 @@ mail_account_view_construct (MailAccountView *view)
gtk_entry_set_visibility ((GtkEntry *)pwd, FALSE);
/* gtk_entry_set_activates_default ((GtkEntry *)pwd, TRUE); */
g_signal_connect (pwd, "activate", G_CALLBACK (next_page), view);
- gtk_widget_show(label);
- gtk_widget_show(pwd);
+ gtk_widget_show (label);
+ gtk_widget_show (pwd);
gtk_table_attach ((GtkTable *)table, label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
gtk_table_attach ((GtkTable *)table, pwd, 1, 2, 2, 3, GTK_FILL|GTK_EXPAND, 0, 0, 0);
@@ -1097,8 +1097,8 @@ mav_btn_expose (GtkWidget *w, GdkEventExpose *event, MailAccountView *mfv)
cr = gdk_cairo_create (gtk_widget_get_window (w));
cairo_save (cr);
gdk_cairo_set_source_pixbuf (cr, img, event->area.x-5, event->area.y-4);
- cairo_paint(cr);
- cairo_restore(cr);
+ cairo_paint (cr);
+ cairo_restore (cr);
cairo_destroy (cr);
return TRUE;
@@ -1124,7 +1124,7 @@ mail_account_view_get_tab_widget (MailAccountView *mcv)
g_signal_connect (img, "expose-event", G_CALLBACK(mav_btn_expose), mcv);
tool = gtk_button_new ();
- gtk_button_set_relief((GtkButton *)tool, GTK_RELIEF_NONE);
+ gtk_button_set_relief ((GtkButton *)tool, GTK_RELIEF_NONE);
gtk_button_set_focus_on_click ((GtkButton *)tool, FALSE);
gtk_widget_set_tooltip_text (tool, _("Close Tab"));
g_signal_connect (tool, "clicked", G_CALLBACK(mav_close), mcv);
@@ -1133,7 +1133,7 @@ mail_account_view_get_tab_widget (MailAccountView *mcv)
gtk_box_pack_start ((GtkBox *)box, img, FALSE, FALSE, 0);
gtk_container_add ((GtkContainer *)tool, box);
gtk_widget_show_all (tool);
- gtk_icon_size_lookup_for_settings (gtk_widget_get_settings(tool) , GTK_ICON_SIZE_MENU, &w, &h);
+ gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (tool) , GTK_ICON_SIZE_MENU, &w, &h);
gtk_widget_set_size_request (tool, w+2, h+2);
box = gtk_label_new (_("Account Wizard"));
diff --git a/capplet/settings/mail-account-view.h b/capplet/settings/mail-account-view.h
index 3d01156e5b..5b728bca93 100644
--- a/capplet/settings/mail-account-view.h
+++ b/capplet/settings/mail-account-view.h
@@ -88,6 +88,6 @@ typedef struct _MailAccountViewClass {
GType mail_account_view_get_type (void);
MailAccountView *mail_account_view_new (EAccount *account);
-GtkWidget * mail_account_view_get_tab_widget(MailAccountView *mcv);
+GtkWidget * mail_account_view_get_tab_widget (MailAccountView *mcv);
void mail_account_view_activate (MailAccountView *mcv, GtkWidget *tree, GtkWidget *folder_tree, GtkWidget *check_mail, GtkWidget *sort_by, gboolean act);
#endif
diff --git a/capplet/settings/mail-capplet-shell.c b/capplet/settings/mail-capplet-shell.c
index a1cdbb8989..8038f413ed 100644
--- a/capplet/settings/mail-capplet-shell.c
+++ b/capplet/settings/mail-capplet-shell.c
@@ -89,7 +89,7 @@ static void setup_abooks (void);
static void
mail_capplet_shell_init (MailCappletShell *shell)
{
- shell->priv = g_new0(MailCappletShellPrivate, 1);
+ shell->priv = g_new0 (MailCappletShellPrivate, 1);
shell->priv->settings_view = NULL;
}
@@ -173,7 +173,7 @@ mail_capplet_shell_quit (MailCappletShell *shell)
MailCappletShellPrivate *priv = shell->priv;
if (priv->main_loop)
- gtk_main_quit();
+ gtk_main_quit ();
else
gtk_widget_hide ((GtkWidget *)shell);
}
@@ -211,8 +211,8 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean
gtk_window_set_type_hint ((GtkWindow *)shell, GDK_WINDOW_TYPE_HINT_NORMAL);
if (g_getenv("ANJAL_NO_MAX") == NULL && FALSE) {
GdkScreen *scr = gtk_widget_get_screen ((GtkWidget *)shell);
- window_width = gdk_screen_get_width(scr);
- gtk_window_set_default_size ((GtkWindow *)shell, gdk_screen_get_width(scr), gdk_screen_get_height (scr));
+ window_width = gdk_screen_get_width (scr);
+ gtk_window_set_default_size ((GtkWindow *)shell, gdk_screen_get_width (scr), gdk_screen_get_height (scr));
gtk_window_set_decorated ((GtkWindow *)shell, FALSE);
} else {
gtk_window_set_default_size ((GtkWindow *)shell, 1024, 500);
@@ -255,7 +255,7 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean
mc = mail_view_add_page ((MailView *)shell->view, MAIL_VIEW_ACCOUNT, NULL);
g_signal_connect (mc, "view-close", G_CALLBACK(ms_show_post_druid), shell);
setup_abooks ();
- if (!g_file_test(pdir, G_FILE_TEST_EXISTS)) {
+ if (!g_file_test (pdir, G_FILE_TEST_EXISTS)) {
g_mkdir (pdir, 0700);
}
g_free (pdir);
@@ -286,7 +286,7 @@ mail_capplet_shell_new (gint socket_id, gboolean just_druid, gboolean main_loop)
#define PERSONAL_RELATIVE_URI "system"
static void
-setup_abooks()
+setup_abooks ()
{
gchar *base_dir, *uri;
GSList *groups;
@@ -298,7 +298,7 @@ setup_abooks()
base_dir = g_build_filename (e_get_user_data_dir (), "addressbook", "local", NULL);
uri = g_filename_to_uri (base_dir, NULL, NULL);
- if (!e_book_get_addressbooks(&list, NULL)) {
+ if (!e_book_get_addressbooks (&list, NULL)) {
g_warning ("Unable to get books\n");
return;
}
diff --git a/capplet/settings/mail-decoration.c b/capplet/settings/mail-decoration.c
index d208981a65..02ccf2f7d9 100644
--- a/capplet/settings/mail-decoration.c
+++ b/capplet/settings/mail-decoration.c
@@ -49,11 +49,11 @@ struct _MailDecorationPrivate
static GObjectClass *parent_class = NULL;
-static void mail_decoration_class_init(MailDecorationClass *klass);
-static void mail_decoration_init(MailDecoration *facet);
+static void mail_decoration_class_init (MailDecorationClass *klass);
+static void mail_decoration_init (MailDecoration *facet);
GType
-mail_decoration_get_type(void)
+mail_decoration_get_type (void)
{
static GType type = 0;
@@ -154,7 +154,7 @@ update_cursor (MailDecoration *md, double x, double y, gboolean update)
if (update)
md->priv->resizing = TRUE;
- if (in_top(md, y) && in_left (md, x)) {
+ if (in_top (md, y) && in_left (md, x)) {
md->priv->last_edge = GDK_WINDOW_EDGE_NORTH_WEST;
set_cursor (md, GDK_WINDOW_EDGE_NORTH_WEST);
} else if (in_top (md, y) && in_right (md, x)) {
@@ -241,7 +241,7 @@ md_size_allocate_event (GtkWidget *widget, GtkAllocation *allocation, gpointer u
md->priv->window_width = width;
gconf_client_set_int (client, "/apps/anjal/window_width", width, NULL);
gconf_client_set_int (client, "/apps/anjal/window_height", height, NULL);
- g_object_unref(client);
+ g_object_unref (client);
}
}
@@ -293,9 +293,9 @@ md_button_release_event (GtkWidget *widget, GdkEventButton *event, gpointer user
return FALSE;
}
-MailDecoration* mail_decoration_new(GtkWindow *window)
+MailDecoration* mail_decoration_new (GtkWindow *window)
{
- MailDecoration *md = g_object_new(mail_decoration_get_type(), NULL);
+ MailDecoration *md = g_object_new (mail_decoration_get_type (), NULL);
GConfClient *client = gconf_client_get_default ();
gint width, height;
@@ -327,17 +327,17 @@ MailDecoration* mail_decoration_new(GtkWindow *window)
}
static void
-mail_decoration_class_init(MailDecorationClass *klass)
+mail_decoration_class_init (MailDecorationClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
- g_type_class_add_private (object_class, sizeof(MailDecorationPrivate));
+ g_type_class_add_private (object_class, sizeof (MailDecorationPrivate));
}
static void
-mail_decoration_init(MailDecoration *md)
+mail_decoration_init (MailDecoration *md)
{
MailDecorationPrivate *priv;
diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c
index 69e0d8dfa6..66200cc5aa 100644
--- a/capplet/settings/mail-guess-servers.c
+++ b/capplet/settings/mail-guess-servers.c
@@ -60,7 +60,7 @@ xml_to_gchar (xmlChar *xml, EmailProvider *provider)
tmp = xml ? strstr((gchar *) xml, "\%EMAIL") : NULL;
if (!tmp) {
- gxml = xml ? g_strdup((gchar *) xml) : NULL;
+ gxml = xml ? g_strdup ((gchar *) xml) : NULL;
} else {
decodepart:
*tmp = 0;
@@ -83,7 +83,7 @@ xml_to_gchar (xmlChar *xml, EmailProvider *provider)
}
}
- xmlFree(xml);
+ xmlFree (xml);
return gxml;
}
@@ -124,15 +124,15 @@ handle_incoming (xmlNodePtr head, EmailProvider *provider)
while (node) {
if (strcmp ((gchar *)node->name, "hostname") == 0) {
- provider->recv_hostname = xml_to_gchar(xmlNodeGetContent(node), provider);
+ provider->recv_hostname = xml_to_gchar (xmlNodeGetContent (node), provider);
} else if (strcmp ((gchar *)node->name, "port") == 0) {
- provider->recv_port = xml_to_gchar(xmlNodeGetContent(node), provider);
+ provider->recv_port = xml_to_gchar (xmlNodeGetContent (node), provider);
} else if (strcmp ((gchar *)node->name, "socketType") == 0) {
- provider->recv_socket_type = xml_to_gchar(xmlNodeGetContent(node), provider);
+ provider->recv_socket_type = xml_to_gchar (xmlNodeGetContent (node), provider);
} else if (strcmp ((gchar *)node->name, "username") == 0) {
- provider->recv_username = xml_to_gchar(xmlNodeGetContent(node), provider);
+ provider->recv_username = xml_to_gchar (xmlNodeGetContent (node), provider);
} else if (strcmp ((gchar *)node->name, "authentication") == 0) {
- provider->recv_auth = xml_to_gchar(xmlNodeGetContent(node), provider);
+ provider->recv_auth = xml_to_gchar (xmlNodeGetContent (node), provider);
}
node = node->next;
@@ -148,15 +148,15 @@ handle_outgoing (xmlNodePtr head, EmailProvider *provider)
while (node) {
if (strcmp ((gchar *)node->name, "hostname") == 0) {
- provider->send_hostname = xml_to_gchar(xmlNodeGetContent(node), provider);
+ provider->send_hostname = xml_to_gchar (xmlNodeGetContent (node), provider);
} else if (strcmp ((gchar *)node->name, "port") == 0) {
- provider->send_port = xml_to_gchar(xmlNodeGetContent(node), provider);
+ provider->send_port = xml_to_gchar (xmlNodeGetContent (node), provider);
} else if (strcmp ((gchar *)node->name, "socketType") == 0) {
- provider->send_socket_type = xml_to_gchar(xmlNodeGetContent(node), provider);
+ provider->send_socket_type = xml_to_gchar (xmlNodeGetContent (node), provider);
} else if (strcmp ((gchar *)node->name, "username") == 0) {
- provider->send_username = xml_to_gchar(xmlNodeGetContent(node), provider);
+ provider->send_username = xml_to_gchar (xmlNodeGetContent (node), provider);
} else if (strcmp ((gchar *)node->name, "authentication") == 0) {
- provider->send_auth = xml_to_gchar(xmlNodeGetContent(node), provider);
+ provider->send_auth = xml_to_gchar (xmlNodeGetContent (node), provider);
}
node = node->next;
@@ -211,7 +211,7 @@ parse_message (const gchar *msg, gint length, EmailProvider *provider)
node = node->next;
}
- xmlFreeDoc(doc);
+ xmlFreeDoc (doc);
return TRUE;
}
@@ -272,8 +272,8 @@ guess_when_online (EmailProvider *provider)
g_object_unref (proxy);
g_object_unref (msg);
- g_object_unref(session);
- g_free(url);
+ g_object_unref (session);
+ g_free (url);
return TRUE;
@@ -312,7 +312,7 @@ out:
}
gboolean
-mail_guess_servers(EmailProvider *provider)
+mail_guess_servers (EmailProvider *provider)
{
if (is_online () && guess_when_online (provider))
return TRUE;
@@ -328,7 +328,7 @@ main (gint argc, gchar **argv)
g_thread_init (NULL);
g_type_init ();
- provider = g_new0(EmailProvider, 1);
+ provider = g_new0 (EmailProvider, 1);
provider->email = "sragavan@iijmio-mail.jp";
provider->domain = "iijmio-mail.jp";
diff --git a/capplet/settings/mail-settings-view.c b/capplet/settings/mail-settings-view.c
index dc786b3349..2c3d56d0e1 100644
--- a/capplet/settings/mail-settings-view.c
+++ b/capplet/settings/mail-settings-view.c
@@ -55,7 +55,7 @@ static void msv_regen_view (MailSettingsView *acview);
static void
mail_settings_view_init (MailSettingsView *shell)
{
- shell->priv = g_new0(MailSettingsViewPrivate, 1);
+ shell->priv = g_new0 (MailSettingsViewPrivate, 1);
}
@@ -95,7 +95,7 @@ mail_settings_view_class_init (MailSettingsViewClass *klass)
}
static void
-msv_edit_account(GtkButton *button, MailSettingsView *msv)
+msv_edit_account (GtkButton *button, MailSettingsView *msv)
{
EAccount *acc = g_object_get_data((GObject *)button, "account");
@@ -103,7 +103,7 @@ msv_edit_account(GtkButton *button, MailSettingsView *msv)
}
static void
-msv_delete_account(GtkButton *button, MailSettingsView *msv)
+msv_delete_account (GtkButton *button, MailSettingsView *msv)
{
EAccount *account = g_object_get_data((GObject *)button, "account");
EAccountList *account_list = e_get_account_list ();
@@ -138,21 +138,21 @@ build_account_button (MailSettingsView *acview, EAccount *account)
if (FALSE) {
tlabel = (GtkWidget *)gtk_image_new_from_stock (account ? "gtk-edit" : "gtk-new", GTK_ICON_SIZE_BUTTON);
- gtk_widget_show(tlabel);
- gtk_box_pack_start((GtkBox *)tbox, tlabel, FALSE, FALSE, 6);
+ gtk_widget_show (tlabel);
+ gtk_box_pack_start ((GtkBox *)tbox, tlabel, FALSE, FALSE, 6);
}
if (account)
tmp = g_strdup_printf (_("Modify %s..."), e_account_get_string(account, E_ACCOUNT_ID_ADDRESS));
else
tmp = _("Add a new account");
- tlabel = gtk_label_new(tmp);
+ tlabel = gtk_label_new (tmp);
if (account)
- g_free(tmp);
- gtk_widget_show(tlabel);
- gtk_box_pack_start((GtkBox *)tbox, tlabel, FALSE, FALSE, 0);
- gtk_widget_show(tbox);
- gtk_container_add((GtkContainer *)label, tbox);
+ g_free (tmp);
+ gtk_widget_show (tlabel);
+ gtk_box_pack_start ((GtkBox *)tbox, tlabel, FALSE, FALSE, 0);
+ gtk_widget_show (tbox);
+ gtk_container_add ((GtkContainer *)label, tbox);
g_object_set_data ((GObject *)label, "account", account);
g_signal_connect(label, "clicked", G_CALLBACK(msv_edit_account), acview);
gtk_box_pack_start ((GtkBox *)box1, label, FALSE, FALSE, 0);
@@ -160,13 +160,13 @@ build_account_button (MailSettingsView *acview, EAccount *account)
if (account) {
tlabel = gtk_button_new_from_stock ("gtk-delete");
- gtk_box_pack_start((GtkBox *)box1, tlabel, FALSE, FALSE, 12);
- gtk_widget_show(tlabel);
+ gtk_box_pack_start ((GtkBox *)box1, tlabel, FALSE, FALSE, 12);
+ gtk_widget_show (tlabel);
g_object_set_data ((GObject *)tlabel, "account", account);
g_signal_connect (tlabel, "clicked", G_CALLBACK(msv_delete_account), acview);
}
- PACK_BOX(box1,24);
+ PACK_BOX (box1,24);
}
static void
@@ -178,13 +178,13 @@ msv_regen_view (MailSettingsView *acview)
GtkWidget *box, *label;
gchar *buff;
- gtk_container_foreach((GtkContainer *)acview->priv->box, (GtkCallback)gtk_widget_destroy, NULL);
+ gtk_container_foreach ((GtkContainer *)acview->priv->box, (GtkCallback)gtk_widget_destroy, NULL);
label = gtk_label_new (NULL);
buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Account management"));
gtk_label_set_markup ((GtkLabel *)label, buff);
g_free (buff);
- PACK_BOX(label,12);
+ PACK_BOX (label,12);
node = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (node)) {
@@ -210,7 +210,7 @@ mail_settings_view_construct (MailSettingsView *acview)
acview->priv->accounts = e_get_account_list ();
g_signal_connect (acview->priv->accounts, "account-added", G_CALLBACK(msv_account_added), acview);
msv_regen_view (acview);
- gtk_widget_show((GtkWidget *)acview);
+ gtk_widget_show ((GtkWidget *)acview);
}
@@ -235,8 +235,8 @@ msv_btn_expose (GtkWidget *w, GdkEventExpose *event, MailSettingsView *mfv)
cr = gdk_cairo_create (gtk_widget_get_window (w));
cairo_save (cr);
gdk_cairo_set_source_pixbuf (cr, img, event->area.x-5, event->area.y-4);
- cairo_paint(cr);
- cairo_restore(cr);
+ cairo_paint (cr);
+ cairo_restore (cr);
cairo_destroy (cr);
return TRUE;
@@ -249,7 +249,7 @@ msv_close (GtkButton *w, MailSettingsView *mfv)
}
GtkWidget *
-mail_settings_view_get_tab_widget(MailSettingsView *mcv)
+mail_settings_view_get_tab_widget (MailSettingsView *mcv)
{
GdkPixbuf *pbuf = gtk_widget_render_icon ((GtkWidget *)mcv, "gtk-close", GTK_ICON_SIZE_MENU, NULL);
@@ -262,7 +262,7 @@ mail_settings_view_get_tab_widget(MailSettingsView *mcv)
g_signal_connect (img, "expose-event", G_CALLBACK(msv_btn_expose), mcv);
tool = gtk_button_new ();
- gtk_button_set_relief((GtkButton *)tool, GTK_RELIEF_NONE);
+ gtk_button_set_relief ((GtkButton *)tool, GTK_RELIEF_NONE);
gtk_button_set_focus_on_click ((GtkButton *)tool, FALSE);
gtk_widget_set_tooltip_text (tool, _("Close Tab"));
g_signal_connect (tool, "clicked", G_CALLBACK(msv_close), mcv);
@@ -271,7 +271,7 @@ mail_settings_view_get_tab_widget(MailSettingsView *mcv)
gtk_box_pack_start ((GtkBox *)box, img, FALSE, FALSE, 0);
gtk_container_add ((GtkContainer *)tool, box);
gtk_widget_show_all (tool);
- gtk_icon_size_lookup_for_settings (gtk_widget_get_settings(tool) , GTK_ICON_SIZE_MENU, &w, &h);
+ gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (tool) , GTK_ICON_SIZE_MENU, &w, &h);
gtk_widget_set_size_request (tool, w+2, h+2);
box = gtk_label_new (_("Settings"));
@@ -291,7 +291,7 @@ mail_settings_view_activate (MailSettingsView *mcv, GtkWidget *tree, GtkWidget *
{
if (!check_mail || !sort_by)
return;
- //if (!GTK_WIDGET_VISIBLE(folder_tree))
+ //if (!GTK_WIDGET_VISIBLE (folder_tree))
// gtk_widget_show (slider);
gtk_widget_set_sensitive (check_mail, TRUE);
gtk_widget_set_sensitive (sort_by, FALSE);
diff --git a/capplet/settings/mail-settings-view.h b/capplet/settings/mail-settings-view.h
index 136e4414a2..299d25b5e7 100644
--- a/capplet/settings/mail-settings-view.h
+++ b/capplet/settings/mail-settings-view.h
@@ -54,6 +54,6 @@ typedef struct _MailSettingsViewClass {
GType mail_settings_view_get_type (void);
MailSettingsView *mail_settings_view_new (void);
-GtkWidget * mail_settings_view_get_tab_widget(MailSettingsView *mcv);
+GtkWidget * mail_settings_view_get_tab_widget (MailSettingsView *mcv);
void mail_settings_view_activate (MailSettingsView *mcv, GtkWidget *tree, GtkWidget *folder_tree, GtkWidget *check_mail, GtkWidget *sort_by, GtkWidget *slider, gboolean act);
#endif
diff --git a/capplet/settings/mail-view.c b/capplet/settings/mail-view.c
index 54a5647e0c..a294a8e5c0 100644
--- a/capplet/settings/mail-view.c
+++ b/capplet/settings/mail-view.c
@@ -73,7 +73,7 @@ void anjal_shell_view_restore_state (EShellView *view, const gchar *uri);
static void
mail_view_init (MailView *shell)
{
- shell->priv = g_new0(MailViewPrivate, 1);
+ shell->priv = g_new0 (MailViewPrivate, 1);
shell->priv->children = NULL;
shell->priv->current_view = NULL;
shell->folder_tree = NULL;
@@ -151,7 +151,7 @@ mv_switch (GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user
child = (MailViewChild *)gtk_notebook_get_nth_page (notebook, current_child);
priv->current_view = child;
- REALIGN_NODES(shell->priv->children,child);
+ REALIGN_NODES (shell->priv->children,child);
#ifndef ANJAL_SETTINGS
if (child->type == MAIL_VIEW_COMPOSER)
@@ -198,7 +198,7 @@ mv_get_page_number (GtkNotebook *note, GtkWidget *widget)
total = gtk_notebook_get_n_pages (note);
for (i=0; i<total; i++) {
- if (gtk_notebook_get_nth_page(note, i) == widget)
+ if (gtk_notebook_get_nth_page (note, i) == widget)
return i;
}
@@ -213,7 +213,7 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv)
MailViewChild *child;
gboolean removing_viewed = FALSE;
- if (g_list_length(mv->priv->children) == 1)
+ if (g_list_length (mv->priv->children) == 1)
return;
#ifndef ANJAL_SETTINGS
@@ -235,14 +235,14 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv)
}
if (mfv->type == MAIL_VIEW_COMPOSER) {
- if (!mail_composer_view_can_quit((MailComposerView *)mfv))
+ if (!mail_composer_view_can_quit ((MailComposerView *)mfv))
return;
}
#endif
- g_signal_handlers_block_by_func(mv, mv_switch, mv);
+ g_signal_handlers_block_by_func (mv, mv_switch, mv);
gtk_notebook_remove_page ((GtkNotebook *)mv, n);
- g_signal_handlers_unblock_by_func(mv, mv_switch, mv);
+ g_signal_handlers_unblock_by_func (mv, mv_switch, mv);
if (mfv == mv->priv->children->data)
removing_viewed = TRUE;
@@ -281,11 +281,11 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv)
static void
mv_message_new (MailFolderView *mfv, gpointer data, gchar *umid, MailView *mv)
{
- MailConvView *conv = (MailConvView *)mv_switch_message_view(mv, umid);
+ MailConvView *conv = (MailConvView *)mv_switch_message_view (mv, umid);
*(MailConvView **)data = conv;
if (conv)
- conv->uri = g_strdup(umid);
+ conv->uri = g_strdup (umid);
return;
}
@@ -299,7 +299,7 @@ mv_search_set (MailFolderView *mfv, MailView *mv)
static void
mv_folder_loaded (MailFolderView *mfv, MailView *mv)
{
- g_signal_handlers_block_by_func(mfv, mv_folder_loaded, mv);
+ g_signal_handlers_block_by_func (mfv, mv_folder_loaded, mv);
g_signal_emit (mv, signals[VIEW_NEW], 0);
}
@@ -311,7 +311,7 @@ mail_view_add_folder (MailView *mv, gpointer data, gboolean block)
mail_folder_view_set_folder_pane (mfv, mv->folder_tree);
if (!block)
mv->priv->current_view = (MailViewChild *)mfv;
- mv->priv->children = block ? g_list_append(mv->priv->children, mfv) : g_list_prepend (mv->priv->children, mfv);
+ mv->priv->children = block ? g_list_append (mv->priv->children, mfv) : g_list_prepend (mv->priv->children, mfv);
position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)mfv, mfv->tab_label);
gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)mfv, TRUE);
gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)mfv, FALSE);
@@ -345,7 +345,7 @@ mail_view_add_composer (MailView *mv, gpointer data, gboolean block)
mcv = mail_composer_view_new_with_composer ((GtkWidget *)data);
if (!block)
mv->priv->current_view = (MailViewChild *)mcv;
- mv->priv->children = block ? g_list_append(mv->priv->children, mcv) : g_list_prepend (mv->priv->children, mcv);
+ mv->priv->children = block ? g_list_append (mv->priv->children, mcv) : g_list_prepend (mv->priv->children, mcv);
if (!special)
position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)mcv, mcv->tab_label);
@@ -377,10 +377,10 @@ mail_view_add_message (MailView *mv, gpointer data, gboolean block)
mcv->type = MAIL_VIEW_MESSAGE;
if (!block)
mv->priv->current_view = (MailViewChild *)mcv;
- mv->priv->children = block ? g_list_append(mv->priv->children, mcv) : g_list_prepend (mv->priv->children, mcv);
+ mv->priv->children = block ? g_list_append (mv->priv->children, mcv) : g_list_prepend (mv->priv->children, mcv);
position = gtk_notebook_get_current_page ((GtkNotebook *)mv);
- gtk_notebook_insert_page ((GtkNotebook *)mv, (GtkWidget *)mcv, mail_conv_view_get_tab_widget(mcv), position+1);
+ gtk_notebook_insert_page ((GtkNotebook *)mv, (GtkWidget *)mcv, mail_conv_view_get_tab_widget (mcv), position+1);
gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)mcv, TRUE);
gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)mcv, FALSE);
if (!block)
@@ -399,7 +399,7 @@ mail_view_add_message (MailView *mv, gpointer data, gboolean block)
static void
mv_show_acc_mcv (MailViewChild *mfv, EAccount *account, MailView *mv)
{
- mail_view_add_page(mv, MAIL_VIEW_ACCOUNT, account);
+ mail_view_add_page (mv, MAIL_VIEW_ACCOUNT, account);
}
static MailViewChild *
@@ -411,9 +411,9 @@ mail_view_add_settings (MailView *mv, gpointer data, gboolean block)
gtk_widget_show ((GtkWidget *)msv);
if (!block)
mv->priv->current_view = (MailViewChild *)msv;
- mv->priv->children = block ? g_list_append(mv->priv->children, msv) : g_list_prepend (mv->priv->children, msv);
+ mv->priv->children = block ? g_list_append (mv->priv->children, msv) : g_list_prepend (mv->priv->children, msv);
- position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_settings_view_get_tab_widget(msv));
+ position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_settings_view_get_tab_widget (msv));
g_signal_connect (msv, "view-close", G_CALLBACK(mv_close_mcv), mv);
g_signal_connect (msv, "show-account", G_CALLBACK(mv_show_acc_mcv), mv);
gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, TRUE);
@@ -431,8 +431,8 @@ mail_view_switch_to_settings (MailView* mv, MailViewChild *mpv)
{
gint position = 0;
- position = mv_get_page_number((GtkNotebook *)mv, (GtkWidget *)mpv);
- REALIGN_NODES(mv->priv->children,mpv);
+ position = mv_get_page_number ((GtkNotebook *)mv, (GtkWidget *)mpv);
+ REALIGN_NODES (mv->priv->children,mpv);
gtk_notebook_set_current_page ((GtkNotebook *)mv, position);
mail_settings_view_activate ((MailSettingsView *)mpv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE);
}
@@ -446,8 +446,8 @@ mail_view_add_account (MailView *mv, gpointer data, gboolean block)
gtk_widget_show ((GtkWidget *)msv);
if (!block)
mv->priv->current_view = (MailViewChild *)msv;
- mv->priv->children = block ? g_list_append(mv->priv->children, msv) : g_list_prepend (mv->priv->children, msv);
- position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_account_view_get_tab_widget(msv));
+ mv->priv->children = block ? g_list_append (mv->priv->children, msv) : g_list_prepend (mv->priv->children, msv);
+ position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_account_view_get_tab_widget (msv));
g_signal_connect_after (msv, "view-close", G_CALLBACK(mv_close_mcv), mv);
gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, TRUE);
gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, FALSE);
@@ -469,7 +469,7 @@ mail_view_add_page (MailView *mv, guint16 type, gpointer data)
if (current_child && (current_child->flags & MAIL_VIEW_HOLD_FOCUS))
block = TRUE;
- g_signal_handlers_block_by_func(mv, mv_switch, mv);
+ g_signal_handlers_block_by_func (mv, mv_switch, mv);
switch (type) {
#ifndef ANJAL_SETTINGS
case MAIL_VIEW_FOLDER:
@@ -490,9 +490,9 @@ mail_view_add_page (MailView *mv, guint16 type, gpointer data)
child = mail_view_add_account (mv, data, block);
break;
}
- gtk_widget_grab_focus((GtkWidget *)child);
+ gtk_widget_grab_focus ((GtkWidget *)child);
child->type = type;
- g_signal_handlers_unblock_by_func(mv, mv_switch, mv);
+ g_signal_handlers_unblock_by_func (mv, mv_switch, mv);
child->flags = 0;
@@ -503,7 +503,7 @@ mail_view_add_page (MailView *mv, guint16 type, gpointer data)
static void
mv_switch_folder_view (MailView *mv, const gchar *uri)
{
- gint i=0, len = g_list_length(mv->priv->children);
+ gint i=0, len = g_list_length (mv->priv->children);
GList *tmp = mv->priv->children;
while (i<len) {
MailViewChild *child = (MailViewChild *)gtk_notebook_get_nth_page ((GtkNotebook *)mv, i);
@@ -532,7 +532,7 @@ mv_switch_message_view (MailView *mv, const gchar *uri)
if (child->type == MAIL_VIEW_MESSAGE && !strcmp (uri, child->uri)) {
gtk_notebook_set_current_page ((GtkNotebook *)mv, i);
mail_conv_view_activate ((MailConvView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE);
- REALIGN_NODES(mv->priv->children,child);
+ REALIGN_NODES (mv->priv->children,child);
return NULL;
}
i++;
@@ -630,7 +630,7 @@ mv_spinner_done (CamelFolder *f, gpointer data)
}
void
-mail_view_check_mail(MailView *mv, gboolean deep)
+mail_view_check_mail (MailView *mv, gboolean deep)
{
MailViewChild *child = (MailViewChild *)mv->priv->current_view;
@@ -640,7 +640,7 @@ mail_view_check_mail(MailView *mv, gboolean deep)
if ((folder = em_folder_tree_get_selected_folder ((EMFolderTree *)mv->tree)) != NULL) {
mv_spinner_show (mv, TRUE);
- mail_refresh_folder(folder, mv_spinner_done, mv);
+ mail_refresh_folder (folder, mv_spinner_done, mv);
}
}
diff --git a/capplet/settings/mail-view.h b/capplet/settings/mail-view.h
index b76a425bbe..a2a8df68c6 100644
--- a/capplet/settings/mail-view.h
+++ b/capplet/settings/mail-view.h
@@ -82,7 +82,7 @@ void mail_view_show_list (MailView *mv);
void mail_view_close_view (MailView *mv);
void mail_view_set_check_email (MailView *mv, GtkWidget *button);
void mail_view_set_sort_by (MailView *mv, GtkWidget *button);
-void mail_view_check_mail(MailView *mv, gboolean deep);
+void mail_view_check_mail (MailView *mv, gboolean deep);
void mail_view_set_folder_tree_widget (MailView *mv, GtkWidget *tree);
void mail_view_set_folder_tree (MailView *mv, GtkWidget *tree);
void mail_view_save (MailView *mv);
diff --git a/e-util/gtk-compat.h b/e-util/gtk-compat.h
index d66ff15d08..0bad301e69 100644
--- a/e-util/gtk-compat.h
+++ b/e-util/gtk-compat.h
@@ -22,7 +22,7 @@
#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)
+ gdk_drag_context_get_action (context)
#endif
#if GTK_CHECK_VERSION (2,90,5)
diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c
index bbd2e3e0c6..9a461d3af0 100644
--- a/em-format/em-format-quote.c
+++ b/em-format/em-format-quote.c
@@ -37,7 +37,7 @@ struct _EMFormatQuotePrivate {
gint dummy;
};
-static void emfq_builtin_init(EMFormatQuoteClass *efhc);
+static void emfq_builtin_init (EMFormatQuoteClass *efhc);
static gpointer parent_class;
@@ -69,18 +69,18 @@ emfq_format_clone (EMFormat *emf,
EM_FORMAT_CLASS (parent_class)->format_clone (emf, folder, uid, msg, src);
gconf = gconf_client_get_default ();
- camel_stream_reset(emfq->stream, NULL);
+ camel_stream_reset (emfq->stream, NULL);
if (gconf_client_get_bool(gconf, "/apps/evolution/mail/composer/top_signature", NULL))
camel_stream_printf (emfq->stream, "<br>\n");
g_object_unref (gconf);
handle = em_format_find_handler(emf, "x-evolution/message/prefix");
if (handle)
- handle->handler(emf, emfq->stream, (CamelMimePart *)msg, handle, FALSE);
+ handle->handler (emf, emfq->stream, (CamelMimePart *)msg, handle, FALSE);
handle = em_format_find_handler(emf, "x-evolution/message/rfc822");
if (handle)
- handle->handler(emf, emfq->stream, (CamelMimePart *)msg, handle, FALSE);
+ handle->handler (emf, emfq->stream, (CamelMimePart *)msg, handle, FALSE);
- camel_stream_flush(emfq->stream, NULL);
+ camel_stream_flush (emfq->stream, NULL);
g_signal_emit_by_name(emf, "complete");
}
@@ -531,7 +531,7 @@ emfq_text_plain (EMFormat *emf,
flags = emfq->text_html_flags;
/* Check for RFC 2646 flowed text. */
- type = camel_mime_part_get_content_type(part);
+ type = camel_mime_part_get_content_type (part);
if (camel_content_type_is(type, "text", "plain")
&& (format = camel_content_type_param(type, "format"))
&& !g_ascii_strcasecmp(format, "flowed"))
@@ -546,7 +546,7 @@ emfq_text_plain (EMFormat *emf,
g_object_unref (sig_strip);
}
- html_filter = camel_mime_filter_tohtml_new(flags, rgb);
+ html_filter = camel_mime_filter_tohtml_new (flags, rgb);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filtered_stream), html_filter);
g_object_unref (html_filter);
@@ -599,7 +599,7 @@ emfq_text_html (EMFormat *emf,
gboolean is_fallback)
{
camel_stream_write_string(stream, "\n<!-- text/html -->\n", NULL);
- em_format_format_text(emf, stream, (CamelDataWrapper *)part);
+ em_format_format_text (emf, stream, (CamelDataWrapper *)part);
}
static void
diff --git a/em-format/em-format.c b/em-format/em-format.c
index baa1803276..5554dfc759 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -66,7 +66,7 @@ struct _EMFormatCache {
#define INLINE_ON (1)
#define INLINE_OFF (2)
-static void emf_builtin_init(EMFormatClass *);
+static void emf_builtin_init (EMFormatClass *);
enum {
EMF_COMPLETE,
@@ -77,23 +77,23 @@ static gpointer parent_class;
static guint signals[EMF_LAST_SIGNAL];
static void
-emf_free_cache(EMFormatCache *efc)
+emf_free_cache (EMFormatCache *efc)
{
if (efc->valid)
- camel_cipher_validity_free(efc->valid);
+ camel_cipher_validity_free (efc->valid);
if (efc->secured)
g_object_unref (efc->secured);
- g_free(efc);
+ g_free (efc);
}
static EMFormatCache *
-emf_insert_cache(EMFormat *emf, const gchar *partid)
+emf_insert_cache (EMFormat *emf, const gchar *partid)
{
EMFormatCache *new;
- new = g_malloc0(sizeof(*new)+strlen(partid));
- strcpy(new->partid, partid);
- g_hash_table_insert(emf->inline_table, new->partid, new);
+ new = g_malloc0 (sizeof (*new)+strlen (partid));
+ strcpy (new->partid, partid);
+ g_hash_table_insert (emf->inline_table, new->partid, new);
return new;
}
@@ -103,10 +103,10 @@ emf_clone_inlines (gpointer key, gpointer val, gpointer data)
{
EMFormatCache *emfc = val, *new;
- new = emf_insert_cache((EMFormat *)data, emfc->partid);
+ new = emf_insert_cache ((EMFormat *)data, emfc->partid);
new->state = emfc->state;
if (emfc->valid)
- new->valid = camel_cipher_validity_clone(emfc->valid);
+ new->valid = camel_cipher_validity_clone (emfc->valid);
if (emfc->secured)
g_object_ref ((new->secured = emfc->secured));
}
@@ -149,12 +149,12 @@ emf_finalize (GObject *object)
g_hash_table_destroy (emf->inline_table);
- em_format_clear_headers(emf);
- camel_cipher_validity_free(emf->valid);
- g_free(emf->charset);
+ em_format_clear_headers (emf);
+ camel_cipher_validity_free (emf->valid);
+ g_free (emf->charset);
g_free (emf->default_charset);
- g_string_free(emf->part_id, TRUE);
- g_free(emf->uid);
+ g_string_free (emf->part_id, TRUE);
+ g_free (emf->uid);
if (emf->pending_uri_table != NULL)
g_hash_table_destroy (emf->pending_uri_table);
@@ -177,7 +177,7 @@ static const EMFormatHandler *
emf_find_handler (EMFormat *emf,
const gchar *mime_type)
{
- EMFormatClass *emfc = (EMFormatClass *)G_OBJECT_GET_CLASS(emf);
+ EMFormatClass *emfc = (EMFormatClass *)G_OBJECT_GET_CLASS (emf);
return g_hash_table_lookup (emfc->type_handlers, mime_type);
}
@@ -195,22 +195,22 @@ emf_format_clone (EMFormat *emf,
emf->priv->redraw_idle_id = 0;
}
- em_format_clear_puri_tree(emf);
+ em_format_clear_puri_tree (emf);
if (emf != emfsource) {
- g_hash_table_remove_all(emf->inline_table);
+ g_hash_table_remove_all (emf->inline_table);
if (emfsource) {
GList *link;
/* We clone the current state here */
- g_hash_table_foreach(emfsource->inline_table, emf_clone_inlines, emf);
+ g_hash_table_foreach (emfsource->inline_table, emf_clone_inlines, emf);
emf->mode = emfsource->mode;
- g_free(emf->charset);
- emf->charset = g_strdup(emfsource->charset);
+ g_free (emf->charset);
+ emf->charset = g_strdup (emfsource->charset);
g_free (emf->default_charset);
emf->default_charset = g_strdup (emfsource->default_charset);
- em_format_clear_headers(emf);
+ em_format_clear_headers (emf);
link = g_queue_peek_head_link (&emfsource->header_list);
while (link != NULL) {
@@ -231,8 +231,8 @@ emf_format_clone (EMFormat *emf,
}
if (uid != emf->uid) {
- g_free(emf->uid);
- emf->uid = g_strdup(uid);
+ g_free (emf->uid);
+ emf->uid = g_strdup (uid);
}
if (msg != emf->message) {
@@ -243,7 +243,7 @@ emf_format_clone (EMFormat *emf,
emf->message = msg;
}
- g_string_truncate(emf->part_id, 0);
+ g_string_truncate (emf->part_id, 0);
if (folder != NULL)
/* TODO build some string based on the folder name/location? */
g_string_append_printf(emf->part_id, ".%p", (gpointer) folder);
@@ -267,16 +267,16 @@ emf_format_secure (EMFormat *emf,
if (emf->valid == NULL) {
emf->valid = valid;
} else {
- camel_dlist_addtail(&emf->valid_parent->children, (CamelDListNode *)valid);
- camel_cipher_validity_envelope(emf->valid_parent, valid);
+ camel_dlist_addtail (&emf->valid_parent->children, (CamelDListNode *)valid);
+ camel_cipher_validity_envelope (emf->valid_parent, valid);
}
emf->valid_parent = valid;
len = emf->part_id->len;
g_string_append_printf(emf->part_id, ".secured");
- em_format_part(emf, stream, part);
- g_string_truncate(emf->part_id, len);
+ em_format_part (emf, stream, part);
+ g_string_truncate (emf->part_id, len);
emf->valid_parent = save;
}
@@ -365,7 +365,7 @@ emf_init (EMFormat *emf)
emf->composer = FALSE;
emf->print = FALSE;
g_queue_init (&emf->header_list);
- em_format_default_headers(emf);
+ em_format_default_headers (emf);
emf->part_id = g_string_new("");
emf->validity_found = 0;
@@ -424,8 +424,8 @@ void
em_format_class_add_handler (EMFormatClass *emfc,
EMFormatHandler *info)
{
- info->old = g_hash_table_lookup(emfc->type_handlers, info->mime_type);
- g_hash_table_insert(emfc->type_handlers, (gpointer) info->mime_type, info);
+ info->old = g_hash_table_lookup (emfc->type_handlers, info->mime_type);
+ g_hash_table_insert (emfc->type_handlers, (gpointer) info->mime_type, info);
}
struct _class_handlers {
@@ -448,10 +448,10 @@ merge_missing (gpointer key, gpointer value, gpointer userdata)
}
void
-em_format_merge_handler(EMFormat *new, EMFormat *old)
+em_format_merge_handler (EMFormat *new, EMFormat *old)
{
- EMFormatClass *oldc = (EMFormatClass *)G_OBJECT_GET_CLASS(old);
- EMFormatClass *newc = (EMFormatClass *)G_OBJECT_GET_CLASS(new);
+ EMFormatClass *oldc = (EMFormatClass *)G_OBJECT_GET_CLASS (old);
+ EMFormatClass *newc = (EMFormatClass *)G_OBJECT_GET_CLASS (new);
struct _class_handlers fclasses;
fclasses.old = oldc;
@@ -477,17 +477,17 @@ em_format_class_remove_handler (EMFormatClass *emfc,
/* TODO: thread issues? */
- current = g_hash_table_lookup(emfc->type_handlers, info->mime_type);
+ current = g_hash_table_lookup (emfc->type_handlers, info->mime_type);
if (current == info) {
current = info->old;
if (current)
- g_hash_table_insert(emfc->type_handlers, (gpointer) current->mime_type, current);
+ g_hash_table_insert (emfc->type_handlers, (gpointer) current->mime_type, current);
else
- g_hash_table_remove(emfc->type_handlers, info->mime_type);
+ g_hash_table_remove (emfc->type_handlers, info->mime_type);
} else {
while (current && current->old != info)
current = current->old;
- g_return_if_fail(current != NULL);
+ g_return_if_fail (current != NULL);
current->old = info->old;
}
}
@@ -533,18 +533,18 @@ em_format_fallback_handler (EMFormat *emf,
{
gchar *mime, *s;
- s = strchr(mime_type, '/');
+ s = strchr (mime_type, '/');
if (s == NULL)
mime = (gchar *)mime_type;
else {
gsize len = (s-mime_type)+1;
- mime = g_alloca(len+2);
- strncpy(mime, mime_type, len);
+ mime = g_alloca (len+2);
+ strncpy (mime, mime_type, len);
strcpy(mime+len, "*");
}
- return em_format_find_handler(emf, mime);
+ return em_format_find_handler (emf, mime);
}
/**
@@ -583,20 +583,20 @@ em_format_add_puri (EMFormat *emf,
d(printf("adding puri for part: %s\n", emf->part_id->str));
- if (size < sizeof(*puri)) {
+ if (size < sizeof (*puri)) {
g_warning (
"size (%" G_GSIZE_FORMAT
") less than size of puri\n", size);
size = sizeof (*puri);
}
- puri = g_malloc0(size);
+ puri = g_malloc0 (size);
puri->format = emf;
puri->func = func;
puri->use_count = 0;
- puri->cid = g_strdup(cid);
- puri->part_id = g_strdup(emf->part_id->str);
+ puri->cid = g_strdup (cid);
+ puri->part_id = g_strdup (emf->part_id->str);
if (part) {
g_object_ref (part);
@@ -604,7 +604,7 @@ em_format_add_puri (EMFormat *emf,
}
if (part != NULL && cid == NULL) {
- tmp = camel_mime_part_get_content_id(part);
+ tmp = camel_mime_part_get_content_id (part);
if (tmp)
puri->cid = g_strdup_printf("cid:%s", tmp);
else
@@ -614,20 +614,20 @@ em_format_add_puri (EMFormat *emf,
/* Not quite same as old behaviour, it also put in the
* relative uri and a fallback for no parent uri. */
- tmp = camel_mime_part_get_content_location(part);
+ tmp = camel_mime_part_get_content_location (part);
puri->uri = NULL;
if (tmp == NULL) {
/* No location, don't set a uri at all,
* html parts do this themselves. */
} else {
- if (strchr(tmp, ':') == NULL && emf->base != NULL) {
+ if (strchr (tmp, ':') == NULL && emf->base != NULL) {
CamelURL *uri;
- uri = camel_url_new_with_base(emf->base, tmp);
- puri->uri = camel_url_to_string(uri, 0);
- camel_url_free(uri);
+ uri = camel_url_new_with_base (emf->base, tmp);
+ puri->uri = camel_url_to_string (uri, 0);
+ camel_url_free (uri);
} else {
- puri->uri = g_strdup(tmp);
+ puri->uri = g_strdup (tmp);
}
}
}
@@ -805,38 +805,38 @@ em_format_part_as (EMFormat *emf,
This is actually only required for html, but, *shrug* */
tmp = camel_medium_get_header((CamelMedium *)part, "Content-Base");
if (tmp == NULL) {
- tmp = camel_mime_part_get_content_location(part);
- if (tmp && strchr(tmp, ':') == NULL)
+ tmp = camel_mime_part_get_content_location (part);
+ if (tmp && strchr (tmp, ':') == NULL)
tmp = NULL;
} else {
- tmp = basestr = camel_header_location_decode(tmp);
+ tmp = basestr = camel_header_location_decode (tmp);
}
d(printf("content-base is '%s'\n", tmp?tmp:"<unset>"));
if (tmp
- && (base = camel_url_new(tmp, NULL))) {
+ && (base = camel_url_new (tmp, NULL))) {
emf->base = base;
d(printf("Setting content base '%s'\n", tmp));
}
- g_free(basestr);
+ g_free (basestr);
if (mime_type != NULL) {
gboolean is_fallback = FALSE;
if (g_ascii_strcasecmp(mime_type, "application/octet-stream") == 0) {
- emf->snoop_mime_type = mime_type = em_format_snoop_type(part);
+ emf->snoop_mime_type = mime_type = em_format_snoop_type (part);
if (mime_type == NULL)
mime_type = "application/octet-stream";
}
- handle = em_format_find_handler(emf, mime_type);
+ handle = em_format_find_handler (emf, mime_type);
if (handle == NULL) {
- handle = em_format_fallback_handler(emf, mime_type);
+ handle = em_format_fallback_handler (emf, mime_type);
is_fallback = TRUE;
}
if (handle != NULL
- && !em_format_is_attachment(emf, part)) {
+ && !em_format_is_attachment (emf, part)) {
d(printf("running handler for type '%s'\n", mime_type));
- handle->handler(emf, stream, part, handle, is_fallback);
+ handle->handler (emf, stream, part, handle, is_fallback);
goto finish;
}
d(printf("this type is an attachment? '%s'\n", mime_type));
@@ -852,7 +852,7 @@ finish:
emf->snoop_mime_type = snoop_save;
if (base)
- camel_url_free(base);
+ camel_url_free (base);
}
void
@@ -976,16 +976,16 @@ void
em_format_set_charset (EMFormat *emf,
const gchar *charset)
{
- if ((emf->charset && charset && g_ascii_strcasecmp(emf->charset, charset) == 0)
+ if ((emf->charset && charset && g_ascii_strcasecmp (emf->charset, charset) == 0)
|| (emf->charset == NULL && charset == NULL)
|| (emf->charset == charset))
return;
- g_free(emf->charset);
- emf->charset = g_strdup(charset);
+ g_free (emf->charset);
+ emf->charset = g_strdup (charset);
if (emf->message)
- em_format_queue_redraw(emf);
+ em_format_queue_redraw (emf);
}
/**
@@ -1002,13 +1002,13 @@ em_format_set_default_charset (EMFormat *emf,
const gchar *charset)
{
if ((emf->default_charset && charset &&
- g_ascii_strcasecmp(emf->default_charset, charset) == 0)
+ g_ascii_strcasecmp (emf->default_charset, charset) == 0)
|| (emf->default_charset == NULL && charset == NULL)
|| (emf->default_charset == charset))
return;
- g_free(emf->default_charset);
- emf->default_charset = g_strdup(charset);
+ g_free (emf->default_charset);
+ emf->default_charset = g_strdup (charset);
if (emf->message && emf->charset == NULL)
em_format_queue_redraw (emf);
@@ -1085,9 +1085,9 @@ em_format_add_header (EMFormat *emf,
{
EMFormatHeader *h;
- h = g_malloc(sizeof(*h) + strlen(name));
+ h = g_malloc (sizeof (*h) + strlen (name));
h->flags = flags;
- strcpy(h->name, name);
+ strcpy (h->name, name);
g_queue_push_tail (&emf->header_list, h);
}
@@ -1125,7 +1125,7 @@ em_format_is_attachment (EMFormat *emf,
|| camel_content_type_is(dw->mime_type, "application", "x-inlinepgp-encrypted")
|| camel_content_type_is(dw->mime_type, "x-evolution", "evolution-rss-feed")
|| (camel_content_type_is (dw->mime_type, "text", "*")
- && camel_mime_part_get_filename(part) == NULL));
+ && camel_mime_part_get_filename (part) == NULL));
}
/**
@@ -1182,9 +1182,9 @@ em_format_set_inline (EMFormat *emf,
g_return_if_fail (EM_IS_FORMAT (emf));
g_return_if_fail (part_id != NULL);
- emfc = g_hash_table_lookup(emf->inline_table, part_id);
+ emfc = g_hash_table_lookup (emf->inline_table, part_id);
if (emfc == NULL) {
- emfc = emf_insert_cache(emf, part_id);
+ emfc = emf_insert_cache (emf, part_id);
} else if (emfc->state != INLINE_UNSET && (emfc->state & 1) == state)
return;
@@ -1302,9 +1302,9 @@ em_format_format_content (EMFormat *emf,
CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)part);
if (camel_content_type_is (dw->mime_type, "text", "*"))
- em_format_format_text(emf, stream, (CamelDataWrapper *)part);
+ em_format_format_text (emf, stream, (CamelDataWrapper *)part);
else
- camel_data_wrapper_decode_to_stream(dw, stream, NULL);
+ camel_data_wrapper_decode_to_stream (dw, stream, NULL);
}
/**
@@ -1342,18 +1342,18 @@ em_format_format_text (EMFormat *emf,
* out windows-cp125#, do some simple sanity checking
* before we move on... */
- null = camel_stream_null_new();
+ null = camel_stream_null_new ();
filter_stream = camel_stream_filter_new (null);
g_object_unref (null);
- windows = (CamelMimeFilterWindows *)camel_mime_filter_windows_new(charset);
+ windows = (CamelMimeFilterWindows *)camel_mime_filter_windows_new (charset);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filter_stream),
CAMEL_MIME_FILTER (windows));
camel_data_wrapper_decode_to_stream (
dw, (CamelStream *)filter_stream, NULL);
- camel_stream_flush((CamelStream *)filter_stream, NULL);
+ camel_stream_flush ((CamelStream *)filter_stream, NULL);
g_object_unref (filter_stream);
charset = camel_mime_filter_windows_real_charset (windows);
@@ -1388,13 +1388,13 @@ em_format_format_text (EMFormat *emf,
(CamelDataWrapper *) dw :
camel_medium_get_content ((CamelMedium *)dw),
(CamelStream *)filter_stream, NULL);
- camel_stream_flush((CamelStream *)filter_stream, NULL);
+ camel_stream_flush ((CamelStream *)filter_stream, NULL);
g_object_unref (filter_stream);
camel_stream_reset (mem_stream, NULL);
if (max == -1 || size == -1 || size < (max * 1024) || emf->composer) {
- camel_stream_write_to_stream(mem_stream, (CamelStream *)stream, NULL);
- camel_stream_flush((CamelStream *)stream, NULL);
+ camel_stream_write_to_stream (mem_stream, (CamelStream *)stream, NULL);
+ camel_stream_flush ((CamelStream *)stream, NULL);
} else {
EM_FORMAT_GET_CLASS (emf)->format_optional (
emf, stream, (CamelMimePart *)dw, mem_stream);
@@ -1480,7 +1480,7 @@ emf_application_xpkcs7mime (EMFormat *emf,
GError *local_error = NULL;
/* should this perhaps run off a key of ".secured" ? */
- emfc = g_hash_table_lookup(emf->inline_table, emf->part_id->str);
+ emfc = g_hash_table_lookup (emf->inline_table, emf->part_id->str);
if (emfc && emfc->valid) {
em_format_format_secure (
emf, stream, emfc->secured,
@@ -1488,14 +1488,14 @@ emf_application_xpkcs7mime (EMFormat *emf,
return;
}
- context = camel_smime_context_new(emf->session);
+ context = camel_smime_context_new (emf->session);
emf->validity_found |=
EM_FORMAT_VALIDITY_FOUND_ENCRYPTED |
EM_FORMAT_VALIDITY_FOUND_SMIME;
- opart = camel_mime_part_new();
- valid = camel_cipher_decrypt(context, part, opart, &local_error);
+ opart = camel_mime_part_new ();
+ valid = camel_cipher_decrypt (context, part, opart, &local_error);
if (valid == NULL) {
em_format_format_error (
emf, stream, "%s",
@@ -1503,16 +1503,16 @@ emf_application_xpkcs7mime (EMFormat *emf,
_("Could not parse S/MIME message: Unknown error"));
g_clear_error (&local_error);
- em_format_part_as(emf, stream, part, NULL);
+ em_format_part_as (emf, stream, part, NULL);
} else {
if (emfc == NULL)
- emfc = emf_insert_cache(emf, emf->part_id->str);
+ emfc = emf_insert_cache (emf, emf->part_id->str);
- emfc->valid = camel_cipher_validity_clone(valid);
+ emfc->valid = camel_cipher_validity_clone (valid);
g_object_ref ((emfc->secured = opart));
add_validity_found (emf, valid);
- em_format_format_secure(emf, stream, opart, valid);
+ em_format_format_secure (emf, stream, opart, valid);
}
g_object_unref (opart);
@@ -1532,20 +1532,20 @@ emf_multipart_appledouble (EMFormat *emf,
CamelMimePart *mime_part;
gint len;
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
+ if (!CAMEL_IS_MULTIPART (mp)) {
+ em_format_format_source (emf, stream, part);
return;
}
- mime_part = camel_multipart_get_part(mp, 1);
+ mime_part = camel_multipart_get_part (mp, 1);
if (mime_part) {
/* try the data fork for something useful, doubtful but who knows */
len = emf->part_id->len;
g_string_append_printf(emf->part_id, ".appledouble.1");
- em_format_part(emf, stream, mime_part);
- g_string_truncate(emf->part_id, len);
+ em_format_part (emf, stream, mime_part);
+ g_string_truncate (emf->part_id, len);
} else
- em_format_format_source(emf, stream, part);
+ em_format_format_source (emf, stream, part);
}
@@ -1560,18 +1560,18 @@ emf_multipart_mixed (EMFormat *emf,
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
gint i, nparts, len;
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
+ if (!CAMEL_IS_MULTIPART (mp)) {
+ em_format_format_source (emf, stream, part);
return;
}
len = emf->part_id->len;
- nparts = camel_multipart_get_number(mp);
+ nparts = camel_multipart_get_number (mp);
for (i = 0; i < nparts; i++) {
- part = camel_multipart_get_part(mp, i);
+ part = camel_multipart_get_part (mp, i);
g_string_append_printf(emf->part_id, ".mixed.%d", i);
- em_format_part(emf, stream, part);
- g_string_truncate(emf->part_id, len);
+ em_format_part (emf, stream, part);
+ g_string_truncate (emf->part_id, len);
}
}
@@ -1587,19 +1587,19 @@ emf_multipart_alternative (EMFormat *emf,
gint i, nparts, bestid = 0;
CamelMimePart *best = NULL;
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
+ if (!CAMEL_IS_MULTIPART (mp)) {
+ em_format_format_source (emf, stream, part);
return;
}
/* as per rfc, find the last part we know how to display */
- nparts = camel_multipart_get_number(mp);
+ nparts = camel_multipart_get_number (mp);
for (i = 0; i < nparts; i++) {
CamelContentType *type;
gchar *mime_type;
/* is it correct to use the passed in *part here? */
- part = camel_multipart_get_part(mp, i);
+ part = camel_multipart_get_part (mp, i);
if (!part || !camel_mime_part_get_content_size (part))
continue;
@@ -1619,17 +1619,17 @@ emf_multipart_alternative (EMFormat *emf,
bestid = i;
}
- g_free(mime_type);
+ g_free (mime_type);
}
if (best) {
gint len = emf->part_id->len;
g_string_append_printf(emf->part_id, ".alternative.%d", bestid);
- em_format_part(emf, stream, best);
- g_string_truncate(emf->part_id, len);
+ em_format_part (emf, stream, best);
+ g_string_truncate (emf->part_id, len);
} else
- emf_multipart_mixed(emf, stream, part, info, is_fallback);
+ emf_multipart_mixed (emf, stream, part, info, is_fallback);
}
static void
@@ -1648,7 +1648,7 @@ emf_multipart_encrypted (EMFormat *emf,
GError *local_error = NULL;
/* should this perhaps run off a key of ".secured" ? */
- emfc = g_hash_table_lookup(emf->inline_table, emf->part_id->str);
+ emfc = g_hash_table_lookup (emf->inline_table, emf->part_id->str);
if (emfc && emfc->valid) {
em_format_format_secure (
emf, stream, emfc->secured,
@@ -1657,7 +1657,7 @@ emf_multipart_encrypted (EMFormat *emf,
}
mpe = (CamelMultipartEncrypted*)camel_medium_get_content ((CamelMedium *)part);
- if (!CAMEL_IS_MULTIPART_ENCRYPTED(mpe)) {
+ if (!CAMEL_IS_MULTIPART_ENCRYPTED (mpe)) {
em_format_format_error (
emf, stream, _("Could not parse MIME message. "
"Displaying as source."));
@@ -1679,9 +1679,9 @@ emf_multipart_encrypted (EMFormat *emf,
EM_FORMAT_VALIDITY_FOUND_ENCRYPTED |
EM_FORMAT_VALIDITY_FOUND_PGP;
- context = camel_gpg_context_new(emf->session);
- opart = camel_mime_part_new();
- valid = camel_cipher_decrypt(context, part, opart, &local_error);
+ context = camel_gpg_context_new (emf->session);
+ opart = camel_mime_part_new ();
+ valid = camel_cipher_decrypt (context, part, opart, &local_error);
if (valid == NULL) {
em_format_format_error (
emf, stream, local_error->message ?
@@ -1695,13 +1695,13 @@ emf_multipart_encrypted (EMFormat *emf,
em_format_part_as(emf, stream, part, "multipart/mixed");
} else {
if (emfc == NULL)
- emfc = emf_insert_cache(emf, emf->part_id->str);
+ emfc = emf_insert_cache (emf, emf->part_id->str);
- emfc->valid = camel_cipher_validity_clone(valid);
+ emfc->valid = camel_cipher_validity_clone (valid);
g_object_ref ((emfc->secured = opart));
add_validity_found (emf, valid);
- em_format_format_secure(emf, stream, opart, valid);
+ em_format_format_secure (emf, stream, opart, valid);
}
/* TODO: Make sure when we finalize this part, it is zero'd out */
@@ -1734,16 +1734,16 @@ emf_multipart_related (EMFormat *emf,
gchar *oldpartid;
GList *link;
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
+ if (!CAMEL_IS_MULTIPART (mp)) {
+ em_format_format_source (emf, stream, part);
return;
}
/* FIXME: put this stuff in a shared function */
- nparts = camel_multipart_get_number(mp);
- content_type = camel_mime_part_get_content_type(part);
+ nparts = camel_multipart_get_number (mp);
+ content_type = camel_mime_part_get_content_type (part);
start = camel_content_type_param (content_type, "start");
- if (start && strlen(start)>2) {
+ if (start && strlen (start)>2) {
gint len;
const gchar *cid;
@@ -1752,32 +1752,32 @@ emf_multipart_related (EMFormat *emf,
start++;
for (i=0; i<nparts; i++) {
- body_part = camel_multipart_get_part(mp, i);
- cid = camel_mime_part_get_content_id(body_part);
+ body_part = camel_multipart_get_part (mp, i);
+ cid = camel_mime_part_get_content_id (body_part);
- if (cid && !strncmp(cid, start, len) && strlen(cid) == len) {
+ if (cid && !strncmp (cid, start, len) && strlen (cid) == len) {
display_part = body_part;
displayid = i;
break;
}
}
} else {
- display_part = camel_multipart_get_part(mp, 0);
+ display_part = camel_multipart_get_part (mp, 0);
}
if (display_part == NULL) {
- emf_multipart_mixed(emf, stream, part, info, is_fallback);
+ emf_multipart_mixed (emf, stream, part, info, is_fallback);
return;
}
- em_format_push_level(emf);
+ em_format_push_level (emf);
- oldpartid = g_strdup(emf->part_id->str);
+ oldpartid = g_strdup (emf->part_id->str);
partidlen = emf->part_id->len;
/* queue up the parts for possible inclusion */
for (i = 0; i < nparts; i++) {
- body_part = camel_multipart_get_part(mp, i);
+ body_part = camel_multipart_get_part (mp, i);
if (body_part != display_part) {
EMFormatPURI *puri;
@@ -1786,15 +1786,15 @@ emf_multipart_related (EMFormat *emf,
puri = em_format_add_puri (
emf, sizeof (EMFormatPURI), NULL,
body_part, emf_write_related);
- g_string_truncate(emf->part_id, partidlen);
+ g_string_truncate (emf->part_id, partidlen);
d(printf(" part '%s' '%s' added\n", puri->uri?puri->uri:"", puri->cid));
}
}
g_string_append_printf(emf->part_id, ".related.%d", displayid);
- em_format_part(emf, stream, display_part);
- g_string_truncate(emf->part_id, partidlen);
- camel_stream_flush(stream, NULL);
+ em_format_part (emf, stream, display_part);
+ g_string_truncate (emf->part_id, partidlen);
+ camel_stream_flush (stream, NULL);
link = g_queue_peek_head_link (emf->pending_uri_level->data);
@@ -1804,7 +1804,7 @@ emf_multipart_related (EMFormat *emf,
if (puri->use_count == 0) {
if (puri->func == emf_write_related) {
g_string_printf(emf->part_id, "%s", puri->part_id);
- em_format_part(emf, stream, puri->part);
+ em_format_part (emf, stream, puri->part);
}
}
@@ -1812,9 +1812,9 @@ emf_multipart_related (EMFormat *emf,
}
g_string_printf(emf->part_id, "%s", oldpartid);
- g_free(oldpartid);
+ g_free (oldpartid);
- em_format_pull_level(emf);
+ em_format_pull_level (emf);
}
static void
@@ -1830,7 +1830,7 @@ emf_multipart_signed (EMFormat *emf,
EMFormatCache *emfc;
/* should this perhaps run off a key of ".secured" ? */
- emfc = g_hash_table_lookup(emf->inline_table, emf->part_id->str);
+ emfc = g_hash_table_lookup (emf->inline_table, emf->part_id->str);
if (emfc && emfc->valid) {
em_format_format_secure (
emf, stream, emfc->secured,
@@ -1845,7 +1845,7 @@ emf_multipart_signed (EMFormat *emf,
em_format_format_error (
emf, stream, _("Could not parse MIME message. "
"Displaying as source."));
- em_format_format_source(emf, stream, part);
+ em_format_format_source (emf, stream, part);
return;
}
@@ -1855,12 +1855,12 @@ emf_multipart_signed (EMFormat *emf,
#ifdef ENABLE_SMIME
if (g_ascii_strcasecmp("application/x-pkcs7-signature", mps->protocol) == 0
|| g_ascii_strcasecmp("application/pkcs7-signature", mps->protocol) == 0) {
- cipher = camel_smime_context_new(emf->session);
+ cipher = camel_smime_context_new (emf->session);
emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_SMIME;
} else
#endif
if (g_ascii_strcasecmp("application/pgp-signature", mps->protocol) == 0) {
- cipher = camel_gpg_context_new(emf->session);
+ cipher = camel_gpg_context_new (emf->session);
emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_PGP;
}
}
@@ -1874,7 +1874,7 @@ emf_multipart_signed (EMFormat *emf,
CamelCipherValidity *valid;
GError *local_error = NULL;
- valid = camel_cipher_verify(cipher, part, &local_error);
+ valid = camel_cipher_verify (cipher, part, &local_error);
if (valid == NULL) {
em_format_format_error (
emf, stream, local_error->message ?
@@ -1889,13 +1889,13 @@ emf_multipart_signed (EMFormat *emf,
em_format_part_as(emf, stream, part, "multipart/mixed");
} else {
if (emfc == NULL)
- emfc = emf_insert_cache(emf, emf->part_id->str);
+ emfc = emf_insert_cache (emf, emf->part_id->str);
- emfc->valid = camel_cipher_validity_clone(valid);
+ emfc->valid = camel_cipher_validity_clone (valid);
g_object_ref ((emfc->secured = cpart));
add_validity_found (emf, valid);
- em_format_format_secure(emf, stream, cpart, valid);
+ em_format_format_secure (emf, stream, cpart, valid);
}
g_object_unref (cipher);
@@ -1982,8 +1982,8 @@ emf_message_rfc822 (EMFormat *emf,
const EMFormatHandler *handle;
gint len;
- if (!CAMEL_IS_MIME_MESSAGE(dw)) {
- em_format_format_source(emf, stream, part);
+ if (!CAMEL_IS_MIME_MESSAGE (dw)) {
+ em_format_format_source (emf, stream, part);
return;
}
@@ -1992,9 +1992,9 @@ emf_message_rfc822 (EMFormat *emf,
handle = em_format_find_handler(emf, "x-evolution/message/rfc822");
if (handle)
- handle->handler(emf, stream, (CamelMimePart *)dw, handle, FALSE);
+ handle->handler (emf, stream, (CamelMimePart *)dw, handle, FALSE);
- g_string_truncate(emf->part_id, len);
+ g_string_truncate (emf->part_id, len);
}
static void
@@ -2032,9 +2032,9 @@ emf_inlinepgp_signed (EMFormat *emf,
emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_SIGNED | EM_FORMAT_VALIDITY_FOUND_PGP;
- cipher = camel_gpg_context_new(emf->session);
+ cipher = camel_gpg_context_new (emf->session);
/* Verify the signature of the message */
- valid = camel_cipher_verify(cipher, ipart, &local_error);
+ valid = camel_cipher_verify (cipher, ipart, &local_error);
if (!valid) {
em_format_format_error (
emf, stream, local_error->message ?
@@ -2043,7 +2043,7 @@ emf_inlinepgp_signed (EMFormat *emf,
if (local_error->message)
em_format_format_error (
emf, stream, "%s", local_error->message);
- em_format_format_source(emf, stream, ipart);
+ em_format_format_source (emf, stream, ipart);
/* I think this will loop: em_format_part_as(emf, stream, part, "text/plain"); */
g_clear_error (&local_error);
g_object_unref (cipher);
@@ -2051,11 +2051,11 @@ emf_inlinepgp_signed (EMFormat *emf,
}
/* Setup output stream */
- ostream = camel_stream_mem_new();
+ ostream = camel_stream_mem_new ();
filtered_stream = camel_stream_filter_new (ostream);
/* Add PGP header / footer filter */
- pgp_filter = (CamelMimeFilterPgp *)camel_mime_filter_pgp_new();
+ pgp_filter = (CamelMimeFilterPgp *)camel_mime_filter_pgp_new ();
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filtered_stream),
CAMEL_MIME_FILTER (pgp_filter));
@@ -2065,7 +2065,7 @@ emf_inlinepgp_signed (EMFormat *emf,
dw = camel_medium_get_content ((CamelMedium *)ipart);
camel_data_wrapper_decode_to_stream (
dw, (CamelStream *)filtered_stream, NULL);
- camel_stream_flush((CamelStream *)filtered_stream, NULL);
+ camel_stream_flush ((CamelStream *)filtered_stream, NULL);
g_object_unref (filtered_stream);
/* Create a new text/plain MIME part containing the signed
@@ -2093,7 +2093,7 @@ emf_inlinepgp_signed (EMFormat *emf,
add_validity_found (emf, valid);
/* Pass it off to the real formatter */
- em_format_format_secure(emf, stream, opart, valid);
+ em_format_format_secure (emf, stream, opart, valid);
/* Clean Up */
g_object_unref (dw);
@@ -2120,8 +2120,8 @@ emf_inlinepgp_encrypted (EMFormat *emf,
EM_FORMAT_VALIDITY_FOUND_ENCRYPTED |
EM_FORMAT_VALIDITY_FOUND_PGP;
- cipher = camel_gpg_context_new(emf->session);
- opart = camel_mime_part_new();
+ cipher = camel_gpg_context_new (emf->session);
+ opart = camel_mime_part_new ();
/* Decrypt the message */
valid = camel_cipher_decrypt (cipher, ipart, opart, &local_error);
if (!valid) {
@@ -2133,7 +2133,7 @@ emf_inlinepgp_encrypted (EMFormat *emf,
else
em_format_format_error (
emf, stream, _("Unknown error"));
- em_format_format_source(emf, stream, ipart);
+ em_format_format_source (emf, stream, ipart);
/* I think this will loop: em_format_part_as(emf, stream, part, "text/plain"); */
g_clear_error (&local_error);
@@ -2157,7 +2157,7 @@ emf_inlinepgp_encrypted (EMFormat *emf,
add_validity_found (emf, valid);
/* Pass it off to the real formatter */
- em_format_format_secure(emf, stream, opart, valid);
+ em_format_format_secure (emf, stream, opart, valid);
/* Clean Up */
g_object_unref (opart);
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 5b5c8d0bab..3bc822cf0b 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -278,7 +278,7 @@ mail_backend_quit_requested_cb (EShell *shell,
return;
/* In express mode, don't raise mail request in non mail window. */
- if (e_shell_get_express_mode(shell) &&
+ if (e_shell_get_express_mode (shell) &&
strcmp(e_shell_window_get_active_view((EShellWindow *)window), "mail") != 0)
return;
diff --git a/mail/e-mail-browser.h b/mail/e-mail-browser.h
index e097691bef..4b1c3ebe87 100644
--- a/mail/e-mail-browser.h
+++ b/mail/e-mail-browser.h
@@ -66,7 +66,7 @@ void e_mail_browser_close (EMailBrowser *browser);
gboolean e_mail_browser_get_show_deleted (EMailBrowser *browser);
void e_mail_browser_set_show_deleted (EMailBrowser *browser,
gboolean show_deleted);
-EFocusTracker * e_mail_browser_get_focus_tracker(EMailBrowser *browser);
+EFocusTracker * e_mail_browser_get_focus_tracker (EMailBrowser *browser);
GtkUIManager * e_mail_browser_get_ui_manager (EMailBrowser *browser);
G_END_DECLS
diff --git a/mail/e-mail-message-pane.c b/mail/e-mail-message-pane.c
index 5936cd8240..1c1ccf2c12 100644
--- a/mail/e-mail-message-pane.c
+++ b/mail/e-mail-message-pane.c
@@ -48,8 +48,8 @@ mail_message_pane_constructed (GObject *object)
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_mail_message_pane_parent_class)->constructed (object);
- gtk_widget_hide (e_mail_reader_get_message_list (E_MAIL_READER(object)));
- e_mail_paned_view_hide_message_list_pane (E_MAIL_PANED_VIEW(object), FALSE);
+ gtk_widget_hide (e_mail_reader_get_message_list (E_MAIL_READER (object)));
+ e_mail_paned_view_hide_message_list_pane (E_MAIL_PANED_VIEW (object), FALSE);
}
static gboolean
@@ -98,7 +98,7 @@ e_mail_message_pane_new (EShellView *shell_view)
E_TYPE_MAIL_MESSAGE_PANE,
"shell-view", shell_view, NULL);
- e_mail_paned_view_set_enable_show_folder (E_MAIL_PANED_VIEW(widget), TRUE);
+ e_mail_paned_view_set_enable_show_folder (E_MAIL_PANED_VIEW (widget), TRUE);
return widget;
}
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 03b441b577..4208b380aa 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -353,7 +353,7 @@ em_update_accounts_2_11 (void)
#endif /* !G_OS_WIN32 */
static gboolean
-emm_setup_initial(const gchar *data_dir)
+emm_setup_initial (const gchar *data_dir)
{
GDir *dir;
const gchar *d;
@@ -366,8 +366,8 @@ emm_setup_initial(const gchar *data_dir)
d(printf("Setting up initial mail tree\n"));
base = g_build_filename(data_dir, "local", NULL);
- if (g_mkdir_with_parents(base, 0700) == -1 && errno != EEXIST) {
- g_free(base);
+ if (g_mkdir_with_parents (base, 0700) == -1 && errno != EEXIST) {
+ g_free (base);
return FALSE;
}
@@ -386,23 +386,23 @@ emm_setup_initial(const gchar *data_dir)
/* Make sure we found one. */
g_return_val_if_fail (*language_names != NULL, FALSE);
- dir = g_dir_open(local, 0, NULL);
+ dir = g_dir_open (local, 0, NULL);
if (dir) {
- while ((d = g_dir_read_name(dir))) {
+ while ((d = g_dir_read_name (dir))) {
gchar *src, *dest;
- src = g_build_filename(local, d, NULL);
- dest = g_build_filename(base, d, NULL);
+ src = g_build_filename (local, d, NULL);
+ dest = g_build_filename (base, d, NULL);
- cp(src, dest, FALSE, CP_UNIQUE);
- g_free(dest);
- g_free(src);
+ cp (src, dest, FALSE, CP_UNIQUE);
+ g_free (dest);
+ g_free (src);
}
- g_dir_close(dir);
+ g_dir_close (dir);
}
- g_free(local);
- g_free(base);
+ g_free (local);
+ g_free (base);
return TRUE;
}
@@ -562,7 +562,7 @@ migrate_folders (CamelStore *store,
if (folder != NULL)
camel_folder_summary_migrate_infos (folder->summary);
- migrate_folders(store, is_local, fi->child, acc, done, nth_folder, total_folders);
+ migrate_folders (store, is_local, fi->child, acc, done, nth_folder, total_folders);
fi = fi->next;
}
@@ -595,11 +595,11 @@ setup_local_store (EShellBackend *shell_backend,
url = camel_url_new("mbox:", NULL);
data_dir = e_shell_backend_get_data_dir (shell_backend);
tmp = g_build_filename (data_dir, "local", NULL);
- camel_url_set_path(url, tmp);
- g_free(tmp);
- tmp = camel_url_to_string(url, 0);
- store = (CamelStore *)camel_session_get_service(CAMEL_SESSION (session), tmp, CAMEL_PROVIDER_STORE, NULL);
- g_free(tmp);
+ camel_url_set_path (url, tmp);
+ g_free (tmp);
+ tmp = camel_url_to_string (url, 0);
+ store = (CamelStore *)camel_session_get_service (CAMEL_SESSION (session), tmp, CAMEL_PROVIDER_STORE, NULL);
+ g_free (tmp);
return store;
}
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c
index 41cab950bc..1bab909ef2 100644
--- a/mail/e-mail-notebook-view.c
+++ b/mail/e-mail-notebook-view.c
@@ -174,8 +174,8 @@ fix_height_cb (ClutterActor *actor,
GtkWidget *embed = (GtkWidget *)g_object_get_data ((GObject *)actor, "embed");
ClutterActor *stage = g_object_get_data ((GObject *)actor, "stage");
- clutter_actor_set_height (stage, clutter_actor_get_height(actor));
- gtk_widget_set_size_request (embed, -1, (gint) clutter_actor_get_height(actor));
+ clutter_actor_set_height (stage, clutter_actor_get_height (actor));
+ gtk_widget_set_size_request (embed, -1, (gint) clutter_actor_get_height (actor));
}
static void
@@ -262,7 +262,7 @@ mnv_tab_closed_cb (ClutterTimeline *timeline,
struct _tab_data *data)
{
EMailView *page = g_object_get_data ((GObject *)data->tab, "page");
- const gchar *folder_uri = e_mail_reader_get_folder_uri (E_MAIL_READER(page));
+ const gchar *folder_uri = e_mail_reader_get_folder_uri (E_MAIL_READER (page));
EMailView *prev;
gint num;
@@ -333,11 +333,11 @@ tab_remove_gtk_cb (GtkWidget *button,
EMailNotebookView *view)
{
EMailView *page = g_object_get_data ((GObject *)button, "page");
- const gchar *folder_uri = e_mail_reader_get_folder_uri (E_MAIL_READER(page));
+ const gchar *folder_uri = e_mail_reader_get_folder_uri (E_MAIL_READER (page));
EMailView *prev;
gint num;
- if (gtk_notebook_get_n_pages(view->priv->book) == 1)
+ if (gtk_notebook_get_n_pages (view->priv->book) == 1)
return;
if (E_IS_MAIL_FOLDER_PANE (page))
@@ -366,7 +366,7 @@ create_tab_label (EMailNotebookView *view,
widget = gtk_label_new (str);
gtk_widget_show (widget);
- gtk_box_pack_start (GTK_BOX(container), widget, TRUE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (container), widget, TRUE, FALSE, 0);
widget = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (widget), GTK_RELIEF_NONE);
@@ -374,7 +374,7 @@ create_tab_label (EMailNotebookView *view,
GTK_BUTTON (widget), gtk_image_new_from_stock (
"gtk-close", GTK_ICON_SIZE_MENU));
gtk_widget_show_all (widget);
- gtk_box_pack_end (GTK_BOX(container), widget, FALSE, FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (container), widget, FALSE, FALSE, 0);
g_object_set_data ((GObject *)widget, "page", page);
g_object_set_data ((GObject *)page, "close-button", widget);
@@ -399,7 +399,7 @@ create_gtk_actor (GtkWidget *vbox)
gtk_container_add (GTK_CONTAINER (bin), vbox);
gtk_widget_show (bin);
- gtk_widget_show(vbox);
+ gtk_widget_show (vbox);
return gtk_actor;
}
@@ -438,7 +438,7 @@ create_under_clutter (GtkWidget *widget, GtkWidget *paned)
g_signal_connect (
paned, "size-allocate",
G_CALLBACK (fix_clutter_embed_width), actor);
- clutter_actor_show(stage);
+ clutter_actor_show (stage);
return embed;
}
@@ -460,15 +460,15 @@ mail_notebook_view_constructed (GObject *object)
priv = E_MAIL_NOTEBOOK_VIEW (object)->priv;
- container = GTK_WIDGET(object);
+ container = GTK_WIDGET (object);
#if HAVE_CLUTTER
widget = gtk_clutter_embed_new ();
gtk_widget_show (widget);
- gtk_box_pack_start (GTK_BOX(container), widget, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
stage = gtk_clutter_embed_get_stage ((GtkClutterEmbed *)widget);
- clutter_actor_show(stage);
+ clutter_actor_show (stage);
clutter_actor_set_reactive (stage, TRUE);
priv->tab_picker = (EMailTabPicker *)e_mail_tab_picker_new ();
@@ -484,7 +484,7 @@ mail_notebook_view_constructed (GObject *object)
G_CALLBACK (tab_picker_preview_mode_notify), object);
g_signal_connect (
priv->tab_picker, "notify::height",
- G_CALLBACK(fix_height_cb), widget);
+ G_CALLBACK (fix_height_cb), widget);
clutter_container_add_actor (
(ClutterContainer *) stage,
@@ -497,7 +497,7 @@ mail_notebook_view_constructed (GObject *object)
g_signal_connect (
object, "size-allocate",
- G_CALLBACK(fix_tab_picker_width), priv->tab_picker);
+ G_CALLBACK (fix_tab_picker_width), priv->tab_picker);
clutter_actor_set_height (
stage, clutter_actor_get_height (
@@ -517,7 +517,7 @@ mail_notebook_view_constructed (GObject *object)
e_mail_tab_set_can_close (tab, TRUE);
e_mail_tab_picker_add_tab (priv->tab_picker, tab, -1);
- clutter_actor_show((ClutterActor *)tab);
+ clutter_actor_show ((ClutterActor *)tab);
e_mail_tab_picker_set_current_tab (priv->tab_picker, 0);
e_mail_tab_enable_drag (tab, TRUE);
@@ -541,7 +541,7 @@ mail_notebook_view_constructed (GObject *object)
priv->actor = g_object_get_data((GObject *)priv->embed, "actor");
priv->stage = g_object_get_data((GObject *)priv->actor, "stage");
#else
- gtk_box_pack_start (GTK_BOX(container), widget, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
#endif
#if HAVE_CLUTTER
@@ -576,7 +576,7 @@ mail_notebook_view_set_property (GObject *object,
switch (property_id) {
case PROP_GROUP_BY_THREADS:
e_mail_reader_set_group_by_threads (
- E_MAIL_READER(E_MAIL_NOTEBOOK_VIEW(object)->priv->current_view),
+ E_MAIL_READER (E_MAIL_NOTEBOOK_VIEW (object)->priv->current_view),
g_value_get_boolean (value));
return;
}
@@ -595,7 +595,7 @@ mail_notebook_view_get_property (GObject *object,
g_value_set_boolean (
value,
e_mail_reader_get_group_by_threads (
- E_MAIL_READER(E_MAIL_NOTEBOOK_VIEW(object)->priv->current_view)));
+ E_MAIL_READER (E_MAIL_NOTEBOOK_VIEW (object)->priv->current_view)));
return;
}
@@ -745,7 +745,7 @@ mail_notebook_view_get_formatter (EMailReader *reader)
if (priv->current_view == NULL)
return NULL;
- return e_mail_reader_get_formatter (E_MAIL_READER(priv->current_view));
+ return e_mail_reader_get_formatter (E_MAIL_READER (priv->current_view));
}
static gboolean
@@ -866,15 +866,15 @@ mail_netbook_view_open_mail (EMailView *view,
pos = emnv_get_page_num (nview, GTK_WIDGET (priv->current_view));
pane = e_mail_message_pane_new (shell_view);
e_mail_view_set_previous_view (pane, priv->current_view);
- E_MAIL_MESSAGE_PANE(pane)->parent_folder_view = priv->current_view;
+ E_MAIL_MESSAGE_PANE (pane)->parent_folder_view = priv->current_view;
priv->current_view = pane;
gtk_widget_show (GTK_WIDGET (pane));
- preview = e_mail_paned_view_get_preview (E_MAIL_PANED_VIEW(pane));
+ preview = e_mail_paned_view_get_preview (E_MAIL_PANED_VIEW (pane));
- folder = e_mail_reader_get_folder (E_MAIL_READER(view));
- folder_uri = e_mail_reader_get_folder_uri (E_MAIL_READER(view));
+ folder = e_mail_reader_get_folder (E_MAIL_READER (view));
+ folder_uri = e_mail_reader_get_folder_uri (E_MAIL_READER (view));
info = camel_folder_get_message_info (folder, uid);
@@ -884,7 +884,7 @@ mail_netbook_view_open_mail (EMailView *view,
camel_message_info_subject (info)), pos + 1);
#if HAVE_CLUTTER
- mlist = e_mail_reader_get_message_list (E_MAIL_READER(pane));
+ mlist = e_mail_reader_get_message_list (E_MAIL_READER (pane));
mnv_set_current_tab (nview, page);
g_object_set_data ((GObject *)priv->current_view, "stage", priv->stage);
g_object_set_data ((GObject *)mlist, "stage", priv->stage);
@@ -894,13 +894,13 @@ mail_netbook_view_open_mail (EMailView *view,
#endif
#if HAVE_CLUTTER
- tab = (EMailTab *)e_mail_tab_new_full (camel_message_info_subject(info), NULL, 1);
+ tab = (EMailTab *)e_mail_tab_new_full (camel_message_info_subject (info), NULL, 1);
g_object_set_data ((GObject *)tab, "page", pane);
g_object_set_data ((GObject *)pane, "tab", tab);
- clutter_actor_show((ClutterActor *)tab);
+ clutter_actor_show ((ClutterActor *)tab);
- clone = e_mail_tab_new_full (camel_message_info_subject(info), NULL, 200);
+ clone = e_mail_tab_new_full (camel_message_info_subject (info), NULL, 200);
clutter_actor_set_reactive (clone, FALSE);
clutter_actor_show (clone);
@@ -936,9 +936,9 @@ mail_netbook_view_open_mail (EMailView *view,
E_MAIL_READER (pane), folder, folder_uri);
e_mail_reader_set_group_by_threads (
E_MAIL_READER (pane),
- e_mail_reader_get_group_by_threads (E_MAIL_READER(view)));
+ e_mail_reader_get_group_by_threads (E_MAIL_READER (view)));
- e_mail_reader_enable_show_folder (E_MAIL_READER(pane));
+ e_mail_reader_enable_show_folder (E_MAIL_READER (pane));
e_mail_reader_set_message (E_MAIL_READER (pane), uid);
camel_message_info_free (info);
}
@@ -956,7 +956,7 @@ build_histogram (GtkWidget *widget, CamelFolder *folder)
cairo_t *cr;
gfloat ratio;
gint x = 0;
- time_t now = time(NULL);
+ time_t now = time (NULL);
GtkStyle *style;
GdkColor *color;
@@ -1022,7 +1022,7 @@ build_histogram (GtkWidget *widget, CamelFolder *folder)
cairo_fill (cr);
cairo_restore (cr);
- cairo_destroy(cr);
+ cairo_destroy (cr);
return texture;
}
@@ -1062,7 +1062,7 @@ mail_notebook_view_set_folder (EMailReader *reader,
priv->current_view = (EMailView *)new_view;
#if HAVE_CLUTTER
- mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW(reader), curr);
+ mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW (reader), curr);
#else
gtk_notebook_set_current_page (priv->book, curr);
#endif
@@ -1094,7 +1094,7 @@ mail_notebook_view_set_folder (EMailReader *reader,
priv->current_view,
camel_folder_get_full_name (folder)));
#if HAVE_CLUTTER
- mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW(reader), page);
+ mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW (reader), page);
#else
gtk_notebook_set_current_page (priv->book, page);
#endif
@@ -1107,12 +1107,12 @@ mail_notebook_view_set_folder (EMailReader *reader,
priv->tab_picker)),
FALSE);
- tab = (EMailTab *)e_mail_tab_new_full (camel_folder_get_full_name(folder), NULL, 1);
+ tab = (EMailTab *)e_mail_tab_new_full (camel_folder_get_full_name (folder), NULL, 1);
g_object_set_data ((GObject *)tab, "page", priv->current_view);
g_object_set_data ((GObject *)priv->current_view, "page", tab);
g_object_set_data ((GObject *)priv->current_view, "tab", tab);
- clutter_actor_show((ClutterActor *)tab);
+ clutter_actor_show ((ClutterActor *)tab);
clone = build_histogram ((GtkWidget *)reader, folder);
clutter_actor_set_reactive (clone, FALSE);
@@ -1142,18 +1142,18 @@ mail_notebook_view_set_folder (EMailReader *reader,
} else {
priv->inited = TRUE;
gtk_notebook_set_tab_label (priv->book, (GtkWidget *)priv->current_view,
- create_tab_label (E_MAIL_NOTEBOOK_VIEW(reader),
+ create_tab_label (E_MAIL_NOTEBOOK_VIEW (reader),
priv->current_view,
camel_folder_get_full_name (folder)));
#if HAVE_CLUTTER
- tab = e_mail_tab_picker_get_tab(priv->tab_picker,
+ tab = e_mail_tab_picker_get_tab (priv->tab_picker,
e_mail_tab_picker_get_current_tab (priv->tab_picker));
g_object_set_data ((GObject *)tab, "page", priv->current_view);
g_object_set_data ((GObject *)priv->current_view, "page", tab);
g_object_set_data ((GObject *)priv->current_view, "tab", tab);
- e_mail_tab_set_text (tab, camel_folder_get_full_name(folder));
+ e_mail_tab_set_text (tab, camel_folder_get_full_name (folder));
clone = build_histogram ((GtkWidget *)reader, folder);
clutter_actor_set_reactive (clone, FALSE);
clutter_actor_show (clone);
@@ -1161,7 +1161,7 @@ mail_notebook_view_set_folder (EMailReader *reader,
#endif
}
- list = e_mail_reader_get_message_list (E_MAIL_READER(priv->current_view));
+ list = e_mail_reader_get_message_list (E_MAIL_READER (priv->current_view));
#if HAVE_CLUTTER
g_signal_connect (tab , "closed",
G_CALLBACK (mnv_tab_closed), reader);
@@ -1170,8 +1170,8 @@ mail_notebook_view_set_folder (EMailReader *reader,
g_object_set_data ((GObject *)list, "actor", priv->actor);
#endif
- e_mail_reader_set_folder (E_MAIL_READER(priv->current_view), folder, folder_uri);
- g_hash_table_insert (priv->views, g_strdup(folder_uri), priv->current_view);
+ e_mail_reader_set_folder (E_MAIL_READER (priv->current_view), folder, folder_uri);
+ g_hash_table_insert (priv->views, g_strdup (folder_uri), priv->current_view);
g_signal_connect (
priv->current_view, "changed",
G_CALLBACK (reconnect_changed_event), reader);
@@ -1207,7 +1207,7 @@ mail_notebook_view_enable_show_folder (EMailReader *reader)
if (!priv->current_view)
return FALSE;
- return e_mail_reader_get_enable_show_folder (E_MAIL_READER(priv->current_view));
+ return e_mail_reader_get_enable_show_folder (E_MAIL_READER (priv->current_view));
}
static guint
@@ -1293,7 +1293,7 @@ emnv_show_folder (EMailNotebookView *view, gpointer not_used)
#if HAVE_CLUTTER
e_mail_tab_picker_set_current_tab (priv->tab_picker, pos);
- mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW(view), pos);
+ mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW (view), pos);
#else
gtk_notebook_set_current_page (priv->book, pos);
#endif
@@ -1314,7 +1314,7 @@ emnv_show_prevtab (EMailNotebookView *view, gpointer not_used)
pos = e_mail_tab_picker_get_current_tab (priv->tab_picker);
if (pos > 0) {
e_mail_tab_picker_set_current_tab (priv->tab_picker, pos-1);
- mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW(view), pos-1);
+ mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW (view), pos-1);
}
#else
pos = gtk_notebook_get_current_page (priv->book);
@@ -1335,7 +1335,7 @@ emnv_show_nexttab (EMailNotebookView *view, gpointer not_used)
if (pos < (gtk_notebook_get_n_pages (priv->book)-1)) {
e_mail_tab_picker_set_current_tab (priv->tab_picker, pos+1);
- mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW(view), pos+1);
+ mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW (view), pos+1);
}
#else
pos = gtk_notebook_get_current_page (priv->book);
diff --git a/mail/e-mail-pane.c b/mail/e-mail-pane.c
index e58a645eec..ca25d817cd 100644
--- a/mail/e-mail-pane.c
+++ b/mail/e-mail-pane.c
@@ -40,7 +40,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
static void
e_mail_pane_init (EMailPane *shell)
{
- shell->priv = g_new0(EMailPanePrivate, 1);
+ shell->priv = g_new0 (EMailPanePrivate, 1);
}
static void
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index a7bddfebd2..8317898dd6 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -391,7 +391,7 @@ e_mail_reader_reply_to_message (EMailReader *reader,
uid = MESSAGE_LIST (message_list)->cursor_uid;
g_return_if_fail (uid != NULL);
- if (!gtk_widget_get_mapped (GTK_WIDGET(web_view)))
+ if (!gtk_widget_get_mapped (GTK_WIDGET (web_view)))
goto whole_message;
if (src_message == NULL) {
@@ -710,7 +710,7 @@ headers_changed_cb (GConfClient *client,
client, "/apps/evolution/mail/display/headers",
GCONF_VALUE_STRING, NULL);
em_format_clear_headers (EM_FORMAT (formatter));
- for (p = header_config_list; p; p = g_slist_next(p)) {
+ for (p = header_config_list; p; p = g_slist_next (p)) {
EMailReaderHeader *h;
gchar *xml = (gchar *)p->data;
diff --git a/mail/e-mail-reader.h b/mail/e-mail-reader.h
index dbd47e10e7..b93b411f98 100644
--- a/mail/e-mail-reader.h
+++ b/mail/e-mail-reader.h
@@ -123,7 +123,7 @@ GtkActionGroup *
EMFormatHTML * e_mail_reader_get_formatter (EMailReader *reader);
gboolean e_mail_reader_get_hide_deleted (EMailReader *reader);
GtkWidget * e_mail_reader_get_message_list (EMailReader *reader);
-guint e_mail_reader_open_selected_mail(EMailReader *reader);
+guint e_mail_reader_open_selected_mail (EMailReader *reader);
GtkMenu * e_mail_reader_get_popup_menu (EMailReader *reader);
GPtrArray * e_mail_reader_get_selected_uids (EMailReader *reader);
EShellBackend * e_mail_reader_get_shell_backend (EMailReader *reader);
@@ -149,7 +149,7 @@ void e_mail_reader_create_charset_menu
void e_mail_reader_show_search_bar (EMailReader *reader);
gboolean e_mail_reader_get_enable_show_folder
(EMailReader *reader);
-void e_mail_reader_enable_show_folder(EMailReader *reader);
+void e_mail_reader_enable_show_folder (EMailReader *reader);
G_END_DECLS
diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c
index 6fd0c7ea82..a8c3afe6ec 100644
--- a/mail/e-mail-store.c
+++ b/mail/e-mail-store.c
@@ -55,7 +55,7 @@ struct _StoreInfo {
guint removed : 1;
};
-CamelStore *vfolder_store; /* XXX write a get() function for this */
+CamelStore *vfolder_store; /* XXX write a get () function for this */
static GHashTable *store_table;
static MailAsyncEvent *async_event;
diff --git a/mail/e-mail-view.h b/mail/e-mail-view.h
index 6c697bda44..af3f6c4eee 100644
--- a/mail/e-mail-view.h
+++ b/mail/e-mail-view.h
@@ -85,7 +85,7 @@ struct _EMailViewClass {
GType e_mail_view_get_type (void);
EShellView * e_mail_view_get_shell_view (EMailView *view);
-void e_mail_view_update_view_instance(EMailView *view);
+void e_mail_view_update_view_instance (EMailView *view);
GalViewInstance *
e_mail_view_get_view_instance (EMailView *view);
void e_mail_view_set_search_strings (EMailView *view,
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 923e1b0c87..3a3368c631 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -584,7 +584,7 @@ emae_load_text (GtkTextView *view, const gchar *filename)
gtk_text_buffer_insert (buffer, &iter, filebuf, count);
}
- gtk_text_view_set_buffer (GTK_TEXT_VIEW (view), GTK_TEXT_BUFFER(buffer));
+ gtk_text_view_set_buffer (GTK_TEXT_VIEW (view), GTK_TEXT_BUFFER (buffer));
fclose (fd);
}
@@ -1139,7 +1139,7 @@ emae_account_spinint_widget (EMAccountEditor *emae, GtkSpinButton *spin, gint it
g_signal_connect (
spin, "value-changed",
- G_CALLBACK(emae_account_spinint_changed), emae);
+ G_CALLBACK (emae_account_spinint_changed), emae);
}
#if 0
@@ -1332,17 +1332,17 @@ struct _provider_host_info {
};
static struct _provider_host_info emae_source_host_info[] = {
- { CAMEL_URL_PART_HOST, emae_url_set_hostport, { G_STRUCT_OFFSET(EMAccountEditorService, hostname), G_STRUCT_OFFSET(EMAccountEditorService, hostlabel), }, },
- { CAMEL_URL_PART_USER, camel_url_set_user, { G_STRUCT_OFFSET(EMAccountEditorService, username), G_STRUCT_OFFSET(EMAccountEditorService, userlabel), } },
- { CAMEL_URL_PART_PATH, camel_url_set_path, { G_STRUCT_OFFSET(EMAccountEditorService, path), G_STRUCT_OFFSET(EMAccountEditorService, pathlabel), G_STRUCT_OFFSET(EMAccountEditorService, pathentry) }, },
- { CAMEL_URL_PART_AUTH, NULL, { 0, G_STRUCT_OFFSET(EMAccountEditorService, auth_frame), }, },
+ { CAMEL_URL_PART_HOST, emae_url_set_hostport, { G_STRUCT_OFFSET (EMAccountEditorService, hostname), G_STRUCT_OFFSET (EMAccountEditorService, hostlabel), }, },
+ { CAMEL_URL_PART_USER, camel_url_set_user, { G_STRUCT_OFFSET (EMAccountEditorService, username), G_STRUCT_OFFSET (EMAccountEditorService, userlabel), } },
+ { CAMEL_URL_PART_PATH, camel_url_set_path, { G_STRUCT_OFFSET (EMAccountEditorService, path), G_STRUCT_OFFSET (EMAccountEditorService, pathlabel), G_STRUCT_OFFSET (EMAccountEditorService, pathentry) }, },
+ { CAMEL_URL_PART_AUTH, NULL, { 0, G_STRUCT_OFFSET (EMAccountEditorService, auth_frame), }, },
{ 0 },
};
static struct _provider_host_info emae_transport_host_info[] = {
- { CAMEL_URL_PART_HOST, emae_url_set_hostport, { G_STRUCT_OFFSET(EMAccountEditorService, hostname), G_STRUCT_OFFSET(EMAccountEditorService, hostlabel), }, },
- { CAMEL_URL_PART_USER, camel_url_set_user, { G_STRUCT_OFFSET(EMAccountEditorService, username), G_STRUCT_OFFSET(EMAccountEditorService, userlabel), } },
- { CAMEL_URL_PART_AUTH, NULL, { 0, G_STRUCT_OFFSET(EMAccountEditorService, auth_frame), }, },
+ { CAMEL_URL_PART_HOST, emae_url_set_hostport, { G_STRUCT_OFFSET (EMAccountEditorService, hostname), G_STRUCT_OFFSET (EMAccountEditorService, hostlabel), }, },
+ { CAMEL_URL_PART_USER, camel_url_set_user, { G_STRUCT_OFFSET (EMAccountEditorService, username), G_STRUCT_OFFSET (EMAccountEditorService, userlabel), } },
+ { CAMEL_URL_PART_AUTH, NULL, { 0, G_STRUCT_OFFSET (EMAccountEditorService, auth_frame), }, },
{ 0 },
};
@@ -1415,7 +1415,7 @@ emae_uri_changed (EMAccountEditorService *service, CamelURL *url)
/* small hack for providers which are store and transport - copy settings across */
if (service->type == CAMEL_PROVIDER_STORE
&& service->provider
- && CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT(service->provider))
+ && CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (service->provider))
e_account_set_string (account, E_ACCOUNT_TRANSPORT_URL, uri);
g_free (uri);
@@ -1577,12 +1577,12 @@ emae_service_provider_changed (EMAccountEditorService *service)
gint hide;
struct _provider_host_info *info = &emae_service_info[service->type].host_info[i];
- enable = CAMEL_PROVIDER_ALLOWS(service->provider, info->flag);
- hide = CAMEL_PROVIDER_HIDDEN(service->provider, info->flag);
+ enable = CAMEL_PROVIDER_ALLOWS (service->provider, info->flag);
+ hide = CAMEL_PROVIDER_HIDDEN (service->provider, info->flag);
show = (enable && !hide)?gtk_widget_show:gtk_widget_hide;
for (j=0; j < G_N_ELEMENTS (info->widgets); j++) {
- if (info->widgets[j] && (w = G_STRUCT_MEMBER(GtkWidget *, service, info->widgets[j]))) {
+ if (info->widgets[j] && (w = G_STRUCT_MEMBER (GtkWidget *, service, info->widgets[j]))) {
show (w);
if (j == 0) {
if (dwidget == NULL && enable)
@@ -1598,7 +1598,7 @@ emae_service_provider_changed (EMAccountEditorService *service)
if (dwidget)
gtk_widget_grab_focus (dwidget);
- if (CAMEL_PROVIDER_ALLOWS(service->provider, CAMEL_URL_PART_AUTH)) {
+ if (CAMEL_PROVIDER_ALLOWS (service->provider, CAMEL_URL_PART_AUTH)) {
GList *ll;
/* try to keep the authmech from the current url, or clear it */
@@ -1615,7 +1615,7 @@ emae_service_provider_changed (EMAccountEditorService *service)
}
emae_refresh_authtype (service->emae, service);
- if (service->needs_auth && !CAMEL_PROVIDER_NEEDS(service->provider, CAMEL_URL_PART_AUTH))
+ if (service->needs_auth && !CAMEL_PROVIDER_NEEDS (service->provider, CAMEL_URL_PART_AUTH))
gtk_widget_show ((GtkWidget *)service->needs_auth);
} else {
if (service->needs_auth)
@@ -2535,7 +2535,7 @@ emae_receive_options_item (EConfig *ec, EConfigItem *item, GtkWidget *parent, Gt
if (emae->type == EMAE_PAGES) {
GtkWidget *box = gtk_hbox_new (FALSE, 12);
gtk_widget_reparent (old, box);
- gtk_widget_show(box);
+ gtk_widget_show (box);
gtk_box_set_child_packing ((GtkBox *)box, old, TRUE, TRUE, 12, GTK_PACK_START);
gtk_box_pack_end ((GtkBox *)emae->pages[2], box, FALSE, FALSE, 0);
}
@@ -2545,7 +2545,7 @@ emae_receive_options_item (EConfig *ec, EConfigItem *item, GtkWidget *parent, Gt
if (emae->type == EMAE_PAGES) {
GtkWidget *box = gtk_hbox_new (FALSE, 12);
gtk_widget_reparent (parent, box);
- gtk_widget_show(box);
+ gtk_widget_show (box);
gtk_box_set_child_packing ((GtkBox *)box, parent, TRUE, TRUE, 12, GTK_PACK_START);
gtk_box_pack_start ((GtkBox *)emae->pages[2], box, FALSE, FALSE, 0);
}
@@ -2594,7 +2594,7 @@ emae_receive_options_extra_item (EConfig *ec, EConfigItem *eitem, GtkWidget *par
if (emae->type == EMAE_PAGES) {
GtkWidget *box = gtk_hbox_new (FALSE, 12);
gtk_widget_reparent (parent, box);
- gtk_widget_show(box);
+ gtk_widget_show (box);
gtk_box_set_child_packing ((GtkBox *)box, parent, TRUE, TRUE, 12, GTK_PACK_START);
gtk_box_pack_start ((GtkBox *)emae->pages[2], box, FALSE, FALSE, 0);
}
@@ -2718,7 +2718,7 @@ emae_send_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *ol
GtkBuilder *builder;
/* no transport options page at all for these types of providers */
- if (priv->source.provider && CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT(priv->source.provider)) {
+ if (priv->source.provider && CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (priv->source.provider)) {
memset (&priv->transport.frame, 0, ((gchar *)&priv->transport.check_dialog)-((gchar *)&priv->transport.frame));
return NULL;
}
@@ -3261,7 +3261,7 @@ emae_free_auto (EConfig *ec, GSList *items, gpointer data)
if (item->extra_table)
g_hash_table_destroy (item->extra_table);
g_free (item);
- g_slist_free_1(l);
+ g_slist_free_1 (l);
l = n;
}
}
@@ -3283,21 +3283,21 @@ emae_service_complete (EMAccountEditor *emae, EMAccountEditorService *service)
if (uri == NULL || (url = camel_url_new (uri, NULL)) == NULL)
return FALSE;
- if (CAMEL_PROVIDER_NEEDS(service->provider, CAMEL_URL_PART_HOST)) {
+ if (CAMEL_PROVIDER_NEEDS (service->provider, CAMEL_URL_PART_HOST)) {
if (url->host == NULL || url->host[0] == 0)
ok = FALSE;
}
/* We only need the user if the service needs auth as well, i think */
if (ok
&& (service->needs_auth == NULL
- || CAMEL_PROVIDER_NEEDS(service->provider, CAMEL_URL_PART_AUTH)
+ || CAMEL_PROVIDER_NEEDS (service->provider, CAMEL_URL_PART_AUTH)
|| gtk_toggle_button_get_active (service->needs_auth))
- && CAMEL_PROVIDER_NEEDS(service->provider, CAMEL_URL_PART_USER)
+ && CAMEL_PROVIDER_NEEDS (service->provider, CAMEL_URL_PART_USER)
&& (url->user == NULL || url->user[0] == 0))
ok = FALSE;
if (ok
- && CAMEL_PROVIDER_NEEDS(service->provider, CAMEL_URL_PART_PATH)
+ && CAMEL_PROVIDER_NEEDS (service->provider, CAMEL_URL_PART_PATH)
&& (url->path == NULL || url->path[0] == 0))
ok = FALSE;
@@ -3315,7 +3315,7 @@ enum {
static ServerData *
emae_check_servers (const gchar *email)
{
- gint len = G_N_ELEMENTS(mail_servers), i;
+ gint len = G_N_ELEMENTS (mail_servers), i;
gchar *server = strchr (email, '@');
server++;
@@ -3377,7 +3377,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data)
emae->priv->identity_set = 1;
#ifndef G_OS_WIN32
- uname = g_locale_to_utf8(g_get_real_name (), -1, NULL, NULL, NULL);
+ uname = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
#else
uname = g_strdup (g_get_real_name ());
#endif
@@ -3418,7 +3418,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data)
camel_url_set_param (url, "use_ssl", sdata->ssl);
camel_url_set_host (url, sdata->recv);
if (sdata->recv_port && *sdata->recv_port)
- camel_url_set_port (url, atoi(sdata->recv_port));
+ camel_url_set_port (url, atoi (sdata->recv_port));
gtk_entry_set_text (emae->priv->source.hostname, sdata->recv);
gtk_entry_set_text (emae->priv->transport.hostname, sdata->send);
} else {
@@ -3460,7 +3460,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data)
camel_url_set_param (url, "use_ssl", sdata->ssl);
camel_url_set_host (url, sdata->send);
if (sdata->send_port && *sdata->send_port)
- camel_url_set_port (url, atoi(sdata->send_port));
+ camel_url_set_port (url, atoi (sdata->send_port));
if (sdata->send_user && *sdata->send_user)
camel_url_set_user (url, sdata->send_user);
@@ -3474,7 +3474,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data)
if (sdata->send_auth && *sdata->send_auth)
emae_check_set_authtype (emae->priv->transport.authtype, sdata->send_auth);
else
- emae_authtype_changed(emae->priv->transport.authtype, &emae->priv->transport);
+ emae_authtype_changed (emae->priv->transport.authtype, &emae->priv->transport);
uri = (gchar *)e_account_get_string (account, E_ACCOUNT_TRANSPORT_URL);
}
}
@@ -3687,14 +3687,14 @@ em_account_editor_construct (EMAccountEditor *emae, EMAccountEditorType type, co
if (name && !strcmp (name, "mailcheck"))
myindex = 10;
- item = g_malloc0(sizeof (*item));
+ item = g_malloc0 (sizeof (*item));
item->item.type = E_CONFIG_SECTION_TABLE;
item->item.path = g_strdup_printf ("20.receive_options/%02d.%s", myindex, name?name:"unnamed");
item->item.label = g_strdup (entries[i].text);
l = g_slist_prepend (l, item);
- item = g_malloc0(sizeof (*item));
+ item = g_malloc0 (sizeof (*item));
item->item.type = E_CONFIG_ITEM_TABLE;
item->item.path = g_strdup_printf ("20.receive_options/%02d.%s/80.camelitem", myindex, name?name:"unnamed");
item->item.factory = emae_receive_options_extra_item;
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 82ba4bcd5c..52d3c7e99a 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -186,7 +186,7 @@ ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recip
else
res = TRUE;
- g_string_free(str, TRUE);
+ g_string_free (str, TRUE);
return res;
}
@@ -457,7 +457,7 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
* Since the e-plugin framework doesn't provide a way to return a value from the plugin,
* use 'presend_check_status' to set whether the check passed / failed.
*/
- eme = em_event_peek();
+ eme = em_event_peek ();
target = em_event_target_new_composer (eme, composer, 0);
g_object_set_data (G_OBJECT (composer), "presend_check_status", GINT_TO_POINTER(0));
@@ -624,7 +624,7 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
g_object_unref (sdi->composer);
if (sdi->emcs)
emcs_unref (sdi->emcs);
- camel_message_info_free(info);
+ camel_message_info_free (info);
g_free (sdi);
}
@@ -685,7 +685,7 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer)
table = e_msg_composer_get_header_table (composer);
account = e_composer_header_table_get_account (table);
- sdi = g_malloc (sizeof(struct _save_draft_info));
+ sdi = g_malloc (sizeof (struct _save_draft_info));
sdi->composer = g_object_ref (composer);
sdi->emcs = g_object_get_data (G_OBJECT (composer), "emcs");
if (sdi->emcs)
@@ -700,11 +700,11 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer)
if (!folder || !account->enabled) {
if (e_alert_run_dialog_for_args ((GtkWindow *)composer, "mail:ask-default-drafts", NULL) != GTK_RESPONSE_YES) {
- g_object_unref(composer);
+ g_object_unref (composer);
g_object_unref (msg);
if (sdi->emcs)
- emcs_unref(sdi->emcs);
- g_free(sdi);
+ emcs_unref (sdi->emcs);
+ g_free (sdi);
return;
}
@@ -716,8 +716,8 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer)
g_object_ref (folder);
}
- info = camel_message_info_new(NULL);
- camel_message_info_set_flags(info, CAMEL_MESSAGE_DRAFT | CAMEL_MESSAGE_SEEN, ~0);
+ info = camel_message_info_new (NULL);
+ camel_message_info_set_flags (info, CAMEL_MESSAGE_DRAFT | CAMEL_MESSAGE_SEEN, ~0);
mail_append_mail (folder, msg, info, save_draft_done, sdi);
g_object_unref (folder);
@@ -756,7 +756,7 @@ create_new_composer (EShell *shell,
if (from_uri != NULL) {
GList *list;
- account = mail_config_get_account_by_source_url(from_uri);
+ account = mail_config_get_account_by_source_url (from_uri);
list = g_list_prepend (NULL, (gpointer) from_uri);
e_composer_header_table_set_post_to_list (table, list);
@@ -821,7 +821,7 @@ em_utils_compose_new_message_with_mailto (EShell *shell,
table = e_msg_composer_get_header_table (composer);
if (from_uri
- && (account = mail_config_get_account_by_source_url(from_uri)))
+ && (account = mail_config_get_account_by_source_url (from_uri)))
e_composer_header_table_set_account_name (table, account->name);
composer_set_no_change (composer);
@@ -868,7 +868,7 @@ replace_variables (GSList *clues, CamelMimeMessage *message, gchar **pstr)
string_changed = TRUE;
} else
count1 = FALSE;
- g_strfreev(temp);
+ g_strfreev (temp);
}
if (!count1) {
@@ -1299,8 +1299,8 @@ forward_non_attached (EShell *shell,
composer = create_new_composer (shell, subject, from_uri);
if (composer) {
- if (CAMEL_IS_MULTIPART(camel_medium_get_content ((CamelMedium *)message)))
- e_msg_composer_add_message_attachments(composer, message, FALSE);
+ if (CAMEL_IS_MULTIPART (camel_medium_get_content ((CamelMedium *)message)))
+ e_msg_composer_add_message_attachments (composer, message, FALSE);
e_msg_composer_set_body_text (composer, text, len);
@@ -1604,10 +1604,10 @@ em_utils_redirect_message_by_uid (EShell *shell,
}
static void
-emu_handle_receipt_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, GError **error)
+emu_handle_receipt_message (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, GError **error)
{
if (msg)
- em_utils_handle_receipt(folder, uid, msg);
+ em_utils_handle_receipt (folder, uid, msg);
/* we dont care really if we can't get the message */
g_clear_error (error);
@@ -1621,7 +1621,7 @@ em_utils_handle_receipt (CamelFolder *folder, const gchar *uid, CamelMimeMessage
const gchar *addr;
CamelMessageInfo *info;
- info = camel_folder_get_message_info(folder, uid);
+ info = camel_folder_get_message_info (folder, uid);
if (info == NULL)
return;
@@ -1631,7 +1631,7 @@ em_utils_handle_receipt (CamelFolder *folder, const gchar *uid, CamelMimeMessage
}
if (msg == NULL) {
- mail_get_messagex(folder, uid, emu_handle_receipt_message, NULL, mail_msg_unordered_push);
+ mail_get_messagex (folder, uid, emu_handle_receipt_message, NULL, mail_msg_unordered_push);
camel_folder_free_message_info (folder, info);
return;
}
@@ -1650,13 +1650,13 @@ em_utils_handle_receipt (CamelFolder *folder, const gchar *uid, CamelMimeMessage
if (addr == NULL) {
addr = "";
} else {
- while (camel_mime_is_lwsp(*addr))
+ while (camel_mime_is_lwsp (*addr))
addr++;
}
if (account && (account->receipt_policy == E_ACCOUNT_RECEIPT_ALWAYS || account->receipt_policy == E_ACCOUNT_RECEIPT_ASK)
&& e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), "mail:ask-receipt", addr, camel_mime_message_get_subject(msg), NULL) == GTK_RESPONSE_YES)
- em_utils_send_receipt(folder, msg);
+ em_utils_send_receipt (folder, msg);
}
static void
@@ -1887,7 +1887,7 @@ reply_get_composer (EShell *shell,
g_free (subject);
/* add post-to, if nessecary */
- if (postto && camel_address_length((CamelAddress *)postto)) {
+ if (postto && camel_address_length ((CamelAddress *)postto)) {
gchar *store_url = NULL;
gchar *post;
@@ -1902,10 +1902,10 @@ reply_get_composer (EShell *shell,
store_url[strlen (store_url)-1] = '\0';
}
- post = camel_address_encode((CamelAddress *)postto);
+ post = camel_address_encode ((CamelAddress *)postto);
e_composer_header_table_set_post_to_base (
table, store_url ? store_url : "", post);
- g_free(post);
+ g_free (post);
g_free (store_url);
}
@@ -1965,14 +1965,14 @@ get_reply_list (CamelMimeMessage *message, CamelInternetAddress *to)
p++;
addr = g_strndup (header, p - header);
- camel_internet_address_add(to, NULL, addr);
+ camel_internet_address_add (to, NULL, addr);
g_free (addr);
return TRUE;
}
gboolean
-em_utils_is_munged_list_message(CamelMimeMessage *message)
+em_utils_is_munged_list_message (CamelMimeMessage *message)
{
CamelInternetAddress *reply_to, *list;
gboolean result = FALSE;
@@ -1982,12 +1982,12 @@ em_utils_is_munged_list_message(CamelMimeMessage *message)
list = camel_internet_address_new ();
if (get_reply_list (message, list) &&
- camel_address_length (CAMEL_ADDRESS(list)) == camel_address_length (CAMEL_ADDRESS(reply_to))) {
+ camel_address_length (CAMEL_ADDRESS (list)) == camel_address_length (CAMEL_ADDRESS (reply_to))) {
gint i;
const gchar *r_name, *r_addr;
const gchar *l_name, *l_addr;
- for (i = 0; i < camel_address_length (CAMEL_ADDRESS(list)); i++) {
+ for (i = 0; i < camel_address_length (CAMEL_ADDRESS (list)); i++) {
if (!camel_internet_address_get (reply_to, i, &r_name, &r_addr))
break;
if (!camel_internet_address_get (list, i, &l_name, &l_addr))
@@ -1995,7 +1995,7 @@ em_utils_is_munged_list_message(CamelMimeMessage *message)
if (strcmp (l_addr, r_addr))
break;
}
- if (i == camel_address_length (CAMEL_ADDRESS(list)))
+ if (i == camel_address_length (CAMEL_ADDRESS (list)))
result = TRUE;
}
g_object_unref (list);
@@ -2037,7 +2037,7 @@ get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to, CamelNNTP
if (postto
&& ((posthdr = camel_medium_get_header((CamelMedium *)message, "Followup-To"))
|| (posthdr = camel_medium_get_header((CamelMedium *)message, "Newsgroups")))) {
- camel_address_decode((CamelAddress *)postto, posthdr);
+ camel_address_decode ((CamelAddress *)postto, posthdr);
return;
}
@@ -2066,7 +2066,7 @@ get_reply_from (CamelMimeMessage *message, CamelInternetAddress *to, CamelNNTPAd
if (postto
&& ((posthdr = camel_medium_get_header((CamelMedium *)message, "Followup-To"))
|| (posthdr = camel_medium_get_header((CamelMedium *)message, "Newsgroups")))) {
- camel_address_decode((CamelAddress *)postto, posthdr);
+ camel_address_decode ((CamelAddress *)postto, posthdr);
return;
}
@@ -2103,14 +2103,14 @@ get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInterne
/* check whether there is a 'Newsgroups: ' header in there */
if (postto) {
if ((posthdr = camel_medium_get_header((CamelMedium *)message, "Followup-To")))
- camel_address_decode((CamelAddress *)postto, posthdr);
+ camel_address_decode ((CamelAddress *)postto, posthdr);
if ((posthdr = camel_medium_get_header((CamelMedium *)message, "Newsgroups")))
- camel_address_decode((CamelAddress *)postto, posthdr);
+ camel_address_decode ((CamelAddress *)postto, posthdr);
}
rcpt_hash = em_utils_generate_account_hash ();
- reply_to = get_reply_to(message);
+ reply_to = get_reply_to (message);
to_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
cc_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
@@ -2139,10 +2139,10 @@ get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInterne
}
/* if To: is still empty, may we removed duplicates (i.e. ourself), so add the original To if it was set */
- if (camel_address_length((CamelAddress *)to) == 0
- && (camel_internet_address_get(to_addrs, 0, &name, &addr)
- || camel_internet_address_get(cc_addrs, 0, &name, &addr))) {
- camel_internet_address_add(to, name, addr);
+ if (camel_address_length ((CamelAddress *)to) == 0
+ && (camel_internet_address_get (to_addrs, 0, &name, &addr)
+ || camel_internet_address_get (cc_addrs, 0, &name, &addr))) {
+ camel_internet_address_add (to, name, addr);
}
g_hash_table_destroy (rcpt_hash);
@@ -2375,7 +2375,7 @@ composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat *
break;
case MAIL_CONFIG_REPLY_OUTLOOK:
text = em_utils_message_to_html (message, _("-----Original Message-----"), EM_FORMAT_QUOTE_HEADERS, &len, source, start_bottom ? "<BR>" : NULL, &validity_found);
- e_msg_composer_set_body_text(composer, text, len);
+ e_msg_composer_set_body_text (composer, text, len);
g_free (text);
emu_update_composers_security (composer, validity_found);
break;
@@ -2386,7 +2386,7 @@ composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat *
credits = attribution_format (ATTRIBUTION, message);
text = em_utils_message_to_html (message, credits, EM_FORMAT_QUOTE_CITE, &len, source, start_bottom ? "<BR>" : NULL, &validity_found);
g_free (credits);
- e_msg_composer_set_body_text(composer, text, len);
+ e_msg_composer_set_body_text (composer, text, len);
g_free (text);
emu_update_composers_security (composer, validity_found);
break;
@@ -2439,8 +2439,8 @@ reply_to_message (CamelFolder *folder,
if (message != NULL) {
/* get_message_free() will also unref the message, so we need
- an extra ref for em_utils_reply_to_message() to drop. */
- g_object_ref(message);
+ an extra ref for em_utils_reply_to_message () to drop. */
+ g_object_ref (message);
em_utils_reply_to_message (
rd->shell, folder, uid, message, rd->mode, rd->source);
}
@@ -2490,13 +2490,13 @@ em_utils_reply_to_message (EShell *shell,
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
if (folder && uid && message == NULL) {
- struct _reply_data *rd = g_malloc0(sizeof(*rd));
+ struct _reply_data *rd = g_malloc0 (sizeof (*rd));
rd->shell = g_object_ref (shell);
rd->mode = mode;
rd->source = source;
if (rd->source)
- g_object_ref(rd->source);
+ g_object_ref (rd->source);
mail_get_message (
folder, uid, reply_to_message,
rd, mail_msg_unordered_push);
@@ -2504,10 +2504,10 @@ em_utils_reply_to_message (EShell *shell,
return NULL;
}
- g_return_val_if_fail(message != NULL, NULL);
+ g_return_val_if_fail (message != NULL, NULL);
- to = camel_internet_address_new();
- cc = camel_internet_address_new();
+ to = camel_internet_address_new ();
+ cc = camel_internet_address_new ();
account = em_utils_guess_account_with_recipients (message, folder);
flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_SEEN;
@@ -2515,13 +2515,13 @@ em_utils_reply_to_message (EShell *shell,
switch (mode) {
case REPLY_MODE_FROM:
if (folder)
- postto = camel_nntp_address_new();
+ postto = camel_nntp_address_new ();
get_reply_from (message, to, postto);
break;
case REPLY_MODE_SENDER:
if (folder)
- postto = camel_nntp_address_new();
+ postto = camel_nntp_address_new ();
get_reply_sender (message, to, postto);
break;
@@ -2533,9 +2533,9 @@ em_utils_reply_to_message (EShell *shell,
case REPLY_MODE_ALL:
flags |= CAMEL_MESSAGE_ANSWERED_ALL;
if (folder)
- postto = camel_nntp_address_new();
+ postto = camel_nntp_address_new ();
- get_reply_all(message, to, cc, postto);
+ get_reply_all (message, to, cc, postto);
break;
}
@@ -2550,7 +2550,7 @@ em_utils_reply_to_message (EShell *shell,
composer_set_body (composer, message, source);
- g_object_unref(message);
+ g_object_unref (message);
emcs = g_object_get_data (G_OBJECT (composer), "emcs");
emcs_set_folder_info (emcs, folder, uid, flags, flags);
diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
index 5bf6924898..f1bee560d4 100644
--- a/mail/em-composer-utils.h
+++ b/mail/em-composer-utils.h
@@ -63,7 +63,7 @@ void em_utils_forward_messages (EShell *shell,
const gchar *from_uri);
void em_utils_redirect_message (EShell *shell,
CamelMimeMessage *message);
-void em_utils_redirect_message_by_uid(EShell *shell,
+void em_utils_redirect_message_by_uid (EShell *shell,
CamelFolder *folder,
const gchar *uid);
void em_utils_forward_message_raw (CamelFolder *folder,
diff --git a/mail/em-config.c b/mail/em-config.c
index 4e9d52ce61..2ac286b85a 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -45,15 +45,15 @@ struct _EMConfigPrivate {
};
static void
-emp_init(GObject *o)
+emp_init (GObject *o)
{
EMConfig *emp = (EMConfig *)o;
- emp->priv = g_malloc0(sizeof(*emp->priv));
+ emp->priv = g_malloc0 (sizeof (*emp->priv));
}
static void
-emp_finalise(GObject *o)
+emp_finalise (GObject *o)
{
struct _EMConfigPrivate *p = ((EMConfig *)o)->priv;
@@ -61,13 +61,13 @@ emp_finalise(GObject *o)
* will need to be freed first which will clean up any
* listeners */
- g_free(p);
+ g_free (p);
- ((GObjectClass *)emp_parent)->finalize(o);
+ ((GObjectClass *)emp_parent)->finalize (o);
}
static void
-emp_target_free(EConfig *ep, EConfigTarget *t)
+emp_target_free (EConfig *ep, EConfigTarget *t)
{
if (ep->target == t) {
switch (t->type) {
@@ -81,7 +81,7 @@ emp_target_free(EConfig *ep, EConfigTarget *t)
EMConfigTargetAccount *s = (EMConfigTargetAccount *)t;
if (((EMConfig *)ep)->priv->account_changed_id) {
- g_signal_handler_disconnect(s->account, ((EMConfig *)ep)->priv->account_changed_id);
+ g_signal_handler_disconnect (s->account, ((EMConfig *)ep)->priv->account_changed_id);
((EMConfig *)ep)->priv->account_changed_id = 0;
}
break; }
@@ -92,35 +92,35 @@ emp_target_free(EConfig *ep, EConfigTarget *t)
case EM_CONFIG_TARGET_FOLDER: {
EMConfigTargetFolder *s = (EMConfigTargetFolder *)t;
- g_free(s->uri);
+ g_free (s->uri);
g_object_unref (s->folder);
break; }
case EM_CONFIG_TARGET_PREFS: {
EMConfigTargetPrefs *s = (EMConfigTargetPrefs *)t;
if (s->gconf)
- g_object_unref(s->gconf);
+ g_object_unref (s->gconf);
break; }
case EM_CONFIG_TARGET_ACCOUNT: {
EMConfigTargetAccount *s = (EMConfigTargetAccount *)t;
- g_object_unref(s->account);
+ g_object_unref (s->account);
break; }
}
- ((EConfigClass *)emp_parent)->target_free(ep, t);
+ ((EConfigClass *)emp_parent)->target_free (ep, t);
}
static void
-emp_account_changed(struct _EAccount *ea, gint id, EMConfig *emc)
+emp_account_changed (struct _EAccount *ea, gint id, EMConfig *emc)
{
- e_config_target_changed((EConfig *)emc, E_CONFIG_TARGET_CHANGED_STATE);
+ e_config_target_changed ((EConfig *)emc, E_CONFIG_TARGET_CHANGED_STATE);
}
static void
-emp_set_target(EConfig *ep, EConfigTarget *t)
+emp_set_target (EConfig *ep, EConfigTarget *t)
{
- ((EConfigClass *)emp_parent)->set_target(ep, t);
+ ((EConfigClass *)emp_parent)->set_target (ep, t);
if (t) {
switch (t->type) {
@@ -140,7 +140,7 @@ emp_set_target(EConfig *ep, EConfigTarget *t)
}
static void
-emp_class_init(GObjectClass *klass)
+emp_class_init (GObjectClass *klass)
{
klass->finalize = emp_finalise;
((EConfigClass *)klass)->set_target = emp_set_target;
@@ -148,41 +148,41 @@ emp_class_init(GObjectClass *klass)
}
GType
-em_config_get_type(void)
+em_config_get_type (void)
{
static GType type = 0;
if (type == 0) {
static const GTypeInfo info = {
- sizeof(EMConfigClass),
+ sizeof (EMConfigClass),
NULL, NULL,
(GClassInitFunc)emp_class_init,
NULL, NULL,
- sizeof(EMConfig), 0,
+ sizeof (EMConfig), 0,
(GInstanceInitFunc)emp_init
};
- emp_parent = g_type_class_ref(e_config_get_type());
+ emp_parent = g_type_class_ref (e_config_get_type ());
type = g_type_register_static(e_config_get_type(), "EMConfig", &info, 0);
}
return type;
}
-EMConfig *em_config_new(gint type, const gchar *menuid)
+EMConfig *em_config_new (gint type, const gchar *menuid)
{
- EMConfig *emp = g_object_new(em_config_get_type(), NULL);
+ EMConfig *emp = g_object_new (em_config_get_type (), NULL);
- e_config_construct(&emp->config, type, menuid);
+ e_config_construct (&emp->config, type, menuid);
return emp;
}
EMConfigTargetFolder *
-em_config_target_new_folder(EMConfig *emp, CamelFolder *folder, const gchar *uri)
+em_config_target_new_folder (EMConfig *emp, CamelFolder *folder, const gchar *uri)
{
- EMConfigTargetFolder *t = e_config_target_new(&emp->config, EM_CONFIG_TARGET_FOLDER, sizeof(*t));
+ EMConfigTargetFolder *t = e_config_target_new (&emp->config, EM_CONFIG_TARGET_FOLDER, sizeof (*t));
- t->uri = g_strdup(uri);
+ t->uri = g_strdup (uri);
t->folder = folder;
g_object_ref (folder);
@@ -190,24 +190,24 @@ em_config_target_new_folder(EMConfig *emp, CamelFolder *folder, const gchar *uri
}
EMConfigTargetPrefs *
-em_config_target_new_prefs(EMConfig *emp, struct _GConfClient *gconf)
+em_config_target_new_prefs (EMConfig *emp, struct _GConfClient *gconf)
{
- EMConfigTargetPrefs *t = e_config_target_new(&emp->config, EM_CONFIG_TARGET_PREFS, sizeof(*t));
+ EMConfigTargetPrefs *t = e_config_target_new (&emp->config, EM_CONFIG_TARGET_PREFS, sizeof (*t));
t->gconf = gconf;
if (gconf)
- g_object_ref(gconf);
+ g_object_ref (gconf);
return t;
}
EMConfigTargetAccount *
-em_config_target_new_account(EMConfig *emp, struct _EAccount *account)
+em_config_target_new_account (EMConfig *emp, struct _EAccount *account)
{
- EMConfigTargetAccount *t = e_config_target_new(&emp->config, EM_CONFIG_TARGET_ACCOUNT, sizeof(*t));
+ EMConfigTargetAccount *t = e_config_target_new (&emp->config, EM_CONFIG_TARGET_ACCOUNT, sizeof (*t));
t->account = account;
- g_object_ref(account);
+ g_object_ref (account);
return t;
}
diff --git a/mail/em-config.h b/mail/em-config.h
index 003498d2f6..b0493cd9cf 100644
--- a/mail/em-config.h
+++ b/mail/em-config.h
@@ -82,13 +82,13 @@ struct _EMConfigClass {
EConfigClass config_class;
};
-GType em_config_get_type(void);
+GType em_config_get_type (void);
-EMConfig *em_config_new(gint type, const gchar *menuid);
+EMConfig *em_config_new (gint type, const gchar *menuid);
-EMConfigTargetFolder *em_config_target_new_folder(EMConfig *emp, CamelFolder *folder, const gchar *uri);
-EMConfigTargetPrefs *em_config_target_new_prefs(EMConfig *emp, GConfClient *gconf);
-EMConfigTargetAccount *em_config_target_new_account(EMConfig *emp, EAccount *account);
+EMConfigTargetFolder *em_config_target_new_folder (EMConfig *emp, CamelFolder *folder, const gchar *uri);
+EMConfigTargetPrefs *em_config_target_new_prefs (EMConfig *emp, GConfClient *gconf);
+EMConfigTargetAccount *em_config_target_new_account (EMConfig *emp, EAccount *account);
G_END_DECLS
diff --git a/mail/em-event.c b/mail/em-event.c
index a84eb92264..187a1cb894 100644
--- a/mail/em-event.c
+++ b/mail/em-event.c
@@ -36,19 +36,19 @@ static GObjectClass *eme_parent;
static EMEvent *em_event;
static void
-eme_init(GObject *o)
+eme_init (GObject *o)
{
/*EMEvent *eme = (EMEvent *)o; */
}
static void
-eme_finalise(GObject *o)
+eme_finalise (GObject *o)
{
- ((GObjectClass *)eme_parent)->finalize(o);
+ ((GObjectClass *)eme_parent)->finalize (o);
}
static void
-eme_target_free(EEvent *ep, EEventTarget *t)
+eme_target_free (EEvent *ep, EEventTarget *t)
{
switch (t->type) {
case EM_EVENT_TARGET_FOLDER: {
@@ -66,7 +66,7 @@ eme_target_free(EEvent *ep, EEventTarget *t)
g_object_unref (s->folder);
if (s->message)
g_object_unref (s->message);
- g_free(s->uid);
+ g_free (s->uid);
if (s->composer)
g_object_unref (s->composer);
break; }
@@ -78,31 +78,31 @@ eme_target_free(EEvent *ep, EEventTarget *t)
break; }
}
- ((EEventClass *)eme_parent)->target_free(ep, t);
+ ((EEventClass *)eme_parent)->target_free (ep, t);
}
static void
-eme_class_init(GObjectClass *klass)
+eme_class_init (GObjectClass *klass)
{
klass->finalize = eme_finalise;
((EEventClass *)klass)->target_free = eme_target_free;
}
GType
-em_event_get_type(void)
+em_event_get_type (void)
{
static GType type = 0;
if (type == 0) {
static const GTypeInfo info = {
- sizeof(EMEventClass),
+ sizeof (EMEventClass),
NULL, NULL,
(GClassInitFunc)eme_class_init,
NULL, NULL,
- sizeof(EMEvent), 0,
+ sizeof (EMEvent), 0,
(GInstanceInitFunc)eme_init
};
- eme_parent = g_type_class_ref(e_event_get_type());
+ eme_parent = g_type_class_ref (e_event_get_type ());
type = g_type_register_static(e_event_get_type(), "EMEvent", &info, 0);
}
@@ -117,10 +117,10 @@ em_event_get_type(void)
*
* Return value:
**/
-EMEvent *em_event_peek(void)
+EMEvent *em_event_peek (void)
{
if (em_event == NULL) {
- em_event = g_object_new(em_event_get_type(), NULL);
+ em_event = g_object_new (em_event_get_type (), NULL);
e_event_construct(&em_event->popup, "org.gnome.evolution.mail.events");
}
@@ -130,7 +130,7 @@ EMEvent *em_event_peek(void)
EMEventTargetFolder *
em_event_target_new_folder (EMEvent *eme, const gchar *uri, guint new, const gchar *msg_uid, const gchar *msg_sender, const gchar *msg_subject)
{
- EMEventTargetFolder *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_FOLDER, sizeof(*t));
+ EMEventTargetFolder *t = e_event_target_new (&eme->popup, EM_EVENT_TARGET_FOLDER, sizeof (*t));
guint32 flags = new ? EM_EVENT_FOLDER_NEWMAIL : 0;
t->uri = g_strdup (uri);
@@ -146,18 +146,18 @@ em_event_target_new_folder (EMEvent *eme, const gchar *uri, guint new, const gch
EMEventTargetComposer *
em_event_target_new_composer (EMEvent *eme, const EMsgComposer *composer, guint32 flags)
{
- EMEventTargetComposer *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_COMPOSER, sizeof(*t));
+ EMEventTargetComposer *t = e_event_target_new (&eme->popup, EM_EVENT_TARGET_COMPOSER, sizeof (*t));
- t->composer = g_object_ref(G_OBJECT(composer));
+ t->composer = g_object_ref (G_OBJECT (composer));
t->target.mask = ~flags;
return t;
}
EMEventTargetMessage *
-em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags, EMsgComposer *composer)
+em_event_target_new_message (EMEvent *eme, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags, EMsgComposer *composer)
{
- EMEventTargetMessage *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_MESSAGE, sizeof(*t));
+ EMEventTargetMessage *t = e_event_target_new (&eme->popup, EM_EVENT_TARGET_MESSAGE, sizeof (*t));
t->uid = g_strdup (uid);
t->folder = folder;
@@ -168,15 +168,15 @@ em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage
g_object_ref (message);
t->target.mask = ~flags;
if (composer)
- t->composer = g_object_ref(G_OBJECT(composer));
+ t->composer = g_object_ref (G_OBJECT (composer));
return t;
}
EMEventTargetSendReceive *
-em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, gint row, guint32 flags)
+em_event_target_new_send_receive (EMEvent *eme, GtkWidget *table, gpointer data, gint row, guint32 flags)
{
- EMEventTargetSendReceive *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_SEND_RECEIVE, sizeof(*t));
+ EMEventTargetSendReceive *t = e_event_target_new (&eme->popup, EM_EVENT_TARGET_SEND_RECEIVE, sizeof (*t));
t->table = table;
t->data = data;
@@ -187,9 +187,9 @@ em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data,
}
EMEventTargetCustomIcon *
-em_event_target_new_custom_icon(EMEvent *eme, GtkTreeStore *store, GtkTreeIter *iter, const gchar *folder_name, guint32 flags)
+em_event_target_new_custom_icon (EMEvent *eme, GtkTreeStore *store, GtkTreeIter *iter, const gchar *folder_name, guint32 flags)
{
- EMEventTargetCustomIcon *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_CUSTOM_ICON, sizeof(*t));
+ EMEventTargetCustomIcon *t = e_event_target_new (&eme->popup, EM_EVENT_TARGET_CUSTOM_ICON, sizeof (*t));
t->store = store;
t->iter = iter;
diff --git a/mail/em-event.h b/mail/em-event.h
index de58d26bde..8f5a87f032 100644
--- a/mail/em-event.h
+++ b/mail/em-event.h
@@ -135,16 +135,16 @@ struct _EMEventClass {
EEventClass popup_class;
};
-GType em_event_get_type(void);
+GType em_event_get_type (void);
-EMEvent *em_event_peek(void);
+EMEvent *em_event_peek (void);
EMEventTargetFolder *em_event_target_new_folder (EMEvent *emp, const gchar *uri, guint32 count_new_msgs, const gchar *msg_uid, const gchar *msg_sender, const gchar *msg_subject);
-EMEventTargetComposer *em_event_target_new_composer(EMEvent *emp, const EMsgComposer *composer, guint32 flags);
-EMEventTargetMessage *em_event_target_new_message(EMEvent *emp, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags,
+EMEventTargetComposer *em_event_target_new_composer (EMEvent *emp, const EMsgComposer *composer, guint32 flags);
+EMEventTargetMessage *em_event_target_new_message (EMEvent *emp, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags,
EMsgComposer *composer);
-EMEventTargetSendReceive * em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, gint row, guint32 flags);
-EMEventTargetCustomIcon * em_event_target_new_custom_icon(EMEvent *eme, GtkTreeStore *store, GtkTreeIter *iter, const gchar *uri, guint32 flags);
+EMEventTargetSendReceive * em_event_target_new_send_receive (EMEvent *eme, GtkWidget *table, gpointer data, gint row, guint32 flags);
+EMEventTargetCustomIcon * em_event_target_new_custom_icon (EMEvent *eme, GtkTreeStore *store, GtkTreeIter *iter, const gchar *uri, guint32 flags);
G_END_DECLS
diff --git a/mail/em-filter-context.c b/mail/em-filter-context.c
index 7c17e694e8..6f6b634254 100644
--- a/mail/em-filter-context.c
+++ b/mail/em-filter-context.c
@@ -38,30 +38,30 @@
#define d(x)
-static void em_filter_context_class_init(EMFilterContextClass *klass);
-static void em_filter_context_init(EMFilterContext *fc);
-static void em_filter_context_finalise(GObject *obj);
+static void em_filter_context_class_init (EMFilterContextClass *klass);
+static void em_filter_context_init (EMFilterContext *fc);
+static void em_filter_context_finalise (GObject *obj);
-static GList *filter_rename_uri(ERuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp);
-static GList *filter_delete_uri(ERuleContext *rc, const gchar *uri, GCompareFunc cmp);
-static EFilterElement *filter_new_element(ERuleContext *rc, const gchar *name);
+static GList *filter_rename_uri (ERuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp);
+static GList *filter_delete_uri (ERuleContext *rc, const gchar *uri, GCompareFunc cmp);
+static EFilterElement *filter_new_element (ERuleContext *rc, const gchar *name);
static ERuleContextClass *parent_class = NULL;
GType
-em_filter_context_get_type(void)
+em_filter_context_get_type (void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo info = {
- sizeof(EMFilterContextClass),
+ sizeof (EMFilterContextClass),
NULL, /* base_class_init */
NULL, /* base_class_finalize */
(GClassInitFunc) em_filter_context_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
- sizeof(EMFilterContext),
+ sizeof (EMFilterContext),
0, /* n_preallocs */
(GInstanceInitFunc) em_filter_context_init,
};
@@ -73,12 +73,12 @@ em_filter_context_get_type(void)
}
static void
-em_filter_context_class_init(EMFilterContextClass *klass)
+em_filter_context_class_init (EMFilterContextClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
- ERuleContextClass *rc_class = E_RULE_CONTEXT_CLASS(klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ ERuleContextClass *rc_class = E_RULE_CONTEXT_CLASS (klass);
- parent_class = g_type_class_ref(E_TYPE_RULE_CONTEXT);
+ parent_class = g_type_class_ref (E_TYPE_RULE_CONTEXT);
object_class->finalize = em_filter_context_finalise;
@@ -89,7 +89,7 @@ em_filter_context_class_init(EMFilterContextClass *klass)
}
static void
-em_filter_context_init(EMFilterContext *fc)
+em_filter_context_init (EMFilterContext *fc)
{
e_rule_context_add_part_set((ERuleContext *) fc, "partset", e_filter_part_get_type(),
e_rule_context_add_part, e_rule_context_next_part);
@@ -102,14 +102,14 @@ em_filter_context_init(EMFilterContext *fc)
}
static void
-em_filter_context_finalise(GObject *obj)
+em_filter_context_finalise (GObject *obj)
{
EMFilterContext *fc = (EMFilterContext *)obj;
- g_list_foreach(fc->actions, (GFunc)g_object_unref, NULL);
- g_list_free(fc->actions);
+ g_list_foreach (fc->actions, (GFunc)g_object_unref, NULL);
+ g_list_free (fc->actions);
- G_OBJECT_CLASS(parent_class)->finalize(obj);
+ G_OBJECT_CLASS (parent_class)->finalize (obj);
}
/**
@@ -120,45 +120,45 @@ em_filter_context_finalise(GObject *obj)
* Return value: A new #EMFilterContext object.
**/
EMFilterContext *
-em_filter_context_new(void)
+em_filter_context_new (void)
{
- return (EMFilterContext *) g_object_new(em_filter_context_get_type(), NULL, NULL);
+ return (EMFilterContext *) g_object_new (em_filter_context_get_type (), NULL, NULL);
}
void
-em_filter_context_add_action(EMFilterContext *fc, EFilterPart *action)
+em_filter_context_add_action (EMFilterContext *fc, EFilterPart *action)
{
d(printf("find action : "));
- fc->actions = g_list_append(fc->actions, action);
+ fc->actions = g_list_append (fc->actions, action);
}
EFilterPart *
-em_filter_context_find_action(EMFilterContext *fc, const gchar *name)
+em_filter_context_find_action (EMFilterContext *fc, const gchar *name)
{
d(printf("find action : "));
- return e_filter_part_find_list(fc->actions, name);
+ return e_filter_part_find_list (fc->actions, name);
}
EFilterPart *
-em_filter_context_create_action(EMFilterContext *fc, const gchar *name)
+em_filter_context_create_action (EMFilterContext *fc, const gchar *name)
{
EFilterPart *part;
- if ((part = em_filter_context_find_action(fc, name)))
- return e_filter_part_clone(part);
+ if ((part = em_filter_context_find_action (fc, name)))
+ return e_filter_part_clone (part);
return NULL;
}
EFilterPart *
-em_filter_context_next_action(EMFilterContext *fc, EFilterPart *last)
+em_filter_context_next_action (EMFilterContext *fc, EFilterPart *last)
{
- return e_filter_part_next_list(fc->actions, last);
+ return e_filter_part_next_list (fc->actions, last);
}
/* We search for any folders in our actions list that need updating, update them */
static GList *
-filter_rename_uri(ERuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp)
+filter_rename_uri (ERuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp)
{
EFilterRule *rule;
GList *l, *el;
@@ -172,12 +172,12 @@ filter_rename_uri(ERuleContext *rc, const gchar *olduri, const gchar *newuri, GC
/* For all rules, for all actions, for all elements, rename any folder elements */
/* Yes we could do this inside each part itself, but not today */
rule = NULL;
- while ((rule = e_rule_context_next_rule(rc, rule, NULL))) {
+ while ((rule = e_rule_context_next_rule (rc, rule, NULL))) {
gint rulecount = 0;
d(printf("checking rule '%s'\n", rule->name));
- l = EM_FILTER_RULE(rule)->actions;
+ l = EM_FILTER_RULE (rule)->actions;
while (l) {
action = l->data;
@@ -188,15 +188,15 @@ filter_rename_uri(ERuleContext *rc, const gchar *olduri, const gchar *newuri, GC
element = el->data;
d(printf("checking element '%s'\n", element->name));
- if (EM_IS_FILTER_FOLDER_ELEMENT(element)) {
+ if (EM_IS_FILTER_FOLDER_ELEMENT (element)) {
d(printf(" is folder, existing uri = '%s'\n",
- FILTER_FOLDER(element)->uri));
+ FILTER_FOLDER (element)->uri));
}
- if (EM_IS_FILTER_FOLDER_ELEMENT(element)
- && cmp(((EMFilterFolderElement *)element)->uri, olduri)) {
+ if (EM_IS_FILTER_FOLDER_ELEMENT (element)
+ && cmp (((EMFilterFolderElement *)element)->uri, olduri)) {
d(printf(" Changed!\n"));
- em_filter_folder_element_set_value((EMFilterFolderElement *)element, newuri);
+ em_filter_folder_element_set_value ((EMFilterFolderElement *)element, newuri);
rulecount++;
}
el = el->next;
@@ -205,8 +205,8 @@ filter_rename_uri(ERuleContext *rc, const gchar *olduri, const gchar *newuri, GC
}
if (rulecount) {
- changed = g_list_append(changed, g_strdup(rule->name));
- e_filter_rule_emit_changed(rule);
+ changed = g_list_append (changed, g_strdup (rule->name));
+ e_filter_rule_emit_changed (rule);
}
count += rulecount;
@@ -218,7 +218,7 @@ filter_rename_uri(ERuleContext *rc, const gchar *olduri, const gchar *newuri, GC
}
static GList *
-filter_delete_uri(ERuleContext *rc, const gchar *uri, GCompareFunc cmp)
+filter_delete_uri (ERuleContext *rc, const gchar *uri, GCompareFunc cmp)
{
/* We basically do similar to above, but when we find it,
Remove the action, and if thats the last action, this might create an empty rule? remove the rule? */
@@ -235,12 +235,12 @@ filter_delete_uri(ERuleContext *rc, const gchar *uri, GCompareFunc cmp)
/* For all rules, for all actions, for all elements, check deleted folder elements */
/* Yes we could do this inside each part itself, but not today */
rule = NULL;
- while ((rule = e_rule_context_next_rule(rc, rule, NULL))) {
+ while ((rule = e_rule_context_next_rule (rc, rule, NULL))) {
gint recorded = 0;
d(printf("checking rule '%s'\n", rule->name));
- l = EM_FILTER_RULE(rule)->actions;
+ l = EM_FILTER_RULE (rule)->actions;
while (l) {
action = l->data;
@@ -251,21 +251,21 @@ filter_delete_uri(ERuleContext *rc, const gchar *uri, GCompareFunc cmp)
element = el->data;
d(printf("checking element '%s'\n", element->name));
- if (EM_IS_FILTER_FOLDER_ELEMENT(element)) {
+ if (EM_IS_FILTER_FOLDER_ELEMENT (element)) {
d(printf(" is folder, existing uri = '%s'\n",
- FILTER_FOLDER(element)->uri));
+ FILTER_FOLDER (element)->uri));
}
- if (EM_IS_FILTER_FOLDER_ELEMENT(element)
- && cmp(((EMFilterFolderElement *)element)->uri, uri)) {
+ if (EM_IS_FILTER_FOLDER_ELEMENT (element)
+ && cmp (((EMFilterFolderElement *)element)->uri, uri)) {
d(printf(" Deleted!\n"));
/* check if last action, if so, remove rule instead? */
l = l->next;
- em_filter_rule_remove_action((EMFilterRule *)rule, action);
- g_object_unref(action);
+ em_filter_rule_remove_action ((EMFilterRule *)rule, action);
+ g_object_unref (action);
count++;
if (!recorded)
- deleted = g_list_append(deleted, g_strdup(rule->name));
+ deleted = g_list_append (deleted, g_strdup (rule->name));
goto next_action;
}
el = el->next;
@@ -282,17 +282,17 @@ filter_delete_uri(ERuleContext *rc, const gchar *uri, GCompareFunc cmp)
}
static EFilterElement *
-filter_new_element(ERuleContext *rc, const gchar *type)
+filter_new_element (ERuleContext *rc, const gchar *type)
{
if (!strcmp(type, "folder")) {
- return (EFilterElement *) em_filter_folder_element_new();
+ return (EFilterElement *) em_filter_folder_element_new ();
} else if (!strcmp(type, "system-flag")) {
- return (EFilterElement *) e_filter_option_new();
+ return (EFilterElement *) e_filter_option_new ();
} else if (!strcmp(type, "score")) {
return (EFilterElement *) e_filter_int_new_type("score", -3, 3);
} else if (!strcmp(type, "source")) {
- return (EFilterElement *) em_filter_source_element_new();
+ return (EFilterElement *) em_filter_source_element_new ();
} else {
- return parent_class->new_element(rc, type);
+ return parent_class->new_element (rc, type);
}
}
diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c
index 4a0527d934..705d972b2f 100644
--- a/mail/em-filter-editor.c
+++ b/mail/em-filter-editor.c
@@ -176,7 +176,7 @@ em_filter_editor_construct (EMFilterEditor *fe,
for (i = 0; source_names[i].source; i++) {
gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), source_names[i].name);
- sources = g_slist_append (sources, g_strdup(source_names[i].source));
+ sources = g_slist_append (sources, g_strdup (source_names[i].source));
}
gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0);
diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c
index f4584c65b1..509284918a 100644
--- a/mail/em-filter-folder-element.c
+++ b/mail/em-filter-folder-element.c
@@ -40,36 +40,36 @@
#define d(x)
-static gboolean validate(EFilterElement *fe, EAlert **alert);
-static gint folder_eq(EFilterElement *fe, EFilterElement *cm);
-static void xml_create(EFilterElement *fe, xmlNodePtr node);
-static xmlNodePtr xml_encode(EFilterElement *fe);
-static gint xml_decode(EFilterElement *fe, xmlNodePtr node);
-static GtkWidget *get_widget(EFilterElement *fe);
-static void build_code(EFilterElement *fe, GString *out, EFilterPart *ff);
-static void format_sexp(EFilterElement *, GString *);
-static void emff_copy_value(EFilterElement *de, EFilterElement *se);
-
-static void em_filter_folder_element_class_init(EMFilterFolderElementClass *class);
-static void em_filter_folder_element_init(EMFilterFolderElement *ff);
-static void em_filter_folder_element_finalise(GObject *obj);
+static gboolean validate (EFilterElement *fe, EAlert **alert);
+static gint folder_eq (EFilterElement *fe, EFilterElement *cm);
+static void xml_create (EFilterElement *fe, xmlNodePtr node);
+static xmlNodePtr xml_encode (EFilterElement *fe);
+static gint xml_decode (EFilterElement *fe, xmlNodePtr node);
+static GtkWidget *get_widget (EFilterElement *fe);
+static void build_code (EFilterElement *fe, GString *out, EFilterPart *ff);
+static void format_sexp (EFilterElement *, GString *);
+static void emff_copy_value (EFilterElement *de, EFilterElement *se);
+
+static void em_filter_folder_element_class_init (EMFilterFolderElementClass *class);
+static void em_filter_folder_element_init (EMFilterFolderElement *ff);
+static void em_filter_folder_element_finalise (GObject *obj);
static EFilterElementClass *parent_class = NULL;
GType
-em_filter_folder_element_get_type(void)
+em_filter_folder_element_get_type (void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo info = {
- sizeof(EMFilterFolderElementClass),
+ sizeof (EMFilterFolderElementClass),
NULL, /* base_class_init */
NULL, /* base_class_finalize */
(GClassInitFunc)em_filter_folder_element_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
- sizeof(EMFilterFolderElement),
+ sizeof (EMFilterFolderElement),
0, /* n_preallocs */
(GInstanceInitFunc)em_filter_folder_element_init,
};
@@ -81,12 +81,12 @@ em_filter_folder_element_get_type(void)
}
static void
-em_filter_folder_element_class_init(EMFilterFolderElementClass *klass)
+em_filter_folder_element_class_init (EMFilterFolderElementClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
- EFilterElementClass *fe_class = E_FILTER_ELEMENT_CLASS(klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ EFilterElementClass *fe_class = E_FILTER_ELEMENT_CLASS (klass);
- parent_class = g_type_class_ref(E_TYPE_FILTER_ELEMENT);
+ parent_class = g_type_class_ref (E_TYPE_FILTER_ELEMENT);
object_class->finalize = em_filter_folder_element_finalise;
@@ -103,19 +103,19 @@ em_filter_folder_element_class_init(EMFilterFolderElementClass *klass)
}
static void
-em_filter_folder_element_init(EMFilterFolderElement *ff)
+em_filter_folder_element_init (EMFilterFolderElement *ff)
{
;
}
static void
-em_filter_folder_element_finalise(GObject *obj)
+em_filter_folder_element_finalise (GObject *obj)
{
EMFilterFolderElement *ff = (EMFilterFolderElement *)obj;
- g_free(ff->uri);
+ g_free (ff->uri);
- G_OBJECT_CLASS(parent_class)->finalize(obj);
+ G_OBJECT_CLASS (parent_class)->finalize (obj);
}
/**
@@ -126,20 +126,20 @@ em_filter_folder_element_finalise(GObject *obj)
* Return value: A new #EMFilterFolderElement object.
**/
EMFilterFolderElement *
-em_filter_folder_element_new(void)
+em_filter_folder_element_new (void)
{
- return(EMFilterFolderElement *)g_object_new(em_filter_folder_element_get_type(), NULL, NULL);
+ return (EMFilterFolderElement *)g_object_new (em_filter_folder_element_get_type (), NULL, NULL);
}
void
-em_filter_folder_element_set_value(EMFilterFolderElement *ff, const gchar *uri)
+em_filter_folder_element_set_value (EMFilterFolderElement *ff, const gchar *uri)
{
- g_free(ff->uri);
- ff->uri = g_strdup(uri);
+ g_free (ff->uri);
+ ff->uri = g_strdup (uri);
}
static gboolean
-validate(EFilterElement *fe, EAlert **alert)
+validate (EFilterElement *fe, EAlert **alert)
{
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
@@ -156,21 +156,21 @@ validate(EFilterElement *fe, EAlert **alert)
}
static gint
-folder_eq(EFilterElement *fe, EFilterElement *cm)
+folder_eq (EFilterElement *fe, EFilterElement *cm)
{
- return E_FILTER_ELEMENT_CLASS(parent_class)->eq(fe, cm)
- && strcmp(((EMFilterFolderElement *)fe)->uri, ((EMFilterFolderElement *)cm)->uri)== 0;
+ return E_FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
+ && strcmp (((EMFilterFolderElement *)fe)->uri, ((EMFilterFolderElement *)cm)->uri)== 0;
}
static void
-xml_create(EFilterElement *fe, xmlNodePtr node)
+xml_create (EFilterElement *fe, xmlNodePtr node)
{
/* parent implementation */
- E_FILTER_ELEMENT_CLASS(parent_class)->xml_create(fe, node);
+ E_FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node);
}
static xmlNodePtr
-xml_encode(EFilterElement *fe)
+xml_encode (EFilterElement *fe)
{
xmlNodePtr value, work;
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
@@ -191,7 +191,7 @@ xml_encode(EFilterElement *fe)
}
static gint
-xml_decode(EFilterElement *fe, xmlNodePtr node)
+xml_decode (EFilterElement *fe, xmlNodePtr node)
{
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
xmlNodePtr n;
@@ -199,7 +199,7 @@ xml_decode(EFilterElement *fe, xmlNodePtr node)
d(printf("Decoding folder from xml %p\n", fe));
- xmlFree(fe->name);
+ xmlFree (fe->name);
fe->name = (gchar *)xmlGetProp(node, (const guchar *)"name");
type = xmlGetProp (node, (const guchar *)"type");
@@ -216,9 +216,9 @@ xml_decode(EFilterElement *fe, xmlNodePtr node)
gchar *uri;
uri = (gchar *)xmlGetProp(n, (const guchar *)"uri");
- g_free(ff->uri);
- ff->uri = g_strdup(uri);
- xmlFree(uri);
+ g_free (ff->uri);
+ ff->uri = g_strdup (uri);
+ xmlFree (uri);
break;
}
n = n->next;
@@ -228,13 +228,13 @@ xml_decode(EFilterElement *fe, xmlNodePtr node)
}
static void
-folder_selected(EMFolderSelectionButton *button, EMFilterFolderElement *ff)
+folder_selected (EMFolderSelectionButton *button, EMFilterFolderElement *ff)
{
GtkWidget *toplevel;
const gchar *uri;
- uri = em_folder_selection_button_get_selection(button);
- g_free(ff->uri);
+ uri = em_folder_selection_button_get_selection (button);
+ g_free (ff->uri);
if (ff->store_camel_uri)
ff->uri = g_strdup (uri);
@@ -246,7 +246,7 @@ folder_selected(EMFolderSelectionButton *button, EMFilterFolderElement *ff)
}
static GtkWidget *
-get_widget(EFilterElement *fe)
+get_widget (EFilterElement *fe)
{
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
GtkWidget *button;
@@ -259,38 +259,38 @@ get_widget(EFilterElement *fe)
button = em_folder_selection_button_new (_("Select Folder"), NULL);
- em_folder_selection_button_set_selection(
+ em_folder_selection_button_set_selection (
EM_FOLDER_SELECTION_BUTTON (button), uri);
if (!ff->store_camel_uri)
- g_free(uri);
+ g_free (uri);
- gtk_widget_show(button);
+ gtk_widget_show (button);
g_signal_connect(button, "selected", G_CALLBACK(folder_selected), ff);
return button;
}
static void
-build_code(EFilterElement *fe, GString *out, EFilterPart *ff)
+build_code (EFilterElement *fe, GString *out, EFilterPart *ff)
{
return;
}
static void
-format_sexp(EFilterElement *fe, GString *out)
+format_sexp (EFilterElement *fe, GString *out)
{
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
- e_sexp_encode_string(out, ff->uri);
+ e_sexp_encode_string (out, ff->uri);
}
static void
-emff_copy_value(EFilterElement *de, EFilterElement *se)
+emff_copy_value (EFilterElement *de, EFilterElement *se)
{
- if (EM_IS_FILTER_FOLDER_ELEMENT(se)) {
+ if (EM_IS_FILTER_FOLDER_ELEMENT (se)) {
((EMFilterFolderElement *)de)->store_camel_uri = ((EMFilterFolderElement *)se)->store_camel_uri;
- em_filter_folder_element_set_value((EMFilterFolderElement *)de, ((EMFilterFolderElement *)se)->uri);
+ em_filter_folder_element_set_value ((EMFilterFolderElement *)de, ((EMFilterFolderElement *)se)->uri);
} else
- parent_class->copy_value(de, se);
+ parent_class->copy_value (de, se);
}
diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c
index b8ae4d66d7..47faf57c91 100644
--- a/mail/em-filter-rule.c
+++ b/mail/em-filter-rule.c
@@ -35,34 +35,34 @@
#define d(x)
-static gint validate(EFilterRule *fr, EAlert **alert);
-static gint filter_eq(EFilterRule *fr, EFilterRule *cm);
-static xmlNodePtr xml_encode(EFilterRule *fr);
-static gint xml_decode(EFilterRule *fr, xmlNodePtr, ERuleContext *rc);
-static void rule_copy(EFilterRule *dest, EFilterRule *src);
+static gint validate (EFilterRule *fr, EAlert **alert);
+static gint filter_eq (EFilterRule *fr, EFilterRule *cm);
+static xmlNodePtr xml_encode (EFilterRule *fr);
+static gint xml_decode (EFilterRule *fr, xmlNodePtr, ERuleContext *rc);
+static void rule_copy (EFilterRule *dest, EFilterRule *src);
/*static void build_code(EFilterRule *, GString *out);*/
-static GtkWidget *get_widget(EFilterRule *fr, ERuleContext *rc);
+static GtkWidget *get_widget (EFilterRule *fr, ERuleContext *rc);
-static void em_filter_rule_class_init(EMFilterRuleClass *klass);
-static void em_filter_rule_init(EMFilterRule *ff);
-static void em_filter_rule_finalise(GObject *obj);
+static void em_filter_rule_class_init (EMFilterRuleClass *klass);
+static void em_filter_rule_init (EMFilterRule *ff);
+static void em_filter_rule_finalise (GObject *obj);
static EFilterRuleClass *parent_class = NULL;
GType
-em_filter_rule_get_type(void)
+em_filter_rule_get_type (void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo info = {
- sizeof(EMFilterRuleClass),
+ sizeof (EMFilterRuleClass),
NULL, /* base_class_init */
NULL, /* base_class_finalize */
(GClassInitFunc) em_filter_rule_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
- sizeof(EMFilterRule),
+ sizeof (EMFilterRule),
0, /* n_preallocs */
(GInstanceInitFunc)em_filter_rule_init,
};
@@ -74,12 +74,12 @@ em_filter_rule_get_type(void)
}
static void
-em_filter_rule_class_init(EMFilterRuleClass *klass)
+em_filter_rule_class_init (EMFilterRuleClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
EFilterRuleClass *fr_class =(EFilterRuleClass *)klass;
- parent_class = g_type_class_ref(E_TYPE_FILTER_RULE);
+ parent_class = g_type_class_ref (E_TYPE_FILTER_RULE);
object_class->finalize = em_filter_rule_finalise;
@@ -94,29 +94,29 @@ em_filter_rule_class_init(EMFilterRuleClass *klass)
}
static void
-em_filter_rule_init(EMFilterRule *ff)
+em_filter_rule_init (EMFilterRule *ff)
{
;
}
static void
-unref_list(GList *l)
+unref_list (GList *l)
{
while (l) {
- g_object_unref(l->data);
+ g_object_unref (l->data);
l = l->next;
}
}
static void
-em_filter_rule_finalise(GObject *obj)
+em_filter_rule_finalise (GObject *obj)
{
EMFilterRule *ff =(EMFilterRule *) obj;
- unref_list(ff->actions);
- g_list_free(ff->actions);
+ unref_list (ff->actions);
+ g_list_free (ff->actions);
- G_OBJECT_CLASS(parent_class)->finalize(obj);
+ G_OBJECT_CLASS (parent_class)->finalize (obj);
}
/**
@@ -127,58 +127,58 @@ em_filter_rule_finalise(GObject *obj)
* Return value: A new #EMFilterRule object.
**/
EMFilterRule *
-em_filter_rule_new(void)
+em_filter_rule_new (void)
{
- return (EMFilterRule *)g_object_new(em_filter_rule_get_type(), NULL, NULL);
+ return (EMFilterRule *)g_object_new (em_filter_rule_get_type (), NULL, NULL);
}
void
-em_filter_rule_add_action(EMFilterRule *fr, EFilterPart *fp)
+em_filter_rule_add_action (EMFilterRule *fr, EFilterPart *fp)
{
- fr->actions = g_list_append(fr->actions, fp);
+ fr->actions = g_list_append (fr->actions, fp);
- e_filter_rule_emit_changed((EFilterRule *)fr);
+ e_filter_rule_emit_changed ((EFilterRule *)fr);
}
void
-em_filter_rule_remove_action(EMFilterRule *fr, EFilterPart *fp)
+em_filter_rule_remove_action (EMFilterRule *fr, EFilterPart *fp)
{
- fr->actions = g_list_remove(fr->actions, fp);
+ fr->actions = g_list_remove (fr->actions, fp);
- e_filter_rule_emit_changed((EFilterRule *)fr);
+ e_filter_rule_emit_changed ((EFilterRule *)fr);
}
void
-em_filter_rule_replace_action(EMFilterRule *fr, EFilterPart *fp, EFilterPart *new)
+em_filter_rule_replace_action (EMFilterRule *fr, EFilterPart *fp, EFilterPart *new)
{
GList *l;
- l = g_list_find(fr->actions, fp);
+ l = g_list_find (fr->actions, fp);
if (l) {
l->data = new;
} else {
- fr->actions = g_list_append(fr->actions, new);
+ fr->actions = g_list_append (fr->actions, new);
}
- e_filter_rule_emit_changed((EFilterRule *)fr);
+ e_filter_rule_emit_changed ((EFilterRule *)fr);
}
void
-em_filter_rule_build_action(EMFilterRule *fr, GString *out)
+em_filter_rule_build_action (EMFilterRule *fr, GString *out)
{
g_string_append(out, "(begin\n");
- e_filter_part_build_code_list(fr->actions, out);
+ e_filter_part_build_code_list (fr->actions, out);
g_string_append(out, ")\n");
}
static gint
-validate(EFilterRule *fr, EAlert **alert)
+validate (EFilterRule *fr, EAlert **alert)
{
EMFilterRule *ff =(EMFilterRule *)fr;
GList *parts;
gint valid;
- valid = E_FILTER_RULE_CLASS(parent_class)->validate (fr, alert);
+ valid = E_FILTER_RULE_CLASS (parent_class)->validate (fr, alert);
/* validate rule actions */
parts = ff->actions;
@@ -191,14 +191,14 @@ validate(EFilterRule *fr, EAlert **alert)
}
static gint
-list_eq(GList *al, GList *bl)
+list_eq (GList *al, GList *bl)
{
gint truth = TRUE;
while (truth && al && bl) {
EFilterPart *a = al->data, *b = bl->data;
- truth = e_filter_part_eq(a, b);
+ truth = e_filter_part_eq (a, b);
al = al->next;
bl = bl->next;
}
@@ -207,27 +207,27 @@ list_eq(GList *al, GList *bl)
}
static gint
-filter_eq(EFilterRule *fr, EFilterRule *cm)
+filter_eq (EFilterRule *fr, EFilterRule *cm)
{
- return E_FILTER_RULE_CLASS(parent_class)->eq(fr, cm)
- && list_eq(((EMFilterRule *)fr)->actions,((EMFilterRule *)cm)->actions);
+ return E_FILTER_RULE_CLASS (parent_class)->eq (fr, cm)
+ && list_eq (((EMFilterRule *)fr)->actions,((EMFilterRule *)cm)->actions);
}
static xmlNodePtr
-xml_encode(EFilterRule *fr)
+xml_encode (EFilterRule *fr)
{
EMFilterRule *ff =(EMFilterRule *)fr;
xmlNodePtr node, set, work;
GList *l;
- node = E_FILTER_RULE_CLASS(parent_class)->xml_encode(fr);
+ node = E_FILTER_RULE_CLASS (parent_class)->xml_encode (fr);
g_return_val_if_fail (node != NULL, NULL);
set = xmlNewNode(NULL, (const guchar *)"actionset");
- xmlAddChild(node, set);
+ xmlAddChild (node, set);
l = ff->actions;
while (l) {
- work = e_filter_part_xml_encode((EFilterPart *)l->data);
- xmlAddChild(set, work);
+ work = e_filter_part_xml_encode ((EFilterPart *)l->data);
+ xmlAddChild (set, work);
l = l->next;
}
@@ -236,7 +236,7 @@ xml_encode(EFilterRule *fr)
}
static void
-load_set(xmlNodePtr node, EMFilterRule *ff, ERuleContext *rc)
+load_set (xmlNodePtr node, EMFilterRule *ff, ERuleContext *rc)
{
xmlNodePtr work;
gchar *rulename;
@@ -246,15 +246,15 @@ load_set(xmlNodePtr node, EMFilterRule *ff, ERuleContext *rc)
while (work) {
if (!strcmp((gchar *)work->name, "part")) {
rulename = (gchar *)xmlGetProp(work, (const guchar *)"name");
- part = em_filter_context_find_action((EMFilterContext *)rc, rulename);
+ part = em_filter_context_find_action ((EMFilterContext *)rc, rulename);
if (part) {
- part = e_filter_part_clone(part);
- e_filter_part_xml_decode(part, work);
- em_filter_rule_add_action(ff, part);
+ part = e_filter_part_clone (part);
+ e_filter_part_xml_decode (part, work);
+ em_filter_rule_add_action (ff, part);
} else {
g_warning("cannot find rule part '%s'\n", rulename);
}
- xmlFree(rulename);
+ xmlFree (rulename);
} else if (work->type == XML_ELEMENT_NODE) {
g_warning("Unknown xml node in part: %s", work->name);
}
@@ -263,20 +263,20 @@ load_set(xmlNodePtr node, EMFilterRule *ff, ERuleContext *rc)
}
static gint
-xml_decode(EFilterRule *fr, xmlNodePtr node, ERuleContext *rc)
+xml_decode (EFilterRule *fr, xmlNodePtr node, ERuleContext *rc)
{
EMFilterRule *ff =(EMFilterRule *)fr;
xmlNodePtr work;
gint result;
- result = E_FILTER_RULE_CLASS(parent_class)->xml_decode(fr, node, rc);
+ result = E_FILTER_RULE_CLASS (parent_class)->xml_decode (fr, node, rc);
if (result != 0)
return result;
work = node->children;
while (work) {
if (!strcmp((gchar *)work->name, "actionset")) {
- load_set(work, ff, rc);
+ load_set (work, ff, rc);
}
work = work->next;
}
@@ -285,7 +285,7 @@ xml_decode(EFilterRule *fr, xmlNodePtr node, ERuleContext *rc)
}
static void
-rule_copy(EFilterRule *dest, EFilterRule *src)
+rule_copy (EFilterRule *dest, EFilterRule *src)
{
EMFilterRule *fdest, *fsrc;
GList *node;
@@ -294,8 +294,8 @@ rule_copy(EFilterRule *dest, EFilterRule *src)
fsrc =(EMFilterRule *)src;
if (fdest->actions) {
- g_list_foreach(fdest->actions, (GFunc)g_object_unref, NULL);
- g_list_free(fdest->actions);
+ g_list_foreach (fdest->actions, (GFunc)g_object_unref, NULL);
+ g_list_free (fdest->actions);
fdest->actions = NULL;
}
@@ -303,17 +303,17 @@ rule_copy(EFilterRule *dest, EFilterRule *src)
while (node) {
EFilterPart *part = node->data;
- g_object_ref(part);
- fdest->actions = g_list_append(fdest->actions, part);
+ g_object_ref (part);
+ fdest->actions = g_list_append (fdest->actions, part);
node = node->next;
}
- E_FILTER_RULE_CLASS(parent_class)->copy(dest, src);
+ E_FILTER_RULE_CLASS (parent_class)->copy (dest, src);
}
/*static void build_code(EFilterRule *fr, GString *out)
{
- return FILTER_RULE_CLASS(parent_class)->build_code(fr, out);
+ return FILTER_RULE_CLASS (parent_class)->build_code (fr, out);
}*/
struct _part_data {
@@ -360,7 +360,7 @@ part_combobox_changed (GtkComboBox *combobox, struct _part_data *data)
}
static GtkWidget *
-get_rule_part_widget(EMFilterContext *f, EFilterPart *newpart, EFilterRule *fr)
+get_rule_part_widget (EMFilterContext *f, EFilterPart *newpart, EFilterRule *fr)
{
EFilterPart *part = NULL;
GtkWidget *combobox;
@@ -369,25 +369,25 @@ get_rule_part_widget(EMFilterContext *f, EFilterPart *newpart, EFilterRule *fr)
gint index = 0, current = 0;
struct _part_data *data;
- data = g_malloc0(sizeof(*data));
+ data = g_malloc0 (sizeof (*data));
data->fr = fr;
data->f = f;
data->part = newpart;
- hbox = gtk_hbox_new(FALSE, 0);
+ hbox = gtk_hbox_new (FALSE, 0);
/* only set to automatically clean up the memory and for less_parts */
g_object_set_data_full ((GObject *) hbox, "data", data, g_free);
- p = e_filter_part_get_widget(newpart);
+ p = e_filter_part_get_widget (newpart);
data->partwidget = p;
data->container = hbox;
combobox = gtk_combo_box_new_text ();
- while ((part = em_filter_context_next_action(f, part))) {
+ while ((part = em_filter_context_next_action (f, part))) {
gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(part->title));
- if (!strcmp(newpart->title, part->title))
+ if (!strcmp (newpart->title, part->title))
current = index;
index++;
@@ -397,11 +397,11 @@ get_rule_part_widget(EMFilterContext *f, EFilterPart *newpart, EFilterRule *fr)
g_signal_connect (combobox, "changed", G_CALLBACK (part_combobox_changed), data);
gtk_widget_show (combobox);
- gtk_box_pack_start(GTK_BOX(hbox), combobox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, FALSE, 0);
if (p)
- gtk_box_pack_start(GTK_BOX(hbox), p, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), p, TRUE, TRUE, 0);
- gtk_widget_show_all(hbox);
+ gtk_widget_show_all (hbox);
return hbox;
}
@@ -413,7 +413,7 @@ struct _rule_data {
};
static void
-less_parts(GtkWidget *button, struct _rule_data *data)
+less_parts (GtkWidget *button, struct _rule_data *data)
{
EFilterPart *part;
GtkWidget *rule;
@@ -421,7 +421,7 @@ less_parts(GtkWidget *button, struct _rule_data *data)
GList *l;
l =((EMFilterRule *)data->fr)->actions;
- if (g_list_length(l) < 2)
+ if (g_list_length (l) < 2)
return;
rule = g_object_get_data((GObject *)button, "rule");
@@ -432,29 +432,29 @@ less_parts(GtkWidget *button, struct _rule_data *data)
part = part_data->part;
/* remove the part from the list */
- em_filter_rule_remove_action((EMFilterRule *)data->fr, part);
- g_object_unref(part);
+ em_filter_rule_remove_action ((EMFilterRule *)data->fr, part);
+ g_object_unref (part);
/* and from the display */
- gtk_container_remove(GTK_CONTAINER(data->parts), rule);
- gtk_container_remove(GTK_CONTAINER(data->parts), button);
+ gtk_container_remove (GTK_CONTAINER (data->parts), rule);
+ gtk_container_remove (GTK_CONTAINER (data->parts), button);
}
static void
-attach_rule(GtkWidget *rule, struct _rule_data *data, EFilterPart *part, gint row)
+attach_rule (GtkWidget *rule, struct _rule_data *data, EFilterPart *part, gint row)
{
GtkWidget *remove;
- gtk_table_attach(GTK_TABLE(data->parts), rule, 0, 1, row, row + 1,
+ gtk_table_attach (GTK_TABLE (data->parts), rule, 0, 1, row, row + 1,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
- remove = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
+ remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
g_object_set_data((GObject *)remove, "rule", rule);
/*gtk_button_set_relief(GTK_BUTTON(remove), GTK_RELIEF_NONE);*/
g_signal_connect(remove, "clicked", G_CALLBACK(less_parts), data);
- gtk_table_attach(GTK_TABLE(data->parts), remove, 1, 2, row, row + 1,
+ gtk_table_attach (GTK_TABLE (data->parts), remove, 1, 2, row, row + 1,
0, 0, 0, 0);
- gtk_widget_show(remove);
+ gtk_widget_show (remove);
}
static void
@@ -472,23 +472,23 @@ do_grab_focus_cb (GtkWidget *widget, gpointer data)
}
static void
-more_parts(GtkWidget *button, struct _rule_data *data)
+more_parts (GtkWidget *button, struct _rule_data *data)
{
EFilterPart *new;
/* create a new rule entry, use the first type of rule */
- new = em_filter_context_next_action((EMFilterContext *)data->f, NULL);
+ new = em_filter_context_next_action ((EMFilterContext *)data->f, NULL);
if (new) {
GtkWidget *w;
guint rows;
- new = e_filter_part_clone(new);
- em_filter_rule_add_action((EMFilterRule *)data->fr, new);
- w = get_rule_part_widget(data->f, new, data->fr);
+ new = e_filter_part_clone (new);
+ em_filter_rule_add_action ((EMFilterRule *)data->fr, new);
+ w = get_rule_part_widget (data->f, new, data->fr);
g_object_get (data->parts, "n-rows", &rows, NULL);
- gtk_table_resize(GTK_TABLE(data->parts), rows + 1, 2);
- attach_rule(w, data, new, rows);
+ gtk_table_resize (GTK_TABLE (data->parts), rows + 1, 2);
+ attach_rule (w, data, new, rows);
if (GTK_IS_CONTAINER (w)) {
gboolean done = FALSE;
@@ -514,7 +514,7 @@ more_parts(GtkWidget *button, struct _rule_data *data)
}
static GtkWidget *
-get_widget(EFilterRule *fr, ERuleContext *rc)
+get_widget (EFilterRule *fr, ERuleContext *rc)
{
GtkWidget *widget, *hbox, *add, *label;
GtkWidget *parts, *inframe, *w;
@@ -527,31 +527,31 @@ get_widget(EFilterRule *fr, ERuleContext *rc)
gint rows, i = 0;
gchar *msg;
- widget = E_FILTER_RULE_CLASS(parent_class)->get_widget(fr, rc);
+ widget = E_FILTER_RULE_CLASS (parent_class)->get_widget (fr, rc);
/* and now for the action area */
msg = g_strdup_printf("<b>%s</b>", _("Then"));
- label = gtk_label_new(msg);
- gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(widget), label, FALSE, FALSE, 0);
- gtk_widget_show(label);
- g_free(msg);
+ label = gtk_label_new (msg);
+ gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_box_pack_start (GTK_BOX (widget), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
+ g_free (msg);
- hbox = gtk_hbox_new(FALSE, 12);
- gtk_box_pack_start(GTK_BOX(widget), hbox, TRUE, TRUE, 0);
- gtk_widget_show(hbox);
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_box_pack_start (GTK_BOX (widget), hbox, TRUE, TRUE, 0);
+ gtk_widget_show (hbox);
label = gtk_label_new("");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- gtk_widget_show(label);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
- inframe = gtk_vbox_new(FALSE, 6);
- gtk_box_pack_start(GTK_BOX(hbox), inframe, TRUE, TRUE, 0);
+ inframe = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (hbox), inframe, TRUE, TRUE, 0);
- rows = g_list_length(ff->actions);
- parts = gtk_table_new(rows, 2, FALSE);
- data = g_malloc0(sizeof(*data));
+ rows = g_list_length (ff->actions);
+ parts = gtk_table_new (rows, 2, FALSE);
+ data = g_malloc0 (sizeof (*data));
data->f =(EMFilterContext *)rc;
data->fr = fr;
data->parts = parts;
@@ -559,41 +559,41 @@ get_widget(EFilterRule *fr, ERuleContext *rc)
/* only set to automatically clean up the memory */
g_object_set_data_full ((GObject *) hbox, "data", data, g_free);
- hbox = gtk_hbox_new(FALSE, 3);
+ hbox = gtk_hbox_new (FALSE, 3);
add = gtk_button_new_with_mnemonic (_("Add Ac_tion"));
gtk_button_set_image (
GTK_BUTTON (add), gtk_image_new_from_stock (
GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON));
g_signal_connect(add, "clicked", G_CALLBACK(more_parts), data);
- gtk_box_pack_start(GTK_BOX(hbox), add, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(inframe), hbox, FALSE, FALSE, 3);
+ gtk_box_pack_start (GTK_BOX (inframe), hbox, FALSE, FALSE, 3);
l = ff->actions;
while (l) {
part = l->data;
d(printf("adding action %s\n", part->title));
- w = get_rule_part_widget((EMFilterContext *)rc, part, fr);
- attach_rule(w, data, part, i++);
+ w = get_rule_part_widget ((EMFilterContext *)rc, part, fr);
+ attach_rule (w, data, part, i++);
l = l->next;
}
- hadj = gtk_adjustment_new(0.0, 0.0, 1.0, 1.0 ,1.0, 1.0);
- vadj = gtk_adjustment_new(0.0, 0.0, 1.0, 1.0 ,1.0, 1.0);
- scrolledwindow = gtk_scrolled_window_new(GTK_ADJUSTMENT(hadj), GTK_ADJUSTMENT(vadj));
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
+ hadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0 ,1.0, 1.0);
+ vadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0 ,1.0, 1.0);
+ scrolledwindow = gtk_scrolled_window_new (GTK_ADJUSTMENT (hadj), GTK_ADJUSTMENT (vadj));
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolledwindow), parts);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwindow), parts);
- gtk_box_pack_start(GTK_BOX(inframe), scrolledwindow, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (inframe), scrolledwindow, TRUE, TRUE, 0);
/*gtk_box_pack_start(GTK_BOX(inframe), parts, FALSE, FALSE, 3);*/
g_object_set_data (G_OBJECT (add), "scrolled-window", scrolledwindow);
- gtk_widget_show_all(widget);
+ gtk_widget_show_all (widget);
return widget;
}
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index bf185ce60f..9b30722f9a 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -36,22 +36,22 @@
#include "filter/e-filter-part.h"
-static void em_filter_source_element_class_init(EMFilterSourceElementClass *klass);
-static void em_filter_source_element_init(EMFilterSourceElement *fs);
-static void em_filter_source_element_finalize(GObject *obj);
-
-static gint source_eq(EFilterElement *fe, EFilterElement *cm);
-static void xml_create(EFilterElement *fe, xmlNodePtr node);
-static xmlNodePtr xml_encode(EFilterElement *fe);
-static gint xml_decode(EFilterElement *fe, xmlNodePtr node);
-static EFilterElement *filter_clone(EFilterElement *fe);
-static GtkWidget *get_widget(EFilterElement *fe);
-static void build_code(EFilterElement *fe, GString *out, EFilterPart *ff);
-static void format_sexp(EFilterElement *, GString *);
+static void em_filter_source_element_class_init (EMFilterSourceElementClass *klass);
+static void em_filter_source_element_init (EMFilterSourceElement *fs);
+static void em_filter_source_element_finalize (GObject *obj);
+
+static gint source_eq (EFilterElement *fe, EFilterElement *cm);
+static void xml_create (EFilterElement *fe, xmlNodePtr node);
+static xmlNodePtr xml_encode (EFilterElement *fe);
+static gint xml_decode (EFilterElement *fe, xmlNodePtr node);
+static EFilterElement *filter_clone (EFilterElement *fe);
+static GtkWidget *get_widget (EFilterElement *fe);
+static void build_code (EFilterElement *fe, GString *out, EFilterPart *ff);
+static void format_sexp (EFilterElement *, GString *);
static void em_filter_source_element_add_source (EMFilterSourceElement *fs, const gchar *account_name, const gchar *name,
const gchar *addr, const gchar *url);
-static void em_filter_source_element_get_sources(EMFilterSourceElement *fs);
+static void em_filter_source_element_get_sources (EMFilterSourceElement *fs);
typedef struct _SourceInfo {
gchar *account_name;
@@ -68,19 +68,19 @@ struct _EMFilterSourceElementPrivate {
static EFilterElementClass *parent_class = NULL;
GType
-em_filter_source_element_get_type(void)
+em_filter_source_element_get_type (void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo info = {
- sizeof(EMFilterSourceElementClass),
+ sizeof (EMFilterSourceElementClass),
NULL, /* base_class_init */
NULL, /* base_class_finalize */
(GClassInitFunc)em_filter_source_element_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
- sizeof(EMFilterSourceElement),
+ sizeof (EMFilterSourceElement),
0, /* n_preallocs */
(GInstanceInitFunc)em_filter_source_element_init,
};
@@ -92,12 +92,12 @@ em_filter_source_element_get_type(void)
}
static void
-em_filter_source_element_class_init(EMFilterSourceElementClass *klass)
+em_filter_source_element_class_init (EMFilterSourceElementClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
- EFilterElementClass *fe_class = E_FILTER_ELEMENT_CLASS(klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ EFilterElementClass *fe_class = E_FILTER_ELEMENT_CLASS (klass);
- parent_class = g_type_class_ref(E_TYPE_FILTER_ELEMENT);
+ parent_class = g_type_class_ref (E_TYPE_FILTER_ELEMENT);
object_class->finalize = em_filter_source_element_finalize;
@@ -113,63 +113,63 @@ em_filter_source_element_class_init(EMFilterSourceElementClass *klass)
}
static void
-em_filter_source_element_init(EMFilterSourceElement *fs)
+em_filter_source_element_init (EMFilterSourceElement *fs)
{
- fs->priv = g_new(struct _EMFilterSourceElementPrivate, 1);
+ fs->priv = g_new (struct _EMFilterSourceElementPrivate, 1);
fs->priv->sources = NULL;
fs->priv->current_url = NULL;
}
static void
-em_filter_source_element_finalize(GObject *obj)
+em_filter_source_element_finalize (GObject *obj)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)obj;
GList *i = fs->priv->sources;
while (i) {
SourceInfo *info = i->data;
- g_free(info->account_name);
- g_free(info->name);
- g_free(info->address);
- g_free(info->url);
- g_free(info);
- i = g_list_next(i);
+ g_free (info->account_name);
+ g_free (info->name);
+ g_free (info->address);
+ g_free (info->url);
+ g_free (info);
+ i = g_list_next (i);
}
- g_list_free(fs->priv->sources);
- g_free(fs->priv->current_url);
+ g_list_free (fs->priv->sources);
+ g_free (fs->priv->current_url);
- g_free(fs->priv);
+ g_free (fs->priv);
- G_OBJECT_CLASS(parent_class)->finalize(obj);
+ G_OBJECT_CLASS (parent_class)->finalize (obj);
}
EMFilterSourceElement *
-em_filter_source_element_new(void)
+em_filter_source_element_new (void)
{
- return (EMFilterSourceElement *)g_object_new(em_filter_source_element_get_type(), NULL, NULL);
+ return (EMFilterSourceElement *)g_object_new (em_filter_source_element_get_type (), NULL, NULL);
}
static gint
-source_eq(EFilterElement *fe, EFilterElement *cm)
+source_eq (EFilterElement *fe, EFilterElement *cm)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe, *cs = (EMFilterSourceElement *)cm;
- return E_FILTER_ELEMENT_CLASS(parent_class)->eq(fe, cm)
+ return E_FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
&&((fs->priv->current_url && cs->priv->current_url
- && strcmp(fs->priv->current_url, cs->priv->current_url)== 0)
+ && strcmp (fs->priv->current_url, cs->priv->current_url)== 0)
||(fs->priv->current_url == NULL && cs->priv->current_url == NULL));
}
static void
-xml_create(EFilterElement *fe, xmlNodePtr node)
+xml_create (EFilterElement *fe, xmlNodePtr node)
{
/* Call parent implementation */
- E_FILTER_ELEMENT_CLASS(parent_class)->xml_create(fe, node);
+ E_FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node);
}
static xmlNodePtr
-xml_encode(EFilterElement *fe)
+xml_encode (EFilterElement *fe)
{
xmlNodePtr value;
@@ -186,7 +186,7 @@ xml_encode(EFilterElement *fe)
}
static gint
-xml_decode(EFilterElement *fe, xmlNodePtr node)
+xml_decode (EFilterElement *fe, xmlNodePtr node)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
CamelURL *url;
@@ -195,13 +195,13 @@ xml_decode(EFilterElement *fe, xmlNodePtr node)
node = node->children;
while (node != NULL) {
if (!strcmp((gchar *)node->name, "uri")) {
- uri = (gchar *)xmlNodeGetContent(node);
- url = camel_url_new(uri, NULL);
- xmlFree(uri);
+ uri = (gchar *)xmlNodeGetContent (node);
+ url = camel_url_new (uri, NULL);
+ xmlFree (uri);
- g_free(fs->priv->current_url);
- fs->priv->current_url = camel_url_to_string(url, CAMEL_URL_HIDE_ALL);
- camel_url_free(url);
+ g_free (fs->priv->current_url);
+ fs->priv->current_url = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
+ camel_url_free (url);
break;
}
@@ -212,26 +212,26 @@ xml_decode(EFilterElement *fe, xmlNodePtr node)
}
static EFilterElement *
-filter_clone(EFilterElement *fe)
+filter_clone (EFilterElement *fe)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
- EMFilterSourceElement *cpy = em_filter_source_element_new();
+ EMFilterSourceElement *cpy = em_filter_source_element_new ();
GList *i;
- ((EFilterElement *)cpy)->name = (gchar *)xmlStrdup((guchar *)fe->name);
+ ((EFilterElement *)cpy)->name = (gchar *)xmlStrdup ((guchar *)fe->name);
- cpy->priv->current_url = g_strdup(fs->priv->current_url);
+ cpy->priv->current_url = g_strdup (fs->priv->current_url);
- for (i = fs->priv->sources; i != NULL; i = g_list_next(i)) {
+ for (i = fs->priv->sources; i != NULL; i = g_list_next (i)) {
SourceInfo *info = (SourceInfo *)i->data;
- em_filter_source_element_add_source(cpy, info->account_name, info->name, info->address, info->url);
+ em_filter_source_element_add_source (cpy, info->account_name, info->name, info->address, info->url);
}
return (EFilterElement *)cpy;
}
static void
-source_changed(GtkComboBox *combobox, EMFilterSourceElement *fs)
+source_changed (GtkComboBox *combobox, EMFilterSourceElement *fs)
{
SourceInfo *info;
gint idx;
@@ -247,7 +247,7 @@ source_changed(GtkComboBox *combobox, EMFilterSourceElement *fs)
}
static GtkWidget *
-get_widget(EFilterElement *fe)
+get_widget (EFilterElement *fe)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
GtkWidget *combobox;
@@ -256,14 +256,14 @@ get_widget(EFilterElement *fe)
gint index, current_index;
if (fs->priv->sources == NULL)
- em_filter_source_element_get_sources(fs);
+ em_filter_source_element_get_sources (fs);
combobox = gtk_combo_box_new_text ();
index = 0;
current_index = -1;
- for (i = fs->priv->sources; i != NULL; i = g_list_next(i)) {
+ for (i = fs->priv->sources; i != NULL; i = g_list_next (i)) {
SourceInfo *info = (SourceInfo *)i->data;
gchar *label;
@@ -271,16 +271,16 @@ get_widget(EFilterElement *fe)
if (first == NULL)
first = info;
- if (info->account_name && strcmp(info->account_name, info->address))
+ if (info->account_name && strcmp (info->account_name, info->address))
label = g_strdup_printf("%s <%s>(%s)", info->name,
info->address, info->account_name);
else
label = g_strdup_printf("%s <%s>", info->name, info->address);
gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), label);
- g_free(label);
+ g_free (label);
- if (fs->priv->current_url && !strcmp(info->url, fs->priv->current_url))
+ if (fs->priv->current_url && !strcmp (info->url, fs->priv->current_url))
current_index = index;
index++;
@@ -291,10 +291,10 @@ get_widget(EFilterElement *fe)
gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), current_index);
} else {
gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0);
- g_free(fs->priv->current_url);
+ g_free (fs->priv->current_url);
if (first)
- fs->priv->current_url = g_strdup(first->url);
+ fs->priv->current_url = g_strdup (first->url);
else
fs->priv->current_url = NULL;
}
@@ -305,38 +305,38 @@ get_widget(EFilterElement *fe)
}
static void
-build_code(EFilterElement *fe, GString *out, EFilterPart *ff)
+build_code (EFilterElement *fe, GString *out, EFilterPart *ff)
{
/* We are doing nothing on purpose. */
}
static void
-format_sexp(EFilterElement *fe, GString *out)
+format_sexp (EFilterElement *fe, GString *out)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
- e_sexp_encode_string(out, fs->priv->current_url);
+ e_sexp_encode_string (out, fs->priv->current_url);
}
static void
-em_filter_source_element_add_source(EMFilterSourceElement *fs, const gchar *account_name, const gchar *name,
+em_filter_source_element_add_source (EMFilterSourceElement *fs, const gchar *account_name, const gchar *name,
const gchar *addr, const gchar *url)
{
SourceInfo *info;
- g_return_if_fail(EM_IS_FILTER_SOURCE_ELEMENT(fs));
+ g_return_if_fail (EM_IS_FILTER_SOURCE_ELEMENT (fs));
- info = g_new0(SourceInfo, 1);
- info->account_name = g_strdup(account_name);
- info->name = g_strdup(name);
- info->address = g_strdup(addr);
- info->url = g_strdup(url);
+ info = g_new0 (SourceInfo, 1);
+ info->account_name = g_strdup (account_name);
+ info->name = g_strdup (name);
+ info->address = g_strdup (addr);
+ info->url = g_strdup (url);
- fs->priv->sources = g_list_append(fs->priv->sources, info);
+ fs->priv->sources = g_list_append (fs->priv->sources, info);
}
static void
-em_filter_source_element_get_sources(EMFilterSourceElement *fs)
+em_filter_source_element_get_sources (EMFilterSourceElement *fs)
{
EAccountList *accounts;
const EAccount *account;
@@ -346,27 +346,27 @@ em_filter_source_element_get_sources(EMFilterSourceElement *fs)
CamelURL *url;
/* should this get the global object from mail? */
- gconf = gconf_client_get_default();
- accounts = e_account_list_new(gconf);
- g_object_unref(gconf);
+ gconf = gconf_client_get_default ();
+ accounts = e_account_list_new (gconf);
+ g_object_unref (gconf);
- for (it = e_list_get_iterator((EList *)accounts);
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
- account = (const EAccount *)e_iterator_get(it);
+ for (it = e_list_get_iterator ((EList *)accounts);
+ e_iterator_is_valid (it);
+ e_iterator_next (it)) {
+ account = (const EAccount *)e_iterator_get (it);
if (account->source == NULL || account->source->url == NULL || account->source->url[0] == 0)
continue;
- url = camel_url_new(account->source->url, NULL);
+ url = camel_url_new (account->source->url, NULL);
if (url) {
/* hide secret stuff */
- uri = camel_url_to_string(url, CAMEL_URL_HIDE_ALL);
- camel_url_free(url);
- em_filter_source_element_add_source(fs, account->name, account->id->name, account->id->address, uri);
- g_free(uri);
+ uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
+ camel_url_free (url);
+ em_filter_source_element_add_source (fs, account->name, account->id->name, account->id->address, uri);
+ g_free (uri);
}
}
- g_object_unref(it);
- g_object_unref(accounts);
+ g_object_unref (it);
+ g_object_unref (accounts);
}
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index 529472b47a..d79e3f7c7f 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -54,19 +54,19 @@ static void
emfp_dialog_response (GtkWidget *dialog, gint response, struct _prop_data *prop_data)
{
if (response == GTK_RESPONSE_OK)
- e_config_commit((EConfig *)prop_data->config);
+ e_config_commit ((EConfig *)prop_data->config);
else
- e_config_abort((EConfig *)prop_data->config);
+ e_config_abort ((EConfig *)prop_data->config);
gtk_widget_destroy (dialog);
}
static void
-emfp_free(EConfig *ec, GSList *items, gpointer data)
+emfp_free (EConfig *ec, GSList *items, gpointer data)
{
struct _prop_data *prop_data = data;
- g_slist_free(items);
+ g_slist_free (items);
camel_object_state_write (prop_data->object);
g_object_unref (prop_data->object);
@@ -104,7 +104,7 @@ add_numbered_row (GtkTable *table, gint row, const gchar *description, const gch
}
static GtkWidget *
-emfp_get_folder_item(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
+emfp_get_folder_item (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
GObjectClass *class;
GParamSpec **properties;
@@ -253,7 +253,7 @@ emfp_dialog_got_folder_quota (CamelFolder *folder,
Do the calculation only for those accounts that support VTRASHes
*/
if (parent_store->flags & CAMEL_STORE_VTRASH) {
- if (CAMEL_IS_VTRASH_FOLDER(folder))
+ if (CAMEL_IS_VTRASH_FOLDER (folder))
prop_data->total += deleted;
else if (!hide_deleted && deleted > 0)
prop_data->total += deleted;
@@ -307,12 +307,12 @@ emfp_dialog_got_folder_quota (CamelFolder *folder,
prop_data->config = ec;
l = NULL;
for (i = 0; i < G_N_ELEMENTS (emfp_items); i++)
- l = g_slist_prepend(l, &emfp_items[i]);
- e_config_add_items((EConfig *)ec, l, NULL, NULL, emfp_free, prop_data);
+ l = g_slist_prepend (l, &emfp_items[i]);
+ e_config_add_items ((EConfig *)ec, l, NULL, NULL, emfp_free, prop_data);
- target = em_config_target_new_folder(ec, folder, folder_uri);
- e_config_set_target((EConfig *)ec, (EConfigTarget *)target);
- w = e_config_create_widget((EConfig *)ec);
+ target = em_config_target_new_folder (ec, folder, folder_uri);
+ e_config_set_target ((EConfig *)ec, (EConfigTarget *)target);
+ w = e_config_create_widget ((EConfig *)ec);
gtk_box_pack_start (GTK_BOX (content_area), w, TRUE, TRUE, 0);
@@ -357,7 +357,7 @@ em_folder_properties_show (EShellView *shell_view,
/* MORE HACK: UNMATCHED is a special folder which you can't modify, so check for it here */
if (url == NULL
|| url->fragment == NULL
- || strcmp(url->fragment, CAMEL_UNMATCHED_NAME) != 0) {
+ || strcmp (url->fragment, CAMEL_UNMATCHED_NAME) != 0) {
if (url)
camel_url_free (url);
vfolder_edit_rule (uri);
@@ -368,7 +368,7 @@ em_folder_properties_show (EShellView *shell_view,
}
if (folder == NULL)
- mail_get_folder(uri, 0, emfp_dialog_got_folder, shell_view, mail_msg_unordered_push);
+ mail_get_folder (uri, 0, emfp_dialog_got_folder, shell_view, mail_msg_unordered_push);
else
- emfp_dialog_got_folder((gchar *)uri, folder, shell_view);
+ emfp_dialog_got_folder ((gchar *)uri, folder, shell_view);
}
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index 089daf4d44..e20b9f711b 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -134,9 +134,9 @@ emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs)
if (gtk_entry_get_text_length (emfs->name_entry) > 0)
text = gtk_entry_get_text (emfs->name_entry);
- path = em_folder_tree_get_selected_uri(emfs->emft);
+ path = em_folder_tree_get_selected_uri (emfs->emft);
active = text && path && !strchr (text, '/');
- g_free(path);
+ g_free (path);
gtk_dialog_set_response_sensitive ((GtkDialog *) emfs, GTK_RESPONSE_OK, active);
}
@@ -235,11 +235,11 @@ emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs)
const gchar *text;
text = gtk_entry_get_text (emfs->name_entry);
- path = em_folder_tree_get_selected_uri(emfs->emft);
+ path = em_folder_tree_get_selected_uri (emfs->emft);
if (text && path && !strchr (text, '/'))
g_signal_emit_by_name (emfs, "response", GTK_RESPONSE_OK);
- g_free(path);
+ g_free (path);
}
}
@@ -262,7 +262,7 @@ em_folder_selector_create_new (GtkWindow *parent,
EM_TYPE_FOLDER_SELECTOR,
"transient-for", parent, NULL);
em_folder_selector_construct (emfs, emft, flags, title, text, _("C_reate"));
- em_folder_tree_set_excluded(emft, EMFT_EXCLUDE_NOINFERIORS);
+ em_folder_tree_set_excluded (emft, EMFT_EXCLUDE_NOINFERIORS);
hbox = gtk_hbox_new (FALSE, 0);
w = gtk_label_new_with_mnemonic (_("Folder _name:"));
@@ -310,7 +310,7 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
CamelURL *url;
gchar *newpath;
- provider = camel_provider_get(uri, NULL);
+ provider = camel_provider_get (uri, NULL);
name = gtk_entry_get_text (emfs->name_entry);
@@ -326,10 +326,10 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
gchar *path;
path = g_strdup_printf("%s/%s", (url->path == NULL || strcmp(url->path, "/") == 0) ? "":url->path, name);
- camel_url_set_path(url, path);
+ camel_url_set_path (url, path);
if (path[0] == '/') {
- newpath = g_strdup(path+1);
- g_free(path);
+ newpath = g_strdup (path+1);
+ g_free (path);
} else
newpath = path;
}
@@ -369,13 +369,13 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs)
return emfs->selected_path;
}
- if ((uri = em_folder_tree_get_selected_uri(emfs->emft)) == NULL) {
+ if ((uri = em_folder_tree_get_selected_uri (emfs->emft)) == NULL) {
d(printf ("no selected folder?\n"));
return NULL;
}
- g_free(uri);
+ g_free (uri);
- path = em_folder_tree_get_selected_path(emfs->emft);
+ path = em_folder_tree_get_selected_path (emfs->emft);
if (emfs->name_entry) {
const gchar *name;
gchar *newpath;
@@ -383,10 +383,10 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs)
name = gtk_entry_get_text (emfs->name_entry);
newpath = g_strdup_printf ("%s/%s", path?path:"", name);
- g_free(path);
+ g_free (path);
emfs->selected_path = g_strdup (newpath);
} else {
- g_free(emfs->selected_path);
+ g_free (emfs->selected_path);
emfs->selected_path = path?path:g_strdup("");
}
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 82620f76ab..62e8e1b468 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -218,7 +218,7 @@ account_changed_cb (EAccountList *accounts,
if (!account->enabled ||!(uri = account->source->url))
return;
- if (!(provider = camel_provider_get(uri, NULL)))
+ if (!(provider = camel_provider_get (uri, NULL)))
return;
/* make sure the new store belongs in the tree */
@@ -717,7 +717,7 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model,
if (camel_store_folder_uri_equal (si->store, fi->uri, curi)) {
add_flags = CAMEL_FOLDER_TYPE_SENT;
}
- g_free(curi);
+ g_free (curi);
}
}
@@ -832,9 +832,9 @@ folder_subscribed (CamelStore *store,
goto done;
/* Get our parent folder's path. */
- dirname = g_alloca(strlen(fi->full_name)+1);
- strcpy(dirname, fi->full_name);
- p = strrchr(dirname, '/');
+ dirname = g_alloca (strlen (fi->full_name)+1);
+ strcpy (dirname, fi->full_name);
+ p = strrchr (dirname, '/');
if (p == NULL) {
/* User subscribed to a toplevel folder. */
reference = si->row;
@@ -998,7 +998,7 @@ folder_renamed (CamelStore *store,
em_folder_tree_model_remove_folders (model, si, &iter);
parent = g_strdup (info->new->full_name);
- p = strrchr(parent, '/');
+ p = strrchr (parent, '/');
if (p)
*p = 0;
if (p == NULL || parent == p)
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
index cc83aba990..f64f02dd09 100644
--- a/mail/em-folder-tree-model.h
+++ b/mail/em-folder-tree-model.h
@@ -117,7 +117,7 @@ GType em_folder_tree_model_get_type (void);
EMFolderTreeModel *
em_folder_tree_model_new (void);
EMFolderTreeModel *
- em_folder_tree_model_get_default(void);
+ em_folder_tree_model_get_default (void);
GtkTreeSelection *
em_folder_tree_model_get_selection
(EMFolderTreeModel *model);
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index fb373d0c18..4fb1615a96 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -187,9 +187,9 @@ folder_tree_get_folder_info__desc (struct _EMFolderTreeGetFolderInfo *m)
{
gchar *ret, *name;
- name = camel_service_get_name((CamelService *)m->store, TRUE);
+ name = camel_service_get_name ((CamelService *)m->store, TRUE);
ret = g_strdup_printf(_("Scanning folders in \"%s\""), name);
- g_free(name);
+ g_free (name);
return ret;
}
@@ -243,7 +243,7 @@ folder_tree_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m)
/* If we had an error, then we need to re-set the
* load subdirs state and collapse the node. */
if (!m->fi && m->base.error != NULL) {
- gtk_tree_store_set(
+ gtk_tree_store_set (
GTK_TREE_STORE (model), &root,
COL_BOOL_LOAD_SUBDIRS, TRUE, -1);
gtk_tree_view_collapse_row (tree_view, path);
@@ -335,7 +335,7 @@ folder_tree_get_folder_info__free (struct _EMFolderTreeGetFolderInfo *m)
camel_store_free_folder_info (m->store, m->fi);
gtk_tree_row_reference_free (m->root);
- g_object_unref(m->folder_tree);
+ g_object_unref (m->folder_tree);
g_object_unref (m->store);
g_free (m->top);
}
@@ -392,7 +392,7 @@ folder_tree_select_func (GtkTreeSelection *selection,
return TRUE;
if (priv->excluded_func != NULL)
- return priv->excluded_func(
+ return priv->excluded_func (
EM_FOLDER_TREE (tree_view), model,
&iter, priv->excluded_data);
@@ -418,15 +418,15 @@ folder_tree_select_uri (EMFolderTree *folder_tree,
tree_view = GTK_TREE_VIEW (folder_tree);
selection = gtk_tree_view_get_selection (tree_view);
- gtk_tree_selection_select_path(selection, path);
+ gtk_tree_selection_select_path (selection, path);
if (!priv->cursor_set) {
gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE);
priv->cursor_set = TRUE;
}
gtk_tree_view_scroll_to_cell (tree_view, path, NULL, TRUE, 0.8f, 0.0f);
- g_hash_table_remove(priv->select_uris_table, u->key);
- priv->select_uris = g_slist_remove(priv->select_uris, u);
- folder_tree_free_select_uri(u);
+ g_hash_table_remove (priv->select_uris_table, u->key);
+ priv->select_uris = g_slist_remove (priv->select_uris, u);
+ folder_tree_free_select_uri (u);
}
static void
@@ -496,9 +496,9 @@ folder_tree_expand_node (const gchar *key,
path = gtk_tree_row_reference_get_path (row);
gtk_tree_view_expand_to_path (tree_view, path);
- u = g_hash_table_lookup(folder_tree->priv->select_uris_table, key);
+ u = g_hash_table_lookup (folder_tree->priv->select_uris_table, key);
if (u)
- folder_tree_select_uri(folder_tree, path, u);
+ folder_tree_select_uri (folder_tree, path, u);
gtk_tree_path_free (path);
}
@@ -535,14 +535,14 @@ folder_tree_maybe_expand_row (EMFolderTreeModel *model,
key = g_strdup_printf ("local/%s", full_name ? full_name : "");
}
- u = g_hash_table_lookup(priv->select_uris_table, key);
+ u = g_hash_table_lookup (priv->select_uris_table, key);
if (u) {
gchar *c = strrchr (key, '/');
*c = '\0';
folder_tree_expand_node (key, folder_tree);
- folder_tree_select_uri(folder_tree, tree_path, u);
+ folder_tree_select_uri (folder_tree, tree_path, u);
}
g_free (full_name);
@@ -550,15 +550,15 @@ folder_tree_maybe_expand_row (EMFolderTreeModel *model,
}
static void
-folder_tree_clear_selected_list(EMFolderTree *folder_tree)
+folder_tree_clear_selected_list (EMFolderTree *folder_tree)
{
EMFolderTreePrivate *priv = folder_tree->priv;
- g_slist_foreach(priv->select_uris, (GFunc) folder_tree_free_select_uri, NULL);
- g_slist_free(priv->select_uris);
- g_hash_table_destroy(priv->select_uris_table);
+ g_slist_foreach (priv->select_uris, (GFunc) folder_tree_free_select_uri, NULL);
+ g_slist_free (priv->select_uris);
+ g_hash_table_destroy (priv->select_uris_table);
priv->select_uris = NULL;
- priv->select_uris_table = g_hash_table_new(g_str_hash, g_str_equal);
+ priv->select_uris_table = g_hash_table_new (g_str_hash, g_str_equal);
priv->cursor_set = FALSE;
}
@@ -1239,7 +1239,7 @@ folder_tree_new (EMFolderTree *folder_tree)
folder_tree_select_func, NULL, NULL);
gtk_tree_view_set_headers_visible ((GtkTreeView *) tree, FALSE);
- gtk_tree_view_set_search_column((GtkTreeView *)tree, COL_STRING_DISPLAY_NAME);
+ gtk_tree_view_set_search_column ((GtkTreeView *)tree, COL_STRING_DISPLAY_NAME);
return (GtkTreeView *) tree;
}
@@ -1526,10 +1526,10 @@ tree_drag_data_delete (GtkWidget *widget,
if (is_store)
goto fail;
- camel_store_delete_folder(store, full_name, NULL);
+ camel_store_delete_folder (store, full_name, NULL);
fail:
- gtk_tree_path_free(src_path);
+ gtk_tree_path_free (src_path);
g_free (full_name);
}
@@ -1549,7 +1549,7 @@ tree_drag_data_get (GtkWidget *widget,
CamelStore *store;
GtkTreeIter iter;
- if (!priv->drag_row || !(src_path = gtk_tree_row_reference_get_path(priv->drag_row)))
+ if (!priv->drag_row || !(src_path = gtk_tree_row_reference_get_path (priv->drag_row)))
return;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (folder_tree));
@@ -1576,20 +1576,20 @@ tree_drag_data_get (GtkWidget *widget,
break;
case DND_DRAG_TYPE_TEXT_URI_LIST:
/* dragging to nautilus or something, probably */
- if ((folder = camel_store_get_folder(store, full_name, 0, NULL))) {
- GPtrArray *uids = camel_folder_get_uids(folder);
+ if ((folder = camel_store_get_folder (store, full_name, 0, NULL))) {
+ GPtrArray *uids = camel_folder_get_uids (folder);
- em_utils_selection_set_urilist(selection, folder, uids);
- camel_folder_free_uids(folder, uids);
+ em_utils_selection_set_urilist (selection, folder, uids);
+ camel_folder_free_uids (folder, uids);
g_object_unref (folder);
}
break;
default:
- abort();
+ abort ();
}
fail:
- gtk_tree_path_free(src_path);
+ gtk_tree_path_free (src_path);
g_free (full_name);
g_free (uri);
}
@@ -1615,7 +1615,7 @@ struct _DragDataReceivedAsync {
};
static void
-folder_tree_drop_folder(struct _DragDataReceivedAsync *m)
+folder_tree_drop_folder (struct _DragDataReceivedAsync *m)
{
CamelFolder *folder;
CamelStore *parent_store;
@@ -1626,7 +1626,7 @@ folder_tree_drop_folder(struct _DragDataReceivedAsync *m)
d(printf(" * Drop folder '%s' onto '%s'\n", data, m->full_name));
- if (!(folder = mail_tool_uri_to_folder((gchar *)data, 0, &m->base.error)))
+ if (!(folder = mail_tool_uri_to_folder ((gchar *)data, 0, &m->base.error)))
return;
full_name = camel_folder_get_full_name (folder);
@@ -1683,7 +1683,7 @@ folder_tree_drop_async__exec (struct _DragDataReceivedAsync *m)
/* for types other than folder, we can't drop to the root path */
if (m->info == DND_DROP_TYPE_FOLDER) {
/* copy or move (aka rename) a folder */
- folder_tree_drop_folder(m);
+ folder_tree_drop_folder (m);
} else if (m->full_name == NULL) {
g_set_error (
&m->base.error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -1693,19 +1693,19 @@ folder_tree_drop_async__exec (struct _DragDataReceivedAsync *m)
switch (m->info) {
case DND_DROP_TYPE_UID_LIST:
/* import a list of uids from another evo folder */
- em_utils_selection_get_uidlist(m->selection, folder, m->move, &m->base.error);
+ em_utils_selection_get_uidlist (m->selection, folder, m->move, &m->base.error);
m->moved = m->move && (m->base.error == NULL);
break;
case DND_DROP_TYPE_MESSAGE_RFC822:
/* import a message/rfc822 stream */
- em_utils_selection_get_message(m->selection, folder);
+ em_utils_selection_get_message (m->selection, folder);
break;
case DND_DROP_TYPE_TEXT_URI_LIST:
/* import an mbox, maildir, or mh folder? */
- em_utils_selection_get_urilist(m->selection, folder);
+ em_utils_selection_get_urilist (m->selection, folder);
break;
default:
- abort();
+ abort ();
}
g_object_unref (folder);
}
@@ -1714,9 +1714,9 @@ folder_tree_drop_async__exec (struct _DragDataReceivedAsync *m)
static void
folder_tree_drop_async__free (struct _DragDataReceivedAsync *m)
{
- g_object_unref(m->context);
+ g_object_unref (m->context);
g_object_unref (m->store);
- g_free(m->full_name);
+ g_free (m->full_name);
gtk_selection_data_free (m->selection);
}
@@ -1729,7 +1729,7 @@ static MailMsgInfo folder_tree_drop_async_info = {
};
static void
-tree_drag_data_action(struct _DragDataReceivedAsync *m)
+tree_drag_data_action (struct _DragDataReceivedAsync *m)
{
m->move = m->action == GDK_ACTION_MOVE;
mail_msg_unordered_push (m);
@@ -1763,17 +1763,17 @@ tree_drag_data_received (GtkWidget *widget,
/* this means we are receiving no data */
if (gtk_selection_data_get_data (selection) == NULL) {
- gtk_drag_finish(context, FALSE, FALSE, GDK_CURRENT_TIME);
+ gtk_drag_finish (context, FALSE, FALSE, GDK_CURRENT_TIME);
return;
}
if (gtk_selection_data_get_length (selection) == -1) {
- gtk_drag_finish(context, FALSE, FALSE, GDK_CURRENT_TIME);
+ gtk_drag_finish (context, FALSE, FALSE, GDK_CURRENT_TIME);
return;
}
if (!gtk_tree_model_get_iter (model, &iter, dest_path)) {
- gtk_drag_finish(context, FALSE, FALSE, GDK_CURRENT_TIME);
+ gtk_drag_finish (context, FALSE, FALSE, GDK_CURRENT_TIME);
return;
}
@@ -1791,7 +1791,7 @@ tree_drag_data_received (GtkWidget *widget,
m = mail_msg_new (&folder_tree_drop_async_info);
m->context = context;
- g_object_ref(context);
+ g_object_ref (context);
m->store = store;
g_object_ref (store);
m->full_name = full_name;
@@ -1801,7 +1801,7 @@ tree_drag_data_received (GtkWidget *widget,
/* need to copy, goes away once we exit */
m->selection = gtk_selection_data_copy (selection);
- tree_drag_data_action(m);
+ tree_drag_data_action (m);
}
static gboolean
@@ -1870,7 +1870,7 @@ folder_tree_drop_target (EMFolderTree *folder_tree,
}
if (p->drag_row) {
- GtkTreePath *src_path = gtk_tree_row_reference_get_path(p->drag_row);
+ GtkTreePath *src_path = gtk_tree_row_reference_get_path (p->drag_row);
if (src_path) {
guint32 src_flags = 0;
@@ -1884,15 +1884,15 @@ folder_tree_drop_target (EMFolderTree *folder_tree,
/* can't dnd onto itself or below itself - bad things happen,
no point dragging to where we were either */
- if (gtk_tree_path_compare(path, src_path) == 0
- || gtk_tree_path_is_descendant(path, src_path)
- || (gtk_tree_path_is_ancestor(path, src_path)
- && gtk_tree_path_get_depth(path) == gtk_tree_path_get_depth(src_path)-1)) {
- gtk_tree_path_free(src_path);
+ if (gtk_tree_path_compare (path, src_path) == 0
+ || gtk_tree_path_is_descendant (path, src_path)
+ || (gtk_tree_path_is_ancestor (path, src_path)
+ && gtk_tree_path_get_depth (path) == gtk_tree_path_get_depth (src_path)-1)) {
+ gtk_tree_path_free (src_path);
goto done;
}
- gtk_tree_path_free(src_path);
+ gtk_tree_path_free (src_path);
if ((src_flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_INBOX ||
(src_flags & CAMEL_FOLDER_SYSTEM) != 0) {
@@ -1924,7 +1924,7 @@ folder_tree_drop_target (EMFolderTree *folder_tree,
/* FIXME: this is a total hack, but i think all we can do at present */
/* Check for dragging from special folders which can't be moved/copied */
- url = camel_url_new(src_uri, NULL);
+ url = camel_url_new (src_uri, NULL);
url_path = url->fragment?url->fragment:url->path;
if (url_path && url_path[0]) {
/* don't allow moving any of the the local special folders */
@@ -1958,15 +1958,15 @@ folder_tree_drop_target (EMFolderTree *folder_tree,
/* Don't allow copying/moving any vTrash/vJunk
* folder nor maildir 'inbox'. */
- if (strcmp(url_path, CAMEL_VTRASH_NAME) == 0
- || strcmp(url_path, CAMEL_VJUNK_NAME) == 0
+ if (strcmp (url_path, CAMEL_VTRASH_NAME) == 0
+ || strcmp (url_path, CAMEL_VJUNK_NAME) == 0
/* Dont allow drag from maildir 'inbox' */
|| strcmp(url_path, ".") == 0) {
- camel_url_free(url);
+ camel_url_free (url);
goto done;
}
}
- camel_url_free(url);
+ camel_url_free (url);
/* Search Folders can only be dropped into other Search Folders */
if (strncmp(src_uri, "vfolder:", 8) == 0) {
@@ -2270,7 +2270,7 @@ tree_drag_motion (GtkWidget *widget,
break;
}
- gdk_drag_status(context, chosen_action, time);
+ gdk_drag_status (context, chosen_action, time);
return chosen_action != 0;
}
@@ -2288,10 +2288,10 @@ em_folder_tree_enable_drag_and_drop (EMFolderTree *folder_tree)
if (!setup) {
for (i=0; i<NUM_DRAG_TYPES; i++)
- drag_atoms[i] = gdk_atom_intern(drag_types[i].target, FALSE);
+ drag_atoms[i] = gdk_atom_intern (drag_types[i].target, FALSE);
for (i=0; i<NUM_DROP_TYPES; i++)
- drop_atoms[i] = gdk_atom_intern(drop_types[i].target, FALSE);
+ drop_atoms[i] = gdk_atom_intern (drop_types[i].target, FALSE);
setup = 1;
}
@@ -2362,23 +2362,23 @@ em_folder_tree_get_selected_uris (EMFolderTree *folder_tree)
selection = gtk_tree_view_get_selection (tree_view);
/* at first, add lost uris */
- for (sl = folder_tree->priv->select_uris; sl; sl = g_slist_next(sl))
+ for (sl = folder_tree->priv->select_uris; sl; sl = g_slist_next (sl))
list = g_list_append (list, g_strdup (((struct _selected_uri *)sl->data)->uri));
- rows = gtk_tree_selection_get_selected_rows(selection, &model);
- for (l=rows; l; l=g_list_next(l)) {
+ rows = gtk_tree_selection_get_selected_rows (selection, &model);
+ for (l=rows; l; l=g_list_next (l)) {
GtkTreeIter iter;
GtkTreePath *path = l->data;
- if (gtk_tree_model_get_iter(model, &iter, path)) {
+ if (gtk_tree_model_get_iter (model, &iter, path)) {
gchar *uri;
- gtk_tree_model_get(model, &iter, COL_STRING_URI, &uri, -1);
+ gtk_tree_model_get (model, &iter, COL_STRING_URI, &uri, -1);
list = g_list_prepend (list, uri);
}
- gtk_tree_path_free(path);
+ gtk_tree_path_free (path);
}
- g_list_free(rows);
+ g_list_free (rows);
return g_list_reverse (list);
}
@@ -2422,22 +2422,22 @@ em_folder_tree_set_selected_list (EMFolderTree *folder_tree,
/* FIXME: need to remove any currently selected stuff? */
if (!expand_only)
- folder_tree_clear_selected_list(folder_tree);
+ folder_tree_clear_selected_list (folder_tree);
for (;list;list = list->next) {
- struct _selected_uri *u = g_malloc0(sizeof(*u));
+ struct _selected_uri *u = g_malloc0 (sizeof (*u));
CamelURL *url;
- u->uri = g_strdup(list->data);
+ u->uri = g_strdup (list->data);
u->store = (CamelStore *) camel_session_get_service (
session, u->uri, CAMEL_PROVIDER_STORE, NULL);
- url = camel_url_new(u->uri, NULL);
+ url = camel_url_new (u->uri, NULL);
if (u->store == NULL || url == NULL) {
if (!expand_only) {
u->key = g_strdup_printf("dummy-%d:%s", id++, u->uri);
- g_hash_table_insert(priv->select_uris_table, u->key, u);
- priv->select_uris = g_slist_append(priv->select_uris, u);
+ g_hash_table_insert (priv->select_uris_table, u->key, u);
+ priv->select_uris = g_slist_append (priv->select_uris, u);
}
} else {
const gchar *path;
@@ -2454,7 +2454,7 @@ em_folder_tree_set_selected_list (EMFolderTree *folder_tree,
/* This makes sure all our parents up to the root are
* expanded. FIXME: Why does the expanded state store
* this made up path rather than the euri? */
- if ((account = mail_config_get_account_by_source_url(u->uri)))
+ if ((account = mail_config_get_account_by_source_url (u->uri)))
expand_key = g_strdup_printf ("%s/%s", account->uid, path);
else if (CAMEL_IS_VEE_STORE (u->store))
expand_key = g_strdup_printf ("vfolder/%s", path);
@@ -2462,23 +2462,23 @@ em_folder_tree_set_selected_list (EMFolderTree *folder_tree,
expand_key = g_strdup_printf ("local/%s", path);
if (!expand_only) {
- u->key = g_strdup(expand_key);
+ u->key = g_strdup (expand_key);
- g_hash_table_insert(priv->select_uris_table, u->key, u);
- priv->select_uris = g_slist_append(priv->select_uris, u);
+ g_hash_table_insert (priv->select_uris_table, u->key, u);
+ priv->select_uris = g_slist_append (priv->select_uris, u);
}
- end = strrchr(expand_key, '/');
+ end = strrchr (expand_key, '/');
do {
- folder_tree_expand_node(expand_key, folder_tree);
+ folder_tree_expand_node (expand_key, folder_tree);
*end = 0;
- end = strrchr(expand_key, '/');
+ end = strrchr (expand_key, '/');
} while (end);
- g_free(expand_key);
+ g_free (expand_key);
}
if (url)
- camel_url_free(url);
+ camel_url_free (url);
}
}
@@ -2512,10 +2512,10 @@ em_folder_tree_set_selected (EMFolderTree *folder_tree,
g_return_if_fail (EM_IS_FOLDER_TREE (folder_tree));
if (uri && uri[0])
- l = g_list_append(l, (gpointer)uri);
+ l = g_list_append (l, (gpointer)uri);
- em_folder_tree_set_selected_list(folder_tree, l, expand_only);
- g_list_free(l);
+ em_folder_tree_set_selected_list (folder_tree, l, expand_only);
+ g_list_free (l);
}
void
@@ -2532,8 +2532,8 @@ em_folder_tree_select_next_path (EMFolderTree *folder_tree, gboolean skip_read_f
g_return_if_fail (EM_IS_FOLDER_TREE (folder_tree));
tree_view = GTK_TREE_VIEW (folder_tree);
- selection = gtk_tree_view_get_selection(tree_view);
- if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
+ selection = gtk_tree_view_get_selection (tree_view);
+ if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
current_path = gtk_tree_model_get_path (model, &iter);
@@ -2571,7 +2571,7 @@ em_folder_tree_select_next_path (EMFolderTree *folder_tree, gboolean skip_read_f
if (!gtk_tree_view_row_expanded (tree_view, path))
gtk_tree_view_expand_to_path (tree_view, path);
- gtk_tree_selection_select_path(selection, path);
+ gtk_tree_selection_select_path (selection, path);
if (!priv->cursor_set) {
gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE);
@@ -2792,7 +2792,7 @@ em_folder_tree_get_selected_folder (EMFolderTree *folder_tree)
tree_view = GTK_TREE_VIEW (folder_tree);
selection = gtk_tree_view_get_selection (tree_view);
- if (gtk_tree_selection_get_selected(selection, &model, &iter))
+ if (gtk_tree_selection_get_selected (selection, &model, &iter))
gtk_tree_model_get (model, &iter, COL_POINTER_CAMEL_STORE, &store,
COL_STRING_FULL_NAME, &full_name, -1);
@@ -2821,7 +2821,7 @@ em_folder_tree_get_selected_folder_info (EMFolderTree *folder_tree)
tree_view = GTK_TREE_VIEW (folder_tree);
selection = gtk_tree_view_get_selection (tree_view);
- if (gtk_tree_selection_get_selected(selection, &model, &iter))
+ if (gtk_tree_selection_get_selected (selection, &model, &iter))
gtk_tree_model_get (model, &iter, COL_POINTER_CAMEL_STORE, &store,
COL_STRING_FULL_NAME, &full_name,
COL_STRING_DISPLAY_NAME, &name,
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
index 0da27d3926..18c644bfda 100644
--- a/mail/em-folder-tree.h
+++ b/mail/em-folder-tree.h
@@ -94,13 +94,13 @@ void em_folder_tree_enable_drag_and_drop
(EMFolderTree *folder_tree);
void em_folder_tree_set_excluded (EMFolderTree *folder_tree,
guint32 flags);
-void em_folder_tree_set_excluded_func(EMFolderTree *folder_tree,
+void em_folder_tree_set_excluded_func (EMFolderTree *folder_tree,
EMFTExcludeFunc exclude,
gpointer data);
-void em_folder_tree_set_selected_list(EMFolderTree *folder_tree,
+void em_folder_tree_set_selected_list (EMFolderTree *folder_tree,
GList *list,
gboolean expand_only);
-GList * em_folder_tree_get_selected_uris(EMFolderTree *folder_tree);
+GList * em_folder_tree_get_selected_uris (EMFolderTree *folder_tree);
GList * em_folder_tree_get_selected_paths
(EMFolderTree *folder_tree);
void em_folder_tree_set_selected (EMFolderTree *folder_tree,
@@ -112,7 +112,7 @@ void em_folder_tree_select_prev_path (EMFolderTree *folder_tree,
gboolean skip_read_folders);
void em_folder_tree_edit_selected (EMFolderTree *folder_tree);
gchar * em_folder_tree_get_selected_uri (EMFolderTree *folder_tree);
-gchar * em_folder_tree_get_selected_path(EMFolderTree *folder_tree);
+gchar * em_folder_tree_get_selected_path (EMFolderTree *folder_tree);
CamelFolder * em_folder_tree_get_selected_folder
(EMFolderTree *folder_tree);
CamelFolderInfo *
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index c7fee4b27c..5bcc0326b6 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -180,7 +180,7 @@ emft_copy_folders__exec (struct _EMCopyFolders *m)
camel_folder_free_uids (fromfolder, uids);
if (m->delete && m->base.error == NULL)
- camel_folder_sync(fromfolder, TRUE, NULL);
+ camel_folder_sync (fromfolder, TRUE, NULL);
g_object_unref (fromfolder);
g_object_unref (tofolder);
@@ -246,7 +246,7 @@ static MailMsgInfo copy_folders_info = {
};
gint
-em_folder_utils_copy_folders(CamelStore *fromstore, const gchar *frombase, CamelStore *tostore, const gchar *tobase, gint delete)
+em_folder_utils_copy_folders (CamelStore *fromstore, const gchar *frombase, CamelStore *tostore, const gchar *tobase, gint delete)
{
struct _EMCopyFolders *m;
gint seq;
@@ -329,7 +329,7 @@ emfu_copy_folder_selected (const gchar *uri, gpointer data)
if (tobase == NULL)
tobase = "";
- em_folder_utils_copy_folders(fromstore, cfd->fi->full_name, tostore, tobase, cfd->delete);
+ em_folder_utils_copy_folders (fromstore, cfd->fi->full_name, tostore, tobase, cfd->delete);
camel_url_free (url);
fail:
@@ -345,7 +345,7 @@ fail:
/* tree here is the 'destination' selector, not 'self' */
static gboolean
-emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
+emfu_copy_folder_exclude (EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
{
struct _copy_folder_data *cfd = data;
gint fromvfolder, tovfolder;
@@ -356,9 +356,9 @@ emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *i
/* handles moving to/from vfolders */
fromvfolder = strncmp(cfd->fi->uri, "vfolder:", 8) == 0;
- gtk_tree_model_get(model, iter, COL_STRING_URI, &touri, COL_UINT_FLAGS, &flags, COL_BOOL_IS_STORE, &is_store, -1);
+ gtk_tree_model_get (model, iter, COL_STRING_URI, &touri, COL_UINT_FLAGS, &flags, COL_BOOL_IS_STORE, &is_store, -1);
tovfolder = strncmp(touri, "vfolder:", 8) == 0;
- g_free(touri);
+ g_free (touri);
/* moving from vfolder to normal- not allowed */
if (fromvfolder && !tovfolder && cfd->delete)
@@ -650,23 +650,23 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs, gint response, gpointer
EM_FOLDER_TREE_MODEL (model), store);
if (si == NULL) {
g_object_unref (store);
- g_return_if_reached();
+ g_return_if_reached ();
}
/* HACK: we need to create vfolders using the vfolder editor */
- if (CAMEL_IS_VEE_STORE(store)) {
+ if (CAMEL_IS_VEE_STORE (store)) {
EMVFolderRule *rule;
/* ensures vfolder is running */
vfolder_load_storage ();
- rule = em_vfolder_rule_new();
- e_filter_rule_set_name((EFilterRule *)rule, path);
- vfolder_gui_add_rule(rule);
- gtk_widget_destroy((GtkWidget *)emfs);
+ rule = em_vfolder_rule_new ();
+ e_filter_rule_set_name ((EFilterRule *)rule, path);
+ vfolder_gui_add_rule (rule);
+ gtk_widget_destroy ((GtkWidget *)emfs);
} else {
/* Temp data to pass to create_folder_real function */
- emcftd = (struct _EMCreateFolderTempData *) g_malloc(sizeof(struct _EMCreateFolderTempData));
+ emcftd = (struct _EMCreateFolderTempData *) g_malloc (sizeof (struct _EMCreateFolderTempData));
emcftd->emfs = emfs;
emcftd->uri = g_strdup (uri);
emcftd->emft = (EMFolderTree *) data;
diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c
index cab253f24a..5bc81aa2b4 100644
--- a/mail/em-format-hook.c
+++ b/mail/em-format-hook.c
@@ -76,39 +76,39 @@ emfh_format_format (EMFormat *md,
md, stream, part, item
};
- e_plugin_invoke(item->hook->hook.plugin, item->format, &target);
+ e_plugin_invoke (item->hook->hook.plugin, item->format, &target);
} else if (info->old) {
- info->old->handler(md, stream, part, info->old, FALSE);
+ info->old->handler (md, stream, part, info->old, FALSE);
}
}
static void
-emfh_free_item(struct _EMFormatHookItem *item)
+emfh_free_item (struct _EMFormatHookItem *item)
{
/* FIXME: remove from formatter class */
- g_free(item->handler.mime_type);
- g_free(item->format);
- g_free(item);
+ g_free (item->handler.mime_type);
+ g_free (item->format);
+ g_free (item);
}
static void
-emfh_free_group(struct _EMFormatHookGroup *group)
+emfh_free_group (struct _EMFormatHookGroup *group)
{
- g_slist_foreach(group->items, (GFunc)emfh_free_item, NULL);
- g_slist_free(group->items);
+ g_slist_foreach (group->items, (GFunc)emfh_free_item, NULL);
+ g_slist_free (group->items);
- g_free(group->id);
- g_free(group);
+ g_free (group->id);
+ g_free (group);
}
static struct _EMFormatHookItem *
-emfh_construct_item(EPluginHook *eph, EMFormatHookGroup *group, xmlNodePtr root)
+emfh_construct_item (EPluginHook *eph, EMFormatHookGroup *group, xmlNodePtr root)
{
struct _EMFormatHookItem *item;
d(printf(" loading group item\n"));
- item = g_malloc0(sizeof(*item));
+ item = g_malloc0 (sizeof (*item));
item->handler.mime_type = e_plugin_xml_prop(root, "mime_type");
item->handler.flags = e_plugin_hook_mask(root, emfh_flag_map, "flags");
@@ -125,18 +125,18 @@ emfh_construct_item(EPluginHook *eph, EMFormatHookGroup *group, xmlNodePtr root)
return item;
error:
d(printf("error!\n"));
- emfh_free_item(item);
+ emfh_free_item (item);
return NULL;
}
static struct _EMFormatHookGroup *
-emfh_construct_group(EPluginHook *eph, xmlNodePtr root)
+emfh_construct_group (EPluginHook *eph, xmlNodePtr root)
{
struct _EMFormatHookGroup *group;
xmlNodePtr node;
d(printf(" loading group\n"));
- group = g_malloc0(sizeof(*group));
+ group = g_malloc0 (sizeof (*group));
group->id = e_plugin_xml_prop(root, "id");
if (group->id == NULL)
@@ -147,27 +147,27 @@ emfh_construct_group(EPluginHook *eph, xmlNodePtr root)
if (0 == strcmp((gchar *)node->name, "item")) {
struct _EMFormatHookItem *item;
- item = emfh_construct_item(eph, group, node);
+ item = emfh_construct_item (eph, group, node);
if (item)
- group->items = g_slist_append(group->items, item);
+ group->items = g_slist_append (group->items, item);
}
node = node->next;
}
return group;
error:
- emfh_free_group(group);
+ emfh_free_group (group);
return NULL;
}
static gint
-emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
+emfh_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
{
xmlNodePtr node;
d(printf("loading format hook\n"));
- if (((EPluginHookClass *)emfh_parent_class)->construct(eph, ep, root) == -1)
+ if (((EPluginHookClass *)emfh_parent_class)->construct (eph, ep, root) == -1)
return -1;
node = root->children;
@@ -175,26 +175,26 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
if (strcmp((gchar *)node->name, "group") == 0) {
struct _EMFormatHookGroup *group;
- group = emfh_construct_group(eph, node);
+ group = emfh_construct_group (eph, node);
if (group) {
EMFormatClass *klass;
if (emfh_types
- && (klass = g_hash_table_lookup(emfh_types, group->id))) {
+ && (klass = g_hash_table_lookup (emfh_types, group->id))) {
GSList *l = group->items;
- for (;l;l=g_slist_next(l)) {
+ for (;l;l=g_slist_next (l)) {
EMFormatHookItem *item = l->data;
/* TODO: only add handlers if enabled? */
/* Well, disabling is handled by the callback,
* if we leave as is, then we can enable the
* plugin after startup and it will start
* working automagically */
- em_format_class_add_handler(klass, &item->handler);
+ em_format_class_add_handler (klass, &item->handler);
}
}
/* We don't actually need to keep this around once its set on the class */
- emfh->groups = g_slist_append(emfh->groups, group);
+ emfh->groups = g_slist_append (emfh->groups, group);
}
}
node = node->next;
@@ -203,12 +203,12 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
eph->plugin = ep;
/* Load the plugin as it does a few thing in the formatter thread. */
- ((EPluginClass *)G_OBJECT_GET_CLASS(ep))->enable (ep, 1);
+ ((EPluginClass *)G_OBJECT_GET_CLASS (ep))->enable (ep, 1);
return 0;
}
static void
-emfh_enable(EPluginHook *eph, gint state)
+emfh_enable (EPluginHook *eph, gint state)
{
GSList *g, *l;
EMFormatClass *klass;
@@ -217,34 +217,34 @@ emfh_enable(EPluginHook *eph, gint state)
if (emfh_types == NULL)
return;
- for (;g;g=g_slist_next(g)) {
+ for (;g;g=g_slist_next (g)) {
struct _EMFormatHookGroup *group = g->data;
- klass = g_hash_table_lookup(emfh_types, group->id);
- for (l=group->items;l;l=g_slist_next(l)) {
+ klass = g_hash_table_lookup (emfh_types, group->id);
+ for (l=group->items;l;l=g_slist_next (l)) {
EMFormatHookItem *item = l->data;
if (state)
- em_format_class_add_handler(klass, &item->handler);
+ em_format_class_add_handler (klass, &item->handler);
else
- em_format_class_remove_handler(klass, &item->handler);
+ em_format_class_remove_handler (klass, &item->handler);
}
}
}
static void
-emfh_finalise(GObject *o)
+emfh_finalise (GObject *o)
{
EPluginHook *eph = (EPluginHook *)o;
- g_slist_foreach(emfh->groups, (GFunc)emfh_free_group, NULL);
- g_slist_free(emfh->groups);
+ g_slist_foreach (emfh->groups, (GFunc)emfh_free_group, NULL);
+ g_slist_free (emfh->groups);
- ((GObjectClass *)emfh_parent_class)->finalize(o);
+ ((GObjectClass *)emfh_parent_class)->finalize (o);
}
static void
-emfh_class_init(EPluginHookClass *klass)
+emfh_class_init (EPluginHookClass *klass)
{
((GObjectClass *)klass)->finalize = emfh_finalise;
klass->construct = emfh_construct;
@@ -253,32 +253,32 @@ emfh_class_init(EPluginHookClass *klass)
}
GType
-em_format_hook_get_type(void)
+em_format_hook_get_type (void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo info = {
- sizeof(EMFormatHookClass), NULL, NULL, (GClassInitFunc) emfh_class_init, NULL, NULL,
- sizeof(EMFormatHook), 0, (GInstanceInitFunc) NULL,
+ sizeof (EMFormatHookClass), NULL, NULL, (GClassInitFunc) emfh_class_init, NULL, NULL,
+ sizeof (EMFormatHook), 0, (GInstanceInitFunc) NULL,
};
- emfh_parent_class = g_type_class_ref(e_plugin_hook_get_type());
+ emfh_parent_class = g_type_class_ref (e_plugin_hook_get_type ());
type = g_type_register_static(e_plugin_hook_get_type(), "EMFormatHook", &info, 0);
}
return type;
}
-void em_format_hook_register_type(GType type)
+void em_format_hook_register_type (GType type)
{
EMFormatClass *klass;
if (emfh_types == NULL)
- emfh_types = g_hash_table_new(g_str_hash, g_str_equal);
+ emfh_types = g_hash_table_new (g_str_hash, g_str_equal);
d(printf("registering formatter type '%s'\n", g_type_name(type)));
- klass = g_type_class_ref(type);
- g_hash_table_insert(emfh_types, (gpointer)g_type_name(type), klass);
+ klass = g_type_class_ref (type);
+ g_hash_table_insert (emfh_types, (gpointer)g_type_name (type), klass);
}
diff --git a/mail/em-format-hook.h b/mail/em-format-hook.h
index c03a826731..ad0745bc2e 100644
--- a/mail/em-format-hook.h
+++ b/mail/em-format-hook.h
@@ -80,10 +80,10 @@ struct _EMFormatHookClass {
GHashTable *format_classes;
};
-GType em_format_hook_get_type(void);
+GType em_format_hook_get_type (void);
/* register a type as a possible formatter hook point */
-void em_format_hook_register_type(GType type);
+void em_format_hook_register_type (GType type);
G_END_DECLS
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index b2661b67c0..aab7ef84c2 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -108,8 +108,8 @@ static const gchar *smime_sign_colour[5] = {
"", " bgcolor=\"#88bb88\"", " bgcolor=\"#bb8888\"", " bgcolor=\"#e8d122\"",""
};
-static void efhd_attachment_frame(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri);
-static void efhd_message_add_bar(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info);
+static void efhd_attachment_frame (EMFormat *emf, CamelStream *stream, EMFormatPURI *puri);
+static void efhd_message_add_bar (EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info);
static gboolean efhd_attachment_button (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject);
static gboolean efhd_attachment_optional (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *object);
@@ -146,9 +146,9 @@ struct _attach_puri {
camel_cipher_validity_encrypt_t encrypt;
};
-static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info);
+static void efhd_message_prefix (EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info);
-static void efhd_builtin_init(EMFormatHTMLDisplayClass *efhc);
+static void efhd_builtin_init (EMFormatHTMLDisplayClass *efhc);
static gpointer parent_class;
@@ -158,8 +158,8 @@ efhd_xpkcs7mime_free (EMFormatHTMLPObject *o)
struct _smime_pobject *po = (struct _smime_pobject *)o;
if (po->widget)
- gtk_widget_destroy(po->widget);
- camel_cipher_validity_free(po->valid);
+ gtk_widget_destroy (po->widget);
+ camel_cipher_validity_free (po->valid);
}
static void
@@ -183,16 +183,16 @@ efhd_xpkcs7mime_viewcert_clicked (GtkWidget *button,
ec = e_cert_new (CERT_DupCertificate (info->cert_data));
if (ec != NULL) {
- GtkWidget *w = certificate_viewer_show(ec);
+ GtkWidget *w = certificate_viewer_show (ec);
/* oddly enough certificate_viewer_show doesn't ... */
- gtk_widget_show(w);
+ gtk_widget_show (w);
g_signal_connect(w, "response", G_CALLBACK(gtk_widget_destroy), NULL);
if (w && po->widget)
gtk_window_set_transient_for ((GtkWindow *)w, (GtkWindow *)po->widget);
- g_object_unref(ec);
+ g_object_unref (ec);
} else {
g_warning("can't find certificate for %s <%s>", info->name?info->name:"", info->email?info->email:"");
}
@@ -205,7 +205,7 @@ efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox,
struct _smime_pobject *po)
{
CamelCipherCertInfo *info = (CamelCipherCertInfo *)certlist->head;
- GtkTable *table = (GtkTable *)gtk_table_new(camel_dlist_length(certlist), 2, FALSE);
+ GtkTable *table = (GtkTable *)gtk_table_new (camel_dlist_length (certlist), 2, FALSE);
gint n = 0;
while (info->next) {
@@ -213,7 +213,7 @@ efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox,
const gchar *l = NULL;
if (info->name) {
- if (info->email && strcmp(info->name, info->email) != 0)
+ if (info->email && strcmp (info->name, info->email) != 0)
l = la = g_strdup_printf("%s <%s>", info->name, info->email);
else
l = info->name;
@@ -227,13 +227,13 @@ efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox,
#if defined(HAVE_NSS)
ECert *ec = NULL;
#endif
- w = gtk_label_new(l);
- gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.5);
- g_free(la);
- gtk_table_attach(table, w, 0, 1, n, n+1, GTK_FILL, GTK_FILL, 3, 3);
+ w = gtk_label_new (l);
+ gtk_misc_set_alignment ((GtkMisc *)w, 0.0, 0.5);
+ g_free (la);
+ gtk_table_attach (table, w, 0, 1, n, n+1, GTK_FILL, GTK_FILL, 3, 3);
#if defined(HAVE_NSS)
w = gtk_button_new_with_mnemonic(_("_View Certificate"));
- gtk_table_attach(table, w, 1, 2, n, n+1, 0, 0, 3, 3);
+ gtk_table_attach (table, w, 1, 2, n, n+1, 0, 0, 3, 3);
g_object_set_data((GObject *)w, "e-cert-info", info);
g_signal_connect(w, "clicked", G_CALLBACK(efhd_xpkcs7mime_viewcert_clicked), po);
@@ -241,12 +241,12 @@ efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox,
ec = e_cert_new (CERT_DupCertificate (info->cert_data));
if (ec == NULL)
- gtk_widget_set_sensitive(w, FALSE);
+ gtk_widget_set_sensitive (w, FALSE);
else
- g_object_unref(ec);
+ g_object_unref (ec);
#else
w = gtk_label_new (_("This certificate is not viewable"));
- gtk_table_attach(table, w, 1, 2, n, n+1, 0, 0, 3, 3);
+ gtk_table_attach (table, w, 1, 2, n, n+1, 0, 0, 3, 3);
#endif
n++;
}
@@ -254,7 +254,7 @@ efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox,
info = info->next;
}
- gtk_box_pack_start((GtkBox *)vbox, (GtkWidget *)table, TRUE, TRUE, 6);
+ gtk_box_pack_start ((GtkBox *)vbox, (GtkWidget *)table, TRUE, TRUE, 6);
}
static void
@@ -276,15 +276,15 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button,
vbox = e_builder_get_widget(builder, "signature_vbox");
w = gtk_label_new (_(smime_sign_table[po->valid->sign.status].description));
- gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.5);
- gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
- gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
+ gtk_misc_set_alignment ((GtkMisc *)w, 0.0, 0.5);
+ gtk_label_set_line_wrap ((GtkLabel *)w, TRUE);
+ gtk_box_pack_start ((GtkBox *)vbox, w, TRUE, TRUE, 6);
if (po->valid->sign.description) {
GtkTextBuffer *buffer;
- buffer = gtk_text_buffer_new(NULL);
- gtk_text_buffer_set_text(buffer, po->valid->sign.description, strlen(po->valid->sign.description));
- w = g_object_new(gtk_scrolled_window_get_type(),
+ buffer = gtk_text_buffer_new (NULL);
+ gtk_text_buffer_set_text (buffer, po->valid->sign.description, strlen (po->valid->sign.description));
+ w = g_object_new (gtk_scrolled_window_get_type (),
"hscrollbar_policy", GTK_POLICY_AUTOMATIC,
"vscrollbar_policy", GTK_POLICY_AUTOMATIC,
"shadow_type", GTK_SHADOW_IN,
@@ -296,27 +296,27 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button,
"height_request", 160,
NULL),
NULL);
- g_object_unref(buffer);
+ g_object_unref (buffer);
- gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
+ gtk_box_pack_start ((GtkBox *)vbox, w, TRUE, TRUE, 6);
}
- if (!camel_dlist_empty(&po->valid->sign.signers))
- efhd_xpkcs7mime_add_cert_table(vbox, &po->valid->sign.signers, po);
+ if (!camel_dlist_empty (&po->valid->sign.signers))
+ efhd_xpkcs7mime_add_cert_table (vbox, &po->valid->sign.signers, po);
- gtk_widget_show_all(vbox);
+ gtk_widget_show_all (vbox);
vbox = e_builder_get_widget(builder, "encryption_vbox");
- w = gtk_label_new(_(smime_encrypt_table[po->valid->encrypt.status].description));
- gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.5);
- gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
- gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
+ w = gtk_label_new (_(smime_encrypt_table[po->valid->encrypt.status].description));
+ gtk_misc_set_alignment ((GtkMisc *)w, 0.0, 0.5);
+ gtk_label_set_line_wrap ((GtkLabel *)w, TRUE);
+ gtk_box_pack_start ((GtkBox *)vbox, w, TRUE, TRUE, 6);
if (po->valid->encrypt.description) {
GtkTextBuffer *buffer;
- buffer = gtk_text_buffer_new(NULL);
- gtk_text_buffer_set_text(buffer, po->valid->encrypt.description, strlen(po->valid->encrypt.description));
- w = g_object_new(gtk_scrolled_window_get_type(),
+ buffer = gtk_text_buffer_new (NULL);
+ gtk_text_buffer_set_text (buffer, po->valid->encrypt.description, strlen (po->valid->encrypt.description));
+ w = g_object_new (gtk_scrolled_window_get_type (),
"hscrollbar_policy", GTK_POLICY_AUTOMATIC,
"vscrollbar_policy", GTK_POLICY_AUTOMATIC,
"shadow_type", GTK_SHADOW_IN,
@@ -328,20 +328,20 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button,
"height_request", 160,
NULL),
NULL);
- g_object_unref(buffer);
+ g_object_unref (buffer);
- gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
+ gtk_box_pack_start ((GtkBox *)vbox, w, TRUE, TRUE, 6);
}
- if (!camel_dlist_empty(&po->valid->encrypt.encrypters))
- efhd_xpkcs7mime_add_cert_table(vbox, &po->valid->encrypt.encrypters, po);
+ if (!camel_dlist_empty (&po->valid->encrypt.encrypters))
+ efhd_xpkcs7mime_add_cert_table (vbox, &po->valid->encrypt.encrypters, po);
- gtk_widget_show_all(vbox);
+ gtk_widget_show_all (vbox);
- g_object_unref(builder);
+ g_object_unref (builder);
g_signal_connect(po->widget, "response", G_CALLBACK(efhd_xpkcs7mime_info_response), po);
- gtk_widget_show(po->widget);
+ gtk_widget_show (po->widget);
}
static gboolean
@@ -508,7 +508,7 @@ efhd_format_optional (EMFormat *emf,
stream, "<td><object classid=\"%s\"></object>"
"</td></tr></table>", classid);
- g_free(html);
+ g_free (html);
camel_stream_write_string (stream, EM_FORMAT_HTML_VPAD, NULL);
@@ -543,7 +543,7 @@ efhd_format_secure (EMFormat *emf,
pobj = (struct _smime_pobject *) em_format_html_add_pobject (
EM_FORMAT_HTML (emf), sizeof (*pobj),
classid, part, efhd_xpkcs7mime_button);
- pobj->valid = camel_cipher_validity_clone(valid);
+ pobj->valid = camel_cipher_validity_clone (valid);
pobj->object.free = efhd_xpkcs7mime_free;
camel_stream_printf (
stream, "<td valign=center><object classid=\"%s\">"
@@ -665,27 +665,27 @@ static EMFormatHandler type_builtin_table[] = {
};
static void
-efhd_builtin_init(EMFormatHTMLDisplayClass *efhc)
+efhd_builtin_init (EMFormatHTMLDisplayClass *efhc)
{
gint i;
for (i = 0; i < G_N_ELEMENTS (type_builtin_table); i++)
- em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
+ em_format_class_add_handler ((EMFormatClass *)efhc, &type_builtin_table[i]);
}
static void
-efhd_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
+efhd_write_image (EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
{
CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)puri->part);
/* TODO: identical to efh_write_image */
d(printf("writing image '%s'\n", puri->cid));
- camel_data_wrapper_decode_to_stream(dw, stream, NULL);
- camel_stream_close(stream, NULL);
+ camel_data_wrapper_decode_to_stream (dw, stream, NULL);
+ camel_stream_close (stream, NULL);
}
static void
-efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
+efhd_message_prefix (EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
const gchar *flag, *comp, *due;
time_t date;
@@ -711,8 +711,8 @@ efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMF
classid = g_strdup_printf("icon:///em-format-html-display/%s/%s", emf->part_id->str, comp&&comp[0]?"comp":"uncomp");
camel_stream_printf(stream, "<td align=\"left\"><img src=\"%s\"></td>", classid);
- (void)em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efhd_write_image);
- g_free(classid);
+ (void)em_format_add_puri (emf, sizeof (EMFormatPURI), classid, iconpart, efhd_write_image);
+ g_free (classid);
g_object_unref (iconpart);
}
}
@@ -727,8 +727,8 @@ efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMF
} else if ((due = camel_folder_get_message_user_tag(emf->folder, emf->uid, "due-by")) != NULL && due[0]) {
time_t now;
- date = camel_header_decode_date(due, NULL);
- now = time(NULL);
+ date = camel_header_decode_date (due, NULL);
+ now = time (NULL);
if (now > date)
camel_stream_printf(stream, "<b>%s</b>&nbsp;", _("Overdue:"));
@@ -770,7 +770,7 @@ efhd_attachment_button_expanded (EAttachmentButton *button,
/* attachment button callback */
static gboolean
-efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
+efhd_attachment_button (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
{
EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)efh;
struct _attach_puri *info;
@@ -801,7 +801,7 @@ efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje
camel_message_info_free (mi);
}
- info = (struct _attach_puri *)em_format_find_puri((EMFormat *)efh, pobject->classid);
+ info = (struct _attach_puri *)em_format_find_puri ((EMFormat *)efh, pobject->classid);
if (!info || info->forward) {
g_warning ("unable to expand the attachment\n");
@@ -966,7 +966,7 @@ efhd_resize (GtkWidget *w, GtkAllocation *event, EMFormatHTML *efh)
/* optional render attachment button callback */
static gboolean
-efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
+efhd_attachment_optional (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
{
struct _attach_puri *info;
GtkWidget *hbox, *vbox, *button, *mainbox, *scroll, *label, *img;
@@ -980,16 +980,16 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
/* FIXME: handle default shown case */
d(printf("adding attachment button/content for optional rendering\n"));
- info = (struct _attach_puri *)em_format_find_puri((EMFormat *)efh, pobject->classid);
+ info = (struct _attach_puri *)em_format_find_puri ((EMFormat *)efh, pobject->classid);
if (!info || info->forward) {
g_warning ("unable to expand the attachment\n");
return TRUE;
}
scroll = gtk_scrolled_window_new (NULL, NULL);
- mainbox = gtk_hbox_new(FALSE, 0);
+ mainbox = gtk_hbox_new (FALSE, 0);
- button = gtk_button_new();
+ button = gtk_button_new ();
hbox = gtk_hbox_new (FALSE, 0);
img = gtk_image_new_from_icon_name (
"stock_show-all", GTK_ICON_SIZE_BUTTON);
@@ -1002,37 +1002,37 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
if (info->handle)
g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(efhd_optional_button_show), scroll);
else {
- gtk_widget_set_sensitive(button, FALSE);
+ gtk_widget_set_sensitive (button, FALSE);
gtk_widget_set_can_focus (button, FALSE);
}
vbox = gtk_vbox_new (FALSE, 0);
- gtk_box_pack_start(GTK_BOX (mainbox), button, FALSE, FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (mainbox), button, FALSE, FALSE, 6);
- button = gtk_button_new();
+ button = gtk_button_new ();
hbox = gtk_hbox_new (FALSE, 0);
img = gtk_image_new_from_stock (
GTK_STOCK_OPEN, GTK_ICON_SIZE_BUTTON);
label = gtk_label_new_with_mnemonic(_("O_pen With"));
gtk_box_pack_start (GTK_BOX (hbox), img, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 2);
- gtk_box_pack_start (GTK_BOX (hbox), gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE), TRUE, TRUE, 2);
+ gtk_box_pack_start (GTK_BOX (hbox), gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE), TRUE, TRUE, 2);
gtk_widget_show_all (hbox);
gtk_container_add (GTK_CONTAINER (button), GTK_WIDGET (hbox));
a11y = gtk_widget_get_accessible (button);
atk_object_set_name (a11y, _("Attachment"));
- gtk_box_pack_start(GTK_BOX (mainbox), button, FALSE, FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (mainbox), button, FALSE, FALSE, 6);
- gtk_widget_show_all(mainbox);
+ gtk_widget_show_all (mainbox);
- gtk_box_pack_start(GTK_BOX (vbox), mainbox, FALSE, FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (vbox), mainbox, FALSE, FALSE, 6);
view = gtk_text_view_new ();
gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE);
- buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW (view));
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
byte_array = camel_stream_mem_get_byte_array (info->mstream);
gtk_text_buffer_set_text (
buffer, (gchar *) byte_array->data, byte_array->len);
@@ -1042,8 +1042,8 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (view));
- gtk_box_pack_start(GTK_BOX (vbox), scroll, TRUE, TRUE, 6);
- gtk_widget_show (GTK_WIDGET(view));
+ gtk_box_pack_start (GTK_BOX (vbox), scroll, TRUE, TRUE, 6);
+ gtk_widget_show (GTK_WIDGET (view));
web_view = em_format_html_get_web_view (efh);
gtk_widget_get_allocation (GTK_WIDGET (web_view), &allocation);
@@ -1055,7 +1055,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
gtk_widget_hide (scroll);
gtk_widget_show (vbox);
- gtk_container_add(GTK_CONTAINER (eb), vbox);
+ gtk_container_add (GTK_CONTAINER (eb), vbox);
info->handle = NULL;
return TRUE;
diff --git a/mail/em-format-html-print.h b/mail/em-format-html-print.h
index 2abdc82178..7b05d7a28e 100644
--- a/mail/em-format-html-print.h
+++ b/mail/em-format-html-print.h
@@ -66,7 +66,7 @@ EMFormatHTMLPrint *
void em_format_html_print_message (EMFormatHTMLPrint *efhp,
CamelFolder *folder,
const gchar *uid);
-void em_format_html_print_raw_message(EMFormatHTMLPrint *efhp,
+void em_format_html_print_raw_message (EMFormatHTMLPrint *efhp,
CamelMimeMessage *msg);
G_END_DECLS
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 8962de2c36..327adc55e5 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -118,17 +118,17 @@ enum {
PROP_WEB_VIEW
};
-static void efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTML *efh);
-static gboolean efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh);
-static void efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh);
+static void efh_url_requested (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTML *efh);
+static gboolean efh_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh);
+static void efh_gtkhtml_destroy (GtkHTML *html, EMFormatHTML *efh);
-static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info);
+static void efh_format_message (EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info);
-static void efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
+static void efh_format_secure (EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
-static void efh_builtin_init(EMFormatHTMLClass *efhc);
+static void efh_builtin_init (EMFormatHTMLClass *efhc);
-static void efh_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri);
+static void efh_write_image (EMFormat *emf, CamelStream *stream, EMFormatPURI *puri);
static gpointer parent_class;
static CamelDataCache *emfh_http_cache;
@@ -206,16 +206,16 @@ efh_format_exec (struct _format_msg *m)
(CamelMimePart *) m->message, handle, FALSE);
}
- camel_stream_flush((CamelStream *)m->estream, NULL);
+ camel_stream_flush ((CamelStream *)m->estream, NULL);
puri_level = format->pending_uri_level;
base = format->base;
do {
/* now dispatch any added tasks ... */
- g_mutex_lock(m->format->priv->lock);
+ g_mutex_lock (m->format->priv->lock);
while ((job = g_queue_pop_head (&m->format->priv->pending_jobs))) {
- g_mutex_unlock(m->format->priv->lock);
+ g_mutex_unlock (m->format->priv->lock);
/* This is an implicit check to see if the gtkhtml has been destroyed */
if (!cancelled)
@@ -223,7 +223,7 @@ efh_format_exec (struct _format_msg *m)
/* Now do an explicit check for user cancellation */
if (!cancelled)
- cancelled = camel_operation_cancel_check(NULL);
+ cancelled = camel_operation_cancel_check (NULL);
/* call jobs even if cancelled, so they can clean up resources */
format->pending_uri_level = job->puri_level;
@@ -235,12 +235,12 @@ efh_format_exec (struct _format_msg *m)
/* clean up the job */
g_object_unref (job->stream);
if (job->base)
- camel_url_free(job->base);
- g_free(job);
+ camel_url_free (job->base);
+ g_free (job);
- g_mutex_lock(m->format->priv->lock);
+ g_mutex_lock (m->format->priv->lock);
}
- g_mutex_unlock(m->format->priv->lock);
+ g_mutex_unlock (m->format->priv->lock);
if (m->estream) {
/* Closing this base stream can queue more jobs, so we need
@@ -249,7 +249,7 @@ efh_format_exec (struct _format_msg *m)
camel_stream_write_string (
(CamelStream *) m->estream,
"</body>\n</html>\n", NULL);
- camel_stream_close((CamelStream *)m->estream, NULL);
+ camel_stream_close ((CamelStream *)m->estream, NULL);
g_object_unref (m->estream);
m->estream = NULL;
}
@@ -276,18 +276,18 @@ static void
efh_format_free (struct _format_msg *m)
{
d(printf("formatter freed\n"));
- g_object_unref(m->format);
+ g_object_unref (m->format);
if (m->estream) {
- camel_stream_close((CamelStream *)m->estream, NULL);
+ camel_stream_close ((CamelStream *)m->estream, NULL);
g_object_unref (m->estream);
}
if (m->folder)
g_object_unref (m->folder);
- g_free(m->uid);
+ g_free (m->uid);
if (m->message)
g_object_unref (m->message);
if (m->format_source)
- g_object_unref(m->format_source);
+ g_object_unref (m->format_source);
}
static MailMsgInfo efh_format_info = {
@@ -299,7 +299,7 @@ static MailMsgInfo efh_format_info = {
};
static gboolean
-efh_format_timeout(struct _format_msg *m)
+efh_format_timeout (struct _format_msg *m)
{
GtkHTMLStream *hstream;
EMFormatHTML *efh = m->format;
@@ -309,7 +309,7 @@ efh_format_timeout(struct _format_msg *m)
web_view = em_format_html_get_web_view (m->format);
if (web_view == NULL) {
- mail_msg_unref(m);
+ mail_msg_unref (m);
return FALSE;
}
@@ -327,24 +327,24 @@ efh_format_timeout(struct _format_msg *m)
EM_FORMAT_CLASS (parent_class)->format_clone (
EM_FORMAT (efh), m->folder, m->uid,
m->message, m->format_source);
- em_format_html_clear_pobject(m->format);
+ em_format_html_clear_pobject (m->format);
/* FIXME: method off EMFormat? */
if (((EMFormat *)efh)->valid) {
- camel_cipher_validity_free(((EMFormat *)efh)->valid);
+ camel_cipher_validity_free (((EMFormat *)efh)->valid);
((EMFormat *)efh)->valid = NULL;
((EMFormat *)efh)->valid_parent = NULL;
}
if (m->message == NULL) {
hstream = gtk_html_begin (GTK_HTML (web_view));
- gtk_html_stream_close(hstream, GTK_HTML_STREAM_OK);
- mail_msg_unref(m);
+ gtk_html_stream_close (hstream, GTK_HTML_STREAM_OK);
+ mail_msg_unref (m);
p->last_part = NULL;
} else {
efh->state = EM_FORMAT_HTML_STATE_RENDERING;
#if HAVE_CLUTTER
- if (p->last_part != m->message && !e_shell_get_express_mode(e_shell_get_default())) {
+ if (p->last_part != m->message && !e_shell_get_express_mode (e_shell_get_default ())) {
#else
if (p->last_part != m->message) {
#endif
@@ -363,7 +363,7 @@ efh_format_timeout(struct _format_msg *m)
| GTK_HTML_BEGIN_BLOCK_UPDATES | GTK_HTML_BEGIN_BLOCK_IMAGES);
} else {
/* clear cache of inline-scanned text parts */
- g_hash_table_remove_all(p->text_inline_parts);
+ g_hash_table_remove_all (p->text_inline_parts);
p->last_part = m->message;
}
@@ -379,26 +379,26 @@ efh_format_timeout(struct _format_msg *m)
}
static void
-efh_free_cache(struct _EMFormatHTMLCache *efhc)
+efh_free_cache (struct _EMFormatHTMLCache *efhc)
{
if (efhc->textmp)
g_object_unref (efhc->textmp);
- g_free(efhc);
+ g_free (efhc);
}
static void
-efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh)
+efh_gtkhtml_destroy (GtkHTML *html, EMFormatHTML *efh)
{
if (efh->priv->format_timeout_id != 0) {
- g_source_remove(efh->priv->format_timeout_id);
+ g_source_remove (efh->priv->format_timeout_id);
efh->priv->format_timeout_id = 0;
- mail_msg_unref(efh->priv->format_timeout_msg);
+ mail_msg_unref (efh->priv->format_timeout_msg);
efh->priv->format_timeout_msg = NULL;
}
/* This probably works ... */
if (efh->priv->format_id != -1)
- mail_msg_cancel(efh->priv->format_id);
+ mail_msg_cancel (efh->priv->format_id);
if (efh->priv->web_view != NULL) {
g_object_unref (efh->priv->web_view);
@@ -407,13 +407,13 @@ efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh)
}
static struct _EMFormatHTMLCache *
-efh_insert_cache(EMFormatHTML *efh, const gchar *partid)
+efh_insert_cache (EMFormatHTML *efh, const gchar *partid)
{
struct _EMFormatHTMLCache *efhc;
- efhc = g_malloc0(sizeof(*efh) + strlen(partid));
- strcpy(efhc->partid, partid);
- g_hash_table_insert(efh->priv->text_inline_parts, efhc->partid, efhc);
+ efhc = g_malloc0 (sizeof (*efh) + strlen (partid));
+ strcpy (efhc->partid, partid);
+ g_hash_table_insert (efh->priv->text_inline_parts, efhc->partid, efhc);
return efhc;
}
@@ -633,9 +633,9 @@ efh_format_clone (EMFormat *emf,
d(printf("efh_format called\n"));
if (efh->priv->format_timeout_id != 0) {
d(printf(" timeout for last still active, removing ...\n"));
- g_source_remove(efh->priv->format_timeout_id);
+ g_source_remove (efh->priv->format_timeout_id);
efh->priv->format_timeout_id = 0;
- mail_msg_unref(efh->priv->format_timeout_msg);
+ mail_msg_unref (efh->priv->format_timeout_msg);
efh->priv->format_timeout_msg = NULL;
}
@@ -731,7 +731,7 @@ efh_format_attachment (EMFormat *emf,
NULL);
/* output some info about it */
- text = em_format_describe_part(part, mime_type);
+ text = em_format_describe_part (part, mime_type);
html = camel_text_to_html (
text, ((EMFormatHTML *)emf)->text_html_flags &
CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
@@ -916,8 +916,8 @@ efh_class_init (EMFormatHTMLClass *class)
user_cache_dir = e_get_user_cache_dir ();
emfh_http_cache = camel_data_cache_new (user_cache_dir, NULL);
if (emfh_http_cache) {
- camel_data_cache_set_expire_age(emfh_http_cache, 24*60*60);
- camel_data_cache_set_expire_access(emfh_http_cache, 2*60*60);
+ camel_data_cache_set_expire_age (emfh_http_cache, 24*60*60);
+ camel_data_cache_set_expire_access (emfh_http_cache, 2*60*60);
}
}
@@ -932,7 +932,7 @@ efh_init (EMFormatHTML *efh,
g_queue_init (&efh->pending_object_list);
g_queue_init (&efh->priv->pending_jobs);
- efh->priv->lock = g_mutex_new();
+ efh->priv->lock = g_mutex_new ();
efh->priv->format_id = -1;
efh->priv->text_inline_parts = g_hash_table_new_full (
g_str_hash, g_str_equal,
@@ -1215,27 +1215,27 @@ em_format_html_set_show_real_date (EMFormatHTML *efh,
}
CamelMimePart *
-em_format_html_file_part(EMFormatHTML *efh, const gchar *mime_type, const gchar *filename)
+em_format_html_file_part (EMFormatHTML *efh, const gchar *mime_type, const gchar *filename)
{
CamelMimePart *part;
CamelStream *stream;
CamelDataWrapper *dw;
gchar *basename;
- stream = camel_stream_fs_new_with_name(filename, O_RDONLY, 0, NULL);
+ stream = camel_stream_fs_new_with_name (filename, O_RDONLY, 0, NULL);
if (stream == NULL)
return NULL;
- dw = camel_data_wrapper_new();
- camel_data_wrapper_construct_from_stream(dw, stream, NULL);
+ dw = camel_data_wrapper_new ();
+ camel_data_wrapper_construct_from_stream (dw, stream, NULL);
g_object_unref (stream);
if (mime_type)
- camel_data_wrapper_set_mime_type(dw, mime_type);
- part = camel_mime_part_new();
+ camel_data_wrapper_set_mime_type (dw, mime_type);
+ part = camel_mime_part_new ();
camel_medium_set_content ((CamelMedium *)part, dw);
g_object_unref (dw);
basename = g_path_get_basename (filename);
- camel_mime_part_set_filename(part, basename);
+ camel_mime_part_set_filename (part, basename);
g_free (basename);
return part;
@@ -1244,18 +1244,18 @@ em_format_html_file_part(EMFormatHTML *efh, const gchar *mime_type, const gchar
/* all this api is a pain in the bum ... */
EMFormatHTMLPObject *
-em_format_html_add_pobject(EMFormatHTML *efh, gsize size, const gchar *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func)
+em_format_html_add_pobject (EMFormatHTML *efh, gsize size, const gchar *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func)
{
EMFormatHTMLPObject *pobj;
- if (size < sizeof(EMFormatHTMLPObject)) {
+ if (size < sizeof (EMFormatHTMLPObject)) {
g_warning ("size is less than the size of EMFormatHTMLPObject\n");
- size = sizeof(EMFormatHTMLPObject);
+ size = sizeof (EMFormatHTMLPObject);
}
- pobj = g_malloc0(size);
+ pobj = g_malloc0 (size);
if (classid)
- pobj->classid = g_strdup(classid);
+ pobj->classid = g_strdup (classid);
else
pobj->classid = g_strdup_printf("e-object:///%s", ((EMFormat *)efh)->part_id->str);
@@ -1344,38 +1344,38 @@ em_format_html_clear_pobject (EMFormatHTML *emf)
}
struct _EMFormatHTMLJob *
-em_format_html_job_new(EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, gint cancelled), gpointer data)
+em_format_html_job_new (EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, gint cancelled), gpointer data)
{
- struct _EMFormatHTMLJob *job = g_malloc0(sizeof(*job));
+ struct _EMFormatHTMLJob *job = g_malloc0 (sizeof (*job));
job->format = emfh;
job->puri_level = ((EMFormat *)emfh)->pending_uri_level;
job->callback = callback;
job->u.data = data;
if (((EMFormat *)emfh)->base)
- job->base = camel_url_copy(((EMFormat *)emfh)->base);
+ job->base = camel_url_copy (((EMFormat *)emfh)->base);
return job;
}
void
-em_format_html_job_queue(EMFormatHTML *emfh, struct _EMFormatHTMLJob *job)
+em_format_html_job_queue (EMFormatHTML *emfh, struct _EMFormatHTMLJob *job)
{
- g_mutex_lock(emfh->priv->lock);
+ g_mutex_lock (emfh->priv->lock);
g_queue_push_tail (&emfh->priv->pending_jobs, job);
- g_mutex_unlock(emfh->priv->lock);
+ g_mutex_unlock (emfh->priv->lock);
}
/* ********************************************************************** */
-static void emfh_getpuri(struct _EMFormatHTMLJob *job, gint cancelled)
+static void emfh_getpuri (struct _EMFormatHTMLJob *job, gint cancelled)
{
d(printf(" running getpuri task\n"));
if (!cancelled)
- job->u.puri->func((EMFormat *)job->format, job->stream, job->u.puri);
+ job->u.puri->func ((EMFormat *)job->format, job->stream, job->u.puri);
}
-static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled)
+static void emfh_gethttp (struct _EMFormatHTMLJob *job, gint cancelled)
{
CamelStream *cistream = NULL, *costream = NULL, *instream = NULL;
CamelURL *url;
@@ -1386,13 +1386,13 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled)
const gchar *length;
if (cancelled
- || (url = camel_url_new(job->u.uri, NULL)) == NULL)
+ || (url = camel_url_new (job->u.uri, NULL)) == NULL)
goto badurl;
d(printf(" running load uri task: %s\n", job->u.uri));
if (emfh_http_cache)
- instream = cistream = camel_data_cache_get(emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
+ instream = cistream = camel_data_cache_get (emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
if (instream == NULL) {
MailConfigHTTPMode policy;
@@ -1403,15 +1403,15 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled)
if (!(job->format->priv->load_images_now
|| policy == MAIL_CONFIG_HTTP_ALWAYS
|| (policy == MAIL_CONFIG_HTTP_SOMETIMES
- && em_utils_in_addressbook((CamelInternetAddress *)camel_mime_message_get_from(job->format->parent.message), FALSE)))) {
+ && em_utils_in_addressbook ((CamelInternetAddress *)camel_mime_message_get_from (job->format->parent.message), FALSE)))) {
/* TODO: Ideally we would put the http requests into another queue and only send them out
if the user selects 'load images', when they do. The problem is how to maintain this
state with multiple renderings, and how to adjust the thread dispatch/setup routine to handle it */
- camel_url_free(url);
+ camel_url_free (url);
goto done;
}
- instream = camel_http_stream_new(CAMEL_HTTP_METHOD_GET, ((EMFormat *)job->format)->session, url);
+ instream = camel_http_stream_new (CAMEL_HTTP_METHOD_GET, ((EMFormat *)job->format)->session, url);
camel_http_stream_set_user_agent((CamelHttpStream *)instream, "CamelHttpStream/1.0 Evolution/" VERSION);
proxy = em_utils_get_proxy_uri (job->u.uri);
if (proxy) {
@@ -1420,22 +1420,22 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled)
}
camel_operation_start(NULL, _("Retrieving '%s'"), job->u.uri);
tmp_stream = (CamelHttpStream *)instream;
- content_type = camel_http_stream_get_content_type(tmp_stream);
+ content_type = camel_http_stream_get_content_type (tmp_stream);
length = camel_header_raw_find(&tmp_stream->headers, "Content-Length", NULL);
d(printf(" Content-Length: %s\n", length));
if (length != NULL)
- total = atoi(length);
- camel_content_type_unref(content_type);
+ total = atoi (length);
+ camel_content_type_unref (content_type);
} else
camel_operation_start_transient(NULL, _("Retrieving '%s'"), job->u.uri);
- camel_url_free(url);
+ camel_url_free (url);
if (instream == NULL)
goto done;
if (emfh_http_cache != NULL && cistream == NULL)
- costream = camel_data_cache_add(emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
+ costream = camel_data_cache_add (emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
do {
if (camel_operation_cancel_check (NULL)) {
@@ -1443,13 +1443,13 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled)
break;
}
/* FIXME: progress reporting in percentage, can we get the length always? do we care? */
- n = camel_stream_read(instream, buffer, sizeof (buffer), NULL);
+ n = camel_stream_read (instream, buffer, sizeof (buffer), NULL);
if (n > 0) {
nread += n;
/* If we didn't get a valid Content-Length header, do not try to calculate percentage */
if (total != 0) {
pc_complete = ((nread * 100) / total);
- camel_operation_progress(NULL, pc_complete);
+ camel_operation_progress (NULL, pc_complete);
}
d(printf(" read %d bytes\n", n));
if (costream && camel_stream_write (costream, buffer, n, NULL) == -1) {
@@ -1457,39 +1457,39 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled)
break;
}
- camel_stream_write(job->stream, buffer, n, NULL);
+ camel_stream_write (job->stream, buffer, n, NULL);
}
} while (n>0);
/* indicates success */
if (n == 0)
- camel_stream_close(job->stream, NULL);
+ camel_stream_close (job->stream, NULL);
if (costream) {
/* do not store broken files in a cache */
if (n != 0)
- camel_data_cache_remove(emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
+ camel_data_cache_remove (emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
g_object_unref (costream);
}
g_object_unref (instream);
done:
- camel_operation_end(NULL);
+ camel_operation_end (NULL);
badurl:
- g_free(job->u.uri);
+ g_free (job->u.uri);
}
/* ********************************************************************** */
static void
-efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTML *efh)
+efh_url_requested (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTML *efh)
{
EMFormatPURI *puri;
struct _EMFormatHTMLJob *job = NULL;
d(printf("url requested, html = %p, url '%s'\n", html, url));
- puri = em_format_find_visible_puri((EMFormat *)efh, url);
+ puri = em_format_find_visible_puri ((EMFormat *)efh, url);
if (puri) {
CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)puri->part);
CamelContentType *ct = dw?dw->mime_type:NULL;
@@ -1507,14 +1507,14 @@ efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMForm
puri->use_count++;
d(printf(" adding puri job\n"));
- job = em_format_html_job_new(efh, emfh_getpuri, puri);
+ job = em_format_html_job_new (efh, emfh_getpuri, puri);
} else {
d(printf(" part is unknown type '%s', not using\n", ct?camel_content_type_format(ct):"<unset>"));
- gtk_html_stream_close(handle, GTK_HTML_STREAM_ERROR);
+ gtk_html_stream_close (handle, GTK_HTML_STREAM_ERROR);
}
} else if (g_ascii_strncasecmp(url, "http:", 5) == 0 || g_ascii_strncasecmp(url, "https:", 6) == 0) {
d(printf(" adding job, get %s\n", url));
- job = em_format_html_job_new(efh, emfh_gethttp, g_strdup(url));
+ job = em_format_html_job_new (efh, emfh_gethttp, g_strdup (url));
} else if (g_str_has_prefix (url, "file://")) {
gchar *data = NULL;
gsize length = 0;
@@ -1533,19 +1533,19 @@ efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMForm
g_free (path);
} else {
d(printf("HTML Includes reference to unknown uri '%s'\n", url));
- gtk_html_stream_close(handle, GTK_HTML_STREAM_ERROR);
+ gtk_html_stream_close (handle, GTK_HTML_STREAM_ERROR);
}
if (job) {
- job->stream = em_html_stream_new(html, handle);
- em_format_html_job_queue(efh, job);
+ job->stream = em_html_stream_new (html, handle);
+ em_format_html_job_queue (efh, job);
}
g_signal_stop_emission_by_name (html, "url-requested");
}
static gboolean
-efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh)
+efh_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh)
{
EMFormatHTMLPObject *pobject;
gint res = FALSE;
@@ -1553,11 +1553,11 @@ efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh)
if (eb->classid == NULL)
return FALSE;
- pobject = em_format_html_find_pobject(efh, eb->classid);
+ pobject = em_format_html_find_pobject (efh, eb->classid);
if (pobject) {
/* This stops recursion of the part */
g_queue_remove (&efh->pending_object_list, pobject);
- res = pobject->func(efh, eb, pobject);
+ res = pobject->func (efh, eb, pobject);
g_queue_push_head (&efh->pending_object_list, pobject);
} else {
d(printf("HTML Includes reference to unknown object '%s'\n", eb->classid));
@@ -1596,7 +1596,7 @@ static const gchar *smime_sign_colour[4] = {
/* TODO: this could probably be virtual on em-format-html
then we only need one version of each type handler */
static void
-efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid)
+efh_format_secure (EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid)
{
EMFormatClass *format_class;
@@ -1625,14 +1625,14 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel
icon = smime_sign_table[valid->sign.status].icon;
else
icon = smime_encrypt_table[valid->encrypt.status].icon;
- iconpath = e_icon_factory_get_icon_filename(icon, GTK_ICON_SIZE_DIALOG);
+ iconpath = e_icon_factory_get_icon_filename (icon, GTK_ICON_SIZE_DIALOG);
iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", iconpath);
if (iconpart) {
- (void)em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efh_write_image);
+ (void)em_format_add_puri (emf, sizeof (EMFormatPURI), classid, iconpart, efh_write_image);
g_object_unref (iconpart);
}
g_free (iconpath);
- g_free(classid);
+ g_free (classid);
if (valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE) {
gchar *signers;
@@ -1697,7 +1697,7 @@ efh_text_plain (EMFormatHTML *efh,
filters a bit. Perhaps the superclass should just deal with
html anyway and be done with it ... */
- efhc = g_hash_table_lookup(efh->priv->text_inline_parts, ((EMFormat *)efh)->part_id->str);
+ efhc = g_hash_table_lookup (efh->priv->text_inline_parts, ((EMFormat *)efh)->part_id->str);
if (efhc == NULL || (mp = efhc->textmp) == NULL) {
EMInlineFilter *inline_filter;
CamelStream *null;
@@ -1706,36 +1706,36 @@ efh_text_plain (EMFormatHTML *efh,
/* if we had to snoop the part type to get here, then
* use that as the base type, yuck */
if (((EMFormat *)efh)->snoop_mime_type == NULL
- || (ct = camel_content_type_decode(((EMFormat *)efh)->snoop_mime_type)) == NULL) {
+ || (ct = camel_content_type_decode (((EMFormat *)efh)->snoop_mime_type)) == NULL) {
ct = dw->mime_type;
- camel_content_type_ref(ct);
+ camel_content_type_ref (ct);
}
- null = camel_stream_null_new();
+ null = camel_stream_null_new ();
filtered_stream = camel_stream_filter_new (null);
g_object_unref (null);
- inline_filter = em_inline_filter_new(camel_mime_part_get_encoding(part), ct);
+ inline_filter = em_inline_filter_new (camel_mime_part_get_encoding (part), ct);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filtered_stream),
CAMEL_MIME_FILTER (inline_filter));
camel_data_wrapper_decode_to_stream (
dw, (CamelStream *)filtered_stream, NULL);
- camel_stream_close((CamelStream *)filtered_stream, NULL);
+ camel_stream_close ((CamelStream *)filtered_stream, NULL);
g_object_unref (filtered_stream);
- mp = em_inline_filter_get_multipart(inline_filter);
+ mp = em_inline_filter_get_multipart (inline_filter);
if (efhc == NULL)
- efhc = efh_insert_cache(efh, ((EMFormat *)efh)->part_id->str);
+ efhc = efh_insert_cache (efh, ((EMFormat *)efh)->part_id->str);
efhc->textmp = mp;
g_object_unref (inline_filter);
- camel_content_type_unref(ct);
+ camel_content_type_unref (ct);
}
rgb = e_color_to_value (
&efh->priv->colors[EM_FORMAT_HTML_COLOR_CITATION]);
filtered_stream = camel_stream_filter_new (stream);
- html_filter = camel_mime_filter_tohtml_new(flags, rgb);
+ html_filter = camel_mime_filter_tohtml_new (flags, rgb);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filtered_stream), html_filter);
g_object_unref (html_filter);
@@ -1743,14 +1743,14 @@ efh_text_plain (EMFormatHTML *efh,
/* We handle our made-up multipart here, so we don't recursively call ourselves */
len = ((EMFormat *)efh)->part_id->len;
- count = camel_multipart_get_number(mp);
+ count = camel_multipart_get_number (mp);
for (i=0;i<count;i++) {
- CamelMimePart *newpart = camel_multipart_get_part(mp, i);
+ CamelMimePart *newpart = camel_multipart_get_part (mp, i);
if (!newpart)
continue;
- type = camel_mime_part_get_content_type(newpart);
+ type = camel_mime_part_get_content_type (newpart);
if (camel_content_type_is (type, "text", "*") && (is_fallback || !camel_content_type_is (type, "text", "calendar"))) {
camel_stream_printf (
stream, "<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px; color: #%06x;\">\n",
@@ -1765,14 +1765,14 @@ efh_text_plain (EMFormatHTML *efh,
EM_FORMAT_HTML_COLOR_TEXT]));
camel_stream_write_string (
stream, "<tt>\n" EFH_MESSAGE_START, NULL);
- em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)newpart);
- camel_stream_flush((CamelStream *)filtered_stream, NULL);
+ em_format_format_text ((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)newpart);
+ camel_stream_flush ((CamelStream *)filtered_stream, NULL);
camel_stream_write_string (stream, "</tt>\n", NULL);
camel_stream_write_string (stream, "</div>\n", NULL);
} else {
g_string_append_printf(((EMFormat *)efh)->part_id, ".inline.%d", i);
- em_format_part((EMFormat *)efh, stream, newpart);
- g_string_truncate(((EMFormat *)efh)->part_id, len);
+ em_format_part ((EMFormat *)efh, stream, newpart);
+ g_string_truncate (((EMFormat *)efh)->part_id, len);
}
}
@@ -1780,7 +1780,7 @@ efh_text_plain (EMFormatHTML *efh,
}
static void
-efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
+efh_text_enriched (EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
CamelStream *filtered_stream;
CamelMimeFilter *enriched;
@@ -1795,7 +1795,7 @@ efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, E
stream, "\n<!-- text/enriched -->\n", NULL);
}
- enriched = camel_mime_filter_enriched_new(flags);
+ enriched = camel_mime_filter_enriched_new (flags);
filtered_stream = camel_stream_filter_new (stream);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filtered_stream), enriched);
@@ -1813,33 +1813,33 @@ efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, E
&efh->priv->colors[
EM_FORMAT_HTML_COLOR_TEXT]));
- em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
+ em_format_format_text ((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
g_object_unref (filtered_stream);
camel_stream_write_string (stream, "</div>", NULL);
}
static void
-efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
+efh_write_text_html (EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
{
#if d(!)0
CamelStream *out;
gint fd;
CamelDataWrapper *dw;
- fd = dup(STDOUT_FILENO);
- out = camel_stream_fs_new_with_fd(fd);
+ fd = dup (STDOUT_FILENO);
+ out = camel_stream_fs_new_with_fd (fd);
printf("writing text content to frame '%s'\n", puri->cid);
dw = camel_medium_get_content (puri->part);
if (dw)
- camel_data_wrapper_write_to_stream(dw, out);
+ camel_data_wrapper_write_to_stream (dw, out);
g_object_unref (out);
#endif
- em_format_format_text(emf, stream, (CamelDataWrapper *)puri->part);
+ em_format_format_text (emf, stream, (CamelDataWrapper *)puri->part);
}
static void
-efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
+efh_text_html (EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
const gchar *location;
gchar *cid = NULL;
@@ -1862,36 +1862,36 @@ efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFor
for us. our iframes are special cases, we need to use the
proper base url to access them, but other children parts
shouldn't blindly inherit the container's location. */
- location = camel_mime_part_get_content_location(part);
+ location = camel_mime_part_get_content_location (part);
if (location == NULL) {
if (((EMFormat *)efh)->base)
- cid = camel_url_to_string(((EMFormat *)efh)->base, 0);
+ cid = camel_url_to_string (((EMFormat *)efh)->base, 0);
else
- cid = g_strdup(((EMFormat *)efh)->part_id->str);
+ cid = g_strdup (((EMFormat *)efh)->part_id->str);
} else {
- if (strchr(location, ':') == NULL && ((EMFormat *)efh)->base != NULL) {
+ if (strchr (location, ':') == NULL && ((EMFormat *)efh)->base != NULL) {
CamelURL *uri;
- uri = camel_url_new_with_base(((EMFormat *)efh)->base, location);
- cid = camel_url_to_string(uri, 0);
- camel_url_free(uri);
+ uri = camel_url_new_with_base (((EMFormat *)efh)->base, location);
+ cid = camel_url_to_string (uri, 0);
+ camel_url_free (uri);
} else {
- cid = g_strdup(location);
+ cid = g_strdup (location);
}
}
- em_format_add_puri((EMFormat *)efh, sizeof(EMFormatPURI), cid, part, efh_write_text_html);
+ em_format_add_puri ((EMFormat *)efh, sizeof (EMFormatPURI), cid, part, efh_write_text_html);
d(printf("adding iframe, location %s\n", cid));
- camel_stream_printf(stream,
+ camel_stream_printf (stream,
"<iframe src=\"%s\" frameborder=0 scrolling=no>could not get %s</iframe>\n"
"</div>\n",
cid, cid);
- g_free(cid);
+ g_free (cid);
}
/* This is a lot of code for something useless ... */
static void
-efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
+efh_message_external (EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
CamelContentType *type;
const gchar *access_type;
@@ -1903,7 +1903,7 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
}
/* needs to be cleaner */
- type = camel_mime_part_get_content_type(part);
+ type = camel_mime_part_get_content_type (part);
access_type = camel_content_type_param (type, "access-type");
if (!access_type) {
camel_stream_printf(stream, _("Malformed external-body part."));
@@ -1975,8 +1975,8 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
goto fail;
camel_stream_printf(stream, "<a href=\"%s\">%s</a>", url, desc);
- g_free(url);
- g_free(desc);
+ g_free (url);
+ g_free (desc);
return;
@@ -1985,7 +1985,7 @@ fail:
}
static void
-efh_message_deliverystatus(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
+efh_message_deliverystatus (EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
CamelStream *filtered_stream;
CamelMimeFilter *html_filter;
@@ -2005,28 +2005,28 @@ efh_message_deliverystatus(EMFormatHTML *efh, CamelStream *stream, CamelMimePart
EM_FORMAT_HTML_COLOR_TEXT]));
filtered_stream = camel_stream_filter_new (stream);
- html_filter = camel_mime_filter_tohtml_new(efh->text_html_flags, rgb);
+ html_filter = camel_mime_filter_tohtml_new (efh->text_html_flags, rgb);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filtered_stream), html_filter);
g_object_unref (html_filter);
camel_stream_write_string (stream, "<tt>\n" EFH_MESSAGE_START, NULL);
- em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
- camel_stream_flush((CamelStream *)filtered_stream, NULL);
+ em_format_format_text ((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
+ camel_stream_flush ((CamelStream *)filtered_stream, NULL);
camel_stream_write_string (stream, "</tt>\n", NULL);
camel_stream_write_string (stream, "</div>", NULL);
}
static void
-emfh_write_related(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
+emfh_write_related (EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
{
- em_format_format_content(emf, stream, puri->part);
- camel_stream_close(stream, NULL);
+ em_format_format_content (emf, stream, puri->part);
+ camel_stream_close (stream, NULL);
}
static void
-emfh_multipart_related_check(struct _EMFormatHTMLJob *job, gint cancelled)
+emfh_multipart_related_check (struct _EMFormatHTMLJob *job, gint cancelled)
{
EMFormat *format;
GList *link;
@@ -2069,7 +2069,7 @@ emfh_multipart_related_check(struct _EMFormatHTMLJob *job, gint cancelled)
/* RFC 2387 */
static void
-efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
+efh_multipart_related (EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
CamelMimePart *body_part, *display_part = NULL;
@@ -2080,15 +2080,15 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
EMFormatPURI *puri;
struct _EMFormatHTMLJob *job;
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
+ if (!CAMEL_IS_MULTIPART (mp)) {
+ em_format_format_source (emf, stream, part);
return;
}
- nparts = camel_multipart_get_number(mp);
- content_type = camel_mime_part_get_content_type(part);
+ nparts = camel_multipart_get_number (mp);
+ content_type = camel_mime_part_get_content_type (part);
start = camel_content_type_param (content_type, "start");
- if (start && strlen(start)>2) {
+ if (start && strlen (start)>2) {
gint len;
const gchar *cid;
@@ -2097,17 +2097,17 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
start++;
for (i=0; i<nparts; i++) {
- body_part = camel_multipart_get_part(mp, i);
- cid = camel_mime_part_get_content_id(body_part);
+ body_part = camel_multipart_get_part (mp, i);
+ cid = camel_mime_part_get_content_id (body_part);
- if (cid && !strncmp(cid, start, len) && strlen(cid) == len) {
+ if (cid && !strncmp (cid, start, len) && strlen (cid) == len) {
display_part = body_part;
displayid = i;
break;
}
}
} else {
- display_part = camel_multipart_get_part(mp, 0);
+ display_part = camel_multipart_get_part (mp, 0);
}
if (display_part == NULL) {
@@ -2115,51 +2115,51 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
return;
}
- em_format_push_level(emf);
+ em_format_push_level (emf);
partidlen = emf->part_id->len;
/* queue up the parts for possible inclusion */
for (i = 0; i < nparts; i++) {
- body_part = camel_multipart_get_part(mp, i);
+ body_part = camel_multipart_get_part (mp, i);
if (body_part != display_part) {
g_string_append_printf(emf->part_id, "related.%d", i);
- puri = em_format_add_puri(emf, sizeof(EMFormatPURI), NULL, body_part, emfh_write_related);
- g_string_truncate(emf->part_id, partidlen);
+ puri = em_format_add_puri (emf, sizeof (EMFormatPURI), NULL, body_part, emfh_write_related);
+ g_string_truncate (emf->part_id, partidlen);
d(printf(" part '%s' '%s' added\n", puri->uri?puri->uri:"", puri->cid));
}
}
g_string_append_printf(emf->part_id, "related.%d", displayid);
- em_format_part(emf, stream, display_part);
- g_string_truncate(emf->part_id, partidlen);
- camel_stream_flush(stream, NULL);
+ em_format_part (emf, stream, display_part);
+ g_string_truncate (emf->part_id, partidlen);
+ camel_stream_flush (stream, NULL);
/* queue a job to check for un-referenced parts to add as attachments */
- job = em_format_html_job_new((EMFormatHTML *)emf, emfh_multipart_related_check, NULL);
+ job = em_format_html_job_new ((EMFormatHTML *)emf, emfh_multipart_related_check, NULL);
job->stream = stream;
g_object_ref (stream);
- em_format_html_job_queue((EMFormatHTML *)emf, job);
+ em_format_html_job_queue ((EMFormatHTML *)emf, job);
- em_format_pull_level(emf);
+ em_format_pull_level (emf);
}
static void
-efh_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
+efh_write_image (EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
{
CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)puri->part);
d(printf("writing image '%s'\n", puri->cid));
- camel_data_wrapper_decode_to_stream(dw, stream, NULL);
- camel_stream_close(stream, NULL);
+ camel_data_wrapper_decode_to_stream (dw, stream, NULL);
+ camel_stream_close (stream, NULL);
}
static void
-efh_image(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
+efh_image (EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
EMFormatPURI *puri;
- puri = em_format_add_puri((EMFormat *)efh, sizeof(EMFormatPURI), NULL, part, efh_write_image);
+ puri = em_format_add_puri ((EMFormat *)efh, sizeof (EMFormatPURI), NULL, part, efh_write_image);
d(printf("adding image '%s'\n", puri->cid));
camel_stream_printf(stream, "<img hspace=10 vspace=10 src=\"%s\">", puri->cid);
}
@@ -2202,7 +2202,7 @@ static EMFormatHandler type_builtin_table[] = {
};
static void
-efh_builtin_init(EMFormatHTMLClass *efhc)
+efh_builtin_init (EMFormatHTMLClass *efhc)
{
EMFormatClass *efc;
gint ii;
@@ -2265,8 +2265,8 @@ efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const gchar *la
}
}
- camel_stream_printf(stream, fmt, label, html);
- g_free(mhtml);
+ camel_stream_printf (stream, fmt, label, html);
+ g_free (mhtml);
}
static const gchar *addrspec_hdrs[] = {
@@ -2411,7 +2411,7 @@ canon_header_name (gchar *name)
}
static void
-efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const gchar *charset)
+efh_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const gchar *charset)
{
EMFormatHTML *efh = (EMFormatHTML *)emf;
gchar *name, *buf, *value = NULL;
@@ -2420,12 +2420,12 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
gchar *str_field = NULL;
gint i;
- name = g_alloca(strlen(header->name)+1);
- strcpy(name, header->name);
+ name = g_alloca (strlen (header->name)+1);
+ strcpy (name, header->name);
canon_header_name (name);
for (i = 0; addrspec_hdrs[i]; i++) {
- if (!strcmp(name, addrspec_hdrs[i])) {
+ if (!strcmp (name, addrspec_hdrs[i])) {
addrspec = TRUE;
break;
}
@@ -2447,7 +2447,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
g_free (buf);
html = g_string_new("");
- img = efh_format_address(efh, html, addrs, (gchar *)label);
+ img = efh_format_address (efh, html, addrs, (gchar *)label);
if (img) {
str_field = g_strdup_printf ("%s%s:", img, label);
@@ -2456,9 +2456,9 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
g_free (img);
}
- camel_header_address_list_clear(&addrs);
+ camel_header_address_list_clear (&addrs);
txt = value = html->str;
- g_string_free(html, FALSE);
+ g_string_free (html, FALSE);
flags |= EM_FORMAT_HEADER_BOLD | EM_FORMAT_HTML_HEADER_HTML;
} else if (!strcmp (name, "Subject")) {
@@ -2487,7 +2487,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
html = camel_text_to_html (txt, efh->text_html_flags, 0);
- msg_date = camel_header_decode_date(txt, &msg_offset);
+ msg_date = camel_header_decode_date (txt, &msg_offset);
e_localtime_with_offset (msg_date, &local, &local_tz);
/* Convert message offset to minutes (e.g. -0400 --> -240) */
@@ -2539,14 +2539,14 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
g_string_append_printf(html, ", ");
}
- camel_header_newsgroups_free(ng);
+ camel_header_newsgroups_free (ng);
txt = html->str;
- g_string_free(html, FALSE);
+ g_string_free (html, FALSE);
flags |= EM_FORMAT_HEADER_BOLD|EM_FORMAT_HTML_HEADER_HTML;
} else if (!strcmp (name, "Received") || !strncmp (name, "X-", 2)) {
/* don't unfold Received nor extension headers */
- txt = value = camel_header_decode_string(header->value, charset);
+ txt = value = camel_header_decode_string (header->value, charset);
} else {
/* don't unfold Received nor extension headers */
buf = camel_header_unfold (header->value);
@@ -2554,14 +2554,14 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
g_free (buf);
}
- efh_format_text_header(efh, stream, label, txt, flags);
+ efh_format_text_header (efh, stream, label, txt, flags);
g_free (value);
g_free (str_field);
}
static void
-efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
+efh_format_headers (EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
{
EMFormat *emf = (EMFormat *) efh;
const gchar *charset;
@@ -2580,9 +2580,9 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
if (!part)
return;
- ct = camel_mime_part_get_content_type((CamelMimePart *)part);
+ ct = camel_mime_part_get_content_type ((CamelMimePart *)part);
charset = camel_content_type_param (ct, "charset");
- charset = camel_iconv_charset_name(charset);
+ charset = camel_iconv_charset_name (charset);
if (!efh->simple_headers)
camel_stream_printf (
@@ -2604,12 +2604,12 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
break;
html = g_string_new("");
- name = efh_format_address(efh, html, addrs, header->name);
+ name = efh_format_address (efh, html, addrs, header->name);
header_sender = html->str;
- camel_header_address_list_clear(&addrs);
+ camel_header_address_list_clear (&addrs);
- g_string_free(html, FALSE);
+ g_string_free (html, FALSE);
g_free (name);
} else if (!g_ascii_strcasecmp (header->name, "From")) {
struct _camel_header_address *addrs;
@@ -2619,13 +2619,13 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
break;
html = g_string_new("");
- name = efh_format_address(efh, html, addrs, header->name);
+ name = efh_format_address (efh, html, addrs, header->name);
header_from = html->str;
- camel_header_address_list_clear(&addrs);
+ camel_header_address_list_clear (&addrs);
- g_string_free(html, FALSE);
- g_free(name);
+ g_string_free (html, FALSE);
+ g_free (name);
} else if (!g_ascii_strcasecmp (header->name, "X-Evolution-Mail-From-Delegate")) {
mail_from_delegate = TRUE;
}
@@ -2662,7 +2662,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
if (emf->mode == EM_FORMAT_MODE_ALLHEADERS) {
header = ((CamelMimePart *)part)->headers;
while (header) {
- efh_format_header(emf, stream, part, header, EM_FORMAT_HTML_HEADER_NOCOLUMNS, charset);
+ efh_format_header (emf, stream, part, header, EM_FORMAT_HTML_HEADER_NOCOLUMNS, charset);
header = header->next;
}
} else {
@@ -2724,7 +2724,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
face_decoded = TRUE;
/* Showing an encoded "Face" header makes little sense */
} else if (!g_ascii_strcasecmp (header->name, h->name) && !face) {
- efh_format_header(emf, stream, part, header, h->flags, charset);
+ efh_format_header (emf, stream, part, header, h->flags, charset);
}
header = header->next;
@@ -2742,8 +2742,8 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
CamelMimePart *photopart;
gboolean only_local_photo;
- cia = camel_internet_address_new();
- camel_address_decode((CamelAddress *) cia, (const gchar *) photo_name);
+ cia = camel_internet_address_new ();
+ camel_address_decode ((CamelAddress *) cia, (const gchar *) photo_name);
only_local_photo = em_format_html_get_only_local_photos (efh);
photopart = em_utils_contact_photo (cia, only_local_photo);
@@ -2751,14 +2751,14 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
contact_has_photo = TRUE;
classid = g_strdup_printf("icon:///em-format-html/%s/photo/header",
emf->part_id->str);
- camel_stream_printf(stream,
+ camel_stream_printf (stream,
"<td align=\"right\" valign=\"top\"><img width=64 src=\"%s\"></td>",
classid);
- em_format_add_puri(emf, sizeof(EMFormatPURI), classid,
+ em_format_add_puri (emf, sizeof (EMFormatPURI), classid,
photopart, efh_write_image);
g_object_unref (photopart);
- g_free(classid);
+ g_free (classid);
}
g_object_unref (cia);
}
@@ -2771,7 +2771,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
camel_mime_part_set_content ((CamelMimePart *) part, (const gchar *) face_header_value, face_header_len, "image/png");
classid = g_strdup_printf("icon:///em-format-html/face/photo/header");
camel_stream_printf(stream, "<td align=\"right\" valign=\"top\"><img width=48 src=\"%s\"></td>", classid);
- em_format_add_puri(emf, sizeof(EMFormatPURI), classid, part, efh_write_image);
+ em_format_add_puri (emf, sizeof (EMFormatPURI), classid, part, efh_write_image);
g_object_unref (part);
}
@@ -2794,17 +2794,17 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
}
if (iconpart) {
- em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efh_write_image);
+ em_format_add_puri (emf, sizeof (EMFormatPURI), classid, iconpart, efh_write_image);
g_object_unref (iconpart);
}
- g_free(classid);
+ g_free (classid);
}
camel_stream_printf (stream, "</tr></table>\n</font>\n");
}
}
static void
-efh_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
+efh_format_message (EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
const EMFormatHandler *handle;
@@ -2819,19 +2819,19 @@ efh_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, cons
camel_stream_printf(stream, "<blockquote>\n");
if (!efh->hide_headers)
- efh_format_headers(efh, stream, (CamelMedium *)part);
+ efh_format_headers (efh, stream, (CamelMedium *)part);
handle = em_format_find_handler(emf, "x-evolution/message/post-header");
if (handle)
- handle->handler(emf, stream, part, handle, FALSE);
+ handle->handler (emf, stream, part, handle, FALSE);
- camel_stream_printf(stream, EM_FORMAT_HTML_VPAD);
- em_format_part(emf, stream, part);
+ camel_stream_printf (stream, EM_FORMAT_HTML_VPAD);
+ em_format_part (emf, stream, part);
if (emf->message != (CamelMimeMessage *)part)
camel_stream_printf(stream, "</blockquote>\n");
- camel_cipher_validity_free(emf->valid);
+ camel_cipher_validity_free (emf->valid);
emf->valid = save;
emf->valid_parent = save_parent;
diff --git a/mail/em-format-html.h b/mail/em-format-html.h
index 4e9b315765..85b91f84c3 100644
--- a/mail/em-format-html.h
+++ b/mail/em-format-html.h
@@ -261,7 +261,7 @@ EMFormatHTMLPObject *
em_format_html_find_pobject (EMFormatHTML *efh,
const gchar *classid);
EMFormatHTMLPObject *
- em_format_html_find_pobject_func(EMFormatHTML *efh,
+ em_format_html_find_pobject_func (EMFormatHTML *efh,
CamelMimePart *part,
EMFormatHTMLPObjectFunc func);
void em_format_html_remove_pobject (EMFormatHTML *efh,
@@ -273,8 +273,8 @@ EMFormatHTMLJob *
gpointer data);
void em_format_html_job_queue (EMFormatHTML *efh,
EMFormatHTMLJob *job);
-gboolean em_format_html_get_show_real_date(EMFormatHTML *efh);
-void em_format_html_set_show_real_date(EMFormatHTML *efh,
+gboolean em_format_html_get_show_real_date (EMFormatHTML *efh);
+void em_format_html_set_show_real_date (EMFormatHTML *efh,
gboolean show_real_date);
gchar * em_format_html_format_cert_infos (CamelCipherCertInfo *first_cinfo);
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
index b780256e2b..11a4b32764 100644
--- a/mail/em-inline-filter.c
+++ b/mail/em-inline-filter.c
@@ -59,7 +59,7 @@ static const struct {
};
static void
-inline_filter_add_part(EMInlineFilter *emif, const gchar *data, gint len)
+inline_filter_add_part (EMInlineFilter *emif, const gchar *data, gint len)
{
CamelTransferEncoding encoding;
CamelContentType *content_type;
@@ -74,16 +74,16 @@ inline_filter_add_part(EMInlineFilter *emif, const gchar *data, gint len)
else
encoding = emif_types[emif->state].encoding;
- g_byte_array_append(emif->data, (guchar *)data, len);
+ g_byte_array_append (emif->data, (guchar *)data, len);
/* check the part will actually have content */
if (emif->data->len <= 0) {
return;
}
mem = camel_stream_mem_new_with_byte_array (emif->data);
- emif->data = g_byte_array_new();
+ emif->data = g_byte_array_new ();
- dw = camel_data_wrapper_new();
+ dw = camel_data_wrapper_new ();
if (encoding == emif->base_encoding && (encoding == CAMEL_TRANSFER_ENCODING_BASE64 || encoding == CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE)) {
CamelMimeFilter *enc_filter = camel_mime_filter_basic_new (encoding == CAMEL_TRANSFER_ENCODING_BASE64 ? CAMEL_MIME_FILTER_BASIC_BASE64_ENC : CAMEL_MIME_FILTER_BASIC_QP_ENC);
CamelStream *filter_stream;
@@ -120,32 +120,32 @@ inline_filter_add_part(EMInlineFilter *emif, const gchar *data, gint len)
camel_content_type_unref (content_type);
dw->encoding = encoding;
- part = camel_mime_part_new();
+ part = camel_mime_part_new ();
camel_medium_set_content ((CamelMedium *)part, dw);
- camel_mime_part_set_encoding(part, encoding);
+ camel_mime_part_set_encoding (part, encoding);
g_object_unref (dw);
if (emif->filename)
- camel_mime_part_set_filename(part, emif->filename);
+ camel_mime_part_set_filename (part, emif->filename);
/* pre-snoop the mime type of unknown objects, and poke and hack it into place */
if (camel_content_type_is(dw->mime_type, "application", "octet-stream")
- && (mimetype = em_format_snoop_type(part))
+ && (mimetype = em_format_snoop_type (part))
&& strcmp(mimetype, "application/octet-stream") != 0) {
- camel_data_wrapper_set_mime_type(dw, mimetype);
- camel_mime_part_set_content_type(part, mimetype);
+ camel_data_wrapper_set_mime_type (dw, mimetype);
+ camel_mime_part_set_content_type (part, mimetype);
if (emif->filename)
- camel_mime_part_set_filename(part, emif->filename);
+ camel_mime_part_set_filename (part, emif->filename);
}
- g_free(emif->filename);
+ g_free (emif->filename);
emif->filename = NULL;
- emif->parts = g_slist_append(emif->parts, part);
+ emif->parts = g_slist_append (emif->parts, part);
}
static gint
-inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final)
+inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final)
{
EMInlineFilter *emif = (EMInlineFilter *)f;
gchar *inptr = in, *inend = in+len;
@@ -162,7 +162,7 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final)
if (inptr == inend && start == inptr) {
if (!final) {
- camel_mime_filter_backup(f, start, inend-start);
+ camel_mime_filter_backup (f, start, inend-start);
inend = start;
}
break;
@@ -190,31 +190,31 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final)
if (i >= rest_len || start[i++] != ' ')
break;
- inline_filter_add_part(emif, data_start, start-data_start);
+ inline_filter_add_part (emif, data_start, start-data_start);
- name = g_strndup(start+i, inptr-start-i-1);
+ name = g_strndup (start+i, inptr-start-i-1);
emif->filename = camel_header_decode_string(name, emif->base_type?camel_content_type_param(emif->base_type, "charset"):NULL);
- g_free(name);
+ g_free (name);
data_start = start;
emif->state = EMIF_UUENC;
} else if (rest_len >= 45 && strncmp (start, "(This file must be converted with BinHex 4.0)", 45) == 0) {
restore_inptr ();
- inline_filter_add_part(emif, data_start, start-data_start);
+ inline_filter_add_part (emif, data_start, start-data_start);
data_start = start;
emif->state = EMIF_BINHEX;
} else if (rest_len >= 11 && strncmp (start, "%!PS-Adobe-", 11) == 0) {
restore_inptr ();
- inline_filter_add_part(emif, data_start, start-data_start);
+ inline_filter_add_part (emif, data_start, start-data_start);
data_start = start;
emif->state = EMIF_POSTSCRIPT;
} else if (rest_len >= 34 && strncmp (start, "-----BEGIN PGP SIGNED MESSAGE-----", 34) == 0) {
restore_inptr ();
- inline_filter_add_part(emif, data_start, start-data_start);
+ inline_filter_add_part (emif, data_start, start-data_start);
data_start = start;
emif->state = EMIF_PGPSIGNED;
} else if (rest_len >= 27 && strncmp (start, "-----BEGIN PGP MESSAGE-----", 27) == 0) {
restore_inptr ();
- inline_filter_add_part(emif, data_start, start-data_start);
+ inline_filter_add_part (emif, data_start, start-data_start);
data_start = start;
emif->state = EMIF_PGPENCRYPTED;
}
@@ -223,7 +223,7 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final)
case EMIF_UUENC:
if (rest_len >= 3 && strncmp (start, "end", 3) == 0) {
restore_inptr ();
- inline_filter_add_part(emif, data_start, inptr-data_start);
+ inline_filter_add_part (emif, data_start, inptr-data_start);
data_start = inptr;
emif->state = EMIF_PLAIN;
} else {
@@ -239,7 +239,7 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final)
linelen *= 3;
if (!(len == linelen || len == linelen-1 || len == linelen-2)) {
restore_inptr ();
- inline_filter_add_part(emif, data_start, start-data_start);
+ inline_filter_add_part (emif, data_start, start-data_start);
data_start = start;
inptr = start;
emif->state = EMIF_PLAIN;
@@ -250,7 +250,7 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final)
case EMIF_BINHEX:
if (inptr > (start+1) && inptr[-2] == ':') {
restore_inptr ();
- inline_filter_add_part(emif, data_start, inptr-data_start);
+ inline_filter_add_part (emif, data_start, inptr-data_start);
data_start = inptr;
emif->state = EMIF_PLAIN;
}
@@ -258,7 +258,7 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final)
case EMIF_POSTSCRIPT:
if (rest_len >= 5 && strncmp (start, "%%EOF", 5) == 0) {
restore_inptr ();
- inline_filter_add_part(emif, data_start, inptr-data_start);
+ inline_filter_add_part (emif, data_start, inptr-data_start);
data_start = inptr;
emif->state = EMIF_PLAIN;
}
@@ -266,7 +266,7 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final)
case EMIF_PGPSIGNED:
if (rest_len >= 27 && strncmp (start, "-----END PGP SIGNATURE-----", 27) == 0) {
restore_inptr ();
- inline_filter_add_part(emif, data_start, inptr-data_start);
+ inline_filter_add_part (emif, data_start, inptr-data_start);
data_start = inptr;
emif->state = EMIF_PLAIN;
}
@@ -274,7 +274,7 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final)
case EMIF_PGPENCRYPTED:
if (rest_len >= 25 && strncmp (start, "-----END PGP MESSAGE-----", 25) == 0) {
restore_inptr ();
- inline_filter_add_part(emif, data_start, inptr-data_start);
+ inline_filter_add_part (emif, data_start, inptr-data_start);
data_start = inptr;
emif->state = EMIF_PLAIN;
}
@@ -290,9 +290,9 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final)
/* always stop as plain, especially when not read those tags fully */
emif->state = EMIF_PLAIN;
- inline_filter_add_part(emif, data_start, inend-data_start);
+ inline_filter_add_part (emif, data_start, inend-data_start);
} else {
- g_byte_array_append(emif->data, (guchar *)data_start, inend-data_start);
+ g_byte_array_append (emif->data, (guchar *)data_start, inend-data_start);
}
return 0;
@@ -304,11 +304,11 @@ inline_filter_finalize (GObject *object)
EMInlineFilter *emif = EM_INLINE_FILTER (object);
if (emif->base_type)
- camel_content_type_unref(emif->base_type);
+ camel_content_type_unref (emif->base_type);
camel_mime_filter_reset (CAMEL_MIME_FILTER (object));
- g_byte_array_free(emif->data, TRUE);
- g_free(emif->filename);
+ g_byte_array_free (emif->data, TRUE);
+ g_free (emif->filename);
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (em_inline_filter_parent_class)->finalize (object);
@@ -357,12 +357,12 @@ inline_filter_reset (CamelMimeFilter *filter)
GSList *n = l->next;
g_object_unref (l->data);
- g_slist_free_1(l);
+ g_slist_free_1 (l);
l = n;
}
emif->parts = NULL;
- g_byte_array_set_size(emif->data, 0);
+ g_byte_array_set_size (emif->data, 0);
}
static void
@@ -383,7 +383,7 @@ em_inline_filter_class_init (EMInlineFilterClass *class)
static void
em_inline_filter_init (EMInlineFilter *emif)
{
- emif->data = g_byte_array_new();
+ emif->data = g_byte_array_new ();
}
/**
@@ -400,7 +400,7 @@ em_inline_filter_init (EMInlineFilter *emif)
* Return value:
**/
EMInlineFilter *
-em_inline_filter_new(CamelTransferEncoding base_encoding, CamelContentType *base_type)
+em_inline_filter_new (CamelTransferEncoding base_encoding, CamelContentType *base_type)
{
EMInlineFilter *emif;
@@ -408,21 +408,21 @@ em_inline_filter_new(CamelTransferEncoding base_encoding, CamelContentType *base
emif->base_encoding = base_encoding;
if (base_type) {
emif->base_type = base_type;
- camel_content_type_ref(emif->base_type);
+ camel_content_type_ref (emif->base_type);
}
return emif;
}
CamelMultipart *
-em_inline_filter_get_multipart(EMInlineFilter *emif)
+em_inline_filter_get_multipart (EMInlineFilter *emif)
{
GSList *l = emif->parts;
CamelMultipart *mp;
- mp = camel_multipart_new();
+ mp = camel_multipart_new ();
while (l) {
- camel_multipart_add_part(mp, l->data);
+ camel_multipart_add_part (mp, l->data);
l = l->next;
}
diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c
index ceeb770128..57b5e3dcb9 100644
--- a/mail/em-subscribe-editor.c
+++ b/mail/em-subscribe-editor.c
@@ -124,9 +124,9 @@ struct _MailMsgListNode {
MailMsg *msg;
};
-static void sub_editor_busy(EMSubscribeEditor *se, gint dir);
-static gint sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node);
-static void sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub);
+static void sub_editor_busy (EMSubscribeEditor *se, gint dir);
+static gint sub_queue_fill_level (EMSubscribe *sub, EMSubscribeNode *node);
+static void sub_selection_changed (GtkTreeSelection *selection, EMSubscribe *sub);
static gboolean
test_contains (const gchar *where, const gchar *what)
@@ -203,22 +203,22 @@ update_filtering_column (EMSubscribeEditor *se, struct _EMSubscribe *sub)
}
static void
-sub_node_free(EMSubscribeNode *node)
+sub_node_free (EMSubscribeNode *node)
{
d(printf("sub node free '%s'\n", node->info?node->info->full_name:"<unknown>"));
if (node->path)
- gtk_tree_path_free(node->path);
- g_free(node);
+ gtk_tree_path_free (node->path);
+ g_free (node);
}
static void
-sub_ref(EMSubscribe *sub)
+sub_ref (EMSubscribe *sub)
{
sub->ref_count++;
}
static void
-sub_unref(EMSubscribe *sub)
+sub_unref (EMSubscribe *sub)
{
GSList *l;
@@ -232,7 +232,7 @@ sub_unref(EMSubscribe *sub)
if (sub->list_store)
g_object_unref (sub->list_store);
if (sub->folders)
- g_hash_table_destroy(sub->folders);
+ g_hash_table_destroy (sub->folders);
g_slist_free (sub->all_selectable);
g_slist_foreach (sub->tree_expanded_paths, (GFunc) gtk_tree_path_free, NULL);
g_slist_free (sub->tree_expanded_paths);
@@ -240,14 +240,14 @@ sub_unref(EMSubscribe *sub)
while (l) {
GSList *n = l->next;
- camel_store_free_folder_info(sub->store, (CamelFolderInfo *)l->data);
- g_slist_free_1(l);
+ camel_store_free_folder_info (sub->store, (CamelFolderInfo *)l->data);
+ g_slist_free_1 (l);
l = n;
}
if (sub->store)
g_object_unref (sub->store);
- g_free(sub->store_uri);
- g_free(sub);
+ g_free (sub->store_uri);
+ g_free (sub);
}
}
@@ -299,9 +299,9 @@ sub_folder_done (struct _zsubscribe_msg *m)
/* make sure the tree view matches the correct state */
/* all actions are done on tree store, synced to list store */
model = m->sub->tree_store;
- if (gtk_tree_model_get_iter_from_string(model, &iter, m->path)) {
+ if (gtk_tree_model_get_iter_from_string (model, &iter, m->path)) {
issub = (m->node->info->flags & CAMEL_FOLDER_SUBSCRIBED) != 0;
- gtk_tree_model_get(model, &iter, COL_SUBSCRIBED, &subscribed, COL_INFO_NODE, &node, -1);
+ gtk_tree_model_get (model, &iter, COL_SUBSCRIBED, &subscribed, COL_INFO_NODE, &node, -1);
if (node == m->node) {
gtk_tree_store_set ((GtkTreeStore *)model, &iter, COL_SUBSCRIBED, issub, -1);
} else {
@@ -314,20 +314,20 @@ sub_folder_done (struct _zsubscribe_msg *m)
if (msgListNode) {
next = (struct _zsubscribe_msg *) msgListNode->msg;
/* Free the memory of the MailMsgListNode which won't be used anymore. */
- g_free(msgListNode);
+ g_free (msgListNode);
next->sub->subscribe_id = next->base.seq;
mail_msg_unordered_push (next);
} else {
/* should it go off the model instead? */
- sub_selection_changed(gtk_tree_view_get_selection(m->sub->tree), m->sub);
+ sub_selection_changed (gtk_tree_view_get_selection (m->sub->tree), m->sub);
}
}
static void
sub_folder_free (struct _zsubscribe_msg *m)
{
- g_free(m->path);
- sub_unref(m->sub);
+ g_free (m->path);
+ sub_unref (m->sub);
}
static MailMsgInfo sub_subscribe_folder_info = {
@@ -348,10 +348,10 @@ sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, gint state, const
m = mail_msg_new (&sub_subscribe_folder_info);
m->sub = sub;
- sub_ref(sub);
+ sub_ref (sub);
m->node = node;
m->subscribe = state;
- m->path = g_strdup(spath);
+ m->path = g_strdup (spath);
id = m->base.seq;
if (sub->subscribe_id == -1) {
@@ -359,7 +359,7 @@ sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, gint state, const
d(printf("running subscribe folder '%s'\n", spath));
mail_msg_unordered_push (m);
} else {
- msgListNode = g_malloc0(sizeof(MailMsgListNode));
+ msgListNode = g_malloc0 (sizeof (MailMsgListNode));
msgListNode->msg = (MailMsg *) m;
d(printf("queueing subscribe folder '%s'\n", spath));
g_queue_push_tail (&sub->subscribe, msgListNode);
@@ -385,11 +385,11 @@ sub_fill_levels (EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent)
while (fi) {
gboolean known = FALSE;
- if ((node = g_hash_table_lookup(sub->folders, fi->full_name)) == NULL) {
+ if ((node = g_hash_table_lookup (sub->folders, fi->full_name)) == NULL) {
gboolean state;
- gtk_tree_store_append(treestore, &iter, parent);
- node = g_malloc0(sizeof(*node));
+ gtk_tree_store_append (treestore, &iter, parent);
+ node = g_malloc0 (sizeof (*node));
node->info = fi;
state = (fi->flags & CAMEL_FOLDER_SUBSCRIBED) != 0;
gtk_tree_store_set (treestore, &iter,
@@ -407,8 +407,8 @@ sub_fill_levels (EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent)
gtk_tree_path_free (path);
}
if ((fi->flags & CAMEL_FOLDER_NOINFERIORS) == 0)
- node->path = gtk_tree_model_get_path((GtkTreeModel *)treestore, &iter);
- g_hash_table_insert(sub->folders, fi->full_name, node);
+ node->path = gtk_tree_model_get_path ((GtkTreeModel *)treestore, &iter);
+ g_hash_table_insert (sub->folders, fi->full_name, node);
} else if (node->path) {
gtk_tree_model_get_iter (GTK_TREE_MODEL (treestore), &iter, node->path);
known = TRUE;
@@ -496,18 +496,18 @@ static void
sub_folderinfo_free (struct _emse_folderinfo_msg *m)
{
if (m->info)
- m->sub->info_list = g_slist_prepend(m->sub->info_list, m->info);
+ m->sub->info_list = g_slist_prepend (m->sub->info_list, m->info);
if (!m->sub->cancel)
- sub_editor_busy(m->sub->editor, -1);
+ sub_editor_busy (m->sub->editor, -1);
/* Now we just load the children on demand, so set the
expand state to true if m->node is not NULL
*/
if (m->node)
- gtk_tree_view_expand_row(m->sub->tree, m->node->path, FALSE);
+ gtk_tree_view_expand_row (m->sub->tree, m->node->path, FALSE);
- sub_unref(m->sub);
+ sub_unref (m->sub);
}
static MailMsgInfo sub_folderinfo_info = {
@@ -519,7 +519,7 @@ static MailMsgInfo sub_folderinfo_info = {
};
static gint
-sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node)
+sub_queue_fill_level (EMSubscribe *sub, EMSubscribeNode *node)
{
struct _emse_folderinfo_msg *m;
gint id;
@@ -528,14 +528,14 @@ sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node)
node?node->info->full_name:"<root>"));
m = mail_msg_new (&sub_folderinfo_info);
- sub_ref(sub);
+ sub_ref (sub);
m->sub = sub;
m->node = node;
m->seq = sub->seq;
sub->pending_id = m->base.seq;
- sub_editor_busy(sub->editor, 1);
+ sub_editor_busy (sub->editor, 1);
id = m->base.seq;
@@ -563,19 +563,19 @@ update_buttons_sesitivity (EMSubscribeEditor *se)
/* (un) subscribes the current selection */
static void
-sub_subscribe_toggled(GtkCellRendererToggle *render, const gchar *spath, EMSubscribe *sub)
+sub_subscribe_toggled (GtkCellRendererToggle *render, const gchar *spath, EMSubscribe *sub)
{
GtkTreeIter iter;
- GtkTreeModel *model = gtk_tree_view_get_model(sub->tree);
+ GtkTreeModel *model = gtk_tree_view_get_model (sub->tree);
EMSubscribeNode *node;
gboolean subscribed;
d(printf("subscribe toggled?\n"));
- if (gtk_tree_model_get_iter_from_string(model, &iter, spath)) {
+ if (gtk_tree_model_get_iter_from_string (model, &iter, spath)) {
gchar *free_path;
- gtk_tree_model_get(model, &iter, COL_SUBSCRIBED, &subscribed, COL_INFO_NODE, &node, -1);
+ gtk_tree_model_get (model, &iter, COL_SUBSCRIBED, &subscribed, COL_INFO_NODE, &node, -1);
g_return_if_fail (node != NULL);
subscribed = !subscribed;
d(printf("new state is %s\n", subscribed?"subscribed":"not subscribed"));
@@ -593,17 +593,17 @@ sub_subscribe_toggled(GtkCellRendererToggle *render, const gchar *spath, EMSubsc
spath = free_path;
}
- sub_subscribe_folder(sub, node, subscribed, spath);
+ sub_subscribe_folder (sub, node, subscribed, spath);
}
}
-static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+static void sub_do_changed (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
{
EMSubscribe *sub = data;
EMSubscribeNode *node;
gboolean subscribed;
- gtk_tree_model_get(model, iter, COL_SUBSCRIBED, &subscribed, COL_INFO_NODE, &node, -1);
+ gtk_tree_model_get (model, iter, COL_SUBSCRIBED, &subscribed, COL_INFO_NODE, &node, -1);
if (subscribed)
sub->selected_subscribed_count++;
@@ -611,25 +611,25 @@ static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *
}
static void
-sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub)
+sub_selection_changed (GtkTreeSelection *selection, EMSubscribe *sub)
{
sub->selected_count = 0;
sub->selected_subscribed_count = 0;
- gtk_tree_selection_selected_foreach(selection, sub_do_changed, sub);
+ gtk_tree_selection_selected_foreach (selection, sub_do_changed, sub);
}
/* double-clicking causes a node item to be evaluated directly */
-static void sub_row_activated(GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *col, EMSubscribe *sub)
+static void sub_row_activated (GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *col, EMSubscribe *sub)
{
- if (!gtk_tree_view_row_expanded(tree, path))
- gtk_tree_view_expand_row(tree, path, FALSE);
+ if (!gtk_tree_view_row_expanded (tree, path))
+ gtk_tree_view_expand_row (tree, path, FALSE);
else
- gtk_tree_view_collapse_row(tree, path);
+ gtk_tree_view_collapse_row (tree, path);
}
static void
-sub_destroy(GtkWidget *w, EMSubscribe *sub)
+sub_destroy (GtkWidget *w, EMSubscribe *sub)
{
struct _zsubscribe_msg *m;
MailMsgListNode *msgListNode;
@@ -638,28 +638,28 @@ sub_destroy(GtkWidget *w, EMSubscribe *sub)
sub->cancel = TRUE;
if (sub->pending_id != -1)
- mail_msg_cancel(sub->pending_id);
+ mail_msg_cancel (sub->pending_id);
if (sub->subscribe_id != -1)
- mail_msg_cancel(sub->subscribe_id);
+ mail_msg_cancel (sub->subscribe_id);
while ((msgListNode = g_queue_pop_head (&sub->subscribe)) != NULL) {
m = (struct _zsubscribe_msg *) msgListNode->msg;
/* Free the memory of MailMsgListNode which won't be used anymore. */
- g_free(msgListNode);
- mail_msg_unref(m);
+ g_free (msgListNode);
+ mail_msg_unref (m);
}
- sub_unref(sub);
+ sub_unref (sub);
}
static EMSubscribe *
-subscribe_new(EMSubscribeEditor *se, const gchar *uri)
+subscribe_new (EMSubscribeEditor *se, const gchar *uri)
{
EMSubscribe *sub;
- sub = g_malloc0(sizeof(*sub));
- sub->store_uri = g_strdup(uri);
+ sub = g_malloc0 (sizeof (*sub));
+ sub->store_uri = g_strdup (uri);
sub->editor = se;
sub->ref_count = 1;
sub->pending_id = -1;
@@ -671,17 +671,17 @@ subscribe_new(EMSubscribeEditor *se, const gchar *uri)
}
static void
-subscribe_set_store(EMSubscribe *sub, CamelStore *store)
+subscribe_set_store (EMSubscribe *sub, CamelStore *store)
{
- if (store == NULL || !camel_store_supports_subscriptions(store)) {
+ if (store == NULL || !camel_store_supports_subscriptions (store)) {
GtkWidget *w = gtk_label_new(_("This store does not support subscriptions, or they are not enabled."));
- gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
- sub->widget = gtk_viewport_new(NULL, NULL);
- gtk_viewport_set_shadow_type((GtkViewport *)sub->widget, GTK_SHADOW_IN);
- gtk_container_add((GtkContainer *)sub->widget, w);
- gtk_widget_show(w);
- gtk_widget_show(sub->widget);
+ gtk_label_set_line_wrap ((GtkLabel *)w, TRUE);
+ sub->widget = gtk_viewport_new (NULL, NULL);
+ gtk_viewport_set_shadow_type ((GtkViewport *)sub->widget, GTK_SHADOW_IN);
+ gtk_container_add ((GtkContainer *)sub->widget, w);
+ gtk_widget_show (w);
+ gtk_widget_show (sub->widget);
} else {
GtkTreeSelection *selection;
GtkTreeViewColumn *column;
@@ -720,8 +720,8 @@ subscribe_set_store(EMSubscribe *sub, CamelStore *store)
sub->widget = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sub->widget), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sub->widget), GTK_SHADOW_IN);
- gtk_container_add((GtkContainer *)sub->widget, (GtkWidget *)sub->tree);
- gtk_widget_show(sub->widget);
+ gtk_container_add ((GtkContainer *)sub->widget, (GtkWidget *)sub->tree);
+ gtk_widget_show (sub->widget);
renderer = gtk_cell_renderer_toggle_new ();
g_object_set(renderer, "activatable", TRUE, NULL);
@@ -741,7 +741,7 @@ subscribe_set_store(EMSubscribe *sub, CamelStore *store)
gtk_tree_view_column_pack_start (column, renderer, TRUE);
gtk_tree_view_column_add_attribute (
column, renderer, "text", COL_NAME);
- gtk_tree_view_set_expander_column(sub->tree, gtk_tree_view_get_column(sub->tree, 1));
+ gtk_tree_view_set_expander_column (sub->tree, gtk_tree_view_get_column (sub->tree, 1));
selection = gtk_tree_view_get_selection (sub->tree);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
@@ -753,39 +753,39 @@ subscribe_set_store(EMSubscribe *sub, CamelStore *store)
g_signal_connect(sub->tree, "row-activated", G_CALLBACK(sub_row_activated), sub);
g_signal_connect(sub->tree, "destroy", G_CALLBACK(sub_destroy), sub);
- sub_selection_changed(selection, sub);
+ sub_selection_changed (selection, sub);
g_signal_connect(selection, "changed", G_CALLBACK(sub_selection_changed), sub);
- sub_queue_fill_level(sub, NULL);
+ sub_queue_fill_level (sub, NULL);
update_buttons_sesitivity (sub->editor);
}
- gtk_box_pack_start((GtkBox *)sub->editor->vbox, sub->widget, TRUE, TRUE, 0);
+ gtk_box_pack_start ((GtkBox *)sub->editor->vbox, sub->widget, TRUE, TRUE, 0);
}
static void
-sub_editor_destroy(GtkWidget *w, EMSubscribeEditor *se)
+sub_editor_destroy (GtkWidget *w, EMSubscribeEditor *se)
{
/* need to clean out pending store opens */
d(printf("editor destroyed, freeing editor\n"));
if (se->busy_id)
- g_source_remove(se->busy_id);
+ g_source_remove (se->busy_id);
if (se->refilter_id != 0)
g_source_remove (se->refilter_id);
se->refilter_id = 0;
- g_free(se);
+ g_free (se);
}
static void
-sub_editor_close(GtkWidget *w, EMSubscribeEditor *se)
+sub_editor_close (GtkWidget *w, EMSubscribeEditor *se)
{
- gtk_widget_destroy((GtkWidget *)se->dialog);
+ gtk_widget_destroy ((GtkWidget *)se->dialog);
}
static void
-sub_editor_refresh(GtkWidget *w, EMSubscribeEditor *se)
+sub_editor_refresh (GtkWidget *w, EMSubscribeEditor *se)
{
EMSubscribe *sub = se->current;
GSList *l;
@@ -798,8 +798,8 @@ sub_editor_refresh(GtkWidget *w, EMSubscribeEditor *se)
/* drop any currently pending */
if (sub->pending_id != -1) {
- mail_msg_cancel(sub->pending_id);
- mail_msg_wait(sub->pending_id);
+ mail_msg_cancel (sub->pending_id);
+ mail_msg_wait (sub->pending_id);
}
g_slist_free (sub->all_selectable);
@@ -813,7 +813,7 @@ sub_editor_refresh(GtkWidget *w, EMSubscribeEditor *se)
gtk_list_store_clear ((GtkListStore *)sub->list_store);
if (sub->folders)
- g_hash_table_destroy(sub->folders);
+ g_hash_table_destroy (sub->folders);
sub->folders = g_hash_table_new_full (
g_str_hash, g_str_equal,
(GDestroyNotify) NULL,
@@ -824,22 +824,22 @@ sub_editor_refresh(GtkWidget *w, EMSubscribeEditor *se)
while (l) {
GSList *n = l->next;
- camel_store_free_folder_info(sub->store, (CamelFolderInfo *)l->data);
- g_slist_free_1(l);
+ camel_store_free_folder_info (sub->store, (CamelFolderInfo *)l->data);
+ g_slist_free_1 (l);
l = n;
}
- sub_queue_fill_level(sub, NULL);
+ sub_queue_fill_level (sub, NULL);
}
static void
-sub_editor_got_store(gchar *uri, CamelStore *store, gpointer data)
+sub_editor_got_store (gchar *uri, CamelStore *store, gpointer data)
{
struct _EMSubscribe *sub = data;
if (!sub->cancel)
- subscribe_set_store(sub, store);
- sub_unref(sub);
+ subscribe_set_store (sub, store);
+ sub_unref (sub);
}
static void
@@ -889,14 +889,14 @@ sub_editor_combobox_changed (GtkWidget *w, EMSubscribeEditor *se)
if (i == n) {
se->current = sub;
if (sub->widget) {
- gtk_widget_show(sub->widget);
+ gtk_widget_show (sub->widget);
} else if (sub->store_id == -1) {
- sub_ref(sub);
- sub->store_id = mail_get_store(sub->store_uri, NULL, sub_editor_got_store, sub);
+ sub_ref (sub);
+ sub->store_id = mail_get_store (sub->store_uri, NULL, sub_editor_got_store, sub);
}
} else {
if (sub->widget)
- gtk_widget_hide(sub->widget);
+ gtk_widget_hide (sub->widget);
}
i++;
@@ -909,26 +909,26 @@ sub_editor_combobox_changed (GtkWidget *w, EMSubscribeEditor *se)
update_filtering_column (se, se->current);
}
-static gboolean sub_editor_timeout(EMSubscribeEditor *se)
+static gboolean sub_editor_timeout (EMSubscribeEditor *se)
{
- gtk_progress_bar_pulse((GtkProgressBar *)se->progress);
+ gtk_progress_bar_pulse ((GtkProgressBar *)se->progress);
return TRUE;
}
-static void sub_editor_busy(EMSubscribeEditor *se, gint dir)
+static void sub_editor_busy (EMSubscribeEditor *se, gint dir)
{
gint was;
was = se->busy != 0;
se->busy += dir;
if (was && !se->busy) {
- g_source_remove(se->busy_id);
+ g_source_remove (se->busy_id);
se->busy_id = 0;
- gtk_widget_hide(se->progress);
+ gtk_widget_hide (se->progress);
} else if (!was && se->busy) {
- se->busy_id = g_timeout_add(1000/5, (GSourceFunc)sub_editor_timeout, se);
- gtk_widget_show(se->progress);
+ se->busy_id = g_timeout_add (1000/5, (GSourceFunc)sub_editor_timeout, se);
+ gtk_widget_show (se->progress);
}
}
@@ -1084,7 +1084,7 @@ collapse_all_cb (GtkButton *button, EMSubscribeEditor *se)
}
GtkWidget *
-em_subscribe_editor_new(void)
+em_subscribe_editor_new (void)
{
EMSubscribeEditor *se;
EAccountList *accounts;
@@ -1096,7 +1096,7 @@ em_subscribe_editor_new(void)
GtkListStore *store;
GtkTreeIter gtiter;
- se = g_malloc0(sizeof(*se));
+ se = g_malloc0 (sizeof (*se));
g_queue_init (&se->stores);
/* XXX I think we're leaking the GtkBuilder. */
@@ -1118,16 +1118,16 @@ em_subscribe_editor_new(void)
/* FIXME: This is just to get the shadow, is there a better way? */
w = gtk_label_new(_("Please select a server."));
- se->none_selected = gtk_viewport_new(NULL, NULL);
- gtk_viewport_set_shadow_type((GtkViewport *)se->none_selected, GTK_SHADOW_IN);
- gtk_container_add((GtkContainer *)se->none_selected, w);
- gtk_widget_show(w);
+ se->none_selected = gtk_viewport_new (NULL, NULL);
+ gtk_viewport_set_shadow_type ((GtkViewport *)se->none_selected, GTK_SHADOW_IN);
+ gtk_container_add ((GtkContainer *)se->none_selected, w);
+ gtk_widget_show (w);
- gtk_box_pack_start((GtkBox *)se->vbox, se->none_selected, TRUE, TRUE, 0);
- gtk_widget_show(se->none_selected);
+ gtk_box_pack_start ((GtkBox *)se->vbox, se->none_selected, TRUE, TRUE, 0);
+ gtk_widget_show (se->none_selected);
se->progress = e_builder_get_widget(builder, "progress_bar");
- gtk_widget_hide(se->progress);
+ gtk_widget_hide (se->progress);
se->filter_entry = e_builder_get_widget (builder, "filter_entry");
gtk_entry_set_icon_sensitive (GTK_ENTRY (se->filter_entry), GTK_ENTRY_ICON_SECONDARY, FALSE);
@@ -1189,7 +1189,7 @@ em_subscribe_editor_new(void)
d(printf("not adding account '%s'\n", account->name));
}
}
- g_object_unref(iter);
+ g_object_unref (iter);
gtk_combo_box_set_active (GTK_COMBO_BOX (se->combobox), 0);
g_signal_connect(se->combobox, "changed", G_CALLBACK(sub_editor_combobox_changed), se);
diff --git a/mail/em-subscribe-editor.h b/mail/em-subscribe-editor.h
index 07b6796d8b..553ed7d544 100644
--- a/mail/em-subscribe-editor.h
+++ b/mail/em-subscribe-editor.h
@@ -23,6 +23,6 @@
#include <gtk/gtk.h>
-GtkWidget *em_subscribe_editor_new(void);
+GtkWidget *em_subscribe_editor_new (void);
#endif /* _EM_SUBSCRIBE_EDITOR_H */
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
index 238ccf0452..bb5a21808e 100644
--- a/mail/em-sync-stream.c
+++ b/mail/em-sync-stream.c
@@ -160,7 +160,7 @@ sync_stream_write (CamelStream *stream,
else
sync_stream_sync_op (emss, EMSS_WRITE, string, len, error);
} else {
- sync_stream_sync_op(emss, EMSS_WRITE, string, len, error);
+ sync_stream_sync_op (emss, EMSS_WRITE, string, len, error);
}
return (gssize) len;
diff --git a/mail/em-utils.c b/mail/em-utils.c
index ddf3986066..17957815ad 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -128,29 +128,29 @@ em_utils_ask_open_many (GtkWindow *parent,
* Returns %TRUE if the user clicks Yes or %FALSE otherwise.
**/
gboolean
-em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag, ...)
+em_utils_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, ...)
{
GtkWidget *mbox, *check = NULL;
GtkWidget *container;
va_list ap;
gint button;
- GConfClient *gconf = mail_config_get_gconf_client();
+ GConfClient *gconf = mail_config_get_gconf_client ();
EAlert *alert = NULL;
if (promptkey
- && !gconf_client_get_bool(gconf, promptkey, NULL))
+ && !gconf_client_get_bool (gconf, promptkey, NULL))
return TRUE;
- va_start(ap, tag);
+ va_start (ap, tag);
alert = e_alert_new_valist (tag, ap);
- va_end(ap);
+ va_end (ap);
mbox = e_alert_dialog_new (parent, alert);
g_object_unref (alert);
if (promptkey) {
check = gtk_check_button_new_with_mnemonic (_("_Do not show this message again"));
- gtk_container_set_border_width((GtkContainer *)check, 12);
+ gtk_container_set_border_width ((GtkContainer *)check, 12);
container = gtk_dialog_get_content_area (GTK_DIALOG (mbox));
gtk_box_pack_start (GTK_BOX (container), check, TRUE, TRUE, 0);
gtk_widget_show (check);
@@ -158,9 +158,9 @@ em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag
button = gtk_dialog_run ((GtkDialog *) mbox);
if (promptkey)
- gconf_client_set_bool(gconf, promptkey, !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)), NULL);
+ gconf_client_set_bool (gconf, promptkey, !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)), NULL);
- gtk_widget_destroy(mbox);
+ gtk_widget_destroy (mbox);
return button == GTK_RESPONSE_YES;
}
@@ -343,7 +343,7 @@ em_filename_make_safe (gchar *string)
* achieve, and whether it does that as currently
* written?
*/
- if (!g_unichar_isprint(c) || ( c < 0xff && strchr (unsafe_chars, c&0xff ))) {
+ if (!g_unichar_isprint (c) || ( c < 0xff && strchr (unsafe_chars, c&0xff ))) {
while (ts<p)
*ts++ = '_';
}
@@ -439,7 +439,7 @@ em_utils_flag_for_followup (EMailReader *reader,
CamelMessageInfo *info;
CamelTag *iter;
- info = camel_folder_get_message_info(folder, uids->pdata[i]);
+ info = camel_folder_get_message_info (folder, uids->pdata[i]);
if (info == NULL)
continue;
@@ -484,7 +484,7 @@ em_utils_flag_for_followup_clear (GtkWindow *parent, CamelFolder *folder, GPtrAr
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++) {
- CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
+ CamelMessageInfo *mi = camel_folder_get_message_info (folder, uids->pdata[i]);
if (mi) {
camel_message_info_set_user_tag(mi, "follow-up", NULL);
@@ -523,7 +523,7 @@ em_utils_flag_for_followup_completed (GtkWindow *parent, CamelFolder *folder, GP
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++) {
const gchar *tag;
- CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
+ CamelMessageInfo *mi = camel_folder_get_message_info (folder, uids->pdata[i]);
if (mi) {
tag = camel_message_info_user_tag(mi, "follow-up");
@@ -542,13 +542,13 @@ em_utils_flag_for_followup_completed (GtkWindow *parent, CamelFolder *folder, GP
/* This kind of sucks, because for various reasons most callers need to run synchronously
in the gui thread, however this could take a long, blocking time, to run */
static gint
-em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStream *stream)
+em_utils_write_messages_to_stream (CamelFolder *folder, GPtrArray *uids, CamelStream *stream)
{
CamelStream *filtered_stream;
CamelMimeFilter *from_filter;
gint i, res = 0;
- from_filter = camel_mime_filter_from_new();
+ from_filter = camel_mime_filter_from_new ();
filtered_stream = camel_stream_filter_new (stream);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filtered_stream), from_filter);
@@ -558,22 +558,22 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr
CamelMimeMessage *message;
gchar *from;
- message = camel_folder_get_message(folder, uids->pdata[i], NULL);
+ message = camel_folder_get_message (folder, uids->pdata[i], NULL);
if (message == NULL) {
res = -1;
break;
}
/* we need to flush after each stream write since we are writing to the same stream */
- from = camel_mime_message_build_mbox_from(message);
+ from = camel_mime_message_build_mbox_from (message);
- if (camel_stream_write_string(stream, from, NULL) == -1
- || camel_stream_flush(stream, NULL) == -1
- || camel_data_wrapper_write_to_stream((CamelDataWrapper *)message, (CamelStream *)filtered_stream, NULL) == -1
- || camel_stream_flush((CamelStream *)filtered_stream, NULL) == -1)
+ if (camel_stream_write_string (stream, from, NULL) == -1
+ || camel_stream_flush (stream, NULL) == -1
+ || camel_data_wrapper_write_to_stream ((CamelDataWrapper *)message, (CamelStream *)filtered_stream, NULL) == -1
+ || camel_stream_flush ((CamelStream *)filtered_stream, NULL) == -1)
res = -1;
- g_free(from);
+ g_free (from);
g_object_unref (message);
if (res == -1)
@@ -588,21 +588,21 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr
/* This kind of sucks, because for various reasons most callers need to run synchronously
in the gui thread, however this could take a long, blocking time, to run */
static gint
-em_utils_read_messages_from_stream(CamelFolder *folder, CamelStream *stream)
+em_utils_read_messages_from_stream (CamelFolder *folder, CamelStream *stream)
{
- CamelMimeParser *mp = camel_mime_parser_new();
+ CamelMimeParser *mp = camel_mime_parser_new ();
gboolean success = TRUE;
- camel_mime_parser_scan_from(mp, TRUE);
- camel_mime_parser_init_with_stream(mp, stream, NULL);
+ camel_mime_parser_scan_from (mp, TRUE);
+ camel_mime_parser_init_with_stream (mp, stream, NULL);
- while (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
+ while (camel_mime_parser_step (mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
CamelMimeMessage *msg;
gboolean success;
/* NB: de-from filter, once written */
- msg = camel_mime_message_new();
- if (camel_mime_part_construct_from_parser((CamelMimePart *)msg, mp, NULL) == -1) {
+ msg = camel_mime_message_new ();
+ if (camel_mime_part_construct_from_parser ((CamelMimePart *)msg, mp, NULL) == -1) {
g_object_unref (msg);
break;
}
@@ -614,7 +614,7 @@ em_utils_read_messages_from_stream(CamelFolder *folder, CamelStream *stream)
if (!success)
break;
- camel_mime_parser_step(mp, NULL, NULL);
+ camel_mime_parser_step (mp, NULL, NULL);
}
g_object_unref (mp);
@@ -647,7 +647,7 @@ em_utils_selection_set_mailbox (GtkSelectionData *data,
stream = camel_stream_mem_new_with_byte_array (byte_array);
if (em_utils_write_messages_to_stream (folder, uids, stream) == 0)
- gtk_selection_data_set(
+ gtk_selection_data_set (
data, target, 8,
byte_array->data, byte_array->len);
@@ -682,7 +682,7 @@ em_utils_selection_get_mailbox (GtkSelectionData *selection_data,
/* NB: Although copying would let us run this async ... which it should */
stream = (CamelStream *)
camel_stream_mem_new_with_buffer ((gchar *) data, length);
- em_utils_read_messages_from_stream(folder, stream);
+ em_utils_read_messages_from_stream (folder, stream);
g_object_unref (stream);
}
@@ -710,9 +710,9 @@ em_utils_selection_get_message (GtkSelectionData *selection_data,
stream = (CamelStream *)
camel_stream_mem_new_with_buffer ((gchar *)data, length);
- msg = camel_mime_message_new();
- if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg, stream, NULL) == 0)
- camel_folder_append_message(folder, msg, NULL, NULL, NULL);
+ msg = camel_mime_message_new ();
+ if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *)msg, stream, NULL) == 0)
+ camel_folder_append_message (folder, msg, NULL, NULL, NULL);
g_object_unref (msg);
g_object_unref (stream);
}
@@ -732,21 +732,21 @@ em_utils_selection_set_uidlist (GtkSelectionData *selection_data,
const gchar *uri,
GPtrArray *uids)
{
- GByteArray *array = g_byte_array_new();
+ GByteArray *array = g_byte_array_new ();
GdkAtom target;
gint i;
/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn\0" */
- g_byte_array_append(array, (guchar *)uri, strlen(uri)+1);
+ g_byte_array_append (array, (guchar *)uri, strlen (uri)+1);
for (i=0; i<uids->len; i++)
- g_byte_array_append(array, uids->pdata[i], strlen(uids->pdata[i])+1);
+ g_byte_array_append (array, uids->pdata[i], strlen (uids->pdata[i])+1);
target = gtk_selection_data_get_target (selection_data);
gtk_selection_data_set (
selection_data, target, 8, array->data, array->len);
- g_byte_array_free(array, TRUE);
+ g_byte_array_free (array, TRUE);
}
/**
@@ -779,7 +779,7 @@ em_utils_selection_get_uidlist (GtkSelectionData *selection_data,
if (data == NULL || length == -1)
return;
- uids = g_ptr_array_new();
+ uids = g_ptr_array_new ();
inptr = (gchar *) data;
inend = (gchar *) (data + length);
@@ -790,23 +790,23 @@ em_utils_selection_get_uidlist (GtkSelectionData *selection_data,
inptr++;
if (start > (gchar *) data)
- g_ptr_array_add(uids, g_strndup(start, inptr-start));
+ g_ptr_array_add (uids, g_strndup (start, inptr-start));
inptr++;
}
if (uids->len == 0) {
- g_ptr_array_free(uids, TRUE);
+ g_ptr_array_free (uids, TRUE);
return;
}
- folder = mail_tool_uri_to_folder((gchar *) data, 0, error);
+ folder = mail_tool_uri_to_folder ((gchar *) data, 0, error);
if (folder) {
- camel_folder_transfer_messages_to(folder, uids, dest, NULL, move, error);
+ camel_folder_transfer_messages_to (folder, uids, dest, NULL, move, error);
g_object_unref (folder);
}
- em_utils_uids_free(uids);
+ em_utils_uids_free (uids);
}
/**
@@ -820,7 +820,7 @@ em_utils_selection_get_uidlist (GtkSelectionData *selection_data,
* up when the application quits.
**/
void
-em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids)
+em_utils_selection_set_urilist (GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids)
{
gchar *tmpdir;
CamelStream *fstream;
@@ -834,9 +834,9 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr
/* Try to get the drop filename from the message or folder */
if (uids->len == 1) {
- info = camel_folder_get_message_info(folder, uids->pdata[0]);
+ info = camel_folder_get_message_info (folder, uids->pdata[0]);
if (info) {
- file = g_strdup(camel_message_info_subject(info));
+ file = g_strdup (camel_message_info_subject (info));
camel_folder_free_message_info (folder, info);
}
}
@@ -849,37 +849,37 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr
camel_folder_get_name (folder));
}
- e_filename_make_safe(file);
+ e_filename_make_safe (file);
- tmpfile = g_build_filename(tmpdir, file, NULL);
- g_free(tmpdir);
- g_free(file);
+ tmpfile = g_build_filename (tmpdir, file, NULL);
+ g_free (tmpdir);
+ g_free (file);
- fd = g_open(tmpfile, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666);
+ fd = g_open (tmpfile, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666);
if (fd == -1) {
- g_free(tmpfile);
+ g_free (tmpfile);
return;
}
- uri = g_filename_to_uri(tmpfile, NULL, NULL);
- g_free(tmpfile);
- fstream = camel_stream_fs_new_with_fd(fd);
+ uri = g_filename_to_uri (tmpfile, NULL, NULL);
+ g_free (tmpfile);
+ fstream = camel_stream_fs_new_with_fd (fd);
if (fstream) {
- if (em_utils_write_messages_to_stream(folder, uids, fstream) == 0) {
+ if (em_utils_write_messages_to_stream (folder, uids, fstream) == 0) {
/* terminate with \r\n to be compliant with the spec */
gchar *uri_crlf = g_strconcat(uri, "\r\n", NULL);
GdkAtom target;
target = gtk_selection_data_get_target (data);
- gtk_selection_data_set(data, target, 8, (guchar *)uri_crlf, strlen(uri_crlf));
- g_free(uri_crlf);
+ gtk_selection_data_set (data, target, 8, (guchar *)uri_crlf, strlen (uri_crlf));
+ g_free (uri_crlf);
}
g_object_unref (fstream);
} else
- close(fd);
+ close (fd);
- g_free(uri);
+ g_free (uri);
}
/**
@@ -906,31 +906,31 @@ em_utils_selection_get_urilist (GtkSelectionData *selection_data,
uris = gtk_selection_data_get_uris (selection_data);
for (i=0;res == 0 && uris[i];i++) {
- g_strstrip(uris[i]);
+ g_strstrip (uris[i]);
if (uris[i][0] == '#')
continue;
- url = camel_url_new(uris[i], NULL);
+ url = camel_url_new (uris[i], NULL);
if (url == NULL)
continue;
if (strcmp(url->protocol, "file") == 0
- && (fd = g_open(url->path, O_RDONLY | O_BINARY, 0)) != -1) {
- stream = camel_stream_fs_new_with_fd(fd);
+ && (fd = g_open (url->path, O_RDONLY | O_BINARY, 0)) != -1) {
+ stream = camel_stream_fs_new_with_fd (fd);
if (stream) {
- res = em_utils_read_messages_from_stream(folder, stream);
+ res = em_utils_read_messages_from_stream (folder, stream);
g_object_unref (stream);
} else
- close(fd);
+ close (fd);
}
- camel_url_free(url);
+ camel_url_free (url);
}
g_strfreev (uris);
}
static void
-emu_save_part_done(CamelMimePart *part, gchar *name, gint done, gpointer data)
+emu_save_part_done (CamelMimePart *part, gchar *name, gint done, gpointer data)
{
((gint *)data)[0] = done;
}
@@ -947,7 +947,7 @@ emu_save_part_done(CamelMimePart *part, gchar *name, gint done, gpointer data)
* Return value: NULL if anything failed.
**/
gchar *
-em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode)
+em_utils_temp_save_part (GtkWidget *parent, CamelMimePart *part, gboolean mode)
{
const gchar *filename;
gchar *tmpdir, *path, *utf8_mfilename = NULL, *mfilename = NULL;
@@ -973,18 +973,18 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode)
filename = (const gchar *) mfilename;
}
- path = g_build_filename(tmpdir, filename, NULL);
- g_free(tmpdir);
- g_free(mfilename);
+ path = g_build_filename (tmpdir, filename, NULL);
+ g_free (tmpdir);
+ g_free (mfilename);
/* FIXME: This doesn't handle default charsets */
if (mode)
- mail_msg_wait(mail_save_part(part, path, emu_save_part_done, &done, TRUE));
+ mail_msg_wait (mail_save_part (part, path, emu_save_part_done, &done, TRUE));
else
- mail_msg_wait(mail_save_part(part, path, emu_save_part_done, &done, FALSE));
+ mail_msg_wait (mail_save_part (part, path, emu_save_part_done, &done, FALSE));
if (!done) {
/* mail_save_part should popup an error box automagically */
- g_free(path);
+ g_free (path);
path = NULL;
}
@@ -1055,7 +1055,7 @@ em_utils_folder_is_templates (CamelFolder *folder, const gchar *uri)
* Returns %TRUE if this is a Drafts folder or %FALSE otherwise.
**/
gboolean
-em_utils_folder_is_drafts(CamelFolder *folder, const gchar *uri)
+em_utils_folder_is_drafts (CamelFolder *folder, const gchar *uri)
{
CamelFolder *local_drafts_folder;
CamelStore *parent_store;
@@ -1077,9 +1077,9 @@ em_utils_folder_is_drafts(CamelFolder *folder, const gchar *uri)
parent_store = camel_folder_get_parent_store (folder);
accounts = e_get_account_list ();
- iter = e_list_get_iterator((EList *)accounts);
- while (e_iterator_is_valid(iter)) {
- account = (EAccount *)e_iterator_get(iter);
+ iter = e_list_get_iterator ((EList *)accounts);
+ while (e_iterator_is_valid (iter)) {
+ account = (EAccount *)e_iterator_get (iter);
if (account->drafts_folder_uri) {
drafts_uri = em_uri_to_camel (account->drafts_folder_uri);
@@ -1091,10 +1091,10 @@ em_utils_folder_is_drafts(CamelFolder *folder, const gchar *uri)
g_free (drafts_uri);
}
- e_iterator_next(iter);
+ e_iterator_next (iter);
}
- g_object_unref(iter);
+ g_object_unref (iter);
return is;
}
@@ -1109,7 +1109,7 @@ em_utils_folder_is_drafts(CamelFolder *folder, const gchar *uri)
* Returns %TRUE if this is a Sent folder or %FALSE otherwise.
**/
gboolean
-em_utils_folder_is_sent(CamelFolder *folder, const gchar *uri)
+em_utils_folder_is_sent (CamelFolder *folder, const gchar *uri)
{
CamelFolder *local_sent_folder;
CamelStore *parent_store;
@@ -1130,9 +1130,9 @@ em_utils_folder_is_sent(CamelFolder *folder, const gchar *uri)
parent_store = camel_folder_get_parent_store (folder);
accounts = e_get_account_list ();
- iter = e_list_get_iterator((EList *)accounts);
- while (e_iterator_is_valid(iter)) {
- account = (EAccount *)e_iterator_get(iter);
+ iter = e_list_get_iterator ((EList *)accounts);
+ while (e_iterator_is_valid (iter)) {
+ account = (EAccount *)e_iterator_get (iter);
if (account->sent_folder_uri) {
sent_uri = em_uri_to_camel (account->sent_folder_uri);
@@ -1144,10 +1144,10 @@ em_utils_folder_is_sent(CamelFolder *folder, const gchar *uri)
g_free (sent_uri);
}
- e_iterator_next(iter);
+ e_iterator_next (iter);
}
- g_object_unref(iter);
+ g_object_unref (iter);
return is;
}
@@ -1162,7 +1162,7 @@ em_utils_folder_is_sent(CamelFolder *folder, const gchar *uri)
* Returns %TRUE if this is an Outbox folder or %FALSE otherwise.
**/
gboolean
-em_utils_folder_is_outbox(CamelFolder *folder, const gchar *uri)
+em_utils_folder_is_outbox (CamelFolder *folder, const gchar *uri)
{
CamelFolder *local_outbox_folder;
const gchar *local_outbox_folder_uri;
@@ -1254,7 +1254,7 @@ em_utils_message_to_html (CamelMimeMessage *message, const gchar *credits, guint
mem = (CamelStreamMem *) camel_stream_mem_new ();
camel_stream_mem_set_byte_array (mem, buf);
- emfq = em_format_quote_new(credits, (CamelStream *)mem, flags);
+ emfq = em_format_quote_new (credits, (CamelStream *)mem, flags);
((EMFormat *) emfq)->composer = TRUE;
if (!source) {
@@ -1269,7 +1269,7 @@ em_utils_message_to_html (CamelMimeMessage *message, const gchar *credits, guint
g_free (charset);
}
- em_format_format_clone((EMFormat *)emfq, NULL, NULL, message, source);
+ em_format_format_clone ((EMFormat *)emfq, NULL, NULL, message, source);
if (validity_found)
*validity_found = ((EMFormat *)emfq)->validity_found;
g_object_unref (emfq);
@@ -1283,7 +1283,7 @@ em_utils_message_to_html (CamelMimeMessage *message, const gchar *credits, guint
text = (gchar *)buf->data;
if (len)
*len = buf->len-1;
- g_byte_array_free(buf, FALSE);
+ g_byte_array_free (buf, FALSE);
return text;
}
@@ -1337,7 +1337,7 @@ em_utils_empty_trash (GtkWidget *parent)
/* make sure this is a valid source */
if (account->enabled && account->source->url) {
- provider = camel_provider_get(account->source->url, NULL);
+ provider = camel_provider_get (account->source->url, NULL);
if (provider) {
/* make sure this store is a remote store */
if (provider->flags & CAMEL_PROVIDER_IS_STORAGE) {
@@ -1388,7 +1388,7 @@ em_utils_folder_name_from_uri (const gchar *uri)
* local local:/storage/path#folder -> email://local@local/folder
*/
-gchar *em_uri_from_camel(const gchar *curi)
+gchar *em_uri_from_camel (const gchar *curi)
{
CamelURL *curl;
EAccount *account;
@@ -1398,21 +1398,21 @@ gchar *em_uri_from_camel(const gchar *curi)
/* Easiest solution to code that shouldnt be calling us */
if (!strncmp(curi, "email:", 6))
- return g_strdup(curi);
+ return g_strdup (curi);
- provider = camel_provider_get(curi, NULL);
+ provider = camel_provider_get (curi, NULL);
if (provider == NULL) {
d(printf("em uri from camel failed '%s'\n", curi));
- return g_strdup(curi);
+ return g_strdup (curi);
}
- curl = camel_url_new(curi, NULL);
+ curl = camel_url_new (curi, NULL);
if (curl == NULL)
- return g_strdup(curi);
+ return g_strdup (curi);
if (strcmp(curl->protocol, "vfolder") == 0)
uid = "vfolder@local";
- else if ((account = mail_config_get_account_by_source_url(curi)) == NULL)
+ else if ((account = mail_config_get_account_by_source_url (curi)) == NULL)
uid = "local@local";
else
uid = account->uid;
@@ -1423,19 +1423,19 @@ gchar *em_uri_from_camel(const gchar *curi)
tmp = camel_url_encode(path, ";?");
euri = g_strdup_printf("email://%s/%s", uid, tmp);
- g_free(tmp);
+ g_free (tmp);
} else {
euri = g_strdup_printf("email://%s/", uid);
}
d(printf("em uri from camel '%s' -> '%s'\n", curi, euri));
- camel_url_free(curl);
+ camel_url_free (curl);
return euri;
}
-gchar *em_uri_to_camel(const gchar *euri)
+gchar *em_uri_to_camel (const gchar *euri)
{
EAccountList *accounts;
const EAccount *account;
@@ -1446,14 +1446,14 @@ gchar *em_uri_to_camel(const gchar *euri)
if (strncmp(euri, "email:", 6) != 0) {
d(printf("em uri to camel not euri '%s'\n", euri));
- return g_strdup(euri);
+ return g_strdup (euri);
}
- eurl = camel_url_new(euri, NULL);
+ eurl = camel_url_new (euri, NULL);
if (eurl == NULL)
- return g_strdup(euri);
+ return g_strdup (euri);
- g_return_val_if_fail (eurl->host != NULL, g_strdup(euri));
+ g_return_val_if_fail (eurl->host != NULL, g_strdup (euri));
if (eurl->user != NULL) {
/* Sigh, shoul'dve used mbox@local for mailboxes, not local@local */
@@ -1475,12 +1475,12 @@ gchar *em_uri_to_camel(const gchar *euri)
*p++ = '/';
}
#endif
- camel_url_set_path(curl, base);
- g_free(base);
- camel_url_set_fragment(curl, eurl->path[0]=='/'?eurl->path+1:eurl->path);
- curi = camel_url_to_string(curl, 0);
- camel_url_free(curl);
- camel_url_free(eurl);
+ camel_url_set_path (curl, base);
+ g_free (base);
+ camel_url_set_fragment (curl, eurl->path[0]=='/'?eurl->path+1:eurl->path);
+ curi = camel_url_to_string (curl, 0);
+ camel_url_free (curl);
+ camel_url_free (eurl);
d(printf("em uri to camel local '%s' -> '%s'\n", euri, curi));
return curi;
@@ -1488,17 +1488,17 @@ gchar *em_uri_to_camel(const gchar *euri)
uid = g_strdup_printf("%s@%s", eurl->user, eurl->host);
} else {
- uid = g_strdup(eurl->host);
+ uid = g_strdup (eurl->host);
}
accounts = e_get_account_list ();
- account = e_account_list_find(accounts, E_ACCOUNT_FIND_UID, uid);
- g_free(uid);
+ account = e_account_list_find (accounts, E_ACCOUNT_FIND_UID, uid);
+ g_free (uid);
if (account == NULL) {
- camel_url_free(eurl);
+ camel_url_free (eurl);
d(printf("em uri to camel no account '%s' -> '%s'\n", euri, euri));
- return g_strdup(euri);
+ return g_strdup (euri);
}
service = account->source;
@@ -1506,16 +1506,16 @@ gchar *em_uri_to_camel(const gchar *euri)
if (provider == NULL)
return g_strdup (euri);
- curl = camel_url_new(service->url, NULL);
+ curl = camel_url_new (service->url, NULL);
if (provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
- camel_url_set_fragment(curl, eurl->path[0]=='/'?eurl->path+1:eurl->path);
+ camel_url_set_fragment (curl, eurl->path[0]=='/'?eurl->path+1:eurl->path);
else
- camel_url_set_path(curl, eurl->path);
+ camel_url_set_path (curl, eurl->path);
- curi = camel_url_to_string(curl, 0);
+ curi = camel_url_to_string (curl, 0);
- camel_url_free(eurl);
- camel_url_free(curl);
+ camel_url_free (eurl);
+ camel_url_free (curl);
d(printf("em uri to camel '%s' -> '%s'\n", euri, curi));
@@ -1921,7 +1921,7 @@ em_utils_contact_photo (CamelInternetAddress *cia, gboolean local_only)
if (photo) {
/* Form a mime part out of the photo */
part = camel_mime_part_new ();
- camel_mime_part_set_content(part,
+ camel_mime_part_set_content (part,
(const gchar *) photo->data.inlined.data,
photo->data.inlined.length, "image/jpeg");
}
diff --git a/mail/em-utils.h b/mail/em-utils.h
index ac1f1a0928..7e071756a2 100644
--- a/mail/em-utils.h
+++ b/mail/em-utils.h
@@ -35,7 +35,7 @@ G_BEGIN_DECLS
struct _EMFormat;
gboolean em_utils_ask_open_many (GtkWindow *parent, gint how_many);
-gboolean em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag, ...);
+gboolean em_utils_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, ...);
GPtrArray *em_utils_uids_copy (GPtrArray *uids);
void em_utils_uids_free (GPtrArray *uids);
@@ -52,21 +52,21 @@ void em_utils_flag_for_followup_completed (GtkWindow *parent, CamelFolder *folde
/* This stuff that follows probably doesn't belong here, then again, the stuff above probably belongs elsewhere */
-void em_utils_selection_set_mailbox(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids);
-void em_utils_selection_get_mailbox(GtkSelectionData *data, CamelFolder *folder);
-void em_utils_selection_get_message(GtkSelectionData *data, CamelFolder *folder);
+void em_utils_selection_set_mailbox (GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids);
+void em_utils_selection_get_mailbox (GtkSelectionData *data, CamelFolder *folder);
+void em_utils_selection_get_message (GtkSelectionData *data, CamelFolder *folder);
/* FIXME: be nice if these also worked on CamelFolder's, no easy way to get uri from folder yet tho */
-void em_utils_selection_set_uidlist(GtkSelectionData *data, const gchar *uri, GPtrArray *uids);
-void em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, gint move, GError **error);
-void em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids);
-void em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder);
+void em_utils_selection_set_uidlist (GtkSelectionData *data, const gchar *uri, GPtrArray *uids);
+void em_utils_selection_get_uidlist (GtkSelectionData *data, CamelFolder *dest, gint move, GError **error);
+void em_utils_selection_set_urilist (GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids);
+void em_utils_selection_get_urilist (GtkSelectionData *data, CamelFolder *folder);
-gchar *em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode);
+gchar *em_utils_temp_save_part (GtkWidget *parent, CamelMimePart *part, gboolean mode);
-gboolean em_utils_folder_is_drafts(CamelFolder *folder, const gchar *uri);
-gboolean em_utils_folder_is_templates(CamelFolder *folder, const gchar *uri);
-gboolean em_utils_folder_is_sent(CamelFolder *folder, const gchar *uri);
-gboolean em_utils_folder_is_outbox(CamelFolder *folder, const gchar *uri);
+gboolean em_utils_folder_is_drafts (CamelFolder *folder, const gchar *uri);
+gboolean em_utils_folder_is_templates (CamelFolder *folder, const gchar *uri);
+gboolean em_utils_folder_is_sent (CamelFolder *folder, const gchar *uri);
+gboolean em_utils_folder_is_outbox (CamelFolder *folder, const gchar *uri);
gchar *em_utils_get_proxy_uri (const gchar *uri);
diff --git a/mail/em-vfolder-context.c b/mail/em-vfolder-context.c
index 03ecd3681f..6d5604afe4 100644
--- a/mail/em-vfolder-context.c
+++ b/mail/em-vfolder-context.c
@@ -35,14 +35,14 @@
#include "em-filter-folder-element.h"
-static EFilterElement *vfolder_new_element(ERuleContext *rc, const gchar *type);
+static EFilterElement *vfolder_new_element (ERuleContext *rc, const gchar *type);
static ERuleContextClass *parent_class = NULL;
static void
em_vfolder_context_class_init (EMVFolderContextClass *klass)
{
- parent_class = g_type_class_ref(E_TYPE_RULE_CONTEXT);
+ parent_class = g_type_class_ref (E_TYPE_RULE_CONTEXT);
((ERuleContextClass *)klass)->new_element = vfolder_new_element;
}
@@ -63,7 +63,7 @@ em_vfolder_context_init (EMVFolderContext *vc)
}
GType
-em_vfolder_context_get_type(void)
+em_vfolder_context_get_type (void)
{
static GType type = 0;
@@ -99,14 +99,14 @@ em_vfolder_context_get_type(void)
EMVFolderContext *
em_vfolder_context_new (void)
{
- return g_object_new (em_vfolder_context_get_type(), NULL, NULL);
+ return g_object_new (em_vfolder_context_get_type (), NULL, NULL);
}
static EFilterElement *
vfolder_new_element (ERuleContext *rc, const gchar *type)
{
if (!strcmp(type, "system-flag")) {
- return (EFilterElement *) e_filter_option_new();
+ return (EFilterElement *) e_filter_option_new ();
} else if (!strcmp(type, "score")) {
return (EFilterElement *) e_filter_int_new_type("score", -3, 3);
} else if (!strcmp(type, "folder-curi")) {
@@ -115,9 +115,9 @@ vfolder_new_element (ERuleContext *rc, const gchar *type)
ff->store_camel_uri = TRUE;
return (EFilterElement *) ff;
} else if (!strcmp(type, "folder")) {
- return (EFilterElement *) em_filter_folder_element_new();
+ return (EFilterElement *) em_filter_folder_element_new ();
} else {
- return parent_class->new_element(rc, type);
+ return parent_class->new_element (rc, type);
}
}
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index 9ecca7b60b..073bcec7f0 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -43,17 +43,17 @@
#define d(x)
-static gint validate(EFilterRule *, EAlert **alert);
-static gint vfolder_eq(EFilterRule *fr, EFilterRule *cm);
-static xmlNodePtr xml_encode(EFilterRule *);
-static gint xml_decode(EFilterRule *, xmlNodePtr, ERuleContext *f);
-static void rule_copy(EFilterRule *dest, EFilterRule *src);
+static gint validate (EFilterRule *, EAlert **alert);
+static gint vfolder_eq (EFilterRule *fr, EFilterRule *cm);
+static xmlNodePtr xml_encode (EFilterRule *);
+static gint xml_decode (EFilterRule *, xmlNodePtr, ERuleContext *f);
+static void rule_copy (EFilterRule *dest, EFilterRule *src);
/*static void build_code(EFilterRule *, GString *out);*/
-static GtkWidget *get_widget(EFilterRule *fr, ERuleContext *f);
+static GtkWidget *get_widget (EFilterRule *fr, ERuleContext *f);
-static void em_vfolder_rule_class_init(EMVFolderRuleClass *klass);
-static void em_vfolder_rule_init(EMVFolderRule *vr);
-static void em_vfolder_rule_finalise(GObject *obj);
+static void em_vfolder_rule_class_init (EMVFolderRuleClass *klass);
+static void em_vfolder_rule_init (EMVFolderRule *vr);
+static void em_vfolder_rule_finalise (GObject *obj);
/* DO NOT internationalise these strings */
static const gchar *with_names[] = {
@@ -66,19 +66,19 @@ static const gchar *with_names[] = {
static EFilterRuleClass *parent_class = NULL;
GType
-em_vfolder_rule_get_type(void)
+em_vfolder_rule_get_type (void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo info = {
- sizeof(EMVFolderRuleClass),
+ sizeof (EMVFolderRuleClass),
NULL, /* base_class_init */
NULL, /* base_class_finalize */
(GClassInitFunc)em_vfolder_rule_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
- sizeof(EMVFolderRule),
+ sizeof (EMVFolderRule),
0, /* n_preallocs */
(GInstanceInitFunc)em_vfolder_rule_init,
};
@@ -90,12 +90,12 @@ em_vfolder_rule_get_type(void)
}
static void
-em_vfolder_rule_class_init(EMVFolderRuleClass *klass)
+em_vfolder_rule_class_init (EMVFolderRuleClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
EFilterRuleClass *fr_class =(EFilterRuleClass *)klass;
- parent_class = g_type_class_ref(E_TYPE_FILTER_RULE);
+ parent_class = g_type_class_ref (E_TYPE_FILTER_RULE);
object_class->finalize = em_vfolder_rule_finalise;
@@ -110,21 +110,21 @@ em_vfolder_rule_class_init(EMVFolderRuleClass *klass)
}
static void
-em_vfolder_rule_init(EMVFolderRule *vr)
+em_vfolder_rule_init (EMVFolderRule *vr)
{
vr->with = EM_VFOLDER_RULE_WITH_SPECIFIC;
vr->rule.source = g_strdup("incoming");
}
static void
-em_vfolder_rule_finalise(GObject *obj)
+em_vfolder_rule_finalise (GObject *obj)
{
EMVFolderRule *vr =(EMVFolderRule *)obj;
- g_list_foreach(vr->sources, (GFunc)g_free, NULL);
- g_list_free(vr->sources);
+ g_list_foreach (vr->sources, (GFunc)g_free, NULL);
+ g_list_free (vr->sources);
- G_OBJECT_CLASS(parent_class)->finalize(obj);
+ G_OBJECT_CLASS (parent_class)->finalize (obj);
}
/**
@@ -135,34 +135,34 @@ em_vfolder_rule_finalise(GObject *obj)
* Return value: A new #EMVFolderRule object.
**/
EMVFolderRule *
-em_vfolder_rule_new(void)
+em_vfolder_rule_new (void)
{
- return (EMVFolderRule *)g_object_new(em_vfolder_rule_get_type(), NULL, NULL);
+ return (EMVFolderRule *)g_object_new (em_vfolder_rule_get_type (), NULL, NULL);
}
void
-em_vfolder_rule_add_source(EMVFolderRule *vr, const gchar *uri)
+em_vfolder_rule_add_source (EMVFolderRule *vr, const gchar *uri)
{
- g_return_if_fail (EM_IS_VFOLDER_RULE(vr));
+ g_return_if_fail (EM_IS_VFOLDER_RULE (vr));
g_return_if_fail (uri);
- vr->sources = g_list_append(vr->sources, g_strdup(uri));
+ vr->sources = g_list_append (vr->sources, g_strdup (uri));
- e_filter_rule_emit_changed((EFilterRule *)vr);
+ e_filter_rule_emit_changed ((EFilterRule *)vr);
}
const gchar *
-em_vfolder_rule_find_source(EMVFolderRule *vr, const gchar *uri)
+em_vfolder_rule_find_source (EMVFolderRule *vr, const gchar *uri)
{
GList *l;
- g_return_val_if_fail (EM_IS_VFOLDER_RULE(vr), NULL);
+ g_return_val_if_fail (EM_IS_VFOLDER_RULE (vr), NULL);
/* only does a simple string or address comparison, should
probably do a decoded url comparison */
l = vr->sources;
while (l) {
- if (l->data == uri || !strcmp(l->data, uri))
+ if (l->data == uri || !strcmp (l->data, uri))
return l->data;
l = l->next;
}
@@ -171,33 +171,33 @@ em_vfolder_rule_find_source(EMVFolderRule *vr, const gchar *uri)
}
void
-em_vfolder_rule_remove_source(EMVFolderRule *vr, const gchar *uri)
+em_vfolder_rule_remove_source (EMVFolderRule *vr, const gchar *uri)
{
gchar *found;
- g_return_if_fail (EM_IS_VFOLDER_RULE(vr));
+ g_return_if_fail (EM_IS_VFOLDER_RULE (vr));
- found =(gchar *)em_vfolder_rule_find_source(vr, uri);
+ found =(gchar *)em_vfolder_rule_find_source (vr, uri);
if (found) {
- vr->sources = g_list_remove(vr->sources, found);
- g_free(found);
- e_filter_rule_emit_changed((EFilterRule *)vr);
+ vr->sources = g_list_remove (vr->sources, found);
+ g_free (found);
+ e_filter_rule_emit_changed ((EFilterRule *)vr);
}
}
const gchar *
-em_vfolder_rule_next_source(EMVFolderRule *vr, const gchar *last)
+em_vfolder_rule_next_source (EMVFolderRule *vr, const gchar *last)
{
GList *node;
if (last == NULL) {
node = vr->sources;
} else {
- node = g_list_find(vr->sources, (gchar *)last);
+ node = g_list_find (vr->sources, (gchar *)last);
if (node == NULL)
node = vr->sources;
else
- node = g_list_next(node);
+ node = g_list_next (node);
}
if (node)
@@ -207,9 +207,9 @@ em_vfolder_rule_next_source(EMVFolderRule *vr, const gchar *last)
}
static gint
-validate(EFilterRule *fr, EAlert **alert)
+validate (EFilterRule *fr, EAlert **alert)
{
- g_return_val_if_fail(fr != NULL, 0);
+ g_return_val_if_fail (fr != NULL, 0);
g_warn_if_fail (alert == NULL || *alert == NULL);
if (!fr->name || !*fr->name) {
@@ -227,18 +227,18 @@ validate(EFilterRule *fr, EAlert **alert)
return 0;
}
- return E_FILTER_RULE_CLASS(parent_class)->validate (fr, alert);
+ return E_FILTER_RULE_CLASS (parent_class)->validate (fr, alert);
}
static gint
-list_eq(GList *al, GList *bl)
+list_eq (GList *al, GList *bl)
{
gint truth = TRUE;
while (truth && al && bl) {
gchar *a = al->data, *b = bl->data;
- truth = strcmp(a, b)== 0;
+ truth = strcmp (a, b)== 0;
al = al->next;
bl = bl->next;
}
@@ -247,31 +247,31 @@ list_eq(GList *al, GList *bl)
}
static gint
-vfolder_eq(EFilterRule *fr, EFilterRule *cm)
+vfolder_eq (EFilterRule *fr, EFilterRule *cm)
{
- return E_FILTER_RULE_CLASS(parent_class)->eq(fr, cm)
- && list_eq(((EMVFolderRule *)fr)->sources, ((EMVFolderRule *)cm)->sources);
+ return E_FILTER_RULE_CLASS (parent_class)->eq (fr, cm)
+ && list_eq (((EMVFolderRule *)fr)->sources, ((EMVFolderRule *)cm)->sources);
}
static xmlNodePtr
-xml_encode(EFilterRule *fr)
+xml_encode (EFilterRule *fr)
{
EMVFolderRule *vr =(EMVFolderRule *)fr;
xmlNodePtr node, set, work;
GList *l;
- node = E_FILTER_RULE_CLASS(parent_class)->xml_encode(fr);
+ node = E_FILTER_RULE_CLASS (parent_class)->xml_encode (fr);
g_return_val_if_fail (node != NULL, NULL);
g_return_val_if_fail (vr->with < G_N_ELEMENTS (with_names), NULL);
set = xmlNewNode(NULL, (const guchar *)"sources");
- xmlAddChild(node, set);
+ xmlAddChild (node, set);
xmlSetProp(set, (const guchar *)"with", (guchar *)with_names[vr->with]);
l = vr->sources;
while (l) {
work = xmlNewNode(NULL, (const guchar *)"folder");
xmlSetProp(work, (const guchar *)"uri", (guchar *)l->data);
- xmlAddChild(set, work);
+ xmlAddChild (set, work);
l = l->next;
}
@@ -279,12 +279,12 @@ xml_encode(EFilterRule *fr)
}
static void
-set_with(EMVFolderRule *vr, const gchar *name)
+set_with (EMVFolderRule *vr, const gchar *name)
{
gint i;
for (i = 0; i < G_N_ELEMENTS (with_names); i++) {
- if (!strcmp(name, with_names[i])) {
+ if (!strcmp (name, with_names[i])) {
vr->with = i;
return;
}
@@ -294,21 +294,21 @@ set_with(EMVFolderRule *vr, const gchar *name)
}
static gint
-xml_decode(EFilterRule *fr, xmlNodePtr node, struct _ERuleContext *f)
+xml_decode (EFilterRule *fr, xmlNodePtr node, struct _ERuleContext *f)
{
xmlNodePtr set, work;
gint result;
EMVFolderRule *vr =(EMVFolderRule *)fr;
gchar *tmp;
- result = E_FILTER_RULE_CLASS(parent_class)->xml_decode(fr, node, f);
+ result = E_FILTER_RULE_CLASS (parent_class)->xml_decode (fr, node, f);
if (result != 0)
return result;
/* handle old format file, vfolder source is in filterrule */
if (strcmp(fr->source, "incoming")!= 0) {
- set_with(vr, fr->source);
- g_free(fr->source);
+ set_with (vr, fr->source);
+ g_free (fr->source);
fr->source = g_strdup("incoming");
}
@@ -317,16 +317,16 @@ xml_decode(EFilterRule *fr, xmlNodePtr node, struct _ERuleContext *f)
if (!strcmp((gchar *)set->name, "sources")) {
tmp = (gchar *)xmlGetProp(set, (const guchar *)"with");
if (tmp) {
- set_with(vr, tmp);
- xmlFree(tmp);
+ set_with (vr, tmp);
+ xmlFree (tmp);
}
work = set->children;
while (work) {
if (!strcmp((gchar *)work->name, "folder")) {
tmp = (gchar *)xmlGetProp(work, (const guchar *)"uri");
if (tmp) {
- vr->sources = g_list_append(vr->sources, g_strdup(tmp));
- xmlFree(tmp);
+ vr->sources = g_list_append (vr->sources, g_strdup (tmp));
+ xmlFree (tmp);
}
}
work = work->next;
@@ -338,7 +338,7 @@ xml_decode(EFilterRule *fr, xmlNodePtr node, struct _ERuleContext *f)
}
static void
-rule_copy(EFilterRule *dest, EFilterRule *src)
+rule_copy (EFilterRule *dest, EFilterRule *src)
{
EMVFolderRule *vdest, *vsrc;
GList *node;
@@ -347,8 +347,8 @@ rule_copy(EFilterRule *dest, EFilterRule *src)
vsrc =(EMVFolderRule *)src;
if (vdest->sources) {
- g_list_foreach(vdest->sources, (GFunc)g_free, NULL);
- g_list_free(vdest->sources);
+ g_list_foreach (vdest->sources, (GFunc)g_free, NULL);
+ g_list_free (vdest->sources);
vdest->sources = NULL;
}
@@ -356,13 +356,13 @@ rule_copy(EFilterRule *dest, EFilterRule *src)
while (node) {
gchar *uri = node->data;
- vdest->sources = g_list_append(vdest->sources, g_strdup(uri));
+ vdest->sources = g_list_append (vdest->sources, g_strdup (uri));
node = node->next;
}
vdest->with = vsrc->with;
- E_FILTER_RULE_CLASS(parent_class)->copy(dest, src);
+ E_FILTER_RULE_CLASS (parent_class)->copy (dest, src);
}
enum {
@@ -381,8 +381,8 @@ struct _source_data {
GtkButton *buttons[BUTTON_LAST];
};
-static void source_add(GtkWidget *widget, struct _source_data *data);
-static void source_remove(GtkWidget *widget, struct _source_data *data);
+static void source_add (GtkWidget *widget, struct _source_data *data);
+static void source_remove (GtkWidget *widget, struct _source_data *data);
static struct {
const gchar *name;
@@ -393,7 +393,7 @@ static struct {
};
static void
-set_sensitive(struct _source_data *data)
+set_sensitive (struct _source_data *data)
{
gtk_widget_set_sensitive (
GTK_WIDGET (data->buttons[BUTTON_ADD]), TRUE);
@@ -403,23 +403,23 @@ set_sensitive(struct _source_data *data)
}
static void
-select_source(GtkWidget *list, struct _source_data *data)
+select_source (GtkWidget *list, struct _source_data *data)
{
GtkTreeViewColumn *column;
GtkTreePath *path;
GtkTreeIter iter;
- gtk_tree_view_get_cursor(data->list, &path, &column);
- gtk_tree_model_get_iter(GTK_TREE_MODEL(data->model), &iter, path);
- gtk_tree_path_free(path);
+ gtk_tree_view_get_cursor (data->list, &path, &column);
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (data->model), &iter, path);
+ gtk_tree_path_free (path);
- gtk_tree_model_get(GTK_TREE_MODEL(data->model), &iter, 0, &data->current, -1);
+ gtk_tree_model_get (GTK_TREE_MODEL (data->model), &iter, 0, &data->current, -1);
- set_sensitive(data);
+ set_sensitive (data);
}
static void
-select_source_with_changed(GtkWidget *widget, struct _source_data *data)
+select_source_with_changed (GtkWidget *widget, struct _source_data *data)
{
em_vfolder_rule_with_t with = 0;
GSList *group = NULL;
@@ -430,7 +430,7 @@ select_source_with_changed(GtkWidget *widget, struct _source_data *data)
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
- for (i=0; i< g_slist_length(group); i++) {
+ for (i=0; i< g_slist_length (group); i++) {
if (g_slist_nth_data (group, with = i) == widget)
break;
}
@@ -444,70 +444,70 @@ select_source_with_changed(GtkWidget *widget, struct _source_data *data)
}
/* attempt to make a 'nice' folder name out of the raw uri */
-static gchar *format_source(const gchar *euri)
+static gchar *format_source (const gchar *euri)
{
CamelURL *url;
GString *out;
gchar *res, *uri;
/* This should really probably base it on the account name? */
- uri = em_uri_to_camel(euri);
- url = camel_url_new(uri, NULL);
+ uri = em_uri_to_camel (euri);
+ url = camel_url_new (uri, NULL);
/* bad uri */
if (url == NULL)
return uri;
- g_free(uri);
+ g_free (uri);
- out = g_string_new(url->protocol);
- g_string_append_c(out, ':');
+ out = g_string_new (url->protocol);
+ g_string_append_c (out, ':');
if (url->user && url->host) {
g_string_append_printf(out, "%s@%s", url->user, url->host);
if (url->port)
g_string_append_printf(out, ":%d", url->port);
}
if (url->fragment)
- g_string_append(out, url->fragment);
+ g_string_append (out, url->fragment);
else if (url->path)
- g_string_append(out, url->path);
+ g_string_append (out, url->path);
res = out->str;
- g_string_free(out, FALSE);
+ g_string_free (out, FALSE);
return res;
}
static void
-vfr_folder_response(GtkWidget *dialog, gint button, struct _source_data *data)
+vfr_folder_response (GtkWidget *dialog, gint button, struct _source_data *data)
{
- const gchar *uri = em_folder_selector_get_selected_uri((EMFolderSelector *)dialog);
+ const gchar *uri = em_folder_selector_get_selected_uri ((EMFolderSelector *)dialog);
if (button == GTK_RESPONSE_OK && uri != NULL) {
gchar *urinice, *euri;
GtkTreeSelection *selection;
GtkTreeIter iter;
- euri = em_uri_from_camel(uri);
+ euri = em_uri_from_camel (uri);
- data->vr->sources = g_list_append(data->vr->sources, euri);
+ data->vr->sources = g_list_append (data->vr->sources, euri);
- gtk_list_store_append(data->model, &iter);
- urinice = format_source(euri);
- gtk_list_store_set(data->model, &iter, 0, urinice, 1, euri, -1);
- g_free(urinice);
- selection = gtk_tree_view_get_selection(data->list);
- gtk_tree_selection_select_iter(selection, &iter);
+ gtk_list_store_append (data->model, &iter);
+ urinice = format_source (euri);
+ gtk_list_store_set (data->model, &iter, 0, urinice, 1, euri, -1);
+ g_free (urinice);
+ selection = gtk_tree_view_get_selection (data->list);
+ gtk_tree_selection_select_iter (selection, &iter);
data->current = euri;
- set_sensitive(data);
+ set_sensitive (data);
}
- gtk_widget_destroy(dialog);
+ gtk_widget_destroy (dialog);
}
static void
-source_add(GtkWidget *widget, struct _source_data *data)
+source_add (GtkWidget *widget, struct _source_data *data)
{
EMFolderTree *emft;
GtkWidget *dialog;
@@ -524,11 +524,11 @@ source_add(GtkWidget *widget, struct _source_data *data)
parent, emft, EM_FOLDER_SELECTOR_CAN_CREATE,
_("Add Folder"), NULL, _("_Add"));
g_signal_connect(dialog, "response", G_CALLBACK(vfr_folder_response), data);
- gtk_widget_show(dialog);
+ gtk_widget_show (dialog);
}
static void
-source_remove(GtkWidget *widget, struct _source_data *data)
+source_remove (GtkWidget *widget, struct _source_data *data)
{
GtkTreeSelection *selection;
const gchar *source;
@@ -537,32 +537,32 @@ source_remove(GtkWidget *widget, struct _source_data *data)
gint index = 0;
gint n;
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data->list));
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (data->list));
source = NULL;
- while ((source = em_vfolder_rule_next_source(data->vr, source))) {
- path = gtk_tree_path_new();
- gtk_tree_path_append_index(path, index);
+ while ((source = em_vfolder_rule_next_source (data->vr, source))) {
+ path = gtk_tree_path_new ();
+ gtk_tree_path_append_index (path, index);
- if (gtk_tree_selection_path_is_selected(selection, path)) {
- gtk_tree_model_get_iter(GTK_TREE_MODEL(data->model), &iter, path);
+ if (gtk_tree_selection_path_is_selected (selection, path)) {
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (data->model), &iter, path);
- em_vfolder_rule_remove_source(data->vr, source);
- gtk_list_store_remove(data->model, &iter);
- gtk_tree_path_free(path);
+ em_vfolder_rule_remove_source (data->vr, source);
+ gtk_list_store_remove (data->model, &iter);
+ gtk_tree_path_free (path);
/* now select the next rule */
- n = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(data->model), NULL);
+ n = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (data->model), NULL);
index = index >= n ? n - 1 : index;
if (index >= 0) {
- path = gtk_tree_path_new();
- gtk_tree_path_append_index(path, index);
- gtk_tree_model_get_iter(GTK_TREE_MODEL(data->model), &iter, path);
- gtk_tree_path_free(path);
+ path = gtk_tree_path_new ();
+ gtk_tree_path_append_index (path, index);
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (data->model), &iter, path);
+ gtk_tree_path_free (path);
- gtk_tree_selection_select_iter(selection, &iter);
- gtk_tree_model_get(GTK_TREE_MODEL(data->model), &iter, 0, &data->current, -1);
+ gtk_tree_selection_select_iter (selection, &iter);
+ gtk_tree_model_get (GTK_TREE_MODEL (data->model), &iter, 0, &data->current, -1);
} else {
data->current = NULL;
}
@@ -571,14 +571,14 @@ source_remove(GtkWidget *widget, struct _source_data *data)
}
index++;
- gtk_tree_path_free(path);
+ gtk_tree_path_free (path);
}
- set_sensitive(data);
+ set_sensitive (data);
}
static GtkWidget *
-get_widget(EFilterRule *fr, ERuleContext *rc)
+get_widget (EFilterRule *fr, ERuleContext *rc)
{
EMVFolderRule *vr =(EMVFolderRule *)fr;
GtkWidget *widget, *frame;
@@ -590,9 +590,9 @@ get_widget(EFilterRule *fr, ERuleContext *rc)
GObject *object;
gint i;
- widget = E_FILTER_RULE_CLASS(parent_class)->get_widget(fr, rc);
+ widget = E_FILTER_RULE_CLASS (parent_class)->get_widget (fr, rc);
- data = g_malloc0(sizeof(*data));
+ data = g_malloc0 (sizeof (*data));
data->rc = rc;
data->vr = vr;
@@ -604,7 +604,7 @@ get_widget(EFilterRule *fr, ERuleContext *rc)
g_object_set_data_full((GObject *)frame, "data", data, g_free);
for (i = 0; i < BUTTON_LAST; i++) {
- data->buttons[i] =(GtkButton *)e_builder_get_widget(builder, edit_buttons[i].name);
+ data->buttons[i] =(GtkButton *)e_builder_get_widget (builder, edit_buttons[i].name);
g_signal_connect(data->buttons[i], "clicked", edit_buttons[i].func, data);
}
@@ -614,12 +614,12 @@ get_widget(EFilterRule *fr, ERuleContext *rc)
data->model = GTK_LIST_STORE (object);
source = NULL;
- while ((source = em_vfolder_rule_next_source(vr, source))) {
- gchar *nice = format_source(source);
+ while ((source = em_vfolder_rule_next_source (vr, source))) {
+ gchar *nice = format_source (source);
- gtk_list_store_append(data->model, &iter);
- gtk_list_store_set(data->model, &iter, 0, nice, 1, source, -1);
- g_free(nice);
+ gtk_list_store_append (data->model, &iter);
+ gtk_list_store_set (data->model, &iter, 0, nice, 1, source, -1);
+ g_free (nice);
}
g_signal_connect(data->list, "cursor-changed", G_CALLBACK(select_source), data);
@@ -647,13 +647,13 @@ get_widget(EFilterRule *fr, ERuleContext *rc)
data->source_selector = (GtkWidget *)
e_builder_get_widget (builder, "source_selector");
- rb = g_slist_nth_data(gtk_radio_button_get_group (rb), vr->with);
+ rb = g_slist_nth_data (gtk_radio_button_get_group (rb), vr->with);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), TRUE);
g_signal_emit_by_name (rb, "toggled");
- set_sensitive(data);
+ set_sensitive (data);
- gtk_box_pack_start(GTK_BOX(widget), frame, TRUE, TRUE, 3);
+ gtk_box_pack_start (GTK_BOX (widget), frame, TRUE, TRUE, 3);
g_object_unref (builder);
diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c
index 87c94ff524..80d4c474bc 100644
--- a/mail/importers/elm-importer.c
+++ b/mail/importers/elm-importer.c
@@ -59,7 +59,7 @@ struct _elm_import_msg {
};
static GHashTable *
-parse_elm_rc(const gchar *elmrc)
+parse_elm_rc (const gchar *elmrc)
{
gchar line[4096];
FILE *handle;
@@ -70,7 +70,7 @@ parse_elm_rc(const gchar *elmrc)
(GDestroyNotify) g_free,
(GDestroyNotify) g_free);
- if (!g_file_test(elmrc, G_FILE_TEST_IS_REGULAR))
+ if (!g_file_test (elmrc, G_FILE_TEST_IS_REGULAR))
return prefs;
handle = fopen (elmrc, "r");
@@ -111,7 +111,7 @@ parse_elm_rc(const gchar *elmrc)
*end = 0;
value = g_strdup (linestart);
- g_hash_table_insert(prefs, key, value);
+ g_hash_table_insert (prefs, key, value);
}
fclose (handle);
@@ -120,7 +120,7 @@ parse_elm_rc(const gchar *elmrc)
}
static gchar *
-elm_get_rc(EImport *ei, const gchar *name)
+elm_get_rc (EImport *ei, const gchar *name)
{
GHashTable *prefs;
gchar *elmrc;
@@ -128,19 +128,19 @@ elm_get_rc(EImport *ei, const gchar *name)
prefs = g_object_get_data((GObject *)ei, "elm-rc");
if (prefs == NULL) {
elmrc = g_build_filename(g_get_home_dir(), ".elm/elmrc", NULL);
- prefs = parse_elm_rc(elmrc);
- g_free(elmrc);
+ prefs = parse_elm_rc (elmrc);
+ g_free (elmrc);
g_object_set_data((GObject *)ei, "elm-rc", prefs);
}
if (prefs == NULL)
return NULL;
else
- return g_hash_table_lookup(prefs, name);
+ return g_hash_table_lookup (prefs, name);
}
static gboolean
-elm_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
+elm_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
{
const gchar *maildir;
gchar *elmdir;
@@ -150,8 +150,8 @@ elm_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
return FALSE;
elmdir = g_build_filename(g_get_home_dir (), ".elm", NULL);
- exists = g_file_test(elmdir, G_FILE_TEST_IS_DIR);
- g_free(elmdir);
+ exists = g_file_test (elmdir, G_FILE_TEST_IS_DIR);
+ g_free (elmdir);
if (!exists)
return FALSE;
@@ -159,12 +159,12 @@ elm_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
if (maildir == NULL)
maildir = "Mail";
- if (!g_path_is_absolute(maildir))
- elmdir = g_build_filename(g_get_home_dir (), maildir, NULL);
+ if (!g_path_is_absolute (maildir))
+ elmdir = g_build_filename (g_get_home_dir (), maildir, NULL);
else
elmdir = g_strdup (maildir);
- mailexists = g_file_test(elmdir, G_FILE_TEST_IS_DIR);
+ mailexists = g_file_test (elmdir, G_FILE_TEST_IS_DIR);
g_free (elmdir);
return mailexists;
@@ -191,47 +191,47 @@ elm_import_exec (struct _elm_import_msg *m)
if (maildir == NULL)
maildir = "Mail";
- if (!g_path_is_absolute(maildir))
- elmdir = g_build_filename(g_get_home_dir (), maildir, NULL);
+ if (!g_path_is_absolute (maildir))
+ elmdir = g_build_filename (g_get_home_dir (), maildir, NULL);
else
- elmdir = g_strdup(maildir);
+ elmdir = g_strdup (maildir);
- mail_importer_import_folders_sync(elmdir, elm_special_folders, 0, m->status);
- g_free(elmdir);
+ mail_importer_import_folders_sync (elmdir, elm_special_folders, 0, m->status);
+ g_free (elmdir);
}
static void
-elm_import_done(struct _elm_import_msg *m)
+elm_import_done (struct _elm_import_msg *m)
{
printf("importing complete\n");
if (m->base.error == NULL) {
GConfClient *gconf;
- gconf = gconf_client_get_default();
+ gconf = gconf_client_get_default ();
gconf_client_set_bool(gconf, "/apps/evolution/importer/elm/mail", TRUE, NULL);
- g_object_unref(gconf);
+ g_object_unref (gconf);
}
- e_import_complete(m->import, (EImportTarget *)m->target);
+ e_import_complete (m->import, (EImportTarget *)m->target);
}
static void
-elm_import_free(struct _elm_import_msg *m)
+elm_import_free (struct _elm_import_msg *m)
{
- camel_operation_unref(m->status);
+ camel_operation_unref (m->status);
- g_free(m->status_what);
- g_mutex_free(m->status_lock);
+ g_free (m->status_what);
+ g_mutex_free (m->status_lock);
- g_source_remove(m->status_timeout_id);
+ g_source_remove (m->status_timeout_id);
m->status_timeout_id = 0;
- g_object_unref(m->import);
+ g_object_unref (m->import);
}
static void
-elm_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
+elm_status (CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
struct _elm_import_msg *importer = data;
@@ -240,28 +240,28 @@ elm_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
else if (pc == CAMEL_OPERATION_END)
pc = 100;
- g_mutex_lock(importer->status_lock);
- g_free(importer->status_what);
- importer->status_what = g_strdup(what);
+ g_mutex_lock (importer->status_lock);
+ g_free (importer->status_what);
+ importer->status_what = g_strdup (what);
importer->status_pc = pc;
- g_mutex_unlock(importer->status_lock);
+ g_mutex_unlock (importer->status_lock);
}
static gboolean
-elm_status_timeout(gpointer data)
+elm_status_timeout (gpointer data)
{
struct _elm_import_msg *importer = data;
gint pc;
gchar *what;
if (importer->status_what) {
- g_mutex_lock(importer->status_lock);
+ g_mutex_lock (importer->status_lock);
what = importer->status_what;
importer->status_what = NULL;
pc = importer->status_pc;
- g_mutex_unlock(importer->status_lock);
+ g_mutex_unlock (importer->status_lock);
- e_import_status(importer->import, (EImportTarget *)importer->target, what, pc);
+ e_import_status (importer->import, (EImportTarget *)importer->target, what, pc);
}
return TRUE;
@@ -276,19 +276,19 @@ static MailMsgInfo elm_import_info = {
};
static gint
-mail_importer_elm_import(EImport *ei, EImportTarget *target)
+mail_importer_elm_import (EImport *ei, EImportTarget *target)
{
struct _elm_import_msg *m;
gint id;
- m = mail_msg_new(&elm_import_info);
+ m = mail_msg_new (&elm_import_info);
g_datalist_set_data(&target->data, "elm-msg", m);
m->import = ei;
- g_object_ref(m->import);
+ g_object_ref (m->import);
m->target = (EImportTargetHome *)target;
- m->status_timeout_id = g_timeout_add(100, elm_status_timeout, m);
- m->status_lock = g_mutex_new();
- m->status = camel_operation_new(elm_status, m);
+ m->status_timeout_id = g_timeout_add (100, elm_status_timeout, m);
+ m->status_lock = g_mutex_new ();
+ m->status = camel_operation_new (elm_status, m);
id = m->base.seq;
@@ -306,7 +306,7 @@ checkbox_toggle_cb (GtkToggleButton *tb, EImportTarget *target)
}
static GtkWidget *
-elm_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
+elm_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *box, *w;
GConfClient *gconf;
@@ -315,39 +315,39 @@ elm_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
gconf = gconf_client_get_default ();
done_mail = gconf_client_get_bool (
gconf, "/apps/evolution/importer/elm/mail", NULL);
- g_object_unref(gconf);
+ g_object_unref (gconf);
g_datalist_set_data (
&target->data, "elm-do-mail", GINT_TO_POINTER(!done_mail));
- box = gtk_vbox_new(FALSE, 2);
+ box = gtk_vbox_new (FALSE, 2);
w = gtk_check_button_new_with_label(_("Mail"));
- gtk_toggle_button_set_active((GtkToggleButton *)w, !done_mail);
+ gtk_toggle_button_set_active ((GtkToggleButton *)w, !done_mail);
g_signal_connect(w, "toggled", G_CALLBACK(checkbox_toggle_cb), target);
- gtk_box_pack_start((GtkBox *)box, w, FALSE, FALSE, 0);
- gtk_widget_show_all(box);
+ gtk_box_pack_start ((GtkBox *)box, w, FALSE, FALSE, 0);
+ gtk_widget_show_all (box);
return box;
}
static void
-elm_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+elm_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
if (GPOINTER_TO_INT(g_datalist_get_data(&target->data, "elm-do-mail")))
- mail_importer_elm_import(ei, target);
+ mail_importer_elm_import (ei, target);
else
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
}
static void
-elm_cancel(EImport *ei, EImportTarget *target, EImportImporter *im)
+elm_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
{
struct _elm_import_msg *m = g_datalist_get_data(&target->data, "elm-msg");
if (m)
- camel_operation_cancel(m->status);
+ camel_operation_cancel (m->status);
}
static EImportImporter elm_importer = {
@@ -361,7 +361,7 @@ static EImportImporter elm_importer = {
};
EImportImporter *
-elm_importer_peek(void)
+elm_importer_peek (void)
{
elm_importer.name = _("Evolution Elm importer");
elm_importer.description = _("Import mail from Elm.");
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 2d18bf62db..affebd74b6 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -70,14 +70,14 @@ typedef struct {
} MboxImporter;
static void
-folder_selected(EMFolderSelectionButton *button, EImportTargetURI *target)
+folder_selected (EMFolderSelectionButton *button, EImportTargetURI *target)
{
- g_free(target->uri_dest);
- target->uri_dest = g_strdup(em_folder_selection_button_get_selection(button));
+ g_free (target->uri_dest);
+ target->uri_dest = g_strdup (em_folder_selection_button_get_selection (button));
}
static GtkWidget *
-mbox_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
+mbox_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWindow *window;
GtkWidget *hbox, *w;
@@ -111,24 +111,24 @@ mbox_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
if (!select_uri)
select_uri = g_strdup (e_mail_local_get_folder_uri (E_MAIL_FOLDER_INBOX));
- hbox = gtk_hbox_new(FALSE, 0);
+ hbox = gtk_hbox_new (FALSE, 0);
w = gtk_label_new_with_mnemonic (_("_Destination folder:"));
- gtk_box_pack_start((GtkBox *)hbox, w, FALSE, TRUE, 6);
+ gtk_box_pack_start ((GtkBox *)hbox, w, FALSE, TRUE, 6);
label = GTK_LABEL (w);
- w = em_folder_selection_button_new(
+ w = em_folder_selection_button_new (
_("Select folder"), _("Select folder to import into"));
gtk_label_set_mnemonic_widget (label, w);
em_folder_selection_button_set_selection ((EMFolderSelectionButton *)w, select_uri);
folder_selected (EM_FOLDER_SELECTION_BUTTON (w), (EImportTargetURI *)target);
g_signal_connect (w, "selected", G_CALLBACK(folder_selected), target);
- gtk_box_pack_start((GtkBox *)hbox, w, FALSE, TRUE, 6);
+ gtk_box_pack_start ((GtkBox *)hbox, w, FALSE, TRUE, 6);
- w = gtk_vbox_new(FALSE, 0);
- gtk_box_pack_start((GtkBox *)w, hbox, FALSE, FALSE, 0);
- gtk_widget_show_all(w);
+ w = gtk_vbox_new (FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)w, hbox, FALSE, FALSE, 0);
+ gtk_widget_show_all (w);
g_free (select_uri);
@@ -136,7 +136,7 @@ mbox_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
}
static gboolean
-mbox_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
+mbox_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
{
gchar signature[6];
gboolean ret = FALSE;
@@ -154,20 +154,20 @@ mbox_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
if (strncmp(s->uri_src, "file:///", strlen("file:///")) != 0)
return FALSE;
- filename = g_filename_from_uri(s->uri_src, NULL, NULL);
- fd = g_open(filename, O_RDONLY, 0);
- g_free(filename);
+ filename = g_filename_from_uri (s->uri_src, NULL, NULL);
+ fd = g_open (filename, O_RDONLY, 0);
+ g_free (filename);
if (fd != -1) {
- n = read(fd, signature, 5);
+ n = read (fd, signature, 5);
ret = n == 5 && memcmp(signature, "From ", 5) == 0;
- close(fd);
+ close (fd);
}
return ret;
}
static void
-mbox_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
+mbox_status (CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
MboxImporter *importer = data;
@@ -176,77 +176,77 @@ mbox_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
else if (pc == CAMEL_OPERATION_END)
pc = 100;
- g_mutex_lock(importer->status_lock);
- g_free(importer->status_what);
- importer->status_what = g_strdup(what);
+ g_mutex_lock (importer->status_lock);
+ g_free (importer->status_what);
+ importer->status_what = g_strdup (what);
importer->status_pc = pc;
- g_mutex_unlock(importer->status_lock);
+ g_mutex_unlock (importer->status_lock);
}
static gboolean
-mbox_status_timeout(gpointer data)
+mbox_status_timeout (gpointer data)
{
MboxImporter *importer = data;
gint pc;
gchar *what;
if (importer->status_what) {
- g_mutex_lock(importer->status_lock);
+ g_mutex_lock (importer->status_lock);
what = importer->status_what;
importer->status_what = NULL;
pc = importer->status_pc;
- g_mutex_unlock(importer->status_lock);
+ g_mutex_unlock (importer->status_lock);
- e_import_status(importer->import, (EImportTarget *)importer->target, what, pc);
+ e_import_status (importer->import, (EImportTarget *)importer->target, what, pc);
}
return TRUE;
}
static void
-mbox_import_done(gpointer data, GError **error)
+mbox_import_done (gpointer data, GError **error)
{
MboxImporter *importer = data;
- g_source_remove(importer->status_timeout_id);
- g_free(importer->status_what);
- g_mutex_free(importer->status_lock);
- camel_operation_unref(importer->cancel);
+ g_source_remove (importer->status_timeout_id);
+ g_free (importer->status_what);
+ g_mutex_free (importer->status_lock);
+ camel_operation_unref (importer->cancel);
- e_import_complete(importer->import, importer->target);
- g_free(importer);
+ e_import_complete (importer->import, importer->target);
+ g_free (importer);
}
static void
-mbox_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+mbox_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
MboxImporter *importer;
gchar *filename;
/* TODO: do we validate target? */
- importer = g_malloc0(sizeof(*importer));
+ importer = g_malloc0 (sizeof (*importer));
g_datalist_set_data(&target->data, "mbox-data", importer);
importer->import = ei;
importer->target = target;
- importer->status_lock = g_mutex_new();
- importer->status_timeout_id = g_timeout_add(100, mbox_status_timeout, importer);
- importer->cancel = camel_operation_new(mbox_status, importer);
+ importer->status_lock = g_mutex_new ();
+ importer->status_timeout_id = g_timeout_add (100, mbox_status_timeout, importer);
+ importer->cancel = camel_operation_new (mbox_status, importer);
- filename = g_filename_from_uri(((EImportTargetURI *)target)->uri_src, NULL, NULL);
+ filename = g_filename_from_uri (((EImportTargetURI *)target)->uri_src, NULL, NULL);
mail_importer_import_mbox (
filename, ((EImportTargetURI *)target)->uri_dest,
importer->cancel, mbox_import_done, importer);
- g_free(filename);
+ g_free (filename);
}
static void
-mbox_cancel(EImport *ei, EImportTarget *target, EImportImporter *im)
+mbox_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
{
MboxImporter *importer = g_datalist_get_data(&target->data, "mbox-data");
if (importer)
- camel_operation_cancel(importer->cancel);
+ camel_operation_cancel (importer->cancel);
}
static MboxImporterCreatePreviewFunc create_preview_func = NULL;
@@ -321,7 +321,7 @@ mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
g_free (filename);
- mp = camel_mime_parser_new();
+ mp = camel_mime_parser_new ();
camel_mime_parser_scan_from (mp, TRUE);
if (camel_mime_parser_init_with_fd (mp, fd) == -1) {
g_object_unref (mp);
@@ -332,7 +332,7 @@ mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
CamelMimeMessage *msg;
gchar *from;
- msg = camel_mime_message_new();
+ msg = camel_mime_message_new ();
if (camel_mime_part_construct_from_parser (
(CamelMimePart *)msg, mp, NULL) == -1) {
g_object_unref (msg);
@@ -426,7 +426,7 @@ static EImportImporter mbox_importer = {
};
EImportImporter *
-mbox_importer_peek(void)
+mbox_importer_peek (void)
{
mbox_importer.name = _("Berkeley Mailbox (mbox)");
mbox_importer.description = _("Importer Berkeley Mailbox format folders");
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index 7c497108b1..d00725533a 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -76,7 +76,7 @@ static struct {
};
static guint32
-decode_status(const gchar *status)
+decode_status (const gchar *status)
{
const gchar *p;
guint32 flags = 0;
@@ -93,9 +93,9 @@ decode_status(const gchar *status)
}
static guint32
-decode_mozilla_status(const gchar *tmp)
+decode_mozilla_status (const gchar *tmp)
{
- unsigned long status = strtoul(tmp, NULL, 16);
+ unsigned long status = strtoul (tmp, NULL, 16);
guint32 flags = 0;
gint i;
@@ -114,7 +114,7 @@ import_mbox_exec (struct _import_mbox_msg *m)
gint fd;
CamelMessageInfo *info;
- if (g_stat(m->path, &st) == -1) {
+ if (g_stat (m->path, &st) == -1) {
g_warning("cannot find source file to import '%s': %s", m->path, g_strerror(errno));
return;
}
@@ -128,79 +128,79 @@ import_mbox_exec (struct _import_mbox_msg *m)
if (folder == NULL)
return;
- if (S_ISREG(st.st_mode)) {
+ if (S_ISREG (st.st_mode)) {
CamelOperation *oldcancel = NULL;
- fd = g_open(m->path, O_RDONLY|O_BINARY, 0);
+ fd = g_open (m->path, O_RDONLY|O_BINARY, 0);
if (fd == -1) {
g_warning("cannot find source file to import '%s': %s", m->path, g_strerror(errno));
goto fail1;
}
- mp = camel_mime_parser_new();
- camel_mime_parser_scan_from(mp, TRUE);
- if (camel_mime_parser_init_with_fd(mp, fd) == -1) { /* will never happen - 0 is unconditionally returned */
+ mp = camel_mime_parser_new ();
+ camel_mime_parser_scan_from (mp, TRUE);
+ if (camel_mime_parser_init_with_fd (mp, fd) == -1) { /* will never happen - 0 is unconditionally returned */
goto fail2;
}
if (m->cancel)
- oldcancel = camel_operation_register(m->cancel);
+ oldcancel = camel_operation_register (m->cancel);
camel_operation_start (
NULL, _("Importing '%s'"),
camel_folder_get_full_name (folder));
- camel_folder_freeze(folder);
- while (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
+ camel_folder_freeze (folder);
+ while (camel_mime_parser_step (mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
CamelMimeMessage *msg;
const gchar *tmp;
gint pc = 0;
guint32 flags = 0;
if (st.st_size > 0)
- pc = (gint)(100.0 * ((double)camel_mime_parser_tell(mp) / (double)st.st_size));
- camel_operation_progress(NULL, pc);
+ pc = (gint)(100.0 * ((double)camel_mime_parser_tell (mp) / (double)st.st_size));
+ camel_operation_progress (NULL, pc);
- msg = camel_mime_message_new();
- if (camel_mime_part_construct_from_parser((CamelMimePart *)msg, mp, NULL) == -1) {
+ msg = camel_mime_message_new ();
+ if (camel_mime_part_construct_from_parser ((CamelMimePart *)msg, mp, NULL) == -1) {
/* set exception? */
g_object_unref (msg);
break;
}
- info = camel_message_info_new(NULL);
+ info = camel_message_info_new (NULL);
tmp = camel_medium_get_header((CamelMedium *)msg, "X-Mozilla-Status");
if (tmp)
- flags |= decode_mozilla_status(tmp);
+ flags |= decode_mozilla_status (tmp);
tmp = camel_medium_get_header((CamelMedium *)msg, "Status");
if (tmp)
- flags |= decode_status(tmp);
+ flags |= decode_status (tmp);
tmp = camel_medium_get_header((CamelMedium *)msg, "X-Status");
if (tmp)
- flags |= decode_status(tmp);
+ flags |= decode_status (tmp);
- camel_message_info_set_flags(info, flags, ~0);
+ camel_message_info_set_flags (info, flags, ~0);
camel_folder_append_message (
folder, msg, info, NULL, &m->base.error);
- camel_message_info_free(info);
+ camel_message_info_free (info);
g_object_unref (msg);
if (m->base.error != NULL)
break;
- camel_mime_parser_step(mp, NULL, NULL);
+ camel_mime_parser_step (mp, NULL, NULL);
}
- camel_folder_sync(folder, FALSE, NULL);
- camel_folder_thaw(folder);
- camel_operation_end(NULL);
+ camel_folder_sync (folder, FALSE, NULL);
+ camel_folder_thaw (folder);
+ camel_operation_end (NULL);
/* TODO: these api's are a bit weird, registering the old is the same as deregistering */
if (m->cancel)
- camel_operation_register(oldcancel);
+ camel_operation_register (oldcancel);
fail2:
g_object_unref (mp);
}
fail1:
- camel_folder_sync(folder, FALSE, NULL);
+ camel_folder_sync (folder, FALSE, NULL);
g_object_unref (folder);
}
@@ -208,16 +208,16 @@ static void
import_mbox_done (struct _import_mbox_msg *m)
{
if (m->done)
- m->done(m->done_data, &m->base.error);
+ m->done (m->done_data, &m->base.error);
}
static void
import_mbox_free (struct _import_mbox_msg *m)
{
if (m->cancel)
- camel_operation_unref(m->cancel);
- g_free(m->uri);
- g_free(m->path);
+ camel_operation_unref (m->cancel);
+ g_free (m->uri);
+ g_free (m->path);
}
static MailMsgInfo import_mbox_info = {
@@ -229,19 +229,19 @@ static MailMsgInfo import_mbox_info = {
};
gint
-mail_importer_import_mbox(const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, GError **), gpointer data)
+mail_importer_import_mbox (const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, GError **), gpointer data)
{
struct _import_mbox_msg *m;
gint id;
- m = mail_msg_new(&import_mbox_info);
- m->path = g_strdup(path);
- m->uri = g_strdup(folderuri);
+ m = mail_msg_new (&import_mbox_info);
+ m->path = g_strdup (path);
+ m->uri = g_strdup (folderuri);
m->done = done;
m->done_data = data;
if (cancel) {
m->cancel = cancel;
- camel_operation_ref(cancel);
+ camel_operation_ref (cancel);
}
id = m->base.seq;
@@ -251,21 +251,21 @@ mail_importer_import_mbox(const gchar *path, const gchar *folderuri, CamelOperat
}
void
-mail_importer_import_mbox_sync(const gchar *path, const gchar *folderuri, CamelOperation *cancel)
+mail_importer_import_mbox_sync (const gchar *path, const gchar *folderuri, CamelOperation *cancel)
{
struct _import_mbox_msg *m;
- m = mail_msg_new(&import_mbox_info);
- m->path = g_strdup(path);
- m->uri = g_strdup(folderuri);
+ m = mail_msg_new (&import_mbox_info);
+ m->path = g_strdup (path);
+ m->uri = g_strdup (folderuri);
if (cancel) {
m->cancel = cancel;
- camel_operation_ref(cancel);
+ camel_operation_ref (cancel);
}
- import_mbox_exec(m);
- import_mbox_done(m);
- mail_msg_unref(m);
+ import_mbox_exec (m);
+ import_mbox_done (m);
+ mail_msg_unref (m);
}
struct _import_folders_data {
@@ -276,7 +276,7 @@ struct _import_folders_data {
};
static void
-import_folders_rec(struct _import_folders_data *m, const gchar *filepath, const gchar *folderparent)
+import_folders_rec (struct _import_folders_data *m, const gchar *filepath, const gchar *folderparent)
{
GDir *dir;
const gchar *d;
@@ -285,7 +285,7 @@ import_folders_rec(struct _import_folders_data *m, const gchar *filepath, const
gchar *filefull, *foldersub, *uri, *utf8_filename;
const gchar *folder;
- dir = g_dir_open(filepath, 0, NULL);
+ dir = g_dir_open (filepath, 0, NULL);
if (dir == NULL)
return;
@@ -295,17 +295,17 @@ import_folders_rec(struct _import_folders_data *m, const gchar *filepath, const
camel_operation_start(NULL, _("Scanning %s"), utf8_filename);
g_free (utf8_filename);
- while ( (d=g_dir_read_name(dir))) {
+ while ( (d=g_dir_read_name (dir))) {
if (d[0] == '.')
continue;
- filefull = g_build_filename(filepath, d, NULL);
+ filefull = g_build_filename (filepath, d, NULL);
/* skip non files and directories, and skip directories in mozilla mode */
- if (g_stat(filefull, &st) == -1
- || !(S_ISREG(st.st_mode)
- || (m->elmfmt && S_ISDIR(st.st_mode)))) {
- g_free(filefull);
+ if (g_stat (filefull, &st) == -1
+ || !(S_ISREG (st.st_mode)
+ || (m->elmfmt && S_ISDIR (st.st_mode)))) {
+ g_free (filefull);
continue;
}
@@ -314,7 +314,7 @@ import_folders_rec(struct _import_folders_data *m, const gchar *filepath, const
gint i;
for (i=0;m->special_folders[i].orig;i++)
- if (strcmp(m->special_folders[i].orig, folder) == 0) {
+ if (strcmp (m->special_folders[i].orig, folder) == 0) {
folder = m->special_folders[i].new;
break;
}
@@ -325,32 +325,32 @@ import_folders_rec(struct _import_folders_data *m, const gchar *filepath, const
}
printf("importing to uri %s\n", uri);
- mail_importer_import_mbox_sync(filefull, uri, m->cancel);
- g_free(uri);
+ mail_importer_import_mbox_sync (filefull, uri, m->cancel);
+ g_free (uri);
/* This little gem re-uses the stat buffer and filefull to automagically scan mozilla-format folders */
if (!m->elmfmt) {
gchar *tmp = g_strdup_printf("%s.sbd", filefull);
- g_free(filefull);
+ g_free (filefull);
filefull = tmp;
- if (g_stat(filefull, &st) == -1) {
- g_free(filefull);
+ if (g_stat (filefull, &st) == -1) {
+ g_free (filefull);
continue;
}
}
- if (S_ISDIR(st.st_mode)) {
+ if (S_ISDIR (st.st_mode)) {
foldersub = folderparent?g_strdup_printf("%s/%s", folderparent, folder):g_strdup(folder);
- import_folders_rec(m, filefull, foldersub);
- g_free(foldersub);
+ import_folders_rec (m, filefull, foldersub);
+ g_free (foldersub);
}
- g_free(filefull);
+ g_free (filefull);
}
- g_dir_close(dir);
+ g_dir_close (dir);
- camel_operation_end(NULL);
+ camel_operation_end (NULL);
}
/**
@@ -369,7 +369,7 @@ import_folders_rec(struct _import_folders_data *m, const gchar *filepath, const
* standard unix directories.
**/
void
-mail_importer_import_folders_sync(const gchar *filepath, MailImporterSpecial special_folders[], gint flags, CamelOperation *cancel)
+mail_importer_import_folders_sync (const gchar *filepath, MailImporterSpecial special_folders[], gint flags, CamelOperation *cancel)
{
struct _import_folders_data m;
CamelOperation *oldcancel = NULL;
@@ -379,10 +379,10 @@ mail_importer_import_folders_sync(const gchar *filepath, MailImporterSpecial spe
m.cancel = cancel;
if (cancel)
- oldcancel = camel_operation_register(cancel);
+ oldcancel = camel_operation_register (cancel);
- import_folders_rec(&m, filepath, NULL);
+ import_folders_rec (&m, filepath, NULL);
if (cancel)
- camel_operation_register(oldcancel);
+ camel_operation_register (oldcancel);
}
diff --git a/mail/importers/mail-importer.h b/mail/importers/mail-importer.h
index 01a69c981d..9c8c531226 100644
--- a/mail/importers/mail-importer.h
+++ b/mail/importers/mail-importer.h
@@ -27,7 +27,7 @@
#include <e-util/e-import.h>
#include <camel/camel.h>
-EImportImporter *mbox_importer_peek(void);
+EImportImporter *mbox_importer_peek (void);
typedef void (*MboxImporterCreatePreviewFunc)(GObject *preview, GtkWidget **preview_widget);
typedef void (*MboxImporterFillPreviewFunc)(GObject *preview, CamelMimeMessage *msg);
@@ -36,8 +36,8 @@ typedef void (*MboxImporterFillPreviewFunc)(GObject *preview, CamelMimeMessage *
(mail importer cannot link to em-format-html-display directly) */
void mbox_importer_set_preview_funcs (MboxImporterCreatePreviewFunc create_func, MboxImporterFillPreviewFunc fill_func);
-EImportImporter *elm_importer_peek(void);
-EImportImporter *pine_importer_peek(void);
+EImportImporter *elm_importer_peek (void);
+EImportImporter *pine_importer_peek (void);
/* Defines copied from nsMsgMessageFlags.h in Mozilla source. */
/* Evolution only cares about these headers I think */
@@ -46,8 +46,8 @@ EImportImporter *pine_importer_peek(void);
#define MSG_FLAG_MARKED 0x0004
#define MSG_FLAG_EXPUNGED 0x0008
-gint mail_importer_import_mbox(const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, GError **), gpointer data);
-void mail_importer_import_mbox_sync(const gchar *path, const gchar *folderuri, CamelOperation *cancel);
+gint mail_importer_import_mbox (const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, GError **), gpointer data);
+void mail_importer_import_mbox_sync (const gchar *path, const gchar *folderuri, CamelOperation *cancel);
struct _MailImporterSpecial {
const gchar *orig, *new;
@@ -58,6 +58,6 @@ typedef struct _MailImporterSpecial MailImporterSpecial;
#define MAIL_IMPORTER_MOZFMT (1<<0)
/* api in flux */
-void mail_importer_import_folders_sync(const gchar *filepath, MailImporterSpecial special_folders[], gint flags, CamelOperation *cancel);
+void mail_importer_import_folders_sync (const gchar *filepath, MailImporterSpecial special_folders[], gint flags, CamelOperation *cancel);
#endif
diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c
index 354d53d377..c2c0ec22d7 100644
--- a/mail/importers/pine-importer.c
+++ b/mail/importers/pine-importer.c
@@ -62,7 +62,7 @@ struct _pine_import_msg {
};
static gboolean
-pine_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
+pine_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
{
gchar *maildir, *addrfile;
gboolean md_exists, addr_exists;
@@ -71,11 +71,11 @@ pine_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
return FALSE;
maildir = g_build_filename(g_get_home_dir (), "mail", NULL);
- md_exists = g_file_test(maildir, G_FILE_TEST_IS_DIR);
- g_free(maildir);
+ md_exists = g_file_test (maildir, G_FILE_TEST_IS_DIR);
+ g_free (maildir);
addrfile = g_build_filename(g_get_home_dir (), ".addressbook", NULL);
- addr_exists = g_file_test(addrfile, G_FILE_TEST_IS_REGULAR);
+ addr_exists = g_file_test (addrfile, G_FILE_TEST_IS_REGULAR);
g_free (addrfile);
return md_exists || addr_exists;
@@ -96,7 +96,7 @@ FIXME: we dont handle aliases in lists.
*/
static void
-import_contact(EBook *book, gchar *line)
+import_contact (EBook *book, gchar *line)
{
gchar **strings, *addr, **addrs;
gint i;
@@ -105,14 +105,14 @@ import_contact(EBook *book, gchar *line)
EContact *card;
gsize len;
- card = e_contact_new();
+ card = e_contact_new ();
strings = g_strsplit(line, "\t", 5);
if (strings[0] && strings[1] && strings[2]) {
- e_contact_set(card, E_CONTACT_NICKNAME, strings[0]);
- e_contact_set(card, E_CONTACT_FULL_NAME, strings[1]);
+ e_contact_set (card, E_CONTACT_NICKNAME, strings[0]);
+ e_contact_set (card, E_CONTACT_FULL_NAME, strings[1]);
addr = strings[2];
- len = strlen(addr);
+ len = strlen (addr);
if (addr[0] == '(' && addr[len-1] == ')') {
addr[0] = 0;
addr[len-1] = 0;
@@ -126,37 +126,37 @@ import_contact(EBook *book, gchar *line)
EDestination *d;
EVCardAttribute *attr;
- d = e_destination_new();
- e_destination_set_email(d, addrs[i]);
+ d = e_destination_new ();
+ e_destination_set_email (d, addrs[i]);
attr = e_vcard_attribute_new (NULL, EVC_EMAIL);
e_destination_export_to_vcard_attribute (d, attr);
- list = g_list_append(list, attr);
- g_object_unref(d);
+ list = g_list_append (list, attr);
+ g_object_unref (d);
}
- e_contact_set_attributes(card, E_CONTACT_EMAIL, list);
- g_list_foreach(list, (GFunc)e_vcard_attribute_free, NULL);
- g_list_free(list);
- g_strfreev(addrs);
- e_contact_set(card, E_CONTACT_IS_LIST, GINT_TO_POINTER(TRUE));
+ e_contact_set_attributes (card, E_CONTACT_EMAIL, list);
+ g_list_foreach (list, (GFunc)e_vcard_attribute_free, NULL);
+ g_list_free (list);
+ g_strfreev (addrs);
+ e_contact_set (card, E_CONTACT_IS_LIST, GINT_TO_POINTER (TRUE));
} else {
- e_contact_set(card, E_CONTACT_EMAIL_1, strings[2]);
+ e_contact_set (card, E_CONTACT_EMAIL_1, strings[2]);
}
/*name = e_contact_name_from_string(strings[1]);*/
if (strings[3] && strings[4])
- e_contact_set(card, E_CONTACT_NOTE, strings[4]);
+ e_contact_set (card, E_CONTACT_NOTE, strings[4]);
/* FIXME Error checking */
- e_book_add_contact(book, card, NULL);
- g_object_unref(card);
+ e_book_add_contact (book, card, NULL);
+ g_object_unref (card);
}
g_strfreev (strings);
}
static void
-import_contacts(void)
+import_contacts (void)
{
ESource *primary;
ESourceList *source_list;
@@ -168,51 +168,51 @@ import_contacts(void)
printf("importing pine addressbook\n");
- if (!e_book_get_addressbooks(&source_list, NULL))
+ if (!e_book_get_addressbooks (&source_list, NULL))
return;
name = g_build_filename(g_get_home_dir(), ".addressbook", NULL);
fp = fopen(name, "r");
- g_free(name);
+ g_free (name);
if (fp == NULL)
return;
- primary = e_source_list_peek_source_any(source_list);
+ primary = e_source_list_peek_source_any (source_list);
/* FIXME Better error handling */
- if ((book = e_book_new(primary,NULL)) == NULL) {
- fclose(fp);
+ if ((book = e_book_new (primary,NULL)) == NULL) {
+ fclose (fp);
g_warning ("Could not create EBook.");
return;
}
- e_book_open(book, TRUE, NULL);
- g_object_unref(primary);
- g_object_unref(source_list);
+ e_book_open (book, TRUE, NULL);
+ g_object_unref (primary);
+ g_object_unref (source_list);
line = g_string_new("");
- g_string_set_size(line, 256);
+ g_string_set_size (line, 256);
offset = 0;
- while (fgets(line->str+offset, 256, fp)) {
+ while (fgets (line->str+offset, 256, fp)) {
gsize len;
- len = strlen(line->str+offset)+offset;
+ len = strlen (line->str+offset)+offset;
if (line->str[len-1] == '\n')
- g_string_truncate(line, len-1);
- else if (!feof(fp)) {
+ g_string_truncate (line, len-1);
+ else if (!feof (fp)) {
offset = len;
- g_string_set_size(line, len+256);
+ g_string_set_size (line, len+256);
continue;
} else {
- g_string_truncate(line, len);
+ g_string_truncate (line, len);
}
- import_contact(book, line->str);
+ import_contact (book, line->str);
offset = 0;
}
- g_string_free(line, TRUE);
- fclose(fp);
- g_object_unref(book);
+ g_string_free (line, TRUE);
+ fclose (fp);
+ g_object_unref (book);
}
static gchar *
@@ -228,17 +228,17 @@ static MailImporterSpecial pine_special_folders[] = {
};
static void
-pine_import_exec(struct _pine_import_msg *m)
+pine_import_exec (struct _pine_import_msg *m)
{
if (GPOINTER_TO_INT(g_datalist_get_data(&m->target->data, "pine-do-addr")))
- import_contacts();
+ import_contacts ();
if (GPOINTER_TO_INT(g_datalist_get_data(&m->target->data, "pine-do-mail"))) {
gchar *path;
path = g_build_filename(g_get_home_dir(), "mail", NULL);
- mail_importer_import_folders_sync(path, pine_special_folders, 0, m->status);
- g_free(path);
+ mail_importer_import_folders_sync (path, pine_special_folders, 0, m->status);
+ g_free (path);
}
}
@@ -250,29 +250,29 @@ pine_import_done (struct _pine_import_msg *m)
if (m->base.error == NULL) {
GConfClient *gconf;
- gconf = gconf_client_get_default();
+ gconf = gconf_client_get_default ();
if (GPOINTER_TO_INT(g_datalist_get_data(&m->target->data, "pine-do-addr")))
gconf_client_set_bool(gconf, "/apps/evolution/importer/pine/addr", TRUE, NULL);
if (GPOINTER_TO_INT(g_datalist_get_data(&m->target->data, "pine-do-mail")))
gconf_client_set_bool(gconf, "/apps/evolution/importer/pine/mail", TRUE, NULL);
- g_object_unref(gconf);
+ g_object_unref (gconf);
}
- e_import_complete(m->import, (EImportTarget *)m->target);
+ e_import_complete (m->import, (EImportTarget *)m->target);
}
static void
pine_import_free (struct _pine_import_msg *m)
{
- camel_operation_unref(m->status);
+ camel_operation_unref (m->status);
- g_free(m->status_what);
- g_mutex_free(m->status_lock);
+ g_free (m->status_what);
+ g_mutex_free (m->status_lock);
- g_source_remove(m->status_timeout_id);
+ g_source_remove (m->status_timeout_id);
m->status_timeout_id = 0;
- g_object_unref(m->import);
+ g_object_unref (m->import);
}
static void
@@ -288,11 +288,11 @@ pine_status (CamelOperation *op,
else if (pc == CAMEL_OPERATION_END)
pc = 100;
- g_mutex_lock(importer->status_lock);
- g_free(importer->status_what);
- importer->status_what = g_strdup(what);
+ g_mutex_lock (importer->status_lock);
+ g_free (importer->status_what);
+ importer->status_what = g_strdup (what);
importer->status_pc = pc;
- g_mutex_unlock(importer->status_lock);
+ g_mutex_unlock (importer->status_lock);
}
static gboolean
@@ -302,11 +302,11 @@ pine_status_timeout (struct _pine_import_msg *importer)
gchar *what;
if (importer->status_what) {
- g_mutex_lock(importer->status_lock);
+ g_mutex_lock (importer->status_lock);
what = importer->status_what;
importer->status_what = NULL;
pc = importer->status_pc;
- g_mutex_unlock(importer->status_lock);
+ g_mutex_unlock (importer->status_lock);
e_import_status (
importer->import, (EImportTarget *)
@@ -331,15 +331,15 @@ mail_importer_pine_import (EImport *ei,
struct _pine_import_msg *m;
gint id;
- m = mail_msg_new(&pine_import_info);
+ m = mail_msg_new (&pine_import_info);
g_datalist_set_data(&target->data, "pine-msg", m);
m->import = ei;
- g_object_ref(m->import);
+ g_object_ref (m->import);
m->target = target;
m->status_timeout_id = g_timeout_add (
100, (GSourceFunc) pine_status_timeout, m);
- m->status_lock = g_mutex_new();
- m->status = camel_operation_new(pine_status, m);
+ m->status_lock = g_mutex_new ();
+ m->status = camel_operation_new (pine_status, m);
id = m->base.seq;
@@ -375,7 +375,7 @@ checkbox_addr_toggle_cb (GtkToggleButton *tb,
}
static GtkWidget *
-pine_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
+pine_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *box, *w;
GConfClient *gconf;
@@ -386,7 +386,7 @@ pine_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
gconf, "/apps/evolution/importer/pine/mail", NULL);
done_addr = gconf_client_get_bool (
gconf, "/apps/evolution/importer/pine/address", NULL);
- g_object_unref(gconf);
+ g_object_unref (gconf);
g_datalist_set_data (
&target->data, "pine-do-mail",
@@ -395,40 +395,40 @@ pine_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
&target->data, "pine-do-addr",
GINT_TO_POINTER (!done_addr));
- box = gtk_vbox_new(FALSE, 2);
+ box = gtk_vbox_new (FALSE, 2);
w = gtk_check_button_new_with_label(_("Mail"));
- gtk_toggle_button_set_active((GtkToggleButton *)w, !done_mail);
+ gtk_toggle_button_set_active ((GtkToggleButton *)w, !done_mail);
g_signal_connect(w, "toggled", G_CALLBACK(checkbox_mail_toggle_cb), target);
- gtk_box_pack_start((GtkBox *)box, w, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)box, w, FALSE, FALSE, 0);
w = gtk_check_button_new_with_label(_("Address Book"));
- gtk_toggle_button_set_active((GtkToggleButton *)w, !done_addr);
+ gtk_toggle_button_set_active ((GtkToggleButton *)w, !done_addr);
g_signal_connect(w, "toggled", G_CALLBACK(checkbox_addr_toggle_cb), target);
- gtk_box_pack_start((GtkBox *)box, w, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)box, w, FALSE, FALSE, 0);
- gtk_widget_show_all(box);
+ gtk_widget_show_all (box);
return box;
}
static void
-pine_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+pine_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
if (GPOINTER_TO_INT(g_datalist_get_data(&target->data, "pine-do-mail"))
|| GPOINTER_TO_INT(g_datalist_get_data(&target->data, "pine-do-addr")))
- mail_importer_pine_import(ei, target);
+ mail_importer_pine_import (ei, target);
else
- e_import_complete(ei, target);
+ e_import_complete (ei, target);
}
static void
-pine_cancel(EImport *ei, EImportTarget *target, EImportImporter *im)
+pine_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
{
struct _pine_import_msg *m = g_datalist_get_data(&target->data, "pine-msg");
if (m)
- camel_operation_cancel(m->status);
+ camel_operation_cancel (m->status);
}
static EImportImporter pine_importer = {
@@ -442,7 +442,7 @@ static EImportImporter pine_importer = {
};
EImportImporter *
-pine_importer_peek(void)
+pine_importer_peek (void)
{
pine_importer.name = _("Evolution Pine importer");
pine_importer.description = _("Import mail from Pine.");
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index 1ad5d99649..5fa343e64b 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -110,12 +110,12 @@ reg_match (gchar *str, gchar *regstr)
gint error;
gint ret;
- error = regcomp(&reg, regstr, REG_EXTENDED|REG_ICASE|REG_NOSUB);
+ error = regcomp (&reg, regstr, REG_EXTENDED|REG_ICASE|REG_NOSUB);
if (error != 0) {
return 0;
}
- error = regexec(&reg, str, 0, NULL, 0);
- regfree(&reg);
+ error = regexec (&reg, str, 0, NULL, 0);
+ regfree (&reg);
return (error == 0);
}
#endif
@@ -199,7 +199,7 @@ rule_match_subject (ERuleContext *context, EFilterRule *rule, const gchar *subje
}
static void
-rule_match_mlist(ERuleContext *context, EFilterRule *rule, const gchar *mlist)
+rule_match_mlist (ERuleContext *context, EFilterRule *rule, const gchar *mlist)
{
EFilterPart *part;
EFilterElement *element;
@@ -208,13 +208,13 @@ rule_match_mlist(ERuleContext *context, EFilterRule *rule, const gchar *mlist)
return;
part = e_rule_context_create_part(context, "mlist");
- e_filter_rule_add_part(rule, part);
+ e_filter_rule_add_part (rule, part);
element = e_filter_part_find_element(part, "mlist-type");
e_filter_option_set_current((EFilterOption *)element, "is");
element = e_filter_part_find_element (part, "mlist");
- e_filter_input_set_value((EFilterInput *)element, mlist);
+ e_filter_input_set_value ((EFilterInput *)element, mlist);
}
static void
@@ -266,7 +266,7 @@ rule_from_message (EFilterRule *rule, ERuleContext *context, CamelMimeMessage *m
from = camel_mime_message_get_from (msg);
for (i = 0; from && camel_internet_address_get (from, i, &name, &address); i++) {
- rule_add_sender(context, rule, address);
+ rule_add_sender (context, rule, address);
if (name == NULL || name[0] == '\0')
name = address;
namestr = g_strdup_printf(_("Mail from %s"), name);
@@ -287,12 +287,12 @@ rule_from_message (EFilterRule *rule, ERuleContext *context, CamelMimeMessage *m
mlist = camel_header_raw_check_mailing_list (&((CamelMimePart *)msg)->headers);
if (mlist) {
- rule_match_mlist(context, rule, mlist);
+ rule_match_mlist (context, rule, mlist);
name = g_strdup_printf (_("%s mailing list"), mlist);
- e_filter_rule_set_name(rule, name);
- g_free(name);
+ e_filter_rule_set_name (rule, name);
+ g_free (name);
}
- g_free(mlist);
+ g_free (mlist);
}
}
@@ -300,12 +300,12 @@ EFilterRule *
em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg, gint flags, const gchar *source)
{
EMVFolderRule *rule;
- gchar *euri = em_uri_from_camel(source);
+ gchar *euri = em_uri_from_camel (source);
rule = em_vfolder_rule_new ();
em_vfolder_rule_add_source (rule, euri);
rule_from_message ((EFilterRule *)rule, (ERuleContext *)context, msg, flags);
- g_free(euri);
+ g_free (euri);
return (EFilterRule *)rule;
}
@@ -314,12 +314,12 @@ EFilterRule *
em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *addr, gint flags, const gchar *source)
{
EMVFolderRule *rule;
- gchar *euri = em_uri_from_camel(source);
+ gchar *euri = em_uri_from_camel (source);
rule = em_vfolder_rule_new ();
em_vfolder_rule_add_source (rule, euri);
rule_from_address ((EFilterRule *)rule, (ERuleContext *)context, addr, flags);
- g_free(euri);
+ g_free (euri);
return (EFilterRule *)rule;
}
@@ -366,7 +366,7 @@ filter_gui_add_from_message (CamelMimeMessage *msg, const gchar *source, gint fl
}
void
-mail_filter_rename_uri(CamelStore *store, const gchar *olduri, const gchar *newuri)
+mail_filter_rename_uri (CamelStore *store, const gchar *olduri, const gchar *newuri)
{
EMFilterContext *fc;
const gchar *config_dir;
@@ -374,8 +374,8 @@ mail_filter_rename_uri(CamelStore *store, const gchar *olduri, const gchar *newu
GList *changed;
gchar *eolduri, *enewuri;
- eolduri = em_uri_from_camel(olduri);
- enewuri = em_uri_from_camel(newuri);
+ eolduri = em_uri_from_camel (olduri);
+ enewuri = em_uri_from_camel (newuri);
fc = em_filter_context_new ();
config_dir = mail_session_get_config_dir ();
@@ -384,23 +384,23 @@ mail_filter_rename_uri(CamelStore *store, const gchar *olduri, const gchar *newu
e_rule_context_load ((ERuleContext *)fc, system, user);
g_free (system);
- changed = e_rule_context_rename_uri((ERuleContext *)fc, eolduri, enewuri, g_str_equal);
+ changed = e_rule_context_rename_uri ((ERuleContext *)fc, eolduri, enewuri, g_str_equal);
if (changed) {
d(printf("Folder rename '%s' -> '%s' changed filters, resaving\n", olduri, newuri));
- if (e_rule_context_save((ERuleContext *)fc, user) == -1)
+ if (e_rule_context_save ((ERuleContext *)fc, user) == -1)
g_warning("Could not write out changed filter rules\n");
- e_rule_context_free_uri_list((ERuleContext *)fc, changed);
+ e_rule_context_free_uri_list ((ERuleContext *)fc, changed);
}
- g_free(user);
- g_object_unref(fc);
+ g_free (user);
+ g_object_unref (fc);
- g_free(enewuri);
- g_free(eolduri);
+ g_free (enewuri);
+ g_free (eolduri);
}
void
-mail_filter_delete_uri(CamelStore *store, const gchar *uri)
+mail_filter_delete_uri (CamelStore *store, const gchar *uri)
{
EMFilterContext *fc;
const gchar *config_dir;
@@ -408,7 +408,7 @@ mail_filter_delete_uri(CamelStore *store, const gchar *uri)
GList *deleted;
gchar *euri;
- euri = em_uri_from_camel(uri);
+ euri = em_uri_from_camel (uri);
fc = em_filter_context_new ();
config_dir = mail_session_get_config_dir ();
@@ -464,7 +464,7 @@ mail_filter_delete_uri(CamelStore *store, const gchar *uri)
e_rule_context_free_uri_list ((ERuleContext *) fc, deleted);
}
- g_free(user);
- g_object_unref(fc);
- g_free(euri);
+ g_free (user);
+ g_object_unref (fc);
+ g_free (euri);
}
diff --git a/mail/mail-autofilter.h b/mail/mail-autofilter.h
index 2d14120e71..7e385eb36f 100644
--- a/mail/mail-autofilter.h
+++ b/mail/mail-autofilter.h
@@ -37,15 +37,15 @@ enum {
AUTO_MLIST = 8
};
-EFilterRule *em_vfolder_rule_from_message(EMVFolderContext *context, CamelMimeMessage *msg, gint flags, const gchar *source);
-EFilterRule *filter_rule_from_message(EMFilterContext *context, CamelMimeMessage *msg, gint flags);
-EFilterRule *em_vfolder_rule_from_address(EMVFolderContext *context, CamelInternetAddress *addr, gint flags, const gchar *source);
+EFilterRule *em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg, gint flags, const gchar *source);
+EFilterRule *filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, gint flags);
+EFilterRule *em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *addr, gint flags, const gchar *source);
/* easiest place to put this */
-void filter_gui_add_from_message(CamelMimeMessage *msg, const gchar *source, gint flags);
+void filter_gui_add_from_message (CamelMimeMessage *msg, const gchar *source, gint flags);
/* Also easiest place for these, we should really share a global rule context for this stuff ... */
-void mail_filter_rename_uri(CamelStore *store, const gchar *olduri, const gchar *newuri);
-void mail_filter_delete_uri(CamelStore *store, const gchar *uri);
+void mail_filter_rename_uri (CamelStore *store, const gchar *olduri, const gchar *newuri);
+void mail_filter_delete_uri (CamelStore *store, const gchar *uri);
#endif
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 8bbd9fc119..730aeba1bc 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -163,8 +163,8 @@ gconf_jh_headers_changed (GConfClient *client, guint cnxn_id,
value = g_ptr_array_new ();
while (node && node->data) {
gchar **tok = g_strsplit (node->data, "=", 2);
- g_ptr_array_add (name, g_strdup(tok[0]));
- g_ptr_array_add (value, g_strdup(tok[1]));
+ g_ptr_array_add (name, g_strdup (tok[0]));
+ g_ptr_array_add (value, g_strdup (tok[1]));
node = node->next;
g_strfreev (tok);
}
@@ -576,13 +576,13 @@ mail_config_get_lookup_book_local_only (void)
static void
folder_deleted_cb (MailFolderCache *cache, CamelStore *store, const gchar *uri, gpointer user_data)
{
- mail_config_uri_deleted(CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name, uri);
+ mail_config_uri_deleted (CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS (store))->compare_folder_name, uri);
}
static void
folder_renamed_cb (MailFolderCache *cache, CamelStore *store, const gchar *olduri, const gchar *newuri, gpointer user_data)
{
- mail_config_uri_renamed(CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name,
+ mail_config_uri_renamed (CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS (store))->compare_folder_name,
olduri, newuri);
}
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index c9493c8d1b..d12d77ea64 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -137,7 +137,7 @@ struct _store_info {
G_DEFINE_TYPE (MailFolderCache, mail_folder_cache, G_TYPE_OBJECT)
static void
-free_update(struct _folder_update *up)
+free_update (struct _folder_update *up)
{
g_free (up->full_name);
g_free (up->uri);
@@ -200,7 +200,7 @@ real_flush_updates (gpointer o, gpointer event_data, gpointer data)
}
}
- free_update(up);
+ free_update (up);
g_mutex_lock (self->priv->stores_mutex);
}
@@ -294,17 +294,17 @@ update_1folder (MailFolderCache *self,
if (unread == -1)
return;
- up = g_malloc0(sizeof(*up));
- up->full_name = g_strdup(mfi->full_name);
+ up = g_malloc0 (sizeof (*up));
+ up->full_name = g_strdup (mfi->full_name);
up->unread = unread;
up->new = new;
up->store = g_object_ref (mfi->store_info->store);
- up->uri = g_strdup(mfi->uri);
+ up->uri = g_strdup (mfi->uri);
up->msg_uid = g_strdup (msg_uid);
up->msg_sender = g_strdup (msg_sender);
up->msg_subject = g_strdup (msg_subject);
g_queue_push_head (&self->priv->updates, up);
- flush_updates(self);
+ flush_updates (self);
}
static void
@@ -341,7 +341,7 @@ folder_changed_cb (CamelFolder *folder,
local_outbox = e_mail_local_get_folder (E_MAIL_FOLDER_OUTBOX);
local_sent = e_mail_local_get_folder (E_MAIL_FOLDER_SENT);
- if (!CAMEL_IS_VEE_FOLDER(folder)
+ if (!CAMEL_IS_VEE_FOLDER (folder)
&& folder != local_drafts
&& folder != local_outbox
&& folder != local_sent
@@ -384,8 +384,8 @@ folder_changed_cb (CamelFolder *folder,
g_mutex_lock (self->priv->stores_mutex);
if (self->priv->stores != NULL
- && (si = g_hash_table_lookup(self->priv->stores, parent_store)) != NULL
- && (mfi = g_hash_table_lookup(si->folders, full_name)) != NULL
+ && (si = g_hash_table_lookup (self->priv->stores, parent_store)) != NULL
+ && (mfi = g_hash_table_lookup (si->folders, full_name)) != NULL
&& mfi->folder == folder) {
update_1folder (self, mfi, new, uid, sender, subject, NULL);
}
@@ -417,52 +417,52 @@ unset_folder_info (MailFolderCache *self,
}
if ((mfi->flags & CAMEL_FOLDER_NOSELECT) == 0) {
- up = g_malloc0(sizeof(*up));
+ up = g_malloc0 (sizeof (*up));
up->remove = TRUE;
up->delete = delete;
up->unsub = unsub;
up->store = g_object_ref (mfi->store_info->store);
up->full_name = g_strdup (mfi->full_name);
- up->uri = g_strdup(mfi->uri);
+ up->uri = g_strdup (mfi->uri);
g_queue_push_head (&self->priv->updates, up);
- flush_updates(self);
+ flush_updates (self);
}
}
static void
-free_folder_info(struct _folder_info *mfi)
+free_folder_info (struct _folder_info *mfi)
{
- g_free(mfi->full_name);
- g_free(mfi->uri);
- g_free(mfi);
+ g_free (mfi->full_name);
+ g_free (mfi->uri);
+ g_free (mfi);
}
static void
-setup_folder(MailFolderCache *self, CamelFolderInfo *fi, struct _store_info *si)
+setup_folder (MailFolderCache *self, CamelFolderInfo *fi, struct _store_info *si)
{
struct _folder_info *mfi;
struct _folder_update *up;
- mfi = g_hash_table_lookup(si->folders, fi->full_name);
+ mfi = g_hash_table_lookup (si->folders, fi->full_name);
if (mfi) {
update_1folder (self, mfi, 0, NULL, NULL, NULL, fi);
} else {
d(printf("Adding new folder: %s (%s)\n", fi->full_name, fi->uri));
- mfi = g_malloc0(sizeof(*mfi));
- mfi->full_name = g_strdup(fi->full_name);
- mfi->uri = g_strdup(fi->uri);
+ mfi = g_malloc0 (sizeof (*mfi));
+ mfi->full_name = g_strdup (fi->full_name);
+ mfi->uri = g_strdup (fi->uri);
mfi->store_info = si;
mfi->flags = fi->flags;
mfi->has_children = fi->child != NULL;
- g_hash_table_insert(si->folders, mfi->full_name, mfi);
- g_hash_table_insert(si->folders_uri, mfi->uri, mfi);
+ g_hash_table_insert (si->folders, mfi->full_name, mfi);
+ g_hash_table_insert (si->folders_uri, mfi->uri, mfi);
- up = g_malloc0(sizeof(*up));
- up->full_name = g_strdup(mfi->full_name);
- up->uri = g_strdup(fi->uri);
+ up = g_malloc0 (sizeof (*up));
+ up->full_name = g_strdup (mfi->full_name);
+ up->uri = g_strdup (fi->uri);
up->unread = fi->unread;
up->store = g_object_ref (si->store);
@@ -470,20 +470,20 @@ setup_folder(MailFolderCache *self, CamelFolderInfo *fi, struct _store_info *si)
up->add = TRUE;
g_queue_push_head (&self->priv->updates, up);
- flush_updates(self);
+ flush_updates (self);
}
}
static void
-create_folders(MailFolderCache *self, CamelFolderInfo *fi, struct _store_info *si)
+create_folders (MailFolderCache *self, CamelFolderInfo *fi, struct _store_info *si)
{
d(printf("Setup new folder: %s\n %s\n", fi->uri, fi->full_name));
while (fi) {
- setup_folder(self, fi, si);
+ setup_folder (self, fi, si);
if (fi->child)
- create_folders(self, fi->child, si);
+ create_folders (self, fi->child, si);
fi = fi->next;
}
@@ -533,7 +533,7 @@ store_folder_unsubscribed_cb (CamelStore *store,
g_mutex_lock (self->priv->stores_mutex);
si = g_hash_table_lookup (self->priv->stores, store);
if (si) {
- mfi = g_hash_table_lookup(si->folders, info->full_name);
+ mfi = g_hash_table_lookup (si->folders, info->full_name);
if (mfi) {
g_hash_table_remove (si->folders, mfi->full_name);
g_hash_table_remove (si->folders_uri, mfi->uri);
@@ -556,23 +556,23 @@ store_folder_deleted_cb (CamelStore *store,
}
static gchar *
-folder_to_url(CamelStore *store, const gchar *full_name)
+folder_to_url (CamelStore *store, const gchar *full_name)
{
CamelURL *url;
gchar *out;
- url = camel_url_copy(((CamelService *)store)->url);
+ url = camel_url_copy (((CamelService *)store)->url);
if (((CamelService *)store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
- camel_url_set_fragment(url, full_name);
+ camel_url_set_fragment (url, full_name);
} else {
- gchar *name = g_alloca(strlen(full_name)+2);
+ gchar *name = g_alloca (strlen (full_name)+2);
sprintf(name, "/%s", full_name);
- camel_url_set_path(url, name);
+ camel_url_set_path (url, name);
}
- out = camel_url_to_string(url, CAMEL_URL_HIDE_ALL);
- camel_url_free(url);
+ out = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
+ camel_url_free (url);
return out;
}
@@ -589,13 +589,13 @@ rename_folders (MailFolderCache *self,
struct _folder_update *up;
const gchar *config_dir;
- up = g_malloc0(sizeof(*up));
+ up = g_malloc0 (sizeof (*up));
d(printf("oldbase '%s' newbase '%s' new '%s'\n", oldbase, newbase, fi->full_name));
/* Form what was the old name, and try and look it up */
old = g_strdup_printf("%s%s", oldbase, fi->full_name + strlen(newbase));
- mfi = g_hash_table_lookup(si->folders, old);
+ mfi = g_hash_table_lookup (si->folders, old);
if (mfi) {
d(printf("Found old folder '%s' renaming to '%s'\n", mfi->full_name, fi->full_name));
@@ -603,31 +603,31 @@ rename_folders (MailFolderCache *self,
up->olduri = mfi->uri;
/* Its a rename op */
- g_hash_table_remove(si->folders, mfi->full_name);
- g_hash_table_remove(si->folders_uri, mfi->uri);
- mfi->full_name = g_strdup(fi->full_name);
- mfi->uri = g_strdup(fi->uri);
+ g_hash_table_remove (si->folders, mfi->full_name);
+ g_hash_table_remove (si->folders_uri, mfi->uri);
+ mfi->full_name = g_strdup (fi->full_name);
+ mfi->uri = g_strdup (fi->uri);
mfi->flags = fi->flags;
mfi->has_children = fi->child != NULL;
- g_hash_table_insert(si->folders, mfi->full_name, mfi);
- g_hash_table_insert(si->folders_uri, mfi->uri, mfi);
+ g_hash_table_insert (si->folders, mfi->full_name, mfi);
+ g_hash_table_insert (si->folders_uri, mfi->uri, mfi);
} else {
d(printf("Rename found a new folder? old '%s' new '%s'\n", old, fi->full_name));
/* Its a new op */
- mfi = g_malloc0(sizeof(*mfi));
- mfi->full_name = g_strdup(fi->full_name);
- mfi->uri = g_strdup(fi->uri);
+ mfi = g_malloc0 (sizeof (*mfi));
+ mfi->full_name = g_strdup (fi->full_name);
+ mfi->uri = g_strdup (fi->uri);
mfi->store_info = si;
mfi->flags = fi->flags;
mfi->has_children = fi->child != NULL;
- g_hash_table_insert(si->folders, mfi->full_name, mfi);
- g_hash_table_insert(si->folders_uri, mfi->uri, mfi);
+ g_hash_table_insert (si->folders, mfi->full_name, mfi);
+ g_hash_table_insert (si->folders_uri, mfi->uri, mfi);
}
- up->full_name = g_strdup(mfi->full_name);
- up->uri = g_strdup(mfi->uri);
+ up->full_name = g_strdup (mfi->full_name);
+ up->uri = g_strdup (mfi->uri);
up->unread = fi->unread==-1?0:fi->unread;
up->store = g_object_ref (si->store);
@@ -635,56 +635,56 @@ rename_folders (MailFolderCache *self,
up->add = TRUE;
g_queue_push_tail (&self->priv->updates, up);
- flush_updates(self);
+ flush_updates (self);
#if 0
if (fi->sibling)
- rename_folders(self, si, oldbase, newbase, fi->sibling, folders);
+ rename_folders (self, si, oldbase, newbase, fi->sibling, folders);
if (fi->child)
- rename_folders(self, si, oldbase, newbase, fi->child, folders);
+ rename_folders (self, si, oldbase, newbase, fi->child, folders);
#endif
/* rename the meta-data we maintain ourselves */
config_dir = mail_session_get_config_dir ();
- olduri = folder_to_url(si->store, old);
- e_filename_make_safe(olduri);
- newuri = folder_to_url(si->store, fi->full_name);
- e_filename_make_safe(newuri);
+ olduri = folder_to_url (si->store, old);
+ e_filename_make_safe (olduri);
+ newuri = folder_to_url (si->store, fi->full_name);
+ e_filename_make_safe (newuri);
oldfile = g_strdup_printf("%s/custom_view-%s.xml", config_dir, olduri);
newfile = g_strdup_printf("%s/custom_view-%s.xml", config_dir, newuri);
- g_rename(oldfile, newfile);
- g_free(oldfile);
- g_free(newfile);
+ g_rename (oldfile, newfile);
+ g_free (oldfile);
+ g_free (newfile);
oldfile = g_strdup_printf("%s/current_view-%s.xml", config_dir, olduri);
newfile = g_strdup_printf("%s/current_view-%s.xml", config_dir, newuri);
- g_rename(oldfile, newfile);
- g_free(oldfile);
- g_free(newfile);
- g_free(olduri);
- g_free(newuri);
+ g_rename (oldfile, newfile);
+ g_free (oldfile);
+ g_free (newfile);
+ g_free (olduri);
+ g_free (newuri);
- g_free(old);
+ g_free (old);
}
static void
-get_folders(CamelFolderInfo *fi, GPtrArray *folders)
+get_folders (CamelFolderInfo *fi, GPtrArray *folders)
{
while (fi) {
- g_ptr_array_add(folders, fi);
+ g_ptr_array_add (folders, fi);
if (fi->child)
- get_folders(fi->child, folders);
+ get_folders (fi->child, folders);
fi = fi->next;
}
}
static gint
-folder_cmp(gconstpointer ap, gconstpointer bp)
+folder_cmp (gconstpointer ap, gconstpointer bp)
{
const CamelFolderInfo *a = ((CamelFolderInfo **)ap)[0];
const CamelFolderInfo *b = ((CamelFolderInfo **)bp)[0];
- return strcmp(a->full_name, b->full_name);
+ return strcmp (a->full_name, b->full_name);
}
static void
@@ -696,23 +696,23 @@ store_folder_renamed_cb (CamelStore *store,
struct _store_info *si;
g_mutex_lock (self->priv->stores_mutex);
- si = g_hash_table_lookup(self->priv->stores, store);
+ si = g_hash_table_lookup (self->priv->stores, store);
if (si) {
- GPtrArray *folders = g_ptr_array_new();
+ GPtrArray *folders = g_ptr_array_new ();
CamelFolderInfo *top;
gint i;
/* Ok, so for some reason the folderinfo we have comes in all messed up from
imap, should find out why ... this makes it workable */
- get_folders(info, folders);
- qsort(folders->pdata, folders->len, sizeof(folders->pdata[0]), folder_cmp);
+ get_folders (info, folders);
+ qsort (folders->pdata, folders->len, sizeof (folders->pdata[0]), folder_cmp);
top = folders->pdata[0];
for (i=0;i<folders->len;i++) {
- rename_folders(self, si, old_name, top->full_name, folders->pdata[i]);
+ rename_folders (self, si, old_name, top->full_name, folders->pdata[i]);
}
- g_ptr_array_free(folders, TRUE);
+ g_ptr_array_free (folders, TRUE);
}
g_mutex_unlock (self->priv->stores_mutex);
@@ -728,20 +728,20 @@ struct _update_data {
};
static void
-unset_folder_info_hash(gchar *path, struct _folder_info *mfi, gpointer data)
+unset_folder_info_hash (gchar *path, struct _folder_info *mfi, gpointer data)
{
MailFolderCache *self = (MailFolderCache*) data;
- unset_folder_info(self, mfi, FALSE, FALSE);
+ unset_folder_info (self, mfi, FALSE, FALSE);
}
static void
-free_folder_info_hash(gchar *path, struct _folder_info *mfi, gpointer data)
+free_folder_info_hash (gchar *path, struct _folder_info *mfi, gpointer data)
{
- free_folder_info(mfi);
+ free_folder_info (mfi);
}
static gboolean
-update_folders(CamelStore *store, CamelFolderInfo *fi, gpointer data)
+update_folders (CamelStore *store, CamelFolderInfo *fi, gpointer data)
{
struct _update_data *ud = data;
struct _store_info *si;
@@ -750,20 +750,20 @@ update_folders(CamelStore *store, CamelFolderInfo *fi, gpointer data)
d(printf("Got folderinfo for store %s\n", store->parent_object.provider->protocol));
g_mutex_lock (ud->cache->priv->stores_mutex);
- si = g_hash_table_lookup(ud->cache->priv->stores, store);
+ si = g_hash_table_lookup (ud->cache->priv->stores, store);
if (si && !ud->cancel) {
/* the 'si' is still there, so we can remove ourselves from its list */
/* otherwise its not, and we're on our own and free anyway */
g_queue_remove (&si->folderinfo_updates, ud);
if (fi)
- create_folders(ud->cache, fi, si);
+ create_folders (ud->cache, fi, si);
}
g_mutex_unlock (ud->cache->priv->stores_mutex);
if (ud->done)
res = ud->done (store, fi, ud->data);
- g_free(ud);
+ g_free (ud);
return res;
}
@@ -852,13 +852,13 @@ store_online_cb (CamelStore *store, gpointer data)
g_mutex_lock (ud->cache->priv->stores_mutex);
- if (g_hash_table_lookup(ud->cache->priv->stores, store) != NULL && !ud->cancel) {
+ if (g_hash_table_lookup (ud->cache->priv->stores, store) != NULL && !ud->cancel) {
/* re-use the cancel id. we're already in the store update list too */
- ud->id = mail_get_folderinfo(store, NULL, update_folders, ud);
+ ud->id = mail_get_folderinfo (store, NULL, update_folders, ud);
} else {
/* the store vanished, that means we were probably cancelled, or at any rate,
need to clean ourselves up */
- g_free(ud);
+ g_free (ud);
}
g_mutex_unlock (ud->cache->priv->stores_mutex);
@@ -883,7 +883,7 @@ storeinfo_find_folder_info (CamelStore *store,
if (path[0] == '/')
path++;
- fi->fi = g_hash_table_lookup(si->folders, path);
+ fi->fi = g_hash_table_lookup (si->folders, path);
}
}
}
@@ -1043,7 +1043,7 @@ mail_folder_cache_init (MailFolderCache *self)
self->priv = MAIL_FOLDER_CACHE_GET_PRIVATE (self);
/* initialize values */
- self->priv->stores = g_hash_table_new(NULL, NULL);
+ self->priv->stores = g_hash_table_new (NULL, NULL);
self->priv->stores_mutex = g_mutex_new ();
g_queue_init (&self->priv->updates);
@@ -1094,27 +1094,27 @@ mail_folder_cache_note_store (MailFolderCache *self,
struct _update_data *ud;
gint hook = 0;
- g_return_if_fail (CAMEL_IS_STORE(store));
- g_return_if_fail (mail_in_main_thread());
+ g_return_if_fail (CAMEL_IS_STORE (store));
+ g_return_if_fail (mail_in_main_thread ());
g_mutex_lock (self->priv->stores_mutex);
si = g_hash_table_lookup (self->priv->stores, store);
if (si == NULL) {
- si = g_malloc0(sizeof(*si));
- si->folders = g_hash_table_new(g_str_hash, g_str_equal);
+ si = g_malloc0 (sizeof (*si));
+ si->folders = g_hash_table_new (g_str_hash, g_str_equal);
si->folders_uri = g_hash_table_new (
CAMEL_STORE_CLASS (
- CAMEL_OBJECT_GET_CLASS(store))->hash_folder_name,
+ CAMEL_OBJECT_GET_CLASS (store))->hash_folder_name,
CAMEL_STORE_CLASS (
- CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name);
+ CAMEL_OBJECT_GET_CLASS (store))->compare_folder_name);
si->store = g_object_ref (store);
- g_hash_table_insert(self->priv->stores, store, si);
+ g_hash_table_insert (self->priv->stores, store, si);
g_queue_init (&si->folderinfo_updates);
hook = TRUE;
}
- ud = g_malloc(sizeof(*ud));
+ ud = g_malloc (sizeof (*ud));
ud->done = done;
ud->data = data;
ud->cancel = 0;
@@ -1185,7 +1185,7 @@ mail_folder_cache_note_store_remove (MailFolderCache *self,
{
struct _store_info *si;
- g_return_if_fail (CAMEL_IS_STORE(store));
+ g_return_if_fail (CAMEL_IS_STORE (store));
if (self->priv->stores == NULL)
return;
@@ -1196,7 +1196,7 @@ mail_folder_cache_note_store_remove (MailFolderCache *self,
if (si) {
GList *link;
- g_hash_table_remove(self->priv->stores, store);
+ g_hash_table_remove (self->priv->stores, store);
g_signal_handlers_disconnect_matched (
store, G_SIGNAL_MATCH_DATA,
@@ -1212,17 +1212,17 @@ mail_folder_cache_note_store_remove (MailFolderCache *self,
struct _update_data *ud = link->data;
d(printf("Cancelling outstanding folderinfo update %d\n", ud->id));
- mail_msg_cancel(ud->id);
+ mail_msg_cancel (ud->id);
ud->cancel = 1;
link = g_list_next (link);
}
g_object_unref (si->store);
- g_hash_table_foreach(si->folders, (GHFunc)free_folder_info_hash, NULL);
- g_hash_table_destroy(si->folders);
- g_hash_table_destroy(si->folders_uri);
- g_free(si);
+ g_hash_table_foreach (si->folders, (GHFunc)free_folder_info_hash, NULL);
+ g_hash_table_destroy (si->folders);
+ g_hash_table_destroy (si->folders_uri);
+ g_free (si);
}
g_mutex_unlock (self->priv->stores_mutex);
@@ -1249,8 +1249,8 @@ mail_folder_cache_note_folder (MailFolderCache *self,
g_mutex_lock (self->priv->stores_mutex);
if (self->priv->stores == NULL
- || (si = g_hash_table_lookup(self->priv->stores, parent_store)) == NULL
- || (mfi = g_hash_table_lookup(si->folders, full_name)) == NULL) {
+ || (si = g_hash_table_lookup (self->priv->stores, parent_store)) == NULL
+ || (mfi = g_hash_table_lookup (si->folders, full_name)) == NULL) {
w(g_warning("Noting folder before store initialised"));
g_mutex_unlock (self->priv->stores_mutex);
return;
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 97144818d3..b8bfba3d29 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -75,11 +75,11 @@ mail_msg_new (MailMsgInfo *info)
msg->info = info;
msg->ref_count = 1;
msg->seq = mail_msg_seq++;
- msg->cancel = camel_operation_new(mail_operation_status, GINT_TO_POINTER(msg->seq));
+ msg->cancel = camel_operation_new (mail_operation_status, GINT_TO_POINTER (msg->seq));
msg->priv = g_slice_new0 (MailMsgPrivate);
msg->priv->cancelable = TRUE;
- g_hash_table_insert(mail_msg_active_table, GINT_TO_POINTER(msg->seq), msg);
+ g_hash_table_insert (mail_msg_active_table, GINT_TO_POINTER (msg->seq), msg);
d(printf("New message %p\n", msg));
@@ -114,21 +114,21 @@ end_event_callback (CamelObject *o, EActivity *activity, gpointer error)
#include <mcheck.h>
static void
-checkmem(gpointer p)
+checkmem (gpointer p)
{
if (p) {
- gint status = mprobe(p);
+ gint status = mprobe (p);
switch (status) {
case MCHECK_HEAD:
printf("Memory underrun at %p\n", p);
- abort();
+ abort ();
case MCHECK_TAIL:
printf("Memory overrun at %p\n", p);
- abort();
+ abort ();
case MCHECK_FREE:
printf("Double free %p\n", p);
- abort();
+ abort ();
}
}
}
@@ -178,14 +178,14 @@ mail_msg_unref (gpointer msg)
return;
#ifdef MALLOC_CHECK
- checkmem(mail_msg);
- checkmem(mail_msg->cancel);
- checkmem(mail_msg->priv);
+ checkmem (mail_msg);
+ checkmem (mail_msg->cancel);
+ checkmem (mail_msg->priv);
#endif
d(printf("Free message %p\n", msg));
if (mail_msg->info->free)
- mail_msg->info->free(mail_msg);
+ mail_msg->info->free (mail_msg);
g_mutex_lock (mail_msg_lock);
@@ -195,7 +195,7 @@ mail_msg_unref (gpointer msg)
/* We need to make sure we dont lose a reference here YUCK YUCK */
/* This is tightly integrated with the code in do_op_status,
- as it closely relates to the CamelOperation setup in msg_new() above */
+ as it closely relates to the CamelOperation setup in msg_new () above */
if (mail_msg->priv->activity_state == 1) {
/* tell the other to free it itself */
mail_msg->priv->activity_state = 3;
@@ -222,14 +222,14 @@ mail_msg_unref (gpointer msg)
/* hash table of ops->dialogue of active errors */
static GHashTable *active_errors = NULL;
-static void error_destroy(GtkObject *o, gpointer data)
+static void error_destroy (GtkObject *o, gpointer data)
{
- g_hash_table_remove(active_errors, data);
+ g_hash_table_remove (active_errors, data);
}
-static void error_response(GtkObject *o, gint button, gpointer data)
+static void error_response (GtkObject *o, gint button, gpointer data)
{
- gtk_widget_destroy((GtkWidget *)o);
+ gtk_widget_destroy ((GtkWidget *)o);
}
void
@@ -241,9 +241,9 @@ mail_msg_check_error (gpointer msg)
GtkDialog *gd;
#ifdef MALLOC_CHECK
- checkmem(m);
- checkmem(m->cancel);
- checkmem(m->priv);
+ checkmem (m);
+ checkmem (m->cancel);
+ checkmem (m->priv);
#endif
if (m->error == NULL
@@ -253,12 +253,12 @@ mail_msg_check_error (gpointer msg)
return;
if (active_errors == NULL)
- active_errors = g_hash_table_new(NULL, NULL);
+ active_errors = g_hash_table_new (NULL, NULL);
/* check to see if we have dialogue already running for this operation */
/* we key on the operation pointer, which is at least accurate enough
for the operation type, although it could be on a different object. */
- if (g_hash_table_lookup(active_errors, m->info)) {
+ if (g_hash_table_lookup (active_errors, m->info)) {
g_message (
"Error occurred while existing dialogue active:\n%s",
m->error->message);
@@ -272,90 +272,90 @@ mail_msg_check_error (gpointer msg)
gd = (GtkDialog *) e_alert_dialog_new_for_args (
parent, "mail:async-error", what,
m->error->message, NULL);
- g_free(what);
+ g_free (what);
} else
gd = (GtkDialog *) e_alert_dialog_new_for_args (
parent, "mail:async-error-nodescribe",
m->error->message, NULL);
- g_hash_table_insert(active_errors, m->info, gd);
+ g_hash_table_insert (active_errors, m->info, gd);
g_signal_connect(gd, "response", G_CALLBACK(error_response), m->info);
g_signal_connect(gd, "destroy", G_CALLBACK(error_destroy), m->info);
if (m->priv->cancelable)
m->priv->error = (GtkWidget *) gd;
else
- gtk_widget_show((GtkWidget *)gd);
+ gtk_widget_show ((GtkWidget *)gd);
}
-void mail_msg_cancel(guint msgid)
+void mail_msg_cancel (guint msgid)
{
MailMsg *m;
g_mutex_lock (mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
+ m = g_hash_table_lookup (mail_msg_active_table, GINT_TO_POINTER (msgid));
if (m && m->cancel)
- camel_operation_cancel(m->cancel);
+ camel_operation_cancel (m->cancel);
g_mutex_unlock (mail_msg_lock);
}
/* waits for a message to be finished processing (freed)
the messageid is from MailMsg->seq */
-void mail_msg_wait(guint msgid)
+void mail_msg_wait (guint msgid)
{
MailMsg *m;
if (mail_in_main_thread ()) {
g_mutex_lock (mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
+ m = g_hash_table_lookup (mail_msg_active_table, GINT_TO_POINTER (msgid));
while (m) {
g_mutex_unlock (mail_msg_lock);
- gtk_main_iteration();
+ gtk_main_iteration ();
g_mutex_lock (mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
+ m = g_hash_table_lookup (mail_msg_active_table, GINT_TO_POINTER (msgid));
}
g_mutex_unlock (mail_msg_lock);
} else {
g_mutex_lock (mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
+ m = g_hash_table_lookup (mail_msg_active_table, GINT_TO_POINTER (msgid));
while (m) {
g_cond_wait (mail_msg_cond, mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
+ m = g_hash_table_lookup (mail_msg_active_table, GINT_TO_POINTER (msgid));
}
g_mutex_unlock (mail_msg_lock);
}
}
-gint mail_msg_active(guint msgid)
+gint mail_msg_active (guint msgid)
{
gint active;
g_mutex_lock (mail_msg_lock);
if (msgid == (guint)-1)
- active = g_hash_table_size(mail_msg_active_table) > 0;
+ active = g_hash_table_size (mail_msg_active_table) > 0;
else
- active = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)) != NULL;
+ active = g_hash_table_lookup (mail_msg_active_table, GINT_TO_POINTER (msgid)) != NULL;
g_mutex_unlock (mail_msg_lock);
return active;
}
-void mail_msg_wait_all(void)
+void mail_msg_wait_all (void)
{
if (mail_in_main_thread ()) {
g_mutex_lock (mail_msg_lock);
- while (g_hash_table_size(mail_msg_active_table) > 0) {
+ while (g_hash_table_size (mail_msg_active_table) > 0) {
g_mutex_unlock (mail_msg_lock);
- gtk_main_iteration();
+ gtk_main_iteration ();
g_mutex_lock (mail_msg_lock);
}
g_mutex_unlock (mail_msg_lock);
} else {
g_mutex_lock (mail_msg_lock);
- while (g_hash_table_size(mail_msg_active_table) > 0) {
+ while (g_hash_table_size (mail_msg_active_table) > 0) {
g_cond_wait (mail_msg_cond, mail_msg_lock);
}
g_mutex_unlock (mail_msg_lock);
@@ -485,7 +485,7 @@ mail_msg_proxy (MailMsg *msg)
void
mail_msg_cleanup (void)
{
- mail_msg_wait_all();
+ mail_msg_wait_all ();
G_LOCK (idle_source_id);
if (idle_source_id != 0) {
@@ -615,15 +615,15 @@ struct _proxy_msg {
};
static void
-do_async_event(struct _proxy_msg *m)
+do_async_event (struct _proxy_msg *m)
{
m->thread = g_thread_self ();
- m->func(m->o, m->event_data, m->data);
+ m->func (m->o, m->event_data, m->data);
m->thread = NULL;
- g_mutex_lock(m->ea->lock);
- m->ea->tasks = g_slist_remove(m->ea->tasks, m);
- g_mutex_unlock(m->ea->lock);
+ g_mutex_lock (m->ea->lock);
+ m->ea->tasks = g_slist_remove (m->ea->tasks, m);
+ g_mutex_unlock (m->ea->lock);
}
static gint
@@ -649,8 +649,8 @@ mail_async_event_new (void)
{
MailAsyncEvent *ea;
- ea = g_malloc0(sizeof(*ea));
- ea->lock = g_mutex_new();
+ ea = g_malloc0 (sizeof (*ea));
+ ea->lock = g_mutex_new ();
return ea;
}
@@ -668,7 +668,7 @@ mail_async_event_emit (MailAsyncEvent *ea,
/* We dont have a reply port for this, we dont
* care when/if it gets executed, just queue it. */
- m = mail_msg_new(&async_event_info);
+ m = mail_msg_new (&async_event_info);
m->func = func;
m->o = o;
m->event_data = event_data;
@@ -678,9 +678,9 @@ mail_async_event_emit (MailAsyncEvent *ea,
m->thread = NULL;
id = m->base.seq;
- g_mutex_lock(ea->lock);
- ea->tasks = g_slist_prepend(ea->tasks, m);
- g_mutex_unlock(ea->lock);
+ g_mutex_lock (ea->lock);
+ ea->tasks = g_slist_prepend (ea->tasks, m);
+ g_mutex_unlock (ea->lock);
/* We use an idle function instead of our own message port only
* because the gui message ports's notification buffer might
@@ -690,7 +690,7 @@ mail_async_event_emit (MailAsyncEvent *ea,
m->idle_id = g_idle_add (
(GSourceFunc) idle_async_event, m);
else
- mail_msg_main_loop_push(m);
+ mail_msg_main_loop_push (m);
} else
mail_msg_fast_ordered_push (m);
@@ -703,13 +703,13 @@ mail_async_event_destroy (MailAsyncEvent *ea)
gint id;
struct _proxy_msg *m;
- g_mutex_lock(ea->lock);
+ g_mutex_lock (ea->lock);
while (ea->tasks) {
m = ea->tasks->data;
id = m->base.seq;
if (m->thread == g_thread_self ()) {
g_warning("Destroying async event from inside an event, returning EDEADLK");
- g_mutex_unlock(ea->lock);
+ g_mutex_unlock (ea->lock);
errno = EDEADLK;
return -1;
}
@@ -717,14 +717,14 @@ mail_async_event_destroy (MailAsyncEvent *ea)
g_source_remove (m->idle_id);
m->idle_id = 0;
}
- g_mutex_unlock(ea->lock);
- mail_msg_wait(id);
- g_mutex_lock(ea->lock);
+ g_mutex_unlock (ea->lock);
+ mail_msg_wait (id);
+ g_mutex_lock (ea->lock);
}
- g_mutex_unlock(ea->lock);
+ g_mutex_unlock (ea->lock);
- g_mutex_free(ea->lock);
- g_free(ea);
+ g_mutex_free (ea->lock);
+ g_free (ea);
return 0;
}
@@ -742,53 +742,53 @@ struct _call_msg {
};
static void
-do_call(struct _call_msg *m)
+do_call (struct _call_msg *m)
{
gpointer p1, *p2, *p3, *p4, *p5;
gint i1;
va_list ap;
- G_VA_COPY(ap, m->ap);
+ G_VA_COPY (ap, m->ap);
switch (m->type) {
case MAIL_CALL_p_p:
- p1 = va_arg(ap, gpointer );
- m->ret = m->func(p1);
+ p1 = va_arg (ap, gpointer );
+ m->ret = m->func (p1);
break;
case MAIL_CALL_p_pp:
- p1 = va_arg(ap, gpointer );
- p2 = va_arg(ap, gpointer );
- m->ret = m->func(p1, p2);
+ p1 = va_arg (ap, gpointer );
+ p2 = va_arg (ap, gpointer );
+ m->ret = m->func (p1, p2);
break;
case MAIL_CALL_p_ppp:
- p1 = va_arg(ap, gpointer );
- p2 = va_arg(ap, gpointer );
- p3 = va_arg(ap, gpointer );
- m->ret = m->func(p1, p2, p3);
+ p1 = va_arg (ap, gpointer );
+ p2 = va_arg (ap, gpointer );
+ p3 = va_arg (ap, gpointer );
+ m->ret = m->func (p1, p2, p3);
break;
case MAIL_CALL_p_pppp:
- p1 = va_arg(ap, gpointer );
- p2 = va_arg(ap, gpointer );
- p3 = va_arg(ap, gpointer );
- p4 = va_arg(ap, gpointer );
- m->ret = m->func(p1, p2, p3, p4);
+ p1 = va_arg (ap, gpointer );
+ p2 = va_arg (ap, gpointer );
+ p3 = va_arg (ap, gpointer );
+ p4 = va_arg (ap, gpointer );
+ m->ret = m->func (p1, p2, p3, p4);
break;
case MAIL_CALL_p_ppppp:
- p1 = va_arg(ap, gpointer );
- p2 = va_arg(ap, gpointer );
- p3 = va_arg(ap, gpointer );
- p4 = va_arg(ap, gpointer );
- p5 = va_arg(ap, gpointer );
- m->ret = m->func(p1, p2, p3, p4, p5);
+ p1 = va_arg (ap, gpointer );
+ p2 = va_arg (ap, gpointer );
+ p3 = va_arg (ap, gpointer );
+ p4 = va_arg (ap, gpointer );
+ p5 = va_arg (ap, gpointer );
+ m->ret = m->func (p1, p2, p3, p4, p5);
break;
case MAIL_CALL_p_ppippp:
- p1 = va_arg(ap, gpointer );
- p2 = va_arg(ap, gpointer );
- i1 = va_arg(ap, gint);
- p3 = va_arg(ap, gpointer );
- p4 = va_arg(ap, gpointer );
- p5 = va_arg(ap, gpointer );
- m->ret = m->func(p1, p2, i1, p3, p4, p5);
+ p1 = va_arg (ap, gpointer );
+ p2 = va_arg (ap, gpointer );
+ i1 = va_arg (ap, gint);
+ p3 = va_arg (ap, gpointer );
+ p4 = va_arg (ap, gpointer );
+ p5 = va_arg (ap, gpointer );
+ m->ret = m->func (p1, p2, i1, p3, p4, p5);
break;
}
@@ -811,12 +811,12 @@ mail_call_main (mail_call_t type, MailMainFunc func, ...)
gpointer ret;
va_list ap;
- va_start(ap, func);
+ va_start (ap, func);
m = mail_msg_new (&mail_call_info);
m->type = type;
m->func = func;
- G_VA_COPY(m->ap, ap);
+ G_VA_COPY (m->ap, ap);
if (mail_in_main_thread ())
do_call (m);
@@ -828,7 +828,7 @@ mail_call_main (mail_call_t type, MailMainFunc func, ...)
e_flag_free (m->done);
}
- va_end(ap);
+ va_end (ap);
ret = m->ret;
mail_msg_unref (m);
@@ -976,9 +976,9 @@ mail_operation_status (CamelOperation *op,
d(printf("got operation statys: %s %d%%\n", what, pc));
- m = mail_msg_new(&op_status_info);
+ m = mail_msg_new (&op_status_info);
m->op = op;
- m->what = g_strdup(what);
+ m->what = g_strdup (what);
switch (pc) {
case CAMEL_OPERATION_START:
pc = 0;
@@ -989,7 +989,7 @@ mail_operation_status (CamelOperation *op,
}
m->pc = pc;
m->data = data;
- mail_msg_main_loop_push(m);
+ mail_msg_main_loop_push (m);
}
void
diff --git a/mail/mail-mt.h b/mail/mail-mt.h
index d8b4fc70d2..c27f61ce6c 100644
--- a/mail/mail-mt.h
+++ b/mail/mail-mt.h
@@ -54,7 +54,7 @@ struct _MailMsgInfo {
};
/* setup ports */
-void mail_msg_init(void);
+void mail_msg_init (void);
void mail_msg_cleanup (void);
gboolean mail_in_main_thread (void);
@@ -64,10 +64,10 @@ gpointer mail_msg_new (MailMsgInfo *info);
gpointer mail_msg_ref (gpointer msg);
void mail_msg_unref (gpointer msg);
void mail_msg_check_error (gpointer msg);
-void mail_msg_cancel(guint msgid);
-void mail_msg_wait(guint msgid);
-void mail_msg_wait_all(void);
-gint mail_msg_active(guint msgid);
+void mail_msg_cancel (guint msgid);
+void mail_msg_wait (guint msgid);
+void mail_msg_wait_all (void);
+gint mail_msg_active (guint msgid);
/* dispatch a message */
void mail_msg_main_loop_push (gpointer msg);
@@ -99,11 +99,11 @@ typedef enum _mail_async_event_t {
typedef void (*MailAsyncFunc)(gpointer , gpointer , gpointer );
/* create a new async event handler */
-MailAsyncEvent *mail_async_event_new(void);
+MailAsyncEvent *mail_async_event_new (void);
/* forward a camel event (or other call) to the gui thread */
-guint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer , gpointer , gpointer );
+guint mail_async_event_emit (MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer , gpointer , gpointer );
/* wait for all outstanding async events to complete */
-gint mail_async_event_destroy(MailAsyncEvent *ea);
+gint mail_async_event_destroy (MailAsyncEvent *ea);
void mail_mt_set_backend (gchar *backend);
@@ -119,7 +119,7 @@ typedef enum {
typedef gpointer (*MailMainFunc)();
-gpointer mail_call_main(mail_call_t type, MailMainFunc func, ...);
+gpointer mail_call_main (mail_call_t type, MailMainFunc func, ...);
/* A generic proxy event for anything that can be proxied during the life of the mailer (almost nothing) */
/* Note that almost all objects care about the lifecycle of their events, so this cannot be used */
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index ae2d12dfda..defa166a42 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -132,7 +132,7 @@ em_filter_folder_element_exec (struct _filter_mail_msg *m)
camel_folder_thaw (m->destination);
/* this may thaw/unref source folders, do it here so we dont do it in the main thread
- see also fetch_mail_fetch() below */
+ see also fetch_mail_fetch () below */
g_object_unref (m->driver);
m->driver = NULL;
@@ -313,7 +313,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m)
/* need to uncancel so writes/etc. don't fail */
if (g_error_matches (fm->base.error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
- camel_operation_uncancel(NULL);
+ camel_operation_uncancel (NULL);
/* save the cache of uids that we've just downloaded */
camel_uid_cache_save (cache);
@@ -323,13 +323,13 @@ fetch_mail_exec (struct _fetch_mail_msg *m)
/* not keep on server - just delete all the actual messages on the server */
for (i=0;i<folder_uids->len;i++) {
d(printf("force delete uid '%s'\n", (gchar *)folder_uids->pdata[i]));
- camel_folder_delete_message(folder, folder_uids->pdata[i]);
+ camel_folder_delete_message (folder, folder_uids->pdata[i]);
}
}
if ((fm->delete || cache_uids) && fm->base.error == NULL) {
/* expunge messages (downloaded so far) */
- camel_folder_sync(folder, fm->delete, NULL);
+ camel_folder_sync (folder, fm->delete, NULL);
}
camel_uid_cache_destroy (cache);
@@ -478,7 +478,7 @@ mail_send_message (struct _send_queue_msg *m,
gint i;
GError *local_error = NULL;
- message = camel_folder_get_message(queue, uid, error);
+ message = camel_folder_get_message (queue, uid, error);
if (!message)
return;
@@ -491,7 +491,7 @@ mail_send_message (struct _send_queue_msg *m,
if (tmp) {
gchar *name;
- name = g_strstrip(g_strdup(tmp));
+ name = g_strstrip (g_strdup (tmp));
if ((account = e_get_account_by_uid (name))
/* 'old' x-evolution-account stored the name, how silly */
|| (account = e_get_account_by_name (name))) {
@@ -500,18 +500,18 @@ mail_send_message (struct _send_queue_msg *m,
sent_folder_uri = g_strdup (account->sent_folder_uri);
}
- g_free(name);
+ g_free (name);
}
if (!account) {
/* default back to these headers */
tmp = camel_header_raw_find(&xev, "X-Evolution-Transport", NULL);
if (tmp)
- transport_url = g_strstrip(g_strdup(tmp));
+ transport_url = g_strstrip (g_strdup (tmp));
tmp = camel_header_raw_find(&xev, "X-Evolution-Fcc", NULL);
if (tmp)
- sent_folder_uri = g_strstrip(g_strdup(tmp));
+ sent_folder_uri = g_strstrip (g_strdup (tmp));
}
if (transport_url || destination) {
@@ -542,7 +542,7 @@ mail_send_message (struct _send_queue_msg *m,
camel_address_cat (recipients, CAMEL_ADDRESS (iaddr));
}
- if (camel_address_length(recipients) > 0) {
+ if (camel_address_length (recipients) > 0) {
xport = camel_session_get_transport (
session, transport_url ? transport_url :
destination, error);
@@ -554,8 +554,8 @@ mail_send_message (struct _send_queue_msg *m,
}
/* Now check for posting, failures are ignored */
- info = camel_message_info_new(NULL);
- camel_message_info_set_flags(info, CAMEL_MESSAGE_SEEN, ~0);
+ info = camel_message_info_new (NULL);
+ camel_message_info_set_flags (info, CAMEL_MESSAGE_SEEN, ~0);
for (header = xev;header;header=header->next) {
gchar *uri;
@@ -565,14 +565,14 @@ mail_send_message (struct _send_queue_msg *m,
/* TODO: don't lose errors */
- uri = g_strstrip(g_strdup(header->value));
- folder = mail_tool_uri_to_folder(uri, 0, NULL);
+ uri = g_strstrip (g_strdup (header->value));
+ folder = mail_tool_uri_to_folder (uri, 0, NULL);
if (folder) {
- camel_folder_append_message(folder, message, info, NULL, NULL);
+ camel_folder_append_message (folder, message, info, NULL, NULL);
g_object_unref (folder);
folder = NULL;
}
- g_free(uri);
+ g_free (uri);
}
/* post process */
@@ -678,19 +678,19 @@ exit:
g_propagate_error (error, local_error);
if (folder) {
- camel_folder_sync(folder, FALSE, NULL);
+ camel_folder_sync (folder, FALSE, NULL);
g_object_unref (folder);
}
if (info)
- camel_message_info_free(info);
+ camel_message_info_free (info);
g_object_unref (recipients);
g_object_unref (from);
if (xport)
g_object_unref (xport);
- g_free(sent_folder_uri);
- g_free(transport_url);
- camel_header_raw_clear(&xev);
- g_string_free(err, TRUE);
+ g_free (sent_folder_uri);
+ g_free (transport_url);
+ camel_header_raw_clear (&xev);
+ g_string_free (err, TRUE);
g_object_unref (message);
return;
@@ -751,9 +751,9 @@ send_queue_exec (struct _send_queue_msg *m)
info = camel_folder_get_message_info (m->queue, uids->pdata[i]);
if (info) {
- if ((camel_message_info_flags(info) & CAMEL_MESSAGE_DELETED) == 0)
+ if ((camel_message_info_flags (info) & CAMEL_MESSAGE_DELETED) == 0)
send_uids->pdata[j++] = uids->pdata[i];
- camel_folder_free_message_info(m->queue, info);
+ camel_folder_free_message_info (m->queue, info);
}
}
@@ -857,7 +857,7 @@ static void
send_queue_done (struct _send_queue_msg *m)
{
if (m->done)
- m->done(m->destination, m->data);
+ m->done (m->destination, m->data);
}
static gchar *
@@ -872,9 +872,9 @@ send_queue_free (struct _send_queue_msg *m)
if (m->driver)
g_object_unref (m->driver);
g_object_unref (m->queue);
- g_free(m->destination);
+ g_free (m->destination);
if (m->cancel)
- camel_operation_unref(m->cancel);
+ camel_operation_unref (m->cancel);
}
static MailMsgInfo send_queue_info = {
@@ -887,7 +887,7 @@ static MailMsgInfo send_queue_info = {
/* same interface as fetch_mail, just 'cause i'm lazy today (and we need to run it from the same spot?) */
void
-mail_send_queue(CamelFolder *queue, const gchar *destination,
+mail_send_queue (CamelFolder *queue, const gchar *destination,
const gchar *type, CamelOperation *cancel,
CamelFilterGetFolderFunc get_folder, gpointer get_data,
CamelFilterStatusFunc *status, gpointer status_data,
@@ -895,13 +895,13 @@ mail_send_queue(CamelFolder *queue, const gchar *destination,
{
struct _send_queue_msg *m;
- m = mail_msg_new(&send_queue_info);
+ m = mail_msg_new (&send_queue_info);
m->queue = queue;
g_object_ref (queue);
- m->destination = g_strdup(destination);
+ m->destination = g_strdup (destination);
if (cancel) {
m->cancel = cancel;
- camel_operation_ref(cancel);
+ camel_operation_ref (cancel);
camel_operation_unref (m->base.cancel);
mail_msg_set_cancelable (m, FALSE);
@@ -941,8 +941,8 @@ append_mail_desc (struct _append_msg *m)
static void
append_mail_exec (struct _append_msg *m)
{
- camel_mime_message_set_date(m->message, CAMEL_MESSAGE_DATE_CURRENT, 0);
- camel_folder_append_message(m->folder, m->message, m->info, &m->appended_uid, &m->base.error);
+ camel_mime_message_set_date (m->message, CAMEL_MESSAGE_DATE_CURRENT, 0);
+ camel_folder_append_message (m->folder, m->message, m->info, &m->appended_uid, &m->base.error);
}
static void
@@ -1093,7 +1093,7 @@ mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
g_return_if_fail (uids != NULL);
g_return_if_fail (dest_uri != NULL);
- m = mail_msg_new(&transfer_messages_info);
+ m = mail_msg_new (&transfer_messages_info);
m->source = source;
g_object_ref (source);
m->uids = uids;
@@ -1123,9 +1123,9 @@ get_folderinfo_desc (struct _get_folderinfo_msg *m)
{
gchar *ret, *name;
- name = camel_service_get_name((CamelService *)m->store, TRUE);
+ name = camel_service_get_name ((CamelService *)m->store, TRUE);
ret = g_strdup_printf (_("Scanning folders in '%s'"), name);
- g_free(name);
+ g_free (name);
return ret;
}
@@ -1159,7 +1159,7 @@ static void
get_folderinfo_free (struct _get_folderinfo_msg *m)
{
if (m->info && m->can_clear)
- camel_store_free_folder_info(m->store, m->info);
+ camel_store_free_folder_info (m->store, m->info);
g_object_unref (m->store);
}
@@ -1177,11 +1177,11 @@ mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(Cam
struct _get_folderinfo_msg *m;
gint id;
- m = mail_msg_new(&get_folderinfo_info);
+ m = mail_msg_new (&get_folderinfo_info);
if (op) {
- camel_operation_unref(m->base.cancel);
+ camel_operation_unref (m->base.cancel);
m->base.cancel = op;
- camel_operation_ref(op);
+ camel_operation_ref (op);
}
m->store = store;
g_object_ref (store);
@@ -1211,48 +1211,48 @@ do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages,
gint i;
if (messages->len == 0) {
- d->done(folder, messages, NULL, NULL, d->data);
- g_free(d);
+ d->done (folder, messages, NULL, NULL, d->data);
+ g_free (d);
return;
}
if (messages->len == 1) {
- part = mail_tool_make_message_attachment(messages->pdata[0]);
+ part = mail_tool_make_message_attachment (messages->pdata[0]);
} else {
- multipart = camel_multipart_new();
+ multipart = camel_multipart_new ();
camel_data_wrapper_set_mime_type(CAMEL_DATA_WRAPPER (multipart), "multipart/digest");
- camel_multipart_set_boundary(multipart, NULL);
+ camel_multipart_set_boundary (multipart, NULL);
for (i=0;i<messages->len;i++) {
- part = mail_tool_make_message_attachment(messages->pdata[i]);
- camel_multipart_add_part(multipart, part);
+ part = mail_tool_make_message_attachment (messages->pdata[i]);
+ camel_multipart_add_part (multipart, part);
g_object_unref (part);
}
- part = camel_mime_part_new();
- camel_medium_set_content (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER(multipart));
+ part = camel_mime_part_new ();
+ camel_medium_set_content (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (multipart));
g_object_unref (multipart);
camel_mime_part_set_description(part, _("Forwarded messages"));
}
- subject = mail_tool_generate_forward_subject(messages->pdata[0]);
- d->done(folder, messages, part, subject, d->data);
- g_free(subject);
+ subject = mail_tool_generate_forward_subject (messages->pdata[0]);
+ d->done (folder, messages, part, subject, d->data);
+ g_free (subject);
g_object_unref (part);
- g_free(d);
+ g_free (d);
}
void
-mail_build_attachment(CamelFolder *folder, GPtrArray *uids,
+mail_build_attachment (CamelFolder *folder, GPtrArray *uids,
void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, gchar *subject, gpointer data), gpointer data)
{
struct _build_data *d;
- d = g_malloc(sizeof(*d));
+ d = g_malloc (sizeof (*d));
d->done = done;
d->data = data;
- mail_get_messages(folder, uids, do_build_attachment, d);
+ mail_get_messages (folder, uids, do_build_attachment, d);
}
/* ** LOAD FOLDER ********************************************************* */
@@ -1313,7 +1313,7 @@ mail_get_folder (const gchar *uri, guint32 flags,
struct _get_folder_msg *m;
gint id;
- m = mail_msg_new(&get_folder_info);
+ m = mail_msg_new (&get_folder_info);
m->uri = g_strdup (uri);
m->flags = flags;
m->data = data;
@@ -1455,9 +1455,9 @@ mail_get_store (const gchar *uri, CamelOperation *op, void (*done) (gchar *uri,
m = mail_msg_new (&get_store_info);
if (op) {
- camel_operation_unref(m->base.cancel);
+ camel_operation_unref (m->base.cancel);
m->base.cancel = op;
- camel_operation_ref(op);
+ camel_operation_ref (op);
}
m->uri = g_strdup (uri);
m->data = data;
@@ -1613,14 +1613,14 @@ sync_folder_desc (struct _sync_folder_msg *m)
static void
sync_folder_exec (struct _sync_folder_msg *m)
{
- camel_folder_sync(m->folder, FALSE, &m->base.error);
+ camel_folder_sync (m->folder, FALSE, &m->base.error);
}
static void
sync_folder_done (struct _sync_folder_msg *m)
{
if (m->done)
- m->done(m->folder, m->data);
+ m->done (m->folder, m->data);
}
static void
@@ -1638,11 +1638,11 @@ static MailMsgInfo sync_folder_info = {
};
void
-mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
+mail_sync_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
{
struct _sync_folder_msg *m;
- m = mail_msg_new(&sync_folder_info);
+ m = mail_msg_new (&sync_folder_info);
m->folder = folder;
g_object_ref (folder);
m->data = data;
@@ -1667,12 +1667,12 @@ sync_store_desc (struct _sync_store_msg *m)
{
gchar *uri, *res;
- uri = camel_url_to_string(((CamelService *)m->store)->url, CAMEL_URL_HIDE_ALL);
- res = g_strdup_printf(m->expunge
+ uri = camel_url_to_string (((CamelService *)m->store)->url, CAMEL_URL_HIDE_ALL);
+ res = g_strdup_printf (m->expunge
?_("Expunging and storing account '%s'")
:_("Storing account '%s'"),
uri);
- g_free(uri);
+ g_free (uri);
return res;
}
@@ -1680,14 +1680,14 @@ sync_store_desc (struct _sync_store_msg *m)
static void
sync_store_exec (struct _sync_store_msg *m)
{
- camel_store_sync(m->store, m->expunge, &m->base.error);
+ camel_store_sync (m->store, m->expunge, &m->base.error);
}
static void
sync_store_done (struct _sync_store_msg *m)
{
if (m->done)
- m->done(m->store, m->data);
+ m->done (m->store, m->data);
}
static void
@@ -1705,11 +1705,11 @@ static MailMsgInfo sync_store_info = {
};
void
-mail_sync_store(CamelStore *store, gint expunge, void (*done) (CamelStore *store, gpointer data), gpointer data)
+mail_sync_store (CamelStore *store, gint expunge, void (*done) (CamelStore *store, gpointer data), gpointer data)
{
struct _sync_store_msg *m;
- m = mail_msg_new(&sync_store_info);
+ m = mail_msg_new (&sync_store_info);
m->store = store;
m->expunge = expunge;
g_object_ref (store);
@@ -1733,7 +1733,7 @@ refresh_folder_exec (struct _sync_folder_msg *m)
/* camel_folder_sync (m->folder, FALSE, &m->base.error); */
/* if (!camel_exception_is_set (&m->base.error)) */
- camel_folder_refresh_info(m->folder, &m->base.error);
+ camel_folder_refresh_info (m->folder, &m->base.error);
}
/* we just use the sync stuff where we can, since it would be the same */
@@ -1746,11 +1746,11 @@ static MailMsgInfo refresh_folder_info = {
};
void
-mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
+mail_refresh_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
{
struct _sync_folder_msg *m;
- m = mail_msg_new(&refresh_folder_info);
+ m = mail_msg_new (&refresh_folder_info);
m->folder = folder;
g_object_ref (folder);
m->data = data;
@@ -1770,7 +1770,7 @@ expunge_folder_desc (struct _sync_folder_msg *m)
static void
expunge_folder_exec (struct _sync_folder_msg *m)
{
- camel_folder_expunge(m->folder, &m->base.error);
+ camel_folder_expunge (m->folder, &m->base.error);
}
/* we just use the sync stuff where we can, since it would be the same */
@@ -1783,11 +1783,11 @@ static MailMsgInfo expunge_folder_info = {
};
void
-mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
+mail_expunge_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
{
struct _sync_folder_msg *m;
- m = mail_msg_new(&expunge_folder_info);
+ m = mail_msg_new (&expunge_folder_info);
m->folder = folder;
g_object_ref (folder);
m->data = data;
@@ -1839,14 +1839,14 @@ static void
empty_trash_done (struct _empty_trash_msg *m)
{
if (m->done)
- m->done(m->account, m->data);
+ m->done (m->account, m->data);
}
static void
empty_trash_free (struct _empty_trash_msg *m)
{
if (m->account)
- g_object_unref(m->account);
+ g_object_unref (m->account);
}
static MailMsgInfo empty_trash_info = {
@@ -1858,14 +1858,14 @@ static MailMsgInfo empty_trash_info = {
};
void
-mail_empty_trash(EAccount *account, void (*done) (EAccount *account, gpointer data), gpointer data)
+mail_empty_trash (EAccount *account, void (*done) (EAccount *account, gpointer data), gpointer data)
{
struct _empty_trash_msg *m;
- m = mail_msg_new(&empty_trash_info);
+ m = mail_msg_new (&empty_trash_info);
m->account = account;
if (account)
- g_object_ref(account);
+ g_object_ref (account);
m->data = data;
m->done = done;
@@ -1904,7 +1904,7 @@ static void
get_message_done (struct _get_message_msg *m)
{
if (m->done)
- m->done(m->folder, m->uid, m->message, m->data);
+ m->done (m->folder, m->uid, m->message, m->data);
}
static void
@@ -1927,20 +1927,20 @@ static MailMsgInfo get_message_info = {
};
gint
-mail_get_message(CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid,
+mail_get_message (CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid,
CamelMimeMessage *msg, gpointer data),
gpointer data, MailMsgDispatchFunc dispatch)
{
struct _get_message_msg *m;
gint id;
- m = mail_msg_new(&get_message_info);
+ m = mail_msg_new (&get_message_info);
m->folder = folder;
g_object_ref (folder);
- m->uid = g_strdup(uid);
+ m->uid = g_strdup (uid);
m->data = data;
m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done;
- m->cancel = camel_operation_new(NULL, NULL);
+ m->cancel = camel_operation_new (NULL, NULL);
id = m->base.seq;
dispatch (m);
@@ -1955,7 +1955,7 @@ get_messagex_done (struct _get_message_msg *m)
{
if (m->done && !camel_operation_cancel_check (m->cancel)) {
get_done done = (get_done)m->done;
- done(m->folder, m->uid, m->message, m->data, &m->base.error);
+ done (m->folder, m->uid, m->message, m->data, &m->base.error);
}
}
@@ -1983,13 +1983,13 @@ mail_get_messagex (CamelFolder *folder,
struct _get_message_msg *m;
gint id;
- m = mail_msg_new(&get_messagex_info);
+ m = mail_msg_new (&get_messagex_info);
m->folder = folder;
g_object_ref (folder);
- m->uid = g_strdup(uid);
+ m->uid = g_strdup (uid);
m->data = data;
m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done;
- m->cancel = camel_operation_new(NULL, NULL);
+ m->cancel = camel_operation_new (NULL, NULL);
id = m->base.seq;
dispatch (m);
@@ -2027,12 +2027,12 @@ get_messages_exec (struct _get_messages_msg *m)
for (i=0; i<m->uids->len; i++) {
gint pc = ((i+1) * 100) / m->uids->len;
- message = camel_folder_get_message(m->folder, m->uids->pdata[i], &m->base.error);
- camel_operation_progress(m->base.cancel, pc);
+ message = camel_folder_get_message (m->folder, m->uids->pdata[i], &m->base.error);
+ camel_operation_progress (m->base.cancel, pc);
if (message == NULL)
break;
- g_ptr_array_add(m->messages, message);
+ g_ptr_array_add (m->messages, message);
}
}
@@ -2040,7 +2040,7 @@ static void
get_messages_done (struct _get_messages_msg *m)
{
if (m->done)
- m->done(m->folder, m->uids, m->messages, m->data);
+ m->done (m->folder, m->uids, m->messages, m->data);
}
static void
@@ -2053,7 +2053,7 @@ get_messages_free (struct _get_messages_msg *m)
if (m->messages->pdata[i])
g_object_unref (m->messages->pdata[i]);
}
- g_ptr_array_free(m->messages, TRUE);
+ g_ptr_array_free (m->messages, TRUE);
g_object_unref (m->folder);
}
@@ -2066,18 +2066,18 @@ static MailMsgInfo get_messages_info = {
};
gint
-mail_get_messages(CamelFolder *folder, GPtrArray *uids,
+mail_get_messages (CamelFolder *folder, GPtrArray *uids,
void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data),
gpointer data)
{
struct _get_messages_msg *m;
gint id;
- m = mail_msg_new(&get_messages_info);
+ m = mail_msg_new (&get_messages_info);
m->folder = folder;
g_object_ref (folder);
m->uids = uids;
- m->messages = g_ptr_array_new();
+ m->messages = g_ptr_array_new ();
m->data = data;
m->done = done;
id = m->base.seq;
@@ -2154,7 +2154,7 @@ save_messages_exec (struct _save_messages_msg *m)
path = g_filename_to_uri (m->path, NULL, NULL);
stream = camel_stream_vfs_new_with_uri (path, CAMEL_STREAM_VFS_CREATE);
- from_filter = camel_mime_filter_from_new();
+ from_filter = camel_mime_filter_from_new ();
filtered_stream = camel_stream_filter_new (stream);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filtered_stream), from_filter);
@@ -2167,18 +2167,18 @@ save_messages_exec (struct _save_messages_msg *m)
CamelMimeMessage *message;
gint pc = ((i+1) * 100) / m->uids->len;
- message = camel_folder_get_message(m->folder, m->uids->pdata[i], &m->base.error);
- camel_operation_progress(m->base.cancel, pc);
+ message = camel_folder_get_message (m->folder, m->uids->pdata[i], &m->base.error);
+ camel_operation_progress (m->base.cancel, pc);
if (message == NULL)
break;
save_prepare_part (CAMEL_MIME_PART (message));
/* we need to flush after each stream write since we are writing to the same fd */
- from = camel_mime_message_build_mbox_from(message);
+ from = camel_mime_message_build_mbox_from (message);
if (camel_stream_write_string (
stream, from, &m->base.error) == -1
- || camel_stream_flush(stream, &m->base.error) == -1
+ || camel_stream_flush (stream, &m->base.error) == -1
|| camel_data_wrapper_write_to_stream (
(CamelDataWrapper *) message,
(CamelStream *)filtered_stream, &m->base.error) == -1
@@ -2186,16 +2186,16 @@ save_messages_exec (struct _save_messages_msg *m)
(CamelStream *)filtered_stream, &m->base.error) == -1
|| camel_stream_write_string (
stream, "\n", &m->base.error) == -1
- || camel_stream_flush(stream, &m->base.error) == -1) {
+ || camel_stream_flush (stream, &m->base.error) == -1) {
g_prefix_error (
&m->base.error,
_("Error saving messages to: %s:\n"),
m->path);
- g_free(from);
+ g_free (from);
g_object_unref ((CamelObject *)message);
break;
}
- g_free(from);
+ g_free (from);
g_object_unref (message);
}
@@ -2207,7 +2207,7 @@ static void
save_messages_done (struct _save_messages_msg *m)
{
if (m->done)
- m->done(m->folder, m->uids, m->path, m->data);
+ m->done (m->folder, m->uids, m->path, m->data);
}
static void
@@ -2215,7 +2215,7 @@ save_messages_free (struct _save_messages_msg *m)
{
em_utils_uids_free (m->uids);
g_object_unref (m->folder);
- g_free(m->path);
+ g_free (m->path);
}
static MailMsgInfo save_messages_info = {
@@ -2227,17 +2227,17 @@ static MailMsgInfo save_messages_info = {
};
gint
-mail_save_messages(CamelFolder *folder, GPtrArray *uids, const gchar *path,
+mail_save_messages (CamelFolder *folder, GPtrArray *uids, const gchar *path,
void (*done) (CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data), gpointer data)
{
struct _save_messages_msg *m;
gint id;
- m = mail_msg_new(&save_messages_info);
+ m = mail_msg_new (&save_messages_info);
m->folder = folder;
g_object_ref (folder);
m->uids = uids;
- m->path = g_strdup(path);
+ m->path = g_strdup (path);
m->data = data;
m->done = done;
@@ -2371,12 +2371,12 @@ prep_offline_exec (struct _prep_offline_msg *m)
CamelFolder *folder;
if (m->cancel)
- camel_operation_register(m->cancel);
+ camel_operation_register (m->cancel);
- folder = mail_tool_uri_to_folder(m->uri, 0, &m->base.error);
+ folder = mail_tool_uri_to_folder (m->uri, 0, &m->base.error);
if (folder) {
- if (CAMEL_IS_DISCO_FOLDER(folder)) {
- camel_disco_folder_prepare_for_offline((CamelDiscoFolder *)folder,
+ if (CAMEL_IS_DISCO_FOLDER (folder)) {
+ camel_disco_folder_prepare_for_offline ((CamelDiscoFolder *)folder,
"(match-all)",
&m->base.error);
} else if (CAMEL_IS_OFFLINE_FOLDER (folder)) {
@@ -2384,27 +2384,27 @@ prep_offline_exec (struct _prep_offline_msg *m)
}
/* prepare_for_offline should do this? */
/* of course it should all be atomic, but ... */
- camel_folder_sync(folder, FALSE, NULL);
+ camel_folder_sync (folder, FALSE, NULL);
g_object_unref (folder);
}
if (m->cancel)
- camel_operation_unregister(m->cancel);
+ camel_operation_unregister (m->cancel);
}
static void
prep_offline_done (struct _prep_offline_msg *m)
{
if (m->done)
- m->done(m->uri, m->data);
+ m->done (m->uri, m->data);
}
static void
prep_offline_free (struct _prep_offline_msg *m)
{
if (m->cancel)
- camel_operation_unref(m->cancel);
- g_free(m->uri);
+ camel_operation_unref (m->cancel);
+ g_free (m->uri);
}
static MailMsgInfo prep_offline_info = {
@@ -2416,18 +2416,18 @@ static MailMsgInfo prep_offline_info = {
};
void
-mail_prep_offline(const gchar *uri,
+mail_prep_offline (const gchar *uri,
CamelOperation *cancel,
void (*done)(const gchar *, gpointer data),
gpointer data)
{
struct _prep_offline_msg *m;
- m = mail_msg_new(&prep_offline_info);
+ m = mail_msg_new (&prep_offline_info);
m->cancel = cancel;
if (cancel)
- camel_operation_ref(cancel);
- m->uri = g_strdup(uri);
+ camel_operation_ref (cancel);
+ m->uri = g_strdup (uri);
m->data = data;
m->done = done;
@@ -2453,7 +2453,7 @@ set_offline_desc (struct _set_offline_msg *m)
msg = g_strdup_printf (m->offline ? _("Disconnecting from '%s'") : _("Reconnecting to '%s'"),
service_name);
- g_free(service_name);
+ g_free (service_name);
return msg;
}
@@ -2495,7 +2495,7 @@ static void
set_offline_done (struct _set_offline_msg *m)
{
if (m->done)
- m->done(m->store, m->data);
+ m->done (m->store, m->data);
}
static void
@@ -2526,7 +2526,7 @@ mail_store_set_offline (CamelStore *store, gboolean offline,
if (offline)
camel_service_cancel_connect (CAMEL_SERVICE (store));
- m = mail_msg_new(&set_offline_info);
+ m = mail_msg_new (&set_offline_info);
m->store = store;
g_object_ref (store);
m->offline = offline;
@@ -2548,7 +2548,7 @@ prepare_offline_desc (struct _set_offline_msg *m)
gchar *msg;
msg = g_strdup_printf (_("Preparing account '%s' for offline"), service_name);
- g_free(service_name);
+ g_free (service_name);
return msg;
}
@@ -2596,7 +2596,7 @@ mail_store_prepare_offline (CamelStore *store)
* thread won't get queued behind a hung connect op.
*/
- m = mail_msg_new(&prepare_offline_info);
+ m = mail_msg_new (&prepare_offline_info);
m->store = store;
g_object_ref (store);
m->data = NULL;
@@ -2641,13 +2641,13 @@ check_service_exec (struct _check_msg *m)
{
CamelService *service;
- service = camel_session_get_service(session, m->url, m->type, &m->base.error);
+ service = camel_session_get_service (session, m->url, m->type, &m->base.error);
if (!service) {
- camel_operation_unregister(m->base.cancel);
+ camel_operation_unregister (m->base.cancel);
return;
}
- m->authtypes = camel_service_query_auth_types(service, &m->base.error);
+ m->authtypes = camel_service_query_auth_types (service, &m->base.error);
g_object_unref (service);
}
@@ -2655,14 +2655,14 @@ static void
check_service_done (struct _check_msg *m)
{
if (m->done)
- m->done(m->url, m->type, m->authtypes, m->data);
+ m->done (m->url, m->type, m->authtypes, m->data);
}
static void
check_service_free (struct _check_msg *m)
{
- g_free(m->url);
- g_list_free(m->authtypes);
+ g_free (m->url);
+ g_list_free (m->authtypes);
}
static MailMsgInfo check_service_info = {
@@ -2674,13 +2674,13 @@ static MailMsgInfo check_service_info = {
};
gint
-mail_check_service(const gchar *url, CamelProviderType type, void (*done)(const gchar *url, CamelProviderType type, GList *authtypes, gpointer data), gpointer data)
+mail_check_service (const gchar *url, CamelProviderType type, void (*done)(const gchar *url, CamelProviderType type, GList *authtypes, gpointer data), gpointer data)
{
struct _check_msg *m;
gint id;
m = mail_msg_new (&check_service_info);
- m->url = g_strdup(url);
+ m->url = g_strdup (url);
m->type = type;
m->done = done;
m->data = data;
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
index 7a3f045b63..879a62654e 100644
--- a/mail/mail-ops.h
+++ b/mail/mail-ops.h
@@ -50,7 +50,7 @@ gint mail_get_message (CamelFolder *folder, const gchar *uid,
MailMsgDispatchFunc dispatch);
gint
-mail_get_messagex(CamelFolder *folder, const gchar *uid,
+mail_get_messagex (CamelFolder *folder, const gchar *uid,
void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, GError **error),
gpointer data, MailMsgDispatchFunc dispatch);
@@ -83,7 +83,7 @@ void mail_build_attachment (CamelFolder *folder, GPtrArray *uids,
void mail_sync_folder (CamelFolder *folder,
void (*done) (CamelFolder *folder, gpointer data), gpointer data);
-void mail_sync_store(CamelStore *store, gint expunge,
+void mail_sync_store (CamelStore *store, gint expunge,
void (*done) (CamelStore *store, gpointer data), gpointer data);
void mail_refresh_folder (CamelFolder *folder,
@@ -147,10 +147,10 @@ void mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids);
void mail_filter_junk (CamelFolder *folder, GPtrArray *uids);
/* Work Offline */
-void mail_prep_offline(const gchar *uri, CamelOperation *cancel,
+void mail_prep_offline (const gchar *uri, CamelOperation *cancel,
void (*done)(const gchar *, gpointer data),
gpointer data);
-gint mail_store_set_offline(CamelStore *store, gboolean offline,
+gint mail_store_set_offline (CamelStore *store, gboolean offline,
void (*done)(CamelStore *, gpointer data),
gpointer data);
gint mail_store_prepare_offline (CamelStore *store);
@@ -158,7 +158,7 @@ gint mail_store_prepare_offline (CamelStore *store);
/* filter driver execute shell command async callback */
void mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer data);
-gint mail_check_service(const gchar *url, CamelProviderType type,
+gint mail_check_service (const gchar *url, CamelProviderType type,
void (*done)(const gchar *url, CamelProviderType type, GList *authtypes, gpointer data), gpointer data);
G_END_DECLS
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index d03e9f3354..4d84fd0284 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -132,36 +132,36 @@ static struct _send_data *send_data = NULL;
static GtkWidget *send_recv_dialog = NULL;
static void
-free_folder_info(struct _folder_info *info)
+free_folder_info (struct _folder_info *info)
{
/*camel_folder_thaw (info->folder); */
- mail_sync_folder(info->folder, NULL, NULL);
+ mail_sync_folder (info->folder, NULL, NULL);
g_object_unref (info->folder);
- g_free(info->uri);
- g_free(info);
+ g_free (info->uri);
+ g_free (info);
}
static void
-free_send_info(struct _send_info *info)
+free_send_info (struct _send_info *info)
{
- g_free(info->uri);
+ g_free (info->uri);
if (info->cancel)
- camel_operation_unref(info->cancel);
+ camel_operation_unref (info->cancel);
if (info->timeout_id != 0)
- g_source_remove(info->timeout_id);
- g_free(info->what);
+ g_source_remove (info->timeout_id);
+ g_free (info->what);
g_free (info->send_url);
- g_free(info);
+ g_free (info);
}
static struct _send_data *
-setup_send_data(void)
+setup_send_data (void)
{
struct _send_data *data;
if (send_data == NULL) {
- send_data = data = g_malloc0(sizeof(*data));
- data->lock = g_mutex_new();
+ send_data = data = g_malloc0 (sizeof (*data));
+ data->lock = g_mutex_new ();
data->folders = g_hash_table_new_full (
g_str_hash, g_str_equal,
(GDestroyNotify) NULL,
@@ -178,10 +178,10 @@ setup_send_data(void)
}
static void
-receive_cancel(GtkButton *button, struct _send_info *info)
+receive_cancel (GtkButton *button, struct _send_info *info)
{
if (info->state == SEND_ACTIVE) {
- camel_operation_cancel(info->cancel);
+ camel_operation_cancel (info->cancel);
if (info->status_label)
gtk_label_set_text (
GTK_LABEL (info->status_label),
@@ -189,38 +189,38 @@ receive_cancel(GtkButton *button, struct _send_info *info)
info->state = SEND_CANCELLED;
}
if (info->cancel_button)
- gtk_widget_set_sensitive(info->cancel_button, FALSE);
+ gtk_widget_set_sensitive (info->cancel_button, FALSE);
}
static void
-free_send_data(void)
+free_send_data (void)
{
struct _send_data *data = send_data;
- g_return_if_fail (g_hash_table_size(data->active) == 0);
+ g_return_if_fail (g_hash_table_size (data->active) == 0);
if (data->inbox) {
- mail_sync_folder(data->inbox, NULL, NULL);
+ mail_sync_folder (data->inbox, NULL, NULL);
/*camel_folder_thaw (data->inbox); */
g_object_unref (data->inbox);
}
- g_list_free(data->infos);
- g_hash_table_destroy(data->active);
- g_hash_table_destroy(data->folders);
- g_mutex_free(data->lock);
- g_free(data);
+ g_list_free (data->infos);
+ g_hash_table_destroy (data->active);
+ g_hash_table_destroy (data->folders);
+ g_mutex_free (data->lock);
+ g_free (data);
send_data = NULL;
}
static void
-cancel_send_info(gpointer key, struct _send_info *info, gpointer data)
+cancel_send_info (gpointer key, struct _send_info *info, gpointer data)
{
receive_cancel (GTK_BUTTON (info->cancel_button), info);
}
static void
-hide_send_info(gpointer key, struct _send_info *info, gpointer data)
+hide_send_info (gpointer key, struct _send_info *info, gpointer data)
{
info->cancel_button = NULL;
info->progress_bar = NULL;
@@ -241,20 +241,20 @@ dialog_destroy_cb (struct _send_data *data, GObject *deadbeef)
}
static void
-dialog_response(GtkDialog *gd, gint button, struct _send_data *data)
+dialog_response (GtkDialog *gd, gint button, struct _send_data *data)
{
switch (button) {
case GTK_RESPONSE_CANCEL:
d(printf("cancelled whole thing\n"));
if (!data->cancelled) {
data->cancelled = TRUE;
- g_hash_table_foreach(data->active, (GHFunc)cancel_send_info, NULL);
+ g_hash_table_foreach (data->active, (GHFunc)cancel_send_info, NULL);
}
- gtk_dialog_set_response_sensitive(gd, GTK_RESPONSE_CANCEL, FALSE);
+ gtk_dialog_set_response_sensitive (gd, GTK_RESPONSE_CANCEL, FALSE);
break;
default:
d(printf("hiding dialog\n"));
- g_hash_table_foreach(data->active, (GHFunc)hide_send_info, NULL);
+ g_hash_table_foreach (data->active, (GHFunc)hide_send_info, NULL);
data->gd = NULL;
/*gtk_widget_destroy((GtkWidget *)gd);*/
break;
@@ -265,7 +265,7 @@ static GStaticMutex status_lock = G_STATIC_MUTEX_INIT;
static gchar *format_url (const gchar *internal_url, const gchar *account_name);
static gint
-operation_status_timeout(gpointer data)
+operation_status_timeout (gpointer data)
{
struct _send_info *info = data;
@@ -301,12 +301,12 @@ operation_status_timeout(gpointer data)
}
static void
-set_send_status(struct _send_info *info, const gchar *desc, gint pc)
+set_send_status (struct _send_info *info, const gchar *desc, gint pc)
{
g_static_mutex_lock (&status_lock);
- g_free(info->what);
- info->what = g_strdup(desc);
+ g_free (info->what);
+ info->what = g_strdup (desc);
info->pc = pc;
g_static_mutex_unlock (&status_lock);
@@ -325,7 +325,7 @@ set_send_account (struct _send_info *info, const gchar *account_url)
/* for camel operation status */
static void
-operation_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
+operation_status (CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
struct _send_info *info = data;
@@ -339,7 +339,7 @@ operation_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
break;
}
- set_send_status(info, what, pc);
+ set_send_status (info, what, pc);
}
static gchar *
@@ -385,7 +385,7 @@ format_url (const gchar *internal_url, const gchar *account_name)
}
static send_info_t
-get_receive_type(const gchar *url)
+get_receive_type (const gchar *url)
{
CamelProvider *provider;
@@ -394,7 +394,7 @@ get_receive_type(const gchar *url)
if (!strncmp(url, "mbox:", 5))
return SEND_RECEIVE;
- provider = camel_provider_get(url, NULL);
+ provider = camel_provider_get (url, NULL);
if (!provider)
return SEND_INVALID;
@@ -481,8 +481,8 @@ build_dialog (GtkWindow *parent,
/* Check to see if we have to send any mails.
* If we don't, don't display the SMTP row in the table. */
if (outbox && destination
- && (camel_folder_get_message_count(outbox) -
- camel_folder_get_deleted_message_count(outbox)) == 0)
+ && (camel_folder_get_message_count (outbox) -
+ camel_folder_get_deleted_message_count (outbox)) == 0)
num_sources--;
table = gtk_table_new (num_sources, 4, FALSE);
@@ -607,15 +607,15 @@ build_dialog (GtkWindow *parent,
/* we also need gd during emition to be able to catch Cancel All */
data->gd = gd;
target = em_event_target_new_send_receive (
- em_event_peek(), table, data, row, EM_EVENT_SEND_RECEIVE);
+ em_event_peek (), table, data, row, EM_EVENT_SEND_RECEIVE);
e_event_emit (
(EEvent *) em_event_peek (), "mail.sendreceive",
(EEventTarget *) target);
/* Skip displaying the SMTP row if we've got no outbox, destination or unsent mails */
if (outbox && destination
- && (camel_folder_get_message_count(outbox) -
- camel_folder_get_deleted_message_count(outbox)) != 0) {
+ && (camel_folder_get_message_count (outbox) -
+ camel_folder_get_deleted_message_count (outbox)) != 0) {
info = g_hash_table_lookup (data->active, SEND_URI_KEY);
if (info == NULL) {
info = g_malloc0 (sizeof (*info));
@@ -695,7 +695,7 @@ build_dialog (GtkWindow *parent,
}
static void
-update_folders(gchar *uri, struct _folder_info *info, gpointer data)
+update_folders (gchar *uri, struct _folder_info *info, gpointer data)
{
time_t now = *((time_t *)data);
@@ -706,7 +706,7 @@ update_folders(gchar *uri, struct _folder_info *info, gpointer data)
if (now > info->update+10+info->count*5) {
d(printf("upating a folder: %s\n", info->uri));
/*camel_folder_thaw(info->folder);
- camel_folder_freeze(info->folder);*/
+ camel_folder_freeze (info->folder);*/
info->update = now;
info->count++;
}
@@ -720,16 +720,16 @@ receive_status (CamelFilterDriver *driver,
gpointer data)
{
struct _send_info *info = data;
- time_t now = time(NULL);
+ time_t now = time (NULL);
/* let it flow through to the folder, every now and then too? */
- g_hash_table_foreach(info->data->folders, (GHFunc)update_folders, &now);
+ g_hash_table_foreach (info->data->folders, (GHFunc)update_folders, &now);
if (info->data->inbox && now > info->data->inbox_update+20) {
d(printf("updating inbox too\n"));
/* this doesn't seem to work right :( */
/*camel_folder_thaw(info->data->inbox);
- camel_folder_freeze(info->data->inbox);*/
+ camel_folder_freeze (info->data->inbox);*/
info->data->inbox_update = now;
}
@@ -740,7 +740,7 @@ receive_status (CamelFilterDriver *driver,
switch (status) {
case CAMEL_FILTER_STATUS_START:
case CAMEL_FILTER_STATUS_END:
- set_send_status(info, desc, pc);
+ set_send_status (info, desc, pc);
break;
case CAMEL_FILTER_STATUS_ACTION:
set_send_account (info, desc);
@@ -776,7 +776,7 @@ receive_done (const gchar *uri, gpointer data)
if (info->progress_bar) {
const gchar *text;
- gtk_progress_bar_set_fraction(
+ gtk_progress_bar_set_fraction (
GTK_PROGRESS_BAR (info->progress_bar), 1.0);
if (info->state == SEND_CANCELLED)
@@ -795,18 +795,18 @@ receive_done (const gchar *uri, gpointer data)
/* remove/free this active download */
d(printf("%s: freeing info %p\n", G_STRFUNC, info));
if (info->type == SEND_SEND)
- g_hash_table_steal(info->data->active, SEND_URI_KEY);
+ g_hash_table_steal (info->data->active, SEND_URI_KEY);
else
- g_hash_table_steal(info->data->active, info->uri);
- info->data->infos = g_list_remove(info->data->infos, info);
+ g_hash_table_steal (info->data->active, info->uri);
+ info->data->infos = g_list_remove (info->data->infos, info);
- if (g_hash_table_size(info->data->active) == 0) {
+ if (g_hash_table_size (info->data->active) == 0) {
if (info->data->gd)
- gtk_widget_destroy((GtkWidget *)info->data->gd);
- free_send_data();
+ gtk_widget_destroy ((GtkWidget *)info->data->gd);
+ free_send_data ();
}
- free_send_info(info);
+ free_send_info (info);
}
/* although we dont do anythign smart here yet, there is no need for this interface to
@@ -824,9 +824,9 @@ receive_get_folder (CamelFilterDriver *d,
struct _folder_info *oldinfo;
gpointer oldkey, oldinfoptr;
- g_mutex_lock(info->data->lock);
- oldinfo = g_hash_table_lookup(info->data->folders, uri);
- g_mutex_unlock(info->data->lock);
+ g_mutex_lock (info->data->lock);
+ oldinfo = g_hash_table_lookup (info->data->folders, uri);
+ g_mutex_unlock (info->data->lock);
if (oldinfo) {
g_object_ref (oldinfo->folder);
return oldinfo->folder;
@@ -837,7 +837,7 @@ receive_get_folder (CamelFilterDriver *d,
/* we recheck that the folder hasn't snuck in while we were loading it... */
/* and we assume the newer one is the same, but unref the old one anyway */
- g_mutex_lock(info->data->lock);
+ g_mutex_lock (info->data->lock);
if (g_hash_table_lookup_extended (info->data->folders, uri, &oldkey, &oldinfoptr)) {
oldinfo = (struct _folder_info *) oldinfoptr;
@@ -845,15 +845,15 @@ receive_get_folder (CamelFilterDriver *d,
oldinfo->folder = folder;
} else {
/*camel_folder_freeze (folder); */
- oldinfo = g_malloc0(sizeof(*oldinfo));
+ oldinfo = g_malloc0 (sizeof (*oldinfo));
oldinfo->folder = folder;
- oldinfo->uri = g_strdup(uri);
- g_hash_table_insert(info->data->folders, oldinfo->uri, oldinfo);
+ oldinfo->uri = g_strdup (uri);
+ g_hash_table_insert (info->data->folders, oldinfo->uri, oldinfo);
}
g_object_ref (folder);
- g_mutex_unlock(info->data->lock);
+ g_mutex_unlock (info->data->lock);
return folder;
}
@@ -906,17 +906,17 @@ refresh_folders_exec (struct _refresh_folders_msg *m)
get_folders (m->store, m->folders, m->finfo);
for (i=0;i<m->folders->len;i++) {
- folder = mail_tool_uri_to_folder(m->folders->pdata[i], 0, &local_error);
+ folder = mail_tool_uri_to_folder (m->folders->pdata[i], 0, &local_error);
if (folder) {
camel_folder_sync (folder, FALSE, NULL);
- camel_folder_refresh_info(folder, NULL);
+ camel_folder_refresh_info (folder, NULL);
g_object_unref (folder);
} else if (local_error != NULL) {
g_warning ("Failed to refresh folders: %s", local_error->message);
g_clear_error (&local_error);
}
- if (camel_operation_cancel_check(m->info->cancel))
+ if (camel_operation_cancel_check (m->info->cancel))
break;
}
}
@@ -933,8 +933,8 @@ refresh_folders_free (struct _refresh_folders_msg *m)
gint i;
for (i=0;i<m->folders->len;i++)
- g_free(m->folders->pdata[i]);
- g_ptr_array_free(m->folders, TRUE);
+ g_free (m->folders->pdata[i]);
+ g_ptr_array_free (m->folders, TRUE);
camel_store_free_folder_info (m->store, m->finfo);
g_object_unref (m->store);
@@ -949,14 +949,14 @@ static MailMsgInfo refresh_folders_info = {
};
static gboolean
-receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, gpointer data)
+receive_update_got_folderinfo (CamelStore *store, CamelFolderInfo *info, gpointer data)
{
if (info) {
- GPtrArray *folders = g_ptr_array_new();
+ GPtrArray *folders = g_ptr_array_new ();
struct _refresh_folders_msg *m;
struct _send_info *sinfo = data;
- m = mail_msg_new(&refresh_folders_info);
+ m = mail_msg_new (&refresh_folders_info);
m->store = store;
g_object_ref (store);
m->folders = folders;
@@ -980,7 +980,7 @@ receive_update_got_store (gchar *uri, CamelStore *store, gpointer data)
struct _send_info *info = data;
if (store) {
- mail_folder_cache_note_store(mail_folder_cache_get_default (),
+ mail_folder_cache_note_store (mail_folder_cache_get_default (),
store, info->cancel,
receive_update_got_folderinfo, info);
} else {
@@ -1022,7 +1022,7 @@ mail_send_receive (GtkWindow *parent)
switch (info->type) {
case SEND_RECEIVE:
- mail_fetch_mail(info->uri, info->keep_on_server,
+ mail_fetch_mail (info->uri, info->keep_on_server,
E_FILTER_SOURCE_INCOMING,
info->cancel,
receive_get_folder, info,
@@ -1031,7 +1031,7 @@ mail_send_receive (GtkWindow *parent)
break;
case SEND_SEND:
/* todo, store the folder in info? */
- mail_send_queue(local_outbox, info->uri,
+ mail_send_queue (local_outbox, info->uri,
E_FILTER_SOURCE_OUTGOING,
info->cancel,
receive_get_folder, info,
@@ -1039,7 +1039,7 @@ mail_send_receive (GtkWindow *parent)
receive_done, info);
break;
case SEND_UPDATE:
- mail_get_store(info->uri, info->cancel, receive_update_got_store, info);
+ mail_get_store (info->uri, info->cancel, receive_update_got_store, info);
break;
default:
break;
@@ -1059,7 +1059,7 @@ struct _auto_data {
static GHashTable *auto_active;
static gboolean
-auto_timeout(gpointer data)
+auto_timeout (gpointer data)
{
struct _auto_data *info = data;
@@ -1078,54 +1078,54 @@ auto_timeout(gpointer data)
}
static void
-auto_account_removed(EAccountList *eal, EAccount *ea, gpointer dummy)
+auto_account_removed (EAccountList *eal, EAccount *ea, gpointer dummy)
{
struct _auto_data *info = g_object_get_data((GObject *)ea, "mail-autoreceive");
- g_return_if_fail(info != NULL);
+ g_return_if_fail (info != NULL);
if (info->timeout_id) {
- g_source_remove(info->timeout_id);
+ g_source_remove (info->timeout_id);
info->timeout_id = 0;
}
}
static void
-auto_account_finalised(struct _auto_data *info)
+auto_account_finalised (struct _auto_data *info)
{
if (info->timeout_id)
- g_source_remove(info->timeout_id);
- g_free(info);
+ g_source_remove (info->timeout_id);
+ g_free (info);
}
static void
-auto_account_commit(struct _auto_data *info)
+auto_account_commit (struct _auto_data *info)
{
gint period, check;
check = info->account->enabled
- && e_account_get_bool(info->account, E_ACCOUNT_SOURCE_AUTO_CHECK)
- && e_account_get_string(info->account, E_ACCOUNT_SOURCE_URL);
- period = e_account_get_int(info->account, E_ACCOUNT_SOURCE_AUTO_CHECK_TIME)*60;
- period = MAX(60, period);
+ && e_account_get_bool (info->account, E_ACCOUNT_SOURCE_AUTO_CHECK)
+ && e_account_get_string (info->account, E_ACCOUNT_SOURCE_URL);
+ period = e_account_get_int (info->account, E_ACCOUNT_SOURCE_AUTO_CHECK_TIME)*60;
+ period = MAX (60, period);
if (info->timeout_id
&& (!check
|| period != info->period)) {
- g_source_remove(info->timeout_id);
+ g_source_remove (info->timeout_id);
info->timeout_id = 0;
}
info->period = period;
if (check && info->timeout_id == 0)
- info->timeout_id = g_timeout_add_seconds(info->period, auto_timeout, info);
+ info->timeout_id = g_timeout_add_seconds (info->period, auto_timeout, info);
}
static void
-auto_account_added(EAccountList *eal, EAccount *ea, gpointer dummy)
+auto_account_added (EAccountList *eal, EAccount *ea, gpointer dummy)
{
struct _auto_data *info;
- info = g_malloc0(sizeof(*info));
+ info = g_malloc0 (sizeof (*info));
info->account = ea;
g_object_set_data_full (
G_OBJECT (ea), "mail-autoreceive", info,
@@ -1134,13 +1134,13 @@ auto_account_added(EAccountList *eal, EAccount *ea, gpointer dummy)
}
static void
-auto_account_changed(EAccountList *eal, EAccount *ea, gpointer dummy)
+auto_account_changed (EAccountList *eal, EAccount *ea, gpointer dummy)
{
struct _auto_data *info = g_object_get_data((GObject *)ea, "mail-autoreceive");
- g_return_if_fail(info != NULL);
+ g_return_if_fail (info != NULL);
- auto_account_commit(info);
+ auto_account_commit (info);
}
static void
@@ -1161,7 +1161,7 @@ auto_online (EShell *shell)
G_OBJECT (e_iterator_get (iter)),
"mail-autoreceive");
if (info && info->timeout_id)
- auto_timeout(info);
+ auto_timeout (info);
}
}
@@ -1195,8 +1195,8 @@ mail_autoreceive_init (EShellBackend *shell_backend,
G_CALLBACK (auto_account_changed), NULL);
for (iter = e_list_get_iterator ((EList *)accounts);
- e_iterator_is_valid(iter);
- e_iterator_next(iter))
+ e_iterator_is_valid (iter);
+ e_iterator_next (iter))
auto_account_added (
accounts, (EAccount *) e_iterator_get (iter), NULL);
@@ -1219,8 +1219,8 @@ mail_receive_uri (const gchar *uri, gboolean keep_on_server)
CamelFolder *local_outbox;
send_info_t type;
- data = setup_send_data();
- info = g_hash_table_lookup(data->active, uri);
+ data = setup_send_data ();
+ info = g_hash_table_lookup (data->active, uri);
if (info != NULL) {
d(printf("download of %s still in progress\n", uri));
return;
@@ -1273,7 +1273,7 @@ mail_receive_uri (const gchar *uri, gboolean keep_on_server)
mail_get_store (info->uri, info->cancel, receive_update_got_store, info);
break;
default:
- g_return_if_reached();
+ g_return_if_reached ();
}
}
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 4e4850b3d2..4725a2eea8 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -89,15 +89,15 @@ struct _MailSessionClass {
static gchar *mail_data_dir;
static gchar *mail_config_dir;
-static gchar *get_password(CamelSession *session, CamelService *service, const gchar *domain, const gchar *prompt, const gchar *item, guint32 flags, GError **error);
-static gboolean forget_password(CamelSession *session, CamelService *service, const gchar *domain, const gchar *item, GError **error);
-static gboolean alert_user(CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel);
-static CamelFilterDriver *get_filter_driver(CamelSession *session, const gchar *type, GError **error);
-static gboolean lookup_addressbook(CamelSession *session, const gchar *name);
-
-static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const gchar *text, gint pc);
-static gpointer ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, guint size);
-static void ms_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *m);
+static gchar *get_password (CamelSession *session, CamelService *service, const gchar *domain, const gchar *prompt, const gchar *item, guint32 flags, GError **error);
+static gboolean forget_password (CamelSession *session, CamelService *service, const gchar *domain, const gchar *item, GError **error);
+static gboolean alert_user (CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel);
+static CamelFilterDriver *get_filter_driver (CamelSession *session, const gchar *type, GError **error);
+static gboolean lookup_addressbook (CamelSession *session, const gchar *name);
+
+static void ms_thread_status (CamelSession *session, CamelSessionThreadMsg *msg, const gchar *text, gint pc);
+static gpointer ms_thread_msg_new (CamelSession *session, CamelSessionThreadOps *ops, guint size);
+static void ms_thread_msg_free (CamelSession *session, CamelSessionThreadMsg *m);
static gboolean ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const gchar *address, GError **error);
GType mail_session_get_type (void);
@@ -122,7 +122,7 @@ mail_session_finalize (GObject *object)
session_gconf_proxy_id = 0;
}
- mail_async_event_destroy(session->async);
+ mail_async_event_destroy (session->async);
g_free (mail_data_dir);
g_free (mail_config_dir);
@@ -155,7 +155,7 @@ mail_session_class_init (MailSessionClass *class)
static void
mail_session_init (MailSession *session)
{
- session->async = mail_async_event_new();
+ session->async = mail_async_event_new ();
session->junk_plugins = NULL;
}
@@ -187,30 +187,30 @@ get_password (CamelSession *session,
gchar *ret = NULL;
EAccount *account = NULL;
- url = service?camel_url_to_string(service->url, CAMEL_URL_HIDE_ALL):NULL;
+ url = service?camel_url_to_string (service->url, CAMEL_URL_HIDE_ALL):NULL;
if (!strcmp(item, "popb4smtp_uri")) {
/* not 100% mt safe, but should be ok */
if (url
- && (account = mail_config_get_account_by_transport_url(url)))
- ret = g_strdup(account->source->url);
+ && (account = mail_config_get_account_by_transport_url (url)))
+ ret = g_strdup (account->source->url);
else
- ret = g_strdup(url);
+ ret = g_strdup (url);
} else {
- gchar *key = make_key(service, item);
+ gchar *key = make_key (service, item);
EAccountService *config_service = NULL;
if (domain == NULL)
domain = "Mail";
- ret = e_passwords_get_password(domain, key);
+ ret = e_passwords_get_password (domain, key);
if (ret == NULL || (flags & CAMEL_SESSION_PASSWORD_REPROMPT)) {
gboolean remember;
if (url) {
- if ((account = mail_config_get_account_by_source_url(url)))
+ if ((account = mail_config_get_account_by_source_url (url)))
config_service = account->source;
- else if ((account = mail_config_get_account_by_transport_url(url)))
+ else if ((account = mail_config_get_account_by_transport_url (url)))
config_service = account->transport;
}
@@ -250,25 +250,25 @@ get_password (CamelSession *session,
/* HACK: breaks abstraction ...
e_account_writable doesn't use the eaccount, it also uses the same writable key for
source and transport */
- if (!e_account_writable(NULL, E_ACCOUNT_SOURCE_SAVE_PASSWD))
+ if (!e_account_writable (NULL, E_ACCOUNT_SOURCE_SAVE_PASSWD))
eflags |= E_PASSWORDS_DISABLE_REMEMBER;
- ret = e_passwords_ask_password(title, domain, key, prompt, eflags, &remember, NULL);
+ ret = e_passwords_ask_password (title, domain, key, prompt, eflags, &remember, NULL);
- g_free(title);
+ g_free (title);
if (ret && config_service)
- mail_config_service_set_save_passwd(config_service, remember);
+ mail_config_service_set_save_passwd (config_service, remember);
if (config_service)
config_service->get_password_canceled = ret == NULL;
}
}
- g_free(key);
+ g_free (key);
}
- g_free(url);
+ g_free (url);
if (ret == NULL)
g_set_error (
@@ -425,7 +425,7 @@ static MailMsgInfo user_message_info = {
};
static gboolean
-lookup_addressbook(CamelSession *session, const gchar *name)
+lookup_addressbook (CamelSession *session, const gchar *name)
{
CamelInternetAddress *addr;
gboolean ret;
@@ -442,7 +442,7 @@ lookup_addressbook(CamelSession *session, const gchar *name)
}
static gboolean
-alert_user(CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel)
+alert_user (CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel)
{
struct _user_message_msg *m;
gboolean result = TRUE;
@@ -486,7 +486,7 @@ main_play_sound (CamelFilterDriver *driver, gchar *filename, gpointer user_data)
{
if (filename && *filename) {
#ifdef HAVE_CANBERRA
- ca_context_play(ca_gtk_context_get(), 0,
+ ca_context_play (ca_gtk_context_get (), 0,
CA_PROP_MEDIA_FILENAME, filename,
NULL);
#endif
@@ -621,7 +621,7 @@ get_filter_driver (CamelSession *session, const gchar *type, GError **error)
static MailMsgInfo ms_thread_info_dummy = { sizeof (MailMsg) };
-static gpointer ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, guint size)
+static gpointer ms_thread_msg_new (CamelSession *session, CamelSessionThreadOps *ops, guint size)
{
CamelSessionThreadMsg *msg;
CamelSessionClass *session_class;
@@ -632,30 +632,30 @@ static gpointer ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *
/* We create a dummy mail_msg, and then copy its cancellation port over to ours, so
we get cancellation and progress in common with hte existing mail code, for free */
if (msg) {
- MailMsg *m = mail_msg_new(&ms_thread_info_dummy);
+ MailMsg *m = mail_msg_new (&ms_thread_info_dummy);
msg->data = m;
- camel_operation_unref(msg->op);
+ camel_operation_unref (msg->op);
msg->op = m->cancel;
- camel_operation_ref(msg->op);
+ camel_operation_ref (msg->op);
}
return msg;
}
static void
-ms_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *m)
+ms_thread_msg_free (CamelSession *session, CamelSessionThreadMsg *m)
{
CamelSessionClass *session_class;
session_class = CAMEL_SESSION_CLASS (mail_session_parent_class);
- mail_msg_unref(m->data);
- session_class->thread_msg_free(session, m);
+ mail_msg_unref (m->data);
+ session_class->thread_msg_free (session, m);
}
static void
-ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const gchar *text, gint pc)
+ms_thread_status (CamelSession *session, CamelSessionThreadMsg *msg, const gchar *text, gint pc)
{
/* This should never be called since we bypass it in alloc! */
printf("Thread status '%s' %d%%\n", text, pc);
@@ -920,10 +920,10 @@ mail_session_start (void)
if (camel_init (e_get_user_data_dir (), TRUE) != 0)
exit (0);
- camel_provider_init();
+ camel_provider_init ();
session = g_object_new (MAIL_TYPE_SESSION, NULL);
- e_account_writable(NULL, E_ACCOUNT_SOURCE_SAVE_PASSWD); /* Init the EAccount Setup */
+ e_account_writable (NULL, E_ACCOUNT_SOURCE_SAVE_PASSWD); /* Init the EAccount Setup */
camel_session_construct (session, mail_session_get_data_dir ());
@@ -965,9 +965,9 @@ mail_session_add_junk_plugin (const gchar *plugin_name, CamelJunkPlugin *junk_pl
gconf = mail_config_get_gconf_client ();
def_plugin = gconf_client_get_string (gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
- ms->junk_plugins = g_list_append(ms->junk_plugins, junk_plugin);
+ ms->junk_plugins = g_list_append (ms->junk_plugins, junk_plugin);
if (def_plugin && plugin_name) {
- if (!strcmp(def_plugin, plugin_name)) {
+ if (!strcmp (def_plugin, plugin_name)) {
d(printf ("Loading %s as the default junk plugin\n", def_plugin));
session->junk_plugin = junk_plugin;
camel_junk_plugin_init (junk_plugin);
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index fe7557d731..d717c29540 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -121,19 +121,19 @@ mail_tool_get_local_movemail_path (const guchar *uri,
data_dir = mail_session_get_data_dir ();
path = g_build_filename (data_dir, "spool", NULL);
- if (g_stat(path, &st) == -1 && g_mkdir_with_parents(path, 0700) == -1) {
+ if (g_stat (path, &st) == -1 && g_mkdir_with_parents (path, 0700) == -1) {
g_set_error (
error, G_FILE_ERROR,
g_file_error_from_errno (errno),
_("Could not create spool directory '%s': %s"),
- path, g_strerror(errno));
- g_free(path);
+ path, g_strerror (errno));
+ g_free (path);
return NULL;
}
full = g_strdup_printf("%s/movemail.%s", path, safe_uri);
- g_free(path);
- g_free(safe_uri);
+ g_free (path);
+ g_free (safe_uri);
return full;
}
@@ -149,7 +149,7 @@ mail_tool_do_movemail (const gchar *source_url, GError **error)
CamelURL *uri;
gboolean success;
- uri = camel_url_new(source_url, error);
+ uri = camel_url_new (source_url, error);
if (uri == NULL)
return NULL;
@@ -160,7 +160,7 @@ mail_tool_do_movemail (const gchar *source_url, GError **error)
CAMEL_SERVICE_ERROR_URL_INVALID,
_("Trying to movemail a non-mbox source '%s'"),
source_url);
- camel_url_free(uri);
+ camel_url_free (uri);
return NULL;
}
@@ -172,7 +172,7 @@ mail_tool_do_movemail (const gchar *source_url, GError **error)
/* Movemail from source (source_url) to dest_path */
success = camel_movemail (uri->path, dest_path, error) != -1;
- camel_url_free(uri);
+ camel_url_free (uri);
if (g_stat (dest_path, &sb) < 0 || sb.st_size == 0) {
g_unlink (dest_path); /* Clean up the movemail.foo file. */
@@ -202,7 +202,7 @@ mail_tool_generate_forward_subject (CamelMimeMessage *msg)
gchar *fwd_subj;
const gint max_subject_length = 1024;
- subject = camel_mime_message_get_subject(msg);
+ subject = camel_mime_message_get_subject (msg);
if (subject && *subject) {
/* Truncate insanely long subjects */
@@ -240,10 +240,10 @@ mail_tool_remove_xevolution_headers (CamelMimeMessage *message)
for (scan = ((CamelMimePart *)message)->headers;scan;scan=scan->next)
if (!strncmp(scan->name, "X-Evolution", 11))
- camel_header_raw_append(&list, scan->name, scan->value, scan->offset);
+ camel_header_raw_append (&list, scan->name, scan->value, scan->offset);
for (scan=list;scan;scan=scan->next)
- camel_medium_remove_header((CamelMedium *)message, scan->name);
+ camel_medium_remove_header ((CamelMedium *)message, scan->name);
return list;
}
@@ -276,7 +276,7 @@ mail_tool_make_message_attachment (CamelMimeMessage *message)
/* rip off the X-Evolution headers */
xev = mail_tool_remove_xevolution_headers (message);
- camel_header_raw_clear(&xev);
+ camel_header_raw_clear (&xev);
/* remove Bcc headers */
camel_medium_remove_header (CAMEL_MEDIUM (message), "Bcc");
@@ -310,7 +310,7 @@ mail_tool_uri_to_folder (const gchar *uri, guint32 flags, GError **error)
offset = 6;
else if (!strncmp(uri, "email:", 6)) {
/* FIXME?: the filter:get_folder callback should do this itself? */
- curi = em_uri_to_camel(uri);
+ curi = em_uri_to_camel (uri);
if (uri == NULL) {
g_set_error (
error,
@@ -323,7 +323,7 @@ mail_tool_uri_to_folder (const gchar *uri, guint32 flags, GError **error)
url = camel_url_new (uri + offset, error);
if (!url) {
- g_free(curi);
+ g_free (curi);
return NULL;
}
@@ -357,7 +357,7 @@ mail_tool_uri_to_folder (const gchar *uri, guint32 flags, GError **error)
mail_folder_cache_note_folder (mail_folder_cache_get_default (), folder);
camel_url_free (url);
- g_free(curi);
+ g_free (curi);
return folder;
}
@@ -421,16 +421,16 @@ mail_tools_folder_to_url (CamelFolder *folder)
url = camel_url_copy (service->url);
if (service->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
- camel_url_set_fragment(url, full_name);
+ camel_url_set_fragment (url, full_name);
} else {
- gchar *name = g_alloca(strlen(full_name)+2);
+ gchar *name = g_alloca (strlen (full_name)+2);
sprintf(name, "/%s", full_name);
- camel_url_set_path(url, name);
+ camel_url_set_path (url, name);
}
- out = camel_url_to_string(url, CAMEL_URL_HIDE_ALL);
- camel_url_free(url);
+ out = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
+ camel_url_free (url);
return out;
}
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 2275c6eb65..9cb2844bff 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -65,7 +65,7 @@ static GHashTable *vfolder_hash;
loops, and just quit processing if it is set. */
static volatile gint vfolder_shutdown; /* are we shutting down? */
-static void rule_changed(EFilterRule *rule, CamelFolder *folder);
+static void rule_changed (EFilterRule *rule, CamelFolder *folder);
/* ********************************************************************** */
@@ -92,7 +92,7 @@ vfolder_setup_exec (struct _setup_msg *m)
GList *l, *list = NULL;
CamelFolder *folder;
- camel_vee_folder_set_expression((CamelVeeFolder *)m->folder, m->query);
+ camel_vee_folder_set_expression ((CamelVeeFolder *)m->folder, m->query);
l = m->sources_uri;
while (l && !vfolder_shutdown) {
@@ -107,19 +107,19 @@ vfolder_setup_exec (struct _setup_msg *m)
l = m->sources_folder;
while (l && !vfolder_shutdown) {
g_object_ref (l->data);
- list = g_list_append(list, l->data);
+ list = g_list_append (list, l->data);
l = l->next;
}
if (!vfolder_shutdown)
- camel_vee_folder_set_folders((CamelVeeFolder *)m->folder, list);
+ camel_vee_folder_set_folders ((CamelVeeFolder *)m->folder, list);
l = list;
while (l) {
g_object_unref (l->data);
l = l->next;
}
- g_list_free(list);
+ g_list_free (list);
}
static void
@@ -133,21 +133,21 @@ vfolder_setup_free (struct _setup_msg *m)
GList *l;
g_object_unref (m->folder);
- g_free(m->query);
+ g_free (m->query);
l = m->sources_uri;
while (l) {
- g_free(l->data);
+ g_free (l->data);
l = l->next;
}
- g_list_free(m->sources_uri);
+ g_list_free (m->sources_uri);
l = m->sources_folder;
while (l) {
g_object_unref (l->data);
l = l->next;
}
- g_list_free(m->sources_folder);
+ g_list_free (m->sources_folder);
}
static MailMsgInfo vfolder_setup_info = {
@@ -160,15 +160,15 @@ static MailMsgInfo vfolder_setup_info = {
/* sources_uri should be camel uri's */
static gint
-vfolder_setup(CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder)
+vfolder_setup (CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder)
{
struct _setup_msg *m;
gint id;
- m = mail_msg_new(&vfolder_setup_info);
+ m = mail_msg_new (&vfolder_setup_info);
m->folder = folder;
g_object_ref (folder);
- m->query = g_strdup(query);
+ m->query = g_strdup (query);
m->sources_uri = sources_uri;
m->sources_folder = sources_folder;
@@ -195,9 +195,9 @@ vfolder_adduri_desc (struct _adduri_msg *m)
/* Yuck yuck. Lookup the account name and use that to describe the path */
/* We really need to normalise this across all of camel and evolution :-/ */
- euri = em_uri_from_camel(m->uri);
+ euri = em_uri_from_camel (m->uri);
if (euri) {
- CamelURL *url = camel_url_new(euri, NULL);
+ CamelURL *url = camel_url_new (euri, NULL);
if (url) {
const gchar *loc = NULL;
@@ -210,21 +210,21 @@ vfolder_adduri_desc (struct _adduri_msg *m)
const EAccount *account;
if (url->user == NULL)
- uid = g_strdup(url->host);
+ uid = g_strdup (url->host);
else
uid = g_strdup_printf("%s@%s", url->user, url->host);
account = e_get_account_by_uid (uid);
- g_free(uid);
+ g_free (uid);
if (account != NULL)
loc = account->name;
}
if (loc && url->path)
desc = g_strdup_printf(_("Updating Search Folders for '%s:%s'"), loc, url->path);
- camel_url_free(url);
+ camel_url_free (url);
}
- g_free(euri);
+ g_free (euri);
}
if (desc == NULL)
@@ -247,7 +247,7 @@ vfolder_adduri_exec (struct _adduri_msg *m)
/* we dont try lookup the cache if we are removing it, its no longer there */
if (!m->remove &&
- !mail_folder_cache_get_folder_from_uri(mail_folder_cache_get_default (),
+ !mail_folder_cache_get_folder_from_uri (mail_folder_cache_get_default (),
m->uri, &folder)) {
g_warning("Folder '%s' disappeared while I was adding/remove it to/from my vfolder", m->uri);
return;
@@ -260,9 +260,9 @@ vfolder_adduri_exec (struct _adduri_msg *m)
l = m->folders;
while (l && !vfolder_shutdown) {
if (m->remove)
- camel_vee_folder_remove_folder((CamelVeeFolder *)l->data, folder);
+ camel_vee_folder_remove_folder ((CamelVeeFolder *)l->data, folder);
else
- camel_vee_folder_add_folder((CamelVeeFolder *)l->data, folder);
+ camel_vee_folder_add_folder ((CamelVeeFolder *)l->data, folder);
l = l->next;
}
g_object_unref (folder);
@@ -270,16 +270,16 @@ vfolder_adduri_exec (struct _adduri_msg *m)
}
static void
-vfolder_adduri_done(struct _adduri_msg *m)
+vfolder_adduri_done (struct _adduri_msg *m)
{
}
static void
vfolder_adduri_free (struct _adduri_msg *m)
{
- g_list_foreach(m->folders, (GFunc)g_object_unref, NULL);
- g_list_free(m->folders);
- g_free(m->uri);
+ g_list_foreach (m->folders, (GFunc)g_object_unref, NULL);
+ g_list_free (m->folders);
+ g_free (m->uri);
}
static MailMsgInfo vfolder_adduri_info = {
@@ -292,14 +292,14 @@ static MailMsgInfo vfolder_adduri_info = {
/* uri should be a camel uri */
static gint
-vfolder_adduri(const gchar *uri, GList *folders, gint remove)
+vfolder_adduri (const gchar *uri, GList *folders, gint remove)
{
struct _adduri_msg *m;
gint id;
- m = mail_msg_new(&vfolder_adduri_info);
+ m = mail_msg_new (&vfolder_adduri_info);
m->folders = folders;
- m->uri = g_strdup(uri);
+ m->uri = g_strdup (uri);
m->remove = remove;
id = m->base.seq;
@@ -311,10 +311,10 @@ vfolder_adduri(const gchar *uri, GList *folders, gint remove)
/* ********************************************************************** */
static GList *
-mv_find_folder(GList *l, CamelStore *store, const gchar *uri)
+mv_find_folder (GList *l, CamelStore *store, const gchar *uri)
{
while (l) {
- if (camel_store_folder_uri_equal(store, l->data, uri))
+ if (camel_store_folder_uri_equal (store, l->data, uri))
break;
l = l->next;
}
@@ -323,7 +323,7 @@ mv_find_folder(GList *l, CamelStore *store, const gchar *uri)
/* uri is a camel uri */
static gint
-uri_is_ignore(CamelStore *store, const gchar *uri)
+uri_is_ignore (CamelStore *store, const gchar *uri)
{
EAccountList *accounts;
EAccount *account;
@@ -342,9 +342,9 @@ uri_is_ignore(CamelStore *store, const gchar *uri)
local_sent_uri,
local_drafts_uri));
- found = camel_store_folder_uri_equal(store, local_outbox_uri, uri)
- || camel_store_folder_uri_equal(store, local_sent_uri, uri)
- || camel_store_folder_uri_equal(store, local_drafts_uri, uri);
+ found = camel_store_folder_uri_equal (store, local_outbox_uri, uri)
+ || camel_store_folder_uri_equal (store, local_sent_uri, uri)
+ || camel_store_folder_uri_equal (store, local_drafts_uri, uri);
if (found)
return found;
@@ -360,14 +360,14 @@ uri_is_ignore(CamelStore *store, const gchar *uri)
account->sent_folder_uri ? account->sent_folder_uri : "empty", uri));
if (account->sent_folder_uri) {
- curi = em_uri_to_camel(account->sent_folder_uri);
- found = camel_store_folder_uri_equal(store, uri, curi);
- g_free(curi);
+ curi = em_uri_to_camel (account->sent_folder_uri);
+ found = camel_store_folder_uri_equal (store, uri, curi);
+ g_free (curi);
}
if (!found && account->drafts_folder_uri) {
- curi = em_uri_to_camel(account->drafts_folder_uri);
- found = camel_store_folder_uri_equal(store, uri, curi);
- g_free(curi);
+ curi = em_uri_to_camel (account->drafts_folder_uri);
+ found = camel_store_folder_uri_equal (store, uri, curi);
+ g_free (curi);
}
if (found)
@@ -383,7 +383,7 @@ uri_is_ignore(CamelStore *store, const gchar *uri)
/* so special we never use it */
static gint
-uri_is_spethal(CamelStore *store, const gchar *uri)
+uri_is_spethal (CamelStore *store, const gchar *uri)
{
CamelURL *url;
gint res;
@@ -393,16 +393,16 @@ uri_is_spethal(CamelStore *store, const gchar *uri)
if ((store->flags & (CAMEL_STORE_VTRASH|CAMEL_STORE_VJUNK)) == 0)
return FALSE;
- url = camel_url_new(uri, NULL);
+ url = camel_url_new (uri, NULL);
if (url == NULL)
return TRUE;
/* don't use strcasecmp here */
if (url->fragment) {
res = (((store->flags & CAMEL_STORE_VTRASH)
- && strcmp(url->fragment, CAMEL_VTRASH_NAME) == 0)
+ && strcmp (url->fragment, CAMEL_VTRASH_NAME) == 0)
|| ((store->flags & CAMEL_STORE_VJUNK)
- && strcmp(url->fragment, CAMEL_VJUNK_NAME) == 0));
+ && strcmp (url->fragment, CAMEL_VJUNK_NAME) == 0));
} else {
res = url->path
&& (((store->flags & CAMEL_STORE_VTRASH)
@@ -411,7 +411,7 @@ uri_is_spethal(CamelStore *store, const gchar *uri)
&& strcmp(url->path, "/" CAMEL_VJUNK_NAME) == 0));
}
- camel_url_free(url);
+ camel_url_free (url);
return res;
}
@@ -434,7 +434,7 @@ uri_is_spethal(CamelStore *store, const gchar *uri)
* NOTE: This function must be called from the main thread.
*/
static void
-mail_vfolder_add_uri(CamelStore *store, const gchar *curi, gint remove)
+mail_vfolder_add_uri (CamelStore *store, const gchar *curi, gint remove)
{
EFilterRule *rule;
const gchar *source;
@@ -444,43 +444,43 @@ mail_vfolder_add_uri(CamelStore *store, const gchar *curi, gint remove)
gint is_ignore;
gchar *uri;
- uri = em_uri_from_camel(curi);
+ uri = em_uri_from_camel (curi);
if (uri_is_spethal (store, curi)) {
- g_free(uri);
+ g_free (uri);
return;
}
- g_return_if_fail (mail_in_main_thread());
+ g_return_if_fail (mail_in_main_thread ());
- is_ignore = uri_is_ignore(store, curi);
+ is_ignore = uri_is_ignore (store, curi);
G_LOCK (vfolder);
/* d(printf("%s uri to check: %s\n", remove?"Removing":"Adding", uri)); */
/* maintain the source folders lists for changed rules later on */
- if (CAMEL_IS_VEE_STORE(store)) {
+ if (CAMEL_IS_VEE_STORE (store)) {
is_ignore = TRUE;
} else if (remove) {
if (remote) {
- if ((link = mv_find_folder(source_folders_remote, store, curi)) != NULL) {
- g_free(link->data);
- source_folders_remote = g_list_remove_link(source_folders_remote, link);
+ if ((link = mv_find_folder (source_folders_remote, store, curi)) != NULL) {
+ g_free (link->data);
+ source_folders_remote = g_list_remove_link (source_folders_remote, link);
}
} else {
- if ((link = mv_find_folder(source_folders_local, store, curi)) != NULL) {
- g_free(link->data);
- source_folders_local = g_list_remove_link(source_folders_local, link);
+ if ((link = mv_find_folder (source_folders_local, store, curi)) != NULL) {
+ g_free (link->data);
+ source_folders_local = g_list_remove_link (source_folders_local, link);
}
}
} else if (!is_ignore) {
/* we ignore drafts/sent/outbox here */
if (remote) {
- if (mv_find_folder(source_folders_remote, store, curi) == NULL)
- source_folders_remote = g_list_prepend(source_folders_remote, g_strdup(curi));
+ if (mv_find_folder (source_folders_remote, store, curi) == NULL)
+ source_folders_remote = g_list_prepend (source_folders_remote, g_strdup (curi));
} else {
- if (mv_find_folder(source_folders_local, store, curi) == NULL)
- source_folders_local = g_list_prepend(source_folders_local, g_strdup(curi));
+ if (mv_find_folder (source_folders_local, store, curi) == NULL)
+ source_folders_local = g_list_prepend (source_folders_local, g_strdup (curi));
}
}
@@ -488,7 +488,7 @@ mail_vfolder_add_uri(CamelStore *store, const gchar *curi, gint remove)
goto done;
rule = NULL;
- while ((rule = e_rule_context_next_rule((ERuleContext *)context, rule, NULL))) {
+ while ((rule = e_rule_context_next_rule ((ERuleContext *)context, rule, NULL))) {
gint found = FALSE;
if (!rule->name) {
@@ -504,22 +504,22 @@ mail_vfolder_add_uri(CamelStore *store, const gchar *curi, gint remove)
found = TRUE;
source = NULL;
- while (!found && (source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source))) {
+ while (!found && (source = em_vfolder_rule_next_source ((EMVFolderRule *)rule, source))) {
gchar *csource;
- csource = em_uri_to_camel(source);
- found = camel_store_folder_uri_equal(store, curi, csource);
+ csource = em_uri_to_camel (source);
+ found = camel_store_folder_uri_equal (store, curi, csource);
d(printf(found?" '%s' == '%s'?\n":" '%s' != '%s'\n", curi, csource));
- g_free(csource);
+ g_free (csource);
}
if (found) {
- vf = g_hash_table_lookup(vfolder_hash, rule->name);
+ vf = g_hash_table_lookup (vfolder_hash, rule->name);
if (!vf) {
g_warning ("vf is NULL for %s\n", rule->name);
continue;
}
g_object_ref (vf);
- folders = g_list_prepend(folders, vf);
+ folders = g_list_prepend (folders, vf);
}
}
@@ -527,9 +527,9 @@ done:
G_UNLOCK (vfolder);
if (folders != NULL)
- vfolder_adduri(curi, folders, remove);
+ vfolder_adduri (curi, folders, remove);
- g_free(uri);
+ g_free (uri);
}
/**
@@ -580,7 +580,7 @@ mail_vfolder_notify_uri_unavailable (CamelStore *store, const gchar *uri)
* NOTE: This function must be called from the main thread.
*/
static void
-mail_vfolder_delete_uri(CamelStore *store, const gchar *curi)
+mail_vfolder_delete_uri (CamelStore *store, const gchar *curi)
{
EFilterRule *rule;
const gchar *source;
@@ -593,11 +593,11 @@ mail_vfolder_delete_uri(CamelStore *store, const gchar *curi)
if (uri_is_spethal (store, curi))
return;
- uri = em_uri_from_camel(curi);
+ uri = em_uri_from_camel (curi);
d(printf ("Deleting uri to check: %s\n", uri));
- g_return_if_fail (mail_in_main_thread());
+ g_return_if_fail (mail_in_main_thread ());
changed_count = 0;
changed = g_string_new ("");
@@ -618,11 +618,11 @@ mail_vfolder_delete_uri(CamelStore *store, const gchar *curi)
source = NULL;
while ((source = em_vfolder_rule_next_source ((EMVFolderRule *) rule, source))) {
- gchar *csource = em_uri_to_camel(source);
+ gchar *csource = em_uri_to_camel (source);
/* Remove all sources that match, ignore changed events though
because the adduri call above does the work async */
- if (camel_store_folder_uri_equal(store, curi, csource)) {
+ if (camel_store_folder_uri_equal (store, curi, csource)) {
vf = g_hash_table_lookup (vfolder_hash, rule->name);
if (!vf) {
g_warning ("vf is NULL for %s\n", rule->name);
@@ -644,19 +644,19 @@ mail_vfolder_delete_uri(CamelStore *store, const gchar *curi)
changed_count++;
source = NULL;
}
- g_free(csource);
+ g_free (csource);
}
}
done:
- if ((link = mv_find_folder(source_folders_remote, store, curi)) != NULL) {
- g_free(link->data);
- source_folders_remote = g_list_remove_link(source_folders_remote, link);
+ if ((link = mv_find_folder (source_folders_remote, store, curi)) != NULL) {
+ g_free (link->data);
+ source_folders_remote = g_list_remove_link (source_folders_remote, link);
}
- if ((link = mv_find_folder(source_folders_local, store, curi)) != NULL) {
- g_free(link->data);
- source_folders_local = g_list_remove_link(source_folders_local, link);
+ if ((link = mv_find_folder (source_folders_local, store, curi)) != NULL) {
+ g_free (link->data);
+ source_folders_local = g_list_remove_link (source_folders_local, link);
}
G_UNLOCK (vfolder);
@@ -689,12 +689,12 @@ done:
g_string_free (changed, TRUE);
- g_free(uri);
+ g_free (uri);
}
/* called when a uri is renamed in a store */
static void
-mail_vfolder_rename_uri(CamelStore *store, const gchar *cfrom, const gchar *cto)
+mail_vfolder_rename_uri (CamelStore *store, const gchar *cfrom, const gchar *cto)
{
EFilterRule *rule;
const gchar *source;
@@ -704,41 +704,41 @@ mail_vfolder_rename_uri(CamelStore *store, const gchar *cfrom, const gchar *cto)
d(printf("vfolder rename uri: %s to %s\n", cfrom, cto));
- if (context == NULL || uri_is_spethal(store, cfrom) || uri_is_spethal(store, cto))
+ if (context == NULL || uri_is_spethal (store, cfrom) || uri_is_spethal (store, cto))
return;
- g_return_if_fail (mail_in_main_thread());
+ g_return_if_fail (mail_in_main_thread ());
- from = em_uri_from_camel(cfrom);
- to = em_uri_from_camel(cto);
+ from = em_uri_from_camel (cfrom);
+ to = em_uri_from_camel (cto);
G_LOCK (vfolder);
/* see if any rules directly reference this removed uri */
rule = NULL;
- while ((rule = e_rule_context_next_rule((ERuleContext *)context, rule, NULL))) {
+ while ((rule = e_rule_context_next_rule ((ERuleContext *)context, rule, NULL))) {
source = NULL;
- while ((source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source))) {
- gchar *csource = em_uri_to_camel(source);
+ while ((source = em_vfolder_rule_next_source ((EMVFolderRule *)rule, source))) {
+ gchar *csource = em_uri_to_camel (source);
/* Remove all sources that match, ignore changed events though
because the adduri call above does the work async */
- if (camel_store_folder_uri_equal(store, cfrom, csource)) {
+ if (camel_store_folder_uri_equal (store, cfrom, csource)) {
d(printf("Vfolder '%s' used '%s' ('%s') now uses '%s'\n", rule->name, source, from, to));
- vf = g_hash_table_lookup(vfolder_hash, rule->name);
+ vf = g_hash_table_lookup (vfolder_hash, rule->name);
if (!vf) {
g_warning ("vf is NULL for %s\n", rule->name);
continue;
}
- g_signal_handlers_disconnect_matched(rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
+ g_signal_handlers_disconnect_matched (rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
0, NULL, rule_changed, vf);
- em_vfolder_rule_remove_source((EMVFolderRule *)rule, source);
- em_vfolder_rule_add_source((EMVFolderRule *)rule, to);
+ em_vfolder_rule_remove_source ((EMVFolderRule *)rule, source);
+ em_vfolder_rule_add_source ((EMVFolderRule *)rule, to);
g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), vf);
changed++;
source = NULL;
}
- g_free(csource);
+ g_free (csource);
}
}
@@ -751,12 +751,12 @@ mail_vfolder_rename_uri(CamelStore *store, const gchar *cfrom, const gchar *cto)
d(printf("Vfolders updated from renamed folder\n"));
config_dir = mail_session_get_config_dir ();
user = g_build_filename (config_dir, "vfolders.xml", NULL);
- e_rule_context_save((ERuleContext *)context, user);
- g_free(user);
+ e_rule_context_save ((ERuleContext *)context, user);
+ g_free (user);
}
- g_free(from);
- g_free(to);
+ g_free (from);
+ g_free (to);
}
GList *
@@ -773,26 +773,26 @@ mail_vfolder_get_sources_remote (void)
/* ********************************************************************** */
-static void context_rule_added(ERuleContext *ctx, EFilterRule *rule);
+static void context_rule_added (ERuleContext *ctx, EFilterRule *rule);
static void
-rule_add_sources(GList *l, GList **sources_folderp, GList **sources_urip)
+rule_add_sources (GList *l, GList **sources_folderp, GList **sources_urip)
{
GList *sources_folder = *sources_folderp;
GList *sources_uri = *sources_urip;
CamelFolder *newfolder;
while (l) {
- gchar *curi = em_uri_to_camel(l->data);
+ gchar *curi = em_uri_to_camel (l->data);
if (mail_folder_cache_get_folder_from_uri
(mail_folder_cache_get_default (), curi, &newfolder)) {
if (newfolder)
- sources_folder = g_list_append(sources_folder, newfolder);
+ sources_folder = g_list_append (sources_folder, newfolder);
else
- sources_uri = g_list_append(sources_uri, g_strdup(curi));
+ sources_uri = g_list_append (sources_uri, g_strdup (curi));
}
- g_free(curi);
+ g_free (curi);
l = l->next;
}
@@ -801,7 +801,7 @@ rule_add_sources(GList *l, GList **sources_folderp, GList **sources_urip)
}
static void
-rule_changed(EFilterRule *rule, CamelFolder *folder)
+rule_changed (EFilterRule *rule, CamelFolder *folder)
{
GList *sources_uri = NULL, *sources_folder = NULL;
GString *query;
@@ -821,7 +821,7 @@ rule_changed(EFilterRule *rule, CamelFolder *folder)
if (g_hash_table_lookup_extended (vfolder_hash, full_name, &key, &oldfolder)) {
g_hash_table_remove (vfolder_hash, key);
g_free (key);
- g_hash_table_insert (vfolder_hash, g_strdup(rule->name), folder);
+ g_hash_table_insert (vfolder_hash, g_strdup (rule->name), folder);
G_UNLOCK (vfolder);
} else {
G_UNLOCK (vfolder);
@@ -829,50 +829,50 @@ rule_changed(EFilterRule *rule, CamelFolder *folder)
}
oldname = g_strdup (full_name);
- camel_store_rename_folder(vfolder_store, oldname, rule->name, NULL);
- g_free(oldname);
+ camel_store_rename_folder (vfolder_store, oldname, rule->name, NULL);
+ g_free (oldname);
}
d(printf("Filter rule changed? for folder '%s'!!\n", folder->name));
/* find any (currently available) folders, and add them to the ones to open */
- rule_add_sources(((EMVFolderRule *)rule)->sources, &sources_folder, &sources_uri);
+ rule_add_sources (((EMVFolderRule *)rule)->sources, &sources_folder, &sources_uri);
G_LOCK (vfolder);
if (((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL || ((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)
- rule_add_sources(source_folders_local, &sources_folder, &sources_uri);
+ rule_add_sources (source_folders_local, &sources_folder, &sources_uri);
if (((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_REMOTE_ACTIVE || ((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)
- rule_add_sources(source_folders_remote, &sources_folder, &sources_uri);
+ rule_add_sources (source_folders_remote, &sources_folder, &sources_uri);
G_UNLOCK (vfolder);
query = g_string_new("");
- e_filter_rule_build_code(rule, query);
+ e_filter_rule_build_code (rule, query);
- vfolder_setup(folder, query->str, sources_uri, sources_folder);
+ vfolder_setup (folder, query->str, sources_uri, sources_folder);
- g_string_free(query, TRUE);
+ g_string_free (query, TRUE);
}
-static void context_rule_added(ERuleContext *ctx, EFilterRule *rule)
+static void context_rule_added (ERuleContext *ctx, EFilterRule *rule)
{
CamelFolder *folder;
d(printf("rule added: %s\n", rule->name));
/* this always runs quickly */
- folder = camel_store_get_folder(vfolder_store, rule->name, 0, NULL);
+ folder = camel_store_get_folder (vfolder_store, rule->name, 0, NULL);
if (folder) {
g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), folder);
G_LOCK (vfolder);
- g_hash_table_insert(vfolder_hash, g_strdup(rule->name), folder);
+ g_hash_table_insert (vfolder_hash, g_strdup (rule->name), folder);
G_UNLOCK (vfolder);
- rule_changed(rule, folder);
+ rule_changed (rule, folder);
}
}
-static void context_rule_removed(ERuleContext *ctx, EFilterRule *rule)
+static void context_rule_removed (ERuleContext *ctx, EFilterRule *rule)
{
gpointer key, folder = NULL;
@@ -887,7 +887,7 @@ static void context_rule_removed(ERuleContext *ctx, EFilterRule *rule)
}
G_UNLOCK (vfolder);
- camel_store_delete_folder(vfolder_store, rule->name, NULL);
+ camel_store_delete_folder (vfolder_store, rule->name, NULL);
/* this must be unref'd after its deleted */
if (folder)
g_object_unref ((CamelFolder *) folder);
@@ -908,21 +908,21 @@ store_folder_deleted_cb (CamelStore *store,
G_LOCK (vfolder);
/* delete it from our list */
- rule = e_rule_context_find_rule((ERuleContext *)context, info->full_name, NULL);
+ rule = e_rule_context_find_rule ((ERuleContext *)context, info->full_name, NULL);
if (rule) {
const gchar *config_dir;
/* We need to stop listening to removed events, otherwise we'll try and remove it again */
- g_signal_handlers_disconnect_matched(context, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
+ g_signal_handlers_disconnect_matched (context, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
0, NULL, context_rule_removed, context);
- e_rule_context_remove_rule((ERuleContext *)context, rule);
- g_object_unref(rule);
+ e_rule_context_remove_rule ((ERuleContext *)context, rule);
+ g_object_unref (rule);
g_signal_connect(context, "rule_removed", G_CALLBACK(context_rule_removed), context);
config_dir = mail_session_get_config_dir ();
user = g_build_filename (config_dir, "vfolders.xml", NULL);
- e_rule_context_save((ERuleContext *)context, user);
- g_free(user);
+ e_rule_context_save ((ERuleContext *)context, user);
+ g_free (user);
} else {
g_warning("Cannot find rule for deleted vfolder '%s'", info->name);
}
@@ -952,24 +952,24 @@ store_folder_renamed_cb (CamelStore *store,
g_hash_table_remove (vfolder_hash, key);
g_free (key);
- g_hash_table_insert (vfolder_hash, g_strdup(info->full_name), folder);
+ g_hash_table_insert (vfolder_hash, g_strdup (info->full_name), folder);
- rule = e_rule_context_find_rule((ERuleContext *)context, old_name, NULL);
+ rule = e_rule_context_find_rule ((ERuleContext *)context, old_name, NULL);
if (!rule) {
G_UNLOCK (vfolder);
g_warning ("Rule shouldn't be NULL\n");
return;
}
- g_signal_handlers_disconnect_matched(rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
+ g_signal_handlers_disconnect_matched (rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
0, NULL, rule_changed, folder);
- e_filter_rule_set_name(rule, info->full_name);
+ e_filter_rule_set_name (rule, info->full_name);
g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), folder);
config_dir = mail_session_get_config_dir ();
user = g_build_filename (config_dir, "vfolders.xml", NULL);
- e_rule_context_save((ERuleContext *)context, user);
- g_free(user);
+ e_rule_context_save ((ERuleContext *)context, user);
+ g_free (user);
G_UNLOCK (vfolder);
} else {
@@ -1003,7 +1003,7 @@ folder_renamed_cb (MailFolderCache *cache, CamelStore *store, const gchar *oldur
}
void
-vfolder_load_storage(void)
+vfolder_load_storage (void)
{
/* lock for loading storage, it is safe to call it more than once */
G_LOCK_DEFINE_STATIC (vfolder_hash);
@@ -1023,7 +1023,7 @@ vfolder_load_storage(void)
return;
}
- vfolder_hash = g_hash_table_new(g_str_hash, g_str_equal);
+ vfolder_hash = g_hash_table_new (g_str_hash, g_str_equal);
G_UNLOCK (vfolder_hash);
@@ -1032,7 +1032,7 @@ vfolder_load_storage(void)
/* first, create the vfolder store, and set it up */
storeuri = g_strdup_printf("vfolder:%s/vfolder", data_dir);
- vfolder_store = camel_session_get_store(session, storeuri, NULL);
+ vfolder_store = camel_session_get_store (session, storeuri, NULL);
if (vfolder_store == NULL) {
g_warning("Cannot open vfolder store - no vfolders available");
return;
@@ -1068,19 +1068,19 @@ vfolder_load_storage(void)
/* and setup the rules we have */
rule = NULL;
- while ((rule = e_rule_context_next_rule((ERuleContext *)context, rule, NULL))) {
+ while ((rule = e_rule_context_next_rule ((ERuleContext *)context, rule, NULL))) {
if (rule->name) {
d(printf("rule added: %s\n", rule->name));
- context_rule_added((ERuleContext *)context, rule);
+ context_rule_added ((ERuleContext *)context, rule);
} else {
d(printf("invalid rule (%p) encountered: rule->name is NULL\n", rule));
}
}
- g_free(storeuri);
+ g_free (storeuri);
/* reenable the feature if required */
- gconf = mail_config_get_gconf_client();
+ gconf = mail_config_get_gconf_client ();
if (!gconf_client_get_bool (gconf, "/apps/evolution/mail/display/enable_vfolders", NULL))
gconf_client_set_bool (gconf, "/apps/evolution/mail/display/enable_vfolders", TRUE, NULL);
@@ -1095,7 +1095,7 @@ vfolder_load_storage(void)
}
void
-vfolder_revert(void)
+vfolder_revert (void)
{
const gchar *config_dir;
gchar *user;
@@ -1103,8 +1103,8 @@ vfolder_revert(void)
d(printf("vfolder_revert\n"));
config_dir = mail_session_get_config_dir ();
user = g_build_filename (config_dir, "vfolders.xml", NULL);
- e_rule_context_revert((ERuleContext *)context, user);
- g_free(user);
+ e_rule_context_revert ((ERuleContext *)context, user);
+ g_free (user);
}
void
@@ -1146,7 +1146,7 @@ vfolder_edit (EShellView *shell_view)
}
static void
-edit_rule_response(GtkWidget *w, gint button, gpointer data)
+edit_rule_response (GtkWidget *w, gint button, gpointer data)
{
if (button == GTK_RESPONSE_OK) {
const gchar *config_dir;
@@ -1154,18 +1154,18 @@ edit_rule_response(GtkWidget *w, gint button, gpointer data)
EFilterRule *rule = g_object_get_data (G_OBJECT (w), "rule");
EFilterRule *orig = g_object_get_data (G_OBJECT (w), "orig");
- e_filter_rule_copy(orig, rule);
+ e_filter_rule_copy (orig, rule);
config_dir = mail_session_get_config_dir ();
user = g_build_filename (config_dir, "vfolders.xml", NULL);
- e_rule_context_save((ERuleContext *)context, user);
- g_free(user);
+ e_rule_context_save ((ERuleContext *)context, user);
+ g_free (user);
}
- gtk_widget_destroy(w);
+ gtk_widget_destroy (w);
}
void
-vfolder_edit_rule(const gchar *uri)
+vfolder_edit_rule (const gchar *uri)
{
GtkWidget *w;
GtkDialog *gd;
@@ -1173,15 +1173,15 @@ vfolder_edit_rule(const gchar *uri)
EFilterRule *rule, *newrule;
CamelURL *url;
- url = camel_url_new(uri, NULL);
+ url = camel_url_new (uri, NULL);
if (url && url->fragment
- && (rule = e_rule_context_find_rule((ERuleContext *)context, url->fragment, NULL))) {
- g_object_ref((GtkObject *)rule);
- newrule = e_filter_rule_clone(rule);
+ && (rule = e_rule_context_find_rule ((ERuleContext *)context, url->fragment, NULL))) {
+ g_object_ref ((GtkObject *)rule);
+ newrule = e_filter_rule_clone (rule);
- w = e_filter_rule_get_widget((EFilterRule *)newrule, (ERuleContext *)context);
+ w = e_filter_rule_get_widget ((EFilterRule *)newrule, (ERuleContext *)context);
- gd = (GtkDialog *)gtk_dialog_new_with_buttons(
+ gd = (GtkDialog *)gtk_dialog_new_with_buttons (
_("Edit Search Folder"), NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -1192,15 +1192,15 @@ vfolder_edit_rule(const gchar *uri)
container = gtk_dialog_get_content_area (gd);
gtk_box_set_spacing (GTK_BOX (container), 6);
- gtk_dialog_set_default_response(gd, GTK_RESPONSE_OK);
+ gtk_dialog_set_default_response (gd, GTK_RESPONSE_OK);
g_object_set(gd, "allow_shrink", FALSE, "allow_grow", TRUE, NULL);
gtk_window_set_default_size (GTK_WINDOW (gd), 500, 500);
gtk_box_pack_start (GTK_BOX (container), w, TRUE, TRUE, 0);
- gtk_widget_show((GtkWidget *)gd);
+ gtk_widget_show ((GtkWidget *)gd);
g_object_set_data_full(G_OBJECT(gd), "rule", newrule, (GDestroyNotify)g_object_unref);
g_object_set_data_full(G_OBJECT(gd), "orig", rule, (GDestroyNotify)g_object_unref);
g_signal_connect(gd, "response", G_CALLBACK(edit_rule_response), NULL);
- gtk_widget_show((GtkWidget *)gd);
+ gtk_widget_show ((GtkWidget *)gd);
} else {
GtkWidget *w;
@@ -1210,11 +1210,11 @@ vfolder_edit_rule(const gchar *uri)
}
if (url)
- camel_url_free(url);
+ camel_url_free (url);
}
static void
-new_rule_clicked(GtkWidget *w, gint button, gpointer data)
+new_rule_clicked (GtkWidget *w, gint button, gpointer data)
{
if (button == GTK_RESPONSE_OK) {
const gchar *config_dir;
@@ -1233,15 +1233,15 @@ new_rule_clicked(GtkWidget *w, gint button, gpointer data)
return;
}
- g_object_ref(rule);
- e_rule_context_add_rule((ERuleContext *)context, rule);
+ g_object_ref (rule);
+ e_rule_context_add_rule ((ERuleContext *)context, rule);
config_dir = mail_session_get_config_dir ();
user = g_build_filename (config_dir, "vfolders.xml", NULL);
- e_rule_context_save((ERuleContext *)context, user);
- g_free(user);
+ e_rule_context_save ((ERuleContext *)context, user);
+ g_free (user);
}
- gtk_widget_destroy(w);
+ gtk_widget_destroy (w);
}
static void
@@ -1254,28 +1254,28 @@ new_rule_changed_cb (EFilterRule *rule, GtkDialog *dialog)
}
EFilterPart *
-vfolder_create_part(const gchar *name)
+vfolder_create_part (const gchar *name)
{
- return e_rule_context_create_part((ERuleContext *)context, name);
+ return e_rule_context_create_part ((ERuleContext *)context, name);
}
/* clones a filter/search rule into a matching vfolder rule (assuming the same system definitions) */
EFilterRule *
-vfolder_clone_rule(EFilterRule *in)
+vfolder_clone_rule (EFilterRule *in)
{
- EFilterRule *rule = (EFilterRule *)em_vfolder_rule_new();
+ EFilterRule *rule = (EFilterRule *)em_vfolder_rule_new ();
xmlNodePtr xml;
- xml = e_filter_rule_xml_encode(in);
- e_filter_rule_xml_decode(rule, xml, (ERuleContext *)context);
- xmlFreeNodeList(xml);
+ xml = e_filter_rule_xml_encode (in);
+ e_filter_rule_xml_decode (rule, xml, (ERuleContext *)context);
+ xmlFreeNodeList (xml);
return rule;
}
/* adds a rule with a gui */
void
-vfolder_gui_add_rule(EMVFolderRule *rule)
+vfolder_gui_add_rule (EMVFolderRule *rule)
{
GtkWidget *w;
GtkDialog *gd;
@@ -1284,7 +1284,7 @@ vfolder_gui_add_rule(EMVFolderRule *rule)
/* this should be done before we call this function */
vfolder_load_storage ();
- w = e_filter_rule_get_widget((EFilterRule *)rule, (ERuleContext *)context);
+ w = e_filter_rule_get_widget ((EFilterRule *)rule, (ERuleContext *)context);
gd = (GtkDialog *)gtk_dialog_new_with_buttons (
_("New Search Folder"),
@@ -1293,7 +1293,7 @@ vfolder_gui_add_rule(EMVFolderRule *rule)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
- gtk_dialog_set_default_response(gd, GTK_RESPONSE_OK);
+ gtk_dialog_set_default_response (gd, GTK_RESPONSE_OK);
gtk_container_set_border_width (GTK_CONTAINER (gd), 6);
container = gtk_dialog_get_content_area (gd);
@@ -1301,17 +1301,17 @@ vfolder_gui_add_rule(EMVFolderRule *rule)
g_object_set(gd, "allow_shrink", FALSE, "allow_grow", TRUE, NULL);
gtk_window_set_default_size (GTK_WINDOW (gd), 500, 500);
- gtk_box_pack_start(GTK_BOX (container), w, TRUE, TRUE, 0);
- gtk_widget_show((GtkWidget *)gd);
+ gtk_box_pack_start (GTK_BOX (container), w, TRUE, TRUE, 0);
+ gtk_widget_show ((GtkWidget *)gd);
g_object_set_data_full(G_OBJECT(gd), "rule", rule, (GDestroyNotify)g_object_unref);
g_signal_connect(rule, "changed", G_CALLBACK (new_rule_changed_cb), gd);
new_rule_changed_cb ((EFilterRule*)rule, gd);
g_signal_connect(gd, "response", G_CALLBACK(new_rule_clicked), NULL);
- gtk_widget_show((GtkWidget *)gd);
+ gtk_widget_show ((GtkWidget *)gd);
}
void
-vfolder_gui_add_from_message(CamelMimeMessage *msg, gint flags, const gchar *source)
+vfolder_gui_add_from_message (CamelMimeMessage *msg, gint flags, const gchar *source)
{
EMVFolderRule *rule;
@@ -1320,12 +1320,12 @@ vfolder_gui_add_from_message(CamelMimeMessage *msg, gint flags, const gchar *sou
/* ensures vfolder is running */
vfolder_load_storage ();
- rule = (EMVFolderRule*)em_vfolder_rule_from_message(context, msg, flags, source);
- vfolder_gui_add_rule(rule);
+ rule = (EMVFolderRule*)em_vfolder_rule_from_message (context, msg, flags, source);
+ vfolder_gui_add_rule (rule);
}
void
-vfolder_gui_add_from_address(CamelInternetAddress *addr, gint flags, const gchar *source)
+vfolder_gui_add_from_address (CamelInternetAddress *addr, gint flags, const gchar *source)
{
EMVFolderRule *rule;
@@ -1334,8 +1334,8 @@ vfolder_gui_add_from_address(CamelInternetAddress *addr, gint flags, const gchar
/* ensures vfolder is running */
vfolder_load_storage ();
- rule = (EMVFolderRule*)em_vfolder_rule_from_address(context, addr, flags, source);
- vfolder_gui_add_rule(rule);
+ rule = (EMVFolderRule*)em_vfolder_rule_from_address (context, addr, flags, source);
+ vfolder_gui_add_rule (rule);
}
static void
@@ -1366,7 +1366,7 @@ mail_vfolder_shutdown (void)
}
if (context) {
- g_object_unref(context);
+ g_object_unref (context);
context = NULL;
}
}
diff --git a/mail/mail-vfolder.h b/mail/mail-vfolder.h
index 84b6a41151..89610f4444 100644
--- a/mail/mail-vfolder.h
+++ b/mail/mail-vfolder.h
@@ -29,11 +29,11 @@
#include <mail/em-vfolder-rule.h>
#include <shell/e-shell-view.h>
-void vfolder_load_storage(void);
-void vfolder_revert(void);
+void vfolder_load_storage (void);
+void vfolder_revert (void);
void vfolder_edit (EShellView *shell_view);
-void vfolder_edit_rule(const gchar *name);
+void vfolder_edit_rule (const gchar *name);
EFilterPart *vfolder_create_part (const gchar *name);
EFilterRule *vfolder_clone_rule (EFilterRule *in);
void vfolder_gui_add_rule (EMVFolderRule *rule);
diff --git a/mail/message-list.c b/mail/message-list.c
index cf68a06bee..02881f8a05 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -214,17 +214,17 @@ typedef struct _EMailAddress EMailAddress;
#endif /* SMART_ADDRESS_COMPARE */
static void on_cursor_activated_cmd (ETree *tree, gint row, ETreePath path, gpointer user_data);
-static void on_selection_changed_cmd(ETree *tree, MessageList *ml);
+static void on_selection_changed_cmd (ETree *tree, MessageList *ml);
static gint on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list);
static gchar *filter_date (time_t date);
static gchar *filter_size (gint size);
/* note: @changes is owned/freed by the caller */
/*static void mail_do_regenerate_messagelist (MessageList *list, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes);*/
-static void mail_regen_list(MessageList *ml, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes);
-static void mail_regen_cancel(MessageList *ml);
+static void mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes);
+static void mail_regen_cancel (MessageList *ml);
-static void clear_info(gchar *key, ETreePath *node, MessageList *ml);
+static void clear_info (gchar *key, ETreePath *node, MessageList *ml);
static void folder_changed (CamelFolder *folder,
CamelFolderChangeInfo *info,
@@ -513,22 +513,22 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, gint c
}
static void
-clear_selection(MessageList *ml, struct _MLSelection *selection)
+clear_selection (MessageList *ml, struct _MLSelection *selection)
{
if (selection->uids) {
- em_utils_uids_free(selection->uids);
+ em_utils_uids_free (selection->uids);
selection->uids = NULL;
}
if (selection->folder) {
g_object_unref (selection->folder);
selection->folder = NULL;
}
- g_free(selection->folder_uri);
+ g_free (selection->folder_uri);
selection->folder_uri = NULL;
}
static ETreePath
-ml_search_forward(MessageList *ml, gint start, gint end, guint32 flags, guint32 mask)
+ml_search_forward (MessageList *ml, gint start, gint end, guint32 flags, guint32 mask)
{
ETreePath path;
gint row;
@@ -538,10 +538,10 @@ ml_search_forward(MessageList *ml, gint start, gint end, guint32 flags, guint32
etta = e_tree_get_table_adapter (E_TREE (ml));
for (row = start; row <= end; row++) {
- path = e_tree_table_adapter_node_at_row(etta, row);
+ path = e_tree_table_adapter_node_at_row (etta, row);
if (path
- && (info = get_message_info(ml, path))
- && (camel_message_info_flags(info) & mask) == flags)
+ && (info = get_message_info (ml, path))
+ && (camel_message_info_flags (info) & mask) == flags)
return path;
}
@@ -549,7 +549,7 @@ ml_search_forward(MessageList *ml, gint start, gint end, guint32 flags, guint32
}
static ETreePath
-ml_search_backward(MessageList *ml, gint start, gint end, guint32 flags, guint32 mask)
+ml_search_backward (MessageList *ml, gint start, gint end, guint32 flags, guint32 mask)
{
ETreePath path;
gint row;
@@ -559,10 +559,10 @@ ml_search_backward(MessageList *ml, gint start, gint end, guint32 flags, guint32
etta = e_tree_get_table_adapter (E_TREE (ml));
for (row = start; row >= end; row--) {
- path = e_tree_table_adapter_node_at_row(etta, row);
+ path = e_tree_table_adapter_node_at_row (etta, row);
if (path
- && (info = get_message_info(ml, path))
- && (camel_message_info_flags(info) & mask) == flags)
+ && (info = get_message_info (ml, path))
+ && (camel_message_info_flags (info) & mask) == flags)
return path;
}
@@ -570,7 +570,7 @@ ml_search_backward(MessageList *ml, gint start, gint end, guint32 flags, guint32
}
static ETreePath
-ml_search_path(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask)
+ml_search_path (MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask)
{
ETreePath node;
gint row, count;
@@ -579,31 +579,31 @@ ml_search_path(MessageList *ml, MessageListSelectDirection direction, guint32 fl
etta = e_tree_get_table_adapter (E_TREE (ml));
if (ml->cursor_uid == NULL
- || (node = g_hash_table_lookup(ml->uid_nodemap, ml->cursor_uid)) == NULL)
+ || (node = g_hash_table_lookup (ml->uid_nodemap, ml->cursor_uid)) == NULL)
return NULL;
- row = e_tree_table_adapter_row_of_node(etta, node);
+ row = e_tree_table_adapter_row_of_node (etta, node);
if (row == -1)
return NULL;
- count = e_table_model_row_count((ETableModel *)etta);
+ count = e_table_model_row_count ((ETableModel *)etta);
if ((direction & MESSAGE_LIST_SELECT_DIRECTION) == MESSAGE_LIST_SELECT_NEXT)
- node = ml_search_forward(ml, row + 1, count - 1, flags, mask);
+ node = ml_search_forward (ml, row + 1, count - 1, flags, mask);
else
- node = ml_search_backward(ml, row-1, 0, flags, mask);
+ node = ml_search_backward (ml, row-1, 0, flags, mask);
if (node == NULL && (direction & MESSAGE_LIST_SELECT_WRAP)) {
if ((direction & MESSAGE_LIST_SELECT_DIRECTION) == MESSAGE_LIST_SELECT_NEXT)
- node = ml_search_forward(ml, 0, row, flags, mask);
+ node = ml_search_forward (ml, 0, row, flags, mask);
else
- node = ml_search_backward(ml, count-1, row, flags, mask);
+ node = ml_search_backward (ml, count-1, row, flags, mask);
}
return node;
}
static void
-select_path(MessageList *ml, ETreePath path)
+select_path (MessageList *ml, ETreePath path)
{
ETree *tree;
ETreeTableAdapter *etta;
@@ -613,7 +613,7 @@ select_path(MessageList *ml, ETreePath path)
etta = e_tree_get_table_adapter (tree);
etsm = (ETreeSelectionModel *) e_tree_get_selection_model (tree);
- g_free(ml->cursor_uid);
+ g_free (ml->cursor_uid);
ml->cursor_uid = NULL;
e_tree_table_adapter_show_node (etta, path);
@@ -641,13 +641,13 @@ select_path(MessageList *ml, ETreePath path)
* Returns %TRUE if a new message has been selected or %FALSE otherwise.
**/
gboolean
-message_list_select(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask)
+message_list_select (MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask)
{
ETreePath path;
- path = ml_search_path(ml, direction, flags, mask);
+ path = ml_search_path (ml, direction, flags, mask);
if (path) {
- select_path(ml, path);
+ select_path (ml, path);
/* This function is usually called in response to a key
* press, so grab focus if the message list is visible. */
@@ -671,9 +671,9 @@ message_list_select(MessageList *ml, MessageListSelectDirection direction, guint
* Return value:
**/
gboolean
-message_list_can_select(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask)
+message_list_can_select (MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask)
{
- return ml_search_path(ml, direction, flags, mask) != NULL;
+ return ml_search_path (ml, direction, flags, mask) != NULL;
}
/**
@@ -760,20 +760,20 @@ message_list_select_next_thread (MessageList *ml)
etta = e_tree_get_table_adapter (E_TREE (ml));
if (!ml->cursor_uid
- || (node = g_hash_table_lookup(ml->uid_nodemap, ml->cursor_uid)) == NULL)
+ || (node = g_hash_table_lookup (ml->uid_nodemap, ml->cursor_uid)) == NULL)
return;
- row = e_tree_table_adapter_row_of_node(etta, node);
+ row = e_tree_table_adapter_row_of_node (etta, node);
if (row == -1)
return;
- count = e_table_model_row_count((ETableModel *)etta);
+ count = e_table_model_row_count ((ETableModel *)etta);
/* find the next node which has a root parent (i.e. toplevel node) */
for (i=row+1;i<count-1;i++) {
- node = e_tree_table_adapter_node_at_row(etta, i);
+ node = e_tree_table_adapter_node_at_row (etta, i);
if (node
- && e_tree_model_node_is_root(ml->model, e_tree_model_node_get_parent(ml->model, node))) {
- select_path(ml, node);
+ && e_tree_model_node_is_root (ml->model, e_tree_model_node_get_parent (ml->model, node))) {
+ select_path (ml, node);
return;
}
}
@@ -920,43 +920,43 @@ message_list_invert_selection (MessageList *message_list)
}
void
-message_list_copy(MessageList *ml, gboolean cut)
+message_list_copy (MessageList *ml, gboolean cut)
{
MessageListPrivate *p = ml->priv;
GPtrArray *uids;
- clear_selection(ml, &p->clipboard);
+ clear_selection (ml, &p->clipboard);
- uids = message_list_get_selected(ml);
+ uids = message_list_get_selected (ml);
if (uids->len > 0) {
if (cut) {
gint i;
- camel_folder_freeze(ml->folder);
+ camel_folder_freeze (ml->folder);
for (i=0;i<uids->len;i++)
- camel_folder_set_message_flags(ml->folder, uids->pdata[i],
+ camel_folder_set_message_flags (ml->folder, uids->pdata[i],
CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED,
CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED);
- camel_folder_thaw(ml->folder);
+ camel_folder_thaw (ml->folder);
}
p->clipboard.uids = uids;
p->clipboard.folder = ml->folder;
g_object_ref (p->clipboard.folder);
- p->clipboard.folder_uri = g_strdup(ml->folder_uri);
- gtk_selection_owner_set(p->invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time());
+ p->clipboard.folder_uri = g_strdup (ml->folder_uri);
+ gtk_selection_owner_set (p->invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time ());
} else {
- em_utils_uids_free(uids);
- gtk_selection_owner_set(NULL, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time());
+ em_utils_uids_free (uids);
+ gtk_selection_owner_set (NULL, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time ());
}
}
void
-message_list_paste(MessageList *ml)
+message_list_paste (MessageList *ml)
{
- gtk_selection_convert(ml->priv->invisible, GDK_SELECTION_CLIPBOARD,
+ gtk_selection_convert (ml->priv->invisible, GDK_SELECTION_CLIPBOARD,
gdk_atom_intern ("x-uid-list", FALSE),
GDK_CURRENT_TIME);
}
@@ -987,16 +987,16 @@ ml_get_save_id (ETreeModel *etm, ETreePath path, gpointer data)
{
CamelMessageInfo *info;
- if (e_tree_model_node_is_root(etm, path))
+ if (e_tree_model_node_is_root (etm, path))
return g_strdup("root");
/* Note: etable can ask for the save_id while we're clearing it,
which is the only time data should be null */
- info = e_tree_memory_node_get_data (E_TREE_MEMORY(etm), path);
+ info = e_tree_memory_node_get_data (E_TREE_MEMORY (etm), path);
if (info == NULL)
return NULL;
- return g_strdup (camel_message_info_uid(info));
+ return g_strdup (camel_message_info_uid (info));
}
/*
@@ -1021,7 +1021,7 @@ ml_get_node_by_id (ETreeModel *etm, const gchar *save_id, gpointer data)
if (!strcmp (save_id, "root"))
return e_tree_model_get_root (etm);
- return g_hash_table_lookup(ml->uid_nodemap, save_id);
+ return g_hash_table_lookup (ml->uid_nodemap, save_id);
}
static gpointer
@@ -1192,13 +1192,13 @@ ml_value_to_string (ETreeModel *etm, gint col, gconstpointer value, gpointer dat
switch (col) {
case COL_MESSAGE_STATUS:
- i = GPOINTER_TO_UINT(value);
+ i = GPOINTER_TO_UINT (value);
if (i > 5)
return g_strdup ("");
return g_strdup (_(status_map[i]));
case COL_SCORE:
- i = GPOINTER_TO_UINT(value) + 3;
+ i = GPOINTER_TO_UINT (value) + 3;
if (i > 6)
i = 3;
return g_strdup (_(score_map[i]));
@@ -1480,7 +1480,7 @@ ml_tree_value_at_ex (ETreeModel *etm,
switch (col) {
case COL_MESSAGE_STATUS:
- flags = camel_message_info_flags(msg_info);
+ flags = camel_message_info_flags (msg_info);
if (flags & CAMEL_MESSAGE_ANSWERED)
return GINT_TO_POINTER (2);
else if (flags & CAMEL_MESSAGE_FORWARDED)
@@ -1490,7 +1490,7 @@ ml_tree_value_at_ex (ETreeModel *etm,
else
return GINT_TO_POINTER (0);
case COL_FLAGGED:
- return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_FLAGGED) != 0);
+ return GINT_TO_POINTER ((camel_message_info_flags (msg_info) & CAMEL_MESSAGE_FLAGGED) != 0);
case COL_SCORE: {
const gchar *tag;
gint score = 0;
@@ -1510,11 +1510,11 @@ ml_tree_value_at_ex (ETreeModel *etm,
cmp = camel_message_info_user_tag(msg_info, "completed-on");
if (tag && tag[0]) {
if (cmp && cmp[0])
- return GINT_TO_POINTER(2);
+ return GINT_TO_POINTER (2);
else
- return GINT_TO_POINTER(1);
+ return GINT_TO_POINTER (1);
} else
- return GINT_TO_POINTER(0);
+ return GINT_TO_POINTER (0);
}
case COL_FOLLOWUP_DUE_BY: {
const gchar *tag;
@@ -1534,7 +1534,7 @@ ml_tree_value_at_ex (ETreeModel *etm,
case COL_ATTACHMENT:
if (camel_message_info_user_flag (msg_info, "$has_cal"))
return GINT_TO_POINTER (2);
- return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_ATTACHMENTS) != 0);
+ return GINT_TO_POINTER ((camel_message_info_flags (msg_info) & CAMEL_MESSAGE_ATTACHMENTS) != 0);
case COL_FROM:
str = camel_message_info_from (msg_info);
return (gpointer)(str ? str : "");
@@ -1572,9 +1572,9 @@ ml_tree_value_at_ex (ETreeModel *etm,
case COL_TO_NORM:
return (gpointer) get_normalised_string (message_list, msg_info, col);
case COL_SIZE:
- return GINT_TO_POINTER (camel_message_info_size(msg_info));
+ return GINT_TO_POINTER (camel_message_info_size (msg_info));
case COL_DELETED:
- return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_DELETED) != 0);
+ return GINT_TO_POINTER ((camel_message_info_flags (msg_info) & CAMEL_MESSAGE_DELETED) != 0);
case COL_UNREAD: {
gboolean saw_unread = FALSE;
@@ -1620,7 +1620,7 @@ ml_tree_value_at_ex (ETreeModel *etm,
colour_alloced = gdk_color_to_string (&colour_val);
colour = g_intern_string (colour_alloced);
g_free (colour_alloced);
- } else if (camel_message_info_flags(msg_info) & CAMEL_MESSAGE_FLAGGED) {
+ } else if (camel_message_info_flags (msg_info) & CAMEL_MESSAGE_FLAGGED) {
/* FIXME: extract from the important.xpm somehow. */
colour = "#A7453E";
} else if (((followup && *followup) || (due_by && *due_by)) && !(completed && *completed)) {
@@ -1644,14 +1644,14 @@ ml_tree_value_at_ex (ETreeModel *etm,
gchar *location = NULL;
gchar *euri, *url;
- if (CAMEL_IS_VEE_FOLDER(message_list->folder)) {
- folder = camel_vee_folder_get_location((CamelVeeFolder *)message_list->folder, (CamelVeeMessageInfo *)msg_info, NULL);
+ if (CAMEL_IS_VEE_FOLDER (message_list->folder)) {
+ folder = camel_vee_folder_get_location ((CamelVeeFolder *)message_list->folder, (CamelVeeMessageInfo *)msg_info, NULL);
} else {
folder = message_list->folder;
}
url = mail_tools_folder_to_url (folder);
- euri = em_uri_from_camel(url);
+ euri = em_uri_from_camel (url);
account = mail_config_get_account_by_source_url (url);
@@ -1660,7 +1660,7 @@ ml_tree_value_at_ex (ETreeModel *etm,
location = g_strconcat (account->name, ":", curl->path, NULL);
} else {
/* Local account */
- euri = em_uri_from_camel(url);
+ euri = em_uri_from_camel (url);
curl = camel_url_new (euri, NULL);
if (curl->host && !strcmp(curl->host, "local") && curl->user && !strcmp(curl->user, "local"))
location = g_strconcat (_("On This Computer"), ":",curl->path, NULL);
@@ -1676,7 +1676,7 @@ ml_tree_value_at_ex (ETreeModel *etm,
case COL_RECIPIENTS:{
str = camel_message_info_to (msg_info);
- return sanitize_recipients(str);
+ return sanitize_recipients (str);
}
case COL_MIXED_SENDER:
case COL_SENDER:{
@@ -1716,8 +1716,8 @@ ml_tree_value_at_ex (ETreeModel *etm,
g_string_append (result, label_name_clean);
- g_free(label_name_clean);
- g_free(label_name);
+ g_free (label_name_clean);
+ g_free (label_name);
}
}
@@ -1741,7 +1741,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, gint col, gpointer model_data
return NULL;
/* retrieve the message information array */
- msg_info = e_tree_memory_node_get_data (E_TREE_MEMORY(etm), path);
+ msg_info = e_tree_memory_node_get_data (E_TREE_MEMORY (etm), path);
g_return_val_if_fail (msg_info != NULL, NULL);
return ml_tree_value_at_ex (etm, path, col, msg_info, message_list);
@@ -1785,7 +1785,7 @@ ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, gint col, gpointer mo
static gchar *
filter_date (time_t date)
{
- time_t nowdate = time(NULL);
+ time_t nowdate = time (NULL);
time_t yesdate;
struct tm then, now, yesterday;
gchar buf[26];
@@ -1873,7 +1873,7 @@ static ECell * create_composite_cell (gint col)
"color_column", COL_COLOUR,
NULL);
- cell_from = e_cell_text_new(NULL, GTK_JUSTIFY_LEFT);
+ cell_from = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
g_object_set (G_OBJECT (cell_from),
"bold_column", COL_UNREAD,
"color_column", COL_COLOUR,
@@ -1883,7 +1883,7 @@ static ECell * create_composite_cell (gint col)
e_cell_hbox_append (E_CELL_HBOX (cell_hbox), cell_attach, COL_ATTACHMENT, 5);
e_cell_hbox_append (E_CELL_HBOX (cell_hbox), cell_date, COL_SENT, 27);
- cell_sub = e_cell_text_new(fixed_name? fixed_name:NULL, GTK_JUSTIFY_LEFT);
+ cell_sub = e_cell_text_new (fixed_name? fixed_name:NULL, GTK_JUSTIFY_LEFT);
g_object_set (G_OBJECT (cell_sub),
/* "bold_column", COL_UNREAD, */
"color_column", COL_COLOUR,
@@ -1987,7 +1987,7 @@ message_list_create_extras (void)
}
static void
-save_tree_state(MessageList *ml)
+save_tree_state (MessageList *ml)
{
gchar *filename;
@@ -1996,7 +1996,7 @@ save_tree_state(MessageList *ml)
filename = mail_config_folder_to_cachename(ml->folder, "et-expanded-");
e_tree_save_expanded_state (E_TREE (ml), filename);
- g_free(filename);
+ g_free (filename);
ml->priv->any_row_changed = FALSE;
}
@@ -2061,7 +2061,7 @@ message_list_setup_etree (MessageList *message_list, gboolean outgoing)
}
static void
-ml_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint time_stamp, MessageList *ml)
+ml_selection_get (GtkWidget *widget, GtkSelectionData *data, guint info, guint time_stamp, MessageList *ml)
{
struct _MLSelection *selection;
@@ -2073,20 +2073,20 @@ ml_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint ti
if (info & 2) {
/* text/plain */
d(printf("setting text/plain selection for uids\n"));
- em_utils_selection_set_mailbox(data, selection->folder, selection->uids);
+ em_utils_selection_set_mailbox (data, selection->folder, selection->uids);
} else {
/* x-uid-list */
d(printf("setting x-uid-list selection for uids\n"));
- em_utils_selection_set_uidlist(data, selection->folder_uri, selection->uids);
+ em_utils_selection_set_uidlist (data, selection->folder_uri, selection->uids);
}
}
static gboolean
-ml_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, MessageList *ml)
+ml_selection_clear_event (GtkWidget *widget, GdkEventSelection *event, MessageList *ml)
{
MessageListPrivate *p = ml->priv;
- clear_selection(ml, &p->clipboard);
+ clear_selection (ml, &p->clipboard);
return TRUE;
}
@@ -2117,20 +2117,20 @@ ml_tree_drag_data_get (ETree *tree, gint row, ETreePath path, gint col,
{
GPtrArray *uids;
- uids = message_list_get_selected(ml);
+ uids = message_list_get_selected (ml);
if (uids->len > 0) {
switch (info) {
case DND_X_UID_LIST:
- em_utils_selection_set_uidlist(data, ml->folder_uri, uids);
+ em_utils_selection_set_uidlist (data, ml->folder_uri, uids);
break;
case DND_TEXT_URI_LIST:
- em_utils_selection_set_urilist(data, ml->folder, uids);
+ em_utils_selection_set_urilist (data, ml->folder, uids);
break;
}
}
- em_utils_uids_free(uids);
+ em_utils_uids_free (uids);
}
/* TODO: merge this with the folder tree stuff via empopup targets */
@@ -2177,10 +2177,10 @@ ml_drop_async_exec (struct _drop_msg *m)
&m->base.error);
break;
case DND_MESSAGE_RFC822:
- em_utils_selection_get_message(m->selection, m->folder);
+ em_utils_selection_get_message (m->selection, m->folder);
break;
case DND_TEXT_URI_LIST:
- em_utils_selection_get_urilist(m->selection, m->folder);
+ em_utils_selection_get_urilist (m->selection, m->folder);
break;
}
}
@@ -2199,7 +2199,7 @@ ml_drop_async_done (struct _drop_msg *m)
delete = success && m->move && !m->moved;
}
- gtk_drag_finish(m->context, success, delete, GDK_CURRENT_TIME);
+ gtk_drag_finish (m->context, success, delete, GDK_CURRENT_TIME);
}
static void
@@ -2219,7 +2219,7 @@ static MailMsgInfo ml_drop_async_info = {
};
static void
-ml_drop_action(struct _drop_msg *m)
+ml_drop_action (struct _drop_msg *m)
{
m->move = m->action == GDK_ACTION_MOVE;
mail_msg_unordered_push (m);
@@ -2249,9 +2249,9 @@ ml_tree_drag_data_received (ETree *tree,
if (gtk_selection_data_get_length (selection_data) == -1)
return;
- m = mail_msg_new(&ml_drop_async_info);
+ m = mail_msg_new (&ml_drop_async_info);
m->context = context;
- g_object_ref(context);
+ g_object_ref (context);
m->folder = ml->folder;
g_object_ref (m->folder);
m->action = gdk_drag_context_get_selected_action (context);
@@ -2260,7 +2260,7 @@ ml_tree_drag_data_received (ETree *tree,
/* need to copy, goes away once we exit */
m->selection = gtk_selection_data_copy (selection_data);
- ml_drop_action(m);
+ ml_drop_action (m);
}
struct search_child_struct {
@@ -2290,7 +2290,7 @@ is_tree_widget_children (ETree *tree, gconstpointer widget)
}
static gboolean
-ml_tree_drag_motion(ETree *tree, GdkDragContext *context, gint x, gint y, guint time, MessageList *ml)
+ml_tree_drag_motion (ETree *tree, GdkDragContext *context, gint x, gint y, guint time, MessageList *ml)
{
GList *targets;
GdkDragAction action, actions = 0;
@@ -2325,7 +2325,7 @@ ml_tree_drag_motion(ETree *tree, GdkDragContext *context, gint x, gint y, guint
if (action == GDK_ACTION_COPY && (actions & GDK_ACTION_MOVE))
action = GDK_ACTION_MOVE;
- gdk_drag_status(context, action, time);
+ gdk_drag_status (context, action, time);
return action != 0;
}
@@ -2392,7 +2392,7 @@ message_list_init (MessageList *message_list)
message_list->ensure_uid = NULL;
message_list->uid_nodemap = g_hash_table_new (g_str_hash, g_str_equal);
- message_list->async_event = mail_async_event_new();
+ message_list->async_event = mail_async_event_new ();
message_list->cursor_uid = NULL;
message_list->last_sel_single = FALSE;
@@ -2401,14 +2401,14 @@ message_list_init (MessageList *message_list)
/* TODO: Should this only get the selection if we're realised? */
p = message_list->priv;
- p->invisible = gtk_invisible_new();
+ p->invisible = gtk_invisible_new ();
p->destroyed = FALSE;
- g_object_ref_sink(p->invisible);
+ g_object_ref_sink (p->invisible);
p->any_row_changed = FALSE;
matom = gdk_atom_intern ("x-uid-list", FALSE);
- gtk_selection_add_target(p->invisible, GDK_SELECTION_CLIPBOARD, matom, 0);
- gtk_selection_add_target(p->invisible, GDK_SELECTION_CLIPBOARD, GDK_SELECTION_TYPE_STRING, 2);
+ gtk_selection_add_target (p->invisible, GDK_SELECTION_CLIPBOARD, matom, 0);
+ gtk_selection_add_target (p->invisible, GDK_SELECTION_CLIPBOARD, GDK_SELECTION_TYPE_STRING, 2);
g_signal_connect(p->invisible, "selection_get", G_CALLBACK(ml_selection_get), message_list);
g_signal_connect(p->invisible, "selection_clear_event", G_CALLBACK(ml_selection_clear_event), message_list);
@@ -2424,7 +2424,7 @@ message_list_init (MessageList *message_list)
}
static void
-message_list_destroy(GtkObject *object)
+message_list_destroy (GtkObject *object)
{
MessageList *message_list = MESSAGE_LIST (object);
MessageListPrivate *p = message_list->priv;
@@ -2432,15 +2432,15 @@ message_list_destroy(GtkObject *object)
p->destroyed = TRUE;
if (message_list->async_event) {
- mail_async_event_destroy(message_list->async_event);
+ mail_async_event_destroy (message_list->async_event);
message_list->async_event = NULL;
}
if (message_list->folder) {
- mail_regen_cancel(message_list);
+ mail_regen_cancel (message_list);
if (message_list->uid_nodemap) {
- g_hash_table_foreach(message_list->uid_nodemap, (GHFunc)clear_info, message_list);
+ g_hash_table_foreach (message_list->uid_nodemap, (GHFunc)clear_info, message_list);
g_hash_table_destroy (message_list->uid_nodemap);
message_list->uid_nodemap = NULL;
}
@@ -2452,7 +2452,7 @@ message_list_destroy(GtkObject *object)
}
if (p->invisible) {
- g_object_unref(p->invisible);
+ g_object_unref (p->invisible);
p->invisible = NULL;
}
@@ -2477,7 +2477,7 @@ message_list_destroy(GtkObject *object)
}
/* Chain up to parent's destroy() method. */
- GTK_OBJECT_CLASS (parent_class)->destroy(object);
+ GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
static void
@@ -2566,19 +2566,19 @@ message_list_finalize (GObject *object)
}
if (message_list->thread_tree)
- camel_folder_thread_messages_unref(message_list->thread_tree);
+ camel_folder_thread_messages_unref (message_list->thread_tree);
- g_free(message_list->search);
- g_free(message_list->ensure_uid);
- g_free(message_list->frozen_search);
- g_free(message_list->cursor_uid);
+ g_free (message_list->search);
+ g_free (message_list->ensure_uid);
+ g_free (message_list->frozen_search);
+ g_free (message_list->cursor_uid);
g_mutex_free (message_list->regen_lock);
- g_free(message_list->folder_uri);
+ g_free (message_list->folder_uri);
message_list->folder_uri = NULL;
- clear_selection(message_list, &priv->clipboard);
+ clear_selection (message_list, &priv->clipboard);
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -2613,7 +2613,7 @@ message_list_class_init (MessageListClass *class)
gint i;
for (i = 0; i < G_N_ELEMENTS (ml_drag_info); i++)
- ml_drag_info[i].atom = gdk_atom_intern(ml_drag_info[i].target, FALSE);
+ ml_drag_info[i].atom = gdk_atom_intern (ml_drag_info[i].target, FALSE);
parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (MessageListPrivate));
@@ -2731,7 +2731,7 @@ message_list_construct (MessageList *message_list)
message_list);
- e_tree_memory_set_expanded_default(E_TREE_MEMORY(message_list->model),
+ e_tree_memory_set_expanded_default (E_TREE_MEMORY (message_list->model),
read_boolean_with_default (gconf,
"/apps/evolution/mail/display/thread_expand",
TRUE));
@@ -2752,7 +2752,7 @@ message_list_construct (MessageList *message_list)
if (constructed)
e_tree_root_node_set_visible (E_TREE (message_list), FALSE);
- if (atk_get_root() != NULL) {
+ if (atk_get_root () != NULL) {
a11y = gtk_widget_get_accessible (GTK_WIDGET (message_list));
atk_object_set_name(a11y, _("Messages"));
}
@@ -2781,7 +2781,7 @@ message_list_construct (MessageList *message_list)
g_signal_connect (
message_list, "tree_drag_data_get",
- G_CALLBACK(ml_tree_drag_data_get), message_list);
+ G_CALLBACK (ml_tree_drag_data_get), message_list);
e_tree_drag_dest_set (
E_TREE (message_list), GTK_DEST_DEFAULT_ALL,
@@ -2869,13 +2869,13 @@ message_list_get_shell_backend (MessageList *message_list)
}
static void
-clear_info(gchar *key, ETreePath *node, MessageList *ml)
+clear_info (gchar *key, ETreePath *node, MessageList *ml)
{
CamelMessageInfo *info;
- info = e_tree_memory_node_get_data((ETreeMemory *)ml->model, node);
- camel_folder_free_message_info(ml->folder, info);
- e_tree_memory_node_set_data((ETreeMemory *)ml->model, node, NULL);
+ info = e_tree_memory_node_get_data ((ETreeMemory *)ml->model, node);
+ camel_folder_free_message_info (ml->folder, info);
+ e_tree_memory_node_set_data ((ETreeMemory *)ml->model, node, NULL);
}
static void
@@ -2888,7 +2888,7 @@ clear_tree (MessageList *ml, gboolean tfree)
unsigned long diff;
printf("Clearing tree\n");
- gettimeofday(&start, NULL);
+ gettimeofday (&start, NULL);
#endif
/* we also reset the uid_rowmap since it is no longer useful/valid anyway */
@@ -2904,14 +2904,14 @@ clear_tree (MessageList *ml, gboolean tfree)
if (ml->tree_root) {
/* we should be frozen already */
- e_tree_memory_node_remove (E_TREE_MEMORY(etm), ml->tree_root);
+ e_tree_memory_node_remove (E_TREE_MEMORY (etm), ml->tree_root);
}
- ml->tree_root = e_tree_memory_node_insert (E_TREE_MEMORY(etm), NULL, 0, NULL);
+ ml->tree_root = e_tree_memory_node_insert (E_TREE_MEMORY (etm), NULL, 0, NULL);
if (tfree)
- e_tree_model_rebuilt (E_TREE_MODEL(etm));
+ e_tree_model_rebuilt (E_TREE_MODEL (etm));
#ifdef TIMEIT
- gettimeofday(&end, NULL);
+ gettimeofday (&end, NULL);
diff = end.tv_sec * 1000 + end.tv_usec/1000;
diff -= start.tv_sec * 1000 + start.tv_usec/1000;
printf("Clearing tree took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
@@ -3129,44 +3129,44 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c
unsigned long diff;
printf("Building tree\n");
- gettimeofday(&start, NULL);
+ gettimeofday (&start, NULL);
#endif
#ifdef TIMEIT
- gettimeofday(&end, NULL);
+ gettimeofday (&end, NULL);
diff = end.tv_sec * 1000 + end.tv_usec/1000;
diff -= start.tv_sec * 1000 + start.tv_usec/1000;
printf("Loading tree state took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
#endif
if (ml->tree_root == NULL) {
- ml->tree_root = e_tree_memory_node_insert(E_TREE_MEMORY(etm), NULL, 0, NULL);
+ ml->tree_root = e_tree_memory_node_insert (E_TREE_MEMORY (etm), NULL, 0, NULL);
}
if (ml->cursor_uid)
saveuid = find_next_selectable (ml);
#ifndef BROKEN_ETREE
- top = e_tree_model_node_get_first_child(etm, ml->tree_root);
+ top = e_tree_model_node_get_first_child (etm, ml->tree_root);
if (top == NULL || changes == NULL) {
#else
- selected = message_list_get_selected(ml);
+ selected = message_list_get_selected (ml);
#endif
- e_tree_memory_freeze(E_TREE_MEMORY(etm));
+ e_tree_memory_freeze (E_TREE_MEMORY (etm));
clear_tree (ml, FALSE);
- build_subtree(ml, ml->tree_root, thread->tree, &row);
- e_tree_memory_thaw(E_TREE_MEMORY(etm));
+ build_subtree (ml, ml->tree_root, thread->tree, &row);
+ e_tree_memory_thaw (E_TREE_MEMORY (etm));
#ifdef BROKEN_ETREE
- message_list_set_selected(ml, selected);
- em_utils_uids_free(selected);
+ message_list_set_selected (ml, selected);
+ em_utils_uids_free (selected);
#else
} else {
- static gint tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp);
+ static gint tree_equal (ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp);
- build_subtree_diff(ml, ml->tree_root, top, thread->tree, &row);
- top = e_tree_model_node_get_first_child(etm, ml->tree_root);
- tree_equal(ml->model, top, thread->tree);
+ build_subtree_diff (ml, ml->tree_root, top, thread->tree, &row);
+ top = e_tree_model_node_get_first_child (etm, ml->tree_root);
+ tree_equal (ml->model, top, thread->tree);
}
#endif
if (saveuid) {
@@ -3186,7 +3186,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c
}
#ifdef TIMEIT
- gettimeofday(&end, NULL);
+ gettimeofday (&end, NULL);
diff = end.tv_sec * 1000 + end.tv_usec/1000;
diff -= start.tv_sec * 1000 + start.tv_usec/1000;
printf("Building tree took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
@@ -3194,7 +3194,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c
}
/* this is about 20% faster than build_subtree_diff,
- entirely because e_tree_model_node_insert(xx, -1 xx)
+ entirely because e_tree_model_node_insert (xx, -1 xx)
is faster than inserting to the right row :( */
/* Otherwise, this code would probably go as it does the same thing essentially */
static void
@@ -3214,7 +3214,7 @@ build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, gint
ml, (CamelMessageInfo *) c->message, parent, -1);
if (c->child) {
- build_subtree(ml, node, c->child, row);
+ build_subtree (ml, node, c->child, row);
}
c = c->next;
}
@@ -3223,13 +3223,13 @@ build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, gint
/* compares a thread tree node with the etable tree node to see if they point to
the same object */
static gint
-node_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp)
+node_equal (ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp)
{
CamelMessageInfo *info;
- info = e_tree_memory_node_get_data(E_TREE_MEMORY(etm), ap);
+ info = e_tree_memory_node_get_data (E_TREE_MEMORY (etm), ap);
- if (bp->message && strcmp(camel_message_info_uid(info), camel_message_info_uid(bp->message))==0)
+ if (bp->message && strcmp (camel_message_info_uid (info), camel_message_info_uid (bp->message))==0)
return 1;
return 0;
@@ -3238,29 +3238,29 @@ node_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp)
#ifndef BROKEN_ETREE
/* debug function - compare the two trees to see if they are the same */
static gint
-tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp)
+tree_equal (ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp)
{
CamelMessageInfo *info;
while (ap && bp) {
- if (!node_equal(etm, ap, bp)) {
+ if (!node_equal (etm, ap, bp)) {
g_warning("Nodes in tree differ");
- info = e_tree_memory_node_get_data(E_TREE_MEMORY(etm), ap);
+ info = e_tree_memory_node_get_data (E_TREE_MEMORY (etm), ap);
printf("table uid = %s\n", camel_message_info_uid(info));
printf("camel uid = %s\n", camel_message_info_uid(bp->message));
return FALSE;
} else {
- if (!tree_equal(etm, e_tree_model_node_get_first_child(etm, ap), bp->child))
+ if (!tree_equal (etm, e_tree_model_node_get_first_child (etm, ap), bp->child))
return FALSE;
}
bp = bp->next;
- ap = e_tree_model_node_get_next(etm, ap);
+ ap = e_tree_model_node_get_next (etm, ap);
}
if (ap || bp) {
g_warning("Tree differs, out of nodes in one branch");
if (ap) {
- info = e_tree_memory_node_get_data(E_TREE_MEMORY(etm), ap);
+ info = e_tree_memory_node_get_data (E_TREE_MEMORY (etm), ap);
if (info)
printf("table uid = %s\n", camel_message_info_uid(info));
else
@@ -3278,7 +3278,7 @@ tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp)
/* adds a single node, retains save state, and handles adding children if required */
static void
-add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row, gint myrow)
+add_node_diff (MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row, gint myrow)
{
CamelMessageInfo *info;
ETreePath node;
@@ -3294,13 +3294,13 @@ add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThre
(*row)++;
if (c->child) {
- build_subtree_diff(ml, node, NULL, c->child, row);
+ build_subtree_diff (ml, node, NULL, c->child, row);
}
}
/* removes node, children recursively and all associated data */
static void
-remove_node_diff(MessageList *ml, ETreePath node, gint depth)
+remove_node_diff (MessageList *ml, ETreePath node, gint depth)
{
ETreeModel *etm = ml->model;
ETreePath cp, cn;
@@ -3309,19 +3309,19 @@ remove_node_diff(MessageList *ml, ETreePath node, gint depth)
t(printf("Removing node: %s\n", (gchar *)e_tree_memory_node_get_data(etm, node)));
/* we depth-first remove all node data's ... */
- cp = e_tree_model_node_get_first_child(etm, node);
+ cp = e_tree_model_node_get_first_child (etm, node);
while (cp) {
- cn = e_tree_model_node_get_next(etm, cp);
- remove_node_diff(ml, cp, depth+1);
+ cn = e_tree_model_node_get_next (etm, cp);
+ remove_node_diff (ml, cp, depth+1);
cp = cn;
}
/* and the rowid entry - if and only if it is referencing this node */
- info = e_tree_memory_node_get_data(E_TREE_MEMORY (etm), node);
+ info = e_tree_memory_node_get_data (E_TREE_MEMORY (etm), node);
/* and only at the toplevel, remove the node (etree should optimise this remove somewhat) */
if (depth == 0)
- e_tree_memory_node_remove(E_TREE_MEMORY(etm), node);
+ e_tree_memory_node_remove (E_TREE_MEMORY (etm), node);
g_return_if_fail (info);
ml_uid_nodemap_remove (ml, info);
@@ -3330,7 +3330,7 @@ remove_node_diff(MessageList *ml, ETreePath node, gint depth)
/* applies a new tree structure to an existing tree, but only by changing things
that have changed */
static void
-build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row)
+build_subtree_diff (MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row)
{
ETreeModel *etm = ml->model;
ETreePath ap, *ai, *at, *tmp;
@@ -3345,25 +3345,25 @@ build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolde
if (ap == NULL) {
t(printf("out of old nodes\n"));
/* ran out of old nodes - remaining nodes are added */
- add_node_diff(ml, parent, ap, bp, row, myrow);
+ add_node_diff (ml, parent, ap, bp, row, myrow);
myrow++;
bp = bp->next;
} else if (bp == NULL) {
t(printf("out of new nodes\n"));
/* ran out of new nodes - remaining nodes are removed */
- tmp = e_tree_model_node_get_next(etm, ap);
- remove_node_diff(ml, ap, 0);
+ tmp = e_tree_model_node_get_next (etm, ap);
+ remove_node_diff (ml, ap, 0);
ap = tmp;
- } else if (node_equal(etm, ap, bp)) {
+ } else if (node_equal (etm, ap, bp)) {
/*t(printf("nodes match, verify\n"));*/
/* matching nodes, verify details/children */
#if 0
if (bp->message) {
gpointer olduid, oldrow;
/* if this is a message row, check/update the row id map */
- if (g_hash_table_lookup_extended(ml->uid_rowmap, camel_message_info_uid(bp->message), &olduid, &oldrow)) {
+ if (g_hash_table_lookup_extended (ml->uid_rowmap, camel_message_info_uid (bp->message), &olduid, &oldrow)) {
if ((gint)oldrow != (*row)) {
- g_hash_table_insert(ml->uid_rowmap, olduid, (gpointer)(*row));
+ g_hash_table_insert (ml->uid_rowmap, olduid, (gpointer)(*row));
}
} else {
g_warning("Cannot find uid %s in table?", camel_message_info_uid(bp->message));
@@ -3372,24 +3372,24 @@ build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolde
#endif
*row = (*row)+1;
myrow++;
- tmp = e_tree_model_node_get_first_child(etm, ap);
+ tmp = e_tree_model_node_get_first_child (etm, ap);
/* make child lists match (if either has one) */
if (bp->child || tmp) {
- build_subtree_diff(ml, ap, tmp, bp->child, row);
+ build_subtree_diff (ml, ap, tmp, bp->child, row);
}
- ap = e_tree_model_node_get_next(etm, ap);
+ ap = e_tree_model_node_get_next (etm, ap);
bp = bp->next;
} else {
t(printf("searching for matches\n"));
/* we have to scan each side for a match */
bi = bp->next;
- ai = e_tree_model_node_get_next(etm, ap);
+ ai = e_tree_model_node_get_next (etm, ap);
for (i=1;bi!=NULL;i++,bi=bi->next) {
- if (node_equal(etm, ap, bi))
+ if (node_equal (etm, ap, bi))
break;
}
- for (j=1;ai!=NULL;j++,ai=e_tree_model_node_get_next(etm, ai)) {
- if (node_equal(etm, ai, bp))
+ for (j=1;ai!=NULL;j++,ai=e_tree_model_node_get_next (etm, ai)) {
+ if (node_equal (etm, ai, bp))
break;
}
if (i<j) {
@@ -3398,7 +3398,7 @@ build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolde
bt = bp;
while (bt != bi) {
t(printf("adding new node 0\n"));
- add_node_diff(ml, parent, NULL, bt, row, myrow);
+ add_node_diff (ml, parent, NULL, bt, row, myrow);
myrow++;
bt = bt->next;
}
@@ -3406,7 +3406,7 @@ build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolde
} else {
t(printf("adding new node 1\n"));
/* no match in new nodes, add one, try next */
- add_node_diff(ml, parent, NULL, bp, row, myrow);
+ add_node_diff (ml, parent, NULL, bp, row, myrow);
myrow++;
bp = bp->next;
}
@@ -3416,20 +3416,20 @@ build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolde
at = ap;
while (at != ai) {
t(printf("removing old node 0\n"));
- tmp = e_tree_model_node_get_next(etm, at);
- remove_node_diff(ml, at, 0);
+ tmp = e_tree_model_node_get_next (etm, at);
+ remove_node_diff (ml, at, 0);
at = tmp;
}
ap = ai;
} else {
t(printf("adding new node 2\n"));
/* didn't find match in old nodes, must be new node? */
- add_node_diff(ml, parent, NULL, bp, row, myrow);
+ add_node_diff (ml, parent, NULL, bp, row, myrow);
myrow++;
bp = bp->next;
#if 0
- tmp = e_tree_model_node_get_next(etm, ap);
- remove_node_diff(etm, ap, 0);
+ tmp = e_tree_model_node_get_next (etm, ap);
+ remove_node_diff (etm, ap, 0);
ap = tmp;
#endif
}
@@ -3439,7 +3439,7 @@ build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolde
}
#ifndef BROKEN_ETREE
-static void build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes);
+static void build_flat_diff (MessageList *ml, CamelFolderChangeInfo *changes);
#endif
static void
@@ -3456,7 +3456,7 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
unsigned long diff;
printf("Building flat\n");
- gettimeofday(&start, NULL);
+ gettimeofday (&start, NULL);
#endif
if (ml->cursor_uid)
@@ -3464,28 +3464,28 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
#ifndef BROKEN_ETREE
if (changes) {
- build_flat_diff(ml, changes);
+ build_flat_diff (ml, changes);
} else {
#else
- selected = message_list_get_selected(ml);
+ selected = message_list_get_selected (ml);
#endif
- e_tree_memory_freeze(E_TREE_MEMORY(etm));
+ e_tree_memory_freeze (E_TREE_MEMORY (etm));
clear_tree (ml, FALSE);
for (i = 0; i < summary->len; i++) {
CamelMessageInfo *info = summary->pdata[i];
ml_uid_nodemap_insert (ml, info, NULL, -1);
}
- e_tree_memory_thaw(E_TREE_MEMORY(etm));
+ e_tree_memory_thaw (E_TREE_MEMORY (etm));
#ifdef BROKEN_ETREE
- message_list_set_selected(ml, selected);
- em_utils_uids_free(selected);
+ message_list_set_selected (ml, selected);
+ em_utils_uids_free (selected);
#else
}
#endif
if (saveuid) {
- ETreePath node = g_hash_table_lookup(ml->uid_nodemap, saveuid);
+ ETreePath node = g_hash_table_lookup (ml->uid_nodemap, saveuid);
if (node == NULL) {
g_free (ml->cursor_uid);
ml->cursor_uid = NULL;
@@ -3497,7 +3497,7 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
}
#ifdef TIMEIT
- gettimeofday(&end, NULL);
+ gettimeofday (&end, NULL);
diff = end.tv_sec * 1000 + end.tv_usec/1000;
diff -= start.tv_sec * 1000 + start.tv_usec/1000;
printf("Building flat took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
@@ -3524,7 +3524,7 @@ message_list_change_first_visible_parent (MessageList *ml, ETreePath node)
#ifndef BROKEN_ETREE
static void
-build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
+build_flat_diff (MessageList *ml, CamelFolderChangeInfo *changes)
{
gint i;
ETreePath node;
@@ -3534,7 +3534,7 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
struct timeval start, end;
unsigned long diff;
- gettimeofday(&start, NULL);
+ gettimeofday (&start, NULL);
#endif
d(printf("updating changes to display\n"));
@@ -3542,10 +3542,10 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
/* remove individual nodes? */
d(printf("Removing messages from view:\n"));
for (i=0;i<changes->uid_removed->len;i++) {
- node = g_hash_table_lookup(ml->uid_nodemap, changes->uid_removed->pdata[i]);
+ node = g_hash_table_lookup (ml->uid_nodemap, changes->uid_removed->pdata[i]);
if (node) {
- info = e_tree_memory_node_get_data(E_TREE_MEMORY(ml->model), node);
- e_tree_memory_node_remove(E_TREE_MEMORY(ml->model), node);
+ info = e_tree_memory_node_get_data (E_TREE_MEMORY (ml->model), node);
+ e_tree_memory_node_remove (E_TREE_MEMORY (ml->model), node);
ml_uid_nodemap_remove (ml, info);
}
}
@@ -3573,7 +3573,7 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
}
#ifdef TIMEIT
- gettimeofday(&end, NULL);
+ gettimeofday (&end, NULL);
diff = end.tv_sec * 1000 + end.tv_usec/1000;
diff -= start.tv_sec * 1000 + start.tv_usec/1000;
printf("Inserting changes took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
@@ -3597,7 +3597,7 @@ mail_folder_hide_by_flag (CamelFolder *folder, MessageList *ml, CamelFolderChang
info = camel_folder_get_message_info (folder, oldchanges->uid_changed->pdata[i]);
if (info)
- flags = camel_message_info_flags(info);
+ flags = camel_message_info_flags (info);
if (node != NULL && info != NULL && (flags & flag) != 0)
camel_folder_change_info_remove_uid (newchanges, oldchanges->uid_changed->pdata[i]);
@@ -3660,7 +3660,7 @@ main_folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
camel_folder_change_info_free (changes);
- g_signal_emit(ml, message_list_signals[MESSAGE_LIST_BUILT], 0);
+ g_signal_emit (ml, message_list_signals[MESSAGE_LIST_BUILT], 0);
return;
}
}
@@ -3679,7 +3679,7 @@ folder_changed (CamelFolder *folder,
return;
if (info != NULL) {
- changes = camel_folder_change_info_new();
+ changes = camel_folder_change_info_new ();
camel_folder_change_info_cat (changes, info);
} else {
changes = NULL;
@@ -3722,15 +3722,15 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const g
/* reset the normalised sort performance hack */
g_hash_table_remove_all (message_list->normalised_hash);
- mail_regen_cancel(message_list);
+ mail_regen_cancel (message_list);
if (message_list->folder != NULL) {
save_tree_state (message_list);
}
- e_tree_memory_freeze(E_TREE_MEMORY(etm));
+ e_tree_memory_freeze (E_TREE_MEMORY (etm));
clear_tree (message_list, TRUE);
- e_tree_memory_thaw(E_TREE_MEMORY(etm));
+ e_tree_memory_thaw (E_TREE_MEMORY (etm));
/* remove the cursor activate idle handler */
if (message_list->idle_id != 0) {
@@ -3746,19 +3746,19 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const g
}
if (message_list->thread_tree) {
- camel_folder_thread_messages_unref(message_list->thread_tree);
+ camel_folder_thread_messages_unref (message_list->thread_tree);
message_list->thread_tree = NULL;
}
if (message_list->folder_uri != uri) {
- g_free(message_list->folder_uri);
- message_list->folder_uri = uri ? g_strdup(uri):NULL;
+ g_free (message_list->folder_uri);
+ message_list->folder_uri = uri ? g_strdup (uri):NULL;
}
if (message_list->cursor_uid) {
- g_free(message_list->cursor_uid);
+ g_free (message_list->cursor_uid);
message_list->cursor_uid = NULL;
- g_signal_emit(message_list, message_list_signals[MESSAGE_SELECTED], 0, NULL);
+ g_signal_emit (message_list, message_list_signals[MESSAGE_SELECTED], 0, NULL);
}
if (folder) {
@@ -3876,7 +3876,7 @@ on_cursor_activated_cmd (ETree *tree, gint row, ETreePath path, gpointer user_da
}
static void
-on_selection_changed_cmd(ETree *tree, MessageList *ml)
+on_selection_changed_cmd (ETree *tree, MessageList *ml)
{
GPtrArray *uids;
gchar *newuid;
@@ -3884,11 +3884,11 @@ on_selection_changed_cmd(ETree *tree, MessageList *ml)
/* not sure if we could just ignore this for the cursor, i think sometimes you
only get a selection changed when you should also get a cursor activated? */
- uids = message_list_get_selected(ml);
+ uids = message_list_get_selected (ml);
if (uids->len == 1)
newuid = uids->pdata[0];
- else if ((cursor = e_tree_get_cursor(tree)))
- newuid = (gchar *)camel_message_info_uid(e_tree_memory_node_get_data((ETreeMemory *)tree, cursor));
+ else if ((cursor = e_tree_get_cursor (tree)))
+ newuid = (gchar *)camel_message_info_uid (e_tree_memory_node_get_data ((ETreeMemory *)tree, cursor));
else
newuid = NULL;
@@ -3899,15 +3899,15 @@ on_selection_changed_cmd(ETree *tree, MessageList *ml)
(ml->last_sel_single && uids->len == 1 && newuid != NULL && ml->cursor_uid != NULL && !strcmp (ml->cursor_uid, newuid))) {
/* noop */
} else {
- g_free(ml->cursor_uid);
- ml->cursor_uid = g_strdup(newuid);
+ g_free (ml->cursor_uid);
+ ml->cursor_uid = g_strdup (newuid);
if (!ml->idle_id)
ml->idle_id = g_idle_add_full (G_PRIORITY_LOW, on_cursor_activated_idle, ml, NULL);
}
ml->last_sel_single = uids->len == 1;
- em_utils_uids_free(uids);
+ em_utils_uids_free (uids);
}
static gint
@@ -3929,7 +3929,7 @@ on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, Mess
if (!(info = get_message_info (list, path)))
return FALSE;
- flags = camel_message_info_flags(info);
+ flags = camel_message_info_flags (info);
folder_is_trash =
((list->folder->folder_flags & CAMEL_FOLDER_IS_TRASH) != 0);
@@ -3975,7 +3975,7 @@ struct _ml_selected_data {
};
static void
-ml_getselected_cb(ETreePath path, gpointer user_data)
+ml_getselected_cb (ETreePath path, gpointer user_data)
{
struct _ml_selected_data *data = user_data;
const gchar *uid;
@@ -3983,17 +3983,17 @@ ml_getselected_cb(ETreePath path, gpointer user_data)
if (e_tree_model_node_is_root (data->ml->model, path))
return;
- uid = get_message_uid(data->ml, path);
- g_return_if_fail(uid != NULL);
- g_ptr_array_add(data->uids, g_strdup(uid));
+ uid = get_message_uid (data->ml, path);
+ g_return_if_fail (uid != NULL);
+ g_ptr_array_add (data->uids, g_strdup (uid));
}
GPtrArray *
-message_list_get_uids(MessageList *ml)
+message_list_get_uids (MessageList *ml)
{
struct _ml_selected_data data = {
ml,
- g_ptr_array_new()
+ g_ptr_array_new ()
};
e_tree_path_foreach (E_TREE (ml), ml_getselected_cb, &data);
@@ -4005,11 +4005,11 @@ message_list_get_uids(MessageList *ml)
}
GPtrArray *
-message_list_get_selected(MessageList *ml)
+message_list_get_selected (MessageList *ml)
{
struct _ml_selected_data data = {
ml,
- g_ptr_array_new()
+ g_ptr_array_new ()
};
e_tree_selected_path_foreach (E_TREE (ml), ml_getselected_cb, &data);
@@ -4021,22 +4021,22 @@ message_list_get_selected(MessageList *ml)
}
void
-message_list_set_selected(MessageList *ml, GPtrArray *uids)
+message_list_set_selected (MessageList *ml, GPtrArray *uids)
{
gint i;
ETreeSelectionModel *etsm;
ETreePath node;
- GPtrArray *paths = g_ptr_array_new();
+ GPtrArray *paths = g_ptr_array_new ();
etsm = (ETreeSelectionModel *) e_tree_get_selection_model (E_TREE (ml));
for (i=0; i<uids->len; i++) {
- node = g_hash_table_lookup(ml->uid_nodemap, uids->pdata[i]);
+ node = g_hash_table_lookup (ml->uid_nodemap, uids->pdata[i]);
if (node)
- g_ptr_array_add(paths, node);
+ g_ptr_array_add (paths, node);
}
- e_tree_selection_model_select_paths(etsm, paths);
- g_ptr_array_free(paths, TRUE);
+ e_tree_selection_model_select_paths (etsm, paths);
+ g_ptr_array_free (paths, TRUE);
}
struct ml_count_data {
@@ -4067,20 +4067,20 @@ message_list_count (MessageList *message_list)
}
void
-message_list_freeze(MessageList *ml)
+message_list_freeze (MessageList *ml)
{
ml->frozen++;
}
void
-message_list_thaw(MessageList *ml)
+message_list_thaw (MessageList *ml)
{
g_return_if_fail (ml->frozen != 0);
ml->frozen--;
if (ml->frozen == 0) {
- mail_regen_list(ml, ml->frozen_search?ml->frozen_search:ml->search, NULL, NULL);
- g_free(ml->frozen_search);
+ mail_regen_list (ml, ml->frozen_search?ml->frozen_search:ml->search, NULL, NULL);
+ g_free (ml->frozen_search);
ml->frozen_search = NULL;
}
}
@@ -4144,21 +4144,21 @@ message_list_set_search (MessageList *ml, const gchar *search)
ClutterAlpha *alpha;
GtkIconInfo *info;
- info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default(),
+ info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (),
"system-search",
72,
GTK_ICON_LOOKUP_NO_SVG);
if (info) {
- texture = clutter_texture_new_from_file (gtk_icon_info_get_filename(info), NULL);
- gtk_icon_info_free(info);
+ texture = clutter_texture_new_from_file (gtk_icon_info_get_filename (info), NULL);
+ gtk_icon_info_free (info);
}
clutter_container_add_actor ((ClutterContainer *)stage, texture);
ml->priv->search_texture = texture;
ml->priv->timeline = clutter_timeline_new (2 * 1000);
alpha = clutter_alpha_new_full (ml->priv->timeline, CLUTTER_LINEAR);
- path = clutter_path_new();
+ path = clutter_path_new ();
behaviour = clutter_behaviour_path_new (alpha, path);
clutter_actor_hide (texture);
clutter_path_clear (path);
@@ -4193,7 +4193,7 @@ message_list_set_search (MessageList *ml, const gchar *search)
return;
if (ml->thread_tree) {
- camel_folder_thread_messages_unref(ml->thread_tree);
+ camel_folder_thread_messages_unref (ml->thread_tree);
ml->thread_tree = NULL;
}
@@ -4205,8 +4205,8 @@ message_list_set_search (MessageList *ml, const gchar *search)
if (ml->frozen == 0)
mail_regen_list (ml, search, NULL, NULL);
else {
- g_free(ml->frozen_search);
- ml->frozen_search = g_strdup(search);
+ g_free (ml->frozen_search);
+ ml->frozen_search = g_strdup (search);
}
}
@@ -4433,19 +4433,19 @@ regen_list_exec (struct _regen_list_msg *m)
e_profile_event_emit("list.getuids", m->folder->full_name, 0);
/* if we have hidedeleted on, use a search to find it out, merge with existing search if set */
- if (!camel_folder_has_search_capability(m->folder)) {
+ if (!camel_folder_has_search_capability (m->folder)) {
/* if we have no search capability, dont let search or hide deleted work */
expr = NULL;
} else if (m->hidedel) {
if (m->hidejunk) {
if (m->search) {
- expr = g_alloca(strlen(m->search) + 92);
+ expr = g_alloca (strlen (m->search) + 92);
sprintf(expr, "(and (match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\"))))\n %s)", m->search);
} else
expr = (gchar *) "(match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\"))))";
} else {
if (m->search) {
- expr = g_alloca(strlen(m->search) + 64);
+ expr = g_alloca (strlen (m->search) + 64);
sprintf(expr, "(and (match-all (not (system-flag \"deleted\")))\n %s)", m->search);
} else
expr = (gchar *) "(match-all (not (system-flag \"deleted\")))";
@@ -4453,7 +4453,7 @@ regen_list_exec (struct _regen_list_msg *m)
} else {
if (m->hidejunk) {
if (m->search) {
- expr = g_alloca(strlen(m->search) + 64);
+ expr = g_alloca (strlen (m->search) + 64);
sprintf(expr, "(and (match-all (not (system-flag \"junk\")))\n %s)", m->search);
} else
expr = (gchar *) "(match-all (not (system-flag \"junk\")))";
@@ -4512,7 +4512,7 @@ regen_list_exec (struct _regen_list_msg *m)
e_profile_event_emit("list.threaduids", m->folder->full_name, 0);
/* camel_folder_summary_prepare_fetch_all (m->folder->summary, NULL); */
- if (!camel_operation_cancel_check(m->base.cancel)) {
+ if (!camel_operation_cancel_check (m->base.cancel)) {
/* update/build a new tree */
if (m->dotree) {
ml_sort_uids_by_tree (m->ml, uids);
@@ -4531,7 +4531,7 @@ regen_list_exec (struct _regen_list_msg *m)
for (i = 0; i < uids->len; i++) {
info = camel_folder_get_message_info (m->folder, uids->pdata[i]);
if (info)
- g_ptr_array_add(m->summary, info);
+ g_ptr_array_add (m->summary, info);
}
}
@@ -4555,7 +4555,7 @@ regen_list_done (struct _regen_list_msg *m)
if (!m->complete)
return;
- if (camel_operation_cancel_check(m->base.cancel))
+ if (camel_operation_cancel_check (m->base.cancel))
return;
if (m->ml->folder != m->folder)
@@ -4586,7 +4586,7 @@ regen_list_done (struct _regen_list_msg *m)
build_tree (m->ml, m->tree, m->changes);
if (m->ml->thread_tree)
- camel_folder_thread_messages_unref(m->ml->thread_tree);
+ camel_folder_thread_messages_unref (m->ml->thread_tree);
m->ml->thread_tree = m->tree;
m->tree = NULL;
@@ -4609,7 +4609,7 @@ regen_list_done (struct _regen_list_msg *m)
m->search = NULL;
g_mutex_lock (m->ml->regen_lock);
- m->ml->regen = g_list_remove(m->ml->regen, m);
+ m->ml->regen = g_list_remove (m->ml->regen, m);
g_mutex_unlock (m->ml->regen_lock);
if (m->ml->regen == NULL && m->ml->pending_select_uid) {
@@ -4620,7 +4620,7 @@ regen_list_done (struct _regen_list_msg *m)
m->ml->pending_select_uid = NULL;
with_fallback = m->ml->pending_select_fallback;
message_list_select_uid (m->ml, uid, with_fallback);
- g_free(uid);
+ g_free (uid);
} else if (m->ml->regen == NULL && m->ml->cursor_uid == NULL && m->last_row != -1) {
ETreeTableAdapter *etta = e_tree_get_table_adapter (tree);
@@ -4653,7 +4653,7 @@ regen_list_done (struct _regen_list_msg *m)
m->ml->priv->any_row_changed = FALSE;
#if HAVE_CLUTTER
- if (m->ml->priv->timeline && clutter_timeline_is_playing(m->ml->priv->timeline)) {
+ if (m->ml->priv->timeline && clutter_timeline_is_playing (m->ml->priv->timeline)) {
clutter_timeline_pause (m->ml->priv->timeline);
clutter_actor_hide (m->ml->priv->search_texture);
} else {
@@ -4695,13 +4695,13 @@ regen_list_free (struct _regen_list_msg *m)
/* we have to poke this here as well since we might've been cancelled and regened wont get called */
g_mutex_lock (m->ml->regen_lock);
- m->ml->regen = g_list_remove(m->ml->regen, m);
+ m->ml->regen = g_list_remove (m->ml->regen, m);
g_mutex_unlock (m->ml->regen_lock);
if (m->expand_state)
xmlFreeDoc (m->expand_state);
- g_object_unref(m->ml);
+ g_object_unref (m->ml);
}
static MailMsgInfo regen_list_info = {
@@ -4713,12 +4713,12 @@ static MailMsgInfo regen_list_info = {
};
static gboolean
-ml_regen_timeout(struct _regen_list_msg *m)
+ml_regen_timeout (struct _regen_list_msg *m)
{
e_profile_event_emit("list.regenerate", m->folder->full_name, 0);
g_mutex_lock (m->ml->regen_lock);
- m->ml->regen = g_list_prepend(m->ml->regen, m);
+ m->ml->regen = g_list_prepend (m->ml->regen, m);
g_mutex_unlock (m->ml->regen_lock);
/* TODO: we should manage our own thread stuff, would make cancelling outstanding stuff easier */
mail_msg_fast_ordered_push (m);
@@ -4730,7 +4730,7 @@ ml_regen_timeout(struct _regen_list_msg *m)
}
static void
-mail_regen_cancel(MessageList *ml)
+mail_regen_cancel (MessageList *ml)
{
/* cancel any outstanding regeneration requests, not we don't clear, they clear themselves */
if (ml->regen) {
@@ -4743,7 +4743,7 @@ mail_regen_cancel(MessageList *ml)
MailMsg *mm = l->data;
if (mm->cancel)
- camel_operation_cancel(mm->cancel);
+ camel_operation_cancel (mm->cancel);
l = l->next;
}
@@ -4752,9 +4752,9 @@ mail_regen_cancel(MessageList *ml)
/* including unqueued ones */
if (ml->regen_timeout_id) {
- g_source_remove(ml->regen_timeout_id);
+ g_source_remove (ml->regen_timeout_id);
ml->regen_timeout_id = 0;
- mail_msg_unref(ml->regen_timeout_msg);
+ mail_msg_unref (ml->regen_timeout_msg);
ml->regen_timeout_msg = NULL;
}
}
@@ -4771,13 +4771,13 @@ mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, Ca
if (ml->folder == NULL) {
if (ml->search != search) {
- g_free(ml->search);
- ml->search = g_strdup(search);
+ g_free (ml->search);
+ ml->search = g_strdup (search);
}
return;
}
- mail_regen_cancel(ml);
+ mail_regen_cancel (ml);
gconf = mail_config_get_gconf_client ();
@@ -4787,8 +4787,8 @@ mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, Ca
/* see if we need to goto the child thread at all anyway */
/* currently the only case is the flat view with updates and no search */
if (hideexpr == NULL && search == NULL && changes != NULL && !ml->threaded) {
- build_flat_diff(ml, changes);
- camel_folder_change_info_free(changes);
+ build_flat_diff (ml, changes);
+ camel_folder_change_info_free (changes);
return;
}
#endif
@@ -4807,11 +4807,11 @@ mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, Ca
m->expand_state = NULL;
if ((!m->hidedel || !m->dotree) && ml->thread_tree) {
- camel_folder_thread_messages_unref(ml->thread_tree);
+ camel_folder_thread_messages_unref (ml->thread_tree);
ml->thread_tree = NULL;
} else if (ml->thread_tree) {
m->tree = ml->thread_tree;
- camel_folder_thread_messages_ref(m->tree);
+ camel_folder_thread_messages_ref (m->tree);
}
if (e_tree_row_count (E_TREE (ml)) <= 0) {
@@ -4834,9 +4834,9 @@ mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, Ca
/* if we're busy already kick off timeout processing, so normal updates are immediate */
if (ml->regen == NULL)
- ml_regen_timeout(m);
+ ml_regen_timeout (m);
else {
ml->regen_timeout_msg = m;
- ml->regen_timeout_id = g_timeout_add(500, (GSourceFunc)ml_regen_timeout, m);
+ ml->regen_timeout_id = g_timeout_add (500, (GSourceFunc)ml_regen_timeout, m);
}
}
diff --git a/plugins/attachment-reminder/attachment-reminder.c b/plugins/attachment-reminder/attachment-reminder.c
index f93467b8de..25b0ddb514 100644
--- a/plugins/attachment-reminder/attachment-reminder.c
+++ b/plugins/attachment-reminder/attachment-reminder.c
@@ -115,17 +115,17 @@ ask_for_missing_attachment (EPlugin *ep, GtkWindow *window)
/*Check buttons*/
check = gtk_check_button_new_with_mnemonic (_("_Do not show this message again."));
- gtk_container_set_border_width((GtkContainer *)check, 12);
+ gtk_container_set_border_width ((GtkContainer *)check, 12);
content_area = gtk_dialog_get_content_area (dialog);
gtk_box_pack_start (GTK_BOX (content_area), check, TRUE, TRUE, 0);
gtk_widget_show (check);
response = gtk_dialog_run ((GtkDialog *) dialog);
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)))
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)))
e_plugin_enable (ep, FALSE);
- gtk_widget_destroy((GtkWidget *)dialog);
+ gtk_widget_destroy ((GtkWidget *)dialog);
if (response == GTK_RESPONSE_OK)
gtk_action_activate (E_COMPOSER_ACTION_ATTACH (window));
@@ -151,7 +151,7 @@ check_for_attachment_clues (gchar *msg)
g_object_unref (gconf);
msg_length = strlen (msg);
- for (list = clue_list;list && !ret_val;list=g_slist_next(list)) {
+ for (list = clue_list;list && !ret_val;list=g_slist_next (list)) {
gchar *needle = g_utf8_strdown (list->data, -1);
if (g_strstr_len (msg, msg_length, needle)) {
ret_val = TRUE;
@@ -226,7 +226,7 @@ commit_changes (UIData *ui)
model, &iter, CLUE_KEYWORD_COLUMN, &keyword, -1);
/* Check if the keyword is not empty */
- if ((keyword) && (g_utf8_strlen(g_strstrip(keyword), -1) > 0))
+ if ((keyword) && (g_utf8_strlen (g_strstrip (keyword), -1) > 0))
clue_list = g_slist_append (clue_list, keyword);
valid = gtk_tree_model_iter_next (model, &iter);
}
@@ -305,17 +305,17 @@ clue_remove_clicked (GtkButton *button, UIData *ui)
/* Get the path and move to the previous node :) */
path = gtk_tree_model_get_path (model, &iter);
if (path)
- valid = gtk_tree_path_prev(path);
+ valid = gtk_tree_path_prev (path);
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
len = gtk_tree_model_iter_n_children (model, NULL);
if (len > 0) {
- if (gtk_list_store_iter_is_valid (GTK_LIST_STORE(model), &iter)) {
+ if (gtk_list_store_iter_is_valid (GTK_LIST_STORE (model), &iter)) {
gtk_tree_selection_select_iter (selection, &iter);
} else {
if (path && valid) {
- gtk_tree_model_get_iter(model, &iter, path);
+ gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_selection_select_iter (selection, &iter);
}
}
@@ -324,7 +324,7 @@ clue_remove_clicked (GtkButton *button, UIData *ui)
gtk_widget_set_sensitive (ui->clue_remove, FALSE);
}
- gtk_widget_grab_focus(ui->treeview);
+ gtk_widget_grab_focus (ui->treeview);
gtk_tree_path_free (path);
commit_changes (ui);
@@ -385,7 +385,7 @@ e_plugin_lib_get_configure_widget (EPlugin *plugin)
GtkCellRenderer *renderer;
GtkTreeSelection *selection;
GtkTreeIter iter;
- GConfClient *gconf = gconf_client_get_default();
+ GConfClient *gconf = gconf_client_get_default ();
GtkWidget *hbox;
GSList *clue_list = NULL, *list;
diff --git a/plugins/audio-inline/audio-inline.c b/plugins/audio-inline/audio-inline.c
index 46f345974f..994e25b267 100644
--- a/plugins/audio-inline/audio-inline.c
+++ b/plugins/audio-inline/audio-inline.c
@@ -164,7 +164,7 @@ org_gnome_audio_inline_gst_callback (GstBus * bus, GstMessage * message, gpointe
{
GstState old_state, new_state;
- if (GST_MESSAGE_SRC(message) != GST_OBJECT (po->playbin))
+ if (GST_MESSAGE_SRC (message) != GST_OBJECT (po->playbin))
break;
gst_message_parse_state_changed (message, &old_state, &new_state, NULL);
@@ -231,7 +231,7 @@ org_gnome_audio_inline_play_clicked (GtkWidget *button, EMFormatHTMLPObject *pob
uri = g_filename_to_uri (po->filename, NULL, NULL);
g_object_set (G_OBJECT (po->playbin), "uri", uri, NULL);
g_free (uri);
- org_gnome_audio_inline_set_audiosink(po->playbin);
+ org_gnome_audio_inline_set_audiosink (po->playbin);
bus = gst_element_get_bus (po->playbin);
po->bus_id = gst_bus_add_watch (bus, org_gnome_audio_inline_gst_callback, po);
@@ -260,7 +260,7 @@ org_gnome_audio_inline_add_button (GtkWidget *box, const gchar *stock_icon, GCal
{
GtkWidget *button;
- button = gtk_button_new_from_stock(stock_icon);
+ button = gtk_button_new_from_stock (stock_icon);
gtk_widget_set_sensitive (button, sensitive);
g_signal_connect (button, "clicked", cb, data);
@@ -299,7 +299,7 @@ org_gnome_audio_inline_format (gpointer ep, EMFormatHookTarget *t)
d(printf ("audio inline formatter: format classid %s\n", classid));
- pobj = (struct _org_gnome_audio_inline_pobject *) em_format_html_add_pobject ((EMFormatHTML *) t->format, sizeof(*pobj), classid,
+ pobj = (struct _org_gnome_audio_inline_pobject *) em_format_html_add_pobject ((EMFormatHTML *) t->format, sizeof (*pobj), classid,
t->part, org_gnome_audio_inline_button_panel);
g_object_ref (t->part);
pobj->part = t->part;
diff --git a/plugins/backup-restore/backup-restore.c b/plugins/backup-restore/backup-restore.c
index 87feab7a25..283079d84d 100644
--- a/plugins/backup-restore/backup-restore.c
+++ b/plugins/backup-restore/backup-restore.c
@@ -84,7 +84,7 @@ sanity_check (const gchar *filename)
gint result;
gchar *quotedfname, *toolfname;
- quotedfname = g_shell_quote(filename);
+ quotedfname = g_shell_quote (filename);
toolfname = g_build_filename (EVOLUTION_TOOLSDIR, "evolution-backup", NULL);
command = g_strdup_printf("%s --check %s", toolfname, quotedfname);
@@ -103,7 +103,7 @@ sanity_check (const gchar *filename)
}
static guint32
-dialog_prompt_user(GtkWindow *parent, const gchar *string, const gchar *tag, ...)
+dialog_prompt_user (GtkWindow *parent, const gchar *string, const gchar *tag, ...)
{
GtkWidget *mbox, *check = NULL;
va_list ap;
@@ -111,9 +111,9 @@ dialog_prompt_user(GtkWindow *parent, const gchar *string, const gchar *tag, ...
guint32 mask = 0;
EAlert *alert = NULL;
- va_start(ap, tag);
- alert = e_alert_new_valist(tag, ap);
- va_end(ap);
+ va_start (ap, tag);
+ alert = e_alert_new_valist (tag, ap);
+ va_end (ap);
mbox = e_alert_dialog_new (parent, alert);
g_object_unref (alert);
@@ -121,7 +121,7 @@ dialog_prompt_user(GtkWindow *parent, const gchar *string, const gchar *tag, ...
check = gtk_check_button_new_with_mnemonic (string);
/* We should hardcode this to true */
gtk_toggle_button_set_active ((GtkToggleButton *)check, TRUE);
- gtk_container_set_border_width((GtkContainer *)check, 12);
+ gtk_container_set_border_width ((GtkContainer *)check, 12);
gtk_box_pack_start ((GtkBox *)gtk_dialog_get_content_area ((GtkDialog *) mbox), check, TRUE, TRUE, 0);
gtk_widget_show (check);
@@ -129,10 +129,10 @@ dialog_prompt_user(GtkWindow *parent, const gchar *string, const gchar *tag, ...
if (button == GTK_RESPONSE_YES)
mask |= BR_OK;
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)))
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)))
mask |= BR_START;
- gtk_widget_destroy(mbox);
+ gtk_widget_destroy (mbox);
return mask;
}
diff --git a/plugins/backup-restore/backup.c b/plugins/backup-restore/backup.c
index 5b39374b58..104afe7166 100644
--- a/plugins/backup-restore/backup.c
+++ b/plugins/backup-restore/backup.c
@@ -183,7 +183,7 @@ backup (const gchar *filename)
gchar *quotedfname;
g_return_if_fail (filename && *filename);
- quotedfname = g_shell_quote(filename);
+ quotedfname = g_shell_quote (filename);
CANCEL (complete);
txt = _("Shutting down Evolution");
@@ -244,7 +244,7 @@ restore (const gchar *filename)
return;
}
- quotedfname = g_shell_quote(filename);
+ quotedfname = g_shell_quote (filename);
/* FIXME Will the versioned setting always work? */
CANCEL (complete);
@@ -296,7 +296,7 @@ check (const gchar *filename)
gchar *quotedfname;
g_return_val_if_fail (filename && *filename, FALSE);
- quotedfname = g_shell_quote(filename);
+ quotedfname = g_shell_quote (filename);
command = g_strdup_printf ("tar ztf %s 1>/dev/null", quotedfname);
result = system (command);
@@ -353,11 +353,11 @@ thread_start (gpointer data)
complete = TRUE;
- return GINT_TO_POINTER(result);
+ return GINT_TO_POINTER (result);
}
static gboolean
-idle_cb(gpointer data)
+idle_cb (gpointer data)
{
if (gui_arg) {
/* Show progress dialog */
@@ -476,7 +476,7 @@ main (gint argc, gchar **argv)
gtk_container_set_border_width (GTK_CONTAINER (action_area), 0);
if (oper && file)
- str = g_strdup_printf(oper, file);
+ str = g_strdup_printf (oper, file);
container = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (container), 12);
diff --git a/plugins/bogo-junk-plugin/bf-junk-filter.c b/plugins/bogo-junk-plugin/bf-junk-filter.c
index 2bd72f96cd..c335f6d46f 100644
--- a/plugins/bogo-junk-plugin/bf-junk-filter.c
+++ b/plugins/bogo-junk-plugin/bf-junk-filter.c
@@ -205,7 +205,7 @@ retry:
if (!only_once) {
/* Create wordlist.db */
only_once = TRUE;
- init_db();
+ init_db ();
goto retry;
}
@@ -350,7 +350,7 @@ e_plugin_lib_enable (EPlugin *ep, gint enable)
return 0;
first = FALSE;
- gconf = gconf_client_get_default();
+ gconf = gconf_client_get_default ();
gconf_client_add_dir (gconf,
em_junk_bf_gconf_dir,
@@ -375,7 +375,7 @@ convert_unicode_cb (GtkWidget *widget, gpointer data)
{
gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
- GConfClient *gconf = gconf_client_get_default();
+ GConfClient *gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, data, active, NULL);
diff --git a/plugins/contacts-map/contacts-map.c b/plugins/contacts-map/contacts-map.c
index 868930035d..bb46be65e6 100644
--- a/plugins/contacts-map/contacts-map.c
+++ b/plugins/contacts-map/contacts-map.c
@@ -150,8 +150,8 @@ show_map_general (ESourceSelector *selector)
/* Get the lat & lng and add the marker asynchronously */
i = 0;
addr = NULL;
- while (!addr && i<G_N_ELEMENTS(addr_fields)) {
- addr = e_contact_get(contact, addr_fields[i]);
+ while (!addr && i<G_N_ELEMENTS (addr_fields)) {
+ addr = e_contact_get (contact, addr_fields[i]);
i++;
}
@@ -169,7 +169,7 @@ show_map_general (ESourceSelector *selector)
*min_lat = lat;
}
if (!max_lat) {
- max_lat = g_malloc (sizeof(gdouble));
+ max_lat = g_malloc (sizeof (gdouble));
*max_lat = lat;
}
if (!min_lng) {
diff --git a/plugins/contacts-map/geo-utils.c b/plugins/contacts-map/geo-utils.c
index 1168e38562..ec36b33ab2 100644
--- a/plugins/contacts-map/geo-utils.c
+++ b/plugins/contacts-map/geo-utils.c
@@ -52,7 +52,7 @@ add_marker (ChamplainLayer *layer, gdouble lat, gdouble lng, EContact *contact)
champlain_marker_set_use_markup (CHAMPLAIN_MARKER (marker), FALSE);
champlain_base_marker_set_position (CHAMPLAIN_BASE_MARKER (marker), lat, lng);
- champlain_layer_add_marker (layer, CHAMPLAIN_BASE_MARKER(marker));
+ champlain_layer_add_marker (layer, CHAMPLAIN_BASE_MARKER (marker));
}
GeoclueGeocode*
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index 2af13a9cd5..c1a0bf651c 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -164,11 +164,11 @@ org_gnome_evolution_readdbx_supported (EPlugin *epl, EImportTarget *target)
if (fd != -1) {
n = read (fd, signature, sizeof (signature));
if (n == sizeof (signature)) {
- if (!memcmp(signature, oe56_mbox_sig, sizeof(oe56_mbox_sig))) {
+ if (!memcmp (signature, oe56_mbox_sig, sizeof (oe56_mbox_sig))) {
ret = TRUE;
- } else if (!memcmp(signature, oe56_flist_sig, sizeof(oe56_flist_sig))) {
+ } else if (!memcmp (signature, oe56_flist_sig, sizeof (oe56_flist_sig))) {
d(printf("Found DBX folder list file\n"));
- } else if (!memcmp(signature, oe4_mbox_sig, sizeof(oe4_mbox_sig))) {
+ } else if (!memcmp (signature, oe4_mbox_sig, sizeof (oe4_mbox_sig))) {
d(printf("Found OE4 DBX file\n"));
}
}
@@ -179,14 +179,14 @@ org_gnome_evolution_readdbx_supported (EPlugin *epl, EImportTarget *target)
}
static void
-folder_selected(EMFolderSelectionButton *button, EImportTargetURI *target)
+folder_selected (EMFolderSelectionButton *button, EImportTargetURI *target)
{
- g_free(target->uri_dest);
- target->uri_dest = g_strdup(em_folder_selection_button_get_selection(button));
+ g_free (target->uri_dest);
+ target->uri_dest = g_strdup (em_folder_selection_button_get_selection (button));
}
GtkWidget *
-org_gnome_evolution_readdbx_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
+org_gnome_evolution_readdbx_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *hbox, *w;
GtkLabel *label;
@@ -221,24 +221,24 @@ org_gnome_evolution_readdbx_getwidget(EImport *ei, EImportTarget *target, EImpor
if (!select_uri)
select_uri = g_strdup (e_mail_local_get_folder_uri (E_MAIL_FOLDER_INBOX));
- hbox = gtk_hbox_new(FALSE, 0);
+ hbox = gtk_hbox_new (FALSE, 0);
w = gtk_label_new_with_mnemonic (_("_Destination folder:"));
- gtk_box_pack_start((GtkBox *)hbox, w, FALSE, TRUE, 6);
+ gtk_box_pack_start ((GtkBox *)hbox, w, FALSE, TRUE, 6);
label = GTK_LABEL (w);
- w = em_folder_selection_button_new(
+ w = em_folder_selection_button_new (
_("Select folder"), _("Select folder to import OE folder into"));
gtk_label_set_mnemonic_widget (label, w);
em_folder_selection_button_set_selection ((EMFolderSelectionButton *)w, select_uri);
folder_selected ((EMFolderSelectionButton *)w, (EImportTargetURI *)target);
g_signal_connect (w, "selected", G_CALLBACK(folder_selected), target);
- gtk_box_pack_start((GtkBox *)hbox, w, FALSE, TRUE, 6);
+ gtk_box_pack_start ((GtkBox *)hbox, w, FALSE, TRUE, 6);
- w = gtk_vbox_new(FALSE, 0);
- gtk_box_pack_start((GtkBox *)w, hbox, FALSE, FALSE, 0);
- gtk_widget_show_all(w);
+ w = gtk_vbox_new (FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)w, hbox, FALSE, FALSE, 0);
+ gtk_widget_show_all (w);
g_free (select_uri);
@@ -290,14 +290,14 @@ struct _dbx_block_hdrstruct {
guint32 nextaddress;
};
-static gint dbx_pread(gint fd, gpointer buf, guint32 count, guint32 offset)
+static gint dbx_pread (gint fd, gpointer buf, guint32 count, guint32 offset)
{
- if (lseek(fd, offset, SEEK_SET) != offset)
+ if (lseek (fd, offset, SEEK_SET) != offset)
return -1;
- return read(fd, buf, count);
+ return read (fd, buf, count);
}
-static gboolean dbx_load_index_table(DbxImporter *m, guint32 pos, guint32 *index_ofs)
+static gboolean dbx_load_index_table (DbxImporter *m, guint32 pos, guint32 *index_ofs)
{
struct _dbx_tableindexstruct tindex;
struct _dbx_indexstruct index;
@@ -305,15 +305,15 @@ static gboolean dbx_load_index_table(DbxImporter *m, guint32 pos, guint32 *index
d(printf("Loading index table at 0x%x\n", pos));
- if (dbx_pread(m->dbx_fd, &tindex, sizeof(tindex), pos) != sizeof(tindex)) {
+ if (dbx_pread (m->dbx_fd, &tindex, sizeof (tindex), pos) != sizeof (tindex)) {
g_set_error (
&m->base.error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
"Failed to read table index from DBX file");
return FALSE;
}
- tindex.anotherTablePtr = GUINT32_FROM_LE(tindex.anotherTablePtr);
- tindex.self = GUINT32_FROM_LE(tindex.self);
- tindex.indexCount = GUINT32_FROM_LE(tindex.indexCount);
+ tindex.anotherTablePtr = GUINT32_FROM_LE (tindex.anotherTablePtr);
+ tindex.self = GUINT32_FROM_LE (tindex.self);
+ tindex.indexCount = GUINT32_FROM_LE (tindex.indexCount);
if (tindex.self != pos) {
g_set_error (
@@ -326,25 +326,25 @@ static gboolean dbx_load_index_table(DbxImporter *m, guint32 pos, guint32 *index
d(printf("Index at %x: indexCount %x, anotherTablePtr %x\n", pos, tindex.indexCount, tindex.anotherTablePtr));
if (tindex.indexCount > 0) {
- if (!dbx_load_index_table(m, tindex.anotherTablePtr, index_ofs))
+ if (!dbx_load_index_table (m, tindex.anotherTablePtr, index_ofs))
return FALSE;
}
d(printf("Index at %x has ptrCount %d\n", pos, tindex.ptrCount));
- pos += sizeof(tindex);
+ pos += sizeof (tindex);
for (i = 0; i < tindex.ptrCount; i++) {
- if (dbx_pread(m->dbx_fd, &index, sizeof(index), pos) != sizeof(index)) {
+ if (dbx_pread (m->dbx_fd, &index, sizeof (index), pos) != sizeof (index)) {
g_set_error (
&m->base.error,
CAMEL_ERROR, CAMEL_ERROR_GENERIC,
"Failed to read index entry from DBX file");
return FALSE;
}
- index.indexptr = GUINT32_FROM_LE(index.indexptr);
- index.anotherTablePtr = GUINT32_FROM_LE(index.anotherTablePtr);
- index.indexCount = GUINT32_FROM_LE(index.indexCount);
+ index.indexptr = GUINT32_FROM_LE (index.indexptr);
+ index.anotherTablePtr = GUINT32_FROM_LE (index.anotherTablePtr);
+ index.indexCount = GUINT32_FROM_LE (index.indexCount);
if (*index_ofs == m->index_count) {
g_set_error (
@@ -357,39 +357,39 @@ static gboolean dbx_load_index_table(DbxImporter *m, guint32 pos, guint32 *index
}
m->indices[(*index_ofs)++] = index.indexptr;
if (index.indexCount > 0) {
- if (!dbx_load_index_table(m, index.anotherTablePtr, index_ofs))
+ if (!dbx_load_index_table (m, index.anotherTablePtr, index_ofs))
return FALSE;
}
- pos += sizeof(index);
+ pos += sizeof (index);
}
return TRUE;
}
-static gboolean dbx_load_indices(DbxImporter *m)
+static gboolean dbx_load_indices (DbxImporter *m)
{
guint indexptr, itemcount;
guint32 index_ofs = 0;
- if (dbx_pread(m->dbx_fd, &indexptr, 4, INDEX_POINTER) != 4) {
+ if (dbx_pread (m->dbx_fd, &indexptr, 4, INDEX_POINTER) != 4) {
g_set_error (
&m->base.error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
"Failed to read first index pointer from DBX file");
return FALSE;
}
- if (dbx_pread(m->dbx_fd, &itemcount, 4, ITEM_COUNT) != 4) {
+ if (dbx_pread (m->dbx_fd, &itemcount, 4, ITEM_COUNT) != 4) {
g_set_error (
&m->base.error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
"Failed to read item count from DBX file");
return FALSE;
}
- indexptr = GUINT32_FROM_LE(indexptr);
- m->index_count = itemcount = GUINT32_FROM_LE(itemcount);
- m->indices = g_malloc(itemcount * 4);
+ indexptr = GUINT32_FROM_LE (indexptr);
+ m->index_count = itemcount = GUINT32_FROM_LE (itemcount);
+ m->indices = g_malloc (itemcount * 4);
d(printf("indexptr %x, itemcount %d\n", indexptr, itemcount));
- if (indexptr && !dbx_load_index_table(m, indexptr, &index_ofs))
+ if (indexptr && !dbx_load_index_table (m, indexptr, &index_ofs))
return FALSE;
d(printf("Loaded %d of %d indices\n", index_ofs, m->index_count));
@@ -412,15 +412,15 @@ dbx_read_mail_body (DbxImporter *m, guint32 offset, gint bodyfd)
struct _dbx_block_hdrstruct hdr;
guint32 buflen = 0x200;
- guchar *buffer = g_malloc(buflen);
+ guchar *buffer = g_malloc (buflen);
- ftruncate(bodyfd, 0);
- lseek(bodyfd, 0, SEEK_SET);
+ ftruncate (bodyfd, 0);
+ lseek (bodyfd, 0, SEEK_SET);
while (offset) {
d(printf("Reading mail data chunk from %x\n", offset));
- if (dbx_pread(m->dbx_fd, &hdr, sizeof(hdr), offset) != sizeof(hdr)) {
+ if (dbx_pread (m->dbx_fd, &hdr, sizeof (hdr), offset) != sizeof (hdr)) {
g_set_error (
&m->base.error,
CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -428,9 +428,9 @@ dbx_read_mail_body (DbxImporter *m, guint32 offset, gint bodyfd)
"DBX file at offset %x", offset);
return FALSE;
}
- hdr.self = GUINT32_FROM_LE(hdr.self);
- hdr.blocksize = GUINT16_FROM_LE(hdr.blocksize);
- hdr.nextaddress = GUINT32_FROM_LE(hdr.nextaddress);
+ hdr.self = GUINT32_FROM_LE (hdr.self);
+ hdr.blocksize = GUINT16_FROM_LE (hdr.blocksize);
+ hdr.nextaddress = GUINT32_FROM_LE (hdr.nextaddress);
if (hdr.self != offset) {
g_set_error (
@@ -442,21 +442,21 @@ dbx_read_mail_body (DbxImporter *m, guint32 offset, gint bodyfd)
}
if (hdr.blocksize > buflen) {
- g_free(buffer);
+ g_free (buffer);
buflen = hdr.blocksize;
- buffer = g_malloc(buflen);
+ buffer = g_malloc (buflen);
}
d(printf("Reading %d bytes from %lx\n", hdr.blocksize, offset + sizeof(hdr)));
- if (dbx_pread(m->dbx_fd, buffer, hdr.blocksize, offset + sizeof(hdr)) != hdr.blocksize) {
+ if (dbx_pread (m->dbx_fd, buffer, hdr.blocksize, offset + sizeof (hdr)) != hdr.blocksize) {
g_set_error (
&m->base.error,
CAMEL_ERROR, CAMEL_ERROR_GENERIC,
"Failed to read mail data from DBX file "
"at offset %lx",
- (long)(offset + sizeof(hdr)));
+ (long)(offset + sizeof (hdr)));
return FALSE;
}
- if (write(bodyfd, buffer, hdr.blocksize) != hdr.blocksize) {
+ if (write (bodyfd, buffer, hdr.blocksize) != hdr.blocksize) {
g_set_error (
&m->base.error,
CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -476,15 +476,15 @@ dbx_read_email (DbxImporter *m, guint32 offset, gint bodyfd, gint *flags)
guint32 dataptr = 0;
gint i;
- if (dbx_pread(m->dbx_fd, &hdr, sizeof(hdr), offset) != sizeof(hdr)) {
+ if (dbx_pread (m->dbx_fd, &hdr, sizeof (hdr), offset) != sizeof (hdr)) {
g_set_error (
&m->base.error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
"Failed to read mail header from DBX file at offset %x",
offset);
return FALSE;
}
- hdr.self = GUINT32_FROM_LE(hdr.self);
- hdr.size = GUINT32_FROM_LE(hdr.size);
+ hdr.self = GUINT32_FROM_LE (hdr.self);
+ hdr.size = GUINT32_FROM_LE (hdr.size);
if (hdr.self != offset) {
g_set_error (
@@ -493,14 +493,14 @@ dbx_read_email (DbxImporter *m, guint32 offset, gint bodyfd, gint *flags)
"point to itself", offset);
return FALSE;
}
- buffer = g_malloc(hdr.size);
- offset += sizeof(hdr);
- if (dbx_pread(m->dbx_fd, buffer, hdr.size, offset) != hdr.size) {
+ buffer = g_malloc (hdr.size);
+ offset += sizeof (hdr);
+ if (dbx_pread (m->dbx_fd, buffer, hdr.size, offset) != hdr.size) {
g_set_error (
&m->base.error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
"Failed to read mail data block from DBX file "
"at offset %x", offset);
- g_free(buffer);
+ g_free (buffer);
return FALSE;
}
@@ -518,7 +518,7 @@ dbx_read_email (DbxImporter *m, guint32 offset, gint bodyfd, gint *flags)
d(printf("Got type 0x81 flags %02x\n", *flags));
break;
case 0x04:
- dataptr = GUINT32_FROM_LE(*(guint32 *)(buffer + hdr.count*4 + val));
+ dataptr = GUINT32_FROM_LE (*(guint32 *)(buffer + hdr.count*4 + val));
d(printf("Got type 0x04 data pointer %x\n", dataptr));
break;
case 0x84:
@@ -531,12 +531,12 @@ dbx_read_email (DbxImporter *m, guint32 offset, gint bodyfd, gint *flags)
break;
}
}
- g_free(buffer);
+ g_free (buffer);
if (!dataptr)
return FALSE;
- return dbx_read_mail_body(m, dataptr, bodyfd);
+ return dbx_read_mail_body (m, dataptr, bodyfd);
}
static void
@@ -557,7 +557,7 @@ dbx_import_file (DbxImporter *m)
return;
d(printf("importing to %s\n", camel_folder_get_full_name(folder)));
- camel_folder_freeze(folder);
+ camel_folder_freeze (folder);
filename = g_filename_from_uri (((EImportTargetURI *)m->target)->uri_src, NULL, NULL);
m->dbx_fd = g_open (filename, O_RDONLY, 0);
@@ -570,7 +570,7 @@ dbx_import_file (DbxImporter *m)
goto out;
}
- if (!dbx_load_indices(m))
+ if (!dbx_load_indices (m))
goto out;
tmpfile = e_mkstemp("dbx-import-XXXXXX");
@@ -589,10 +589,10 @@ dbx_import_file (DbxImporter *m)
gint flags = 0;
gboolean success;
- camel_operation_progress(NULL, 100 * i / m->index_count);
- camel_operation_progress(m->status, 100 * i / m->index_count);
+ camel_operation_progress (NULL, 100 * i / m->index_count);
+ camel_operation_progress (m->status, 100 * i / m->index_count);
- if (!dbx_read_email(m, m->indices[i], tmpfile, &dbx_flags)) {
+ if (!dbx_read_email (m, m->indices[i], tmpfile, &dbx_flags)) {
d(printf("Cannot read email index %d at %x\n",
i, m->indices[i]));
if (m->base.error != NULL)
@@ -607,39 +607,39 @@ dbx_import_file (DbxImporter *m)
if (dbx_flags & 0x80000)
flags |= CAMEL_MESSAGE_ANSWERED;
- mp = camel_mime_parser_new();
+ mp = camel_mime_parser_new ();
- lseek(tmpfile, 0, SEEK_SET);
- camel_mime_parser_init_with_fd(mp, tmpfile);
+ lseek (tmpfile, 0, SEEK_SET);
+ camel_mime_parser_init_with_fd (mp, tmpfile);
- msg = camel_mime_message_new();
- if (camel_mime_part_construct_from_parser((CamelMimePart *)msg, mp, NULL) == -1) {
+ msg = camel_mime_message_new ();
+ if (camel_mime_part_construct_from_parser ((CamelMimePart *)msg, mp, NULL) == -1) {
/* set exception? */
g_object_unref (msg);
g_object_unref (mp);
break;
}
- info = camel_message_info_new(NULL);
- camel_message_info_set_flags(info, flags, ~0);
+ info = camel_message_info_new (NULL);
+ camel_message_info_set_flags (info, flags, ~0);
success = camel_folder_append_message (
folder, msg, info, NULL, &m->base.error);
- camel_message_info_free(info);
+ camel_message_info_free (info);
g_object_unref (msg);
if (!success) {
- g_object_unref(mp);
+ g_object_unref (mp);
break;
}
}
out:
if (m->dbx_fd != -1)
- close(m->dbx_fd);
+ close (m->dbx_fd);
if (m->indices)
- g_free(m->indices);
- camel_folder_sync(folder, FALSE, NULL);
- camel_folder_thaw(folder);
- g_object_unref(folder);
+ g_free (m->indices);
+ camel_folder_sync (folder, FALSE, NULL);
+ camel_folder_thaw (folder);
+ g_object_unref (folder);
if (missing && m->base.error == NULL) {
g_set_error (
&m->base.error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -647,7 +647,7 @@ dbx_import_file (DbxImporter *m)
"bodies were not present in the DBX file",
m->index_count - missing, missing);
}
- camel_operation_end(NULL);
+ camel_operation_end (NULL);
}
static void
diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c
index b78474d78b..94cc793d25 100644
--- a/plugins/email-custom-header/email-custom-header.c
+++ b/plugins/email-custom-header/email-custom-header.c
@@ -73,11 +73,11 @@ static void epech_dialog_finalize (GObject *object);
static void epech_dialog_init (GObject *object);
static void epech_dialog_dispose (GObject *object);
static void epech_setup_widgets (CustomHeaderOptionsDialog *mch);
-static gint epech_check_existing_composer_window(gconstpointer a, gconstpointer b);
+static gint epech_check_existing_composer_window (gconstpointer a, gconstpointer b);
static void commit_changes (ConfigData *cd);
gint e_plugin_lib_enable (EPlugin *ep, gint enable);
GtkWidget *e_plugin_lib_get_configure_widget (EPlugin *epl);
-gboolean e_plugin_ui_init(GtkUIManager *ui_manager, EMsgComposer *composer);
+gboolean e_plugin_ui_init (GtkUIManager *ui_manager, EMsgComposer *composer);
GtkWidget *org_gnome_email_custom_header_config_option (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
gint
@@ -101,8 +101,8 @@ epech_get_widgets_data (CustomHeaderOptionsDialog *mch)
for (index_column = 0;
index_column < priv->email_custom_header_details->len; index_column++) {
- sub_combo_box_get = &g_array_index(priv->combo_box_header_value, HeaderValueComboBox,index_column);
- selected_item = gtk_combo_box_get_active((GtkComboBox *)sub_combo_box_get->header_value_combo_box);
+ sub_combo_box_get = &g_array_index (priv->combo_box_header_value, HeaderValueComboBox,index_column);
+ selected_item = gtk_combo_box_get_active ((GtkComboBox *)sub_combo_box_get->header_value_combo_box);
g_array_append_val (priv->header_index_type, selected_item);
}
}
@@ -139,13 +139,13 @@ epech_fill_widgets_with_data (CustomHeaderOptionsDialog *mch)
for (set_index_column = 0;
set_index_column < priv->email_custom_header_details->len;set_index_column++) {
- sub_combo_box_fill = &g_array_index(priv->combo_box_header_value, HeaderValueComboBox,set_index_column);
+ sub_combo_box_fill = &g_array_index (priv->combo_box_header_value, HeaderValueComboBox,set_index_column);
if (priv->flag == 0) {
gtk_combo_box_set_active ((GtkComboBox *)sub_combo_box_fill->header_value_combo_box,0);
} else {
gtk_combo_box_set_active ((GtkComboBox *)sub_combo_box_fill->header_value_combo_box,
- g_array_index(priv->header_index_type, gint, set_index_column));
+ g_array_index (priv->header_index_type, gint, set_index_column));
}
}
}
@@ -227,7 +227,7 @@ epech_dialog_run (CustomHeaderOptionsDialog *mch, GtkWidget *parent)
e_load_ui_builder_definition (
priv->builder, "org-gnome-email-custom-header.ui");
- if (!epech_get_widgets(mch)) {
+ if (!epech_get_widgets (mch)) {
g_object_unref (priv->builder);
d (printf ("\n Could not get the Widgets\n"));
}
@@ -275,27 +275,27 @@ epech_load_from_gconf (GConfClient *client,const gchar *path,CustomHeaderOptions
for (q = header_list,pos = 0; q != NULL; q = q->next,pos++) {
gchar **parse_header_list;
- memset(&temp_header_value_details,0,sizeof(CustomSubHeader));
+ memset (&temp_header_value_details,0,sizeof (CustomSubHeader));
temp_header_details.sub_header_type_value = g_array_new (TRUE, TRUE, sizeof (CustomSubHeader));
buffer = q->data;
parse_header_list = g_strsplit_set (buffer, "=;,", -1);
temp_header_details.header_type_value = g_string_new("");
if (temp_header_details.header_type_value) {
- g_string_assign(temp_header_details.header_type_value, parse_header_list[0]);
+ g_string_assign (temp_header_details.header_type_value, parse_header_list[0]);
}
for (index = 0; parse_header_list[index+1] ; ++index) {
temp_header_value_details.sub_header_string_value = g_string_new("");
if (temp_header_value_details.sub_header_string_value) {
- g_string_assign(temp_header_value_details.sub_header_string_value, parse_header_list[index+1]);
+ g_string_assign (temp_header_value_details.sub_header_string_value, parse_header_list[index+1]);
}
- g_array_append_val(temp_header_details.sub_header_type_value, temp_header_value_details);
+ g_array_append_val (temp_header_details.sub_header_type_value, temp_header_value_details);
}
temp_header_details.number_of_subtype_header = index;
- g_array_append_val(priv->email_custom_header_details, temp_header_details);
+ g_array_append_val (priv->email_custom_header_details, temp_header_details);
}
temp_header_details.number_of_header = pos;
@@ -334,7 +334,7 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch)
/* To create an empty label widget. Text will be added dynamically. */
priv->header_type_name_label = gtk_label_new ("");
- temp_header_ptr = &g_array_index(priv->email_custom_header_details, EmailCustomHeaderDetails,header_section_id);
+ temp_header_ptr = &g_array_index (priv->email_custom_header_details, EmailCustomHeaderDetails,header_section_id);
str = (temp_header_ptr->header_type_value)->str;
if (strcmp (str, security_field) == 0) {
str = _(security_field);
@@ -348,21 +348,21 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch)
gtk_misc_set_alignment (GTK_MISC (priv->header_type_name_label), 0, 0.5);
gtk_widget_show (priv->header_type_name_label);
sub_combo_box.header_value_combo_box = gtk_combo_box_new_text ();
- g_array_append_val(priv->combo_box_header_value, sub_combo_box);
+ g_array_append_val (priv->combo_box_header_value, sub_combo_box);
}
for (sub_index = 0,row_combo = 0,column_combo = 1; sub_index < priv->combo_box_header_value->len;
sub_index++,row_combo++,column_combo++) {
- temp = &g_array_index(priv->email_custom_header_details, EmailCustomHeaderDetails,sub_index);
+ temp = &g_array_index (priv->email_custom_header_details, EmailCustomHeaderDetails,sub_index);
- sub_combo_box_ptr = &g_array_index(priv->combo_box_header_value, HeaderValueComboBox,sub_index);
+ sub_combo_box_ptr = &g_array_index (priv->combo_box_header_value, HeaderValueComboBox,sub_index);
gtk_table_attach (GTK_TABLE (priv->header_table),
sub_combo_box_ptr->header_value_combo_box, 1, 2, row_combo, column_combo,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
for (sub_type_index = 0; sub_type_index < temp->number_of_subtype_header; sub_type_index++) {
- temp_header_value_ptr = &g_array_index(temp->sub_header_type_value, CustomSubHeader,sub_type_index);
+ temp_header_value_ptr = &g_array_index (temp->sub_header_type_value, CustomSubHeader,sub_type_index);
str = (temp_header_value_ptr->sub_header_string_value)->str;
for (i = 0; security_values[i].value != NULL; i++) {
if (strcmp (str, security_values[i].value) == 0) {
@@ -465,12 +465,12 @@ epech_append_to_custom_header (CustomHeaderOptionsDialog *dialog, gint state, gp
for (index_subtype = 0; index_subtype < priv->email_custom_header_details->len; index_subtype++) {
- temp_header_ptr = &g_array_index(priv->email_custom_header_details, EmailCustomHeaderDetails,index_subtype);
+ temp_header_ptr = &g_array_index (priv->email_custom_header_details, EmailCustomHeaderDetails,index_subtype);
for (sub_type_index = 0; sub_type_index < temp_header_ptr->number_of_subtype_header; sub_type_index++) {
- temp_header_value_ptr = &g_array_index(temp_header_ptr->sub_header_type_value, CustomSubHeader,sub_type_index);
+ temp_header_value_ptr = &g_array_index (temp_header_ptr->sub_header_type_value, CustomSubHeader,sub_type_index);
- if (sub_type_index == g_array_index(priv->header_index_type, gint, index_subtype)) {
+ if (sub_type_index == g_array_index (priv->header_index_type, gint, index_subtype)) {
e_msg_composer_modify_header (composer, (temp_header_ptr->header_type_value)->str,
(temp_header_value_ptr->sub_header_string_value)->str);
}
@@ -509,7 +509,7 @@ epech_custom_header_options_commit (EMsgComposer *comp, gpointer user_data)
}
static gint
-epech_check_existing_composer_window(gconstpointer compowindow, gconstpointer other_compowindow)
+epech_check_existing_composer_window (gconstpointer compowindow, gconstpointer other_compowindow)
{
if ((compowindow) && (other_compowindow)) {
if (((EmailCustomHeaderWindow *)compowindow)->epech_window == (GdkWindow *)other_compowindow) {
@@ -546,13 +546,13 @@ static void action_email_custom_header_cb (GtkAction *action, EMsgComposer *comp
new_email_custom_header_window = g_object_get_data ((GObject *) composer, "compowindow");
window = gtk_widget_get_window (menuitem);
- if (epech_check_existing_composer_window(new_email_custom_header_window,window) == 0) {
+ if (epech_check_existing_composer_window (new_email_custom_header_window,window) == 0) {
dialog = new_email_custom_header_window->epech_dialog;
} else {
dialog = epech_dialog_new ();
if (dialog) {
EmailCustomHeaderWindow *new_email_custom_header_window;
- new_email_custom_header_window = g_new0(EmailCustomHeaderWindow, 1);
+ new_email_custom_header_window = g_new0 (EmailCustomHeaderWindow, 1);
new_email_custom_header_window->epech_window = window;
new_email_custom_header_window->epech_dialog = dialog;
g_object_set_data_full ((GObject *) composer, "compowindow", new_email_custom_header_window, destroy_compo_data);
@@ -610,11 +610,11 @@ commit_changes (ConfigData *cd)
-1);
/* Check if the keyword is not empty */
- if ((keyword) && (g_utf8_strlen(g_strstrip(keyword), -1) > 0)) {
- if ((value) && (g_utf8_strlen(g_strstrip(value), -1) > 0)) {
+ if ((keyword) && (g_utf8_strlen (g_strstrip (keyword), -1) > 0)) {
+ if ((value) && (g_utf8_strlen (g_strstrip (value), -1) > 0)) {
keyword = g_strconcat (keyword, "=", value, NULL);
}
- header_config_list = g_slist_append (header_config_list, g_strdup(keyword));
+ header_config_list = g_slist_append (header_config_list, g_strdup (keyword));
}
g_free (keyword);
@@ -717,17 +717,17 @@ header_remove_clicked (GtkButton *button, ConfigData *cd)
/* Get the path and move to the previous node :) */
path = gtk_tree_model_get_path (model, &iter);
if (path)
- valid = gtk_tree_path_prev(path);
+ valid = gtk_tree_path_prev (path);
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
len = gtk_tree_model_iter_n_children (model, NULL);
if (len > 0) {
- if (gtk_list_store_iter_is_valid (GTK_LIST_STORE(model), &iter)) {
+ if (gtk_list_store_iter_is_valid (GTK_LIST_STORE (model), &iter)) {
gtk_tree_selection_select_iter (selection, &iter);
} else {
if (path && valid) {
- gtk_tree_model_get_iter(model, &iter, path);
+ gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_selection_select_iter (selection, &iter);
}
}
@@ -736,7 +736,7 @@ header_remove_clicked (GtkButton *button, ConfigData *cd)
gtk_widget_set_sensitive (cd->header_remove, FALSE);
}
- gtk_widget_grab_focus(cd->treeview);
+ gtk_widget_grab_focus (cd->treeview);
gtk_tree_path_free (path);
commit_changes (cd);
@@ -804,7 +804,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
gchar *buffer;
GtkTreeViewColumn *col;
gint col_pos;
- GConfClient *client = gconf_client_get_default();
+ GConfClient *client = gconf_client_get_default ();
ConfigData *cd = g_new0 (ConfigData, 1);
GtkWidget *ech_configuration_box;
@@ -885,7 +885,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
renderer, "text", HEADER_KEY_COLUMN, NULL);
col = gtk_tree_view_get_column (GTK_TREE_VIEW (cd->treeview), col_pos -1);
gtk_tree_view_column_set_resizable (col, TRUE);
- gtk_tree_view_column_set_reorderable(col, TRUE);
+ gtk_tree_view_column_set_reorderable (col, TRUE);
g_object_set (col, "min-width", 50, NULL);
g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL);
@@ -901,7 +901,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
renderer, "text", HEADER_VALUE_COLUMN, NULL);
col = gtk_tree_view_get_column (GTK_TREE_VIEW (cd->treeview), col_pos -1);
gtk_tree_view_column_set_resizable (col, TRUE);
- gtk_tree_view_column_set_reorderable(col, TRUE);
+ gtk_tree_view_column_set_reorderable (col, TRUE);
g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL);
g_signal_connect (
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index 11db7db3a2..c1f787d2f4 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -59,7 +59,7 @@ static void ee_editor_command_changed (GtkWidget *textbox);
static void ee_editor_immediate_launch_changed (GtkWidget *checkbox);
static void async_external_editor (EMsgComposer *composer);
static gboolean editor_running (void);
-static gboolean key_press_cb(GtkWidget * widget, GdkEventKey * event, EMsgComposer *composer);
+static gboolean key_press_cb (GtkWidget * widget, GdkEventKey * event, EMsgComposer *composer);
/* used to track when the external editor is active */
static GThread *editor_thread;
@@ -78,7 +78,7 @@ ee_editor_command_changed (GtkWidget *textbox)
const gchar *editor;
GConfClient *gconf;
- editor = gtk_entry_get_text (GTK_ENTRY(textbox));
+ editor = gtk_entry_get_text (GTK_ENTRY (textbox));
d(printf ("\n\aeditor is : [%s] \n\a", editor));
/* gconf access for every key-press. Sucky ? */
@@ -118,7 +118,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
editor = gconf_client_get_string (gconf, EDITOR_GCONF_KEY_COMMAND, NULL);
if (editor) {
- gtk_entry_set_text (GTK_ENTRY(textbox), editor);
+ gtk_entry_set_text (GTK_ENTRY (textbox), editor);
g_free (editor);
}
@@ -137,7 +137,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
g_signal_connect (textbox, "changed", G_CALLBACK(ee_editor_command_changed), textbox);
g_signal_connect (checkbox, "toggled",
- G_CALLBACK(ee_editor_immediate_launch_changed), checkbox);
+ G_CALLBACK (ee_editor_immediate_launch_changed), checkbox);
gtk_widget_show_all (vbox);
return vbox;
@@ -346,10 +346,10 @@ async_external_editor (EMsgComposer *composer)
gchar *htmltext;
GArray *array;
- htmltext = camel_text_to_html(buf, CAMEL_MIME_FILTER_TOHTML_PRE, 0);
+ htmltext = camel_text_to_html (buf, CAMEL_MIME_FILTER_TOHTML_PRE, 0);
array = g_array_sized_new (TRUE, TRUE,
- sizeof (gpointer), 2 * sizeof(gpointer));
+ sizeof (gpointer), 2 * sizeof (gpointer));
array = g_array_append_val (array, composer);
array = g_array_append_val (array, htmltext);
@@ -366,7 +366,7 @@ static void launch_editor (GtkAction *action, EMsgComposer *composer)
{
d(printf ("\n\nexternal_editor plugin is launched \n\n"));
- if (editor_running()) {
+ if (editor_running ()) {
d(printf("not opening editor, because it's still running\n"));
return;
}
@@ -386,7 +386,7 @@ static GtkActionEntry entries[] = {
};
static gboolean
-key_press_cb(GtkWidget * widget, GdkEventKey * event, EMsgComposer *composer)
+key_press_cb (GtkWidget * widget, GdkEventKey * event, EMsgComposer *composer)
{
GConfClient *gconf;
gboolean immediately;
@@ -436,7 +436,7 @@ editor_running (void)
static gboolean
delete_cb (GtkWidget *widget, EMsgComposer *composer)
{
- if (editor_running()) {
+ if (editor_running ()) {
e_alert_run_dialog_for_args (NULL, "org.gnome.evolution.plugins.external-editor:editor-still-running", NULL);
return TRUE;
}
@@ -460,10 +460,10 @@ e_plugin_ui_init (GtkUIManager *manager, EMsgComposer *composer)
html = gtkhtml_editor_get_html (editor);
g_signal_connect (G_OBJECT(html), "key_press_event",
- G_CALLBACK(key_press_cb), composer);
+ G_CALLBACK (key_press_cb), composer);
g_signal_connect (G_OBJECT(composer), "delete-event",
- G_CALLBACK(delete_cb), composer);
+ G_CALLBACK (delete_cb), composer);
return TRUE;
}
diff --git a/plugins/google-account-setup/google-contacts-source.c b/plugins/google-account-setup/google-contacts-source.c
index 289a939dec..e55333064a 100644
--- a/plugins/google-account-setup/google-contacts-source.c
+++ b/plugins/google-account-setup/google-contacts-source.c
@@ -209,7 +209,7 @@ struct ui_data {
};
static void
-destroy_ui_data(gpointer data)
+destroy_ui_data (gpointer data)
{
struct ui_data *ui = data;
diff --git a/plugins/groupwise-features/addressbook-groupwise.c b/plugins/groupwise-features/addressbook-groupwise.c
index a5568d3bba..b55672e836 100644
--- a/plugins/groupwise-features/addressbook-groupwise.c
+++ b/plugins/groupwise-features/addressbook-groupwise.c
@@ -51,7 +51,7 @@ commit_groupwise_addressbook (EPlugin *epl, EConfigTarget *target)
g_free (relative_uri);
source_group = e_source_peek_group (source);
- l = e_source_group_peek_sources(source_group);
+ l = e_source_group_peek_sources (source_group);
if (l && l->data ) {
e_source_set_property(source, "auth", e_source_get_property(l->data, "auth"));
e_source_set_property(source, "user", e_source_get_property(l->data, "user"));
diff --git a/plugins/groupwise-features/camel-gw-listener.c b/plugins/groupwise-features/camel-gw-listener.c
index 308ed517c9..fff8af3dd1 100644
--- a/plugins/groupwise-features/camel-gw-listener.c
+++ b/plugins/groupwise-features/camel-gw-listener.c
@@ -200,7 +200,7 @@ add_esource (const gchar *conf_key, GwAccountInfo *info, const gchar *source_na
offline_sync = camel_url_get_param (url, "offline_sync");
- client = gconf_client_get_default();
+ client = gconf_client_get_default ();
source_list = e_source_list_new_for_gconf (client, conf_key);
group = e_source_group_new (group_name, GROUPWISE_URI_PREFIX);
@@ -275,7 +275,7 @@ remove_esource (const gchar *conf_key, const gchar *group_name, gchar * source_n
GSList *node_tobe_deleted;
const gchar *source_selection_key;
- client = gconf_client_get_default();
+ client = gconf_client_get_default ();
list = e_source_list_new_for_gconf (client, conf_key);
groups = e_source_list_peek_groups (list);
@@ -518,7 +518,7 @@ get_addressbook_names_from_server (gchar *source_url)
cnc = e_gw_connection_new (uri, url->user, password);
g_free (password);
- if (!E_IS_GW_CONNECTION(cnc)) {
+ if (!E_IS_GW_CONNECTION (cnc)) {
if (count == 3)
break;
}
@@ -529,7 +529,7 @@ get_addressbook_names_from_server (gchar *source_url)
g_free (key);
- if (E_IS_GW_CONNECTION(cnc)) {
+ if (E_IS_GW_CONNECTION (cnc)) {
book_list = NULL;
status = e_gw_connection_get_address_book_list (cnc, &book_list);
if (status == E_GW_CONNECTION_STATUS_OK)
@@ -603,11 +603,11 @@ add_addressbook_sources (EAccount *account)
if (!temp_list)
return FALSE;
for (; temp_list != NULL; temp_list = g_list_next (temp_list)) {
- const gchar *book_name = e_gw_container_get_name (E_GW_CONTAINER(temp_list->data));
+ const gchar *book_name = e_gw_container_get_name (E_GW_CONTAINER (temp_list->data));
/* is_writable is set to TRUE if the book has isPersonal property,
* by e_gw_connection_get_address_book_list()
*/
- is_writable = e_gw_container_get_is_writable (E_GW_CONTAINER(temp_list->data));
+ is_writable = e_gw_container_get_is_writable (E_GW_CONTAINER (temp_list->data));
if (is_writable &&
!g_ascii_strncasecmp (book_name, "Novell GroupWise Address Book", strlen (book_name))) {
/* This is a hack to not to show multiple groupwise system address books
@@ -711,7 +711,7 @@ modify_addressbook_sources ( EAccount *account, GwAccountInfo *existing_account_
for (; groups != NULL && !found_group; groups = g_slist_next (groups)) {
group = E_SOURCE_GROUP (groups->data);
- if ( strcmp ( e_source_group_peek_base_uri(group), old_base_uri) == 0 && strcmp (e_source_group_peek_name (group), existing_account_info->name) == 0) {
+ if ( strcmp ( e_source_group_peek_base_uri (group), old_base_uri) == 0 && strcmp (e_source_group_peek_name (group), existing_account_info->name) == 0) {
found_group = TRUE;
if (!delete_group) {
e_source_group_set_name (group, account->name);
@@ -812,7 +812,7 @@ account_added (EAccountList *account_listener, EAccount *account)
if (!parent)
return;
- parent_url = camel_url_new (e_account_get_string(parent, E_ACCOUNT_SOURCE_URL), NULL);
+ parent_url = camel_url_new (e_account_get_string (parent, E_ACCOUNT_SOURCE_URL), NULL);
add_proxy_sources (info, parent_url->user);
} else {
status = add_addressbook_sources (account);
@@ -1035,7 +1035,7 @@ camel_gw_listener_new (void)
CamelGwListener *config_listener;
config_listener = g_object_new (CAMEL_TYPE_GW_LISTENER, NULL);
- config_listener->priv->gconf_client = gconf_client_get_default();
+ config_listener->priv->gconf_client = gconf_client_get_default ();
camel_gw_listener_construct (config_listener);
diff --git a/plugins/groupwise-features/groupwise-account-setup.c b/plugins/groupwise-features/groupwise-account-setup.c
index 0872a9c2a7..4cd8c3ca56 100644
--- a/plugins/groupwise-features/groupwise-account-setup.c
+++ b/plugins/groupwise-features/groupwise-account-setup.c
@@ -33,7 +33,7 @@
static CamelGwListener *config_listener = NULL;
gint e_plugin_lib_enable (EPlugin *ep, gint enable);
-GtkWidget* org_gnome_gw_account_setup(struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
+GtkWidget* org_gnome_gw_account_setup (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
void ensure_mandatory_esource_properties (EPlugin *ep, ESEventTargetUpgrade *target);
static gboolean
@@ -88,15 +88,15 @@ ensure_mandatory_esource_properties (EPlugin *ep, ESEventTargetUpgrade *target)
EAccountList *al;
EIterator *it;
- client = gconf_client_get_default();
+ client = gconf_client_get_default ();
al = e_account_list_new (client);
- for (it = e_list_get_iterator((EList *)al);
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
+ for (it = e_list_get_iterator ((EList *)al);
+ e_iterator_is_valid (it);
+ e_iterator_next (it)) {
EAccount *a;
- a = (EAccount *) e_iterator_get(it);
+ a = (EAccount *) e_iterator_get (it);
if (!a->enabled || !is_groupwise_account (a))
continue;
set_esource_props ("/apps/evolution/calendar/sources", a, client, a->name);
@@ -124,10 +124,10 @@ e_plugin_lib_enable (EPlugin *ep, gint enable)
return 0;
}
-GtkWidget * org_gnome_groupwise_account_setup(struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
+GtkWidget * org_gnome_groupwise_account_setup (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
GtkWidget *
-org_gnome_groupwise_account_setup(struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data)
+org_gnome_groupwise_account_setup (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data)
{
if (data->old)
return data->old;
diff --git a/plugins/groupwise-features/gw-ui.c b/plugins/groupwise-features/gw-ui.c
index 41529b5d41..3ca262b674 100644
--- a/plugins/groupwise-features/gw-ui.c
+++ b/plugins/groupwise-features/gw-ui.c
@@ -319,7 +319,7 @@ is_meeting_owner (ECalComponent *comp, ECal *client)
}
if (!ret_val)
- ret_val = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
+ ret_val = e_account_list_find (itip_addresses_get (), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
g_free (email);
return ret_val;
diff --git a/plugins/groupwise-features/install-shared.c b/plugins/groupwise-features/install-shared.c
index db906e6952..2db4eaf4e7 100644
--- a/plugins/groupwise-features/install-shared.c
+++ b/plugins/groupwise-features/install-shared.c
@@ -132,19 +132,19 @@ install_folder_response (EMFolderSelector *emfs, gint response, gpointer *data)
}
}
- g_strfreev(names);
+ g_strfreev (names);
gtk_widget_destroy ((GtkWidget *)emfs);
}
}
static void
-accept_free(gpointer data)
+accept_free (gpointer data)
{
struct AcceptData *accept_data = data;
g_object_unref (accept_data->msg);
- g_free(accept_data);
+ g_free (accept_data);
}
static void
@@ -159,13 +159,13 @@ apply_clicked (GtkAssistant *assistant, CamelMimeMessage *msg)
parent = gtk_widget_get_toplevel (GTK_WIDGET (assistant));
parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
- accept_data = g_new0(struct AcceptData, 1);
+ accept_data = g_new0 (struct AcceptData, 1);
folder_tree = (EMFolderTree *) em_folder_tree_new ();
dialog = em_folder_selector_create_new (parent, folder_tree, 0, _("Create folder"), _("Specify where to create the folder:"));
- uri = em_folder_tree_get_selected_uri(folder_tree);
+ uri = em_folder_tree_get_selected_uri (folder_tree);
em_folder_selector_set_selected ((EMFolderSelector *) dialog, uri);
- g_free(uri);
+ g_free (uri);
accept_data->msg = msg;
g_object_ref (msg);
accept_data->model = EM_FOLDER_TREE_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (folder_tree)));
@@ -194,12 +194,12 @@ org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target)
if (((gchar *)camel_medium_get_header (CAMEL_MEDIUM(msg),"X-notification")) == NULL
|| (from_addr = camel_mime_message_get_from ((CamelMimeMessage *)target->message)) == NULL
- || !camel_internet_address_get(from_addr, 0, &name, &email)
+ || !camel_internet_address_get (from_addr, 0, &name, &email)
|| (dw = camel_medium_get_content (CAMEL_MEDIUM (msg))) == NULL) {
return;
} else {
if (CAMEL_IS_MULTIPART (dw)) {
- dw = camel_medium_get_content ((CamelMedium *)camel_multipart_get_part((CamelMultipart *)dw, 0));
+ dw = camel_medium_get_content ((CamelMedium *)camel_multipart_get_part ((CamelMultipart *)dw, 0));
if (dw == NULL)
return;
}
@@ -210,7 +210,7 @@ org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target)
camel_stream_write (stream, "", 1, NULL);
from_addr = camel_mime_message_get_from ((CamelMimeMessage *)target->message);
- if (from_addr && camel_internet_address_get(from_addr, 0, &name, &email)) {
+ if (from_addr && camel_internet_address_get (from_addr, 0, &name, &email)) {
GtkWidget *page;
GtkAssistant *assistant = GTK_ASSISTANT (gtk_assistant_new ());
diff --git a/plugins/groupwise-features/junk-mail-settings.c b/plugins/groupwise-features/junk-mail-settings.c
index 6e72b67320..a633f0bcc3 100644
--- a/plugins/groupwise-features/junk-mail-settings.c
+++ b/plugins/groupwise-features/junk-mail-settings.c
@@ -48,7 +48,7 @@ static void
junk_dialog_response (GtkWidget *dialog, gint response, JunkSettings *js)
{
if (response == GTK_RESPONSE_ACCEPT) {
- commit_changes(js);
+ commit_changes (js);
abort_changes (js);
}
else
@@ -96,7 +96,7 @@ gw_junk_mail_settings_cb (GtkAction *action, EShellView *shell_view)
msg = g_strdup_printf("<b>%s</b>", _("Junk Mail Settings"));
gtk_label_set_markup (GTK_LABEL (w), msg);
gtk_box_pack_start ((GtkBox *) box, w, FALSE, FALSE, 6);
- g_free(msg);
+ g_free (msg);
junk_tab = junk_settings_new (cnc);
w = (GtkWidget *)junk_tab->vbox;
diff --git a/plugins/groupwise-features/junk-settings.c b/plugins/groupwise-features/junk-settings.c
index 23f4a0833f..242d037bb4 100644
--- a/plugins/groupwise-features/junk-settings.c
+++ b/plugins/groupwise-features/junk-settings.c
@@ -43,7 +43,7 @@ static void junk_settings_class_init (JunkSettingsClass *class);
static void junk_settings_init (JunkSettings *js);
static void junk_settings_destroy (GtkObject *obj);
static void junk_settings_finalise (GObject *obj);
-static void free_all(JunkSettings *js);
+static void free_all (JunkSettings *js);
static void get_junk_list (JunkSettings *js);
static void disable_clicked (GtkRadioButton *button, JunkSettings *js);
static void enable_clicked (GtkRadioButton *button, JunkSettings *js);
@@ -88,7 +88,7 @@ junk_settings_finalise (GObject *obj)
{
JunkSettings *js = (JunkSettings *) obj;
g_object_unref (js->builder);
- free_all(js);
+ free_all (js);
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -112,10 +112,10 @@ junk_settings_init (JunkSettings *js)
}
static void
-free_entry_node(EGwJunkEntry *entry)
+free_entry_node (EGwJunkEntry *entry)
{
if (entry) {
- g_free(entry->match);
+ g_free (entry->match);
entry->match = NULL;
}
@@ -123,12 +123,12 @@ free_entry_node(EGwJunkEntry *entry)
}
static void
-free_node(JunkEntry *nentry)
+free_node (JunkEntry *nentry)
{
EGwJunkEntry *junk_entry = nentry->entry;
if (junk_entry) {
- g_free(junk_entry->match);
+ g_free (junk_entry->match);
junk_entry->match = NULL;
}
@@ -136,7 +136,7 @@ free_node(JunkEntry *nentry)
}
static JunkEntry *
-find_node(GList *list, gchar *match)
+find_node (GList *list, gchar *match)
{
JunkEntry *one_entry = NULL;
EGwJunkEntry *ent = NULL;
@@ -144,16 +144,16 @@ find_node(GList *list, gchar *match)
gint i;
if (list) {
- tmp = g_list_first(list);
+ tmp = g_list_first (list);
for (i=0; tmp; i++)
{
one_entry = tmp->data;
ent = one_entry->entry;
- if (!g_ascii_strcasecmp(ent->match, match)) {
+ if (!g_ascii_strcasecmp (ent->match, match)) {
return one_entry;
/*if found, it returns that user*/
}
- tmp= g_list_next(tmp);
+ tmp= g_list_next (tmp);
}
}
@@ -182,8 +182,8 @@ get_junk_list (JunkSettings *js)
if (e_gw_connection_get_junk_settings (js->cnc, &use_junk, &use_block, &use_pab, &persistence) == E_GW_CONNECTION_STATUS_OK) {
if (use_junk) {
js->enabled = TRUE;
- gtk_toggle_button_set_active((GtkToggleButton *) js->enable, TRUE);
- enable_clicked(js->enable , js);
+ gtk_toggle_button_set_active ((GtkToggleButton *) js->enable, TRUE);
+ enable_clicked (js->enable , js);
gtk_widget_set_sensitive (GTK_WIDGET (js->table), TRUE);
} else {
gtk_toggle_button_set_active ((GtkToggleButton *) js->disable, TRUE);
@@ -298,7 +298,7 @@ disable_clicked (GtkRadioButton *button, JunkSettings *js)
}
static void
-add_clicked(GtkButton *button, JunkSettings *js)
+add_clicked (GtkButton *button, JunkSettings *js)
{
const gchar *email = NULL;
const gchar *self_email = NULL;
@@ -321,14 +321,14 @@ add_clicked(GtkButton *button, JunkSettings *js)
}
junk_entry = g_new0 (EGwJunkEntry, 1);
new_entry = g_new0 (JunkEntry, 1);
- junk_entry->match = g_strdup(email);
+ junk_entry->match = g_strdup (email);
/*XXX:populate more fields*/
new_entry->entry = junk_entry;
new_entry->flag = 1;
msg = g_strdup (email);
gtk_list_store_append (GTK_LIST_STORE (js->model), &(js->iter));
gtk_list_store_set (GTK_LIST_STORE (js->model), &(js->iter), 0, msg, -1);
- g_free(msg);
+ g_free (msg);
js->junk_list = g_list_append (js->junk_list, new_entry);
js->flag_for_ok = 0;
}
@@ -336,7 +336,7 @@ add_clicked(GtkButton *button, JunkSettings *js)
}
static void
-remove_clicked(GtkButton *button, JunkSettings *js)
+remove_clicked (GtkButton *button, JunkSettings *js)
{
JunkEntry *entry = NULL;
gchar *email;
@@ -345,7 +345,7 @@ remove_clicked(GtkButton *button, JunkSettings *js)
entry = find_node (js->junk_list, email);
if (entry->flag & 0x1) {
js->junk_list = g_list_remove (js->junk_list, entry);
- free_node(entry);
+ free_node (entry);
} else {
entry->flag = 0;
entry->flag |= 0x4;
@@ -355,11 +355,11 @@ remove_clicked(GtkButton *button, JunkSettings *js)
}
static void
-user_selected(GtkTreeSelection *selection, JunkSettings *js)
+user_selected (GtkTreeSelection *selection, JunkSettings *js)
{
GtkTreeModel *model;
- gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
if (gtk_tree_selection_get_selected (selection, &model, &(js->iter))) {
gtk_widget_set_sensitive (GTK_WIDGET (js->remove), TRUE);
@@ -387,7 +387,7 @@ junk_settings_construct (JunkSettings *js)
js->remove = GTK_BUTTON(e_builder_get_widget(js->builder, "Remove"));
g_signal_connect ((GtkWidget *) js->remove, "clicked", G_CALLBACK (remove_clicked), js);
- gtk_widget_set_sensitive(GTK_WIDGET (js->remove), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (js->remove), FALSE);
js->entry = GTK_ENTRY (e_builder_get_widget (js->builder, "entry4"));
/*TODO:connect entry and label*/
@@ -420,7 +420,7 @@ junk_settings_new (EGwConnection *ccnc)
junk_settings_construct (new);
new->cnc = ccnc;
if (new->cnc)
- get_junk_list(new);
+ get_junk_list (new);
return (JunkSettings *) new;
}
diff --git a/plugins/groupwise-features/mail-retract.c b/plugins/groupwise-features/mail-retract.c
index 466da1cb23..1213311e36 100644
--- a/plugins/groupwise-features/mail-retract.c
+++ b/plugins/groupwise-features/mail-retract.c
@@ -76,7 +76,7 @@ gw_retract_mail_cb (GtkAction *action, EShellView *shell_view)
cnc = get_cnc (parent_store);
- if (cnc && E_IS_GW_CONNECTION(cnc)) {
+ if (cnc && E_IS_GW_CONNECTION (cnc)) {
confirm_dialog = gtk_dialog_new_with_buttons (
_("Message Retract"),
GTK_WINDOW (e_shell_view_get_shell_window (shell_view)),
@@ -109,7 +109,7 @@ gw_retract_mail_cb (GtkAction *action, EShellView *shell_view)
else {
GtkWidget *dialog;
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, _("Message retracted successfully"));
- gtk_dialog_run (GTK_DIALOG(dialog));
+ gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
}
diff --git a/plugins/groupwise-features/mail-send-options.c b/plugins/groupwise-features/mail-send-options.c
index 63bbbe7c9b..8b59946330 100644
--- a/plugins/groupwise-features/mail-send-options.c
+++ b/plugins/groupwise-features/mail-send-options.c
@@ -59,7 +59,7 @@ add_day_to_time (time_t time, gint days)
}
static void
-feed_input_data(ESendOptionsDialog * dialog, gint state, gpointer data)
+feed_input_data (ESendOptionsDialog * dialog, gint state, gpointer data)
{
EMsgComposer *comp;
gchar value[100];
diff --git a/plugins/groupwise-features/proxy-login.c b/plugins/groupwise-features/proxy-login.c
index 25518ba9a7..12d095bb31 100644
--- a/plugins/groupwise-features/proxy-login.c
+++ b/plugins/groupwise-features/proxy-login.c
@@ -317,7 +317,7 @@ proxy_soap_login (gchar *email, GtkWindow *error_parent)
for (i=0; email[i]!='\0' && email[i]!='@' ; i++);
if (email[i]=='@')
- name = g_strndup(email, i);
+ name = g_strndup (email, i);
else {
e_alert_run_dialog_for_args (error_parent,
"org.gnome.evolution.proxy-login:invalid-user",
@@ -343,24 +343,24 @@ proxy_soap_login (gchar *email, GtkWindow *error_parent)
proxy_cnc = e_gw_connection_get_proxy_connection (cnc, user_name, password, email, &permissions);
if (proxy_cnc) {
- parent = camel_url_new (e_account_get_string(srcAccount, E_ACCOUNT_SOURCE_URL), NULL);
+ parent = camel_url_new (e_account_get_string (srcAccount, E_ACCOUNT_SOURCE_URL), NULL);
parent_source_url = camel_url_to_string (parent, CAMEL_URL_HIDE_PASSWORD);
uri = camel_url_copy (parent);
camel_url_set_user (uri, name);
proxy_source_url = camel_url_to_string (uri, CAMEL_URL_HIDE_PASSWORD);
- dstAccount = e_account_new();
- e_account_set_string(dstAccount, E_ACCOUNT_ID_ADDRESS, email);
+ dstAccount = e_account_new ();
+ e_account_set_string (dstAccount, E_ACCOUNT_ID_ADDRESS, email);
dstAccount->enabled = TRUE;
- e_account_set_string(dstAccount, E_ACCOUNT_SOURCE_URL, proxy_source_url);
+ e_account_set_string (dstAccount, E_ACCOUNT_SOURCE_URL, proxy_source_url);
e_account_set_string (dstAccount, E_ACCOUNT_TRANSPORT_URL, proxy_source_url);
e_account_set_string (dstAccount, E_ACCOUNT_NAME, email);
e_account_set_string (dstAccount, E_ACCOUNT_ID_NAME, name);
e_account_set_string (dstAccount, E_ACCOUNT_PROXY_PARENT_UID, srcAccount->uid);
- e_account_list_add(accounts, dstAccount);
+ e_account_list_add (accounts, dstAccount);
e_account_list_change (accounts, srcAccount);
- e_account_list_save(accounts);
+ e_account_list_save (accounts);
g_object_set_data ((GObject *)dstAccount, "permissions", GINT_TO_POINTER(permissions));
- mail_get_store(e_account_get_string(dstAccount, E_ACCOUNT_SOURCE_URL), NULL, proxy_login_add_new_store, dstAccount);
+ mail_get_store (e_account_get_string (dstAccount, E_ACCOUNT_SOURCE_URL), NULL, proxy_login_add_new_store, dstAccount);
g_free (proxy_source_url);
g_free (parent_source_url);
@@ -395,7 +395,7 @@ proxy_login_add_new_store (gchar *uri, CamelStore *store, gpointer user_data)
}
static void
-proxy_login_tree_view_changed_cb(GtkDialog *dialog)
+proxy_login_tree_view_changed_cb (GtkDialog *dialog)
{
proxyLoginPrivate *priv = pld->priv;
GtkTreeSelection* account_select;
@@ -412,7 +412,7 @@ proxy_login_tree_view_changed_cb(GtkDialog *dialog)
gtk_tree_model_get (model, &iter, ACCOUNT_NAME, &account_mailid, -1);
account_mailid = g_strrstr (account_mailid, "\n") + 1;
account_name_tbox = e_builder_get_widget (priv->builder, "account_name");
- gtk_entry_set_text((GtkEntry*) account_name_tbox,account_mailid);
+ gtk_entry_set_text ((GtkEntry*) account_name_tbox,account_mailid);
}
static void
@@ -459,14 +459,14 @@ proxy_login_update_tree (void)
gtk_tree_store_clear (priv->store);
if (proxy_list != NULL) {
- n = g_list_length(proxy_list);
+ n = g_list_length (proxy_list);
for (i=0;i<n;i=i+2) {
- proxy_name = g_list_nth_data(proxy_list,i);
- proxy_email = g_list_nth_data(proxy_list,i+1);
+ proxy_name = g_list_nth_data (proxy_list,i);
+ proxy_email = g_list_nth_data (proxy_list,i+1);
gtk_tree_store_append (priv->store, &iter, NULL);
gtk_tree_store_set (priv->store, &iter, 0, broken_image, 1, g_strconcat(proxy_name, "\n", proxy_email, NULL), -1);
}
- gtk_tree_view_set_model (GTK_TREE_VIEW(priv->tree),GTK_TREE_MODEL (priv->store));
+ gtk_tree_view_set_model (GTK_TREE_VIEW (priv->tree),GTK_TREE_MODEL (priv->store));
}
g_free (file_name);
@@ -513,7 +513,7 @@ gw_proxy_login_cb (GtkAction *action, EShellView *shell_view)
if (cnc)
g_object_unref (cnc);
- pld = proxy_login_new();
+ pld = proxy_login_new ();
priv = pld->priv;
priv->builder = gtk_builder_new ();
diff --git a/plugins/groupwise-features/proxy-login.h b/plugins/groupwise-features/proxy-login.h
index 65e28cdf78..3c4ba8c392 100644
--- a/plugins/groupwise-features/proxy-login.h
+++ b/plugins/groupwise-features/proxy-login.h
@@ -58,5 +58,5 @@ proxyLogin* proxy_dialog_new (void);
static void proxy_soap_login (gchar *email, GtkWindow *error_parent);
gchar *parse_email_for_name (gchar *email);
static void proxy_login_update_tree (void);
-static void proxy_login_tree_view_changed_cb(GtkDialog *dialog);
+static void proxy_login_tree_view_changed_cb (GtkDialog *dialog);
static gint proxy_get_password (EAccount *account, gchar **user_name, gchar **password);
diff --git a/plugins/groupwise-features/proxy.c b/plugins/groupwise-features/proxy.c
index 7b3cae23a8..5a01a6c281 100644
--- a/plugins/groupwise-features/proxy.c
+++ b/plugins/groupwise-features/proxy.c
@@ -347,7 +347,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog, GtkWindow *pa
email, NULL);
return -1;
}
- if (!g_ascii_strcasecmp(e_gw_connection_get_user_email (prd->cnc), email)) {
+ if (!g_ascii_strcasecmp (e_gw_connection_get_user_email (prd->cnc), email)) {
e_alert_run_dialog_for_args (parent,
"org.gnome.evolution.proxy:invalid-user",
email, NULL);
@@ -357,7 +357,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog, GtkWindow *pa
/*check whether already exists*/
existing_list = priv->proxy_list;
- for (;existing_list; existing_list = g_list_next(existing_list)) {
+ for (;existing_list; existing_list = g_list_next (existing_list)) {
new_proxy = (proxyHandler *) existing_list->data;
if (!g_ascii_strcasecmp (new_proxy->proxy_email, email)) {
if (new_proxy->flags & E_GW_PROXY_DELETED) {
@@ -554,7 +554,7 @@ proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data)
/* Handle case where the structure is new and deleted*/
if ( !((aclInstance->flags & E_GW_PROXY_NEW) && (aclInstance->flags & E_GW_PROXY_DELETED))) {
- if ( !E_IS_GW_CONNECTION(prd->cnc)) /* Add check in case the connection request fails*/
+ if ( !E_IS_GW_CONNECTION (prd->cnc)) /* Add check in case the connection request fails*/
prd->cnc = proxy_get_cnc (account, GTK_WINDOW (gtk_widget_get_toplevel (button)));
if (aclInstance->flags & E_GW_PROXY_NEW )
@@ -616,7 +616,7 @@ proxy_update_tree_view (EAccount *account)
gtk_tree_store_clear (priv->store);
list_iter = priv->proxy_list;
- for (;list_iter; list_iter = g_list_next(list_iter)) {
+ for (;list_iter; list_iter = g_list_next (list_iter)) {
aclInstance = (proxyHandler *) list_iter->data;
if (!(aclInstance->flags & E_GW_PROXY_DELETED )) {
@@ -630,7 +630,7 @@ proxy_update_tree_view (EAccount *account)
g_object_unref (broken_image);
/*Fixme : Desensitize buttons if the list is Null*/
- gtk_tree_view_set_model (GTK_TREE_VIEW(priv->tree), GTK_TREE_MODEL (priv->store));
+ gtk_tree_view_set_model (GTK_TREE_VIEW (priv->tree), GTK_TREE_MODEL (priv->store));
}
GtkWidget*
@@ -749,12 +749,12 @@ proxy_page_changed_cb (GtkNotebook *notebook, GtkWidget *page, gint num, EAccoun
prd->cnc = proxy_get_cnc (account, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (notebook))));
priv = prd->priv;
- if (e_gw_connection_get_proxy_access_list(prd->cnc, &priv->proxy_list)!= E_GW_CONNECTION_STATUS_OK)
+ if (e_gw_connection_get_proxy_access_list (prd->cnc, &priv->proxy_list)!= E_GW_CONNECTION_STATUS_OK)
return FALSE;
list_iter = priv->proxy_list;
- for (;list_iter; list_iter = g_list_next(list_iter)) {
+ for (;list_iter; list_iter = g_list_next (list_iter)) {
aclInstance = (proxyHandler *) list_iter->data;
/* NOTE: All User Access is not supported */
@@ -773,7 +773,7 @@ proxy_page_changed_cb (GtkNotebook *notebook, GtkWidget *page, gint num, EAccoun
}
static void
-proxy_cancel(GtkWidget *button, EAccount *account)
+proxy_cancel (GtkWidget *button, EAccount *account)
{
proxyDialog *prd = NULL;
proxyDialogPrivate *priv;
@@ -830,7 +830,7 @@ proxy_get_item_from_list (EAccount *account, gchar *account_name)
priv = prd->priv;
list_iter = priv->proxy_list;
- for (;list_iter; list_iter = g_list_next(list_iter)) {
+ for (;list_iter; list_iter = g_list_next (list_iter)) {
iter = (proxyHandler *) list_iter->data;
if ( g_str_equal (iter->proxy_email,account_name))
@@ -949,40 +949,40 @@ proxy_load_edit_dialog (EAccount *account, proxyHandler *edited)
gtk_widget_set_sensitive (priv->account_name, FALSE);
if (edited->permissions & E_GW_PROXY_MAIL_READ)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->mail_read), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->mail_read), TRUE);
if (edited->permissions & E_GW_PROXY_MAIL_WRITE)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->mail_write), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->mail_write), TRUE);
if (edited->permissions & E_GW_PROXY_APPOINTMENT_READ)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->app_read), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->app_read), TRUE);
if (edited->permissions & E_GW_PROXY_APPOINTMENT_WRITE)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->app_write), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->app_write), TRUE);
if (edited->permissions & E_GW_PROXY_NOTES_READ)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->note_read), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->note_read), TRUE);
if (edited->permissions & E_GW_PROXY_NOTES_WRITE)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->note_write), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->note_write), TRUE);
if (edited->permissions & E_GW_PROXY_TASK_READ)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->task_read), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->task_read), TRUE);
if (edited->permissions & E_GW_PROXY_TASK_WRITE)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->task_write), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->task_write), TRUE);
if (edited->permissions & E_GW_PROXY_GET_ALARMS)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->alarms), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->alarms), TRUE);
if (edited->permissions & E_GW_PROXY_GET_NOTIFICATIONS)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->notifications), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->notifications), TRUE);
if (edited->permissions & E_GW_PROXY_MODIFY_FOLDERS)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->options), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->options), TRUE);
if (edited->permissions & E_GW_PROXY_READ_PRIVATE)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->private), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->private), TRUE);
}
static void
diff --git a/plugins/groupwise-features/proxy.h b/plugins/groupwise-features/proxy.h
index 0661239e59..5dc1bb47e6 100644
--- a/plugins/groupwise-features/proxy.h
+++ b/plugins/groupwise-features/proxy.h
@@ -55,7 +55,7 @@ GtkWidget * org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data);
static void proxy_add_account (GtkWidget *button, EAccount *account);
static void proxy_remove_account (GtkWidget *button, EAccount *account);
static void proxy_update_tree_view (EAccount *account);
-static void proxy_cancel(GtkWidget *button, EAccount *account);
+static void proxy_cancel (GtkWidget *button, EAccount *account);
static void proxy_edit_account (GtkWidget *button, EAccount *account);
void proxy_abort (GtkWidget *button, EConfigHookItemFactoryData *data);
void proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data);
diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c
index 3951de9df1..21485a96c2 100644
--- a/plugins/groupwise-features/share-folder-common.c
+++ b/plugins/groupwise-features/share-folder-common.c
@@ -161,7 +161,7 @@ create_folder_done (struct _EMCreateFolder *m)
(ssi->sf)->cnc = ccnc;
(ssi->sf)->container_id = g_strdup (get_container_id ((ssi->sf)->cnc, m->full_name));
- share_folder(ssi->sf);
+ share_folder (ssi->sf);
}
m->done (m, m->user_data);
@@ -233,7 +233,7 @@ create_folder (CamelStore *store, const gchar *full_name, void (* done) (struct
}
static void
-users_dialog_response(GtkWidget *dialog, gint response, struct ShareInfo *ssi)
+users_dialog_response (GtkWidget *dialog, gint response, struct ShareInfo *ssi)
{
struct _EMFolderTreeModelStoreInfo *si;
EMFolderSelector *emfs = ssi->emfs;
@@ -242,7 +242,7 @@ users_dialog_response(GtkWidget *dialog, gint response, struct ShareInfo *ssi)
if (response != GTK_RESPONSE_OK) {
gtk_widget_destroy ((GtkWidget *) emfs);
- gtk_widget_destroy(dialog);
+ gtk_widget_destroy (dialog);
return;
}
@@ -262,16 +262,16 @@ users_dialog_response(GtkWidget *dialog, gint response, struct ShareInfo *ssi)
return;
}
- if (CAMEL_IS_VEE_STORE(store)) {
+ if (CAMEL_IS_VEE_STORE (store)) {
EMVFolderRule *rule;
/* ensures vfolder is running */
vfolder_load_storage ();
- rule = em_vfolder_rule_new();
- e_filter_rule_set_name((EFilterRule *)rule, path);
- vfolder_gui_add_rule(rule);
- gtk_widget_destroy((GtkWidget *)emfs);
+ rule = em_vfolder_rule_new ();
+ e_filter_rule_set_name ((EFilterRule *)rule, path);
+ vfolder_gui_add_rule (rule);
+ gtk_widget_destroy ((GtkWidget *)emfs);
} else {
g_object_ref (emfs);
ssi->d = dialog;
@@ -292,7 +292,7 @@ new_folder_response (EMFolderSelector *emfs, gint response, EMFolderTreeModel *m
EGwConnection *cnc;
CamelStore *store;
- ssi = g_new0(struct ShareInfo, 1);
+ ssi = g_new0 (struct ShareInfo, 1);
if (response != GTK_RESPONSE_OK) {
gtk_widget_destroy ((GtkWidget *) emfs);
return;
@@ -309,17 +309,17 @@ new_folder_response (EMFolderSelector *emfs, gint response, EMFolderTreeModel *m
users_dialog = gtk_dialog_new_with_buttons (
_("Users"), NULL, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
w = gtk_label_new_with_mnemonic (_("Enter the users and set permissions"));
- gtk_widget_show(w);
+ gtk_widget_show (w);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (users_dialog));
- gtk_box_pack_start(GTK_BOX (content_area), (GtkWidget *) w, TRUE, TRUE, 6);
+ gtk_box_pack_start (GTK_BOX (content_area), (GtkWidget *) w, TRUE, TRUE, 6);
ssi->sf = share_folder_new (cnc, NULL);
gtk_widget_set_sensitive (GTK_WIDGET ((ssi->sf)->table), TRUE);
ssi->model = model;
ssi->emfs = emfs;
gtk_widget_reparent (GTK_WIDGET ((ssi->sf)->table), content_area);
- gtk_widget_hide((GtkWidget*) emfs);
+ gtk_widget_hide ((GtkWidget*) emfs);
gtk_window_resize (GTK_WINDOW (users_dialog), 350, 300);
- gtk_widget_show(users_dialog);
+ gtk_widget_show (users_dialog);
g_signal_connect (users_dialog, "response", G_CALLBACK (users_dialog_response), ssi);
g_object_unref (store);
@@ -343,11 +343,11 @@ gw_new_shared_folder_cb (GtkAction *action, EShellView *shell_view)
uri = em_folder_tree_get_selected_uri (folder_tree);
if (uri != NULL)
em_folder_selector_set_selected ((EMFolderSelector *) dialog, uri);
- g_free(uri);
+ g_free (uri);
g_signal_connect (dialog, "response", G_CALLBACK (new_folder_response), gtk_tree_view_get_model (GTK_TREE_VIEW (folder_tree)));
gtk_window_set_title (GTK_WINDOW (dialog), "New Shared Folder" );
- gtk_widget_show(dialog);
+ gtk_widget_show (dialog);
}
GtkWidget *
@@ -364,7 +364,7 @@ org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_d
CamelFolder *folder = target->folder;
folder_name = g_strdup (camel_folder_get_full_name (folder));
- folderuri = g_strdup(target->uri);
+ folderuri = g_strdup (target->uri);
if (folderuri && folder_name)
account = g_strrstr(folderuri, "groupwise");
else
@@ -424,7 +424,7 @@ get_cnc (CamelStore *store)
if (!store)
return NULL;
- service = CAMEL_SERVICE(store);
+ service = CAMEL_SERVICE (store);
url = service->url;
server_name = g_strdup (url->host);
user = g_strdup (url->user);
@@ -432,7 +432,7 @@ get_cnc (CamelStore *store)
use_ssl = g_strdup (camel_url_get_param (url, "use_ssl"));
if (property_value == NULL)
port = g_strdup ("7191");
- else if (strlen(property_value) == 0)
+ else if (strlen (property_value) == 0)
port = g_strdup ("7191");
else
port = g_strdup (property_value);
@@ -456,7 +456,7 @@ get_cnc (CamelStore *store)
}
gchar *
-get_container_id(EGwConnection *cnc, const gchar *fname)
+get_container_id (EGwConnection *cnc, const gchar *fname)
{
GList *container_list = NULL;
gchar *id = NULL;
diff --git a/plugins/groupwise-features/share-folder.c b/plugins/groupwise-features/share-folder.c
index 365b7c1fb1..d27a463f5b 100644
--- a/plugins/groupwise-features/share-folder.c
+++ b/plugins/groupwise-features/share-folder.c
@@ -45,18 +45,18 @@ static void share_folder_class_init (ShareFolderClass *class);
static void share_folder_init (ShareFolder *sf);
static void share_folder_destroy (GtkObject *obj);
static void share_folder_finalise (GObject *obj);
-static void free_user_node(EShUsers *user);
-static void free_node(SharedUser *user);
-static void free_all(ShareFolder *sf);
-static SharedUser * find_node(GList *list, gchar *email);
+static void free_user_node (EShUsers *user);
+static void free_node (SharedUser *user);
+static void free_all (ShareFolder *sf);
+static SharedUser * find_node (GList *list, gchar *email);
static void get_container_list (ShareFolder *sf);
-static void user_selected(GtkTreeSelection *selection, ShareFolder *sf);
+static void user_selected (GtkTreeSelection *selection, ShareFolder *sf);
static void not_shared_clicked (GtkRadioButton *button, ShareFolder *sf);
static void shared_clicked (GtkRadioButton *button, ShareFolder *sf);
-static void add_clicked(GtkButton *button, ShareFolder *sf);
-static void remove_clicked(GtkButton *button, ShareFolder *sf);
-static void not_ok_clicked(GtkButton *button, ShareFolder *sf);
-static void not_cancel_clicked(GtkButton *button, GtkWidget *window);
+static void add_clicked (GtkButton *button, ShareFolder *sf);
+static void remove_clicked (GtkButton *button, ShareFolder *sf);
+static void not_ok_clicked (GtkButton *button, ShareFolder *sf);
+static void not_cancel_clicked (GtkButton *button, GtkWidget *window);
static void share_folder_construct (ShareFolder *sf);
GType share_folder_get_type (void);
@@ -100,7 +100,7 @@ share_folder_finalise (GObject *obj)
{
ShareFolder *sf = (ShareFolder *) obj;
g_object_unref (sf->builder);
- free_all(sf);
+ free_all (sf);
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -127,28 +127,28 @@ share_folder_init (ShareFolder *sf)
}
static void
-free_user_node(EShUsers *user)
+free_user_node (EShUsers *user)
{
if (user) {
- g_free(user->email);
+ g_free (user->email);
user->email = NULL;
}
return;
}
static void
-free_node(SharedUser *usr)
+free_node (SharedUser *usr)
{
EShUsers *user = usr->user_node;
if (user) {
- g_free(user->email);
+ g_free (user->email);
user->email = NULL;
}
return;
}
static SharedUser *
-find_node(GList *list, gchar *email)
+find_node (GList *list, gchar *email)
{
SharedUser *user = NULL;
EShUsers *usr = NULL;
@@ -156,15 +156,15 @@ find_node(GList *list, gchar *email)
gint i;
if (list) {
- tmp = g_list_first(list);
+ tmp = g_list_first (list);
for (i=0; tmp; i++)
{
user = tmp->data;
usr = user->user_node;
- if (!g_ascii_strcasecmp(usr->email, email)) {
+ if (!g_ascii_strcasecmp (usr->email, email)) {
return user; /*if found, it returns that user*/
}
- tmp= g_list_next(tmp);
+ tmp= g_list_next (tmp);
}
}
return NULL;
@@ -193,15 +193,15 @@ display_container (EGwContainer *container , ShareFolder *sf)
EShUsers *user = NULL;
sf->gcontainer = container;
- if (!(byme = e_gw_container_get_is_shared_by_me(container)))
- tome = e_gw_container_get_is_shared_to_me(container);
+ if (!(byme = e_gw_container_get_is_shared_by_me (container)))
+ tome = e_gw_container_get_is_shared_to_me (container);
if (byme || tome) {
e_gw_container_get_user_list (sf->gcontainer, &user_list);
sf->users = g_list_length (user_list);
if (sf->users != 0) {
sf->is_shared = TRUE;
- gtk_toggle_button_set_active((GtkToggleButton *) sf->shared, TRUE);
- shared_clicked(sf->shared , sf);
+ gtk_toggle_button_set_active ((GtkToggleButton *) sf->shared, TRUE);
+ shared_clicked (sf->shared , sf);
if (tome) {
g_print ("Entered: inside too\n");
@@ -270,16 +270,16 @@ get_container_list (ShareFolder *sf)
gchar *id_shared = NULL;
gchar *id_unshared = NULL;
- id_shared = g_strdup(e_gw_container_get_id (container->data));
+ id_shared = g_strdup (e_gw_container_get_id (container->data));
/* this has to be done since id changes after the folder is shared*/
if ( g_str_has_suffix (id_shared, "35")) {
tail = g_strsplit(id_shared, "@", 2);
id_unshared = g_strconcat(tail[0], "@", "13", NULL);
- g_strfreev(tail);
+ g_strfreev (tail);
}
- if ((id_shared && !g_ascii_strcasecmp(id_shared, sf->container_id)) ||(id_unshared && !g_ascii_strcasecmp(id_unshared, sf->container_id))) {
+ if ((id_shared && !g_ascii_strcasecmp (id_shared, sf->container_id)) ||(id_unshared && !g_ascii_strcasecmp (id_unshared, sf->container_id))) {
display_container (E_GW_CONTAINER (container->data), sf);
g_free (id_shared);
@@ -317,7 +317,7 @@ not_shared_clicked (GtkRadioButton *button, ShareFolder *sf)
}
static void
-add_clicked(GtkButton *button, ShareFolder *sf)
+add_clicked (GtkButton *button, ShareFolder *sf)
{
const gchar *email = NULL;
const gchar *self_email = NULL;
@@ -359,7 +359,7 @@ add_clicked(GtkButton *button, ShareFolder *sf)
}
usr = g_new0 (EShUsers, 1);
new_user = g_new0 (SharedUser, 1);
- usr->email = g_strdup(email);
+ usr->email = g_strdup (email);
usr->rights = rights;
new_user->user_node = usr;
new_user->flag = 1;
@@ -368,7 +368,7 @@ add_clicked(GtkButton *button, ShareFolder *sf)
/* have to add code for rights*/
gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 0, msg, -1);
- g_free(msg);
+ g_free (msg);
sf->users_list = g_list_append (sf->users_list, new_user);
sf->flag_for_ok = 0;
}
@@ -378,7 +378,7 @@ add_clicked(GtkButton *button, ShareFolder *sf)
}
static void
-remove_clicked(GtkButton *button, ShareFolder *sf)
+remove_clicked (GtkButton *button, ShareFolder *sf)
{
SharedUser *usr = NULL;
@@ -388,7 +388,7 @@ remove_clicked(GtkButton *button, ShareFolder *sf)
usr = find_node (sf->users_list, email);
if (usr->flag & 0x1) {
sf->users_list = g_list_remove (sf->users_list, usr);
- free_node(usr);
+ free_node (usr);
} else {
usr->flag = 0;
usr->flag |= 0x4;
@@ -474,7 +474,7 @@ share_folder (ShareFolder *sf)
}
static void
-not_ok_clicked(GtkButton *button, ShareFolder *sf)
+not_ok_clicked (GtkButton *button, ShareFolder *sf)
{
gchar *subj = NULL;
@@ -498,13 +498,13 @@ not_ok_clicked(GtkButton *button, ShareFolder *sf)
}
static void
-not_cancel_clicked(GtkButton *button, GtkWidget *window)
+not_cancel_clicked (GtkButton *button, GtkWidget *window)
{
- gtk_widget_destroy(window);
+ gtk_widget_destroy (window);
}
static void
-notification_clicked(GtkButton *button, ShareFolder *sf)
+notification_clicked (GtkButton *button, ShareFolder *sf)
{
static GtkBuilder *builder;
GtkButton *not_ok;
@@ -520,7 +520,7 @@ notification_clicked(GtkButton *button, ShareFolder *sf)
vbox = GTK_WIDGET (e_builder_get_widget (builder, "vbox191"));
gtk_container_add (GTK_CONTAINER (sf->window), vbox);
sf->subject = GTK_ENTRY (e_builder_get_widget (builder, "entry3"));
- gtk_entry_set_text(GTK_ENTRY (sf->subject) , sf->sub);
+ gtk_entry_set_text (GTK_ENTRY (sf->subject) , sf->sub);
sf->message = GTK_TEXT_VIEW (e_builder_get_widget (builder, "textview1"));
not_ok = GTK_BUTTON (e_builder_get_widget (builder, "nOK"));
g_signal_connect ((gpointer) not_ok, "clicked", G_CALLBACK (not_ok_clicked), sf);
@@ -552,7 +552,7 @@ user_selected (GtkTreeSelection *selection, ShareFolder *sf)
{
GtkTreeModel *model;
- gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
if (gtk_tree_selection_get_selected (selection, &model, &sf->iter))
gtk_widget_set_sensitive (GTK_WIDGET (sf->remove), TRUE);
}
@@ -572,7 +572,7 @@ add_right_clicked (GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
return;
}
gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, 1, &right , -1);
- usr = find_node(sf->users_list, email);
+ usr = find_node (sf->users_list, email);
if (!usr) {
gtk_tree_path_free (path);
return;
@@ -591,7 +591,7 @@ add_right_clicked (GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
}
static void
-edit_right_clicked(GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
+edit_right_clicked (GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
{
gboolean right = FALSE;
SharedUser *usr = NULL;
@@ -605,7 +605,7 @@ edit_right_clicked(GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
return;
}
gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, 2, &right , -1);
- usr = find_node(sf->users_list, email);
+ usr = find_node (sf->users_list, email);
if (!usr) {
gtk_tree_path_free (path);
return;
@@ -625,7 +625,7 @@ edit_right_clicked(GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
}
static void
-delete_right_clicked(GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
+delete_right_clicked (GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
{
gboolean right = FALSE;
SharedUser *usr = NULL;
@@ -639,7 +639,7 @@ delete_right_clicked(GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
return;
}
gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, 3, &right , -1);
- usr = find_node(sf->users_list, email);
+ usr = find_node (sf->users_list, email);
if (!usr) {
gtk_tree_path_free (path);
return;
@@ -700,14 +700,14 @@ share_folder_construct (ShareFolder *sf)
sf->remove = GTK_BUTTON(e_builder_get_widget(sf->builder, "Remove"));
g_signal_connect ((GtkWidget *) sf->remove, "clicked", G_CALLBACK (remove_clicked), sf);
- gtk_widget_set_sensitive(GTK_WIDGET (sf->remove), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (sf->remove), FALSE);
sf->notification = GTK_BUTTON (e_builder_get_widget (sf->builder, "Notification"));
g_signal_connect((GtkWidget *) sf->notification, "clicked", G_CALLBACK (notification_clicked), sf);
sf->name = GTK_ENTRY (e_builder_get_widget (sf->builder, "entry4"));
/*TODO:connect name and label*/
- gtk_widget_hide (GTK_WIDGET(sf->name));
+ gtk_widget_hide (GTK_WIDGET (sf->name));
box = GTK_WIDGET (e_builder_get_widget (sf->builder, "hbox227"));
gtk_box_pack_start (GTK_BOX (box), (GtkWidget *) name_selector_entry, TRUE, TRUE, 0);
gtk_widget_show ((GtkWidget *) name_selector_entry);
@@ -757,7 +757,7 @@ share_folder_new (EGwConnection *ccnc, gchar *id)
new->cnc = ccnc;
new->container_id = id;
if (ccnc && id)
- get_container_list(new);
+ get_container_list (new);
return (ShareFolder *) new;
}
diff --git a/plugins/groupwise-features/share-folder.h b/plugins/groupwise-features/share-folder.h
index 4df979d4ef..2f4bf0c9f1 100644
--- a/plugins/groupwise-features/share-folder.h
+++ b/plugins/groupwise-features/share-folder.h
@@ -91,7 +91,7 @@ struct _ShareFolderClass {
GType share_folderget_type (void);
struct _ShareFolder * share_folder_new (EGwConnection *ccnc, gchar *id);
-void share_folder(struct _ShareFolder *sf);
+void share_folder (struct _ShareFolder *sf);
gchar * get_container_id (EGwConnection *cnc, const gchar *fname);
EGwConnection * get_cnc (CamelStore *store);
diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c
index d350ef08ee..2ff2764a12 100644
--- a/plugins/groupwise-features/status-track.c
+++ b/plugins/groupwise-features/status-track.c
@@ -50,7 +50,7 @@ format_date (const gchar * value)
time = e_gw_connection_get_date_from_string (value);
str = ctime (&time);
- str[strlen(str)-1] = '\0';
+ str[strlen (str)-1] = '\0';
return str;
}
@@ -126,7 +126,7 @@ gw_track_message_status_cb (GtkAction *action,
win = (GtkScrolledWindow *) gtk_scrolled_window_new (NULL, NULL);
gtk_container_add (GTK_CONTAINER (content_area), GTK_WIDGET (win));
vbox = (GtkVBox *) gtk_vbox_new (FALSE, 12);
- gtk_scrolled_window_add_with_viewport (win, GTK_WIDGET(vbox));
+ gtk_scrolled_window_add_with_viewport (win, GTK_WIDGET (vbox));
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (table), FALSE, TRUE, 0);
gtk_scrolled_window_set_policy (win, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
@@ -140,7 +140,7 @@ gw_track_message_status_cb (GtkAction *action,
gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
gtk_table_attach (table, widget , 0, 1, row, row + 1, GTK_FILL, 0, 0, 0);
- widget = gtk_label_new (camel_mime_message_get_subject(msg));
+ widget = gtk_label_new (camel_mime_message_get_subject (msg));
gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
gtk_table_attach (table, widget , 1, 2, row, row + 1, GTK_FILL, 0, 0, 0);
row++;
@@ -162,7 +162,7 @@ gw_track_message_status_cb (GtkAction *action,
/* creation date */
time = camel_mime_message_get_date (msg, NULL);
time_str = ctime (&time);
- time_str[strlen(time_str)-1] = '\0' ;
+ time_str[strlen (time_str)-1] = '\0' ;
boldmsg = g_strdup_printf ("<b>%s</b>", _("Creation date:"));
widget = gtk_label_new (boldmsg);
g_free (boldmsg);
@@ -186,7 +186,7 @@ gw_track_message_status_cb (GtkAction *action,
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (table), FALSE, TRUE, 0);
cnc = get_cnc (camel_folder_get_parent_store (folder));
- if (E_IS_GW_CONNECTION(cnc)) {
+ if (E_IS_GW_CONNECTION (cnc)) {
GSList *recipient_list;
e_gw_connection_get_item (
cnc, get_container_id (cnc, "Sent Items"),
@@ -211,46 +211,46 @@ gw_track_message_status_cb (GtkAction *action,
if (recipient->delivered_date) {
label = g_string_append (label, _("Delivered: "));
- label = g_string_append (label, format_date(recipient->delivered_date));
+ label = g_string_append (label, format_date (recipient->delivered_date));
label = g_string_append_c (label, '\n');
}
if (recipient->opened_date) {
label = g_string_append (label, _("Opened: "));
- label = g_string_append (label, format_date(recipient->opened_date));
+ label = g_string_append (label, format_date (recipient->opened_date));
label = g_string_append_c (label, '\n');
}
if (recipient->accepted_date) {
label = g_string_append (label, _("Accepted: "));
- label = g_string_append (label, format_date(recipient->accepted_date));
+ label = g_string_append (label, format_date (recipient->accepted_date));
label = g_string_append_c (label, '\n');
}
if (recipient->deleted_date) {
label = g_string_append (label, _("Deleted: "));
- label = g_string_append (label, format_date(recipient->deleted_date));
+ label = g_string_append (label, format_date (recipient->deleted_date));
label = g_string_append_c (label, '\n');
}
if (recipient->declined_date) {
label = g_string_append (label, _("Declined: "));
- label = g_string_append (label, format_date(recipient->declined_date));
+ label = g_string_append (label, format_date (recipient->declined_date));
label = g_string_append_c (label, '\n');
}
if (recipient->completed_date) {
label = g_string_append (label, _("Completed: "));
- label = g_string_append (label, format_date(recipient->completed_date));
+ label = g_string_append (label, format_date (recipient->completed_date));
label = g_string_append_c (label, '\n');
}
if (recipient->undelivered_date) {
label = g_string_append (label, _("Undelivered: "));
- label = g_string_append (label, format_date(recipient->undelivered_date));
+ label = g_string_append (label, format_date (recipient->undelivered_date));
label = g_string_append_c (label, '\n');
}
- detail = GTK_LABEL(gtk_label_new (label->str));
+ detail = GTK_LABEL (gtk_label_new (label->str));
g_string_free (label, TRUE);
gtk_label_set_selectable (detail, TRUE);
gtk_label_set_use_markup (detail, TRUE);
- gtk_table_attach (table, GTK_WIDGET(detail) , 1, 2, row, row+1, GTK_FILL, 0, 0, 0);
+ gtk_table_attach (table, GTK_WIDGET (detail) , 1, 2, row, row+1, GTK_FILL, 0, 0, 0);
row++;
}
}
diff --git a/plugins/imap-features/imap-headers.c b/plugins/imap-features/imap-headers.c
index f03c08e919..ad2757f683 100644
--- a/plugins/imap-features/imap-headers.c
+++ b/plugins/imap-features/imap-headers.c
@@ -97,28 +97,28 @@ imap_headers_commit (EPlugin *efp, EConfigHookItemFactoryData *data)
temp = mail_config_get_account_by_source_url (account->source->url);
- url = camel_url_new (e_account_get_string(account, E_ACCOUNT_SOURCE_URL), NULL);
+ url = camel_url_new (e_account_get_string (account, E_ACCOUNT_SOURCE_URL), NULL);
model = gtk_tree_view_get_model (ui->custom_headers_tree);
- if (gtk_tree_model_get_iter_first(model, &iter)) {
+ if (gtk_tree_model_get_iter_first (model, &iter)) {
do
{
header = NULL;
gtk_tree_model_get (model, &iter, 0, &header, -1);
- str = g_string_append (str, g_strstrip(header));
+ str = g_string_append (str, g_strstrip (header));
str = g_string_append (str, " ");
g_free (header);
- } while (gtk_tree_model_iter_next(model, &iter));
+ } while (gtk_tree_model_iter_next (model, &iter));
}
- header = g_strstrip(g_strdup(str->str));
+ header = g_strstrip (g_strdup (str->str));
camel_url_set_param (url, "imap_custom_headers", header);
g_free (header);
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ui->all_headers))) {
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ui->all_headers))) {
camel_url_set_param (url, "all_headers", "1");
camel_url_set_param (url, "basic_headers", NULL);
- } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ui->basic_headers))) {
+ } else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ui->basic_headers))) {
camel_url_set_param (url, "basic_headers", "1");
camel_url_set_param (url, "all_headers", NULL);
} else {
@@ -191,8 +191,8 @@ epif_add_header (GtkButton *button, EPImapFeaturesData *ui)
GtkTreeSelection *selection;
model = gtk_tree_view_get_model (ui->custom_headers_tree);
- gtk_tree_store_append (GTK_TREE_STORE(model), &iter, NULL);
- gtk_tree_store_set (GTK_TREE_STORE(model), &iter, 0, gtk_entry_get_text (ui->entry_header), -1);
+ gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
+ gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 0, gtk_entry_get_text (ui->entry_header), -1);
selection = gtk_tree_view_get_selection (ui->custom_headers_tree);
gtk_tree_selection_select_iter (selection, &iter);
@@ -223,7 +223,7 @@ epif_remove_header_clicked (GtkButton *button, EPImapFeaturesData *ui)
if (gtk_tree_selection_get_selected (select, &model, &iter)) {
path = gtk_tree_model_get_path (model, &iter);
- gtk_tree_store_remove(GTK_TREE_STORE(model), &iter);
+ gtk_tree_store_remove (GTK_TREE_STORE (model), &iter);
if (gtk_tree_path_prev (path)) {
gtk_tree_model_get_iter (model, &iter, path);
@@ -241,7 +241,7 @@ epif_remove_header_clicked (GtkButton *button, EPImapFeaturesData *ui)
static void
epif_fetch_all_headers_toggled (GtkWidget *all_option, EPImapFeaturesData *ui)
{
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(all_option)))
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (all_option)))
gtk_widget_set_sensitive (ui->custom_headers_box, FALSE);
else
gtk_widget_set_sensitive (ui->custom_headers_box, TRUE);
@@ -288,10 +288,10 @@ org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data)
ui->remove_header = GTK_BUTTON(e_builder_get_widget (builder, "removeHeader"));
ui->entry_header = GTK_ENTRY (e_builder_get_widget (builder, "customHeaderEntry"));
- url = camel_url_new (e_account_get_string(account, E_ACCOUNT_SOURCE_URL), NULL);
+ url = camel_url_new (e_account_get_string (account, E_ACCOUNT_SOURCE_URL), NULL);
ui->store = gtk_tree_store_new (1, G_TYPE_STRING);
- gtk_tree_view_set_model (ui->custom_headers_tree, GTK_TREE_MODEL(ui->store));
+ gtk_tree_view_set_model (ui->custom_headers_tree, GTK_TREE_MODEL (ui->store));
selection = gtk_tree_view_get_selection (ui->custom_headers_tree);
@@ -304,7 +304,7 @@ org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data)
ui->custom_headers_array = g_strsplit (custom_headers, " ", -1);
while (ui->custom_headers_array[i] ) {
- if (strlen(g_strstrip(ui->custom_headers_array[i]))) {
+ if (strlen (g_strstrip (ui->custom_headers_array[i]))) {
gtk_tree_store_append (ui->store, &iter, NULL);
gtk_tree_store_set (ui->store, &iter, 0, ui->custom_headers_array[i], -1);
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 5e46cb42b6..f0ca0fd807 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -132,7 +132,7 @@ struct _itip_puri {
void format_itip (EPlugin *ep, EMFormatHookTarget *target);
GtkWidget *itip_formatter_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data);
-static void itip_attachment_frame(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri);
+static void itip_attachment_frame (EMFormat *emf, CamelStream *stream, EMFormatPURI *puri);
gint e_plugin_lib_enable (EPlugin *ep, gint enable);
typedef struct {
@@ -229,7 +229,7 @@ find_to_address (struct _itip_puri *pitip, icalcomponent *ical_comp, icalparamet
{
EIterator *it;
- it = e_list_get_iterator((EList *)pitip->accounts);
+ it = e_list_get_iterator ((EList *)pitip->accounts);
if (!pitip->to_address && pitip->msg) {
EAccount *account = em_utils_guess_account (pitip->msg, pitip->folder);
@@ -245,12 +245,12 @@ find_to_address (struct _itip_puri *pitip, icalcomponent *ical_comp, icalparamet
/* Look through the list of attendees to find the user's address */
if (!pitip->to_address)
- while (e_iterator_is_valid(it)) {
- const EAccount *account = e_iterator_get(it);
+ while (e_iterator_is_valid (it)) {
+ const EAccount *account = e_iterator_get (it);
icalproperty *prop = NULL;
if (!account->enabled) {
- e_iterator_next(it);
+ e_iterator_next (it);
continue;
}
@@ -285,7 +285,7 @@ find_to_address (struct _itip_puri *pitip, icalcomponent *ical_comp, icalparamet
break;
}
- e_iterator_next(it);
+ e_iterator_next (it);
}
e_iterator_reset (it);
@@ -300,12 +300,12 @@ find_to_address (struct _itip_puri *pitip, icalcomponent *ical_comp, icalparamet
* general. Hence, we choose to iterate through the accounts list again.
*/
if (!pitip->to_address)
- while (e_iterator_is_valid(it)) {
- const EAccount *account = e_iterator_get(it);
+ while (e_iterator_is_valid (it)) {
+ const EAccount *account = e_iterator_get (it);
icalproperty *prop = NULL;
if (!account->enabled) {
- e_iterator_next(it);
+ e_iterator_next (it);
continue;
}
@@ -340,10 +340,10 @@ find_to_address (struct _itip_puri *pitip, icalcomponent *ical_comp, icalparamet
break;
}
- e_iterator_next(it);
+ e_iterator_next (it);
}
- g_object_unref(it);
+ g_object_unref (it);
}
static void
@@ -387,12 +387,12 @@ find_from_address (struct _itip_puri *pitip, icalcomponent *ical_comp)
if (param)
pitip->from_name = g_strdup (icalparameter_get_cn (param));
- it = e_list_get_iterator((EList *)pitip->accounts);
- while (e_iterator_is_valid(it)) {
- const EAccount *account = e_iterator_get(it);
+ it = e_list_get_iterator ((EList *)pitip->accounts);
+ while (e_iterator_is_valid (it)) {
+ const EAccount *account = e_iterator_get (it);
if (!account->enabled) {
- e_iterator_next(it);
+ e_iterator_next (it);
continue;
}
@@ -402,9 +402,9 @@ find_from_address (struct _itip_puri *pitip, icalcomponent *ical_comp)
break;
}
- e_iterator_next(it);
+ e_iterator_next (it);
}
- g_object_unref(it);
+ g_object_unref (it);
g_free (organizer_sentby_clean);
g_free (organizer_clean);
}
@@ -1723,7 +1723,7 @@ extract_itip_data (struct _itip_puri *pitip, GtkContainer *container, gboolean *
pitip->delegator_address = g_strdup (itip_strip_mailto (delfrom));
}
}
- g_free(my_address);
+ g_free (my_address);
prop = NULL;
/* Determine any delegate sections */
@@ -2017,7 +2017,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
}
} else {
/* Either not a recurring appointment or "apply-to-all" is not selected. So just delete this instance alone */
- camel_folder_summary_remove_uid(pitip->folder->summary, pitip->uid);
+ camel_folder_summary_remove_uid (pitip->folder->summary, pitip->uid);
camel_folder_change_info_remove_uid (changes, pitip->uid);
}
camel_folder_changed (pitip->folder, changes);
@@ -2180,7 +2180,7 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
gboolean response_enabled;
gboolean have_alarms = FALSE;
- info = (struct _itip_puri *) em_format_find_puri((EMFormat *)efh, pobject->classid);
+ info = (struct _itip_puri *) em_format_find_puri ((EMFormat *)efh, pobject->classid);
/* Accounts */
info->accounts = itip_addresses_get ();
@@ -2552,7 +2552,7 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target)
!camel_folder_get_message_user_flag (target->format->folder, target->format->uid, "$has_cal"))
camel_folder_set_message_user_flag (target->format->folder, target->format->uid, "$has_cal", TRUE);
- puri = (struct _itip_puri *)em_format_add_puri(target->format, sizeof(struct _itip_puri), classid, target->part, itip_attachment_frame);
+ puri = (struct _itip_puri *)em_format_add_puri (target->format, sizeof (struct _itip_puri), classid, target->part, itip_attachment_frame);
em_format_html_add_pobject ((EMFormatHTML *) target->format, sizeof (EMFormatHTMLPObject), classid, target->part, format_itip_object);
@@ -2748,12 +2748,12 @@ itip_formatter_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
}
static void
-itip_attachment_frame(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
+itip_attachment_frame (EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
{
struct _itip_puri *info = (struct _itip_puri *)puri;
d(printf("writing to frame content, handler is '%s'\n", info->handle->mime_type));
- info->handle->handler(emf, stream, info->puri.part, info->handle, FALSE);
- camel_stream_close(stream, NULL);
+ info->handle->handler (emf, stream, info->puri.part, info->handle, FALSE);
+ camel_stream_close (stream, NULL);
}
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index a46af56fa5..022c2c92d6 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -553,7 +553,7 @@ new_notify_status (EMEventTargetFolder *t)
if (is_part_enabled (GCONF_KEY_STATUS_NOTIFICATION)) {
gchar *safetext;
- safetext = g_markup_escape_text(msg, strlen(msg));
+ safetext = g_markup_escape_text (msg, strlen (msg));
if (notify) {
notify_notification_update (
notify, _("New email"),
@@ -581,7 +581,7 @@ new_notify_status (EMEventTargetFolder *t)
500, notification_callback, notify);
}
}
- g_free(safetext);
+ g_free (safetext);
}
#endif
@@ -688,17 +688,17 @@ do_play_sound (gboolean beep, gboolean use_theme, const gchar *file)
if (!beep) {
#ifdef HAVE_CANBERRA
if (!use_theme && file && *file)
- ca_context_play(mailnotification, 0,
+ ca_context_play (mailnotification, 0,
CA_PROP_MEDIA_FILENAME, file,
NULL);
else
- ca_context_play(mailnotification, 0,
+ ca_context_play (mailnotification, 0,
CA_PROP_EVENT_ID,"message-new-email",
NULL);
#endif
}
else
- gdk_beep();
+ gdk_beep ();
}
struct _SoundConfigureWidgets
@@ -740,8 +740,8 @@ sound_play_cb (GtkWidget *widget, gpointer data)
return;
file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (scw->filechooser));
- do_play_sound (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (scw->beep)),
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (scw->use_theme)),
+ do_play_sound (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scw->beep)),
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scw->use_theme)),
file);
g_free (file);
}
@@ -805,15 +805,15 @@ enable_sound (gint enable)
{
#ifdef HAVE_CANBERRA
if (enable) {
- ca_context_create(&mailnotification);
- ca_context_change_props(
+ ca_context_create (&mailnotification);
+ ca_context_change_props (
mailnotification,
CA_PROP_APPLICATION_NAME,
"mailnotification Plugin",
NULL);
}
else
- ca_context_destroy(mailnotification);
+ ca_context_destroy (mailnotification);
#endif
}
diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c
index 70520e1155..254451ce7d 100644
--- a/plugins/mailing-list-actions/mailing-list-actions.c
+++ b/plugins/mailing-list-actions/mailing-list-actions.c
@@ -165,7 +165,7 @@ emla_list_action_do (CamelFolder *folder,
}
/* get URL portion */
- url = g_strndup(headerpos, end - headerpos);
+ url = g_strndup (headerpos, end - headerpos);
if (strncmp (url, "mailto:", 6) == 0) {
if (emla_action_headers[t].interactive)
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index 9cbbfdc950..5649bd8661 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -336,12 +336,12 @@ mark_all_as_read (CamelFolder *folder)
gint i;
uids = camel_folder_get_uids (folder);
- camel_folder_freeze(folder);
+ camel_folder_freeze (folder);
for (i=0;i<uids->len;i++)
camel_folder_set_message_flags (
folder, uids->pdata[i],
CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
- camel_folder_thaw(folder);
+ camel_folder_thaw (folder);
camel_folder_free_uids (folder, uids);
}
diff --git a/plugins/plugin-manager/plugin-manager.c b/plugins/plugin-manager/plugin-manager.c
index 996f07810f..0817bdc674 100644
--- a/plugins/plugin-manager/plugin-manager.c
+++ b/plugins/plugin-manager/plugin-manager.c
@@ -198,7 +198,7 @@ eppm_enable_toggled (GtkCellRendererToggle *renderer, const gchar *path_string,
g_warning ("%s", plugin->name);
- gtk_list_store_set (GTK_LIST_STORE(m->model), &iter,
+ gtk_list_store_set (GTK_LIST_STORE (m->model), &iter,
COL_PLUGIN_ENABLED, plugin->enabled,
-1);
}
diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c
index f4d5c168be..630b5e3ab4 100644
--- a/plugins/prefer-plain/prefer-plain.c
+++ b/plugins/prefer-plain/prefer-plain.c
@@ -34,9 +34,9 @@
#include <mail/em-config.h>
#include <mail/em-format-hook.h>
-void org_gnome_prefer_plain_multipart_alternative(gpointer ep, EMFormatHookTarget *t);
-void org_gnome_prefer_plain_text_html(gpointer ep, EMFormatHookTarget *t);
-GtkWidget *org_gnome_prefer_plain_config_mode(struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
+void org_gnome_prefer_plain_multipart_alternative (gpointer ep, EMFormatHookTarget *t);
+void org_gnome_prefer_plain_text_html (gpointer ep, EMFormatHookTarget *t);
+GtkWidget *org_gnome_prefer_plain_config_mode (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
enum {
EPP_NORMAL,
@@ -94,7 +94,7 @@ export_as_attachments (CamelMultipart *mp, EMFormat *format, CamelStream *stream
if (!mp || !CAMEL_IS_MULTIPART (mp))
return;
- nparts = camel_multipart_get_number(mp);
+ nparts = camel_multipart_get_number (mp);
for (i = 0; i < nparts; i++) {
part = camel_multipart_get_part (mp, i);
@@ -111,7 +111,7 @@ export_as_attachments (CamelMultipart *mp, EMFormat *format, CamelStream *stream
}
void
-org_gnome_prefer_plain_multipart_alternative(gpointer ep, EMFormatHookTarget *t)
+org_gnome_prefer_plain_multipart_alternative (gpointer ep, EMFormatHookTarget *t)
{
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)t->part);
CamelMimePart *part, *display_part = NULL;
@@ -161,14 +161,14 @@ org_gnome_prefer_plain_multipart_alternative(gpointer ep, EMFormatHookTarget *t)
t->item->handler.old->handler (t->format, t->stream, t->part, t->item->handler.old, FALSE);
}
return;
- } else if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(t->format, t->stream, t->part);
+ } else if (!CAMEL_IS_MULTIPART (mp)) {
+ em_format_format_source (t->format, t->stream, t->part);
return;
}
- nparts = camel_multipart_get_number(mp);
+ nparts = camel_multipart_get_number (mp);
for (i=0; i<nparts; i++) {
- part = camel_multipart_get_part(mp, i);
+ part = camel_multipart_get_part (mp, i);
if (part && camel_content_type_is(camel_mime_part_get_content_type(part), "text", "plain")) {
displayid = i;
display_part = part;
@@ -180,14 +180,14 @@ org_gnome_prefer_plain_multipart_alternative(gpointer ep, EMFormatHookTarget *t)
if (display_part) {
g_string_append_printf(t->format->part_id, ".alternative-prefer-plain.%d", displayid);
em_format_part_as(t->format, t->stream, display_part, "text/plain");
- g_string_truncate(t->format->part_id, partidlen);
+ g_string_truncate (t->format->part_id, partidlen);
}
/* all other parts are attachments */
if (epp_show_suppressed)
export_as_attachments (mp, t->format, t->stream, display_part);
- g_string_truncate(t->format->part_id, partidlen);
+ g_string_truncate (t->format->part_id, partidlen);
}
static struct {
@@ -211,9 +211,9 @@ update_info_label (GtkWidget *info_label, guint mode)
}
static void
-epp_mode_changed(GtkComboBox *dropdown, GtkWidget *info_label)
+epp_mode_changed (GtkComboBox *dropdown, GtkWidget *info_label)
{
- epp_mode = gtk_combo_box_get_active(dropdown);
+ epp_mode = gtk_combo_box_get_active (dropdown);
if (epp_mode > 2)
epp_mode = 0;
@@ -231,7 +231,7 @@ epp_show_suppressed_toggled (GtkToggleButton *check, gpointer data)
}
GtkWidget *
-org_gnome_prefer_plain_config_mode(struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data)
+org_gnome_prefer_plain_config_mode (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data)
{
/*EMConfigTargetPrefs *ep = (EMConfigTargetPrefs *)data->target;*/
GtkComboBox *dropdown;
@@ -249,20 +249,20 @@ org_gnome_prefer_plain_config_mode(struct _EPlugin *epl, struct _EConfigHookItem
gtk_widget_show (check);
g_signal_connect (check, "toggled", G_CALLBACK (epp_show_suppressed_toggled), NULL);
- dropdown = (GtkComboBox *)gtk_combo_box_new();
- cell = gtk_cell_renderer_text_new();
- store = gtk_list_store_new(1, G_TYPE_STRING);
+ dropdown = (GtkComboBox *)gtk_combo_box_new ();
+ cell = gtk_cell_renderer_text_new ();
+ store = gtk_list_store_new (1, G_TYPE_STRING);
for (i = 0; i < G_N_ELEMENTS (epp_options); i++) {
- gtk_list_store_append(store, &iter);
- gtk_list_store_set(store, &iter, 0, _(epp_options[i].label), -1);
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter, 0, _(epp_options[i].label), -1);
}
- gtk_cell_layout_pack_start((GtkCellLayout *)dropdown, cell, TRUE);
+ gtk_cell_layout_pack_start ((GtkCellLayout *)dropdown, cell, TRUE);
gtk_cell_layout_set_attributes((GtkCellLayout *)dropdown, cell, "text", 0, NULL);
- gtk_combo_box_set_model(dropdown, (GtkTreeModel *)store);
+ gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store);
/*gtk_combo_box_set_active(dropdown, -1);*/
- gtk_combo_box_set_active(dropdown, epp_mode);
- gtk_widget_show((GtkWidget *)dropdown);
+ gtk_combo_box_set_active (dropdown, epp_mode);
+ gtk_widget_show ((GtkWidget *)dropdown);
dropdown_label = gtk_label_new_with_mnemonic (_("HTML _Mode"));
gtk_widget_show (dropdown_label);
@@ -278,20 +278,20 @@ org_gnome_prefer_plain_config_mode(struct _EPlugin *epl, struct _EConfigHookItem
g_signal_connect (dropdown, "changed", G_CALLBACK(epp_mode_changed), info);
g_object_get (data->parent, "n-rows", &i, NULL);
- gtk_table_attach((GtkTable *)data->parent, check, 0, 2, i, i + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
- gtk_table_attach((GtkTable *)data->parent, dropdown_label, 0, 1, i + 1, i + 2, 0, 0, 0, 0);
- gtk_table_attach((GtkTable *)data->parent, (GtkWidget *)dropdown, 1, 2, i + 1, i + 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
- gtk_table_attach((GtkTable *)data->parent, info, 1, 2, i + 2, i + 3, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+ gtk_table_attach ((GtkTable *)data->parent, check, 0, 2, i, i + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+ gtk_table_attach ((GtkTable *)data->parent, dropdown_label, 0, 1, i + 1, i + 2, 0, 0, 0, 0);
+ gtk_table_attach ((GtkTable *)data->parent, (GtkWidget *)dropdown, 1, 2, i + 1, i + 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+ gtk_table_attach ((GtkTable *)data->parent, info, 1, 2, i + 2, i + 3, GTK_FILL | GTK_EXPAND, 0, 0, 0);
/* since this isnt dynamic, we don't need to track each item */
return (GtkWidget *)dropdown;
}
-gint e_plugin_lib_enable(EPlugin *ep, gint enable);
+gint e_plugin_lib_enable (EPlugin *ep, gint enable);
gint
-e_plugin_lib_enable(EPlugin *ep, gint enable)
+e_plugin_lib_enable (EPlugin *ep, gint enable)
{
gchar *key;
gint i;
@@ -302,11 +302,11 @@ e_plugin_lib_enable(EPlugin *ep, gint enable)
if (enable) {
GConfValue *val;
- epp_gconf = gconf_client_get_default();
+ epp_gconf = gconf_client_get_default ();
key = gconf_client_get_string(epp_gconf, "/apps/evolution/eplugin/prefer_plain/mode", NULL);
if (key) {
for (i = 0; i < G_N_ELEMENTS (epp_options); i++) {
- if (!strcmp(epp_options[i].key, key)) {
+ if (!strcmp (epp_options[i].key, key)) {
epp_mode = i;
break;
}
@@ -324,7 +324,7 @@ e_plugin_lib_enable(EPlugin *ep, gint enable)
epp_show_suppressed = TRUE;
} else {
if (epp_gconf) {
- g_object_unref(epp_gconf);
+ g_object_unref (epp_gconf);
epp_gconf = NULL;
}
}
diff --git a/plugins/profiler/profiler.c b/plugins/profiler/profiler.c
index 1a50b6e740..9744a684de 100644
--- a/plugins/profiler/profiler.c
+++ b/plugins/profiler/profiler.c
@@ -43,7 +43,7 @@ e_plugin_lib_enable (EPlugin *ep, gint enable)
}
void
-org_gnome_evolution_profiler_event(EPlugin *ep, EProfileEventTarget *t)
+org_gnome_evolution_profiler_event (EPlugin *ep, EProfileEventTarget *t)
{
static FILE *fp;
@@ -54,7 +54,7 @@ org_gnome_evolution_profiler_event(EPlugin *ep, EProfileEventTarget *t)
fp = fopen(name, "w");
if (fp)
fprintf(stderr, "Generating profiling data in '%s'\n", name);
- g_free(name);
+ g_free (name);
}
if (fp)
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index 4b913744cc..dcd28cbd65 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -83,7 +83,7 @@ static void pst_process_journal (PstImporter *m, pst_item *item);
static void pst_import_file (PstImporter *m);
gchar *foldername_to_utf8 (const gchar *pstname);
-gchar *string_to_utf8(const gchar *string);
+gchar *string_to_utf8 (const gchar *string);
void contact_set_date (EContact *contact, EContactField id, FILETIME *date);
struct icaltimetype get_ical_date (FILETIME *date, gboolean is_date);
gchar *rfc2445_datetime_format (FILETIME *ft);
@@ -512,7 +512,7 @@ pst_import_folders (PstImporter *m, pst_desc_tree *topitem)
} else {
while (d_ptr != topitem && d_ptr->next == NULL) {
if (m->folder_uri) {
- g_free(m->folder_uri);
+ g_free (m->folder_uri);
}
m->folder_uri = g_strdup (m->parent_uri);
@@ -613,7 +613,7 @@ pst_process_item (PstImporter *m, pst_desc_tree *d_ptr)
* @return utf8 representation (caller should free), or NULL for error.
*/
gchar *
-string_to_utf8(const gchar *string)
+string_to_utf8 (const gchar *string)
{
gchar *utf8;
@@ -632,7 +632,7 @@ foldername_to_utf8 (const gchar *pstname)
{
gchar *utf8name, *folder_name;
- utf8name = string_to_utf8(pstname);
+ utf8name = string_to_utf8 (pstname);
if (utf8name == NULL) {
folder_name = camel_url_encode (pstname, NULL);
@@ -694,7 +694,7 @@ pst_create_folder (PstImporter *m)
dest_len = strlen (dest);
dest_end = dest + dest_len;
- pos = dest + strlen(parent);
+ pos = dest + strlen (parent);
while (pos != NULL && pos < dest_end) {
pos = g_strstr_len (pos+1, dest_end-pos, "/");
@@ -753,7 +753,7 @@ attachment_to_part (PstImporter *m, pst_item_attach *attach)
attach_rc = pst_attach_to_mem (&m->pst, attach);
camel_mime_part_set_content (part, (gchar *) attach_rc.data, attach_rc.size, mimetype);
- free(attach_rc.data);
+ free (attach_rc.data);
}
return part;
@@ -787,7 +787,7 @@ pst_process_email (PstImporter *m, pst_item *item)
camel_mime_message_set_subject (msg, "(lost subject)");
} else {
camel_mime_message_set_subject (msg, subj);
- g_free(subj);
+ g_free (subj);
}
}
@@ -886,7 +886,7 @@ pst_process_email (PstImporter *m, pst_item *item)
for (attach = item->attach; attach; attach = attach->next) {
if (attach->data.data || attach->i_id) {
- part = attachment_to_part(m, attach);
+ part = attachment_to_part (m, attach);
camel_multipart_add_part (mp, part);
g_object_unref (part);
}
@@ -1192,9 +1192,9 @@ set_cal_attachments (ECal *cal, ECalComponent *ec, PstImporter *m, pst_item_atta
CamelStream *stream;
struct stat st;
- part = attachment_to_part(m, attach);
+ part = attachment_to_part (m, attach);
- orig_filename = camel_mime_part_get_filename(part);
+ orig_filename = camel_mime_part_get_filename (part);
if (orig_filename == NULL) {
g_warning("Ignoring unnamed attachment");
@@ -1209,24 +1209,24 @@ set_cal_attachments (ECal *cal, ECalComponent *ec, PstImporter *m, pst_item_atta
g_free (tmp);
g_free (filename);
- dirname = g_path_get_dirname(path);
- if (g_mkdir_with_parents(dirname, 0777) == -1) {
+ dirname = g_path_get_dirname (path);
+ if (g_mkdir_with_parents (dirname, 0777) == -1) {
g_warning("Could not create directory %s: %s", dirname, g_strerror(errno));
- g_free(dirname);
+ g_free (dirname);
attach = attach->next;
continue;
}
- g_free(dirname);
+ g_free (dirname);
- if (g_access(path, F_OK) == 0) {
- if (g_access(path, W_OK) != 0) {
+ if (g_access (path, F_OK) == 0) {
+ if (g_access (path, W_OK) != 0) {
g_warning("Could not write file %s - file exists", path);
attach = attach->next;
continue;
}
}
- if (g_stat(path, &st) != -1 && !S_ISREG(st.st_mode)) {
+ if (g_stat (path, &st) != -1 && !S_ISREG (st.st_mode)) {
g_warning("Could not write file %s - not a file", path);
attach = attach->next;
continue;
@@ -1392,7 +1392,7 @@ fill_calcomponent (PstImporter *m, pst_item *item, ECalComponent *ec, const gcha
}
e_cal_component_add_alarm (ec, alarm);
- e_cal_component_alarm_free(alarm);
+ e_cal_component_alarm_free (alarm);
}
@@ -1441,7 +1441,7 @@ pst_process_appointment (PstImporter *m, pst_item *item)
if (!e_cal_create_object (m->calendar, e_cal_component_get_icalcomponent (ec), NULL, NULL)) {
g_warning("Creation of appointment failed");
- g_free(ec);
+ g_free (ec);
}
g_object_unref (ec);
@@ -1465,7 +1465,7 @@ pst_process_task (PstImporter *m, pst_item *item)
if (!e_cal_create_object (m->tasks, e_cal_component_get_icalcomponent (ec), NULL, NULL)) {
g_warning("Creation of task failed");
- g_free(ec);
+ g_free (ec);
}
g_object_unref (ec);
@@ -1512,7 +1512,7 @@ pst_process_journal (PstImporter *m, pst_item *item)
if (!e_cal_create_object (m->journal, e_cal_component_get_icalcomponent (ec), NULL, NULL)) {
g_warning("Creation of journal entry failed");
- g_free(ec);
+ g_free (ec);
}
g_object_unref (ec);
diff --git a/plugins/publish-calendar/publish-format-fb.c b/plugins/publish-calendar/publish-format-fb.c
index e75dc79b2d..97c90080fe 100644
--- a/plugins/publish-calendar/publish-format-fb.c
+++ b/plugins/publish-calendar/publish-format-fb.c
@@ -39,7 +39,7 @@ write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream, gin
ECal *client = NULL;
GList *objects;
icaltimezone *utc;
- time_t start = time(NULL), end;
+ time_t start = time (NULL), end;
icalcomponent *top_level;
gchar *email = NULL;
GList *users = NULL;
diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c
index 69cce8b0d2..b6bc9422a7 100644
--- a/plugins/publish-calendar/url-editor-dialog.c
+++ b/plugins/publish-calendar/url-editor-dialog.c
@@ -339,36 +339,36 @@ url_editor_dialog_construct (UrlEditorDialog *dialog)
e_load_ui_builder_definition (dialog->builder, "publish-calendar.ui");
#define GW(name) ((dialog->name) = e_builder_get_widget (dialog->builder, #name))
- GW(type_selector);
- GW(fb_duration_label);
- GW(fb_duration_spin);
- GW(fb_duration_combo);
- GW(publish_frequency);
-
- GW(events_swin);
-
- GW(publish_service);
- GW(server_entry);
- GW(file_entry);
-
- GW(port_entry);
- GW(username_entry);
- GW(password_entry);
- GW(remember_pw);
-
- GW(optional_label);
-
- GW(port_hbox);
- GW(username_hbox);
- GW(password_hbox);
- GW(server_hbox);
- GW(file_hbox);
-
- GW(port_label);
- GW(username_label);
- GW(password_label);
- GW(server_label);
- GW(file_label);
+ GW (type_selector);
+ GW (fb_duration_label);
+ GW (fb_duration_spin);
+ GW (fb_duration_combo);
+ GW (publish_frequency);
+
+ GW (events_swin);
+
+ GW (publish_service);
+ GW (server_entry);
+ GW (file_entry);
+
+ GW (port_entry);
+ GW (username_entry);
+ GW (password_entry);
+ GW (remember_pw);
+
+ GW (optional_label);
+
+ GW (port_hbox);
+ GW (username_hbox);
+ GW (password_hbox);
+ GW (server_hbox);
+ GW (file_hbox);
+
+ GW (port_label);
+ GW (username_label);
+ GW (password_label);
+ GW (server_label);
+ GW (file_label);
#undef GW
uri = dialog->uri;
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index 0b33453ff3..277350e5de 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -571,7 +571,7 @@ em_junk_sa_respawn_spamd ()
}
gboolean
-em_junk_sa_check_junk(EPlugin *ep, EMJunkTarget *target)
+em_junk_sa_check_junk (EPlugin *ep, EMJunkTarget *target)
{
GByteArray *out = NULL;
const gchar *argv[7];
@@ -801,7 +801,7 @@ em_junk_sa_validate_binary (EPlugin *ep)
}
static void
-em_junk_sa_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointer data)
+em_junk_sa_setting_notify (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointer data)
{
GConfValue *value;
gchar *tkey;
@@ -811,17 +811,17 @@ em_junk_sa_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry,
if (!(value = gconf_entry_get_value (entry)))
return;
- tkey = strrchr(entry->key, '/');
+ tkey = strrchr (entry->key, '/');
g_return_if_fail (tkey != NULL);
if (!strcmp(tkey, "local_only"))
- em_junk_sa_local_only = gconf_value_get_bool(value);
+ em_junk_sa_local_only = gconf_value_get_bool (value);
else if (!strcmp(tkey, "use_daemon"))
- em_junk_sa_use_daemon = gconf_value_get_bool(value);
+ em_junk_sa_use_daemon = gconf_value_get_bool (value);
else if (!strcmp(tkey, "socket_path")) {
G_LOCK (socket_path);
g_free (em_junk_sa_preferred_socket_path);
- em_junk_sa_preferred_socket_path = g_strdup (gconf_value_get_string(value));
+ em_junk_sa_preferred_socket_path = g_strdup (gconf_value_get_string (value));
G_UNLOCK (socket_path);
}
}
@@ -834,7 +834,7 @@ e_plugin_lib_enable (EPlugin *ep, gint enable)
if (is_installed)
em_junk_sa_tested = FALSE;
- em_junk_sa_init();
+ em_junk_sa_init ();
return 0;
}
@@ -845,7 +845,7 @@ em_junk_sa_init (void)
G_LOCK (init);
if (!em_junk_sa_gconf) {
- em_junk_sa_gconf = gconf_client_get_default();
+ em_junk_sa_gconf = gconf_client_get_default ();
gconf_client_add_dir (em_junk_sa_gconf, "/apps/evolution/mail/junk/sa", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
em_junk_sa_local_only = gconf_client_get_bool (em_junk_sa_gconf, "/apps/evolution/mail/junk/sa/local_only", NULL);
@@ -908,7 +908,7 @@ em_junk_sa_finalize (void)
{
d(fprintf (stderr, "em_junk_sa_finalize\n"));
- g_object_unref(em_junk_sa_gconf);
+ g_object_unref (em_junk_sa_gconf);
em_junk_sa_kill_spamd ();
}
diff --git a/plugins/save-calendar/csv-format.c b/plugins/save-calendar/csv-format.c
index c3f566de4b..58dd9ac5af 100644
--- a/plugins/save-calendar/csv-format.c
+++ b/plugins/save-calendar/csv-format.c
@@ -243,7 +243,7 @@ add_string_to_csv (GString *line, const gchar *value, CsvConfig *config)
{
/* Will add a string to the record and will check for the need for quotes */
- if ((value) && (strlen(value)>0)) {
+ if ((value) && (strlen (value)>0)) {
gboolean needquotes = string_needsquotes (value, config);
if (needquotes)
@@ -261,7 +261,7 @@ static gchar *
userstring_to_systemstring (const gchar *userstring)
{
const gchar *text = userstring;
- gint i=0, len = strlen(text);
+ gint i=0, len = strlen (text);
GString *str = g_string_new ("");
gchar *retval = NULL;
@@ -340,11 +340,11 @@ do_save_calendar_csv (FormatHandler *handler,
config = g_new (CsvConfig, 1);
- tmp = gtk_entry_get_text (GTK_ENTRY(d->delimiter_entry));
+ tmp = gtk_entry_get_text (GTK_ENTRY (d->delimiter_entry));
config->delimiter = userstring_to_systemstring (tmp?tmp:", ");
- tmp = gtk_entry_get_text (GTK_ENTRY(d->newline_entry));
+ tmp = gtk_entry_get_text (GTK_ENTRY (d->newline_entry));
config->newline = userstring_to_systemstring (tmp?tmp:"\\n");
- tmp = gtk_entry_get_text (GTK_ENTRY(d->quote_entry));
+ tmp = gtk_entry_get_text (GTK_ENTRY (d->quote_entry));
config->quote = userstring_to_systemstring (tmp?tmp:"\"");
config->header = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (d->header_check));
@@ -379,10 +379,10 @@ do_save_calendar_csv (FormatHandler *handler,
};
line = g_string_new ("");
- for (i=0;i<G_N_ELEMENTS(labels);i++) {
+ for (i=0;i<G_N_ELEMENTS (labels);i++) {
if (i>0)
- line = g_string_append(line, config->delimiter);
- line = g_string_append(line, _(labels[i]));
+ line = g_string_append (line, config->delimiter);
+ line = g_string_append (line, _(labels[i]));
}
line = g_string_append (line, config->newline);
diff --git a/plugins/save-calendar/rdf-format.c b/plugins/save-calendar/rdf-format.c
index acbb6557c6..8014fe9ddf 100644
--- a/plugins/save-calendar/rdf-format.c
+++ b/plugins/save-calendar/rdf-format.c
@@ -205,7 +205,7 @@ do_save_calendar_rdf (FormatHandler *handler, ESourceSelector *selector, ECalSou
stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (selector))), dest_uri, &error);
if (stream && e_cal_get_object_list_as_comp (source_client, "#t", &objects, NULL)) {
- xmlBufferPtr buffer=xmlBufferCreate();
+ xmlBufferPtr buffer=xmlBufferCreate ();
xmlDocPtr doc = xmlNewDoc((xmlChar *) "1.0");
xmlNodePtr fnode;
diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c
index b7872a68d4..facb915566 100644
--- a/plugins/save-calendar/save-calendar.c
+++ b/plugins/save-calendar/save-calendar.c
@@ -118,7 +118,7 @@ ask_destination_and_save (ESourceSelector *selector, ECalSourceType type)
GtkWidget *extra_widget = gtk_vbox_new (FALSE, 0);
GtkWidget *hbox = gtk_hbox_new (FALSE, 0);
GtkLabel *label = GTK_LABEL (gtk_label_new_with_mnemonic (_("_Format:")));
- GtkComboBox *combo = GTK_COMBO_BOX(gtk_combo_box_new ());
+ GtkComboBox *combo = GTK_COMBO_BOX (gtk_combo_box_new ());
GtkTreeModel *model = GTK_TREE_MODEL (gtk_list_store_new
(N_DEST_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER));
GtkCellRenderer *renderer=NULL;
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index 483d9400eb..6b0857875e 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -131,8 +131,8 @@ commit_changes (UIData *ui)
gtk_tree_model_get (model, &iter, CLUE_VALUE_COLUMN, &value, -1);
/* Check if the keyword and value are not empty */
- if ((keyword) && (value) && (g_utf8_strlen(g_strstrip(keyword), -1) > 0)
- && (g_utf8_strlen(g_strstrip(value), -1) > 0)) {
+ if ((keyword) && (value) && (g_utf8_strlen (g_strstrip (keyword), -1) > 0)
+ && (g_utf8_strlen (g_strstrip (value), -1) > 0)) {
key = g_strdup_printf("%s=%s", keyword, value);
clue_list = g_slist_append (clue_list, key);
}
@@ -252,7 +252,7 @@ clue_add_clicked (GtkButton *button, UIData *ui)
gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc) clue_foreach_check_isempty, ui);
/* Disconnect from signal so that we can create an empty row */
- g_signal_handlers_disconnect_matched(G_OBJECT(model), G_SIGNAL_MATCH_FUNC, 0, 0, NULL, clue_check_isempty, ui);
+ g_signal_handlers_disconnect_matched (G_OBJECT (model), G_SIGNAL_MATCH_FUNC, 0, 0, NULL, clue_check_isempty, ui);
/* TODO : Trim and check for blank strings */
new_clue = g_strdup ("");
@@ -265,7 +265,7 @@ clue_add_clicked (GtkButton *button, UIData *ui)
if (path) {
gtk_tree_view_set_cursor (GTK_TREE_VIEW (ui->treeview), path, focus_col, TRUE);
- gtk_tree_view_row_activated(GTK_TREE_VIEW(ui->treeview), path, focus_col);
+ gtk_tree_view_row_activated (GTK_TREE_VIEW (ui->treeview), path, focus_col);
gtk_tree_path_free (path);
}
@@ -291,17 +291,17 @@ clue_remove_clicked (GtkButton *button, UIData *ui)
/* Get the path and move to the previous node :) */
path = gtk_tree_model_get_path (model, &iter);
if (path)
- valid = gtk_tree_path_prev(path);
+ valid = gtk_tree_path_prev (path);
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
len = gtk_tree_model_iter_n_children (model, NULL);
if (len > 0) {
- if (gtk_list_store_iter_is_valid (GTK_LIST_STORE(model), &iter)) {
+ if (gtk_list_store_iter_is_valid (GTK_LIST_STORE (model), &iter)) {
gtk_tree_selection_select_iter (selection, &iter);
} else {
if (path && valid) {
- gtk_tree_model_get_iter(model, &iter, path);
+ gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_selection_select_iter (selection, &iter);
}
}
@@ -310,7 +310,7 @@ clue_remove_clicked (GtkButton *button, UIData *ui)
gtk_widget_set_sensitive (ui->clue_remove, FALSE);
}
- gtk_widget_grab_focus(ui->treeview);
+ gtk_widget_grab_focus (ui->treeview);
gtk_tree_path_free (path);
commit_changes (ui);
@@ -344,7 +344,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
GtkCellRenderer *renderer_key, *renderer_value;
GtkTreeSelection *selection;
GtkTreeIter iter;
- GConfClient *gconf = gconf_client_get_default();
+ GConfClient *gconf = gconf_client_get_default ();
GtkWidget *hbox;
GSList *clue_list = NULL, *list;
GtkTreeModel *model;
@@ -444,7 +444,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
gchar **temp = g_strsplit (list->data, "=", 2);
gtk_list_store_append (ui->store, &iter);
gtk_list_store_set (ui->store, &iter, CLUE_KEYWORD_COLUMN, temp[0], CLUE_VALUE_COLUMN, temp[1], -1);
- g_strfreev(temp);
+ g_strfreev (temp);
}
if (clue_list) {
@@ -483,7 +483,7 @@ create_new_message (CamelFolder *folder, const gchar *uid, CamelMimeMessage *mes
template = g_object_get_data (G_OBJECT (action), "template");
/* The new message we are creating */
- new = camel_mime_message_new();
+ new = camel_mime_message_new ();
/* make the exact copy of the template message, with all
its attachments and message structure */
@@ -499,7 +499,7 @@ create_new_message (CamelFolder *folder, const gchar *uid, CamelMimeMessage *mes
header = ((CamelMimePart *)message)->headers;
while (header) {
if (g_ascii_strncasecmp (header->name, "content-", 8) != 0) {
- camel_medium_add_header((CamelMedium *) new,
+ camel_medium_add_header ((CamelMedium *) new,
header->name,
header->value);
}
diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c
index 35f152a373..03577a4667 100644
--- a/plugins/tnef-attachments/tnef-plugin.c
+++ b/plugins/tnef-attachments/tnef-plugin.c
@@ -49,26 +49,26 @@ gint verbose = 0;
gint saveRTF = 0;
gint saveintermediate = 0;
gboolean loaded = FALSE;
-void processTnef(TNEFStruct *tnef, const gchar *tmpdir);
-void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir);
-void saveVCard(TNEFStruct *tnef, const gchar *tmpdir);
-void saveVTask(TNEFStruct *tnef, const gchar *tmpdir);
+void processTnef (TNEFStruct *tnef, const gchar *tmpdir);
+void saveVCalendar (TNEFStruct *tnef, const gchar *tmpdir);
+void saveVCard (TNEFStruct *tnef, const gchar *tmpdir);
+void saveVTask (TNEFStruct *tnef, const gchar *tmpdir);
-void org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t);
+void org_gnome_format_tnef (gpointer ep, EMFormatHookTarget *t);
/* Other Prototypes */
-void fprintProperty(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, const gchar text[]);
-void fprintUserProp(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, const gchar text[]);
-void quotedfprint(FILE *fptr, variableLength *vl);
-void cstylefprint(FILE *fptr, variableLength *vl);
-void printRtf(FILE *fptr, variableLength *vl);
-void printRrule(FILE *fptr, gchar *recur_data, gint size, TNEFStruct *tnef);
-guchar getRruleCount(guchar a, guchar b);
-guchar getRruleMonthNum(guchar a, guchar b);
-gchar * getRruleDayname(guchar a);
+void fprintProperty (TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, const gchar text[]);
+void fprintUserProp (TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, const gchar text[]);
+void quotedfprint (FILE *fptr, variableLength *vl);
+void cstylefprint (FILE *fptr, variableLength *vl);
+void printRtf (FILE *fptr, variableLength *vl);
+void printRrule (FILE *fptr, gchar *recur_data, gint size, TNEFStruct *tnef);
+guchar getRruleCount (guchar a, guchar b);
+guchar getRruleMonthNum (guchar a, guchar b);
+gchar * getRruleDayname (guchar a);
void
-org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
+org_gnome_format_tnef (gpointer ep, EMFormatHookTarget *t)
{
gchar *tmpdir, *name;
CamelStream *out;
@@ -86,43 +86,43 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
name = g_build_filename(tmpdir, ".evo-attachment.tnef", NULL);
- out = camel_stream_fs_new_with_name(name, O_RDWR|O_CREAT, 0666, NULL);
+ out = camel_stream_fs_new_with_name (name, O_RDWR|O_CREAT, 0666, NULL);
if (out == NULL)
goto fail;
content = camel_medium_get_content ((CamelMedium *)t->part);
if (content == NULL)
goto fail;
- if (camel_data_wrapper_decode_to_stream(content, out, NULL) == -1
- || camel_stream_close(out, NULL) == -1) {
+ if (camel_data_wrapper_decode_to_stream (content, out, NULL) == -1
+ || camel_stream_close (out, NULL) == -1) {
g_object_unref (out);
goto fail;
}
g_object_unref (out);
/* Extracting the winmail.dat */
- TNEFInitialize(&tnef);
+ TNEFInitialize (&tnef);
tnef.Debug = verbose;
- if (TNEFParseFile(name, &tnef) == -1) {
+ if (TNEFParseFile (name, &tnef) == -1) {
printf("ERROR processing file\n");
}
- processTnef(&tnef, tmpdir);
+ processTnef (&tnef, tmpdir);
- TNEFFree(&tnef);
+ TNEFFree (&tnef);
/* Extraction done */
- dir = opendir(tmpdir);
+ dir = opendir (tmpdir);
if (dir == NULL)
goto fail;
- mainpart = camel_mime_part_new();
+ mainpart = camel_mime_part_new ();
- mp = camel_multipart_new();
+ mp = camel_multipart_new ();
camel_data_wrapper_set_mime_type((CamelDataWrapper *)mp, "multipart/mixed");
- camel_multipart_set_boundary(mp, NULL);
+ camel_multipart_set_boundary (mp, NULL);
camel_medium_set_content ((CamelMedium *)mainpart, (CamelDataWrapper *)mp);
- while ((d = readdir(dir))) {
+ while ((d = readdir (dir))) {
CamelMimePart *part;
CamelDataWrapper *content;
CamelStream *stream;
@@ -134,42 +134,42 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
|| !strcmp(d->d_name, ".evo-attachment.tnef"))
continue;
- path = g_build_filename(tmpdir, d->d_name, NULL);
+ path = g_build_filename (tmpdir, d->d_name, NULL);
- stream = camel_stream_fs_new_with_name(path, O_RDONLY, 0, NULL);
- content = camel_data_wrapper_new();
- camel_data_wrapper_construct_from_stream(content, stream, NULL);
+ stream = camel_stream_fs_new_with_name (path, O_RDONLY, 0, NULL);
+ content = camel_data_wrapper_new ();
+ camel_data_wrapper_construct_from_stream (content, stream, NULL);
g_object_unref (stream);
- part = camel_mime_part_new();
- camel_mime_part_set_encoding(part, CAMEL_TRANSFER_ENCODING_BINARY);
+ part = camel_mime_part_new ();
+ camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_BINARY);
camel_medium_set_content ((CamelMedium *)part, content);
g_object_unref (content);
- type = em_format_snoop_type(part);
+ type = em_format_snoop_type (part);
if (type)
- camel_data_wrapper_set_mime_type((CamelDataWrapper *)part, type);
+ camel_data_wrapper_set_mime_type ((CamelDataWrapper *)part, type);
- camel_mime_part_set_filename(part, d->d_name);
+ camel_mime_part_set_filename (part, d->d_name);
- g_free(path);
+ g_free (path);
- camel_multipart_add_part(mp, part);
+ camel_multipart_add_part (mp, part);
g_object_unref (part);
}
- closedir(dir);
+ closedir (dir);
len = t->format->part_id->len;
g_string_append_printf(t->format->part_id, ".tnef");
- if (camel_multipart_get_number(mp) > 0)
+ if (camel_multipart_get_number (mp) > 0)
em_format_part_as(t->format, t->stream, mainpart, "multipart/mixed");
else if (t->item->handler.old)
- t->item->handler.old->handler(t->format, t->stream, t->part, t->item->handler.old, FALSE);
+ t->item->handler.old->handler (t->format, t->stream, t->part, t->item->handler.old, FALSE);
- g_string_truncate(t->format->part_id, len);
+ g_string_truncate (t->format->part_id, len);
g_object_unref (mp);
g_object_unref (mainpart);
@@ -177,30 +177,30 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
goto ok;
fail:
if (t->item->handler.old)
- t->item->handler.old->handler(t->format, t->stream, t->part, t->item->handler.old, FALSE);
+ t->item->handler.old->handler (t->format, t->stream, t->part, t->item->handler.old, FALSE);
ok:
- g_free(name);
- g_free(tmpdir);
+ g_free (name);
+ g_free (tmpdir);
}
-gint e_plugin_lib_enable(EPlugin *ep, gint enable);
+gint e_plugin_lib_enable (EPlugin *ep, gint enable);
gint
-e_plugin_lib_enable(EPlugin *ep, gint enable)
+e_plugin_lib_enable (EPlugin *ep, gint enable)
{
if (loaded)
return 0;
loaded = TRUE;
if (enable) {
- bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
}
return 0;
}
-void processTnef(TNEFStruct *tnef, const gchar *tmpdir) {
+void processTnef (TNEFStruct *tnef, const gchar *tmpdir) {
variableLength *filename;
variableLength *filedata;
Attachment *p;
@@ -216,23 +216,23 @@ void processTnef(TNEFStruct *tnef, const gchar *tmpdir) {
/* ie: it's a Contact Card, Task, or Meeting request (vCal/vCard) */
if (tnef->messageClass[0] != 0) {
if (strcmp(tnef->messageClass, "IPM.Contact") == 0) {
- saveVCard(tnef, tmpdir);
+ saveVCard (tnef, tmpdir);
}
if (strcmp(tnef->messageClass, "IPM.Task") == 0) {
- saveVTask(tnef, tmpdir);
+ saveVTask (tnef, tmpdir);
}
if (strcmp(tnef->messageClass, "IPM.Appointment") == 0) {
- saveVCalendar(tnef, tmpdir);
+ saveVCalendar (tnef, tmpdir);
foundCal = 1;
}
}
- if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_STRING8,0x24))) != MAPI_UNDEFINED) {
+ if ((filename = MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_STRING8,0x24))) != MAPI_UNDEFINED) {
if (strcmp(filename->data, "IPM.Appointment") == 0) {
/* If it's "indicated" twice, we don't want to save 2 calendar entries. */
if (foundCal == 0) {
- saveVCalendar(tnef, tmpdir);
+ saveVCalendar (tnef, tmpdir);
}
}
}
@@ -240,26 +240,26 @@ void processTnef(TNEFStruct *tnef, const gchar *tmpdir) {
if (strcmp(tnef->messageClass, "IPM.Microsoft Mail.Note") == 0) {
if ((saveRTF == 1) && (tnef->subject.size > 0)) {
/* Description */
- if ((filename=MAPIFindProperty(&(tnef->MapiProperties),
- PROP_TAG(PT_BINARY, PR_RTF_COMPRESSED)))
+ if ((filename=MAPIFindProperty (&(tnef->MapiProperties),
+ PROP_TAG (PT_BINARY, PR_RTF_COMPRESSED)))
!= MAPI_UNDEFINED) {
variableLength buf;
- if ((buf.data = (gchar *) DecompressRTF(filename, &buf.size)) != NULL) {
+ if ((buf.data = (gchar *) DecompressRTF (filename, &buf.size)) != NULL) {
sprintf(ifilename, "%s/%s.rtf", tmpdir, tnef->subject.data);
- for (i=0; i<strlen(ifilename); i++)
+ for (i=0; i<strlen (ifilename); i++)
if (ifilename[i] == ' ')
ifilename[i] = '_';
if ((fptr = fopen(ifilename, "wb"))==NULL) {
printf("ERROR: Error writing file to disk!");
} else {
- fwrite(buf.data,
- sizeof(BYTE),
+ fwrite (buf.data,
+ sizeof (BYTE),
buf.size,
fptr);
- fclose(fptr);
+ fclose (fptr);
}
- free(buf.data);
+ free (buf.data);
}
}
}
@@ -276,11 +276,11 @@ void processTnef(TNEFStruct *tnef, const gchar *tmpdir) {
/* See if the contents are stored as "attached data" */
/* Inside the MAPI blocks. */
- if ((filedata = MAPIFindProperty(&(p->MAPI),
- PROP_TAG(PT_OBJECT, PR_ATTACH_DATA_OBJ)))
+ if ((filedata = MAPIFindProperty (&(p->MAPI),
+ PROP_TAG (PT_OBJECT, PR_ATTACH_DATA_OBJ)))
== MAPI_UNDEFINED) {
- if ((filedata = MAPIFindProperty(&(p->MAPI),
- PROP_TAG(PT_BINARY, PR_ATTACH_DATA_OBJ)))
+ if ((filedata = MAPIFindProperty (&(p->MAPI),
+ PROP_TAG (PT_BINARY, PR_ATTACH_DATA_OBJ)))
== MAPI_UNDEFINED) {
/* Nope, standard TNEF stuff. */
filedata = &(p->FileData);
@@ -294,43 +294,43 @@ void processTnef(TNEFStruct *tnef, const gchar *tmpdir) {
/* 16-byte identifier first. */
TNEFStruct emb_tnef;
DWORD signature;
- memcpy(&signature, filedata->data+16, sizeof(DWORD));
- if (TNEFCheckForSignature(signature) == 0) {
+ memcpy (&signature, filedata->data+16, sizeof (DWORD));
+ if (TNEFCheckForSignature (signature) == 0) {
/* Has a TNEF signature, so process it. */
- TNEFInitialize(&emb_tnef);
+ TNEFInitialize (&emb_tnef);
emb_tnef.Debug = tnef->Debug;
- if (TNEFParseMemory((guchar *) filedata->data+16,
+ if (TNEFParseMemory ((guchar *) filedata->data+16,
filedata->size-16, &emb_tnef) != -1) {
- processTnef(&emb_tnef, tmpdir);
+ processTnef (&emb_tnef, tmpdir);
RealAttachment = 0;
}
- TNEFFree(&emb_tnef);
+ TNEFFree (&emb_tnef);
}
} else {
TNEFStruct emb_tnef;
DWORD signature;
- memcpy(&signature, filedata->data, sizeof(DWORD));
- if (TNEFCheckForSignature(signature) == 0) {
+ memcpy (&signature, filedata->data, sizeof (DWORD));
+ if (TNEFCheckForSignature (signature) == 0) {
/* Has a TNEF signature, so process it. */
- TNEFInitialize(&emb_tnef);
+ TNEFInitialize (&emb_tnef);
emb_tnef.Debug = tnef->Debug;
- if (TNEFParseMemory((guchar *) filedata->data,
+ if (TNEFParseMemory ((guchar *) filedata->data,
filedata->size, &emb_tnef) != -1) {
- processTnef(&emb_tnef, tmpdir);
+ processTnef (&emb_tnef, tmpdir);
RealAttachment = 0;
}
- TNEFFree(&emb_tnef);
+ TNEFFree (&emb_tnef);
}
}
if ((RealAttachment == 1) || (saveintermediate == 1)) {
gchar tmpname[20];
/* Ok, it's not an embedded stream, so now we */
/* process it. */
- if ((filename = MAPIFindProperty(&(p->MAPI),
- PROP_TAG(PT_STRING8, PR_ATTACH_LONG_FILENAME)))
+ if ((filename = MAPIFindProperty (&(p->MAPI),
+ PROP_TAG (PT_STRING8, PR_ATTACH_LONG_FILENAME)))
== MAPI_UNDEFINED) {
- if ((filename = MAPIFindProperty(&(p->MAPI),
- PROP_TAG(PT_STRING8, PR_DISPLAY_NAME)))
+ if ((filename = MAPIFindProperty (&(p->MAPI),
+ PROP_TAG (PT_STRING8, PR_DISPLAY_NAME)))
== MAPI_UNDEFINED) {
filename = &(p->Title);
}
@@ -341,7 +341,7 @@ void processTnef(TNEFStruct *tnef, const gchar *tmpdir) {
filename->data = tmpname;
}
sprintf(ifilename, "%s/%s", tmpdir, filename->data);
- for (i=0; i<strlen(ifilename); i++)
+ for (i=0; i<strlen (ifilename); i++)
if (ifilename[i] == ' ')
ifilename[i] = '_';
@@ -349,17 +349,17 @@ void processTnef(TNEFStruct *tnef, const gchar *tmpdir) {
printf("ERROR: Error writing file to disk!");
} else {
if (object == 1) {
- fwrite(filedata->data + 16,
- sizeof(BYTE),
+ fwrite (filedata->data + 16,
+ sizeof (BYTE),
filedata->size - 16,
fptr);
} else {
- fwrite(filedata->data,
- sizeof(BYTE),
+ fwrite (filedata->data,
+ sizeof (BYTE),
filedata->size,
fptr);
}
- fclose(fptr);
+ fclose (fptr);
}
}
} /* if size>0 */
@@ -367,7 +367,7 @@ void processTnef(TNEFStruct *tnef, const gchar *tmpdir) {
} /* while p!= null */
}
-void saveVCard(TNEFStruct *tnef, const gchar *tmpdir) {
+void saveVCard (TNEFStruct *tnef, const gchar *tmpdir) {
gchar ifilename[512];
FILE *fptr;
variableLength *vl;
@@ -375,8 +375,8 @@ void saveVCard(TNEFStruct *tnef, const gchar *tmpdir) {
dtr thedate;
gint boolean, i;
- if ((vl = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_DISPLAY_NAME))) == MAPI_UNDEFINED) {
- if ((vl=MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_COMPANY_NAME))) == MAPI_UNDEFINED) {
+ if ((vl = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_DISPLAY_NAME))) == MAPI_UNDEFINED) {
+ if ((vl=MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_COMPANY_NAME))) == MAPI_UNDEFINED) {
if (tnef->subject.size > 0) {
sprintf(ifilename, "%s/%s.vcard", tmpdir, tnef->subject.data);
} else {
@@ -388,7 +388,7 @@ void saveVCard(TNEFStruct *tnef, const gchar *tmpdir) {
} else {
sprintf(ifilename, "%s/%s.vcard", tmpdir, vl->data);
}
- for (i=0; i<strlen(ifilename); i++)
+ for (i=0; i<strlen (ifilename); i++)
if (ifilename[i] == ' ')
ifilename[i] = '_';
printf("%s\n", ifilename);
@@ -408,12 +408,12 @@ void saveVCard(TNEFStruct *tnef, const gchar *tmpdir) {
fprintProperty(tnef, fptr, PT_STRING8, PR_ASSISTANT, "X-EVOLUTION-ASSISTANT:%s\n");
/* Organizational */
- if ((vl=MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_COMPANY_NAME))) != MAPI_UNDEFINED) {
+ if ((vl=MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_COMPANY_NAME))) != MAPI_UNDEFINED) {
if (vl->size > 0) {
if ((vl->size == 1) && (vl->data[0] == 0)) {
} else {
fprintf(fptr,"ORG:%s", vl->data);
- if ((vl=MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_DEPARTMENT_NAME))) != MAPI_UNDEFINED) {
+ if ((vl=MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_DEPARTMENT_NAME))) != MAPI_UNDEFINED) {
fprintf(fptr,";%s", vl->data);
}
fprintf(fptr, "\n");
@@ -427,160 +427,160 @@ void saveVCard(TNEFStruct *tnef, const gchar *tmpdir) {
fprintProperty(tnef, fptr, PT_STRING8, PR_BODY, "NOTE:%s\n");
if (tnef->body.size > 0) {
fprintf(fptr, "NOTE;QUOTED-PRINTABLE:");
- quotedfprint(fptr, &(tnef->body));
+ quotedfprint (fptr, &(tnef->body));
fprintf(fptr,"\n");
}
/* Business Address */
boolean = 0;
- if ((pobox = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_POST_OFFICE_BOX))) != MAPI_UNDEFINED) {
+ if ((pobox = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_POST_OFFICE_BOX))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((street = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_STREET_ADDRESS))) != MAPI_UNDEFINED) {
+ if ((street = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_STREET_ADDRESS))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((city = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_LOCALITY))) != MAPI_UNDEFINED) {
+ if ((city = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_LOCALITY))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((state = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_STATE_OR_PROVINCE))) != MAPI_UNDEFINED) {
+ if ((state = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_STATE_OR_PROVINCE))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((zip = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_POSTAL_CODE))) != MAPI_UNDEFINED) {
+ if ((zip = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_POSTAL_CODE))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((country = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_COUNTRY))) != MAPI_UNDEFINED) {
+ if ((country = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_COUNTRY))) != MAPI_UNDEFINED) {
boolean = 1;
}
if (boolean == 1) {
fprintf(fptr, "ADR;QUOTED-PRINTABLE;WORK:");
if (pobox != MAPI_UNDEFINED) {
- quotedfprint(fptr, pobox);
+ quotedfprint (fptr, pobox);
}
fprintf(fptr, ";;");
if (street != MAPI_UNDEFINED) {
- quotedfprint(fptr, street);
+ quotedfprint (fptr, street);
}
fprintf(fptr, ";");
if (city != MAPI_UNDEFINED) {
- quotedfprint(fptr, city);
+ quotedfprint (fptr, city);
}
fprintf(fptr, ";");
if (state != MAPI_UNDEFINED) {
- quotedfprint(fptr, state);
+ quotedfprint (fptr, state);
}
fprintf(fptr, ";");
if (zip != MAPI_UNDEFINED) {
- quotedfprint(fptr, zip);
+ quotedfprint (fptr, zip);
}
fprintf(fptr, ";");
if (country != MAPI_UNDEFINED) {
- quotedfprint(fptr, country);
+ quotedfprint (fptr, country);
}
fprintf(fptr,"\n");
- if ((vl = MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x801b))) != MAPI_UNDEFINED) {
+ if ((vl = MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, 0x801b))) != MAPI_UNDEFINED) {
fprintf(fptr, "LABEL;QUOTED-PRINTABLE;WORK:");
- quotedfprint(fptr, vl);
+ quotedfprint (fptr, vl);
fprintf(fptr,"\n");
}
}
/* Home Address */
boolean = 0;
- if ((pobox = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_HOME_ADDRESS_POST_OFFICE_BOX))) != MAPI_UNDEFINED) {
+ if ((pobox = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_HOME_ADDRESS_POST_OFFICE_BOX))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((street = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_HOME_ADDRESS_STREET))) != MAPI_UNDEFINED) {
+ if ((street = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_HOME_ADDRESS_STREET))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((city = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_HOME_ADDRESS_CITY))) != MAPI_UNDEFINED) {
+ if ((city = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_HOME_ADDRESS_CITY))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((state = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_HOME_ADDRESS_STATE_OR_PROVINCE))) != MAPI_UNDEFINED) {
+ if ((state = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_HOME_ADDRESS_STATE_OR_PROVINCE))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((zip = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_HOME_ADDRESS_POSTAL_CODE))) != MAPI_UNDEFINED) {
+ if ((zip = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_HOME_ADDRESS_POSTAL_CODE))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((country = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_HOME_ADDRESS_COUNTRY))) != MAPI_UNDEFINED) {
+ if ((country = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_HOME_ADDRESS_COUNTRY))) != MAPI_UNDEFINED) {
boolean = 1;
}
if (boolean == 1) {
fprintf(fptr, "ADR;QUOTED-PRINTABLE;HOME:");
if (pobox != MAPI_UNDEFINED) {
- quotedfprint(fptr, pobox);
+ quotedfprint (fptr, pobox);
}
fprintf(fptr, ";;");
if (street != MAPI_UNDEFINED) {
- quotedfprint(fptr, street);
+ quotedfprint (fptr, street);
}
fprintf(fptr, ";");
if (city != MAPI_UNDEFINED) {
- quotedfprint(fptr, city);
+ quotedfprint (fptr, city);
}
fprintf(fptr, ";");
if (state != MAPI_UNDEFINED) {
- quotedfprint(fptr, state);
+ quotedfprint (fptr, state);
}
fprintf(fptr, ";");
if (zip != MAPI_UNDEFINED) {
- quotedfprint(fptr, zip);
+ quotedfprint (fptr, zip);
}
fprintf(fptr, ";");
if (country != MAPI_UNDEFINED) {
- quotedfprint(fptr, country);
+ quotedfprint (fptr, country);
}
fprintf(fptr,"\n");
- if ((vl = MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x801a))) != MAPI_UNDEFINED) {
+ if ((vl = MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, 0x801a))) != MAPI_UNDEFINED) {
fprintf(fptr, "LABEL;QUOTED-PRINTABLE;WORK:");
- quotedfprint(fptr, vl);
+ quotedfprint (fptr, vl);
fprintf(fptr,"\n");
}
}
/* Other Address */
boolean = 0;
- if ((pobox = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_OTHER_ADDRESS_POST_OFFICE_BOX))) != MAPI_UNDEFINED) {
+ if ((pobox = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_OTHER_ADDRESS_POST_OFFICE_BOX))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((street = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_OTHER_ADDRESS_STREET))) != MAPI_UNDEFINED) {
+ if ((street = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_OTHER_ADDRESS_STREET))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((city = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_OTHER_ADDRESS_CITY))) != MAPI_UNDEFINED) {
+ if ((city = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_OTHER_ADDRESS_CITY))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((state = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_OTHER_ADDRESS_STATE_OR_PROVINCE))) != MAPI_UNDEFINED) {
+ if ((state = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_OTHER_ADDRESS_STATE_OR_PROVINCE))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((zip = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_OTHER_ADDRESS_POSTAL_CODE))) != MAPI_UNDEFINED) {
+ if ((zip = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_OTHER_ADDRESS_POSTAL_CODE))) != MAPI_UNDEFINED) {
boolean = 1;
}
- if ((country = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_OTHER_ADDRESS_COUNTRY))) != MAPI_UNDEFINED) {
+ if ((country = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_OTHER_ADDRESS_COUNTRY))) != MAPI_UNDEFINED) {
boolean = 1;
}
if (boolean == 1) {
fprintf(fptr, "ADR;QUOTED-PRINTABLE;OTHER:");
if (pobox != MAPI_UNDEFINED) {
- quotedfprint(fptr, pobox);
+ quotedfprint (fptr, pobox);
}
fprintf(fptr, ";;");
if (street != MAPI_UNDEFINED) {
- quotedfprint(fptr, street);
+ quotedfprint (fptr, street);
}
fprintf(fptr, ";");
if (city != MAPI_UNDEFINED) {
- quotedfprint(fptr, city);
+ quotedfprint (fptr, city);
}
fprintf(fptr, ";");
if (state != MAPI_UNDEFINED) {
- quotedfprint(fptr, state);
+ quotedfprint (fptr, state);
}
fprintf(fptr, ";");
if (zip != MAPI_UNDEFINED) {
- quotedfprint(fptr, zip);
+ quotedfprint (fptr, zip);
}
fprintf(fptr, ";");
if (country != MAPI_UNDEFINED) {
- quotedfprint(fptr, country);
+ quotedfprint (fptr, country);
}
fprintf(fptr,"\n");
}
@@ -606,22 +606,22 @@ void saveVCard(TNEFStruct *tnef, const gchar *tmpdir) {
fprintProperty(tnef, fptr, PT_STRING8, PR_HOME_FAX_NUMBER, "TEL;HOME;FAX:%s\n");
/* Email addresses */
- if ((vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x8083))) == MAPI_UNDEFINED) {
- vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x8084));
+ if ((vl=MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, 0x8083))) == MAPI_UNDEFINED) {
+ vl=MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, 0x8084));
}
if (vl != MAPI_UNDEFINED) {
if (vl->size > 0)
fprintf(fptr, "EMAIL:%s\n", vl->data);
}
- if ((vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x8093))) == MAPI_UNDEFINED) {
- vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x8094));
+ if ((vl=MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, 0x8093))) == MAPI_UNDEFINED) {
+ vl=MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, 0x8094));
}
if (vl != MAPI_UNDEFINED) {
if (vl->size > 0)
fprintf(fptr, "EMAIL:%s\n", vl->data);
}
- if ((vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x80a3))) == MAPI_UNDEFINED) {
- vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x80a4));
+ if ((vl=MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, 0x80a3))) == MAPI_UNDEFINED) {
+ vl=MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, 0x80a4));
}
if (vl != MAPI_UNDEFINED) {
if (vl->size > 0)
@@ -632,98 +632,98 @@ void saveVCard(TNEFStruct *tnef, const gchar *tmpdir) {
fprintUserProp(tnef, fptr, PT_STRING8, 0x80d8, "FBURL:%s\n");
/* Birthday */
- if ((vl=MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_SYSTIME, PR_BIRTHDAY))) != MAPI_UNDEFINED) {
+ if ((vl=MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_SYSTIME, PR_BIRTHDAY))) != MAPI_UNDEFINED) {
fprintf(fptr, "BDAY:");
- MAPISysTimetoDTR((guchar *) vl->data, &thedate);
+ MAPISysTimetoDTR ((guchar *) vl->data, &thedate);
fprintf(fptr, "%i-%02i-%02i\n", thedate.wYear, thedate.wMonth, thedate.wDay);
}
/* Anniversary */
- if ((vl=MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_SYSTIME, PR_WEDDING_ANNIVERSARY))) != MAPI_UNDEFINED) {
+ if ((vl=MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_SYSTIME, PR_WEDDING_ANNIVERSARY))) != MAPI_UNDEFINED) {
fprintf(fptr, "X-EVOLUTION-ANNIVERSARY:");
- MAPISysTimetoDTR((guchar *) vl->data, &thedate);
+ MAPISysTimetoDTR ((guchar *) vl->data, &thedate);
fprintf(fptr, "%i-%02i-%02i\n", thedate.wYear, thedate.wMonth, thedate.wDay);
}
fprintf(fptr, "END:VCARD\n");
- fclose(fptr);
+ fclose (fptr);
}
}
-guchar getRruleCount(guchar a, guchar b) {
+guchar getRruleCount (guchar a, guchar b) {
return ((a << 8) | b);
}
-guchar getRruleMonthNum(guchar a, guchar b) {
+guchar getRruleMonthNum (guchar a, guchar b) {
switch (a) {
case 0x00:
switch (b) {
case 0x00:
/* Jan */
- return(1);
+ return (1);
case 0xA3:
/* May */
- return(5);
+ return (5);
case 0xAE:
/* Nov */
- return(11);
+ return (11);
}
break;
case 0x60:
switch (b) {
case 0xAE:
/* Feb */
- return(2);
+ return (2);
case 0x51:
/* Jun */
- return(6);
+ return (6);
}
break;
case 0xE0:
switch (b) {
case 0x4B:
/* Mar */
- return(3);
+ return (3);
case 0x56:
/* Sep */
- return(9);
+ return (9);
}
break;
case 0x40:
switch (b) {
case 0xFA:
/* Apr */
- return(4);
+ return (4);
}
break;
case 0x20:
if (b == 0xFA) {
/* Jul */
- return(7);
+ return (7);
}
break;
case 0x80:
if (b == 0xA8) {
/* Aug */
- return(8);
+ return (8);
}
break;
case 0xA0:
if (b == 0xFF) {
/* Oct */
- return(10);
+ return (10);
}
break;
case 0xC0:
if (b == 0x56) {
- return(12);
+ return (12);
}
}
/* Error */
- return(0);
+ return (0);
}
-gchar * getRruleDayname(guchar a) {
+gchar * getRruleDayname (guchar a) {
static gchar daystring[25];
*daystring = 0;
@@ -750,14 +750,14 @@ gchar * getRruleDayname(guchar a) {
strcat(daystring, "SA,");
}
- if (strlen(daystring)) {
- daystring[strlen(daystring) - 1] = 0;
+ if (strlen (daystring)) {
+ daystring[strlen (daystring) - 1] = 0;
}
- return(daystring);
+ return (daystring);
}
-void printRrule(FILE *fptr, gchar *recur_data, gint size, TNEFStruct *tnef)
+void printRrule (FILE *fptr, gchar *recur_data, gint size, TNEFStruct *tnef)
{
variableLength *filename;
@@ -772,27 +772,27 @@ void printRrule(FILE *fptr, gchar *recur_data, gint size, TNEFStruct *tnef)
if (recur_data[0x16] == 0x23 || recur_data[0x16] == 0x22 ||
recur_data[0x16] == 0x21) {
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_I2, 0x0011))) != MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_I2, 0x0011))) != MAPI_UNDEFINED) {
fprintf(fptr, ";INTERVAL=%d", *(filename->data));
}
if (recur_data[0x16] == 0x22 || recur_data[0x16] == 0x21) {
fprintf(fptr, ";COUNT=%d",
- getRruleCount(recur_data[0x1B], recur_data[0x1A]));
+ getRruleCount (recur_data[0x1B], recur_data[0x1A]));
}
} else if (recur_data[0x16] == 0x3E) {
fprintf(fptr, ";BYDAY=MO,TU,WE,TH,FR");
if (recur_data[0x1A] == 0x22 || recur_data[0x1A] == 0x21) {
fprintf(fptr, ";COUNT=%d",
- getRruleCount(recur_data[0x1F], recur_data[0x1E]));
+ getRruleCount (recur_data[0x1F], recur_data[0x1E]));
}
}
} else if (recur_data[0x04] == 0x0B) {
fprintf(fptr, "WEEKLY;INTERVAL=%d;BYDAY=%s",
- recur_data[0x0E], getRruleDayname(recur_data[0x16]));
+ recur_data[0x0E], getRruleDayname (recur_data[0x16]));
if (recur_data[0x1A] == 0x22 || recur_data[0x1A] == 0x21) {
fprintf(fptr, ";COUNT=%d",
- getRruleCount(recur_data[0x1F], recur_data[0x1E]));
+ getRruleCount (recur_data[0x1F], recur_data[0x1E]));
}
} else if (recur_data[0x04] == 0x0C) {
fprintf(fptr, "MONTHLY");
@@ -805,7 +805,7 @@ void printRrule(FILE *fptr, gchar *recur_data, gint size, TNEFStruct *tnef)
}
} else if (recur_data[0x06] == 0x03) {
fprintf(fptr, ";BYDAY=%s;BYSETPOS=%d;INTERVAL=%d",
- getRruleDayname(recur_data[0x16]),
+ getRruleDayname (recur_data[0x16]),
recur_data[0x1A] == 0x05 ? -1 : recur_data[0x1A],
recur_data[0x0E]);
if (recur_data[0x1E] == 0x22 || recur_data[0x1E] == 0x21) {
@@ -815,12 +815,12 @@ void printRrule(FILE *fptr, gchar *recur_data, gint size, TNEFStruct *tnef)
}
} else if (recur_data[0x04] == 0x0D) {
fprintf(fptr, "YEARLY;BYMONTH=%d",
- getRruleMonthNum(recur_data[0x0A], recur_data[0x0B]));
+ getRruleMonthNum (recur_data[0x0A], recur_data[0x0B]));
if (recur_data[0x06] == 0x02) {
fprintf(fptr, ";BYMONTHDAY=%d", recur_data[0x16]);
} else if (recur_data[0x06] == 0x03) {
fprintf(fptr, ";BYDAY=%s;BYSETPOS=%d",
- getRruleDayname(recur_data[0x16]),
+ getRruleDayname (recur_data[0x16]),
recur_data[0x1A] == 0x05 ? -1 : recur_data[0x1A]);
}
if (recur_data[0x1E] == 0x22 || recur_data[0x1E] == 0x21) {
@@ -831,7 +831,7 @@ void printRrule(FILE *fptr, gchar *recur_data, gint size, TNEFStruct *tnef)
fprintf(fptr, "\n");
}
-void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) {
+void saveVCalendar (TNEFStruct *tnef, const gchar *tmpdir) {
gchar ifilename[256];
variableLength *filename;
gchar *charptr, *charptr2;
@@ -876,10 +876,10 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) {
this entry. so as long as it's incorrectly interpreted the same way
every time, it should be ok :) */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_BINARY, 0x3))) == MAPI_UNDEFINED) {
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_BINARY, 0x23))) == MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_BINARY, 0x3))) == MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_BINARY, 0x23))) == MAPI_UNDEFINED) {
filename = NULL;
}
}
@@ -893,13 +893,13 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) {
/* Sequence */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_LONG, 0x8201))) != MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_LONG, 0x8201))) != MAPI_UNDEFINED) {
dword_ptr = (DWORD*)filename->data;
fprintf(fptr, "SEQUENCE:%i\n", (gint) *dword_ptr);
}
- if ((filename=MAPIFindProperty(&(tnef->MapiProperties),
- PROP_TAG(PT_BINARY, PR_SENDER_SEARCH_KEY)))
+ if ((filename=MAPIFindProperty (&(tnef->MapiProperties),
+ PROP_TAG (PT_BINARY, PR_SENDER_SEARCH_KEY)))
!= MAPI_UNDEFINED) {
charptr = filename->data;
charptr2 = strstr(charptr, ":");
@@ -912,8 +912,8 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) {
}
/* Required Attendees */
- if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_STRING8, 0x823b))) != MAPI_UNDEFINED) {
+ if ((filename = MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_STRING8, 0x823b))) != MAPI_UNDEFINED) {
/* We have a list of required participants, so
write them out. */
if (filename->size > 1) {
@@ -934,8 +934,8 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) {
}
}
/* Optional attendees */
- if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_STRING8, 0x823c))) != MAPI_UNDEFINED) {
+ if ((filename = MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_STRING8, 0x823c))) != MAPI_UNDEFINED) {
/* The list of optional participants */
if (filename->size > 1) {
charptr = filename->data-1;
@@ -955,8 +955,8 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) {
}
}
}
- } else if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_STRING8, 0x8238))) != MAPI_UNDEFINED) {
+ } else if ((filename = MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_STRING8, 0x8238))) != MAPI_UNDEFINED) {
if (filename->size > 1) {
charptr = filename->data-1;
while (charptr != NULL) {
@@ -978,33 +978,33 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) {
}
/* Summary */
filename = NULL;
- if ((filename=MAPIFindProperty(&(tnef->MapiProperties),
- PROP_TAG(PT_STRING8, PR_CONVERSATION_TOPIC)))
+ if ((filename=MAPIFindProperty (&(tnef->MapiProperties),
+ PROP_TAG (PT_STRING8, PR_CONVERSATION_TOPIC)))
!= MAPI_UNDEFINED) {
fprintf(fptr, "SUMMARY:");
- cstylefprint(fptr, filename);
+ cstylefprint (fptr, filename);
fprintf(fptr, "\n");
}
/* Description */
- if ((filename=MAPIFindProperty(&(tnef->MapiProperties),
- PROP_TAG(PT_BINARY, PR_RTF_COMPRESSED)))
+ if ((filename=MAPIFindProperty (&(tnef->MapiProperties),
+ PROP_TAG (PT_BINARY, PR_RTF_COMPRESSED)))
!= MAPI_UNDEFINED) {
variableLength buf;
- if ((buf.data = (gchar *) DecompressRTF(filename, &buf.size)) != NULL) {
+ if ((buf.data = (gchar *) DecompressRTF (filename, &buf.size)) != NULL) {
fprintf(fptr, "DESCRIPTION:");
- printRtf(fptr, &buf);
- free(buf.data);
+ printRtf (fptr, &buf);
+ free (buf.data);
}
}
/* Location */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_STRING8, 0x0002))) == MAPI_UNDEFINED) {
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_STRING8, 0x8208))) == MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_STRING8, 0x0002))) == MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_STRING8, 0x8208))) == MAPI_UNDEFINED) {
filename = NULL;
}
}
@@ -1013,52 +1013,52 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) {
}
/* Date Start */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_SYSTIME, 0x820d))) == MAPI_UNDEFINED) {
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_SYSTIME, 0x8516))) == MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_SYSTIME, 0x820d))) == MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_SYSTIME, 0x8516))) == MAPI_UNDEFINED) {
filename=NULL;
}
}
if (filename != NULL) {
fprintf(fptr, "DTSTART:");
- MAPISysTimetoDTR((guchar *) filename->data, &thedate);
+ MAPISysTimetoDTR ((guchar *) filename->data, &thedate);
fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
/* Date End */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_SYSTIME, 0x820e))) == MAPI_UNDEFINED) {
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_SYSTIME, 0x8517))) == MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_SYSTIME, 0x820e))) == MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_SYSTIME, 0x8517))) == MAPI_UNDEFINED) {
filename=NULL;
}
}
if (filename != NULL) {
fprintf(fptr, "DTEND:");
- MAPISysTimetoDTR((guchar *) filename->data, &thedate);
+ MAPISysTimetoDTR ((guchar *) filename->data, &thedate);
fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
/* Date Stamp */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_SYSTIME, 0x8202))) != MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_SYSTIME, 0x8202))) != MAPI_UNDEFINED) {
fprintf(fptr, "CREATED:");
- MAPISysTimetoDTR((guchar *) filename->data, &thedate);
+ MAPISysTimetoDTR ((guchar *) filename->data, &thedate);
fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
/* Class */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_BOOLEAN, 0x8506))) != MAPI_UNDEFINED) {
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_BOOLEAN, 0x8506))) != MAPI_UNDEFINED) {
dword_ptr = (DWORD*)filename->data;
- dword_val = SwapDWord((BYTE*)dword_ptr);
+ dword_val = SwapDWord ((BYTE*)dword_ptr);
fprintf(fptr, "CLASS:" );
if (*dword_ptr == 1) {
fprintf(fptr,"PRIVATE\n");
@@ -1068,19 +1068,19 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) {
}
/* Recurrence */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
- PROP_TAG(PT_BINARY, 0x8216))) != MAPI_UNDEFINED) {
- printRrule(fptr, filename->data, filename->size, tnef);
+ if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
+ PROP_TAG (PT_BINARY, 0x8216))) != MAPI_UNDEFINED) {
+ printRrule (fptr, filename->data, filename->size, tnef);
}
/* Wrap it up */
fprintf(fptr, "END:VEVENT\n");
fprintf(fptr, "END:VCALENDAR\n");
- fclose(fptr);
+ fclose (fptr);
}
}
-void saveVTask(TNEFStruct *tnef, const gchar *tmpdir) {
+void saveVTask (TNEFStruct *tnef, const gchar *tmpdir) {
variableLength *vl;
variableLength *filename;
gint index,i;
@@ -1091,18 +1091,18 @@ void saveVTask(TNEFStruct *tnef, const gchar *tmpdir) {
DWORD *dword_ptr;
DWORD dword_val;
- vl = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_CONVERSATION_TOPIC));
+ vl = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_CONVERSATION_TOPIC));
if (vl == MAPI_UNDEFINED) {
return;
}
- index = strlen(vl->data);
+ index = strlen (vl->data);
while (vl->data[index] == ' ')
vl->data[index--] = 0;
sprintf(ifilename, "%s/%s.ics", tmpdir, vl->data);
- for (i=0; i<strlen(ifilename); i++)
+ for (i=0; i<strlen (ifilename); i++)
if (ifilename[i] == ' ')
ifilename[i] = '_';
printf("%s\n", ifilename);
@@ -1119,14 +1119,14 @@ void saveVTask(TNEFStruct *tnef, const gchar *tmpdir) {
if (tnef->messageID[0] != 0) {
fprintf(fptr,"UID:%s\n", tnef->messageID);
}
- filename = MAPIFindUserProp(&(tnef->MapiProperties), \
- PROP_TAG(PT_STRING8, 0x8122));
+ filename = MAPIFindUserProp (&(tnef->MapiProperties), \
+ PROP_TAG (PT_STRING8, 0x8122));
if (filename != MAPI_UNDEFINED) {
fprintf(fptr, "ORGANIZER:%s\n", filename->data);
}
- if ((filename = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_DISPLAY_TO))) != MAPI_UNDEFINED) {
- filename = MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x811f));
+ if ((filename = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_DISPLAY_TO))) != MAPI_UNDEFINED) {
+ filename = MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, 0x811f));
}
if ((filename != MAPI_UNDEFINED) && (filename->size > 1)) {
charptr = filename->data-1;
@@ -1145,50 +1145,50 @@ void saveVTask(TNEFStruct *tnef, const gchar *tmpdir) {
if (tnef->subject.size > 0) {
fprintf(fptr,"SUMMARY:");
- cstylefprint(fptr,&(tnef->subject));
+ cstylefprint (fptr,&(tnef->subject));
fprintf(fptr,"\n");
}
if (tnef->body.size > 0) {
fprintf(fptr,"DESCRIPTION:");
- cstylefprint(fptr,&(tnef->body));
+ cstylefprint (fptr,&(tnef->body));
fprintf(fptr,"\n");
}
- filename = MAPIFindProperty(&(tnef->MapiProperties), \
- PROP_TAG(PT_SYSTIME, PR_CREATION_TIME));
+ filename = MAPIFindProperty (&(tnef->MapiProperties), \
+ PROP_TAG (PT_SYSTIME, PR_CREATION_TIME));
if (filename != MAPI_UNDEFINED) {
fprintf(fptr, "DTSTAMP:");
- MAPISysTimetoDTR((guchar *) filename->data, &thedate);
+ MAPISysTimetoDTR ((guchar *) filename->data, &thedate);
fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
- filename = MAPIFindUserProp(&(tnef->MapiProperties), \
- PROP_TAG(PT_SYSTIME, 0x8517));
+ filename = MAPIFindUserProp (&(tnef->MapiProperties), \
+ PROP_TAG (PT_SYSTIME, 0x8517));
if (filename != MAPI_UNDEFINED) {
fprintf(fptr, "DUE:");
- MAPISysTimetoDTR((guchar *) filename->data, &thedate);
+ MAPISysTimetoDTR ((guchar *) filename->data, &thedate);
fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
- filename = MAPIFindProperty(&(tnef->MapiProperties), \
- PROP_TAG(PT_SYSTIME, PR_LAST_MODIFICATION_TIME));
+ filename = MAPIFindProperty (&(tnef->MapiProperties), \
+ PROP_TAG (PT_SYSTIME, PR_LAST_MODIFICATION_TIME));
if (filename != MAPI_UNDEFINED) {
fprintf(fptr, "LAST-MODIFIED:");
- MAPISysTimetoDTR((guchar *) filename->data, &thedate);
+ MAPISysTimetoDTR ((guchar *) filename->data, &thedate);
fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
/* Class */
- filename = MAPIFindUserProp(&(tnef->MapiProperties), \
- PROP_TAG(PT_BOOLEAN, 0x8506));
+ filename = MAPIFindUserProp (&(tnef->MapiProperties), \
+ PROP_TAG (PT_BOOLEAN, 0x8506));
if (filename != MAPI_UNDEFINED) {
dword_ptr = (DWORD*)filename->data;
- dword_val = SwapDWord((BYTE*)dword_ptr);
+ dword_val = SwapDWord ((BYTE*)dword_ptr);
fprintf(fptr, "CLASS:" );
if (*dword_ptr == 1) {
fprintf(fptr,"PRIVATE\n");
@@ -1198,36 +1198,36 @@ void saveVTask(TNEFStruct *tnef, const gchar *tmpdir) {
}
fprintf(fptr, "END:VTODO\n");
fprintf(fptr, "END:VCALENDAR\n");
- fclose(fptr);
+ fclose (fptr);
}
}
-void fprintProperty(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, const gchar text[]) {
+void fprintProperty (TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, const gchar text[]) {
variableLength *vl;
- if ((vl=MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(proptype, propid))) != MAPI_UNDEFINED) {
+ if ((vl=MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (proptype, propid))) != MAPI_UNDEFINED) {
if (vl->size > 0) {
if ((vl->size == 1) && (vl->data[0] == 0)) {
} else {
- fprintf(fptr, text, vl->data);
+ fprintf (fptr, text, vl->data);
}
}
}
}
-void fprintUserProp(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, const gchar text[]) {
+void fprintUserProp (TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, const gchar text[]) {
variableLength *vl;
- if ((vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(proptype, propid))) != MAPI_UNDEFINED) {
+ if ((vl=MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (proptype, propid))) != MAPI_UNDEFINED) {
if (vl->size > 0) {
if ((vl->size == 1) && (vl->data[0] == 0)) {
} else {
- fprintf(fptr, text, vl->data);
+ fprintf (fptr, text, vl->data);
}
}
}
}
-void quotedfprint(FILE *fptr, variableLength *vl) {
+void quotedfprint (FILE *fptr, variableLength *vl) {
gint index;
for (index=0;index<vl->size-1; index++) {
@@ -1240,7 +1240,7 @@ void quotedfprint(FILE *fptr, variableLength *vl) {
}
}
-void cstylefprint(FILE *fptr, variableLength *vl) {
+void cstylefprint (FILE *fptr, variableLength *vl) {
gint index;
for (index=0;index<vl->size-1; index++) {
@@ -1260,7 +1260,7 @@ void cstylefprint(FILE *fptr, variableLength *vl) {
}
}
-void printRtf(FILE *fptr, variableLength *vl) {
+void printRtf (FILE *fptr, variableLength *vl) {
gint index;
gchar *byte;
gint brace_ct;
@@ -1282,7 +1282,7 @@ void printRtf(FILE *fptr, variableLength *vl) {
if (*byte == '\\') {
key = 1;
}
- if (isspace(*byte)) {
+ if (isspace (*byte)) {
key = 0;
}
if ((brace_ct == 1) && (key == 0)) {
diff --git a/plugins/webdav-account-setup/webdav-contacts-source.c b/plugins/webdav-account-setup/webdav-contacts-source.c
index 8d822e6c9e..6ce62e4bdd 100644
--- a/plugins/webdav-account-setup/webdav-contacts-source.c
+++ b/plugins/webdav-account-setup/webdav-contacts-source.c
@@ -49,13 +49,13 @@ typedef struct {
} ui_data;
GtkWidget *
-plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data);
+plugin_webdav_contacts (EPlugin *epl, EConfigHookItemFactoryData *data);
gint
-e_plugin_lib_enable(EPlugin *ep, gint enable);
+e_plugin_lib_enable (EPlugin *ep, gint enable);
static void
-ensure_webdav_contacts_source_group(void)
+ensure_webdav_contacts_source_group (void)
{
ESourceList *source_list;
@@ -70,7 +70,7 @@ ensure_webdav_contacts_source_group(void)
}
static void
-remove_webdav_contacts_source_group(void)
+remove_webdav_contacts_source_group (void)
{
ESourceList *source_list;
ESourceGroup *group;
@@ -86,21 +86,21 @@ remove_webdav_contacts_source_group(void)
if (group) {
GSList *sources;
- sources = e_source_group_peek_sources(group);
+ sources = e_source_group_peek_sources (group);
if (NULL == sources) {
- e_source_list_remove_group(source_list, group);
- e_source_list_sync(source_list, NULL);
+ e_source_list_remove_group (source_list, group);
+ e_source_list_sync (source_list, NULL);
}
}
- g_object_unref(source_list);
+ g_object_unref (source_list);
}
static void
-set_ui_from_source(ui_data *data)
+set_ui_from_source (ui_data *data)
{
ESource *source = data->source;
- const gchar *url = e_source_get_uri(source);
+ const gchar *url = e_source_get_uri (source);
SoupURI *suri = soup_uri_new (url);
gchar *url_ui;
const gchar *property;
@@ -120,7 +120,7 @@ set_ui_from_source(ui_data *data)
} else {
avoid_ifmatch = FALSE;
}
- gtk_toggle_button_set_active(data->avoid_ifmatch_toggle, avoid_ifmatch);
+ gtk_toggle_button_set_active (data->avoid_ifmatch_toggle, avoid_ifmatch);
/* it's really a http or https protocol */
if (suri)
@@ -149,8 +149,8 @@ static void
set_source_from_ui (ui_data *data)
{
ESource *source = data->source;
- gboolean avoid_ifmatch = gtk_toggle_button_get_active(data->avoid_ifmatch_toggle);
- const gchar *url = gtk_entry_get_text(data->url_entry);
+ gboolean avoid_ifmatch = gtk_toggle_button_get_active (data->avoid_ifmatch_toggle);
+ const gchar *url = gtk_entry_get_text (data->url_entry);
SoupURI *suri = soup_uri_new (url);
gchar *url_noprotocol;
gboolean use_ssl;
@@ -197,7 +197,7 @@ destroy_ui_data (gpointer data)
}
GtkWidget *
-plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data)
+plugin_webdav_contacts (EPlugin *epl, EConfigHookItemFactoryData *data)
{
EABConfigTargetSource *t = (EABConfigTargetSource *) data->target;
ESource *source;
@@ -222,62 +222,62 @@ plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data)
return NULL;
}
- uidata = g_malloc0(sizeof(uidata[0]));
+ uidata = g_malloc0 (sizeof (uidata[0]));
uidata->source = source;
/* Build up the UI */
parent = data->parent;
- vbox = gtk_widget_get_ancestor(gtk_widget_get_parent(parent), GTK_TYPE_VBOX);
+ vbox = gtk_widget_get_ancestor (gtk_widget_get_parent (parent), GTK_TYPE_VBOX);
- vbox2 = gtk_vbox_new(FALSE, 6);
- gtk_box_pack_start(GTK_BOX(vbox), vbox2, FALSE, FALSE, 0);
+ vbox2 = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
- section = gtk_label_new(NULL);
+ section = gtk_label_new (NULL);
buff = g_strconcat ("<b>", _("Server"), "</b>", NULL);
- gtk_label_set_markup(GTK_LABEL(section), buff);
+ gtk_label_set_markup (GTK_LABEL (section), buff);
g_free (buff);
- gtk_misc_set_alignment(GTK_MISC(section), 0.0, 0.0);
- gtk_box_pack_start(GTK_BOX(vbox2), section, FALSE, FALSE, 0);
+ gtk_misc_set_alignment (GTK_MISC (section), 0.0, 0.0);
+ gtk_box_pack_start (GTK_BOX (vbox2), section, FALSE, FALSE, 0);
- hbox = GTK_BOX(gtk_hbox_new(FALSE, 10));
- gtk_box_pack_start(GTK_BOX(vbox2), GTK_WIDGET(hbox), TRUE, TRUE, 0);
+ hbox = GTK_BOX (gtk_hbox_new (FALSE, 10));
+ gtk_box_pack_start (GTK_BOX (vbox2), GTK_WIDGET (hbox), TRUE, TRUE, 0);
spacer = gtk_label_new(" ");
- gtk_box_pack_start(hbox, spacer, FALSE, FALSE, 0);
+ gtk_box_pack_start (hbox, spacer, FALSE, FALSE, 0);
label = gtk_label_new(_("URL:"));
- gtk_box_pack_start(hbox, label, FALSE, FALSE, 0);
+ gtk_box_pack_start (hbox, label, FALSE, FALSE, 0);
- uidata->url_entry = GTK_ENTRY(gtk_entry_new());
- gtk_box_pack_start(hbox, GTK_WIDGET(uidata->url_entry), TRUE, TRUE, 0);
+ uidata->url_entry = GTK_ENTRY (gtk_entry_new ());
+ gtk_box_pack_start (hbox, GTK_WIDGET (uidata->url_entry), TRUE, TRUE, 0);
- hbox = GTK_BOX(gtk_hbox_new(FALSE, 10));
- gtk_box_pack_start(GTK_BOX(vbox2), GTK_WIDGET(hbox), TRUE, TRUE, 0);
+ hbox = GTK_BOX (gtk_hbox_new (FALSE, 10));
+ gtk_box_pack_start (GTK_BOX (vbox2), GTK_WIDGET (hbox), TRUE, TRUE, 0);
spacer = gtk_label_new(" ");
- gtk_box_pack_start(hbox, spacer, FALSE, FALSE, 0);
+ gtk_box_pack_start (hbox, spacer, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic(_("User_name:"));
- gtk_box_pack_start(hbox, label, FALSE, FALSE, 0);
+ gtk_box_pack_start (hbox, label, FALSE, FALSE, 0);
- uidata->username_entry = GTK_ENTRY(gtk_entry_new());
- gtk_box_pack_start(hbox, GTK_WIDGET(uidata->username_entry), TRUE, TRUE, 0);
+ uidata->username_entry = GTK_ENTRY (gtk_entry_new ());
+ gtk_box_pack_start (hbox, GTK_WIDGET (uidata->username_entry), TRUE, TRUE, 0);
- hbox = GTK_BOX(gtk_hbox_new(FALSE, 10));
- gtk_box_pack_start(GTK_BOX(vbox2), GTK_WIDGET(hbox), TRUE, TRUE, 0);
+ hbox = GTK_BOX (gtk_hbox_new (FALSE, 10));
+ gtk_box_pack_start (GTK_BOX (vbox2), GTK_WIDGET (hbox), TRUE, TRUE, 0);
spacer = gtk_label_new(" ");
- gtk_box_pack_start(hbox, spacer, FALSE, FALSE, 0);
+ gtk_box_pack_start (hbox, spacer, FALSE, FALSE, 0);
- uidata->avoid_ifmatch_toggle = GTK_TOGGLE_BUTTON(
- gtk_check_button_new_with_mnemonic(
+ uidata->avoid_ifmatch_toggle = GTK_TOGGLE_BUTTON (
+ gtk_check_button_new_with_mnemonic (
_("_Avoid IfMatch (needed on Apache < 2.2.8)")));
- gtk_box_pack_start(hbox, GTK_WIDGET(uidata->avoid_ifmatch_toggle),
+ gtk_box_pack_start (hbox, GTK_WIDGET (uidata->avoid_ifmatch_toggle),
FALSE, FALSE, 0);
- set_ui_from_source(uidata);
+ set_ui_from_source (uidata);
- gtk_widget_show_all(vbox2);
+ gtk_widget_show_all (vbox2);
uidata->box = vbox2;
g_object_set_data_full(G_OBJECT(epl), "wwidget", uidata, destroy_ui_data);
@@ -291,12 +291,12 @@ plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data)
}
gint
-e_plugin_lib_enable(EPlugin *ep, gint enable)
+e_plugin_lib_enable (EPlugin *ep, gint enable)
{
if (enable) {
- ensure_webdav_contacts_source_group();
+ ensure_webdav_contacts_source_group ();
} else {
- remove_webdav_contacts_source_group();
+ remove_webdav_contacts_source_group ();
}
return 0;
}
diff --git a/smime/gui/ca-trust-dialog.c b/smime/gui/ca-trust-dialog.c
index 47f4d5db81..a8169dd2e7 100644
--- a/smime/gui/ca-trust-dialog.c
+++ b/smime/gui/ca-trust-dialog.c
@@ -54,7 +54,7 @@ free_data (gpointer data)
}
static void
-catd_response(GtkWidget *w, guint id, CATrustDialogData *data)
+catd_response (GtkWidget *w, guint id, CATrustDialogData *data)
{
switch (id) {
case GTK_RESPONSE_ACCEPT: {
@@ -102,8 +102,8 @@ ca_trust_dialog_show (ECert *cert, gboolean importing)
w = e_builder_get_widget(ctd_data->builder, "ca-trust-label");
txt = g_strdup_printf(_("Certificate '%s' is a CA certificate.\n\nEdit trust settings:"), e_cert_get_cn(cert));
- gtk_label_set_text((GtkLabel *)w, txt);
- g_free(txt);
+ gtk_label_set_text ((GtkLabel *)w, txt);
+ g_free (txt);
g_signal_connect (ctd_data->dialog, "response", G_CALLBACK (catd_response), ctd_data);
diff --git a/smime/gui/cert-trust-dialog.c b/smime/gui/cert-trust-dialog.c
index 9c87c666ab..cfd8ce464f 100644
--- a/smime/gui/cert-trust-dialog.c
+++ b/smime/gui/cert-trust-dialog.c
@@ -60,20 +60,20 @@ free_data (gpointer data)
}
static void
-ctd_response(GtkWidget *w, guint id, CertTrustDialogData *data)
+ctd_response (GtkWidget *w, guint id, CertTrustDialogData *data)
{
CERTCertTrust trust;
CERTCertificate *icert;
switch (id) {
case GTK_RESPONSE_OK:
- icert = e_cert_get_internal_cert(data->cert);
- e_cert_trust_init(&trust);
- e_cert_trust_set_valid_peer(&trust);
+ icert = e_cert_get_internal_cert (data->cert);
+ e_cert_trust_init (&trust);
+ e_cert_trust_set_valid_peer (&trust);
e_cert_trust_add_peer_trust (&trust, FALSE,
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (data->trust_button)),
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->trust_button)),
FALSE);
- CERT_ChangeCertTrust (CERT_GetDefaultCertDB(), icert, &trust);
+ CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), icert, &trust);
break;
case GTK_RESPONSE_ACCEPT: {
/* just *what on earth* was chris thinking here!?!?! copied from certificate-manager.c */
@@ -101,7 +101,7 @@ ctd_response(GtkWidget *w, guint id, CertTrustDialogData *data)
trust_email,
trust_objsign);
- CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), icert, &trust);
+ CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), icert, &trust);
}
gtk_widget_destroy (dialog);
@@ -122,7 +122,7 @@ cert_trust_dialog_show (ECert *cert)
ctd_data->dialog = e_builder_get_widget (ctd_data->builder, "cert-trust-dialog");
ctd_data->cert = g_object_ref (cert);
- ctd_data->cacert = e_cert_get_ca_cert(cert);
+ ctd_data->cacert = e_cert_get_ca_cert (cert);
ctd_data->trust_button = e_builder_get_widget(ctd_data->builder, "cert-trust");
ctd_data->notrust_button = e_builder_get_widget(ctd_data->builder, "cert-notrust");
@@ -132,19 +132,19 @@ cert_trust_dialog_show (ECert *cert)
g_object_set_data_full (G_OBJECT (ctd_data->dialog), "CertTrustDialogData", ctd_data, free_data);
- icert = e_cert_get_internal_cert(cert);
- if (e_cert_trust_has_trusted_peer(icert->trust, FALSE, TRUE, FALSE))
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (ctd_data->trust_button), TRUE);
+ icert = e_cert_get_internal_cert (cert);
+ if (e_cert_trust_has_trusted_peer (icert->trust, FALSE, TRUE, FALSE))
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ctd_data->trust_button), TRUE);
else
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (ctd_data->notrust_button), TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ctd_data->notrust_button), TRUE);
- icert = e_cert_get_internal_cert(ctd_data->cacert);
- if (e_cert_trust_has_trusted_ca(icert->trust, FALSE, TRUE, FALSE))
- gtk_label_set_text((GtkLabel *)ctd_data->label,
+ icert = e_cert_get_internal_cert (ctd_data->cacert);
+ if (e_cert_trust_has_trusted_ca (icert->trust, FALSE, TRUE, FALSE))
+ gtk_label_set_text ((GtkLabel *)ctd_data->label,
_("Because you trust the certificate authority that issued this certificate, "
"then you trust the authenticity of this certificate unless otherwise indicated here"));
else
- gtk_label_set_text((GtkLabel *)ctd_data->label,
+ gtk_label_set_text ((GtkLabel *)ctd_data->label,
_("Because you do not trust the certificate authority that issued this certificate, "
"then you do not trust the authenticity of this certificate unless otherwise indicated here"));
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index d0823b8acb..103b319ec3 100644
--- a/smime/gui/certificate-manager.c
+++ b/smime/gui/certificate-manager.c
@@ -153,7 +153,7 @@ import_your (GtkWidget *widget, CertificateManagerData *cfm)
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_OK);
- filter = gtk_file_filter_new();
+ filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All PKCS12 files"));
gtk_file_filter_add_mime_type (filter, "application/x-x509-user-cert");
gtk_file_filter_add_mime_type (filter, "application/x-pkcs12");
@@ -192,7 +192,7 @@ delete_your (GtkWidget *widget, CertificateManagerData *cfm)
{
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW(cfm->yourcerts_treeview)),
+ if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (cfm->yourcerts_treeview)),
NULL,
&iter)) {
ECert *cert;
@@ -227,7 +227,7 @@ view_your (GtkWidget *widget, CertificateManagerData *cfm)
{
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW(cfm->yourcerts_treeview)),
+ if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (cfm->yourcerts_treeview)),
NULL,
&iter)) {
ECert *cert;
@@ -353,7 +353,7 @@ initialize_yourcerts_ui (CertificateManagerData *cfm)
cell,
"text", 0,
NULL);
- gtk_tree_view_column_set_resizable(column, TRUE);
+ gtk_tree_view_column_set_resizable (column, TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (cfm->yourcerts_treeview),
column);
gtk_tree_view_column_set_sort_column_id (column, 0);
@@ -362,7 +362,7 @@ initialize_yourcerts_ui (CertificateManagerData *cfm)
cell,
"text", 1,
NULL);
- gtk_tree_view_column_set_resizable(column, TRUE);
+ gtk_tree_view_column_set_resizable (column, TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (cfm->yourcerts_treeview),
column);
gtk_tree_view_column_set_sort_column_id (column, 1);
@@ -407,7 +407,7 @@ view_contact (GtkWidget *widget, CertificateManagerData *cfm)
{
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW(cfm->contactcerts_treeview)),
+ if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (cfm->contactcerts_treeview)),
NULL,
&iter)) {
ECert *cert;
@@ -431,7 +431,7 @@ edit_contact (GtkWidget *widget, CertificateManagerData *cfm)
{
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW(cfm->contactcerts_treeview)),
+ if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (cfm->contactcerts_treeview)),
NULL,
&iter)) {
ECert *cert;
@@ -465,7 +465,7 @@ import_contact (GtkWidget *widget, CertificateManagerData *cfm)
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_OK);
- filter = gtk_file_filter_new();
+ filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All email certificate files"));
gtk_file_filter_add_mime_type (filter, "application/x-x509-email-cert");
gtk_file_filter_add_mime_type (filter, "application/x-x509-ca-cert");
@@ -514,7 +514,7 @@ delete_contact (GtkWidget *widget, CertificateManagerData *cfm)
{
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW(cfm->contactcerts_treeview)),
+ if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (cfm->contactcerts_treeview)),
NULL,
&iter)) {
ECert *cert;
@@ -575,7 +575,7 @@ initialize_contactcerts_ui (CertificateManagerData *cfm)
cell,
"text", 0,
NULL);
- gtk_tree_view_column_set_resizable(column, TRUE);
+ gtk_tree_view_column_set_resizable (column, TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (cfm->contactcerts_treeview),
column);
gtk_tree_view_column_set_sort_column_id (column, 0);
@@ -584,7 +584,7 @@ initialize_contactcerts_ui (CertificateManagerData *cfm)
cell,
"text", 1,
NULL);
- gtk_tree_view_column_set_resizable(column, TRUE);
+ gtk_tree_view_column_set_resizable (column, TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (cfm->contactcerts_treeview),
column);
gtk_tree_view_column_set_sort_column_id (column, 1);
@@ -593,7 +593,7 @@ initialize_contactcerts_ui (CertificateManagerData *cfm)
cell,
"text", 2,
NULL);
- gtk_tree_view_column_set_resizable(column, TRUE);
+ gtk_tree_view_column_set_resizable (column, TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (cfm->contactcerts_treeview),
column);
gtk_tree_view_column_set_sort_column_id (column, 2);
@@ -622,7 +622,7 @@ view_ca (GtkWidget *widget, CertificateManagerData *cfm)
{
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW(cfm->authoritycerts_treeview)),
+ if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (cfm->authoritycerts_treeview)),
NULL,
&iter)) {
ECert *cert;
@@ -646,7 +646,7 @@ edit_ca (GtkWidget *widget, CertificateManagerData *cfm)
{
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW(cfm->authoritycerts_treeview)),
+ if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (cfm->authoritycerts_treeview)),
NULL,
&iter)) {
ECert *cert;
@@ -679,7 +679,7 @@ edit_ca (GtkWidget *widget, CertificateManagerData *cfm)
trust_email,
trust_objsign);
- CERT_ChangeCertTrust (CERT_GetDefaultCertDB(), icert, &trust);
+ CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), icert, &trust);
}
gtk_widget_destroy (dialog);
@@ -702,7 +702,7 @@ import_ca (GtkWidget *widget, CertificateManagerData *cfm)
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_OK);
- filter = gtk_file_filter_new();
+ filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All CA certificate files"));
gtk_file_filter_add_mime_type (filter, "application/x-x509-ca-cert");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter);
@@ -749,7 +749,7 @@ delete_ca (GtkWidget *widget, CertificateManagerData *cfm)
{
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW(cfm->authoritycerts_treeview)),
+ if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (cfm->authoritycerts_treeview)),
NULL,
&iter)) {
ECert *cert;
@@ -858,17 +858,17 @@ add_user_cert (CertificateManagerData *cfm, ECert *cert)
if (e_cert_get_cn (cert))
gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
0, e_cert_get_cn (cert),
- 1, e_cert_get_usage(cert),
- 2, e_cert_get_serial_number(cert),
- 3, e_cert_get_expires_on(cert),
+ 1, e_cert_get_usage (cert),
+ 2, e_cert_get_serial_number (cert),
+ 3, e_cert_get_expires_on (cert),
4, cert,
-1);
else
gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
0, e_cert_get_nickname (cert),
- 1, e_cert_get_usage(cert),
- 2, e_cert_get_serial_number(cert),
- 3, e_cert_get_expires_on(cert),
+ 1, e_cert_get_usage (cert),
+ 2, e_cert_get_serial_number (cert),
+ 3, e_cert_get_expires_on (cert),
4, cert,
-1);
}
@@ -903,14 +903,14 @@ add_contact_cert (CertificateManagerData *cfm, ECert *cert)
gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
0, e_cert_get_cn (cert),
1, e_cert_get_email (cert),
- 2, e_cert_get_usage(cert),
+ 2, e_cert_get_usage (cert),
3, cert,
-1);
else
gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
0, e_cert_get_nickname (cert),
1, e_cert_get_email (cert),
- 2, e_cert_get_usage(cert),
+ 2, e_cert_get_usage (cert),
3, cert,
-1);
}
@@ -1052,9 +1052,9 @@ load_certs (CertificateManagerData *cfm,
certList = PK11_ListCerts (PK11CertListUnique, NULL);
- for (node = CERT_LIST_HEAD(certList);
- !CERT_LIST_END(node, certList);
- node = CERT_LIST_NEXT(node)) {
+ for (node = CERT_LIST_HEAD (certList);
+ !CERT_LIST_END (node, certList);
+ node = CERT_LIST_NEXT (node)) {
ECert *cert = e_cert_new (CERT_DupCertificate ((CERTCertificate*)node->cert));
ECertType ct = e_cert_get_cert_type (cert);
@@ -1135,9 +1135,9 @@ certificate_manager_config_new (EPreferencesWindow *window)
cfm_data->import_ca_button = e_builder_get_widget (cfm_data->builder, "authority-import-button");
cfm_data->delete_ca_button = e_builder_get_widget (cfm_data->builder, "authority-delete-button");
- initialize_yourcerts_ui(cfm_data);
- initialize_contactcerts_ui(cfm_data);
- initialize_authoritycerts_ui(cfm_data);
+ initialize_yourcerts_ui (cfm_data);
+ initialize_contactcerts_ui (cfm_data);
+ initialize_authoritycerts_ui (cfm_data);
/* Run this in an idle callback so Evolution has a chance to
* fully initialize itself and start its main loop before we
@@ -1152,8 +1152,8 @@ certificate_manager_config_new (EPreferencesWindow *window)
gtk_container_remove (GTK_CONTAINER (parent), widget);
/* FIXME: remove when implemented */
- gtk_widget_set_sensitive(cfm_data->backup_your_button, FALSE);
- gtk_widget_set_sensitive(cfm_data->backup_all_your_button, FALSE);
+ gtk_widget_set_sensitive (cfm_data->backup_your_button, FALSE);
+ gtk_widget_set_sensitive (cfm_data->backup_all_your_button, FALSE);
return widget;
}
diff --git a/smime/gui/e-cert-selector.c b/smime/gui/e-cert-selector.c
index 71f2c00504..064b31f90e 100644
--- a/smime/gui/e-cert-selector.c
+++ b/smime/gui/e-cert-selector.c
@@ -63,46 +63,46 @@ Issued by:
*/
static CERTCertListNode *
-ecs_find_current(ECertSelector *ecs)
+ecs_find_current (ECertSelector *ecs)
{
struct _ECertSelectorPrivate *p = ecs->priv;
CERTCertListNode *node;
gint n;
- if (p->certlist == NULL || CERT_LIST_EMPTY(p->certlist))
+ if (p->certlist == NULL || CERT_LIST_EMPTY (p->certlist))
return NULL;
n = gtk_combo_box_get_active (GTK_COMBO_BOX (p->combobox));
- node = CERT_LIST_HEAD(p->certlist);
- while (n>0 && !CERT_LIST_END(node, p->certlist)) {
+ node = CERT_LIST_HEAD (p->certlist);
+ while (n>0 && !CERT_LIST_END (node, p->certlist)) {
n--;
- node = CERT_LIST_NEXT(node);
+ node = CERT_LIST_NEXT (node);
}
- g_return_val_if_fail (!CERT_LIST_END(node, p->certlist), NULL);
+ g_return_val_if_fail (!CERT_LIST_END (node, p->certlist), NULL);
return node;
}
static void
-e_cert_selector_response(GtkDialog *dialog, gint button)
+e_cert_selector_response (GtkDialog *dialog, gint button)
{
CERTCertListNode *node;
switch (button) {
case GTK_RESPONSE_OK:
- node = ecs_find_current((ECertSelector *)dialog);
+ node = ecs_find_current ((ECertSelector *)dialog);
break;
default:
node = NULL;
break;
}
- g_signal_emit(dialog, ecs_signals[ECS_SELECTED], 0, node?node->cert->nickname:NULL);
+ g_signal_emit (dialog, ecs_signals[ECS_SELECTED], 0, node?node->cert->nickname:NULL);
}
static void
-ecs_cert_changed(GtkWidget *w, ECertSelector *ecs)
+ecs_cert_changed (GtkWidget *w, ECertSelector *ecs)
{
struct _ECertSelectorPrivate *p = ecs->priv;
CERTCertListNode *node;
@@ -110,16 +110,16 @@ ecs_cert_changed(GtkWidget *w, ECertSelector *ecs)
GString *text;
text = g_string_new("");
- node = ecs_find_current(ecs);
+ node = ecs_find_current (ecs);
if (node) {
/* FIXME: add serial no, validity date, uses */
g_string_append_printf(text, _("Issued to:\n Subject: %s\n"), node->cert->subjectName);
g_string_append_printf(text, _("Issued by:\n Subject: %s\n"), node->cert->issuerName);
}
- buffer = gtk_text_view_get_buffer((GtkTextView *)p->description);
- gtk_text_buffer_set_text(buffer, text->str, text->len);
- g_string_free(text, TRUE);
+ buffer = gtk_text_view_get_buffer ((GtkTextView *)p->description);
+ gtk_text_buffer_set_text (buffer, text->str, text->len);
+ g_string_free (text, TRUE);
}
/**
@@ -140,7 +140,7 @@ ecs_cert_changed(GtkWidget *w, ECertSelector *ecs)
* Return value: A dialogue to be shown.
**/
GtkWidget *
-e_cert_selector_new(gint type, const gchar *currentid)
+e_cert_selector_new (gint type, const gchar *currentid)
{
ECertSelector *ecs;
struct _ECertSelectorPrivate *p;
@@ -152,7 +152,7 @@ e_cert_selector_new(gint type, const gchar *currentid)
GtkWidget *w;
gint n=0, active=0;
- ecs = g_object_new(e_cert_selector_get_type(), NULL);
+ ecs = g_object_new (e_cert_selector_get_type (), NULL);
p = ecs->priv;
builder = gtk_builder_new ();
@@ -178,23 +178,23 @@ e_cert_selector_new(gint type, const gchar *currentid)
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (p->combobox))));
- certlist = CERT_FindUserCertsByUsage(CERT_GetDefaultCertDB(), usage, FALSE, TRUE, NULL);
+ certlist = CERT_FindUserCertsByUsage (CERT_GetDefaultCertDB (), usage, FALSE, TRUE, NULL);
ecs->priv->certlist = certlist;
if (certlist != NULL) {
- node = CERT_LIST_HEAD(certlist);
- while (!CERT_LIST_END(node, certlist)) {
+ node = CERT_LIST_HEAD (certlist);
+ while (!CERT_LIST_END (node, certlist)) {
if (node->cert->nickname || node->cert->emailAddr) {
gtk_combo_box_append_text (GTK_COMBO_BOX (p->combobox), node->cert->nickname?node->cert->nickname:node->cert->emailAddr);
if (currentid != NULL
- && ((node->cert->nickname != NULL && strcmp(node->cert->nickname, currentid) == 0)
- || (node->cert->emailAddr != NULL && strcmp(node->cert->emailAddr, currentid) == 0)))
+ && ((node->cert->nickname != NULL && strcmp (node->cert->nickname, currentid) == 0)
+ || (node->cert->emailAddr != NULL && strcmp (node->cert->emailAddr, currentid) == 0)))
active = n;
n++;
}
- node = CERT_LIST_NEXT(node);
+ node = CERT_LIST_NEXT (node);
}
}
@@ -202,47 +202,47 @@ e_cert_selector_new(gint type, const gchar *currentid)
g_signal_connect (p->combobox, "changed", G_CALLBACK(ecs_cert_changed), ecs);
- g_object_unref(builder);
+ g_object_unref (builder);
- ecs_cert_changed(p->combobox, ecs);
+ ecs_cert_changed (p->combobox, ecs);
- return GTK_WIDGET(ecs);
+ return GTK_WIDGET (ecs);
}
static void
-e_cert_selector_init(ECertSelector *ecs)
+e_cert_selector_init (ECertSelector *ecs)
{
- gtk_dialog_add_buttons((GtkDialog *)ecs,
+ gtk_dialog_add_buttons ((GtkDialog *)ecs,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
- ecs->priv = g_malloc0(sizeof(*ecs->priv));
+ ecs->priv = g_malloc0 (sizeof (*ecs->priv));
}
static void
-e_cert_selector_finalise(GObject *o)
+e_cert_selector_finalise (GObject *o)
{
ECertSelector *ecs = (ECertSelector *)o;
if (ecs->priv->certlist)
- CERT_DestroyCertList(ecs->priv->certlist);
+ CERT_DestroyCertList (ecs->priv->certlist);
- g_free(ecs->priv);
+ g_free (ecs->priv);
- ((GObjectClass *)e_cert_selector_parent_class)->finalize(o);
+ ((GObjectClass *)e_cert_selector_parent_class)->finalize (o);
}
static void
-e_cert_selector_class_init(ECertSelectorClass *klass)
+e_cert_selector_class_init (ECertSelectorClass *klass)
{
((GObjectClass *)klass)->finalize = e_cert_selector_finalise;
((GtkDialogClass *)klass)->response = e_cert_selector_response;
ecs_signals[ECS_SELECTED] =
g_signal_new("selected",
- G_OBJECT_CLASS_TYPE(klass),
+ G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(ECertSelectorClass, selected),
+ G_STRUCT_OFFSET (ECertSelectorClass, selected),
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
diff --git a/smime/lib/e-asn1-object.c b/smime/lib/e-asn1-object.c
index 7f69802ab6..22788c4bba 100644
--- a/smime/lib/e-asn1-object.c
+++ b/smime/lib/e-asn1-object.c
@@ -89,7 +89,7 @@ e_asn1_object_class_init (EASN1ObjectClass *klass)
{
GObjectClass *object_class;
- object_class = G_OBJECT_CLASS(klass);
+ object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_ref (PARENT_TYPE);
diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c
index 2e23df2c4a..8c6c6f0c04 100644
--- a/smime/lib/e-cert-db.c
+++ b/smime/lib/e-cert-db.c
@@ -315,7 +315,7 @@ set_nss_error (GError **error)
}
static SECStatus PR_CALLBACK
-collect_certs(gpointer arg, SECItem **certs, gint numcerts)
+collect_certs (gpointer arg, SECItem **certs, gint numcerts)
{
CERTDERCerts *collectArgs;
SECItem *cert;
@@ -324,17 +324,17 @@ collect_certs(gpointer arg, SECItem **certs, gint numcerts)
collectArgs = (CERTDERCerts *)arg;
collectArgs->numcerts = numcerts;
- collectArgs->rawCerts = (SECItem *) PORT_ArenaZAlloc(
+ collectArgs->rawCerts = (SECItem *) PORT_ArenaZAlloc (
collectArgs->arena, sizeof (SECItem) * numcerts);
if (collectArgs->rawCerts == NULL)
- return(SECFailure);
+ return (SECFailure);
cert = collectArgs->rawCerts;
while (numcerts--) {
- rv = SECITEM_CopyItem(collectArgs->arena, cert, *certs);
+ rv = SECITEM_CopyItem (collectArgs->arena, cert, *certs);
if (rv == SECFailure)
- return(SECFailure);
+ return (SECFailure);
cert++;
certs++;
}
@@ -349,14 +349,14 @@ e_cert_db_get_certs_from_package (PRArenaPool *arena,
{
/*nsNSSShutDownPreventionLock locker;*/
CERTDERCerts *collectArgs =
- (CERTDERCerts *)PORT_ArenaZAlloc(arena, sizeof(CERTDERCerts));
+ (CERTDERCerts *)PORT_ArenaZAlloc (arena, sizeof (CERTDERCerts));
SECStatus sec_rv;
if (!collectArgs)
return NULL;
collectArgs->arena = arena;
- sec_rv = CERT_DecodeCertPackage(data,
+ sec_rv = CERT_DecodeCertPackage (data,
length, collect_certs,
(gpointer)collectArgs);
@@ -425,21 +425,21 @@ static void
initialize_nss (void)
{
/* Use camel_init() to initialise NSS consistently... */
- camel_init(e_get_user_data_dir(), TRUE);
+ camel_init (e_get_user_data_dir (), TRUE);
/* ... except for the bits we only seem to do here. FIXME */
- PK11_SetPasswordFunc(pk11_password);
+ PK11_SetPasswordFunc (pk11_password);
/* Enable ciphers for PKCS#12 */
- SEC_PKCS12EnableCipher(PKCS12_RC4_40, 1);
- SEC_PKCS12EnableCipher(PKCS12_RC4_128, 1);
- SEC_PKCS12EnableCipher(PKCS12_RC2_CBC_40, 1);
- SEC_PKCS12EnableCipher(PKCS12_RC2_CBC_128, 1);
- SEC_PKCS12EnableCipher(PKCS12_DES_56, 1);
- SEC_PKCS12EnableCipher(PKCS12_DES_EDE3_168, 1);
- SEC_PKCS12SetPreferredCipher(PKCS12_DES_EDE3_168, 1);
+ SEC_PKCS12EnableCipher (PKCS12_RC4_40, 1);
+ SEC_PKCS12EnableCipher (PKCS12_RC4_128, 1);
+ SEC_PKCS12EnableCipher (PKCS12_RC2_CBC_40, 1);
+ SEC_PKCS12EnableCipher (PKCS12_RC2_CBC_128, 1);
+ SEC_PKCS12EnableCipher (PKCS12_DES_56, 1);
+ SEC_PKCS12EnableCipher (PKCS12_DES_EDE3_168, 1);
+ SEC_PKCS12SetPreferredCipher (PKCS12_DES_EDE3_168, 1);
#ifdef notyet
- PORT_SetUCS2_ASCIIConversionFunction(ucs2_ascii_conversion_fn);
+ PORT_SetUCS2_ASCIIConversionFunction (ucs2_ascii_conversion_fn);
#endif
}
@@ -458,7 +458,7 @@ install_loadable_roots (void)
for (i = 0; i < module->slotCount; i++) {
PK11SlotInfo *slot = module->slots[i];
if (PK11_IsPresent (slot)) {
- if (PK11_HasRootCerts(slot)) {
+ if (PK11_HasRootCerts (slot)) {
RootsModule = module;
break;
}
@@ -541,15 +541,15 @@ e_cert_db_class_init (ECertDBClass *klass)
{
GObjectClass *object_class;
- object_class = G_OBJECT_CLASS(klass);
+ object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_ref (PARENT_TYPE);
object_class->dispose = e_cert_db_dispose;
- initialize_nss();
+ initialize_nss ();
/* check to see if you have a rootcert module installed */
- install_loadable_roots();
+ install_loadable_roots ();
e_cert_db_signals[PK11_PASSWD] =
g_signal_new ("pk11_passwd",
@@ -644,9 +644,9 @@ e_cert_db_find_cert_by_nickname (ECertDB *certdb,
CERTCertificate *cert = NULL;
/*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Getting \"%s\"\n", asciiname));*/
- cert = PK11_FindCertFromNickname((gchar *)nickname, NULL);
+ cert = PK11_FindCertFromNickname ((gchar *)nickname, NULL);
if (!cert) {
- cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), (gchar *)nickname);
+ cert = CERT_FindCertByNickname (CERT_GetDefaultCertDB (), (gchar *)nickname);
}
if (cert) {
@@ -678,22 +678,22 @@ e_cert_db_find_cert_by_key (ECertDB *certdb,
return NULL;
}
- dummy = NSSBase64_DecodeBuffer(NULL, &keyItem, db_key,
- (PRUint32)PL_strlen(db_key));
+ dummy = NSSBase64_DecodeBuffer (NULL, &keyItem, db_key,
+ (PRUint32)PL_strlen (db_key));
/* someday maybe we can speed up the search using the moduleID and slotID*/
- moduleID = NS_NSS_GET_LONG(keyItem.data);
- slotID = NS_NSS_GET_LONG(&keyItem.data[NS_NSS_LONG]);
+ moduleID = NS_NSS_GET_LONG (keyItem.data);
+ slotID = NS_NSS_GET_LONG (&keyItem.data[NS_NSS_LONG]);
/* build the issuer/SN structure*/
- issuerSN.serialNumber.len = NS_NSS_GET_LONG(&keyItem.data[NS_NSS_LONG*2]);
- issuerSN.derIssuer.len = NS_NSS_GET_LONG(&keyItem.data[NS_NSS_LONG*3]);
+ issuerSN.serialNumber.len = NS_NSS_GET_LONG (&keyItem.data[NS_NSS_LONG*2]);
+ issuerSN.derIssuer.len = NS_NSS_GET_LONG (&keyItem.data[NS_NSS_LONG*3]);
issuerSN.serialNumber.data= &keyItem.data[NS_NSS_LONG*4];
issuerSN.derIssuer.data= &keyItem.data[NS_NSS_LONG*4+
issuerSN.serialNumber.len];
- cert = CERT_FindCertByIssuerAndSN(CERT_GetDefaultCertDB(), &issuerSN);
- PR_FREEIF(keyItem.data);
+ cert = CERT_FindCertByIssuerAndSN (CERT_GetDefaultCertDB (), &issuerSN);
+ PR_FREEIF (keyItem.data);
if (cert) {
ECert *ecert = e_cert_new (cert);
return e_cert;
@@ -736,7 +736,7 @@ e_cert_db_find_cert_by_email_address (ECertDB *certdb,
CERTCertList *certlist;
any_cert = CERT_FindCertByNicknameOrEmailAddr (
- CERT_GetDefaultCertDB(), (gchar *) email);
+ CERT_GetDefaultCertDB (), (gchar *) email);
if (!any_cert) {
set_nss_error (error);
@@ -745,32 +745,32 @@ e_cert_db_find_cert_by_email_address (ECertDB *certdb,
/* any_cert now contains a cert with the right subject,
* but it might not have the correct usage. */
- certlist = CERT_CreateSubjectCertList(NULL,
- CERT_GetDefaultCertDB(),
+ certlist = CERT_CreateSubjectCertList (NULL,
+ CERT_GetDefaultCertDB (),
&any_cert->derSubject,
- PR_Now(), PR_TRUE);
+ PR_Now (), PR_TRUE);
if (!certlist) {
set_nss_error (error);
- CERT_DestroyCertificate(any_cert);
+ CERT_DestroyCertificate (any_cert);
return NULL;
}
if (SECSuccess != CERT_FilterCertListByUsage (
certlist, certUsageEmailRecipient, PR_FALSE)) {
set_nss_error (error);
- CERT_DestroyCertificate(any_cert);
+ CERT_DestroyCertificate (any_cert);
CERT_DestroyCertList (certlist);
return NULL;
}
- if (CERT_LIST_END(CERT_LIST_HEAD(certlist), certlist)) {
+ if (CERT_LIST_END (CERT_LIST_HEAD (certlist), certlist)) {
set_nss_error (error);
- CERT_DestroyCertificate(any_cert);
+ CERT_DestroyCertificate (any_cert);
CERT_DestroyCertList (certlist);
return NULL;
}
- cert = e_cert_new (CERT_DupCertificate (CERT_LIST_HEAD(certlist)->cert));
+ cert = e_cert_new (CERT_DupCertificate (CERT_LIST_HEAD (certlist)->cert));
CERT_DestroyCertList (certlist);
CERT_DestroyCertificate (any_cert);
@@ -803,7 +803,7 @@ confirm_download_ca_cert (ECertDB *cert_db,
}
static gboolean
-handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
+handle_ca_cert_download (ECertDB *cert_db, GList *certs, GError **error)
{
ECert *certToShow;
SECItem der;
@@ -853,13 +853,13 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
cert1IssuerName = e_cert_get_issuer_name (cert1);
cert1SubjectName = e_cert_get_subject_name (cert1);
- if (!strcmp(cert1IssuerName, cert0SubjectName)) {
+ if (!strcmp (cert1IssuerName, cert0SubjectName)) {
/* In this case, the first cert in the list signed the second,
so the first cert is the root. Let's display the last cert
in the list. */
certToShow = E_CERT (g_list_last (certs)->data);
}
- else if (!strcmp(cert0IssuerName, cert1SubjectName)) {
+ else if (!strcmp (cert0IssuerName, cert1SubjectName)) {
/* In this case the second cert has signed the first cert. The
first cert is the leaf, so let's display it. */
certToShow = cert0;
@@ -884,10 +884,10 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
{
/*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Creating temp cert\n"));*/
- CERTCertDBHandle *certdb = CERT_GetDefaultCertDB();
- tmpCert = CERT_FindCertByDERCert(certdb, &der);
+ CERTCertDBHandle *certdb = CERT_GetDefaultCertDB ();
+ tmpCert = CERT_FindCertByDERCert (certdb, &der);
if (!tmpCert) {
- tmpCert = CERT_NewTempCertificate(certdb, &der,
+ tmpCert = CERT_NewTempCertificate (certdb, &der,
NULL, PR_FALSE, PR_TRUE);
}
if (!tmpCert) {
@@ -898,7 +898,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
}
#if 0
- CERTCertificateCleaner tmpCertCleaner(tmpCert);
+ CERTCertificateCleaner tmpCertCleaner (tmpCert);
#endif
if (tmpCert->isperm) {
@@ -921,7 +921,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
/*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("trust is %d\n", trustBits));*/
- nickname = CERT_MakeCANickname(tmpCert);
+ nickname = CERT_MakeCANickname (tmpCert);
/*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Created nick \"%s\"\n", nickname.get()));*/
@@ -932,11 +932,11 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
trust_email,
trust_objsign);
- srv = CERT_AddTempCertToPerm(tmpCert,
+ srv = CERT_AddTempCertToPerm (tmpCert,
nickname,
&trust);
- if (srv != SECSuccess && PORT_GetError() != SEC_ERROR_TOKEN_NOT_LOGGED_IN) {
+ if (srv != SECSuccess && PORT_GetError () != SEC_ERROR_TOKEN_NOT_LOGGED_IN) {
set_nss_error (error);
return FALSE;
}
@@ -952,20 +952,20 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
if (i == selCertIndex)
continue;
- certToShow = do_QueryElementAt(x509Certs, i);
- certToShow->GetRawDER(&der.len, (PRUint8 **)&der.data);
+ certToShow = do_QueryElementAt (x509Certs, i);
+ certToShow->GetRawDER (&der.len, (PRUint8 **)&der.data);
CERTCertificate *tmpCert2 =
- CERT_NewTempCertificate(certdb, &der, nsnull, PR_FALSE, PR_TRUE);
+ CERT_NewTempCertificate (certdb, &der, nsnull, PR_FALSE, PR_TRUE);
if (!tmpCert2) {
NS_ASSERTION(0, "Couldn't create temp cert from DER blob\n");
continue; /* Let's try to import the rest of 'em */
}
- nickname.Adopt(CERT_MakeCANickname(tmpCert2));
- CERT_AddTempCertToPerm(tmpCert2, NS_CONST_CAST(gchar *,nickname.get()),
- defaultTrust.GetTrust());
- CERT_DestroyCertificate(tmpCert2);
+ nickname.Adopt (CERT_MakeCANickname (tmpCert2));
+ CERT_AddTempCertToPerm (tmpCert2, NS_CONST_CAST (gchar *,nickname.get ()),
+ defaultTrust.GetTrust ());
+ CERT_DestroyCertificate (tmpCert2);
}
#endif
return TRUE;
@@ -978,7 +978,7 @@ e_cert_db_delete_cert (ECertDB *certdb,
ECert *ecert)
{
/* nsNSSShutDownPreventionLock locker;
- nsNSSCertificate *nssCert = NS_STATIC_CAST(nsNSSCertificate*, aCert); */
+ nsNSSCertificate *nssCert = NS_STATIC_CAST (nsNSSCertificate*, aCert); */
CERTCertificate *cert;
@@ -998,7 +998,7 @@ e_cert_db_delete_cert (ECertDB *certdb,
CERTCertTrust trust;
e_cert_trust_init_with_values (&trust, 0, 0, 0);
- CERT_ChangeCertTrust(CERT_GetDefaultCertDB(),
+ CERT_ChangeCertTrust (CERT_GetDefaultCertDB (),
cert, &trust);
}
@@ -1014,7 +1014,7 @@ e_cert_db_import_certs (ECertDB *certdb,
GError **error)
{
/*nsNSSShutDownPreventionLock locker;*/
- PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
+ PRArenaPool *arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE);
GList *certs = NULL;
CERTDERCerts *certCollection = e_cert_db_get_certs_from_package (arena, data, length);
gint i;
@@ -1022,7 +1022,7 @@ e_cert_db_import_certs (ECertDB *certdb,
if (!certCollection) {
set_nss_error (error);
- PORT_FreeArena(arena, PR_FALSE);
+ PORT_FreeArena (arena, PR_FALSE);
return FALSE;
}
@@ -1036,14 +1036,14 @@ e_cert_db_import_certs (ECertDB *certdb,
set_nss_error (error);
g_list_foreach (certs, (GFunc)g_object_unref, NULL);
g_list_free (certs);
- PORT_FreeArena(arena, PR_FALSE);
+ PORT_FreeArena (arena, PR_FALSE);
return FALSE;
}
certs = g_list_append (certs, cert);
}
switch (cert_type) {
case E_CERT_CA:
- rv = handle_ca_cert_download(certdb, certs, error);
+ rv = handle_ca_cert_download (certdb, certs, error);
if (rv && imported_certs) {
GList *l;
@@ -1062,13 +1062,13 @@ e_cert_db_import_certs (ECertDB *certdb,
default:
/* We only deal with import CA certs in this method currently.*/
set_nss_error (error);
- PORT_FreeArena(arena, PR_FALSE);
+ PORT_FreeArena (arena, PR_FALSE);
rv = FALSE;
}
g_list_foreach (certs, (GFunc)g_object_unref, NULL);
g_list_free (certs);
- PORT_FreeArena(arena, PR_FALSE);
+ PORT_FreeArena (arena, PR_FALSE);
return rv;
}
@@ -1085,16 +1085,16 @@ e_cert_db_import_email_cert (ECertDB *certdb,
SECItem **rawCerts;
gint numcerts;
gint i;
- PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
+ PRArenaPool *arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE);
CERTDERCerts *certCollection = e_cert_db_get_certs_from_package (arena, data, length);
if (!certCollection) {
set_nss_error (error);
- PORT_FreeArena(arena, PR_FALSE);
+ PORT_FreeArena (arena, PR_FALSE);
return FALSE;
}
- cert = CERT_NewTempCertificate(CERT_GetDefaultCertDB(), certCollection->rawCerts,
+ cert = CERT_NewTempCertificate (CERT_GetDefaultCertDB (), certCollection->rawCerts,
(gchar *)NULL, PR_FALSE, PR_TRUE);
if (!cert) {
set_nss_error (error);
@@ -1102,7 +1102,7 @@ e_cert_db_import_email_cert (ECertDB *certdb,
goto loser;
}
numcerts = certCollection->numcerts;
- rawCerts = (SECItem **) PORT_Alloc(sizeof(SECItem *) * numcerts);
+ rawCerts = (SECItem **) PORT_Alloc (sizeof (SECItem *) * numcerts);
if (!rawCerts) {
set_nss_error (error);
rv = FALSE;
@@ -1113,7 +1113,7 @@ e_cert_db_import_email_cert (ECertDB *certdb,
rawCerts[i] = &certCollection->rawCerts[i];
}
- srv = CERT_ImportCerts(CERT_GetDefaultCertDB(), certUsageEmailSigner,
+ srv = CERT_ImportCerts (CERT_GetDefaultCertDB (), certUsageEmailSigner,
numcerts, rawCerts, NULL, PR_TRUE, PR_FALSE,
NULL);
if (srv != SECSuccess) {
@@ -1121,7 +1121,7 @@ e_cert_db_import_email_cert (ECertDB *certdb,
rv = FALSE;
goto loser;
}
- CERT_SaveSMimeProfile(cert, NULL, NULL);
+ CERT_SaveSMimeProfile (cert, NULL, NULL);
if (imported_certs) {
*imported_certs = NULL;
@@ -1137,12 +1137,12 @@ e_cert_db_import_email_cert (ECertDB *certdb,
*imported_certs = g_slist_reverse (*imported_certs);
}
- PORT_Free(rawCerts);
+ PORT_Free (rawCerts);
loser:
if (cert)
- CERT_DestroyCertificate(cert);
+ CERT_DestroyCertificate (cert);
if (arena)
- PORT_FreeArena(arena, PR_TRUE);
+ PORT_FreeArena (arena, PR_TRUE);
return rv;
}
@@ -1160,16 +1160,16 @@ default_nickname (CERTCertificate *cert)
PK11SlotInfo *slot=NULL;
CK_OBJECT_HANDLE keyHandle;
- CERTCertDBHandle *defaultcertdb = CERT_GetDefaultCertDB();
+ CERTCertDBHandle *defaultcertdb = CERT_GetDefaultCertDB ();
- username = CERT_GetCommonName(&cert->subject);
+ username = CERT_GetCommonName (&cert->subject);
if (username == NULL)
username = PL_strdup("");
if (username == NULL)
goto loser;
- caname = CERT_GetOrgName(&cert->issuer);
+ caname = CERT_GetOrgName (&cert->issuer);
if (caname == NULL)
caname = PL_strdup("");
@@ -1180,19 +1180,19 @@ default_nickname (CERTCertificate *cert)
nickFmt = "%1$s's %2$s ID";
- nickname = PR_smprintf(nickFmt, username, caname);
+ nickname = PR_smprintf (nickFmt, username, caname);
/*
* We need to see if the private key exists on a token, if it does
* then we need to check for nicknames that already exist on the smart
* card.
*/
- slot = PK11_KeyForCertExists(cert, &keyHandle, NULL);
+ slot = PK11_KeyForCertExists (cert, &keyHandle, NULL);
if (slot == NULL) {
goto loser;
}
- if (!PK11_IsInternal(slot)) {
+ if (!PK11_IsInternal (slot)) {
tmp = PR_smprintf("%s:%s", PK11_GetTokenName(slot), nickname);
- PR_Free(nickname);
+ PR_Free (nickname);
nickname = tmp;
tmp = NULL;
}
@@ -1205,27 +1205,27 @@ default_nickname (CERTCertificate *cert)
if (nickname == NULL)
goto loser;
- if (PK11_IsInternal(slot)) {
+ if (PK11_IsInternal (slot)) {
/* look up the nickname to make sure it isn't in use already */
- dummycert = CERT_FindCertByNickname(defaultcertdb, nickname);
+ dummycert = CERT_FindCertByNickname (defaultcertdb, nickname);
} else {
/*
* Check the cert against others that already live on the smart
* card.
*/
- dummycert = PK11_FindCertFromNickname(nickname, NULL);
+ dummycert = PK11_FindCertFromNickname (nickname, NULL);
if (dummycert != NULL) {
/*
* Make sure the subject names are different.
*/
- if (CERT_CompareName(&cert->subject, &dummycert->subject) == SECEqual) {
+ if (CERT_CompareName (&cert->subject, &dummycert->subject) == SECEqual) {
/*
* There is another certificate with the same nickname and
* the same subject name on the smart card, so let's use this
* nickname.
*/
- CERT_DestroyCertificate(dummycert);
+ CERT_DestroyCertificate (dummycert);
dummycert = NULL;
}
}
@@ -1234,32 +1234,32 @@ default_nickname (CERTCertificate *cert)
goto done;
/* found a cert, destroy it and loop */
- CERT_DestroyCertificate(dummycert);
- if (tmp != nickname) PR_Free(nickname);
+ CERT_DestroyCertificate (dummycert);
+ if (tmp != nickname) PR_Free (nickname);
count++;
} /* end of while (1) */
loser:
if (nickname) {
- PR_Free(nickname);
+ PR_Free (nickname);
}
nickname = NULL;
done:
if (caname) {
- PR_Free(caname);
+ PR_Free (caname);
}
if (username) {
- PR_Free(username);
+ PR_Free (username);
}
if (slot != NULL) {
- PK11_FreeSlot(slot);
+ PK11_FreeSlot (slot);
if (nickname != NULL) {
tmp = nickname;
- nickname = strchr(tmp, ':');
+ nickname = strchr (tmp, ':');
if (nickname != NULL) {
nickname++;
- nickname = PL_strdup(nickname);
- PR_Free(tmp);
+ nickname = PL_strdup (nickname);
+ PR_Free (tmp);
tmp = NULL;
} else {
nickname = tmp;
@@ -1267,8 +1267,8 @@ default_nickname (CERTCertificate *cert)
}
}
}
- PR_FREEIF(tmp);
- return(nickname);
+ PR_FREEIF (tmp);
+ return (nickname);
}
gboolean
@@ -1286,7 +1286,7 @@ e_cert_db_import_user_cert (ECertDB *certdb,
PRArenaPool *arena;
CERTCertificate * cert=NULL;
- arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
+ arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE);
if (arena == NULL) {
set_nss_error (error);
goto loser;
@@ -1298,19 +1298,19 @@ e_cert_db_import_user_cert (ECertDB *certdb,
goto loser;
}
- cert = CERT_NewTempCertificate(CERT_GetDefaultCertDB(), collectArgs->rawCerts,
+ cert = CERT_NewTempCertificate (CERT_GetDefaultCertDB (), collectArgs->rawCerts,
(gchar *)NULL, PR_FALSE, PR_TRUE);
if (!cert) {
set_nss_error (error);
goto loser;
}
- slot = PK11_KeyForCertExists(cert, NULL, NULL);
+ slot = PK11_KeyForCertExists (cert, NULL, NULL);
if (slot == NULL) {
set_nss_error (error);
goto loser;
}
- PK11_FreeSlot(slot);
+ PK11_FreeSlot (slot);
/* pick a nickname for the cert */
if (cert->nickname) {
@@ -1320,31 +1320,31 @@ e_cert_db_import_user_cert (ECertDB *certdb,
nickname = cert->nickname;
}
else {
- nickname = default_nickname(cert);
+ nickname = default_nickname (cert);
}
/* user wants to import the cert */
- slot = PK11_ImportCertForKey(cert, nickname, NULL);
+ slot = PK11_ImportCertForKey (cert, nickname, NULL);
if (!slot) {
set_nss_error (error);
goto loser;
}
- PK11_FreeSlot(slot);
+ PK11_FreeSlot (slot);
numCACerts = collectArgs->numcerts - 1;
if (numCACerts) {
CACerts = collectArgs->rawCerts+1;
- if (!CERT_ImportCAChain(CACerts, numCACerts, certUsageUserCertImport)) {
+ if (!CERT_ImportCAChain (CACerts, numCACerts, certUsageUserCertImport)) {
rv = TRUE;
}
}
loser:
if (arena) {
- PORT_FreeArena(arena, PR_FALSE);
+ PORT_FreeArena (arena, PR_FALSE);
}
if (cert) {
- CERT_DestroyCertificate(cert);
+ CERT_DestroyCertificate (cert);
}
return rv;
}
@@ -1491,10 +1491,10 @@ e_cert_db_login_to_slot (ECertDB *cert_db,
PK11_InitPin (slot, "", pwd);
}
- PK11_SetPasswordFunc(pk11_password);
+ PK11_SetPasswordFunc (pk11_password);
if (PK11_Authenticate (slot, PR_TRUE, NULL) != SECSuccess) {
printf ("PK11_Authenticate failed (err = %d/%d)\n",
- PORT_GetError(), PORT_GetError() + 0x2000);
+ PORT_GetError (), PORT_GetError () + 0x2000);
return FALSE;
}
}
diff --git a/smime/lib/e-cert-trust.c b/smime/lib/e-cert-trust.c
index cec7e06041..5bb13318a8 100644
--- a/smime/lib/e-cert-trust.c
+++ b/smime/lib/e-cert-trust.c
@@ -48,7 +48,7 @@
void
e_cert_trust_init (CERTCertTrust *trust)
{
- memset(trust, 0, sizeof(CERTCertTrust));
+ memset (trust, 0, sizeof (CERTCertTrust));
}
void
@@ -57,10 +57,10 @@ e_cert_trust_init_with_values (CERTCertTrust *trust,
guint email,
guint objsign)
{
- memset(trust, 0, sizeof(CERTCertTrust));
- e_cert_trust_add_trust(&trust->sslFlags, ssl);
- e_cert_trust_add_trust(&trust->emailFlags, email);
- e_cert_trust_add_trust(&trust->objectSigningFlags, objsign);
+ memset (trust, 0, sizeof (CERTCertTrust));
+ e_cert_trust_add_trust (&trust->sslFlags, ssl);
+ e_cert_trust_add_trust (&trust->emailFlags, email);
+ e_cert_trust_add_trust (&trust->objectSigningFlags, objsign);
}
void
@@ -68,9 +68,9 @@ e_cert_trust_copy (CERTCertTrust *trust,
CERTCertTrust *t)
{
if (t)
- memcpy(trust, t, sizeof(CERTCertTrust));
+ memcpy (trust, t, sizeof (CERTCertTrust));
else
- memset(trust, 0, sizeof(CERTCertTrust));
+ memset (trust, 0, sizeof (CERTCertTrust));
}
void
@@ -108,11 +108,11 @@ e_cert_trust_add_peer_trust (CERTCertTrust *trust,
PRBool objSign)
{
if (ssl)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED);
+ e_cert_trust_add_trust (&trust->sslFlags, CERTDB_TRUSTED);
if (email)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED);
+ e_cert_trust_add_trust (&trust->emailFlags, CERTDB_TRUSTED);
if (objSign)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED);
+ e_cert_trust_add_trust (&trust->objectSigningFlags, CERTDB_TRUSTED);
}
void
@@ -127,19 +127,19 @@ e_cert_trust_set_ssl_trust (CERTCertTrust *trust,
{
trust->sslFlags = 0;
if (peer || tPeer)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_VALID_PEER);
+ e_cert_trust_add_trust (&trust->sslFlags, CERTDB_VALID_PEER);
if (tPeer)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED);
+ e_cert_trust_add_trust (&trust->sslFlags, CERTDB_TRUSTED);
if (ca || tCA)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_VALID_CA);
+ e_cert_trust_add_trust (&trust->sslFlags, CERTDB_VALID_CA);
if (tClientCA)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED_CLIENT_CA);
+ e_cert_trust_add_trust (&trust->sslFlags, CERTDB_TRUSTED_CLIENT_CA);
if (tCA)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED_CA);
+ e_cert_trust_add_trust (&trust->sslFlags, CERTDB_TRUSTED_CA);
if (user)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_USER);
+ e_cert_trust_add_trust (&trust->sslFlags, CERTDB_USER);
if (warn)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_SEND_WARN);
+ e_cert_trust_add_trust (&trust->sslFlags, CERTDB_SEND_WARN);
}
void
@@ -154,19 +154,19 @@ e_cert_trust_set_email_trust (CERTCertTrust *trust,
{
trust->emailFlags = 0;
if (peer || tPeer)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_VALID_PEER);
+ e_cert_trust_add_trust (&trust->emailFlags, CERTDB_VALID_PEER);
if (tPeer)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED);
+ e_cert_trust_add_trust (&trust->emailFlags, CERTDB_TRUSTED);
if (ca || tCA)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_VALID_CA);
+ e_cert_trust_add_trust (&trust->emailFlags, CERTDB_VALID_CA);
if (tClientCA)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED_CLIENT_CA);
+ e_cert_trust_add_trust (&trust->emailFlags, CERTDB_TRUSTED_CLIENT_CA);
if (tCA)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED_CA);
+ e_cert_trust_add_trust (&trust->emailFlags, CERTDB_TRUSTED_CA);
if (user)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_USER);
+ e_cert_trust_add_trust (&trust->emailFlags, CERTDB_USER);
if (warn)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_SEND_WARN);
+ e_cert_trust_add_trust (&trust->emailFlags, CERTDB_SEND_WARN);
}
void
@@ -181,19 +181,19 @@ e_cert_trust_set_objsign_trust (CERTCertTrust *trust,
{
trust->objectSigningFlags = 0;
if (peer || tPeer)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_VALID_PEER);
+ e_cert_trust_add_trust (&trust->objectSigningFlags, CERTDB_VALID_PEER);
if (tPeer)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED);
+ e_cert_trust_add_trust (&trust->objectSigningFlags, CERTDB_TRUSTED);
if (ca || tCA)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_VALID_CA);
+ e_cert_trust_add_trust (&trust->objectSigningFlags, CERTDB_VALID_CA);
if (tClientCA)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED_CLIENT_CA);
+ e_cert_trust_add_trust (&trust->objectSigningFlags, CERTDB_TRUSTED_CLIENT_CA);
if (tCA)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED_CA);
+ e_cert_trust_add_trust (&trust->objectSigningFlags, CERTDB_TRUSTED_CA);
if (user)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_USER);
+ e_cert_trust_add_trust (&trust->objectSigningFlags, CERTDB_USER);
if (warn)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_SEND_WARN);
+ e_cert_trust_add_trust (&trust->objectSigningFlags, CERTDB_SEND_WARN);
}
void
@@ -311,9 +311,9 @@ e_cert_trust_set_user (CERTCertTrust *trust)
PRBool
e_cert_trust_has_any_ca (CERTCertTrust *trust)
{
- if (e_cert_trust_has_trust(trust->sslFlags, CERTDB_VALID_CA) ||
- e_cert_trust_has_trust(trust->emailFlags, CERTDB_VALID_CA) ||
- e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_VALID_CA))
+ if (e_cert_trust_has_trust (trust->sslFlags, CERTDB_VALID_CA) ||
+ e_cert_trust_has_trust (trust->emailFlags, CERTDB_VALID_CA) ||
+ e_cert_trust_has_trust (trust->objectSigningFlags, CERTDB_VALID_CA))
return PR_TRUE;
return PR_FALSE;
@@ -364,9 +364,9 @@ e_cert_trust_has_peer (CERTCertTrust *trust,
PRBool
e_cert_trust_has_any_user (CERTCertTrust *trust)
{
- if (e_cert_trust_has_trust(trust->sslFlags, CERTDB_USER) ||
- e_cert_trust_has_trust(trust->emailFlags, CERTDB_USER) ||
- e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_USER))
+ if (e_cert_trust_has_trust (trust->sslFlags, CERTDB_USER) ||
+ e_cert_trust_has_trust (trust->emailFlags, CERTDB_USER) ||
+ e_cert_trust_has_trust (trust->objectSigningFlags, CERTDB_USER))
return PR_TRUE;
return PR_FALSE;
diff --git a/smime/lib/e-cert.c b/smime/lib/e-cert.c
index 1dee4d4a65..6a6fef462e 100644
--- a/smime/lib/e-cert.c
+++ b/smime/lib/e-cert.c
@@ -118,7 +118,7 @@ e_cert_dispose (GObject *object)
if (ec->priv->serial_number)
PORT_Free (ec->priv->serial_number);
- g_free(ec->priv->usage_string);
+ g_free (ec->priv->usage_string);
if (ec->priv->sha1_fingerprint)
PORT_Free (ec->priv->sha1_fingerprint);
@@ -131,12 +131,12 @@ e_cert_dispose (GObject *object)
if (ec->priv->delete) {
printf ("attempting to delete cert marked for deletion\n");
if (e_cert_get_cert_type (ec) == E_CERT_USER) {
- PK11_DeleteTokenCertAndKey(ec->priv->cert, NULL);
- } else if (!PK11_IsReadOnly(ec->priv->cert->slot)) {
+ PK11_DeleteTokenCertAndKey (ec->priv->cert, NULL);
+ } else if (!PK11_IsReadOnly (ec->priv->cert->slot)) {
/* If the list of built-ins does contain a non-removable
copy of this certificate, our call will not remove
the certificate permanently, but rather remove all trust. */
- SEC_DeletePermCertificate(ec->priv->cert);
+ SEC_DeletePermCertificate (ec->priv->cert);
}
}
@@ -157,7 +157,7 @@ e_cert_class_init (ECertClass *klass)
{
GObjectClass *object_class;
- object_class = G_OBJECT_CLASS(klass);
+ object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_ref (PARENT_TYPE);
@@ -241,16 +241,16 @@ e_cert_populate (ECert *cert)
cert->priv->serial_number = CERT_Hexify (&cert->priv->cert->serialNumber, TRUE);
- memset(fingerprint, 0, sizeof fingerprint);
- PK11_HashBuf(SEC_OID_SHA1, fingerprint,
+ memset (fingerprint, 0, sizeof fingerprint);
+ PK11_HashBuf (SEC_OID_SHA1, fingerprint,
cert->priv->cert->derCert.data,
cert->priv->cert->derCert.len);
fpItem.data = fingerprint;
fpItem.len = SHA1_LENGTH;
cert->priv->sha1_fingerprint = CERT_Hexify (&fpItem, TRUE);
- memset(fingerprint, 0, sizeof fingerprint);
- PK11_HashBuf(SEC_OID_MD5, fingerprint,
+ memset (fingerprint, 0, sizeof fingerprint);
+ PK11_HashBuf (SEC_OID_MD5, fingerprint,
cert->priv->cert->derCert.data,
cert->priv->cert->derCert.len);
fpItem.data = fingerprint;
@@ -280,7 +280,7 @@ e_cert_new_from_der (gchar *data, guint32 len)
return NULL;
if (cert->dbhandle == NULL)
- cert->dbhandle = CERT_GetDefaultCertDB();
+ cert->dbhandle = CERT_GetDefaultCertDB ();
return e_cert_new (cert);
}
@@ -416,7 +416,7 @@ static struct {
};
const gchar *
-e_cert_get_usage(ECert *cert)
+e_cert_get_usage (ECert *cert)
{
if (cert->priv->usage_string == NULL) {
gint i;
@@ -427,12 +427,12 @@ e_cert_get_usage(ECert *cert)
if (icert->keyUsage & usageinfo[i].bit) {
if (str->len != 0)
g_string_append(str, ", ");
- g_string_append(str, _(usageinfo[i].text));
+ g_string_append (str, _(usageinfo[i].text));
}
}
cert->priv->usage_string = str->str;
- g_string_free(str, FALSE);
+ g_string_free (str, FALSE);
}
return cert->priv->usage_string;
@@ -469,10 +469,10 @@ e_cert_get_chain (ECert *ecert)
l = g_list_append (l, ecert);
- if (SECITEM_CompareItem(&cert->derIssuer, &cert->derSubject) == SECEqual)
+ if (SECITEM_CompareItem (&cert->derIssuer, &cert->derSubject) == SECEqual)
break;
- next_cert = CERT_FindCertIssuer (cert, PR_Now(), certUsageSSLClient);
+ next_cert = CERT_FindCertIssuer (cert, PR_Now (), certUsageSSLClient);
if (!next_cert)
break;
@@ -484,9 +484,9 @@ e_cert_get_chain (ECert *ecert)
}
ECert *
-e_cert_get_ca_cert(ECert *ecert)
+e_cert_get_ca_cert (ECert *ecert)
{
- CERTCertificate *cert, *next = e_cert_get_internal_cert(ecert), *internal;
+ CERTCertificate *cert, *next = e_cert_get_internal_cert (ecert), *internal;
cert = next;
internal = cert;
@@ -495,13 +495,13 @@ e_cert_get_ca_cert(ECert *ecert)
CERT_DestroyCertificate (cert);
cert = next;
- next = CERT_FindCertIssuer (cert, PR_Now(), certUsageAnyCA);
+ next = CERT_FindCertIssuer (cert, PR_Now (), certUsageAnyCA);
} while (next && next != cert);
if (cert == internal)
- return g_object_ref(ecert);
+ return g_object_ref (ecert);
else
- return e_cert_new(cert);
+ return e_cert_new (cert);
}
static gboolean
@@ -509,7 +509,7 @@ get_int_value (SECItem *versionItem,
unsigned long *version)
{
SECStatus srv;
- srv = SEC_ASN1DecodeInteger(versionItem,version);
+ srv = SEC_ASN1DecodeInteger (versionItem,version);
if (srv != SECSuccess) {
g_warning ("could not decode version of cert");
return FALSE;
@@ -565,7 +565,7 @@ process_serial_number_der (SECItem *serialItem,
e_asn1_object_set_display_name (item, _("Serial Number"));
- serialNumber = CERT_Hexify(serialItem, 1);
+ serialNumber = CERT_Hexify (serialItem, 1);
e_asn1_object_set_display_value (item, serialNumber);
PORT_Free (serialNumber); /* XXX the right free to use? */
@@ -622,7 +622,7 @@ get_default_oid_format (SECItem *oid,
static gboolean
get_oid_text (SECItem *oid, gchar **text)
{
- SECOidTag oidTag = SECOID_FindOIDTag(oid);
+ SECOidTag oidTag = SECOID_FindOIDTag (oid);
gchar *temp;
switch (oidTag) {
@@ -765,7 +765,7 @@ static gboolean
process_subject_public_key_info (CERTSubjectPublicKeyInfo *spki,
EASN1Object *parentSequence)
{
- EASN1Object *spkiSequence = e_asn1_object_new();
+ EASN1Object *spkiSequence = e_asn1_object_new ();
EASN1Object *sequenceItem;
EASN1Object *printableItem;
SECItem data;
@@ -810,8 +810,8 @@ process_ns_cert_type_extensions (SECItem *extData,
decoded.data = NULL;
decoded.len = 0;
- if (SECSuccess != SEC_ASN1DecodeItem(NULL, &decoded,
- SEC_ASN1_GET(SEC_BitStringTemplate), extData)) {
+ if (SECSuccess != SEC_ASN1DecodeItem (NULL, &decoded,
+ SEC_ASN1_GET (SEC_BitStringTemplate), extData)) {
g_string_append (text, _("Error: Unable to process extension"));
return TRUE;
}
@@ -859,8 +859,8 @@ process_key_usage_extensions (SECItem *extData, GString *text)
decoded.data = NULL;
decoded.len = 0;
- if (SECSuccess != SEC_ASN1DecodeItem(NULL, &decoded,
- SEC_ASN1_GET(SEC_BitStringTemplate), extData)) {
+ if (SECSuccess != SEC_ASN1DecodeItem (NULL, &decoded,
+ SEC_ASN1_GET (SEC_BitStringTemplate), extData)) {
g_string_append (text, _("Error: Unable to process extension"));
return TRUE;
}
@@ -930,7 +930,7 @@ process_single_extension (CERTCertExtension *extension,
GString *str = g_string_new ("");
gchar *text;
EASN1Object *extensionItem;
- SECOidTag oidTag = SECOID_FindOIDTag(&extension->id);
+ SECOidTag oidTag = SECOID_FindOIDTag (&extension->id);
get_oid_text (&extension->id, &text);
@@ -1027,14 +1027,14 @@ process_name (CERTName *name, gchar **value)
return FALSE;
/* This function returns a string in UTF8 format. */
- decodeItem = CERT_DecodeAVAValue(&ava->value);
+ decodeItem = CERT_DecodeAVAValue (&ava->value);
if (!decodeItem) {
return FALSE;
}
avavalue = g_string_new_len ((gchar *)decodeItem->data, decodeItem->len);
- SECITEM_FreeItem(decodeItem, PR_TRUE);
+ SECITEM_FreeItem (decodeItem, PR_TRUE);
/* Translators: This string is used in Certificate details for fields like Issuer
or Subject, which shows the field name on the left and its respective value
@@ -1111,28 +1111,28 @@ create_tbs_certificate_asn1_struct (ECert *cert, EASN1Object **seq)
g_object_unref (subitem);
#ifdef notyet
- nsCOMPtr<nsIASN1Sequence> validitySequence = new nsNSSASN1Sequence();
+ nsCOMPtr<nsIASN1Sequence> validitySequence = new nsNSSASN1Sequence ();
nssComponent->GetPIPNSSBundleString(NS_LITERAL_STRING("CertDumpValidity").get(),
text);
- validitySequence->SetDisplayName(text);
- asn1Objects->AppendElement(validitySequence, PR_FALSE);
+ validitySequence->SetDisplayName (text);
+ asn1Objects->AppendElement (validitySequence, PR_FALSE);
nssComponent->GetPIPNSSBundleString(NS_LITERAL_STRING("CertDumpNotBefore").get(),
text);
nsCOMPtr<nsIX509CertValidity> validityData;
- GetValidity(getter_AddRefs(validityData));
+ GetValidity (getter_AddRefs (validityData));
PRTime notBefore, notAfter;
- validityData->GetNotBefore(&notBefore);
- validityData->GetNotAfter(&notAfter);
+ validityData->GetNotBefore (&notBefore);
+ validityData->GetNotAfter (&notAfter);
validityData = 0;
- rv = ProcessTime(notBefore, text.get(), validitySequence);
- if (NS_FAILED(rv))
+ rv = ProcessTime (notBefore, text.get (), validitySequence);
+ if (NS_FAILED (rv))
return rv;
nssComponent->GetPIPNSSBundleString(NS_LITERAL_STRING("CertDumpNotAfter").get(),
text);
- rv = ProcessTime(notAfter, text.get(), validitySequence);
- if (NS_FAILED(rv))
+ rv = ProcessTime (notAfter, text.get (), validitySequence);
+ if (NS_FAILED (rv))
return rv;
#endif
@@ -1258,13 +1258,13 @@ e_cert_mark_for_deletion (ECert *cert)
#if 0
/* make sure user is logged in to the token */
- nsCOMPtr<nsIInterfaceRequestor> ctx = new PipUIContext();
+ nsCOMPtr<nsIInterfaceRequestor> ctx = new PipUIContext ();
#endif
- if (PK11_NeedLogin(cert->priv->cert->slot)
- && !PK11_NeedUserInit(cert->priv->cert->slot)
- && !PK11_IsInternal(cert->priv->cert->slot)) {
- if (SECSuccess != PK11_Authenticate(cert->priv->cert->slot, PR_TRUE, NULL)) {
+ if (PK11_NeedLogin (cert->priv->cert->slot)
+ && !PK11_NeedUserInit (cert->priv->cert->slot)
+ && !PK11_IsInternal (cert->priv->cert->slot)) {
+ if (SECSuccess != PK11_Authenticate (cert->priv->cert->slot, PR_TRUE, NULL)) {
return FALSE;
}
}
@@ -1285,7 +1285,7 @@ e_cert_get_cert_type (ECert *ecert)
if (e_cert_trust_has_any_user (cert->trust))
return E_CERT_USER;
if (e_cert_trust_has_any_ca (cert->trust)
- || CERT_IsCACert(cert,NULL))
+ || CERT_IsCACert (cert,NULL))
return E_CERT_CA;
if (e_cert_trust_has_peer (cert->trust, PR_TRUE, PR_FALSE, PR_FALSE))
return E_CERT_SITE;
diff --git a/smime/lib/e-cert.h b/smime/lib/e-cert.h
index 8c70bcded2..3a092a71d4 100644
--- a/smime/lib/e-cert.h
+++ b/smime/lib/e-cert.h
@@ -89,7 +89,7 @@ PRTime e_cert_get_issued_on_time (ECert *cert);
const gchar * e_cert_get_issued_on (ECert *cert);
PRTime e_cert_get_expires_on_time (ECert *cert);
const gchar * e_cert_get_expires_on (ECert *cert);
-const gchar * e_cert_get_usage(ECert *cert);
+const gchar * e_cert_get_usage (ECert *cert);
const gchar * e_cert_get_serial_number (ECert *cert);
const gchar * e_cert_get_sha1_fingerprint (ECert *cert);
diff --git a/smime/lib/e-pkcs12.c b/smime/lib/e-pkcs12.c
index 7f5b49d37f..d73b3c96af 100644
--- a/smime/lib/e-pkcs12.c
+++ b/smime/lib/e-pkcs12.c
@@ -72,9 +72,9 @@ struct _EPKCS12Private {
static GObjectClass *parent_class;
/* static callback functions for the NSS PKCS#12 library */
-static SECItem * PR_CALLBACK nickname_collision(SECItem *, PRBool *, gpointer );
+static SECItem * PR_CALLBACK nickname_collision (SECItem *, PRBool *, gpointer );
-static gboolean handle_error(gint myerr);
+static gboolean handle_error (gint myerr);
#define PKCS12_BUFFER_SIZE 2048
#define PKCS12_RESTORE_OK 1
@@ -107,7 +107,7 @@ e_pkcs12_class_init (EPKCS12Class *klass)
{
GObjectClass *object_class;
- object_class = G_OBJECT_CLASS(klass);
+ object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_ref (PARENT_TYPE);
@@ -179,7 +179,7 @@ input_to_decoder (SEC_PKCS12DecoderContext *dcx, const gchar *path, GError **err
}
/* feed the file data into the decoder */
- srv = SEC_PKCS12DecoderUpdate(dcx,
+ srv = SEC_PKCS12DecoderUpdate (dcx,
(guchar *) buf,
amount);
if (srv) {
@@ -212,7 +212,7 @@ prompt_for_password (gchar *title, gchar *prompt, SECItem *pwd)
guchar *outptr;
gunichar2 c;
- SECITEM_AllocItem(NULL, pwd, sizeof (gunichar2) * (len + 1));
+ SECITEM_AllocItem (NULL, pwd, sizeof (gunichar2) * (len + 1));
outptr = pwd->data;
while (inptr && (c = (gunichar2) (g_utf8_get_char (inptr) & 0xffff))) {
@@ -298,16 +298,16 @@ import_from_file_helper (EPKCS12 *pkcs12, PK11SlotInfo *slot,
We should use that error code instead of inventing a new one
for every error possible. */
if (srv != SECSuccess) {
- if (SEC_ERROR_BAD_PASSWORD == PORT_GetError()) {
+ if (SEC_ERROR_BAD_PASSWORD == PORT_GetError ()) {
*aWantRetry = TRUE;
}
- handle_error(PKCS12_NSS_ERROR);
+ handle_error (PKCS12_NSS_ERROR);
} else if (!rv) {
- handle_error(PKCS12_RESTORE_FAILED);
+ handle_error (PKCS12_RESTORE_FAILED);
}
/* finish the decoder */
if (dcx)
- SEC_PKCS12DecoderFinish(dcx);
+ SEC_PKCS12DecoderFinish (dcx);
return TRUE;
}
@@ -321,7 +321,7 @@ e_pkcs12_import_from_file (EPKCS12 *pkcs12, const gchar *path, GError **error)
printf ("importing pkcs12 from '%s'\n", path);
- slot = PK11_GetInternalKeySlot();
+ slot = PK11_GetInternalKeySlot ();
if (!e_cert_db_login_to_slot (e_cert_db_peek (), slot))
return FALSE;
@@ -345,7 +345,7 @@ e_pkcs12_export_to_file (EPKCS12 *pkcs12,
/* what to do when the nickname collides with one already in the db.
TODO: not handled, throw a dialog allowing the nick to be changed? */
static SECItem * PR_CALLBACK
-nickname_collision(SECItem *oldNick, PRBool *cancel, gpointer wincx)
+nickname_collision (SECItem *oldNick, PRBool *cancel, gpointer wincx)
{
/* nsNSSShutDownPreventionLock locker; */
gint count = 1;
@@ -391,24 +391,24 @@ nickname_collision(SECItem *oldNick, PRBool *cancel, gpointer wincx)
g_free (nickname);
nickname = g_strdup (default_nickname);
}
- cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(),
+ cert = CERT_FindCertByNickname (CERT_GetDefaultCertDB (),
nickname);
if (!cert) {
break;
}
- CERT_DestroyCertificate(cert);
+ CERT_DestroyCertificate (cert);
count++;
}
new_nick = PR_Malloc (sizeof (SECItem));
new_nick->type = siAsciiString;
new_nick->data = (guchar *)nickname;
- new_nick->len = strlen((gchar *)new_nick->data);
+ new_nick->len = strlen ((gchar *)new_nick->data);
return new_nick;
}
static gboolean
-handle_error(gint myerr)
+handle_error (gint myerr)
{
printf ("handle_error (%d)\n", myerr);