aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-07-11 23:31:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-12 10:25:06 +0800
commiteb29179da623f9cf4abd663577395a085452ca18 (patch)
treea7eec4690f254d4cb9048ca87a5e7f401a2e74ae
parentbeb8e74577f695d0d3c2efea52dc10c2136f0135 (diff)
downloadgsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.gz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.bz2
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.lz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.xz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.zst
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.zip
Coding style and whitespace cleanup.
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c18
-rw-r--r--addressbook/gui/widgets/e-minicard.c4
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c2
-rw-r--r--addressbook/gui/widgets/eab-contact-display.h11
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c4
-rw-r--r--addressbook/importers/evolution-csv-importer.c2
-rw-r--r--addressbook/importers/evolution-ldif-importer.c2
-rw-r--r--addressbook/printing/e-contact-print.c36
-rw-r--r--addressbook/util/addressbook.c29
-rw-r--r--addressbook/util/eab-book-util.c2
-rw-r--r--calendar/gui/dialogs/comp-editor.c167
-rw-r--r--calendar/gui/dialogs/event-editor.c41
-rw-r--r--calendar/gui/dialogs/recurrence-page.c4
-rw-r--r--calendar/gui/dialogs/task-editor.c31
-rw-r--r--calendar/gui/e-cal-model.c2
-rw-r--r--calendar/gui/e-cell-date-edit-text.h5
-rw-r--r--calendar/gui/e-day-view-top-item.c49
-rw-r--r--calendar/gui/e-meeting-store.c96
-rw-r--r--calendar/gui/e-week-view-layout.c6
-rw-r--r--calendar/gui/e-week-view.c6
-rw-r--r--calendar/gui/gnome-cal.c10
-rw-r--r--calendar/gui/goto.c23
-rw-r--r--calendar/gui/print.c4
-rw-r--r--composer/e-msg-composer.c32
-rw-r--r--e-util/e-bit-array.c14
-rw-r--r--e-util/e-sorter-array.c2
-rw-r--r--e-util/e-text-event-processor-emacs-like.c21
-rw-r--r--e-util/e-unicode.c2
-rw-r--r--e-util/e-util.c10
-rw-r--r--libgnomecanvas/gailcanvasitem.c13
-rw-r--r--libgnomecanvas/gnome-canvas-util.c53
-rw-r--r--libgnomecanvas/gnome-canvas-widget.c51
-rw-r--r--mail/mail-folder-cache.c80
-rw-r--r--mail/mail-session.c2
-rw-r--r--mail/mail-tools.c26
-rw-r--r--mail/message-list.c8
-rw-r--r--modules/addressbook/openldap-extract.h18
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c12
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c12
-rw-r--r--modules/calendar/e-task-shell-sidebar.c12
-rw-r--r--plugins/audio-inline/audio-inline.c2
-rw-r--r--plugins/dbx-import/dbx-importer.c43
-rw-r--r--plugins/groupwise-features/camel-gw-listener.c6
-rw-r--r--plugins/publish-calendar/publish-location.c11
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c12
-rw-r--r--shell/e-shell-switcher.c2
-rw-r--r--smime/lib/e-cert-db.c4
-rw-r--r--widgets/menus/gal-view-collection.c14
-rw-r--r--widgets/misc/e-canvas-vbox.c2
-rw-r--r--widgets/misc/e-selection-model-array.c4
-rw-r--r--widgets/misc/test-preferences-window.c2
-rw-r--r--widgets/table/e-cell-hbox.c2
-rw-r--r--widgets/table/e-cell-tree.c4
-rw-r--r--widgets/table/e-cell-vbox.c2
-rw-r--r--widgets/table/e-table-config.c2
-rw-r--r--widgets/table/e-table-field-chooser-item.c65
-rw-r--r--widgets/table/e-table-group-container.c4
-rw-r--r--widgets/table/e-table-header-item.c6
-rw-r--r--widgets/table/e-table-header-item.h2
-rw-r--r--widgets/table/e-table-header.c6
-rw-r--r--widgets/table/e-table-item.c14
-rw-r--r--widgets/table/e-table-memory-store.c6
-rw-r--r--widgets/table/e-table-memory.c8
-rw-r--r--widgets/table/e-table-sorted.c4
-rw-r--r--widgets/table/e-table-sorting-utils.c16
-rw-r--r--widgets/table/e-table-subset-variable.c2
-rw-r--r--widgets/table/e-table-without.c6
-rw-r--r--widgets/table/e-table.c2
-rw-r--r--widgets/table/e-tree-memory.c14
-rw-r--r--widgets/table/e-tree-sorted.c16
-rw-r--r--widgets/table/e-tree.c341
-rw-r--r--widgets/table/gal-a11y-e-table-item.c116
-rw-r--r--widgets/text/e-reflow.c12
-rw-r--r--widgets/text/e-text-model.c4
-rw-r--r--widgets/text/e-text.c206
77 files changed, 1198 insertions, 690 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index a872afb7d9..4f1df719ca 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -217,7 +217,7 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id,
NULL
};
e_contact_editor_fullname->editable = g_value_get_boolean (value) ? TRUE : FALSE;
- for (i = 0; widget_names[i] != NULL; i ++) {
+ 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),
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index f167075886..d5ac8c68d4 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -170,7 +170,7 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
this_height += 3;
height += this_height;
- count ++;
+ count++;
}
g_free (string);
}
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 187b08b290..db9917f37f 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -66,13 +66,17 @@
#define d(x)
-static void status_message (EAddressbookView *view, const gchar *status);
-static void search_result (EAddressbookView *view, EBookViewStatus status, const gchar *error_msg);
-static void folder_bar_message (EAddressbookView *view, const gchar *status);
-static void stop_state_changed (GtkObject *object, EAddressbookView *view);
-static void backend_died (EAddressbookView *view);
-
-static void command_state_change (EAddressbookView *view);
+static void status_message (EAddressbookView *view,
+ const gchar *status);
+static void search_result (EAddressbookView *view,
+ EBookViewStatus status,
+ const gchar *error_msg);
+static void folder_bar_message (EAddressbookView *view,
+ const gchar *status);
+static void stop_state_changed (GtkObject *object,
+ EAddressbookView *view);
+static void backend_died (EAddressbookView *view);
+static void command_state_change (EAddressbookView *view);
struct _EAddressbookViewPrivate {
gpointer shell_view; /* weak pointer */
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 92a415b88f..654858a21d 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -734,7 +734,7 @@ e_minicard_resize_children( EMinicard *e_minicard )
e_minicard->width - e_minicard->list_icon_size - 3,
3);
}
- for ( list = e_minicard->fields; list; list = g_list_next( list ) ) {
+ for (list = e_minicard->fields; list; list = g_list_next( list )) {
gnome_canvas_item_set( E_MINICARD_FIELD( list->data )->label,
"width", (double) e_minicard->width - 4.0,
NULL );
@@ -973,7 +973,7 @@ remodel( EMinicard *e_minicard )
g_object_set(minicard_field->label,
"field", string,
NULL);
- count ++;
+ count++;
} else {
e_minicard_field_destroy(minicard_field);
}
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 8c0e37fccc..939ed77a59 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -495,7 +495,7 @@ render_contact (GString *buffer,
mail,
name ? "&gt;" : "",
attr_str ? attr_str : "");
- email_num ++;
+ email_num++;
nl = "<br>";
g_free (html);
diff --git a/addressbook/gui/widgets/eab-contact-display.h b/addressbook/gui/widgets/eab-contact-display.h
index 7b9707e0af..fde3bc6d76 100644
--- a/addressbook/gui/widgets/eab-contact-display.h
+++ b/addressbook/gui/widgets/eab-contact-display.h
@@ -52,9 +52,16 @@ typedef struct _EABContactDisplay EABContactDisplay;
typedef struct _EABContactDisplayClass EABContactDisplayClass;
typedef struct _EABContactDisplayPrivate EABContactDisplayPrivate;
+/**
+ * EABContactDisplayMode:
+ * @EAB_CONTACT_DISPLAY_RENDER_NORMAL:
+ * For use in the preview pane.
+ * @EAB_CONTACT_DISPLAY_RENDER_COMPACT:
+ * For use with embedded vcards.
+ **/
typedef enum {
- EAB_CONTACT_DISPLAY_RENDER_NORMAL, /* for use in the preview pane */
- EAB_CONTACT_DISPLAY_RENDER_COMPACT /* for use with embedded vcards (e.g, the EABVCardControl) */
+ EAB_CONTACT_DISPLAY_RENDER_NORMAL,
+ EAB_CONTACT_DISPLAY_RENDER_COMPACT
} EABContactDisplayMode;
struct _EABContactDisplay {
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index a7642625e3..8e3a6a4e38 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -329,7 +329,7 @@ delete_contacts (ContactCopyProcess *process)
static void
process_unref (ContactCopyProcess *process)
{
- process->count --;
+ process->count--;
if (process->count == 0) {
if (process->done_cb)
process->done_cb (process);
@@ -374,7 +374,7 @@ do_copy (gpointer data, gpointer user_data)
book = process->destination;
- process->count ++;
+ process->count++;
eab_merging_book_add_contact(book, contact, contact_added_cb, process);
}
diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c
index 29204b2c2e..20025c81ec 100644
--- a/addressbook/importers/evolution-csv-importer.c
+++ b/addressbook/importers/evolution-csv-importer.c
@@ -671,7 +671,7 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) {
else
g_string_append_c (line, c);
}
- gci->count ++;
+ gci->count++;
}
str = g_string_new("");
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c
index 0e6b707426..9eb9ca5bb6 100644
--- a/addressbook/importers/evolution-ldif-importer.c
+++ b/addressbook/importers/evolution-ldif-importer.c
@@ -266,7 +266,7 @@ parseLine (GHashTable *dn_contact_hash, EContact *contact,
ldif_value = getValue(&value );
field_handled = FALSE;
- for (i = 0; i < G_N_ELEMENTS (ldif_fields); i ++) {
+ for (i = 0; i < G_N_ELEMENTS (ldif_fields); i++) {
if (!g_ascii_strcasecmp (ptr, ldif_fields[i].ldif_attribute)) {
if (ldif_fields[i].flags & FLAG_WORK_ADDRESS) {
populate_contact_address (work_address, ptr, ldif_value->str);
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index 37b2837b5c..b1e38c7e52 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -154,7 +154,8 @@ e_contact_text_height (GtkPrintContext *context,
}
static void
-e_contact_print_letter_heading (EContactPrintContext *ctxt, gchar *letter)
+e_contact_print_letter_heading (EContactPrintContext *ctxt,
+ gchar *letter)
{
PangoLayout *layout;
PangoFontDescription *desc;
@@ -230,7 +231,8 @@ e_contact_start_new_column (EContactPrintContext *ctxt)
}
static gdouble
-e_contact_get_contact_height (EContact *contact, EContactPrintContext *ctxt)
+e_contact_get_contact_height (EContact *contact,
+ EContactPrintContext *ctxt)
{
GtkPageSetup *setup;
gchar *file_as;
@@ -278,7 +280,8 @@ e_contact_get_contact_height (EContact *contact, EContactPrintContext *ctxt)
}
static void
-e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt)
+e_contact_print_contact (EContact *contact,
+ EContactPrintContext *ctxt)
{
GtkPageSetup *setup;
gchar *file_as;
@@ -359,7 +362,8 @@ e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt)
}
static gint
-contact_compare (EContact *contact1, EContact *contact2)
+contact_compare (EContact *contact1,
+ EContact *contact2)
{
const gchar *field1, *field2;
@@ -384,7 +388,8 @@ contact_compare (EContact *contact1, EContact *contact2)
}
static void
-contacts_added (EBookView *book_view, const GList *contact_list,
+contacts_added (EBookView *book_view,
+ const GList *contact_list,
EContactPrintContext *ctxt)
{
while (contact_list != NULL) {
@@ -397,7 +402,10 @@ contacts_added (EBookView *book_view, const GList *contact_list,
}
static void
-view_complete (EBookView *book_view, EBookViewStatus status, const gchar *error_msg, EFlag *book_view_started)
+view_complete (EBookView *book_view,
+ EBookViewStatus status,
+ const gchar *error_msg,
+ EFlag *book_view_started)
{
e_flag_set (book_view_started);
}
@@ -431,7 +439,8 @@ get_float (gchar *data)
}
static void
-get_font (gchar *data, PangoFontDescription **variable)
+get_font (gchar *data,
+ PangoFontDescription **variable)
{
PangoFontDescription *desc = NULL;
@@ -612,7 +621,8 @@ load_contacts (EContactPrintContext *ctxt)
}
static void
-contact_draw (EContact *contact, EContactPrintContext *ctxt)
+contact_draw (EContact *contact,
+ EContactPrintContext *ctxt)
{
GtkPageSetup *setup;
gdouble page_height;
@@ -720,8 +730,8 @@ contact_begin_print (GtkPrintOperation *operation,
* while printing*/
void
contact_page_draw_footer (GtkPrintOperation *operation,
- GtkPrintContext *context,
- gint page_nr)
+ GtkPrintContext *context,
+ gint page_nr)
{
PangoFontDescription *desc;
PangoLayout *layout;
@@ -802,8 +812,10 @@ contact_end_print (GtkPrintOperation *operation,
}
void
-e_contact_print (EBook *book, EBookQuery *query,
- GList *contact_list, GtkPrintOperationAction action)
+e_contact_print (EBook *book,
+ EBookQuery *query,
+ GList *contact_list,
+ GtkPrintOperationAction action)
{
GtkPrintOperation *operation;
EContactPrintContext ctxt;
diff --git a/addressbook/util/addressbook.c b/addressbook/util/addressbook.c
index 2185434d00..10ec1a5b26 100644
--- a/addressbook/util/addressbook.c
+++ b/addressbook/util/addressbook.c
@@ -96,27 +96,32 @@ load_source_auth_cb (EBook *book, const GError *error, gpointer closure)
so that it wil valid for other servers which provide
anonymous access*/
- dialog = gtk_message_dialog_new (NULL,
- 0,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- "%s", _("Accessing LDAP Server anonymously"));
- g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
+ dialog = gtk_message_dialog_new (
+ NULL, 0,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ "%s", _("Accessing LDAP Server anonymously"));
+ g_signal_connect (
+ dialog, "response",
+ G_CALLBACK(gtk_widget_destroy), NULL);
gtk_widget_show (dialog);
error = NULL;
goto done;
}
- } else if (g_error_matches (error, E_BOOK_ERROR, E_BOOK_ERROR_INVALID_SERVER_VERSION)) {
- e_alert_run_dialog_for_args (e_shell_get_active_window (NULL),
- "addressbook:server-version",
- NULL);
+ } else if (g_error_matches (error, E_BOOK_ERROR,
+ E_BOOK_ERROR_INVALID_SERVER_VERSION)) {
+ e_alert_run_dialog_for_args (
+ e_shell_get_active_window (NULL),
+ "addressbook:server-version", NULL);
error = NULL;
goto done;
- } else if (g_error_matches (error, E_BOOK_ERROR, E_BOOK_ERROR_UNSUPPORTED_AUTHENTICATION_METHOD)) {
+ } else if (g_error_matches (error, E_BOOK_ERROR,
+ E_BOOK_ERROR_UNSUPPORTED_AUTHENTICATION_METHOD)) {
goto done;
} else {
- if (g_error_matches (error, E_BOOK_ERROR, E_BOOK_ERROR_AUTHENTICATION_FAILED)) {
+ if (g_error_matches (error, E_BOOK_ERROR,
+ E_BOOK_ERROR_AUTHENTICATION_FAILED)) {
const gchar *uri = e_book_get_uri (book);
gchar *stripped_uri = remove_parameters_from_uri (uri);
const gchar *auth_domain = e_source_get_property (data->source, "auth-domain");
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
index 2b1966684e..a1827d3cc9 100644
--- a/addressbook/util/eab-book-util.c
+++ b/addressbook/util/eab-book-util.c
@@ -48,7 +48,7 @@ escape (const gchar *str)
else
g_string_append_c (s, *p);
- p ++;
+ p++;
}
return g_string_free (s, FALSE);
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index dcb8dde7b1..ce01b7da4d 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -177,11 +177,15 @@ static const gchar *ui =
static void comp_editor_show_help (CompEditor *editor);
static void real_edit_comp (CompEditor *editor, ECalComponent *comp);
-static gboolean real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms);
+static gboolean real_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms);
static gboolean prompt_and_save_changes (CompEditor *editor, gboolean send);
static void close_dialog (CompEditor *editor);
-static void page_dates_changed_cb (CompEditor *editor, CompEditorPageDates *dates, CompEditorPage *page);
+static void page_dates_changed_cb (CompEditor *editor,
+ CompEditorPageDates *dates,
+ CompEditorPage *page);
static void obj_modified_cb (ECal *client, GList *objs, CompEditor *editor);
static void obj_removed_cb (ECal *client, GList *uids, CompEditor *editor);
@@ -415,7 +419,8 @@ save_comp (CompEditor *editor)
clone = e_cal_component_clone (priv->comp);
comp_editor_copy_new_attendees (clone, priv->comp);
for (l = priv->pages; l != NULL; l = l->next) {
- if (IS_COMP_EDITOR_PAGE(l->data) && !comp_editor_page_fill_component (l->data, clone)) {
+ if (IS_COMP_EDITOR_PAGE (l->data) &&
+ !comp_editor_page_fill_component (l->data, clone)) {
g_object_unref (clone);
g_hash_table_destroy (timezones);
comp_editor_show_page (editor, COMP_EDITOR_PAGE (l->data));
@@ -428,7 +433,9 @@ save_comp (CompEditor *editor)
}
/* If we are not the organizer, we don't update the sequence number */
- if (!e_cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client) || itip_sentby_is_user (clone, priv->client))
+ if (!e_cal_component_has_organizer (clone) ||
+ itip_organizer_is_user (clone, priv->client) ||
+ itip_sentby_is_user (clone, priv->client))
e_cal_component_commit_sequence (clone);
else
e_cal_component_abort_sequence (clone);
@@ -469,16 +476,20 @@ save_comp (CompEditor *editor)
if (result && priv->mod == CALOBJ_MOD_THIS) {
/* FIXME do we really need to do this ? */
- if ((flags & COMP_EDITOR_DELEGATE) || !e_cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client) || itip_sentby_is_user (clone, priv->client))
+ if ((flags & COMP_EDITOR_DELEGATE) ||
+ !e_cal_component_has_organizer (clone) ||
+ itip_organizer_is_user (clone, priv->client) ||
+ itip_sentby_is_user (clone, priv->client))
e_cal_component_commit_sequence (clone);
else
e_cal_component_abort_sequence (clone);
}
}
- /* If the delay delivery is set, the items will not be created in the server immediately,
- so we need not show them in the view. They will appear as soon as the server creates
- it after the delay period */
+ /* If the delay delivery is set, the items will not be created in
+ * the server immediately, so we need not show them in the view.
+ * They will appear as soon as the server creates it after the
+ * delay period. */
if (result && e_cal_component_has_attendees (priv->comp)) {
gboolean delay_set = FALSE;
icalproperty *icalprop;
@@ -525,14 +536,18 @@ save_comp (CompEditor *editor)
cal_comp_is_on_server (priv->comp, priv->source_client)) {
/* Comp found a new home. Remove it from old one. */
- if (e_cal_component_is_instance (priv->comp) || e_cal_component_has_recurrences (priv->comp))
- e_cal_remove_object_with_mod (priv->source_client, orig_uid_copy, NULL,
- CALOBJ_MOD_ALL, NULL);
+ if (e_cal_component_is_instance (priv->comp) ||
+ e_cal_component_has_recurrences (priv->comp))
+ e_cal_remove_object_with_mod (
+ priv->source_client, orig_uid_copy,
+ NULL, CALOBJ_MOD_ALL, NULL);
else
- e_cal_remove_object (priv->source_client, orig_uid_copy, NULL);
+ e_cal_remove_object (
+ priv->source_client,
+ orig_uid_copy, NULL);
- /* Let priv->source_client point to new home, so we can move it
- * again this session. */
+ /* Let priv->source_client point to new home,
+ * so we can move it again this session. */
g_object_unref (priv->source_client);
priv->source_client = g_object_ref (priv->client);
@@ -575,17 +590,29 @@ save_comp_with_send (CompEditor *editor)
return FALSE;
delegated = delegate && !e_cal_get_save_schedules (priv->client);
- if (delegated || (send && send_component_dialog ((GtkWindow *) editor, priv->client, priv->comp, !priv->existing_org, &strip_alarms, !priv->existing_org ? NULL : &only_new_attendees))) {
+ if (delegated || (send && send_component_dialog (
+ (GtkWindow *) editor, priv->client, priv->comp,
+ !priv->existing_org, &strip_alarms, !priv->existing_org ?
+ NULL : &only_new_attendees))) {
if (delegated)
only_new_attendees = FALSE;
- comp_editor_set_flags (editor, (comp_editor_get_flags (editor) & (~COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) | (only_new_attendees ? COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY : 0));
+ comp_editor_set_flags (
+ editor, (comp_editor_get_flags (editor) &
+ (~COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) |
+ (only_new_attendees ?
+ COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY : 0));
- if ((itip_organizer_is_user (priv->comp, priv->client) || itip_sentby_is_user (priv->comp, priv->client))) {
+ if ((itip_organizer_is_user (priv->comp, priv->client) ||
+ itip_sentby_is_user (priv->comp, priv->client))) {
if (e_cal_component_get_vtype (priv->comp) == E_CAL_COMPONENT_JOURNAL)
- return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_PUBLISH, strip_alarms);
+ return comp_editor_send_comp (
+ editor, E_CAL_COMPONENT_METHOD_PUBLISH,
+ strip_alarms);
else
- return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST, strip_alarms);
+ return comp_editor_send_comp (
+ editor, E_CAL_COMPONENT_METHOD_REQUEST,
+ strip_alarms);
} else {
if (!comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST, strip_alarms))
return FALSE;
@@ -754,7 +781,9 @@ remove_event_dialog (ECal *client,
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), TRUE);
- dialog = gtk_message_dialog_new (parent, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", _("Keep original item?"));
+ dialog = gtk_message_dialog_new (
+ parent, 0, GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_YES_NO, "%s", _("Keep original item?"));
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
ret = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES;
gtk_widget_destroy (dialog);
@@ -799,13 +828,21 @@ action_save_cb (GtkAction *action,
}
if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only) {
- e_alert_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal-editor", e_source_peek_name (e_cal_get_source (priv->client)), NULL);
+ e_alert_run_dialog_for_args (
+ (GtkWindow *) gtk_widget_get_toplevel (
+ GTK_WIDGET (editor)),
+ "calendar:prompt-read-only-cal-editor",
+ e_source_peek_name (
+ e_cal_get_source (priv->client)),
+ NULL);
return;
}
commit_all_fields (editor);
if (e_cal_component_has_recurrences (priv->comp)) {
- if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor), delegated))
+ if (!recur_component_dialog (
+ priv->client, priv->comp, &priv->mod,
+ GTK_WINDOW (editor), delegated))
return;
} else if (e_cal_component_is_instance (priv->comp))
priv->mod = CALOBJ_MOD_THIS;
@@ -828,13 +865,15 @@ action_save_cb (GtkAction *action,
flags = comp_editor_get_flags (editor);
delegate = flags & COMP_EDITOR_DELEGATE;
- if (delegate && !remove_event_dialog (priv->client, priv->comp, GTK_WINDOW (editor))) {
+ if (delegate && !remove_event_dialog (
+ priv->client, priv->comp, GTK_WINDOW (editor))) {
const gchar *uid = NULL;
GError *error = NULL;
e_cal_component_get_uid (priv->comp, &uid);
- if (e_cal_component_is_instance (priv->comp) || e_cal_component_has_recurrences (priv->comp)) {
+ if (e_cal_component_is_instance (priv->comp) ||
+ e_cal_component_has_recurrences (priv->comp)) {
gchar *rid;
rid = e_cal_component_get_recurid_as_string (priv->comp);
e_cal_remove_object_with_mod (priv->client, uid, rid, priv->mod, &error);
@@ -1836,7 +1875,13 @@ prompt_and_save_changes (CompEditor *editor, gboolean send)
switch (save_component_dialog (GTK_WINDOW(editor), priv->comp)) {
case GTK_RESPONSE_YES: /* Save */
if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only) {
- e_alert_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal-editor", e_source_peek_name (e_cal_get_source (priv->client)), NULL);
+ e_alert_run_dialog_for_args (
+ (GtkWindow *) gtk_widget_get_toplevel (
+ GTK_WIDGET (editor)),
+ "calendar:prompt-read-only-cal-editor",
+ e_source_peek_name (
+ e_cal_get_source (priv->client)),
+ NULL);
/* don't discard changes when selected readonly calendar */
return FALSE;
}
@@ -1853,7 +1898,9 @@ prompt_and_save_changes (CompEditor *editor, gboolean send)
return FALSE;
if (e_cal_component_is_instance (priv->comp))
- if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor), FALSE))
+ if (!recur_component_dialog (
+ priv->client, priv->comp, &priv->mod,
+ GTK_WINDOW (editor), FALSE))
return FALSE;
if (send && save_comp_with_send (editor))
@@ -2397,8 +2444,10 @@ comp_editor_remove_page (CompEditor *editor, CompEditorPage *page)
return;
/* Disconnect all the signals added in append_page(). */
- g_signal_handlers_disconnect_matched (page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
- g_signal_handlers_disconnect_matched (page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page);
+ g_signal_handlers_disconnect_matched (
+ page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
+ g_signal_handlers_disconnect_matched (
+ page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page);
gtk_notebook_remove_page (priv->notebook, page_num);
@@ -2634,7 +2683,9 @@ real_edit_comp (CompEditor *editor, ECalComponent *comp)
/* TODO These functions should be available in e-cal-component.c */
static void
-set_attendees_for_delegation (ECalComponent *comp, const gchar *address, ECalComponentItipMethod method)
+set_attendees_for_delegation (ECalComponent *comp,
+ const gchar *address,
+ ECalComponentItipMethod method)
{
icalproperty *prop;
icalparameter *param;
@@ -2671,8 +2722,9 @@ get_users_from_memo_comp (ECalComponent *comp, GList **users)
icalcomp = e_cal_component_get_icalcomponent (comp);
- for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); icalprop;
- icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
+ for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
+ icalprop != NULL;
+ icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
if (g_str_equal (icalproperty_get_x_name (icalprop), "X-EVOLUTION-RECIPIENTS")) {
break;
}
@@ -2692,7 +2744,9 @@ get_users_from_memo_comp (ECalComponent *comp, GList **users)
}
static gboolean
-real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms)
+real_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms)
{
CompEditorPrivate *priv;
CompEditorFlags flags;
@@ -2729,7 +2783,8 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str
if (e_cal_component_get_vtype (send_comp) == E_CAL_COMPONENT_JOURNAL)
get_users_from_memo_comp (send_comp, &users);
- /* The user updates the delegated status to the Organizer, so remove all other attendees */
+ /* The user updates the delegated status to the Organizer,
+ * so remove all other attendees. */
if (flags & COMP_EDITOR_DELEGATE) {
address = itip_get_comp_attendee (send_comp, priv->client);
@@ -2737,10 +2792,13 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str
set_attendees_for_delegation (send_comp, address, method);
}
- if (!e_cal_component_has_attachments (priv->comp)
- || e_cal_get_static_capability (priv->client, CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) {
- if (itip_send_comp (method, send_comp, priv->client,
- NULL, NULL, users, strip_alarms, priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) {
+ if (!e_cal_component_has_attachments (priv->comp) ||
+ e_cal_get_static_capability (priv->client,
+ CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) {
+ if (itip_send_comp (
+ method, send_comp, priv->client,
+ NULL, NULL, users, strip_alarms,
+ priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) {
g_object_unref (send_comp);
return TRUE;
}
@@ -2755,7 +2813,9 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str
for (attach = mime_attach_list; attach; attach = attach->next) {
struct CalMimeAttach *cma = (struct CalMimeAttach *) attach->data;
- attach_list = g_slist_append (attach_list, g_strconcat ("cid:", cma->content_id, NULL));
+ attach_list = g_slist_append (
+ attach_list, g_strconcat (
+ "cid:", cma->content_id, NULL));
}
if (attach_list) {
@@ -2765,8 +2825,10 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str
g_slist_free (attach_list);
}
- if (itip_send_comp (method, send_comp, priv->client,
- NULL, mime_attach_list, users, strip_alarms, priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) {
+ if (itip_send_comp (
+ method, send_comp, priv->client,
+ NULL, mime_attach_list, users, strip_alarms,
+ priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) {
gboolean saved = save_comp (editor);
g_object_unref (send_comp);
@@ -2879,7 +2941,8 @@ comp_editor_delete_comp (CompEditor *editor)
priv = editor->priv;
e_cal_component_get_uid (priv->comp, &uid);
- if (e_cal_component_is_instance (priv->comp)|| e_cal_component_has_recurrences (priv->comp))
+ if (e_cal_component_is_instance (priv->comp) ||
+ e_cal_component_has_recurrences (priv->comp))
e_cal_remove_object_with_mod (priv->client, uid, NULL,
CALOBJ_MOD_ALL, NULL);
else
@@ -2895,7 +2958,9 @@ comp_editor_delete_comp (CompEditor *editor)
*
**/
gboolean
-comp_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms)
+comp_editor_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms)
{
CompEditorClass *class;
@@ -2984,8 +3049,10 @@ comp_editor_get_mime_attach_list (CompEditor *editor)
if (!desc || *desc == '\0')
desc = _("attachment");
cal_mime_attach->description = g_strdup (desc);
- cal_mime_attach->content_type = g_strdup (camel_data_wrapper_get_mime_type (wrapper));
- cal_mime_attach->content_id = g_strdup (camel_mime_part_get_content_id (mime_part));
+ cal_mime_attach->content_type = g_strdup (
+ camel_data_wrapper_get_mime_type (wrapper));
+ cal_mime_attach->content_id = g_strdup (
+ camel_mime_part_get_content_id (mime_part));
disp = camel_mime_part_get_disposition (mime_part);
if (disp && !g_ascii_strcasecmp(disp, "inline"))
@@ -3012,9 +3079,12 @@ page_dates_changed_cb (CompEditor *editor,
if (page != (CompEditorPage *) l->data && IS_COMP_EDITOR_PAGE(l->data))
comp_editor_page_set_dates (l->data, dates);
- if (!priv->warned && priv->existing_org && !priv->user_org && !(editor->priv->flags & COMP_EDITOR_NEW_ITEM)) {
- e_notice (priv->notebook, GTK_MESSAGE_INFO,
- _("Changes made to this item may be discarded if an update arrives"));
+ if (!priv->warned && priv->existing_org && !priv->user_org &&
+ !(editor->priv->flags & COMP_EDITOR_NEW_ITEM)) {
+ e_notice (
+ priv->notebook, GTK_MESSAGE_INFO,
+ _("Changes made to this item may be discarded "
+ "if an update arrives"));
priv->warned = TRUE;
}
}
@@ -3030,7 +3100,8 @@ obj_modified_cb (ECal *client,
priv = editor->priv;
/* We queried based on a specific UID so we definitely changed */
- if (changed_component_dialog ((GtkWindow *) editor, priv->comp, FALSE, priv->changed)) {
+ if (changed_component_dialog (
+ (GtkWindow *) editor, priv->comp, FALSE, priv->changed)) {
icalcomponent *icalcomp = icalcomponent_new_clone (objects->data);
comp = e_cal_component_new ();
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index f055884d0d..b0dee13f27 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -106,8 +106,11 @@ static const gchar *ui =
" </toolbar>"
"</ui>";
-static void event_editor_edit_comp (CompEditor *editor, ECalComponent *comp);
-static gboolean event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms);
+static void event_editor_edit_comp (CompEditor *editor,
+ ECalComponent *comp);
+static gboolean event_editor_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms);
G_DEFINE_TYPE (EventEditor, event_editor, TYPE_COMP_EDITOR)
@@ -365,7 +368,9 @@ event_editor_constructor (GType type,
event_page_show_options (priv->event_page);
comp_editor_set_group_item (editor, TRUE);
- if (!((flags & COMP_EDITOR_USER_ORG) || (flags & COMP_EDITOR_DELEGATE)|| (flags & COMP_EDITOR_NEW_ITEM))) {
+ if (!((flags & COMP_EDITOR_USER_ORG) ||
+ (flags & COMP_EDITOR_DELEGATE) ||
+ (flags & COMP_EDITOR_NEW_ITEM))) {
GtkAction *action;
action = comp_editor_get_action (editor, "free-busy");
@@ -635,7 +640,8 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
gtk_action_set_visible (action, TRUE);
}
- if (!(delegate && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) {
+ if (!(delegate && e_cal_get_static_capability (
+ client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) {
event_page_remove_all_attendees (priv->event_page);
for (l = attendees; l != NULL; l = l->next) {
@@ -645,11 +651,15 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
if (delegate && !g_str_equal (itip_strip_mailto (ca->value), user_email))
continue;
- ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca));
+ ia = E_MEETING_ATTENDEE (
+ e_meeting_attendee_new_from_e_cal_component_attendee (ca));
- /* If we aren't the organizer or the attendee is just delegated, don't allow editing */
- if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
+ /* If we aren't the organizer or the attendee
+ * is just delegated, don't allow editing. */
+ if (!comp_editor_get_user_org (editor) ||
+ e_meeting_attendee_is_set_delto (ia))
+ e_meeting_attendee_set_edit_level (
+ ia, E_MEETING_ATTENDEE_EDIT_NONE);
event_page_add_attendee (priv->event_page, ia);
@@ -663,7 +673,9 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
EIterator *it;
accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(it);e_iterator_next(it)) {
+ for (it = e_list_get_iterator((EList *)accounts);
+ e_iterator_is_valid(it);
+ e_iterator_next(it)) {
EMeetingAttendee *ia;
account = (EAccount*)e_iterator_get(it);
@@ -687,13 +699,17 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
}
e_cal_component_free_attendee_list (attendees);
- comp_editor_set_needs_send (editor, priv->meeting_shown && (itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client)));
+ comp_editor_set_needs_send (
+ editor, priv->meeting_shown && (itip_organizer_is_user (
+ comp, client) || itip_sentby_is_user (comp, client)));
priv->updating = FALSE;
}
static gboolean
-event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms)
+event_editor_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms)
{
EventEditorPrivate *priv;
ECalComponent *comp = NULL;
@@ -721,7 +737,8 @@ event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboo
parent:
if (COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp)
- return COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp (editor, method, strip_alarms);
+ return COMP_EDITOR_CLASS (event_editor_parent_class)->
+ send_comp (editor, method, strip_alarms);
return FALSE;
}
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index ae79698efd..c2efce759c 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -493,7 +493,7 @@ get_start_weekday_mask (ECalComponent *comp)
e_cal_component_get_dtstart (comp, &dt);
if (dt.value) {
- short weekday;
+ gshort weekday;
weekday = icaltime_day_of_week (*dt.value);
retval = 0x1 << (weekday - 1);
@@ -1325,7 +1325,7 @@ make_recurrence_special (RecurrencePage *rpage)
/* Counts the elements in the by_xxx fields of an icalrecurrencetype */
static gint
-count_by_xxx (short *field, gint max_elements)
+count_by_xxx (gshort *field, gint max_elements)
{
gint i;
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 09494cec1a..01f65aa8fd 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -88,8 +88,11 @@ static const gchar *ui =
" </toolbar>"
"</ui>";
-static void task_editor_edit_comp (CompEditor *editor, ECalComponent *comp);
-static gboolean task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms);
+static void task_editor_edit_comp (CompEditor *editor,
+ ECalComponent *comp);
+static gboolean task_editor_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms);
G_DEFINE_TYPE (TaskEditor, task_editor, TYPE_COMP_EDITOR)
@@ -413,9 +416,12 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
EMeetingAttendee *ia;
ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca));
- /* If we aren't the organizer or the attendee is just delegating, don't allow editing */
- if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
+ /* If we aren't the organizer or the attendee is just
+ * delegating, don't allow editing. */
+ if (!comp_editor_get_user_org (editor) ||
+ e_meeting_attendee_is_set_delto (ia))
+ e_meeting_attendee_set_edit_level (
+ ia, E_MEETING_ATTENDEE_EDIT_NONE);
task_page_add_attendee (priv->task_page, ia);
g_object_unref (ia);
@@ -428,7 +434,9 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
EIterator *it;
accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(it);e_iterator_next(it)) {
+ for (it = e_list_get_iterator((EList *)accounts);
+ e_iterator_is_valid(it);
+ e_iterator_next(it)) {
EMeetingAttendee *ia;
account = (EAccount*)e_iterator_get(it);
@@ -451,13 +459,17 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
}
e_cal_component_free_attendee_list (attendees);
- comp_editor_set_needs_send (editor, priv->assignment_shown && itip_organizer_is_user (comp, client));
+ comp_editor_set_needs_send (
+ editor, priv->assignment_shown &&
+ itip_organizer_is_user (comp, client));
priv->updating = FALSE;
}
static gboolean
-task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms)
+task_editor_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms)
{
TaskEditorPrivate *priv;
ECalComponent *comp = NULL;
@@ -485,7 +497,8 @@ task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gbool
parent:
if (COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp)
- return COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp (editor, method, strip_alarms);
+ return COMP_EDITOR_CLASS (task_editor_parent_class)->
+ send_comp (editor, method, strip_alarms);
return FALSE;
}
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index d04c87ad93..d0166b9f0e 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -2774,7 +2774,7 @@ e_cal_model_generate_instances (ECalModel *model, time_t start, time_t end,
gint i, n;
n = e_table_model_row_count (E_TABLE_MODEL (model));
- for (i = 0; i < n; i ++) {
+ for (i = 0; i < n; i++) {
ECalModelComponent *comp_data = e_cal_model_get_component_at (model, i);
mdata.comp_data = comp_data;
diff --git a/calendar/gui/e-cell-date-edit-text.h b/calendar/gui/e-cell-date-edit-text.h
index 335374c141..aab7e27edf 100644
--- a/calendar/gui/e-cell-date-edit-text.h
+++ b/calendar/gui/e-cell-date-edit-text.h
@@ -80,8 +80,9 @@ gboolean e_cell_date_edit_text_get_use_24_hour_format
void e_cell_date_edit_text_set_use_24_hour_format
(ECellDateEditText *ecd,
gboolean use_24_hour);
-
-gint e_cell_date_edit_compare_cb (gconstpointer a, gconstpointer b, gpointer cmp_cache);
+gint e_cell_date_edit_compare_cb (gconstpointer a,
+ gconstpointer b,
+ gpointer cmp_cache);
G_END_DECLS
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index f622b8252b..c0b718d63b 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -104,19 +104,24 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
cairo_save (cr);
/* Fill it in. */
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
- event->comp_data),
- &bg_color)) {
+ if (gdk_color_parse (
+ e_cal_model_get_color_for_component (
+ e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
+ event->comp_data), &bg_color)) {
GdkColormap *colormap;
colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
gdk_cairo_set_source_color (cr, &bg_color);
} else {
- gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
+ gdk_cairo_set_source_color (
+ cr, &day_view->colors
+ [E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
}
} else {
- gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
+ gdk_cairo_set_source_color (
+ cr, &day_view->colors
+ [E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
}
cairo_move_to (cr, points[0].x, points[0].y);
@@ -127,7 +132,8 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
cairo_restore (cr);
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
+ gdk_cairo_set_source_color (
+ cr, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
cairo_move_to (cr, x, y);
cairo_line_to (cr, x + w, c1);
cairo_move_to (cr, x, y + h - 1);
@@ -207,11 +213,13 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
gc = day_view->main_gc;
fg_gc = style->fg_gc[GTK_STATE_NORMAL];
comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ e_cal_component_set_icalcomponent (
+ comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
- event->comp_data),
- &bg_color)) {
+ if (gdk_color_parse (
+ e_cal_model_get_color_for_component (
+ e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
+ event->comp_data), &bg_color)) {
GdkColormap *colormap;
colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
@@ -393,7 +401,9 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
+ event->end_minute;
hour = offset / 60;
minute = offset % 60;
- time_x = item_x + item_w - E_DAY_VIEW_LONG_EVENT_X_PAD - time_width - E_DAY_VIEW_LONG_EVENT_TIME_X_PAD - x;
+ time_x =
+ item_x + item_w - E_DAY_VIEW_LONG_EVENT_X_PAD -
+ time_width - E_DAY_VIEW_LONG_EVENT_TIME_X_PAD - x;
if (time_x >= min_end_time_x) {
/* Calculate the actual hour number to display. */
@@ -431,7 +441,9 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
icon_y = item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT
+ E_DAY_VIEW_ICON_Y_PAD - y;
- if (icon_x <= max_icon_x && (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp))) {
+ if (icon_x <= max_icon_x && (
+ e_cal_component_has_recurrences (comp) ||
+ e_cal_component_is_instance (comp))) {
cairo_save (cr);
gdk_cairo_set_source_pixbuf (cr, day_view->recurrence_icon, icon_x, icon_y);
cairo_paint (cr);
@@ -615,7 +627,10 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item,
gtk_widget_get_allocation (
GTK_WIDGET (canvas_item->canvas), &allocation);
canvas_width = allocation.width;
- canvas_height = (show_dates ? 1 : (MAX (1, day_view->rows_in_top_display) + 1)) * day_view->top_row_height;
+ canvas_height =
+ (show_dates ? 1 :
+ (MAX (1, day_view->rows_in_top_display) + 1)) *
+ day_view->top_row_height;
left_edge = 0;
item_height = day_view->top_row_height - E_DAY_VIEW_TOP_CANVAS_Y_GAP;
@@ -680,7 +695,9 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item,
rect_h = canvas_height - 1 - rect_y;
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED]);
+ gdk_cairo_set_source_color (
+ cr, &day_view->colors
+ [E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED]);
cairo_rectangle (cr, rect_x - x, rect_y - y,
rect_w, rect_h);
cairo_fill (cr);
@@ -739,7 +756,9 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item,
/* Draw the lines between each column. */
if (day != 0) {
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID]);
+ gdk_cairo_set_source_color (
+ cr, &day_view->colors
+ [E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID]);
cairo_move_to (cr, day_view->day_offsets[day] - x,
item_height - y);
cairo_line_to (cr, day_view->day_offsets[day] - x,
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 6cfaecabfa..51bf75f750 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -326,43 +326,60 @@ get_value (GtkTreeModel *model, GtkTreeIter *iter, gint col, GValue *value)
switch (col) {
case E_MEETING_STORE_ADDRESS_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ g_value_set_string (
+ value, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
break;
case E_MEETING_STORE_MEMBER_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, e_meeting_attendee_get_member (attendee));
+ g_value_set_string (
+ value, e_meeting_attendee_get_member (attendee));
break;
case E_MEETING_STORE_TYPE_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, type_to_text (e_meeting_attendee_get_cutype (attendee)));
+ g_value_set_string (
+ value, type_to_text (
+ e_meeting_attendee_get_cutype (attendee)));
break;
case E_MEETING_STORE_ROLE_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, role_to_text (e_meeting_attendee_get_role (attendee)));
+ g_value_set_string (
+ value, role_to_text (
+ e_meeting_attendee_get_role (attendee)));
break;
case E_MEETING_STORE_RSVP_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, boolean_to_text (e_meeting_attendee_get_rsvp (attendee)));
+ g_value_set_string (
+ value, boolean_to_text (
+ e_meeting_attendee_get_rsvp (attendee)));
break;
case E_MEETING_STORE_DELTO_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_delto (attendee)));
+ g_value_set_string (
+ value, itip_strip_mailto (
+ e_meeting_attendee_get_delto (attendee)));
break;
case E_MEETING_STORE_DELFROM_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_delfrom (attendee)));
+ g_value_set_string (
+ value, itip_strip_mailto (
+ e_meeting_attendee_get_delfrom (attendee)));
break;
case E_MEETING_STORE_STATUS_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, partstat_to_text (e_meeting_attendee_get_status (attendee)));
+ g_value_set_string (
+ value, partstat_to_text (
+ e_meeting_attendee_get_status (attendee)));
break;
case E_MEETING_STORE_CN_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, e_meeting_attendee_get_cn (attendee));
+ g_value_set_string (
+ value, e_meeting_attendee_get_cn (attendee));
break;
case E_MEETING_STORE_LANGUAGE_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, e_meeting_attendee_get_language (attendee));
+ g_value_set_string (
+ value, e_meeting_attendee_get_language (attendee));
break;
case E_MEETING_STORE_ATTENDEE_COL:
g_value_init (value, G_TYPE_STRING);
@@ -370,12 +387,16 @@ get_value (GtkTreeModel *model, GtkTreeIter *iter, gint col, GValue *value)
if (strcmp (cn, ""))
g_value_set_string (value, cn);
else
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ g_value_set_string (
+ value, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
break;
case E_MEETING_STORE_ATTENDEE_UNDERLINE_COL:
cn = e_meeting_attendee_get_cn (attendee);
g_value_init (value, PANGO_TYPE_UNDERLINE);
- g_value_set_enum (value, strcmp ("", cn) == 0 ? PANGO_UNDERLINE_NONE : PANGO_UNDERLINE_SINGLE);
+ g_value_set_enum (
+ value, strcmp ("", cn) == 0 ?
+ PANGO_UNDERLINE_NONE : PANGO_UNDERLINE_SINGLE);
}
}
@@ -480,7 +501,9 @@ e_meeting_store_set_value (EMeetingStore *store, gint row, gint col, const gchar
switch (col) {
case E_MEETING_STORE_ADDRESS_COL:
if (val != NULL && *((gchar *)val))
- e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (gchar *) val));
+ e_meeting_attendee_set_address (
+ attendee, g_strdup_printf (
+ "MAILTO:%s", (gchar *) val));
break;
case E_MEETING_STORE_MEMBER_COL:
e_meeting_attendee_set_member (attendee, g_strdup (val));
@@ -525,10 +548,14 @@ refresh_queue_remove (EMeetingStore *store, EMeetingAttendee *attendee)
priv = store->priv;
/* Free the queue data */
- qdata = g_hash_table_lookup (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ qdata = g_hash_table_lookup (
+ priv->refresh_data, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
if (qdata) {
g_mutex_lock (priv->mutex);
- g_hash_table_remove (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ g_hash_table_remove (
+ priv->refresh_data, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
g_mutex_unlock (priv->mutex);
g_ptr_array_free (qdata->call_backs, TRUE);
g_ptr_array_free (qdata->data, TRUE);
@@ -889,7 +916,9 @@ e_meeting_store_remove_all_attendees (EMeetingStore *store)
}
EMeetingAttendee *
-e_meeting_store_find_attendee (EMeetingStore *store, const gchar *address, gint *row)
+e_meeting_store_find_attendee (EMeetingStore *store,
+ const gchar *address,
+ gint *row)
{
EMeetingAttendee *attendee;
gint i;
@@ -903,7 +932,9 @@ e_meeting_store_find_attendee (EMeetingStore *store, const gchar *address, gint
attendee = g_ptr_array_index (store->priv->attendees, i);
attendee_address = e_meeting_attendee_get_address (attendee);
- if (attendee_address && !g_ascii_strcasecmp (itip_strip_mailto (attendee_address), itip_strip_mailto (address))) {
+ if (attendee_address && !g_ascii_strcasecmp (
+ itip_strip_mailto (attendee_address),
+ itip_strip_mailto (address))) {
if (row != NULL)
*row = i;
@@ -1229,7 +1260,9 @@ freebusy_async (gpointer data)
we should be able to get free busy asynchronously */
g_static_mutex_lock (&mutex);
priv->num_queries++;
- e_cal_get_free_busy (fbd->client, fbd->users, fbd->startt, fbd->endt, &(fbd->fb_data), NULL);
+ e_cal_get_free_busy (
+ fbd->client, fbd->users, fbd->startt,
+ fbd->endt, &(fbd->fb_data), NULL);
priv->num_queries--;
g_static_mutex_unlock (&mutex);
@@ -1311,7 +1344,9 @@ refresh_busy_periods (gpointer data)
attendee = g_ptr_array_index (priv->refresh_queue, i);
g_return_val_if_fail (attendee != NULL, FALSE);
- qdata = g_hash_table_lookup (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ qdata = g_hash_table_lookup (
+ priv->refresh_data, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
if (!qdata)
continue;
@@ -1403,7 +1438,8 @@ refresh_queue_add (EMeetingStore *store, gint row,
priv = store->priv;
attendee = g_ptr_array_index (priv->attendees, row);
- if ((attendee == NULL) || !strcmp (itip_strip_mailto (e_meeting_attendee_get_address (attendee)), ""))
+ if ((attendee == NULL) || !strcmp (itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)), ""))
return;
/* check the queue if the attendee is already in there*/
@@ -1411,12 +1447,16 @@ refresh_queue_add (EMeetingStore *store, gint row,
if (attendee == g_ptr_array_index (priv->refresh_queue, i))
return;
- if (!strcmp (e_meeting_attendee_get_address (attendee), e_meeting_attendee_get_address (g_ptr_array_index (priv->refresh_queue, i))))
+ if (!strcmp (e_meeting_attendee_get_address (attendee),
+ e_meeting_attendee_get_address (
+ g_ptr_array_index (priv->refresh_queue, i))))
return;
}
g_mutex_lock (priv->mutex);
- qdata = g_hash_table_lookup (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ qdata = g_hash_table_lookup (
+ priv->refresh_data, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
if (qdata == NULL) {
qdata = g_new0 (EMeetingStoreQueueData, 1);
@@ -1434,7 +1474,9 @@ refresh_queue_add (EMeetingStore *store, gint row,
g_ptr_array_add (qdata->call_backs, call_back);
g_ptr_array_add (qdata->data, data);
- g_hash_table_insert (priv->refresh_data, (gpointer)itip_strip_mailto (e_meeting_attendee_get_address (attendee)), qdata);
+ g_hash_table_insert (
+ priv->refresh_data, (gpointer) itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)), qdata);
} else {
if (e_meeting_time_compare_times (start, &qdata->start) == -1)
qdata->start = *start;
@@ -1486,7 +1528,9 @@ async_read (GObject *source_object, GAsyncResult *res, gpointer data)
qdata->buffer[read] = '\0';
qdata->string = g_string_append (qdata->string, qdata->buffer);
- g_input_stream_read_async (istream, qdata->buffer, BUF_SIZE - 1, G_PRIORITY_DEFAULT, NULL, async_read, qdata);
+ g_input_stream_read_async (
+ istream, qdata->buffer, BUF_SIZE - 1,
+ G_PRIORITY_DEFAULT, NULL, async_read, qdata);
}
}
@@ -1518,7 +1562,9 @@ start_async_read (const gchar *uri, gpointer data)
if (!istream)
process_callbacks (qdata);
else
- g_input_stream_read_async (istream, qdata->buffer, BUF_SIZE - 1, G_PRIORITY_DEFAULT, NULL, async_read, qdata);
+ g_input_stream_read_async (
+ istream, qdata->buffer, BUF_SIZE - 1,
+ G_PRIORITY_DEFAULT, NULL, async_read, qdata);
}
void
diff --git a/calendar/gui/e-week-view-layout.c b/calendar/gui/e-week-view-layout.c
index 8962d81610..7863791e25 100644
--- a/calendar/gui/e-week-view-layout.c
+++ b/calendar/gui/e-week-view-layout.c
@@ -348,7 +348,7 @@ e_week_view_layout_get_day_position (gint day,
edge = 3;
if (wk (0) + wk (1) + wk (2) < wk (3) + wk (4) + wk (5) + wk (6))
- edge ++;
+ edge++;
if (day < edge) {
*day_x = 0;
@@ -375,10 +375,10 @@ e_week_view_layout_get_day_position (gint day,
if (wd > 6) { /* too many rows, make last shorter */
arr [i - m] --;
- wd --;
+ wd--;
} else if (wd < 6) { /* free rows left, enlarge those bigger */
arr [i - m] ++;
- wd ++;
+ wd++;
}
if (wd == 6)
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index db6d861c28..c842e30377 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2309,8 +2309,8 @@ e_week_view_get_day_position (EWeekView *week_view,
while (cell_h > 1) {
*day_h += week_view->row_heights[cell_y + 1];
- cell_h --;
- cell_y ++;
+ cell_h--;
+ cell_y++;
}
}
@@ -2633,7 +2633,7 @@ e_week_view_convert_position_to_day (EWeekView *week_view,
} else {
week = 0;
- for (day = 0; day < 7; day ++) {
+ for (day = 0; day < 7; day++) {
gint day_x = 0, day_y = 0, rows = 0;
e_week_view_layout_get_day_position (day, FALSE, 1, week_view->display_start_day, week_view->compress_weekend,
&day_x, &day_y, &rows);
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 5ecbf0a157..29b92cb8c6 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -808,11 +808,17 @@ dn_e_cal_view_objects_removed_cb (ECalView *query, GList *ids, gpointer data)
/* Callback used when the calendar query is done */
static void
-dn_e_cal_view_complete_cb (ECalView *query, ECalendarStatus status, const gchar *error_msg, gpointer data)
+dn_e_cal_view_complete_cb (ECalView *query,
+ ECalendarStatus status,
+ const gchar *error_msg,
+ gpointer data)
{
/* FIXME Better error reporting */
if (status != E_CALENDAR_STATUS_OK)
- g_warning (G_STRLOC ": Query did not successfully complete, code:%d (%s)", status, error_msg ? error_msg : "Unknown error");
+ g_warning (
+ G_STRLOC ": Query did not successfully complete, "
+ "code: %d (%s)", status, error_msg ? error_msg :
+ "Unknown error");
}
ECalendarView *
diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c
index 569c15f38f..fdb22641a6 100644
--- a/calendar/gui/goto.c
+++ b/calendar/gui/goto.c
@@ -85,9 +85,8 @@ ecal_date_range_changed (ECalendarItem *calitem, gpointer user_data)
tag_calendar_by_client (dlg->ecal, client);
}
-/* Event handler for day groups in the month item. A button press makes the calendar jump to the
- * selected day and destroys the Go-to dialog box.
- */
+/* Event handler for day groups in the month item. A button press makes
+ * the calendar jump to the selected day and destroys the Go-to dialog box. */
static void
ecal_event (ECalendarItem *calitem, gpointer user_data)
{
@@ -193,13 +192,21 @@ goto_dialog_init_widgets (GoToDialog *dlg)
{
GtkAdjustment *adj;
- g_signal_connect (dlg->month_combobox, "changed", G_CALLBACK (month_changed), dlg);
+ g_signal_connect (
+ dlg->month_combobox, "changed",
+ G_CALLBACK (month_changed), dlg);
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (dlg->year));
- g_signal_connect (adj, "value_changed", G_CALLBACK (year_changed), dlg);
-
- g_signal_connect (dlg->ecal->calitem, "date_range_changed", G_CALLBACK (ecal_date_range_changed), dlg);
- g_signal_connect (dlg->ecal->calitem, "selection_changed", G_CALLBACK (ecal_event), dlg);
+ g_signal_connect (
+ adj, "value_changed",
+ G_CALLBACK (year_changed), dlg);
+
+ g_signal_connect (
+ dlg->ecal->calitem, "date_range_changed",
+ G_CALLBACK (ecal_date_range_changed), dlg);
+ g_signal_connect (
+ dlg->ecal->calitem, "selection_changed",
+ G_CALLBACK (ecal_event), dlg);
}
/* Creates a "goto date" dialog and runs it */
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index ab2f784c33..1371f2d516 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -848,7 +848,7 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
cairo_line_to (cr, right, y - yinc / 2);
cairo_set_line_width (cr, 1);
cairo_stroke (cr);
- row ++;
+ row++;
}
pango_font_description_free (font_hour);
@@ -2780,7 +2780,7 @@ print_comp_draw_real (GtkPrintOperation *operation,
&page_start, &pages);
if (next_line) {
- next_line ++;
+ next_line++;
if (!*next_line)
next_line = NULL;
}
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 791d151165..e1bf625200 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1181,10 +1181,10 @@ encode_signature_uid (ESignature *signature)
s = uid;
while (*s) {
- len ++;
+ len++;
if (*s == '"' || *s == '.' || *s == '=')
- len ++;
- s ++;
+ len++;
+ s++;
}
ename = g_new (gchar, len + 1);
@@ -1194,23 +1194,23 @@ encode_signature_uid (ESignature *signature)
while (*s) {
if (*s == '"') {
*e = '.';
- e ++;
+ e++;
*e = '1';
- e ++;
+ e++;
} else if (*s == '=') {
*e = '.';
- e ++;
+ e++;
*e = '2';
- e ++;
+ e++;
} else {
*e = *s;
- e ++;
+ e++;
}
if (*s == '.') {
*e = '.';
- e ++;
+ e++;
}
- s ++;
+ s++;
}
*e = 0;
@@ -1226,13 +1226,13 @@ decode_signature_name (const gchar *name)
s = name;
while (*s) {
- len ++;
+ len++;
if (*s == '.') {
- s ++;
+ s++;
if (!*s || !(*s == '.' || *s == '1' || *s == '2'))
return NULL;
}
- s ++;
+ s++;
}
dname = g_new (char, len + 1);
@@ -1241,7 +1241,7 @@ decode_signature_name (const gchar *name)
d = dname;
while (*s) {
if (*s == '.') {
- s ++;
+ s++;
if (!*s || !(*s == '.' || *s == '1' || *s == '2')) {
g_free (dname);
return NULL;
@@ -1254,8 +1254,8 @@ decode_signature_name (const gchar *name)
*d = '.';
} else
*d = *s;
- d ++;
- s ++;
+ d++;
+ s++;
}
*d = 0;
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
index 0a5ca37a0c..1e2635a9e3 100644
--- a/e-util/e-bit-array.c
+++ b/e-util/e-bit-array.c
@@ -61,7 +61,7 @@ e_bit_array_insert_real(EBitArray *eba, gint row)
eba->data[box] =
(eba->data[box] & BITMASK_LEFT(row)) |
((eba->data[box] & BITMASK_RIGHT(row)) >> 1);
- eba->bit_count ++;
+ eba->bit_count++;
}
}
@@ -96,7 +96,7 @@ e_bit_array_delete_real(EBitArray *eba, gint row, gboolean move_selection_mode)
/* this over-runs our memory! */
/*eba->data[i] = eba->data[i] << 1; */
}
- eba->bit_count --;
+ 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);
@@ -258,7 +258,7 @@ e_bit_array_select_all (EBitArray *eba)
if (!eba->data)
eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
- for (i = 0; i < (eba->bit_count + 31) / 32; i ++) {
+ for (i = 0; i < (eba->bit_count + 31) / 32; i++) {
eba->data[i] = ONES;
}
@@ -268,7 +268,7 @@ e_bit_array_select_all (EBitArray *eba)
gint unselected_mask = 0;
gint num_unselected_in_last_byte = 32 - eba->bit_count % 32;
- for (i = 0; i < num_unselected_in_last_byte; i ++)
+ for (i = 0; i < num_unselected_in_last_byte; i++)
unselected_mask |= 1 << i;
eba->data[(eba->bit_count + 31) / 32 - 1] &= ~unselected_mask;
@@ -290,7 +290,7 @@ e_bit_array_invert_selection (EBitArray *eba)
if (!eba->data)
eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
- for (i = 0; i < (eba->bit_count + 31) / 32; i ++) {
+ for (i = 0; i < (eba->bit_count + 31) / 32; i++) {
eba->data[i] = ~eba->data[i];
}
}
@@ -327,10 +327,10 @@ e_bit_array_change_range(EBitArray *eba, gint start, gint end, gboolean grow)
} else {
OPERATE(eba, i, BITMASK_LEFT(start), grow);
if (grow)
- for (i ++; i < last; i++)
+ for (i++; i < last; i++)
eba->data[i] = ONES;
else
- for (i ++; i < last; i++)
+ for (i++; i < last; i++)
eba->data[i] = 0;
OPERATE(eba, i, BITMASK_RIGHT(end), grow);
}
diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c
index 71cd1d83b2..c427df65dd 100644
--- a/e-util/e-sorter-array.c
+++ b/e-util/e-sorter-array.c
@@ -213,7 +213,7 @@ e_sorter_array_append (ESorterArray *esa, gint count)
esa->sorted + pos,
sizeof (gint) * (esa->rows - pos));
esa->sorted[pos] = value;
- esa->rows ++;
+ esa->rows++;
}
} else {
esa->rows += count;
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
index 7e70d1b731..c69b79c6a3 100644
--- a/e-util/e-text-event-processor-emacs-like.c
+++ b/e-util/e-text-event-processor-emacs-like.c
@@ -29,9 +29,13 @@
#include "e-text-event-processor-emacs-like.h"
#include "e-util.h"
-static gint e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event);
+static gint e_text_event_processor_emacs_like_event
+ (ETextEventProcessor *tep,
+ ETextEventProcessorEvent *event);
-G_DEFINE_TYPE (ETextEventProcessorEmacsLike, e_text_event_processor_emacs_like, E_TEXT_EVENT_PROCESSOR_TYPE)
+G_DEFINE_TYPE (
+ ETextEventProcessorEmacsLike,
+ e_text_event_processor_emacs_like, E_TEXT_EVENT_PROCESSOR_TYPE)
/* The arguments we take */
enum {
@@ -115,13 +119,15 @@ e_text_event_processor_emacs_like_init (ETextEventProcessorEmacsLike *tep)
}
static gint
-e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event)
+e_text_event_processor_emacs_like_event (ETextEventProcessor *tep,
+ ETextEventProcessorEvent *event)
{
ETextEventProcessorCommand command;
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: transfer of control bypasses initialization of:
+ * e-text-event-processor-emacs-like.c(136): warning #589:
+ * transfer of control bypasses initialization of:
* variable "key" (declared at line 194)
* switch (event->type) {
* ^
@@ -467,7 +473,9 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
command.value = alt_keys[(gint) (key.keyval - 'a')].value;
command.string = alt_keys[(gint) (key.keyval - 'a')].string;
}
- } else if (!(key.state & GDK_MOD1_MASK) && !(key.state & GDK_CONTROL_MASK) && key.length > 0) {
+ } else if (!(key.state & GDK_MOD1_MASK) &&
+ !(key.state & GDK_CONTROL_MASK) &&
+ key.length > 0) {
if (key.keyval >= GDK_KP_0 && key.keyval <= GDK_KP_9) {
key.keyval = '0';
key.string = "0";
@@ -502,7 +510,6 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
ETextEventProcessor *
e_text_event_processor_emacs_like_new (void)
{
- ETextEventProcessorEmacsLike *retval = g_object_new (E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, NULL);
- return E_TEXT_EVENT_PROCESSOR (retval);
+ return g_object_new (E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, NULL);
}
diff --git a/e-util/e-unicode.c b/e-util/e-unicode.c
index 7a8fe696a8..1d792f15ad 100644
--- a/e-util/e-unicode.c
+++ b/e-util/e-unicode.c
@@ -84,7 +84,7 @@ e_utf8_from_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
/* iso-8859-1 */
ib = (gchar *) string;
new = ob = (gchar *)g_new (unsigned char, bytes * 2 + 1);
- for (i = 0; i < (bytes); i ++) {
+ for (i = 0; i < (bytes); i++) {
ob += e_unichar_to_utf8 (ib[i], ob);
}
*ob = '\0';
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 4b73fd7865..7d45709d2d 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -540,15 +540,15 @@ e_str_without_underscores (const gchar *string)
new_string = g_malloc (strlen (string) + 1);
dp = new_string;
- for (sp = string; *sp != '\0'; sp ++) {
+ for (sp = string; *sp != '\0'; sp++) {
if (*sp != '_') {
*dp = *sp;
- dp ++;
+ dp++;
} else if (sp[1] == '_') {
/* Translate "__" in "_". */
*dp = '_';
- dp ++;
- sp ++;
+ dp++;
+ sp++;
}
}
*dp = 0;
@@ -687,7 +687,7 @@ e_format_number (gint number)
}
char_length += strlen(group);
list = g_list_prepend(list, group);
- group_count ++;
+ group_count++;
}
if (list) {
diff --git a/libgnomecanvas/gailcanvasitem.c b/libgnomecanvas/gailcanvasitem.c
index 6fb5c7d316..2e4232d65d 100644
--- a/libgnomecanvas/gailcanvasitem.c
+++ b/libgnomecanvas/gailcanvasitem.c
@@ -31,17 +31,17 @@ static gint gail_canvas_item_get_index_in_parent (AtkObject *
static AtkStateSet* gail_canvas_item_ref_state_set (AtkObject *obj);
static void gail_canvas_item_component_interface_init (AtkComponentIface *iface);
-static guint gail_canvas_item_add_focus_handler (AtkComponent *component,
+static guint gail_canvas_item_add_focus_handler (AtkComponent *component,
AtkFocusHandler handler);
-static void gail_canvas_item_get_extents (AtkComponent *component,
+static void gail_canvas_item_get_extents (AtkComponent *component,
gint *x,
gint *y,
gint *width,
gint *height,
AtkCoordType coord_type);
-static gint gail_canvas_item_get_mdi_zorder (AtkComponent *component);
-static gboolean gail_canvas_item_grab_focus (AtkComponent *component);
-static void gail_canvas_item_remove_focus_handler (AtkComponent *component,
+static gint gail_canvas_item_get_mdi_zorder (AtkComponent *component);
+static gboolean gail_canvas_item_grab_focus (AtkComponent *component);
+static void gail_canvas_item_remove_focus_handler (AtkComponent *component,
guint handler_id);
static gboolean is_item_on_screen (GnomeCanvasItem *item);
static void get_item_extents (GnomeCanvasItem *item,
@@ -383,7 +383,8 @@ get_item_extents (GnomeCanvasItem *item,
bx1 = by1 = bx2 = by2 = 0.0;
if (GNOME_CANVAS_ITEM_CLASS (G_OBJECT_GET_CLASS (item))->bounds)
- (* GNOME_CANVAS_ITEM_CLASS (G_OBJECT_GET_CLASS (item))->bounds) (item, &bx1, &by1, &bx2, &by2);
+ GNOME_CANVAS_ITEM_CLASS (G_OBJECT_GET_CLASS (item))->bounds (
+ item, &bx1, &by1, &bx2, &by2);
/* Get the item coordinates -> canvas pixel coordinates affine */
diff --git a/libgnomecanvas/gnome-canvas-util.c b/libgnomecanvas/gnome-canvas-util.c
index 3df31e0766..f685cf7846 100644
--- a/libgnomecanvas/gnome-canvas-util.c
+++ b/libgnomecanvas/gnome-canvas-util.c
@@ -24,8 +24,9 @@
*/
/* Miscellaneous utility functions for the GnomeCanvas widget
*
- * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is
- * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
+ * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas
+ * widget. Tk is copyrighted by the Regents of the University of California,
+ * Sun Microsystems, and other parties.
*
*
* Author: Federico Mena <federico@nuclecu.unam.mx>
@@ -135,9 +136,17 @@ gnome_canvas_points_free (GnomeCanvasPoints *points)
* Otherwise, returns TRUE.
**/
gint
-gnome_canvas_get_miter_points (gdouble x1, gdouble y1, gdouble x2, gdouble y2, gdouble x3, gdouble y3,
- gdouble width,
- gdouble *mx1, gdouble *my1, gdouble *mx2, gdouble *my2)
+gnome_canvas_get_miter_points (gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2,
+ gdouble x3,
+ gdouble y3,
+ gdouble width,
+ gdouble *mx1,
+ gdouble *my1,
+ gdouble *mx2,
+ gdouble *my2)
{
gdouble theta1; /* angle of segment p2-p1 */
gdouble theta2; /* angle of segment p2-p3 */
@@ -262,12 +271,12 @@ gnome_canvas_polygon_to_point (gdouble *poly, gint num_points, gdouble x, gdoubl
gdouble *p;
gdouble dx, dy;
- /* Iterate through all the edges in the polygon, updating best and intersections.
- *
- * When computing intersections, include left X coordinate of line within its range, but not
- * Y coordinate. Otherwise if the point lies exactly below a vertex we'll count it as two
+ /* Iterate through all the edges in the polygon, updating best and
* intersections.
- */
+ *
+ * When computing intersections, include left X coordinate of line
+ * within its range, but not Y coordinate. Otherwise if the point
+ * lies exactly below a vertex we'll count it as two intersections. */
best = 1.0e36;
intersections = 0;
@@ -275,10 +284,10 @@ gnome_canvas_polygon_to_point (gdouble *poly, gint num_points, gdouble x, gdoubl
for (i = num_points, p = poly; i > 1; i--, p += 2) {
gdouble px, py, dist;
- /* Compute the point on the current edge closest to the point and update the
- * intersection count. This must be done separately for vertical edges, horizontal
- * edges, and others.
- */
+ /* Compute the point on the current edge closest to the
+ * point and update the intersection count. This must be
+ * done separately for vertical edges, horizontal edges,
+ * and others. */
if (p[2] == p[0]) {
/* Vertical edge */
@@ -361,9 +370,8 @@ gnome_canvas_polygon_to_point (gdouble *poly, gint num_points, gdouble x, gdoubl
best = dist;
}
- /* We've processed all the points. If the number of intersections is odd, the point is
- * inside the polygon.
- */
+ /* We've processed all the points. If the number of
+ * intersections is odd, the point is inside the polygon. */
if (intersections & 0x1)
return 0.0;
@@ -490,7 +498,10 @@ gnome_canvas_update_svp (GnomeCanvas *canvas, ArtSVP **p_svp, ArtSVP *new_svp)
* on what's changed. This function takes responsibility for freeing new_svp.
**/
void
-gnome_canvas_update_svp_clip (GnomeCanvas *canvas, ArtSVP **p_svp, ArtSVP *new_svp, ArtSVP *clip_svp)
+gnome_canvas_update_svp_clip (GnomeCanvas *canvas,
+ ArtSVP **p_svp,
+ ArtSVP *new_svp,
+ ArtSVP *clip_svp)
{
ArtSVP *clipped_svp;
@@ -558,8 +569,10 @@ gnome_canvas_item_update_svp (GnomeCanvasItem *item, ArtSVP **p_svp, ArtSVP *new
* on what's changed. This function takes responsibility for freeing new_svp.
**/
void
-gnome_canvas_item_update_svp_clip (GnomeCanvasItem *item, ArtSVP **p_svp, ArtSVP *new_svp,
- ArtSVP *clip_svp)
+gnome_canvas_item_update_svp_clip (GnomeCanvasItem *item,
+ ArtSVP **p_svp,
+ ArtSVP *new_svp,
+ ArtSVP *clip_svp)
{
ArtSVP *clipped_svp;
diff --git a/libgnomecanvas/gnome-canvas-widget.c b/libgnomecanvas/gnome-canvas-widget.c
index 5c59f50b58..23b687f899 100644
--- a/libgnomecanvas/gnome-canvas-widget.c
+++ b/libgnomecanvas/gnome-canvas-widget.c
@@ -24,8 +24,9 @@
*/
/* Widget item type for GnomeCanvas widget
*
- * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is
- * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
+ * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas
+ * widget. Tk is copyrighted by the Regents of the University of California,
+ * Sun Microsystems, and other parties.
*
*
* Author: Federico Mena <federico@nuclecu.unam.mx>
@@ -58,17 +59,30 @@ static void gnome_canvas_widget_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec);
-static void gnome_canvas_widget_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags);
-static gdouble gnome_canvas_widget_point (GnomeCanvasItem *item, gdouble x, gdouble y,
- gint cx, gint cy, GnomeCanvasItem **actual_item);
-static void gnome_canvas_widget_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2);
-
-static void gnome_canvas_widget_render (GnomeCanvasItem *item,
- GnomeCanvasBuf *buf);
-static void gnome_canvas_widget_draw (GnomeCanvasItem *item,
- GdkDrawable *drawable,
- gint x, gint y,
- gint width, gint height);
+static void gnome_canvas_widget_update (GnomeCanvasItem *item,
+ gdouble *affine,
+ ArtSVP *clip_path,
+ gint flags);
+static gdouble gnome_canvas_widget_point (GnomeCanvasItem *item,
+ gdouble x,
+ gdouble y,
+ gint cx,
+ gint cy,
+ GnomeCanvasItem **actual_item);
+static void gnome_canvas_widget_bounds (GnomeCanvasItem *item,
+ gdouble *x1,
+ gdouble *y1,
+ gdouble *x2,
+ gdouble *y2);
+
+static void gnome_canvas_widget_render (GnomeCanvasItem *item,
+ GnomeCanvasBuf *buf);
+static void gnome_canvas_widget_draw (GnomeCanvasItem *item,
+ GdkDrawable *drawable,
+ gint x,
+ gint y,
+ gint width,
+ gint height);
static GnomeCanvasItemClass *parent_class;
@@ -438,7 +452,10 @@ gnome_canvas_widget_get_property (GObject *object,
}
static void
-gnome_canvas_widget_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
+gnome_canvas_widget_update (GnomeCanvasItem *item,
+ gdouble *affine,
+ ArtSVP *clip_path,
+ gint flags)
{
GnomeCanvasWidget *witem;
@@ -538,7 +555,11 @@ gnome_canvas_widget_point (GnomeCanvasItem *item, gdouble x, gdouble y,
}
static void
-gnome_canvas_widget_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2)
+gnome_canvas_widget_bounds (GnomeCanvasItem *item,
+ gdouble *x1,
+ gdouble *y1,
+ gdouble *x2,
+ gdouble *y2)
{
GnomeCanvasWidget *witem;
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index d4c4e523f3..c9493c8d1b 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -181,8 +181,10 @@ real_flush_updates (gpointer o, gpointer event_data, gpointer data)
/* indicate that the folder has changed (new mail received, etc) */
if (up->uri) {
- g_signal_emit (self, signals[FOLDER_CHANGED], 0, up->store,
- up->uri, up->full_name, up->new, up->msg_uid, up->msg_sender, up->msg_subject);
+ g_signal_emit (
+ self, signals[FOLDER_CHANGED], 0, up->store,
+ up->uri, up->full_name, up->new, up->msg_uid,
+ up->msg_sender, up->msg_subject);
}
if (CAMEL_IS_VEE_STORE (up->store) && !up->remove) {
@@ -239,7 +241,13 @@ flush_updates (MailFolderCache *self)
* it's correct. */
static void
-update_1folder(MailFolderCache *self, struct _folder_info *mfi, gint new, const gchar *msg_uid, const gchar *msg_sender, const gchar *msg_subject, CamelFolderInfo *info)
+update_1folder (MailFolderCache *self,
+ struct _folder_info *mfi,
+ gint new,
+ const gchar *msg_uid,
+ const gchar *msg_sender,
+ const gchar *msg_subject,
+ CamelFolderInfo *info)
{
struct _folder_update *up;
CamelFolder *folder;
@@ -252,9 +260,12 @@ update_1folder(MailFolderCache *self, struct _folder_info *mfi, gint new, const
d(printf("update 1 folder '%s'\n", folder->full_name));
if ((self->priv->count_trash && (CAMEL_IS_VTRASH_FOLDER (folder)))
- || (is_drafts = em_utils_folder_is_drafts (folder, info ? info->uri : NULL))
- || (is_outbox = em_utils_folder_is_outbox (folder, info ? info->uri : NULL))
- || (self->priv->count_sent && em_utils_folder_is_sent (folder, info ? info->uri : NULL))) {
+ || (is_drafts = em_utils_folder_is_drafts (
+ folder, info ? info->uri : NULL))
+ || (is_outbox = em_utils_folder_is_outbox (
+ folder, info ? info->uri : NULL))
+ || (self->priv->count_sent && em_utils_folder_is_sent (
+ folder, info ? info->uri : NULL))) {
d(printf(" total count\n"));
unread = camel_folder_get_message_count (folder);
if (is_drafts || is_outbox) {
@@ -323,7 +334,8 @@ folder_changed_cb (CamelFolder *folder,
last_newmail_per_folder = g_hash_table_new (g_direct_hash, g_direct_equal);
/* it's fine to hash them by folder pointer here */
- latest_received = GPOINTER_TO_INT (g_hash_table_lookup (last_newmail_per_folder, folder));
+ latest_received = GPOINTER_TO_INT (
+ g_hash_table_lookup (last_newmail_per_folder, folder));
local_drafts = e_mail_local_get_folder (E_MAIL_FOLDER_DRAFTS);
local_outbox = e_mail_local_get_folder (E_MAIL_FOLDER_OUTBOX);
@@ -366,7 +378,9 @@ folder_changed_cb (CamelFolder *folder,
}
if (new > 0)
- g_hash_table_insert (last_newmail_per_folder, folder, GINT_TO_POINTER (latest_received));
+ g_hash_table_insert (
+ last_newmail_per_folder, folder,
+ GINT_TO_POINTER (latest_received));
g_mutex_lock (self->priv->stores_mutex);
if (self->priv->stores != NULL
@@ -383,7 +397,10 @@ folder_changed_cb (CamelFolder *folder,
}
static void
-unset_folder_info(MailFolderCache *self, struct _folder_info *mfi, gint delete, gint unsub)
+unset_folder_info (MailFolderCache *self,
+ struct _folder_info *mfi,
+ gint delete,
+ gint unsub)
{
struct _folder_update *up;
@@ -561,7 +578,11 @@ folder_to_url(CamelStore *store, const gchar *full_name)
}
static void
-rename_folders(MailFolderCache *self, struct _store_info *si, const gchar *oldbase, const gchar *newbase, CamelFolderInfo *fi)
+rename_folders (MailFolderCache *self,
+ struct _store_info *si,
+ const gchar *oldbase,
+ const gchar *newbase,
+ CamelFolderInfo *fi)
{
gchar *old, *olduri, *oldfile, *newuri, *newfile;
struct _folder_info *mfi;
@@ -772,10 +793,12 @@ ping_store_exec (struct _ping_store_msg *m)
if (CAMEL_SERVICE (m->store)->status == CAMEL_SERVICE_CONNECTED) {
if (CAMEL_IS_DISCO_STORE (m->store) &&
- camel_disco_store_status (CAMEL_DISCO_STORE (m->store)) != CAMEL_DISCO_STORE_OFFLINE)
+ camel_disco_store_status (
+ CAMEL_DISCO_STORE (m->store)) !=CAMEL_DISCO_STORE_OFFLINE)
online = TRUE;
else if (CAMEL_IS_OFFLINE_STORE (m->store) &&
- CAMEL_OFFLINE_STORE (m->store)->state != CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
+ CAMEL_OFFLINE_STORE (m->store)->state !=
+ CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
online = TRUE;
}
if (online)
@@ -854,7 +877,8 @@ storeinfo_find_folder_info (CamelStore *store,
struct _find_info *fi)
{
if (fi->fi == NULL) {
- if (((CamelService *)store)->provider->url_equal(fi->url, ((CamelService *)store)->url)) {
+ if (((CamelService *)store)->provider->url_equal (
+ fi->url, ((CamelService *)store)->url)) {
gchar *path = fi->url->fragment?fi->url->fragment:fi->url->path;
if (path[0] == '/')
@@ -1077,12 +1101,13 @@ mail_folder_cache_note_store (MailFolderCache *self,
si = g_hash_table_lookup (self->priv->stores, store);
if (si == NULL) {
- d(printf("Noting a new store: %p: %s\n", store, camel_url_to_string(((CamelService *)store)->url, 0)));
-
si = g_malloc0(sizeof(*si));
si->folders = g_hash_table_new(g_str_hash, g_str_equal);
- si->folders_uri = g_hash_table_new(CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->hash_folder_name,
- CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name);
+ si->folders_uri = g_hash_table_new (
+ CAMEL_STORE_CLASS (
+ CAMEL_OBJECT_GET_CLASS(store))->hash_folder_name,
+ CAMEL_STORE_CLASS (
+ CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name);
si->store = g_object_ref (store);
g_hash_table_insert(self->priv->stores, store, si);
g_queue_init (&si->folderinfo_updates);
@@ -1095,18 +1120,22 @@ mail_folder_cache_note_store (MailFolderCache *self,
ud->cancel = 0;
ud->cache = self;
- /* We might get a race when setting up a store, such that it is still left in offline mode,
- after we've gone online. This catches and fixes it up when the shell opens us */
+ /* We might get a race when setting up a store, such that it is
+ * still left in offline mode, after we've gone online. This
+ * catches and fixes it up when the shell opens us. */
if (CAMEL_IS_DISCO_STORE (store)) {
- if (camel_session_get_online (session)
- && camel_disco_store_status (CAMEL_DISCO_STORE (store)) == CAMEL_DISCO_STORE_OFFLINE) {
+ if (camel_session_get_online (session) &&
+ camel_disco_store_status (CAMEL_DISCO_STORE (store)) ==
+ CAMEL_DISCO_STORE_OFFLINE) {
/* Note: we use the 'id' here, even though its not the right id, its still ok */
ud->id = mail_store_set_offline (store, FALSE, store_online_cb, ud);
} else {
goto normal_setup;
}
} else if (CAMEL_IS_OFFLINE_STORE (store)) {
- if (camel_session_get_online (session) && CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
+ if (camel_session_get_online (session) &&
+ CAMEL_OFFLINE_STORE (store)->state ==
+ CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
/* Note: we use the 'id' here, even though its not the right id, its still ok */
ud->id = mail_store_set_offline (store, FALSE, store_online_cb, ud);
} else {
@@ -1121,7 +1150,8 @@ mail_folder_cache_note_store (MailFolderCache *self,
g_mutex_unlock (self->priv->stores_mutex);
- /* there is potential for race here, but it is safe as we check for the store anyway */
+ /* there is potential for race here, but it is safe as we check
+ * for the store anyway */
if (hook) {
g_signal_connect (
store, "folder-opened",
@@ -1316,7 +1346,9 @@ mail_folder_cache_get_folder_info_flags (MailFolderCache *self,
/* Returns whether folder 'folder' has children based on folder_info->child property.
If not found returns FALSE and sets 'found' to FALSE, if not NULL. */
gboolean
-mail_folder_cache_get_folder_has_children (MailFolderCache *self, CamelFolder *folder, gboolean *found)
+mail_folder_cache_get_folder_has_children (MailFolderCache *self,
+ CamelFolder *folder,
+ gboolean *found)
{
gchar *uri = mail_tools_folder_to_url (folder);
struct _find_info fi = { uri, NULL, NULL };
diff --git a/mail/mail-session.c b/mail/mail-session.c
index e2da6389f1..1ccb87cbca 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -853,7 +853,7 @@ mail_session_check_junk_notify (GConfClient *gconf, guint id, GConfEntry *entry,
key = strrchr (gconf_entry_get_key (entry), '/');
if (key) {
- key ++;
+ key++;
if (!strcmp (key, "check_incoming"))
camel_session_set_check_junk (session, gconf_value_get_bool (gconf_entry_get_value (entry)));
}
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 22dfb54e22..25eaac5f44 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -74,7 +74,9 @@ is_local_provider (CamelStore *store)
}
CamelFolder *
-mail_tool_get_trash (const gchar *url, gint connect, GError **error)
+mail_tool_get_trash (const gchar *url,
+ gint connect,
+ GError **error)
{
CamelStore *store;
CamelFolder *trash;
@@ -88,7 +90,9 @@ mail_tool_get_trash (const gchar *url, gint connect, GError **error)
if (!store)
return NULL;
- if (connect || ((CamelService *) store)->status == CAMEL_SERVICE_CONNECTED || is_local_provider (store))
+ if (connect ||
+ (CAMEL_SERVICE (store)->status == CAMEL_SERVICE_CONNECTED ||
+ is_local_provider (store)))
trash = camel_store_get_trash (store, error);
else
trash = NULL;
@@ -101,7 +105,8 @@ mail_tool_get_trash (const gchar *url, gint connect, GError **error)
#ifndef G_OS_WIN32
static gchar *
-mail_tool_get_local_movemail_path (const guchar *uri, GError **error)
+mail_tool_get_local_movemail_path (const guchar *uri,
+ GError **error)
{
guchar *safe_uri, *c;
const gchar *data_dir;
@@ -244,10 +249,15 @@ mail_tool_remove_xevolution_headers (CamelMimeMessage *message)
}
void
-mail_tool_restore_xevolution_headers (CamelMimeMessage *message, struct _camel_header_raw *xev)
+mail_tool_restore_xevolution_headers (CamelMimeMessage *message,
+ struct _camel_header_raw *xev)
{
+ CamelMedium *medium;
+
+ medium = CAMEL_MEDIUM (message);
+
for (;xev;xev=xev->next)
- camel_medium_add_header((CamelMedium *)message, xev->name, xev->value);
+ camel_medium_add_header (medium, xev->name, xev->value);
}
CamelMimePart *
@@ -397,6 +407,7 @@ mail_tools_x_evolution_message_parse (gchar *in, guint inlen, GPtrArray **uids)
gchar *
mail_tools_folder_to_url (CamelFolder *folder)
{
+ CamelService *service;
CamelStore *parent_store;
const gchar *full_name;
CamelURL *url;
@@ -406,9 +417,10 @@ mail_tools_folder_to_url (CamelFolder *folder)
full_name = camel_folder_get_full_name (folder);
parent_store = camel_folder_get_parent_store (folder);
+ service = CAMEL_SERVICE (parent_store);
- url = camel_url_copy(((CamelService *)parent_store)->url);
- if (((CamelService *)parent_store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
+ url = camel_url_copy (service->url);
+ if (service->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
camel_url_set_fragment(url, full_name);
} else {
gchar *name = g_alloca(strlen(full_name)+2);
diff --git a/mail/message-list.c b/mail/message-list.c
index 5388163307..969412de4b 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -526,7 +526,7 @@ ml_search_forward(MessageList *ml, gint start, gint end, guint32 flags, guint32
etta = e_tree_get_table_adapter (E_TREE (ml));
- for (row = start; row <= end; row ++) {
+ for (row = start; row <= end; row++) {
path = e_tree_table_adapter_node_at_row(etta, row);
if (path
&& (info = get_message_info(ml, path))
@@ -547,7 +547,7 @@ ml_search_backward(MessageList *ml, gint start, gint end, guint32 flags, guint32
etta = e_tree_get_table_adapter (E_TREE (ml));
- for (row = start; row >= end; row --) {
+ for (row = start; row >= end; row--) {
path = e_tree_table_adapter_node_at_row(etta, row);
if (path
&& (info = get_message_info(ml, path))
@@ -3002,7 +3002,7 @@ find_next_selectable (MessageList *ml)
info = get_message_info (ml, node);
if (info && is_node_selectable (ml, info))
return g_strdup (camel_message_info_uid (info));
- vrow ++;
+ vrow++;
}
/* We didn't find any undeleted entries _below_ the currently selected one
@@ -3014,7 +3014,7 @@ find_next_selectable (MessageList *ml)
info = get_message_info (ml, node);
if (info && is_node_selectable (ml, info))
return g_strdup (camel_message_info_uid (info));
- vrow --;
+ vrow--;
}
return NULL;
diff --git a/modules/addressbook/openldap-extract.h b/modules/addressbook/openldap-extract.h
index 1c1fcf3d6b..67d5741ce9 100644
--- a/modules/addressbook/openldap-extract.h
+++ b/modules/addressbook/openldap-extract.h
@@ -768,8 +768,8 @@ 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) ) {
+ 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;
}
@@ -784,8 +784,8 @@ 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;
}
@@ -1007,7 +1007,7 @@ ldap_pvt_hex_unescape( gchar *s )
*/
gchar *p;
- for ( p = s; *s != '\0'; ++s ) {
+ for (p = s; *s != '\0'; ++s) {
if (*s == '%') {
if (*++s == '\0') {
break;
@@ -1040,7 +1040,7 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr )
}
i = 1;
- for ( s = str; *s; s++ ) {
+ for (s = str; *s; s++) {
if (ldap_utf8_strchr( brkstr, s ) != NULL) {
i++;
}
@@ -1055,14 +1055,14 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr )
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 ) )
{
res[i] = LDAP_STRDUP( s );
if (res[i] == NULL) {
- for ( --i; i >= 0; i-- ) {
+ for (--i; i >= 0; i--) {
LDAP_FREE( res[i] );
}
LDAP_FREE( res );
@@ -1381,7 +1381,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
return LDAP_URL_ERR_BADEXTS;
}
- for ( i=0; ludp->lud_exts[i] != NULL; i++ ) {
+ for (i=0; ludp->lud_exts[i] != NULL; i++) {
ldap_pvt_hex_unescape( ludp->lud_exts[i] );
if (*ludp->lud_exts[i] == '!') {
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 4299c07746..b8b7f4b03e 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -189,8 +189,10 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_shell_sidebar,
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_window = e_shell_view_get_shell_window (shell_view);
- if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
- g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
+ if (g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
+ g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
e_auth_cal_forget_password (client);
/* Handle errors. */
@@ -242,8 +244,10 @@ cal_shell_sidebar_default_opened_cb (ECalShellSidebar *cal_shell_sidebar,
shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
- g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
+ if (g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
+ g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
e_auth_cal_forget_password (client);
/* Handle errors. */
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c
index 75245c2d87..c0001d19af 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -183,8 +183,10 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_window = e_shell_view_get_shell_window (shell_view);
- if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
- g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
+ if (g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
+ g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
e_auth_cal_forget_password (client);
/* Handle errors. */
@@ -236,8 +238,10 @@ memo_shell_sidebar_default_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
shell_sidebar = E_SHELL_SIDEBAR (memo_shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
- g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
+ if (g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
+ g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
e_auth_cal_forget_password (client);
/* Handle errors. */
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c
index ef379d472f..4f870ec19a 100644
--- a/modules/calendar/e-task-shell-sidebar.c
+++ b/modules/calendar/e-task-shell-sidebar.c
@@ -183,8 +183,10 @@ task_shell_sidebar_client_opened_cb (ETaskShellSidebar *task_shell_sidebar,
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_window = e_shell_view_get_shell_window (shell_view);
- if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
- g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
+ if (g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
+ g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
e_auth_cal_forget_password (client);
/* Handle errors. */
@@ -236,8 +238,10 @@ task_shell_sidebar_default_opened_cb (ETaskShellSidebar *task_shell_sidebar,
shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- if (g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
- g_error_matches (error, E_CALENDAR_ERROR, E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
+ if (g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
+ g_error_matches (error, E_CALENDAR_ERROR,
+ E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED))
e_auth_cal_forget_password (client);
/* Handle errors. */
diff --git a/plugins/audio-inline/audio-inline.c b/plugins/audio-inline/audio-inline.c
index 802490ab0e..46f345974f 100644
--- a/plugins/audio-inline/audio-inline.c
+++ b/plugins/audio-inline/audio-inline.c
@@ -295,7 +295,7 @@ org_gnome_audio_inline_format (gpointer ep, EMFormatHookTarget *t)
struct _org_gnome_audio_inline_pobject *pobj;
gchar *classid = g_strdup_printf ("org-gnome-audio-inline-button-panel-%d", org_gnome_audio_class_id_counter);
- org_gnome_audio_class_id_counter ++;
+ org_gnome_audio_class_id_counter++;
d(printf ("audio inline formatter: format classid %s\n", classid));
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index 608a981a46..d09c97b248 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -122,16 +122,15 @@ typedef struct {
gint current_item;
} DbxImporter;
-
-static unsigned char oe56_mbox_sig[16] = {
+static guchar oe56_mbox_sig[16] = {
0xcf, 0xad, 0x12, 0xfe, 0xc5, 0xfd, 0x74, 0x6f,
0x66, 0xe3, 0xd1, 0x11, 0x9a, 0x4e, 0x00, 0xc0
};
-static unsigned char oe56_flist_sig[16] = {
+static guchar oe56_flist_sig[16] = {
0xcf, 0xad, 0x12, 0xfe, 0xc6, 0xfd, 0x74, 0x6f,
0x66, 0xe3, 0xd1, 0x11, 0x9a, 0x4e, 0x00, 0xc0
};
-static unsigned char oe4_mbox_sig[8] = {
+static guchar oe4_mbox_sig[8] = {
0x4a, 0x4d, 0x46, 0x36, 0x03, 0x00, 0x01, 0x00
};
@@ -174,7 +173,7 @@ org_gnome_evolution_readdbx_supported (EPlugin *epl, EImportTarget *target)
}
}
close (fd);
- }
+ }
return ret;
}
@@ -258,10 +257,10 @@ struct _dbx_tableindexstruct {
guint32 unknown1;
guint32 anotherTablePtr;
guint32 parent;
- char unknown2;
- char ptrCount;
- char reserve3;
- char reserve4;
+ gchar unknown2;
+ gchar ptrCount;
+ gchar reserve3;
+ gchar reserve4;
guint32 indexCount;
};
@@ -274,26 +273,24 @@ struct _dbx_indexstruct {
#define INDEX_POINTER 0xE4
#define ITEM_COUNT 0xC4
-
struct _dbx_email_headerstruct {
guint32 self;
guint32 size;
- unsigned short int u1;
- unsigned char count;
- unsigned char u2;
+ gushort u1;
+ guchar count;
+ guchar u2;
};
-
struct _dbx_block_hdrstruct {
guint32 self;
guint32 nextaddressoffset;
- unsigned short blocksize;
- unsigned char intcount;
- unsigned char unknown1;
+ gushort blocksize;
+ guchar intcount;
+ guchar unknown1;
guint32 nextaddress;
};
-static int dbx_pread(gint fd, void *buf, guint32 count, guint32 offset)
+static gint dbx_pread(gint fd, gpointer buf, guint32 count, guint32 offset)
{
if (lseek(fd, offset, SEEK_SET) != offset)
return -1;
@@ -332,7 +329,7 @@ static gboolean dbx_load_index_table(DbxImporter *m, guint32 pos, guint32 *index
if (!dbx_load_index_table(m, tindex.anotherTablePtr, index_ofs))
return FALSE;
}
-
+
d(printf("Index at %x has ptrCount %d\n", pos, tindex.ptrCount));
pos += sizeof(tindex);
@@ -348,7 +345,7 @@ static gboolean dbx_load_index_table(DbxImporter *m, guint32 pos, guint32 *index
index.indexptr = GUINT32_FROM_LE(index.indexptr);
index.anotherTablePtr = GUINT32_FROM_LE(index.anotherTablePtr);
index.indexCount = GUINT32_FROM_LE(index.indexCount);
-
+
if (*index_ofs == m->index_count) {
g_set_error (
&m->base.error,
@@ -477,7 +474,7 @@ dbx_read_email (DbxImporter *m, guint32 offset, gint bodyfd, gint *flags)
struct _dbx_email_headerstruct hdr;
guchar *buffer;
guint32 dataptr = 0;
- int i;
+ gint i;
if (dbx_pread(m->dbx_fd, &hdr, sizeof(hdr), offset) != sizeof(hdr)) {
g_set_error (
@@ -511,7 +508,7 @@ dbx_read_email (DbxImporter *m, guint32 offset, gint bodyfd, gint *flags)
guchar type = buffer[i*4];
gint val = buffer[i*4 + 1] + (buffer[i*4 + 2] << 8) + (buffer[i*4 + 3] << 16);
- switch(type) {
+ switch (type) {
case 0x01:
*flags = buffer[hdr.count*4 + val];
d(printf("Got type 0x01 flags %02x\n", *flags));
@@ -594,7 +591,7 @@ dbx_import_file (DbxImporter *m)
camel_operation_progress(NULL, 100 * i / m->index_count);
camel_operation_progress(m->status, 100 * i / m->index_count);
-
+
if (!dbx_read_email(m, m->indices[i], tmpfile, &dbx_flags)) {
d(printf("Cannot read email index %d at %x\n",
i, m->indices[i]));
diff --git a/plugins/groupwise-features/camel-gw-listener.c b/plugins/groupwise-features/camel-gw-listener.c
index 17d904b549..3539d253cd 100644
--- a/plugins/groupwise-features/camel-gw-listener.c
+++ b/plugins/groupwise-features/camel-gw-listener.c
@@ -107,7 +107,7 @@ finalize (GObject *object)
g_free (config_listener->priv);
}
- for ( list = g_list_first (groupwise_accounts); list; list = g_list_next (list) ) {
+ for (list = g_list_first (groupwise_accounts); list; list = g_list_next (list)) {
info = (GwAccountInfo *) (list->data);
@@ -494,7 +494,7 @@ get_addressbook_names_from_server (gchar *source_url)
cnc = NULL;
do {
- count ++;
+ count++;
/*we have to uncache the password before prompting again*/
if (failed_auth) {
e_passwords_forget_password ("Groupwise", key);
@@ -986,7 +986,7 @@ camel_gw_listener_construct (CamelGwListener *config_listener)
config_listener->priv->account_list = e_account_list_new (config_listener->priv->gconf_client);
- for ( iter = e_list_get_iterator (E_LIST ( config_listener->priv->account_list) ); e_iterator_is_valid (iter); e_iterator_next (iter) ) {
+ for (iter = e_list_get_iterator (E_LIST ( config_listener->priv->account_list) ); e_iterator_is_valid (iter); e_iterator_next (iter)) {
account = E_ACCOUNT (e_iterator_get (iter));
diff --git a/plugins/publish-calendar/publish-location.c b/plugins/publish-calendar/publish-location.c
index 98a8247725..d22bc4fa47 100644
--- a/plugins/publish-calendar/publish-location.c
+++ b/plugins/publish-calendar/publish-location.c
@@ -40,7 +40,9 @@ migrateURI (const gchar *xml, xmlDocPtr doc)
EUri *euri;
client = gconf_client_get_default ();
- uris = gconf_client_get_list (client, "/apps/evolution/calendar/publish/uris", GCONF_VALUE_STRING, NULL);
+ uris = gconf_client_get_list (
+ client, "/apps/evolution/calendar/publish/uris",
+ GCONF_VALUE_STRING, NULL);
l = uris;
while (l && l->data) {
gchar *str = l->data;
@@ -100,7 +102,9 @@ migrateURI (const gchar *xml, xmlDocPtr doc)
uri->events = events;
uris = g_slist_prepend (uris, e_publish_uri_to_xml (uri));
- gconf_client_set_list (client, "/apps/evolution/calendar/publish/uris", GCONF_VALUE_STRING, uris, NULL);
+ gconf_client_set_list (
+ client, "/apps/evolution/calendar/publish/uris",
+ GCONF_VALUE_STRING, uris, NULL);
g_slist_foreach (uris, (GFunc) g_free, NULL);
g_slist_free (uris);
g_object_unref (client);
@@ -236,7 +240,8 @@ e_publish_uri_to_xml (EPublishUri *uri)
else
xmlSetProp (root, (xmlChar *)"fb_duration_type", (xmlChar *)"weeks");
- for (calendars = uri->events; calendars != NULL; calendars = g_slist_next (calendars)) {
+ for (calendars = uri->events; calendars != NULL;
+ calendars = g_slist_next (calendars)) {
xmlNodePtr node;
node = xmlNewChild (root, NULL, (const guchar *)"event", NULL);
xmlSetProp (node, (const guchar *)"uid", calendars->data);
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index edfb896107..9918fa0967 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -368,7 +368,7 @@ em_junk_sa_run_spamd (const gchar *binary)
time_req.tv_sec = 0;
time_req.tv_nsec = 50000000;
- for (i = 0; i < 100; i ++) {
+ for (i = 0; i < 100; i++) {
if (stat (em_junk_sa_get_socket_path (), &stat_buf) == 0) {
d(fprintf (stderr, "socket created\n"));
break;
@@ -395,7 +395,7 @@ em_junk_sa_start_own_daemon ()
em_junk_sa_socket_path = e_mktemp ("spamd-socket-path-XXXXXX");
em_junk_sa_spamd_pidfile = e_mktemp ("spamd-pid-file-XXXXXX");
- for (b = 0; em_junk_sa_spamd_binaries [b]; b ++) {
+ for (b = 0; em_junk_sa_spamd_binaries [b]; b++) {
em_junk_sa_use_spamc = em_junk_sa_run_spamd (em_junk_sa_spamd_binaries [b]);
if (em_junk_sa_use_spamc) {
em_junk_sa_new_daemon_started = TRUE;
@@ -411,7 +411,7 @@ em_junk_sa_find_spamc ()
gint b;
em_junk_sa_use_spamc = FALSE;
- for (b = 0; em_junk_sa_spamc_binaries [b]; b ++) {
+ for (b = 0; em_junk_sa_spamc_binaries [b]; b++) {
em_junk_sa_spamc_binary = em_junk_sa_spamc_binaries [b];
if (em_junk_sa_test_spamd_running (em_junk_sa_spamc_binary, FALSE)) {
em_junk_sa_use_spamc = TRUE;
@@ -456,7 +456,7 @@ em_junk_sa_test_spamd (void)
/* try to use sytem spamd first */
if (try_system_spamd) {
- for (b = 0; em_junk_sa_spamc_binaries [b]; b ++) {
+ for (b = 0; em_junk_sa_spamc_binaries [b]; b++) {
em_junk_sa_spamc_binary = em_junk_sa_spamc_binaries [b];
if (em_junk_sa_test_spamd_running (em_junk_sa_spamc_binary, TRUE)) {
em_junk_sa_use_spamc = TRUE;
@@ -468,7 +468,7 @@ em_junk_sa_test_spamd (void)
/* if there's no system spamd running, try to use user one with user specified socket */
if (!em_junk_sa_use_spamc && em_junk_sa_preferred_socket_path) {
- for (b = 0; em_junk_sa_spamc_binaries [b]; b ++) {
+ for (b = 0; em_junk_sa_spamc_binaries [b]; b++) {
em_junk_sa_spamc_binary = em_junk_sa_spamc_binaries [b];
if (em_junk_sa_test_spamd_running (em_junk_sa_spamc_binary, FALSE)) {
em_junk_sa_use_spamc = TRUE;
@@ -532,7 +532,7 @@ em_junk_sa_check_respawn_too_fast ()
rv = FALSE;
em_junk_sa_spamd_restarts [em_junk_sa_spamd_restarts_count % SPAMD_RESTARTS_SIZE] = time_now;
- em_junk_sa_spamd_restarts_count ++;
+ em_junk_sa_spamd_restarts_count++;
G_UNLOCK (spamd_restart);
diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c
index f0149386b5..0568c85b18 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -164,7 +164,7 @@ shell_switcher_layout_actions (EShellSwitcher *switcher)
y -= V_PADDING;
}
- for (i = 0; i <= row_last; i ++)
+ for (i = 0; i <= row_last; i++)
g_list_free (rows [i]);
g_free (rows);
diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c
index e81d6d4d60..2e23df2c4a 100644
--- a/smime/lib/e-cert-db.c
+++ b/smime/lib/e-cert-db.c
@@ -511,7 +511,7 @@ install_loadable_roots (void)
"/opt/mozilla/lib/mozilla"
};
- for (i = 0; i < G_N_ELEMENTS (paths_to_check); i ++) {
+ for (i = 0; i < G_N_ELEMENTS (paths_to_check); i++) {
gchar *dll_path = g_module_build_path (paths_to_check [i], "nssckbi");
if (g_file_test (dll_path, G_FILE_TEST_EXISTS)) {
@@ -1109,7 +1109,7 @@ e_cert_db_import_email_cert (ECertDB *certdb,
goto loser;
}
- for ( i = 0; i < numcerts; i++ ) {
+ for (i = 0; i < numcerts; i++) {
rawCerts[i] = &certCollection->rawCerts[i];
}
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c
index e2b97c4771..296b634e28 100644
--- a/widgets/menus/gal-view-collection.c
+++ b/widgets/menus/gal-view-collection.c
@@ -443,11 +443,11 @@ load_single_dir (GalViewCollection *collection,
if (item->filename && *item->filename) {
collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
- collection->view_count ++;
+ collection->view_count++;
} else {
collection->removed_view_data = g_renew(GalViewCollectionItem *, collection->removed_view_data, collection->removed_view_count + 1);
collection->removed_view_data[collection->removed_view_count] = item;
- collection->removed_view_count ++;
+ collection->removed_view_count++;
}
}
g_free(id);
@@ -665,7 +665,7 @@ gal_view_collection_append (GalViewCollection *collection,
collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
- collection->view_count ++;
+ collection->view_count++;
gal_view_collection_changed(collection);
}
@@ -682,14 +682,14 @@ gal_view_collection_delete_view (GalViewCollection *collection,
item = collection->view_data[i];
memmove(collection->view_data + i, collection->view_data + i + 1, (collection->view_count - i - 1) * sizeof(GalViewCollectionItem *));
- collection->view_count --;
+ collection->view_count--;
if (item->built_in) {
g_free(item->filename);
item->filename = NULL;
collection->removed_view_data = g_renew(GalViewCollectionItem *, collection->removed_view_data, collection->removed_view_count + 1);
collection->removed_view_data[collection->removed_view_count] = item;
- collection->removed_view_count ++;
+ collection->removed_view_count++;
} else {
gal_view_collection_item_free (item);
}
@@ -727,7 +727,7 @@ gal_view_collection_copy_view (GalViewCollection *collection,
collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
- collection->view_count ++;
+ collection->view_count++;
gal_view_collection_changed(collection);
}
@@ -770,7 +770,7 @@ gal_view_collection_append_with_title (GalViewCollection *collection, const gcha
collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
- collection->view_count ++;
+ collection->view_count++;
gal_view_collection_changed(collection);
return item->id;
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index 5fc939939b..55f8a7d526 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -285,7 +285,7 @@ e_canvas_vbox_resize_children (GnomeCanvasItem *item)
ECanvasVbox *e_canvas_vbox;
e_canvas_vbox = E_CANVAS_VBOX (item);
- for ( list = e_canvas_vbox->items; list; list = list->next ) {
+ for (list = e_canvas_vbox->items; list; list = list->next) {
GnomeCanvasItem *child = GNOME_CANVAS_ITEM(list->data);
gnome_canvas_item_set(child,
"width", (gdouble) e_canvas_vbox->minimum_width,
diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c
index 3dc47e99c3..796b528e46 100644
--- a/widgets/misc/e-selection-model-array.c
+++ b/widgets/misc/e-selection-model-array.c
@@ -148,9 +148,9 @@ e_selection_model_array_move_row(ESelectionModelArray *esma, gint old_row, gint
new_row_sorted = es_row_model_to_sorted (esma, new_row);
if (old_row_sorted < esma->cursor_row_sorted && esma->cursor_row_sorted < new_row_sorted)
- esma->cursor_row_sorted --;
+ esma->cursor_row_sorted--;
else if (new_row_sorted < esma->cursor_row_sorted && esma->cursor_row_sorted < old_row_sorted)
- esma->cursor_row_sorted ++;
+ esma->cursor_row_sorted++;
e_bit_array_move_row(esma->eba, old_row, new_row);
diff --git a/widgets/misc/test-preferences-window.c b/widgets/misc/test-preferences-window.c
index c5291cf755..dec6b85cb5 100644
--- a/widgets/misc/test-preferences-window.c
+++ b/widgets/misc/test-preferences-window.c
@@ -30,7 +30,7 @@ add_pages (EPreferencesWindow *preferences_window)
{
gint i;
- for (i = 0; i < NUM_PAGES; i ++) {
+ for (i = 0; i < NUM_PAGES; i++) {
GtkWidget *widget;
gchar *caption;
gchar *page_name;
diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c
index 53d1b79934..67c3117b6b 100644
--- a/widgets/table/e-cell-hbox.c
+++ b/widgets/table/e-cell-hbox.c
@@ -307,7 +307,7 @@ e_cell_hbox_new (void)
void
e_cell_hbox_append (ECellHbox *hbox, ECell *subcell, gint model_col, gint size)
{
- hbox->subcell_count ++;
+ hbox->subcell_count++;
hbox->subcells = g_renew (ECell *, hbox->subcells, hbox->subcell_count);
hbox->model_cols = g_renew (int, hbox->model_cols, hbox->subcell_count);
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index b5506af13b..781579da24 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -356,7 +356,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
rect.y + rect.height);
}
parent_node = e_tree_model_node_get_parent (tree_model, parent_node);
- depth --;
+ depth--;
offset -= INDENT_AMOUNT;
}
}
@@ -761,7 +761,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
offset - INDENT_AMOUNT / 2, 0);
}
node = e_tree_model_node_get_parent (tree_model, node);
- depth --;
+ depth--;
offset -= INDENT_AMOUNT;
}
}
diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c
index 767d4d1c4f..af3ac2e181 100644
--- a/widgets/table/e-cell-vbox.c
+++ b/widgets/table/e-cell-vbox.c
@@ -299,7 +299,7 @@ e_cell_vbox_new (void)
void
e_cell_vbox_append (ECellVbox *vbox, ECell *subcell, gint model_col)
{
- vbox->subcell_count ++;
+ vbox->subcell_count++;
vbox->subcells = g_renew (ECell *, vbox->subcells, vbox->subcell_count);
vbox->model_cols = g_renew (int, vbox->model_cols, vbox->subcell_count);
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 736473a81c..dd8d995d4a 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -1045,7 +1045,7 @@ config_button_remove (GtkWidget *widget, ETableConfig *config)
memmove (config->temp_state->columns + row, config->temp_state->columns + row + 1, sizeof (gint) * (config->temp_state->col_count - row - 1));
memmove (config->temp_state->expansions + row, config->temp_state->expansions + row + 1, sizeof (gdouble) * (config->temp_state->col_count - row - 1));
- config->temp_state->col_count --;
+ config->temp_state->col_count--;
}
config->temp_state->columns = g_renew (int, config->temp_state->columns, config->temp_state->col_count);
config->temp_state->expansions = g_renew (double, config->temp_state->expansions, config->temp_state->col_count);
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index a04e4f3742..7108b33ee7 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -103,7 +103,8 @@ etfci_find_button (ETableFieldChooserItem *etfci, gdouble loc)
ecol = e_table_header_get_column (etfci->combined_header, i);
if (ecol->disabled)
continue;
- height += e_table_header_compute_height (ecol, GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas));
+ height += e_table_header_compute_height (
+ ecol, GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas));
if (height > loc)
return i;
}
@@ -164,7 +165,8 @@ etfci_reflow (GnomeCanvasItem *item, gint flags)
ecol = e_table_header_get_column (etfci->combined_header, i);
if (ecol->disabled)
continue;
- height += e_table_header_compute_height (ecol, GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas));
+ height += e_table_header_compute_height (
+ ecol, GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas));
}
etfci->height = height;
@@ -176,14 +178,18 @@ etfci_reflow (GnomeCanvasItem *item, gint flags)
}
static void
-etfci_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
+etfci_update (GnomeCanvasItem *item,
+ gdouble *affine,
+ ArtSVP *clip_path,
+ gint flags)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
gdouble i2c [6];
ArtPoint c1, c2, i1, i2;
if (GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->update)
- (*GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->update)(item, affine, clip_path, flags);
+ GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->update (
+ item, affine, clip_path, flags);
i1.x = i1.y = 0;
i2.x = etfci->width;
@@ -198,17 +204,21 @@ etfci_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint fl
item->x2 != c2.x ||
item->y2 != c2.y)
{
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
+ gnome_canvas_request_redraw (
+ item->canvas, item->x1,
+ item->y1, item->x2, item->y2);
item->x1 = c1.x;
item->y1 = c1.y;
item->x2 = c2.x;
item->y2 = c2.y;
/* FIXME: Group Child bounds !? */
#if 0
- gnome_canvas_group_child_bounds (GNOME_CANVAS_GROUP (item->parent), item);
+ gnome_canvas_group_child_bounds (
+ GNOME_CANVAS_GROUP (item->parent), item);
#endif
}
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
+ gnome_canvas_request_redraw (
+ item->canvas, item->x1, item->y1, item->x2, item->y2);
}
static void
@@ -235,9 +245,11 @@ etfci_drop_full_header (ETableFieldChooserItem *etfci)
header = G_OBJECT (etfci->full_header);
if (etfci->full_header_structure_change_id)
- g_signal_handler_disconnect (header, etfci->full_header_structure_change_id);
+ g_signal_handler_disconnect (
+ header, etfci->full_header_structure_change_id);
if (etfci->full_header_dimension_change_id)
- g_signal_handler_disconnect (header, etfci->full_header_dimension_change_id);
+ g_signal_handler_disconnect (
+ header, etfci->full_header_dimension_change_id);
etfci->full_header_structure_change_id = 0;
etfci->full_header_dimension_change_id = 0;
@@ -249,19 +261,23 @@ etfci_drop_full_header (ETableFieldChooserItem *etfci)
}
static void
-full_header_structure_changed (ETableHeader *header, ETableFieldChooserItem *etfci)
+full_header_structure_changed (ETableHeader *header,
+ ETableFieldChooserItem *etfci)
{
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
}
static void
-full_header_dimension_changed (ETableHeader *header, gint col, ETableFieldChooserItem *etfci)
+full_header_dimension_changed (ETableHeader *header,
+ gint col,
+ ETableFieldChooserItem *etfci)
{
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
}
static void
-etfci_add_full_header (ETableFieldChooserItem *etfci, ETableHeader *header)
+etfci_add_full_header (ETableFieldChooserItem *etfci,
+ ETableHeader *header)
{
etfci->full_header = header;
g_object_ref (etfci->full_header);
@@ -299,19 +315,23 @@ etfci_drop_table_header (ETableFieldChooserItem *etfci)
}
static void
-table_header_structure_changed (ETableHeader *header, ETableFieldChooserItem *etfci)
+table_header_structure_changed (ETableHeader *header,
+ ETableFieldChooserItem *etfci)
{
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
}
static void
-table_header_dimension_changed (ETableHeader *header, gint col, ETableFieldChooserItem *etfci)
+table_header_dimension_changed (ETableHeader *header,
+ gint col,
+ ETableFieldChooserItem *etfci)
{
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
}
static void
-etfci_add_table_header (ETableFieldChooserItem *etfci, ETableHeader *header)
+etfci_add_table_header (ETableFieldChooserItem *etfci,
+ ETableHeader *header)
{
etfci->header = header;
g_object_ref (etfci->header);
@@ -326,7 +346,10 @@ etfci_add_table_header (ETableFieldChooserItem *etfci, ETableHeader *header)
}
static void
-etfci_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+etfci_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GnomeCanvasItem *item;
ETableFieldChooserItem *etfci;
@@ -449,7 +472,12 @@ etfci_unrealize (GnomeCanvasItem *item)
}
static void
-etfci_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height)
+etfci_draw (GnomeCanvasItem *item,
+ GdkDrawable *drawable,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
GnomeCanvas *canvas = item->canvas;
@@ -548,7 +576,8 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, gdouble x, gdo
etfci->drag_col = ecol->col_idx;
- etfci_drag_types[0].target = g_strdup_printf("%s-%s", etfci_drag_types[0].target, etfci->dnd_code);
+ etfci_drag_types[0].target = g_strdup_printf (
+ "%s-%s", etfci_drag_types[0].target, etfci->dnd_code);
d(g_print ("etfci - %s\n", etfci_drag_types[0].target));
list = gtk_target_list_new (etfci_drag_types, G_N_ELEMENTS (etfci_drag_types));
context = gtk_drag_begin (widget, list, GDK_ACTION_MOVE, 1, event);
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 0af5dc8b98..2f45be08ec 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -496,7 +496,7 @@ etgc_add (ETableGroup *etg, gint row)
if (comp_val == 0) {
e_table_sorting_utils_free_cmp_cache (cmp_cache);
child = child_node->child;
- child_node->count ++;
+ child_node->count++;
e_table_group_add (child, row);
compute_text (etgc, child_node);
return;
@@ -598,7 +598,7 @@ etgc_remove (ETableGroup *etg, gint row)
ETableGroup *child = child_node->child;
if (e_table_group_remove (child, row)) {
- child_node->count --;
+ child_node->count--;
if (child_node->count == 0) {
e_table_group_container_child_node_free (etgc, child_node);
etgc->children = g_list_remove (etgc->children, child_node);
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index a80315a596..5084e19ebc 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -1241,7 +1241,7 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
ETableSortColumn column =
e_table_sort_info_grouping_get_nth(
ethi->sort_info, i);
- group_indent ++;
+ group_indent++;
g_hash_table_insert (
arrows,
GINT_TO_POINTER ((gint) column.column),
@@ -1782,8 +1782,8 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
e_table_sort_info_sorting_get_nth (ethi->sort_info, j));
e_table_sort_info_sorting_truncate (ethi->sort_info, length - 1);
- length --;
- i --;
+ length--;
+ i--;
} else {
ascending = !ascending;
column.ascending = ascending;
diff --git a/widgets/table/e-table-header-item.h b/widgets/table/e-table-header-item.h
index 17e6e964f3..911f7d4884 100644
--- a/widgets/table/e-table-header-item.h
+++ b/widgets/table/e-table-header-item.h
@@ -46,7 +46,7 @@ typedef struct {
GdkCursor *change_cursor;
GdkCursor *resize_cursor;
- short height, width;
+ gshort height, width;
PangoFontDescription *font_desc;
/*
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index 3ff4c3472b..0ec180818e 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -365,7 +365,7 @@ eth_do_insert (ETableHeader *eth, gint pos, ETableCol *val)
memmove (&eth->columns [pos+1], &eth->columns [pos],
sizeof (ETableCol *) * (eth->col_count - pos));
eth->columns [pos] = val;
- eth->col_count ++;
+ eth->col_count++;
}
/**
@@ -639,7 +639,7 @@ e_table_header_move (ETableHeader *eth, gint source_index, gint target_index)
g_return_if_fail (target_index < eth->col_count + 1);
if (source_index < target_index)
- target_index --;
+ target_index--;
old = eth->columns [source_index];
eth_do_remove (eth, source_index, FALSE);
@@ -723,7 +723,7 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
min_width += eth->columns[i]->min_width + eth->width_extras;
if (eth->columns[i]->resizable) {
expansion += eth->columns[i]->expansion;
- expandable_count ++;
+ expandable_count++;
}
}
/* If there's no room for anything, don't change. */
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 2d88258be9..c0def7f286 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -205,7 +205,7 @@ eti_grab (ETableItem *eti, guint32 time)
eti->gtk_grabbed = TRUE;
}
}
- eti->grabbed_count ++;
+ eti->grabbed_count++;
}
inline static void
@@ -213,7 +213,7 @@ eti_ungrab (ETableItem *eti, guint32 time)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
d(g_print ("%s: time: %d\n", __FUNCTION__, time));
- eti->grabbed_count --;
+ eti->grabbed_count--;
if (eti->grabbed_count == 0) {
if (eti->grab_cancelled) {
eti->grab_cancelled = FALSE;
@@ -660,7 +660,7 @@ height_cache_idle(ETableItem *eti)
for (i = eti->height_cache_idle_count; i < eti->rows; i++) {
if (eti->height_cache[i] == -1) {
eti_row_height(eti, i);
- changed ++;
+ changed++;
if (changed >= 20)
break;
}
@@ -1045,7 +1045,7 @@ eti_cancel_drag_due_to_model_change (ETableItem *eti)
static void
eti_freeze (ETableItem *eti)
{
- eti->frozen_count ++;
+ eti->frozen_count++;
d(g_print ("%s: %d\n", __FUNCTION__, eti->frozen_count));
}
@@ -1055,7 +1055,7 @@ eti_unfreeze (ETableItem *eti)
if (eti->frozen_count <= 0)
return;
- eti->frozen_count --;
+ eti->frozen_count--;
d(g_print ("%s: %d\n", __FUNCTION__, eti->frozen_count));
if (eti->frozen_count == 0 && eti->queue_show_cursor) {
eti_show_cursor (eti, 0);
@@ -2258,7 +2258,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (cursor_row != new_cursor_row || cursor_col != new_cursor_col) {
eti->click_count = 1;
} else {
- eti->click_count ++;
+ eti->click_count++;
eti->row_guess = row;
if ((!eti_editing(eti)) && e_table_model_is_cell_editable(eti->table_model, cursor_col, row)) {
@@ -3464,7 +3464,7 @@ e_table_item_print_page (EPrintable *ep,
if (eti->horizontal_draw_grid) {
gp_draw_rect(context, 0, yd, width, 1);
}
- yd ++;
+ yd++;
}
itemcontext->rows_printed = row;
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c
index 2775d2d461..4354b57189 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -544,7 +544,7 @@ e_table_memory_store_remove (ETableMemoryStore *etms, gint row)
model = E_TABLE_MODEL (etms);
column_count = e_table_model_column_count (model);
- for (i = 0; i < column_count; i ++)
+ for (i = 0; i < column_count; i++)
e_table_model_free_value (model, i, e_table_model_value_at (model, i, row));
row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) - 1;
@@ -567,8 +567,8 @@ e_table_memory_store_clear (ETableMemoryStore *etms)
row_count = e_table_model_row_count (model);
column_count = e_table_model_column_count (model);
- for (i = 0; i < row_count; i ++) {
- for (j = 0; j < column_count; j ++) {
+ for (i = 0; i < row_count; i++) {
+ for (j = 0; j < column_count; j++) {
e_table_model_free_value (model, j, e_table_model_value_at (model, j, i));
}
}
diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c
index e79448ee20..a761339b2b 100644
--- a/widgets/table/e-table-memory.c
+++ b/widgets/table/e-table-memory.c
@@ -175,7 +175,7 @@ e_table_memory_insert (ETableMemory *etmm,
etmm->priv->data + row,
(etmm->priv->num_rows - row) * sizeof (gpointer));
etmm->priv->data[row] = data;
- etmm->priv->num_rows ++;
+ etmm->priv->num_rows++;
if (!etmm->priv->frozen)
e_table_model_row_inserted(E_TABLE_MODEL(etmm), row);
}
@@ -206,7 +206,7 @@ e_table_memory_remove (ETableMemory *etmm, gint row)
etmm->priv->data + row,
etmm->priv->data + row + 1,
(etmm->priv->num_rows - row - 1) * sizeof (gpointer));
- etmm->priv->num_rows --;
+ etmm->priv->num_rows--;
if (!etmm->priv->frozen)
e_table_model_row_deleted(E_TABLE_MODEL(etmm), row);
return ret;
@@ -250,7 +250,7 @@ e_table_memory_freeze(ETableMemory *etmm)
if (priv->frozen == 0)
e_table_model_pre_change(E_TABLE_MODEL(etmm));
- priv->frozen ++;
+ priv->frozen++;
}
/**
@@ -268,7 +268,7 @@ e_table_memory_thaw(ETableMemory *etmm)
ETableMemoryPriv *priv = etmm->priv;
if (priv->frozen > 0)
- priv->frozen --;
+ priv->frozen--;
if (priv->frozen == 0) {
e_table_model_changed(E_TABLE_MODEL(etmm));
}
diff --git a/widgets/table/e-table-sorted.c b/widgets/table/e-table-sorted.c
index 75a8e768d3..9e4f1c4046 100644
--- a/widgets/table/e-table-sorted.c
+++ b/widgets/table/e-table-sorted.c
@@ -220,7 +220,7 @@ ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, gint row
etss->map_table = g_realloc (etss->map_table, (etss->n_map + count) * sizeof(gint));
- for (; count > 0; count --) {
+ for (; count > 0; count--) {
if (!full_change)
e_table_model_pre_change (etm);
i = etss->n_map;
@@ -272,7 +272,7 @@ ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, gint row,
if (shift)
e_table_model_pre_change (etm);
memmove (etss->map_table + i, etss->map_table + i + 1, (etss->n_map - i - 1) * sizeof(gint));
- etss->n_map --;
+ etss->n_map--;
if (shift)
e_table_model_row_deleted (etm, i);
}
diff --git a/widgets/table/e-table-sorting-utils.c b/widgets/table/e-table-sorting-utils.c
index c07293242c..ff808da1c0 100644
--- a/widgets/table/e-table-sorting-utils.c
+++ b/widgets/table/e-table-sorting-utils.c
@@ -213,13 +213,13 @@ e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_
i = view_row;
if (i < rows - 1 && etsu_compare(source, sort_info, full_header, map_table[i + 1], row, cmp_cache) < 0) {
- i ++;
+ i++;
while (i < rows - 1 && etsu_compare(source, sort_info, full_header, map_table[i], row, cmp_cache) < 0)
- i ++;
+ i++;
} else if (i > 0 && etsu_compare(source, sort_info, full_header, map_table[i - 1], row, cmp_cache) > 0) {
- i --;
+ i--;
while (i > 0 && etsu_compare(source, sort_info, full_header, map_table[i], row, cmp_cache) > 0)
- i --;
+ i--;
}
e_table_sorting_utils_free_cmp_cache (cmp_cache);
@@ -339,13 +339,13 @@ e_table_sorting_utils_tree_check_position (ETreeModel *source, ETableSortInfo *s
path = map_table[i];
if (i < count - 1 && etsu_tree_compare(source, sort_info, full_header, map_table[i + 1], path, cmp_cache) < 0) {
- i ++;
+ i++;
while (i < count - 1 && etsu_tree_compare(source, sort_info, full_header, map_table[i], path, cmp_cache) < 0)
- i ++;
+ i++;
} else if (i > 0 && etsu_tree_compare(source, sort_info, full_header, map_table[i - 1], path, cmp_cache) > 0) {
- i --;
+ i--;
while (i > 0 && etsu_tree_compare(source, sort_info, full_header, map_table[i], path, cmp_cache) > 0)
- i --;
+ i--;
}
e_table_sorting_utils_free_cmp_cache (cmp_cache);
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c
index b63ecd01ec..f27d220f10 100644
--- a/widgets/table/e-table-subset-variable.c
+++ b/widgets/table/e-table-subset-variable.c
@@ -110,7 +110,7 @@ etssv_remove (ETableSubsetVariable *etssv,
if (etss->map_table[i] == row) {
e_table_model_pre_change (etm);
memmove (etss->map_table + i, etss->map_table + i + 1, (etss->n_map - i - 1) * sizeof(gint));
- etss->n_map --;
+ etss->n_map--;
e_table_model_row_deleted (etm, i);
return TRUE;
diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c
index f1f6a88b31..b19bdeb615 100644
--- a/widgets/table/e-table-without.c
+++ b/widgets/table/e-table-without.c
@@ -118,7 +118,7 @@ remove_row (ETableWithout *etw, gint view_row)
etss->map_table + view_row,
etss->map_table + view_row + 1,
(etss->n_map - view_row - 1) * sizeof (gint));
- etss->n_map --;
+ etss->n_map--;
e_table_model_row_deleted (E_TABLE_MODEL (etw), view_row);
}
@@ -325,7 +325,7 @@ void e_table_without_hide (ETableWithout *etw,
for (i = 0; i < etss->n_map; i++) {
if (check_with_key (etw, key, etw_view_to_model_row (etw, i))) {
remove_row (etw, i);
- i --;
+ i--;
}
}
}
@@ -341,7 +341,7 @@ void e_table_without_hide_adopt (ETableWithout *etw,
for (i = 0; i < etss->n_map; i++) {
if (check_with_key (etw, key, etw_view_to_model_row (etw, i))) {
remove_row (etw, i);
- i --;
+ i--;
}
}
}
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 088e4e1693..9c1070bf4d 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -1701,7 +1701,7 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
0, 1, 0 + row, 1 + row,
GTK_FILL | GTK_EXPAND,
GTK_FILL, 0, 0);
- row ++;
+ row++;
}
gtk_table_attach (GTK_TABLE (e_table), GTK_WIDGET (e_table->table_canvas),
0, 1, 0 + row, 1 + row,
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index b40dda8e3e..13103fc47a 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -96,7 +96,7 @@ e_tree_memory_path_depth (ETreeMemoryPath *path)
g_return_val_if_fail(path != NULL, -1);
for ( path = path->parent; path; path = path->parent)
- depth ++;
+ depth++;
return depth;
}
@@ -133,7 +133,7 @@ e_tree_memory_path_insert (ETreeMemoryPath *parent,
parent->first_child = child;
break;
}
- position --;
+ position--;
}
}
@@ -152,7 +152,7 @@ e_tree_path_unlink (ETreeMemoryPath *path)
if (path == parent->last_child)
parent->last_child = path->prev_sibling;
- parent->num_children --;
+ parent->num_children--;
}
/* unlink prev/next sibling links */
@@ -185,7 +185,7 @@ e_tree_memory_freeze(ETreeMemory *etmm)
if (priv->frozen == 0)
e_tree_model_pre_change(E_TREE_MODEL(etmm));
- priv->frozen ++;
+ priv->frozen++;
}
/**
@@ -203,7 +203,7 @@ e_tree_memory_thaw(ETreeMemory *etmm)
ETreeMemoryPriv *priv = etmm->priv;
if (priv->frozen > 0)
- priv->frozen --;
+ priv->frozen--;
if (priv->frozen == 0) {
e_tree_model_node_changed(E_TREE_MODEL(etmm), priv->root);
}
@@ -566,7 +566,7 @@ e_tree_memory_node_insert_before (ETreeMemory *etree,
for (child = parent_path->first_child; child; child = child->next_sibling) {
if (child == sibling_path)
break;
- position ++;
+ position++;
}
} else
position = parent_path->num_children;
@@ -619,7 +619,7 @@ e_tree_memory_node_remove (ETreeMemory *etree, ETreePath node)
sibling;
old_position++, sibling = sibling->prev_sibling)
/* Empty intentionally*/;
- old_position --;
+ old_position--;
}
/* unlink this node - we only have to unlink the root node being removed,
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index 6beaa34d89..1e887fa7b9 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -237,7 +237,7 @@ find_path(ETreeSorted *ets, ETreePath corresponding)
path = ets->priv->root;
- for (i = depth - 1; i >= 0 && path != NULL; i --) {
+ for (i = depth - 1; i >= 0 && path != NULL; i--) {
gint j;
if (path->num_children == -1) {
@@ -313,7 +313,7 @@ find_or_create_path(ETreeSorted *ets, ETreePath corresponding)
path = ets->priv->root;
- for (i = depth - 1; i >= 0 && path != NULL; i --) {
+ for (i = depth - 1; i >= 0 && path != NULL; i--) {
gint j;
if (path->num_children == -1) {
@@ -465,7 +465,7 @@ generate_children(ETreeSorted *ets, ETreeSortedPath *path)
for (child = e_tree_model_node_get_first_child(ets->priv->source, path->corresponding);
child;
child = e_tree_model_node_get_next(ets->priv->source, child)) {
- count ++;
+ count++;
}
path->num_children = count;
@@ -782,7 +782,7 @@ ets_get_children (ETreeModel *etm, ETreePath node, ETreePath **nodes)
gint i;
(*nodes) = g_malloc (sizeof (ETreePath) * n_children);
- for (i = 0; i < n_children; i ++) {
+ for (i = 0; i < n_children; i++) {
(*nodes)[i] = path->children[i];
}
}
@@ -1027,7 +1027,7 @@ ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETr
for (counter = e_tree_model_node_get_next(etm, child);
counter;
counter = e_tree_model_node_get_next(etm, counter))
- position --;
+ position--;
if (position != parent_path->num_children) {
for (i = 0; i < parent_path->num_children; i++) {
@@ -1060,7 +1060,7 @@ ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETr
} else {
mark_path_needs_resort(ets, parent_path, TRUE, FALSE);
}
- parent_path->num_children ++;
+ parent_path->num_children++;
parent_path->children = g_renew(ETreeSortedPath *, parent_path->children, parent_path->num_children);
memmove(parent_path->children + i + 1, parent_path->children + i, (parent_path->num_children - 1 - i) * sizeof(gint));
parent_path->children[i] = path;
@@ -1098,12 +1098,12 @@ ets_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, gint
gint i;
for (i = 0; i < parent_path->num_children; i++) {
if (parent_path->children[i]->orig_position > old_position)
- parent_path->children[i]->orig_position --;
+ parent_path->children[i]->orig_position--;
}
i = path->position;
- parent_path->num_children --;
+ parent_path->num_children--;
memmove(parent_path->children + i, parent_path->children + i + 1, sizeof(ETreeSortedPath *) * (parent_path->num_children - i));
for (; i < parent_path->num_children; i++) {
parent_path->children[i]->position = i;
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index f813b64e8f..f0a007c097 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -56,12 +56,6 @@
#define d(x)
-#if d(!)0
-#define e_table_item_leave_edit_(x) (e_table_item_leave_edit((x)), g_print ("%s: e_table_item_leave_edit\n", __FUNCTION__))
-#else
-#define e_table_item_leave_edit_(x) (e_table_item_leave_edit((x)))
-#endif
-
enum {
CURSOR_CHANGE,
CURSOR_ACTIVATED,
@@ -199,7 +193,7 @@ struct ETreePriv {
GList *expanded_list;
};
-static guint et_signals [LAST_SIGNAL] = { 0, };
+static guint et_signals[LAST_SIGNAL] = { 0, };
static void et_grab_focus (GtkWidget *widget);
@@ -298,7 +292,7 @@ current_search_col (ETree *et)
static void
e_tree_state_change (ETree *et)
{
- g_signal_emit (G_OBJECT (et), et_signals [STATE_CHANGE], 0);
+ g_signal_emit (G_OBJECT (et), et_signals[STATE_CHANGE], 0);
}
static void
@@ -349,24 +343,27 @@ connect_header (ETree *e_tree, ETableState *state)
if (e_tree->priv->header != NULL)
disconnect_header (e_tree);
- e_tree->priv->header = e_table_state_to_header (GTK_WIDGET(e_tree), e_tree->priv->full_header, state);
+ e_tree->priv->header = e_table_state_to_header (
+ GTK_WIDGET(e_tree), e_tree->priv->full_header, state);
+
+ e_tree->priv->structure_change_id = g_signal_connect (
+ e_tree->priv->header, "structure_change",
+ G_CALLBACK (search_col_change_trigger), e_tree);
- e_tree->priv->structure_change_id =
- g_signal_connect (G_OBJECT (e_tree->priv->header), "structure_change",
- G_CALLBACK (search_col_change_trigger), e_tree);
- e_tree->priv->expansion_change_id =
- g_signal_connect (G_OBJECT (e_tree->priv->header), "expansion_change",
- G_CALLBACK (change_trigger), e_tree);
+ e_tree->priv->expansion_change_id = g_signal_connect (
+ e_tree->priv->header, "expansion_change",
+ G_CALLBACK (change_trigger), e_tree);
if (state->sort_info) {
e_tree->priv->sort_info = e_table_sort_info_duplicate(state->sort_info);
e_table_sort_info_set_can_group (e_tree->priv->sort_info, FALSE);
- e_tree->priv->sort_info_change_id =
- g_signal_connect (G_OBJECT (e_tree->priv->sort_info), "sort_info_changed",
- G_CALLBACK (search_col_change_trigger), e_tree);
- e_tree->priv->group_info_change_id =
- g_signal_connect (G_OBJECT (e_tree->priv->sort_info), "group_info_changed",
- G_CALLBACK (search_col_change_trigger), e_tree);
+ e_tree->priv->sort_info_change_id = g_signal_connect (
+ e_tree->priv->sort_info, "sort_info_changed",
+ G_CALLBACK (search_col_change_trigger), e_tree);
+
+ e_tree->priv->group_info_change_id = g_signal_connect (
+ e_tree->priv->sort_info, "group_info_changed",
+ G_CALLBACK (search_col_change_trigger), e_tree);
} else
e_tree->priv->sort_info = NULL;
@@ -467,13 +464,17 @@ search_search_callback (ETreeModel *model, ETreePath path, gpointer data)
gconstpointer value;
ETableCol *col = current_search_col (cb_data->et);
- value = e_tree_model_value_at (model, path, cb_data->et->priv->current_search_col->col_idx);
+ value = e_tree_model_value_at (
+ model, path, cb_data->et->priv->current_search_col->col_idx);
return col->search (value, cb_data->string);
}
static gboolean
-et_search_search (ETableSearch *search, gchar *string, ETableSearchFlags flags, ETree *et)
+et_search_search (ETableSearch *search,
+ gchar *string,
+ ETableSearchFlags flags,
+ ETree *et)
{
ETreePath cursor;
ETreePath found;
@@ -498,9 +499,15 @@ et_search_search (ETableSearch *search, gchar *string, ETableSearchFlags flags,
}
}
- found = e_tree_model_node_find (et->priv->model, cursor, NULL, E_TREE_FIND_NEXT_FORWARD, search_search_callback, &cb_data);
+ found = e_tree_model_node_find (
+ et->priv->model, cursor, NULL,
+ E_TREE_FIND_NEXT_FORWARD,
+ search_search_callback, &cb_data);
if (found == NULL)
- found = e_tree_model_node_find (et->priv->model, NULL, cursor, E_TREE_FIND_NEXT_FORWARD, search_search_callback, &cb_data);
+ found = e_tree_model_node_find (
+ et->priv->model, NULL, cursor,
+ E_TREE_FIND_NEXT_FORWARD,
+ search_search_callback, &cb_data);
if (found && found != cursor) {
gint model_row;
@@ -508,7 +515,9 @@ et_search_search (ETableSearch *search, gchar *string, ETableSearchFlags flags,
e_tree_table_adapter_show_node (et->priv->etta, found);
model_row = e_tree_table_adapter_row_of_node (et->priv->etta, found);
- e_selection_model_select_as_key_press(E_SELECTION_MODEL (et->priv->selection), model_row, col->col_idx, GDK_CONTROL_MASK);
+ e_selection_model_select_as_key_press (
+ E_SELECTION_MODEL (et->priv->selection),
+ model_row, col->col_idx, GDK_CONTROL_MASK);
return TRUE;
} else if (cursor && !(flags & E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST)) {
gconstpointer value;
@@ -529,10 +538,11 @@ et_search_accept (ETableSearch *search, ETree *et)
if (col == NULL)
return;
- g_object_get(et->priv->selection,
- "cursor_row", &cursor,
- NULL);
- e_selection_model_select_as_key_press(E_SELECTION_MODEL (et->priv->selection), cursor, col->col_idx, 0);
+ g_object_get (et->priv->selection, "cursor_row", &cursor, NULL);
+
+ e_selection_model_select_as_key_press (
+ E_SELECTION_MODEL (et->priv->selection),
+ cursor, col->col_idx, 0);
}
static void
@@ -603,9 +613,11 @@ e_tree_init (ETree *e_tree)
e_tree->priv->do_drag = FALSE;
#ifdef E_TREE_USE_TREE_SELECTION
- e_tree->priv->selection = E_SELECTION_MODEL(e_tree_selection_model_new());
+ e_tree->priv->selection =
+ E_SELECTION_MODEL (e_tree_selection_model_new ());
#else
- e_tree->priv->selection = E_SELECTION_MODEL(e_table_selection_model_new());
+ e_tree->priv->selection =
+ E_SELECTION_MODEL (e_table_selection_model_new ());
#endif
e_tree->priv->spec = NULL;
@@ -667,7 +679,8 @@ set_header_canvas_width (ETree *e_tree)
{
gdouble oldwidth, oldheight, width;
- if (!(e_tree->priv->header_item && e_tree->priv->header_canvas && e_tree->priv->table_canvas))
+ if (!(e_tree->priv->header_item &&
+ e_tree->priv->header_canvas && e_tree->priv->table_canvas))
return;
gnome_canvas_get_scroll_region (GNOME_CANVAS (e_tree->priv->table_canvas),
@@ -850,45 +863,45 @@ static void
tree_canvas_reflow (GnomeCanvas *canvas, ETree *e_tree)
{
if (!e_tree->priv->reflow_idle_id)
- e_tree->priv->reflow_idle_id = g_idle_add_full (400, (GSourceFunc) tree_canvas_reflow_idle, e_tree, NULL);
+ e_tree->priv->reflow_idle_id = g_idle_add_full (
+ 400, (GSourceFunc) tree_canvas_reflow_idle,
+ e_tree, NULL);
}
static void
item_cursor_change (ETableItem *eti, gint row, ETree *et)
{
ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
- g_signal_emit (et,
- et_signals [CURSOR_CHANGE], 0,
- row, path);
+
+ g_signal_emit (et, et_signals[CURSOR_CHANGE], 0, row, path);
}
static void
item_cursor_activated (ETableItem *eti, gint row, ETree *et)
{
ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
- g_signal_emit (et,
- et_signals [CURSOR_ACTIVATED], 0,
- row, path);
- d(g_print("%s: Emitted CURSOR_ACTIVATED signal on row: %d and path: 0x%p\n", __FUNCTION__, row, path));
+
+ g_signal_emit (et, et_signals[CURSOR_ACTIVATED], 0, row, path);
}
static void
item_double_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
{
ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
- g_signal_emit (et,
- et_signals [DOUBLE_CLICK], 0,
- row, path, col, event);
+
+ g_signal_emit (et, et_signals[DOUBLE_CLICK], 0, row, path, col, event);
}
static gboolean
item_right_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
{
- gboolean return_val = 0;
ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
- g_signal_emit (et,
- et_signals [RIGHT_CLICK], 0,
- row, path, col, event, &return_val);
+ gboolean return_val = 0;
+
+ g_signal_emit (
+ et, et_signals[RIGHT_CLICK], 0,
+ row, path, col, event, &return_val);
+
return return_val;
}
@@ -897,9 +910,10 @@ item_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
{
gboolean return_val = 0;
ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
- g_signal_emit (et,
- et_signals [CLICK], 0,
- row, path, col, event, &return_val);
+
+ g_signal_emit (
+ et, et_signals[CLICK], 0, row, path, col, event, &return_val);
+
return return_val;
}
@@ -934,8 +948,11 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
row_local = e_table_model_row_count (E_TABLE_MODEL(et->priv->etta)) - 1;
row_local = e_tree_view_to_model_row (et, row_local);
- col_local = e_selection_model_cursor_col (E_SELECTION_MODEL (et->priv->selection));
- e_selection_model_select_as_key_press (E_SELECTION_MODEL (et->priv->selection), row_local, col_local, key->state);
+ col_local = e_selection_model_cursor_col (
+ E_SELECTION_MODEL (et->priv->selection));
+ e_selection_model_select_as_key_press (
+ E_SELECTION_MODEL (et->priv->selection),
+ row_local, col_local, key->state);
return_val = 1;
break;
@@ -949,8 +966,11 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
row_local = e_table_model_row_count (E_TABLE_MODEL(et->priv->etta)) - 1;
row_local = e_tree_view_to_model_row (et, row_local);
- col_local = e_selection_model_cursor_col (E_SELECTION_MODEL (et->priv->selection));
- e_selection_model_select_as_key_press (E_SELECTION_MODEL (et->priv->selection), row_local, col_local, key->state);
+ col_local = e_selection_model_cursor_col (
+ E_SELECTION_MODEL (et->priv->selection));
+ e_selection_model_select_as_key_press (
+ E_SELECTION_MODEL (et->priv->selection),
+ row_local, col_local, key->state);
return_val = 1;
break;
@@ -958,8 +978,10 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
case GDK_KP_Add:
case GDK_Right:
case GDK_KP_Right:
- /* Only allow if the Shift modifier is used -- eg. Ctrl-Equal shouldn't be handled. */
- if ((key->state & (GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_MOD1_MASK)) != GDK_SHIFT_MASK)
+ /* Only allow if the Shift modifier is used.
+ * eg. Ctrl-Equal shouldn't be handled. */
+ if ((key->state & (GDK_SHIFT_MASK | GDK_LOCK_MASK |
+ GDK_MOD1_MASK)) != GDK_SHIFT_MASK)
break;
if (row != -1) {
path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
@@ -972,8 +994,10 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
case GDK_KP_Subtract:
case GDK_Left:
case GDK_KP_Left:
- /* Only allow if the Shift modifier is used -- eg. Ctrl-Minus shouldn't be handled. */
- if ((key->state & (GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_MOD1_MASK)) != GDK_SHIFT_MASK)
+ /* Only allow if the Shift modifier is used.
+ * eg. Ctrl-Minus shouldn't be handled. */
+ if ((key->state & (GDK_SHIFT_MASK | GDK_LOCK_MASK |
+ GDK_MOD1_MASK)) != GDK_SHIFT_MASK)
break;
if (row != -1) {
path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
@@ -987,7 +1011,9 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
return TRUE;
/* Fallthrough */
default:
- if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_MOD1_MASK | GDK_MOD2_MASK | GDK_MOD3_MASK | GDK_MOD4_MASK | GDK_MOD5_MASK)) == 0
+ if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK |
+ GDK_MOD1_MASK | GDK_MOD2_MASK | GDK_MOD3_MASK |
+ GDK_MOD4_MASK | GDK_MOD5_MASK)) == 0
&& ((key->keyval >= GDK_a && key->keyval <= GDK_z) ||
(key->keyval >= GDK_A && key->keyval <= GDK_Z) ||
(key->keyval >= GDK_0 && key->keyval <= GDK_9))) {
@@ -995,7 +1021,7 @@ item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et)
}
path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
g_signal_emit (et,
- et_signals [KEY_PRESS], 0,
+ et_signals[KEY_PRESS], 0,
row, path, col, event, &return_val);
break;
}
@@ -1010,9 +1036,9 @@ item_start_drag (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et
path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
- g_signal_emit (et,
- et_signals [START_DRAG], 0,
- row, path, col, event, &return_val);
+ g_signal_emit (
+ et, et_signals[START_DRAG], 0,
+ row, path, col, event, &return_val);
return return_val;
}
@@ -1020,33 +1046,35 @@ item_start_drag (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et
static void
et_selection_model_selection_changed (ETableSelectionModel *etsm, ETree *et)
{
- g_signal_emit (et,
- et_signals [SELECTION_CHANGE], 0);
+ g_signal_emit (et, et_signals[SELECTION_CHANGE], 0);
}
static void
-et_selection_model_selection_row_changed (ETableSelectionModel *etsm, gint row, ETree *et)
+et_selection_model_selection_row_changed (ETableSelectionModel *etsm,
+ gint row,
+ ETree *et)
{
- g_signal_emit (et,
- et_signals [SELECTION_CHANGE], 0);
+ g_signal_emit (et, et_signals[SELECTION_CHANGE], 0);
}
static void
et_build_item (ETree *et)
{
- et->priv->item = gnome_canvas_item_new(GNOME_CANVAS_GROUP (gnome_canvas_root(et->priv->table_canvas)),
- e_table_item_get_type(),
- "ETableHeader", et->priv->header,
- "ETableModel", et->priv->etta,
- "selection_model", et->priv->selection,
- "alternating_row_colors", et->priv->alternating_row_colors,
- "horizontal_draw_grid", et->priv->horizontal_draw_grid,
- "vertical_draw_grid", et->priv->vertical_draw_grid,
- "drawfocus", et->priv->draw_focus,
- "cursor_mode", et->priv->cursor_mode,
- "length_threshold", et->priv->length_threshold,
- "uniform_row_height", et->priv->uniform_row_height,
- NULL);
+ et->priv->item = gnome_canvas_item_new (
+ GNOME_CANVAS_GROUP (
+ gnome_canvas_root (et->priv->table_canvas)),
+ e_table_item_get_type(),
+ "ETableHeader", et->priv->header,
+ "ETableModel", et->priv->etta,
+ "selection_model", et->priv->selection,
+ "alternating_row_colors", et->priv->alternating_row_colors,
+ "horizontal_draw_grid", et->priv->horizontal_draw_grid,
+ "vertical_draw_grid", et->priv->vertical_draw_grid,
+ "drawfocus", et->priv->draw_focus,
+ "cursor_mode", et->priv->cursor_mode,
+ "length_threshold", et->priv->length_threshold,
+ "uniform_row_height", et->priv->uniform_row_height,
+ NULL);
g_signal_connect (et->priv->item, "cursor_change",
G_CALLBACK (item_cursor_change), et);
@@ -1082,7 +1110,7 @@ white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETree *e_tree)
{
gboolean return_val = 0;
g_signal_emit (e_tree,
- et_signals [WHITE_SPACE_EVENT], 0,
+ et_signals[WHITE_SPACE_EVENT], 0,
event, &return_val);
return return_val;
}
@@ -1099,7 +1127,7 @@ et_canvas_root_event (GnomeCanvasItem *root, GdkEvent *event, ETree *e_tree)
GnomeCanvasItem *item = GNOME_CANVAS(root->canvas)->focused_item;
if (E_IS_TABLE_ITEM(item)) {
- e_table_item_leave_edit_(E_TABLE_ITEM(item));
+ e_table_item_leave_edit(E_TABLE_ITEM(item));
return TRUE;
}
}
@@ -1129,7 +1157,8 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d
canvas = GNOME_CANVAS (widget);
tree = E_TREE (data);
- if (!canvas->focused_item || (e_selection_model_cursor_row (tree->priv->selection) == -1)) {
+ if (!canvas->focused_item ||
+ (e_selection_model_cursor_row (tree->priv->selection) == -1)) {
e_table_item_set_cursor (E_TABLE_ITEM (tree->priv->item), 0, 0);
gnome_canvas_item_grab_focus (tree->priv->item);
}
@@ -1221,7 +1250,8 @@ e_tree_set_search_column (ETree *e_tree, gint col)
}
e_tree->priv->search_col_set = TRUE;
- e_tree->priv->current_search_col = e_table_header_get_column (e_tree->priv->full_header, col);
+ e_tree->priv->current_search_col = e_table_header_get_column (
+ e_tree->priv->full_header, col);
}
void
@@ -1458,17 +1488,21 @@ et_table_rows_deleted (ETableModel *table_model, gint row, gint count, ETree *et
static void
et_connect_to_etta (ETree *et)
{
- et->priv->table_model_change_id = g_signal_connect (et->priv->etta, "model_changed",
- G_CALLBACK (et_table_model_changed), et);
+ et->priv->table_model_change_id = g_signal_connect (
+ et->priv->etta, "model_changed",
+ G_CALLBACK (et_table_model_changed), et);
- et->priv->table_row_change_id = g_signal_connect (et->priv->etta, "model_row_changed",
- G_CALLBACK (et_table_row_changed), et);
+ et->priv->table_row_change_id = g_signal_connect (
+ et->priv->etta, "model_row_changed",
+ G_CALLBACK (et_table_row_changed), et);
- et->priv->table_cell_change_id = g_signal_connect (et->priv->etta, "model_cell_changed",
- G_CALLBACK (et_table_cell_changed), et);
+ et->priv->table_cell_change_id = g_signal_connect (
+ et->priv->etta, "model_cell_changed",
+ G_CALLBACK (et_table_cell_changed), et);
- et->priv->table_rows_delete_id = g_signal_connect (et->priv->etta, "model_rows_deleted",
- G_CALLBACK (et_table_rows_deleted), et);
+ et->priv->table_rows_delete_id = g_signal_connect (
+ et->priv->etta, "model_rows_deleted",
+ G_CALLBACK (et_table_rows_deleted), et);
}
@@ -1499,7 +1533,9 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
e_tree->priv->model = etm;
g_object_ref (etm);
- e_tree->priv->etta = E_TREE_TABLE_ADAPTER(e_tree_table_adapter_new(e_tree->priv->model, e_tree->priv->sort_info, e_tree->priv->full_header));
+ e_tree->priv->etta = E_TREE_TABLE_ADAPTER (
+ e_tree_table_adapter_new (e_tree->priv->model,
+ e_tree->priv->sort_info, e_tree->priv->full_header));
et_connect_to_etta (e_tree);
@@ -1545,7 +1581,7 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
0, 1, 0 + row, 1 + row,
GTK_FILL | GTK_EXPAND,
GTK_FILL, 0, 0);
- row ++;
+ row++;
}
gtk_table_attach (GTK_TABLE (e_tree), GTK_WIDGET (e_tree->priv->table_canvas),
0, 1, 0 + row, 1 + row,
@@ -1743,7 +1779,10 @@ e_tree_new (ETreeModel *etm, ETableExtras *ete, const gchar *spec, const gchar *
* The newly created #ETree or %NULL if there's an error.
**/
GtkWidget *
-e_tree_new_from_spec_file (ETreeModel *etm, ETableExtras *ete, const gchar *spec_fn, const gchar *state_fn)
+e_tree_new_from_spec_file (ETreeModel *etm,
+ ETableExtras *ete,
+ const gchar *spec_fn,
+ const gchar *state_fn)
{
ETree *e_tree;
@@ -1782,10 +1821,13 @@ e_tree_set_cursor (ETree *e_tree, ETreePath path)
g_return_if_fail(path != NULL);
#ifdef E_TREE_USE_TREE_SELECTION
- e_tree_selection_model_select_single_path (E_TREE_SELECTION_MODEL(e_tree->priv->selection), path);
- e_tree_selection_model_change_cursor (E_TREE_SELECTION_MODEL(e_tree->priv->selection), path);
+ e_tree_selection_model_select_single_path (
+ E_TREE_SELECTION_MODEL(e_tree->priv->selection), path);
+ e_tree_selection_model_change_cursor (
+ E_TREE_SELECTION_MODEL(e_tree->priv->selection), path);
#else
- row = e_tree_table_adapter_row_of_node(E_TREE_TABLE_ADAPTER(e_tree->priv->etta), path);
+ row = e_tree_table_adapter_row_of_node (
+ E_TREE_TABLE_ADAPTER(e_tree->priv->etta), path);
if (row == -1)
return;
@@ -1800,10 +1842,10 @@ ETreePath
e_tree_get_cursor (ETree *e_tree)
{
#ifdef E_TREE_USE_TREE_SELECTION
- return e_tree_selection_model_get_cursor (E_TREE_SELECTION_MODEL(e_tree->priv->selection));
+ return e_tree_selection_model_get_cursor (
+ E_TREE_SELECTION_MODEL(e_tree->priv->selection));
#else
gint row;
- ETreePath path;
g_return_val_if_fail(e_tree != NULL, NULL);
g_return_val_if_fail(E_IS_TREE(e_tree), NULL);
@@ -1812,8 +1854,9 @@ e_tree_get_cursor (ETree *e_tree)
NULL);
if (row == -1)
return NULL;
- path = e_tree_table_adapter_node_at_row(E_TREE_TABLE_ADAPTER(e_tree->priv->etta), row);
- return path;
+
+ return e_tree_table_adapter_node_at_row (
+ E_TREE_TABLE_ADAPTER(e_tree->priv->etta), row);
#endif
}
@@ -1839,9 +1882,9 @@ e_tree_selected_path_foreach (ETree *e_tree,
g_return_if_fail(e_tree != NULL);
g_return_if_fail(E_IS_TREE(e_tree));
- e_tree_selection_model_foreach(E_TREE_SELECTION_MODEL (e_tree->priv->selection),
- callback,
- closure);
+ e_tree_selection_model_foreach (
+ E_TREE_SELECTION_MODEL (e_tree->priv->selection),
+ callback, closure);
}
/* Standard functions */
@@ -2227,7 +2270,10 @@ find_prev_in_range (ETree *et, gint start, gint end, ETreePathFunc func, gpointe
}
gboolean
-e_tree_find_next (ETree *et, ETreeFindNextParams params, ETreePathFunc func, gpointer data)
+e_tree_find_next (ETree *et,
+ ETreeFindNextParams params,
+ ETreePathFunc func,
+ gpointer data)
{
ETreePath cursor, found;
gint row, row_count;
@@ -2718,8 +2764,10 @@ e_tree_get_cell_at (ETree *tree,
* @tree: The tree.
* @row: The row to get the geometry of.
* @col: The col to get the geometry of.
- * @x_return: Returns the x coordinate of the upper right hand corner of the cell with respect to the widget.
- * @y_return: Returns the y coordinate of the upper right hand corner of the cell with respect to the widget.
+ * @x_return: Returns the x coordinate of the upper right hand corner
+ * of the cell with respect to the widget.
+ * @y_return: Returns the y coordinate of the upper right hand corner
+ * of the cell with respect to the widget.
* @width_return: Returns the width of the cell.
* @height_return: Returns the height of the cell.
*
@@ -2765,7 +2813,7 @@ et_drag_begin (GtkWidget *widget,
ETree *et)
{
g_signal_emit (et,
- et_signals [TREE_DRAG_BEGIN], 0,
+ et_signals[TREE_DRAG_BEGIN], 0,
et->priv->drag_row,
et->priv->drag_path,
et->priv->drag_col,
@@ -2778,7 +2826,7 @@ et_drag_end (GtkWidget *widget,
ETree *et)
{
g_signal_emit (et,
- et_signals [TREE_DRAG_END], 0,
+ et_signals[TREE_DRAG_END], 0,
et->priv->drag_row,
et->priv->drag_path,
et->priv->drag_col,
@@ -2794,7 +2842,7 @@ et_drag_data_get(GtkWidget *widget,
ETree *et)
{
g_signal_emit (et,
- et_signals [TREE_DRAG_DATA_GET], 0,
+ et_signals[TREE_DRAG_DATA_GET], 0,
et->priv->drag_row,
et->priv->drag_path,
et->priv->drag_col,
@@ -2810,7 +2858,7 @@ et_drag_data_delete(GtkWidget *widget,
ETree *et)
{
g_signal_emit (et,
- et_signals [TREE_DRAG_DATA_DELETE], 0,
+ et_signals[TREE_DRAG_DATA_DELETE], 0,
et->priv->drag_row,
et->priv->drag_path,
et->priv->drag_col,
@@ -2835,7 +2883,7 @@ do_drag_motion(ETree *et,
&col);
if (row != et->priv->drop_row && col != et->priv->drop_col) {
g_signal_emit (et,
- et_signals [TREE_DRAG_LEAVE], 0,
+ et_signals[TREE_DRAG_LEAVE], 0,
et->priv->drop_row,
et->priv->drop_path,
et->priv->drop_col,
@@ -2849,7 +2897,7 @@ do_drag_motion(ETree *et,
et->priv->drop_path = path;
et->priv->drop_col = col;
g_signal_emit (et,
- et_signals [TREE_DRAG_MOTION], 0,
+ et_signals[TREE_DRAG_MOTION], 0,
et->priv->drop_row,
et->priv->drop_path,
et->priv->drop_col,
@@ -2960,9 +3008,15 @@ hover_timeout (gpointer data)
path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
if (path && e_tree_model_node_is_expandable (et->priv->model, path)) {
if (!e_tree_table_adapter_node_is_expanded (et->priv->etta, path)) {
- if (e_tree_model_has_save_id (et->priv->model) && e_tree_model_has_get_node_by_id (et->priv->model))
- et->priv->expanded_list = g_list_prepend (et->priv->expanded_list, e_tree_model_get_save_id (et->priv->model, path));
- e_tree_table_adapter_node_set_expanded (et->priv->etta, path, TRUE);
+ if (e_tree_model_has_save_id (et->priv->model) &&
+ e_tree_model_has_get_node_by_id (et->priv->model))
+ et->priv->expanded_list = g_list_prepend (
+ et->priv->expanded_list,
+ e_tree_model_get_save_id (
+ et->priv->model, path));
+
+ e_tree_table_adapter_node_set_expanded (
+ et->priv->etta, path, TRUE);
}
}
@@ -3007,7 +3061,9 @@ collapse_drag (ETree *et, ETreePath drop)
ETreePath search;
gboolean found = FALSE;
- for (search = drop; search; search = e_tree_model_node_get_parent (et->priv->model, search)) {
+ for (search = drop; search;
+ search = e_tree_model_node_get_parent (
+ et->priv->model, search)) {
if (path == search) {
found = TRUE;
break;
@@ -3015,7 +3071,8 @@ collapse_drag (ETree *et, ETreePath drop)
}
if (!found)
- e_tree_table_adapter_node_set_expanded (et->priv->etta, path, FALSE);
+ e_tree_table_adapter_node_set_expanded (
+ et->priv->etta, path, FALSE);
}
g_free (save_id);
}
@@ -3060,7 +3117,7 @@ et_drag_leave(GtkWidget *widget,
ETree *et)
{
g_signal_emit (et,
- et_signals [TREE_DRAG_LEAVE], 0,
+ et_signals[TREE_DRAG_LEAVE], 0,
et->priv->drop_row,
et->priv->drop_path,
et->priv->drop_col,
@@ -3141,14 +3198,14 @@ et_drag_drop(GtkWidget *widget,
if (row != et->priv->drop_row && col != et->priv->drop_row) {
g_signal_emit (et,
- et_signals [TREE_DRAG_LEAVE], 0,
+ et_signals[TREE_DRAG_LEAVE], 0,
et->priv->drop_row,
et->priv->drop_path,
et->priv->drop_col,
context,
time);
g_signal_emit (et,
- et_signals [TREE_DRAG_MOTION], 0,
+ et_signals[TREE_DRAG_MOTION], 0,
row,
path,
col,
@@ -3163,7 +3220,7 @@ et_drag_drop(GtkWidget *widget,
et->priv->drop_col = col;
g_signal_emit (et,
- et_signals [TREE_DRAG_DROP], 0,
+ et_signals[TREE_DRAG_DROP], 0,
et->priv->drop_row,
et->priv->drop_path,
et->priv->drop_col,
@@ -3202,7 +3259,7 @@ et_drag_data_received(GtkWidget *widget,
&col);
path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
g_signal_emit (et,
- et_signals [TREE_DRAG_DATA_RECEIVED], 0,
+ et_signals[TREE_DRAG_DATA_RECEIVED], 0,
row,
path,
col,
@@ -3253,7 +3310,7 @@ e_tree_class_init (ETreeClass *class)
class->tree_drag_drop = NULL;
class->tree_drag_data_received = NULL;
- et_signals [CURSOR_CHANGE] =
+ et_signals[CURSOR_CHANGE] =
g_signal_new ("cursor_change",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3262,7 +3319,7 @@ e_tree_class_init (ETreeClass *class)
e_marshal_NONE__INT_POINTER,
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_POINTER);
- et_signals [CURSOR_ACTIVATED] =
+ et_signals[CURSOR_ACTIVATED] =
g_signal_new ("cursor_activated",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3271,7 +3328,7 @@ e_tree_class_init (ETreeClass *class)
e_marshal_NONE__INT_POINTER,
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_POINTER);
- et_signals [SELECTION_CHANGE] =
+ et_signals[SELECTION_CHANGE] =
g_signal_new ("selection_change",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3280,7 +3337,7 @@ e_tree_class_init (ETreeClass *class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- et_signals [DOUBLE_CLICK] =
+ et_signals[DOUBLE_CLICK] =
g_signal_new ("double_click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3290,7 +3347,7 @@ e_tree_class_init (ETreeClass *class)
G_TYPE_NONE, 4, G_TYPE_INT,
G_TYPE_POINTER, G_TYPE_INT, GDK_TYPE_EVENT);
- et_signals [RIGHT_CLICK] =
+ et_signals[RIGHT_CLICK] =
g_signal_new ("right_click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3300,7 +3357,7 @@ e_tree_class_init (ETreeClass *class)
G_TYPE_BOOLEAN, 4, G_TYPE_INT, G_TYPE_POINTER,
G_TYPE_INT, GDK_TYPE_EVENT);
- et_signals [CLICK] =
+ et_signals[CLICK] =
g_signal_new ("click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3310,7 +3367,7 @@ e_tree_class_init (ETreeClass *class)
G_TYPE_BOOLEAN, 4, G_TYPE_INT, G_TYPE_POINTER,
G_TYPE_INT, GDK_TYPE_EVENT);
- et_signals [KEY_PRESS] =
+ et_signals[KEY_PRESS] =
g_signal_new ("key_press",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3320,7 +3377,7 @@ e_tree_class_init (ETreeClass *class)
G_TYPE_BOOLEAN, 4, G_TYPE_INT, G_TYPE_POINTER,
G_TYPE_INT, GDK_TYPE_EVENT);
- et_signals [START_DRAG] =
+ et_signals[START_DRAG] =
g_signal_new ("start_drag",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3330,7 +3387,7 @@ e_tree_class_init (ETreeClass *class)
G_TYPE_NONE, 4, G_TYPE_INT, G_TYPE_POINTER,
G_TYPE_INT, GDK_TYPE_EVENT);
- et_signals [STATE_CHANGE] =
+ et_signals[STATE_CHANGE] =
g_signal_new ("state_change",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3339,7 +3396,7 @@ e_tree_class_init (ETreeClass *class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- et_signals [WHITE_SPACE_EVENT] =
+ et_signals[WHITE_SPACE_EVENT] =
g_signal_new ("white_space_event",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -3547,11 +3604,15 @@ tree_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETree *tree)
g_return_if_fail (tree->priv != NULL);
g_return_if_fail (tree->priv->info_text != NULL);
- gnome_canvas_get_scroll_region (GNOME_CANVAS (tree->priv->table_canvas), NULL, NULL, &width, NULL);
+ gnome_canvas_get_scroll_region (
+ GNOME_CANVAS (tree->priv->table_canvas),
+ NULL, NULL, &width, NULL);
width -= 60.0;
- g_object_set (tree->priv->info_text, "width", width, "clip_width", width, NULL);
+ g_object_set (
+ tree->priv->info_text, "width", width,
+ "clip_width", width, NULL);
}
/**
@@ -3599,7 +3660,9 @@ e_tree_set_info_message (ETree *tree, const gchar *info_message)
e_canvas_item_move_absolute (tree->priv->info_text, 30, 30);
- tree->priv->info_text_resize_id = g_signal_connect (tree, "size_allocate", G_CALLBACK (tree_size_allocate), tree);
+ tree->priv->info_text_resize_id = g_signal_connect (
+ tree, "size_allocate",
+ G_CALLBACK (tree_size_allocate), tree);
} else
gnome_canvas_item_set (tree->priv->info_text, "text", info_message, NULL);
}
diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c
index 85c4f9164d..f2b865ac0c 100644
--- a/widgets/table/gal-a11y-e-table-item.c
+++ b/widgets/table/gal-a11y-e-table-item.c
@@ -42,13 +42,13 @@
#include "gal-a11y-e-cell.h"
#include "gal-a11y-e-table-column-header.h"
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETableItemClass))
static GObjectClass *parent_class;
static AtkComponentIface *component_parent_iface;
static GType parent_type;
static gint priv_offset;
static GQuark quark_accessible_object = 0;
-#define GET_PRIVATE(object) ((GalA11yETableItemPrivate *) (((gchar *) object) + priv_offset))
+#define GET_PRIVATE(object) \
+ ((GalA11yETableItemPrivate *) (((gchar *) object) + priv_offset))
#define PARENT_TYPE (parent_type)
struct _GalA11yETableItemPrivate {
@@ -156,7 +156,9 @@ eti_a11y_get_gobject (AtkObject *accessible)
}
static void
-eti_a11y_reset_focus_object (GalA11yETableItem *a11y, ETableItem *item, gboolean notify)
+eti_a11y_reset_focus_object (GalA11yETableItem *a11y,
+ ETableItem *item,
+ gboolean notify)
{
ESelectionModel * esm;
gint cursor_row, cursor_col, view_row, view_col;
@@ -270,7 +272,9 @@ eti_get_extents (AtkComponent *component,
coord_type);
if (parent && GAL_A11Y_IS_E_TABLE_CLICK_TO_ADD (parent)) {
- ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (parent)));
+ ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (
+ atk_gobject_accessible_get_object (
+ ATK_GOBJECT_ACCESSIBLE (parent)));
if (etcta) {
*width = etcta->width;
*height = etcta->height;
@@ -366,9 +370,13 @@ eti_ref_at (AtkTable *table, gint row, gint column)
(GWeakNotify) cell_destroyed,
ret);
/* if current cell is focused, add FOCUSED state */
- if (e_selection_model_cursor_row (item->selection) == GAL_A11Y_E_CELL (ret)->row &&
- e_selection_model_cursor_col (item->selection) == GAL_A11Y_E_CELL (ret)->model_col)
- gal_a11y_e_cell_add_state (GAL_A11Y_E_CELL (ret), ATK_STATE_FOCUSED, FALSE);
+ if (e_selection_model_cursor_row (item->selection) ==
+ GAL_A11Y_E_CELL (ret)->row &&
+ e_selection_model_cursor_col (item->selection) ==
+ GAL_A11Y_E_CELL (ret)->model_col)
+ gal_a11y_e_cell_add_state (
+ GAL_A11Y_E_CELL (ret),
+ ATK_STATE_FOCUSED, FALSE);
} else
ret = NULL;
@@ -565,7 +573,8 @@ table_is_row_selected (AtkTable *table, gint row)
if (!item)
return FALSE;
- return e_selection_model_is_row_selected(item->selection, view_to_model_row (item, row));
+ return e_selection_model_is_row_selected (
+ item->selection, view_to_model_row (item, row));
}
static gboolean
@@ -697,8 +706,8 @@ eti_rows_inserted (ETableModel * model, gint row, gint count,
g_signal_emit_by_name (table_item, "row-inserted", row,
count, NULL);
- for (i = row; i < (row + count); i ++) {
- for (j = 0; j < n_cols; j ++) {
+ for (i = row; i < (row + count); i++) {
+ for (j = 0; j < n_cols; j++) {
g_signal_emit_by_name (table_item,
"children_changed::add",
( ((i + 1)*n_cols) + j), NULL, NULL);
@@ -713,7 +722,9 @@ eti_rows_deleted (ETableModel * model, gint row, gint count,
AtkObject * table_item)
{
gint i,j, n_rows, n_cols, old_nrows;
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table_item)));
+ ETableItem *item = E_TABLE_ITEM (
+ atk_gobject_accessible_get_object (
+ ATK_GOBJECT_ACCESSIBLE (table_item)));
n_rows = atk_table_get_n_rows (ATK_TABLE(table_item));
n_cols = atk_table_get_n_columns (ATK_TABLE(table_item));
@@ -727,8 +738,8 @@ eti_rows_deleted (ETableModel * model, gint row, gint count,
g_signal_emit_by_name (table_item, "row-deleted", row,
count, NULL);
- for (i = row; i < (row + count); i ++) {
- for (j = 0; j < n_cols; j ++) {
+ for (i = row; i < (row + count); i++) {
+ for (j = 0; j < n_cols; j++) {
g_signal_emit_by_name (table_item,
"children_changed::remove",
( ((i + 1)*n_cols) + j), NULL, NULL);
@@ -797,8 +808,8 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
reorder = g_malloc0 (sizeof (gint) * n_cols);
/* Compare with previously saved column headers. */
- for ( i = 0; i < n_cols && cols[i]; i ++ ) {
- for ( j = 0; j < prev_n_cols && prev_cols[j]; j ++ ) {
+ for (i = 0; i < n_cols && cols[i]; i++) {
+ for (j = 0; j < prev_n_cols && prev_cols[j]; j++) {
if (prev_cols [j] == cols[i] && i != j) {
reorder_found = TRUE;
@@ -820,8 +831,8 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
}
/* Now try to find if there are removed columns. */
- for (i = 0; i < prev_n_cols && prev_cols[i]; i ++) {
- for (j = 0; j < n_cols && cols[j]; j ++)
+ for (i = 0; i < prev_n_cols && prev_cols[i]; i++) {
+ for (j = 0; j < n_cols && cols[j]; j++)
if (prev_cols [j] == cols[i])
break;
@@ -843,19 +854,31 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
if (removed_found) {
for (i = 0; i < prev_n_cols; i ++ ) {
if (prev_state[i] == ETI_HEADER_REMOVED) {
- g_signal_emit_by_name (G_OBJECT(a11y_item), "column-deleted", i, 1);
- for (j = 0; j < n_rows; j ++)
- g_signal_emit_by_name (G_OBJECT(a11y_item), "children_changed::remove", ((j+1)*prev_n_cols+i), NULL, NULL);
+ g_signal_emit_by_name (
+ G_OBJECT(a11y_item),
+ "column-deleted", i, 1);
+ for (j = 0; j < n_rows; j++)
+ g_signal_emit_by_name (
+ G_OBJECT(a11y_item),
+ "children_changed::remove",
+ ((j+1)*prev_n_cols+i),
+ NULL, NULL);
}
}
}
if (added_found) {
- for ( i = 0; i < n_cols; i ++ ) {
+ for (i = 0; i < n_cols; i++) {
if (state[i] == ETI_HEADER_NEW_ADDED) {
- g_signal_emit_by_name (G_OBJECT(a11y_item), "column-inserted", i, 1);
- for (j = 0; j < n_rows; j ++)
- g_signal_emit_by_name (G_OBJECT(a11y_item), "children_changed::add", ((j+1)*n_cols+i), NULL, NULL);
+ g_signal_emit_by_name (
+ G_OBJECT(a11y_item),
+ "column-inserted", i, 1);
+ for (j = 0; j < n_rows; j++)
+ g_signal_emit_by_name (
+ G_OBJECT(a11y_item),
+ "children_changed::add",
+ ((j+1)*n_cols+i),
+ NULL, NULL);
}
}
}
@@ -899,16 +922,17 @@ eti_class_init (GalA11yETableItemClass *klass)
AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- quark_accessible_object = g_quark_from_static_string ("gtk-accessible-object");
+ quark_accessible_object =
+ g_quark_from_static_string ("gtk-accessible-object");
- parent_class = g_type_class_ref (PARENT_TYPE);
+ parent_class = g_type_class_ref (PARENT_TYPE);
- object_class->dispose = eti_dispose;
+ object_class->dispose = eti_dispose;
- atk_object_class->get_n_children = eti_get_n_children;
- atk_object_class->ref_child = eti_ref_child;
- atk_object_class->initialize = eti_real_initialize;
- atk_object_class->ref_state_set = eti_ref_state_set;
+ atk_object_class->get_n_children = eti_get_n_children;
+ atk_object_class->ref_child = eti_ref_child;
+ atk_object_class->initialize = eti_real_initialize;
+ atk_object_class->ref_state_set = eti_ref_state_set;
}
static void
@@ -925,15 +949,16 @@ eti_init (GalA11yETableItem *a11y)
/* atk selection */
-static void atk_selection_interface_init (AtkSelectionIface *iface);
-static gboolean selection_add_selection (AtkSelection *selection,
- gint i);
-static gboolean selection_clear_selection (AtkSelection *selection);
-static AtkObject* selection_ref_selection (AtkSelection *selection,
- gint i);
-static gint selection_get_selection_count (AtkSelection *selection);
-static gboolean selection_is_child_selected (AtkSelection *selection,
- gint i);
+static void atk_selection_interface_init (AtkSelectionIface *iface);
+static gboolean selection_add_selection (AtkSelection *selection,
+ gint i);
+static gboolean selection_clear_selection (AtkSelection *selection);
+static AtkObject *
+ selection_ref_selection (AtkSelection *selection,
+ gint i);
+static gint selection_get_selection_count (AtkSelection *selection);
+static gboolean selection_is_child_selected (AtkSelection *selection,
+ gint i);
/* callbacks */
static void eti_a11y_selection_model_removed_cb (ETableItem *eti,
@@ -995,11 +1020,13 @@ gal_a11y_e_table_item_get_type (void)
NULL
};
- factory = atk_registry_get_factory (atk_get_default_registry (), GNOME_TYPE_CANVAS_ITEM);
+ factory = atk_registry_get_factory (
+ atk_get_default_registry (), GNOME_TYPE_CANVAS_ITEM);
parent_type = atk_object_factory_get_accessible_type (factory);
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yETableItem", &info, 0,
- sizeof (GalA11yETableItemPrivate), &priv_offset);
+ type = gal_a11y_type_register_static_with_private (
+ PARENT_TYPE, "GalA11yETableItem", &info, 0,
+ sizeof (GalA11yETableItemPrivate), &priv_offset);
g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
g_type_add_interface_static (type, ATK_TYPE_TABLE, &atk_table_info);
@@ -1051,7 +1078,8 @@ gal_a11y_e_table_item_new (ETableItem *item)
item->selection);
/* find the TableItem's parent: table or tree */
- GET_PRIVATE (a11y)->widget = gtk_widget_get_parent (GTK_WIDGET (item->parent.canvas));
+ GET_PRIVATE (a11y)->widget = gtk_widget_get_parent (
+ GTK_WIDGET (item->parent.canvas));
parent = gtk_widget_get_accessible (GET_PRIVATE (a11y)->widget);
name = atk_object_get_name (parent);
if (name)
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c
index b35856808c..ddbbf5a987 100644
--- a/widgets/text/e-reflow.c
+++ b/widgets/text/e-reflow.c
@@ -259,7 +259,7 @@ incarnate (EReflow *reflow)
last_column = value + page_size + 1 - E_REFLOW_BORDER_WIDTH - E_REFLOW_DIVIDER_WIDTH;
last_column /= column_width + E_REFLOW_FULL_GUTTER;
- last_column ++;
+ last_column++;
if (first_column >= 0 && first_column < reflow->column_count)
first_cell = reflow->columns[first_column];
@@ -335,7 +335,7 @@ reflow_columns (EReflow *reflow)
gint unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), i);
if (i != 0 && running_height + reflow->heights[unsorted] + E_REFLOW_BORDER_WIDTH > reflow->height) {
list = g_slist_prepend (list, GINT_TO_POINTER(i));
- column_count ++;
+ column_count++;
running_height = E_REFLOW_BORDER_WIDTH * 2 + reflow->heights[unsorted];
} else
running_height += reflow->heights[unsorted] + E_REFLOW_BORDER_WIDTH;
@@ -343,7 +343,7 @@ reflow_columns (EReflow *reflow)
reflow->column_count = column_count;
reflow->columns = g_renew (int, reflow->columns, column_count);
- column_count --;
+ column_count--;
for (; column_count > column_start; column_count--) {
GSList *to_free;
@@ -403,7 +403,7 @@ item_removed (EReflowModel *model, gint i, EReflow *reflow)
memmove (reflow->heights + i, reflow->heights + i + 1, (reflow->count - i - 1) * sizeof (gint));
memmove (reflow->items + i, reflow->items + i + 1, (reflow->count - i - 1) * sizeof (GnomeCanvasItem *));
- reflow->count --;
+ reflow->count--;
reflow->heights [reflow->count] = 0;
reflow->items [reflow->count] = NULL;
@@ -448,7 +448,7 @@ items_inserted (EReflowModel *model, gint position, gint count, EReflow *reflow)
else
e_sorter_array_set_count (reflow->sorter, reflow->count);
- for (i = position; i < position + count; i ++) {
+ for (i = position; i < position + count; i++) {
gint sorted = e_sorter_model_to_sorted (E_SORTER (reflow->sorter), i);
gint c;
@@ -1401,7 +1401,7 @@ e_reflow_reflow( GnomeCanvasItem *item, gint flags )
if (next_column < reflow->column_count && i == reflow->columns[next_column]) {
running_height = E_REFLOW_BORDER_WIDTH;
running_width += reflow->column_width + E_REFLOW_FULL_GUTTER;
- next_column ++;
+ next_column++;
}
if (unsorted >= 0 && reflow->items[unsorted]) {
diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c
index 5f3b88d366..b65ee7e6cc 100644
--- a/widgets/text/e-text-model.c
+++ b/widgets/text/e-text-model.c
@@ -248,7 +248,7 @@ e_text_model_real_insert_length (ETextModel *model,
for (p = text, l = 0;
l < length;
- p = g_utf8_next_char (p), l ++);
+ p = g_utf8_next_char (p), l++);
byte_length = p - text;
@@ -278,7 +278,7 @@ e_text_model_real_delete (ETextModel *model, gint position, gint length)
for (p = offs, l = 0;
l < length;
- p = g_utf8_next_char (p), l ++);
+ p = g_utf8_next_char (p), l++);
byte_length = p - offs;
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index bb55b87f4c..0383b00597 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -112,10 +112,16 @@ enum {
PROP_HANDLE_POPUP
};
-static void e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gpointer data);
+static void e_text_command (ETextEventProcessor *tep,
+ ETextEventProcessorCommand *command,
+ gpointer data);
-static void e_text_text_model_changed(ETextModel *model, EText *text);
-static void e_text_text_model_reposition (ETextModel *model, ETextModelReposFn fn, gpointer repos_data, gpointer data);
+static void e_text_text_model_changed (ETextModel *model,
+ EText *text);
+static void e_text_text_model_reposition (ETextModel *model,
+ ETextModelReposFn fn,
+ gpointer repos_data,
+ gpointer data);
static void _get_tep(EText *text);
@@ -395,7 +401,9 @@ create_layout (EText *text)
text->layout = gtk_widget_create_pango_layout (GTK_WIDGET (item->canvas), text->text);
if (text->line_wrap)
- pango_layout_set_width (text->layout, text->clip_width < 0 ? -1 : text->clip_width * PANGO_SCALE);
+ pango_layout_set_width (
+ text->layout, text->clip_width < 0
+ ? -1 : text->clip_width * PANGO_SCALE);
reset_layout_attrs (text);
}
@@ -440,7 +448,9 @@ reset_layout (EText *text)
PangoRectangle strong_pos, weak_pos;
gchar *offs = g_utf8_offset_to_pointer (text->text, text->selection_start);
- pango_layout_get_cursor_pos (text->layout, offs - text->text, &strong_pos, &weak_pos);
+ pango_layout_get_cursor_pos (
+ text->layout, offs - text->text,
+ &strong_pos, &weak_pos);
if (strong_pos.x != weak_pos.x ||
strong_pos.y != weak_pos.y ||
@@ -472,7 +482,10 @@ e_text_text_model_changed (ETextModel *model, EText *text)
}
static void
-e_text_text_model_reposition (ETextModel *model, ETextModelReposFn fn, gpointer repos_data, gpointer user_data)
+e_text_text_model_reposition (ETextModel *model,
+ ETextModelReposFn fn,
+ gpointer repos_data,
+ gpointer user_data)
{
EText *text = E_TEXT (user_data);
gint model_len = e_text_model_get_text_length (model);
@@ -620,8 +633,9 @@ calc_ellipsis (EText *text)
{
/* FIXME: a pango layout per calc_ellipsis sucks */
gint width;
- PangoLayout *layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas),
- text->ellipsis ? text->ellipsis : "...");
+ PangoLayout *layout = gtk_widget_create_pango_layout (
+ GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas),
+ text->ellipsis ? text->ellipsis : "...");
pango_layout_get_size (layout, &width, NULL);
text->ellipsis_width = width;
@@ -781,7 +795,9 @@ e_text_set_property (GObject *object,
calc_ellipsis (text);
if (text->line_wrap) {
if (text->layout)
- pango_layout_set_width (text->layout, text->clip_width < 0 ? -1 : text->clip_width * PANGO_SCALE);
+ pango_layout_set_width (
+ text->layout, text->clip_width < 0
+ ? -1 : text->clip_width * PANGO_SCALE);
text->needs_split_into_lines = 1;
} else {
text->needs_calc_height = 1;
@@ -890,7 +906,9 @@ e_text_set_property (GObject *object,
text->line_wrap = g_value_get_boolean (value);
if (text->line_wrap) {
if (text->layout) {
- pango_layout_set_width (text->layout, text->width < 0 ? -1 : text->width * PANGO_SCALE);
+ pango_layout_set_width (
+ text->layout, text->width < 0
+ ? -1 : text->width * PANGO_SCALE);
}
}
text->needs_split_into_lines = 1;
@@ -919,7 +937,9 @@ e_text_set_property (GObject *object,
calc_ellipsis (text);
if (text->line_wrap) {
if (text->layout) {
- pango_layout_set_width (text->layout, text->width < 0 ? -1 : text->width * PANGO_SCALE);
+ pango_layout_set_width (
+ text->layout, text->width < 0 ?
+ -1 : text->width * PANGO_SCALE);
}
text->needs_split_into_lines = 1;
}
@@ -992,7 +1012,8 @@ e_text_set_property (GObject *object,
}
if (color_changed) {
- GdkColormap *colormap = gtk_widget_get_colormap (GTK_WIDGET (item->canvas));
+ GdkColormap *colormap = gtk_widget_get_colormap (
+ GTK_WIDGET (item->canvas));
text->color = color;
gdk_rgb_find_color (colormap, &text->color);
@@ -1124,7 +1145,11 @@ e_text_get_property (GObject *object,
break;
case PROP_HEIGHT:
- g_value_set_double (value, text->clip && text->clip_height != -1 ? text->clip_height : text->height / text->item.canvas->pixels_per_unit);
+ g_value_set_double (
+ value, text->clip &&
+ text->clip_height != -1 ?
+ text->clip_height : text->height /
+ text->item.canvas->pixels_per_unit);
break;
case PROP_DRAW_BORDERS:
@@ -1200,7 +1225,8 @@ e_text_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint f
text = E_TEXT (item);
if (GNOME_CANVAS_ITEM_CLASS (e_text_parent_class)->update)
- (* GNOME_CANVAS_ITEM_CLASS (e_text_parent_class)->update) (item, affine, clip_path, flags);
+ GNOME_CANVAS_ITEM_CLASS (e_text_parent_class)->update (
+ item, affine, clip_path, flags);
if ( text->needs_recalc_bounds
|| (flags & GNOME_CANVAS_UPDATE_AFFINE)) {
@@ -1292,7 +1318,11 @@ _get_tep(EText *text)
}
static void
-draw_pango_rectangle (GdkDrawable *drawable, GdkGC *gc, gint x1, gint y1, PangoRectangle rect)
+draw_pango_rectangle (GdkDrawable *drawable,
+ GdkGC *gc,
+ gint x1,
+ gint y1,
+ PangoRectangle rect)
{
gint width = rect.width / PANGO_SCALE;
gint height = rect.height / PANGO_SCALE;
@@ -1661,7 +1691,10 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
PangoRectangle strong_pos, weak_pos;
gchar *offs = g_utf8_offset_to_pointer (text->text, text->selection_start);
- pango_layout_get_cursor_pos (text->layout, offs - text->text + text->preedit_len, &strong_pos, &weak_pos);
+ pango_layout_get_cursor_pos (
+ text->layout, offs - text->text +
+ text->preedit_len, &strong_pos,
+ &weak_pos);
draw_pango_rectangle (drawable, main_gc, xpos, ypos, strong_pos);
if (strong_pos.x != weak_pos.x ||
strong_pos.y != weak_pos.y ||
@@ -1729,7 +1762,11 @@ e_text_point (GnomeCanvasItem *item, gdouble x, gdouble y,
/* Bounds handler for the text item */
static void
-e_text_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2)
+e_text_bounds (GnomeCanvasItem *item,
+ gdouble *x1,
+ gdouble *y1,
+ gdouble *x2,
+ gdouble *y2)
{
EText *text;
gdouble width, height;
@@ -1816,7 +1853,9 @@ get_position_from_xy (EText *text, gint x, gint y)
x -= text->cx;
y -= text->cy;
- pango_layout_xy_to_index (text->layout, x * PANGO_SCALE, y * PANGO_SCALE, &index, &trailing);
+ pango_layout_xy_to_index (
+ text->layout, x * PANGO_SCALE,
+ y * PANGO_SCALE, &index, &trailing);
return g_utf8_pointer_to_offset (text->text, text->text + index + trailing);
}
@@ -2012,11 +2051,12 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
*/
if (save_text && save_text->im_context) {
- g_signal_handlers_disconnect_matched (save_text->im_context,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL,
- NULL, save_text);
- save_text->im_context_signals_registered = FALSE;
+ g_signal_handlers_disconnect_matched (
+ save_text->im_context,
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, save_text);
+ save_text->im_context_signals_registered =
+ FALSE;
}
if (text->im_context) {
@@ -2091,7 +2131,9 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
GdkEventKey key;
gint ret;
- if (text->im_context && gtk_im_context_filter_keypress (text->im_context, (GdkEventKey*)event)) {
+ if (text->im_context &&
+ gtk_im_context_filter_keypress (
+ text->im_context, (GdkEventKey*)event)) {
text->need_im_reset = TRUE;
return 1;
}
@@ -2106,7 +2148,9 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
e_tep_event.key.length = key.length;
e_tep_event.key.string = key.string;
#else
- e_tep_event.key.string = e_utf8_from_gtk_event_key (GTK_WIDGET (item->canvas), key.keyval, key.string);
+ e_tep_event.key.string = e_utf8_from_gtk_event_key (
+ GTK_WIDGET (item->canvas),
+ key.keyval, key.string);
if (e_tep_event.key.string != NULL) {
e_tep_event.key.length = strlen (e_tep_event.key.string);
} else {
@@ -2260,14 +2304,17 @@ e_text_copy_clipboard (EText *text)
selection_end_pos = MAX (text->selection_start, text->selection_end);
/* convert sel_start/sel_end to byte indices */
- selection_start_pos = g_utf8_offset_to_pointer (text->text, selection_start_pos) - text->text;
- selection_end_pos = g_utf8_offset_to_pointer (text->text, selection_end_pos) - text->text;
+ selection_start_pos = g_utf8_offset_to_pointer (
+ text->text, selection_start_pos) - text->text;
+ selection_end_pos = g_utf8_offset_to_pointer (
+ text->text, selection_end_pos) - text->text;
gtk_clipboard_set_text (
- gtk_widget_get_clipboard (GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas),
- GDK_SELECTION_CLIPBOARD),
- text->text + selection_start_pos,
- selection_end_pos - selection_start_pos);
+ gtk_widget_get_clipboard (
+ GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas),
+ GDK_SELECTION_CLIPBOARD),
+ text->text + selection_start_pos,
+ selection_end_pos - selection_start_pos);
}
void
@@ -2342,7 +2389,8 @@ primary_clear_cb (GtkClipboard *clipboard,
{
#ifdef notyet
/* XXX */
- gtk_editable_select_region (GTK_EDITABLE (entry), entry->current_pos, entry->current_pos);
+ gtk_editable_select_region (
+ GTK_EDITABLE (entry), entry->current_pos, entry->current_pos);
#endif
}
@@ -2358,7 +2406,9 @@ e_text_update_primary_selection (EText *text)
};
GtkClipboard *clipboard;
- clipboard = gtk_widget_get_clipboard (GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas), GDK_SELECTION_PRIMARY);
+ clipboard = gtk_widget_get_clipboard (
+ GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas),
+ GDK_SELECTION_PRIMARY);
if (text->selection_start != text->selection_end) {
if (!gtk_clipboard_set_with_owner (clipboard, targets, G_N_ELEMENTS (targets),
@@ -2412,7 +2462,11 @@ popup_menu_detach (GtkWidget *attach_widget,
}
static void
-popup_menu_placement_cb (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data)
+popup_menu_placement_cb (GtkMenu *menu,
+ gint *x,
+ gint *y,
+ gboolean *push_in,
+ gpointer user_data)
{
EText *text = E_TEXT(user_data);
GnomeCanvasItem *item = &text->item;
@@ -2454,7 +2508,9 @@ popup_targets_received (GtkClipboard *clipboard,
gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), menuitem);
g_signal_connect_swapped (menuitem, "activate",
G_CALLBACK (e_text_cut_clipboard), text);
- gtk_widget_set_sensitive (menuitem, text->editable && (text->selection_start != text->selection_end));
+ gtk_widget_set_sensitive (
+ menuitem, text->editable &&
+ (text->selection_start != text->selection_end));
/* copy menu item */
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_COPY, NULL);
@@ -2470,7 +2526,9 @@ popup_targets_received (GtkClipboard *clipboard,
gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), menuitem);
g_signal_connect_swapped (menuitem, "activate",
G_CALLBACK (e_text_paste_clipboard), text);
- gtk_widget_set_sensitive (menuitem, text->editable && gtk_selection_data_targets_include_text (data));
+ gtk_widget_set_sensitive (
+ menuitem, text->editable &&
+ gtk_selection_data_targets_include_text (data));
menuitem = gtk_menu_item_new_with_label (_("Select All"));
gtk_widget_show (menuitem);
@@ -2608,7 +2666,8 @@ find_offset_into_line (EText *text, gint offset_into_text, gchar **start_of_line
}
/* direction = TRUE (move forward), FALSE (move backward)
- Any error shall return length(text->text) or 0 or text->selection_end (as deemed fit) */
+ Any error shall return length(text->text) or 0 or
+ text->selection_end (as deemed fit) */
static gint
_get_updated_position (EText *text, gboolean direction)
{
@@ -2634,7 +2693,8 @@ _get_updated_position (EText *text, gboolean direction)
if (!g_utf8_validate(text->text, -1, NULL))
return text->selection_end;
- /* get layout's PangoLogAttr to facilitate moving when moving across grapheme cluster as in indic langs */
+ /* get layout's PangoLogAttr to facilitate moving when
+ * moving across grapheme cluster as in indic langs */
pango_layout_get_log_attrs (text->layout, &log_attrs, &n_attrs);
/* Fetch the current gchar index in the line & keep moving
@@ -2748,14 +2808,16 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
if (text->selection_end >= length)
new_pos = length;
else
- new_pos = _get_updated_position(text, TRUE); /* get updated position to display cursor */
+ /* get updated position to display cursor */
+ new_pos = _get_updated_position(text, TRUE);
break;
case E_TEP_BACKWARD_CHARACTER:
new_pos = 0;
if (text->selection_end >= 1)
- new_pos = _get_updated_position(text, FALSE); /* get updated position to display cursor */
+ /* get updated position to display cursor */
+ new_pos = _get_updated_position (text, FALSE);
break;
@@ -2768,12 +2830,14 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
if (text->selection_end >= 1) {
gint pos = text->selection_end;
- p = g_utf8_find_prev_char (text->text, g_utf8_offset_to_pointer (text->text, text->selection_end));
- pos --;
+ p = g_utf8_find_prev_char (
+ text->text, g_utf8_offset_to_pointer (
+ text->text, text->selection_end));
+ pos--;
if (p != text->text) {
p = g_utf8_find_prev_char (text->text, p);
- pos --;
+ pos--;
while (p && p > text->text) {
unival = g_utf8_get_char (p);
@@ -2783,7 +2847,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
}
else {
p = g_utf8_find_prev_char (text->text, p);
- pos --;
+ pos--;
}
}
}
@@ -2813,7 +2877,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
p = g_utf8_next_char (p);
while (offset_into_line > 0 && p && *p != '\n' && *p != '\0') {
p = g_utf8_next_char (p);
- offset_into_line --;
+ offset_into_line--;
}
}
@@ -2837,7 +2901,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
p = g_utf8_find_prev_char (text->text, p);
while (p > text->text) {
if (*p == '\n') {
- p ++;
+ p++;
break;
}
p = g_utf8_find_prev_char (text->text, p);
@@ -2851,7 +2915,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
while (offset_into_line > 0 && p && *p != '\n' && *p != '\0') {
p = g_utf8_next_char (p);
- offset_into_line --;
+ offset_into_line--;
}
/* at this point, p points to the new location,
@@ -2894,7 +2958,9 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
else
text->selection_start = g_utf8_pointer_to_offset (text->text, p);
- text->selection_start = e_text_model_validate_position (text->model, text->selection_start);
+ text->selection_start =
+ e_text_model_validate_position (
+ text->model, text->selection_start);
length = g_utf8_strlen (text->text, -1);
if (text->selection_end >= length) {
@@ -3024,7 +3090,9 @@ capitalize (EText *text, gint start, gint end, ETextEventProcessorCaps type)
}
static void
-e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gpointer data)
+e_text_command (ETextEventProcessor *tep,
+ ETextEventProcessorCommand *command,
+ gpointer data)
{
EText *text = E_TEXT(data);
gboolean scroll = TRUE;
@@ -3041,7 +3109,9 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
use_start = TRUE;
break;
case E_TEP_SELECT:
- text->selection_start = e_text_model_validate_position (text->model, text->selection_start); /* paranoia */
+ text->selection_start =
+ e_text_model_validate_position (
+ text->model, text->selection_start); /* paranoia */
text->selection_end = _get_position(text, command);
e_text_update_primary_selection (text);
@@ -3117,11 +3187,18 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
break;
case E_TEP_CAPS:
if (text->selection_start == text->selection_end) {
- capitalize (text, text->selection_start, next_word (text, text->selection_start), command->value);
+ capitalize (
+ text, text->selection_start,
+ next_word (text, text->selection_start),
+ command->value);
} else {
- gint selection_start = MIN (text->selection_start, text->selection_end);
- gint selection_end = MAX (text->selection_start, text->selection_end);
- capitalize (text, selection_start, selection_end, command->value);
+ gint selection_start = MIN (
+ text->selection_start, text->selection_end);
+ gint selection_end = MAX (
+ text->selection_start, text->selection_end);
+ capitalize (
+ text, selection_start,
+ selection_end, command->value);
}
break;
case E_TEP_NOP:
@@ -3149,12 +3226,14 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
selection_index = use_start ? text->selection_start : text->selection_end;
/* convert to a byte index */
- selection_index = g_utf8_offset_to_pointer (text->text, selection_index) - text->text;
+ selection_index = g_utf8_offset_to_pointer (
+ text->text, selection_index) - text->text;
do {
PangoLayoutLine *line = pango_layout_iter_get_line (iter);
- if (selection_index >= line->start_index && selection_index <= line->start_index + line->length) {
+ if (selection_index >= line->start_index &&
+ selection_index <= line->start_index + line->length) {
/* found the line with the start of the selection */
cur_line = line;
break;
@@ -3168,7 +3247,8 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
/* gboolean trailing = FALSE; */
PangoRectangle pango_pos;
- if (selection_index > 0 && selection_index == cur_line->start_index + cur_line->length) {
+ if (selection_index > 0 && selection_index ==
+ cur_line->start_index + cur_line->length) {
selection_index--;
/* trailing = TRUE; */
}
@@ -3612,7 +3692,6 @@ e_text_init (EText *text)
text->allow_newlines = TRUE;
text->last_type_request = -1;
- d(g_print ("Setting last_type_request to %d at line %d\n", text->last_type_request, __LINE__));
text->last_time_request = 0;
text->queued_requests = NULL;
@@ -3651,7 +3730,8 @@ e_text_preedit_changed_cb (GtkIMContext *context,
cursor_pos = CLAMP (cursor_pos, 0, g_utf8_strlen (preedit_string, -1));
etext->preedit_len = strlen (preedit_string);
- etext->preedit_pos = g_utf8_offset_to_pointer (preedit_string, cursor_pos) - preedit_string;
+ etext->preedit_pos = g_utf8_offset_to_pointer (
+ preedit_string, cursor_pos) - preedit_string;
g_free (preedit_string);
g_signal_emit (etext, e_text_signals[E_TEXT_KEYPRESS], 0, 0, 0);
@@ -3661,10 +3741,10 @@ static gboolean
e_text_retrieve_surrounding_cb (GtkIMContext *context,
EText *text)
{
- gtk_im_context_set_surrounding (context,
- text->text,
- strlen (text->text),
- g_utf8_offset_to_pointer (text->text, MIN (text->selection_start, text->selection_end)) - text->text);
+ gtk_im_context_set_surrounding (
+ context, text->text, strlen (text->text),
+ g_utf8_offset_to_pointer (text->text, MIN (
+ text->selection_start, text->selection_end)) - text->text);
return TRUE;
}