aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-08-29 22:44:16 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-08-29 23:22:28 +0800
commit4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9 (patch)
treece1154c5d7487fbd566c5b68df90fb8259b4604e
parente6c42ecc596fb16247e8d1d591a5d244a61d0e24 (diff)
downloadgsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar
gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.gz
gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.bz2
gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.lz
gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.xz
gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.zst
gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.zip
Coding style and whitespace cleanup.
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c266
-rw-r--r--composer/e-composer-name-header.c3
-rw-r--r--composer/e-composer-private.h7
-rw-r--r--composer/e-msg-composer.c20
-rw-r--r--composer/e-msg-composer.h9
-rw-r--r--e-util/e-alert-dialog.c72
-rw-r--r--e-util/e-alert-dialog.h2
-rw-r--r--e-util/e-alert.c164
-rw-r--r--e-util/e-alert.h6
-rw-r--r--e-util/e-bit-array.c88
-rw-r--r--e-util/e-categories-config.c2
-rw-r--r--e-util/e-config.c268
-rw-r--r--e-util/e-config.h40
-rw-r--r--e-util/e-datetime-format.c2
-rw-r--r--e-util/e-event.c90
-rw-r--r--e-util/e-icon-factory.h2
-rw-r--r--e-util/e-mktemp.c40
-rw-r--r--e-util/e-non-intrusive-error-dialog.c4
-rw-r--r--e-util/e-plugin.c176
-rw-r--r--e-util/e-profile-event.c32
-rw-r--r--e-util/e-profile-event.h8
-rw-r--r--e-util/e-selection.h6
-rw-r--r--e-util/e-sorter-array.c56
-rw-r--r--e-util/e-sorter.c38
-rw-r--r--e-util/e-text-event-processor-emacs-like.c4
-rw-r--r--e-util/e-text-event-processor.c4
-rw-r--r--e-util/e-unicode.c6
-rw-r--r--e-util/e-util.c46
-rw-r--r--e-util/e-util.h3
-rw-r--r--e-util/e-xml-utils.c8
-rw-r--r--e-util/gconf-bridge.c6
-rw-r--r--em-format/em-format.c15
-rw-r--r--em-format/em-format.h41
-rw-r--r--filter/e-filter-code.c4
-rw-r--r--filter/e-filter-color.c2
-rw-r--r--filter/e-filter-datespec.c38
-rw-r--r--filter/e-rule-context.c4
-rw-r--r--filter/e-rule-editor.c14
-rw-r--r--libart_lgpl/art_misc.c12
-rw-r--r--libart_lgpl/art_misc.h8
-rw-r--r--libart_lgpl/art_rect_svp.c2
-rw-r--r--libart_lgpl/art_rect_uta.c12
-rw-r--r--libart_lgpl/art_render.h2
-rw-r--r--libart_lgpl/art_svp_intersect.c10
-rw-r--r--libart_lgpl/art_svp_ops.c4
-rw-r--r--libart_lgpl/art_svp_render_aa.c14
-rw-r--r--libart_lgpl/art_svp_vpath.c16
-rw-r--r--libart_lgpl/art_uta.c2
-rw-r--r--libart_lgpl/art_uta_vpath.c64
-rw-r--r--libart_lgpl/art_vpath_bpath.c4
-rw-r--r--libgnomecanvas/gailcanvas.c2
-rw-r--r--libgnomecanvas/gailcanvas.h2
-rw-r--r--libgnomecanvas/gailcanvasgroup.c2
-rw-r--r--libgnomecanvas/gailcanvasgroupfactory.h2
-rw-r--r--libgnomecanvas/gailcanvasitemfactory.h2
-rw-r--r--libgnomecanvas/gailcanvastext.c14
-rw-r--r--libgnomecanvas/gailcanvastextfactory.h2
-rw-r--r--libgnomecanvas/gailcanvaswidgetfactory.h2
-rw-r--r--libgnomecanvas/gnome-canvas-bpath.c6
-rw-r--r--libgnomecanvas/gnome-canvas-line.c2
-rw-r--r--libgnomecanvas/gnome-canvas-pixbuf.c20
-rw-r--r--libgnomecanvas/gnome-canvas-polygon.c10
-rw-r--r--libgnomecanvas/gnome-canvas-rect-ellipse.c26
-rw-r--r--libgnomecanvas/gnome-canvas-rich-text.c780
-rw-r--r--libgnomecanvas/gnome-canvas-rich-text.h12
-rw-r--r--libgnomecanvas/gnome-canvas-text.c8
-rw-r--r--libgnomecanvas/gnome-canvas.c8
-rw-r--r--mail/em-folder-tree-model.h36
-rw-r--r--mail/importers/evolution-mbox-importer.c53
-rw-r--r--mail/mail-send-recv.c111
-rw-r--r--modules/addressbook/addressbook-config.c276
-rw-r--r--modules/addressbook/e-book-shell-content.h3
-rw-r--r--modules/addressbook/e-book-shell-sidebar.h3
-rw-r--r--modules/addressbook/openldap-extract.h530
-rw-r--r--modules/calendar/e-cal-shell-migrate.c11
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c4
-rw-r--r--modules/calendar/e-memo-shell-content.h3
-rw-r--r--modules/calendar/e-memo-shell-migrate.c10
-rw-r--r--modules/calendar/e-memo-shell-sidebar.h3
-rw-r--r--modules/calendar/e-task-shell-content.h3
-rw-r--r--modules/calendar/e-task-shell-sidebar.h3
-rw-r--r--modules/mail/e-mail-shell-backend.h2
-rw-r--r--modules/mail/e-mail-shell-content.h3
-rw-r--r--modules/mail/e-mail-shell-sidebar.h3
-rw-r--r--modules/mail/em-composer-prefs.c4
-rw-r--r--modules/mail/em-mailer-prefs.c28
-rw-r--r--modules/mail/em-network-prefs.c36
-rw-r--r--modules/plugin-mono/e-plugin-mono.c2
-rw-r--r--modules/plugin-python/e-plugin-python.c2
-rw-r--r--modules/windows-sens/evolution-windows-sens.c46
-rw-r--r--shell/e-shell-meego.c2
-rw-r--r--shell/e-shell-searchbar.h3
-rw-r--r--shell/e-shell-sidebar.h6
-rw-r--r--shell/e-shell-window.h3
-rw-r--r--shell/es-event.c50
-rw-r--r--shell/main.c14
-rw-r--r--smime/lib/e-cert-trust.c529
-rw-r--r--widgets/misc/e-account-manager.h3
-rw-r--r--widgets/misc/e-account-tree-view.h6
-rw-r--r--widgets/misc/e-attachment-button.h6
-rw-r--r--widgets/misc/e-attachment-view.h12
-rw-r--r--widgets/misc/e-calendar-item.c28
-rw-r--r--widgets/misc/e-calendar.c12
-rw-r--r--widgets/misc/e-canvas-background.c4
-rw-r--r--widgets/misc/e-canvas-utils.c50
-rw-r--r--widgets/misc/e-canvas-vbox.c78
-rw-r--r--widgets/misc/e-canvas-vbox.h4
-rw-r--r--widgets/misc/e-canvas.c24
-rw-r--r--widgets/misc/e-dateedit.c34
-rw-r--r--widgets/misc/e-dateedit.h4
-rw-r--r--widgets/misc/e-focus-tracker.h3
-rw-r--r--widgets/misc/e-map.c6
-rw-r--r--widgets/misc/e-popup-menu.c2
-rw-r--r--widgets/misc/e-preferences-window.h7
-rw-r--r--widgets/misc/e-printable.c4
-rw-r--r--widgets/misc/e-searching-tokenizer.c110
-rw-r--r--widgets/misc/e-selection-model-array.c200
-rw-r--r--widgets/misc/e-selection-model-simple.c14
-rw-r--r--widgets/misc/e-selection-model.c76
-rw-r--r--widgets/misc/e-selection-model.h12
-rw-r--r--widgets/misc/e-send-options.c4
-rw-r--r--widgets/misc/e-web-view-preview.c2
-rw-r--r--widgets/misc/e-web-view-preview.h44
-rw-r--r--widgets/misc/e-web-view.h3
-rw-r--r--widgets/misc/ea-calendar-cell.c12
-rw-r--r--widgets/misc/ea-calendar-item.c16
-rw-r--r--widgets/misc/ea-cell-table.c10
-rw-r--r--widgets/misc/test-preferences-window.c2
128 files changed, 2695 insertions, 2525 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index 4f1df719ca..2f752e1229 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -28,17 +28,9 @@
#include "e-contact-editor-fullname.h"
-static void e_contact_editor_fullname_init (EContactEditorFullname *card);
-static void e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass);
-static void e_contact_editor_fullname_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_contact_editor_fullname_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_contact_editor_fullname_dispose (GObject *object);
-
static void fill_in_info(EContactEditorFullname *editor);
static void extract_info(EContactEditorFullname *editor);
-static GtkDialogClass *parent_class = NULL;
-
/* The arguments we take */
enum {
PROP_0,
@@ -46,55 +38,145 @@ enum {
PROP_EDITABLE
};
-GType
-e_contact_editor_fullname_get_type (void)
+G_DEFINE_TYPE (
+ EContactEditorFullname,
+ e_contact_editor_fullname,
+ GTK_TYPE_DIALOG)
+
+static void
+e_contact_editor_fullname_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- static GType contact_editor_fullname_type = 0;
-
- if (!contact_editor_fullname_type) {
- static const GTypeInfo contact_editor_fullname_info = {
- sizeof (EContactEditorFullnameClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_contact_editor_fullname_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EContactEditorFullname),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_contact_editor_fullname_init,
- };
+ EContactEditorFullname *e_contact_editor_fullname;
+
+ e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object);
+
+ switch (property_id) {
+ case PROP_NAME:
+ e_contact_name_free(e_contact_editor_fullname->name);
- contact_editor_fullname_type = g_type_register_static (GTK_TYPE_DIALOG, "EContactEditorFullname", &contact_editor_fullname_info, 0);
+ 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);
+ }
+ else {
+ e_contact_editor_fullname->name = NULL;
+ }
+ break;
+ case PROP_EDITABLE: {
+ gint i;
+ const gchar *widget_names[] = {
+ "comboentry-title",
+ "comboentry-suffix",
+ "entry-first",
+ "entry-middle",
+ "entry-last",
+ "label-title",
+ "label-suffix",
+ "label-first",
+ "label-middle",
+ "label-last",
+ NULL
+ };
+ e_contact_editor_fullname->editable = g_value_get_boolean (value) ? TRUE : FALSE;
+ for (i = 0; widget_names[i] != NULL; i++) {
+ GtkWidget *w = e_builder_get_widget (
+ e_contact_editor_fullname->builder,
+ widget_names[i]);
+ if (GTK_IS_ENTRY (w)) {
+ gtk_editable_set_editable (GTK_EDITABLE (w),
+ e_contact_editor_fullname->editable);
+ }
+ else if (GTK_IS_COMBO_BOX_ENTRY (w)) {
+ gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (w))),
+ e_contact_editor_fullname->editable);
+ gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable);
+ }
+ else if (GTK_IS_LABEL (w)) {
+ gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable);
+ }
+ }
+ break;
}
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+e_contact_editor_fullname_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ EContactEditorFullname *e_contact_editor_fullname;
- return contact_editor_fullname_type;
+ e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (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));
+ break;
+ case PROP_EDITABLE:
+ g_value_set_boolean (value, e_contact_editor_fullname->editable ? TRUE : FALSE);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
}
static void
-e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass)
+e_contact_editor_fullname_dispose (GObject *object)
{
- GObjectClass *object_class;
+ EContactEditorFullname *e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME(object);
+
+ if (e_contact_editor_fullname->builder) {
+ g_object_unref(e_contact_editor_fullname->builder);
+ e_contact_editor_fullname->builder = NULL;
+ }
- object_class = G_OBJECT_CLASS (klass);
+ if (e_contact_editor_fullname->name) {
+ e_contact_name_free(e_contact_editor_fullname->name);
+ e_contact_editor_fullname->name = NULL;
+ }
- parent_class = g_type_class_ref (GTK_TYPE_DIALOG);
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_contact_editor_fullname_parent_class)->dispose (object);
+}
+static void
+e_contact_editor_fullname_class_init (EContactEditorFullnameClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
object_class->set_property = e_contact_editor_fullname_set_property;
object_class->get_property = e_contact_editor_fullname_get_property;
object_class->dispose = e_contact_editor_fullname_dispose;
- g_object_class_install_property (object_class, PROP_NAME,
- g_param_spec_pointer ("name",
- "Name",
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- "Editable",
- NULL,
- FALSE,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_NAME,
+ g_param_spec_pointer (
+ "name",
+ "Name",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_EDITABLE,
+ g_param_spec_boolean (
+ "editable",
+ "Editable",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
}
static void
@@ -151,25 +233,6 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (widget), 0);
}
-static void
-e_contact_editor_fullname_dispose (GObject *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);
- e_contact_editor_fullname->builder = NULL;
- }
-
- if (e_contact_editor_fullname->name) {
- e_contact_name_free(e_contact_editor_fullname->name);
- e_contact_editor_fullname->name = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
GtkWidget*
e_contact_editor_fullname_new (const EContactName *name)
{
@@ -182,87 +245,6 @@ e_contact_editor_fullname_new (const EContactName *name)
}
static void
-e_contact_editor_fullname_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
-{
- EContactEditorFullname *e_contact_editor_fullname;
-
- e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object);
-
- switch (prop_id) {
- case PROP_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);
- }
- else {
- e_contact_editor_fullname->name = NULL;
- }
- break;
- case PROP_EDITABLE: {
- gint i;
- const gchar *widget_names[] = {
- "comboentry-title",
- "comboentry-suffix",
- "entry-first",
- "entry-middle",
- "entry-last",
- "label-title",
- "label-suffix",
- "label-first",
- "label-middle",
- "label-last",
- NULL
- };
- e_contact_editor_fullname->editable = g_value_get_boolean (value) ? TRUE : FALSE;
- for (i = 0; widget_names[i] != NULL; i++) {
- GtkWidget *w = e_builder_get_widget(e_contact_editor_fullname->builder, widget_names[i]);
- if (GTK_IS_ENTRY (w)) {
- gtk_editable_set_editable (GTK_EDITABLE (w),
- e_contact_editor_fullname->editable);
- }
- else if (GTK_IS_COMBO_BOX_ENTRY (w)) {
- gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (w))),
- e_contact_editor_fullname->editable);
- gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable);
- }
- else if (GTK_IS_LABEL (w)) {
- gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable);
- }
- }
- break;
- }
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_contact_editor_fullname_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
-{
- EContactEditorFullname *e_contact_editor_fullname;
-
- e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object);
-
- switch (prop_id) {
- case PROP_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);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
fill_in_field (EContactEditorFullname *editor,
const gchar *field,
const gchar *string)
diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
index 919e946152..057266c707 100644
--- a/composer/e-composer-name-header.c
+++ b/composer/e-composer-name-header.c
@@ -311,7 +311,8 @@ e_composer_name_header_get_destinations (EComposerNameHeader *header)
g_list_free (list);
- return destinations; /* free with e_destination_freev() */
+ /* free with e_destination_freev() */
+ return destinations;
}
void
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 85b51c0356..8d1408956d 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -125,10 +125,9 @@ struct _EMsgComposerPrivate {
gboolean is_from_message;
/* The mail composed has been sent. This bit will be set when
- the mail passed sanity checking and is sent out, which
- indicates that the composer can be destroyed. This bit can
- be set/get by using API
- e_msg_composer_{set,get}_mail_sent(). */
+ * the mail passed sanity checking and is sent out, which
+ * indicates that the composer can be destroyed. This bit can
+ * be set/get by using API e_msg_composer_{set,get}_mail_sent (). */
gboolean mail_sent;
};
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 821b063e62..9c80a193b9 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -153,8 +153,8 @@ emcu_part_to_html (CamelMimePart *part, gssize *len, EMFormat *source)
em_format_set_default_charset (
(EMFormat *) emfq, source->charset);
}
- em_format_part((EMFormat *) emfq, (CamelStream *)mem, part);
- g_object_unref(emfq);
+ em_format_part ((EMFormat *) emfq, (CamelStream *)mem, part);
+ g_object_unref (emfq);
camel_stream_write((CamelStream *) mem, "", 1, NULL);
g_object_unref (mem);
@@ -180,21 +180,21 @@ emcu_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, .
EAlert *alert = NULL;
if (promptkey
- && !gconf_client_get_bool(gconf, promptkey, NULL)) {
+ && !gconf_client_get_bool (gconf, promptkey, NULL)) {
g_object_unref (gconf);
return TRUE;
}
- 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 = (GtkDialog*) 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 (mbox);
gtk_box_pack_start (GTK_BOX (container), check, TRUE, TRUE, 0);
gtk_widget_show (check);
@@ -207,7 +207,7 @@ emcu_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, .
!gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (check)), NULL);
- gtk_widget_destroy((GtkWidget*) mbox);
+ gtk_widget_destroy ((GtkWidget*) mbox);
g_object_unref (gconf);
return button == GTK_RESPONSE_YES;
@@ -221,10 +221,10 @@ emcu_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;
}
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 92368a4384..5b44e74ca2 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -77,7 +77,8 @@ EMsgComposer * e_msg_composer_new_from_url (EShell *shell,
EMsgComposer * e_msg_composer_new_redirect (EShell *shell,
CamelMimeMessage *message,
const gchar *resent_from);
-EFocusTracker * e_msg_composer_get_focus_tracker(EMsgComposer *composer);
+EFocusTracker * e_msg_composer_get_focus_tracker
+ (EMsgComposer *composer);
CamelSession * e_msg_composer_get_session (EMsgComposer *composer);
EShell * e_msg_composer_get_shell (EMsgComposer *composer);
@@ -115,10 +116,12 @@ CamelMimeMessage *
e_msg_composer_get_message (EMsgComposer *composer,
gboolean save_html_object_data);
CamelMimeMessage *
- e_msg_composer_get_message_print(EMsgComposer *composer,
+ e_msg_composer_get_message_print
+ (EMsgComposer *composer,
gboolean save_html_object_data);
CamelMimeMessage *
- e_msg_composer_get_message_draft(EMsgComposer *composer);
+ e_msg_composer_get_message_draft
+ (EMsgComposer *composer);
void e_msg_composer_show_sig_file (EMsgComposer *composer);
CamelInternetAddress *
diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c
index cb2dabf74e..ac8df00e0c 100644
--- a/e-util/e-alert-dialog.c
+++ b/e-util/e-alert-dialog.c
@@ -102,7 +102,7 @@ e_alert_dialog_dispose (GObject *object)
}
static void
-dialog_response_cb(GtkWidget *w, guint button, gpointer user_data)
+dialog_response_cb (GtkWidget *w, guint button, gpointer user_data)
{
EAlertDialogPrivate *priv = ALERT_DIALOG_PRIVATE (w);
@@ -138,7 +138,7 @@ e_alert_dialog_constructed (GObject *obj)
action_area = gtk_dialog_get_action_area ((GtkDialog*) self);
content_area = gtk_dialog_get_content_area ((GtkDialog*) self);
- gtk_dialog_set_has_separator((GtkDialog*) self, FALSE);
+ gtk_dialog_set_has_separator ((GtkDialog*) self, FALSE);
gtk_widget_ensure_style ((GtkWidget *)self);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 12);
@@ -152,17 +152,17 @@ e_alert_dialog_constructed (GObject *obj)
"This is no longer legal, please fix it.", G_STRFUNC);
if (e_alert_get_flags (alert) & GTK_DIALOG_MODAL)
- gtk_window_set_modal((GtkWindow *)self, TRUE);
- gtk_window_set_destroy_with_parent((GtkWindow *)self, TRUE);
+ gtk_window_set_modal ((GtkWindow *)self, TRUE);
+ gtk_window_set_destroy_with_parent ((GtkWindow *)self, TRUE);
if (e_alert_peek_help_uri (alert)) {
- gtk_dialog_add_button((GtkDialog*) self, GTK_STOCK_HELP, GTK_RESPONSE_HELP);
+ gtk_dialog_add_button ((GtkDialog*) self, GTK_STOCK_HELP, GTK_RESPONSE_HELP);
g_signal_connect(self, "response", G_CALLBACK(dialog_response_cb), NULL);
}
b = e_alert_peek_buttons (alert);
if (b == NULL) {
- gtk_dialog_add_button((GtkDialog*) self, GTK_STOCK_OK, GTK_RESPONSE_OK);
+ gtk_dialog_add_button ((GtkDialog*) self, GTK_STOCK_OK, GTK_RESPONSE_OK);
} else {
for (; b; b=b->next) {
if (b->stock) {
@@ -171,33 +171,33 @@ e_alert_dialog_constructed (GObject *obj)
/* FIXME: So although this looks like it will work, it wont.
Need to do it the hard way ... it also breaks the
default_response stuff */
- w = gtk_button_new_from_stock(b->stock);
- gtk_button_set_label((GtkButton *)w, b->label);
- gtk_widget_show(w);
- gtk_dialog_add_action_widget(self, w, b->response);
+ w = gtk_button_new_from_stock (b->stock);
+ gtk_button_set_label ((GtkButton *)w, b->label);
+ gtk_widget_show (w);
+ gtk_dialog_add_action_widget (self, w, b->response);
#endif
- gtk_dialog_add_button((GtkDialog*) self, b->label, b->response);
+ gtk_dialog_add_button ((GtkDialog*) self, b->label, b->response);
} else
- gtk_dialog_add_button((GtkDialog*) self, b->stock, b->response);
+ gtk_dialog_add_button ((GtkDialog*) self, b->stock, b->response);
} else
- gtk_dialog_add_button((GtkDialog*) self, b->label, b->response);
+ gtk_dialog_add_button ((GtkDialog*) self, b->label, b->response);
}
}
if (e_alert_get_default_response (alert))
- gtk_dialog_set_default_response((GtkDialog*) self,
+ gtk_dialog_set_default_response ((GtkDialog*) self,
e_alert_get_default_response (alert));
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_container_set_border_width((GtkContainer *)hbox, 12);
+ hbox = gtk_hbox_new (FALSE, 0);
+ gtk_container_set_border_width ((GtkContainer *)hbox, 12);
w = gtk_image_new_from_stock
(e_alert_peek_stock_image (alert), GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.0);
- gtk_box_pack_start((GtkBox *)hbox, w, FALSE, FALSE, 12);
+ gtk_misc_set_alignment ((GtkMisc *)w, 0.0, 0.0);
+ gtk_box_pack_start ((GtkBox *)hbox, w, FALSE, FALSE, 12);
title = e_alert_get_title (alert, FALSE);
- gtk_window_set_title((GtkWindow *)self, title);
+ gtk_window_set_title ((GtkWindow *)self, title);
out = g_string_new ("");
primary = e_alert_get_primary_text (alert, TRUE);
@@ -222,20 +222,20 @@ e_alert_dialog_constructed (GObject *obj)
GTK_SCROLLED_WINDOW (scroll),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
}
- w = gtk_label_new(NULL);
- gtk_label_set_selectable((GtkLabel *)w, TRUE);
- gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
- gtk_label_set_markup((GtkLabel *)w, out->str);
+ w = gtk_label_new (NULL);
+ gtk_label_set_selectable ((GtkLabel *)w, TRUE);
+ gtk_label_set_line_wrap ((GtkLabel *)w, TRUE);
+ gtk_label_set_markup ((GtkLabel *)w, out->str);
gtk_widget_set_can_focus (w, FALSE);
- g_string_free(out, TRUE);
+ g_string_free (out, TRUE);
if (e_alert_get_scroll (alert)) {
gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *)scroll, w);
- gtk_box_pack_start((GtkBox *)hbox, scroll, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)hbox, scroll, FALSE, FALSE, 0);
gtk_window_set_default_size ((GtkWindow *)self, 360, 180);
} else
- gtk_box_pack_start((GtkBox *)hbox, w, TRUE, TRUE, 0);
+ gtk_box_pack_start ((GtkBox *)hbox, w, TRUE, TRUE, 0);
- gtk_widget_show_all(hbox);
+ gtk_widget_show_all (hbox);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
}
@@ -288,9 +288,9 @@ e_alert_dialog_new_for_args (GtkWindow *parent, const gchar *tag, ...)
EAlert *e;
va_list ap;
- va_start(ap, tag);
- e = e_alert_new_valist(tag, ap);
- va_end(ap);
+ va_start (ap, tag);
+ e = e_alert_new_valist (tag, ap);
+ va_end (ap);
d = e_alert_dialog_new (parent, e);
g_object_unref (e);
@@ -299,15 +299,15 @@ e_alert_dialog_new_for_args (GtkWindow *parent, const gchar *tag, ...)
}
gint
-e_alert_run_dialog(GtkWindow *parent, EAlert *alert)
+e_alert_run_dialog (GtkWindow *parent, EAlert *alert)
{
GtkWidget *dialog;
gint res;
dialog = e_alert_dialog_new (parent, alert);
- res = gtk_dialog_run((GtkDialog *)dialog);
- gtk_widget_destroy(dialog);
+ res = gtk_dialog_run ((GtkDialog *)dialog);
+ gtk_widget_destroy (dialog);
return res;
}
@@ -319,9 +319,9 @@ e_alert_run_dialog_for_args (GtkWindow *parent, const gchar *tag, ...)
va_list ap;
gint response;
- va_start(ap, tag);
- e = e_alert_new_valist(tag, ap);
- va_end(ap);
+ va_start (ap, tag);
+ e = e_alert_new_valist (tag, ap);
+ va_end (ap);
response = e_alert_run_dialog (parent, e);
g_object_unref (e);
diff --git a/e-util/e-alert-dialog.h b/e-util/e-alert-dialog.h
index 2be298e8dc..54235a757b 100644
--- a/e-util/e-alert-dialog.h
+++ b/e-util/e-alert-dialog.h
@@ -72,7 +72,7 @@ GtkWidget* e_alert_dialog_new (GtkWindow* parent, EAlert *alert);
GtkWidget* e_alert_dialog_new_for_args (GtkWindow* parent, const gchar *tag, ...) G_GNUC_NULL_TERMINATED;
/* Convenience functions for displaying the alert in a GtkDialog */
-gint e_alert_run_dialog(GtkWindow *parent, EAlert *alert);
+gint e_alert_run_dialog (GtkWindow *parent, EAlert *alert);
gint e_alert_run_dialog_for_args (GtkWindow *parent, const gchar *tag, ...) G_GNUC_NULL_TERMINATED;
guint e_alert_dialog_count_buttons (EAlertDialog *dialog);
diff --git a/e-util/e-alert.c b/e-util/e-alert.c
index 9ca0c02df3..aebee8326a 100644
--- a/e-util/e-alert.c
+++ b/e-util/e-alert.c
@@ -101,12 +101,12 @@ static struct {
};
static gint
-map_response(const gchar *name)
+map_response (const gchar *name)
{
gint i;
for (i = 0; i < G_N_ELEMENTS (response_map); i++)
- if (!strcmp(name, response_map[i].name))
+ if (!strcmp (name, response_map[i].name))
return response_map[i].id;
return 0;
@@ -123,13 +123,13 @@ static struct {
};
static gint
-map_type(const gchar *name)
+map_type (const gchar *name)
{
gint i;
if (name) {
for (i = 0; i < G_N_ELEMENTS (type_map); i++)
- if (!strcmp(name, type_map[i].name))
+ if (!strcmp (name, type_map[i].name))
return i;
}
@@ -176,7 +176,7 @@ struct _EAlertPrivate
*/
static void
-e_alert_load(const gchar *path)
+e_alert_load (const gchar *path)
{
xmlDocPtr doc = NULL;
xmlNodePtr root, error, scan;
@@ -193,38 +193,38 @@ e_alert_load(const gchar *path)
return;
}
- root = xmlDocGetRootElement(doc);
+ root = xmlDocGetRootElement (doc);
if (root == NULL
|| strcmp((gchar *)root->name, "error-list") != 0
|| (tmp = (gchar *)xmlGetProp(root, (const guchar *)"domain")) == NULL) {
g_warning("Error file '%s' invalid format", path);
- xmlFreeDoc(doc);
+ xmlFreeDoc (doc);
return;
}
- table = g_hash_table_lookup(alert_table, tmp);
+ table = g_hash_table_lookup (alert_table, tmp);
if (table == NULL) {
gchar *tmp2;
- table = g_malloc0(sizeof(*table));
- table->domain = g_strdup(tmp);
- table->alerts = g_hash_table_new(g_str_hash, g_str_equal);
- g_hash_table_insert(alert_table, (gpointer) table->domain, table);
+ table = g_malloc0 (sizeof (*table));
+ table->domain = g_strdup (tmp);
+ table->alerts = g_hash_table_new (g_str_hash, g_str_equal);
+ g_hash_table_insert (alert_table, (gpointer) table->domain, table);
tmp2 = (gchar *)xmlGetProp(root, (const guchar *)"translation-domain");
if (tmp2) {
- table->translation_domain = g_strdup(tmp2);
- xmlFree(tmp2);
+ table->translation_domain = g_strdup (tmp2);
+ xmlFree (tmp2);
tmp2 = (gchar *)xmlGetProp(root, (const guchar *)"translation-localedir");
if (tmp2) {
- bindtextdomain(table->translation_domain, tmp2);
- xmlFree(tmp2);
+ bindtextdomain (table->translation_domain, tmp2);
+ xmlFree (tmp2);
}
}
} else
g_warning("Error file '%s', domain '%s' already used, merging", path, tmp);
- xmlFree(tmp);
+ xmlFree (tmp);
for (error = root->children;error;error = error->next) {
if (!strcmp((gchar *)error->name, "error")) {
@@ -232,89 +232,89 @@ e_alert_load(const gchar *path)
if (tmp == NULL)
continue;
- e = g_malloc0(sizeof(*e));
- e->id = g_strdup(tmp);
+ e = g_malloc0 (sizeof (*e));
+ e->id = g_strdup (tmp);
e->scroll = FALSE;
- xmlFree(tmp);
+ xmlFree (tmp);
lastbutton = (struct _e_alert_button *)&e->buttons;
tmp = (gchar *)xmlGetProp(error, (const guchar *)"modal");
if (tmp) {
if (!strcmp(tmp, "true"))
e->flags |= GTK_DIALOG_MODAL;
- xmlFree(tmp);
+ xmlFree (tmp);
}
tmp = (gchar *)xmlGetProp(error, (const guchar *)"type");
- e->type = map_type(tmp);
+ e->type = map_type (tmp);
if (tmp)
- xmlFree(tmp);
+ xmlFree (tmp);
tmp = (gchar *)xmlGetProp(error, (const guchar *)"default");
if (tmp) {
- e->default_response = map_response(tmp);
- xmlFree(tmp);
+ e->default_response = map_response (tmp);
+ xmlFree (tmp);
}
tmp = (gchar *)xmlGetProp(error, (const guchar *)"scroll");
if (tmp) {
if (!strcmp(tmp, "yes"))
e->scroll = TRUE;
- xmlFree(tmp);
+ xmlFree (tmp);
}
for (scan = error->children;scan;scan=scan->next) {
if (!strcmp((gchar *)scan->name, "primary")) {
- if ((tmp = (gchar *)xmlNodeGetContent(scan))) {
- e->primary = g_strdup(dgettext(table->translation_domain, tmp));
- xmlFree(tmp);
+ if ((tmp = (gchar *)xmlNodeGetContent (scan))) {
+ e->primary = g_strdup (dgettext (table->translation_domain, tmp));
+ xmlFree (tmp);
}
} else if (!strcmp((gchar *)scan->name, "secondary")) {
- if ((tmp = (gchar *)xmlNodeGetContent(scan))) {
- e->secondary = g_strdup(dgettext(table->translation_domain, tmp));
- xmlFree(tmp);
+ if ((tmp = (gchar *)xmlNodeGetContent (scan))) {
+ e->secondary = g_strdup (dgettext (table->translation_domain, tmp));
+ xmlFree (tmp);
}
} else if (!strcmp((gchar *)scan->name, "title")) {
- if ((tmp = (gchar *)xmlNodeGetContent(scan))) {
- e->title = g_strdup(dgettext(table->translation_domain, tmp));
- xmlFree(tmp);
+ if ((tmp = (gchar *)xmlNodeGetContent (scan))) {
+ e->title = g_strdup (dgettext (table->translation_domain, tmp));
+ xmlFree (tmp);
}
} else if (!strcmp((gchar *)scan->name, "help")) {
tmp = (gchar *)xmlGetProp(scan, (const guchar *)"uri");
if (tmp) {
- e->help_uri = g_strdup(tmp);
- xmlFree(tmp);
+ e->help_uri = g_strdup (tmp);
+ xmlFree (tmp);
}
} else if (!strcmp((gchar *)scan->name, "button")) {
struct _e_alert_button *b;
gchar *label = NULL;
gchar *stock = NULL;
- b = g_malloc0(sizeof(*b));
+ b = g_malloc0 (sizeof (*b));
tmp = (gchar *)xmlGetProp(scan, (const guchar *)"stock");
if (tmp) {
- stock = g_strdup(tmp);
+ stock = g_strdup (tmp);
b->stock = stock;
- xmlFree(tmp);
+ xmlFree (tmp);
}
tmp = (gchar *)xmlGetProp(scan, (const guchar *)"label");
if (tmp) {
- label = g_strdup(dgettext(table->translation_domain, tmp));
+ label = g_strdup (dgettext (table->translation_domain, tmp));
b->label = label;
- xmlFree(tmp);
+ xmlFree (tmp);
}
tmp = (gchar *)xmlGetProp(scan, (const guchar *)"response");
if (tmp) {
- b->response = map_response(tmp);
- xmlFree(tmp);
+ b->response = map_response (tmp);
+ xmlFree (tmp);
}
if (stock == NULL && label == NULL) {
g_warning("Error file '%s': missing button details in error '%s'", path, e->id);
- g_free(stock);
- g_free(label);
- g_free(b);
+ g_free (stock);
+ g_free (label);
+ g_free (b);
} else {
lastbutton->next = b;
lastbutton = b;
@@ -322,15 +322,15 @@ e_alert_load(const gchar *path)
}
}
- g_hash_table_insert(table->alerts, (gpointer) e->id, e);
+ g_hash_table_insert (table->alerts, (gpointer) e->id, e);
}
}
- xmlFreeDoc(doc);
+ xmlFreeDoc (doc);
}
static void
-e_alert_load_tables(void)
+e_alert_load_tables (void)
{
GDir *dir;
const gchar *d;
@@ -341,38 +341,38 @@ e_alert_load_tables(void)
if (alert_table != NULL)
return;
- alert_table = g_hash_table_new(g_str_hash, g_str_equal);
+ alert_table = g_hash_table_new (g_str_hash, g_str_equal);
/* setup system alert types */
- table = g_malloc0(sizeof(*table));
+ table = g_malloc0 (sizeof (*table));
table->domain = "builtin";
- table->alerts = g_hash_table_new(g_str_hash, g_str_equal);
+ table->alerts = g_hash_table_new (g_str_hash, g_str_equal);
for (i = 0; i < G_N_ELEMENTS (default_alerts); i++)
g_hash_table_insert (
table->alerts, (gpointer)
default_alerts[i].id, &default_alerts[i]);
- g_hash_table_insert(alert_table, (gpointer) table->domain, table);
+ g_hash_table_insert (alert_table, (gpointer) table->domain, table);
/* look for installed alert tables */
base = g_build_filename (EVOLUTION_PRIVDATADIR, "errors", NULL);
- dir = g_dir_open(base, 0, NULL);
+ dir = g_dir_open (base, 0, NULL);
if (dir == NULL) {
g_free (base);
return;
}
- while ((d = g_dir_read_name(dir))) {
+ while ((d = g_dir_read_name (dir))) {
gchar *path;
if (d[0] == '.')
continue;
- path = g_build_filename(base, d, NULL);
- e_alert_load(path);
- g_free(path);
+ path = g_build_filename (base, d, NULL);
+ e_alert_load (path);
+ g_free (path);
}
- g_dir_close(dir);
+ g_dir_close (dir);
g_free (base);
}
@@ -445,18 +445,18 @@ e_alert_constructed (GObject *obj)
g_return_if_fail (alert_table);
g_return_if_fail (alert->priv->tag);
- domain = g_alloca(strlen(alert->priv->tag)+1);
- strcpy(domain, alert->priv->tag);
- id = strchr(domain, ':');
+ domain = g_alloca (strlen (alert->priv->tag)+1);
+ strcpy (domain, alert->priv->tag);
+ id = strchr (domain, ':');
if (id)
*id++ = 0;
- table = g_hash_table_lookup(alert_table, domain);
+ table = g_hash_table_lookup (alert_table, domain);
g_return_if_fail (table);
- alert->priv->definition = g_hash_table_lookup(table->alerts, id);
+ alert->priv->definition = g_hash_table_lookup (table->alerts, id);
- g_warn_if_fail(alert->priv->definition);
+ g_warn_if_fail (alert->priv->definition);
}
@@ -514,35 +514,35 @@ e_alert_init (EAlert *self)
* Returns: a new #EAlert
**/
EAlert *
-e_alert_new(const gchar *tag, ...)
+e_alert_new (const gchar *tag, ...)
{
EAlert *e;
va_list ap;
- va_start(ap, tag);
- e = e_alert_new_valist(tag, ap);
- va_end(ap);
+ va_start (ap, tag);
+ e = e_alert_new_valist (tag, ap);
+ va_end (ap);
return e;
}
EAlert *
-e_alert_new_valist(const gchar *tag, va_list ap)
+e_alert_new_valist (const gchar *tag, va_list ap)
{
gchar *tmp;
GPtrArray *args = g_ptr_array_new_with_free_func (g_free);
tmp = va_arg (ap, gchar *);
while (tmp) {
- g_ptr_array_add(args, g_strdup (tmp));
- tmp = va_arg(ap, gchar *);
+ g_ptr_array_add (args, g_strdup (tmp));
+ tmp = va_arg (ap, gchar *);
}
return e_alert_new_array (tag, args);
}
EAlert *
-e_alert_new_array(const gchar *tag, GPtrArray *args)
+e_alert_new_array (const gchar *tag, GPtrArray *args)
{
return g_object_new (E_TYPE_ALERT, "tag", tag, "args", args, NULL);
}
@@ -568,21 +568,21 @@ e_alert_format_string (GString *out,
gint id;
while (fmt
- && (newstart = strchr(fmt, '{'))
- && (end = strchr(newstart+1, '}'))) {
- g_string_append_len(out, fmt, newstart-fmt);
- id = atoi(newstart+1);
+ && (newstart = strchr (fmt, '{'))
+ && (end = strchr (newstart+1, '}'))) {
+ g_string_append_len (out, fmt, newstart-fmt);
+ id = atoi (newstart+1);
if (id < args->len) {
if (escape_args)
- e_alert_append_text_escaped(out, args->pdata[id]);
+ e_alert_append_text_escaped (out, args->pdata[id]);
else
- g_string_append(out, args->pdata[id]);
+ g_string_append (out, args->pdata[id]);
} else
g_warning("Error references argument %d not supplied by caller", id);
fmt = end+1;
}
- g_string_append(out, fmt);
+ g_string_append (out, fmt);
}
guint32
@@ -647,7 +647,7 @@ e_alert_get_primary_text (EAlert *alert,
g_free (title);
}
else {
- g_string_append_printf(
+ g_string_append_printf (
formatted,
_("Internal error, unknown error '%s' requested"),
alert->priv->tag);
diff --git a/e-util/e-alert.h b/e-util/e-alert.h
index 66a0cb9c23..04b9e120ef 100644
--- a/e-util/e-alert.h
+++ b/e-util/e-alert.h
@@ -97,9 +97,9 @@ struct _EAlertClass
GType e_alert_get_type (void);
-EAlert *e_alert_new(const gchar *tag, ...) G_GNUC_NULL_TERMINATED;
-EAlert *e_alert_new_valist(const gchar *tag, va_list ap);
-EAlert *e_alert_new_array(const gchar *tag, GPtrArray *args);
+EAlert *e_alert_new (const gchar *tag, ...) G_GNUC_NULL_TERMINATED;
+EAlert *e_alert_new_valist (const gchar *tag, va_list ap);
+EAlert *e_alert_new_array (const gchar *tag, GPtrArray *args);
guint32 e_alert_get_flags (EAlert *alert);
const gchar *e_alert_peek_stock_image (EAlert *alert);
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
index 785ee45273..842361d0f2 100644
--- a/e-util/e-bit-array.c
+++ b/e-util/e-bit-array.c
@@ -42,19 +42,19 @@ G_DEFINE_TYPE (
G_TYPE_OBJECT)
static void
-e_bit_array_insert_real(EBitArray *eba, gint row)
+e_bit_array_insert_real (EBitArray *eba, gint row)
{
gint box;
gint i;
if (eba->bit_count >= 0) {
/* Add another word if needed. */
if ((eba->bit_count & 0x1f) == 0) {
- eba->data = g_renew(guint32, eba->data, (eba->bit_count >> 5) + 1);
+ eba->data = g_renew (guint32, eba->data, (eba->bit_count >> 5) + 1);
eba->data[eba->bit_count >> 5] = 0;
}
/* The box is the word that our row is in. */
- box = BOX(row);
+ box = BOX (row);
/* Shift all words to the right of our box right one bit. */
for (i = eba->bit_count >> 5; i > box; i--) {
eba->data[i] = (eba->data[i] >> 1) | (eba->data[i - 1] << 31);
@@ -62,14 +62,14 @@ e_bit_array_insert_real(EBitArray *eba, gint row)
/* Shift right half of box one bit to the right. */
eba->data[box] =
- (eba->data[box] & BITMASK_LEFT(row)) |
- ((eba->data[box] & BITMASK_RIGHT(row)) >> 1);
+ (eba->data[box] & BITMASK_LEFT (row)) |
+ ((eba->data[box] & BITMASK_RIGHT (row)) >> 1);
eba->bit_count++;
}
}
static void
-e_bit_array_delete_real(EBitArray *eba, gint row, gboolean move_selection_mode)
+e_bit_array_delete_real (EBitArray *eba, gint row, gboolean move_selection_mode)
{
gint box;
gint i;
@@ -81,12 +81,12 @@ e_bit_array_delete_real(EBitArray *eba, gint row, gboolean move_selection_mode)
last = eba->bit_count >> 5;
/* Build bitmasks for the left and right half of the box */
- bitmask = BITMASK_RIGHT(row) >> 1;
+ bitmask = BITMASK_RIGHT (row) >> 1;
if (move_selection_mode)
- selected = e_bit_array_value_at(eba, row);
+ selected = e_bit_array_value_at (eba, row);
/* Shift right half of box one bit to the left. */
eba->data[box] =
- (eba->data[box] & BITMASK_LEFT(row)) |
+ (eba->data[box] & BITMASK_LEFT (row)) |
((eba->data[box] & bitmask) << 1);
/* Shift all words to the right of our box left one bit. */
@@ -102,7 +102,7 @@ e_bit_array_delete_real(EBitArray *eba, gint row, gboolean move_selection_mode)
eba->bit_count--;
/* Remove the last word if not needed. */
if ((eba->bit_count & 0x1f) == 0) {
- eba->data = g_renew(guint32, eba->data, eba->bit_count >> 5);
+ eba->data = g_renew (guint32, eba->data, eba->bit_count >> 5);
}
if (move_selection_mode && selected && eba->bit_count > 0) {
e_bit_array_select_single_row (eba, row == eba->bit_count ? row - 1 : row);
@@ -112,37 +112,37 @@ e_bit_array_delete_real(EBitArray *eba, gint row, gboolean move_selection_mode)
/* FIXME : Improve efficiency here. */
void
-e_bit_array_delete(EBitArray *eba, gint row, gint count)
+e_bit_array_delete (EBitArray *eba, gint row, gint count)
{
gint i;
for (i = 0; i < count; i++)
- e_bit_array_delete_real(eba, row, FALSE);
+ e_bit_array_delete_real (eba, row, FALSE);
}
/* FIXME : Improve efficiency here. */
void
-e_bit_array_delete_single_mode(EBitArray *eba, gint row, gint count)
+e_bit_array_delete_single_mode (EBitArray *eba, gint row, gint count)
{
gint i;
for (i = 0; i < count; i++)
- e_bit_array_delete_real(eba, row, TRUE);
+ e_bit_array_delete_real (eba, row, TRUE);
}
/* FIXME : Improve efficiency here. */
void
-e_bit_array_insert(EBitArray *eba, gint row, gint count)
+e_bit_array_insert (EBitArray *eba, gint row, gint count)
{
gint i;
for (i = 0; i < count; i++)
- e_bit_array_insert_real(eba, row);
+ e_bit_array_insert_real (eba, row);
}
/* FIXME: Implement this more efficiently. */
void
-e_bit_array_move_row(EBitArray *eba, gint old_row, gint new_row)
+e_bit_array_move_row (EBitArray *eba, gint old_row, gint new_row)
{
- e_bit_array_delete_real(eba, old_row, FALSE);
- e_bit_array_insert_real(eba, new_row);
+ e_bit_array_delete_real (eba, old_row, FALSE);
+ e_bit_array_insert_real (eba, new_row);
}
static void
@@ -153,7 +153,7 @@ eba_dispose (GObject *object)
eba = E_BIT_ARRAY (object);
if (eba->data)
- g_free(eba->data);
+ g_free (eba->data);
eba->data = NULL;
if (G_OBJECT_CLASS (e_bit_array_parent_class)->dispose)
@@ -176,7 +176,7 @@ e_bit_array_value_at (EBitArray *eba,
if (eba->bit_count < n || eba->bit_count == 0)
return 0;
else
- return (eba->data[BOX(n)] >> OFFSET(n)) & 0x1;
+ return (eba->data[BOX (n)] >> OFFSET (n)) & 0x1;
}
/**
@@ -201,7 +201,7 @@ e_bit_array_foreach (EBitArray *eba,
guint32 value = eba->data[i];
for (j = 0; j < 32; j++) {
if (value & 0x80000000) {
- callback(i * 32 + j, closure);
+ callback (i * 32 + j, closure);
}
value <<= 1;
}
@@ -232,15 +232,15 @@ e_bit_array_selected_count (EBitArray *eba)
count = 0;
- last = BOX(eba->bit_count - 1);
+ last = BOX (eba->bit_count - 1);
for (i = 0; i <= last; i++) {
gint j;
guint32 thiscount = 0;
for (j = 0; j < 8; j++)
- thiscount += PART(eba->data[i], j);
+ thiscount += PART (eba->data[i], j);
for (j = 0; j < 4; j++)
- count += SECTION(thiscount, j);
+ count += SECTION (thiscount, j);
}
return count;
@@ -309,33 +309,33 @@ e_bit_array_bit_count (EBitArray *eba)
(((object)->data[(i)]) &= (mask)))
void
-e_bit_array_change_one_row(EBitArray *eba, gint row, gboolean grow)
+e_bit_array_change_one_row (EBitArray *eba, gint row, gboolean grow)
{
gint i;
- i = BOX(row);
+ i = BOX (row);
- OPERATE(eba, i, ~BITMASK(row), grow);
+ OPERATE (eba, i, ~BITMASK (row), grow);
}
void
-e_bit_array_change_range(EBitArray *eba, gint start, gint end, gboolean grow)
+e_bit_array_change_range (EBitArray *eba, gint start, gint end, gboolean grow)
{
gint i, last;
if (start != end) {
- i = BOX(start);
- last = BOX(end);
+ i = BOX (start);
+ last = BOX (end);
if (i == last) {
- OPERATE(eba, i, BITMASK_LEFT(start) | BITMASK_RIGHT(end), grow);
+ OPERATE (eba, i, BITMASK_LEFT (start) | BITMASK_RIGHT (end), grow);
} else {
- OPERATE(eba, i, BITMASK_LEFT(start), grow);
+ OPERATE (eba, i, BITMASK_LEFT (start), grow);
if (grow)
for (i++; i < last; i++)
eba->data[i] = ONES;
else
for (i++; i < last; i++)
eba->data[i] = 0;
- OPERATE(eba, i, BITMASK_RIGHT(end), grow);
+ OPERATE (eba, i, BITMASK_RIGHT (end), grow);
}
}
}
@@ -345,11 +345,11 @@ e_bit_array_select_single_row (EBitArray *eba, gint row)
{
gint i;
for (i = 0; i < ((eba->bit_count + 31) / 32); i++) {
- if (!((i == BOX(row) && eba->data[i] == BITMASK(row)) ||
- (i != BOX(row) && eba->data[i] == 0))) {
- g_free(eba->data);
- eba->data = g_new0(guint32, (eba->bit_count + 31) / 32);
- eba->data[BOX(row)] = BITMASK(row);
+ if (!((i == BOX (row) && eba->data[i] == BITMASK (row)) ||
+ (i != BOX (row) && eba->data[i] == 0))) {
+ g_free (eba->data);
+ eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
+ eba->data[BOX (row)] = BITMASK (row);
break;
}
@@ -359,10 +359,10 @@ e_bit_array_select_single_row (EBitArray *eba, gint row)
void
e_bit_array_toggle_single_row (EBitArray *eba, gint row)
{
- if (eba->data[BOX(row)] & BITMASK(row))
- eba->data[BOX(row)] &= ~BITMASK(row);
+ if (eba->data[BOX (row)] & BITMASK (row))
+ eba->data[BOX (row)] &= ~BITMASK (row);
else
- eba->data[BOX(row)] |= BITMASK(row);
+ eba->data[BOX (row)] |= BITMASK (row);
}
static void
@@ -377,7 +377,7 @@ e_bit_array_class_init (EBitArrayClass *klass)
{
GObjectClass *object_class;
- object_class = G_OBJECT_CLASS(klass);
+ object_class = G_OBJECT_CLASS (klass);
object_class->dispose = eba_dispose;
}
@@ -387,6 +387,6 @@ e_bit_array_new (gint count)
{
EBitArray *eba = g_object_new (E_BIT_ARRAY_TYPE, NULL);
eba->bit_count = count;
- eba->data = g_new0(guint32, (eba->bit_count + 31) / 32);
+ eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
return eba;
}
diff --git a/e-util/e-categories-config.c b/e-util/e-categories-config.c
index fb2dc165b8..be169f7284 100644
--- a/e-util/e-categories-config.c
+++ b/e-util/e-categories-config.c
@@ -118,7 +118,7 @@ e_categories_config_open_dialog_for_entry (GtkEntry *entry)
text = gtk_entry_get_text (GTK_ENTRY (entry));
dialog = GTK_DIALOG (e_categories_dialog_new (text));
- gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET (entry))));
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (entry))));
/* run the dialog */
result = gtk_dialog_run (dialog);
diff --git a/e-util/e-config.c b/e-util/e-config.c
index 2b8d948fe5..dd51f8efc7 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -104,7 +104,7 @@ config_finalize (GObject *object)
d(printf("finalising EConfig %p\n", object));
- g_free(emp->id);
+ g_free (emp->id);
link = p->menus;
while (link != NULL) {
@@ -236,11 +236,11 @@ e_config_construct (EConfig *ep, gint type, const gchar *id)
* TODO: perhaps commit and abort should just be signals.
**/
void
-e_config_add_items(EConfig *ec, GSList *items, EConfigItemsFunc commitfunc, EConfigItemsFunc abortfunc, EConfigItemsFunc freefunc, gpointer data)
+e_config_add_items (EConfig *ec, GSList *items, EConfigItemsFunc commitfunc, EConfigItemsFunc abortfunc, EConfigItemsFunc freefunc, gpointer data)
{
struct _menu_node *node;
- node = g_malloc(sizeof(*node));
+ node = g_malloc (sizeof (*node));
node->menu = items;
node->commit = commitfunc;
node->abort = abortfunc;
@@ -269,12 +269,12 @@ e_config_add_items(EConfig *ec, GSList *items, EConfigItemsFunc commitfunc, ECon
* the assistant to continue or the notebook to close.
**/
void
-e_config_add_page_check(EConfig *ec, const gchar *pageid, EConfigCheckFunc check, gpointer data)
+e_config_add_page_check (EConfig *ec, const gchar *pageid, EConfigCheckFunc check, gpointer data)
{
struct _check_node *cn;
- cn = g_malloc0(sizeof(*cn));
- cn->pageid = g_strdup(pageid);
+ cn = g_malloc0 (sizeof (*cn));
+ cn->pageid = g_strdup (pageid);
cn->check = check;
cn->data = data;
@@ -346,12 +346,12 @@ ec_add_static_items (EConfig *config)
}
static gint
-ep_cmp(gconstpointer ap, gconstpointer bp)
+ep_cmp (gconstpointer ap, gconstpointer bp)
{
struct _widget_node *a = *((gpointer *)ap);
struct _widget_node *b = *((gpointer *)bp);
- return strcmp(a->item->path, b->item->path);
+ return strcmp (a->item->path, b->item->path);
}
static GList *
@@ -576,18 +576,18 @@ ec_rebuild (EConfig *emp)
|| item->type == E_CONFIG_SECTION_TABLE)) {
if ((sectionnode->empty = (itemno == 0 || n_visible_widgets == 0))) {
if (sectionnode->real_frame)
- gtk_widget_hide(sectionnode->real_frame);
+ gtk_widget_hide (sectionnode->real_frame);
if (sectionnode->frame)
- gtk_widget_hide(sectionnode->frame);
+ gtk_widget_hide (sectionnode->frame);
sectionno--;
} else {
if (sectionnode->real_frame)
- gtk_widget_show(sectionnode->real_frame);
+ gtk_widget_show (sectionnode->real_frame);
if (sectionnode->frame)
- gtk_widget_show(sectionnode->frame);
+ gtk_widget_show (sectionnode->frame);
}
d(printf("%s section '%s' [sections=%d]\n", sectionnode->empty?"hiding":"showing", sectionnode->item->path, sectionno));
@@ -601,10 +601,10 @@ ec_rebuild (EConfig *emp)
|| item->type == E_CONFIG_PAGE_FINISH
|| item->type == E_CONFIG_PAGE_PROGRESS)) {
if ((pagenode->empty = sectionno == 0)) {
- gtk_widget_hide(pagenode->frame);
+ gtk_widget_hide (pagenode->frame);
pageno--;
} else
- gtk_widget_show(pagenode->frame);
+ gtk_widget_show (pagenode->frame);
d(printf("%s page '%s' [section=%d]\n", pagenode->empty?"hiding":"showing", pagenode->item->path, pageno));
}
@@ -628,14 +628,14 @@ ec_rebuild (EConfig *emp)
break;
}
if (item->factory) {
- root = item->factory(emp, item, NULL, wn->widget, wn->context->data);
+ root = item->factory (emp, item, NULL, wn->widget, wn->context->data);
} else if (item->type == E_CONFIG_BOOK) {
- root = gtk_notebook_new();
+ root = gtk_notebook_new ();
gtk_widget_show (root);
} else if (item->type == E_CONFIG_ASSISTANT) {
root = gtk_assistant_new ();
} else
- abort();
+ abort ();
if (item->type == E_CONFIG_ASSISTANT) {
g_signal_connect_swapped (
@@ -689,7 +689,7 @@ ec_rebuild (EConfig *emp)
if (wn->widget == NULL) {
if (item->factory) {
- page = item->factory(emp, item, root, wn->frame, wn->context->data);
+ page = item->factory (emp, item, root, wn->frame, wn->context->data);
} else {
page = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (page), 12);
@@ -757,13 +757,13 @@ ec_rebuild (EConfig *emp)
}
if (item->factory) {
- page = item->factory(emp, item, root, wn->frame, wn->context->data);
+ page = item->factory (emp, item, root, wn->frame, wn->context->data);
if (emp->type == E_CONFIG_ASSISTANT) {
wn->frame = page;
} else {
wn->frame = page;
if (page)
- gtk_notebook_reorder_child((GtkNotebook *)book, page, pageno);
+ gtk_notebook_reorder_child ((GtkNotebook *)book, page, pageno);
}
if (page)
sectionno = 1;
@@ -786,11 +786,11 @@ ec_rebuild (EConfig *emp)
wn->frame = page;
} else {
w = gtk_label_new_with_mnemonic (translated_label);
- gtk_widget_show(w);
- page = gtk_vbox_new(FALSE, 12);
- gtk_container_set_border_width((GtkContainer *)page, 12);
- gtk_widget_show(page);
- gtk_notebook_insert_page((GtkNotebook *)book, page, w, pageno);
+ gtk_widget_show (w);
+ page = gtk_vbox_new (FALSE, 12);
+ gtk_container_set_border_width ((GtkContainer *)page, 12);
+ gtk_widget_show (page);
+ gtk_notebook_insert_page ((GtkNotebook *)book, page, w, pageno);
wn->frame = page;
}
} else
@@ -835,7 +835,7 @@ ec_rebuild (EConfig *emp)
*/
EConfigItemSectionFactoryFunc factory = (EConfigItemSectionFactoryFunc) item->factory;
- section = factory(emp, item, page, wn->widget, wn->context->data, &wn->real_frame);
+ section = factory (emp, item, page, wn->widget, wn->context->data, &wn->real_frame);
wn->frame = section;
if (section)
itemno = 1;
@@ -854,8 +854,8 @@ ec_rebuild (EConfig *emp)
}
if (section
- && ((item->type == E_CONFIG_SECTION && !GTK_IS_BOX(section))
- || (item->type == E_CONFIG_SECTION_TABLE && !GTK_IS_TABLE(section))))
+ && ((item->type == E_CONFIG_SECTION && !GTK_IS_BOX (section))
+ || (item->type == E_CONFIG_SECTION_TABLE && !GTK_IS_TABLE (section))))
g_warning("EConfig section type is wrong");
} else {
GtkWidget *frame;
@@ -863,7 +863,7 @@ ec_rebuild (EConfig *emp)
if (wn->frame) {
d(printf("Item %s, clearing generated section widget\n", wn->item->path));
- gtk_widget_destroy(wn->frame);
+ gtk_widget_destroy (wn->frame);
wn->widget = NULL;
wn->frame = NULL;
}
@@ -871,22 +871,22 @@ ec_rebuild (EConfig *emp)
if (translated_label != NULL) {
gchar *txt = g_markup_printf_escaped("<span weight=\"bold\">%s</span>", translated_label);
- label = g_object_new(gtk_label_get_type(),
+ label = g_object_new (gtk_label_get_type (),
"label", txt,
"use_markup", TRUE,
"xalign", 0.0, NULL);
- g_free(txt);
+ g_free (txt);
}
if (item->type == E_CONFIG_SECTION)
- section = gtk_vbox_new(FALSE, 6);
+ section = gtk_vbox_new (FALSE, 6);
else {
- section = gtk_table_new(1, 1, FALSE);
- gtk_table_set_col_spacings((GtkTable *)section, 6);
- gtk_table_set_row_spacings((GtkTable *)section, 6);
+ section = gtk_table_new (1, 1, FALSE);
+ gtk_table_set_col_spacings ((GtkTable *)section, 6);
+ gtk_table_set_row_spacings ((GtkTable *)section, 6);
}
- frame = g_object_new(gtk_frame_get_type(),
+ frame = g_object_new (gtk_frame_get_type (),
"shadow_type", GTK_SHADOW_NONE,
"label_widget", label,
"child", g_object_new(gtk_alignment_get_type(),
@@ -894,14 +894,14 @@ ec_rebuild (EConfig *emp)
"top_padding", 6,
"child", section, NULL),
NULL);
- gtk_widget_show_all(frame);
- gtk_box_pack_start((GtkBox *)page, frame, FALSE, FALSE, 0);
+ gtk_widget_show_all (frame);
+ gtk_box_pack_start ((GtkBox *)page, frame, FALSE, FALSE, 0);
wn->frame = frame;
}
nopage:
if (wn->widget && wn->widget != section) {
d(printf("destroy old widget for section '%s'\n", item->path));
- gtk_widget_destroy(wn->widget);
+ gtk_widget_destroy (wn->widget);
}
d(printf("Item %s, setting section widget\n", wn->item->path));
@@ -926,11 +926,11 @@ ec_rebuild (EConfig *emp)
wn->widget = NULL;
wn->frame = NULL;
g_warning("EConfig item has no parent section: %s", item->path);
- } else if ((item->type == E_CONFIG_ITEM && !GTK_IS_BOX(section))
- || (item->type == E_CONFIG_ITEM_TABLE && !GTK_IS_TABLE(section)))
+ } else if ((item->type == E_CONFIG_ITEM && !GTK_IS_BOX (section))
+ || (item->type == E_CONFIG_ITEM_TABLE && !GTK_IS_TABLE (section)))
g_warning("EConfig item parent type is incorrect: %s", item->path);
else if (item->factory)
- w = item->factory(emp, item, section, wn->widget, wn->context->data);
+ w = item->factory (emp, item, section, wn->widget, wn->context->data);
d(printf("item %d:%s widget %p\n", itemno, item->path, w));
@@ -941,7 +941,7 @@ ec_rebuild (EConfig *emp)
if (wn->widget && wn->widget != w) {
d(printf("destroy old widget for item '%s'\n", item->path));
- gtk_widget_destroy(wn->widget);
+ gtk_widget_destroy (wn->widget);
}
wn->widget = w;
@@ -961,18 +961,18 @@ ec_rebuild (EConfig *emp)
d(printf ("Section %s - %d visible widgets (frame=%p)\n", sectionnode->item->path, n_visible_widgets, sectionnode->frame));
if ((sectionnode->empty = (itemno == 0 || n_visible_widgets == 0))) {
if (sectionnode->real_frame)
- gtk_widget_hide(sectionnode->real_frame);
+ gtk_widget_hide (sectionnode->real_frame);
if (sectionnode->frame)
- gtk_widget_hide(sectionnode->frame);
+ gtk_widget_hide (sectionnode->frame);
sectionno--;
} else {
if (sectionnode->real_frame)
- gtk_widget_show(sectionnode->real_frame);
+ gtk_widget_show (sectionnode->real_frame);
if (sectionnode->frame)
- gtk_widget_show(sectionnode->frame);
+ gtk_widget_show (sectionnode->frame);
}
d(printf("%s section '%s' [sections=%d]\n", sectionnode->empty?"hiding":"showing", sectionnode->item->path, sectionno));
}
@@ -980,18 +980,18 @@ ec_rebuild (EConfig *emp)
/* If the last page doesn't contain anything, hide it */
if (pagenode != NULL && pagenode->frame != NULL) {
if ((pagenode->empty = sectionno == 0)) {
- gtk_widget_hide(pagenode->frame);
+ gtk_widget_hide (pagenode->frame);
pageno--;
} else
- gtk_widget_show(pagenode->frame);
+ gtk_widget_show (pagenode->frame);
d(printf("%s page '%s' [section=%d]\n", pagenode->empty?"hiding":"showing", pagenode->item->path, pageno));
}
if (book) {
/* make this depend on flags?? */
- if (gtk_notebook_get_n_pages((GtkNotebook *)book) == 1) {
- gtk_notebook_set_show_tabs((GtkNotebook *)book, FALSE);
- gtk_notebook_set_show_border((GtkNotebook *)book, FALSE);
+ if (gtk_notebook_get_n_pages ((GtkNotebook *)book) == 1) {
+ gtk_notebook_set_show_tabs ((GtkNotebook *)book, FALSE);
+ gtk_notebook_set_show_border ((GtkNotebook *)book, FALSE);
}
}
@@ -1019,21 +1019,21 @@ ec_rebuild (EConfig *emp)
* initiate a e_config_target_changed() call where appropriate.
**/
void
-e_config_set_target(EConfig *emp, EConfigTarget *target)
+e_config_set_target (EConfig *emp, EConfigTarget *target)
{
if (emp->target != target)
- ((EConfigClass *)G_OBJECT_GET_CLASS(emp))->set_target(emp, target);
+ ((EConfigClass *)G_OBJECT_GET_CLASS (emp))->set_target (emp, target);
}
static void
-ec_widget_destroy(GtkWidget *w, EConfig *ec)
+ec_widget_destroy (GtkWidget *w, EConfig *ec)
{
if (ec->target) {
- e_config_target_free(ec, ec->target);
+ e_config_target_free (ec, ec->target);
ec->target = NULL;
}
- g_object_unref(ec);
+ g_object_unref (ec);
}
/**
@@ -1054,10 +1054,10 @@ ec_widget_destroy(GtkWidget *w, EConfig *ec)
* Return value: The widget, also available in @emp.widget
**/
GtkWidget *
-e_config_create_widget(EConfig *emp)
+e_config_create_widget (EConfig *emp)
{
EConfigPrivate *p = emp->priv;
- GPtrArray *items = g_ptr_array_new();
+ GPtrArray *items = g_ptr_array_new ();
GList *link;
GSList *l;
/*char *domain = NULL;*/
@@ -1065,7 +1065,7 @@ e_config_create_widget(EConfig *emp)
g_return_val_if_fail (emp->target != NULL, NULL);
- ec_add_static_items(emp);
+ ec_add_static_items (emp);
/* FIXME: need to override old ones with new names */
link = p->menus;
@@ -1074,31 +1074,31 @@ e_config_create_widget(EConfig *emp)
for (l=mnode->menu; l; l = l->next) {
struct _EConfigItem *item = l->data;
- struct _widget_node *wn = g_malloc0(sizeof(*wn));
+ struct _widget_node *wn = g_malloc0 (sizeof (*wn));
wn->item = item;
wn->context = mnode;
wn->config = emp;
- g_ptr_array_add(items, wn);
+ g_ptr_array_add (items, wn);
}
link = g_list_next (link);
}
- qsort(items->pdata, items->len, sizeof(items->pdata[0]), ep_cmp);
+ qsort (items->pdata, items->len, sizeof (items->pdata[0]), ep_cmp);
for (i=0;i<items->len;i++)
p->widgets = g_list_append (p->widgets, items->pdata[i]);
- g_ptr_array_free(items, TRUE);
- ec_rebuild(emp);
+ g_ptr_array_free (items, TRUE);
+ ec_rebuild (emp);
/* auto-unref it */
g_signal_connect(emp->widget, "destroy", G_CALLBACK(ec_widget_destroy), emp);
/* FIXME: for some reason ec_rebuild puts the widget on page 1, this is just to override that */
if (emp->type == E_CONFIG_BOOK)
- gtk_notebook_set_current_page((GtkNotebook *)emp->widget, 0);
+ gtk_notebook_set_current_page ((GtkNotebook *)emp->widget, 0);
else {
gtk_window_set_position (GTK_WINDOW (emp->widget), GTK_WIN_POS_CENTER);
gtk_widget_show (emp->widget);
@@ -1108,14 +1108,14 @@ e_config_create_widget(EConfig *emp)
}
static void
-ec_dialog_response(GtkWidget *d, gint id, EConfig *ec)
+ec_dialog_response (GtkWidget *d, gint id, EConfig *ec)
{
if (id == GTK_RESPONSE_OK)
- e_config_commit(ec);
+ e_config_commit (ec);
else
- e_config_abort(ec);
+ e_config_abort (ec);
- gtk_widget_destroy(d);
+ gtk_widget_destroy (d);
}
/**
@@ -1136,14 +1136,14 @@ ec_dialog_response(GtkWidget *d, gint id, EConfig *ec)
* Return value: The window widget. This is also stored in @emp.window.
**/
GtkWidget *
-e_config_create_window(EConfig *emp, GtkWindow *parent, const gchar *title)
+e_config_create_window (EConfig *emp, GtkWindow *parent, const gchar *title)
{
GtkWidget *w;
- e_config_create_widget(emp);
+ e_config_create_widget (emp);
if (emp->type == E_CONFIG_BOOK) {
- w = gtk_dialog_new_with_buttons(title, parent,
+ w = gtk_dialog_new_with_buttons (title, parent,
GTK_DIALOG_DESTROY_WITH_PARENT |
GTK_DIALOG_NO_SEPARATOR,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -1155,7 +1155,7 @@ e_config_create_window(EConfig *emp, GtkWindow *parent, const gchar *title)
gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (w))), 0);
gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (w))), 12);
- gtk_box_pack_start((GtkBox *)gtk_dialog_get_content_area (((GtkDialog *)w)), emp->widget, TRUE, TRUE, 0);
+ gtk_box_pack_start ((GtkBox *)gtk_dialog_get_content_area (((GtkDialog *)w)), emp->widget, TRUE, TRUE, 0);
} else {
/* response is handled directly by the assistant stuff */
w = emp->widget;
@@ -1163,7 +1163,7 @@ e_config_create_window(EConfig *emp, GtkWindow *parent, const gchar *title)
}
emp->window = w;
- gtk_widget_show(w);
+ gtk_widget_show (w);
return w;
}
@@ -1175,10 +1175,10 @@ ec_call_page_check (EConfig *emp)
ec_assistant_check_current (emp);
} else {
if (emp->window) {
- if (e_config_page_check(emp, NULL)) {
- gtk_dialog_set_response_sensitive((GtkDialog *)emp->window, GTK_RESPONSE_OK, TRUE);
+ if (e_config_page_check (emp, NULL)) {
+ gtk_dialog_set_response_sensitive ((GtkDialog *)emp->window, GTK_RESPONSE_OK, TRUE);
} else {
- gtk_dialog_set_response_sensitive((GtkDialog *)emp->window, GTK_RESPONSE_OK, FALSE);
+ gtk_dialog_set_response_sensitive ((GtkDialog *)emp->window, GTK_RESPONSE_OK, FALSE);
}
}
}
@@ -1209,7 +1209,7 @@ ec_idle_handler_for_rebuild (gpointer data)
* button for the Notebook mode.
**/
void
-e_config_target_changed(EConfig *emp, e_config_target_change_t how)
+e_config_target_changed (EConfig *emp, e_config_target_change_t how)
{
if (how == E_CONFIG_TARGET_CHANGED_REBUILD) {
g_idle_add (ec_idle_handler_for_rebuild, emp);
@@ -1322,7 +1322,7 @@ e_config_page_check (EConfig *config, const gchar *pageid)
* container or the GtkVBox object inside the assistant.
**/
GtkWidget *
-e_config_page_get(EConfig *ec, const gchar *pageid)
+e_config_page_get (EConfig *ec, const gchar *pageid)
{
GList *link;
@@ -1336,7 +1336,7 @@ e_config_page_get(EConfig *ec, const gchar *pageid)
|| wn->item->type == E_CONFIG_PAGE_START
|| wn->item->type == E_CONFIG_PAGE_FINISH
|| wn->item->type == E_CONFIG_PAGE_PROGRESS)
- && !strcmp(wn->item->path, pageid))
+ && !strcmp (wn->item->path, pageid))
return wn->frame;
link = g_list_next (link);
@@ -1357,7 +1357,7 @@ e_config_page_get(EConfig *ec, const gchar *pageid)
* last configured and visible page.
**/
const gchar *
-e_config_page_next(EConfig *ec, const gchar *pageid)
+e_config_page_next (EConfig *ec, const gchar *pageid)
{
GList *link;
gint found;
@@ -1375,7 +1375,7 @@ e_config_page_next(EConfig *ec, const gchar *pageid)
|| wn->item->type == E_CONFIG_PAGE_PROGRESS)) {
if (found)
return wn->item->path;
- else if (strcmp(wn->item->path, pageid) == 0)
+ else if (strcmp (wn->item->path, pageid) == 0)
found = 1;
}
@@ -1397,7 +1397,7 @@ e_config_page_next(EConfig *ec, const gchar *pageid)
* first configured and visible page.
**/
const gchar *
-e_config_page_prev(EConfig *ec, const gchar *pageid)
+e_config_page_prev (EConfig *ec, const gchar *pageid)
{
GList *link;
gint found;
@@ -1415,7 +1415,7 @@ e_config_page_prev(EConfig *ec, const gchar *pageid)
|| wn->item->type == E_CONFIG_PAGE_PROGRESS)) {
if (found)
return wn->item->path;
- else if (strcmp(wn->item->path, pageid) == 0)
+ else if (strcmp (wn->item->path, pageid) == 0)
found = 1;
}
@@ -1493,18 +1493,18 @@ e_config_class_remove_factory (EConfigClass *class,
* Allocate a new config target suitable for this class. Implementing
* classes will define the actual content of the target.
**/
-gpointer e_config_target_new(EConfig *ep, gint type, gsize size)
+gpointer e_config_target_new (EConfig *ep, gint type, gsize size)
{
EConfigTarget *t;
- if (size < sizeof(EConfigTarget)) {
+ if (size < sizeof (EConfigTarget)) {
g_warning ("Size is less than size of EConfigTarget\n");
size = sizeof (EConfigTarget);
}
- t = g_malloc0(size);
+ t = g_malloc0 (size);
t->config = ep;
- g_object_ref(ep);
+ g_object_ref (ep);
t->type = type;
return t;
@@ -1519,11 +1519,11 @@ gpointer e_config_target_new(EConfig *ep, gint type, gsize size)
* free custom targets.
**/
void
-e_config_target_free(EConfig *ep, gpointer o)
+e_config_target_free (EConfig *ep, gpointer o)
{
EConfigTarget *t = o;
- ((EConfigClass *)G_OBJECT_GET_CLASS(ep))->target_free(ep, t);
+ ((EConfigClass *)G_OBJECT_GET_CLASS (ep))->target_free (ep, t);
}
/* ********************************************************************** */
@@ -1575,25 +1575,25 @@ G_DEFINE_TYPE (
E_TYPE_PLUGIN_HOOK)
static void
-ech_commit(EConfig *ec, GSList *items, gpointer data)
+ech_commit (EConfig *ec, GSList *items, gpointer data)
{
struct _EConfigHookGroup *group = data;
if (group->commit && group->hook->hook.plugin->enabled)
- e_plugin_invoke(group->hook->hook.plugin, group->commit, ec->target);
+ e_plugin_invoke (group->hook->hook.plugin, group->commit, ec->target);
}
static void
-ech_abort(EConfig *ec, GSList *items, gpointer data)
+ech_abort (EConfig *ec, GSList *items, gpointer data)
{
struct _EConfigHookGroup *group = data;
if (group->abort && group->hook->hook.plugin->enabled)
- e_plugin_invoke(group->hook->hook.plugin, group->abort, ec->target);
+ e_plugin_invoke (group->hook->hook.plugin, group->abort, ec->target);
}
static gboolean
-ech_check(EConfig *ec, const gchar *pageid, gpointer data)
+ech_check (EConfig *ec, const gchar *pageid, gpointer data)
{
struct _EConfigHookGroup *group = data;
EConfigHookPageCheckData hdata;
@@ -1605,11 +1605,11 @@ ech_check(EConfig *ec, const gchar *pageid, gpointer data)
hdata.target = ec->target;
hdata.pageid = pageid?pageid:"";
- return GPOINTER_TO_INT(e_plugin_invoke(group->hook->hook.plugin, group->check, &hdata));
+ return GPOINTER_TO_INT (e_plugin_invoke (group->hook->hook.plugin, group->check, &hdata));
}
static void
-ech_config_factory(EConfig *emp, gpointer data)
+ech_config_factory (EConfig *emp, gpointer data)
{
struct _EConfigHookGroup *group = data;
@@ -1620,29 +1620,29 @@ ech_config_factory(EConfig *emp, gpointer data)
return;
if (group->items)
- e_config_add_items(emp, group->items, ech_commit, ech_abort, NULL, group);
+ e_config_add_items (emp, group->items, ech_commit, ech_abort, NULL, group);
if (group->check)
- e_config_add_page_check(emp, NULL, ech_check, group);
+ e_config_add_page_check (emp, NULL, ech_check, group);
}
static void
-emph_free_item(struct _EConfigItem *item)
+emph_free_item (struct _EConfigItem *item)
{
- g_free(item->path);
- g_free(item->label);
- g_free(item->user_data);
- g_free(item);
+ g_free (item->path);
+ g_free (item->label);
+ g_free (item->user_data);
+ g_free (item);
}
static void
-emph_free_group(struct _EConfigHookGroup *group)
+emph_free_group (struct _EConfigHookGroup *group)
{
- g_slist_foreach(group->items, (GFunc)emph_free_item, NULL);
- g_slist_free(group->items);
+ g_slist_foreach (group->items, (GFunc)emph_free_item, NULL);
+ g_slist_free (group->items);
- g_free(group->id);
- g_free(group);
+ g_free (group->id);
+ g_free (group);
}
static GtkWidget *
@@ -1737,12 +1737,12 @@ ech_config_section_factory (EConfig *config,
}
static struct _EConfigItem *
-emph_construct_item(EPluginHook *eph, EConfigHookGroup *menu, xmlNodePtr root, EConfigHookTargetMap *map)
+emph_construct_item (EPluginHook *eph, EConfigHookGroup *menu, xmlNodePtr root, EConfigHookTargetMap *map)
{
struct _EConfigItem *item;
d(printf(" loading config item\n"));
- item = g_malloc0(sizeof(*item));
+ item = g_malloc0 (sizeof (*item));
if ((item->type = e_plugin_hook_id(root, ech_item_types, "type")) == -1)
goto error;
item->path = e_plugin_xml_prop(root, "path");
@@ -1765,27 +1765,27 @@ emph_construct_item(EPluginHook *eph, EConfigHookGroup *menu, xmlNodePtr root, E
return item;
error:
d(printf("error!\n"));
- emph_free_item(item);
+ emph_free_item (item);
return NULL;
}
static struct _EConfigHookGroup *
-emph_construct_menu(EPluginHook *eph, xmlNodePtr root)
+emph_construct_menu (EPluginHook *eph, xmlNodePtr root)
{
struct _EConfigHookGroup *menu;
xmlNodePtr node;
EConfigHookTargetMap *map;
- EConfigHookClass *class = (EConfigHookClass *)G_OBJECT_GET_CLASS(eph);
+ EConfigHookClass *class = (EConfigHookClass *)G_OBJECT_GET_CLASS (eph);
gchar *tmp;
d(printf(" loading menu\n"));
- menu = g_malloc0(sizeof(*menu));
+ menu = g_malloc0 (sizeof (*menu));
tmp = (gchar *)xmlGetProp(root, (const guchar *)"target");
if (tmp == NULL)
goto error;
- map = g_hash_table_lookup(class->target_map, tmp);
- xmlFree(tmp);
+ map = g_hash_table_lookup (class->target_map, tmp);
+ xmlFree (tmp);
if (map == NULL)
goto error;
@@ -1793,7 +1793,7 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root)
menu->id = e_plugin_xml_prop(root, "id");
if (menu->id == NULL) {
g_warning("Plugin '%s' missing 'id' field in group for '%s'\n", eph->plugin->name,
- ((EPluginHookClass *)G_OBJECT_GET_CLASS(eph))->id);
+ ((EPluginHookClass *)G_OBJECT_GET_CLASS (eph))->id);
goto error;
}
menu->check = e_plugin_xml_prop(root, "check");
@@ -1805,41 +1805,41 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root)
if (0 == strcmp((gchar *)node->name, "item")) {
struct _EConfigItem *item;
- item = emph_construct_item(eph, menu, node, map);
+ item = emph_construct_item (eph, menu, node, map);
if (item)
- menu->items = g_slist_append(menu->items, item);
+ menu->items = g_slist_append (menu->items, item);
}
node = node->next;
}
return menu;
error:
- emph_free_group(menu);
+ emph_free_group (menu);
return NULL;
}
static gint
-emph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
+emph_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
{
xmlNodePtr node;
EConfigClass *class;
d(printf("loading config hook\n"));
- if (((EPluginHookClass *)e_config_hook_parent_class)->construct(eph, ep, root) == -1)
+ if (((EPluginHookClass *)e_config_hook_parent_class)->construct (eph, ep, root) == -1)
return -1;
- class = ((EConfigHookClass *)G_OBJECT_GET_CLASS(eph))->config_class;
+ class = ((EConfigHookClass *)G_OBJECT_GET_CLASS (eph))->config_class;
node = root->children;
while (node) {
if (strcmp((gchar *)node->name, "group") == 0) {
struct _EConfigHookGroup *group;
- group = emph_construct_menu(eph, node);
+ group = emph_construct_menu (eph, node);
if (group) {
- e_config_class_add_factory(class, group->id, ech_config_factory, group);
- emph->groups = g_slist_append(emph->groups, group);
+ e_config_class_add_factory (class, group->id, ech_config_factory, group);
+ emph->groups = g_slist_append (emph->groups, group);
}
}
node = node->next;
@@ -1851,14 +1851,14 @@ emph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
}
static void
-emph_finalize(GObject *o)
+emph_finalize (GObject *o)
{
EPluginHook *eph = (EPluginHook *)o;
- g_slist_foreach(emph->groups, (GFunc)emph_free_group, NULL);
- g_slist_free(emph->groups);
+ g_slist_foreach (emph->groups, (GFunc)emph_free_group, NULL);
+ g_slist_free (emph->groups);
- ((GObjectClass *)e_config_hook_parent_class)->finalize(o);
+ ((GObjectClass *)e_config_hook_parent_class)->finalize (o);
}
static void
@@ -1877,7 +1877,7 @@ e_config_hook_class_init (EConfigHookClass *class)
plugin_hook_class->id = "org.gnome.evolution.config:1.0";
class->target_map = g_hash_table_new (g_str_hash, g_str_equal);
- class->config_class = g_type_class_ref (e_config_get_type());
+ class->config_class = g_type_class_ref (e_config_get_type ());
}
static void
@@ -1900,5 +1900,5 @@ void
e_config_hook_class_add_target_map (EConfigHookClass *class,
const EConfigHookTargetMap *map)
{
- g_hash_table_insert(class->target_map, (gpointer)map->type, (gpointer)map);
+ g_hash_table_insert (class->target_map, (gpointer)map->type, (gpointer)map);
}
diff --git a/e-util/e-config.h b/e-util/e-config.h
index 6df90ceb52..7daf83fa07 100644
--- a/e-util/e-config.h
+++ b/e-util/e-config.h
@@ -241,35 +241,35 @@ struct _EConfigClass {
EConfigTarget *target);
};
-GType e_config_get_type(void);
+GType e_config_get_type (void);
/* Static class methods */
-EConfigFactory *e_config_class_add_factory(EConfigClass *klass, const gchar *id, EConfigFactoryFunc func, gpointer user_data);
-void e_config_class_remove_factory(EConfigClass *klass, EConfigFactory *f);
+EConfigFactory *e_config_class_add_factory (EConfigClass *klass, const gchar *id, EConfigFactoryFunc func, gpointer user_data);
+void e_config_class_remove_factory (EConfigClass *klass, EConfigFactory *f);
-EConfig *e_config_construct(EConfig *, gint type, const gchar *id);
+EConfig *e_config_construct (EConfig *, gint type, const gchar *id);
-void e_config_add_items(EConfig *, GSList *items, EConfigItemsFunc commitfunc, EConfigItemsFunc abortfunc, EConfigItemsFunc freefunc, gpointer data);
-void e_config_add_page_check(EConfig *, const gchar *pageid, EConfigCheckFunc, gpointer data);
+void e_config_add_items (EConfig *, GSList *items, EConfigItemsFunc commitfunc, EConfigItemsFunc abortfunc, EConfigItemsFunc freefunc, gpointer data);
+void e_config_add_page_check (EConfig *, const gchar *pageid, EConfigCheckFunc, gpointer data);
void e_config_set_page_is_finish (EConfig *ec, const gchar *pageid, gboolean is_finish);
-void e_config_set_target(EConfig *emp, EConfigTarget *target);
-GtkWidget *e_config_create_widget(EConfig *);
-GtkWidget *e_config_create_window(EConfig *emp, GtkWindow *parent, const gchar *title);
+void e_config_set_target (EConfig *emp, EConfigTarget *target);
+GtkWidget *e_config_create_widget (EConfig *);
+GtkWidget *e_config_create_window (EConfig *emp, GtkWindow *parent, const gchar *title);
-void e_config_target_changed(EConfig *emp, e_config_target_change_t how);
+void e_config_target_changed (EConfig *emp, e_config_target_change_t how);
-gboolean e_config_page_check(EConfig *, const gchar *);
+gboolean e_config_page_check (EConfig *, const gchar *);
-GtkWidget *e_config_page_get(EConfig *ec, const gchar *pageid);
-const gchar *e_config_page_next(EConfig *ec, const gchar *pageid);
-const gchar *e_config_page_prev(EConfig *ec, const gchar *pageid);
+GtkWidget *e_config_page_get (EConfig *ec, const gchar *pageid);
+const gchar *e_config_page_next (EConfig *ec, const gchar *pageid);
+const gchar *e_config_page_prev (EConfig *ec, const gchar *pageid);
-void e_config_abort(EConfig *);
-void e_config_commit(EConfig *);
+void e_config_abort (EConfig *);
+void e_config_commit (EConfig *);
-gpointer e_config_target_new(EConfig *, gint type, gsize size);
-void e_config_target_free(EConfig *, gpointer );
+gpointer e_config_target_new (EConfig *, gint type, gsize size);
+void e_config_target_free (EConfig *, gpointer );
/* ********************************************************************** */
@@ -394,10 +394,10 @@ struct _EConfigHookClass {
EConfigClass *config_class;
};
-GType e_config_hook_get_type(void);
+GType e_config_hook_get_type (void);
/* for implementors */
-void e_config_hook_class_add_target_map(EConfigHookClass *klass, const EConfigHookTargetMap *);
+void e_config_hook_class_add_target_map (EConfigHookClass *klass, const EConfigHookTargetMap *);
G_END_DECLS
diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c
index f927a275b8..c41fc08c41 100644
--- a/e-util/e-datetime-format.c
+++ b/e-util/e-datetime-format.c
@@ -229,7 +229,7 @@ format_internal (const gchar *key, DTFormatKind kind, time_t tvalue, struct tm *
struct tm today, value;
time_t ttoday;
- tzset();
+ tzset ();
if (!tm_value) {
localtime_r (&tvalue, &value);
tm_value = &value;
diff --git a/e-util/e-event.c b/e-util/e-event.c
index 9edde9c196..6d0ece99bf 100644
--- a/e-util/e-event.c
+++ b/e-util/e-event.c
@@ -82,8 +82,8 @@ event_finalize (GObject *object)
g_free (node);
}
- g_slist_foreach(p->sorted, (GFunc)g_free, NULL);
- g_slist_free(p->sorted);
+ g_slist_foreach (p->sorted, (GFunc)g_free, NULL);
+ g_slist_free (p->sorted);
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (e_event_parent_class)->finalize (object);
@@ -127,9 +127,9 @@ e_event_init (EEvent *event)
*
* Return value: Returns @ep.
**/
-EEvent *e_event_construct(EEvent *ep, const gchar *id)
+EEvent *e_event_construct (EEvent *ep, const gchar *id)
{
- ep->id = g_strdup(id);
+ ep->id = g_strdup (id);
return ep;
}
@@ -153,7 +153,7 @@ e_event_add_items (EEvent *event,
{
struct _event_node *node;
- node = g_malloc(sizeof(*node));
+ node = g_malloc (sizeof (*node));
node->events = items;
node->freefunc = freefunc;
node->data = data;
@@ -161,8 +161,8 @@ e_event_add_items (EEvent *event,
g_queue_push_tail (&event->priv->events, node);
if (event->priv->sorted) {
- g_slist_foreach(event->priv->sorted, (GFunc)g_free, NULL);
- g_slist_free(event->priv->sorted);
+ g_slist_foreach (event->priv->sorted, (GFunc)g_free, NULL);
+ g_slist_free (event->priv->sorted);
event->priv->sorted = NULL;
}
@@ -178,25 +178,25 @@ e_event_add_items (EEvent *event,
* added, and may only be removed once.
**/
void
-e_event_remove_items(EEvent *event, gpointer handle)
+e_event_remove_items (EEvent *event, gpointer handle)
{
struct _event_node *node = handle;
g_queue_remove (&event->priv->events, node);
if (node->freefunc)
- node->freefunc(event, node->events, node->data);
- g_free(node);
+ node->freefunc (event, node->events, node->data);
+ g_free (node);
if (event->priv->sorted) {
- g_slist_foreach(event->priv->sorted, (GFunc)g_free, NULL);
- g_slist_free(event->priv->sorted);
+ g_slist_foreach (event->priv->sorted, (GFunc)g_free, NULL);
+ g_slist_free (event->priv->sorted);
event->priv->sorted = NULL;
}
}
static gint
-ee_cmp(gconstpointer ap, gconstpointer bp)
+ee_cmp (gconstpointer ap, gconstpointer bp)
{
gint a = ((struct _event_info **)ap)[0]->item->priority;
gint b = ((struct _event_info **)bp)[0]->item->priority;
@@ -220,7 +220,7 @@ ee_cmp(gconstpointer ap, gconstpointer bp)
* emission is complete.
**/
void
-e_event_emit(EEvent *event, const gchar *id, EEventTarget *target)
+e_event_emit (EEvent *event, const gchar *id, EEventTarget *target)
{
EEventPrivate *p = event->priv;
GSList *events;
@@ -241,22 +241,22 @@ e_event_emit(EEvent *event, const gchar *id, EEventTarget *target)
struct _event_node *node = link->data;
GSList *l = node->events;
- for (;l;l=g_slist_next(l)) {
+ for (;l;l=g_slist_next (l)) {
struct _event_info *info;
- info = g_malloc0(sizeof(*info));
+ info = g_malloc0 (sizeof (*info));
info->parent = node;
info->item = l->data;
- events = g_slist_prepend(events, info);
+ events = g_slist_prepend (events, info);
}
link = g_list_next (link);
}
- p->sorted = events = g_slist_sort(events, ee_cmp);
+ p->sorted = events = g_slist_sort (events, ee_cmp);
}
- for (;events;events=g_slist_next(events)) {
+ for (;events;events=g_slist_next (events)) {
struct _event_info *info = events->data;
EEventItem *item = info->item;
@@ -266,15 +266,15 @@ e_event_emit(EEvent *event, const gchar *id, EEventTarget *target)
if (item->enable & target->mask)
continue;
- if (strcmp(item->id, id) == 0) {
- item->handle(event, item, info->parent->data);
+ if (strcmp (item->id, id) == 0) {
+ item->handle (event, item, info->parent->data);
if (item->type == E_EVENT_SINK)
break;
}
}
- e_event_target_free(event, target);
+ e_event_target_free (event, target);
event->target = NULL;
}
@@ -295,9 +295,9 @@ e_event_target_new (EEvent *event,
{
EEventTarget *target;
- if (size < sizeof(EEventTarget)) {
+ if (size < sizeof (EEventTarget)) {
g_warning ("Size is less than the size of EEventTarget\n");
- size = sizeof(EEventTarget);
+ size = sizeof (EEventTarget);
}
target = g_malloc0 (size);
@@ -380,7 +380,7 @@ G_DEFINE_TYPE (
E_TYPE_PLUGIN_HOOK)
static void
-emph_event_handle(EEvent *ee, EEventItem *item, gpointer data)
+emph_event_handle (EEvent *ee, EEventItem *item, gpointer data)
{
EEventHook *hook = data;
@@ -388,40 +388,40 @@ emph_event_handle(EEvent *ee, EEventItem *item, gpointer data)
if (!hook->hook.plugin->enabled)
return;
- e_plugin_invoke(hook->hook.plugin, (gchar *)item->user_data, ee->target);
+ e_plugin_invoke (hook->hook.plugin, (gchar *)item->user_data, ee->target);
}
static void
-emph_free_item(EEventItem *item)
+emph_free_item (EEventItem *item)
{
- g_free((gchar *)item->id);
- g_free(item->user_data);
- g_free(item);
+ g_free ((gchar *)item->id);
+ g_free (item->user_data);
+ g_free (item);
}
static void
-emph_free_items(EEvent *ee, GSList *items, gpointer data)
+emph_free_items (EEvent *ee, GSList *items, gpointer data)
{
/*EPluginHook *eph = data;*/
- g_slist_foreach(items, (GFunc)emph_free_item, NULL);
- g_slist_free(items);
+ g_slist_foreach (items, (GFunc)emph_free_item, NULL);
+ g_slist_free (items);
}
static EEventItem *
-emph_construct_item(EPluginHook *eph, xmlNodePtr root, EEventHookClass *class)
+emph_construct_item (EPluginHook *eph, xmlNodePtr root, EEventHookClass *class)
{
EEventItem *item;
EEventHookTargetMap *map;
gchar *tmp;
- item = g_malloc0(sizeof(*item));
+ item = g_malloc0 (sizeof (*item));
tmp = (gchar *)xmlGetProp(root, (const guchar *)"target");
if (tmp == NULL)
goto error;
- map = g_hash_table_lookup(class->target_map, tmp);
- xmlFree(tmp);
+ map = g_hash_table_lookup (class->target_map, tmp);
+ xmlFree (tmp);
if (map == NULL)
goto error;
item->target_type = map->id;
@@ -440,34 +440,34 @@ emph_construct_item(EPluginHook *eph, xmlNodePtr root, EEventHookClass *class)
return item;
error:
- emph_free_item(item);
+ emph_free_item (item);
return NULL;
}
static gint
-emph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
+emph_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
{
xmlNodePtr node;
EEventHookClass *class;
GSList *items = NULL;
- g_return_val_if_fail(((EEventHookClass *)G_OBJECT_GET_CLASS(eph))->event != NULL, -1);
+ g_return_val_if_fail (((EEventHookClass *)G_OBJECT_GET_CLASS (eph))->event != NULL, -1);
d(printf("loading event hook\n"));
- if (((EPluginHookClass *)e_event_hook_parent_class)->construct(eph, ep, root) == -1)
+ if (((EPluginHookClass *)e_event_hook_parent_class)->construct (eph, ep, root) == -1)
return -1;
- class = (EEventHookClass *)G_OBJECT_GET_CLASS(eph);
+ class = (EEventHookClass *)G_OBJECT_GET_CLASS (eph);
node = root->children;
while (node) {
if (strcmp((gchar *)node->name, "event") == 0) {
EEventItem *item;
- item = emph_construct_item(eph, node, class);
+ item = emph_construct_item (eph, node, class);
if (item)
- items = g_slist_prepend(items, item);
+ items = g_slist_prepend (items, item);
}
node = node->next;
}
@@ -475,7 +475,7 @@ emph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
eph->plugin = ep;
if (items)
- e_event_add_items(class->event, items, emph_free_items, eph);
+ e_event_add_items (class->event, items, emph_free_items, eph);
return 0;
}
diff --git a/e-util/e-icon-factory.h b/e-util/e-icon-factory.h
index 9cec7253bf..89a7d5a6a4 100644
--- a/e-util/e-icon-factory.h
+++ b/e-util/e-icon-factory.h
@@ -26,7 +26,7 @@
#include <gtk/gtk.h>
-gchar * e_icon_factory_get_icon_filename(const gchar *icon_name,
+gchar * e_icon_factory_get_icon_filename (const gchar *icon_name,
GtkIconSize icon_size);
GdkPixbuf * e_icon_factory_get_icon (const gchar *icon_name,
GtkIconSize icon_size);
diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c
index 064c01997a..5e4daa81d1 100644
--- a/e-util/e-mktemp.c
+++ b/e-util/e-mktemp.c
@@ -50,7 +50,7 @@
#define TEMP_SCAN (60)
static gint
-expire_dir_rec(const gchar *base, time_t now)
+expire_dir_rec (const gchar *base, time_t now)
{
GDir *dir;
const gchar *d;
@@ -61,28 +61,28 @@ expire_dir_rec(const gchar *base, time_t now)
d(printf("expire dir '%s'\n", base));
- dir = g_dir_open(base, 0, NULL);
+ dir = g_dir_open (base, 0, NULL);
if (dir == NULL)
return 0;
- path = g_string_new(base);
+ path = g_string_new (base);
len = path->len;
- while ((d = g_dir_read_name(dir))) {
- g_string_truncate(path, len);
+ while ((d = g_dir_read_name (dir))) {
+ g_string_truncate (path, len);
g_string_append_printf(path, "/%s", d);
d(printf("Checking '%s' for expiry\n", path->str));
- if (g_stat(path->str, &st) == 0
+ if (g_stat (path->str, &st) == 0
&& st.st_atime + TEMP_EXPIRE < now) {
- if (S_ISDIR(st.st_mode)) {
- if (expire_dir_rec(path->str, now) == 0) {
+ if (S_ISDIR (st.st_mode)) {
+ if (expire_dir_rec (path->str, now) == 0) {
d(printf("Removing dir '%s'\n", path->str));
- g_rmdir(path->str);
+ g_rmdir (path->str);
} else {
count++;
}
- } else if (g_unlink(path->str) == -1) {
+ } else if (g_unlink (path->str) == -1) {
d(printf("expiry failed: %s\n", g_strerror(errno)));
count++;
} else {
@@ -92,8 +92,8 @@ expire_dir_rec(const gchar *base, time_t now)
count++;
}
}
- g_string_free(path, TRUE);
- g_dir_close(dir);
+ g_string_free (path, TRUE);
+ g_dir_close (dir);
d(printf("expire dir '%s' %d remaining files\n", base, count));
@@ -104,7 +104,7 @@ static GString *
get_dir (gboolean make)
{
GString *path;
- time_t now = time(NULL);
+ time_t now = time (NULL);
static time_t last = 0;
#ifdef TEMP_HOME
@@ -113,12 +113,12 @@ get_dir (gboolean make)
user_cache_dir = e_get_user_cache_dir ();
tmpdir = g_build_filename (user_cache_dir, "tmp", NULL);
- path = g_string_new(tmpdir);
- if (make && g_mkdir_with_parents(tmpdir, 0777) == -1) {
- g_string_free(path, TRUE);
+ path = g_string_new (tmpdir);
+ if (make && g_mkdir_with_parents (tmpdir, 0777) == -1) {
+ g_string_free (path, TRUE);
path = NULL;
}
- g_free(tmpdir);
+ g_free (tmpdir);
#else
path = g_string_new("/tmp/evolution-");
g_string_append_printf (path, "%d", (gint) getuid ());
@@ -158,7 +158,7 @@ get_dir (gboolean make)
/* fire off an expiry attempt no more often than TEMP_SCAN seconds */
if (path && (last+TEMP_SCAN) < now) {
last = now;
- expire_dir_rec(path->str, now);
+ expire_dir_rec (path->str, now);
}
return path;
@@ -207,7 +207,7 @@ e_mkstemp (const gchar *template)
g_string_append (path, "unknown-XXXXXX");
fd = g_mkstemp (path->str);
- g_string_free(path, TRUE);
+ g_string_free (path, TRUE);
return fd;
}
@@ -247,7 +247,7 @@ e_mkdtemp (const gchar *template)
tmpdir = NULL;
}
#endif
- g_string_free(path, tmpdir == NULL);
+ g_string_free (path, tmpdir == NULL);
return tmpdir;
}
diff --git a/e-util/e-non-intrusive-error-dialog.c b/e-util/e-non-intrusive-error-dialog.c
index 4e7e8a2d58..fb7f1f3afc 100644
--- a/e-util/e-non-intrusive-error-dialog.c
+++ b/e-util/e-non-intrusive-error-dialog.c
@@ -262,7 +262,7 @@ eni_show_logger (ELogger *logger,
GTK_SCROLLED_WINDOW (container), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), container, TRUE, TRUE, 0);
- widget = gtk_tree_view_new();
+ widget = gtk_tree_view_new ();
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (widget), TRUE);
gtk_tree_view_set_reorderable (GTK_TREE_VIEW (widget), FALSE);
gtk_tree_view_set_model (GTK_TREE_VIEW (widget), GTK_TREE_MODEL (store));
@@ -293,7 +293,7 @@ eni_show_logger (ELogger *logger,
column, renderer, eni_render_date, NULL, NULL);
renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes(
+ gtk_tree_view_insert_column_with_attributes (
GTK_TREE_VIEW (widget), -1, _("Messages"),
renderer, "markup", COL_DATA, NULL);
diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c
index a1906d7f3f..0da1151d21 100644
--- a/e-util/e-plugin.c
+++ b/e-util/e-plugin.c
@@ -111,7 +111,7 @@ ep_set_enabled (const gchar *id, gint state)
GConfClient *client;
/* Bail out if no change to state, when expressed as a boolean: */
- if ((state == 0) == (ep_check_enabled(id) == 0))
+ if ((state == 0) == (ep_check_enabled (id) == 0))
return;
if (state) {
@@ -151,8 +151,8 @@ ep_construct (EPlugin *ep, xmlNodePtr root)
g_free (localedir);
localedir = mapped_localedir;
#endif
- bindtextdomain(ep->domain, localedir);
- g_free(localedir);
+ bindtextdomain (ep->domain, localedir);
+ g_free (localedir);
}
ep->name = e_plugin_xml_prop_domain(root, "name", ep->domain);
@@ -176,32 +176,32 @@ ep_construct (EPlugin *ep, xmlNodePtr root)
if (ep->enabled
&& eph_types != NULL
- && (type = g_hash_table_lookup(eph_types, class)) != NULL) {
- g_free(class);
- hook = g_object_new(G_OBJECT_CLASS_TYPE(type), NULL);
- res = type->construct(hook, ep, node);
+ && (type = g_hash_table_lookup (eph_types, class)) != NULL) {
+ g_free (class);
+ hook = g_object_new (G_OBJECT_CLASS_TYPE (type), NULL);
+ res = type->construct (hook, ep, node);
if (res == -1) {
g_warning("Plugin '%s' failed to load hook", ep->name);
- g_object_unref(hook);
+ g_object_unref (hook);
goto fail;
} else {
- ep->hooks = g_slist_append(ep->hooks, hook);
+ ep->hooks = g_slist_append (ep->hooks, hook);
}
} else {
g_free (class);
}
} else if (strcmp((gchar *)node->name, "description") == 0) {
- ep->description = e_plugin_xml_content_domain(node, ep->domain);
+ ep->description = e_plugin_xml_content_domain (node, ep->domain);
} else if (strcmp((gchar *)node->name, "author") == 0) {
gchar *name = e_plugin_xml_prop(node, "name");
gchar *email = e_plugin_xml_prop(node, "email");
if (name || email) {
- EPluginAuthor *epa = g_malloc0(sizeof(*epa));
+ EPluginAuthor *epa = g_malloc0 (sizeof (*epa));
epa->name = name;
epa->email = email;
- ep->authors = g_slist_append(ep->authors, epa);
+ ep->authors = g_slist_append (ep->authors, epa);
}
}
node = node->next;
@@ -222,7 +222,7 @@ ep_enable (EPlugin *ep, gint state)
e_plugin_hook_enable (hook, state);
}
- ep_set_enabled(ep->id, state);
+ ep_set_enabled (ep->id, state);
}
static void
@@ -305,19 +305,19 @@ e_plugin_class_init (EPluginClass *class)
path = g_strdup(g_getenv("EVOLUTION_PLUGIN_PATH"));
if (path == NULL) {
/* Add the global path */
- e_plugin_add_load_path(EVOLUTION_PLUGINDIR);
+ e_plugin_add_load_path (EVOLUTION_PLUGINDIR);
path = g_build_filename(g_get_home_dir(), ".eplugins", NULL);
}
p = path;
- while ((col = strchr(p, G_SEARCHPATH_SEPARATOR))) {
+ while ((col = strchr (p, G_SEARCHPATH_SEPARATOR))) {
*col++ = 0;
- e_plugin_add_load_path(p);
+ e_plugin_add_load_path (p);
p = col;
}
- e_plugin_add_load_path(p);
- g_free(path);
+ e_plugin_add_load_path (p);
+ g_free (path);
}
static void
@@ -327,7 +327,7 @@ e_plugin_init (EPlugin *ep)
}
static EPlugin *
-ep_load_plugin(xmlNodePtr root, struct _plugin_doc *pdoc)
+ep_load_plugin (xmlNodePtr root, struct _plugin_doc *pdoc)
{
gchar *prop, *id;
EPluginClass *class;
@@ -339,44 +339,44 @@ ep_load_plugin(xmlNodePtr root, struct _plugin_doc *pdoc)
return NULL;
}
- if (g_hash_table_lookup(ep_plugins, id)) {
+ if (g_hash_table_lookup (ep_plugins, id)) {
g_warning("Plugin '%s' already defined", id);
- g_free(id);
+ g_free (id);
return NULL;
}
prop = (gchar *)xmlGetProp(root, (const guchar *)"type");
if (prop == NULL) {
- g_free(id);
+ g_free (id);
g_warning("Invalid e-plugin entry in '%s': no type", pdoc->filename);
return NULL;
}
/* If we can't find a plugin, add it to a pending list
* which is checked when a new type is registered. */
- class = g_hash_table_lookup(ep_types, prop);
+ class = g_hash_table_lookup (ep_types, prop);
if (class == NULL) {
pd(printf("Delaying loading of plugin '%s' unknown type '%s'\n", id, prop));
- g_free(id);
- xmlFree(prop);
- pdoc->plugins = g_slist_prepend(pdoc->plugins, root);
+ g_free (id);
+ xmlFree (prop);
+ pdoc->plugins = g_slist_prepend (pdoc->plugins, root);
return NULL;
}
- xmlFree(prop);
+ xmlFree (prop);
- ep = g_object_new(G_TYPE_FROM_CLASS(class), NULL);
+ ep = g_object_new (G_TYPE_FROM_CLASS (class), NULL);
ep->id = id;
- ep->path = g_strdup(pdoc->filename);
- ep->enabled = ep_check_enabled(id);
- if (e_plugin_construct(ep, root) == -1)
- e_plugin_enable(ep, FALSE);
- g_hash_table_insert(ep_plugins, ep->id, ep);
+ ep->path = g_strdup (pdoc->filename);
+ ep->enabled = ep_check_enabled (id);
+ if (e_plugin_construct (ep, root) == -1)
+ e_plugin_enable (ep, FALSE);
+ g_hash_table_insert (ep_plugins, ep->id, ep);
return ep;
}
static gint
-ep_load(const gchar *filename, gint load_level)
+ep_load (const gchar *filename, gint load_level)
{
xmlDocPtr doc;
xmlNodePtr root;
@@ -387,16 +387,16 @@ ep_load(const gchar *filename, gint load_level)
if (doc == NULL)
return -1;
- root = xmlDocGetRootElement(doc);
+ root = xmlDocGetRootElement (doc);
if (strcmp((gchar *)root->name, "e-plugin-list") != 0) {
g_warning("No <e-plugin-list> root element: %s", filename);
- xmlFreeDoc(doc);
+ xmlFreeDoc (doc);
return -1;
}
- pdoc = g_malloc0(sizeof(*pdoc));
+ pdoc = g_malloc0 (sizeof (*pdoc));
pdoc->doc = doc;
- pdoc->filename = g_strdup(filename);
+ pdoc->filename = g_strdup (filename);
for (root = root->children; root; root = root->next) {
if (strcmp((gchar *)root->name, "e-plugin") == 0) {
@@ -406,7 +406,7 @@ ep_load(const gchar *filename, gint load_level)
plugin_load_level = e_plugin_xml_prop (root, "load_level");
if (plugin_load_level) {
if ((atoi (plugin_load_level) == load_level) ) {
- ep = ep_load_plugin(root, pdoc);
+ ep = ep_load_plugin (root, pdoc);
if (ep) {
if (load_level == 1)
@@ -414,7 +414,7 @@ ep_load(const gchar *filename, gint load_level)
}
}
} else if (load_level == 2) {
- ep = ep_load_plugin(root, pdoc);
+ ep = ep_load_plugin (root, pdoc);
}
if (ep) {
@@ -430,7 +430,7 @@ ep_load(const gchar *filename, gint load_level)
ep->flags &= ~E_PLUGIN_FLAGS_SYSTEM_PLUGIN;
g_free (is_system_plugin);
- pdoc->plugin_hooks = g_slist_prepend(pdoc->plugin_hooks, ep);
+ pdoc->plugin_hooks = g_slist_prepend (pdoc->plugin_hooks, ep);
ep = NULL;
}
}
@@ -458,9 +458,9 @@ ep_load(const gchar *filename, gint load_level)
* Plugin definitions are XML files ending in the extension ".eplug".
**/
void
-e_plugin_add_load_path(const gchar *path)
+e_plugin_add_load_path (const gchar *path)
{
- ep_path = g_slist_append(ep_path, g_strdup(path));
+ ep_path = g_slist_append (ep_path, g_strdup (path));
}
static void
@@ -519,7 +519,7 @@ plugin_hook_load_subclass (GType type,
* Return value: Returns -1 if an error occurred.
**/
gint
-e_plugin_load_plugins(void)
+e_plugin_load_plugins (void)
{
GConfClient *client;
GSList *l;
@@ -549,29 +549,29 @@ e_plugin_load_plugins(void)
g_object_unref (client);
for (i=0; i < 3; i++) {
- for (l = ep_path;l;l = g_slist_next(l)) {
+ for (l = ep_path;l;l = g_slist_next (l)) {
GDir *dir;
const gchar *d;
gchar *path = l->data;
pd(printf("scanning plugin dir '%s'\n", path));
- dir = g_dir_open(path, 0, NULL);
+ dir = g_dir_open (path, 0, NULL);
if (dir == NULL) {
/*g_warning("Could not find plugin path: %s", path);*/
continue;
}
- while ((d = g_dir_read_name(dir))) {
+ while ((d = g_dir_read_name (dir))) {
if (g_str_has_suffix (d, ".eplug")) {
- gchar * name = g_build_filename(path, d, NULL);
+ gchar * name = g_build_filename (path, d, NULL);
- ep_load(name, i);
- g_free(name);
+ ep_load (name, i);
+ g_free (name);
}
}
- g_dir_close(dir);
+ g_dir_close (dir);
}
}
@@ -579,7 +579,7 @@ e_plugin_load_plugins(void)
}
static void
-ep_list_plugin(gpointer key, gpointer val, gpointer dat)
+ep_list_plugin (gpointer key, gpointer val, gpointer dat)
{
GSList **l = (GSList **)dat;
@@ -596,12 +596,12 @@ ep_list_plugin(gpointer key, gpointer val, gpointer dat)
* g_object_unref'd and the list freed.
**/
GSList *
-e_plugin_list_plugins(void)
+e_plugin_list_plugins (void)
{
GSList *l = NULL;
if (ep_plugins)
- g_hash_table_foreach(ep_plugins, ep_list_plugin, &l);
+ g_hash_table_foreach (ep_plugins, ep_list_plugin, &l);
return l;
}
@@ -617,7 +617,7 @@ e_plugin_list_plugins(void)
* Return value: The return from the construct virtual method.
**/
gint
-e_plugin_construct(EPlugin *ep, xmlNodePtr root)
+e_plugin_construct (EPlugin *ep, xmlNodePtr root)
{
EPluginClass *class;
@@ -643,7 +643,7 @@ e_plugin_construct(EPlugin *ep, xmlNodePtr root)
* Return value: The return of the plugin invocation.
**/
gpointer
-e_plugin_invoke(EPlugin *ep, const gchar *name, gpointer data)
+e_plugin_invoke (EPlugin *ep, const gchar *name, gpointer data)
{
EPluginClass *class;
@@ -670,7 +670,7 @@ e_plugin_invoke(EPlugin *ep, const gchar *name, gpointer data)
* Return value: the symbol value, or %NULL if not found
**/
gpointer
-e_plugin_get_symbol(EPlugin *ep, const gchar *name)
+e_plugin_get_symbol (EPlugin *ep, const gchar *name)
{
EPluginClass *class;
@@ -692,7 +692,7 @@ e_plugin_get_symbol(EPlugin *ep, const gchar *name)
* THIS IS NOT FULLY IMPLEMENTED YET
**/
void
-e_plugin_enable(EPlugin *ep, gint state)
+e_plugin_enable (EPlugin *ep, gint state)
{
EPluginClass *class;
@@ -744,17 +744,17 @@ e_plugin_get_configure_widget (EPlugin *ep)
* such property exists.
**/
gchar *
-e_plugin_xml_prop(xmlNodePtr node, const gchar *id)
+e_plugin_xml_prop (xmlNodePtr node, const gchar *id)
{
- gchar *p = (gchar *)xmlGetProp(node, (const guchar *)id);
+ gchar *p = (gchar *)xmlGetProp (node, (const guchar *)id);
- if (g_mem_is_system_malloc()) {
+ if (g_mem_is_system_malloc ()) {
return p;
} else {
- gchar * out = g_strdup(p);
+ gchar * out = g_strdup (p);
if (p)
- xmlFree(p);
+ xmlFree (p);
return out;
}
}
@@ -772,16 +772,16 @@ e_plugin_xml_prop(xmlNodePtr node, const gchar *id)
* such property exists.
**/
gchar *
-e_plugin_xml_prop_domain(xmlNodePtr node, const gchar *id, const gchar *domain)
+e_plugin_xml_prop_domain (xmlNodePtr node, const gchar *id, const gchar *domain)
{
gchar *p, *out;
- p = (gchar *)xmlGetProp(node, (const guchar *)id);
+ p = (gchar *)xmlGetProp (node, (const guchar *)id);
if (p == NULL)
return NULL;
- out = g_strdup(dgettext(domain, p));
- xmlFree(p);
+ out = g_strdup (dgettext (domain, p));
+ xmlFree (p);
return out;
}
@@ -800,12 +800,12 @@ e_plugin_xml_prop_domain(xmlNodePtr node, const gchar *id, const gchar *domain)
* Return value: The value if set, or @def if not.
**/
gint
-e_plugin_xml_int(xmlNodePtr node, const gchar *id, gint def)
+e_plugin_xml_int (xmlNodePtr node, const gchar *id, gint def)
{
- gchar *p = (gchar *)xmlGetProp(node, (const guchar *)id);
+ gchar *p = (gchar *)xmlGetProp (node, (const guchar *)id);
if (p)
- return atoi(p);
+ return atoi (p);
else
return def;
}
@@ -821,17 +821,17 @@ e_plugin_xml_int(xmlNodePtr node, const gchar *id, gint def)
* Return value: The node content, allocated in GLib memory.
**/
gchar *
-e_plugin_xml_content(xmlNodePtr node)
+e_plugin_xml_content (xmlNodePtr node)
{
- gchar *p = (gchar *)xmlNodeGetContent(node);
+ gchar *p = (gchar *)xmlNodeGetContent (node);
- if (g_mem_is_system_malloc()) {
+ if (g_mem_is_system_malloc ()) {
return p;
} else {
- gchar * out = g_strdup(p);
+ gchar * out = g_strdup (p);
if (p)
- xmlFree(p);
+ xmlFree (p);
return out;
}
}
@@ -848,16 +848,16 @@ e_plugin_xml_content(xmlNodePtr node)
* Return value: The node content, allocated in GLib memory.
**/
gchar *
-e_plugin_xml_content_domain(xmlNodePtr node, const gchar *domain)
+e_plugin_xml_content_domain (xmlNodePtr node, const gchar *domain)
{
gchar *p, *out;
- p = (gchar *)xmlNodeGetContent(node);
+ p = (gchar *)xmlNodeGetContent (node);
if (p == NULL)
return NULL;
- out = g_strdup(dgettext(domain, p));
- xmlFree(p);
+ out = g_strdup (dgettext (domain, p));
+ xmlFree (p);
return out;
}
@@ -870,7 +870,7 @@ G_DEFINE_TYPE (
G_TYPE_OBJECT)
static gint
-eph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
+eph_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
{
eph->plugin = ep;
@@ -878,7 +878,7 @@ eph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
}
static void
-eph_enable(EPluginHook *eph, gint state)
+eph_enable (EPluginHook *eph, gint state)
{
/* NOOP */
}
@@ -941,7 +941,7 @@ e_plugin_hook_mask (xmlNodePtr root,
gchar *val, *p, *start, c;
guint32 mask = 0;
- val = (gchar *)xmlGetProp(root, (const guchar *)prop);
+ val = (gchar *)xmlGetProp (root, (const guchar *)prop);
if (val == NULL)
return 0;
@@ -956,7 +956,7 @@ e_plugin_hook_mask (xmlNodePtr root,
gint i;
for (i=0;map[i].key;i++) {
- if (!strcmp(map[i].key, start)) {
+ if (!strcmp (map[i].key, start)) {
mask |= map[i].value;
break;
}
@@ -965,7 +965,7 @@ e_plugin_hook_mask (xmlNodePtr root,
*p++ = c;
} while (c);
- xmlFree(val);
+ xmlFree (val);
return mask;
}
@@ -994,18 +994,18 @@ e_plugin_hook_id (xmlNodePtr root,
gchar *val;
gint i;
- val = (gchar *)xmlGetProp(root, (const guchar *)prop);
+ val = (gchar *)xmlGetProp (root, (const guchar *)prop);
if (val == NULL)
return ~0;
for (i=0;map[i].key;i++) {
- if (!strcmp(map[i].key, val)) {
- xmlFree(val);
+ if (!strcmp (map[i].key, val)) {
+ xmlFree (val);
return map[i].value;
}
}
- xmlFree(val);
+ xmlFree (val);
return ~0;
}
diff --git a/e-util/e-profile-event.c b/e-util/e-profile-event.c
index fc2a609b26..2a455b3e45 100644
--- a/e-util/e-profile-event.c
+++ b/e-util/e-profile-event.c
@@ -39,18 +39,18 @@ G_DEFINE_TYPE (
E_TYPE_EVENT)
static void
-eme_target_free(EEvent *ep, EEventTarget *t)
+eme_target_free (EEvent *ep, EEventTarget *t)
{
switch (t->type) {
case E_PROFILE_EVENT_TARGET: {
EProfileEventTarget *s = (EProfileEventTarget *)t;
- g_free(s->id);
- g_free(s->uid);
+ g_free (s->id);
+ g_free (s->uid);
break; }
}
- ((EEventClass *)e_profile_event_parent_class)->target_free(ep, t);
+ ((EEventClass *)e_profile_event_parent_class)->target_free (ep, t);
}
static void
@@ -65,10 +65,10 @@ e_profile_event_init (EProfileEvent *event)
}
EProfileEvent *
-e_profile_event_peek(void)
+e_profile_event_peek (void)
{
if (e_profile_event == NULL) {
- e_profile_event = g_object_new(e_profile_event_get_type(), NULL);
+ e_profile_event = g_object_new (e_profile_event_get_type (), NULL);
e_event_construct(&e_profile_event->popup, "org.gnome.evolution.profile.events");
}
@@ -76,13 +76,13 @@ e_profile_event_peek(void)
}
EProfileEventTarget *
-e_profile_event_target_new(EProfileEvent *eme, const gchar *id, const gchar *uid, guint32 flags)
+e_profile_event_target_new (EProfileEvent *eme, const gchar *id, const gchar *uid, guint32 flags)
{
- EProfileEventTarget *t = e_event_target_new(&eme->popup, E_PROFILE_EVENT_TARGET, sizeof(*t));
+ EProfileEventTarget *t = e_event_target_new (&eme->popup, E_PROFILE_EVENT_TARGET, sizeof (*t));
GTimeVal tv;
- t->id = g_strdup(id);
- t->uid = g_strdup(uid);
+ t->id = g_strdup (id);
+ t->uid = g_strdup (uid);
t->target.mask = ~flags;
g_get_current_time (&tv);
t->tv.tv_sec = tv.tv_sec;
@@ -93,10 +93,10 @@ e_profile_event_target_new(EProfileEvent *eme, const gchar *id, const gchar *uid
#ifdef ENABLE_PROFILING
void
-e_profile_event_emit(const gchar *id, const gchar *uid, guint32 flags)
+e_profile_event_emit (const gchar *id, const gchar *uid, guint32 flags)
{
- EProfileEvent *epe = e_profile_event_peek();
- EProfileEventTarget *t = e_profile_event_target_new(epe, id, uid, flags);
+ EProfileEvent *epe = e_profile_event_peek ();
+ EProfileEventTarget *t = e_profile_event_target_new (epe, id, uid, flags);
e_event_emit((EEvent *)epe, "event", (EEventTarget *)t);
}
@@ -104,7 +104,7 @@ e_profile_event_emit(const gchar *id, const gchar *uid, guint32 flags)
/* simply keep macro from header file expand to "nothing".
#undef e_profile_event_emit
static void
-e_profile_event_emit(const gchar *id, const gchar *uid, guint32 flags)
+e_profile_event_emit (const gchar *id, const gchar *uid, guint32 flags)
{
}*/
#endif
@@ -136,9 +136,9 @@ e_profile_event_hook_class_init (EProfileEventHookClass *class)
((EPluginHookClass *)class)->id = "org.gnome.evolution.profile.events:1.0";
for (i=0;emeh_targets[i].type;i++)
- e_event_hook_class_add_target_map((EEventHookClass *)class, &emeh_targets[i]);
+ e_event_hook_class_add_target_map ((EEventHookClass *)class, &emeh_targets[i]);
- ((EEventHookClass *)class)->event = (EEvent *)e_profile_event_peek();
+ ((EEventHookClass *)class)->event = (EEvent *)e_profile_event_peek ();
}
static void
diff --git a/e-util/e-profile-event.h b/e-util/e-profile-event.h
index 6811526a6f..800ce99008 100644
--- a/e-util/e-profile-event.h
+++ b/e-util/e-profile-event.h
@@ -69,9 +69,9 @@ struct _EProfileEventClass {
EEventClass popup_class;
};
-GType e_profile_event_get_type(void);
+GType e_profile_event_get_type (void);
-EProfileEvent *e_profile_event_peek(void);
+EProfileEvent *e_profile_event_peek (void);
EProfileEventTarget *
e_profile_event_target_new (EProfileEvent *emp,
@@ -81,7 +81,7 @@ e_profile_event_target_new (EProfileEvent *emp,
/* we don't want ANY rubbish code lying around if we have profiling off */
#ifdef ENABLE_PROFILING
-void e_profile_event_emit(const gchar *id, const gchar *uid, guint32 flags);
+void e_profile_event_emit (const gchar *id, const gchar *uid, guint32 flags);
#else
#define e_profile_event_emit(a, b, c)
#endif
@@ -99,7 +99,7 @@ struct _EProfileEventHookClass {
EEventHookClass hook_class;
};
-GType e_profile_event_hook_get_type(void);
+GType e_profile_event_hook_get_type (void);
G_END_DECLS
diff --git a/e-util/e-selection.h b/e-util/e-selection.h
index 88ac772bae..5d44cd4839 100644
--- a/e-util/e-selection.h
+++ b/e-util/e-selection.h
@@ -74,7 +74,8 @@ gboolean e_targets_include_html (GdkAtom *targets,
/* Clipboard Functions */
-void e_clipboard_set_calendar(GtkClipboard *clipboard,
+void e_clipboard_set_calendar
+ (GtkClipboard *clipboard,
const gchar *source,
gint length);
void e_clipboard_set_directory
@@ -92,7 +93,8 @@ void e_clipboard_request_directory
(GtkClipboard *clipboard,
GtkClipboardTextReceivedFunc callback,
gpointer user_data);
-void e_clipboard_request_html(GtkClipboard *clipboard,
+void e_clipboard_request_html
+ (GtkClipboard *clipboard,
GtkClipboardTextReceivedFunc callback,
gpointer user_data);
gchar * e_clipboard_wait_for_calendar
diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c
index 16971ffbe8..e19084c4d6 100644
--- a/e-util/e-sorter-array.c
+++ b/e-util/e-sorter-array.c
@@ -49,7 +49,7 @@ static gboolean esa_needs_sorting (ESorter *esa);
#define ESA_NEEDS_SORTING(esa) (((ESorterArray *) (esa))->compare != NULL)
static gint
-esort_callback(gconstpointer data1, gconstpointer data2, gpointer user_data)
+esort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data)
{
ESorterArray *esa = user_data;
gint ret_val;
@@ -70,7 +70,7 @@ esort_callback(gconstpointer data1, gconstpointer data2, gpointer user_data)
}
static void
-esa_sort(ESorterArray *esa)
+esa_sort (ESorterArray *esa)
{
gint rows;
gint i;
@@ -80,29 +80,29 @@ esa_sort(ESorterArray *esa)
rows = esa->rows;
- esa->sorted = g_new(int, rows);
+ esa->sorted = g_new (int, rows);
for (i = 0; i < rows; i++)
esa->sorted[i] = i;
if (esa->compare)
g_qsort_with_data (
- esa->sorted, rows, sizeof(gint),
+ esa->sorted, rows, sizeof (gint),
esort_callback, esa);
}
static void
-esa_backsort(ESorterArray *esa)
+esa_backsort (ESorterArray *esa)
{
gint i, rows;
if (esa->backsorted)
return;
- esa_sort(esa);
+ esa_sort (esa);
rows = esa->rows;
- esa->backsorted = g_new0(int, rows);
+ esa->backsorted = g_new0 (int, rows);
for (i = 0; i < rows; i++) {
esa->backsorted[esa->sorted[i]] = i;
@@ -112,13 +112,13 @@ esa_backsort(ESorterArray *esa)
static gint
esa_model_to_sorted (ESorter *es, gint row)
{
- ESorterArray *esa = E_SORTER_ARRAY(es);
+ ESorterArray *esa = E_SORTER_ARRAY (es);
- g_return_val_if_fail(row >= 0, -1);
- g_return_val_if_fail(row < esa->rows, -1);
+ g_return_val_if_fail (row >= 0, -1);
+ g_return_val_if_fail (row < esa->rows, -1);
- if (ESA_NEEDS_SORTING(es))
- esa_backsort(esa);
+ if (ESA_NEEDS_SORTING (es))
+ esa_backsort (esa);
if (esa->backsorted)
return esa->backsorted[row];
@@ -131,11 +131,11 @@ esa_sorted_to_model (ESorter *es, gint row)
{
ESorterArray *esa = (ESorterArray *) es;
- g_return_val_if_fail(row >= 0, -1);
- g_return_val_if_fail(row < esa->rows, -1);
+ g_return_val_if_fail (row >= 0, -1);
+ g_return_val_if_fail (row < esa->rows, -1);
- if (ESA_NEEDS_SORTING(es))
- esa_sort(esa);
+ if (ESA_NEEDS_SORTING (es))
+ esa_sort (esa);
if (esa->sorted)
return esa->sorted[row];
@@ -146,9 +146,9 @@ esa_sorted_to_model (ESorter *es, gint row)
static void
esa_get_model_to_sorted_array (ESorter *es, gint **array, gint *count)
{
- ESorterArray *esa = E_SORTER_ARRAY(es);
+ ESorterArray *esa = E_SORTER_ARRAY (es);
if (array || count) {
- esa_backsort(esa);
+ esa_backsort (esa);
if (array)
*array = esa->backsorted;
@@ -160,9 +160,9 @@ esa_get_model_to_sorted_array (ESorter *es, gint **array, gint *count)
static void
esa_get_sorted_to_model_array (ESorter *es, gint **array, gint *count)
{
- ESorterArray *esa = E_SORTER_ARRAY(es);
+ ESorterArray *esa = E_SORTER_ARRAY (es);
if (array || count) {
- esa_sort(esa);
+ esa_sort (esa);
if (array)
*array = esa->sorted;
@@ -172,19 +172,19 @@ esa_get_sorted_to_model_array (ESorter *es, gint **array, gint *count)
}
static gboolean
-esa_needs_sorting(ESorter *es)
+esa_needs_sorting (ESorter *es)
{
- ESorterArray *esa = E_SORTER_ARRAY(es);
+ ESorterArray *esa = E_SORTER_ARRAY (es);
return esa->compare != NULL;
}
void
-e_sorter_array_clean(ESorterArray *esa)
+e_sorter_array_clean (ESorterArray *esa)
{
- g_free(esa->sorted);
+ g_free (esa->sorted);
esa->sorted = NULL;
- g_free(esa->backsorted);
+ g_free (esa->backsorted);
esa->backsorted = NULL;
}
@@ -199,11 +199,11 @@ void
e_sorter_array_append (ESorterArray *esa, gint count)
{
gint i;
- g_free(esa->backsorted);
+ g_free (esa->backsorted);
esa->backsorted = NULL;
if (esa->sorted) {
- esa->sorted = g_renew(int, esa->sorted, esa->rows + count);
+ esa->sorted = g_renew (int, esa->sorted, esa->rows + count);
for (i = 0; i < count; i++) {
gint value = esa->rows;
gsize pos;
@@ -244,7 +244,7 @@ e_sorter_array_new (ECompareRowsFunc compare, gpointer closure)
static void
e_sorter_array_class_init (ESorterArrayClass *klass)
{
- ESorterClass *sorter_class = E_SORTER_CLASS(klass);
+ ESorterClass *sorter_class = E_SORTER_CLASS (klass);
sorter_class->model_to_sorted = esa_model_to_sorted;
sorter_class->sorted_to_model = esa_sorted_to_model;
diff --git a/e-util/e-sorter.c b/e-util/e-sorter.c
index a2ff83f53d..74838e340d 100644
--- a/e-util/e-sorter.c
+++ b/e-util/e-sorter.c
@@ -41,7 +41,7 @@ static gint es_model_to_sorted (ESorter *es, gint row);
static gint es_sorted_to_model (ESorter *es, gint row);
static void es_get_model_to_sorted_array (ESorter *es, gint **array, gint *count);
static void es_get_sorted_to_model_array (ESorter *es, gint **array, gint *count);
-static gboolean es_needs_sorting(ESorter *es);
+static gboolean es_needs_sorting (ESorter *es);
static void
e_sorter_class_init (ESorterClass *klass)
@@ -89,7 +89,7 @@ es_get_sorted_to_model_array (ESorter *es, gint **array, gint *count)
}
static gboolean
-es_needs_sorting(ESorter *es)
+es_needs_sorting (ESorter *es)
{
return FALSE;
}
@@ -97,11 +97,11 @@ es_needs_sorting(ESorter *es)
gint
e_sorter_model_to_sorted (ESorter *es, gint row)
{
- g_return_val_if_fail(es != NULL, -1);
- g_return_val_if_fail(row >= 0, -1);
+ g_return_val_if_fail (es != NULL, -1);
+ g_return_val_if_fail (row >= 0, -1);
- if (E_SORTER_GET_CLASS(es)->model_to_sorted)
- return E_SORTER_GET_CLASS(es)->model_to_sorted (es, row);
+ if (E_SORTER_GET_CLASS (es)->model_to_sorted)
+ return E_SORTER_GET_CLASS (es)->model_to_sorted (es, row);
else
return -1;
}
@@ -109,11 +109,11 @@ e_sorter_model_to_sorted (ESorter *es, gint row)
gint
e_sorter_sorted_to_model (ESorter *es, gint row)
{
- g_return_val_if_fail(es != NULL, -1);
- g_return_val_if_fail(row >= 0, -1);
+ g_return_val_if_fail (es != NULL, -1);
+ g_return_val_if_fail (row >= 0, -1);
- if (E_SORTER_GET_CLASS(es)->sorted_to_model)
- return E_SORTER_GET_CLASS(es)->sorted_to_model (es, row);
+ if (E_SORTER_GET_CLASS (es)->sorted_to_model)
+ return E_SORTER_GET_CLASS (es)->sorted_to_model (es, row);
else
return -1;
}
@@ -121,28 +121,28 @@ e_sorter_sorted_to_model (ESorter *es, gint row)
void
e_sorter_get_model_to_sorted_array (ESorter *es, gint **array, gint *count)
{
- g_return_if_fail(es != NULL);
+ g_return_if_fail (es != NULL);
- if (E_SORTER_GET_CLASS(es)->get_model_to_sorted_array)
- E_SORTER_GET_CLASS(es)->get_model_to_sorted_array (es, array, count);
+ if (E_SORTER_GET_CLASS (es)->get_model_to_sorted_array)
+ E_SORTER_GET_CLASS (es)->get_model_to_sorted_array (es, array, count);
}
void
e_sorter_get_sorted_to_model_array (ESorter *es, gint **array, gint *count)
{
- g_return_if_fail(es != NULL);
+ g_return_if_fail (es != NULL);
- if (E_SORTER_GET_CLASS(es)->get_sorted_to_model_array)
- E_SORTER_GET_CLASS(es)->get_sorted_to_model_array (es, array, count);
+ if (E_SORTER_GET_CLASS (es)->get_sorted_to_model_array)
+ E_SORTER_GET_CLASS (es)->get_sorted_to_model_array (es, array, count);
}
gboolean
-e_sorter_needs_sorting(ESorter *es)
+e_sorter_needs_sorting (ESorter *es)
{
g_return_val_if_fail (es != NULL, FALSE);
- if (E_SORTER_GET_CLASS(es)->needs_sorting)
- return E_SORTER_GET_CLASS(es)->needs_sorting (es);
+ if (E_SORTER_GET_CLASS (es)->needs_sorting)
+ return E_SORTER_GET_CLASS (es)->needs_sorting (es);
else
return FALSE;
}
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
index bb8f7b6630..b5febfa89d 100644
--- a/e-util/e-text-event-processor-emacs-like.c
+++ b/e-util/e-text-event-processor-emacs-like.c
@@ -124,7 +124,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep,
ETextEventProcessorEvent *event)
{
ETextEventProcessorCommand command;
- ETextEventProcessorEmacsLike *tep_el = E_TEXT_EVENT_PROCESSOR_EMACS_LIKE(tep);
+ ETextEventProcessorEmacsLike *tep_el = E_TEXT_EVENT_PROCESSOR_EMACS_LIKE (tep);
command.action = E_TEP_NOP;
/* Warning from the Intel compiler here:
* e-text-event-processor-emacs-like.c(136): warning #589:
@@ -483,7 +483,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep,
}
command.action = E_TEP_INSERT;
command.position = E_TEP_SELECTION;
- command.value = strlen(key.string);
+ command.value = strlen (key.string);
command.string = key.string;
} else {
diff --git a/e-util/e-text-event-processor.c b/e-util/e-text-event-processor.c
index c79033d702..9e2b2d6474 100644
--- a/e-util/e-text-event-processor.c
+++ b/e-util/e-text-event-processor.c
@@ -96,8 +96,8 @@ gint
e_text_event_processor_handle_event (ETextEventProcessor *tep,
ETextEventProcessorEvent *event)
{
- if (E_TEXT_EVENT_PROCESSOR_GET_CLASS(tep)->event)
- return E_TEXT_EVENT_PROCESSOR_GET_CLASS(tep)->event(tep, event);
+ if (E_TEXT_EVENT_PROCESSOR_GET_CLASS (tep)->event)
+ return E_TEXT_EVENT_PROCESSOR_GET_CLASS (tep)->event (tep, event);
else
return 0;
}
diff --git a/e-util/e-unicode.c b/e-util/e-unicode.c
index 1d792f15ad..9d610bc5d8 100644
--- a/e-util/e-unicode.c
+++ b/e-util/e-unicode.c
@@ -190,7 +190,7 @@ e_utf8_to_charset_string_sized (const gchar *charset, const gchar *string, gint
ic = camel_iconv_open(charset, "utf-8");
ret = e_utf8_to_iconv_string_sized (ic, string, bytes);
- camel_iconv_close(ic);
+ camel_iconv_close (ic);
return ret;
}
@@ -205,7 +205,7 @@ e_utf8_from_locale_string_sized (const gchar *string, gint bytes)
ic = camel_iconv_open("utf-8", camel_iconv_locale_charset());
ret = e_utf8_from_iconv_string_sized (ic, string, bytes);
- camel_iconv_close(ic);
+ camel_iconv_close (ic);
return ret;
}
@@ -332,7 +332,7 @@ e_xml_get_translated_utf8_string_prop_by_name (const xmlNode *parent,
ret_val = g_strdup (gettext ((gchar *)prop));
xmlFree (prop);
}
- g_free(combined_name);
+ g_free (combined_name);
return ret_val;
}
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 3f27c52941..94fa715b44 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -663,7 +663,7 @@ e_format_number (gint number)
gchar *value;
gchar *value_iterator;
- locality = localeconv();
+ locality = localeconv ();
grouping = locality->grouping;
while (number) {
gchar *group;
@@ -672,7 +672,7 @@ e_format_number (gint number)
last_count = *grouping;
grouping++;
case 0:
- divider = epow10(last_count);
+ divider = epow10 (last_count);
if (number >= divider) {
group = g_strdup_printf("%0*d", last_count, number % divider);
} else {
@@ -685,8 +685,8 @@ e_format_number (gint number)
number = 0;
break;
}
- char_length += strlen(group);
- list = g_list_prepend(list, group);
+ char_length += strlen (group);
+ list = g_list_prepend (list, group);
group_count++;
}
@@ -698,14 +698,14 @@ e_format_number (gint number)
iterator = list;
value_iterator = value;
- strcpy(value_iterator, iterator->data);
- value_iterator += strlen(iterator->data);
+ strcpy (value_iterator, iterator->data);
+ value_iterator += strlen (iterator->data);
for (iterator = iterator->next; iterator; iterator = iterator->next) {
- strcpy(value_iterator, locality->thousands_sep);
- value_iterator += strlen(locality->thousands_sep);
+ strcpy (value_iterator, locality->thousands_sep);
+ value_iterator += strlen (locality->thousands_sep);
- strcpy(value_iterator, iterator->data);
- value_iterator += strlen(iterator->data);
+ strcpy (value_iterator, iterator->data);
+ value_iterator += strlen (iterator->data);
}
g_list_foreach (list, (GFunc) g_free, NULL);
g_list_free (list);
@@ -812,7 +812,7 @@ e_strftime_fix_am_pm (gchar *str, gsize max, const gchar *fmt,
if (strstr(fmt, "%p")==NULL && strstr(fmt, "%P")==NULL) {
/* No AM/PM involved - can use the fmt string directly */
- ret=e_strftime(str, max, fmt, tm);
+ ret=e_strftime (str, max, fmt, tm);
} else {
/* Get the AM/PM symbol from the locale */
e_strftime (buf, 10, "%p", tm);
@@ -820,11 +820,11 @@ e_strftime_fix_am_pm (gchar *str, gsize max, const gchar *fmt,
if (buf[0]) {
/* AM/PM have been defined in the locale
* so we can use the fmt string directly. */
- ret=e_strftime(str, max, fmt, tm);
+ ret=e_strftime (str, max, fmt, tm);
} else {
/* No AM/PM defined by locale
* must change to 24 hour clock. */
- ffmt=g_strdup(fmt);
+ ffmt=g_strdup (fmt);
for (sp=ffmt; (sp=strstr(sp, "%l")); sp++) {
/* Maybe this should be 'k', but I have never
* seen a 24 clock actually use that format. */
@@ -833,12 +833,12 @@ e_strftime_fix_am_pm (gchar *str, gsize max, const gchar *fmt,
for (sp=ffmt; (sp=strstr(sp, "%I")); sp++) {
sp[1]='H';
}
- ret=e_strftime(str, max, ffmt, tm);
- g_free(ffmt);
+ ret=e_strftime (str, max, ffmt, tm);
+ g_free (ffmt);
}
}
- return(ret);
+ return (ret);
}
gsize
@@ -848,17 +848,17 @@ e_utf8_strftime_fix_am_pm (gchar *str, gsize max, const gchar *fmt,
gsize sz, ret;
gchar *locale_fmt, *buf;
- locale_fmt = g_locale_from_utf8(fmt, -1, NULL, &sz, NULL);
+ locale_fmt = g_locale_from_utf8 (fmt, -1, NULL, &sz, NULL);
if (!locale_fmt)
return 0;
- ret = e_strftime_fix_am_pm(str, max, locale_fmt, tm);
+ ret = e_strftime_fix_am_pm (str, max, locale_fmt, tm);
if (!ret) {
g_free (locale_fmt);
return 0;
}
- buf = g_locale_to_utf8(str, ret, NULL, &sz, NULL);
+ buf = g_locale_to_utf8 (str, ret, NULL, &sz, NULL);
if (!buf) {
g_free (locale_fmt);
return 0;
@@ -866,16 +866,16 @@ e_utf8_strftime_fix_am_pm (gchar *str, gsize max, const gchar *fmt,
if (sz >= max) {
gchar *tmp = buf + max - 1;
- tmp = g_utf8_find_prev_char(buf, tmp);
+ tmp = g_utf8_find_prev_char (buf, tmp);
if (tmp)
sz = tmp - buf;
else
sz = 0;
}
- memcpy(str, buf, sz);
+ memcpy (str, buf, sz);
str[sz] = '\0';
- g_free(locale_fmt);
- g_free(buf);
+ g_free (locale_fmt);
+ g_free (buf);
return sz;
}
diff --git a/e-util/e-util.h b/e-util/e-util.h
index e3ce5cb103..42749c1c25 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -141,7 +141,8 @@ gchar * e_util_guess_mime_type (const gchar *filename,
GSList * e_util_get_category_filter_options
(void);
-void e_util_set_source_combo_box_list(GtkWidget *source_combo_box,
+void e_util_set_source_combo_box_list
+ (GtkWidget *source_combo_box,
const gchar *source_gconf_path);
G_END_DECLS
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
index 22daa3baa3..c83bbabf9d 100644
--- a/e-util/e-xml-utils.c
+++ b/e-util/e-xml-utils.c
@@ -78,7 +78,7 @@ e_xml_get_child_by_name_by_lang (const xmlNode *parent,
xmlChar *this_lang = xmlGetProp (child, (const guchar *)"lang");
if (this_lang == NULL) {
C = child;
- } else if (xmlStrcmp(this_lang, (xmlChar *)lang) == 0) {
+ } else if (xmlStrcmp (this_lang, (xmlChar *)lang) == 0) {
#ifdef G_OS_WIN32
g_free (freeme);
#endif
@@ -300,7 +300,7 @@ e_xml_get_bool_prop_by_name_with_default (const xmlNode *parent,
} else if (g_ascii_strcasecmp ((gchar *)prop, "false") == 0) {
ret_val = FALSE;
}
- xmlFree(prop);
+ xmlFree (prop);
}
return ret_val;
}
@@ -435,10 +435,10 @@ e_xml_get_translated_string_prop_by_name (const xmlNode *parent,
combined_name = g_strdup_printf("_%s", prop_name);
prop = xmlGetProp ((xmlNode *) parent, (guchar *)combined_name);
if (prop != NULL) {
- ret_val = g_strdup (gettext((gchar *)prop));
+ ret_val = g_strdup (gettext ((gchar *)prop));
xmlFree (prop);
}
- g_free(combined_name);
+ g_free (combined_name);
return ret_val;
}
diff --git a/e-util/gconf-bridge.c b/e-util/gconf-bridge.c
index d0f884d8fa..e2e83246a5 100644
--- a/e-util/gconf-bridge.c
+++ b/e-util/gconf-bridge.c
@@ -451,7 +451,7 @@ prop_binding_object_destroyed (gpointer user_data,
binding = (PropBinding *) user_data;
binding->object = NULL; /* Don't do anything with the object
- at unbind() */
+ * at unbind() */
g_hash_table_remove (bridge->bindings,
GUINT_TO_POINTER (binding->id));
@@ -757,7 +757,7 @@ window_binding_window_destroyed (gpointer user_data,
binding = (WindowBinding *) user_data;
binding->window = NULL; /* Don't do anything with the window
- at unbind() */
+ * at unbind() */
if (binding->sync_timeout_id > 0)
g_source_remove (binding->sync_timeout_id);
@@ -1060,7 +1060,7 @@ list_store_binding_store_destroyed (gpointer user_data,
binding = (ListStoreBinding *) user_data;
binding->list_store = NULL; /* Don't do anything with the store
- at unbind() */
+ * at unbind() */
g_hash_table_remove (bridge->bindings,
GUINT_TO_POINTER (binding->id));
diff --git a/em-format/em-format.c b/em-format/em-format.c
index b82420ae7a..38a91b0955 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -1328,6 +1328,7 @@ em_format_format_text (EMFormat *emf,
const gchar *charset = NULL;
CamelMimeFilterWindows *windows = NULL;
CamelStream *mem_stream = NULL;
+ const gchar *key;
gsize size;
gsize max;
GConfClient *gconf;
@@ -1376,8 +1377,10 @@ em_format_format_text (EMFormat *emf,
max = -1;
gconf = gconf_client_get_default ();
- if (gconf_client_get_bool (gconf, "/apps/evolution/mail/display/force_message_limit", NULL)) {
- max = gconf_client_get_int (gconf, "/apps/evolution/mail/display/message_text_part_limit", NULL);
+ key = "/apps/evolution/mail/display/force_message_limit";
+ if (gconf_client_get_bool (gconf, key, NULL)) {
+ key = "/apps/evolution/mail/display/message_text_part_limit";
+ max = gconf_client_get_int (gconf, key, NULL);
if (max == 0)
max = -1;
}
@@ -2163,7 +2166,9 @@ emf_inlinepgp_encrypted (EMFormat *emf,
static EMFormatHandler type_builtin_table[] = {
#ifdef ENABLE_SMIME
- { (gchar *) "application/x-pkcs7-mime", (EMFormatFunc)emf_application_xpkcs7mime, EM_FORMAT_HANDLER_INLINE_DISPOSITION },
+ { (gchar *) "application/x-pkcs7-mime",
+ emf_application_xpkcs7mime,
+ EM_FORMAT_HANDLER_INLINE_DISPOSITION },
#endif
{ (gchar *) "application/mbox", emf_application_mbox, EM_FORMAT_HANDLER_INLINE },
{ (gchar *) "multipart/alternative", emf_multipart_alternative },
@@ -2180,7 +2185,9 @@ static EMFormatHandler type_builtin_table[] = {
/* Insert brokenly-named parts here */
#ifdef ENABLE_SMIME
- { (gchar *) "application/pkcs7-mime", (EMFormatFunc)emf_application_xpkcs7mime, EM_FORMAT_HANDLER_INLINE_DISPOSITION },
+ { (gchar *) "application/pkcs7-mime",
+ emf_application_xpkcs7mime,
+ EM_FORMAT_HANDLER_INLINE_DISPOSITION },
#endif
/* internal types */
diff --git a/em-format/em-format.h b/em-format/em-format.h
index ebe9e840b9..2bb9ea1099 100644
--- a/em-format/em-format.h
+++ b/em-format/em-format.h
@@ -188,44 +188,53 @@ struct _EMFormat {
GObject parent;
EMFormatPrivate *priv;
- CamelMimeMessage *message; /* the current message */
+ /* The current message */
+ CamelMimeMessage *message;
CamelFolder *folder;
gchar *uid;
- GString *part_id; /* current part id prefix, for identifying parts directly */
+ /* Current part ID prefix for identifying parts directly. */
+ GString *part_id;
- GQueue header_list; /* if empty, then all */
+ /* If empty, then all. */
+ GQueue header_list;
- CamelSession *session; /* session, used for authentication when required */
- CamelURL *base; /* content-base header or absolute content-location, for any part */
+ /* Used for authentication when required. */
+ CamelSession *session;
- const gchar *snoop_mime_type; /* if we snooped an application/octet-stream type, what we snooped */
+ /* Content-Base header or absolute Content-Location, for any part. */
+ CamelURL *base;
- /* for validity enveloping */
+ /* If we snooped an application/octet-stream, what we snooped. */
+ const gchar *snoop_mime_type;
+
+ /* For validity enveloping. */
CamelCipherValidity *valid;
CamelCipherValidity *valid_parent;
- /* for checking whether found any signed/encrypted parts */
+
+ /* For checking whether we found any signed or encrypted parts. */
guint32 validity_found;
- /* for forcing inlining */
+ /* For forcing inlining. */
GHashTable *inline_table;
- /* global lookup table for message */
+ /* Global URI lookup table for message. */
GHashTable *pending_uri_table;
/* This structure is used internally to form a visibility tree of
* parts in the current formatting stream. This is to implement the
* part resolution rules for RFC2387 to implement multipart/related. */
GNode *pending_uri_tree;
- /* current level to search from */
+
+ /* The current level to search from. */
GNode *pending_uri_level;
- EMFormatMode mode; /* source/headers/etc */
- gchar *charset; /* charset override */
- gchar *default_charset; /* charset fallback */
- gboolean composer; /* Formatting from composer ?*/
- gboolean print;
+ EMFormatMode mode; /* source/headers/etc */
+ gchar *charset; /* charset override */
+ gchar *default_charset; /* charset fallback */
+ gboolean composer; /* formatting from composer? */
+ gboolean print; /* formatting for printing? */
};
struct _EMFormatClass {
diff --git a/filter/e-filter-code.c b/filter/e-filter-code.c
index ab2e19223c..510d4a8808 100644
--- a/filter/e-filter-code.c
+++ b/filter/e-filter-code.c
@@ -47,8 +47,8 @@ filter_code_build_code (EFilterElement *element,
l = fi->values;
while (l) {
- g_string_append(out, (gchar *)l->data);
- l = g_list_next(l);
+ g_string_append (out, (gchar *)l->data);
+ l = g_list_next (l);
}
if (!is_rawcode)
diff --git a/filter/e-filter-color.c b/filter/e-filter-color.c
index b181fe7c96..63aa2ca689 100644
--- a/filter/e-filter-color.c
+++ b/filter/e-filter-color.c
@@ -83,7 +83,7 @@ filter_color_xml_decode (EFilterElement *element,
prop = xmlGetProp(node, (xmlChar *)"spec");
if (prop != NULL) {
- gdk_color_parse((gchar *)prop, &fc->color);
+ gdk_color_parse ((gchar *)prop, &fc->color);
xmlFree (prop);
} else {
/* try reading the old RGB properties */
diff --git a/filter/e-filter-datespec.c b/filter/e-filter-datespec.c
index aa94bf5c90..b623a71cd2 100644
--- a/filter/e-filter-datespec.c
+++ b/filter/e-filter-datespec.c
@@ -127,7 +127,7 @@ set_button (EFilterDatespec *fds)
case FDST_SPECIFIED: {
struct tm tm;
- localtime_r(&fds->value, &tm);
+ localtime_r (&fds->value, &tm);
/* strftime for date filter display, only needs to show a day date (i.e. no time) */
strftime(buf, sizeof(buf), _("%d-%b-%Y"), &tm);
break; }
@@ -137,9 +137,9 @@ set_button (EFilterDatespec *fds)
else {
gint span, count;
- span = get_best_span(fds->value);
+ span = get_best_span (fds->value);
count = fds->value / timespans[span].seconds;
- sprintf(buf, ngettext(timespans[span].past_singular, timespans[span].past_plural, count), count);
+ sprintf (buf, ngettext (timespans[span].past_singular, timespans[span].past_plural, count), count);
}
break;
case FDST_X_FUTURE:
@@ -148,14 +148,14 @@ set_button (EFilterDatespec *fds)
else {
gint span, count;
- span = get_best_span(fds->value);
+ span = get_best_span (fds->value);
count = fds->value / timespans[span].seconds;
- sprintf(buf, ngettext(timespans[span].future_singular, timespans[span].future_plural, count), count);
+ sprintf (buf, ngettext (timespans[span].future_singular, timespans[span].future_plural, count), count);
}
break;
}
- gtk_label_set_text((GtkLabel *)fds->priv->label_button, label);
+ gtk_label_set_text ((GtkLabel *)fds->priv->label_button, label);
}
static void
@@ -168,19 +168,19 @@ get_values (EFilterDatespec *fds)
guint year, month, day;
struct tm tm;
- gtk_calendar_get_date((GtkCalendar *)p->calendar_specify, &year, &month, &day);
- memset(&tm, 0, sizeof(tm));
+ gtk_calendar_get_date ((GtkCalendar *)p->calendar_specify, &year, &month, &day);
+ memset (&tm, 0, sizeof (tm));
tm.tm_mday = day;
tm.tm_year = year - 1900;
tm.tm_mon = month;
- fds->value = mktime(&tm);
+ fds->value = mktime (&tm);
/* what about timezone? */
break; }
case FDST_X_FUTURE:
case FDST_X_AGO: {
gint val;
- val = gtk_spin_button_get_value_as_int((GtkSpinButton *)p->spin_relative);
+ val = gtk_spin_button_get_value_as_int ((GtkSpinButton *)p->spin_relative);
fds->value = timespans[p->span].seconds * val;
break; }
case FDST_NOW:
@@ -211,20 +211,20 @@ set_values (EFilterDatespec *fds)
{
struct tm tm;
- localtime_r(&fds->value, &tm);
- gtk_calendar_select_month((GtkCalendar*)p->calendar_specify, tm.tm_mon, tm.tm_year + 1900);
- gtk_calendar_select_day((GtkCalendar*)p->calendar_specify, tm.tm_mday);
+ localtime_r (&fds->value, &tm);
+ gtk_calendar_select_month ((GtkCalendar*)p->calendar_specify, tm.tm_mon, tm.tm_year + 1900);
+ gtk_calendar_select_day ((GtkCalendar*)p->calendar_specify, tm.tm_mday);
break;
}
case FDST_X_AGO:
- p->span = get_best_span(fds->value);
- gtk_spin_button_set_value((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds);
+ p->span = get_best_span (fds->value);
+ gtk_spin_button_set_value ((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds);
gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_relative), p->span);
gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_past_future), 0);
break;
case FDST_X_FUTURE:
- p->span = get_best_span(fds->value);
- gtk_spin_button_set_value((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds);
+ p->span = get_best_span (fds->value);
+ gtk_spin_button_set_value ((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds);
gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_relative), p->span);
gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_past_future), 1);
break;
@@ -397,9 +397,9 @@ filter_datespec_get_widget (EFilterElement *element)
fds->priv->label_button = gtk_label_new ("");
gtk_misc_set_alignment (GTK_MISC (fds->priv->label_button), 0.5, 0.5);
- set_button(fds);
+ set_button (fds);
- button = gtk_button_new();
+ button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), fds->priv->label_button);
g_signal_connect (button, "clicked", G_CALLBACK (button_clicked), fds);
diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c
index 727c546373..603ed1ab0a 100644
--- a/filter/e-rule-context.c
+++ b/filter/e-rule-context.c
@@ -211,7 +211,7 @@ rule_context_load (ERuleContext *context,
"Unable to load system rules '%s': %s",
system, g_strerror (errno));
g_warning ("%s: %s", G_STRFUNC, err_msg);
- rule_context_set_error(context, err_msg);
+ rule_context_set_error (context, err_msg);
/* no need to free err_msg here */
return -1;
}
@@ -224,7 +224,7 @@ rule_context_load (ERuleContext *context,
"Unable to load system rules '%s': "
"Invalid format", system);
g_warning ("%s: %s", G_STRFUNC, err_msg);
- rule_context_set_error(context, err_msg);
+ rule_context_set_error (context, err_msg);
/* no need to free err_msg here */
xmlFreeDoc (systemdoc);
return -1;
diff --git a/filter/e-rule-editor.c b/filter/e-rule-editor.c
index 9becdf80e4..4aca9612bb 100644
--- a/filter/e-rule-editor.c
+++ b/filter/e-rule-editor.c
@@ -217,7 +217,7 @@ update_selected_rule (ERuleEditor *editor)
static void
cursor_changed (GtkTreeView *treeview, ERuleEditor *editor)
{
- if (update_selected_rule(editor)) {
+ if (update_selected_rule (editor)) {
g_return_if_fail (editor->current);
e_rule_editor_set_sensitive (editor);
@@ -336,7 +336,7 @@ rule_edit (GtkWidget *widget, ERuleEditor *editor)
GtkWidget *rules;
GtkWidget *content_area;
- update_selected_rule(editor);
+ update_selected_rule (editor);
if (editor->current == NULL || editor->edit != NULL)
return;
@@ -382,7 +382,7 @@ rule_delete (GtkWidget *widget, ERuleEditor *editor)
GtkTreeIter iter;
gint pos, len;
- update_selected_rule(editor);
+ update_selected_rule (editor);
pos = e_rule_context_get_rank_rule (editor->context, editor->current, editor->source);
if (pos != -1) {
@@ -478,7 +478,7 @@ rule_top (GtkWidget *widget, ERuleEditor *editor)
{
gint pos;
- update_selected_rule(editor);
+ update_selected_rule (editor);
pos = e_rule_context_get_rank_rule (
editor->context, editor->current, editor->source);
@@ -491,7 +491,7 @@ rule_up (GtkWidget *widget, ERuleEditor *editor)
{
gint pos;
- update_selected_rule(editor);
+ update_selected_rule (editor);
pos = e_rule_context_get_rank_rule (
editor->context, editor->current, editor->source);
@@ -504,7 +504,7 @@ rule_down (GtkWidget *widget, ERuleEditor *editor)
{
gint pos;
- update_selected_rule(editor);
+ update_selected_rule (editor);
pos = e_rule_context_get_rank_rule (
editor->context, editor->current, editor->source);
@@ -519,7 +519,7 @@ rule_bottom (GtkWidget *widget, ERuleEditor *editor)
gint count = 0;
EFilterRule *rule = NULL;
- update_selected_rule(editor);
+ update_selected_rule (editor);
pos = e_rule_context_get_rank_rule (
editor->context, editor->current, editor->source);
diff --git a/libart_lgpl/art_misc.c b/libart_lgpl/art_misc.c
index 713522b580..08ddcd184c 100644
--- a/libart_lgpl/art_misc.c
+++ b/libart_lgpl/art_misc.c
@@ -61,17 +61,17 @@ art_warn (const gchar *fmt, ...)
va_end (ap);
}
-gpointer art_alloc(gsize size)
+gpointer art_alloc (gsize size)
{
- return malloc(size);
+ return malloc (size);
}
-void art_free(gpointer ptr)
+void art_free (gpointer ptr)
{
- free(ptr);
+ free (ptr);
}
-gpointer art_realloc(gpointer ptr, gsize size)
+gpointer art_realloc (gpointer ptr, gsize size)
{
- return realloc(ptr, size);
+ return realloc (ptr, size);
}
diff --git a/libart_lgpl/art_misc.h b/libart_lgpl/art_misc.h
index de91432c5a..a124413e70 100644
--- a/libart_lgpl/art_misc.h
+++ b/libart_lgpl/art_misc.h
@@ -29,9 +29,9 @@
#ifdef __cplusplus
extern "C" {
#endif
-gpointer art_alloc(gsize size);
-void art_free(gpointer ptr);
-gpointer art_realloc(gpointer ptr, gsize size);
+gpointer art_alloc (gsize size);
+void art_free (gpointer ptr);
+gpointer art_realloc (gpointer ptr, gsize size);
#ifdef __cplusplus
}
#endif /* __cplusplus */
@@ -47,7 +47,7 @@ gpointer art_realloc(gpointer ptr, gsize size);
be variables. They can also be pstruct->el lvalues. */
#define art_expand(p, type, max) \
do { if (max) { p = art_renew (p, type, max <<= 1); } \
- else { max = 1; p = art_new(type, 1); } } while (0)
+ else { max = 1; p = art_new (type, 1); } } while (0)
typedef gint art_boolean;
#define ART_FALSE 0
diff --git a/libart_lgpl/art_rect_svp.c b/libart_lgpl/art_rect_svp.c
index 5d92100179..0c4d39643e 100644
--- a/libart_lgpl/art_rect_svp.c
+++ b/libart_lgpl/art_rect_svp.c
@@ -65,7 +65,7 @@ art_drect_svp (ArtDRect *bbox, const ArtSVP *svp)
}
/**
- * art_drect_svp_union: Compute the bounding box of the svp and union it in to the existing bounding box.
+ * art_drect_svp_union:
* @bbox: Initial boundin box and where to store the bounding box.
* @svp: The SVP.
*
diff --git a/libart_lgpl/art_rect_uta.c b/libart_lgpl/art_rect_uta.c
index e7d1c77a5c..9a2f0c8ce9 100644
--- a/libart_lgpl/art_rect_uta.c
+++ b/libart_lgpl/art_rect_uta.c
@@ -77,24 +77,24 @@ art_rect_list_from_uta (ArtUta *uta, gint max_width, gint max_height,
bb = utiles[ix];
if (bb)
{
- x0 = ((uta->x0 + x) << ART_UTILE_SHIFT) + ART_UTA_BBOX_X0(bb);
- y0 = ((uta->y0 + y) << ART_UTILE_SHIFT) + ART_UTA_BBOX_Y0(bb);
- y1 = ((uta->y0 + y) << ART_UTILE_SHIFT) + ART_UTA_BBOX_Y1(bb);
+ x0 = ((uta->x0 + x) << ART_UTILE_SHIFT) + ART_UTA_BBOX_X0 (bb);
+ y0 = ((uta->y0 + y) << ART_UTILE_SHIFT) + ART_UTA_BBOX_Y0 (bb);
+ y1 = ((uta->y0 + y) << ART_UTILE_SHIFT) + ART_UTA_BBOX_Y1 (bb);
left_ix = ix;
/* now try to extend to the right */
while (x != width - 1 &&
- ART_UTA_BBOX_X1(bb) == ART_UTILE_SIZE &&
+ ART_UTA_BBOX_X1 (bb) == ART_UTILE_SIZE &&
(((bb & 0xffffff) ^ utiles[ix + 1]) & 0xffff00ff) == 0 &&
(((uta->x0 + x + 1) << ART_UTILE_SHIFT) +
- ART_UTA_BBOX_X1(utiles[ix + 1]) -
+ ART_UTA_BBOX_X1 (utiles[ix + 1]) -
x0) <= max_width)
{
bb = utiles[ix + 1];
ix++;
x++;
}
- x1 = ((uta->x0 + x) << ART_UTILE_SHIFT) + ART_UTA_BBOX_X1(bb);
+ x1 = ((uta->x0 + x) << ART_UTILE_SHIFT) + ART_UTA_BBOX_X1 (bb);
/* if rectangle nonempty */
if ((x1 ^ x0) | (y1 ^ y0))
diff --git a/libart_lgpl/art_render.h b/libart_lgpl/art_render.h
index e97d3bbddc..2f80368abd 100644
--- a/libart_lgpl/art_render.h
+++ b/libart_lgpl/art_render.h
@@ -97,7 +97,7 @@ struct _ArtMaskSource {
ArtRenderCallback super;
gint (*can_drive) (ArtMaskSource *self, ArtRender *render);
/* For each mask source, ::prepare() is invoked if it is not
- a driver, or ::invoke_driver() if it is. */
+ a driver, or ::invoke_driver () if it is. */
void (*invoke_driver) (ArtMaskSource *self, ArtRender *render);
void (*prepare) (ArtMaskSource *self, ArtRender *render, art_boolean first);
};
diff --git a/libart_lgpl/art_svp_intersect.c b/libart_lgpl/art_svp_intersect.c
index f79216c13a..1074d084d7 100644
--- a/libart_lgpl/art_svp_intersect.c
+++ b/libart_lgpl/art_svp_intersect.c
@@ -353,9 +353,9 @@ art_svp_writer_rewind_add_segment (ArtSvpWriter *self, gint wind_left,
if (swr->n_segs_max == seg_num)
{
swr->n_segs_max <<= 1;
- svp = (ArtSVP *)art_realloc (svp, sizeof(ArtSVP) +
+ svp = (ArtSVP *)art_realloc (svp, sizeof (ArtSVP) +
(swr->n_segs_max - 1) *
- sizeof(ArtSVPSeg));
+ sizeof (ArtSVPSeg));
swr->svp = svp;
swr->n_points_max = art_renew (swr->n_points_max, int,
swr->n_segs_max);
@@ -441,8 +441,8 @@ art_svp_writer_rewind_new (ArtWindRule rule)
result->rule = rule;
result->n_segs_max = 16;
- result->svp = art_alloc (sizeof(ArtSVP) +
- (result->n_segs_max - 1) * sizeof(ArtSVPSeg));
+ result->svp = art_alloc (sizeof (ArtSVP) +
+ (result->n_segs_max - 1) * sizeof (ArtSVPSeg));
result->svp->n_segs = 0;
result->n_points_max = art_new (int, result->n_segs_max);
@@ -1625,7 +1625,7 @@ art_svp_intersector (const ArtSVP *in, ArtSvpWriter *out)
ArtActiveSeg *seg = (ArtActiveSeg *)pri_point->user_data;
#ifdef SANITYCHECK
- art_svp_intersect_sanitycheck(ctx);
+ art_svp_intersect_sanitycheck (ctx);
#endif
if (ctx->y != pri_point->y)
diff --git a/libart_lgpl/art_svp_ops.c b/libart_lgpl/art_svp_ops.c
index 9c5d461bfd..72d360282a 100644
--- a/libart_lgpl/art_svp_ops.c
+++ b/libart_lgpl/art_svp_ops.c
@@ -57,9 +57,9 @@ art_svp_merge (const ArtSVP *svp1, const ArtSVP *svp2)
gint ix;
gint ix1, ix2;
- svp_new = (ArtSVP *)art_alloc (sizeof(ArtSVP) +
+ svp_new = (ArtSVP *)art_alloc (sizeof (ArtSVP) +
(svp1->n_segs + svp2->n_segs - 1) *
- sizeof(ArtSVPSeg));
+ sizeof (ArtSVPSeg));
ix1 = 0;
ix2 = 0;
for (ix = 0; ix < svp1->n_segs + svp2->n_segs; ix++)
diff --git a/libart_lgpl/art_svp_render_aa.c b/libart_lgpl/art_svp_render_aa.c
index e9ca3c9ba5..26f06e0ac8 100644
--- a/libart_lgpl/art_svp_render_aa.c
+++ b/libart_lgpl/art_svp_render_aa.c
@@ -176,7 +176,7 @@ art_svp_render_aa_iter (const ArtSVP *svp,
if (sx < n_steps) \
{ \
memmove (&steps[sx + 1], &steps[sx], \
- (n_steps - sx) * sizeof(steps[0])); \
+ (n_steps - sx) * sizeof (steps[0])); \
steps[sx].x = xpos; \
steps[sx].delta = xdelta; \
n_steps++; \
@@ -289,13 +289,13 @@ art_svp_render_aa_iter_step (ArtSVPRenderAAIter *iter, gint *p_start,
/* case 1, antialias a single pixel */
xdelta = (ix_min + 1 - (x_min + x_max) * 0.5) * delta;
- ADD_STEP(ix_min, xdelta)
+ ADD_STEP (ix_min, xdelta)
if (ix_min + 1 < x1)
{
xdelta = delta - xdelta;
- ADD_STEP(ix_min + 1, xdelta)
+ ADD_STEP (ix_min + 1, xdelta)
}
}
else
@@ -309,7 +309,7 @@ art_svp_render_aa_iter_step (ArtSVPRenderAAIter *iter, gint *p_start,
xdelta = last;
if (ix_min >= x0)
{
- ADD_STEP(ix_min, xdelta)
+ ADD_STEP (ix_min, xdelta)
x = ix_min + 1;
}
@@ -327,7 +327,7 @@ art_svp_render_aa_iter_step (ArtSVPRenderAAIter *iter, gint *p_start,
xdelta = this - last;
last = this;
- ADD_STEP(x, xdelta)
+ ADD_STEP (x, xdelta)
}
if (x < x1)
{
@@ -338,13 +338,13 @@ art_svp_render_aa_iter_step (ArtSVPRenderAAIter *iter, gint *p_start,
xdelta = this - last;
last = this;
- ADD_STEP(x, xdelta)
+ ADD_STEP (x, xdelta)
if (x + 1 < x1)
{
xdelta = delta - last;
- ADD_STEP(x + 1, xdelta)
+ ADD_STEP (x + 1, xdelta)
}
}
}
diff --git a/libart_lgpl/art_svp_vpath.c b/libart_lgpl/art_svp_vpath.c
index 47b1931140..b75bbea6f7 100644
--- a/libart_lgpl/art_svp_vpath.c
+++ b/libart_lgpl/art_svp_vpath.c
@@ -77,8 +77,8 @@ art_svp_from_vpath (ArtVpath *vpath)
n_segs = 0;
n_segs_max = 16;
- svp = (ArtSVP *)art_alloc (sizeof(ArtSVP) +
- (n_segs_max - 1) * sizeof(ArtSVPSeg));
+ svp = (ArtSVP *)art_alloc (sizeof (ArtSVP) +
+ (n_segs_max - 1) * sizeof (ArtSVPSeg));
dir = 0;
n_points = 0;
@@ -98,9 +98,9 @@ art_svp_from_vpath (ArtVpath *vpath)
if (n_segs == n_segs_max)
{
n_segs_max <<= 1;
- svp = (ArtSVP *)art_realloc (svp, sizeof(ArtSVP) +
+ svp = (ArtSVP *)art_realloc (svp, sizeof (ArtSVP) +
(n_segs_max - 1) *
- sizeof(ArtSVPSeg));
+ sizeof (ArtSVPSeg));
}
svp->segs[n_segs].n_points = n_points;
svp->segs[n_segs].dir = (dir > 0);
@@ -140,9 +140,9 @@ art_svp_from_vpath (ArtVpath *vpath)
if (n_segs == n_segs_max)
{
n_segs_max <<= 1;
- svp = (ArtSVP *)art_realloc (svp, sizeof(ArtSVP) +
+ svp = (ArtSVP *)art_realloc (svp, sizeof (ArtSVP) +
(n_segs_max - 1) *
- sizeof(ArtSVPSeg));
+ sizeof (ArtSVPSeg));
}
svp->segs[n_segs].n_points = n_points;
svp->segs[n_segs].dir = (dir > 0);
@@ -186,9 +186,9 @@ art_svp_from_vpath (ArtVpath *vpath)
if (n_segs == n_segs_max)
{
n_segs_max <<= 1;
- svp = (ArtSVP *)art_realloc (svp, sizeof(ArtSVP) +
+ svp = (ArtSVP *)art_realloc (svp, sizeof (ArtSVP) +
(n_segs_max - 1) *
- sizeof(ArtSVPSeg));
+ sizeof (ArtSVPSeg));
}
svp->segs[n_segs].n_points = n_points;
svp->segs[n_segs].dir = (dir > 0);
diff --git a/libart_lgpl/art_uta.c b/libart_lgpl/art_uta.c
index 4396e2b6c6..138fd8b30c 100644
--- a/libart_lgpl/art_uta.c
+++ b/libart_lgpl/art_uta.c
@@ -48,7 +48,7 @@ art_uta_new (gint x0, gint y0, gint x1, gint y1)
uta->utiles = art_new (ArtUtaBbox, uta->width * uta->height);
- memset (uta->utiles, 0, uta->width * uta->height * sizeof(ArtUtaBbox));
+ memset (uta->utiles, 0, uta->width * uta->height * sizeof (ArtUtaBbox));
return uta;
}
diff --git a/libart_lgpl/art_uta_vpath.c b/libart_lgpl/art_uta_vpath.c
index 9d5af1e844..841b9614d2 100644
--- a/libart_lgpl/art_uta_vpath.c
+++ b/libart_lgpl/art_uta_vpath.c
@@ -69,12 +69,12 @@ art_uta_add_line (ArtUta *uta, gdouble x0, gdouble y0, gdouble x1, gdouble y1,
gint ix, ix1;
ArtUtaBbox bb;
- xmin = floor (MIN(x0, x1));
- xmax = MAX(x0, x1);
+ xmin = floor (MIN (x0, x1));
+ xmax = MAX (x0, x1);
xmaxf = floor (xmax);
xmaxc = ceil (xmax);
- ymin = floor (MIN(y0, y1));
- ymax = MAX(y0, y1);
+ ymin = floor (MIN (y0, y1));
+ ymax = MAX (y0, y1);
ymaxf = floor (ymax);
ymaxc = ceil (ymax);
xt0 = (xmin >> ART_UTILE_SHIFT) - uta->x0;
@@ -92,12 +92,12 @@ art_uta_add_line (ArtUta *uta, gdouble x0, gdouble y0, gdouble x1, gdouble y1,
ix = yt0 * uta->width + xt0;
bb = uta->utiles[ix];
if (bb == 0)
- bb = ART_UTA_BBOX_CONS(xf0, yf0, xf1, yf1);
+ bb = ART_UTA_BBOX_CONS (xf0, yf0, xf1, yf1);
else
- bb = ART_UTA_BBOX_CONS(MIN(ART_UTA_BBOX_X0(bb), xf0),
- MIN(ART_UTA_BBOX_Y0(bb), yf0),
- MAX(ART_UTA_BBOX_X1(bb), xf1),
- MAX(ART_UTA_BBOX_Y1(bb), yf1));
+ bb = ART_UTA_BBOX_CONS (MIN (ART_UTA_BBOX_X0 (bb), xf0),
+ MIN (ART_UTA_BBOX_Y0 (bb), yf0),
+ MAX (ART_UTA_BBOX_X1 (bb), xf1),
+ MAX (ART_UTA_BBOX_Y1 (bb), yf1));
uta->utiles[ix] = bb;
}
else
@@ -123,24 +123,24 @@ art_uta_add_line (ArtUta *uta, gdouble x0, gdouble y0, gdouble x1, gdouble y1,
{
bb = uta->utiles[ix];
if (bb == 0)
- bb = ART_UTA_BBOX_CONS(xf0, yf0, ART_UTILE_SIZE, yf1);
+ bb = ART_UTA_BBOX_CONS (xf0, yf0, ART_UTILE_SIZE, yf1);
else
- bb = ART_UTA_BBOX_CONS(MIN(ART_UTA_BBOX_X0(bb), xf0),
- MIN(ART_UTA_BBOX_Y0(bb), yf0),
+ bb = ART_UTA_BBOX_CONS (MIN (ART_UTA_BBOX_X0 (bb), xf0),
+ MIN (ART_UTA_BBOX_Y0 (bb), yf0),
ART_UTILE_SIZE,
- MAX(ART_UTA_BBOX_Y1(bb), yf1));
+ MAX (ART_UTA_BBOX_Y1 (bb), yf1));
uta->utiles[ix] = bb;
xf0 = 0;
ix++;
}
bb = uta->utiles[ix];
if (bb == 0)
- bb = ART_UTA_BBOX_CONS(0, yf0, xf1, yf1);
+ bb = ART_UTA_BBOX_CONS (0, yf0, xf1, yf1);
else
- bb = ART_UTA_BBOX_CONS(0,
- MIN(ART_UTA_BBOX_Y0(bb), yf0),
- MAX(ART_UTA_BBOX_X1(bb), xf1),
- MAX(ART_UTA_BBOX_Y1(bb), yf1));
+ bb = ART_UTA_BBOX_CONS (0,
+ MIN (ART_UTA_BBOX_Y0 (bb), yf0),
+ MAX (ART_UTA_BBOX_X1 (bb), xf1),
+ MAX (ART_UTA_BBOX_Y1 (bb), yf1));
uta->utiles[ix] = bb;
}
else
@@ -225,8 +225,8 @@ art_uta_add_line (ArtUta *uta, gdouble x0, gdouble y0, gdouble x1, gdouble y1,
{
/* vertical crossing */
dix = uta->width;
- xf0 = (gint)floor (MIN(x, xn)) & (ART_UTILE_SIZE - 1);
- xmax = MAX(x, xn);
+ xf0 = (gint)floor (MIN (x, xn)) & (ART_UTILE_SIZE - 1);
+ xmax = MAX (x, xn);
xmaxc = (gint)ceil (xmax);
xf1 = xmaxc - (xt0 << ART_UTILE_SHIFT);
yf1 = ART_UTILE_SIZE;
@@ -239,33 +239,33 @@ art_uta_add_line (ArtUta *uta, gdouble x0, gdouble y0, gdouble x1, gdouble y1,
yf0 = (gint)floor (y) & (ART_UTILE_SIZE - 1);
bb = uta->utiles[ix];
if (bb == 0)
- bb = ART_UTA_BBOX_CONS(xf0, yf0, xf1, yf1);
+ bb = ART_UTA_BBOX_CONS (xf0, yf0, xf1, yf1);
else
- bb = ART_UTA_BBOX_CONS(MIN(ART_UTA_BBOX_X0(bb), xf0),
- MIN(ART_UTA_BBOX_Y0(bb), yf0),
- MAX(ART_UTA_BBOX_X1(bb), xf1),
- MAX(ART_UTA_BBOX_Y1(bb), yf1));
+ bb = ART_UTA_BBOX_CONS (MIN (ART_UTA_BBOX_X0 (bb), xf0),
+ MIN (ART_UTA_BBOX_Y0 (bb), yf0),
+ MAX (ART_UTA_BBOX_X1 (bb), xf1),
+ MAX (ART_UTA_BBOX_Y1 (bb), yf1));
uta->utiles[ix] = bb;
x = xn;
y = yn;
ix += dix;
}
- xmax = MAX(x, x1);
+ xmax = MAX (x, x1);
xmaxc = ceil (xmax);
ymaxc = ceil (y1);
- xf0 = (gint)floor (MIN(x1, x)) & (ART_UTILE_SIZE - 1);
+ xf0 = (gint)floor (MIN (x1, x)) & (ART_UTILE_SIZE - 1);
yf0 = (gint)floor (y) & (ART_UTILE_SIZE - 1);
xf1 = xmaxc - (xt0 << ART_UTILE_SHIFT);
yf1 = ymaxc - (yt0 << ART_UTILE_SHIFT);
bb = uta->utiles[ix];
if (bb == 0)
- bb = ART_UTA_BBOX_CONS(xf0, yf0, xf1, yf1);
+ bb = ART_UTA_BBOX_CONS (xf0, yf0, xf1, yf1);
else
- bb = ART_UTA_BBOX_CONS(MIN(ART_UTA_BBOX_X0(bb), xf0),
- MIN(ART_UTA_BBOX_Y0(bb), yf0),
- MAX(ART_UTA_BBOX_X1(bb), xf1),
- MAX(ART_UTA_BBOX_Y1(bb), yf1));
+ bb = ART_UTA_BBOX_CONS (MIN (ART_UTA_BBOX_X0 (bb), xf0),
+ MIN (ART_UTA_BBOX_Y0 (bb), yf0),
+ MAX (ART_UTA_BBOX_X1 (bb), xf1),
+ MAX (ART_UTA_BBOX_Y1 (bb), yf1));
uta->utiles[ix] = bb;
}
}
diff --git a/libart_lgpl/art_vpath_bpath.c b/libart_lgpl/art_vpath_bpath.c
index a748dfbec5..b662051e85 100644
--- a/libart_lgpl/art_vpath_bpath.c
+++ b/libart_lgpl/art_vpath_bpath.c
@@ -160,8 +160,8 @@ art_vpath_render_bez (ArtVpath **p_vpath, gint *pn, gint *pn_max,
* the other two control points are the same as the start point,
* too.
*/
- if (hypot(x1 - x0, y1 - y0) < 0.001
- && hypot(x2 - x0, y2 - y0) < 0.001)
+ if (hypot (x1 - x0, y1 - y0) < 0.001
+ && hypot (x2 - x0, y2 - y0) < 0.001)
goto nosubdivide;
else
goto subdivide;
diff --git a/libgnomecanvas/gailcanvas.c b/libgnomecanvas/gailcanvas.c
index f88debc569..06fca3e5d7 100644
--- a/libgnomecanvas/gailcanvas.c
+++ b/libgnomecanvas/gailcanvas.c
@@ -137,7 +137,7 @@ gail_canvas_init (void)
gail_canvas_text_factory_get_type ());
atk_registry_set_factory_type (atk_get_default_registry (),
GNOME_TYPE_CANVAS_WIDGET,
- gail_canvas_widget_factory_get_type());
+ gail_canvas_widget_factory_get_type ());
atk_registry_set_factory_type (atk_get_default_registry (),
GNOME_TYPE_CANVAS_ITEM,
gail_canvas_item_factory_get_type ());
diff --git a/libgnomecanvas/gailcanvas.h b/libgnomecanvas/gailcanvas.h
index 946ddc338a..707ddc3b63 100644
--- a/libgnomecanvas/gailcanvas.h
+++ b/libgnomecanvas/gailcanvas.h
@@ -66,7 +66,7 @@ AtkObject* gail_canvas_new (GtkWidget *widget);
void gail_canvas_init (void);
-GType gail_canvas_factory_get_type(void);
+GType gail_canvas_factory_get_type (void);
G_END_DECLS
diff --git a/libgnomecanvas/gailcanvasgroup.c b/libgnomecanvas/gailcanvasgroup.c
index 8f0ee238ad..0296997f84 100644
--- a/libgnomecanvas/gailcanvasgroup.c
+++ b/libgnomecanvas/gailcanvasgroup.c
@@ -25,7 +25,7 @@ static gint gail_canvas_group_get_n_children (AtkObject *obj);
static AtkObject* gail_canvas_group_ref_child (AtkObject *obj,
gint i);
-G_DEFINE_TYPE(GailCanvasGroup,
+G_DEFINE_TYPE (GailCanvasGroup,
gail_canvas_group,
GAIL_TYPE_CANVAS_ITEM);
diff --git a/libgnomecanvas/gailcanvasgroupfactory.h b/libgnomecanvas/gailcanvasgroupfactory.h
index 9c382aeabd..0724c6f12a 100644
--- a/libgnomecanvas/gailcanvasgroupfactory.h
+++ b/libgnomecanvas/gailcanvasgroupfactory.h
@@ -44,7 +44,7 @@ struct _GailCanvasGroupFactoryClass
AtkObjectFactoryClass parent_class;
};
-GType gail_canvas_group_factory_get_type(void);
+GType gail_canvas_group_factory_get_type (void);
G_END_DECLS
diff --git a/libgnomecanvas/gailcanvasitemfactory.h b/libgnomecanvas/gailcanvasitemfactory.h
index b5bea16d5a..4f5d51c6f7 100644
--- a/libgnomecanvas/gailcanvasitemfactory.h
+++ b/libgnomecanvas/gailcanvasitemfactory.h
@@ -44,7 +44,7 @@ struct _GailCanvasItemFactoryClass
AtkObjectFactoryClass parent_class;
};
-GType gail_canvas_item_factory_get_type(void);
+GType gail_canvas_item_factory_get_type (void);
G_END_DECLS
diff --git a/libgnomecanvas/gailcanvastext.c b/libgnomecanvas/gailcanvastext.c
index 98ace2d938..bffc806c8a 100644
--- a/libgnomecanvas/gailcanvastext.c
+++ b/libgnomecanvas/gailcanvastext.c
@@ -96,7 +96,7 @@ static gchar * get_text_near_offset (AtkText
gint *start_offset,
gint *end_offset);
-G_DEFINE_TYPE_WITH_CODE(GailCanvasText,
+G_DEFINE_TYPE_WITH_CODE (GailCanvasText,
gail_canvas_text,
GAIL_TYPE_CANVAS_ITEM,
G_IMPLEMENT_INTERFACE (ATK_TYPE_TEXT,
@@ -448,9 +448,9 @@ gail_canvas_text_remove_selection (AtkText *text,
g_return_val_if_fail (gail_text->textutil, FALSE);
buffer = gail_text->textutil->buffer;
- gtk_text_buffer_get_selection_bounds(buffer, &start, &end);
- select_start = gtk_text_iter_get_offset(&start);
- select_end = gtk_text_iter_get_offset(&end);
+ gtk_text_buffer_get_selection_bounds (buffer, &start, &end);
+ select_start = gtk_text_iter_get_offset (&start);
+ select_end = gtk_text_iter_get_offset (&end);
if (select_start != select_end)
{
@@ -490,9 +490,9 @@ gail_canvas_text_set_selection (AtkText *text,
g_return_val_if_fail (gail_text->textutil, FALSE);
buffer = gail_text->textutil->buffer;
- gtk_text_buffer_get_selection_bounds(buffer, &start, &end);
- select_start = gtk_text_iter_get_offset(&start);
- select_end = gtk_text_iter_get_offset(&end);
+ gtk_text_buffer_get_selection_bounds (buffer, &start, &end);
+ select_start = gtk_text_iter_get_offset (&start);
+ select_end = gtk_text_iter_get_offset (&end);
if (select_start != select_end)
{
diff --git a/libgnomecanvas/gailcanvastextfactory.h b/libgnomecanvas/gailcanvastextfactory.h
index b568151476..81b4940276 100644
--- a/libgnomecanvas/gailcanvastextfactory.h
+++ b/libgnomecanvas/gailcanvastextfactory.h
@@ -44,7 +44,7 @@ struct _GailCanvasTextFactoryClass
AtkObjectFactoryClass parent_class;
};
-GType gail_canvas_text_factory_get_type(void);
+GType gail_canvas_text_factory_get_type (void);
G_END_DECLS
diff --git a/libgnomecanvas/gailcanvaswidgetfactory.h b/libgnomecanvas/gailcanvaswidgetfactory.h
index 6edf8cc888..cb3a0a7f1c 100644
--- a/libgnomecanvas/gailcanvaswidgetfactory.h
+++ b/libgnomecanvas/gailcanvaswidgetfactory.h
@@ -44,7 +44,7 @@ struct _GailCanvasWidgetFactoryClass
AtkObjectFactoryClass parent_class;
};
-GType gail_canvas_widget_factory_get_type(void);
+GType gail_canvas_widget_factory_get_type (void);
G_END_DECLS
diff --git a/libgnomecanvas/gnome-canvas-bpath.c b/libgnomecanvas/gnome-canvas-bpath.c
index a63500304b..0a59712de2 100644
--- a/libgnomecanvas/gnome-canvas-bpath.c
+++ b/libgnomecanvas/gnome-canvas-bpath.c
@@ -152,7 +152,7 @@ gnome_canvas_bpath_get_property (GObject *object,
{
GnomeCanvasShape *shape;
- shape = GNOME_CANVAS_SHAPE(object);
+ shape = GNOME_CANVAS_SHAPE (object);
switch (param_id) {
case PROP_BPATH:
@@ -167,7 +167,7 @@ gnome_canvas_bpath_get_property (GObject *object,
static void
gnome_canvas_bpath_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
{
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->update) {
- (* GNOME_CANVAS_ITEM_CLASS(parent_class)->update)(item, affine, clip_path, flags);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->update) {
+ (* GNOME_CANVAS_ITEM_CLASS (parent_class)->update)(item, affine, clip_path, flags);
}
}
diff --git a/libgnomecanvas/gnome-canvas-line.c b/libgnomecanvas/gnome-canvas-line.c
index 563758b277..fa9179d024 100644
--- a/libgnomecanvas/gnome-canvas-line.c
+++ b/libgnomecanvas/gnome-canvas-line.c
@@ -1372,7 +1372,7 @@ gnome_canvas_line_point (GnomeCanvasItem *item, gdouble x, gdouble y,
to this routine -- this can cause a segfault here */
if ((line->first_arrow && !line->first_coords) ||
(line->last_arrow && !line->last_coords))
- reconfigure_arrows(line);
+ reconfigure_arrows (line);
/* If there are arrowheads, check the distance to them */
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index 6a3d433c07..5d290f1582 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -844,7 +844,7 @@ transform_pixbuf (guchar *dest,
for (i = 0; i < gdk_pixbuf_get_n_channels (pixbuf); i++)
*d++ = *src++;
- if (!gdk_pixbuf_get_has_alpha(pixbuf))
+ if (!gdk_pixbuf_get_has_alpha (pixbuf))
*d++ = 255; /* opaque */
}
}
@@ -981,14 +981,14 @@ gnome_canvas_pixbuf_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf)
g_object_unref (dest_pixbuf);
}
- else if (gdk_pixbuf_get_has_alpha(priv->pixbuf))
+ else if (gdk_pixbuf_get_has_alpha (priv->pixbuf))
art_rgb_rgba_affine (buf->buf,
buf->rect.x0, buf->rect.y0, buf->rect.x1, buf->rect.y1,
buf->buf_rowstride,
- gdk_pixbuf_get_pixels(priv->pixbuf),
- gdk_pixbuf_get_width(priv->pixbuf),
- gdk_pixbuf_get_height(priv->pixbuf),
- gdk_pixbuf_get_rowstride(priv->pixbuf),
+ gdk_pixbuf_get_pixels (priv->pixbuf),
+ gdk_pixbuf_get_width (priv->pixbuf),
+ gdk_pixbuf_get_height (priv->pixbuf),
+ gdk_pixbuf_get_rowstride (priv->pixbuf),
render_affine,
ART_FILTER_NEAREST,
NULL);
@@ -996,10 +996,10 @@ gnome_canvas_pixbuf_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf)
art_rgb_affine (buf->buf,
buf->rect.x0, buf->rect.y0, buf->rect.x1, buf->rect.y1,
buf->buf_rowstride,
- gdk_pixbuf_get_pixels(priv->pixbuf),
- gdk_pixbuf_get_width(priv->pixbuf),
- gdk_pixbuf_get_height(priv->pixbuf),
- gdk_pixbuf_get_rowstride(priv->pixbuf),
+ gdk_pixbuf_get_pixels (priv->pixbuf),
+ gdk_pixbuf_get_width (priv->pixbuf),
+ gdk_pixbuf_get_height (priv->pixbuf),
+ gdk_pixbuf_get_rowstride (priv->pixbuf),
render_affine,
ART_FILTER_NEAREST,
NULL);
diff --git a/libgnomecanvas/gnome-canvas-polygon.c b/libgnomecanvas/gnome-canvas-polygon.c
index e805a652e4..fe1d55b698 100644
--- a/libgnomecanvas/gnome-canvas-polygon.c
+++ b/libgnomecanvas/gnome-canvas-polygon.c
@@ -138,7 +138,7 @@ gnome_canvas_polygon_destroy (GtkObject *object)
/* remember, destroy can be run multiple times! */
if (poly->path_def)
- gnome_canvas_path_def_unref(poly->path_def);
+ gnome_canvas_path_def_unref (poly->path_def);
poly->path_def = NULL;
@@ -152,16 +152,16 @@ set_points (GnomeCanvasPolygon *poly, GnomeCanvasPoints *points)
gint i;
if (poly->path_def)
- gnome_canvas_path_def_unref(poly->path_def);
+ gnome_canvas_path_def_unref (poly->path_def);
if (!points) {
- poly->path_def = gnome_canvas_path_def_new();
+ poly->path_def = gnome_canvas_path_def_new ();
gnome_canvas_shape_set_path_def (GNOME_CANVAS_SHAPE (poly), poly->path_def);
return;
}
/* Optomize the path def to the number of points */
- poly->path_def = gnome_canvas_path_def_new_sized(points->num_points+1);
+ poly->path_def = gnome_canvas_path_def_new_sized (points->num_points+1);
#if 0
/* No need for explicit duplicate, as closepaths does it for us (Lauris) */
@@ -173,7 +173,7 @@ set_points (GnomeCanvasPolygon *poly, GnomeCanvasPoints *points)
gnome_canvas_path_def_moveto (poly->path_def, points->coords[0], points->coords[1]);
for (i = 1; i < points->num_points; i++) {
- gnome_canvas_path_def_lineto(poly->path_def, points->coords[i * 2], points->coords[(i * 2) + 1]);
+ gnome_canvas_path_def_lineto (poly->path_def, points->coords[i * 2], points->coords[(i * 2) + 1]);
}
gnome_canvas_path_def_closepath (poly->path_def);
diff --git a/libgnomecanvas/gnome-canvas-rect-ellipse.c b/libgnomecanvas/gnome-canvas-rect-ellipse.c
index bf318506ab..e086914bc4 100644
--- a/libgnomecanvas/gnome-canvas-rect-ellipse.c
+++ b/libgnomecanvas/gnome-canvas-rect-ellipse.c
@@ -287,19 +287,19 @@ gnome_canvas_rect_update (GnomeCanvasItem *item, gdouble affine[6], ArtSVP *clip
GnomeCanvasPathDef *path_def;
- re = GNOME_CANVAS_RE(item);
+ re = GNOME_CANVAS_RE (item);
if (re->path_dirty) {
path_def = gnome_canvas_path_def_new ();
- gnome_canvas_path_def_moveto(path_def, re->x1, re->y1);
- gnome_canvas_path_def_lineto(path_def, re->x2, re->y1);
- gnome_canvas_path_def_lineto(path_def, re->x2, re->y2);
- gnome_canvas_path_def_lineto(path_def, re->x1, re->y2);
- gnome_canvas_path_def_lineto(path_def, re->x1, re->y1);
- gnome_canvas_path_def_closepath_current(path_def);
+ gnome_canvas_path_def_moveto (path_def, re->x1, re->y1);
+ gnome_canvas_path_def_lineto (path_def, re->x2, re->y1);
+ gnome_canvas_path_def_lineto (path_def, re->x2, re->y2);
+ gnome_canvas_path_def_lineto (path_def, re->x1, re->y2);
+ gnome_canvas_path_def_lineto (path_def, re->x1, re->y1);
+ gnome_canvas_path_def_closepath_current (path_def);
gnome_canvas_shape_set_path_def (GNOME_CANVAS_SHAPE (item), path_def);
- gnome_canvas_path_def_unref(path_def);
+ gnome_canvas_path_def_unref (path_def);
re->path_dirty = 0;
}
@@ -354,16 +354,16 @@ gnome_canvas_ellipse_update (GnomeCanvasItem *item, gdouble affine[6], ArtSVP *c
GnomeCanvasPathDef *path_def;
GnomeCanvasRE *re;
- re = GNOME_CANVAS_RE(item);
+ re = GNOME_CANVAS_RE (item);
if (re->path_dirty) {
gdouble cx, cy, rx, ry;
- gdouble beta = 0.26521648983954400922; /* 4*(1-cos(pi/8))/(3*sin(pi/8)) */
+ gdouble beta = 0.26521648983954400922; /* 4*(1-cos (pi/8))/(3*sin (pi/8)) */
gdouble sincosA = 0.70710678118654752440; /* sin (pi/4), cos (pi/4) */
gdouble dx1, dy1, dx2, dy2;
gdouble mx, my;
- path_def = gnome_canvas_path_def_new();
+ path_def = gnome_canvas_path_def_new ();
cx = (re->x2 + re->x1) * 0.5;
cy = (re->y2 + re->y1) * 0.5;
@@ -412,10 +412,10 @@ gnome_canvas_ellipse_update (GnomeCanvasItem *item, gdouble affine[6], ArtSVP *c
cx + rx, cy + dy1,
cx + rx, cy);
- gnome_canvas_path_def_closepath_current(path_def);
+ gnome_canvas_path_def_closepath_current (path_def);
gnome_canvas_shape_set_path_def (GNOME_CANVAS_SHAPE (item), path_def);
- gnome_canvas_path_def_unref(path_def);
+ gnome_canvas_path_def_unref (path_def);
re->path_dirty = 0;
}
diff --git a/libgnomecanvas/gnome-canvas-rich-text.c b/libgnomecanvas/gnome-canvas-rich-text.c
index b8fbae962d..f5fb080af0 100644
--- a/libgnomecanvas/gnome-canvas-rich-text.c
+++ b/libgnomecanvas/gnome-canvas-rich-text.c
@@ -109,50 +109,50 @@ enum {
static GnomeCanvasItemClass *parent_class;
static guint signals[LAST_SIGNAL] = { 0 };
-static void gnome_canvas_rich_text_class_init(GnomeCanvasRichTextClass *klass);
-static void gnome_canvas_rich_text_init(GnomeCanvasRichText *text);
-static void gnome_canvas_rich_text_set_property(GObject *object, guint property_id,
+static void gnome_canvas_rich_text_class_init (GnomeCanvasRichTextClass *klass);
+static void gnome_canvas_rich_text_init (GnomeCanvasRichText *text);
+static void gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
const GValue *value, GParamSpec *pspec);
-static void gnome_canvas_rich_text_get_property(GObject *object, guint property_id,
+static void gnome_canvas_rich_text_get_property (GObject *object, guint property_id,
GValue *value, GParamSpec *pspec);
-static void gnome_canvas_rich_text_update(GnomeCanvasItem *item, gdouble *affine,
+static void gnome_canvas_rich_text_update (GnomeCanvasItem *item, gdouble *affine,
ArtSVP *clip_path, gint flags);
-static void gnome_canvas_rich_text_realize(GnomeCanvasItem *item);
-static void gnome_canvas_rich_text_unrealize(GnomeCanvasItem *item);
-static gdouble gnome_canvas_rich_text_point(GnomeCanvasItem *item,
+static void gnome_canvas_rich_text_realize (GnomeCanvasItem *item);
+static void gnome_canvas_rich_text_unrealize (GnomeCanvasItem *item);
+static gdouble gnome_canvas_rich_text_point (GnomeCanvasItem *item,
gdouble x, gdouble y,
gint cx, gint cy,
GnomeCanvasItem **actual_item);
-static void gnome_canvas_rich_text_draw(GnomeCanvasItem *item,
+static void gnome_canvas_rich_text_draw (GnomeCanvasItem *item,
GdkDrawable *drawable,
gint x, gint y, gint width, gint height);
-static void gnome_canvas_rich_text_render(GnomeCanvasItem *item,
+static void gnome_canvas_rich_text_render (GnomeCanvasItem *item,
GnomeCanvasBuf *buf);
-static gint gnome_canvas_rich_text_event(GnomeCanvasItem *item,
+static gint gnome_canvas_rich_text_event (GnomeCanvasItem *item,
GdkEvent *event);
-static void gnome_canvas_rich_text_get_bounds(GnomeCanvasItem *text,
+static void gnome_canvas_rich_text_get_bounds (GnomeCanvasItem *text,
gdouble *px1, gdouble *py1,
gdouble *px2, gdouble *py2);
-static void gnome_canvas_rich_text_ensure_layout(GnomeCanvasRichText *text);
-static void gnome_canvas_rich_text_destroy_layout(GnomeCanvasRichText *text);
-static void gnome_canvas_rich_text_start_cursor_blink(GnomeCanvasRichText *text,
+static void gnome_canvas_rich_text_ensure_layout (GnomeCanvasRichText *text);
+static void gnome_canvas_rich_text_destroy_layout (GnomeCanvasRichText *text);
+static void gnome_canvas_rich_text_start_cursor_blink (GnomeCanvasRichText *text,
gboolean delay);
-static void gnome_canvas_rich_text_stop_cursor_blink(GnomeCanvasRichText *text);
-static void gnome_canvas_rich_text_move_cursor(GnomeCanvasRichText *text,
+static void gnome_canvas_rich_text_stop_cursor_blink (GnomeCanvasRichText *text);
+static void gnome_canvas_rich_text_move_cursor (GnomeCanvasRichText *text,
GtkMovementStep step,
gint count,
gboolean extend_selection);
-static GtkTextBuffer *get_buffer(GnomeCanvasRichText *text);
-static gint blink_cb(gpointer data);
+static GtkTextBuffer *get_buffer (GnomeCanvasRichText *text);
+static gint blink_cb (gpointer data);
#define PREBLINK_TIME 300
#define CURSOR_ON_TIME 800
#define CURSOR_OFF_TIME 400
GType
-gnome_canvas_rich_text_get_type(void)
+gnome_canvas_rich_text_get_type (void)
{
static GType rich_text_type;
@@ -179,11 +179,11 @@ gnome_canvas_rich_text_get_type(void)
}
static void
-gnome_canvas_rich_text_finalize(GObject *object)
+gnome_canvas_rich_text_finalize (GObject *object)
{
GnomeCanvasRichText *text;
- text = GNOME_CANVAS_RICH_TEXT(object);
+ text = GNOME_CANVAS_RICH_TEXT (object);
g_free (text->_priv);
text->_priv = NULL;
@@ -193,11 +193,11 @@ gnome_canvas_rich_text_finalize(GObject *object)
}
static void
-gnome_canvas_rich_text_class_init(GnomeCanvasRichTextClass *klass)
+gnome_canvas_rich_text_class_init (GnomeCanvasRichTextClass *klass)
{
- GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
- GtkObjectClass *object_class = GTK_OBJECT_CLASS(klass);
- GnomeCanvasItemClass *item_class = GNOME_CANVAS_ITEM_CLASS(klass);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
+ GnomeCanvasItemClass *item_class = GNOME_CANVAS_ITEM_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
@@ -376,11 +376,11 @@ gnome_canvas_rich_text_class_init(GnomeCanvasRichTextClass *klass)
G_PARAM_READWRITE));
/* Signals */
- signals[TAG_CHANGED] = g_signal_new(
+ signals[TAG_CHANGED] = g_signal_new (
"tag_changed",
- G_TYPE_FROM_CLASS(object_class),
+ G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GnomeCanvasRichTextClass, tag_changed),
+ G_STRUCT_OFFSET (GnomeCanvasRichTextClass, tag_changed),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
@@ -399,14 +399,14 @@ gnome_canvas_rich_text_class_init(GnomeCanvasRichTextClass *klass)
} /* gnome_canvas_rich_text_class_init */
static void
-gnome_canvas_rich_text_init(GnomeCanvasRichText *text)
+gnome_canvas_rich_text_init (GnomeCanvasRichText *text)
{
#if 0
- GtkObject *object = GTK_OBJECT(text);
+ GtkObject *object = GTK_OBJECT (text);
object->flags |= GNOME_CANVAS_ITEM_ALWAYS_REDRAW;
#endif
- text->_priv = g_new0(GnomeCanvasRichTextPrivate, 1);
+ text->_priv = g_new0 (GnomeCanvasRichTextPrivate, 1);
/* Try to set some sane defaults */
text->_priv->cursor_visible = TRUE;
@@ -416,7 +416,7 @@ gnome_canvas_rich_text_init(GnomeCanvasRichText *text)
text->_priv->grow_height = FALSE;
text->_priv->wrap_mode = GTK_WRAP_WORD;
text->_priv->justification = GTK_JUSTIFY_LEFT;
- text->_priv->direction = gtk_widget_get_default_direction();
+ text->_priv->direction = gtk_widget_get_default_direction ();
text->_priv->anchor = GTK_ANCHOR_NW;
text->_priv->blink_timeout = 0;
@@ -430,17 +430,17 @@ static void
gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
const GValue *value, GParamSpec *pspec)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(object);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (object);
switch (property_id) {
case PROP_TEXT:
if (text->_priv->text)
- g_free(text->_priv->text);
+ g_free (text->_priv->text);
text->_priv->text = g_value_dup_string (value);
- gtk_text_buffer_set_text(
- get_buffer(text), text->_priv->text, strlen(text->_priv->text));
+ gtk_text_buffer_set_text (
+ get_buffer (text), text->_priv->text, strlen (text->_priv->text));
break;
case PROP_X:
@@ -460,7 +460,7 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->editable =
text->_priv->editable;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
case PROP_VISIBLE:
@@ -468,33 +468,33 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->invisible =
!text->_priv->visible;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
case PROP_CURSOR_VISIBLE:
text->_priv->cursor_visible = g_value_get_boolean (value);
if (text->_priv->layout) {
- gtk_text_layout_set_cursor_visible(
+ gtk_text_layout_set_cursor_visible (
text->_priv->layout, text->_priv->cursor_visible);
if (text->_priv->cursor_visible && text->_priv->cursor_blink) {
- gnome_canvas_rich_text_start_cursor_blink(
+ gnome_canvas_rich_text_start_cursor_blink (
text, FALSE);
}
else
- gnome_canvas_rich_text_stop_cursor_blink(text);
+ gnome_canvas_rich_text_stop_cursor_blink (text);
}
break;
case PROP_CURSOR_BLINK:
text->_priv->cursor_blink = g_value_get_boolean (value);
if (text->_priv->layout && text->_priv->cursor_visible) {
if (text->_priv->cursor_blink && !text->_priv->blink_timeout) {
- gnome_canvas_rich_text_start_cursor_blink(
+ gnome_canvas_rich_text_start_cursor_blink (
text, FALSE);
}
else if (!text->_priv->cursor_blink && text->_priv->blink_timeout) {
- gnome_canvas_rich_text_stop_cursor_blink(text);
- gtk_text_layout_set_cursor_visible(
+ gnome_canvas_rich_text_stop_cursor_blink (text);
+ gtk_text_layout_set_cursor_visible (
text->_priv->layout, TRUE);
}
}
@@ -509,7 +509,7 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->wrap_mode =
text->_priv->wrap_mode;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
case PROP_JUSTIFICATION:
@@ -518,7 +518,7 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->justification =
text->_priv->justification;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
case PROP_DIRECTION:
@@ -527,7 +527,7 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->direction =
text->_priv->direction;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
case PROP_ANCHOR:
@@ -539,7 +539,7 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->pixels_above_lines =
text->_priv->pixels_above_lines;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
case PROP_PIXELS_BELOW_LINES:
@@ -548,7 +548,7 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->pixels_below_lines =
text->_priv->pixels_below_lines;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
case PROP_PIXELS_INSIDE_WRAP:
@@ -557,7 +557,7 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->pixels_inside_wrap =
text->_priv->pixels_inside_wrap;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
case PROP_LEFT_MARGIN:
@@ -566,7 +566,7 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->left_margin =
text->_priv->left_margin;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
case PROP_RIGHT_MARGIN:
@@ -575,7 +575,7 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->right_margin =
text->_priv->right_margin;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
case PROP_INDENT:
@@ -583,7 +583,7 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
if (text->_priv->layout) {
text->_priv->layout->default_style->indent = text->_priv->indent;
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
break;
@@ -592,14 +592,14 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id,
break;
}
- gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(text));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text));
}
static void
gnome_canvas_rich_text_get_property (GObject *object, guint property_id,
GValue *value, GParamSpec *pspec)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(object);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (object);
switch (property_id) {
case PROP_TEXT:
@@ -666,103 +666,103 @@ gnome_canvas_rich_text_get_property (GObject *object, guint property_id,
}
static void
-gnome_canvas_rich_text_realize(GnomeCanvasItem *item)
+gnome_canvas_rich_text_realize (GnomeCanvasItem *item)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
- (* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize)(item);
+ (* GNOME_CANVAS_ITEM_CLASS (parent_class)->realize)(item);
- gnome_canvas_rich_text_ensure_layout(text);
+ gnome_canvas_rich_text_ensure_layout (text);
} /* gnome_canvas_rich_text_realize */
static void
-gnome_canvas_rich_text_unrealize(GnomeCanvasItem *item)
+gnome_canvas_rich_text_unrealize (GnomeCanvasItem *item)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
- gnome_canvas_rich_text_destroy_layout(text);
+ gnome_canvas_rich_text_destroy_layout (text);
- (* GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize)(item);
+ (* GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize)(item);
} /* gnome_canvas_rich_text_unrealize */
static void
-gnome_canvas_rich_text_move_iter_by_lines(GnomeCanvasRichText *text,
+gnome_canvas_rich_text_move_iter_by_lines (GnomeCanvasRichText *text,
GtkTextIter *newplace, gint count)
{
while (count < 0) {
- gtk_text_layout_move_iter_to_previous_line(
+ gtk_text_layout_move_iter_to_previous_line (
text->_priv->layout, newplace);
count++;
}
while (count > 0) {
- gtk_text_layout_move_iter_to_next_line(
+ gtk_text_layout_move_iter_to_next_line (
text->_priv->layout, newplace);
count--;
}
} /* gnome_canvas_rich_text_move_iter_by_lines */
static gint
-gnome_canvas_rich_text_get_cursor_x_position(GnomeCanvasRichText *text)
+gnome_canvas_rich_text_get_cursor_x_position (GnomeCanvasRichText *text)
{
GtkTextIter insert;
GdkRectangle rect;
- gtk_text_buffer_get_iter_at_mark(
- get_buffer(text), &insert,
+ gtk_text_buffer_get_iter_at_mark (
+ get_buffer (text), &insert,
gtk_text_buffer_get_mark(get_buffer(text), "insert"));
- gtk_text_layout_get_cursor_locations(
+ gtk_text_layout_get_cursor_locations (
text->_priv->layout, &insert, &rect, NULL);
return rect.x;
} /* gnome_canvas_rich_text_get_cursor_x_position */
static void
-gnome_canvas_rich_text_move_cursor(GnomeCanvasRichText *text,
+gnome_canvas_rich_text_move_cursor (GnomeCanvasRichText *text,
GtkMovementStep step,
gint count, gboolean extend_selection)
{
GtkTextIter insert, newplace;
- gtk_text_buffer_get_iter_at_mark(
- get_buffer(text), &insert,
+ gtk_text_buffer_get_iter_at_mark (
+ get_buffer (text), &insert,
gtk_text_buffer_get_mark(get_buffer(text), "insert"));
newplace = insert;
switch (step) {
case GTK_MOVEMENT_LOGICAL_POSITIONS:
- gtk_text_iter_forward_cursor_positions(&newplace, count);
+ gtk_text_iter_forward_cursor_positions (&newplace, count);
break;
case GTK_MOVEMENT_VISUAL_POSITIONS:
- gtk_text_layout_move_iter_visually(
+ gtk_text_layout_move_iter_visually (
text->_priv->layout, &newplace, count);
break;
case GTK_MOVEMENT_WORDS:
if (count < 0)
- gtk_text_iter_backward_word_starts(&newplace, -count);
+ gtk_text_iter_backward_word_starts (&newplace, -count);
else if (count > 0)
- gtk_text_iter_forward_word_ends(&newplace, count);
+ gtk_text_iter_forward_word_ends (&newplace, count);
break;
case GTK_MOVEMENT_DISPLAY_LINES:
- gnome_canvas_rich_text_move_iter_by_lines(
+ gnome_canvas_rich_text_move_iter_by_lines (
text, &newplace, count);
- gtk_text_layout_move_iter_to_x(
+ gtk_text_layout_move_iter_to_x (
text->_priv->layout, &newplace,
- gnome_canvas_rich_text_get_cursor_x_position(text));
+ gnome_canvas_rich_text_get_cursor_x_position (text));
break;
case GTK_MOVEMENT_DISPLAY_LINE_ENDS:
if (count > 1) {
- gnome_canvas_rich_text_move_iter_by_lines(
+ gnome_canvas_rich_text_move_iter_by_lines (
text, &newplace, --count);
}
else if (count < -1) {
- gnome_canvas_rich_text_move_iter_by_lines(
+ gnome_canvas_rich_text_move_iter_by_lines (
text, &newplace, ++count);
}
if (count != 0) {
- gtk_text_layout_move_iter_to_line_end(
+ gtk_text_layout_move_iter_to_line_end (
text->_priv->layout, &newplace, count);
}
break;
@@ -771,70 +771,70 @@ gnome_canvas_rich_text_move_cursor(GnomeCanvasRichText *text,
break;
case GTK_MOVEMENT_PARAGRAPH_ENDS:
if (count > 0)
- gtk_text_iter_forward_to_line_end(&newplace);
+ gtk_text_iter_forward_to_line_end (&newplace);
else if (count < 0)
- gtk_text_iter_set_line_offset(&newplace, 0);
+ gtk_text_iter_set_line_offset (&newplace, 0);
break;
case GTK_MOVEMENT_BUFFER_ENDS:
if (count > 0) {
- gtk_text_buffer_get_end_iter(
- get_buffer(text), &newplace);
+ gtk_text_buffer_get_end_iter (
+ get_buffer (text), &newplace);
}
else if (count < 0) {
- gtk_text_buffer_get_iter_at_offset(
- get_buffer(text), &newplace, 0);
+ gtk_text_buffer_get_iter_at_offset (
+ get_buffer (text), &newplace, 0);
}
break;
default:
break;
}
- if (!gtk_text_iter_equal(&insert, &newplace)) {
+ if (!gtk_text_iter_equal (&insert, &newplace)) {
if (extend_selection) {
- gtk_text_buffer_move_mark(
- get_buffer(text),
- gtk_text_buffer_get_mark(
+ gtk_text_buffer_move_mark (
+ get_buffer (text),
+ gtk_text_buffer_get_mark (
get_buffer(text), "insert"),
&newplace);
}
else {
- gtk_text_buffer_place_cursor(
- get_buffer(text), &newplace);
+ gtk_text_buffer_place_cursor (
+ get_buffer (text), &newplace);
}
}
- gnome_canvas_rich_text_start_cursor_blink(text, TRUE);
+ gnome_canvas_rich_text_start_cursor_blink (text, TRUE);
} /* gnome_canvas_rich_text_move_cursor */
static gboolean
-whitespace(gunichar ch, gpointer user_data)
+whitespace (gunichar ch, gpointer user_data)
{
return (ch == ' ' || ch == '\t');
} /* whitespace */
static gboolean
-not_whitespace(gunichar ch, gpointer user_data)
+not_whitespace (gunichar ch, gpointer user_data)
{
- return !whitespace(ch, user_data);
+ return !whitespace (ch, user_data);
} /* not_whitespace */
static gboolean
-find_whitespace_region(const GtkTextIter *center,
+find_whitespace_region (const GtkTextIter *center,
GtkTextIter *start, GtkTextIter *end)
{
*start = *center;
*end = *center;
- if (gtk_text_iter_backward_find_char(start, not_whitespace, NULL, NULL))
- gtk_text_iter_forward_char(start);
- if (whitespace(gtk_text_iter_get_char(end), NULL))
- gtk_text_iter_forward_find_char(end, not_whitespace, NULL, NULL);
+ if (gtk_text_iter_backward_find_char (start, not_whitespace, NULL, NULL))
+ gtk_text_iter_forward_char (start);
+ if (whitespace (gtk_text_iter_get_char (end), NULL))
+ gtk_text_iter_forward_find_char (end, not_whitespace, NULL, NULL);
- return !gtk_text_iter_equal(start, end);
+ return !gtk_text_iter_equal (start, end);
} /* find_whitespace_region */
static void
-gnome_canvas_rich_text_delete_from_cursor(GnomeCanvasRichText *text,
+gnome_canvas_rich_text_delete_from_cursor (GnomeCanvasRichText *text,
GtkDeleteType type,
gint count)
{
@@ -843,13 +843,13 @@ gnome_canvas_rich_text_delete_from_cursor(GnomeCanvasRichText *text,
/* Special case: If the user wants to delete a character and there is
a selection, then delete the selection and return */
if (type == GTK_DELETE_CHARS) {
- if (gtk_text_buffer_delete_selection(get_buffer(text), TRUE,
+ if (gtk_text_buffer_delete_selection (get_buffer (text), TRUE,
text->_priv->editable))
return;
}
- gtk_text_buffer_get_iter_at_mark(
- get_buffer(text), &insert,
+ gtk_text_buffer_get_iter_at_mark (
+ get_buffer (text), &insert,
gtk_text_buffer_get_mark(get_buffer(text), "insert"));
start = insert;
@@ -857,26 +857,26 @@ gnome_canvas_rich_text_delete_from_cursor(GnomeCanvasRichText *text,
switch (type) {
case GTK_DELETE_CHARS:
- gtk_text_iter_forward_cursor_positions(&end, count);
+ gtk_text_iter_forward_cursor_positions (&end, count);
break;
case GTK_DELETE_WORD_ENDS:
if (count > 0)
- gtk_text_iter_forward_word_ends(&end, count);
+ gtk_text_iter_forward_word_ends (&end, count);
else if (count < 0)
- gtk_text_iter_backward_word_starts(&start, -count);
+ gtk_text_iter_backward_word_starts (&start, -count);
break;
case GTK_DELETE_WORDS:
break;
case GTK_DELETE_DISPLAY_LINE_ENDS:
break;
case GTK_DELETE_PARAGRAPH_ENDS:
- if (gtk_text_iter_ends_line(&end)) {
- gtk_text_iter_forward_line(&end);
+ if (gtk_text_iter_ends_line (&end)) {
+ gtk_text_iter_forward_line (&end);
--count;
}
while (count > 0) {
- if (!gtk_text_iter_forward_to_line_end(&end))
+ if (!gtk_text_iter_forward_to_line_end (&end))
break;
--count;
@@ -884,34 +884,34 @@ gnome_canvas_rich_text_delete_from_cursor(GnomeCanvasRichText *text,
break;
case GTK_DELETE_PARAGRAPHS:
if (count > 0) {
- gtk_text_iter_set_line_offset(&start, 0);
- gtk_text_iter_forward_to_line_end(&end);
+ gtk_text_iter_set_line_offset (&start, 0);
+ gtk_text_iter_forward_to_line_end (&end);
/* Do the lines beyond the first. */
while (count > 1) {
- gtk_text_iter_forward_to_line_end(&end);
+ gtk_text_iter_forward_to_line_end (&end);
--count;
}
}
break;
case GTK_DELETE_WHITESPACE:
- find_whitespace_region(&insert, &start, &end);
+ find_whitespace_region (&insert, &start, &end);
break;
default:
break;
}
- if (!gtk_text_iter_equal(&start, &end)) {
- gtk_text_buffer_begin_user_action(get_buffer(text));
- gtk_text_buffer_delete_interactive(
- get_buffer(text), &start, &end, text->_priv->editable);
- gtk_text_buffer_end_user_action(get_buffer(text));
+ if (!gtk_text_iter_equal (&start, &end)) {
+ gtk_text_buffer_begin_user_action (get_buffer (text));
+ gtk_text_buffer_delete_interactive (
+ get_buffer (text), &start, &end, text->_priv->editable);
+ gtk_text_buffer_end_user_action (get_buffer (text));
}
} /* gnome_canvas_rich_text_delete_from_cursor */
static gint
-selection_motion_event_handler(GnomeCanvasRichText *text, GdkEvent *event,
+selection_motion_event_handler (GnomeCanvasRichText *text, GdkEvent *event,
gpointer data)
{
GtkTextIter newplace;
@@ -923,42 +923,42 @@ selection_motion_event_handler(GnomeCanvasRichText *text, GdkEvent *event,
return FALSE;
newx = (event->motion.x - text->_priv->x) *
- GNOME_CANVAS_ITEM(text)->canvas->pixels_per_unit;
+ GNOME_CANVAS_ITEM (text)->canvas->pixels_per_unit;
newy = (event->motion.y - text->_priv->y) *
- GNOME_CANVAS_ITEM(text)->canvas->pixels_per_unit;
+ GNOME_CANVAS_ITEM (text)->canvas->pixels_per_unit;
- gtk_text_layout_get_iter_at_pixel(text->_priv->layout, &newplace, newx, newy);
+ gtk_text_layout_get_iter_at_pixel (text->_priv->layout, &newplace, newx, newy);
mark = gtk_text_buffer_get_mark(get_buffer(text), "insert");
- gtk_text_buffer_move_mark(get_buffer(text), mark, &newplace);
+ gtk_text_buffer_move_mark (get_buffer (text), mark, &newplace);
return TRUE;
} /* selection_motion_event_handler */
static void
-gnome_canvas_rich_text_start_selection_drag(GnomeCanvasRichText *text,
+gnome_canvas_rich_text_start_selection_drag (GnomeCanvasRichText *text,
const GtkTextIter *iter,
GdkEventButton *button)
{
GtkTextIter newplace;
- g_return_if_fail(text->_priv->selection_drag_handler == 0);
+ g_return_if_fail (text->_priv->selection_drag_handler == 0);
#if 0
- gnome_canvas_item_grab_focus(GNOME_CANVAS_ITEM(text));
+ gnome_canvas_item_grab_focus (GNOME_CANVAS_ITEM (text));
#endif
newplace = *iter;
- gtk_text_buffer_place_cursor(get_buffer(text), &newplace);
+ gtk_text_buffer_place_cursor (get_buffer (text), &newplace);
- text->_priv->selection_drag_handler = g_signal_connect(
+ text->_priv->selection_drag_handler = g_signal_connect (
text, "event",
G_CALLBACK (selection_motion_event_handler),
NULL);
} /* gnome_canvas_rich_text_start_selection_drag */
static gboolean
-gnome_canvas_rich_text_end_selection_drag(GnomeCanvasRichText *text,
+gnome_canvas_rich_text_end_selection_drag (GnomeCanvasRichText *text,
GdkEventButton *event)
{
if (text->_priv->selection_drag_handler == 0)
@@ -968,24 +968,24 @@ gnome_canvas_rich_text_end_selection_drag(GnomeCanvasRichText *text,
text->_priv->selection_drag_handler = 0;
#if 0
- gnome_canvas_item_grab(NULL);
+ gnome_canvas_item_grab (NULL);
#endif
return TRUE;
} /* gnome_canvas_rich_text_end_selection_drag */
static void
-gnome_canvas_rich_text_emit_tag_changed(GnomeCanvasRichText *text,
+gnome_canvas_rich_text_emit_tag_changed (GnomeCanvasRichText *text,
GtkTextTag *tag)
{
- g_signal_emit(G_OBJECT(text), signals[TAG_CHANGED], 0, tag);
+ g_signal_emit (G_OBJECT (text), signals[TAG_CHANGED], 0, tag);
} /* gnome_canvas_rich_text_emit_tag_changed */
static gint
-gnome_canvas_rich_text_key_press_event(GnomeCanvasItem *item,
+gnome_canvas_rich_text_key_press_event (GnomeCanvasItem *item,
GdkEventKey *event)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
gboolean extend_selection = FALSE;
gboolean handled = FALSE;
@@ -1002,15 +1002,15 @@ gnome_canvas_rich_text_key_press_event(GnomeCanvasItem *item,
switch (event->keyval) {
case GDK_Return:
case GDK_KP_Enter:
- gtk_text_buffer_delete_selection(
- get_buffer(text), TRUE, text->_priv->editable);
- gtk_text_buffer_insert_interactive_at_cursor(
+ gtk_text_buffer_delete_selection (
+ get_buffer (text), TRUE, text->_priv->editable);
+ gtk_text_buffer_insert_interactive_at_cursor (
get_buffer(text), "\n", 1, text->_priv->editable);
handled = TRUE;
break;
case GDK_Tab:
- gtk_text_buffer_insert_interactive_at_cursor(
+ gtk_text_buffer_insert_interactive_at_cursor (
get_buffer(text), "\t", 1, text->_priv->editable);
handled = TRUE;
break;
@@ -1018,13 +1018,13 @@ gnome_canvas_rich_text_key_press_event(GnomeCanvasItem *item,
/* MOVEMENT */
case GDK_Right:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_WORDS, 1,
extend_selection);
handled = TRUE;
}
else {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_VISUAL_POSITIONS, 1,
extend_selection);
handled = TRUE;
@@ -1032,13 +1032,13 @@ gnome_canvas_rich_text_key_press_event(GnomeCanvasItem *item,
break;
case GDK_Left:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_WORDS, -1,
extend_selection);
handled = TRUE;
}
else {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_VISUAL_POSITIONS, -1,
extend_selection);
handled = TRUE;
@@ -1046,13 +1046,13 @@ gnome_canvas_rich_text_key_press_event(GnomeCanvasItem *item,
break;
case GDK_f:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_LOGICAL_POSITIONS, 1,
extend_selection);
handled = TRUE;
}
else if (event->state & GDK_MOD1_MASK) {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_WORDS, 1,
extend_selection);
handled = TRUE;
@@ -1060,33 +1060,33 @@ gnome_canvas_rich_text_key_press_event(GnomeCanvasItem *item,
break;
case GDK_b:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_LOGICAL_POSITIONS, -1,
extend_selection);
handled = TRUE;
}
else if (event->state & GDK_MOD1_MASK) {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_WORDS, -1,
extend_selection);
handled = TRUE;
}
break;
case GDK_Up:
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_DISPLAY_LINES, -1,
extend_selection);
handled = TRUE;
break;
case GDK_Down:
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_DISPLAY_LINES, 1,
extend_selection);
handled = TRUE;
break;
case GDK_p:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_DISPLAY_LINES, -1,
extend_selection);
handled = TRUE;
@@ -1094,27 +1094,27 @@ gnome_canvas_rich_text_key_press_event(GnomeCanvasItem *item,
break;
case GDK_n:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_DISPLAY_LINES, 1,
extend_selection);
handled = TRUE;
}
break;
case GDK_Home:
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_PARAGRAPH_ENDS, -1,
extend_selection);
handled = TRUE;
break;
case GDK_End:
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_PARAGRAPH_ENDS, 1,
extend_selection);
handled = TRUE;
break;
case GDK_a:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_PARAGRAPH_ENDS, -1,
extend_selection);
handled = TRUE;
@@ -1122,7 +1122,7 @@ gnome_canvas_rich_text_key_press_event(GnomeCanvasItem *item,
break;
case GDK_e:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_move_cursor(
+ gnome_canvas_rich_text_move_cursor (
text, GTK_MOVEMENT_PARAGRAPH_ENDS, 1,
extend_selection);
handled = TRUE;
@@ -1133,64 +1133,64 @@ gnome_canvas_rich_text_key_press_event(GnomeCanvasItem *item,
case GDK_Delete:
case GDK_KP_Delete:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_delete_from_cursor(
+ gnome_canvas_rich_text_delete_from_cursor (
text, GTK_DELETE_WORD_ENDS, 1);
handled = TRUE;
}
else {
- gnome_canvas_rich_text_delete_from_cursor(
+ gnome_canvas_rich_text_delete_from_cursor (
text, GTK_DELETE_CHARS, 1);
handled = TRUE;
}
break;
case GDK_d:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_delete_from_cursor(
+ gnome_canvas_rich_text_delete_from_cursor (
text, GTK_DELETE_CHARS, 1);
handled = TRUE;
}
else if (event->state & GDK_MOD1_MASK) {
- gnome_canvas_rich_text_delete_from_cursor(
+ gnome_canvas_rich_text_delete_from_cursor (
text, GTK_DELETE_WORD_ENDS, 1);
handled = TRUE;
}
break;
case GDK_BackSpace:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_delete_from_cursor(
+ gnome_canvas_rich_text_delete_from_cursor (
text, GTK_DELETE_WORD_ENDS, -1);
handled = TRUE;
}
else {
- gnome_canvas_rich_text_delete_from_cursor(
+ gnome_canvas_rich_text_delete_from_cursor (
text, GTK_DELETE_CHARS, -1);
}
handled = TRUE;
break;
case GDK_k:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_delete_from_cursor(
+ gnome_canvas_rich_text_delete_from_cursor (
text, GTK_DELETE_PARAGRAPH_ENDS, 1);
handled = TRUE;
}
break;
case GDK_u:
if (event->state & GDK_CONTROL_MASK) {
- gnome_canvas_rich_text_delete_from_cursor(
+ gnome_canvas_rich_text_delete_from_cursor (
text, GTK_DELETE_PARAGRAPHS, 1);
handled = TRUE;
}
break;
case GDK_space:
if (event->state & GDK_MOD1_MASK) {
- gnome_canvas_rich_text_delete_from_cursor(
+ gnome_canvas_rich_text_delete_from_cursor (
text, GTK_DELETE_WHITESPACE, 1);
handled = TRUE;
}
break;
case GDK_backslash:
if (event->state & GDK_MOD1_MASK) {
- gnome_canvas_rich_text_delete_from_cursor(
+ gnome_canvas_rich_text_delete_from_cursor (
text, GTK_DELETE_WHITESPACE, 1);
handled = TRUE;
}
@@ -1204,29 +1204,29 @@ gnome_canvas_rich_text_key_press_event(GnomeCanvasItem *item,
return FALSE;
if (!handled) {
- gtk_text_buffer_delete_selection(
- get_buffer(text), TRUE, text->_priv->editable);
- gtk_text_buffer_insert_interactive_at_cursor(
- get_buffer(text), event->string, event->length,
+ gtk_text_buffer_delete_selection (
+ get_buffer (text), TRUE, text->_priv->editable);
+ gtk_text_buffer_insert_interactive_at_cursor (
+ get_buffer (text), event->string, event->length,
text->_priv->editable);
}
- gnome_canvas_rich_text_start_cursor_blink(text, TRUE);
+ gnome_canvas_rich_text_start_cursor_blink (text, TRUE);
return TRUE;
} /* gnome_canvas_rich_text_key_press_event */
static gint
-gnome_canvas_rich_text_key_release_event(GnomeCanvasItem *item,
+gnome_canvas_rich_text_key_release_event (GnomeCanvasItem *item,
GdkEventKey *event)
{
return FALSE;
} /* gnome_canvas_rich_text_key_release_event */
static gboolean
-_click(gpointer data)
+_click (gpointer data)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(data);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (data);
text->_priv->clicks = 0;
text->_priv->click_timeout = 0;
@@ -1235,10 +1235,10 @@ _click(gpointer data)
} /* _click */
static gint
-gnome_canvas_rich_text_button_press_event(GnomeCanvasItem *item,
+gnome_canvas_rich_text_button_press_event (GnomeCanvasItem *item,
GdkEventButton *event)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
GtkTextIter iter;
GdkEventType event_type;
gdouble newx, newy;
@@ -1246,14 +1246,14 @@ gnome_canvas_rich_text_button_press_event(GnomeCanvasItem *item,
newx = (event->x - text->_priv->x) * item->canvas->pixels_per_unit;
newy = (event->y - text->_priv->y) * item->canvas->pixels_per_unit;
- gtk_text_layout_get_iter_at_pixel(text->_priv->layout, &iter, newx, newy);
+ gtk_text_layout_get_iter_at_pixel (text->_priv->layout, &iter, newx, newy);
/* The canvas doesn't give us double- or triple-click events, so
we have to synthesize them ourselves. Yay. */
event_type = event->type;
if (event_type == GDK_BUTTON_PRESS) {
text->_priv->clicks++;
- text->_priv->click_timeout = g_timeout_add(400, _click, text);
+ text->_priv->click_timeout = g_timeout_add (400, _click, text);
if (text->_priv->clicks > 3)
text->_priv->clicks = text->_priv->clicks % 3;
@@ -1271,14 +1271,14 @@ gnome_canvas_rich_text_button_press_event(GnomeCanvasItem *item,
if (event->button == 1 && event_type == GDK_BUTTON_PRESS) {
GtkTextIter start, end;
- if (gtk_text_buffer_get_selection_bounds(
- get_buffer(text), &start, &end) &&
- gtk_text_iter_in_range(&iter, &start, &end)) {
+ if (gtk_text_buffer_get_selection_bounds (
+ get_buffer (text), &start, &end) &&
+ gtk_text_iter_in_range (&iter, &start, &end)) {
text->_priv->drag_start_x = event->x;
text->_priv->drag_start_y = event->y;
}
else {
- gnome_canvas_rich_text_start_selection_drag(
+ gnome_canvas_rich_text_start_selection_drag (
text, &iter, event);
}
@@ -1291,26 +1291,26 @@ gnome_canvas_rich_text_button_press_event(GnomeCanvasItem *item,
printf("double-click\n");
#endif
- gnome_canvas_rich_text_end_selection_drag(text, event);
+ gnome_canvas_rich_text_end_selection_drag (text, event);
start = iter;
end = start;
- if (gtk_text_iter_inside_word(&start)) {
- if (!gtk_text_iter_starts_word(&start))
- gtk_text_iter_backward_word_start(&start);
+ if (gtk_text_iter_inside_word (&start)) {
+ if (!gtk_text_iter_starts_word (&start))
+ gtk_text_iter_backward_word_start (&start);
- if (!gtk_text_iter_ends_word(&end))
- gtk_text_iter_forward_word_end(&end);
+ if (!gtk_text_iter_ends_word (&end))
+ gtk_text_iter_forward_word_end (&end);
}
- gtk_text_buffer_move_mark(
- get_buffer(text),
- gtk_text_buffer_get_selection_bound(get_buffer(text)),
+ gtk_text_buffer_move_mark (
+ get_buffer (text),
+ gtk_text_buffer_get_selection_bound (get_buffer (text)),
&start);
- gtk_text_buffer_move_mark(
- get_buffer(text),
- gtk_text_buffer_get_insert(get_buffer(text)), &end);
+ gtk_text_buffer_move_mark (
+ get_buffer (text),
+ gtk_text_buffer_get_insert (get_buffer (text)), &end);
text->_priv->just_selected_element = TRUE;
@@ -1323,41 +1323,41 @@ gnome_canvas_rich_text_button_press_event(GnomeCanvasItem *item,
printf("triple-click\n");
#endif
- gnome_canvas_rich_text_end_selection_drag(text, event);
+ gnome_canvas_rich_text_end_selection_drag (text, event);
start = iter;
end = start;
- if (gtk_text_layout_iter_starts_line(text->_priv->layout, &start)) {
- gtk_text_layout_move_iter_to_line_end(
+ if (gtk_text_layout_iter_starts_line (text->_priv->layout, &start)) {
+ gtk_text_layout_move_iter_to_line_end (
text->_priv->layout, &start, -1);
}
else {
- gtk_text_layout_move_iter_to_line_end(
+ gtk_text_layout_move_iter_to_line_end (
text->_priv->layout, &start, -1);
- if (!gtk_text_layout_iter_starts_line(
+ if (!gtk_text_layout_iter_starts_line (
text->_priv->layout, &end)) {
- gtk_text_layout_move_iter_to_line_end(
+ gtk_text_layout_move_iter_to_line_end (
text->_priv->layout, &end, 1);
}
}
- gtk_text_buffer_move_mark(
- get_buffer(text),
- gtk_text_buffer_get_selection_bound(get_buffer(text)),
+ gtk_text_buffer_move_mark (
+ get_buffer (text),
+ gtk_text_buffer_get_selection_bound (get_buffer (text)),
&start);
- gtk_text_buffer_move_mark(
- get_buffer(text),
- gtk_text_buffer_get_insert(get_buffer(text)), &end);
+ gtk_text_buffer_move_mark (
+ get_buffer (text),
+ gtk_text_buffer_get_insert (get_buffer (text)), &end);
text->_priv->just_selected_element = TRUE;
return TRUE;
}
else if (event->button == 2 && event_type == GDK_BUTTON_PRESS) {
- gtk_text_buffer_paste_clipboard(
- get_buffer(text),
+ gtk_text_buffer_paste_clipboard (
+ get_buffer (text),
gtk_clipboard_get (GDK_SELECTION_PRIMARY),
&iter, text->_priv->editable);
}
@@ -1366,10 +1366,10 @@ gnome_canvas_rich_text_button_press_event(GnomeCanvasItem *item,
} /* gnome_canvas_rich_text_button_press_event */
static gint
-gnome_canvas_rich_text_button_release_event(GnomeCanvasItem *item,
+gnome_canvas_rich_text_button_release_event (GnomeCanvasItem *item,
GdkEventButton *event)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
gdouble newx, newy;
newx = (event->x - text->_priv->x) * item->canvas->pixels_per_unit;
@@ -1381,7 +1381,7 @@ gnome_canvas_rich_text_button_release_event(GnomeCanvasItem *item,
text->_priv->drag_start_y = -1;
}
- if (gnome_canvas_rich_text_end_selection_drag(text, event))
+ if (gnome_canvas_rich_text_end_selection_drag (text, event))
return TRUE;
else if (text->_priv->just_selected_element) {
text->_priv->just_selected_element = FALSE;
@@ -1390,10 +1390,10 @@ gnome_canvas_rich_text_button_release_event(GnomeCanvasItem *item,
else {
GtkTextIter iter;
- gtk_text_layout_get_iter_at_pixel(
+ gtk_text_layout_get_iter_at_pixel (
text->_priv->layout, &iter, newx, newy);
- gtk_text_buffer_place_cursor(get_buffer(text), &iter);
+ gtk_text_buffer_place_cursor (get_buffer (text), &iter);
return FALSE;
}
@@ -1403,37 +1403,37 @@ gnome_canvas_rich_text_button_release_event(GnomeCanvasItem *item,
} /* gnome_canvas_rich_text_button_release_event */
static gint
-gnome_canvas_rich_text_focus_in_event(GnomeCanvasItem *item,
+gnome_canvas_rich_text_focus_in_event (GnomeCanvasItem *item,
GdkEventFocus *event)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
if (text->_priv->cursor_visible && text->_priv->layout) {
- gtk_text_layout_set_cursor_visible(text->_priv->layout, TRUE);
- gnome_canvas_rich_text_start_cursor_blink(text, FALSE);
+ gtk_text_layout_set_cursor_visible (text->_priv->layout, TRUE);
+ gnome_canvas_rich_text_start_cursor_blink (text, FALSE);
}
return FALSE;
} /* gnome_canvas_rich_text_focus_in_event */
static gint
-gnome_canvas_rich_text_focus_out_event(GnomeCanvasItem *item,
+gnome_canvas_rich_text_focus_out_event (GnomeCanvasItem *item,
GdkEventFocus *event)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
if (text->_priv->cursor_visible && text->_priv->layout) {
- gtk_text_layout_set_cursor_visible(text->_priv->layout, FALSE);
- gnome_canvas_rich_text_stop_cursor_blink(text);
+ gtk_text_layout_set_cursor_visible (text->_priv->layout, FALSE);
+ gnome_canvas_rich_text_stop_cursor_blink (text);
}
return FALSE;
} /* gnome_canvas_rich_text_focus_out_event */
static gboolean
-get_event_coordinates(GdkEvent *event, gint *x, gint *y)
+get_event_coordinates (GdkEvent *event, gint *x, gint *y)
{
- g_return_val_if_fail(event, FALSE);
+ g_return_val_if_fail (event, FALSE);
switch (event->type) {
case GDK_MOTION_NOTIFY:
@@ -1454,49 +1454,49 @@ get_event_coordinates(GdkEvent *event, gint *x, gint *y)
} /* get_event_coordinates */
static void
-emit_event_on_tags(GnomeCanvasRichText *text, GdkEvent *event,
+emit_event_on_tags (GnomeCanvasRichText *text, GdkEvent *event,
GtkTextIter *iter)
{
GSList *tags;
GSList *i;
- tags = gtk_text_iter_get_tags(iter);
+ tags = gtk_text_iter_get_tags (iter);
i = tags;
while (i) {
GtkTextTag *tag = i->data;
- gtk_text_tag_event(tag, G_OBJECT(text), event, iter);
+ gtk_text_tag_event (tag, G_OBJECT (text), event, iter);
/* The cursor has been moved to within this tag. Emit the
tag_changed signal */
if (event->type == GDK_BUTTON_RELEASE ||
event->type == GDK_KEY_PRESS ||
event->type == GDK_KEY_RELEASE) {
- gnome_canvas_rich_text_emit_tag_changed(
+ gnome_canvas_rich_text_emit_tag_changed (
text, tag);
}
- i = g_slist_next(i);
+ i = g_slist_next (i);
}
- g_slist_free(tags);
+ g_slist_free (tags);
} /* emit_event_on_tags */
static gint
-gnome_canvas_rich_text_event(GnomeCanvasItem *item, GdkEvent *event)
+gnome_canvas_rich_text_event (GnomeCanvasItem *item, GdkEvent *event)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
gint x, y;
- if (get_event_coordinates(event, &x, &y)) {
+ if (get_event_coordinates (event, &x, &y)) {
GtkTextIter iter;
x -= text->_priv->x;
y -= text->_priv->y;
- gtk_text_layout_get_iter_at_pixel(text->_priv->layout, &iter, x, y);
- emit_event_on_tags(text, event, &iter);
+ gtk_text_layout_get_iter_at_pixel (text->_priv->layout, &iter, x, y);
+ emit_event_on_tags (text, event, &iter);
}
else if (event->type == GDK_KEY_PRESS ||
event->type == GDK_KEY_RELEASE) {
@@ -1504,23 +1504,23 @@ gnome_canvas_rich_text_event(GnomeCanvasItem *item, GdkEvent *event)
GtkTextIter iter;
insert = gtk_text_buffer_get_mark(get_buffer(text), "insert");
- gtk_text_buffer_get_iter_at_mark(
- get_buffer(text), &iter, insert);
- emit_event_on_tags(text, event, &iter);
+ gtk_text_buffer_get_iter_at_mark (
+ get_buffer (text), &iter, insert);
+ emit_event_on_tags (text, event, &iter);
}
switch (event->type) {
case GDK_KEY_PRESS:
- return gnome_canvas_rich_text_key_press_event(
+ return gnome_canvas_rich_text_key_press_event (
item, (GdkEventKey *) event);
case GDK_KEY_RELEASE:
- return gnome_canvas_rich_text_key_release_event(
+ return gnome_canvas_rich_text_key_release_event (
item, (GdkEventKey *) event);
case GDK_BUTTON_PRESS:
- return gnome_canvas_rich_text_button_press_event(
+ return gnome_canvas_rich_text_button_press_event (
item, (GdkEventButton *) event);
case GDK_BUTTON_RELEASE:
- return gnome_canvas_rich_text_button_release_event(
+ return gnome_canvas_rich_text_button_release_event (
item, (GdkEventButton *) event);
case GDK_FOCUS_CHANGE:
{
@@ -1534,10 +1534,10 @@ gnome_canvas_rich_text_event(GnomeCanvasItem *item, GdkEvent *event)
return FALSE;
if (((GdkEventFocus *) event)->in)
- return gnome_canvas_rich_text_focus_in_event(
+ return gnome_canvas_rich_text_focus_in_event (
item, (GdkEventFocus *) event);
else
- return gnome_canvas_rich_text_focus_out_event(
+ return gnome_canvas_rich_text_focus_out_event (
item, (GdkEventFocus *) event);
}
default:
@@ -1555,12 +1555,12 @@ gnome_canvas_rich_text_event(GnomeCanvasItem *item, GdkEvent *event)
* if it's editable.
**/
void
-gnome_canvas_rich_text_cut_clipboard(GnomeCanvasRichText *text)
+gnome_canvas_rich_text_cut_clipboard (GnomeCanvasRichText *text)
{
- g_return_if_fail(text);
- g_return_if_fail(get_buffer(text));
+ g_return_if_fail (text);
+ g_return_if_fail (get_buffer (text));
- gtk_text_buffer_cut_clipboard(get_buffer(text),
+ gtk_text_buffer_cut_clipboard (get_buffer (text),
gtk_clipboard_get (GDK_SELECTION_PRIMARY),
text->_priv->editable);
} /* gnome_canvas_rich_text_cut_clipboard */
@@ -1572,12 +1572,12 @@ gnome_canvas_rich_text_cut_clipboard(GnomeCanvasRichText *text)
* Copies the currently selected @text to clipboard.
**/
void
-gnome_canvas_rich_text_copy_clipboard(GnomeCanvasRichText *text)
+gnome_canvas_rich_text_copy_clipboard (GnomeCanvasRichText *text)
{
- g_return_if_fail(text);
- g_return_if_fail(get_buffer(text));
+ g_return_if_fail (text);
+ g_return_if_fail (get_buffer (text));
- gtk_text_buffer_copy_clipboard(get_buffer(text),
+ gtk_text_buffer_copy_clipboard (get_buffer (text),
gtk_clipboard_get (GDK_SELECTION_PRIMARY));
} /* gnome_canvas_rich_text_cut_clipboard */
@@ -1588,54 +1588,54 @@ gnome_canvas_rich_text_copy_clipboard(GnomeCanvasRichText *text)
* Pastes the contents of the clipboard at the insertion point.
**/
void
-gnome_canvas_rich_text_paste_clipboard(GnomeCanvasRichText *text)
+gnome_canvas_rich_text_paste_clipboard (GnomeCanvasRichText *text)
{
- g_return_if_fail(text);
- g_return_if_fail(get_buffer(text));
+ g_return_if_fail (text);
+ g_return_if_fail (get_buffer (text));
- gtk_text_buffer_paste_clipboard(get_buffer(text),
+ gtk_text_buffer_paste_clipboard (get_buffer (text),
gtk_clipboard_get (GDK_SELECTION_PRIMARY),
NULL,
text->_priv->editable);
} /* gnome_canvas_rich_text_cut_clipboard */
static gint
-preblink_cb(gpointer data)
+preblink_cb (gpointer data)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(data);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (data);
text->_priv->preblink_timeout = 0;
- gnome_canvas_rich_text_start_cursor_blink(text, FALSE);
+ gnome_canvas_rich_text_start_cursor_blink (text, FALSE);
/* Remove ourselves */
return FALSE;
} /* preblink_cb */
static gint
-blink_cb(gpointer data)
+blink_cb (gpointer data)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(data);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (data);
gboolean visible;
- g_assert(text->_priv->layout);
- g_assert(text->_priv->cursor_visible);
+ g_assert (text->_priv->layout);
+ g_assert (text->_priv->cursor_visible);
- visible = gtk_text_layout_get_cursor_visible(text->_priv->layout);
+ visible = gtk_text_layout_get_cursor_visible (text->_priv->layout);
if (visible)
- text->_priv->blink_timeout = g_timeout_add(
+ text->_priv->blink_timeout = g_timeout_add (
CURSOR_OFF_TIME, blink_cb, text);
else
- text->_priv->blink_timeout = g_timeout_add(
+ text->_priv->blink_timeout = g_timeout_add (
CURSOR_ON_TIME, blink_cb, text);
- gtk_text_layout_set_cursor_visible(text->_priv->layout, !visible);
+ gtk_text_layout_set_cursor_visible (text->_priv->layout, !visible);
/* Remove ourself */
return FALSE;
} /* blink_cb */
static void
-gnome_canvas_rich_text_start_cursor_blink(GnomeCanvasRichText *text,
+gnome_canvas_rich_text_start_cursor_blink (GnomeCanvasRichText *text,
gboolean with_delay)
{
if (!text->_priv->layout)
@@ -1645,35 +1645,35 @@ gnome_canvas_rich_text_start_cursor_blink(GnomeCanvasRichText *text,
return;
if (text->_priv->preblink_timeout != 0) {
- g_source_remove(text->_priv->preblink_timeout);
+ g_source_remove (text->_priv->preblink_timeout);
text->_priv->preblink_timeout = 0;
}
if (with_delay) {
if (text->_priv->blink_timeout != 0) {
- g_source_remove(text->_priv->blink_timeout);
+ g_source_remove (text->_priv->blink_timeout);
text->_priv->blink_timeout = 0;
}
- gtk_text_layout_set_cursor_visible(text->_priv->layout, TRUE);
+ gtk_text_layout_set_cursor_visible (text->_priv->layout, TRUE);
- text->_priv->preblink_timeout = g_timeout_add(
+ text->_priv->preblink_timeout = g_timeout_add (
PREBLINK_TIME, preblink_cb, text);
}
else {
if (text->_priv->blink_timeout == 0) {
- gtk_text_layout_set_cursor_visible(text->_priv->layout, TRUE);
- text->_priv->blink_timeout = g_timeout_add(
+ gtk_text_layout_set_cursor_visible (text->_priv->layout, TRUE);
+ text->_priv->blink_timeout = g_timeout_add (
CURSOR_ON_TIME, blink_cb, text);
}
}
} /* gnome_canvas_rich_text_start_cursor_blink */
static void
-gnome_canvas_rich_text_stop_cursor_blink(GnomeCanvasRichText *text)
+gnome_canvas_rich_text_stop_cursor_blink (GnomeCanvasRichText *text)
{
if (text->_priv->blink_timeout) {
- g_source_remove(text->_priv->blink_timeout);
+ g_source_remove (text->_priv->blink_timeout);
text->_priv->blink_timeout = 0;
}
} /* gnome_canvas_rich_text_stop_cursor_blink */
@@ -1681,35 +1681,35 @@ gnome_canvas_rich_text_stop_cursor_blink(GnomeCanvasRichText *text)
/* We have to request updates this way because the update cycle is not
re-entrant. This will fire off a request in an idle loop. */
static gboolean
-request_update(gpointer data)
+request_update (gpointer data)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(data);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (data);
- gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(text));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text));
return FALSE;
} /* request_update */
static void
-invalidated_handler(GtkTextLayout *layout, gpointer data)
+invalidated_handler (GtkTextLayout *layout, gpointer data)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(data);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (data);
#if 0
printf("Text is being invalidated.\n");
#endif
- gtk_text_layout_validate(text->_priv->layout, 2000);
+ gtk_text_layout_validate (text->_priv->layout, 2000);
/* We are called from the update cycle; gotta put this in an idle
loop. */
- g_idle_add(request_update, text);
+ g_idle_add (request_update, text);
} /* invalidated_handler */
static void
-scale_fonts(GtkTextTag *tag, gpointer data)
+scale_fonts (GtkTextTag *tag, gpointer data)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(data);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (data);
/* XXX GtkTextTag::values is sealed with apparently no way
* to access it. This looks like a small optimization
@@ -1719,38 +1719,38 @@ scale_fonts(GtkTextTag *tag, gpointer data)
return;
#endif
- g_object_set(
+ g_object_set (
G_OBJECT(tag), "scale",
text->_priv->layout->default_style->font_scale, NULL);
} /* scale_fonts */
static void
-changed_handler(GtkTextLayout *layout, gint start_y,
+changed_handler (GtkTextLayout *layout, gint start_y,
gint old_height, gint new_height, gpointer data)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(data);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (data);
#if 0
printf("Layout %p is being changed.\n", text->_priv->layout);
#endif
if (text->_priv->layout->default_style->font_scale !=
- GNOME_CANVAS_ITEM(text)->canvas->pixels_per_unit) {
+ GNOME_CANVAS_ITEM (text)->canvas->pixels_per_unit) {
GtkTextTagTable *tag_table;
text->_priv->layout->default_style->font_scale =
- GNOME_CANVAS_ITEM(text)->canvas->pixels_per_unit;
+ GNOME_CANVAS_ITEM (text)->canvas->pixels_per_unit;
- tag_table = gtk_text_buffer_get_tag_table(get_buffer(text));
- gtk_text_tag_table_foreach(tag_table, scale_fonts, text);
+ tag_table = gtk_text_buffer_get_tag_table (get_buffer (text));
+ gtk_text_tag_table_foreach (tag_table, scale_fonts, text);
- gtk_text_layout_default_style_changed(text->_priv->layout);
+ gtk_text_layout_default_style_changed (text->_priv->layout);
}
if (text->_priv->grow_height) {
gint width, height;
- gtk_text_layout_get_size(text->_priv->layout, &width, &height);
+ gtk_text_layout_get_size (text->_priv->layout, &width, &height);
if (height > text->_priv->height)
text->_priv->height = height;
@@ -1758,7 +1758,7 @@ changed_handler(GtkTextLayout *layout, gint start_y,
/* We are called from the update cycle; gotta put this in an idle
loop. */
- g_idle_add(request_update, text);
+ g_idle_add (request_update, text);
} /* changed_handler */
/**
@@ -1769,40 +1769,40 @@ changed_handler(GtkTextLayout *layout, gint start_y,
* Sets the buffer field of the @text to @buffer.
**/
void
-gnome_canvas_rich_text_set_buffer(GnomeCanvasRichText *text,
+gnome_canvas_rich_text_set_buffer (GnomeCanvasRichText *text,
GtkTextBuffer *buffer)
{
- g_return_if_fail(GNOME_IS_CANVAS_RICH_TEXT(text));
- g_return_if_fail(buffer == NULL || GTK_IS_TEXT_BUFFER(buffer));
+ g_return_if_fail (GNOME_IS_CANVAS_RICH_TEXT (text));
+ g_return_if_fail (buffer == NULL || GTK_IS_TEXT_BUFFER (buffer));
if (text->_priv->buffer == buffer)
return;
if (text->_priv->buffer != NULL) {
- g_object_unref(G_OBJECT(text->_priv->buffer));
+ g_object_unref (G_OBJECT (text->_priv->buffer));
}
text->_priv->buffer = buffer;
if (buffer) {
- g_object_ref(G_OBJECT(buffer));
+ g_object_ref (G_OBJECT (buffer));
if (text->_priv->layout)
- gtk_text_layout_set_buffer(text->_priv->layout, buffer);
+ gtk_text_layout_set_buffer (text->_priv->layout, buffer);
}
- gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(text));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (text));
} /* gnome_canvas_rich_text_set_buffer */
static GtkTextBuffer *
-get_buffer(GnomeCanvasRichText *text)
+get_buffer (GnomeCanvasRichText *text)
{
if (!text->_priv->buffer) {
GtkTextBuffer *b;
- b = gtk_text_buffer_new(NULL);
- gnome_canvas_rich_text_set_buffer(text, b);
- g_object_unref(G_OBJECT(b));
+ b = gtk_text_buffer_new (NULL);
+ gnome_canvas_rich_text_set_buffer (text, b);
+ g_object_unref (G_OBJECT (b));
}
return text->_priv->buffer;
@@ -1818,11 +1818,11 @@ get_buffer(GnomeCanvasRichText *text)
* Return value: the #GtkTextBuffer.
**/
GtkTextBuffer *
-gnome_canvas_rich_text_get_buffer(GnomeCanvasRichText *text)
+gnome_canvas_rich_text_get_buffer (GnomeCanvasRichText *text)
{
- g_return_val_if_fail(GNOME_IS_CANVAS_RICH_TEXT(text), NULL);
+ g_return_val_if_fail (GNOME_IS_CANVAS_RICH_TEXT (text), NULL);
- return get_buffer(text);
+ return get_buffer (text);
} /* gnome_canvas_rich_text_get_buffer */
/**
@@ -1870,7 +1870,7 @@ gnome_canvas_rich_text_get_iter_at_location (GnomeCanvasRichText *text,
}
static void
-gnome_canvas_rich_text_set_attributes_from_style(GnomeCanvasRichText *text,
+gnome_canvas_rich_text_set_attributes_from_style (GnomeCanvasRichText *text,
GtkTextAttributes *values,
GtkStyle *style)
{
@@ -1885,46 +1885,46 @@ gnome_canvas_rich_text_set_attributes_from_style(GnomeCanvasRichText *text,
} /* gnome_canvas_rich_text_set_attributes_from_style */
static void
-gnome_canvas_rich_text_ensure_layout(GnomeCanvasRichText *text)
+gnome_canvas_rich_text_ensure_layout (GnomeCanvasRichText *text)
{
if (!text->_priv->layout) {
GtkWidget *canvas;
GtkTextAttributes *style;
PangoContext *ltr_context, *rtl_context;
- text->_priv->layout = gtk_text_layout_new();
+ text->_priv->layout = gtk_text_layout_new ();
- gtk_text_layout_set_screen_width(text->_priv->layout, text->_priv->width);
+ gtk_text_layout_set_screen_width (text->_priv->layout, text->_priv->width);
- if (get_buffer(text)) {
- gtk_text_layout_set_buffer(
- text->_priv->layout, get_buffer(text));
+ if (get_buffer (text)) {
+ gtk_text_layout_set_buffer (
+ text->_priv->layout, get_buffer (text));
}
/* Setup the cursor stuff */
- gtk_text_layout_set_cursor_visible(
+ gtk_text_layout_set_cursor_visible (
text->_priv->layout, text->_priv->cursor_visible);
if (text->_priv->cursor_visible && text->_priv->cursor_blink)
- gnome_canvas_rich_text_start_cursor_blink(text, FALSE);
+ gnome_canvas_rich_text_start_cursor_blink (text, FALSE);
else
- gnome_canvas_rich_text_stop_cursor_blink(text);
+ gnome_canvas_rich_text_stop_cursor_blink (text);
- canvas = GTK_WIDGET(GNOME_CANVAS_ITEM(text)->canvas);
+ canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas);
- ltr_context = gtk_widget_create_pango_context(canvas);
- pango_context_set_base_dir(ltr_context, PANGO_DIRECTION_LTR);
- rtl_context = gtk_widget_create_pango_context(canvas);
- pango_context_set_base_dir(rtl_context, PANGO_DIRECTION_RTL);
+ ltr_context = gtk_widget_create_pango_context (canvas);
+ pango_context_set_base_dir (ltr_context, PANGO_DIRECTION_LTR);
+ rtl_context = gtk_widget_create_pango_context (canvas);
+ pango_context_set_base_dir (rtl_context, PANGO_DIRECTION_RTL);
- gtk_text_layout_set_contexts(
+ gtk_text_layout_set_contexts (
text->_priv->layout, ltr_context, rtl_context);
- g_object_unref(G_OBJECT(ltr_context));
- g_object_unref(G_OBJECT(rtl_context));
+ g_object_unref (G_OBJECT (ltr_context));
+ g_object_unref (G_OBJECT (rtl_context));
- style = gtk_text_attributes_new();
+ style = gtk_text_attributes_new ();
- gnome_canvas_rich_text_set_attributes_from_style(
+ gnome_canvas_rich_text_set_attributes_from_style (
text, style, gtk_widget_get_style (canvas));
style->pixels_above_lines = text->_priv->pixels_above_lines;
@@ -1940,35 +1940,35 @@ gnome_canvas_rich_text_ensure_layout(GnomeCanvasRichText *text)
style->editable = text->_priv->editable;
style->invisible = !text->_priv->visible;
- gtk_text_layout_set_default_style(text->_priv->layout, style);
+ gtk_text_layout_set_default_style (text->_priv->layout, style);
- gtk_text_attributes_unref(style);
+ gtk_text_attributes_unref (style);
- g_signal_connect(
+ g_signal_connect (
G_OBJECT(text->_priv->layout), "invalidated",
G_CALLBACK (invalidated_handler), text);
- g_signal_connect(
+ g_signal_connect (
G_OBJECT(text->_priv->layout), "changed",
G_CALLBACK (changed_handler), text);
}
} /* gnome_canvas_rich_text_ensure_layout */
static void
-gnome_canvas_rich_text_destroy_layout(GnomeCanvasRichText *text)
+gnome_canvas_rich_text_destroy_layout (GnomeCanvasRichText *text)
{
if (text->_priv->layout) {
- g_signal_handlers_disconnect_by_func(
- G_OBJECT(text->_priv->layout), invalidated_handler, text);
- g_signal_handlers_disconnect_by_func(
- G_OBJECT(text->_priv->layout), changed_handler, text);
- g_object_unref(G_OBJECT(text->_priv->layout));
+ g_signal_handlers_disconnect_by_func (
+ G_OBJECT (text->_priv->layout), invalidated_handler, text);
+ g_signal_handlers_disconnect_by_func (
+ G_OBJECT (text->_priv->layout), changed_handler, text);
+ g_object_unref (G_OBJECT (text->_priv->layout));
text->_priv->layout = NULL;
}
} /* gnome_canvas_rich_text_destroy_layout */
static void
-adjust_for_anchors(GnomeCanvasRichText *text, gdouble *ax, gdouble *ay)
+adjust_for_anchors (GnomeCanvasRichText *text, gdouble *ax, gdouble *ay)
{
gdouble x, y;
@@ -2027,25 +2027,25 @@ adjust_for_anchors(GnomeCanvasRichText *text, gdouble *ax, gdouble *ay)
} /* adjust_for_anchors */
static void
-get_bounds(GnomeCanvasRichText *text, gdouble *px1, gdouble *py1,
+get_bounds (GnomeCanvasRichText *text, gdouble *px1, gdouble *py1,
gdouble *px2, gdouble *py2)
{
- GnomeCanvasItem *item = GNOME_CANVAS_ITEM(text);
+ GnomeCanvasItem *item = GNOME_CANVAS_ITEM (text);
gdouble x, y;
gdouble x1, x2, y1, y2;
gint cx1, cx2, cy1, cy2;
- adjust_for_anchors(text, &x, &y);
+ adjust_for_anchors (text, &x, &y);
x1 = x;
y1 = y;
x2 = x + text->_priv->width;
y2 = y + text->_priv->height;
- gnome_canvas_item_i2w(item, &x1, &y1);
- gnome_canvas_item_i2w(item, &x2, &y2);
- gnome_canvas_w2c(item->canvas, x1, y1, &cx1, &cy1);
- gnome_canvas_w2c(item->canvas, x2, y2, &cx2, &cy2);
+ gnome_canvas_item_i2w (item, &x1, &y1);
+ gnome_canvas_item_i2w (item, &x2, &y2);
+ gnome_canvas_w2c (item->canvas, x1, y1, &cx1, &cy1);
+ gnome_canvas_w2c (item->canvas, x2, y2, &cx2, &cy2);
*px1 = cx1;
*py1 = cy1;
@@ -2060,36 +2060,36 @@ gnome_canvas_rich_text_get_bounds (GnomeCanvasItem *item,
gdouble *px2,
gdouble *py2)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
get_bounds (text, px1, py1, px2, py2);
}
static void
-gnome_canvas_rich_text_update(GnomeCanvasItem *item, gdouble *affine,
+gnome_canvas_rich_text_update (GnomeCanvasItem *item, gdouble *affine,
ArtSVP *clip_path, gint flags)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
gdouble x1, y1, x2, y2;
GtkTextIter start;
- (* GNOME_CANVAS_ITEM_CLASS(parent_class)->update)(
+ (* GNOME_CANVAS_ITEM_CLASS (parent_class)->update)(
item, affine, clip_path, flags);
- get_bounds(text, &x1, &y1, &x2, &y2);
+ get_bounds (text, &x1, &y1, &x2, &y2);
- gtk_text_buffer_get_iter_at_offset(text->_priv->buffer, &start, 0);
+ gtk_text_buffer_get_iter_at_offset (text->_priv->buffer, &start, 0);
if (text->_priv->layout)
- gtk_text_layout_validate_yrange(
+ gtk_text_layout_validate_yrange (
text->_priv->layout, &start, 0, y2 - y1);
- gnome_canvas_update_bbox(item, x1, y1, x2, y2);
+ gnome_canvas_update_bbox (item, x1, y1, x2, y2);
} /* gnome_canvas_rich_text_update */
static double
-gnome_canvas_rich_text_point(GnomeCanvasItem *item, gdouble x, gdouble y,
+gnome_canvas_rich_text_point (GnomeCanvasItem *item, gdouble x, gdouble y,
gint cx, gint cy, GnomeCanvasItem **actual_item)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
gdouble ax, ay;
gdouble x1, x2, y1, y2;
gdouble dx, dy;
@@ -2098,7 +2098,7 @@ gnome_canvas_rich_text_point(GnomeCanvasItem *item, gdouble x, gdouble y,
/* This is a lame cop-out. Anywhere inside of the bounding box. */
- adjust_for_anchors(text, &ax, &ay);
+ adjust_for_anchors (text, &ax, &ay);
x1 = ax;
y1 = ay;
@@ -2122,14 +2122,14 @@ gnome_canvas_rich_text_point(GnomeCanvasItem *item, gdouble x, gdouble y,
else
dy = 0.0;
- return sqrt(dx * dx + dy * dy);
+ return sqrt (dx * dx + dy * dy);
} /* gnome_canvas_rich_text_point */
static void
-gnome_canvas_rich_text_draw(GnomeCanvasItem *item, GdkDrawable *drawable,
+gnome_canvas_rich_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
gint x, gint y, gint width, gint height)
{
- GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
+ GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
GtkStyle *style;
GtkWidget *widget;
gdouble i2w[6], w2c[6], i2c[6];
@@ -2138,31 +2138,31 @@ gnome_canvas_rich_text_draw(GnomeCanvasItem *item, GdkDrawable *drawable,
ArtPoint i1, i2;
ArtPoint c1, c2;
- gnome_canvas_item_i2w_affine(item, i2w);
- gnome_canvas_w2c_affine(item->canvas, w2c);
- art_affine_multiply(i2c, i2w, w2c);
+ gnome_canvas_item_i2w_affine (item, i2w);
+ gnome_canvas_w2c_affine (item->canvas, w2c);
+ art_affine_multiply (i2c, i2w, w2c);
- adjust_for_anchors(text, &ax, &ay);
+ adjust_for_anchors (text, &ax, &ay);
i1.x = ax;
i1.y = ay;
i2.x = ax + text->_priv->width;
i2.y = ay + text->_priv->height;
- art_affine_point(&c1, &i1, i2c);
- art_affine_point(&c2, &i2, i2c);
+ art_affine_point (&c1, &i1, i2c);
+ art_affine_point (&c2, &i2, i2c);
x1 = c1.x;
y1 = c1.y;
x2 = c2.x;
y2 = c2.y;
- gtk_text_layout_set_screen_width(text->_priv->layout, x2 - x1);
+ gtk_text_layout_set_screen_width (text->_priv->layout, x2 - x1);
widget = GTK_WIDGET (item->canvas);
style = gtk_widget_get_style (widget);
/* FIXME: should last arg be NULL? */
- gtk_text_layout_draw(
+ gtk_text_layout_draw (
text->_priv->layout,
widget,
drawable,
@@ -2173,14 +2173,14 @@ gnome_canvas_rich_text_draw(GnomeCanvasItem *item, GdkDrawable *drawable,
} /* gnome_canvas_rich_text_draw */
static void
-gnome_canvas_rich_text_render(GnomeCanvasItem *item, GnomeCanvasBuf *buf)
+gnome_canvas_rich_text_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf)
{
g_warning ("rich text item not implemented for anti-aliased canvas");
} /* gnome_canvas_rich_text_render */
#if 0
static GtkTextTag *
-gnome_canvas_rich_text_add_tag(GnomeCanvasRichText *text, gchar *tag_name,
+gnome_canvas_rich_text_add_tag (GnomeCanvasRichText *text, gchar *tag_name,
gint start_offset, gint end_offset,
const gchar *first_property_name, ...)
{
@@ -2188,29 +2188,29 @@ gnome_canvas_rich_text_add_tag(GnomeCanvasRichText *text, gchar *tag_name,
GtkTextIter start, end;
va_list var_args;
- g_return_val_if_fail(text, NULL);
- g_return_val_if_fail(start_offset >= 0, NULL);
- g_return_val_if_fail(end_offset >= 0, NULL);
+ g_return_val_if_fail (text, NULL);
+ g_return_val_if_fail (start_offset >= 0, NULL);
+ g_return_val_if_fail (end_offset >= 0, NULL);
if (tag_name) {
GtkTextTagTable *tag_table;
- tag_table = gtk_text_buffer_get_tag_table(get_buffer(text));
- g_return_val_if_fail(gtk_text_tag_table_lookup(tag_table, tag_name) == NULL, NULL);
+ tag_table = gtk_text_buffer_get_tag_table (get_buffer (text));
+ g_return_val_if_fail (gtk_text_tag_table_lookup (tag_table, tag_name) == NULL, NULL);
}
- tag = gtk_text_buffer_create_tag(
- get_buffer(text), tag_name, NULL);
+ tag = gtk_text_buffer_create_tag (
+ get_buffer (text), tag_name, NULL);
- va_start(var_args, first_property_name);
- g_object_set_valist(G_OBJECT(tag), first_property_name, var_args);
- va_end(var_args);
+ va_start (var_args, first_property_name);
+ g_object_set_valist (G_OBJECT (tag), first_property_name, var_args);
+ va_end (var_args);
- gtk_text_buffer_get_iter_at_offset(
- get_buffer(text), &start, start_offset);
- gtk_text_buffer_get_iter_at_offset(
- get_buffer(text), &end, end_offset);
- gtk_text_buffer_apply_tag(get_buffer(text), tag, &start, &end);
+ gtk_text_buffer_get_iter_at_offset (
+ get_buffer (text), &start, start_offset);
+ gtk_text_buffer_get_iter_at_offset (
+ get_buffer (text), &end, end_offset);
+ gtk_text_buffer_apply_tag (get_buffer (text), tag, &start, &end);
return tag;
} /* gnome_canvas_rich_text_add_tag */
diff --git a/libgnomecanvas/gnome-canvas-rich-text.h b/libgnomecanvas/gnome-canvas-rich-text.h
index 4fa569e921..73665b9787 100644
--- a/libgnomecanvas/gnome-canvas-rich-text.h
+++ b/libgnomecanvas/gnome-canvas-rich-text.h
@@ -52,18 +52,18 @@ struct _GnomeCanvasRichTextClass {
GtkTextTag *tag);
};
-GType gnome_canvas_rich_text_get_type(void) G_GNUC_CONST;
+GType gnome_canvas_rich_text_get_type (void) G_GNUC_CONST;
-void gnome_canvas_rich_text_cut_clipboard(GnomeCanvasRichText *text);
+void gnome_canvas_rich_text_cut_clipboard (GnomeCanvasRichText *text);
-void gnome_canvas_rich_text_copy_clipboard(GnomeCanvasRichText *text);
+void gnome_canvas_rich_text_copy_clipboard (GnomeCanvasRichText *text);
-void gnome_canvas_rich_text_paste_clipboard(GnomeCanvasRichText *text);
+void gnome_canvas_rich_text_paste_clipboard (GnomeCanvasRichText *text);
-void gnome_canvas_rich_text_set_buffer(GnomeCanvasRichText *text,
+void gnome_canvas_rich_text_set_buffer (GnomeCanvasRichText *text,
GtkTextBuffer *buffer);
-GtkTextBuffer *gnome_canvas_rich_text_get_buffer(GnomeCanvasRichText *text);
+GtkTextBuffer *gnome_canvas_rich_text_get_buffer (GnomeCanvasRichText *text);
void
gnome_canvas_rich_text_get_iter_location (GnomeCanvasRichText *text,
const GtkTextIter *iter,
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c
index f1d0238099..c0c9acba2b 100644
--- a/libgnomecanvas/gnome-canvas-text.c
+++ b/libgnomecanvas/gnome-canvas-text.c
@@ -1531,7 +1531,7 @@ gnome_canvas_text_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf)
bm_rows != text->priv->bitmap.rows ||
bm_width != text->priv->bitmap.width) {
if (text->priv->bitmap.buffer) {
- g_free(text->priv->bitmap.buffer);
+ g_free (text->priv->bitmap.buffer);
}
text->priv->bitmap.rows = bm_rows;
text->priv->bitmap.width = bm_width;
@@ -1683,7 +1683,7 @@ gnome_canvas_text_point (GnomeCanvasItem *item, gdouble x, gdouble y,
dy = 0;
if ((dx == 0) && (dy == 0)) {
- pango_layout_iter_free(iter);
+ pango_layout_iter_free (iter);
return 0.0;
}
@@ -1691,9 +1691,9 @@ gnome_canvas_text_point (GnomeCanvasItem *item, gdouble x, gdouble y,
if (dist < best)
best = dist;
- } while (pango_layout_iter_next_line(iter));
+ } while (pango_layout_iter_next_line (iter));
- pango_layout_iter_free(iter);
+ pango_layout_iter_free (iter);
return best / item->canvas->pixels_per_unit;
}
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c
index 261a739e59..c335b9faa6 100644
--- a/libgnomecanvas/gnome-canvas.c
+++ b/libgnomecanvas/gnome-canvas.c
@@ -1345,11 +1345,11 @@ enum {
static void gnome_canvas_group_class_init (GnomeCanvasGroupClass *class);
static void gnome_canvas_group_init (GnomeCanvasGroup *group);
-static void gnome_canvas_group_set_property(GObject *object,
+static void gnome_canvas_group_set_property (GObject *object,
guint param_id,
const GValue *value,
GParamSpec *pspec);
-static void gnome_canvas_group_get_property(GObject *object,
+static void gnome_canvas_group_get_property (GObject *object,
guint param_id,
GValue *value,
GParamSpec *pspec);
@@ -1561,7 +1561,7 @@ gnome_canvas_group_destroy (GtkObject *object)
group = GNOME_CANVAS_GROUP (object);
while (group->item_list) {
- // child is unref'ed by the child's group_remove().
+ // child is unref'ed by the child's group_remove ().
gtk_object_destroy (GTK_OBJECT (group->item_list->data));
}
@@ -2120,7 +2120,7 @@ gnome_canvas_class_init (GnomeCanvasClass *klass)
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
- gail_canvas_init();
+ gail_canvas_init ();
}
/* Callback used when the root item of a canvas is destroyed. The user should
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
index 25ed2d8188..cc83aba990 100644
--- a/mail/em-folder-tree-model.h
+++ b/mail/em-folder-tree-model.h
@@ -54,28 +54,32 @@ typedef struct _EMFolderTreeModelPrivate EMFolderTreeModelPrivate;
typedef struct _EMFolderTreeModelStoreInfo EMFolderTreeModelStoreInfo;
enum {
- COL_STRING_DISPLAY_NAME, /* string that appears in the tree */
- COL_POINTER_CAMEL_STORE, /* CamelStore object */
- COL_STRING_FULL_NAME, /* if node is a folder, the full path name of the folder, no leading / */
- COL_STRING_ICON_NAME, /* icon name for the folder */
- COL_STRING_URI, /* the uri to get the store or folder object */
- COL_UINT_UNREAD, /* unread count */
- COL_UINT_FLAGS, /* FolderInfo.flags */
-
- COL_BOOL_IS_STORE, /* toplevel store node? */
- COL_BOOL_IS_FOLDER, /* folder (not a store) */
- COL_BOOL_LOAD_SUBDIRS, /* %TRUE only if the store/folder
- * has subfolders which have not yet
- * been added to the tree */
- COL_UINT_UNREAD_LAST_SEL, /* last known unread count */
- COL_BOOL_IS_DRAFT, /* %TRUE for a draft folder */
+ COL_STRING_DISPLAY_NAME, /* string that appears in the tree */
+ COL_POINTER_CAMEL_STORE, /* CamelStore object */
+ COL_STRING_FULL_NAME, /* if node is a folder, the full path
+ * name of the folder, no leading / */
+ COL_STRING_ICON_NAME, /* icon name for the folder */
+ COL_STRING_URI, /* the uri to get the store or
+ * folder object */
+ COL_UINT_UNREAD, /* unread count */
+ COL_UINT_FLAGS, /* FolderInfo.flags */
+
+ COL_BOOL_IS_STORE, /* toplevel store node? */
+ COL_BOOL_IS_FOLDER, /* folder (not a store) */
+ COL_BOOL_LOAD_SUBDIRS, /* %TRUE only if the store/folder
+ * has subfolders which have not yet
+ * been added to the tree */
+ COL_UINT_UNREAD_LAST_SEL, /* last known unread count */
+ COL_BOOL_IS_DRAFT, /* %TRUE for a draft folder */
NUM_COLUMNS
};
struct _EMFolderTreeModelStoreInfo {
CamelStore *store;
GtkTreeRowReference *row;
- GHashTable *full_hash; /* maps CamelFolderInfo::full_name's to GtkTreeRowReferences */
+
+ /* CamelFolderInfo::full_name -> GtkTreeRowReference */
+ GHashTable *full_hash;
EAccount *account;
gchar *display_name;
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 8467f2c47f..2d18bf62db 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -253,7 +253,8 @@ static MboxImporterCreatePreviewFunc create_preview_func = NULL;
static MboxImporterFillPreviewFunc fill_preview_func = NULL;
void
-mbox_importer_set_preview_funcs (MboxImporterCreatePreviewFunc create_func, MboxImporterFillPreviewFunc fill_func)
+mbox_importer_set_preview_funcs (MboxImporterCreatePreviewFunc create_func,
+ MboxImporterFillPreviewFunc fill_func)
{
create_preview_func = create_func;
fill_preview_func = fill_func;
@@ -311,7 +312,9 @@ mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
fd = g_open (filename, O_RDONLY|O_BINARY, 0);
if (fd == -1) {
- g_warning ("Cannot find source file to import '%s': %s", filename, g_strerror (errno));
+ g_warning (
+ "Cannot find source file to import '%s': %s",
+ filename, g_strerror (errno));
g_free (filename);
return NULL;
}
@@ -330,24 +333,28 @@ mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
gchar *from;
msg = camel_mime_message_new();
- if (camel_mime_part_construct_from_parser ((CamelMimePart *)msg, mp, NULL) == -1) {
+ if (camel_mime_part_construct_from_parser (
+ (CamelMimePart *)msg, mp, NULL) == -1) {
g_object_unref (msg);
break;
}
if (!store)
- store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, CAMEL_TYPE_MIME_MESSAGE);
+ store = gtk_list_store_new (
+ 3, G_TYPE_STRING, G_TYPE_STRING,
+ CAMEL_TYPE_MIME_MESSAGE);
from = NULL;
if (camel_mime_message_get_from (msg))
- from = camel_address_encode (CAMEL_ADDRESS (camel_mime_message_get_from (msg)));
+ from = camel_address_encode (
+ CAMEL_ADDRESS (
+ camel_mime_message_get_from (msg)));
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
- 0, camel_mime_message_get_subject (msg) ? camel_mime_message_get_subject (msg) : "",
- 1, from ? from : "",
- 2, msg,
- -1);
+ 0, camel_mime_message_get_subject (msg) ?
+ camel_mime_message_get_subject (msg) : "",
+ 1, from ? from : "", 2, msg, -1);
g_object_unref (msg);
g_free (from);
@@ -358,39 +365,51 @@ mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
if (store) {
GtkTreeView *tree_view;
GtkTreeSelection *selection;
+ gboolean valid;
preview = e_web_view_preview_new ();
gtk_widget_show (preview);
- tree_view = e_web_view_preview_get_tree_view (E_WEB_VIEW_PREVIEW (preview));
+ tree_view = e_web_view_preview_get_tree_view (
+ E_WEB_VIEW_PREVIEW (preview));
g_return_val_if_fail (tree_view != NULL, NULL);
gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (store));
g_object_unref (store);
/* Translators: Column header for a message subject */
- gtk_tree_view_insert_column_with_attributes (tree_view, -1, C_("mboxImp", "Subject"),
+ gtk_tree_view_insert_column_with_attributes (
+ tree_view, -1, C_("mboxImp", "Subject"),
gtk_cell_renderer_text_new (), "text", 0, NULL);
/* Translators: Column header for a message From address */
- gtk_tree_view_insert_column_with_attributes (tree_view, -1, C_("mboxImp", "From"),
+ gtk_tree_view_insert_column_with_attributes (
+ tree_view, -1, C_("mboxImp", "From"),
gtk_cell_renderer_text_new (), "text", 1, NULL);
if (gtk_tree_model_iter_n_children (GTK_TREE_MODEL (store), NULL) > 1)
- e_web_view_preview_show_tree_view (E_WEB_VIEW_PREVIEW (preview));
+ e_web_view_preview_show_tree_view (
+ E_WEB_VIEW_PREVIEW (preview));
create_preview_func (G_OBJECT (preview), &preview_widget);
g_return_val_if_fail (preview_widget != NULL, NULL);
- e_web_view_preview_set_preview (E_WEB_VIEW_PREVIEW (preview), preview_widget);
+ e_web_view_preview_set_preview (
+ E_WEB_VIEW_PREVIEW (preview), preview_widget);
gtk_widget_show (preview_widget);
selection = gtk_tree_view_get_selection (tree_view);
- g_return_val_if_fail (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter), NULL);
+ valid = gtk_tree_model_get_iter_first (
+ GTK_TREE_MODEL (store), &iter);
+ g_return_val_if_fail (valid, NULL);
gtk_tree_selection_select_iter (selection, &iter);
- g_signal_connect (selection, "changed", G_CALLBACK (preview_selection_changed_cb), preview);
- preview_selection_changed_cb (selection, E_WEB_VIEW_PREVIEW (preview));
+ g_signal_connect (
+ selection, "changed",
+ G_CALLBACK (preview_selection_changed_cb), preview);
+
+ preview_selection_changed_cb (
+ selection, E_WEB_VIEW_PREVIEW (preview));
}
return preview;
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 651692530a..d03e9f3354 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -122,7 +122,11 @@ struct _send_info {
struct _send_data *data;
};
-static CamelFolder *receive_get_folder(CamelFilterDriver *d, const gchar *uri, gpointer data, GError **error);
+static CamelFolder *
+ receive_get_folder (CamelFilterDriver *d,
+ const gchar *uri,
+ gpointer data,
+ GError **error);
static struct _send_data *send_data = NULL;
static GtkWidget *send_recv_dialog = NULL;
@@ -344,28 +348,40 @@ format_url (const gchar *internal_url, const gchar *account_name)
CamelURL *url;
gchar *pretty_url = NULL;
- url = camel_url_new(internal_url, NULL);
+ url = camel_url_new (internal_url, NULL);
+
if (account_name) {
if (url->host && *url->host)
- pretty_url = g_strdup_printf("<b>%s (%s)</b>: %s", account_name, url->protocol, url->host);
+ pretty_url = g_strdup_printf (
+ "<b>%s (%s)</b>: %s",
+ account_name, url->protocol, url->host);
else if (url->path)
- pretty_url = g_strdup_printf("<b>%s (%s)</b>: %s", account_name, url->protocol, url->path);
+ pretty_url = g_strdup_printf (
+ "<b>%s (%s)</b>: %s",
+ account_name, url->protocol, url->path);
else
- pretty_url = g_strdup_printf("<b>%s (%s)</b>", account_name, url->protocol);
- }
- else if (url) {
+ pretty_url = g_strdup_printf (
+ "<b>%s (%s)</b>",
+ account_name, url->protocol);
+
+ } else if (url) {
if (url->host && *url->host)
- pretty_url = g_strdup_printf("<b>%s</b>: %s", url->protocol, url->host);
+ pretty_url = g_strdup_printf (
+ "<b>%s</b>: %s",
+ url->protocol, url->host);
else if (url->path)
- pretty_url = g_strdup_printf("<b>%s</b>: %s", url->protocol, url->path);
+ pretty_url = g_strdup_printf (
+ "<b>%s</b>: %s",
+ url->protocol, url->path);
else
- pretty_url = g_strdup_printf("<b>%s</b>", url->protocol);
+ pretty_url = g_strdup_printf (
+ "<b>%s</b>", url->protocol);
}
if (url)
- camel_url_free(url);
+ camel_url_free (url);
- return pretty_url;
+ return pretty_url;
}
static send_info_t
@@ -462,9 +478,11 @@ build_dialog (GtkWindow *parent,
g_object_unref (iter);
- /* Check to see if we have to send any mails --- if we don't, don't display the SMTP row in the table */
+ /* 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);
@@ -588,13 +606,16 @@ build_dialog (GtkWindow *parent,
/* we also need gd during emition to be able to catch Cancel All */
data->gd = gd;
- /* Hook: If some one wants to hook on to the sendreceive dialog, this is the way to go. */
- target = em_event_target_new_send_receive (em_event_peek(), table, data, row, EM_EVENT_SEND_RECEIVE);
- e_event_emit ((EEvent *)em_event_peek (), "mail.sendreceive", (EEventTarget *) target);
+ target = em_event_target_new_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));
@@ -692,7 +713,11 @@ update_folders(gchar *uri, struct _folder_info *info, gpointer data)
}
static void
-receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, gint pc, const gchar *desc, gpointer data)
+receive_status (CamelFilterDriver *driver,
+ enum camel_filter_status_t status,
+ gint pc,
+ const gchar *desc,
+ gpointer data)
{
struct _send_info *info = data;
time_t now = time(NULL);
@@ -789,7 +814,10 @@ receive_done (const gchar *uri, gpointer data)
This can also be used to hook into which folders are being updated, and occasionally
let them refresh */
static CamelFolder *
-receive_get_folder(CamelFilterDriver *d, const gchar *uri, gpointer data, GError **error)
+receive_get_folder (CamelFilterDriver *d,
+ const gchar *uri,
+ gpointer data,
+ GError **error)
{
struct _send_info *info = data;
CamelFolder *folder;
@@ -839,7 +867,9 @@ get_folders (CamelStore *store, GPtrArray *folders, CamelFolderInfo *info)
if (camel_store_can_refresh_folder (store, info, NULL)) {
CamelURL *url = camel_url_new (info->uri, NULL);
- if (url && (!camel_url_get_param (url, "noselect") || !g_str_equal (camel_url_get_param (url, "noselect"), "yes")))
+ if (url && (!camel_url_get_param (url, "noselect") ||
+ !g_str_equal (camel_url_get_param (
+ url, "noselect"), "yes")))
g_ptr_array_add (folders, g_strdup (info->uri));
if (url)
@@ -1097,8 +1127,10 @@ auto_account_added(EAccountList *eal, EAccount *ea, gpointer dummy)
info = g_malloc0(sizeof(*info));
info->account = ea;
- g_object_set_data_full((GObject *)ea, "mail-autoreceive", info, (GDestroyNotify)auto_account_finalised);
- auto_account_commit(info);
+ g_object_set_data_full (
+ G_OBJECT (ea), "mail-autoreceive", info,
+ (GDestroyNotify) auto_account_finalised);
+ auto_account_commit (info);
}
static void
@@ -1122,8 +1154,12 @@ auto_online (EShell *shell)
return;
accounts = e_get_account_list ();
- for (iter = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(iter);e_iterator_next(iter)) {
- info = g_object_get_data((GObject *)e_iterator_get(iter), "mail-autoreceive");
+ for (iter = e_list_get_iterator ((EList *)accounts);
+ e_iterator_is_valid (iter);
+ e_iterator_next (iter)) {
+ info = g_object_get_data (
+ G_OBJECT (e_iterator_get (iter)),
+ "mail-autoreceive");
if (info && info->timeout_id)
auto_timeout(info);
}
@@ -1146,14 +1182,23 @@ mail_autoreceive_init (EShellBackend *shell_backend,
return;
accounts = e_get_account_list ();
- auto_active = g_hash_table_new(g_str_hash, g_str_equal);
+ auto_active = g_hash_table_new (g_str_hash, g_str_equal);
- g_signal_connect(accounts, "account-added", G_CALLBACK(auto_account_added), NULL);
- g_signal_connect(accounts, "account-removed", G_CALLBACK(auto_account_removed), NULL);
- g_signal_connect(accounts, "account-changed", G_CALLBACK(auto_account_changed), NULL);
+ g_signal_connect (
+ accounts, "account-added",
+ G_CALLBACK (auto_account_added), NULL);
+ g_signal_connect (
+ accounts, "account-removed",
+ G_CALLBACK (auto_account_removed), NULL);
+ g_signal_connect (
+ accounts, "account-changed",
+ G_CALLBACK (auto_account_changed), NULL);
- for (iter = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(iter);e_iterator_next(iter))
- auto_account_added(accounts, (EAccount *)e_iterator_get(iter), NULL);
+ for (iter = e_list_get_iterator ((EList *)accounts);
+ e_iterator_is_valid(iter);
+ e_iterator_next(iter))
+ auto_account_added (
+ accounts, (EAccount *) e_iterator_get (iter), NULL);
shell = e_shell_backend_get_shell (shell_backend);
@@ -1164,8 +1209,8 @@ mail_autoreceive_init (EShellBackend *shell_backend,
G_CALLBACK (auto_online), NULL);
}
-/* we setup the download info's in a hashtable, if we later need to build the gui, we insert
- them in to add them. */
+/* We setup the download info's in a hashtable, if we later
+ * need to build the gui, we insert them in to add them. */
void
mail_receive_uri (const gchar *uri, gboolean keep_on_server)
{
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c
index 7d398f855d..b275590cf5 100644
--- a/modules/addressbook/addressbook-config.c
+++ b/modules/addressbook/addressbook-config.c
@@ -372,7 +372,7 @@ search_base_selection_model_changed (GtkTreeSelection *selection, GtkWidget *dia
{
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
- gtk_tree_selection_get_selected(selection, NULL, NULL));
+ gtk_tree_selection_get_selected (selection, NULL, NULL));
}
static void
@@ -416,8 +416,8 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
gchar *dn;
gtk_tree_model_get (model, &iter, 0, &dn, -1);
- gtk_entry_set_text((GtkEntry *)sdialog->rootdn, dn);
- g_free(dn);
+ gtk_entry_set_text ((GtkEntry *)sdialog->rootdn, dn);
+ g_free (dn);
}
}
@@ -429,28 +429,28 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
GtkWidget*
addressbook_config_create_new_source (GtkWidget *parent)
{
- return addressbook_config_edit_source(parent, NULL);
+ return addressbook_config_edit_source (parent, NULL);
}
/* ********************************************************************** */
static void
-eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog)
+eabc_type_changed (GtkComboBox *dropdown, AddressbookSourceDialog *sdialog)
{
- gint id = gtk_combo_box_get_active(dropdown);
+ gint id = gtk_combo_box_get_active (dropdown);
GtkTreeModel *model;
GtkTreeIter iter;
- model = gtk_combo_box_get_model(dropdown);
- if (id == -1 || !gtk_tree_model_iter_nth_child(model, &iter, NULL, id))
+ model = gtk_combo_box_get_model (dropdown);
+ if (id == -1 || !gtk_tree_model_iter_nth_child (model, &iter, NULL, id))
return;
/* TODO: when we change the group type, we lose all of the pre-filled dialog info */
- gtk_tree_model_get(model, &iter, 1, &sdialog->source_group, -1);
+ gtk_tree_model_get (model, &iter, 1, &sdialog->source_group, -1);
/* HACK: doesn't work if you don't do this */
- e_source_set_absolute_uri(sdialog->source, NULL);
- e_source_set_group(sdialog->source, sdialog->source_group);
+ e_source_set_absolute_uri (sdialog->source, NULL);
+ e_source_set_group (sdialog->source, sdialog->source_group);
/* BIG HACK: We load the defaults for each type here.
I guess plugins will have to use the do it in their factory callbacks */
@@ -459,7 +459,7 @@ eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog)
ESource *source;
gchar *tmp;
- l = e_source_group_peek_sources(sdialog->source_group);
+ l = e_source_group_peek_sources (sdialog->source_group);
if (l && l->data ) {
source = l->data;
e_source_set_property(sdialog->source, "auth", e_source_get_property(source, "auth"));
@@ -488,11 +488,11 @@ eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog)
e_source_set_relative_uri (sdialog->source, e_source_peek_uid (sdialog->source));
}
- e_config_target_changed((EConfig *)sdialog->config, E_CONFIG_TARGET_CHANGED_REBUILD);
+ e_config_target_changed ((EConfig *)sdialog->config, E_CONFIG_TARGET_CHANGED_REBUILD);
}
static GtkWidget *
-eabc_general_type(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
+eabc_general_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
GtkComboBox *dropdown;
@@ -506,49 +506,49 @@ eabc_general_type(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *
if (old)
return old;
- w = gtk_hbox_new(FALSE, 6);
+ w = gtk_hbox_new (FALSE, 6);
label = gtk_label_new_with_mnemonic(_("_Type:"));
- gtk_box_pack_start((GtkBox *)w, label, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)w, label, FALSE, FALSE, 0);
- dropdown = (GtkComboBox *)gtk_combo_box_new();
- cell = gtk_cell_renderer_text_new();
- store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
+ dropdown = (GtkComboBox *)gtk_combo_box_new ();
+ cell = gtk_cell_renderer_text_new ();
+ store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
i = 0;
- for (l=sdialog->menu_source_groups;l;l=g_slist_next(l)) {
+ for (l=sdialog->menu_source_groups;l;l=g_slist_next (l)) {
ESourceGroup *group = l->data;
- gtk_list_store_append(store, &iter);
- gtk_list_store_set(store, &iter, 0, e_source_group_peek_name(group), 1, group, -1);
- if (e_source_peek_group(sdialog->source) == group)
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter, 0, e_source_group_peek_name (group), 1, group, -1);
+ if (e_source_peek_group (sdialog->source) == group)
row = i;
i++;
}
- 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_active(dropdown, -1);
- gtk_combo_box_set_active(dropdown, row);
+ gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store);
+ gtk_combo_box_set_active (dropdown, -1);
+ gtk_combo_box_set_active (dropdown, row);
g_signal_connect(dropdown, "changed", G_CALLBACK(eabc_type_changed), sdialog);
- gtk_widget_show((GtkWidget *)dropdown);
- gtk_box_pack_start((GtkBox *)w, (GtkWidget *)dropdown, TRUE, TRUE, 0);
- gtk_label_set_mnemonic_widget((GtkLabel *)label, (GtkWidget *)dropdown);
+ gtk_widget_show ((GtkWidget *)dropdown);
+ gtk_box_pack_start ((GtkBox *)w, (GtkWidget *)dropdown, TRUE, TRUE, 0);
+ gtk_label_set_mnemonic_widget ((GtkLabel *)label, (GtkWidget *)dropdown);
- gtk_box_pack_start((GtkBox *)parent, (GtkWidget *)w, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)parent, (GtkWidget *)w, FALSE, FALSE, 0);
- gtk_widget_show_all(w);
+ gtk_widget_show_all (w);
return (GtkWidget *)w;
}
static void
-name_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
+name_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
{
e_source_set_name (sdialog->source, gtk_entry_get_text (GTK_ENTRY (sdialog->display_name)));
}
static GtkWidget *
-eabc_general_name(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
+eabc_general_name (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
const gchar *uri;
@@ -561,22 +561,22 @@ eabc_general_name(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *
builder = gtk_builder_new ();
e_load_ui_builder_definition (builder, "ldap-config.ui");
- w = e_builder_get_widget(builder, item->label);
- gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0);
+ w = e_builder_get_widget (builder, item->label);
+ gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0);
sdialog->display_name = e_builder_get_widget (builder, "account-editor-display-name-entry");
g_signal_connect(sdialog->display_name, "changed", G_CALLBACK(name_changed_cb), sdialog);
- gtk_entry_set_text((GtkEntry *)sdialog->display_name, e_source_peek_name(sdialog->source));
+ gtk_entry_set_text ((GtkEntry *)sdialog->display_name, e_source_peek_name (sdialog->source));
/* Hardcoded: groupwise can't edit the name (or anything else) */
if (sdialog->original_source) {
uri = e_source_group_peek_base_uri (sdialog->source_group);
if (uri && strncmp(uri, "groupwise:", 10) == 0) {
- gtk_widget_set_sensitive (GTK_WIDGET(sdialog->display_name), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (sdialog->display_name), FALSE);
}
}
- g_object_unref(builder);
+ g_object_unref (builder);
return w;
}
@@ -623,7 +623,7 @@ offline_status_changed_cb (GtkWidget *widget, AddressbookSourceDialog *sdialog)
}
static GtkWidget *
-eabc_general_offline(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
+eabc_general_offline (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
GtkWidget *offline_setting;
@@ -665,7 +665,7 @@ form_ldap_search_filter (GtkWidget *w)
}
static void
-url_changed(AddressbookSourceDialog *sdialog)
+url_changed (AddressbookSourceDialog *sdialog)
{
gchar *str, *search_filter;
@@ -682,15 +682,15 @@ url_changed(AddressbookSourceDialog *sdialog)
}
static void
-host_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
+host_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
{
- url_changed(sdialog);
+ url_changed (sdialog);
}
static void
-port_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
+port_entry_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
{
- const gchar *port = gtk_entry_get_text((GtkEntry *)w);
+ const gchar *port = gtk_entry_get_text ((GtkEntry *)w);
if (!strcmp (port, LDAPS_PORT_STRING)) {
sdialog->ssl = ADDRESSBOOK_LDAP_SSL_ALWAYS;
@@ -700,11 +700,11 @@ port_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
gtk_widget_set_sensitive (sdialog->ssl_combobox, TRUE);
}
- url_changed(sdialog);
+ url_changed (sdialog);
}
static void
-ssl_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
+ssl_combobox_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
{
sdialog->ssl = gtk_combo_box_get_active (GTK_COMBO_BOX (w));
e_source_set_property (sdialog->source, "ssl", ldap_unparse_ssl (sdialog->ssl));
@@ -713,7 +713,7 @@ ssl_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
}
static GtkWidget *
-eabc_general_host(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
+eabc_general_host (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
const gchar *tmp;
@@ -722,19 +722,19 @@ eabc_general_host(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *
LDAPURLDesc *lud;
GtkBuilder *builder;
- if (!source_group_is_remote(sdialog->source_group))
+ if (!source_group_is_remote (sdialog->source_group))
return NULL;
builder = gtk_builder_new ();
e_load_ui_builder_definition (builder, "ldap-config.ui");
- w = e_builder_get_widget(builder, item->label);
- gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0);
+ w = e_builder_get_widget (builder, item->label);
+ gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0);
- uri = e_source_get_uri(sdialog->source);
- if (ldap_url_parse(uri, &lud) != LDAP_SUCCESS)
+ uri = e_source_get_uri (sdialog->source);
+ if (ldap_url_parse (uri, &lud) != LDAP_SUCCESS)
lud = NULL;
- g_free(uri);
+ g_free (uri);
sdialog->host = e_builder_get_widget (builder, "server-name-entry");
gtk_entry_set_text((GtkEntry *)sdialog->host, lud && lud->lud_host ? lud->lud_host : "");
@@ -760,15 +760,15 @@ eabc_general_host(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *
gtk_widget_set_sensitive (sdialog->ssl_combobox, strcmp (port, LDAPS_PORT_STRING) != 0);
g_signal_connect (sdialog->ssl_combobox, "changed", G_CALLBACK (ssl_combobox_changed_cb), sdialog);
- g_object_unref(builder);
+ g_object_unref (builder);
return w;
}
static void
-auth_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
+auth_entry_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
{
- const gchar *principal = gtk_entry_get_text((GtkEntry *)w);
+ const gchar *principal = gtk_entry_get_text ((GtkEntry *)w);
/* seems messy ... but the api is */
switch (sdialog->auth) {
@@ -789,37 +789,37 @@ auth_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
}
static void
-auth_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
+auth_combobox_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
{
sdialog->auth = gtk_combo_box_get_active (GTK_COMBO_BOX (w));
e_source_set_property (sdialog->source, "auth", ldap_unparse_auth (sdialog->auth));
/* make sure the right property is set for the auth - ugh, funny api */
- auth_entry_changed_cb(sdialog->auth_principal, sdialog);
+ auth_entry_changed_cb (sdialog->auth_principal, sdialog);
}
static GtkWidget *
-eabc_general_auth(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
+eabc_general_auth (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
GtkWidget *w;
const gchar *tmp;
GtkBuilder *builder;
- if (!source_group_is_remote(sdialog->source_group))
+ if (!source_group_is_remote (sdialog->source_group))
return NULL;
builder = gtk_builder_new ();
e_load_ui_builder_definition (builder, "ldap-config.ui");
- w = e_builder_get_widget(builder, item->label);
- gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0);
+ w = e_builder_get_widget (builder, item->label);
+ gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0);
sdialog->auth_combobox = e_builder_get_widget (builder, "auth-combobox");
gtk_widget_set_has_tooltip (sdialog->auth_combobox, TRUE);
gtk_widget_set_tooltip_text (sdialog->auth_combobox, _("This is the method Evolution will use to authenticate you. Note that setting this to \"Email Address\" requires anonymous access to your LDAP server."));
tmp = e_source_get_property(sdialog->source, "auth");
- sdialog->auth = tmp ? ldap_parse_auth(tmp) : ADDRESSBOOK_LDAP_AUTH_NONE;
+ sdialog->auth = tmp ? ldap_parse_auth (tmp) : ADDRESSBOOK_LDAP_AUTH_NONE;
gtk_combo_box_set_active (GTK_COMBO_BOX (sdialog->auth_combobox), sdialog->auth);
g_signal_connect (sdialog->auth_combobox, "changed", G_CALLBACK(auth_combobox_changed_cb), sdialog);
@@ -839,15 +839,15 @@ eabc_general_auth(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *
gtk_entry_set_text((GtkEntry *)sdialog->auth_principal, tmp?tmp:"");
g_signal_connect (sdialog->auth_principal, "changed", G_CALLBACK (auth_entry_changed_cb), sdialog);
- g_object_unref(builder);
+ g_object_unref (builder);
return w;
}
static void
-rootdn_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
+rootdn_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
{
- url_changed(sdialog);
+ url_changed (sdialog);
}
static void
@@ -857,14 +857,14 @@ search_filter_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
}
static void
-scope_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
+scope_combobox_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
{
sdialog->scope = gtk_combo_box_get_active (GTK_COMBO_BOX (w));
- url_changed(sdialog);
+ url_changed (sdialog);
}
static GtkWidget *
-eabc_details_search(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
+eabc_details_search (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
GtkWidget *w;
@@ -872,19 +872,19 @@ eabc_details_search(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget
gchar *uri;
GtkBuilder *builder;
- if (!source_group_is_remote(sdialog->source_group))
+ if (!source_group_is_remote (sdialog->source_group))
return NULL;
builder = gtk_builder_new ();
e_load_ui_builder_definition (builder, "ldap-config.ui");
- w = e_builder_get_widget(builder, item->label);
- gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0);
+ w = e_builder_get_widget (builder, item->label);
+ gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0);
- uri = e_source_get_uri(sdialog->source);
- if (ldap_url_parse(uri, &lud) != LDAP_SUCCESS)
+ uri = e_source_get_uri (sdialog->source);
+ if (ldap_url_parse (uri, &lud) != LDAP_SUCCESS)
lud = NULL;
- g_free(uri);
+ g_free (uri);
sdialog->rootdn = e_builder_get_widget (builder, "rootdn-entry");
gtk_entry_set_text((GtkEntry *)sdialog->rootdn, lud && lud->lud_dn ? lud->lud_dn : "");
@@ -915,18 +915,18 @@ eabc_details_search(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget
g_signal_connect (sdialog->search_filter, "changed", G_CALLBACK (search_filter_changed_cb), sdialog);
g_signal_connect (e_builder_get_widget(builder, "rootdn-button"), "clicked",
- G_CALLBACK(query_for_supported_bases), sdialog);
+ G_CALLBACK (query_for_supported_bases), sdialog);
if (lud)
ldap_free_urldesc (lud);
- g_object_unref(builder);
+ g_object_unref (builder);
return w;
}
static void
-timeout_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
+timeout_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
{
GtkAdjustment *adjustment;
GtkRange *range;
@@ -936,11 +936,11 @@ timeout_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
adjustment = gtk_range_get_adjustment (range);
timeout = g_strdup_printf("%f", gtk_adjustment_get_value (adjustment));
e_source_set_property(sdialog->source, "timeout", timeout);
- g_free(timeout);
+ g_free (timeout);
}
static void
-limit_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
+limit_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog)
{
gchar limit[16];
@@ -958,7 +958,7 @@ canbrowse_toggled_cb (GtkWidget *toggle_button, ESource *source)
}
static GtkWidget *
-eabc_details_limit(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
+eabc_details_limit (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
GtkAdjustment *adjustment;
@@ -967,34 +967,34 @@ eabc_details_limit(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget
const gchar *tmp;
GtkBuilder *builder;
- if (!source_group_is_remote(sdialog->source_group))
+ if (!source_group_is_remote (sdialog->source_group))
return NULL;
builder = gtk_builder_new ();
e_load_ui_builder_definition (builder, "ldap-config.ui");
- w = e_builder_get_widget(builder, item->label);
- gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0);
+ w = e_builder_get_widget (builder, item->label);
+ gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0);
sdialog->timeout_scale = e_builder_get_widget (builder, "timeout-scale");
range = GTK_RANGE (sdialog->timeout_scale);
adjustment = gtk_range_get_adjustment (range);
tmp = e_source_get_property(sdialog->source, "timeout");
- gtk_adjustment_set_value (adjustment, tmp?g_strtod(tmp, NULL):3.0);
+ gtk_adjustment_set_value (adjustment, tmp?g_strtod (tmp, NULL):3.0);
g_signal_connect (
adjustment, "value_changed",
G_CALLBACK (timeout_changed_cb), sdialog);
sdialog->limit_spinbutton = e_builder_get_widget (builder, "download-limit-spinbutton");
tmp = e_source_get_property(sdialog->source, "limit");
- gtk_spin_button_set_value((GtkSpinButton *)sdialog->limit_spinbutton, tmp?g_strtod(tmp, NULL):100.0);
+ gtk_spin_button_set_value ((GtkSpinButton *)sdialog->limit_spinbutton, tmp?g_strtod (tmp, NULL):100.0);
g_signal_connect (sdialog->limit_spinbutton, "value_changed", G_CALLBACK (limit_changed_cb), sdialog);
sdialog->canbrowsecheck = e_builder_get_widget (builder, "canbrowsecheck");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sdialog->canbrowsecheck), e_source_get_property (sdialog->source, "can-browse") && strcmp (e_source_get_property (sdialog->source, "can-browse"), "1") == 0);
g_signal_connect (sdialog->canbrowsecheck, "toggled", G_CALLBACK (canbrowse_toggled_cb), sdialog->source);
- g_object_unref(builder);
+ g_object_unref (builder);
return w;
}
@@ -1029,7 +1029,7 @@ static EConfigItem eabc_new_items[] = {
};
static void
-eabc_commit(EConfig *ec, GSList *items, gpointer data)
+eabc_commit (EConfig *ec, GSList *items, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
xmlNodePtr xml;
@@ -1041,48 +1041,48 @@ eabc_commit(EConfig *ec, GSList *items, gpointer data)
/* these api's kinda suck */
xml = xmlNewNode(NULL, (const guchar *)"dummy");
- e_source_dump_to_xml_node(sdialog->source, xml);
- e_source_update_from_xml_node(sdialog->original_source, xml->children, NULL);
- xmlFreeNode(xml);
+ e_source_dump_to_xml_node (sdialog->source, xml);
+ e_source_update_from_xml_node (sdialog->original_source, xml->children, NULL);
+ xmlFreeNode (xml);
#if d(!)0
- txt = e_source_to_standalone_xml(sdialog->original_source);
+ txt = e_source_to_standalone_xml (sdialog->original_source);
printf("source is now:\n%s\n", txt);
- g_free(txt);
+ g_free (txt);
#endif
} else {
d(printf("committing new source\n"));
- e_source_group_add_source(sdialog->source_group, sdialog->source, -1);
- e_source_list_sync(sdialog->source_list, NULL);
+ e_source_group_add_source (sdialog->source_group, sdialog->source, -1);
+ e_source_list_sync (sdialog->source_list, NULL);
}
#if d(!)0
- txt = e_source_to_standalone_xml(sdialog->source);
+ txt = e_source_to_standalone_xml (sdialog->source);
printf("running source is now:\n%s\n", txt);
- g_free(txt);
+ g_free (txt);
#endif
}
static void
-eabc_free(EConfig *ec, GSList *items, gpointer data)
+eabc_free (EConfig *ec, GSList *items, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
- g_slist_free(items);
+ g_slist_free (items);
- g_object_unref(sdialog->source);
+ g_object_unref (sdialog->source);
if (sdialog->original_source)
- g_object_unref(sdialog->original_source);
+ g_object_unref (sdialog->original_source);
if (sdialog->source_list)
- g_object_unref(sdialog->source_list);
- g_slist_free(sdialog->menu_source_groups);
+ g_object_unref (sdialog->source_list);
+ g_slist_free (sdialog->menu_source_groups);
- g_object_unref(sdialog->builder);
+ g_object_unref (sdialog->builder);
- g_free(sdialog);
+ g_free (sdialog);
}
static gboolean
-eabc_check_complete(EConfig *ec, const gchar *pageid, gpointer data)
+eabc_check_complete (EConfig *ec, const gchar *pageid, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
gint valid = TRUE;
@@ -1091,29 +1091,29 @@ eabc_check_complete(EConfig *ec, const gchar *pageid, gpointer data)
d(printf("check complete, pageid = '%s'\n", pageid?pageid:"<all>"));
/* have name, and unique */
- tmp = e_source_peek_name(sdialog->source);
+ tmp = e_source_peek_name (sdialog->source);
valid = tmp && tmp[0] != 0
- && ((source = e_source_group_peek_source_by_name(sdialog->source_group, tmp)) == NULL
+ && ((source = e_source_group_peek_source_by_name (sdialog->source_group, tmp)) == NULL
|| source == sdialog->original_source);
#ifdef HAVE_LDAP
- if (valid && source_group_is_remote(sdialog->source_group)) {
- gchar *uri = e_source_get_uri(sdialog->source);
+ if (valid && source_group_is_remote (sdialog->source_group)) {
+ gchar *uri = e_source_get_uri (sdialog->source);
LDAPURLDesc *lud;
/* check host and port set */
- if (ldap_url_parse(uri, &lud) == LDAP_SUCCESS) {
+ if (ldap_url_parse (uri, &lud) == LDAP_SUCCESS) {
valid = lud->lud_host != NULL
&& lud->lud_host[0] != 0
&& lud->lud_port != 0;
ldap_free_urldesc (lud);
} else
valid = FALSE;
- g_free(uri);
+ g_free (uri);
/* check auth name provided if auth set */
if (valid && (tmp = e_source_get_property(sdialog->source, "auth"))) {
- switch (ldap_parse_auth(tmp)) {
+ switch (ldap_parse_auth (tmp)) {
case ADDRESSBOOK_LDAP_AUTH_SIMPLE_EMAIL:
tmp = e_source_get_property(sdialog->source, "email_addr");
break;
@@ -1130,7 +1130,7 @@ eabc_check_complete(EConfig *ec, const gchar *pageid, gpointer data)
/* check timeout isn't too short (why don't we just force it?) */
if (valid) {
tmp = e_source_get_property(sdialog->source, "timeout");
- valid = tmp && g_strtod(tmp, NULL) > 0.0;
+ valid = tmp && g_strtod (tmp, NULL) > 0.0;
}
}
#endif
@@ -1140,13 +1140,13 @@ eabc_check_complete(EConfig *ec, const gchar *pageid, gpointer data)
/* debug only: */
#if d(!)0
static void
-source_changed(ESource *source, AddressbookSourceDialog *sdialog)
+source_changed (ESource *source, AddressbookSourceDialog *sdialog)
{
gchar *xml;
- xml = e_source_to_standalone_xml(source);
+ xml = e_source_to_standalone_xml (source);
printf("source changed:\n%s\n", xml);
- g_free(xml);
+ g_free (xml);
}
#endif
@@ -1165,19 +1165,19 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source)
if (source) {
sdialog->original_source = source;
- g_object_ref(source);
+ g_object_ref (source);
sdialog->source_group = e_source_peek_group (source);
- xml = e_source_to_standalone_xml(source);
- sdialog->source = e_source_new_from_standalone_xml(xml);
- g_free(xml);
+ xml = e_source_to_standalone_xml (source);
+ sdialog->source = e_source_new_from_standalone_xml (xml);
+ g_free (xml);
} else {
GConfClient *gconf;
GSList *l;
sdialog->source = e_source_new("", "");
- gconf = gconf_client_get_default();
+ gconf = gconf_client_get_default ();
sdialog->source_list = e_source_list_new_for_gconf(gconf, "/apps/evolution/addressbook/sources");
- l = e_source_list_peek_groups(sdialog->source_list);
+ l = e_source_list_peek_groups (sdialog->source_list);
if (!l) {
g_warning ("Address Book source groups are missing! Check your GConf setup.");
g_object_unref (gconf);
@@ -1185,25 +1185,25 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source)
return NULL;
}
- sdialog->menu_source_groups = g_slist_copy(l);
+ sdialog->menu_source_groups = g_slist_copy (l);
#ifndef HAVE_LDAP
- for (;l;l = g_slist_next(l))
+ for (;l;l = g_slist_next (l))
if (!strncmp("ldap:", e_source_group_peek_base_uri(l->data), 5))
sdialog->menu_source_groups = g_slist_remove (sdialog->menu_source_groups, l->data);
#endif
sdialog->source_group = (ESourceGroup *)sdialog->menu_source_groups->data;
for (i=0;eabc_new_items[i].path;i++)
- items = g_slist_prepend(items, &eabc_new_items[i]);
- g_object_unref(gconf);
+ items = g_slist_prepend (items, &eabc_new_items[i]);
+ g_object_unref (gconf);
}
/* HACK: doesn't work if you don't do this */
- e_source_set_group(sdialog->source, sdialog->source_group);
+ e_source_set_group (sdialog->source, sdialog->source_group);
#if d(!)0
- xml = e_source_to_standalone_xml(sdialog->source);
+ xml = e_source_to_standalone_xml (sdialog->source);
printf("but working standalone xml: %s\n", xml);
- g_free(xml);
+ g_free (xml);
g_signal_connect(sdialog->source, "changed", source_changed, sdialog);
#endif
@@ -1211,15 +1211,15 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source)
for (i=0;eabc_items[i].path;i++) {
if (eabc_items[i].label)
- eabc_items[i].label = gettext(eabc_items[i].label);
- items = g_slist_prepend(items, &eabc_items[i]);
+ eabc_items[i].label = gettext (eabc_items[i].label);
+ items = g_slist_prepend (items, &eabc_items[i]);
}
- e_config_add_items((EConfig *)ec, items, eabc_commit, NULL, eabc_free, sdialog);
- e_config_add_page_check((EConfig *)ec, NULL, eabc_check_complete, sdialog);
+ e_config_add_items ((EConfig *)ec, items, eabc_commit, NULL, eabc_free, sdialog);
+ e_config_add_page_check ((EConfig *)ec, NULL, eabc_check_complete, sdialog);
- target = eab_config_target_new_source(ec, sdialog->source);
- e_config_set_target((EConfig *)ec, (EConfigTarget *)target);
+ target = eab_config_target_new_source (ec, sdialog->source);
+ e_config_set_target ((EConfig *)ec, (EConfigTarget *)target);
if (source)
sdialog->window = e_config_create_window((EConfig *)ec, NULL, _("Address Book Properties"));
@@ -1228,7 +1228,7 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source)
/* forces initial validation */
if (!sdialog->original_source)
- e_config_target_changed((EConfig *)ec, E_CONFIG_TARGET_CHANGED_STATE);
+ e_config_target_changed ((EConfig *)ec, E_CONFIG_TARGET_CHANGED_STATE);
return sdialog->window;
}
diff --git a/modules/addressbook/e-book-shell-content.h b/modules/addressbook/e-book-shell-content.h
index 595e366736..0876ec968c 100644
--- a/modules/addressbook/e-book-shell-content.h
+++ b/modules/addressbook/e-book-shell-content.h
@@ -79,7 +79,8 @@ struct _EBookShellContentClass {
GType e_book_shell_content_get_type (void);
void e_book_shell_content_register_type
(GTypeModule *type_module);
-GtkWidget * e_book_shell_content_new(EShellView *shell_view);
+GtkWidget * e_book_shell_content_new
+ (EShellView *shell_view);
void e_book_shell_content_insert_view
(EBookShellContent *book_shell_content,
EAddressbookView *addressbook_view);
diff --git a/modules/addressbook/e-book-shell-sidebar.h b/modules/addressbook/e-book-shell-sidebar.h
index a3eb76c77f..560609f53d 100644
--- a/modules/addressbook/e-book-shell-sidebar.h
+++ b/modules/addressbook/e-book-shell-sidebar.h
@@ -70,7 +70,8 @@ struct _EBookShellSidebarClass {
GType e_book_shell_sidebar_get_type (void);
void e_book_shell_sidebar_register_type
(GTypeModule *type_module);
-GtkWidget * e_book_shell_sidebar_new(EShellView *shell_view);
+GtkWidget * e_book_shell_sidebar_new
+ (EShellView *shell_view);
ESourceSelector *
e_book_shell_sidebar_get_selector
(EBookShellSidebar *book_shell_sidebar);
diff --git a/modules/addressbook/openldap-extract.h b/modules/addressbook/openldap-extract.h
index 67d5741ce9..7da5800d16 100644
--- a/modules/addressbook/openldap-extract.h
+++ b/modules/addressbook/openldap-extract.h
@@ -110,12 +110,12 @@ typedef struct ldap_objectclass {
} LDAPObjectClass;
static void
-vfree(gpointer *vec)
+vfree (gpointer *vec)
{
gint i;
for (i = 0; vec[i] != NULL; i++)
- free(vec[i]);
+ free (vec[i]);
}
/* from schema.c */
@@ -159,7 +159,7 @@ struct token {
};
static gint
-get_token( const gchar ** sp, gchar ** token_val )
+get_token ( const gchar ** sp, gchar ** token_val )
{
gint kind;
const gchar * p;
@@ -192,11 +192,11 @@ get_token( const gchar ** sp, gchar ** token_val )
(*sp)++;
if (**sp == '\'') {
q = *sp;
- res = LDAP_MALLOC(q-p+1);
+ res = LDAP_MALLOC (q-p+1);
if (!res) {
kind = TK_OUTOFMEM;
} else {
- strncpy(res,p,q-p);
+ strncpy (res,p,q-p);
res[q-p] = '\0';
*token_val = res;
}
@@ -208,7 +208,7 @@ get_token( const gchar ** sp, gchar ** token_val )
default:
kind = TK_BAREWORD;
p = *sp;
- while ( !LDAP_SPACE(**sp) &&
+ while ( !LDAP_SPACE (**sp) &&
**sp != '(' &&
**sp != ')' &&
**sp != '$' &&
@@ -216,11 +216,11 @@ get_token( const gchar ** sp, gchar ** token_val )
**sp != '\0' )
(*sp)++;
q = *sp;
- res = LDAP_MALLOC(q-p+1);
+ res = LDAP_MALLOC (q-p+1);
if (!res) {
kind = TK_OUTOFMEM;
} else {
- strncpy(res,p,q-p);
+ strncpy (res,p,q-p);
res[q-p] = '\0';
*token_val = res;
}
@@ -234,15 +234,15 @@ get_token( const gchar ** sp, gchar ** token_val )
/* Gobble optional whitespace */
static void
-parse_whsp(const gchar **sp)
+parse_whsp (const gchar **sp)
{
- while (LDAP_SPACE(**sp))
+ while (LDAP_SPACE (**sp))
(*sp)++;
}
/* Parse a sequence of dot-separated decimal strings */
static gchar *
-ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags)
+ldap_int_parse_numericoid (const gchar **sp, gint *code, const gint flags)
{
gchar * res = NULL;
const gchar * start = *sp;
@@ -257,7 +257,7 @@ ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags)
}
/* Each iteration of this loop gets one decimal string */
while (**sp) {
- if (!LDAP_DIGIT(**sp)) {
+ if (!LDAP_DIGIT (**sp)) {
/*
* Initial gchar is not a digit or gchar after dot is
* not a digit
@@ -266,7 +266,7 @@ ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags)
return NULL;
}
(*sp)++;
- while (LDAP_DIGIT(**sp))
+ while (LDAP_DIGIT (**sp))
(*sp)++;
if (**sp != '.')
break;
@@ -286,20 +286,20 @@ ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags)
if (flags & LDAP_SCHEMA_SKIP) {
res = (gchar *)start;
} else {
- res = LDAP_MALLOC(len+1);
+ res = LDAP_MALLOC (len+1);
if (!res) {
*code = LDAP_SCHERR_OUTOFMEM;
- return(NULL);
+ return (NULL);
}
- strncpy(res,start,len);
+ strncpy (res,start,len);
res[len] = '\0';
}
- return(res);
+ return (res);
}
/* Parse a qdescr or a list of them enclosed in () */
static gchar **
-parse_qdescrs(const gchar **sp, gint *code)
+parse_qdescrs (const gchar **sp, gint *code)
{
gchar ** res;
gchar ** res1;
@@ -308,58 +308,58 @@ parse_qdescrs(const gchar **sp, gint *code)
gint size;
gint pos;
- parse_whsp(sp);
- kind = get_token(sp,&sval);
+ parse_whsp (sp);
+ kind = get_token (sp,&sval);
if (kind == TK_LEFTPAREN) {
/* Let's presume there will be at least 2 entries */
size = 3;
- res = LDAP_CALLOC(3,sizeof(gchar *));
+ res = LDAP_CALLOC (3,sizeof (gchar *));
if (!res) {
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
}
pos = 0;
while (1) {
- parse_whsp(sp);
- kind = get_token(sp,&sval);
+ parse_whsp (sp);
+ kind = get_token (sp,&sval);
if (kind == TK_RIGHTPAREN)
break;
if (kind == TK_QDESCR) {
if (pos == size-2) {
size++;
- res1 = LDAP_REALLOC(res,size*sizeof(gchar *));
+ res1 = LDAP_REALLOC (res,size*sizeof (gchar *));
if (!res1) {
- LDAP_VFREE(res);
- LDAP_FREE(sval);
+ LDAP_VFREE (res);
+ LDAP_FREE (sval);
*code = LDAP_SCHERR_OUTOFMEM;
- return(NULL);
+ return (NULL);
}
res = res1;
}
res[pos++] = sval;
res[pos] = NULL;
- parse_whsp(sp);
+ parse_whsp (sp);
} else {
- LDAP_VFREE(res);
- LDAP_FREE(sval);
+ LDAP_VFREE (res);
+ LDAP_FREE (sval);
*code = LDAP_SCHERR_UNEXPTOKEN;
- return(NULL);
+ return (NULL);
}
}
- parse_whsp(sp);
- return(res);
+ parse_whsp (sp);
+ return (res);
} else if (kind == TK_QDESCR) {
- res = LDAP_CALLOC(2,sizeof(gchar *));
+ res = LDAP_CALLOC (2,sizeof (gchar *));
if (!res) {
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
}
res[0] = sval;
res[1] = NULL;
- parse_whsp(sp);
+ parse_whsp (sp);
return res;
} else {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
*code = LDAP_SCHERR_BADNAME;
return NULL;
}
@@ -367,7 +367,7 @@ parse_qdescrs(const gchar **sp, gint *code)
/* Parse a woid or a $-separated list of them enclosed in () */
static gchar **
-parse_oids(const gchar **sp, gint *code, const gint allow_quoted)
+parse_oids (const gchar **sp, gint *code, const gint allow_quoted)
{
gchar ** res;
gchar ** res1;
@@ -382,48 +382,48 @@ parse_oids(const gchar **sp, gint *code, const gint allow_quoted)
* we are very liberal in what we accept as an OID. Maybe
* refine later.
*/
- parse_whsp(sp);
- kind = get_token(sp,&sval);
+ parse_whsp (sp);
+ kind = get_token (sp,&sval);
if (kind == TK_LEFTPAREN) {
/* Let's presume there will be at least 2 entries */
size = 3;
- res = LDAP_CALLOC(3,sizeof(gchar *));
+ res = LDAP_CALLOC (3,sizeof (gchar *));
if (!res) {
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
}
pos = 0;
- parse_whsp(sp);
- kind = get_token(sp,&sval);
+ parse_whsp (sp);
+ kind = get_token (sp,&sval);
if ( kind == TK_BAREWORD ||
( allow_quoted && kind == TK_QDSTRING ) ) {
res[pos++] = sval;
res[pos] = NULL;
} else {
*code = LDAP_SCHERR_UNEXPTOKEN;
- LDAP_FREE(sval);
- LDAP_VFREE(res);
+ LDAP_FREE (sval);
+ LDAP_VFREE (res);
return NULL;
}
- parse_whsp(sp);
+ parse_whsp (sp);
while (1) {
- kind = get_token(sp,&sval);
+ kind = get_token (sp,&sval);
if (kind == TK_RIGHTPAREN)
break;
if (kind == TK_DOLLAR) {
- parse_whsp(sp);
- kind = get_token(sp,&sval);
+ parse_whsp (sp);
+ kind = get_token (sp,&sval);
if ( kind == TK_BAREWORD ||
( allow_quoted &&
kind == TK_QDSTRING ) ) {
if (pos == size-2) {
size++;
- res1 = LDAP_REALLOC(res,size*sizeof(gchar *));
+ res1 = LDAP_REALLOC (res,size*sizeof (gchar *));
if (!res1) {
- LDAP_FREE(sval);
- LDAP_VFREE(res);
+ LDAP_FREE (sval);
+ LDAP_VFREE (res);
*code = LDAP_SCHERR_OUTOFMEM;
- return(NULL);
+ return (NULL);
}
res = res1;
}
@@ -431,53 +431,53 @@ parse_oids(const gchar **sp, gint *code, const gint allow_quoted)
res[pos] = NULL;
} else {
*code = LDAP_SCHERR_UNEXPTOKEN;
- LDAP_FREE(sval);
- LDAP_VFREE(res);
+ LDAP_FREE (sval);
+ LDAP_VFREE (res);
return NULL;
}
- parse_whsp(sp);
+ parse_whsp (sp);
} else {
*code = LDAP_SCHERR_UNEXPTOKEN;
- LDAP_FREE(sval);
- LDAP_VFREE(res);
+ LDAP_FREE (sval);
+ LDAP_VFREE (res);
return NULL;
}
}
- parse_whsp(sp);
- return(res);
+ parse_whsp (sp);
+ return (res);
} else if ( kind == TK_BAREWORD ||
( allow_quoted && kind == TK_QDSTRING ) ) {
- res = LDAP_CALLOC(2,sizeof(gchar *));
+ res = LDAP_CALLOC (2,sizeof (gchar *));
if (!res) {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
}
res[0] = sval;
res[1] = NULL;
- parse_whsp(sp);
+ parse_whsp (sp);
return res;
} else {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
*code = LDAP_SCHERR_BADNAME;
return NULL;
}
}
static void
-ldap_objectclass_free(LDAPObjectClass * oc)
+ldap_objectclass_free (LDAPObjectClass * oc)
{
- LDAP_FREE(oc->oc_oid);
- if (oc->oc_names) LDAP_VFREE(oc->oc_names);
- if (oc->oc_desc) LDAP_FREE(oc->oc_desc);
- if (oc->oc_sup_oids) LDAP_VFREE(oc->oc_sup_oids);
- if (oc->oc_at_oids_must) LDAP_VFREE(oc->oc_at_oids_must);
- if (oc->oc_at_oids_may) LDAP_VFREE(oc->oc_at_oids_may);
- LDAP_FREE(oc);
+ LDAP_FREE (oc->oc_oid);
+ if (oc->oc_names) LDAP_VFREE (oc->oc_names);
+ if (oc->oc_desc) LDAP_FREE (oc->oc_desc);
+ if (oc->oc_sup_oids) LDAP_VFREE (oc->oc_sup_oids);
+ if (oc->oc_at_oids_must) LDAP_VFREE (oc->oc_at_oids_must);
+ if (oc->oc_at_oids_may) LDAP_VFREE (oc->oc_at_oids_may);
+ LDAP_FREE (oc);
}
static LDAPObjectClass *
-ldap_str2objectclass( LDAP_CONST gchar * s,
+ldap_str2objectclass ( LDAP_CONST gchar * s,
gint * code,
LDAP_CONST gchar ** errp,
LDAP_CONST unsigned flags )
@@ -503,7 +503,7 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
}
*errp = s;
- oc = LDAP_CALLOC(1,sizeof(LDAPObjectClass));
+ oc = LDAP_CALLOC (1,sizeof (LDAPObjectClass));
if (!oc) {
*code = LDAP_SCHERR_OUTOFMEM;
@@ -511,11 +511,11 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
}
oc->oc_kind = LDAP_SCHEMA_STRUCTURAL;
- kind = get_token(&ss,&sval);
+ kind = get_token (&ss,&sval);
if (kind != TK_LEFTPAREN) {
*code = LDAP_SCHERR_NOLEFTPAREN;
- LDAP_FREE(sval);
- ldap_objectclass_free(oc);
+ LDAP_FREE (sval);
+ ldap_objectclass_free (oc);
return NULL;
}
@@ -526,14 +526,14 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
* in the wrong format or even no OID at all. We do our best to
* extract info from those servers.
*/
- parse_whsp(&ss);
+ parse_whsp (&ss);
savepos = ss;
- oc->oc_oid = ldap_int_parse_numericoid(&ss,code,0);
+ oc->oc_oid = ldap_int_parse_numericoid (&ss,code,0);
if (!oc->oc_oid) {
if ((flags & LDAP_SCHEMA_ALLOW_ALL) && (ss == savepos)) {
/* Backtracking */
ss = savepos;
- kind = get_token(&ss,&sval);
+ kind = get_token (&ss,&sval);
if (kind == TK_BAREWORD) {
if ( !strcasecmp(sval, "NAME") ||
!strcasecmp(sval, "DESC") ||
@@ -551,196 +551,196 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
LDAP_SCHEMA_ALLOW_OID_MACRO ) {
/* Non-numerical OID, ignore */
gint len = ss-savepos;
- oc->oc_oid = LDAP_MALLOC(len+1);
- strncpy(oc->oc_oid, savepos, len);
+ oc->oc_oid = LDAP_MALLOC (len+1);
+ strncpy (oc->oc_oid, savepos, len);
oc->oc_oid[len] = 0;
}
}
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
} else {
*errp = ss;
- ldap_objectclass_free(oc);
+ ldap_objectclass_free (oc);
return NULL;
}
}
- parse_whsp(&ss);
+ parse_whsp (&ss);
/*
* Beyond this point we will be liberal an accept the items
* in any order.
*/
while (1) {
- kind = get_token(&ss,&sval);
+ kind = get_token (&ss,&sval);
switch (kind) {
case TK_EOS:
*code = LDAP_SCHERR_NORIGHTPAREN;
*errp = ss;
- ldap_objectclass_free(oc);
+ ldap_objectclass_free (oc);
return NULL;
case TK_RIGHTPAREN:
return oc;
case TK_BAREWORD:
if (!strcasecmp(sval,"NAME")) {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
if (seen_name) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
- ldap_objectclass_free(oc);
- return(NULL);
+ ldap_objectclass_free (oc);
+ return (NULL);
}
seen_name = 1;
- oc->oc_names = parse_qdescrs(&ss,code);
+ oc->oc_names = parse_qdescrs (&ss,code);
if (!oc->oc_names) {
if (*code != LDAP_SCHERR_OUTOFMEM)
*code = LDAP_SCHERR_BADNAME;
*errp = ss;
- ldap_objectclass_free(oc);
+ ldap_objectclass_free (oc);
return NULL;
}
} else if (!strcasecmp(sval,"DESC")) {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
if (seen_desc) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
- ldap_objectclass_free(oc);
- return(NULL);
+ ldap_objectclass_free (oc);
+ return (NULL);
}
seen_desc = 1;
- parse_whsp(&ss);
- kind = get_token(&ss,&sval);
+ parse_whsp (&ss);
+ kind = get_token (&ss,&sval);
if (kind != TK_QDSTRING) {
*code = LDAP_SCHERR_UNEXPTOKEN;
*errp = ss;
- LDAP_FREE(sval);
- ldap_objectclass_free(oc);
+ LDAP_FREE (sval);
+ ldap_objectclass_free (oc);
return NULL;
}
oc->oc_desc = sval;
- parse_whsp(&ss);
+ parse_whsp (&ss);
} else if (!strcasecmp(sval,"OBSOLETE")) {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
if (seen_obsolete) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
- ldap_objectclass_free(oc);
- return(NULL);
+ ldap_objectclass_free (oc);
+ return (NULL);
}
seen_obsolete = 1;
oc->oc_obsolete = LDAP_SCHEMA_YES;
- parse_whsp(&ss);
+ parse_whsp (&ss);
} else if (!strcasecmp(sval,"SUP")) {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
if (seen_sup) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
- ldap_objectclass_free(oc);
- return(NULL);
+ ldap_objectclass_free (oc);
+ return (NULL);
}
seen_sup = 1;
- oc->oc_sup_oids = parse_oids(&ss,
+ oc->oc_sup_oids = parse_oids (&ss,
code,
flags);
if (!oc->oc_sup_oids) {
*errp = ss;
- ldap_objectclass_free(oc);
+ ldap_objectclass_free (oc);
return NULL;
}
} else if (!strcasecmp(sval,"ABSTRACT")) {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
if (seen_kind) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
- ldap_objectclass_free(oc);
- return(NULL);
+ ldap_objectclass_free (oc);
+ return (NULL);
}
seen_kind = 1;
oc->oc_kind = LDAP_SCHEMA_ABSTRACT;
- parse_whsp(&ss);
+ parse_whsp (&ss);
} else if (!strcasecmp(sval,"STRUCTURAL")) {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
if (seen_kind) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
- ldap_objectclass_free(oc);
- return(NULL);
+ ldap_objectclass_free (oc);
+ return (NULL);
}
seen_kind = 1;
oc->oc_kind = LDAP_SCHEMA_STRUCTURAL;
- parse_whsp(&ss);
+ parse_whsp (&ss);
} else if (!strcasecmp(sval,"AUXILIARY")) {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
if (seen_kind) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
- ldap_objectclass_free(oc);
- return(NULL);
+ ldap_objectclass_free (oc);
+ return (NULL);
}
seen_kind = 1;
oc->oc_kind = LDAP_SCHEMA_AUXILIARY;
- parse_whsp(&ss);
+ parse_whsp (&ss);
} else if (!strcasecmp(sval,"MUST")) {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
if (seen_must) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
- ldap_objectclass_free(oc);
- return(NULL);
+ ldap_objectclass_free (oc);
+ return (NULL);
}
seen_must = 1;
- oc->oc_at_oids_must = parse_oids(&ss,code,0);
+ oc->oc_at_oids_must = parse_oids (&ss,code,0);
if (!oc->oc_at_oids_must) {
*errp = ss;
- ldap_objectclass_free(oc);
+ ldap_objectclass_free (oc);
return NULL;
}
- parse_whsp(&ss);
+ parse_whsp (&ss);
} else if (!strcasecmp(sval,"MAY")) {
- LDAP_FREE(sval);
+ LDAP_FREE (sval);
if (seen_may) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
- ldap_objectclass_free(oc);
- return(NULL);
+ ldap_objectclass_free (oc);
+ return (NULL);
}
seen_may = 1;
- oc->oc_at_oids_may = parse_oids(&ss,code,0);
+ oc->oc_at_oids_may = parse_oids (&ss,code,0);
if (!oc->oc_at_oids_may) {
*errp = ss;
- ldap_objectclass_free(oc);
+ ldap_objectclass_free (oc);
return NULL;
}
- parse_whsp(&ss);
+ parse_whsp (&ss);
} else if (sval[0] == 'X' && sval[1] == '-') {
/* Should be parse_qdstrings */
- ext_vals = parse_qdescrs(&ss, code);
+ ext_vals = parse_qdescrs (&ss, code);
if (!ext_vals) {
*errp = ss;
- ldap_objectclass_free(oc);
+ ldap_objectclass_free (oc);
return NULL;
}
#if 0
- if ( add_extension(&oc->oc_extensions,
+ if ( add_extension (&oc->oc_extensions,
sval, ext_vals) ) {
*code = LDAP_SCHERR_OUTOFMEM;
*errp = ss;
- LDAP_FREE(sval);
- ldap_objectclass_free(oc);
+ LDAP_FREE (sval);
+ ldap_objectclass_free (oc);
return NULL;
}
#endif
} else {
*code = LDAP_SCHERR_UNEXPTOKEN;
*errp = ss;
- LDAP_FREE(sval);
- ldap_objectclass_free(oc);
+ LDAP_FREE (sval);
+ ldap_objectclass_free (oc);
return NULL;
}
break;
default:
*code = LDAP_SCHERR_UNEXPTOKEN;
*errp = ss;
- LDAP_FREE(sval);
- ldap_objectclass_free(oc);
+ LDAP_FREE (sval);
+ ldap_objectclass_free (oc);
return NULL;
}
}
@@ -752,10 +752,10 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
#define LDAP_UTF8_INCR(p) ((p)=LDAP_UTF8_NEXT((p)))
#define ldap_x_utf8_to_ucs4(str) g_utf8_get_char(str)
-static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr )
+static gchar *ldap_utf8_strchr ( const gchar *str, const gchar *chr )
{
- for (; *str != '\0'; LDAP_UTF8_INCR(str) ) {
- if (ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr )) {
+ for (; *str != '\0'; LDAP_UTF8_INCR (str) ) {
+ if (ldap_x_utf8_to_ucs4 ( str ) == ldap_x_utf8_to_ucs4 ( chr )) {
return (gchar *) str;
}
}
@@ -763,14 +763,14 @@ static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr )
return NULL;
}
-static gsize ldap_utf8_strcspn( const gchar *str, const gchar *set )
+static gsize ldap_utf8_strcspn ( const gchar *str, const gchar *set )
{
const gchar *cstr;
const gchar *cset;
- for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr)) {
- for (cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset)) {
- if (ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset )) {
+ for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR (cstr)) {
+ for (cset = set; *cset != '\0'; LDAP_UTF8_INCR (cset)) {
+ if (ldap_x_utf8_to_ucs4 ( cstr ) == ldap_x_utf8_to_ucs4 ( cset )) {
return cstr - str;
}
}
@@ -779,18 +779,18 @@ static gsize ldap_utf8_strcspn( const gchar *str, const gchar *set )
return cstr - str;
}
-static gsize ldap_utf8_strspn( const gchar *str, const gchar *set )
+static gsize ldap_utf8_strspn ( const gchar *str, const gchar *set )
{
const gchar *cstr;
const gchar *cset;
- for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr)) {
- for (cset = set; ; LDAP_UTF8_INCR(cset)) {
+ for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR (cstr)) {
+ for (cset = set; ; LDAP_UTF8_INCR (cset)) {
if (*cset == '\0') {
return cstr - str;
}
- if (ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset )) {
+ if (ldap_x_utf8_to_ucs4 ( cstr ) == ldap_x_utf8_to_ucs4 ( cset )) {
break;
}
}
@@ -799,7 +799,7 @@ static gsize ldap_utf8_strspn( const gchar *str, const gchar *set )
return cstr - str;
}
-static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last)
+static gchar *ldap_utf8_strtok (gchar *str, const gchar *sep, gchar **last)
{
gchar *begin;
gchar *end;
@@ -808,17 +808,17 @@ static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last)
begin = str ? str : *last;
- begin += ldap_utf8_strspn( begin, sep );
+ begin += ldap_utf8_strspn ( begin, sep );
if (*begin == '\0') {
*last = NULL;
return NULL;
}
- end = &begin[ ldap_utf8_strcspn( begin, sep ) ];
+ end = &begin[ ldap_utf8_strcspn ( begin, sep ) ];
if (*end != '\0') {
- gchar *next = LDAP_UTF8_NEXT( end );
+ gchar *next = LDAP_UTF8_NEXT ( end );
*end = '\0';
end = next;
}
@@ -868,7 +868,7 @@ typedef struct ldap_url_desc {
/* from url.c */
static const gchar *
-skip_url_prefix(
+skip_url_prefix (
const gchar *url,
gint *enclosedp,
const gchar **scheme )
@@ -880,7 +880,7 @@ skip_url_prefix(
const gchar *p;
if (url == NULL) {
- return( NULL );
+ return ( NULL );
}
p = url;
@@ -894,48 +894,48 @@ skip_url_prefix(
}
/* skip leading "URL:" (if any) */
- if (strncasecmp( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0) {
+ if (strncasecmp ( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0) {
p += LDAP_URL_URLCOLON_LEN;
}
/* check for "ldap://" prefix */
- if (strncasecmp( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0) {
+ if (strncasecmp ( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0) {
/* skip over "ldap://" prefix and return success */
p += LDAP_URL_PREFIX_LEN;
*scheme = "ldap";
- return( p );
+ return ( p );
}
/* check for "ldaps://" prefix */
- if (strncasecmp( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0) {
+ if (strncasecmp ( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0) {
/* skip over "ldaps://" prefix and return success */
p += LDAPS_URL_PREFIX_LEN;
*scheme = "ldaps";
- return( p );
+ return ( p );
}
/* check for "ldapi://" prefix */
- if (strncasecmp( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0) {
+ if (strncasecmp ( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0) {
/* skip over "ldapi://" prefix and return success */
p += LDAPI_URL_PREFIX_LEN;
*scheme = "ldapi";
- return( p );
+ return ( p );
}
#ifdef LDAP_CONNECTIONLESS
/* check for "cldap://" prefix */
- if (strncasecmp( p, LDAPC_URL_PREFIX, LDAPC_URL_PREFIX_LEN ) == 0) {
+ if (strncasecmp ( p, LDAPC_URL_PREFIX, LDAPC_URL_PREFIX_LEN ) == 0) {
/* skip over "cldap://" prefix and return success */
p += LDAPC_URL_PREFIX_LEN;
*scheme = "cldap";
- return( p );
+ return ( p );
}
#endif
- return( NULL );
+ return ( NULL );
}
-static gint str2scope( const gchar *p )
+static gint str2scope ( const gchar *p )
{
if (strcasecmp( p, "one" ) == 0) {
return LDAP_SCOPE_ONELEVEL;
@@ -953,53 +953,53 @@ static gint str2scope( const gchar *p )
return LDAP_SCOPE_SUBTREE;
}
- return( -1 );
+ return ( -1 );
}
static void
-ldap_free_urldesc( LDAPURLDesc *ludp )
+ldap_free_urldesc ( LDAPURLDesc *ludp )
{
if (ludp == NULL) {
return;
}
if (ludp->lud_scheme != NULL) {
- LDAP_FREE( ludp->lud_scheme );
+ LDAP_FREE ( ludp->lud_scheme );
}
if (ludp->lud_host != NULL) {
- LDAP_FREE( ludp->lud_host );
+ LDAP_FREE ( ludp->lud_host );
}
if (ludp->lud_dn != NULL) {
- LDAP_FREE( ludp->lud_dn );
+ LDAP_FREE ( ludp->lud_dn );
}
if (ludp->lud_filter != NULL) {
- LDAP_FREE( ludp->lud_filter);
+ LDAP_FREE ( ludp->lud_filter);
}
if (ludp->lud_attrs != NULL) {
- LDAP_VFREE( ludp->lud_attrs );
+ LDAP_VFREE ( ludp->lud_attrs );
}
if (ludp->lud_exts != NULL) {
- LDAP_VFREE( ludp->lud_exts );
+ LDAP_VFREE ( ludp->lud_exts );
}
- LDAP_FREE( ludp );
+ LDAP_FREE ( ludp );
}
static gint
-ldap_int_unhex( gint c )
+ldap_int_unhex ( gint c )
{
- return( c >= '0' && c <= '9' ? c - '0'
+ return ( c >= '0' && c <= '9' ? c - '0'
: c >= 'A' && c <= 'F' ? c - 'A' + 10
: c - 'a' + 10 );
}
static void
-ldap_pvt_hex_unescape( gchar *s )
+ldap_pvt_hex_unescape ( gchar *s )
{
/*
* Remove URL hex escapes from s... done in place. The basic concept for
@@ -1026,7 +1026,7 @@ ldap_pvt_hex_unescape( gchar *s )
}
static gchar **
-ldap_str2charray( const gchar *str_in, const gchar *brkstr )
+ldap_str2charray ( const gchar *str_in, const gchar *brkstr )
{
gchar **res;
gchar *str, *s;
@@ -1034,39 +1034,39 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr )
gint i;
/* protect the input string from strtok */
- str = LDAP_STRDUP( str_in );
+ str = LDAP_STRDUP ( str_in );
if (str == NULL) {
return NULL;
}
i = 1;
for (s = str; *s; s++) {
- if (ldap_utf8_strchr( brkstr, s ) != NULL) {
+ if (ldap_utf8_strchr ( brkstr, s ) != NULL) {
i++;
}
}
- res = (gchar **) LDAP_MALLOC( (i + 1) * sizeof(gchar *) );
+ res = (gchar **) LDAP_MALLOC ( (i + 1) * sizeof (gchar *) );
if (res == NULL) {
- LDAP_FREE( str );
+ LDAP_FREE ( str );
return NULL;
}
i = 0;
- for (s = ldap_utf8_strtok( str, brkstr, &lasts);
+ for (s = ldap_utf8_strtok ( str, brkstr, &lasts);
s != NULL;
- s = ldap_utf8_strtok( NULL, brkstr, &lasts ) )
+ s = ldap_utf8_strtok ( NULL, brkstr, &lasts ) )
{
- res[i] = LDAP_STRDUP( s );
+ res[i] = LDAP_STRDUP ( s );
if (res[i] == NULL) {
for (--i; i >= 0; i--) {
- LDAP_FREE( res[i] );
+ LDAP_FREE ( res[i] );
}
- LDAP_FREE( res );
- LDAP_FREE( str );
+ LDAP_FREE ( res );
+ LDAP_FREE ( str );
return NULL;
}
@@ -1075,12 +1075,12 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr )
res[i] = NULL;
- LDAP_FREE( str );
- return( res );
+ LDAP_FREE ( str );
+ return ( res );
}
static gint
-ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
+ldap_url_parse_ext ( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
{
/*
* Pick apart the pieces of an LDAP URL.
@@ -1099,25 +1099,25 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
*ludpp = NULL; /* pessimistic */
- url_tmp = skip_url_prefix( url_in, &enclosed, &scheme );
+ url_tmp = skip_url_prefix ( url_in, &enclosed, &scheme );
if (url_tmp == NULL) {
return LDAP_URL_ERR_BADSCHEME;
}
- assert( scheme );
+ assert ( scheme );
/* make working copy of the remainder of the URL */
- url = LDAP_STRDUP( url_tmp );
+ url = LDAP_STRDUP ( url_tmp );
if (url == NULL) {
return LDAP_URL_ERR_MEM;
}
if (enclosed) {
- p = &url[strlen(url)-1];
+ p = &url[strlen (url)-1];
if (*p != '>') {
- LDAP_FREE( url );
+ LDAP_FREE ( url );
return LDAP_URL_ERR_BADENCLOSURE;
}
@@ -1125,10 +1125,10 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
}
/* allocate return struct */
- ludp = (LDAPURLDesc *)LDAP_CALLOC( 1, sizeof( LDAPURLDesc ));
+ ludp = (LDAPURLDesc *)LDAP_CALLOC ( 1, sizeof ( LDAPURLDesc ));
if (ludp == NULL) {
- LDAP_FREE( url );
+ LDAP_FREE ( url );
return LDAP_URL_ERR_MEM;
}
@@ -1142,16 +1142,16 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
ludp->lud_filter = NULL;
ludp->lud_exts = NULL;
- ludp->lud_scheme = LDAP_STRDUP( scheme );
+ ludp->lud_scheme = LDAP_STRDUP ( scheme );
if (ludp->lud_scheme == NULL) {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_MEM;
}
/* scan forward for '/' that marks end of hostport and begin. of dn */
- p = strchr( url, '/' );
+ p = strchr ( url, '/' );
if (p != NULL) {
/* terminate hostport; point to start of dn */
@@ -1160,46 +1160,46 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
/* IPv6 syntax with [ip address]:port */
if (*url == '[') {
- r = strchr( url, ']' );
+ r = strchr ( url, ']' );
if (r == NULL) {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_BADURL;
}
*r++ = '\0';
- q = strchr( r, ':' );
+ q = strchr ( r, ':' );
} else {
- q = strchr( url, ':' );
+ q = strchr ( url, ':' );
}
if (q != NULL) {
gchar *next;
*q++ = '\0';
- ldap_pvt_hex_unescape( q );
+ ldap_pvt_hex_unescape ( q );
if (*q == '\0') {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_BADURL;
}
- ludp->lud_port = strtol( q, &next, 10 );
+ ludp->lud_port = strtol ( q, &next, 10 );
if (next == NULL || next[0] != '\0') {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_BADURL;
}
}
- ldap_pvt_hex_unescape( url );
+ ldap_pvt_hex_unescape ( url );
/* If [ip address]:port syntax, url is [ip and we skip the [ */
- ludp->lud_host = LDAP_STRDUP( url + ( *url == '[' ) );
+ ludp->lud_host = LDAP_STRDUP ( url + ( *url == '[' ) );
if (ludp->lud_host == NULL) {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_MEM;
}
@@ -1212,35 +1212,35 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
* but we need to account for it. Fortunately it can't be confused with
* anything real.
*/
- if ( (p == NULL) && (q != NULL) && ((q = strchr( q, '?')) != NULL)) {
+ if ( (p == NULL) && (q != NULL) && ((q = strchr ( q, '?')) != NULL)) {
q++;
/* ? immediately followed by question */
if ( *q == '?') {
q++;
if (*q != '\0') {
/* parse dn part */
- ldap_pvt_hex_unescape( q );
- ludp->lud_dn = LDAP_STRDUP( q );
+ ldap_pvt_hex_unescape ( q );
+ ludp->lud_dn = LDAP_STRDUP ( q );
} else {
ludp->lud_dn = LDAP_STRDUP( "" );
}
if (ludp->lud_dn == NULL) {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_MEM;
}
}
}
if (p == NULL) {
- LDAP_FREE( url );
+ LDAP_FREE ( url );
*ludpp = ludp;
return LDAP_URL_SUCCESS;
}
/* scan forward for '?' that may marks end of dn */
- q = strchr( p, '?' );
+ q = strchr ( p, '?' );
if (q != NULL) {
/* terminate dn part */
@@ -1249,28 +1249,28 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
if (*p != '\0') {
/* parse dn part */
- ldap_pvt_hex_unescape( p );
- ludp->lud_dn = LDAP_STRDUP( p );
+ ldap_pvt_hex_unescape ( p );
+ ludp->lud_dn = LDAP_STRDUP ( p );
} else {
ludp->lud_dn = LDAP_STRDUP( "" );
}
if (ludp->lud_dn == NULL) {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_MEM;
}
if (q == NULL) {
/* no more */
- LDAP_FREE( url );
+ LDAP_FREE ( url );
*ludpp = ludp;
return LDAP_URL_SUCCESS;
}
/* scan forward for '?' that may marks end of attributes */
p = q;
- q = strchr( p, '?' );
+ q = strchr ( p, '?' );
if (q != NULL) {
/* terminate attributes part */
@@ -1279,26 +1279,26 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
if (*p != '\0') {
/* parse attributes */
- ldap_pvt_hex_unescape( p );
+ ldap_pvt_hex_unescape ( p );
ludp->lud_attrs = ldap_str2charray( p, "," );
if (ludp->lud_attrs == NULL) {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_BADATTRS;
}
}
if (q == NULL) {
/* no more */
- LDAP_FREE( url );
+ LDAP_FREE ( url );
*ludpp = ludp;
return LDAP_URL_SUCCESS;
}
/* scan forward for '?' that may marks end of scope */
p = q;
- q = strchr( p, '?' );
+ q = strchr ( p, '?' );
if (q != NULL) {
/* terminate the scope part */
@@ -1307,26 +1307,26 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
if (*p != '\0') {
/* parse the scope */
- ldap_pvt_hex_unescape( p );
- ludp->lud_scope = str2scope( p );
+ ldap_pvt_hex_unescape ( p );
+ ludp->lud_scope = str2scope ( p );
if (ludp->lud_scope == -1) {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_BADSCOPE;
}
}
if (q == NULL) {
/* no more */
- LDAP_FREE( url );
+ LDAP_FREE ( url );
*ludpp = ludp;
return LDAP_URL_SUCCESS;
}
/* scan forward for '?' that may marks end of filter */
p = q;
- q = strchr( p, '?' );
+ q = strchr ( p, '?' );
if (q != NULL) {
/* terminate the filter part */
@@ -1335,40 +1335,40 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
if (*p != '\0') {
/* parse the filter */
- ldap_pvt_hex_unescape( p );
+ ldap_pvt_hex_unescape ( p );
if (!*p) {
/* missing filter */
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_BADFILTER;
}
- LDAP_FREE( ludp->lud_filter );
- ludp->lud_filter = LDAP_STRDUP( p );
+ LDAP_FREE ( ludp->lud_filter );
+ ludp->lud_filter = LDAP_STRDUP ( p );
if (ludp->lud_filter == NULL) {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_MEM;
}
}
if (q == NULL) {
/* no more */
- LDAP_FREE( url );
+ LDAP_FREE ( url );
*ludpp = ludp;
return LDAP_URL_SUCCESS;
}
/* scan forward for '?' that may marks end of extensions */
p = q;
- q = strchr( p, '?' );
+ q = strchr ( p, '?' );
if (q != NULL) {
/* extra '?' */
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_BADURL;
}
@@ -1376,13 +1376,13 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
ludp->lud_exts = ldap_str2charray( p, "," );
if (ludp->lud_exts == NULL) {
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_BADEXTS;
}
for (i=0; ludp->lud_exts[i] != NULL; i++) {
- ldap_pvt_hex_unescape( ludp->lud_exts[i] );
+ ldap_pvt_hex_unescape ( ludp->lud_exts[i] );
if (*ludp->lud_exts[i] == '!') {
/* count the number of critical extensions */
@@ -1392,21 +1392,21 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
if (i == 0) {
/* must have 1 or more */
- LDAP_FREE( url );
- ldap_free_urldesc( ludp );
+ LDAP_FREE ( url );
+ ldap_free_urldesc ( ludp );
return LDAP_URL_ERR_BADEXTS;
}
/* no more */
*ludpp = ludp;
- LDAP_FREE( url );
+ LDAP_FREE ( url );
return LDAP_URL_SUCCESS;
}
static gint
-ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
+ldap_url_parse ( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
{
- gint rc = ldap_url_parse_ext( url_in, ludpp );
+ gint rc = ldap_url_parse_ext ( url_in, ludpp );
if (rc != LDAP_URL_SUCCESS) {
return rc;
@@ -1417,7 +1417,7 @@ ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
}
if ((*ludpp)->lud_host != NULL && *(*ludpp)->lud_host == '\0') {
- LDAP_FREE( (*ludpp)->lud_host );
+ LDAP_FREE ( (*ludpp)->lud_host );
(*ludpp)->lud_host = NULL;
}
diff --git a/modules/calendar/e-cal-shell-migrate.c b/modules/calendar/e-cal-shell-migrate.c
index c7511f69f8..c1a7221597 100644
--- a/modules/calendar/e-cal-shell-migrate.c
+++ b/modules/calendar/e-cal-shell-migrate.c
@@ -110,11 +110,16 @@ create_calendar_sources (EShellBackend *shell_backend,
if (!strcmp (base_uri, e_source_group_peek_base_uri (group)))
e_source_group_set_base_uri (group, base_uri_proto);
- if (!*on_this_computer && !strcmp (base_uri_proto, e_source_group_peek_base_uri (group)))
+ if (!*on_this_computer && !strcmp (base_uri_proto,
+ e_source_group_peek_base_uri (group)))
*on_this_computer = g_object_ref (group);
- else if (!*on_the_web && !strcmp (WEBCAL_BASE_URI, e_source_group_peek_base_uri (group)))
+
+ else if (!*on_the_web && !strcmp (WEBCAL_BASE_URI,
+ e_source_group_peek_base_uri (group)))
*on_the_web = g_object_ref (group);
- else if (!*contacts && !strcmp (CONTACTS_BASE_URI, e_source_group_peek_base_uri (group)))
+
+ else if (!*contacts && !strcmp (CONTACTS_BASE_URI,
+ e_source_group_peek_base_uri (group)))
*contacts = g_object_ref (group);
}
}
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index a819d88473..8ddf8acf6a 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -669,10 +669,10 @@ cal_shell_sidebar_constructed (GObject *object)
GtkWidget *button;
container = gtk_vbox_new (FALSE, 6);
- gtk_box_pack_start (GTK_BOX(container), widget, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
button = gtk_button_new_with_mnemonic (_("_New Calendar..."));
- gtk_box_pack_start (GTK_BOX(container), button, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (container), button, FALSE, FALSE, 0);
g_signal_connect (
button, "clicked",
G_CALLBACK (new_calendar_clicked), shell_sidebar);
diff --git a/modules/calendar/e-memo-shell-content.h b/modules/calendar/e-memo-shell-content.h
index 4567a94aa9..3ab68db440 100644
--- a/modules/calendar/e-memo-shell-content.h
+++ b/modules/calendar/e-memo-shell-content.h
@@ -75,7 +75,8 @@ struct _EMemoShellContentClass {
GType e_memo_shell_content_get_type (void);
void e_memo_shell_content_register_type
(GTypeModule *type_module);
-GtkWidget * e_memo_shell_content_new(EShellView *shell_view);
+GtkWidget * e_memo_shell_content_new
+ (EShellView *shell_view);
ECalModel * e_memo_shell_content_get_memo_model
(EMemoShellContent *memo_shell_conent);
EMemoTable * e_memo_shell_content_get_memo_table
diff --git a/modules/calendar/e-memo-shell-migrate.c b/modules/calendar/e-memo-shell-migrate.c
index 771a889845..d85824767f 100644
--- a/modules/calendar/e-memo-shell-migrate.c
+++ b/modules/calendar/e-memo-shell-migrate.c
@@ -196,7 +196,7 @@ add_gw_esource (ESourceList *source_list, const gchar *group_name, const gchar
ids = gconf_client_get_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, &error);
if (error != NULL) {
g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
- g_error_free(error);
+ g_error_free (error);
}
ids = g_slist_append (ids, g_strdup (e_source_peek_uid (source)));
gconf_client_set_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, ids, NULL);
@@ -240,10 +240,10 @@ e_memo_shell_backend_migrate (EShellBackend *shell_backend,
EIterator *it;
GConfClient *gconf_client = gconf_client_get_default ();
al = e_account_list_new (gconf_client);
- 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 || !is_groupwise_account (a))
continue;
url = camel_url_new (a->source->url, NULL);
diff --git a/modules/calendar/e-memo-shell-sidebar.h b/modules/calendar/e-memo-shell-sidebar.h
index 0d32c7b429..91e0ccc618 100644
--- a/modules/calendar/e-memo-shell-sidebar.h
+++ b/modules/calendar/e-memo-shell-sidebar.h
@@ -81,7 +81,8 @@ struct _EMemoShellSidebarClass {
GType e_memo_shell_sidebar_get_type (void);
void e_memo_shell_sidebar_register_type
(GTypeModule *type_module);
-GtkWidget * e_memo_shell_sidebar_new(EShellView *shell_view);
+GtkWidget * e_memo_shell_sidebar_new
+ (EShellView *shell_view);
GList * e_memo_shell_sidebar_get_clients
(EMemoShellSidebar *memo_shell_sidebar);
ECal * e_memo_shell_sidebar_get_default_client
diff --git a/modules/calendar/e-task-shell-content.h b/modules/calendar/e-task-shell-content.h
index d4e67d1b95..eb327afdb7 100644
--- a/modules/calendar/e-task-shell-content.h
+++ b/modules/calendar/e-task-shell-content.h
@@ -79,7 +79,8 @@ struct _ETaskShellContentClass {
GType e_task_shell_content_get_type (void);
void e_task_shell_content_register_type
(GTypeModule *type_module);
-GtkWidget * e_task_shell_content_new(EShellView *shell_view);
+GtkWidget * e_task_shell_content_new
+ (EShellView *shell_view);
ECalModel * e_task_shell_content_get_task_model
(ETaskShellContent *task_shell_content);
ETaskTable * e_task_shell_content_get_task_table
diff --git a/modules/calendar/e-task-shell-sidebar.h b/modules/calendar/e-task-shell-sidebar.h
index 152c7ca32f..17e50f8239 100644
--- a/modules/calendar/e-task-shell-sidebar.h
+++ b/modules/calendar/e-task-shell-sidebar.h
@@ -81,7 +81,8 @@ struct _ETaskShellSidebarClass {
GType e_task_shell_sidebar_get_type (void);
void e_task_shell_sidebar_register_type
(GTypeModule *type_module);
-GtkWidget * e_task_shell_sidebar_new(EShellView *shell_view);
+GtkWidget * e_task_shell_sidebar_new
+ (EShellView *shell_view);
GList * e_task_shell_sidebar_get_clients
(ETaskShellSidebar *task_shell_sidebar);
ECal * e_task_shell_sidebar_get_default_client
diff --git a/modules/mail/e-mail-shell-backend.h b/modules/mail/e-mail-shell-backend.h
index 031efab150..e545fa2566 100644
--- a/modules/mail/e-mail-shell-backend.h
+++ b/modules/mail/e-mail-shell-backend.h
@@ -66,7 +66,7 @@ void e_mail_shell_backend_register_type
(GTypeModule *type_module);
/* XXX Find a better place for this function. */
-GSList * e_mail_labels_get_filter_options(void);
+GSList * e_mail_labels_get_filter_options (void);
G_END_DECLS
diff --git a/modules/mail/e-mail-shell-content.h b/modules/mail/e-mail-shell-content.h
index 6e2c721d59..58f7ee9fd2 100644
--- a/modules/mail/e-mail-shell-content.h
+++ b/modules/mail/e-mail-shell-content.h
@@ -65,7 +65,8 @@ struct _EMailShellContentClass {
GType e_mail_shell_content_get_type (void);
void e_mail_shell_content_register_type
(GTypeModule *type_module);
-GtkWidget * e_mail_shell_content_new(EShellView *shell_view);
+GtkWidget * e_mail_shell_content_new
+ (EShellView *shell_view);
EMailView * e_mail_shell_content_get_mail_view
(EMailShellContent *mail_shell_content);
EShellSearchbar *
diff --git a/modules/mail/e-mail-shell-sidebar.h b/modules/mail/e-mail-shell-sidebar.h
index b27bd80be0..ca3a43654d 100644
--- a/modules/mail/e-mail-shell-sidebar.h
+++ b/modules/mail/e-mail-shell-sidebar.h
@@ -63,7 +63,8 @@ struct _EMailShellSidebarClass {
GType e_mail_shell_sidebar_get_type (void);
void e_mail_shell_sidebar_register_type
(GTypeModule *type_module);
-GtkWidget * e_mail_shell_sidebar_new(EShellView *shell_view);
+GtkWidget * e_mail_shell_sidebar_new
+ (EShellView *shell_view);
EMFolderTree * e_mail_shell_sidebar_get_folder_tree
(EMailShellSidebar *mail_shell_sidebar);
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 7db5238a62..584936cb67 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -398,8 +398,8 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
ec = em_config_new(E_CONFIG_BOOK, "org.gnome.evolution.mail.composerPrefs");
l = NULL;
for (i = 0; i < G_N_ELEMENTS (emcp_items); i++)
- l = g_slist_prepend(l, &emcp_items[i]);
- e_config_add_items((EConfig *)ec, l, NULL, NULL, emcp_free, prefs);
+ l = g_slist_prepend (l, &emcp_items[i]);
+ e_config_add_items ((EConfig *)ec, l, NULL, NULL, emcp_free, prefs);
/* General tab */
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index 751c395223..ecc794ebf6 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -651,11 +651,11 @@ http_images_changed (GtkWidget *widget, EMMailerPrefs *prefs)
}
static GtkWidget *
-emmp_widget_glade(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
+emmp_widget_glade (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
EMMailerPrefs *prefs = data;
- return e_builder_get_widget(prefs->builder, item->label);
+ return e_builder_get_widget (prefs->builder, item->label);
}
/* plugin meta-data */
@@ -679,18 +679,18 @@ static EMConfigItem emmp_items[] = {
};
static void
-emmp_free(EConfig *ec, GSList *items, gpointer data)
+emmp_free (EConfig *ec, GSList *items, gpointer data)
{
/* the prefs data is freed automagically */
- g_slist_free(items);
+ g_slist_free (items);
}
static void
junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
{
- gchar *def_plugin = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo));
- const GList *plugins = mail_session_get_junk_plugins();
+ gchar *def_plugin = gtk_combo_box_get_active_text (GTK_COMBO_BOX (combo));
+ const GList *plugins = mail_session_get_junk_plugins ();
gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", def_plugin, NULL);
while (plugins) {
@@ -731,7 +731,7 @@ junk_plugin_setup (GtkComboBox *combo_box, EMMailerPrefs *prefs)
GtkCellRenderer *cell;
gint index = 0;
gboolean def_set = FALSE;
- const GList *plugins = mail_session_get_junk_plugins();
+ const GList *plugins = mail_session_get_junk_plugins ();
gchar *pdefault = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
store = gtk_list_store_new (1, G_TYPE_STRING);
@@ -765,7 +765,7 @@ junk_plugin_setup (GtkComboBox *combo_box, EMMailerPrefs *prefs)
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter, 0, iface->plugin_name, -1);
- if (!def_set && pdefault && iface->plugin_name && !strcmp(pdefault, iface->plugin_name)) {
+ if (!def_set && pdefault && iface->plugin_name && !strcmp (pdefault, iface->plugin_name)) {
gboolean status;
def_set = TRUE;
@@ -797,7 +797,7 @@ junk_plugin_setup (GtkComboBox *combo_box, EMMailerPrefs *prefs)
g_signal_connect (
combo_box, "changed",
- G_CALLBACK(junk_plugin_changed), prefs);
+ G_CALLBACK (junk_plugin_changed), prefs);
g_free (pdefault);
}
@@ -841,8 +841,8 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
ec = em_config_new(E_CONFIG_BOOK, "org.gnome.evolution.mail.prefs");
l = NULL;
for (i = 0; i < G_N_ELEMENTS (emmp_items); i++)
- l = g_slist_prepend(l, &emmp_items[i]);
- e_config_add_items((EConfig *)ec, l, NULL, NULL, emmp_free, prefs);
+ l = g_slist_prepend (l, &emmp_items[i]);
+ e_config_add_items ((EConfig *)ec, l, NULL, NULL, emmp_free, prefs);
/* General tab */
@@ -1206,9 +1206,9 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
NULL);
/* get our toplevel widget */
- target = em_config_target_new_prefs(ec, prefs->gconf);
- e_config_set_target((EConfig *)ec, (EConfigTarget *)target);
- toplevel = e_config_create_widget((EConfig *)ec);
+ target = em_config_target_new_prefs (ec, prefs->gconf);
+ e_config_set_target ((EConfig *)ec, (EConfigTarget *)target);
+ toplevel = e_config_create_widget ((EConfig *)ec);
gtk_container_add (GTK_CONTAINER (prefs), toplevel);
}
diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c
index 247ab242e4..1840d5a731 100644
--- a/modules/mail/em-network-prefs.c
+++ b/modules/mail/em-network-prefs.c
@@ -108,11 +108,11 @@ toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const gchar
}
static GtkWidget *
-emnp_widget_glade(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
+emnp_widget_glade (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
EMNetworkPrefs *prefs = data;
- return e_builder_get_widget(prefs->builder, item->label);
+ return e_builder_get_widget (prefs->builder, item->label);
}
static void
@@ -224,11 +224,11 @@ static EMConfigItem emnp_items[] = {
};
static void
-emnp_free(EConfig *ec, GSList *items, gpointer data)
+emnp_free (EConfig *ec, GSList *items, gpointer data)
{
/* the prefs data is freed automagically */
- g_slist_free(items);
+ g_slist_free (items);
}
static void
@@ -277,8 +277,8 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
ec = em_config_new(E_CONFIG_BOOK, "org.gnome.evolution.mail.networkPrefs");
l = NULL;
for (i = 0; i < G_N_ELEMENTS (emnp_items); i++)
- l = g_slist_prepend(l, &emnp_items[i]);
- e_config_add_items((EConfig *)ec, l, NULL, NULL, emnp_free, prefs);
+ l = g_slist_prepend (l, &emnp_items[i]);
+ e_config_add_items ((EConfig *)ec, l, NULL, NULL, emnp_free, prefs);
/* Proxy tab */
@@ -343,32 +343,32 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
prefs->lbl_socks_host = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblSocksHost"));
prefs->lbl_socks_port = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblSocksPort"));
g_signal_connect (prefs->socks_host, "changed",
- G_CALLBACK(widget_entry_changed_cb), GCONF_E_SOCKS_HOST_KEY);
+ G_CALLBACK (widget_entry_changed_cb), GCONF_E_SOCKS_HOST_KEY);
g_signal_connect (prefs->socks_port, "value_changed",
- G_CALLBACK(widget_entry_changed_cb), GCONF_E_SOCKS_PORT_KEY);
+ G_CALLBACK (widget_entry_changed_cb), GCONF_E_SOCKS_PORT_KEY);
#endif
/* Manual proxy options */
g_signal_connect (prefs->http_host, "changed",
- G_CALLBACK(widget_entry_changed_cb),
+ G_CALLBACK (widget_entry_changed_cb),
(gpointer) GCONF_E_HTTP_HOST_KEY);
g_signal_connect (prefs->https_host, "changed",
- G_CALLBACK(widget_entry_changed_cb),
+ G_CALLBACK (widget_entry_changed_cb),
(gpointer) GCONF_E_HTTPS_HOST_KEY);
g_signal_connect (prefs->ignore_hosts, "changed",
- G_CALLBACK(widget_entry_changed_cb),
+ G_CALLBACK (widget_entry_changed_cb),
(gpointer) GCONF_E_IGNORE_HOSTS_KEY);
g_signal_connect (prefs->http_port, "value_changed",
- G_CALLBACK(widget_entry_changed_cb),
+ G_CALLBACK (widget_entry_changed_cb),
(gpointer) GCONF_E_HTTP_PORT_KEY);
g_signal_connect (prefs->https_port, "value_changed",
- G_CALLBACK(widget_entry_changed_cb),
+ G_CALLBACK (widget_entry_changed_cb),
(gpointer) GCONF_E_HTTPS_PORT_KEY);
g_signal_connect (prefs->auth_user, "changed",
- G_CALLBACK(widget_entry_changed_cb),
+ G_CALLBACK (widget_entry_changed_cb),
(gpointer) GCONF_E_AUTH_USER_KEY);
g_signal_connect (prefs->auth_pwd, "changed",
- G_CALLBACK(widget_entry_changed_cb),
+ G_CALLBACK (widget_entry_changed_cb),
(gpointer) GCONF_E_AUTH_PWD_KEY);
gtk_toggle_button_set_active (prefs->manual_proxy, val == NETWORK_PROXY_MANUAL);
@@ -432,9 +432,9 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
}
/* get our toplevel widget */
- target = em_config_target_new_prefs(ec, prefs->gconf);
- e_config_set_target((EConfig *)ec, (EConfigTarget *)target);
- toplevel = e_config_create_widget((EConfig *)ec);
+ target = em_config_target_new_prefs (ec, prefs->gconf);
+ e_config_set_target ((EConfig *)ec, (EConfigTarget *)target);
+ toplevel = e_config_create_widget ((EConfig *)ec);
gtk_container_add (GTK_CONTAINER (prefs), toplevel);
}
diff --git a/modules/plugin-mono/e-plugin-mono.c b/modules/plugin-mono/e-plugin-mono.c
index 68a6233b43..e47c9ac29c 100644
--- a/modules/plugin-mono/e-plugin-mono.c
+++ b/modules/plugin-mono/e-plugin-mono.c
@@ -191,7 +191,7 @@ plugin_mono_invoke (EPlugin *plugin,
g_hash_table_insert (priv->methods, g_strdup (name), m);
}
- params = g_malloc0(sizeof (*params)*1);
+ params = g_malloc0 (sizeof (*params)*1);
params[0] = &data;
res = mono_runtime_invoke (m, priv->plugin, params, &x);
/* do i need to free params?? */
diff --git a/modules/plugin-python/e-plugin-python.c b/modules/plugin-python/e-plugin-python.c
index 6971a35543..8837432db2 100644
--- a/modules/plugin-python/e-plugin-python.c
+++ b/modules/plugin-python/e-plugin-python.c
@@ -162,7 +162,7 @@ plugin_python_invoke (EPlugin *plugin,
}
if (pValue) {
- Py_DECREF(pValue);
+ Py_DECREF (pValue);
/* Fixme */
return NULL;
} else
diff --git a/modules/windows-sens/evolution-windows-sens.c b/modules/windows-sens/evolution-windows-sens.c
index 0f7a69fc08..469087ba3e 100644
--- a/modules/windows-sens/evolution-windows-sens.c
+++ b/modules/windows-sens/evolution-windows-sens.c
@@ -198,19 +198,19 @@ struct ISensNetwork {
#include <e-util/e-extension.h>
/* 4E14FB9F-2E22-11D1-9964-00C04FBBB345 */
-DEFINE_GUID(IID_IEventSystem, 0x4E14FB9F, 0x2E22, 0x11D1, 0x99, 0x64, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45);
+DEFINE_GUID (IID_IEventSystem, 0x4E14FB9F, 0x2E22, 0x11D1, 0x99, 0x64, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45);
/* 4A6B0E15-2E38-11D1-9965-00C04FBBB345 */
-DEFINE_GUID(IID_IEventSubscription, 0x4A6B0E15, 0x2E38, 0x11D1, 0x99, 0x65, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45);
+DEFINE_GUID (IID_IEventSubscription, 0x4A6B0E15, 0x2E38, 0x11D1, 0x99, 0x65, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45);
/* d597bab1-5b9f-11d1-8dd2-00aa004abd5e */
-DEFINE_GUID(IID_ISensNetwork, 0xd597bab1, 0x5b9f, 0x11d1, 0x8d, 0xd2, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e);
+DEFINE_GUID (IID_ISensNetwork, 0xd597bab1, 0x5b9f, 0x11d1, 0x8d, 0xd2, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e);
/* 4E14FBA2-2E22-11D1-9964-00C04FBBB345 */
-DEFINE_GUID(CLSID_CEventSystem, 0x4E14FBA2, 0x2E22, 0x11D1, 0x99, 0x64, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45);
+DEFINE_GUID (CLSID_CEventSystem, 0x4E14FBA2, 0x2E22, 0x11D1, 0x99, 0x64, 0x00, 0xC0, 0x4F, 0xBB, 0xB3, 0x45);
/* 7542e960-79c7-11d1-88f9-0080c7d771bf */
-DEFINE_GUID(CLSID_CEventSubscription, 0x7542e960, 0x79c7, 0x11d1, 0x88, 0xf9, 0x00, 0x80, 0xc7, 0xd7, 0x71, 0xbf);
+DEFINE_GUID (CLSID_CEventSubscription, 0x7542e960, 0x79c7, 0x11d1, 0x88, 0xf9, 0x00, 0x80, 0xc7, 0xd7, 0x71, 0xbf);
/* Standard GObject macros */
#define E_TYPE_WINDOWS_SENS \
@@ -257,7 +257,7 @@ typedef struct ESensNetworkListener {
EWindowsSENS *ews_ptr;
} ESensNetworkListener;
-static void e_sens_network_listener_init(ESensNetworkListener**,EWindowsSENS*);
+static void e_sens_network_listener_init (ESensNetworkListener**,EWindowsSENS*);
/* Functions to implement ISensNetwork interface */
@@ -298,7 +298,7 @@ e_sens_network_listener_queryinterface (ISensNetwork *This,
{
if (IsEqualIID (iid, &IID_IUnknown) || IsEqualIID (iid, &IID_IDispatch) || IsEqualIID (iid, &IID_ISensNetwork)) {
*ppv = This;
- ((LPUNKNOWN)*ppv)->lpVtbl->AddRef((LPUNKNOWN)*ppv);
+ ((LPUNKNOWN)*ppv)->lpVtbl->AddRef ((LPUNKNOWN)*ppv);
return S_OK;
}
*ppv = NULL;
@@ -309,14 +309,14 @@ static ULONG WINAPI
e_sens_network_listener_addref (ISensNetwork *This)
{
ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This;
- return InterlockedIncrement(&(esnl_ptr->ref));
+ return InterlockedIncrement (&(esnl_ptr->ref));
}
static ULONG WINAPI
e_sens_network_listener_release (ISensNetwork *This)
{
ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This;
- ULONG tmp = InterlockedDecrement(&(esnl_ptr->ref));
+ ULONG tmp = InterlockedDecrement (&(esnl_ptr->ref));
return tmp;
}
@@ -371,7 +371,7 @@ e_sens_network_listener_connectionmade (ISensNetwork *This,
ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This;
EShell *shell = windows_sens_get_shell (esnl_ptr->ews_ptr);
/* Wait a second so that the connection stabilizes */
- g_usleep(G_USEC_PER_SEC);
+ g_usleep (G_USEC_PER_SEC);
e_shell_set_network_available (shell, TRUE);
}
return S_OK;
@@ -410,7 +410,7 @@ e_sens_network_listener_destinationreachable (ISensNetwork *This,
ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This;
EShell *shell = windows_sens_get_shell (esnl_ptr->ews_ptr);
/* Wait a second so that the connection stabilizes */
- g_usleep(G_USEC_PER_SEC);
+ g_usleep (G_USEC_PER_SEC);
e_shell_set_network_available (shell, TRUE);
}
return S_OK;
@@ -426,10 +426,10 @@ e_sens_network_listener_destinationreachablenoqocinfo (ISensNetwork *This,
}
static void
-e_sens_network_listener_init(ESensNetworkListener **esnl_ptr,
+e_sens_network_listener_init (ESensNetworkListener **esnl_ptr,
EWindowsSENS *ews)
{
- (*esnl_ptr) = g_new0(ESensNetworkListener,1);
+ (*esnl_ptr) = g_new0 (ESensNetworkListener,1);
(*esnl_ptr)->lpVtbl = &ESensNetworkListenerVtbl;
(*esnl_ptr)->ews_ptr = ews;
(*esnl_ptr)->ref = 1;
@@ -450,9 +450,9 @@ static const gchar * add_curly_braces_to_uuid (const gchar * string_uuid)
if (!string_uuid)
return NULL;
lstrcpy(curly_braced_uuid_string,"{");
- i = strlen(curly_braced_uuid_string);
- lstrcat(curly_braced_uuid_string+i,string_uuid);
- i = strlen(curly_braced_uuid_string);
+ i = strlen (curly_braced_uuid_string);
+ lstrcat (curly_braced_uuid_string+i,string_uuid);
+ i = strlen (curly_braced_uuid_string);
lstrcat(curly_braced_uuid_string+i,"}");
return curly_braced_uuid_string;
}
@@ -482,9 +482,9 @@ windows_sens_constructed (GObject *object)
guchar * subids[] = { 0, 0, 0, 0, 0 };
EWindowsSENS *extension = (E_WINDOWS_SENS (object));
- e_sens_network_listener_init(&pESensNetworkListener, extension);
+ e_sens_network_listener_init (&pESensNetworkListener, extension);
- CoInitialize(0);
+ CoInitialize (0);
res=CoCreateInstance (&CLSID_CEventSystem, 0,CLSCTX_SERVER,&IID_IEventSystem,(LPVOID*)&pEventSystem);
@@ -492,14 +492,14 @@ windows_sens_constructed (GObject *object)
unsigned i;
- for (i=0; i<G_N_ELEMENTS(methods); i++) {
+ for (i=0; i<G_N_ELEMENTS (methods); i++) {
res=CoCreateInstance (&CLSID_CEventSubscription, 0, CLSCTX_SERVER, &IID_IEventSubscription, (LPVOID*)&pEventSubscription);
if (res == S_OK && pEventSubscription) {
UUID tmp_uuid;
- UuidCreate(&tmp_uuid);
- UuidToString(&tmp_uuid, &subids[i]);
+ UuidCreate (&tmp_uuid);
+ UuidToString (&tmp_uuid, &subids[i]);
res=pEventSubscription->lpVtbl->put_SubscriptionID (pEventSubscription, _mb2wchar (add_curly_braces_to_uuid ((gchar *)subids[i])));
if (res) {
RpcStringFree (&subids[i]);
@@ -534,7 +534,7 @@ windows_sens_constructed (GObject *object)
}
}
if (pEventSubscription)
- pEventSubscription->lpVtbl->Release(pEventSubscription);
+ pEventSubscription->lpVtbl->Release (pEventSubscription);
}
/* Do not try to get initial state when we are sure we will not get system events.
@@ -556,7 +556,7 @@ windows_sens_constructed (GObject *object)
alive=pIsNetworkAlive (&Network);
}
- FreeLibrary(hDLL);
+ FreeLibrary (hDLL);
e_shell_set_network_available (shell, alive);
}
diff --git a/shell/e-shell-meego.c b/shell/e-shell-meego.c
index a9128c1b9b..29c7f293fd 100644
--- a/shell/e-shell-meego.c
+++ b/shell/e-shell-meego.c
@@ -87,7 +87,7 @@ e_shell_detect_meego (gboolean *is_meego,
}
display = gdk_display_get_default ();
- screen = gdk_display_get_default_screen (gdk_display_get_default());
+ screen = gdk_display_get_default_screen (gdk_display_get_default ());
gdk_error_trap_push ();
diff --git a/shell/e-shell-searchbar.h b/shell/e-shell-searchbar.h
index 84049e99e0..a5cb2506cf 100644
--- a/shell/e-shell-searchbar.h
+++ b/shell/e-shell-searchbar.h
@@ -68,7 +68,8 @@ struct _EShellSearchbarClass {
GType e_shell_searchbar_get_type (void);
GtkWidget * e_shell_searchbar_new (EShellView *shell_view);
-EShellView * e_shell_searchbar_get_shell_view(EShellSearchbar *searchbar);
+EShellView * e_shell_searchbar_get_shell_view
+ (EShellSearchbar *searchbar);
gboolean e_shell_searchbar_get_express_mode
(EShellSearchbar *searchbar);
void e_shell_searchbar_set_express_mode
diff --git a/shell/e-shell-sidebar.h b/shell/e-shell-sidebar.h
index 95f2e97dad..4b22258b63 100644
--- a/shell/e-shell-sidebar.h
+++ b/shell/e-shell-sidebar.h
@@ -77,8 +77,10 @@ struct _EShellView *
const gchar * e_shell_sidebar_get_icon_name (EShellSidebar *shell_sidebar);
void e_shell_sidebar_set_icon_name (EShellSidebar *shell_sidebar,
const gchar *icon_name);
-const gchar * e_shell_sidebar_get_primary_text(EShellSidebar *shell_sidebar);
-void e_shell_sidebar_set_primary_text(EShellSidebar *shell_sidebar,
+const gchar * e_shell_sidebar_get_primary_text
+ (EShellSidebar *shell_sidebar);
+void e_shell_sidebar_set_primary_text
+ (EShellSidebar *shell_sidebar,
const gchar *primary_text);
const gchar * e_shell_sidebar_get_secondary_text
(EShellSidebar *shell_sidebar);
diff --git a/shell/e-shell-window.h b/shell/e-shell-window.h
index 9baa3cf8e9..8e29093ed7 100644
--- a/shell/e-shell-window.h
+++ b/shell/e-shell-window.h
@@ -96,7 +96,8 @@ struct _EShellView *
GtkAction * e_shell_window_get_shell_view_action
(EShellWindow *shell_window,
const gchar *view_name);
-EFocusTracker * e_shell_window_get_focus_tracker(EShellWindow *shell_window);
+EFocusTracker * e_shell_window_get_focus_tracker
+ (EShellWindow *shell_window);
GtkUIManager * e_shell_window_get_ui_manager (EShellWindow *shell_window);
GtkAction * e_shell_window_get_action (EShellWindow *shell_window,
const gchar *action_name);
diff --git a/shell/es-event.c b/shell/es-event.c
index c647827586..71381c1cfd 100644
--- a/shell/es-event.c
+++ b/shell/es-event.c
@@ -36,19 +36,19 @@ static GObjectClass *eme_parent;
static ESEvent *es_event;
static void
-eme_init(GObject *o)
+eme_init (GObject *o)
{
/*ESEvent *eme = (ESEvent *)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 ES_EVENT_TARGET_STATE: {
@@ -58,31 +58,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
-es_event_get_type(void)
+es_event_get_type (void)
{
static GType type = 0;
if (type == 0) {
static const GTypeInfo info = {
- sizeof(ESEventClass),
+ sizeof (ESEventClass),
NULL, NULL,
(GClassInitFunc)eme_class_init,
NULL, NULL,
- sizeof(ESEvent), 0,
+ sizeof (ESEvent), 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(), "ESEvent", &info, 0);
}
@@ -96,10 +96,10 @@ es_event_get_type(void)
*
* Return: the shell event handler
**/
-ESEvent *es_event_peek(void)
+ESEvent *es_event_peek (void)
{
if (es_event == NULL) {
- es_event = g_object_new(es_event_get_type(), NULL);
+ es_event = g_object_new (es_event_get_type (), NULL);
/** @HookPoint: Shell Events Hookpoint
* Id: org.gnome.evolution.shell.events
*
@@ -120,9 +120,9 @@ es_event_target_new (ESEvent *eme)
}
ESEventTargetState *
-es_event_target_new_state(ESEvent *eme, gint state)
+es_event_target_new_state (ESEvent *eme, gint state)
{
- ESEventTargetState *t = e_event_target_new(&eme->event, ES_EVENT_TARGET_STATE, sizeof(*t));
+ ESEventTargetState *t = e_event_target_new (&eme->event, ES_EVENT_TARGET_STATE, sizeof (*t));
guint32 mask = ~0;
t->state = state;
@@ -138,9 +138,9 @@ es_event_target_new_state(ESEvent *eme, gint state)
}
ESEventTargetUpgrade *
-es_event_target_new_upgrade(ESEvent *eme, gint major, gint minor, gint revision)
+es_event_target_new_upgrade (ESEvent *eme, gint major, gint minor, gint revision)
{
- ESEventTargetUpgrade *t = e_event_target_new(&eme->event, ES_EVENT_TARGET_UPGRADE, sizeof(*t));
+ ESEventTargetUpgrade *t = e_event_target_new (&eme->event, ES_EVENT_TARGET_UPGRADE, sizeof (*t));
t->major = major;
t->minor = minor;
@@ -179,15 +179,15 @@ static const EEventHookTargetMap emeh_targets[] = {
};
static void
-emeh_finalise(GObject *o)
+emeh_finalise (GObject *o)
{
/*EPluginHook *eph = (EPluginHook *)o;*/
- ((GObjectClass *)emeh_parent_class)->finalize(o);
+ ((GObjectClass *)emeh_parent_class)->finalize (o);
}
static void
-emeh_class_init(EPluginHookClass *klass)
+emeh_class_init (EPluginHookClass *klass)
{
gint i;
@@ -202,23 +202,23 @@ emeh_class_init(EPluginHookClass *klass)
((EPluginHookClass *)klass)->id = "org.gnome.evolution.shell.events:1.0";
for (i=0;emeh_targets[i].type;i++)
- e_event_hook_class_add_target_map((EEventHookClass *)klass, &emeh_targets[i]);
+ e_event_hook_class_add_target_map ((EEventHookClass *)klass, &emeh_targets[i]);
- ((EEventHookClass *)klass)->event = (EEvent *)es_event_peek();
+ ((EEventHookClass *)klass)->event = (EEvent *)es_event_peek ();
}
GType
-es_event_hook_get_type(void)
+es_event_hook_get_type (void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo info = {
- sizeof(ESEventHookClass), NULL, NULL, (GClassInitFunc) emeh_class_init, NULL, NULL,
- sizeof(ESEventHook), 0, (GInstanceInitFunc) NULL,
+ sizeof (ESEventHookClass), NULL, NULL, (GClassInitFunc) emeh_class_init, NULL, NULL,
+ sizeof (ESEventHook), 0, (GInstanceInitFunc) NULL,
};
- emeh_parent_class = g_type_class_ref(e_event_hook_get_type());
+ emeh_parent_class = g_type_class_ref (e_event_hook_get_type ());
type = g_type_register_static(e_event_hook_get_type(), "ESEventHook", &info, 0);
}
diff --git a/shell/main.c b/shell/main.c
index 55af1fd4cc..167f7f5e84 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -140,7 +140,7 @@ categories_icon_theme_hack (void)
/* Warning dialog to scare people off a little bit. */
static gboolean
-show_development_warning(void)
+show_development_warning (void)
{
GtkWidget *action_area;
GtkWidget *content_area;
@@ -173,7 +173,7 @@ show_development_warning(void)
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
- text = g_strdup_printf(
+ text = g_strdup_printf (
/* xgettext:no-c-format */
/* Preview/Alpha/Beta version warning message */
_("Hi. Thanks for taking the time to download this preview release\n"
@@ -193,7 +193,7 @@ show_development_warning(void)
"eagerly await your contributions!\n"),
STABLE_VERSION);
label = gtk_label_new (text);
- g_free(text);
+ g_free (text);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
@@ -202,8 +202,8 @@ show_development_warning(void)
label = gtk_label_new (_("Thanks\n"
"The Evolution Team\n"));
- gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT);
- gtk_misc_set_alignment(GTK_MISC(label), 1, .5);
+ gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
+ gtk_misc_set_alignment (GTK_MISC (label), 1, .5);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
@@ -524,8 +524,8 @@ main (gint argc, gchar **argv)
}
if (unregister_handlers) {
- _e_win32_unregister_mailer();
- _e_win32_unregister_addressbook();
+ _e_win32_unregister_mailer ();
+ _e_win32_unregister_addressbook ();
exit (0);
}
diff --git a/smime/lib/e-cert-trust.c b/smime/lib/e-cert-trust.c
index 8a8329c7f8..cec7e06041 100644
--- a/smime/lib/e-cert-trust.c
+++ b/smime/lib/e-cert-trust.c
@@ -48,355 +48,408 @@
void
e_cert_trust_init (CERTCertTrust *trust)
{
- memset(trust, 0, sizeof(CERTCertTrust));
+ memset(trust, 0, sizeof(CERTCertTrust));
}
void
e_cert_trust_init_with_values (CERTCertTrust *trust,
- guint ssl,
- guint email,
- guint objsign)
+ guint ssl,
+ 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
-e_cert_trust_copy (CERTCertTrust *trust, CERTCertTrust *t)
+e_cert_trust_copy (CERTCertTrust *trust,
+ CERTCertTrust *t)
{
- if (t)
- memcpy(trust, t, sizeof(CERTCertTrust));
- else
- memset(trust, 0, sizeof(CERTCertTrust));
+ if (t)
+ memcpy(trust, t, sizeof(CERTCertTrust));
+ else
+ memset(trust, 0, sizeof(CERTCertTrust));
}
void
-e_cert_trust_add_ca_trust (CERTCertTrust *trust, PRBool ssl, PRBool email, PRBool objSign)
+e_cert_trust_add_ca_trust (CERTCertTrust *trust,
+ PRBool ssl,
+ PRBool email,
+ PRBool objSign)
{
- if (ssl) {
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED_CA);
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED_CLIENT_CA);
- }
- if (email) {
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED_CA);
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED_CLIENT_CA);
- }
- if (objSign) {
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED_CA);
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED_CLIENT_CA);
- }
+ if (ssl) {
+ e_cert_trust_add_trust (
+ &trust->sslFlags, CERTDB_TRUSTED_CA);
+ e_cert_trust_add_trust (
+ &trust->sslFlags, CERTDB_TRUSTED_CLIENT_CA);
+ }
+
+ if (email) {
+ e_cert_trust_add_trust (
+ &trust->emailFlags, CERTDB_TRUSTED_CA);
+ e_cert_trust_add_trust (
+ &trust->emailFlags, CERTDB_TRUSTED_CLIENT_CA);
+ }
+
+ if (objSign) {
+ e_cert_trust_add_trust (
+ &trust->objectSigningFlags, CERTDB_TRUSTED_CA);
+ e_cert_trust_add_trust (
+ &trust->objectSigningFlags, CERTDB_TRUSTED_CLIENT_CA);
+ }
}
void
-e_cert_trust_add_peer_trust (CERTCertTrust *trust, PRBool ssl, PRBool email, PRBool objSign)
+e_cert_trust_add_peer_trust (CERTCertTrust *trust,
+ PRBool ssl,
+ PRBool email,
+ PRBool objSign)
{
- if (ssl)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED);
- if (email)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED);
- if (objSign)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED);
+ if (ssl)
+ e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED);
+ if (email)
+ e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED);
+ if (objSign)
+ e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED);
}
void
e_cert_trust_set_ssl_trust (CERTCertTrust *trust,
- PRBool peer, PRBool tPeer,
- PRBool ca, PRBool tCA, PRBool tClientCA,
- PRBool user, PRBool warn)
+ PRBool peer,
+ PRBool tPeer,
+ PRBool ca,
+ PRBool tCA,
+ PRBool tClientCA,
+ PRBool user,
+ PRBool warn)
{
- trust->sslFlags = 0;
- if (peer || tPeer)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_VALID_PEER);
- if (tPeer)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED);
- if (ca || tCA)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_VALID_CA);
- if (tClientCA)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED_CLIENT_CA);
- if (tCA)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED_CA);
- if (user)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_USER);
- if (warn)
- e_cert_trust_add_trust(&trust->sslFlags, CERTDB_SEND_WARN);
+ trust->sslFlags = 0;
+ if (peer || tPeer)
+ e_cert_trust_add_trust(&trust->sslFlags, CERTDB_VALID_PEER);
+ if (tPeer)
+ e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED);
+ if (ca || tCA)
+ e_cert_trust_add_trust(&trust->sslFlags, CERTDB_VALID_CA);
+ if (tClientCA)
+ e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED_CLIENT_CA);
+ if (tCA)
+ e_cert_trust_add_trust(&trust->sslFlags, CERTDB_TRUSTED_CA);
+ if (user)
+ e_cert_trust_add_trust(&trust->sslFlags, CERTDB_USER);
+ if (warn)
+ e_cert_trust_add_trust(&trust->sslFlags, CERTDB_SEND_WARN);
}
void
e_cert_trust_set_email_trust (CERTCertTrust *trust,
- PRBool peer, PRBool tPeer,
- PRBool ca, PRBool tCA, PRBool tClientCA,
- PRBool user, PRBool warn)
+ PRBool peer,
+ PRBool tPeer,
+ PRBool ca,
+ PRBool tCA,
+ PRBool tClientCA,
+ PRBool user,
+ PRBool warn)
{
- trust->emailFlags = 0;
- if (peer || tPeer)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_VALID_PEER);
- if (tPeer)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED);
- if (ca || tCA)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_VALID_CA);
- if (tClientCA)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED_CLIENT_CA);
- if (tCA)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED_CA);
- if (user)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_USER);
- if (warn)
- e_cert_trust_add_trust(&trust->emailFlags, CERTDB_SEND_WARN);
+ trust->emailFlags = 0;
+ if (peer || tPeer)
+ e_cert_trust_add_trust(&trust->emailFlags, CERTDB_VALID_PEER);
+ if (tPeer)
+ e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED);
+ if (ca || tCA)
+ e_cert_trust_add_trust(&trust->emailFlags, CERTDB_VALID_CA);
+ if (tClientCA)
+ e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED_CLIENT_CA);
+ if (tCA)
+ e_cert_trust_add_trust(&trust->emailFlags, CERTDB_TRUSTED_CA);
+ if (user)
+ e_cert_trust_add_trust(&trust->emailFlags, CERTDB_USER);
+ if (warn)
+ e_cert_trust_add_trust(&trust->emailFlags, CERTDB_SEND_WARN);
}
void
e_cert_trust_set_objsign_trust (CERTCertTrust *trust,
- PRBool peer, PRBool tPeer,
- PRBool ca, PRBool tCA, PRBool tClientCA,
- PRBool user, PRBool warn)
+ PRBool peer,
+ PRBool tPeer,
+ PRBool ca,
+ PRBool tCA,
+ PRBool tClientCA,
+ PRBool user,
+ PRBool warn)
{
- trust->objectSigningFlags = 0;
- if (peer || tPeer)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_VALID_PEER);
- if (tPeer)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED);
- if (ca || tCA)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_VALID_CA);
- if (tClientCA)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED_CLIENT_CA);
- if (tCA)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED_CA);
- if (user)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_USER);
- if (warn)
- e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_SEND_WARN);
+ trust->objectSigningFlags = 0;
+ if (peer || tPeer)
+ e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_VALID_PEER);
+ if (tPeer)
+ e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED);
+ if (ca || tCA)
+ e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_VALID_CA);
+ if (tClientCA)
+ e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED_CLIENT_CA);
+ if (tCA)
+ e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_TRUSTED_CA);
+ if (user)
+ e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_USER);
+ if (warn)
+ e_cert_trust_add_trust(&trust->objectSigningFlags, CERTDB_SEND_WARN);
}
void
e_cert_trust_set_valid_ca (CERTCertTrust *trust)
{
- e_cert_trust_set_ssl_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_TRUE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_email_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_TRUE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_objsign_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_TRUE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
+ e_cert_trust_set_ssl_trust (
+ trust, PR_FALSE, PR_FALSE, PR_TRUE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_email_trust (
+ trust, PR_FALSE, PR_FALSE, PR_TRUE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_objsign_trust (
+ trust, PR_FALSE, PR_FALSE, PR_TRUE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
}
void
e_cert_trust_set_trusted_server_ca (CERTCertTrust *trust)
{
- e_cert_trust_set_ssl_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_TRUE, PR_TRUE, PR_FALSE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_email_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_TRUE, PR_TRUE, PR_FALSE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_objsign_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_TRUE, PR_TRUE, PR_FALSE,
- PR_FALSE, PR_FALSE);
+ e_cert_trust_set_ssl_trust (
+ trust, PR_FALSE, PR_FALSE, PR_TRUE,
+ PR_TRUE, PR_FALSE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_email_trust (
+ trust, PR_FALSE, PR_FALSE, PR_TRUE,
+ PR_TRUE, PR_FALSE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_objsign_trust (
+ trust, PR_FALSE, PR_FALSE, PR_TRUE,
+ PR_TRUE, PR_FALSE, PR_FALSE, PR_FALSE);
}
void
e_cert_trust_set_trusted_ca (CERTCertTrust *trust)
{
- e_cert_trust_set_ssl_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_TRUE, PR_TRUE, PR_TRUE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_email_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_TRUE, PR_TRUE, PR_TRUE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_objsign_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_TRUE, PR_TRUE, PR_TRUE,
- PR_FALSE, PR_FALSE);
+ e_cert_trust_set_ssl_trust (
+ trust, PR_FALSE, PR_FALSE, PR_TRUE,
+ PR_TRUE, PR_TRUE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_email_trust (
+ trust, PR_FALSE, PR_FALSE, PR_TRUE,
+ PR_TRUE, PR_TRUE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_objsign_trust (
+ trust, PR_FALSE, PR_FALSE, PR_TRUE,
+ PR_TRUE, PR_TRUE, PR_FALSE, PR_FALSE);
}
void
e_cert_trust_set_valid_peer (CERTCertTrust *trust)
{
- e_cert_trust_set_ssl_trust (trust,
- PR_TRUE, PR_FALSE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_email_trust (trust,
- PR_TRUE, PR_FALSE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_objsign_trust (trust,
- PR_TRUE, PR_FALSE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
+ e_cert_trust_set_ssl_trust (
+ trust, PR_TRUE, PR_FALSE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_email_trust (
+ trust, PR_TRUE, PR_FALSE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_objsign_trust (
+ trust, PR_TRUE, PR_FALSE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
}
void
e_cert_trust_set_valid_server_peer (CERTCertTrust *trust)
{
- e_cert_trust_set_ssl_trust (trust,
- PR_TRUE, PR_FALSE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_email_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_objsign_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
+ e_cert_trust_set_ssl_trust (
+ trust, PR_TRUE, PR_FALSE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_email_trust (
+ trust, PR_FALSE, PR_FALSE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_objsign_trust (
+ trust, PR_FALSE, PR_FALSE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
}
void
e_cert_trust_set_trusted_peer (CERTCertTrust *trust)
{
- e_cert_trust_set_ssl_trust (trust,
- PR_TRUE, PR_TRUE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_email_trust (trust,
- PR_TRUE, PR_TRUE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
- e_cert_trust_set_objsign_trust (trust,
- PR_TRUE, PR_TRUE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE);
+ e_cert_trust_set_ssl_trust (
+ trust, PR_TRUE, PR_TRUE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_email_trust (
+ trust, PR_TRUE, PR_TRUE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
+
+ e_cert_trust_set_objsign_trust (
+ trust, PR_TRUE, PR_TRUE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE);
}
void
e_cert_trust_set_user (CERTCertTrust *trust)
{
- e_cert_trust_set_ssl_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_TRUE, PR_FALSE);
- e_cert_trust_set_email_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_TRUE, PR_FALSE);
- e_cert_trust_set_objsign_trust (trust,
- PR_FALSE, PR_FALSE,
- PR_FALSE, PR_FALSE, PR_FALSE,
- PR_TRUE, PR_FALSE);
+ e_cert_trust_set_ssl_trust (
+ trust, PR_FALSE, PR_FALSE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_TRUE, PR_FALSE);
+
+ e_cert_trust_set_email_trust (
+ trust, PR_FALSE, PR_FALSE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_TRUE, PR_FALSE);
+
+ e_cert_trust_set_objsign_trust (
+ trust, PR_FALSE, PR_FALSE, PR_FALSE,
+ PR_FALSE, PR_FALSE, PR_TRUE, PR_FALSE);
}
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))
- return PR_TRUE;
- return PR_FALSE;
+ 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;
}
PRBool
e_cert_trust_has_ca (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
- PRBool checkObjSign)
+ PRBool checkSSL,
+ PRBool checkEmail,
+ PRBool checkObjSign)
{
- if (checkSSL && !e_cert_trust_has_trust(trust->sslFlags, CERTDB_VALID_CA))
- return PR_FALSE;
- if (checkEmail && !e_cert_trust_has_trust(trust->emailFlags, CERTDB_VALID_CA))
- return PR_FALSE;
- if (checkObjSign && !e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_VALID_CA))
- return PR_FALSE;
- return PR_TRUE;
+ if (checkSSL && !e_cert_trust_has_trust (
+ trust->sslFlags, CERTDB_VALID_CA))
+ return PR_FALSE;
+
+ if (checkEmail && !e_cert_trust_has_trust (
+ trust->emailFlags, CERTDB_VALID_CA))
+ return PR_FALSE;
+
+ if (checkObjSign && !e_cert_trust_has_trust (
+ trust->objectSigningFlags, CERTDB_VALID_CA))
+ return PR_FALSE;
+
+ return PR_TRUE;
}
PRBool
e_cert_trust_has_peer (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
- PRBool checkObjSign)
+ PRBool checkSSL,
+ PRBool checkEmail,
+ PRBool checkObjSign)
{
- if (checkSSL && !e_cert_trust_has_trust(trust->sslFlags, CERTDB_VALID_PEER))
- return PR_FALSE;
- if (checkEmail && !e_cert_trust_has_trust(trust->emailFlags, CERTDB_VALID_PEER))
- return PR_FALSE;
- if (checkObjSign && !e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_VALID_PEER))
- return PR_FALSE;
- return PR_TRUE;
+ if (checkSSL && !e_cert_trust_has_trust (
+ trust->sslFlags, CERTDB_VALID_PEER))
+ return PR_FALSE;
+
+ if (checkEmail && !e_cert_trust_has_trust (
+ trust->emailFlags, CERTDB_VALID_PEER))
+ return PR_FALSE;
+
+ if (checkObjSign && !e_cert_trust_has_trust (
+ trust->objectSigningFlags, CERTDB_VALID_PEER))
+ return PR_FALSE;
+
+ return PR_TRUE;
}
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))
- return PR_TRUE;
- return PR_FALSE;
+ 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;
}
PRBool
e_cert_trust_has_user (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
- PRBool checkObjSign)
+ PRBool checkSSL,
+ PRBool checkEmail,
+ PRBool checkObjSign)
{
- if (checkSSL && !e_cert_trust_has_trust(trust->sslFlags, CERTDB_USER))
- return PR_FALSE;
- if (checkEmail && !e_cert_trust_has_trust(trust->emailFlags, CERTDB_USER))
- return PR_FALSE;
- if (checkObjSign && !e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_USER))
- return PR_FALSE;
- return PR_TRUE;
+ if (checkSSL && !e_cert_trust_has_trust (
+ trust->sslFlags, CERTDB_USER))
+ return PR_FALSE;
+
+ if (checkEmail && !e_cert_trust_has_trust (
+ trust->emailFlags, CERTDB_USER))
+ return PR_FALSE;
+
+ if (checkObjSign && !e_cert_trust_has_trust (
+ trust->objectSigningFlags, CERTDB_USER))
+ return PR_FALSE;
+
+ return PR_TRUE;
}
PRBool
e_cert_trust_has_trusted_ca (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
- PRBool checkObjSign)
+ PRBool checkSSL,
+ PRBool checkEmail,
+ PRBool checkObjSign)
{
- if (checkSSL && !(e_cert_trust_has_trust(trust->sslFlags, CERTDB_TRUSTED_CA) ||
- e_cert_trust_has_trust(trust->sslFlags, CERTDB_TRUSTED_CLIENT_CA)))
- return PR_FALSE;
- if (checkEmail && !(e_cert_trust_has_trust(trust->emailFlags, CERTDB_TRUSTED_CA) ||
- e_cert_trust_has_trust(trust->emailFlags, CERTDB_TRUSTED_CLIENT_CA)))
- return PR_FALSE;
- if (checkObjSign &&
- !(e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_TRUSTED_CA) ||
- e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_TRUSTED_CLIENT_CA)))
- return PR_FALSE;
- return PR_TRUE;
+ if (checkSSL && !(e_cert_trust_has_trust (
+ trust->sslFlags, CERTDB_TRUSTED_CA) ||
+ e_cert_trust_has_trust (
+ trust->sslFlags, CERTDB_TRUSTED_CLIENT_CA)))
+ return PR_FALSE;
+
+ if (checkEmail && !(e_cert_trust_has_trust (
+ trust->emailFlags, CERTDB_TRUSTED_CA) ||
+ e_cert_trust_has_trust (
+ trust->emailFlags, CERTDB_TRUSTED_CLIENT_CA)))
+ return PR_FALSE;
+
+ if (checkObjSign && !(e_cert_trust_has_trust (
+ trust->objectSigningFlags, CERTDB_TRUSTED_CA) ||
+ e_cert_trust_has_trust (
+ trust->objectSigningFlags, CERTDB_TRUSTED_CLIENT_CA)))
+ return PR_FALSE;
+
+ return PR_TRUE;
}
PRBool
e_cert_trust_has_trusted_peer (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
- PRBool checkObjSign)
+ PRBool checkSSL,
+ PRBool checkEmail,
+ PRBool checkObjSign)
{
- if (checkSSL && !(e_cert_trust_has_trust(trust->sslFlags, CERTDB_TRUSTED)))
- return PR_FALSE;
- if (checkEmail && !(e_cert_trust_has_trust(trust->emailFlags, CERTDB_TRUSTED)))
- return PR_FALSE;
- if (checkObjSign &&
- !(e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_TRUSTED)))
- return PR_FALSE;
- return PR_TRUE;
+ if (checkSSL && !(e_cert_trust_has_trust (
+ trust->sslFlags, CERTDB_TRUSTED)))
+ return PR_FALSE;
+
+ if (checkEmail && !(e_cert_trust_has_trust (
+ trust->emailFlags, CERTDB_TRUSTED)))
+ return PR_FALSE;
+
+ if (checkObjSign && !(e_cert_trust_has_trust (
+ trust->objectSigningFlags, CERTDB_TRUSTED)))
+ return PR_FALSE;
+
+ return PR_TRUE;
}
void
e_cert_trust_add_trust (guint *t, guint v)
{
- *t |= v;
+ *t |= v;
}
PRBool
e_cert_trust_has_trust (guint t, guint v)
{
- return (t & v);
+ return (t & v);
}
diff --git a/widgets/misc/e-account-manager.h b/widgets/misc/e-account-manager.h
index dab8b2832f..0dc5892b2e 100644
--- a/widgets/misc/e-account-manager.h
+++ b/widgets/misc/e-account-manager.h
@@ -68,7 +68,8 @@ GType e_account_manager_get_type (void);
GtkWidget * e_account_manager_new (EAccountList *account_list);
void e_account_manager_add_account (EAccountManager *manager);
void e_account_manager_edit_account (EAccountManager *manager);
-void e_account_manager_delete_account(EAccountManager *manager);
+void e_account_manager_delete_account
+ (EAccountManager *manager);
EAccountList * e_account_manager_get_account_list
(EAccountManager *manager);
void e_account_manager_set_account_list
diff --git a/widgets/misc/e-account-tree-view.h b/widgets/misc/e-account-tree-view.h
index ea13dc3902..e9b2f7f8d3 100644
--- a/widgets/misc/e-account-tree-view.h
+++ b/widgets/misc/e-account-tree-view.h
@@ -75,8 +75,10 @@ EAccountList * e_account_tree_view_get_account_list
void e_account_tree_view_set_account_list
(EAccountTreeView *tree_view,
EAccountList *account_list);
-EAccount * e_account_tree_view_get_selected(EAccountTreeView *tree_view);
-gboolean e_account_tree_view_set_selected(EAccountTreeView *tree_view,
+EAccount * e_account_tree_view_get_selected
+ (EAccountTreeView *tree_view);
+gboolean e_account_tree_view_set_selected
+ (EAccountTreeView *tree_view,
EAccount *account);
G_END_DECLS
diff --git a/widgets/misc/e-attachment-button.h b/widgets/misc/e-attachment-button.h
index 89ecccfe9b..a27d8ae146 100644
--- a/widgets/misc/e-attachment-button.h
+++ b/widgets/misc/e-attachment-button.h
@@ -74,8 +74,10 @@ gboolean e_attachment_button_get_expandable
void e_attachment_button_set_expandable
(EAttachmentButton *button,
gboolean expandable);
-gboolean e_attachment_button_get_expanded(EAttachmentButton *button);
-void e_attachment_button_set_expanded(EAttachmentButton *button,
+gboolean e_attachment_button_get_expanded
+ (EAttachmentButton *button);
+void e_attachment_button_set_expanded
+ (EAttachmentButton *button,
gboolean expanded);
G_END_DECLS
diff --git a/widgets/misc/e-attachment-view.h b/widgets/misc/e-attachment-view.h
index 164413221c..0f5bcf1c0c 100644
--- a/widgets/misc/e-attachment-view.h
+++ b/widgets/misc/e-attachment-view.h
@@ -172,7 +172,8 @@ void e_attachment_view_unselect_path (EAttachmentView *view,
GtkTreePath *path);
void e_attachment_view_select_all (EAttachmentView *view);
void e_attachment_view_unselect_all (EAttachmentView *view);
-void e_attachment_view_sync_selection(EAttachmentView *view,
+void e_attachment_view_sync_selection
+ (EAttachmentView *view,
EAttachmentView *target);
/* Drag Source Support */
@@ -222,8 +223,10 @@ GtkActionGroup *e_attachment_view_add_action_group
GtkActionGroup *e_attachment_view_get_action_group
(EAttachmentView *view,
const gchar *group_name);
-GtkWidget * e_attachment_view_get_popup_menu(EAttachmentView *view);
-GtkUIManager * e_attachment_view_get_ui_manager(EAttachmentView *view);
+GtkWidget * e_attachment_view_get_popup_menu
+ (EAttachmentView *view);
+GtkUIManager * e_attachment_view_get_ui_manager
+ (EAttachmentView *view);
GtkAction * e_attachment_view_recent_action_new
(EAttachmentView *view,
const gchar *action_name,
@@ -233,7 +236,8 @@ void e_attachment_view_show_popup_menu
GdkEventButton *event,
GtkMenuPositionFunc func,
gpointer user_data);
-void e_attachment_view_update_actions(EAttachmentView *view);
+void e_attachment_view_update_actions
+ (EAttachmentView *view);
G_END_DECLS
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index 7a850ee137..d346117a8b 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -47,11 +47,11 @@ static const gint e_calendar_item_days_in_month[12] = {
&& ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))) ? 1 : 0)
static void e_calendar_item_dispose (GObject *object);
-static void e_calendar_item_get_property(GObject *object,
+static void e_calendar_item_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void e_calendar_item_set_property(GObject *object,
+static void e_calendar_item_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
@@ -125,7 +125,7 @@ static void e_calendar_item_get_month_info (ECalendarItem *calitem,
gint *first_day_offset,
gint *days_in_month,
gint *days_in_prev_month);
-static void e_calendar_item_recalc_sizes(ECalendarItem *calitem);
+static void e_calendar_item_recalc_sizes (ECalendarItem *calitem);
static void e_calendar_item_get_day_style (ECalendarItem *calitem,
gint year,
@@ -147,12 +147,12 @@ static void e_calendar_item_check_selection_end (ECalendarItem *calitem,
gint start_day,
gint *end_month,
gint *end_day);
-static void e_calendar_item_check_selection_start(ECalendarItem *calitem,
+static void e_calendar_item_check_selection_start (ECalendarItem *calitem,
gint *start_month,
gint *start_day,
gint end_month,
gint end_day);
-static void e_calendar_item_add_days_to_selection(ECalendarItem *calitem,
+static void e_calendar_item_add_days_to_selection (ECalendarItem *calitem,
gint days);
static void e_calendar_item_round_up_selection (ECalendarItem *calitem,
gint *month_offset,
@@ -179,7 +179,7 @@ static gboolean e_calendar_item_ensure_days_visible (ECalendarItem *calitem,
static void e_calendar_item_show_popup_menu (ECalendarItem *calitem,
GdkEventButton *event,
gint month_offset);
-static void e_calendar_item_on_menu_item_activate(GtkWidget *menuitem,
+static void e_calendar_item_on_menu_item_activate (GtkWidget *menuitem,
ECalendarItem *calitem);
static void e_calendar_item_position_menu (GtkMenu *menu,
gint *x,
@@ -850,7 +850,7 @@ e_calendar_item_realize (GnomeCanvasItem *item)
calitem = E_CALENDAR_ITEM (item);
- e_calendar_item_style_set (GTK_WIDGET(item->canvas), calitem);
+ e_calendar_item_style_set (GTK_WIDGET (item->canvas), calitem);
e_extensible_load_extensions (E_EXTENSIBLE (calitem));
}
@@ -1778,7 +1778,7 @@ e_calendar_item_stop_selecting (ECalendarItem *calitem, guint32 time)
/* If the user selects the grayed dates before the first month or
after the last month, we move backwards or forwards one month.
- The set_month() call should take care of updating the selection. */
+ The set_month () call should take care of updating the selection. */
if (calitem->selection_end_month_offset == -1)
e_calendar_item_set_first_month (calitem, calitem->year,
calitem->month - 1);
@@ -2553,7 +2553,7 @@ e_calendar_item_get_month_info (ECalendarItem *calitem,
}
void
-e_calendar_item_get_first_month(ECalendarItem *calitem,
+e_calendar_item_get_first_month (ECalendarItem *calitem,
gint *year,
gint *month)
{
@@ -2601,7 +2601,7 @@ e_calendar_item_preserve_day_selection (ECalendarItem *calitem,
/* This also handles values of month < 0 or > 11 by updating the year. */
void
-e_calendar_item_set_first_month(ECalendarItem *calitem,
+e_calendar_item_set_first_month (ECalendarItem *calitem,
gint year,
gint month)
{
@@ -2721,14 +2721,14 @@ e_calendar_item_set_max_days_sel (ECalendarItem *calitem,
/* Get the maximum number of days before whole weeks are selected */
gint
-e_calendar_item_get_days_start_week_sel(ECalendarItem *calitem)
+e_calendar_item_get_days_start_week_sel (ECalendarItem *calitem)
{
return calitem->days_to_start_week_selection;
}
/* Set the maximum number of days before whole weeks are selected */
void
-e_calendar_item_set_days_start_week_sel(ECalendarItem *calitem,
+e_calendar_item_set_days_start_week_sel (ECalendarItem *calitem,
gint days)
{
calitem->days_to_start_week_selection = days;
@@ -3473,7 +3473,7 @@ e_calendar_item_signal_emission_idle_cb (gpointer data)
/* We ref the calitem & check in case it gets destroyed, since we
were getting a free memory write here. */
- g_object_ref((calitem));
+ g_object_ref ((calitem));
if (calitem->date_range_changed) {
calitem->date_range_changed = FALSE;
@@ -3485,7 +3485,7 @@ e_calendar_item_signal_emission_idle_cb (gpointer data)
g_signal_emit (calitem, e_calendar_item_signals[SELECTION_CHANGED], 0);
}
- g_object_unref((calitem));
+ g_object_unref ((calitem));
GDK_THREADS_LEAVE ();
return FALSE;
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c
index ab7f2d3442..af5d0c7d83 100644
--- a/widgets/misc/e-calendar.c
+++ b/widgets/misc/e-calendar.c
@@ -262,7 +262,7 @@ e_calendar_style_set (GtkWidget *widget,
{
ECalendar *e_calendar;
- e_calendar = E_CALENDAR(widget);
+ e_calendar = E_CALENDAR (widget);
if (GTK_WIDGET_CLASS (e_calendar_parent_class)->style_set)
(*GTK_WIDGET_CLASS (e_calendar_parent_class)->style_set) (widget,
previous_style);
@@ -291,7 +291,7 @@ e_calendar_size_request (GtkWidget *widget,
cal = E_CALENDAR (widget);
style = gtk_widget_get_style (GTK_WIDGET (cal));
- g_object_get((cal->calitem),
+ g_object_get ((cal->calitem),
"row_height", &row_height,
"column_width", &col_width,
NULL);
@@ -559,8 +559,8 @@ e_calendar_button_has_focus (ECalendar *cal)
g_return_val_if_fail (E_IS_CALENDAR (cal), FALSE);
- prev_widget = GNOME_CANVAS_WIDGET(cal->prev_item)->widget;
- next_widget = GNOME_CANVAS_WIDGET(cal->next_item)->widget;
+ prev_widget = GNOME_CANVAS_WIDGET (cal->prev_item)->widget;
+ next_widget = GNOME_CANVAS_WIDGET (cal->next_item)->widget;
ret_val = gtk_widget_has_focus (prev_widget) ||
gtk_widget_has_focus (next_widget);
return ret_val;
@@ -633,8 +633,8 @@ e_calendar_set_focusable (ECalendar *cal, gboolean focusable)
g_return_if_fail (E_IS_CALENDAR (cal));
widget = GTK_WIDGET (cal);
- prev_widget = GNOME_CANVAS_WIDGET(cal->prev_item)->widget;
- next_widget = GNOME_CANVAS_WIDGET(cal->next_item)->widget;
+ prev_widget = GNOME_CANVAS_WIDGET (cal->prev_item)->widget;
+ next_widget = GNOME_CANVAS_WIDGET (cal->next_item)->widget;
if (focusable) {
gtk_widget_set_can_focus (widget, TRUE);
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index 944f3b63df..6d4a9de5e4 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -81,7 +81,7 @@ enum {
};
static void
-get_color(ECanvasBackground *ecb)
+get_color (ECanvasBackground *ecb)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (ecb);
ecb->priv->color.pixel = gnome_canvas_get_color_pixel (item->canvas,
@@ -278,7 +278,7 @@ ecb_set_property (GObject *object,
}
ecb->priv->needs_redraw = 1;
- gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(ecb));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb));
}
static void
diff --git a/widgets/misc/e-canvas-utils.c b/widgets/misc/e-canvas-utils.c
index c4163feea1..29dc21d3b3 100644
--- a/widgets/misc/e-canvas-utils.c
+++ b/widgets/misc/e-canvas-utils.c
@@ -37,7 +37,7 @@ e_canvas_item_move_absolute (GnomeCanvasItem *item, gdouble dx, gdouble dy)
}
static double
-compute_offset(gint top, gint bottom, gint page_top, gint page_bottom)
+compute_offset (gint top, gint bottom, gint page_top, gint page_bottom)
{
gint size = bottom - top;
gint offset = 0;
@@ -76,23 +76,23 @@ e_canvas_show_area (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gdo
g_return_if_fail (canvas != NULL);
g_return_if_fail (GNOME_IS_CANVAS (canvas));
- h = gtk_layout_get_hadjustment(GTK_LAYOUT(canvas));
+ h = gtk_layout_get_hadjustment (GTK_LAYOUT (canvas));
page_size = gtk_adjustment_get_page_size (h);
lower = gtk_adjustment_get_lower (h);
upper = gtk_adjustment_get_upper (h);
value = gtk_adjustment_get_value (h);
- dx = compute_offset(x1, x2, value, value + page_size);
+ dx = compute_offset (x1, x2, value, value + page_size);
if (dx)
- gtk_adjustment_set_value(h, CLAMP(value + dx, lower, upper - page_size));
+ gtk_adjustment_set_value (h, CLAMP (value + dx, lower, upper - page_size));
- v = gtk_layout_get_vadjustment(GTK_LAYOUT(canvas));
+ v = gtk_layout_get_vadjustment (GTK_LAYOUT (canvas));
page_size = gtk_adjustment_get_page_size (v);
lower = gtk_adjustment_get_lower (v);
upper = gtk_adjustment_get_upper (v);
value = gtk_adjustment_get_value (v);
- dy = compute_offset(y1, y2, value, value + page_size);
+ dy = compute_offset (y1, y2, value, value + page_size);
if (dy)
- gtk_adjustment_set_value(v, CLAMP(value + dy, lower, upper - page_size));
+ gtk_adjustment_set_value (v, CLAMP (value + dy, lower, upper - page_size));
}
void
@@ -101,10 +101,10 @@ e_canvas_item_show_area (GnomeCanvasItem *item, gdouble x1, gdouble y1, gdouble
g_return_if_fail (item != NULL);
g_return_if_fail (GNOME_IS_CANVAS_ITEM (item));
- gnome_canvas_item_i2w(item, &x1, &y1);
- gnome_canvas_item_i2w(item, &x2, &y2);
+ gnome_canvas_item_i2w (item, &x1, &y1);
+ gnome_canvas_item_i2w (item, &x2, &y2);
- e_canvas_show_area(item->canvas, x1, y1, x2, y2);
+ e_canvas_show_area (item->canvas, x1, y1, x2, y2);
}
static gboolean
@@ -120,22 +120,22 @@ e_canvas_area_shown (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gd
g_return_val_if_fail (canvas != NULL, FALSE);
g_return_val_if_fail (GNOME_IS_CANVAS (canvas), FALSE);
- h = gtk_layout_get_hadjustment(GTK_LAYOUT(canvas));
+ h = gtk_layout_get_hadjustment (GTK_LAYOUT (canvas));
page_size = gtk_adjustment_get_page_size (h);
lower = gtk_adjustment_get_lower (h);
upper = gtk_adjustment_get_upper (h);
value = gtk_adjustment_get_value (h);
- dx = compute_offset(x1, x2, value, value + page_size);
- if (CLAMP(value + dx, lower, upper - page_size) - value != 0)
+ dx = compute_offset (x1, x2, value, value + page_size);
+ if (CLAMP (value + dx, lower, upper - page_size) - value != 0)
return FALSE;
- v = gtk_layout_get_vadjustment(GTK_LAYOUT(canvas));
+ v = gtk_layout_get_vadjustment (GTK_LAYOUT (canvas));
page_size = gtk_adjustment_get_page_size (v);
lower = gtk_adjustment_get_lower (v);
upper = gtk_adjustment_get_upper (v);
value = gtk_adjustment_get_value (v);
- dy = compute_offset(y1, y2, value, value + page_size);
- if (CLAMP(value + dy, lower, upper - page_size) - value != 0)
+ dy = compute_offset (y1, y2, value, value + page_size);
+ if (CLAMP (value + dy, lower, upper - page_size) - value != 0)
return FALSE;
return TRUE;
}
@@ -146,10 +146,10 @@ e_canvas_item_area_shown (GnomeCanvasItem *item, gdouble x1, gdouble y1, gdouble
g_return_val_if_fail (item != NULL, FALSE);
g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (item), FALSE);
- gnome_canvas_item_i2w(item, &x1, &y1);
- gnome_canvas_item_i2w(item, &x2, &y2);
+ gnome_canvas_item_i2w (item, &x1, &y1);
+ gnome_canvas_item_i2w (item, &x2, &y2);
- return e_canvas_area_shown(item->canvas, x1, y1, x2, y2);
+ return e_canvas_area_shown (item->canvas, x1, y1, x2, y2);
}
typedef struct {
@@ -165,9 +165,9 @@ show_area_timeout (gpointer data)
{
DoubsAndCanvas *dac = data;
- e_canvas_show_area(dac->canvas, dac->x1, dac->y1, dac->x2, dac->y2);
+ e_canvas_show_area (dac->canvas, dac->x1, dac->y1, dac->x2, dac->y2);
g_object_unref (dac->canvas);
- g_free(dac);
+ g_free (dac);
return FALSE;
}
@@ -179,15 +179,15 @@ e_canvas_item_show_area_delayed (GnomeCanvasItem *item, gdouble x1, gdouble y1,
g_return_if_fail (item != NULL);
g_return_if_fail (GNOME_IS_CANVAS_ITEM (item));
- gnome_canvas_item_i2w(item, &x1, &y1);
- gnome_canvas_item_i2w(item, &x2, &y2);
+ gnome_canvas_item_i2w (item, &x1, &y1);
+ gnome_canvas_item_i2w (item, &x2, &y2);
- dac = g_new(DoubsAndCanvas, 1);
+ dac = g_new (DoubsAndCanvas, 1);
dac->x1 = x1;
dac->y1 = y1;
dac->x2 = x2;
dac->y2 = y2;
dac->canvas = item->canvas;
g_object_ref (item->canvas);
- g_timeout_add(delay, show_area_timeout, dac);
+ g_timeout_add (delay, show_area_timeout, dac);
}
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index 3f1c7b3c07..a49f7e93be 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -43,8 +43,8 @@ static void e_canvas_vbox_realize (GnomeCanvasItem *item);
static void e_canvas_vbox_reflow (GnomeCanvasItem *item, gint flags);
-static void e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
-static void e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
+static void e_canvas_vbox_real_add_item (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
+static void e_canvas_vbox_real_add_item_start (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
static void e_canvas_vbox_resize_children (GnomeCanvasItem *item);
/* The arguments we take */
@@ -117,7 +117,7 @@ e_canvas_vbox_init (ECanvasVbox *vbox)
vbox->height = 10;
vbox->spacing = 0;
- e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(vbox), e_canvas_vbox_reflow);
+ e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (vbox), e_canvas_vbox_reflow);
}
static void
@@ -133,12 +133,12 @@ e_canvas_vbox_set_property (GObject *object, guint prop_id, const GValue *value,
case PROP_WIDTH:
case PROP_MINIMUM_WIDTH:
e_canvas_vbox->minimum_width = g_value_get_double (value);
- e_canvas_vbox_resize_children(item);
- e_canvas_item_request_reflow(item);
+ e_canvas_vbox_resize_children (item);
+ e_canvas_item_request_reflow (item);
break;
case PROP_SPACING:
e_canvas_vbox->spacing = g_value_get_double (value);
- e_canvas_item_request_reflow(item);
+ e_canvas_item_request_reflow (item);
break;
}
}
@@ -188,15 +188,15 @@ disconnect_item_cb (gpointer data, gpointer user_data)
static void
e_canvas_vbox_dispose (GObject *object)
{
- ECanvasVbox *vbox = E_CANVAS_VBOX(object);
+ ECanvasVbox *vbox = E_CANVAS_VBOX (object);
if (vbox->items) {
- g_list_foreach(vbox->items, disconnect_item_cb, vbox);
- g_list_free(vbox->items);
+ g_list_foreach (vbox->items, disconnect_item_cb, vbox);
+ g_list_free (vbox->items);
vbox->items = NULL;
}
- G_OBJECT_CLASS(e_canvas_vbox_parent_class)->dispose (object);
+ G_OBJECT_CLASS (e_canvas_vbox_parent_class)->dispose (object);
}
static gint
@@ -229,7 +229,7 @@ e_canvas_vbox_event (GnomeCanvasItem *item, GdkEvent *event)
break;
}
if (!return_val) {
- if (GNOME_CANVAS_ITEM_CLASS(e_canvas_vbox_parent_class)->event)
+ if (GNOME_CANVAS_ITEM_CLASS (e_canvas_vbox_parent_class)->event)
return GNOME_CANVAS_ITEM_CLASS (e_canvas_vbox_parent_class)->event (item, event);
}
return return_val;
@@ -239,45 +239,45 @@ e_canvas_vbox_event (GnomeCanvasItem *item, GdkEvent *event)
static void
e_canvas_vbox_realize (GnomeCanvasItem *item)
{
- if (GNOME_CANVAS_ITEM_CLASS(e_canvas_vbox_parent_class)->realize)
- (* GNOME_CANVAS_ITEM_CLASS(e_canvas_vbox_parent_class)->realize) (item);
+ if (GNOME_CANVAS_ITEM_CLASS (e_canvas_vbox_parent_class)->realize)
+ (* GNOME_CANVAS_ITEM_CLASS (e_canvas_vbox_parent_class)->realize) (item);
- e_canvas_vbox_resize_children(item);
- e_canvas_item_request_reflow(item);
+ e_canvas_vbox_resize_children (item);
+ e_canvas_item_request_reflow (item);
}
static void
e_canvas_vbox_remove_item (gpointer data, GObject *where_object_was)
{
ECanvasVbox *vbox = data;
- vbox->items = g_list_remove(vbox->items, where_object_was);
+ vbox->items = g_list_remove (vbox->items, where_object_was);
}
static void
-e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
+e_canvas_vbox_real_add_item (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
{
- e_canvas_vbox->items = g_list_append(e_canvas_vbox->items, item);
+ e_canvas_vbox->items = g_list_append (e_canvas_vbox->items, item);
g_object_weak_ref (G_OBJECT (item),
e_canvas_vbox_remove_item, e_canvas_vbox);
if (GNOME_CANVAS_ITEM (e_canvas_vbox)->flags & GNOME_CANVAS_ITEM_REALIZED) {
- gnome_canvas_item_set(item,
+ gnome_canvas_item_set (item,
"width", (gdouble) e_canvas_vbox->minimum_width,
NULL);
- e_canvas_item_request_reflow(item);
+ e_canvas_item_request_reflow (item);
}
}
static void
-e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
+e_canvas_vbox_real_add_item_start (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
{
- e_canvas_vbox->items = g_list_prepend(e_canvas_vbox->items, item);
+ e_canvas_vbox->items = g_list_prepend (e_canvas_vbox->items, item);
g_object_weak_ref (G_OBJECT (item),
e_canvas_vbox_remove_item, e_canvas_vbox);
if (GNOME_CANVAS_ITEM (e_canvas_vbox)->flags & GNOME_CANVAS_ITEM_REALIZED) {
- gnome_canvas_item_set(item,
+ gnome_canvas_item_set (item,
"width", (gdouble) e_canvas_vbox->minimum_width,
NULL);
- e_canvas_item_request_reflow(item);
+ e_canvas_item_request_reflow (item);
}
}
@@ -289,17 +289,17 @@ e_canvas_vbox_resize_children (GnomeCanvasItem *item)
e_canvas_vbox = E_CANVAS_VBOX (item);
for (list = e_canvas_vbox->items; list; list = list->next) {
- GnomeCanvasItem *child = GNOME_CANVAS_ITEM(list->data);
- gnome_canvas_item_set(child,
+ GnomeCanvasItem *child = GNOME_CANVAS_ITEM (list->data);
+ gnome_canvas_item_set (child,
"width", (gdouble) e_canvas_vbox->minimum_width,
NULL);
}
}
static void
-e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags )
+e_canvas_vbox_reflow ( GnomeCanvasItem *item, gint flags )
{
- ECanvasVbox *e_canvas_vbox = E_CANVAS_VBOX(item);
+ ECanvasVbox *e_canvas_vbox = E_CANVAS_VBOX (item);
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
gdouble old_height;
@@ -324,15 +324,15 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags )
"height", &item_height,
"width", &item_width,
NULL);
- e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data),
+ e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (list->data),
(gdouble) 0,
(gdouble) running_height);
running_height += item_height;
if (max_width < item_width)
max_width = item_width;
- list = g_list_next(list);
+ list = g_list_next (list);
- for (; list; list = g_list_next(list)) {
+ for (; list; list = g_list_next (list)) {
running_height += e_canvas_vbox->spacing;
g_object_get (list->data,
@@ -340,7 +340,7 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags )
"width", &item_width,
NULL);
- e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data),
+ e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (list->data),
(gdouble) 0,
(gdouble) running_height);
@@ -354,21 +354,21 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags )
e_canvas_vbox->width = max_width;
if (old_height != e_canvas_vbox->height ||
old_width != e_canvas_vbox->width)
- e_canvas_item_request_parent_reflow(item);
+ e_canvas_item_request_parent_reflow (item);
}
}
void
-e_canvas_vbox_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
+e_canvas_vbox_add_item (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
{
- if (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item)
- (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item) (e_canvas_vbox, item);
+ if (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item)
+ (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item) (e_canvas_vbox, item);
}
void
-e_canvas_vbox_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
+e_canvas_vbox_add_item_start (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
{
- if (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item_start)
- (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item_start) (e_canvas_vbox, item);
+ if (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item_start)
+ (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item_start) (e_canvas_vbox, item);
}
diff --git a/widgets/misc/e-canvas-vbox.h b/widgets/misc/e-canvas-vbox.h
index 9fb5b8ba34..7f0110ce9e 100644
--- a/widgets/misc/e-canvas-vbox.h
+++ b/widgets/misc/e-canvas-vbox.h
@@ -76,8 +76,8 @@ struct _ECanvasVboxClass
* should also do an ECanvas parent CanvasVbox request if its size
* changes.
*/
-void e_canvas_vbox_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
-void e_canvas_vbox_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
+void e_canvas_vbox_add_item (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
+void e_canvas_vbox_add_item_start (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
GType e_canvas_vbox_get_type (void);
G_END_DECLS
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 23e8176d24..261d92cf12 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -366,10 +366,10 @@ canvas_style_set_recursive (GnomeCanvasItem *item,
static void
canvas_dispose (GObject *object)
{
- ECanvas *canvas = E_CANVAS(object);
+ ECanvas *canvas = E_CANVAS (object);
if (canvas->idle_id)
- g_source_remove(canvas->idle_id);
+ g_source_remove (canvas->idle_id);
canvas->idle_id = 0;
if (canvas->grab_cancelled_check_id)
@@ -417,7 +417,7 @@ canvas_unrealize (GtkWidget *widget)
ECanvas * ecanvas = E_CANVAS (widget);
if (ecanvas->idle_id) {
- g_source_remove(ecanvas->idle_id);
+ g_source_remove (ecanvas->idle_id);
ecanvas->idle_id = 0;
}
@@ -662,7 +662,7 @@ e_canvas_item_grab_focus (GnomeCanvasItem *item,
item->canvas->focused_item = item;
- if (widget_too && !gtk_widget_has_focus (GTK_WIDGET(item->canvas))) {
+ if (widget_too && !gtk_widget_has_focus (GTK_WIDGET (item->canvas))) {
gtk_widget_grab_focus (GTK_WIDGET (item->canvas));
}
@@ -709,8 +709,8 @@ e_canvas_item_invoke_reflow (GnomeCanvasItem *item,
static void
do_reflow (ECanvas *canvas)
{
- if (GNOME_CANVAS(canvas)->root->flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
- e_canvas_item_invoke_reflow (GNOME_CANVAS(canvas)->root, 0);
+ if (GNOME_CANVAS (canvas)->root->flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
+ e_canvas_item_invoke_reflow (GNOME_CANVAS (canvas)->root, 0);
}
/* Idle handler for the e-canvas. It deals with pending reflows. */
@@ -719,7 +719,7 @@ idle_handler (gpointer data)
{
ECanvas *canvas;
- GDK_THREADS_ENTER();
+ GDK_THREADS_ENTER ();
canvas = E_CANVAS (data);
do_reflow (canvas);
@@ -729,7 +729,7 @@ idle_handler (gpointer data)
g_signal_emit (canvas, signals [REFLOW], 0);
- GDK_THREADS_LEAVE();
+ GDK_THREADS_LEAVE ();
return FALSE;
}
@@ -753,7 +753,7 @@ e_canvas_item_descendent_needs_reflow (GnomeCanvasItem *item)
item->flags |= E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW;
if (item->parent)
- e_canvas_item_descendent_needs_reflow(item->parent);
+ e_canvas_item_descendent_needs_reflow (item->parent);
}
void
@@ -763,15 +763,15 @@ e_canvas_item_request_reflow (GnomeCanvasItem *item)
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
item->flags |= E_CANVAS_ITEM_NEEDS_REFLOW;
- e_canvas_item_descendent_needs_reflow(item);
- add_idle(E_CANVAS(item->canvas));
+ e_canvas_item_descendent_needs_reflow (item);
+ add_idle (E_CANVAS (item->canvas));
}
}
void
e_canvas_item_request_parent_reflow (GnomeCanvasItem *item)
{
- g_return_if_fail (GNOME_IS_CANVAS_ITEM(item));
+ g_return_if_fail (GNOME_IS_CANVAS_ITEM (item));
e_canvas_item_request_reflow (item->parent);
}
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 8f14e84e20..77f337e4aa 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -68,7 +68,7 @@ struct _EDateEditPrivate {
gboolean use_24_hour_format;
/* This is TRUE if we want to make the time field insensitive rather
- than hide it when set_show_time() is called. */
+ * than hide it when set_show_time() is called. */
gboolean make_time_insensitive;
/* This is the range of hours we show in the time popup. */
@@ -76,11 +76,11 @@ struct _EDateEditPrivate {
gint upper_hour;
/* This indicates whether the last date committed was invalid.
- (A date is committed by hitting Return, moving the keyboard focus,
- or selecting a date in the popup). Note that this only indicates
- that the date couldn't be parsed. A date set to 'None' is valid
- here, though e_date_edit_date_is_valid() will return FALSE if an
- empty date isn't actually permitted. */
+ * (A date is committed by hitting Return, moving the keyboard focus,
+ * or selecting a date in the popup). Note that this only indicates
+ * that the date couldn't be parsed. A date set to 'None' is valid
+ * here, though e_date_edit_date_is_valid() will return FALSE if an
+ * empty date isn't actually permitted. */
gboolean date_is_valid;
/* This is the last valid date which was set. If the date was set to
@@ -92,11 +92,11 @@ struct _EDateEditPrivate {
gint day;
/* This indicates whether the last time committed was invalid.
- (A time is committed by hitting Return, moving the keyboard focus,
- or selecting a time in the popup). Note that this only indicates
- that the time couldn't be parsed. An empty/None time is valid
- here, though e_date_edit_time_is_valid() will return FALSE if an
- empty time isn't actually permitted. */
+ * (A time is committed by hitting Return, moving the keyboard focus,
+ * or selecting a time in the popup). Note that this only indicates
+ * that the time couldn't be parsed. An empty/None time is valid
+ * here, though e_date_edit_time_is_valid() will return FALSE if an
+ * empty time isn't actually permitted. */
gboolean time_is_valid;
/* This is the last valid time which was set. If the time was set to
@@ -1805,12 +1805,12 @@ on_date_entry_focus_out (GtkEntry *entry,
e_date_edit_check_date_changed (dedit);
if (!e_date_edit_date_is_valid (dedit)) {
- msg_dialog = gtk_message_dialog_new(NULL,
+ msg_dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK,
"%s", _("Invalid Date Value"));
- gtk_dialog_run (GTK_DIALOG(msg_dialog));
+ gtk_dialog_run (GTK_DIALOG (msg_dialog));
gtk_widget_destroy (msg_dialog);
e_date_edit_get_date (
dedit, &tmp_tm.tm_year,
@@ -1849,14 +1849,14 @@ on_time_entry_focus_out (GtkEntry *entry,
e_date_edit_check_time_changed (dedit);
if (!e_date_edit_time_is_valid (dedit)) {
- msg_dialog=gtk_message_dialog_new(NULL,
+ msg_dialog=gtk_message_dialog_new (NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK,
"%s", _("Invalid Time Value"));
- gtk_dialog_run (GTK_DIALOG(msg_dialog));
+ gtk_dialog_run (GTK_DIALOG (msg_dialog));
gtk_widget_destroy (msg_dialog);
- e_date_edit_set_time (dedit,e_date_edit_get_time(dedit));
+ e_date_edit_set_time (dedit,e_date_edit_get_time (dedit));
gtk_widget_grab_focus (GTK_WIDGET (entry));
return FALSE;
}
@@ -2352,5 +2352,5 @@ e_date_edit_get_entry (EDateEdit *dedit)
EDateEditPrivate *priv;
priv = dedit->priv;
- return GTK_WIDGET(priv->date_entry);
+ return GTK_WIDGET (priv->date_entry);
}
diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h
index 5c1e20deac..28032dd8c9 100644
--- a/widgets/misc/e-dateedit.h
+++ b/widgets/misc/e-dateedit.h
@@ -164,8 +164,8 @@ void e_date_edit_set_time_popup_range (EDateEdit *dedit,
gint upper_hour);
/* Whether the time field is made insensitive rather than hiding it. */
-gboolean e_date_edit_get_make_time_insensitive(EDateEdit *dedit);
-void e_date_edit_set_make_time_insensitive(EDateEdit *dedit,
+gboolean e_date_edit_get_make_time_insensitive (EDateEdit *dedit);
+void e_date_edit_set_make_time_insensitive (EDateEdit *dedit,
gboolean make_insensitive);
/* Whether two-digit years in date could be modified as in future; default is TRUE */
diff --git a/widgets/misc/e-focus-tracker.h b/widgets/misc/e-focus-tracker.h
index 679cc4b655..86b206e240 100644
--- a/widgets/misc/e-focus-tracker.h
+++ b/widgets/misc/e-focus-tracker.h
@@ -91,7 +91,8 @@ void e_focus_tracker_update_actions (EFocusTracker *focus_tracker);
void e_focus_tracker_cut_clipboard (EFocusTracker *focus_tracker);
void e_focus_tracker_copy_clipboard (EFocusTracker *focus_tracker);
void e_focus_tracker_paste_clipboard (EFocusTracker *focus_tracker);
-void e_focus_tracker_delete_selection(EFocusTracker *focus_tracker);
+void e_focus_tracker_delete_selection
+ (EFocusTracker *focus_tracker);
void e_focus_tracker_select_all (EFocusTracker *focus_tracker);
G_END_DECLS
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 682e84d50e..62e3571984 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -210,10 +210,10 @@ e_map_finalize (GObject *object)
view = E_MAP (object);
priv = view->priv;
- g_object_unref((priv->hadj));
+ g_object_unref ((priv->hadj));
priv->hadj = NULL;
- g_object_unref((priv->vadj));
+ g_object_unref ((priv->vadj));
priv->vadj = NULL;
if (priv->map_pixbuf)
@@ -1614,7 +1614,7 @@ zoom_do (EMap *map)
g_signal_handlers_unblock_matched (priv->hadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map);
g_signal_handlers_unblock_matched (priv->vadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map);
- set_scroll_area(map);
+ set_scroll_area (map);
}
/* Callback used when an adjustment is changed */
diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c
index 422fd47e60..bea993e457 100644
--- a/widgets/misc/e-popup-menu.c
+++ b/widgets/misc/e-popup-menu.c
@@ -110,7 +110,7 @@ e_popup_menu_create_with_domain (EPopupMenu *menu_list,
if (menu_list[i].is_radio)
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item));
- make_item (menu, GTK_MENU_ITEM (item), dgettext(domain, menu_list[i].name), menu_list[i].pixmap_widget);
+ make_item (menu, GTK_MENU_ITEM (item), dgettext (domain, menu_list[i].name), menu_list[i].pixmap_widget);
} else {
item = gtk_menu_item_new ();
}
diff --git a/widgets/misc/e-preferences-window.h b/widgets/misc/e-preferences-window.h
index 3606d6e629..f7789b3af6 100644
--- a/widgets/misc/e-preferences-window.h
+++ b/widgets/misc/e-preferences-window.h
@@ -58,7 +58,9 @@ struct _EPreferencesWindowClass {
GtkWindowClass parent_class;
};
-typedef GtkWidget *(*EPreferencesWindowCreatePageFn) (EPreferencesWindow *window);
+typedef GtkWidget *
+ (*EPreferencesWindowCreatePageFn)
+ (EPreferencesWindow *window);
GType e_preferences_window_get_type (void);
GtkWidget * e_preferences_window_new (gpointer shell);
@@ -72,7 +74,8 @@ void e_preferences_window_add_page (EPreferencesWindow *window,
gint sort_order);
void e_preferences_window_show_page (EPreferencesWindow *window,
const gchar *page_name);
-void e_preferences_window_filter_page(EPreferencesWindow *window,
+void e_preferences_window_filter_page
+ (EPreferencesWindow *window,
const gchar *page_name);
G_END_DECLS
diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c
index 13de73e068..eb10c8c1fe 100644
--- a/widgets/misc/e-printable.c
+++ b/widgets/misc/e-printable.c
@@ -113,9 +113,9 @@ e_printable_init (EPrintable *e_printable)
}
EPrintable *
-e_printable_new(void)
+e_printable_new (void)
{
- return E_PRINTABLE(g_object_new(E_PRINTABLE_TYPE, NULL));
+ return E_PRINTABLE (g_object_new (E_PRINTABLE_TYPE, NULL));
}
void
diff --git a/widgets/misc/e-searching-tokenizer.c b/widgets/misc/e-searching-tokenizer.c
index e7ef585146..b2581799c1 100644
--- a/widgets/misc/e-searching-tokenizer.c
+++ b/widgets/misc/e-searching-tokenizer.c
@@ -57,7 +57,7 @@ G_DEFINE_TYPE (
/* This is faster and safer than glib2's utf8 abomination, but isn't exported from camel as yet */
static inline guint32
-camel_utf8_getc(const guchar **ptr)
+camel_utf8_getc (const guchar **ptr)
{
register guchar *p = (guchar *)*ptr;
register guchar c, r;
@@ -102,7 +102,7 @@ static const gchar *ignored_tags[] = {
static gint
ignore_tag (const gchar *tag)
{
- gchar *t = g_alloca(strlen(tag)+1), c, *out;
+ gchar *t = g_alloca (strlen (tag)+1), c, *out;
const gchar *in;
gint i;
@@ -167,10 +167,10 @@ struct _trie {
static void
dump_trie (struct _state *s, gint d)
{
- gchar *p = g_alloca(d*2+1);
+ gchar *p = g_alloca (d*2+1);
struct _match *m;
- memset(p, ' ', d*2);
+ memset (p, ' ', d*2);
p[d*2]=0;
printf("%s[state] %p: %d fail->%p\n", p, s, s->final, s->fail);
@@ -212,19 +212,19 @@ build_trie (gint nocase, gint len, guchar **words)
gint state_depth_max, state_depth_size;
struct _state **state_depth;
- trie = g_malloc(sizeof(*trie));
+ trie = g_malloc (sizeof (*trie));
trie->root.matches = NULL;
trie->root.final = 0;
trie->root.fail = NULL;
trie->root.next = NULL;
- trie->state_chunks = e_memchunk_new (8, sizeof(struct _state));
- trie->match_chunks = e_memchunk_new (8, sizeof(struct _match));
+ trie->state_chunks = e_memchunk_new (8, sizeof (struct _state));
+ trie->match_chunks = e_memchunk_new (8, sizeof (struct _match));
/* This will correspond to the length of the longest pattern */
state_depth_size = 0;
state_depth_max = 64;
- state_depth = g_malloc(sizeof(*state_depth[0])*64);
+ state_depth = g_malloc (sizeof (*state_depth[0])*64);
state_depth[0] = NULL;
/* Step 1: Build trie */
@@ -240,17 +240,17 @@ build_trie (gint nocase, gint len, guchar **words)
c = g_unichar_tolower (c);
m = g (q, c);
if (m == NULL) {
- m = e_memchunk_alloc(trie->match_chunks);
+ m = e_memchunk_alloc (trie->match_chunks);
m->ch = c;
m->next = q->matches;
q->matches = m;
- q = m->match = e_memchunk_alloc(trie->state_chunks);
+ q = m->match = e_memchunk_alloc (trie->state_chunks);
q->matches = NULL;
q->fail = &trie->root;
q->final = 0;
if (state_depth_max < depth) {
state_depth_max += 64;
- state_depth = g_realloc(state_depth, sizeof(*state_depth[0])*state_depth_max);
+ state_depth = g_realloc (state_depth, sizeof (*state_depth[0])*state_depth_max);
}
if (state_depth_size < depth) {
state_depth[depth] = NULL;
@@ -267,7 +267,7 @@ build_trie (gint nocase, gint len, guchar **words)
}
d(printf("Dumping trie:\n"));
- d(dump_trie (&trie->root, 0));
+ d (dump_trie (&trie->root, 0));
/* Step 2: Build failure graph */
@@ -314,8 +314,8 @@ build_trie (gint nocase, gint len, guchar **words)
static void
free_trie (struct _trie *t)
{
- e_memchunk_destroy(t->match_chunks);
- e_memchunk_destroy(t->state_chunks);
+ e_memchunk_destroy (t->match_chunks);
+ e_memchunk_destroy (t->state_chunks);
g_free (t);
}
@@ -373,7 +373,7 @@ struct _searcher {
};
static void
-searcher_set_tokenfunc(struct _searcher *s, gchar *(*next)(), gpointer data)
+searcher_set_tokenfunc (struct _searcher *s, gchar *(*next)(), gpointer data)
{
s->next_token = next;
s->next_data = data;
@@ -385,7 +385,7 @@ searcher_new (gint flags, gint argc, guchar **argv, const gchar *tags, const gch
gint i, m;
struct _searcher *s;
- s = g_malloc(sizeof(*s));
+ s = g_malloc (sizeof (*s));
s->t = build_trie ((flags&SEARCH_CASE) == 0, argc, argv);
s->words = argc;
@@ -407,13 +407,13 @@ searcher_new (gint flags, gint argc, guchar **argv, const gchar *tags, const gch
i = 2;
while (i<m)
i<<=2;
- s->last = g_malloc(sizeof(s->last[0])*i);
+ s->last = g_malloc (sizeof (s->last[0])*i);
s->last_mask = i-1;
s->lastp = 0;
/* a stack of possible submatches */
s->submatchp = 0;
- s->submatches = g_malloc(sizeof(s->submatches[0])*argc+1);
+ s->submatches = g_malloc (sizeof (s->submatches[0])*argc+1);
return s;
}
@@ -441,10 +441,10 @@ append_token (GQueue *queue, const gchar *tok, gint len)
struct _token *token;
if (len == -1)
- len = strlen(tok);
- token = g_malloc(sizeof(*token) + len+1);
+ len = strlen (tok);
+ token = g_malloc (sizeof (*token) + len+1);
token->offset = 0; /* set by caller when required */
- memcpy(token->tok, tok, len);
+ memcpy (token->tok, tok, len);
token->tok[len] = 0;
g_queue_push_tail (queue, token);
@@ -454,7 +454,7 @@ append_token (GQueue *queue, const gchar *tok, gint len)
#define free_token(x) (g_free (x))
static void
-output_token(struct _searcher *s, struct _token *token)
+output_token (struct _searcher *s, struct _token *token)
{
gint offend;
gint left, pre;
@@ -465,10 +465,10 @@ output_token(struct _searcher *s, struct _token *token)
g_queue_push_tail (&s->output, token);
} else {
d (printf("discarding tag token '%s' from input\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- free_token(token);
+ free_token (token);
}
} else {
- offend = token->offset + strlen(token->tok);
+ offend = token->offset + strlen (token->tok);
left = offend-s->offout;
if (left > 0) {
pre = s->offout - token->offset;
@@ -479,13 +479,13 @@ output_token(struct _searcher *s, struct _token *token)
g_queue_push_tail (&s->output, token);
} else {
d (printf("discarding whole token '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- free_token(token);
+ free_token (token);
}
}
}
static struct _token *
-find_token(struct _searcher *s, gint start)
+find_token (struct _searcher *s, gint start)
{
GList *link;
@@ -504,7 +504,7 @@ find_token(struct _searcher *s, gint start)
}
static void
-output_match(struct _searcher *s, guint start, guint end)
+output_match (struct _searcher *s, guint start, guint end)
{
register struct _token *token;
struct _token *starttoken, *endtoken;
@@ -512,8 +512,8 @@ output_match(struct _searcher *s, guint start, guint end)
d (printf("output match: %d-%d at %d\n", start, end, s->offout));
- starttoken = find_token(s, start);
- endtoken = find_token(s, end);
+ starttoken = find_token (s, start);
+ endtoken = find_token (s, end);
if (starttoken == NULL || endtoken == NULL) {
d (printf("Cannot find match history for match %d-%d\n", start, end));
@@ -527,12 +527,12 @@ output_match(struct _searcher *s, guint start, guint end)
while ((struct _token *) g_queue_peek_head (&s->input) != starttoken) {
token = g_queue_pop_head (&s->input);
d (printf("appending failed match '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- output_token(s, token);
+ output_token (s, token);
}
/* output any pre-match text */
if (s->offout < start) {
- token = append_token(&s->output, starttoken->tok + (s->offout-starttoken->offset), start-s->offout);
+ token = append_token (&s->output, starttoken->tok + (s->offout-starttoken->offset), start-s->offout);
d (printf("adding pre-match text '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
s->offout = start;
}
@@ -540,35 +540,35 @@ output_match(struct _searcher *s, guint start, guint end)
/* output highlight/bold */
if (s->flags & SEARCH_BOLD) {
sprintf(b, "%c<b>", (gchar)TAG_ESCAPE);
- append_token(&s->output, b, -1);
+ append_token (&s->output, b, -1);
}
if (s->tags)
- append_token(&s->output, s->tags, -1);
+ append_token (&s->output, s->tags, -1);
/* output match node (s) */
if (starttoken != endtoken) {
while ((struct _token *) g_queue_peek_head (&s->input) != endtoken) {
token = g_queue_pop_head (&s->input);
d (printf("appending (partial) match node (head) '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- output_token(s, token);
+ output_token (s, token);
}
}
/* any remaining partial content */
if (s->offout < end) {
- token = append_token(&s->output, endtoken->tok+(s->offout-endtoken->offset), end-s->offout);
+ token = append_token (&s->output, endtoken->tok+(s->offout-endtoken->offset), end-s->offout);
d (printf("appending (partial) match node (tail) '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
s->offout = end;
}
/* end highlight */
if (s->tage)
- append_token(&s->output, s->tage, -1);
+ append_token (&s->output, s->tage, -1);
/* and close bold if we need to */
if (s->flags & SEARCH_BOLD) {
sprintf(b, "%c</b>", (gchar)TAG_ESCAPE);
- append_token(&s->output, b, -1);
+ append_token (&s->output, b, -1);
}
}
@@ -579,7 +579,7 @@ output_subpending (struct _searcher *s)
gint i;
for (i=s->submatchp-1;i>=0;i--)
- output_match(s, s->submatches[i].offstart, s->submatches[i].offend);
+ output_match (s, s->submatches[i].offstart, s->submatches[i].offend);
s->submatchp = 0;
}
@@ -630,12 +630,12 @@ output_pending (struct _searcher *s)
struct _token *token;
while ((token = g_queue_pop_head (&s->input)) != NULL)
- output_token(s, token);
+ output_token (s, token);
}
/* flushes any nodes we cannot possibly match anymore */
static void
-flush_extra(struct _searcher *s)
+flush_extra (struct _searcher *s)
{
guint start;
gint i;
@@ -648,18 +648,18 @@ flush_extra(struct _searcher *s)
start = s->submatches[i].offstart;
/* now, flush out any tokens which are before this point */
- starttoken = find_token(s, start);
+ starttoken = find_token (s, start);
if (starttoken == NULL)
return;
while ((struct _token *) g_queue_peek_head (&s->input) != starttoken) {
token = g_queue_pop_head (&s->input);
- output_token(s, token);
+ output_token (s, token);
}
}
static gchar *
-searcher_next_token(struct _searcher *s)
+searcher_next_token (struct _searcher *s)
{
struct _token *token;
const guchar *tok, *stok, *pre_tok;
@@ -671,7 +671,7 @@ searcher_next_token(struct _searcher *s)
while (g_queue_is_empty (&s->output)) {
/* get next token */
- tok = (guchar *)s->next_token(s->next_data);
+ tok = (guchar *)s->next_token (s->next_data);
if (tok == NULL) {
output_subpending (s);
output_pending (s);
@@ -679,7 +679,7 @@ searcher_next_token(struct _searcher *s)
}
/* we dont always have to copy each token, e.g. if we dont match anything */
- token = append_token(&s->input, (gchar *)tok, -1);
+ token = append_token (&s->input, (gchar *)tok, -1);
token->offset = s->offset;
tok = (guchar *)token->tok;
@@ -748,13 +748,13 @@ searcher_next_token(struct _searcher *s)
s->offset += (pre_tok-stok);
- flush_extra(s);
+ flush_extra (s);
}
s->state = q;
if (s->current)
- free_token(s->current);
+ free_token (s->current);
s->current = token = g_queue_pop_head (&s->output);
@@ -762,12 +762,12 @@ searcher_next_token(struct _searcher *s)
}
static gchar *
-searcher_peek_token(struct _searcher *s)
+searcher_peek_token (struct _searcher *s)
{
gchar *tok;
/* we just get it and then put it back, it's fast enuf */
- tok = searcher_next_token(s);
+ tok = searcher_next_token (s);
if (tok) {
/* need to clear this so we dont free it while its still active */
g_queue_push_head (&s->output, s->current);
@@ -799,14 +799,14 @@ search_info_new (void)
{
struct _search_info *s;
- s = g_malloc0(sizeof(struct _search_info));
+ s = g_malloc0 (sizeof (struct _search_info));
s->strv = g_ptr_array_new ();
return s;
}
static void
-search_info_set_flags(struct _search_info *si, guint flags, guint mask)
+search_info_set_flags (struct _search_info *si, guint flags, guint mask)
{
si->flags = (si->flags & ~mask) | (flags & mask);
}
@@ -894,9 +894,9 @@ search_info_to_searcher (struct _search_info *si)
else
col = si->color;
- tags = g_alloca(20+strlen(col));
+ tags = g_alloca (20+strlen (col));
sprintf(tags, "%c<font color=\"%s\">", TAG_ESCAPE, col);
- tage = g_alloca(20);
+ tage = g_alloca (20);
sprintf(tage, "%c</font>", TAG_ESCAPE);
return searcher_new (si->flags, si->strv->len, (guchar **)si->strv->pdata, tags, tage);
@@ -971,7 +971,7 @@ searching_tokenizer_begin (HTMLTokenizer *tokenizer,
if ((priv->engine = search_info_to_searcher (priv->primary))
|| (priv->engine = search_info_to_searcher (priv->secondary))) {
- searcher_set_tokenfunc(priv->engine, get_token, tokenizer);
+ searcher_set_tokenfunc (priv->engine, get_token, tokenizer);
}
/* else - no engine, no search active */
@@ -1093,7 +1093,7 @@ e_searching_tokenizer_init (ESearchingTokenizer *tokenizer)
search_info_set_color (tokenizer->priv->primary, "red");
tokenizer->priv->secondary = search_info_new ();
- search_info_set_flags(
+ search_info_set_flags (
tokenizer->priv->secondary,
SEARCH_BOLD, SEARCH_CASE | SEARCH_BOLD);
search_info_set_color (tokenizer->priv->secondary, "purple");
diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c
index 5406fd635b..8f9a8f087d 100644
--- a/widgets/misc/e-selection-model-array.c
+++ b/widgets/misc/e-selection-model-array.c
@@ -42,11 +42,11 @@ enum {
};
void
-e_selection_model_array_confirm_row_count(ESelectionModelArray *esma)
+e_selection_model_array_confirm_row_count (ESelectionModelArray *esma)
{
if (esma->eba == NULL) {
- gint row_count = e_selection_model_array_get_row_count(esma);
- esma->eba = e_bit_array_new(row_count);
+ gint row_count = e_selection_model_array_get_row_count (esma);
+ esma->eba = e_bit_array_new (row_count);
esma->selected_row = -1;
esma->selected_range_end = -1;
}
@@ -72,13 +72,13 @@ es_row_sorted_to_model (ESelectionModelArray *esma, gint sorted_row)
/* FIXME: Should this deal with moving the selection if it's in single mode? */
void
-e_selection_model_array_delete_rows(ESelectionModelArray *esma, gint row, gint count)
+e_selection_model_array_delete_rows (ESelectionModelArray *esma, gint row, gint count)
{
if (esma->eba) {
- if (E_SELECTION_MODEL(esma)->mode == GTK_SELECTION_SINGLE)
- e_bit_array_delete_single_mode(esma->eba, row, count);
+ if (E_SELECTION_MODEL (esma)->mode == GTK_SELECTION_SINGLE)
+ e_bit_array_delete_single_mode (esma->eba, row, count);
else
- e_bit_array_delete(esma->eba, row, count);
+ e_bit_array_delete (esma->eba, row, count);
if (esma->cursor_row >= row && esma->cursor_row < row + count) {
/* we should move the cursor_row, because some lines before us are going to be removed */
@@ -116,34 +116,34 @@ e_selection_model_array_delete_rows(ESelectionModelArray *esma, gint row, gint c
esma->selected_row = -1;
esma->selected_range_end = -1;
- e_selection_model_selection_changed(E_SELECTION_MODEL(esma));
- e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), esma->cursor_row, esma->cursor_col);
+ e_selection_model_selection_changed (E_SELECTION_MODEL (esma));
+ e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), esma->cursor_row, esma->cursor_col);
}
}
void
-e_selection_model_array_insert_rows(ESelectionModelArray *esma, gint row, gint count)
+e_selection_model_array_insert_rows (ESelectionModelArray *esma, gint row, gint count)
{
if (esma->eba) {
- e_bit_array_insert(esma->eba, row, count);
+ e_bit_array_insert (esma->eba, row, count);
/* just recalculate new position of the previously set cursor row */
esma->cursor_row = es_row_sorted_to_model (esma, esma->cursor_row_sorted);
esma->selected_row = -1;
esma->selected_range_end = -1;
- e_selection_model_selection_changed(E_SELECTION_MODEL(esma));
- e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), esma->cursor_row, esma->cursor_col);
+ e_selection_model_selection_changed (E_SELECTION_MODEL (esma));
+ e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), esma->cursor_row, esma->cursor_col);
}
}
void
-e_selection_model_array_move_row(ESelectionModelArray *esma, gint old_row, gint new_row)
+e_selection_model_array_move_row (ESelectionModelArray *esma, gint old_row, gint new_row)
{
- ESelectionModel *esm = E_SELECTION_MODEL(esma);
+ ESelectionModel *esm = E_SELECTION_MODEL (esma);
if (esma->eba) {
- gboolean selected = e_bit_array_value_at(esma->eba, old_row);
+ gboolean selected = e_bit_array_value_at (esma->eba, old_row);
gboolean cursor = (esma->cursor_row == old_row);
gint old_row_sorted, new_row_sorted;
@@ -155,13 +155,13 @@ e_selection_model_array_move_row(ESelectionModelArray *esma, gint old_row, gint
else if (new_row_sorted < esma->cursor_row_sorted && esma->cursor_row_sorted < old_row_sorted)
esma->cursor_row_sorted++;
- e_bit_array_move_row(esma->eba, old_row, new_row);
+ e_bit_array_move_row (esma->eba, old_row, new_row);
if (selected) {
if (esm->mode == GTK_SELECTION_SINGLE)
e_bit_array_select_single_row (esma->eba, new_row);
else
- e_bit_array_change_one_row(esma->eba, new_row, TRUE);
+ e_bit_array_change_one_row (esma->eba, new_row, TRUE);
}
if (cursor) {
esma->cursor_row = new_row;
@@ -171,8 +171,8 @@ e_selection_model_array_move_row(ESelectionModelArray *esma, gint old_row, gint
esma->selected_row = -1;
esma->selected_range_end = -1;
- e_selection_model_selection_changed(esm);
- e_selection_model_cursor_changed(esm, esma->cursor_row, esma->cursor_col);
+ e_selection_model_selection_changed (esm);
+ e_selection_model_cursor_changed (esm, esma->cursor_row, esma->cursor_col);
}
}
@@ -216,11 +216,11 @@ esma_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp
switch (prop_id) {
case PROP_CURSOR_ROW:
- e_selection_model_do_something(esm, g_value_get_int (value), esma->cursor_col, 0);
+ e_selection_model_do_something (esm, g_value_get_int (value), esma->cursor_col, 0);
break;
case PROP_CURSOR_COL:
- e_selection_model_do_something(esm, esma->cursor_row, g_value_get_int(value), 0);
+ e_selection_model_do_something (esm, esma->cursor_row, g_value_get_int (value), 0);
break;
}
}
@@ -238,9 +238,9 @@ static gboolean
esma_is_row_selected (ESelectionModel *selection,
gint n)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
if (esma->eba)
- return e_bit_array_value_at(esma->eba, n);
+ return e_bit_array_value_at (esma->eba, n);
else
return FALSE;
}
@@ -259,9 +259,9 @@ esma_foreach (ESelectionModel *selection,
EForeachFunc callback,
gpointer closure)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
if (esma->eba)
- e_bit_array_foreach(esma->eba, callback, closure);
+ e_bit_array_foreach (esma->eba, callback, closure);
}
/**
@@ -271,11 +271,11 @@ esma_foreach (ESelectionModel *selection,
* This routine clears the selection to no rows selected.
*/
static void
-esma_clear(ESelectionModel *selection)
+esma_clear (ESelectionModel *selection)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
if (esma->eba) {
- g_object_unref(esma->eba);
+ g_object_unref (esma->eba);
esma->eba = NULL;
}
esma->cursor_row = -1;
@@ -283,8 +283,8 @@ esma_clear(ESelectionModel *selection)
esma->cursor_row_sorted = -1;
esma->selected_row = -1;
esma->selected_range_end = -1;
- e_selection_model_selection_changed(E_SELECTION_MODEL(esma));
- e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), -1, -1);
+ e_selection_model_selection_changed (E_SELECTION_MODEL (esma));
+ e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), -1, -1);
}
#define PART(x,n) (((x) & (0x01010101 << n)) >> n)
@@ -301,9 +301,9 @@ esma_clear(ESelectionModel *selection)
static gint
esma_selected_count (ESelectionModel *selection)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
if (esma->eba)
- return e_bit_array_selected_count(esma->eba);
+ return e_bit_array_selected_count (esma->eba);
else
return 0;
}
@@ -318,11 +318,11 @@ esma_selected_count (ESelectionModel *selection)
static void
esma_select_all (ESelectionModel *selection)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
- e_selection_model_array_confirm_row_count(esma);
+ e_selection_model_array_confirm_row_count (esma);
- e_bit_array_select_all(esma->eba);
+ e_bit_array_select_all (esma->eba);
esma->cursor_col = 0;
esma->cursor_row_sorted = 0;
@@ -330,8 +330,8 @@ esma_select_all (ESelectionModel *selection)
esma->selection_start_row = esma->cursor_row;
esma->selected_row = -1;
esma->selected_range_end = -1;
- e_selection_model_selection_changed(E_SELECTION_MODEL(esma));
- e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), 0, 0);
+ e_selection_model_selection_changed (E_SELECTION_MODEL (esma));
+ e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), 0, 0);
}
/**
@@ -344,11 +344,11 @@ esma_select_all (ESelectionModel *selection)
static void
esma_invert_selection (ESelectionModel *selection)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
- e_selection_model_array_confirm_row_count(esma);
+ e_selection_model_array_confirm_row_count (esma);
- e_bit_array_invert_selection(esma->eba);
+ e_bit_array_invert_selection (esma->eba);
esma->cursor_col = -1;
esma->cursor_row = -1;
@@ -356,24 +356,24 @@ esma_invert_selection (ESelectionModel *selection)
esma->selection_start_row = 0;
esma->selected_row = -1;
esma->selected_range_end = -1;
- e_selection_model_selection_changed(E_SELECTION_MODEL(esma));
- e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), -1, -1);
+ e_selection_model_selection_changed (E_SELECTION_MODEL (esma));
+ e_selection_model_cursor_changed (E_SELECTION_MODEL (esma), -1, -1);
}
static gint
esma_row_count (ESelectionModel *selection)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
- e_selection_model_array_confirm_row_count(esma);
- return e_bit_array_bit_count(esma->eba);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
+ e_selection_model_array_confirm_row_count (esma);
+ return e_bit_array_bit_count (esma->eba);
}
static void
-esma_change_one_row(ESelectionModel *selection, gint row, gboolean grow)
+esma_change_one_row (ESelectionModel *selection, gint row, gboolean grow)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
- e_selection_model_array_confirm_row_count(esma);
- e_bit_array_change_one_row(esma->eba, row, grow);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
+ e_selection_model_array_confirm_row_count (esma);
+ e_bit_array_change_one_row (esma->eba, row, grow);
}
static void
@@ -381,10 +381,10 @@ esma_change_cursor (ESelectionModel *selection, gint row, gint col)
{
ESelectionModelArray *esma;
- g_return_if_fail(selection != NULL);
- g_return_if_fail(E_IS_SELECTION_MODEL(selection));
+ g_return_if_fail (selection != NULL);
+ g_return_if_fail (E_IS_SELECTION_MODEL (selection));
- esma = E_SELECTION_MODEL_ARRAY(selection);
+ esma = E_SELECTION_MODEL_ARRAY (selection);
esma->cursor_row = row;
esma->cursor_col = col;
@@ -392,18 +392,18 @@ esma_change_cursor (ESelectionModel *selection, gint row, gint col)
}
static void
-esma_change_range(ESelectionModel *selection, gint start, gint end, gboolean grow)
+esma_change_range (ESelectionModel *selection, gint start, gint end, gboolean grow)
{
gint i;
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
if (start != end) {
- if (selection->sorter && e_sorter_needs_sorting(selection->sorter)) {
+ if (selection->sorter && e_sorter_needs_sorting (selection->sorter)) {
for ( i = start; i < end; i++) {
- e_bit_array_change_one_row(esma->eba, e_sorter_sorted_to_model(selection->sorter, i), grow);
+ e_bit_array_change_one_row (esma->eba, e_sorter_sorted_to_model (selection->sorter, i), grow);
}
} else {
- e_selection_model_array_confirm_row_count(esma);
- e_bit_array_change_range(esma->eba, start, end, grow);
+ e_selection_model_array_confirm_row_count (esma);
+ e_bit_array_change_range (esma->eba, start, end, grow);
}
}
}
@@ -411,25 +411,25 @@ esma_change_range(ESelectionModel *selection, gint start, gint end, gboolean gro
static gint
esma_cursor_row (ESelectionModel *selection)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
return esma->cursor_row;
}
static gint
esma_cursor_col (ESelectionModel *selection)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
return esma->cursor_col;
}
static void
esma_real_select_single_row (ESelectionModel *selection, gint row)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
- e_selection_model_array_confirm_row_count(esma);
+ e_selection_model_array_confirm_row_count (esma);
- e_bit_array_select_single_row(esma->eba, row);
+ e_bit_array_select_single_row (esma->eba, row);
esma->selection_start_row = row;
esma->selected_row = row;
@@ -439,51 +439,51 @@ esma_real_select_single_row (ESelectionModel *selection, gint row)
static void
esma_select_single_row (ESelectionModel *selection, gint row)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
gint selected_row = esma->selected_row;
esma_real_select_single_row (selection, row);
if (selected_row != -1 && esma->eba && selected_row < e_bit_array_bit_count (esma->eba)) {
if (selected_row != row) {
- e_selection_model_selection_row_changed(selection, selected_row);
- e_selection_model_selection_row_changed(selection, row);
+ e_selection_model_selection_row_changed (selection, selected_row);
+ e_selection_model_selection_row_changed (selection, row);
}
} else {
- e_selection_model_selection_changed(selection);
+ e_selection_model_selection_changed (selection);
}
}
static void
esma_toggle_single_row (ESelectionModel *selection, gint row)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
- e_selection_model_array_confirm_row_count(esma);
- e_bit_array_toggle_single_row(esma->eba, row);
+ e_selection_model_array_confirm_row_count (esma);
+ e_bit_array_toggle_single_row (esma->eba, row);
esma->selection_start_row = row;
esma->selected_row = -1;
esma->selected_range_end = -1;
- e_selection_model_selection_row_changed(E_SELECTION_MODEL(esma), row);
+ e_selection_model_selection_row_changed (E_SELECTION_MODEL (esma), row);
}
static void
esma_real_move_selection_end (ESelectionModel *selection, gint row)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
gint old_start;
gint old_end;
gint new_start;
gint new_end;
- if (selection->sorter && e_sorter_needs_sorting(selection->sorter)) {
- old_start = MIN (e_sorter_model_to_sorted(selection->sorter, esma->selection_start_row),
- e_sorter_model_to_sorted(selection->sorter, esma->cursor_row));
- old_end = MAX (e_sorter_model_to_sorted(selection->sorter, esma->selection_start_row),
- e_sorter_model_to_sorted(selection->sorter, esma->cursor_row)) + 1;
- new_start = MIN (e_sorter_model_to_sorted(selection->sorter, esma->selection_start_row),
- e_sorter_model_to_sorted(selection->sorter, row));
- new_end = MAX (e_sorter_model_to_sorted(selection->sorter, esma->selection_start_row),
- e_sorter_model_to_sorted(selection->sorter, row)) + 1;
+ if (selection->sorter && e_sorter_needs_sorting (selection->sorter)) {
+ old_start = MIN (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
+ e_sorter_model_to_sorted (selection->sorter, esma->cursor_row));
+ old_end = MAX (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
+ e_sorter_model_to_sorted (selection->sorter, esma->cursor_row)) + 1;
+ new_start = MIN (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
+ e_sorter_model_to_sorted (selection->sorter, row));
+ new_end = MAX (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
+ e_sorter_model_to_sorted (selection->sorter, row)) + 1;
} else {
old_start = MIN (esma->selection_start_row, esma->cursor_row);
old_end = MAX (esma->selection_start_row, esma->cursor_row) + 1;
@@ -492,13 +492,13 @@ esma_real_move_selection_end (ESelectionModel *selection, gint row)
}
/* This wouldn't work nearly so smoothly if one end of the selection weren't held in place. */
if (old_start < new_start)
- esma_change_range(selection, old_start, new_start, FALSE);
+ esma_change_range (selection, old_start, new_start, FALSE);
if (new_start < old_start)
- esma_change_range(selection, new_start, old_start, TRUE);
+ esma_change_range (selection, new_start, old_start, TRUE);
if (old_end < new_end)
- esma_change_range(selection, old_end, new_end, TRUE);
+ esma_change_range (selection, old_end, new_end, TRUE);
if (new_end < old_end)
- esma_change_range(selection, new_end, old_end, FALSE);
+ esma_change_range (selection, new_end, old_end, FALSE);
esma->selected_row = -1;
esma->selected_range_end = -1;
}
@@ -507,40 +507,40 @@ static void
esma_move_selection_end (ESelectionModel *selection, gint row)
{
esma_real_move_selection_end (selection, row);
- e_selection_model_selection_changed(selection);
+ e_selection_model_selection_changed (selection);
}
static void
esma_set_selection_end (ESelectionModel *selection, gint row)
{
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
gint selected_range_end = esma->selected_range_end;
- gint view_row = e_sorter_model_to_sorted(selection->sorter, row);
+ gint view_row = e_sorter_model_to_sorted (selection->sorter, row);
- esma_real_select_single_row(selection, esma->selection_start_row);
+ esma_real_select_single_row (selection, esma->selection_start_row);
esma->cursor_row = esma->selection_start_row;
esma->cursor_row_sorted = es_row_model_to_sorted (esma, esma->cursor_row);
- esma_real_move_selection_end(selection, row);
+ esma_real_move_selection_end (selection, row);
esma->selected_range_end = view_row;
if (selected_range_end != -1 && view_row != -1) {
if (selected_range_end == view_row - 1 ||
selected_range_end == view_row + 1) {
- e_selection_model_selection_row_changed(selection, selected_range_end);
- e_selection_model_selection_row_changed(selection, view_row);
+ e_selection_model_selection_row_changed (selection, selected_range_end);
+ e_selection_model_selection_row_changed (selection, view_row);
}
}
- e_selection_model_selection_changed(selection);
+ e_selection_model_selection_changed (selection);
}
gint
e_selection_model_array_get_row_count (ESelectionModelArray *esma)
{
- g_return_val_if_fail(esma != NULL, 0);
- g_return_val_if_fail(E_IS_SELECTION_MODEL_ARRAY(esma), 0);
+ g_return_val_if_fail (esma != NULL, 0);
+ g_return_val_if_fail (E_IS_SELECTION_MODEL_ARRAY (esma), 0);
- if (E_SELECTION_MODEL_ARRAY_GET_CLASS(esma)->get_row_count)
- return E_SELECTION_MODEL_ARRAY_GET_CLASS(esma)->get_row_count (esma);
+ if (E_SELECTION_MODEL_ARRAY_GET_CLASS (esma)->get_row_count)
+ return E_SELECTION_MODEL_ARRAY_GET_CLASS (esma)->get_row_count (esma);
else
return 0;
}
@@ -564,8 +564,8 @@ e_selection_model_array_class_init (ESelectionModelArrayClass *klass)
GObjectClass *object_class;
ESelectionModelClass *esm_class;
- object_class = G_OBJECT_CLASS(klass);
- esm_class = E_SELECTION_MODEL_CLASS(klass);
+ object_class = G_OBJECT_CLASS (klass);
+ esm_class = E_SELECTION_MODEL_CLASS (klass);
object_class->dispose = esma_dispose;
object_class->get_property = esma_get_property;
diff --git a/widgets/misc/e-selection-model-simple.c b/widgets/misc/e-selection-model-simple.c
index 571f4a5baf..829363d400 100644
--- a/widgets/misc/e-selection-model-simple.c
+++ b/widgets/misc/e-selection-model-simple.c
@@ -46,7 +46,7 @@ e_selection_model_simple_class_init (ESelectionModelSimpleClass *klass)
{
ESelectionModelArrayClass *esma_class;
- esma_class = E_SELECTION_MODEL_ARRAY_CLASS(klass);
+ esma_class = E_SELECTION_MODEL_ARRAY_CLASS (klass);
esma_class->get_row_count = esms_get_row_count;
}
@@ -69,9 +69,9 @@ e_selection_model_simple_set_row_count (ESelectionModelSimple *esms,
gint row_count)
{
if (esms->row_count != row_count) {
- ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(esms);
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (esms);
if (esma->eba)
- g_object_unref(esma->eba);
+ g_object_unref (esma->eba);
esma->eba = NULL;
esma->selected_row = -1;
esma->selected_range_end = -1;
@@ -82,7 +82,7 @@ e_selection_model_simple_set_row_count (ESelectionModelSimple *esms,
static gint
esms_get_row_count (ESelectionModelArray *esma)
{
- ESelectionModelSimple *esms = E_SELECTION_MODEL_SIMPLE(esma);
+ ESelectionModelSimple *esms = E_SELECTION_MODEL_SIMPLE (esma);
return esms->row_count;
}
@@ -92,7 +92,7 @@ void e_selection_model_simple_insert_rows (ESelectionModelSimple *e
gint count)
{
esms->row_count += count;
- e_selection_model_array_insert_rows (E_SELECTION_MODEL_ARRAY(esms), row, count);
+ e_selection_model_array_insert_rows (E_SELECTION_MODEL_ARRAY (esms), row, count);
}
void
@@ -101,7 +101,7 @@ e_selection_model_simple_delete_rows (ESelectionModelSimple *esms,
gint count)
{
esms->row_count -= count;
- e_selection_model_array_delete_rows (E_SELECTION_MODEL_ARRAY(esms), row, count);
+ e_selection_model_array_delete_rows (E_SELECTION_MODEL_ARRAY (esms), row, count);
}
void
@@ -109,5 +109,5 @@ e_selection_model_simple_move_row (ESelectionModelSimple *esms,
gint old_row,
gint new_row)
{
- e_selection_model_array_move_row (E_SELECTION_MODEL_ARRAY(esms), old_row, new_row);
+ e_selection_model_array_move_row (E_SELECTION_MODEL_ARRAY (esms), old_row, new_row);
}
diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c
index b18a62423e..f1b2c9bbf1 100644
--- a/widgets/misc/e-selection-model.c
+++ b/widgets/misc/e-selection-model.c
@@ -52,7 +52,7 @@ enum {
};
inline static void
-add_sorter(ESelectionModel *esm, ESorter *sorter)
+add_sorter (ESelectionModel *esm, ESorter *sorter)
{
esm->sorter = sorter;
if (sorter) {
@@ -61,7 +61,7 @@ add_sorter(ESelectionModel *esm, ESorter *sorter)
}
inline static void
-drop_sorter(ESelectionModel *esm)
+drop_sorter (ESelectionModel *esm)
{
if (esm->sorter) {
g_object_unref (esm->sorter);
@@ -76,7 +76,7 @@ esm_dispose (GObject *object)
esm = E_SELECTION_MODEL (object);
- drop_sorter(esm);
+ drop_sorter (esm);
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (e_selection_model_parent_class)->dispose (object);
@@ -115,7 +115,7 @@ esm_set_property (GObject *object,
switch (property_id) {
case PROP_SORTER:
- drop_sorter(esm);
+ drop_sorter (esm);
add_sorter (
esm, g_value_get_object (value) ?
E_SORTER (g_value_get_object (value)) : NULL);
@@ -124,9 +124,9 @@ esm_set_property (GObject *object,
case PROP_SELECTION_MODE:
esm->mode = g_value_get_int (value);
if (esm->mode == GTK_SELECTION_SINGLE) {
- gint cursor_row = e_selection_model_cursor_row(esm);
- gint cursor_col = e_selection_model_cursor_col(esm);
- e_selection_model_do_something(esm, cursor_row, cursor_col, 0);
+ gint cursor_row = e_selection_model_cursor_row (esm);
+ gint cursor_col = e_selection_model_cursor_col (esm);
+ e_selection_model_do_something (esm, cursor_row, cursor_col, 0);
}
break;
@@ -149,7 +149,7 @@ e_selection_model_class_init (ESelectionModelClass *class)
{
GObjectClass *object_class;
- object_class = G_OBJECT_CLASS(class);
+ object_class = G_OBJECT_CLASS (class);
object_class->dispose = esm_dispose;
object_class->get_property = esm_get_property;
object_class->set_property = esm_set_property;
@@ -512,7 +512,7 @@ e_selection_model_do_something (ESelectionModel *selection,
if (col == -1 && row != -1)
col = 0;
- row_count = e_selection_model_row_count(selection);
+ row_count = e_selection_model_row_count (selection);
if (row_count >= 0 && row < row_count) {
switch (selection->mode) {
case GTK_SELECTION_SINGLE:
@@ -531,14 +531,14 @@ e_selection_model_do_something (ESelectionModel *selection,
}
break;
default:
- g_return_if_reached();
+ g_return_if_reached ();
break;
}
- e_selection_model_change_cursor(selection, row, col);
- g_signal_emit(selection,
+ e_selection_model_change_cursor (selection, row, col);
+ g_signal_emit (selection,
signals[CURSOR_CHANGED], 0,
row, col);
- g_signal_emit(selection,
+ g_signal_emit (selection,
signals[CURSOR_ACTIVATED], 0,
row, col);
}
@@ -567,14 +567,14 @@ e_selection_model_maybe_do_something (ESelectionModel *selection,
selection->old_selection = -1;
- if (e_selection_model_is_row_selected(selection, row)) {
- e_selection_model_change_cursor(selection, row, col);
- g_signal_emit(selection,
+ if (e_selection_model_is_row_selected (selection, row)) {
+ e_selection_model_change_cursor (selection, row, col);
+ g_signal_emit (selection,
signals[CURSOR_CHANGED], 0,
row, col);
return FALSE;
} else {
- e_selection_model_do_something(selection, row, col, state);
+ e_selection_model_do_something (selection, row, col, state);
return TRUE;
}
}
@@ -641,16 +641,16 @@ e_selection_model_select_as_key_press (ESelectionModel *selection,
e_selection_model_select_single_row (selection, row);
break;
default:
- g_return_if_reached();
+ g_return_if_reached ();
break;
}
if (row != -1) {
- e_selection_model_change_cursor(selection, row, col);
- g_signal_emit(selection,
+ e_selection_model_change_cursor (selection, row, col);
+ g_signal_emit (selection,
signals[CURSOR_CHANGED], 0,
row, col);
if (cursor_activated)
- g_signal_emit(selection,
+ g_signal_emit (selection,
signals[CURSOR_ACTIVATED], 0,
row, col);
}
@@ -661,8 +661,8 @@ move_selection (ESelectionModel *selection,
gboolean up,
GdkModifierType state)
{
- gint row = e_selection_model_cursor_row(selection);
- gint col = e_selection_model_cursor_col(selection);
+ gint row = e_selection_model_cursor_row (selection);
+ gint col = e_selection_model_cursor_col (selection);
gint row_count;
/* there is no selected row when row is -1 */
@@ -675,10 +675,10 @@ move_selection (ESelectionModel *selection,
row++;
if (row < 0)
row = 0;
- row_count = e_selection_model_row_count(selection);
+ row_count = e_selection_model_row_count (selection);
if (row >= row_count)
row = row_count - 1;
- row = e_sorter_sorted_to_model(selection->sorter, row);
+ row = e_sorter_sorted_to_model (selection->sorter, row);
e_selection_model_select_as_key_press (selection, row, col, state);
return TRUE;
@@ -706,20 +706,20 @@ e_selection_model_key_press (ESelectionModel *selection,
switch (key->keyval) {
case GDK_Up:
case GDK_KP_Up:
- return move_selection(selection, TRUE, key->state);
+ return move_selection (selection, TRUE, key->state);
case GDK_Down:
case GDK_KP_Down:
- return move_selection(selection, FALSE, key->state);
+ return move_selection (selection, FALSE, key->state);
case GDK_space:
case GDK_KP_Space:
if (selection->mode != GTK_SELECTION_SINGLE) {
- gint row = e_selection_model_cursor_row(selection);
- gint col = e_selection_model_cursor_col(selection);
+ gint row = e_selection_model_cursor_row (selection);
+ gint col = e_selection_model_cursor_col (selection);
if (row == -1)
break;
e_selection_model_toggle_single_row (selection, row);
- g_signal_emit(selection,
+ g_signal_emit (selection,
signals[CURSOR_ACTIVATED], 0,
row, col);
return TRUE;
@@ -728,10 +728,10 @@ e_selection_model_key_press (ESelectionModel *selection,
case GDK_Return:
case GDK_KP_Enter:
if (selection->mode != GTK_SELECTION_SINGLE) {
- gint row = e_selection_model_cursor_row(selection);
- gint col = e_selection_model_cursor_col(selection);
+ gint row = e_selection_model_cursor_row (selection);
+ gint col = e_selection_model_cursor_col (selection);
e_selection_model_select_single_row (selection, row);
- g_signal_emit(selection,
+ g_signal_emit (selection,
signals[CURSOR_ACTIVATED], 0,
row, col);
return TRUE;
@@ -741,9 +741,9 @@ e_selection_model_key_press (ESelectionModel *selection,
case GDK_KP_Home:
if (selection->cursor_mode == E_CURSOR_LINE) {
gint row = 0;
- gint cursor_col = e_selection_model_cursor_col(selection);
+ gint cursor_col = e_selection_model_cursor_col (selection);
- row = e_sorter_sorted_to_model(selection->sorter, row);
+ row = e_sorter_sorted_to_model (selection->sorter, row);
e_selection_model_select_as_key_press (selection, row, cursor_col, key->state);
return TRUE;
}
@@ -751,10 +751,10 @@ e_selection_model_key_press (ESelectionModel *selection,
case GDK_End:
case GDK_KP_End:
if (selection->cursor_mode == E_CURSOR_LINE) {
- gint row = e_selection_model_row_count(selection) - 1;
- gint cursor_col = e_selection_model_cursor_col(selection);
+ gint row = e_selection_model_row_count (selection) - 1;
+ gint cursor_col = e_selection_model_cursor_col (selection);
- row = e_sorter_sorted_to_model(selection->sorter, row);
+ row = e_sorter_sorted_to_model (selection->sorter, row);
e_selection_model_select_as_key_press (selection, row, cursor_col, key->state);
return TRUE;
}
diff --git a/widgets/misc/e-selection-model.h b/widgets/misc/e-selection-model.h
index a96b6e8be6..355734b6a5 100644
--- a/widgets/misc/e-selection-model.h
+++ b/widgets/misc/e-selection-model.h
@@ -136,7 +136,8 @@ void e_selection_model_right_click_down
guint row,
guint col,
GdkModifierType state);
-void e_selection_model_right_click_up(ESelectionModel *selection);
+void e_selection_model_right_click_up
+ (ESelectionModel *selection);
gboolean e_selection_model_key_press (ESelectionModel *esm,
GdkEventKey *key);
void e_selection_model_select_as_key_press
@@ -153,14 +154,16 @@ void e_selection_model_foreach (ESelectionModel *esm,
EForeachFunc callback,
gpointer closure);
void e_selection_model_clear (ESelectionModel *esm);
-gint e_selection_model_selected_count(ESelectionModel *esm);
+gint e_selection_model_selected_count
+ (ESelectionModel *esm);
void e_selection_model_select_all (ESelectionModel *esm);
void e_selection_model_invert_selection
(ESelectionModel *esm);
gint e_selection_model_row_count (ESelectionModel *esm);
/* Private virtual Functions */
-void e_selection_model_change_one_row(ESelectionModel *esm,
+void e_selection_model_change_one_row
+ (ESelectionModel *esm,
gint row,
gboolean on);
void e_selection_model_change_cursor (ESelectionModel *esm,
@@ -182,7 +185,8 @@ void e_selection_model_set_selection_end
gint row);
/* Signals */
-void e_selection_model_cursor_changed(ESelectionModel *selection,
+void e_selection_model_cursor_changed
+ (ESelectionModel *selection,
gint row,
gint col);
void e_selection_model_cursor_activated
diff --git a/widgets/misc/e-send-options.c b/widgets/misc/e-send-options.c
index b7793be997..48eda2dced 100644
--- a/widgets/misc/e-send-options.c
+++ b/widgets/misc/e-send-options.c
@@ -135,7 +135,7 @@ e_send_options_get_widgets_data (ESendOptionsDialog *sod)
gopts->delay_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->delay_delivery));
if (e_date_edit_date_is_valid (E_DATE_EDIT (priv->delay_until)) &&
- e_date_edit_time_is_valid (E_DATE_EDIT(priv->delay_until)))
+ e_date_edit_time_is_valid (E_DATE_EDIT (priv->delay_until)))
gopts->delay_until = e_date_edit_get_time (E_DATE_EDIT (priv->delay_until));
sopts->tracking_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->create_sent));
@@ -608,7 +608,7 @@ e_send_options_dialog_run (ESendOptionsDialog *sod, GtkWidget *parent, Item_type
priv->builder = gtk_builder_new ();
e_load_ui_builder_definition (priv->builder, "e-send-options.ui");
- if (!get_widgets(sod)) {
+ if (!get_widgets (sod)) {
g_object_unref (priv->builder);
g_message (G_STRLOC ": Could not get the Widgets \n");
return FALSE;
diff --git a/widgets/misc/e-web-view-preview.c b/widgets/misc/e-web-view-preview.c
index ea5cee0241..c21fee95db 100644
--- a/widgets/misc/e-web-view-preview.c
+++ b/widgets/misc/e-web-view-preview.c
@@ -245,7 +245,7 @@ e_web_view_preview_show_tree_view (EWebViewPreview *preview)
}
void
-e_web_view_preview_hide_tree_view(EWebViewPreview *preview)
+e_web_view_preview_hide_tree_view (EWebViewPreview *preview)
{
g_return_if_fail (preview != NULL);
g_return_if_fail (E_IS_WEB_VIEW_PREVIEW (preview));
diff --git a/widgets/misc/e-web-view-preview.h b/widgets/misc/e-web-view-preview.h
index ae7569034c..07c78ff182 100644
--- a/widgets/misc/e-web-view-preview.h
+++ b/widgets/misc/e-web-view-preview.h
@@ -75,26 +75,36 @@ struct _EWebViewPreviewClass {
GType e_web_view_preview_get_type (void);
GtkWidget * e_web_view_preview_new (void);
-
-GtkTreeView * e_web_view_preview_get_tree_view(EWebViewPreview *preview);
+GtkTreeView * e_web_view_preview_get_tree_view
+ (EWebViewPreview *preview);
GtkWidget * e_web_view_preview_get_preview (EWebViewPreview *preview);
-void e_web_view_preview_set_preview (EWebViewPreview *preview, GtkWidget *preview_widget);
-
-void e_web_view_preview_show_tree_view(EWebViewPreview *preview);
-void e_web_view_preview_hide_tree_view(EWebViewPreview *preview);
-
-void e_web_view_preview_set_escape_values(EWebViewPreview *preview, gboolean escape);
-gboolean e_web_view_preview_get_escape_values(EWebViewPreview *preview);
-
+void e_web_view_preview_set_preview (EWebViewPreview *preview,
+ GtkWidget *preview_widget);
+void e_web_view_preview_show_tree_view
+ (EWebViewPreview *preview);
+void e_web_view_preview_hide_tree_view
+ (EWebViewPreview *preview);
+void e_web_view_preview_set_escape_values
+ (EWebViewPreview *preview,
+ gboolean escape);
+gboolean e_web_view_preview_get_escape_values
+ (EWebViewPreview *preview);
void e_web_view_preview_begin_update (EWebViewPreview *preview);
void e_web_view_preview_end_update (EWebViewPreview *preview);
-
-void e_web_view_preview_add_header (EWebViewPreview *preview, gint index, const gchar *header);
-void e_web_view_preview_add_text (EWebViewPreview *preview, const gchar *text);
-void e_web_view_preview_add_raw_html (EWebViewPreview *preview, const gchar *raw_html);
-void e_web_view_preview_add_separator(EWebViewPreview *preview);
-void e_web_view_preview_add_empty_line(EWebViewPreview *preview);
-void e_web_view_preview_add_section (EWebViewPreview *preview, const gchar *section, const gchar *value);
+void e_web_view_preview_add_header (EWebViewPreview *preview,
+ gint index,
+ const gchar *header);
+void e_web_view_preview_add_text (EWebViewPreview *preview,
+ const gchar *text);
+void e_web_view_preview_add_raw_html (EWebViewPreview *preview,
+ const gchar *raw_html);
+void e_web_view_preview_add_separator
+ (EWebViewPreview *preview);
+void e_web_view_preview_add_empty_line
+ (EWebViewPreview *preview);
+void e_web_view_preview_add_section (EWebViewPreview *preview,
+ const gchar *section,
+ const gchar *value);
G_END_DECLS
diff --git a/widgets/misc/e-web-view.h b/widgets/misc/e-web-view.h
index 56477ef257..f7ffefe935 100644
--- a/widgets/misc/e-web-view.h
+++ b/widgets/misc/e-web-view.h
@@ -128,7 +128,8 @@ void e_web_view_set_selected_uri (EWebView *web_view,
GtkAction * e_web_view_get_open_proxy (EWebView *web_view);
void e_web_view_set_open_proxy (EWebView *web_view,
GtkAction *open_proxy);
-GtkTargetList * e_web_view_get_paste_target_list(EWebView *web_view);
+GtkTargetList * e_web_view_get_paste_target_list
+ (EWebView *web_view);
GtkAction * e_web_view_get_print_proxy (EWebView *web_view);
void e_web_view_set_print_proxy (EWebView *web_view,
GtkAction *print_proxy);
diff --git a/widgets/misc/ea-calendar-cell.c b/widgets/misc/ea-calendar-cell.c
index 8728f49a46..ecd7179e0e 100644
--- a/widgets/misc/ea-calendar-cell.c
+++ b/widgets/misc/ea-calendar-cell.c
@@ -216,7 +216,7 @@ ea_calendar_cell_get_name (AtkObject *accessible)
g_return_val_if_fail (EA_IS_CALENDAR_CELL (accessible), NULL);
- 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 NULL;
@@ -258,7 +258,7 @@ ea_calendar_cell_get_parent (AtkObject *accessible)
g_return_val_if_fail (EA_IS_CALENDAR_CELL (accessible), NULL);
- 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 NULL;
@@ -277,7 +277,7 @@ ea_calendar_cell_get_index_in_parent (AtkObject *accessible)
g_return_val_if_fail (EA_IS_CALENDAR_CELL (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)
return -1;
cell = E_CALENDAR_CELL (g_obj);
@@ -293,7 +293,7 @@ ea_calendar_cell_ref_state_set (AtkObject *accessible)
g_return_val_if_fail (atk_cell->state_set, NULL);
- g_object_ref(atk_cell->state_set);
+ g_object_ref (atk_cell->state_set);
return atk_cell->state_set;
@@ -328,7 +328,7 @@ component_interface_get_extents (AtkComponent *component,
g_return_if_fail (EA_IS_CALENDAR_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;
@@ -368,7 +368,7 @@ component_interface_grab_focus (AtkComponent *component)
a11y = EA_CALENDAR_CELL (component);
ea_calitem = ea_calendar_cell_get_parent (ATK_OBJECT (a11y));
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(ea_calitem));
+ g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (ea_calitem));
calitem = E_CALENDAR_ITEM (g_obj);
index = atk_object_get_index_in_parent (ATK_OBJECT (a11y));
diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c
index 0946775e2d..cde4e78494 100644
--- a/widgets/misc/ea-calendar-item.c
+++ b/widgets/misc/ea-calendar-item.c
@@ -278,7 +278,7 @@ ea_calendar_item_get_name (AtkObject *accessible)
g_return_val_if_fail (EA_IS_CALENDAR_ITEM (accessible), NULL);
- 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)
return NULL;
g_return_val_if_fail (E_IS_CALENDAR_ITEM (g_obj), NULL);
@@ -354,7 +354,7 @@ ea_calendar_item_ref_state_set (AtkObject *accessible)
GObject *g_obj;
state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (accessible);
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible));
+ g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible));
if (!g_obj)
return state_set;
@@ -440,7 +440,7 @@ ea_calendar_item_ref_child (AtkObject *accessible, gint index)
g_print ("AccDebug: ea_calendar_item children[%d]=%p\n", index,
(gpointer)cell);
#endif
- return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT(cell)));
+ return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT (cell)));
}
/* atk table interface */
@@ -1057,15 +1057,15 @@ ea_calendar_item_get_cell_data (EaCalendarItem *ea_calitem)
if (!g_obj)
return NULL;
- cell_data = g_object_get_data (G_OBJECT(ea_calitem),
+ cell_data = g_object_get_data (G_OBJECT (ea_calitem),
"ea-calendar-cell-table");
if (!cell_data) {
- gint n_cells = ea_calendar_item_get_n_children (ATK_OBJECT(ea_calitem));
+ gint n_cells = ea_calendar_item_get_n_children (ATK_OBJECT (ea_calitem));
cell_data = ea_cell_table_create (n_cells/EA_CALENDAR_COLUMN_NUM,
EA_CALENDAR_COLUMN_NUM,
FALSE);
- g_object_set_data (G_OBJECT(ea_calitem),
+ g_object_set_data (G_OBJECT (ea_calitem),
"ea-calendar-cell-table", cell_data);
}
return cell_data;
@@ -1078,10 +1078,10 @@ ea_calendar_item_destory_cell_data (EaCalendarItem *ea_calitem)
g_return_if_fail (ea_calitem);
- cell_data = g_object_get_data (G_OBJECT(ea_calitem),
+ cell_data = g_object_get_data (G_OBJECT (ea_calitem),
"ea-calendar-cell-table");
if (cell_data) {
- g_object_set_data (G_OBJECT(ea_calitem),
+ g_object_set_data (G_OBJECT (ea_calitem),
"ea-calendar-cell-table", NULL);
ea_cell_table_destroy (cell_data);
}
diff --git a/widgets/misc/ea-cell-table.c b/widgets/misc/ea-cell-table.c
index 95ae59dea4..be859943fd 100644
--- a/widgets/misc/ea-cell-table.c
+++ b/widgets/misc/ea-cell-table.c
@@ -44,7 +44,7 @@ ea_cell_table_create (gint rows, gint columns, gboolean column_first)
for (index = rows -1; index >= 0; --index)
cell_data->row_labels [index] = NULL;
- cell_data->cells = g_new0(gpointer, (columns * rows));
+ cell_data->cells = g_new0 (gpointer, (columns * rows));
for (index = (columns * rows) -1; index >= 0; --index)
cell_data->cells [index] = NULL;
return cell_data;
@@ -102,7 +102,7 @@ ea_cell_table_set_cell (EaCellTable * cell_data,
if (index == -1)
return FALSE;
- if (cell && G_IS_OBJECT(cell))
+ if (cell && G_IS_OBJECT (cell))
g_object_ref (cell);
if (cell_data->cells[index] &&
G_IS_OBJECT (cell_data->cells[index]))
@@ -132,7 +132,7 @@ ea_cell_table_set_cell_at_index (EaCellTable * cell_data,
if (index < 0 || index >=cell_data->columns * cell_data->rows)
return FALSE;
- if (cell && G_IS_OBJECT(cell))
+ if (cell && G_IS_OBJECT (cell))
g_object_ref (cell);
if (cell_data->cells[index] &&
G_IS_OBJECT (cell_data->cells[index]))
@@ -161,7 +161,7 @@ ea_cell_table_set_column_label (EaCellTable * cell_data,
if (cell_data->column_labels[column])
g_free (cell_data->column_labels[column]);
- cell_data->column_labels[column] = g_strdup(label);
+ cell_data->column_labels[column] = g_strdup (label);
}
G_CONST_RETURN gchar *
@@ -183,7 +183,7 @@ ea_cell_table_set_row_label (EaCellTable * cell_data,
if (cell_data->row_labels[row])
g_free (cell_data->row_labels[row]);
- cell_data->row_labels[row] = g_strdup(label);
+ cell_data->row_labels[row] = g_strdup (label);
}
gint
diff --git a/widgets/misc/test-preferences-window.c b/widgets/misc/test-preferences-window.c
index e35895f118..e7c4499d6a 100644
--- a/widgets/misc/test-preferences-window.c
+++ b/widgets/misc/test-preferences-window.c
@@ -89,7 +89,7 @@ main (gint argc, gchar **argv)
window = e_preferences_window_new (NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);
- g_signal_connect(
+ g_signal_connect (
window, "delete-event",
G_CALLBACK (delete_event_callback), NULL);