aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-col-dnd.h
Commit message (Expand)AuthorAgeFilesLines
* Added #include <libgnome/gnome-defs.h>.Christopher James Lahey2002-01-171-0/+2
* Changed the license announcement at the top of these files.Christopher James Lahey2001-10-271-0/+23
* From a patch submitted by Murray Cumming <Murray.Cumming@mybau.com>Christopher James Lahey2001-02-171-0/+4
* Add missing filesArturo Espinosa1999-12-111-0/+10
ass='mode'>-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c6
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c4
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c20
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c10
-rw-r--r--addressbook/gui/widgets/e-minicard.c16
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c6
-rw-r--r--calendar/gui/alarm-notify/config-data.c33
-rw-r--r--calendar/gui/dialogs/recurrence-page.c4
-rw-r--r--calendar/gui/e-alarm-list.c8
-rw-r--r--calendar/gui/e-cal-list-view.c4
-rw-r--r--calendar/gui/e-date-time-list.c10
-rw-r--r--calendar/gui/e-day-view-layout.c22
-rw-r--r--calendar/gui/e-day-view-time-item.c6
-rw-r--r--calendar/gui/e-day-view.c2
-rw-r--r--calendar/gui/e-meeting-list-view.c14
-rw-r--r--calendar/gui/e-meeting-store.c2
-rw-r--r--calendar/gui/e-meeting-time-sel-item.c4
-rw-r--r--calendar/gui/e-meeting-time-sel.c26
-rw-r--r--calendar/gui/e-memo-table.c4
-rw-r--r--calendar/gui/e-select-names-renderer.c4
-rw-r--r--calendar/gui/e-task-table.c4
-rw-r--r--calendar/gui/e-week-view-layout.c12
-rw-r--r--calendar/gui/ea-cal-view-event.c4
-rw-r--r--calendar/gui/ea-cal-view.c4
-rw-r--r--calendar/gui/ea-calendar-helpers.c6
-rw-r--r--calendar/gui/ea-gnome-calendar.c2
-rw-r--r--capplet/settings/mail-account-view.c2
-rw-r--r--capplet/settings/mail-capplet-shell.c4
-rw-r--r--e-util/e-datetime-format.c26
-rw-r--r--e-util/e-event.c5
-rw-r--r--e-util/e-html-utils.c2
-rw-r--r--e-util/e-import.h29
-rw-r--r--e-util/e-logger.c4
-rw-r--r--e-util/e-non-intrusive-error-dialog.h2
-rw-r--r--e-util/e-signature-list.c2
-rw-r--r--e-util/gtk-compat.h3
-rw-r--r--filter/e-filter-rule.c14
-rw-r--r--libart_lgpl/art_render.h2
-rw-r--r--libart_lgpl/art_svp_render_aa.c2
-rw-r--r--libgnomecanvas/gnome-canvas.h4
-rw-r--r--mail/em-folder-tree.c239
-rw-r--r--mail/em-utils.c9
-rw-r--r--mail/message-list.c8
-rw-r--r--mail/message-list.h28
-rw-r--r--modules/calendar/e-cal-shell-view-private.c2
-rw-r--r--modules/network-manager/evolution-network-manager.c27
-rw-r--r--plugins/attachment-reminder/attachment-reminder.c2
-rw-r--r--plugins/bbdb/gaimbuddies.c2
-rw-r--r--plugins/caldav/caldav-browse-server.c6
-rw-r--r--plugins/calendar-file/calendar-file.c4
-rw-r--r--plugins/calendar-weather/calendar-weather.c2
-rw-r--r--plugins/face/face.c2
-rw-r--r--plugins/groupwise-features/camel-gw-listener.c2
-rw-r--r--plugins/groupwise-features/install-shared.c2
-rw-r--r--plugins/groupwise-features/mail-send-options.c2
-rw-r--r--plugins/groupwise-features/send-options.c28
-rw-r--r--plugins/groupwise-features/share-folder-common.c2
-rw-r--r--plugins/groupwise-features/status-track.c2
-rw-r--r--plugins/pst-import/pst-importer.c2
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c56
-rw-r--r--shell/e-shell-switcher.c4
-rw-r--r--shell/e-shell-utils.c6
-rw-r--r--shell/es-event.c12
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c26
-rw-r--r--widgets/menus/gal-define-views-dialog.c22
-rw-r--r--widgets/menus/gal-define-views-dialog.h2
-rw-r--r--widgets/menus/gal-define-views-model.c159
-rw-r--r--widgets/menus/gal-view-collection.c162
-rw-r--r--widgets/menus/gal-view-etable.c64
-rw-r--r--widgets/menus/gal-view-factory-etable.h2
-rw-r--r--widgets/menus/gal-view-instance.c44
-rw-r--r--widgets/menus/gal-view-new-dialog.c24
-rw-r--r--widgets/menus/gal-view.c2
-rw-r--r--widgets/misc/e-buffer-tagger.c22
-rw-r--r--widgets/misc/e-calendar-item.c8
-rw-r--r--widgets/misc/e-canvas-background.c8
-rw-r--r--widgets/misc/e-canvas.c2
-rw-r--r--widgets/misc/e-dateedit.c2
-rw-r--r--widgets/misc/e-popup-menu.c2
-rw-r--r--widgets/misc/e-printable.c22
-rw-r--r--widgets/misc/ea-calendar-item.c19
-rw-r--r--widgets/misc/ea-cell-table.c16
-rw-r--r--widgets/table/e-cell-checkbox.c6
-rw-r--r--widgets/table/e-cell-date-edit.c6
-rw-r--r--widgets/table/e-cell-date.c10
-rw-r--r--widgets/table/e-cell-hbox.c6
-rw-r--r--widgets/table/e-cell-number.c10
-rw-r--r--widgets/table/e-cell-percent.c4
-rw-r--r--widgets/table/e-cell-pixbuf.c2
-rw-r--r--widgets/table/e-cell-size.c10
-rw-r--r--widgets/table/e-cell-text.c88
-rw-r--r--widgets/table/e-cell-toggle.c6
-rw-r--r--widgets/table/e-cell-tree.c56
-rw-r--r--widgets/table/e-cell-vbox.c6
-rw-r--r--widgets/table/e-cell.c58
-rw-r--r--widgets/table/e-table-click-to-add.c86
-rw-r--r--widgets/table/e-table-column-specification.c14
-rw-r--r--widgets/table/e-table-config.c203
-rw-r--r--widgets/table/e-table-config.h4
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c26
-rw-r--r--widgets/table/e-table-field-chooser-dialog.h2
-rw-r--r--widgets/table/e-table-field-chooser-item.c68
-rw-r--r--widgets/table/e-table-field-chooser.c54
-rw-r--r--widgets/table/e-table-field-chooser.h2
-rw-r--r--widgets/table/e-table-group-container.c134
-rw-r--r--widgets/table/e-table-group-leaf.c120
-rw-r--r--widgets/table/e-table-group.c38
-rw-r--r--widgets/table/e-table-group.h2
-rw-r--r--widgets/table/e-table-header-item.c168
-rw-r--r--widgets/table/e-table-header-utils.c4
-rw-r--r--widgets/table/e-table-header.c114
-rw-r--r--widgets/table/e-table-item.c462
-rw-r--r--widgets/table/e-table-memory-callbacks.c20
-rw-r--r--widgets/table/e-table-memory-store.c32
-rw-r--r--widgets/table/e-table-memory.c40
-rw-r--r--widgets/table/e-table-model.c80
-rw-r--r--widgets/table/e-table-one.c50
-rw-r--r--widgets/table/e-table-search.c14
-rw-r--r--widgets/table/e-table-selection-model.c142
-rw-r--r--widgets/table/e-table-sort-info.c60
-rw-r--r--widgets/table/e-table-sorted-variable.c66
-rw-r--r--widgets/table/e-table-sorted.c82
-rw-r--r--widgets/table/e-table-sorter.c110
-rw-r--r--widgets/table/e-table-sorting-utils.c136
-rw-r--r--widgets/table/e-table-specification.c4
-rw-r--r--widgets/table/e-table-state.c54
-rw-r--r--widgets/table/e-table-subset-variable.c68
-rw-r--r--widgets/table/e-table-subset.c48
-rw-r--r--widgets/table/e-table-utils.c10
-rw-r--r--widgets/table/e-table-without.c6
-rw-r--r--widgets/table/e-table.c500
-rw-r--r--widgets/table/e-tree-memory-callbacks.c30
-rw-r--r--widgets/table/e-tree-memory.c50
-rw-r--r--widgets/table/e-tree-model.c170
-rw-r--r--widgets/table/e-tree-selection-model.c160
-rw-r--r--widgets/table/e-tree-sorted.c302
-rw-r--r--widgets/table/e-tree-table-adapter.c408
-rw-r--r--widgets/table/e-tree.c416
-rw-r--r--widgets/table/e-tree.h4
-rw-r--r--widgets/table/gal-a11y-e-cell-popup.c4
-rw-r--r--widgets/table/gal-a11y-e-cell-registry.c2
-rw-r--r--widgets/table/gal-a11y-e-cell-text.c2
-rw-r--r--widgets/table/gal-a11y-e-cell-toggle.c6
-rw-r--r--widgets/table/gal-a11y-e-cell-tree.c10
-rw-r--r--widgets/table/gal-a11y-e-cell-vbox.c2
-rw-r--r--widgets/table/gal-a11y-e-cell.c14
-rw-r--r--widgets/table/gal-a11y-e-table-click-to-add-factory.c2
-rw-r--r--widgets/table/gal-a11y-e-table-click-to-add.c18
-rw-r--r--widgets/table/gal-a11y-e-table-column-header.c12
-rw-r--r--widgets/table/gal-a11y-e-table-item-factory.c2
-rw-r--r--widgets/table/gal-a11y-e-table-item.c62
-rw-r--r--widgets/table/gal-a11y-e-table.c6
-rw-r--r--widgets/text/e-reflow-model.c54
-rw-r--r--widgets/text/e-reflow.c192
-rw-r--r--widgets/text/e-text.c206
-rw-r--r--widgets/text/gal-a11y-e-text.c22
159 files changed, 3569 insertions, 3387 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 12431e4633..85558a2530 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -117,7 +117,7 @@ static struct {
const gchar *type_1;
const gchar *type_2;
}
-phones [] = {
+phones[] = {
{ E_CONTACT_PHONE_ASSISTANT, EVC_X_ASSISTANT, NULL },
{ E_CONTACT_PHONE_BUSINESS, "WORK", "VOICE" },
{ E_CONTACT_PHONE_BUSINESS_FAX, "WORK", "FAX" },
@@ -138,21 +138,21 @@ phones [] = {
};
/* Defaults from the table above */
-static const gint phones_default [] = { 1, 6, 9, 2, 7, 12, 10, 10 };
+static const gint phones_default[] = { 1, 6, 9, 2, 7, 12, 10, 10 };
-static EContactField addresses [] = {
+static EContactField addresses[] = {
E_CONTACT_ADDRESS_WORK,
E_CONTACT_ADDRESS_HOME,
E_CONTACT_ADDRESS_OTHER
};
-static EContactField address_labels [] = {
+static EContactField address_labels[] = {
E_CONTACT_ADDRESS_LABEL_WORK,
E_CONTACT_ADDRESS_LABEL_HOME,
E_CONTACT_ADDRESS_LABEL_OTHER
};
-static const gchar *address_name [] = {
+static const gchar *address_name[] = {
"work",
"home",
"other"
@@ -162,7 +162,7 @@ static struct {
EContactField field;
const gchar *pretty_name;
}
-im_service [] =
+im_service[] =
{
{ E_CONTACT_IM_AIM, N_ ("AIM") },
{ E_CONTACT_IM_JABBER, N_ ("Jabber") },
@@ -175,13 +175,13 @@ im_service [] =
};
/* Defaults from the table above */
-static const gint im_service_default [] = { 0, 2, 4, 5 };
+static const gint im_service_default[] = { 0, 2, 4, 5 };
static struct {
const gchar *name;
const gchar *pretty_name;
}
-common_location [] =
+common_location[] =
{
{ "WORK", N_ ("Work") },
{ "HOME", N_ ("Home") },
@@ -189,7 +189,7 @@ common_location [] =
};
/* Default from the table above */
-static const gint email_default [] = { 0, 1, 2, 2 };
+static const gint email_default[] = { 0, 1, 2, 2 };
#define STRING_IS_EMPTY(x) (!(x) || !(*(x)))
#define STRING_MAKE_NON_NULL(x) ((x) ? (x) : "")
@@ -731,7 +731,7 @@ init_email_record_location (EContactEditor *editor, gint record)
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (location_combo_box)));
for (i = 0; i < G_N_ELEMENTS (common_location); i++) {
- gtk_combo_box_append_text (location_combo_box, _(common_location [i].pretty_name));
+ gtk_combo_box_append_text (location_combo_box, _(common_location[i].pretty_name));
}
g_signal_connect_swapped (location_combo_box, "changed", G_CALLBACK (gtk_widget_grab_focus), email_entry);
@@ -756,7 +756,7 @@ fill_in_email_record (EContactEditor *editor, gint record, const gchar *address,
g_free (widget_name);
set_combo_box_active (editor, GTK_COMBO_BOX (location_combo_box),
- location >= 0 ? location : email_default [2]);
+ location >= 0 ? location : email_default[2]);
set_entry_text (editor, GTK_ENTRY (email_entry), address ? address : "");
}
@@ -784,13 +784,13 @@ extract_email_record (EContactEditor *editor, gint record, gchar **address, gint
static const gchar *
email_index_to_location (gint index)
{
- return common_location [index].name;
+ return common_location[index].name;
}
static const gchar *
im_index_to_location (gint index)
{
- return common_location [index].name;
+ return common_location[index].name;
}
static void
@@ -806,7 +806,7 @@ get_email_location (EVCardAttribute *attr)
gint i;
for (i = 0; i < G_N_ELEMENTS (common_location); i++) {
- if (e_vcard_attribute_has_type (attr, common_location [i].name))
+ if (e_vcard_attribute_has_type (attr, common_location[i].name))
return i;
}
@@ -819,7 +819,7 @@ get_im_location (EVCardAttribute *attr)
gint i;
for (i = 0; i < G_N_ELEMENTS (common_location); i++) {
- if (e_vcard_attribute_has_type (attr, common_location [i].name))
+ if (e_vcard_attribute_has_type (attr, common_location[i].name))
return i;
}
@@ -832,8 +832,8 @@ get_phone_type (EVCardAttribute *attr)
gint i;
for (i = 0; i < G_N_ELEMENTS (phones); i++) {
- if (e_vcard_attribute_has_type (attr, phones [i].type_1) &&
- (phones [i].type_2 == NULL || e_vcard_attribute_has_type (attr, phones [i].type_2)))
+ if (e_vcard_attribute_has_type (attr, phones[i].type_1) &&
+ (phones[i].type_2 == NULL || e_vcard_attribute_has_type (attr, phones[i].type_2)))
return i;
}
@@ -959,7 +959,7 @@ fill_in_email (EContactEditor *editor)
/* Clear */
for (record_n = 1; record_n <= EMAIL_SLOTS; record_n++) {
- fill_in_email_record (editor, record_n, NULL, email_default [record_n - 1]);
+ fill_in_email_record (editor, record_n, NULL, email_default[record_n - 1]);
}
/* Fill in */
@@ -1242,7 +1242,7 @@ fill_in_phone_record (EContactEditor *editor, gint record, const gchar *phone, g
set_combo_box_active (editor, GTK_COMBO_BOX (phone_type_combo_box),
phone_type >= 0 ? phone_type :
- phones_default [record - 1]);
+ phones_default[record - 1]);
set_entry_text (editor, GTK_ENTRY (phone_entry), phone ? phone : "");
if (phone && *phone && record >= 5)
@@ -1389,7 +1389,7 @@ init_phone_record_type (EContactEditor *editor, gint record)
gtk_list_store_append (store, &iter);
gtk_list_store_set (
store, &iter,
- 0, e_contact_pretty_name (phones [i].field_id),
+ 0, e_contact_pretty_name (phones[i].field_id),
1, TRUE,
-1);
}
@@ -1430,7 +1430,7 @@ sensitize_phone_types (EContactEditor *editor, GtkWidget *combo_box)
gtk_list_store_set (
GTK_LIST_STORE (model), &iter,
- 1, is_field_supported (editor, phones [i].field_id),
+ 1, is_field_supported (editor, phones[i].field_id),
-1);
valid = gtk_tree_model_iter_next (model, &iter);
@@ -1496,7 +1496,7 @@ init_im_record_location (EContactEditor *editor, gint record)
gtk_list_store_append (store, &iter);
gtk_list_store_set (
store, &iter,
- 0, _(common_location [i].pretty_name),
+ 0, _(common_location[i].pretty_name),
1, TRUE,
-1);
}
@@ -1536,7 +1536,7 @@ init_im_record_service (EContactEditor *editor, gint record)
gtk_list_store_append (store, &iter);
gtk_list_store_set (
store, &iter,
- 0, im_service [i].pretty_name,
+ 0, im_service[i].pretty_name,
1, TRUE,
-1);
}
@@ -1587,7 +1587,7 @@ fill_in_im_record (EContactEditor *editor, gint record, gint service, const gcha
location >= 0 ? location : 0);
#endif
set_combo_box_active (editor, GTK_COMBO_BOX (service_combo_box),
- service >= 0 ? service : im_service_default [record - 1]);
+ service >= 0 ? service : im_service_default[record - 1]);
set_entry_text (editor, GTK_ENTRY (name_entry), name ? name : "");
}
@@ -1608,7 +1608,7 @@ fill_in_im (EContactEditor *editor)
/* Fill in */
for (record_n = 1, i = 0; i < G_N_ELEMENTS (im_service); i++) {
- im_attr_list = e_contact_get_attributes (editor->contact, im_service [i].field);
+ im_attr_list = e_contact_get_attributes (editor->contact, im_service[i].field);
for (l = im_attr_list; l && record_n <= IM_SLOTS; l = g_list_next (l)) {
EVCardAttribute *attr = l->data;
@@ -1689,7 +1689,7 @@ extract_im (EContactEditor *editor)
e_vcard_attribute_add_value (attr, name);
set_ui_slot (attr, i);
- service_attr_list [service] = g_list_append (service_attr_list [service], attr);
+ service_attr_list[service] = g_list_append (service_attr_list[service], attr);
}
g_free (name);
@@ -1703,7 +1703,7 @@ extract_im (EContactEditor *editor)
/* Splice in the old attributes, minus the filled_in_slots first */
- old_service_attr_list = e_contact_get_attributes (editor->contact, im_service [i].field);
+ old_service_attr_list = e_contact_get_attributes (editor->contact, im_service[i].field);
filled_in_slots = MIN (remaining_slots, g_list_length (old_service_attr_list));
remaining_slots -= filled_in_slots;
@@ -1715,12 +1715,12 @@ extract_im (EContactEditor *editor)
}
old_service_attr_list = l;
- service_attr_list [i] = g_list_concat (service_attr_list [i], old_service_attr_list);
+ service_attr_list[i] = g_list_concat (service_attr_list[i], old_service_attr_list);
- e_contact_set_attributes (editor->contact, im_service [i].field,
- service_attr_list [i]);
+ e_contact_set_attributes (editor->contact, im_service[i].field,
+ service_attr_list[i]);
- free_attr_list (service_attr_list [i]);
+ free_attr_list (service_attr_list[i]);
}
g_free (service_attr_list);
@@ -1744,7 +1744,7 @@ sensitize_im_types (EContactEditor *editor, GtkWidget *combo_box)
gtk_list_store_set (
GTK_LIST_STORE (model), &iter,
- 1, is_field_supported (editor, im_service [i].field),
+ 1, is_field_supported (editor, im_service[i].field),
-1);
valid = gtk_tree_model_iter_next (model, &iter);
@@ -1933,8 +1933,8 @@ fill_in_address_record (EContactEditor *editor, gint record)
EContactAddress *address;
gchar *address_label;
- address = e_contact_get (editor->contact, addresses [record]);
- address_label = e_contact_get (editor->contact, address_labels [record]);
+ address = e_contact_get (editor->contact, addresses[record]);
+ address_label = e_contact_get (editor->contact, address_labels[record]);
if (address &&
(!STRING_IS_EMPTY (address->street) ||
@@ -2079,12 +2079,12 @@ extract_address_record (EContactEditor *editor, gint record)
!STRING_IS_EMPTY (address->code) ||
!STRING_IS_EMPTY (address->po) ||
!STRING_IS_EMPTY (address->country)) {
- e_contact_set (editor->contact, addresses [record], address);
- set_address_label (editor->contact, address_labels [record], address);
+ e_contact_set (editor->contact, addresses[record], address);
+ set_address_label (editor->contact, address_labels[record], address);
}
else {
- e_contact_set (editor->contact, addresses [record], NULL);
- set_address_label (editor->contact, address_labels [record], NULL);
+ e_contact_set (editor->contact, addresses[record], NULL);
+ set_address_label (editor->contact, address_labels[record], NULL);
}
g_boxed_free (e_contact_address_get_type (), address);
@@ -2158,7 +2158,7 @@ sensitize_address (EContactEditor *editor)
gboolean enabled = TRUE;
if (!editor->target_editable ||
- !(is_field_supported (editor, addresses [i]) ||
+ !(is_field_supported (editor, addresses[i]) ||
is_field_supported (editor, address_labels[i])))
enabled = FALSE;
@@ -2181,7 +2181,7 @@ FieldMapping;
* - Set sensitivity based on backend capabilities.
* - Set sensitivity based on book writeability. */
-static FieldMapping simple_field_map [] = {
+static FieldMapping simple_field_map[] = {
{ "entry-homepage", E_CONTACT_HOMEPAGE_URL, TRUE, TRUE },
{ "accellabel-homepage", E_CONTACT_HOMEPAGE_URL, FALSE, TRUE },
@@ -2515,7 +2515,7 @@ init_simple (EContactEditor *editor)
gint i;
for (i = 0; i < G_N_ELEMENTS (simple_field_map); i++) {
- widget = e_builder_get_widget (editor->builder, simple_field_map [i].widget_name);
+ widget = e_builder_get_widget (editor->builder, simple_field_map[i].widget_name);
if (!widget)
continue;
@@ -2545,15 +2545,15 @@ fill_in_simple (EContactEditor *editor)
for (i = 0; i < G_N_ELEMENTS (simple_field_map); i++) {
GtkWidget *widget;
- if (simple_field_map [i].field_id < 0 ||
- !simple_field_map [i].process_data)
+ if (simple_field_map[i].field_id < 0 ||
+ !simple_field_map[i].process_data)
continue;
- widget = e_builder_get_widget (editor->builder, simple_field_map [i].widget_name);
+ widget = e_builder_get_widget (editor->builder, simple_field_map[i].widget_name);
if (!widget)
continue;
- fill_in_simple_field (editor, widget, simple_field_map [i].field_id);
+ fill_in_simple_field (editor, widget, simple_field_map[i].field_id);
}
/* --- Special cases --- */
@@ -2595,15 +2595,15 @@ extract_simple (EContactEditor *editor)
for (i = 0; i < G_N_ELEMENTS (simple_field_map); i++) {
GtkWidget *widget;
- if (simple_field_map [i].field_id < 0 ||
- !simple_field_map [i].process_data)
+ if (simple_field_map[i].field_id < 0 ||
+ !simple_field_map[i].process_data)
continue;
- widget = e_builder_get_widget (editor->builder, simple_field_map [i].widget_name);
+ widget = e_builder_get_widget (editor->builder, simple_field_map[i].widget_name);
if (!widget)
continue;
- extract_simple_field (editor, widget, simple_field_map [i].field_id);
+ extract_simple_field (editor, widget, simple_field_map[i].field_id);
}
/* Special cases */
@@ -2620,15 +2620,15 @@ sensitize_simple (EContactEditor *editor)
GtkWidget *widget;
gboolean enabled = TRUE;
- widget = e_builder_get_widget (editor->builder, simple_field_map [i].widget_name);
+ widget = e_builder_get_widget (editor->builder, simple_field_map[i].widget_name);
if (!widget)
continue;
- if (simple_field_map [i].field_id >= 0 &&
- !is_field_supported (editor, simple_field_map [i].field_id))
+ if (simple_field_map[i].field_id >= 0 &&
+ !is_field_supported (editor, simple_field_map[i].field_id))
enabled = FALSE;
- if (simple_field_map [i].desensitize_for_read_only &&
+ if (simple_field_map[i].desensitize_for_read_only &&
!editor->target_editable)
enabled = FALSE;
@@ -3228,7 +3228,7 @@ e_contact_editor_close (EABEditor *editor)
}
}
-static const EContactField non_string_fields [] = {
+static const EContactField non_string_fields[] = {
E_CONTACT_FULL_NAME,
E_CONTACT_ADDRESS,
E_CONTACT_ADDRESS_HOME,
diff --git a/addressbook/gui/contact-editor/test-editor.c b/addressbook/gui/contact-editor/test-editor.c
index 2850f38e11..7a438a85bc 100644
--- a/addressbook/gui/contact-editor/test-editor.c
+++ b/addressbook/gui/contact-editor/test-editor.c
@@ -85,7 +85,7 @@ gint main( gint argc, gchar *argv[] )
cardstr = NULL;
if (argc == 2)
- cardstr = read_file (argv [1]);
+ cardstr = read_file (argv[1]);
if (cardstr == NULL)
cardstr = TEST_VCARD;
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index af68ee0c8e..edd8f003b9 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -586,8 +586,8 @@ contact_list_editor_email_entry_key_press_event_cb (GtkWidget *widget,
text = gtk_entry_get_text (entry);
- for (i = 0; text && text [i] && i < cpos; i++) {
- if (text [i] == '\"')
+ for (i = 0; text && text[i] && i < cpos; i++) {
+ if (text[i] == '\"')
quotes++;
}
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index d5ac8c68d4..60ef7d0026 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -56,7 +56,7 @@ enum {
LAST_SIGNAL
};
-static guint signals [LAST_SIGNAL] = {0, };
+static guint signals[LAST_SIGNAL] = {0, };
static void
unlink_model(EAddressbookReflowAdapter *adapter)
@@ -451,7 +451,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class)
E_TYPE_ADDRESSBOOK_MODEL,
G_PARAM_READABLE));
- signals [DRAG_BEGIN] =
+ signals[DRAG_BEGIN] =
g_signal_new ("drag_begin",
G_OBJECT_CLASS_TYPE(object_class),
G_SIGNAL_RUN_LAST,
@@ -460,7 +460,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class)
e_marshal_INT__POINTER,
G_TYPE_INT, 1, G_TYPE_POINTER);
- signals [OPEN_CONTACT] =
+ signals[OPEN_CONTACT] =
g_signal_new ("open-contact",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 5c1eba1f43..3f562a3c47 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -67,7 +67,7 @@ enum {
LAST_SIGNAL
};
-static guint e_minicard_label_signals [LAST_SIGNAL] = {0, };
+static guint e_minicard_label_signals[LAST_SIGNAL] = {0, };
GType
e_minicard_label_get_type (void)
@@ -166,7 +166,7 @@ e_minicard_label_class_init (EMinicardLabelClass *klass)
FALSE,
G_PARAM_READWRITE));
- e_minicard_label_signals [STYLE_SET] =
+ e_minicard_label_signals[STYLE_SET] =
g_signal_new ("style_set",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST,
diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c
index 7a78d83a42..c2741d48d6 100644
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ b/addressbook/gui/widgets/e-minicard-view-widget.c
@@ -61,7 +61,7 @@ enum {
LAST_SIGNAL
};
-static guint signals [LAST_SIGNAL] = {0, };
+static guint signals[LAST_SIGNAL] = {0, };
GType
e_minicard_view_widget_get_type (void)
@@ -142,7 +142,7 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *class)
0.0, G_MAXDOUBLE, 150.0,
G_PARAM_READWRITE));
- signals [CREATE_CONTACT] =
+ signals[CREATE_CONTACT] =
g_signal_new ("create-contact",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -151,7 +151,7 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- signals [CREATE_CONTACT_LIST] =
+ signals[CREATE_CONTACT_LIST] =
g_signal_new ("create-contact-list",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -160,7 +160,7 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- signals [SELECTION_CHANGE] =
+ signals[SELECTION_CHANGE] =
g_signal_new ("selection_change",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -169,7 +169,7 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- signals [COLUMN_WIDTH_CHANGED] =
+ signals[COLUMN_WIDTH_CHANGED] =
g_signal_new ("column_width_changed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -178,7 +178,7 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *class)
g_cclosure_marshal_VOID__DOUBLE,
G_TYPE_NONE, 1, G_TYPE_DOUBLE);
- signals [RIGHT_CLICK] =
+ signals[RIGHT_CLICK] =
g_signal_new ("right_click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -319,7 +319,7 @@ static void
selection_change (ESelectionModel *esm, EMinicardViewWidget *widget)
{
g_signal_emit (widget,
- signals [SELECTION_CHANGE], 0);
+ signals[SELECTION_CHANGE], 0);
}
static void
@@ -332,7 +332,7 @@ static void
column_width_changed (ESelectionModel *esm, double width, EMinicardViewWidget *widget)
{
g_signal_emit (widget,
- signals [COLUMN_WIDTH_CHANGED], 0, width);
+ signals[COLUMN_WIDTH_CHANGED], 0, width);
}
static void
@@ -352,7 +352,7 @@ right_click (EMinicardView *view, GdkEvent *event, EMinicardViewWidget *widget)
{
guint ret_val;
g_signal_emit (widget,
- signals [RIGHT_CLICK], 0,
+ signals[RIGHT_CLICK], 0,
event, &ret_val);
return ret_val;
}
@@ -493,7 +493,7 @@ e_minicard_view_widget_real_focus_in_event(GtkWidget *widget, GdkEventFocus *eve
gint unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), 0);
if (unsorted != -1)
- canvas->focused_item = reflow->items [unsorted];
+ canvas->focused_item = reflow->items[unsorted];
}
}
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 5751cfc38f..18dbc20523 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -62,7 +62,7 @@ enum {
LAST_SIGNAL
};
-static guint signals [LAST_SIGNAL] = {0, };
+static guint signals[LAST_SIGNAL] = {0, };
enum DndTargetType {
DND_TARGET_TYPE_VCARD_LIST,
@@ -552,7 +552,7 @@ e_minicard_view_class_init (EMinicardViewClass *klass)
FALSE,
G_PARAM_READWRITE));
- signals [CREATE_CONTACT] =
+ signals[CREATE_CONTACT] =
g_signal_new ("create-contact",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@ -560,7 +560,7 @@ e_minicard_view_class_init (EMinicardViewClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- signals [CREATE_CONTACT_LIST] =
+ signals[CREATE_CONTACT_LIST] =
g_signal_new ("create-contact-list",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@ -568,7 +568,7 @@ e_minicard_view_class_init (EMinicardViewClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- signals [RIGHT_CLICK] =
+ signals[RIGHT_CLICK] =
g_signal_new ("right_click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -644,7 +644,7 @@ e_minicard_view_jump_to_letter (EMinicardView *view,
#if 0
gchar uft_str[6 + 1];
- utf_str [g_unichar_to_utf8 (letter, utf_str)] = '\0';
+ utf_str[g_unichar_to_utf8 (letter, utf_str)] = '\0';
e_reflow_sorted_jump (E_REFLOW_SORTED (view),
(GCompareFunc) compare_to_utf_str,
utf_str);
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 654858a21d..0f3a27b798 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -94,14 +94,14 @@ static struct {
const gchar *name;
const gchar *pretty_name;
}
-common_location [] =
+common_location[] =
{
{ "WORK", N_ ("Work Email") },
{ "HOME", N_ ("Home Email") },
{ "OTHER", N_ ("Other Email") }
};
-static guint signals [LAST_SIGNAL] = {0, };
+static guint signals[LAST_SIGNAL] = {0, };
GType
e_minicard_get_type (void)
@@ -200,7 +200,7 @@ e_minicard_class_init (EMinicardClass *class)
E_TYPE_CONTACT,
G_PARAM_READWRITE));
- signals [SELECTED] =
+ signals[SELECTED] =
g_signal_new ("selected",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -209,7 +209,7 @@ e_minicard_class_init (EMinicardClass *class)
e_marshal_INT__POINTER,
G_TYPE_INT, 1, G_TYPE_POINTER);
- signals [DRAG_BEGIN] =
+ signals[DRAG_BEGIN] =
g_signal_new ("drag_begin",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -218,7 +218,7 @@ e_minicard_class_init (EMinicardClass *class)
e_marshal_INT__POINTER,
G_TYPE_INT, 1, G_TYPE_POINTER);
- signals [OPEN_CONTACT] =
+ signals[OPEN_CONTACT] =
g_signal_new ("open-contact",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -228,7 +228,7 @@ e_minicard_class_init (EMinicardClass *class)
G_TYPE_NONE, 1,
E_TYPE_CONTACT);
- signals [STYLE_SET] =
+ signals[STYLE_SET] =
g_signal_new ("style_set",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST,
@@ -800,8 +800,8 @@ get_email_location (EVCardAttribute *attr)
gint i;
for (i = 0; i < G_N_ELEMENTS (common_location); i++) {
- if (e_vcard_attribute_has_type (attr, common_location [i].name))
- return _(common_location [i].pretty_name);
+ if (e_vcard_attribute_has_type (attr, common_location[i].name))
+ return _(common_location[i].pretty_name);
}
return _("Other Email");
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 939ed77a59..a5a71814d3 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -64,7 +64,7 @@ static struct {
const gchar *name;
const gchar *pretty_name;
}
-common_location [] =
+common_location[] =
{
{ "WORK", N_ ("Work") },
{ "HOME", N_ ("Home") },
@@ -453,8 +453,8 @@ get_email_location (EVCardAttribute *attr)
gint i;
for (i = 0; i < G_N_ELEMENTS (common_location); i++) {
- if (e_vcard_attribute_has_type (attr, common_location [i].name))
- return _(common_location [i].pretty_name);
+ if (e_vcard_attribute_has_type (attr, common_location[i].name))
+ return _(common_location[i].pretty_name);
}
return _("Other");
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index 12d7aefa47..00cb0dc7ba 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -30,12 +30,12 @@
#include <libedataserver/e-source-list.h>
#include "config-data.h"
-
-
-#define KEY_LAST_NOTIFICATION_TIME "/apps/evolution/calendar/notify/last_notification_time"
+#define KEY_LAST_NOTIFICATION_TIME \
+ "/apps/evolution/calendar/notify/last_notification_time"
#define KEY_PROGRAMS "/apps/evolution/calendar/notify/programs"
-/* Whether we have initied ourselves by reading the data from the configuration engine */
+/* Whether we have initied ourselves by reading
+ * the data from the configuration engine. */
static gboolean inited = FALSE;
static GConfClient *conf_client = NULL;
static ESourceList *calendar_source_list = NULL, *tasks_source_list = NULL;
@@ -202,20 +202,23 @@ icaltimezone *
config_data_get_timezone (void)
{
gchar *location;
+ const gchar *key;
icaltimezone *local_timezone;
ensure_inited ();
- if (gconf_client_get_bool (conf_client, "/apps/evolution/calendar/display/use_system_timezone", NULL))
+ key = "/apps/evolution/calendar/display/user_system_timezone";
+ if (gconf_client_get_bool (conf_client, key, NULL))
location = e_cal_util_get_system_timezone_location ();
- else
- location = gconf_client_get_string (conf_client, "/apps/evolution/calendar/display/timezone", NULL);
+ else {
+ key = "/apps/evolution/calendar/display/timezone";
+ location = gconf_client_get_string (conf_client, key, NULL);
+ }
- if (location && location[0]) {
+ if (location && location[0])
local_timezone = icaltimezone_get_builtin_timezone (location);
- } else {
+ else
local_timezone = icaltimezone_get_utc_timezone ();
- }
g_free (location);
@@ -228,9 +231,10 @@ config_data_get_24_hour_format (void)
ensure_inited ();
if (locale_supports_12_hour_format ()) {
- return gconf_client_get_bool (conf_client,
- "/apps/evolution/calendar/display/use_24hour_format",
- NULL);
+ const gchar *key;
+
+ key = "/apps/evolution/calendar/display/use_24hour_format";
+ return gconf_client_get_bool (conf_client, key, NULL);
}
return TRUE;
@@ -308,7 +312,8 @@ config_data_get_last_notification_time (ECal *cal)
const gchar *last_notified = e_source_get_property (source, "last-notified");
GTimeVal tmval = {0};
- if (last_notified && *last_notified && g_time_val_from_iso8601 (last_notified, &tmval)) {
+ if (last_notified && *last_notified &&
+ g_time_val_from_iso8601 (last_notified, &tmval)) {
time_t now = time (NULL), val = (time_t) tmval.tv_sec;
if (val > now)
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index c2efce759c..c5944af194 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -1055,7 +1055,7 @@ make_recur_month_num_combo (gint month_index)
/* Relation */
for (i = 0; i < G_N_ELEMENTS (options); i++) {
gtk_tree_store_append (store, &iter, NULL);
- gtk_tree_store_set (store, &iter, 0, _(options [i]), 1, month_num_options_map [i], -1);
+ gtk_tree_store_set (store, &iter, 0, _(options[i]), 1, month_num_options_map[i], -1);
}
/* Current date */
@@ -1106,7 +1106,7 @@ make_recur_month_combobox (void)
{
static const gchar *options[] = {
/* For Translator : 'day' is part of the sentence of the form 'appointment recurs/Every [x] month(s) on the [first] [day] [forever]'
- (dropdown menu options are in [square brackets]). This means that after 'first', either the string 'day' or
+ (dropdown menu options are in[square brackets]). This means that after 'first', either the string 'day' or
the name of a week day (like 'Monday' or 'Friday') always follow. */
N_("day"),
N_("Monday"),
diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c
index 4fdf5e71eb..2e6a12e880 100644
--- a/calendar/gui/e-alarm-list.c
+++ b/calendar/gui/e-alarm-list.c
@@ -35,7 +35,7 @@
#define IS_VALID_ITER(dt_list, iter) (iter!= NULL && iter->user_data != NULL && \
dt_list->stamp == iter->stamp)
-static GType column_types [E_ALARM_LIST_NUM_COLUMNS];
+static GType column_types[E_ALARM_LIST_NUM_COLUMNS];
static void e_alarm_list_init (EAlarmList *file_list);
static void e_alarm_list_class_init (EAlarmListClass *class);
@@ -99,7 +99,7 @@ e_alarm_list_get_type (void)
NULL
};
- column_types [E_ALARM_LIST_COLUMN_DESCRIPTION] = G_TYPE_STRING;
+ column_types[E_ALARM_LIST_COLUMN_DESCRIPTION] = G_TYPE_STRING;
alarm_list_type = g_type_register_static (G_TYPE_OBJECT, "EAlarmList",
&alarm_list_info, 0);
@@ -257,7 +257,7 @@ e_alarm_list_get_column_type (GtkTreeModel *tree_model,
index >= 0, G_TYPE_INVALID);
alarm_list->columns_dirty = TRUE;
- return column_types [index];
+ return column_types[index];
}
const ECalComponentAlarm *
@@ -563,7 +563,7 @@ e_alarm_list_get_value (GtkTreeModel *tree_model,
g_return_if_fail (E_ALARM_LIST (tree_model)->stamp == iter->stamp);
g_return_if_fail (IS_VALID_ITER (alarm_list, iter));
- g_value_init (value, column_types [column]);
+ g_value_init (value, column_types[column]);
if (!alarm_list->list)
return;
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index 0489c087fe..2cd5ad0b77 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -279,8 +279,8 @@ setup_e_table (ECalListView *cal_list_view)
canvas = GNOME_CANVAS (cal_list_view->table->table_canvas);
style = gtk_widget_get_style (GTK_WIDGET (canvas));
- style->fg [GTK_STATE_SELECTED] = style->text [GTK_STATE_NORMAL];
- style->fg [GTK_STATE_ACTIVE] = style->text [GTK_STATE_NORMAL];
+ style->fg[GTK_STATE_SELECTED] = style->text[GTK_STATE_NORMAL];
+ style->fg[GTK_STATE_ACTIVE] = style->text[GTK_STATE_NORMAL];
gtk_widget_set_style (GTK_WIDGET (canvas), style);
/* Connect signals */
diff --git a/calendar/gui/e-date-time-list.c b/calendar/gui/e-date-time-list.c
index 5160f1b419..ab343a16f1 100644
--- a/calendar/gui/e-date-time-list.c
+++ b/calendar/gui/e-date-time-list.c
@@ -33,7 +33,7 @@
#define IS_VALID_ITER(dt_list, iter) (iter!= NULL && iter->user_data != NULL && \
dt_list->stamp == iter->stamp)
-static GType column_types [E_DATE_TIME_LIST_NUM_COLUMNS];
+static GType column_types[E_DATE_TIME_LIST_NUM_COLUMNS];
static void e_date_time_list_init (EDateTimeList *file_list);
static void e_date_time_list_class_init (EDateTimeListClass *class);
@@ -97,7 +97,7 @@ e_date_time_list_get_type (void)
NULL
};
- column_types [E_DATE_TIME_LIST_COLUMN_DESCRIPTION] = G_TYPE_STRING;
+ column_types[E_DATE_TIME_LIST_COLUMN_DESCRIPTION] = G_TYPE_STRING;
date_time_list_type = g_type_register_static (G_TYPE_OBJECT, "EDateTimeList",
&date_time_list_info, 0);
@@ -255,7 +255,7 @@ e_date_time_list_get_column_type (GtkTreeModel *tree_model,
index >= 0, G_TYPE_INVALID);
date_time_list->columns_dirty = TRUE;
- return column_types [index];
+ return column_types[index];
}
const ECalComponentDateTime *
@@ -401,7 +401,7 @@ e_date_time_list_get_path (GtkTreeModel *tree_model,
static gchar *
get_exception_string (ECalComponentDateTime *dt)
{
- static gchar buf [256];
+ static gchar buf[256];
struct tm tmp_tm;
tmp_tm.tm_year = dt->value->year - 1900;
@@ -438,7 +438,7 @@ e_date_time_list_get_value (GtkTreeModel *tree_model,
g_return_if_fail (E_DATE_TIME_LIST (tree_model)->stamp == iter->stamp);
g_return_if_fail (IS_VALID_ITER (date_time_list, iter));
- g_value_init (value, column_types [column]);
+ g_value_init (value, column_types[column]);
if (!date_time_list->list)
return;
diff --git a/calendar/gui/e-day-view-layout.c b/calendar/gui/e-day-view-layout.c
index c11c4f6738..bdb51977cc 100644
--- a/calendar/gui/e-day-view-layout.c
+++ b/calendar/gui/e-day-view-layout.c
@@ -158,7 +158,7 @@ e_day_view_layout_day_events (GArray *events,
group_starts[row] = row;
/* row doesn't contain any event at the moment */
- grid [row] = e_bit_array_new (0);
+ grid[row] = e_bit_array_new (0);
}
/* Iterate over the events, finding which rows they cover, and putting
@@ -186,8 +186,8 @@ e_day_view_layout_day_events (GArray *events,
/* Free the grid and compute maximum number of columns used. */
res = 0;
for (row = 0; row < rows; row++) {
- res = MAX (res, e_bit_array_bit_count (grid [row]));
- g_object_unref (grid [row]);
+ res = MAX (res, e_bit_array_bit_count (grid[row]));
+ g_object_unref (grid[row]);
}
g_free (grid);
@@ -227,8 +227,8 @@ e_day_view_layout_day_event (EDayViewEvent *event,
for (col = 0; max_cols <= 0 || col < max_cols; col++) {
free_col = col;
for (row = start_row; row <= end_row; row++) {
- if (e_bit_array_bit_count (grid [row]) > col &&
- e_bit_array_value_at (grid [row], col)) {
+ if (e_bit_array_bit_count (grid[row]) > col &&
+ e_bit_array_value_at (grid[row], col)) {
free_col = -1;
break;
}
@@ -255,12 +255,12 @@ e_day_view_layout_day_event (EDayViewEvent *event,
the event covers are in one group. */
for (row = start_row; row <= end_row; row++) {
/* resize the array if necessary */
- if (e_bit_array_bit_count (grid [row]) <= free_col)
+ if (e_bit_array_bit_count (grid[row]) <= free_col)
e_bit_array_insert (
- grid [row], e_bit_array_bit_count (grid [row]),
- free_col - e_bit_array_bit_count (grid [row]) + 1);
+ grid[row], e_bit_array_bit_count (grid[row]),
+ free_col - e_bit_array_bit_count (grid[row]) + 1);
- e_bit_array_change_one_row (grid [row], free_col, TRUE);
+ e_bit_array_change_one_row (grid[row], free_col, TRUE);
cols_per_row[row]++;
group_starts[row] = group_start;
}
@@ -315,8 +315,8 @@ e_day_view_expand_day_event (EDayViewEvent *event,
clashed = FALSE;
for (col = event->start_row_or_col + 1; col < cols_per_row[start_row]; col++) {
for (row = start_row; row <= end_row; row++) {
- if (e_bit_array_bit_count (grid [row]) > col &&
- e_bit_array_value_at (grid [row], col)) {
+ if (e_bit_array_bit_count (grid[row]) > col &&
+ e_bit_array_value_at (grid[row], col)) {
clashed = TRUE;
break;
}
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index edc446ac25..9e430ecf41 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -996,10 +996,10 @@ e_day_view_time_item_get_column_width (EDayViewTimeItem *time_item)
* it needs a language tag that I don't know where to get. */
for (digit = '0'; digit <= '9'; digit++) {
PangoLayout *layout;
- gchar digit_str [2];
+ gchar digit_str[2];
- digit_str [0] = digit;
- digit_str [1] = '\0';
+ digit_str[0] = digit;
+ digit_str[1] = '\0';
layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), digit_str);
pango_layout_set_font_description (layout, day_view->large_font_desc);
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index b0df6748b3..85513a2c74 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -1736,7 +1736,7 @@ e_day_view_style_set (GtkWidget *widget,
for (hour = 0; hour < 24; hour++) {
g_snprintf (buffer, sizeof (buffer), "%02i", hour);
pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &day_view->small_hour_widths [hour], NULL);
+ pango_layout_get_pixel_size (layout, &day_view->small_hour_widths[hour], NULL);
day_view->max_small_hour_width = MAX (day_view->max_small_hour_width, day_view->small_hour_widths[hour]);
}
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index 686d43c65d..d0f172c81d 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -106,7 +106,7 @@ e_meeting_list_view_class_init (EMeetingListViewClass *klass)
object_class->finalize = e_meeting_list_view_finalize;
- e_meeting_list_view_signals [ATTENDEE_ADDED] =
+ e_meeting_list_view_signals[ATTENDEE_ADDED] =
g_signal_new ("attendee_added",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
@@ -141,8 +141,8 @@ e_meeting_list_view_init (EMeetingListView *view)
priv->name_selector = e_name_selector_new ();
- for (i = 0; sections [i]; i++)
- add_section (priv->name_selector, sections [i]);
+ for (i = 0; sections[i]; i++)
+ add_section (priv->name_selector, sections[i]);
name_selector_dialog = e_name_selector_peek_dialog (view->priv->name_selector);
gtk_window_set_title (GTK_WINDOW (name_selector_dialog), _("Attendees"));
@@ -245,7 +245,7 @@ e_meeting_list_view_add_attendee_to_name_selector (EMeetingListView *view, EMeet
name_selector_model = e_name_selector_peek_model (priv->name_selector);
i = get_index_from_role (e_meeting_attendee_get_role (ma));
- e_name_selector_model_peek_section (name_selector_model, sections [i],
+ e_name_selector_model_peek_section (name_selector_model, sections[i],
NULL, &destination_store);
des = e_destination_new ();
e_destination_set_email (des, itip_strip_mailto (e_meeting_attendee_get_address (ma)));
@@ -268,7 +268,7 @@ e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view,
name_selector_model = e_name_selector_peek_model (priv->name_selector);
i = get_index_from_role (e_meeting_attendee_get_role (ma));
- e_name_selector_model_peek_section (name_selector_model, sections [i],
+ e_name_selector_model_peek_section (name_selector_model, sections[i],
NULL, &destination_store);
destinations = e_destination_store_list_destinations (destination_store);
madd = itip_strip_mailto (e_meeting_attendee_get_address (ma));
@@ -910,7 +910,7 @@ name_selector_dialog_close_cb (ENameSelectorDialog *dialog, gint response, gpoin
EDestinationStore *destination_store;
GList *destinations;
- e_name_selector_model_peek_section (name_selector_model, sections [i],
+ e_name_selector_model_peek_section (name_selector_model, sections[i],
NULL, &destination_store);
if (!destination_store) {
g_warning ("destination store is NULL\n");
@@ -918,7 +918,7 @@ name_selector_dialog_close_cb (ENameSelectorDialog *dialog, gint response, gpoin
}
destinations = e_destination_store_list_destinations (destination_store);
- process_section (view, destinations, roles [i], &la);
+ process_section (view, destinations, roles[i], &la);
g_list_free (destinations);
}
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 51bf75f750..dd746e32db 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -275,7 +275,7 @@ get_iter (GtkTreeModel *model, GtkTreeIter *iter, GtkTreePath *path)
g_return_val_if_fail (E_IS_MEETING_STORE (model), FALSE);
g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE);
- row = gtk_tree_path_get_indices (path) [0];
+ row = gtk_tree_path_get_indices (path)[0];
if (!ROW_VALID (E_MEETING_STORE (model), row))
return FALSE;
diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c
index c7c81e12ce..86afc39c59 100644
--- a/calendar/gui/e-meeting-time-sel-item.c
+++ b/calendar/gui/e-meeting-time-sel-item.c
@@ -485,9 +485,9 @@ e_meeting_time_selector_item_paint_day_top (EMeetingTimeSelectorItem *mts_item,
hour_y = mts->row_height + 4 - scroll_y;
while (hour < mts->last_hour_shown) {
if (calendar_config_get_24_hour_format ())
- pango_layout_set_text (layout, EMeetingTimeSelectorHours [hour], -1);
+ pango_layout_set_text (layout, EMeetingTimeSelectorHours[hour], -1);
else
- pango_layout_set_text (layout, EMeetingTimeSelectorHours12 [hour], -1);
+ pango_layout_set_text (layout, EMeetingTimeSelectorHours12[hour], -1);
gdk_draw_layout (drawable, gc,
hour_x,
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index a34033f44b..3b120566e8 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -97,7 +97,7 @@ enum {
LAST_SIGNAL
};
-static gint signals [LAST_SIGNAL] = { 0 };
+static gint signals[LAST_SIGNAL] = { 0 };
static void e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector * mts,
const gchar *name, GdkColor *c);
@@ -869,7 +869,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
e_meeting_time_selector_update_end_date_edit (mts);
e_meeting_time_selector_update_date_popup_menus (mts);
- g_signal_emit (mts, signals [CHANGED], 0);
+ g_signal_emit (mts, signals[CHANGED], 0);
}
/* This adds a color to the color key beneath the main display. If color is
@@ -1125,11 +1125,11 @@ style_change_idle_func (EMeetingTimeSelector *mts)
max_hour_width = 0;
for (hour = 0; hour < 24; hour++) {
if (e_meeting_time_selector_get_use_24_hour_format (mts))
- pango_layout_set_text (layout, EMeetingTimeSelectorHours [hour], -1);
+ pango_layout_set_text (layout, EMeetingTimeSelectorHours[hour], -1);
else
- pango_layout_set_text (layout, EMeetingTimeSelectorHours12 [hour], -1);
+ pango_layout_set_text (layout, EMeetingTimeSelectorHours12[hour], -1);
- pango_layout_get_pixel_size (layout, &mts->hour_widths [hour], NULL);
+ pango_layout_get_pixel_size (layout, &mts->hour_widths[hour], NULL);
max_hour_width = MAX (max_hour_width, mts->hour_widths[hour]);
}
@@ -1326,7 +1326,7 @@ e_meeting_time_selector_set_meeting_time (EMeetingTimeSelector *mts,
e_meeting_time_selector_update_start_date_edit (mts);
e_meeting_time_selector_update_end_date_edit (mts);
- g_signal_emit (mts, signals [CHANGED], 0);
+ g_signal_emit (mts, signals[CHANGED], 0);
return TRUE;
}
@@ -1915,7 +1915,7 @@ e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
e_meeting_time_selector_update_start_date_edit (mts);
e_meeting_time_selector_update_end_date_edit (mts);
- g_signal_emit (mts, signals [CHANGED], 0);
+ g_signal_emit (mts, signals[CHANGED], 0);
return;
}
@@ -2476,7 +2476,7 @@ e_meeting_time_selector_on_start_time_changed (GtkWidget *widget,
gtk_widget_queue_draw (mts->display_top);
gtk_widget_queue_draw (mts->display_main);
- g_signal_emit (mts, signals [CHANGED], 0);
+ g_signal_emit (mts, signals[CHANGED], 0);
}
/* This is called when the meeting end time GnomeDateEdit is changed,
@@ -2525,7 +2525,7 @@ e_meeting_time_selector_on_end_time_changed (GtkWidget *widget,
gtk_widget_queue_draw (mts->display_top);
gtk_widget_queue_draw (mts->display_main);
- g_signal_emit (mts, signals [CHANGED], 0);
+ g_signal_emit (mts, signals[CHANGED], 0);
}
/* This updates the ranges shown in the GnomeDateEdit popup menus, according
@@ -2741,7 +2741,7 @@ e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts,
if (set_both_times
|| mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_END
|| mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START)
- g_signal_emit (mts, signals [CHANGED], 0);
+ g_signal_emit (mts, signals[CHANGED], 0);
}
/* This is the timeout function which handles auto-scrolling when the user is
@@ -2882,7 +2882,7 @@ e_meeting_time_selector_timeout_handler (gpointer data)
if (set_both_times
|| mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_END
|| mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START)
- g_signal_emit (mts, signals [CHANGED], 0);
+ g_signal_emit (mts, signals[CHANGED], 0);
scroll:
/* Redraw the canvases. We freeze and thaw the layouts so that they
@@ -3122,7 +3122,7 @@ static void
row_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
{
EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data);
- gint row = gtk_tree_path_get_indices (path) [0];
+ gint row = gtk_tree_path_get_indices (path)[0];
/* Update the scroll region. */
e_meeting_time_selector_update_main_canvas_scroll_region (mts);
@@ -3138,7 +3138,7 @@ static void
row_changed_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
{
EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data);
- gint row = gtk_tree_path_get_indices (path) [0];
+ gint row = gtk_tree_path_get_indices (path)[0];
/* Get the latest free/busy info */
e_meeting_time_selector_refresh_free_busy (mts, row, FALSE);
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index eafa3521c8..8355aa9616 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -572,7 +572,7 @@ memo_table_query_tooltip (GtkWidget *widget,
&tmp_tm, use_24_hour_format,
FALSE, FALSE, buff, 1000);
- if (buff [0]) {
+ if (buff[0]) {
/* Translators: This is followed by an event's start date/time */
g_string_append (tmp2, _("Start: "));
g_string_append (tmp2, buff);
@@ -588,7 +588,7 @@ memo_table_query_tooltip (GtkWidget *widget,
&tmp_tm, use_24_hour_format,
FALSE, FALSE, buff, 1000);
- if (buff [0]) {
+ if (buff[0]) {
if (tmp2->len)
g_string_append (tmp2, "; ");
diff --git a/calendar/gui/e-select-names-renderer.c b/calendar/gui/e-select-names-renderer.c
index ddb8e72efe..25c59470f0 100644
--- a/calendar/gui/e-select-names-renderer.c
+++ b/calendar/gui/e-select-names-renderer.c
@@ -46,7 +46,7 @@ enum {
LAST_SIGNAL
};
-static gint signals [LAST_SIGNAL];
+static gint signals[LAST_SIGNAL];
G_DEFINE_TYPE (ESelectNamesRenderer, e_select_names_renderer, GTK_TYPE_CELL_RENDERER_TEXT)
@@ -85,7 +85,7 @@ e_select_names_renderer_editing_done (GtkCellEditable *editable, ESelectNamesRen
}
}
- g_signal_emit (cell, signals [CELL_EDITED], 0, cell->priv->path, addresses, names);
+ g_signal_emit (cell, signals[CELL_EDITED], 0, cell->priv->path, addresses, names);
g_list_foreach (addresses, (GFunc)g_free, NULL);
g_list_foreach (names, (GFunc)g_free, NULL);
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index 45ac6cf09c..d1c03563a2 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -785,7 +785,7 @@ task_table_query_tooltip (GtkWidget *widget,
&tmp_tm, use_24_hour_format,
FALSE, FALSE, buff, 1000);
- if (buff [0]) {
+ if (buff[0]) {
g_string_append (tmp2, _("Start: "));
g_string_append (tmp2, buff);
}
@@ -800,7 +800,7 @@ task_table_query_tooltip (GtkWidget *widget,
&tmp_tm, use_24_hour_format,
FALSE, FALSE, buff, 1000);
- if (buff [0]) {
+ if (buff[0]) {
if (tmp2->len)
g_string_append (tmp2, "; ");
diff --git a/calendar/gui/e-week-view-layout.c b/calendar/gui/e-week-view-layout.c
index 7863791e25..743f890485 100644
--- a/calendar/gui/e-week-view-layout.c
+++ b/calendar/gui/e-week-view-layout.c
@@ -362,22 +362,22 @@ e_week_view_layout_get_day_position (gint day,
wd = 0; /* number of used rows in column */
for (i = m; i < M; i++) {
- arr [i - m] += wk (i);
- wd += arr [i - m];
+ arr[i - m] += wk (i);
+ wd += arr[i - m];
}
while (wd != 6 && any) {
any = FALSE;
for (i = M - 1; i >= m; i--) {
- if (arr [i - m] > 1) {
+ if (arr[i - m] > 1) {
any = TRUE;
if (wd > 6) { /* too many rows, make last shorter */
- arr [i - m] --;
+ arr[i - m] --;
wd--;
} else if (wd < 6) { /* free rows left, enlarge those bigger */
- arr [i - m] ++;
+ arr[i - m] ++;
wd++;
}
@@ -390,7 +390,7 @@ e_week_view_layout_get_day_position (gint day,
any = TRUE;
for (i = m; i < M; i++) {
- arr [i - m] += 3;
+ arr[i - m] += 3;
wd += 3;
}
}
diff --git a/calendar/gui/ea-cal-view-event.c b/calendar/gui/ea-cal-view-event.c
index b2bdc5c4b3..3b36d7a07f 100644
--- a/calendar/gui/ea-cal-view-event.c
+++ b/calendar/gui/ea-cal-view-event.c
@@ -547,7 +547,7 @@ ea_cal_view_get_extents (AtkComponent *component,
#define CAL_VIEW_EVENT_ACTION_NUM 1
-static const gchar * action_name [CAL_VIEW_EVENT_ACTION_NUM] = {
+static const gchar * action_name[CAL_VIEW_EVENT_ACTION_NUM] = {
N_("Grab Focus")
};
@@ -588,7 +588,7 @@ static G_CONST_RETURN gchar *
ea_cal_view_event_action_get_name (AtkAction *action, gint i)
{
if (i >= 0 && i < CAL_VIEW_EVENT_ACTION_NUM)
- return action_name [i];
+ return action_name[i];
return NULL;
}
diff --git a/calendar/gui/ea-cal-view.c b/calendar/gui/ea-cal-view.c
index a012154004..21b35e4e17 100644
--- a/calendar/gui/ea-cal-view.c
+++ b/calendar/gui/ea-cal-view.c
@@ -300,7 +300,7 @@ ea_cal_view_dates_change_cb (GnomeCalendar *gcal, gpointer data)
#define CAL_VIEW_ACTION_NUM 5
-static const gchar * action_name [CAL_VIEW_ACTION_NUM] = {
+static const gchar * action_name[CAL_VIEW_ACTION_NUM] = {
N_("New Appointment"),
N_("New All Day Event"),
N_("New Meeting"),
@@ -428,6 +428,6 @@ static G_CONST_RETURN gchar *
action_interface_action_get_name(AtkAction *action, gint i)
{
if (i >= 0 && i < CAL_VIEW_ACTION_NUM)
- return action_name [i];
+ return action_name[i];
return NULL;
}
diff --git a/calendar/gui/ea-calendar-helpers.c b/calendar/gui/ea-calendar-helpers.c
index f07cdfa086..e8d91df217 100644
--- a/calendar/gui/ea-calendar-helpers.c
+++ b/calendar/gui/ea-calendar-helpers.c
@@ -42,7 +42,8 @@ ea_calendar_helpers_get_accessible_for (GnomeCanvasItem *canvas_item)
AtkObject *atk_obj = NULL;
GObject *g_obj;
- g_return_val_if_fail ((E_IS_TEXT (canvas_item)) || (GNOME_IS_CANVAS_ITEM (canvas_item)), NULL);;
+ g_return_val_if_fail ((E_IS_TEXT (canvas_item)) ||
+ (GNOME_IS_CANVAS_ITEM (canvas_item)), NULL);
g_obj = G_OBJECT (canvas_item);
/* we cannot use atk_gobject_accessible_for_object here,
@@ -78,7 +79,8 @@ ea_calendar_helpers_get_cal_view_from (GnomeCanvasItem *canvas_item)
GtkWidget *view_widget = NULL;
g_return_val_if_fail (canvas_item, NULL);
- g_return_val_if_fail ((E_IS_TEXT (canvas_item)) || (GNOME_IS_CANVAS_ITEM (canvas_item)), NULL);
+ g_return_val_if_fail ((E_IS_TEXT (canvas_item)) ||
+ (GNOME_IS_CANVAS_ITEM (canvas_item)), NULL);
/* canvas_item is the e_text for the event */
/* canvas_item->canvas is the ECanvas for day view */
diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c
index e35ef1401e..9c7d9f8601 100644
--- a/calendar/gui/ea-gnome-calendar.c
+++ b/calendar/gui/ea-gnome-calendar.c
@@ -218,7 +218,7 @@ ea_gnome_calendar_get_label_description (GnomeCalendar *gcal)
if (start_tm.tm_year == end_tm.tm_year) {
if (start_tm.tm_mon == end_tm.tm_mon) {
if (start_tm.tm_mday == end_tm.tm_mday) {
- buffer [0] = '\0';
+ buffer[0] = '\0';
} else {
e_utf8_strftime (buffer, sizeof (buffer),
"%d", &start_tm);
diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c
index 4af8b09b18..1dc638ebe4 100644
--- a/capplet/settings/mail-account-view.c
+++ b/capplet/settings/mail-account-view.c
@@ -130,7 +130,7 @@ struct _server_prefill {
gchar *send;
gchar *proto;
gchar *ssl;
-} std_server [] = {
+} std_server[] = {
{"gmail", "imap.gmail.com", "smtp.gmail.com", "imap", "always"},
{"yahoo", "pop3.yahoo.com", "smtp.yahoo.com", "pop", "never"},
{"aol", "imap.aol.com", "smtp.aol.com", "pop", "never"},
diff --git a/capplet/settings/mail-capplet-shell.c b/capplet/settings/mail-capplet-shell.c
index d27e4d85fc..a1cdbb8989 100644
--- a/capplet/settings/mail-capplet-shell.c
+++ b/capplet/settings/mail-capplet-shell.c
@@ -122,7 +122,7 @@ mail_capplet_shell_class_init (MailCappletShellClass *klass)
klass->ctrl_w_pressed = ms_ctrl_w_pressed;
klass->ctrl_q_pressed = ms_ctrl_q_pressed;
- mail_capplet_shell_signals [CTRL_W_PRESSED] =
+ mail_capplet_shell_signals[CTRL_W_PRESSED] =
g_signal_new ("ctrl_w_pressed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@ -131,7 +131,7 @@ mail_capplet_shell_class_init (MailCappletShellClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- mail_capplet_shell_signals [CTRL_Q_PRESSED] =
+ mail_capplet_shell_signals[CTRL_Q_PRESSED] =
g_signal_new ("ctrl_q_pressed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c
index c41fc08c41..a277e93fdb 100644
--- a/e-util/e-datetime-format.c
+++ b/e-util/e-datetime-format.c
@@ -85,10 +85,10 @@ ensure_loaded (void)
keys = g_key_file_get_keys (keyfile, KEYS_GROUPNAME, NULL, NULL);
if (keys) {
- for (i = 0; keys [i]; i++) {
- str = g_key_file_get_string (keyfile, KEYS_GROUPNAME, keys [i], NULL);
+ for (i = 0; keys[i]; i++) {
+ str = g_key_file_get_string (keyfile, KEYS_GROUPNAME, keys[i], NULL);
if (str)
- g_hash_table_insert (key2fmt, g_strdup (keys [i]), str);
+ g_hash_table_insert (key2fmt, g_strdup (keys[i]), str);
}
g_strfreev (keys);
@@ -240,11 +240,11 @@ format_internal (const gchar *key, DTFormatKind kind, time_t tvalue, struct tm *
}
fmt = get_format_internal (key, kind);
- for (i = 0; fmt [i]; i++) {
- if (fmt [i] == '%') {
- if (fmt [i + 1] == '%') {
+ for (i = 0; fmt[i]; i++) {
+ if (fmt[i] == '%') {
+ if (fmt[i + 1] == '%') {
i++;
- } else if (fmt [i + 1] == 'a' && fmt [i + 2] == 'd' && (fmt [i + 3] == 0 || !g_ascii_isalpha (fmt [i + 3]))) {
+ } else if (fmt[i + 1] == 'a' && fmt[i + 2] == 'd' && (fmt[i + 3] == 0 || !g_ascii_isalpha (fmt[i + 3]))) {
gchar *ad;
/* "%ad" for abbreviated date */
@@ -262,7 +262,7 @@ format_internal (const gchar *key, DTFormatKind kind, time_t tvalue, struct tm *
ad = format_relative_date (tvalue, ttoday, &value, &today);
if (ad)
g_string_append (use_fmt, ad);
- else if (g_ascii_isspace (fmt [i + 3]))
+ else if (g_ascii_isspace (fmt[i + 3]))
i++;
g_free (ad);
@@ -285,7 +285,7 @@ format_internal (const gchar *key, DTFormatKind kind, time_t tvalue, struct tm *
static void
fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind)
{
- const gchar *date_items [] = {
+ const gchar *date_items[] = {
N_ ("Use locale default"),
"%m/%d/%y", /* American style */
"%m/%d/%Y", /* American style, full year */
@@ -295,7 +295,7 @@ fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind)
NULL
};
- const gchar *time_items [] = {
+ const gchar *time_items[] = {
N_ ("Use locale default"),
"%I:%M:%S %p", /* 12hours style */
"%I:%M %p", /* 12hours style, without seconds */
@@ -304,7 +304,7 @@ fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind)
NULL
};
- const gchar *datetime_items [] = {
+ const gchar *datetime_items[] = {
N_ ("Use locale default"),
"%m/%d/%y %I:%M:%S %p", /* American style */
"%m/%d/%Y %I:%M:%S %p", /* American style, full year */
@@ -321,7 +321,7 @@ fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind)
NULL
};
- const gchar *shortdate_items [] = {
+ const gchar *shortdate_items[] = {
"%A, %B %d",
"%A, %d %B",
"%a, %b %d",
@@ -354,7 +354,7 @@ fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind)
fmt = get_format_internal (key, kind);
- for (i = 0; items [i]; i++) {
+ for (i = 0; items[i]; i++) {
if (i == 0) {
gtk_combo_box_append_text ((GtkComboBox *) combo, _(items[i]));
} else {
diff --git a/e-util/e-event.c b/e-util/e-event.c
index 6d0ece99bf..5e4a2b6c09 100644
--- a/e-util/e-event.c
+++ b/e-util/e-event.c
@@ -451,14 +451,13 @@ emph_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
EEventHookClass *class;
GSList *items = NULL;
- g_return_val_if_fail (((EEventHookClass *)G_OBJECT_GET_CLASS (eph))->event != NULL, -1);
-
d(printf("loading event hook\n"));
if (((EPluginHookClass *)e_event_hook_parent_class)->construct (eph, ep, root) == -1)
return -1;
- class = (EEventHookClass *)G_OBJECT_GET_CLASS (eph);
+ class = E_EVENT_HOOK_GET_CLASS (eph);
+ g_return_val_if_fail (class->event != NULL, -1);
node = root->children;
while (node) {
diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c
index f6743b9f75..8a859ac378 100644
--- a/e-util/e-html-utils.c
+++ b/e-util/e-html-utils.c
@@ -240,7 +240,7 @@ e_text_to_html_full (const gchar *input, guint flags, guint32 color)
saw_citation = is_citation (cur, saw_citation);
if (saw_citation) {
if (!colored) {
- gchar font [25];
+ gchar font[25];
g_snprintf (font, 25, "<FONT COLOR=\"#%06x\">", color);
diff --git a/e-util/e-import.h b/e-util/e-import.h
index 57bb79450d..ea3f22cbdf 100644
--- a/e-util/e-import.h
+++ b/e-util/e-import.h
@@ -54,14 +54,26 @@ typedef struct _EImportImporter EImportImporter;
typedef struct _EImportFactory EImportFactory;
typedef struct _EImportTarget EImportTarget;
-typedef void (*EImportCompleteFunc)(EImport *ei, gpointer data);
-typedef void (*EImportStatusFunc)(EImport *ei, const gchar *what, gint pc, gpointer data);
+typedef void (*EImportCompleteFunc) (EImport *ei,
+ gpointer data);
+typedef void (*EImportStatusFunc) (EImport *ei,
+ const gchar *what,
+ gint pc,
+ gpointer data);
-typedef void (*EImportFactoryFunc)(EImport *ei, gpointer data);
-typedef void (*EImportImporterFunc)(EImportImporter *importer, gpointer data);
-typedef gboolean (*EImportSupportedFunc)(EImport *ei, EImportTarget *, EImportImporter *im);
-typedef GtkWidget *(*EImportWidgetFunc)(EImport *ei, EImportTarget *, EImportImporter *im);
-typedef void (*EImportImportFunc)(EImport *ei, EImportTarget *, EImportImporter *im);
+typedef void (*EImportFactoryFunc) (EImport *ei,
+ gpointer data);
+typedef void (*EImportImporterFunc) (EImportImporter *importer,
+ gpointer data);
+typedef gboolean (*EImportSupportedFunc) (EImport *ei,
+ EImportTarget *,
+ EImportImporter *im);
+typedef GtkWidget * (*EImportWidgetFunc) (EImport *ei,
+ EImportTarget *,
+ EImportImporter *im);
+typedef void (*EImportImportFunc) (EImport *ei,
+ EImportTarget *,
+ EImportImporter *im);
/* The global target types, implementors may add additional ones */
enum _e_import_target_t {
@@ -76,7 +88,8 @@ enum _e_import_target_t {
* @type: target type
* @priority: Priority of importer. Higher values will be processed first.
* @supported: Callback to see if this target is supported by the importer.
- * @get_widget: A widget factory for this importer, if it needs any extra information in the assistant. It will update the target.
+ * @get_widget: A widget factory for this importer, if it needs any extra
+ * information in the assistant. It will update the target.
* @import: Run the import.
* @cancel: Cancel the import.
* @get_preview: Callback to create a preview widget for just importing data.
diff --git a/e-util/e-logger.c b/e-util/e-logger.c
index 6dd08c722d..b29595a70f 100644
--- a/e-util/e-logger.c
+++ b/e-util/e-logger.c
@@ -255,13 +255,13 @@ e_logger_get_logs (ELogger *logger,
break;
len = strlen (tmp);
- if (len > 0 && tmp [len - 1] != '\n' && !feof (fp)) {
+ if (len > 0 && tmp[len - 1] != '\n' && !feof (fp)) {
/* there are more characters on a row than 249, so read them all */
GString *str = g_string_sized_new (1024);
g_string_append (str, tmp);
- while (!feof (fp) && len > 0 && tmp [len - 1] != '\n') {
+ while (!feof (fp) && len > 0 && tmp[len - 1] != '\n') {
tmp = fgets (buf, sizeof (buf), fp);
if (!tmp)
break;
diff --git a/e-util/e-non-intrusive-error-dialog.h b/e-util/e-non-intrusive-error-dialog.h
index 2b03a7ec7c..58456a13af 100644
--- a/e-util/e-non-intrusive-error-dialog.h
+++ b/e-util/e-non-intrusive-error-dialog.h
@@ -34,7 +34,7 @@ struct _log_data {
const gchar *text;
const gchar *stock_id;
GdkPixbuf *pbuf;
-} ldata [] = {
+} ldata[] = {
{ E_LOG_ERROR, N_("Error"), N_("Errors"), GTK_STOCK_DIALOG_ERROR },
{ E_LOG_WARNING, N_("Warning"), N_("Warnings and Errors"), GTK_STOCK_DIALOG_WARNING },
{ E_LOG_DEBUG, N_("Debug"), N_("Error, Warnings and Debug messages"), GTK_STOCK_DIALOG_INFO }
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index 2c8fb5160d..bcc476bfc8 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -44,7 +44,7 @@ enum {
LAST_SIGNAL
};
-static guint signals [LAST_SIGNAL] = { 0 };
+static guint signals[LAST_SIGNAL] = { 0 };
static void e_signature_list_finalize (GObject *object);
static void e_signature_list_dispose (GObject *object);
diff --git a/e-util/gtk-compat.h b/e-util/gtk-compat.h
index 7dc61f3a84..d66ff15d08 100644
--- a/e-util/gtk-compat.h
+++ b/e-util/gtk-compat.h
@@ -21,7 +21,8 @@
#endif
#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION == 21 && GTK_MICRO_VERSION == 1
-#define gdk_drag_context_get_selected_action(context) gdk_drag_context_get_action(context)
+#define gdk_drag_context_get_selected_action(context) \
+ gdk_drag_context_get_action(context)
#endif
#if GTK_CHECK_VERSION (2,90,5)
diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c
index bf138c08e4..5edd161ce9 100644
--- a/filter/e-filter-rule.c
+++ b/filter/e-filter-rule.c
@@ -711,14 +711,14 @@ filter_rule_get_widget (EFilterRule *rule,
/* only set to automatically clean up the memory */
g_object_set_data_full ((GObject *) vbox, "data", data, g_free);
- hbox = gtk_hbox_new (FALSE, 3);
-
+ hbox = gtk_hbox_new (FALSE, 3);
+
if (context->flags & E_RULE_CONTEXT_GROUPING) {
const gchar *thread_types[] = {
N_("If all conditions are met"),
N_("If any conditions are met")
};
-
+
label = gtk_label_new_with_mnemonic (_("_Find items:"));
combobox = gtk_combo_box_new_text ();
@@ -771,17 +771,17 @@ filter_rule_get_widget (EFilterRule *rule,
combobox, "changed",
G_CALLBACK (filter_rule_threading_changed_cb), rule);
}
-
+
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
- hbox = gtk_hbox_new (FALSE, 3);
+ hbox = gtk_hbox_new (FALSE, 3);
add = gtk_button_new_with_mnemonic (_("A_dd Condition"));
gtk_button_set_image (
GTK_BUTTON (add), gtk_image_new_from_stock (
GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON));
g_signal_connect (add, "clicked", G_CALLBACK (more_parts), data);
- gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 12);
+ gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 12);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
@@ -796,7 +796,7 @@ filter_rule_get_widget (EFilterRule *rule,
inruleame = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), inruleame, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (inruleame), hbox, FALSE, FALSE, 3);
+ gtk_box_pack_start (GTK_BOX (inruleame), hbox, FALSE, FALSE, 3);
l = rule->parts;
i = 0;
diff --git a/libart_lgpl/art_render.h b/libart_lgpl/art_render.h
index 2f80368abd..0675722add 100644
--- a/libart_lgpl/art_render.h
+++ b/libart_lgpl/art_render.h
@@ -114,7 +114,7 @@ struct _ArtRender {
art_boolean clear;
ArtPixMaxDepth clear_color[ART_MAX_CHAN + 1];
- art_u32 opacity; /* [0..0x10000] */
+ art_u32 opacity; /*[0..0x10000] */
ArtCompositingMode compositing_mode;
diff --git a/libart_lgpl/art_svp_render_aa.c b/libart_lgpl/art_svp_render_aa.c
index 26f06e0ac8..a6efa4ae0c 100644
--- a/libart_lgpl/art_svp_render_aa.c
+++ b/libart_lgpl/art_svp_render_aa.c
@@ -119,7 +119,7 @@ art_svp_render_delete_active (gint *active_segs, gint j, gint n_active_segs)
bulletproof.
Speed: Needs more aggressive culling of bounding boxes. Can
- probably speed up the [x0,x1) clipping of step values. Can do more
+ probably speed up the[x0,x1) clipping of step values. Can do more
of the step calculation in fixed point.
Precision: No known problems, although it should be tested
diff --git a/libgnomecanvas/gnome-canvas.h b/libgnomecanvas/gnome-canvas.h
index 365b625dab..66b9dba652 100644
--- a/libgnomecanvas/gnome-canvas.h
+++ b/libgnomecanvas/gnome-canvas.h
@@ -222,7 +222,7 @@ struct _GnomeCanvasItemClass {
gboolean (* event) (GnomeCanvasItem *item, GdkEvent *event);
/* Reserved for future expansion */
- gpointer spare_vmethods [4];
+ gpointer spare_vmethods[4];
};
GType gnome_canvas_item_get_type (void) G_GNUC_CONST;
@@ -496,7 +496,7 @@ struct _GnomeCanvasClass {
void (* request_update) (GnomeCanvas *canvas);
/* Reserved for future expansion */
- gpointer spare_vmethods [4];
+ gpointer spare_vmethods[4];
};
GType gnome_canvas_get_type (void) G_GNUC_CONST;
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 1e86f40a78..fb373d0c18 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -80,11 +80,18 @@ struct _selected_uri {
};
struct _EMFolderTreePrivate {
- GSList *select_uris; /* selected_uri structures of each path pending selection. */
- GHashTable *select_uris_table; /*Removed as they're encountered, so use this to find uri's not presnet but selected */
+ /* selected_uri structures of each path pending selection. */
+ GSList *select_uris;
+
+ /* Removed as they're encountered, so use this
+ * to find URI's not presnet but selected. */
+ GHashTable *select_uris_table;
guint32 excluded;
- gboolean (*excluded_func)(EMFolderTree *folder_tree, GtkTreeModel *model, GtkTreeIter *iter, gpointer data);
+ gboolean (*excluded_func) (EMFolderTree *folder_tree,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data);
gpointer excluded_data;
guint cursor_set:1; /* set to TRUE means we or something
@@ -233,7 +240,8 @@ folder_tree_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m)
path = gtk_tree_row_reference_get_path (m->root);
gtk_tree_model_get_iter (model, &root, path);
- /* if we had an error, then we need to re-set the load subdirs state and collapse the node */
+ /* If we had an error, then we need to re-set the
+ * load subdirs state and collapse the node. */
if (!m->fi && m->base.error != NULL) {
gtk_tree_store_set(
GTK_TREE_STORE (model), &root,
@@ -259,7 +267,9 @@ folder_tree_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m)
titer = iter; /* Preserve the last valid iter */
- gtk_tree_model_get (model, &iter, COL_BOOL_IS_STORE, &is_store_node, COL_BOOL_IS_FOLDER, &is_folder_node, -1);
+ gtk_tree_model_get (
+ model, &iter, COL_BOOL_IS_STORE, &is_store_node,
+ COL_BOOL_IS_FOLDER, &is_folder_node, -1);
/* stop on a "Loading..." node */
if (!is_store_node && !is_folder_node) {
@@ -810,8 +820,13 @@ folder_tree_key_press_event (GtkWidget *widget,
GtkTreeSelection *selection;
GtkTreeView *tree_view;
- if (event && event->type == GDK_KEY_PRESS && (event->keyval == GDK_space || event->keyval == '.' || event->keyval == ',' || event->keyval == '[' || event->keyval == ']')) {
- g_signal_emit (widget, signals [HIDDEN_KEY_EVENT], 0, event);
+ if (event && event->type == GDK_KEY_PRESS &&
+ (event->keyval == GDK_space ||
+ event->keyval == '.' ||
+ event->keyval == ',' ||
+ event->keyval == '[' ||
+ event->keyval == ']')) {
+ g_signal_emit (widget, signals[HIDDEN_KEY_EVENT], 0, event);
return TRUE;
}
@@ -1081,7 +1096,9 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
* Do not translate the "folder-display|" part. Remove it
* from your translation.
*/
- display = g_strdup_printf (C_("folder-display", "%s (%u%s)"), name, unread, subdirs_unread ? "+" : "");
+ display = g_strdup_printf (
+ C_("folder-display", "%s (%u%s)"),
+ name, unread, subdirs_unread ? "+" : "");
g_free (name);
} else
display = name;
@@ -1180,6 +1197,7 @@ folder_tree_new (EMFolderTree *folder_tree)
GtkCellRenderer *renderer;
GtkWidget *tree;
GConfClient *gconf;
+ const gchar *key;
gconf = mail_config_get_gconf_client ();
@@ -1201,10 +1219,13 @@ folder_tree_new (EMFolderTree *folder_tree)
render_icon, NULL, NULL);
renderer = gtk_cell_renderer_text_new ();
- if (!gconf_client_get_bool (gconf, "/apps/evolution/mail/display/no_folder_dots", NULL))
- g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+ key = "/apps/evolution/mail/display/no_folder_dots";
+ if (!gconf_client_get_bool (gconf, key, NULL))
+ g_object_set (
+ renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_tree_view_column_pack_start (column, renderer, TRUE);
- gtk_tree_view_column_set_cell_data_func (column, renderer, render_display_name, NULL, NULL);
+ gtk_tree_view_column_set_cell_data_func (
+ column, renderer, render_display_name, NULL, NULL);
folder_tree->priv->text_renderer = g_object_ref (renderer);
g_signal_connect_swapped (
@@ -1321,11 +1342,12 @@ folder_tree_init (EMFolderTree *folder_tree)
em_folder_tree_construct (folder_tree);
}
-/* Sets a selectable widget, which will be used for update-actions and select-all
- selectable interface functions. This can be NULL, then nothing can be selected
- and calling selectable function does nothing. */
+/* Sets a selectable widget, which will be used for update-actions and
+ * select-all selectable interface functions. This can be NULL, then nothing
+ * can be selected and calling selectable function does nothing. */
void
-em_folder_tree_set_selectable_widget (EMFolderTree *folder_tree, GtkWidget *selectable)
+em_folder_tree_set_selectable_widget (EMFolderTree *folder_tree,
+ GtkWidget *selectable)
{
if (selectable)
g_return_if_fail (E_IS_SELECTABLE (selectable));
@@ -1344,36 +1366,45 @@ folder_tree_selectable_update_actions (ESelectable *selectable,
folder_tree = EM_FOLDER_TREE (selectable);
g_return_if_fail (folder_tree != NULL);
- if (folder_tree->priv->selectable) {
- ESelectableInterface *iface = E_SELECTABLE_GET_INTERFACE (folder_tree->priv->selectable);
+ if (folder_tree->priv->selectable != NULL) {
+ ESelectableInterface *interface;
+ ESelectable *selectable;
- g_return_if_fail (iface != NULL);
- g_return_if_fail (iface->update_actions != NULL);
+ selectable = E_SELECTABLE (folder_tree->priv->selectable);
+ interface = E_SELECTABLE_GET_INTERFACE (selectable);
+ g_return_if_fail (interface->update_actions != NULL);
- iface->update_actions (E_SELECTABLE (folder_tree->priv->selectable), focus_tracker, clipboard_targets, n_clipboard_targets);
+ interface->update_actions (
+ selectable, focus_tracker,
+ clipboard_targets, n_clipboard_targets);
}
}
-#define folder_tree_selectable_func(_func) \
-static void \
-folder_tree_selectable_ ## _func (ESelectable *selectable) \
-{ \
- EMFolderTree *folder_tree; \
- \
- folder_tree = EM_FOLDER_TREE (selectable); \
- g_return_if_fail (folder_tree != NULL); \
- \
- if (folder_tree->priv->selectable) { \
- ESelectableInterface *iface = E_SELECTABLE_GET_INTERFACE (folder_tree->priv->selectable); \
- \
- g_return_if_fail (iface != NULL); \
- if (iface-> _func ) { \
- if (gtk_widget_get_can_focus (folder_tree->priv->selectable) && \
- !gtk_widget_has_focus (folder_tree->priv->selectable)) \
- gtk_widget_grab_focus (folder_tree->priv->selectable); \
- iface-> _func (E_SELECTABLE (folder_tree->priv->selectable)); \
- } \
- } \
+#define folder_tree_selectable_func(_func) \
+static void \
+folder_tree_selectable_ ## _func (ESelectable *selectable) \
+{ \
+ ESelectableInterface *interface; \
+ EMFolderTree *folder_tree; \
+ \
+ \
+ folder_tree = EM_FOLDER_TREE (selectable); \
+ g_return_if_fail (folder_tree != NULL); \
+ \
+ if (folder_tree->priv->selectable == NULL) \
+ return; \
+ \
+ selectable = E_SELECTABLE (folder_tree->priv->selectable); \
+ interface = E_SELECTABLE_GET_INTERFACE (selectable); \
+ \
+ if (interface-> _func == NULL) \
+ return; \
+ \
+ if (gtk_widget_get_can_focus (GTK_WIDGET (selectable)) && \
+ !gtk_widget_has_focus (GTK_WIDGET (selectable))) \
+ gtk_widget_grab_focus (GTK_WIDGET (selectable)); \
+ \
+ interface-> _func (selectable); \
}
folder_tree_selectable_func (cut_clipboard);
@@ -1539,7 +1570,9 @@ tree_drag_data_get (GtkWidget *widget,
switch (info) {
case DND_DRAG_TYPE_FOLDER:
/* dragging to a new location in the folder tree */
- gtk_selection_data_set(selection, drag_atoms[info], 8, (guchar *)uri, strlen (uri) + 1);
+ gtk_selection_data_set (
+ selection, drag_atoms[info], 8,
+ (guchar *) uri, strlen (uri) + 1);
break;
case DND_DRAG_TYPE_TEXT_URI_LIST:
/* dragging to nautilus or something, probably */
@@ -1561,7 +1594,6 @@ fail:
g_free (uri);
}
-/* TODO: Merge the drop handling code/menu's into one spot using a popup target for details */
/* Drop handling */
struct _DragDataReceivedAsync {
MailMsg base;
@@ -1620,18 +1652,26 @@ folder_tree_drop_async__desc (struct _DragDataReceivedAsync *m)
url = camel_url_new ((gchar *)data, NULL);
if (m->move)
- buf = g_strdup_printf (_("Moving folder %s"), url->fragment ? url->fragment : url->path + 1);
+ buf = g_strdup_printf (
+ _("Moving folder %s"), url->fragment ?
+ url->fragment : url->path + 1);
else
- buf = g_strdup_printf (_("Copying folder %s"), url->fragment ? url->fragment : url->path + 1);
+ buf = g_strdup_printf (
+ _("Copying folder %s"), url->fragment ?
+ url->fragment : url->path + 1);
camel_url_free (url);
return buf;
} else {
if (m->move)
- return g_strdup_printf (_("Moving messages into folder %s"), m->full_name);
+ return g_strdup_printf (
+ _("Moving messages into folder %s"),
+ m->full_name);
else
- return g_strdup_printf (_("Copying messages into folder %s"), m->full_name);
+ return g_strdup_printf (
+ _("Copying messages into folder %s"),
+ m->full_name);
}
}
@@ -1648,7 +1688,8 @@ folder_tree_drop_async__exec (struct _DragDataReceivedAsync *m)
g_set_error (
&m->base.error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Cannot drop message(s) into toplevel store"));
- } else if ((folder = camel_store_get_folder (m->store, m->full_name, 0, &m->base.error))) {
+ } else if ((folder = camel_store_get_folder (
+ m->store, m->full_name, 0, &m->base.error))) {
switch (m->info) {
case DND_DROP_TYPE_UID_LIST:
/* import a list of uids from another evo folder */
@@ -1766,7 +1807,11 @@ tree_drag_data_received (GtkWidget *widget,
static gboolean
is_special_local_folder (const gchar *name)
{
- return (!strcmp (name, "Drafts") || !strcmp (name, "Inbox") || !strcmp (name, "Outbox") || !strcmp (name, "Sent") || !strcmp (name, "Templates"));
+ return strcmp (name, "Drafts") == 0
+ || strcmp (name, "Inbox") == 0
+ || strcmp (name, "Outbox") == 0
+ || strcmp (name, "Sent") == 0
+ || strcmp (name, "Templates") == 0;
}
static GdkAtom
@@ -1849,7 +1894,8 @@ folder_tree_drop_target (EMFolderTree *folder_tree,
gtk_tree_path_free(src_path);
- if ((src_flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_INBOX || (src_flags & CAMEL_FOLDER_SYSTEM) != 0) {
+ if ((src_flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_INBOX ||
+ (src_flags & CAMEL_FOLDER_SYSTEM) != 0) {
/* allow only copy of the Inbox and other system folders */
GdkAtom xfolder;
@@ -1903,13 +1949,15 @@ folder_tree_drop_target (EMFolderTree *folder_tree,
goto done;
}
- /* don't allow copying/moving of the UNMATCHED vfolder */
- if (!strcmp (url->protocol, "vfolder") && !strcmp (url_path, CAMEL_UNMATCHED_NAME)) {
+ /* Don't allow copying/moving the UNMATCHED vfolder. */
+ if (!strcmp (url->protocol, "vfolder") &&
+ !strcmp (url_path, CAMEL_UNMATCHED_NAME)) {
camel_url_free (url);
goto done;
}
- /* don't allow copying/moving of any vTrash/vJunk folder nor maildir 'inbox' */
+ /* Don't allow copying/moving any vTrash/vJunk
+ * folder nor maildir 'inbox'. */
if (strcmp(url_path, CAMEL_VTRASH_NAME) == 0
|| strcmp(url_path, CAMEL_VJUNK_NAME) == 0
/* Dont allow drag from maildir 'inbox' */
@@ -2016,7 +2064,8 @@ tree_drag_drop (GtkWidget *widget,
priv->autoexpand_id = 0;
}
- if (!gtk_tree_view_get_path_at_pos (tree_view, x, y, &path, &column, &cell_x, &cell_y))
+ if (!gtk_tree_view_get_path_at_pos (
+ tree_view, x, y, &path, &column, &cell_x, &cell_y))
return FALSE;
target = folder_tree_drop_target (
@@ -2162,7 +2211,9 @@ tree_drag_motion (GtkWidget *widget,
gtk_tree_model_get_iter (model, &iter, path);
- if (gtk_tree_model_iter_has_child (model, &iter) && !gtk_tree_view_row_expanded (tree_view, path)) {
+ if (gtk_tree_model_iter_has_child (model, &iter) &&
+ !gtk_tree_view_row_expanded (tree_view, path)) {
+
if (priv->autoexpand_id != 0) {
GtkTreePath *autoexpand_path;
@@ -2172,12 +2223,16 @@ tree_drag_motion (GtkWidget *widget,
gtk_tree_row_reference_free (priv->autoexpand_row);
priv->autoexpand_row = gtk_tree_row_reference_new (model, path);
g_source_remove (priv->autoexpand_id);
- priv->autoexpand_id = g_timeout_add (600, (GSourceFunc) tree_autoexpand, folder_tree);
+ priv->autoexpand_id = g_timeout_add (
+ 600, (GSourceFunc)
+ tree_autoexpand, folder_tree);
}
gtk_tree_path_free (autoexpand_path);
} else {
- priv->autoexpand_id = g_timeout_add (600, (GSourceFunc) tree_autoexpand, folder_tree);
+ priv->autoexpand_id = g_timeout_add (
+ 600, (GSourceFunc)
+ tree_autoexpand, folder_tree);
priv->autoexpand_row = gtk_tree_row_reference_new (model, path);
}
} else if (priv->autoexpand_id != 0) {
@@ -2241,17 +2296,37 @@ em_folder_tree_enable_drag_and_drop (EMFolderTree *folder_tree)
setup = 1;
}
- gtk_drag_source_set((GtkWidget *)tree_view, GDK_BUTTON1_MASK, drag_types, NUM_DRAG_TYPES, GDK_ACTION_COPY | GDK_ACTION_MOVE);
- gtk_drag_dest_set((GtkWidget *)tree_view, GTK_DEST_DEFAULT_ALL, drop_types, NUM_DROP_TYPES, GDK_ACTION_COPY | GDK_ACTION_MOVE);
-
- g_signal_connect (tree_view, "drag-begin", G_CALLBACK (tree_drag_begin), folder_tree);
- g_signal_connect (tree_view, "drag-data-delete", G_CALLBACK (tree_drag_data_delete), folder_tree);
- g_signal_connect (tree_view, "drag-data-get", G_CALLBACK (tree_drag_data_get), folder_tree);
- g_signal_connect (tree_view, "drag-data-received", G_CALLBACK (tree_drag_data_received), folder_tree);
- g_signal_connect (tree_view, "drag-drop", G_CALLBACK (tree_drag_drop), folder_tree);
- g_signal_connect (tree_view, "drag-end", G_CALLBACK (tree_drag_end), folder_tree);
- g_signal_connect (tree_view, "drag-leave", G_CALLBACK (tree_drag_leave), folder_tree);
- g_signal_connect (tree_view, "drag-motion", G_CALLBACK (tree_drag_motion), folder_tree);
+ gtk_drag_source_set (
+ GTK_WIDGET (tree_view), GDK_BUTTON1_MASK,drag_types,
+ NUM_DRAG_TYPES, GDK_ACTION_COPY | GDK_ACTION_MOVE);
+ gtk_drag_dest_set (
+ GTK_WIDGET (tree_view), GTK_DEST_DEFAULT_ALL, drop_types,
+ NUM_DROP_TYPES, GDK_ACTION_COPY | GDK_ACTION_MOVE);
+
+ g_signal_connect (
+ tree_view, "drag-begin",
+ G_CALLBACK (tree_drag_begin), folder_tree);
+ g_signal_connect (
+ tree_view, "drag-data-delete",
+ G_CALLBACK (tree_drag_data_delete), folder_tree);
+ g_signal_connect (
+ tree_view, "drag-data-get",
+ G_CALLBACK (tree_drag_data_get), folder_tree);
+ g_signal_connect (
+ tree_view, "drag-data-received",
+ G_CALLBACK (tree_drag_data_received), folder_tree);
+ g_signal_connect (
+ tree_view, "drag-drop",
+ G_CALLBACK (tree_drag_drop), folder_tree);
+ g_signal_connect (
+ tree_view, "drag-end",
+ G_CALLBACK (tree_drag_end), folder_tree);
+ g_signal_connect (
+ tree_view, "drag-leave",
+ G_CALLBACK (tree_drag_leave), folder_tree);
+ g_signal_connect (
+ tree_view, "drag-motion",
+ G_CALLBACK (tree_drag_motion), folder_tree);
}
void
@@ -2309,7 +2384,10 @@ em_folder_tree_get_selected_uris (EMFolderTree *folder_tree)
}
static void
-get_selected_uris_path_iterate (GtkTreeModel *model, GtkTreePath *treepath, GtkTreeIter *iter, gpointer data)
+get_selected_uris_path_iterate (GtkTreeModel *model,
+ GtkTreePath *treepath,
+ GtkTreeIter *iter,
+ gpointer data)
{
GList **list = (GList **) data;
gchar *full_name;
@@ -2328,13 +2406,16 @@ em_folder_tree_get_selected_paths (EMFolderTree *folder_tree)
tree_view = GTK_TREE_VIEW (folder_tree);
selection = gtk_tree_view_get_selection (tree_view);
- gtk_tree_selection_selected_foreach (selection, get_selected_uris_path_iterate, &list);
+ gtk_tree_selection_selected_foreach (
+ selection, get_selected_uris_path_iterate, &list);
return list;
}
void
-em_folder_tree_set_selected_list (EMFolderTree *folder_tree, GList *list, gboolean expand_only)
+em_folder_tree_set_selected_list (EMFolderTree *folder_tree,
+ GList *list,
+ gboolean expand_only)
{
EMFolderTreePrivate *priv = folder_tree->priv;
gint id = 0;
@@ -2348,7 +2429,8 @@ em_folder_tree_set_selected_list (EMFolderTree *folder_tree, GList *list, gboole
CamelURL *url;
u->uri = g_strdup(list->data);
- u->store = (CamelStore *)camel_session_get_service (session, u->uri, CAMEL_PROVIDER_STORE, NULL);
+ u->store = (CamelStore *) camel_session_get_service (
+ session, u->uri, CAMEL_PROVIDER_STORE, NULL);
url = camel_url_new(u->uri, NULL);
if (u->store == NULL || url == NULL) {
@@ -2369,8 +2451,9 @@ em_folder_tree_set_selected_list (EMFolderTree *folder_tree, GList *list, gboole
if (path == NULL)
path = "";
- /* This makes sure all our parents up to the root are expanded */
- /* FIXME: Why does the expanded state store this made up path rather than the euri? */
+ /* This makes sure all our parents up to the root are
+ * expanded. FIXME: Why does the expanded state store
+ * this made up path rather than the euri? */
if ((account = mail_config_get_account_by_source_url(u->uri)))
expand_key = g_strdup_printf ("%s/%s", account->uid, path);
else if (CAMEL_IS_VEE_STORE (u->store))
@@ -2480,7 +2563,8 @@ em_folder_tree_select_next_path (EMFolderTree *folder_tree, gboolean skip_read_f
gtk_tree_model_get (model, &iter, COL_UINT_UNREAD, &unread, -1);
/* TODO : Flags here for better options */
- } while (skip_read_folders && unread <=0 && gtk_tree_path_compare (current_path, path));
+ } while (skip_read_folders && unread <=0 &&
+ gtk_tree_path_compare (current_path, path));
}
if (path) {
@@ -2748,11 +2832,6 @@ em_folder_tree_get_selected_folder_info (EMFolderTree *folder_tree)
fi->uri = g_strdup (uri);
fi->name = g_strdup (name);
- d(g_print ("em_folder_tree_get_selected_folder_info: fi->full_name=[%s], fi->uri=[%s], fi->name=[%s]\n",
- fi->full_name, fi->uri, fi->name));
- d(g_print ("em_folder_tree_get_selected_folder_info: full_name=[%s], uri=[%s], name=[%s]\n",
- full_name, uri, name));
-
if (!fi->full_name)
goto done;
@@ -2840,7 +2919,7 @@ em_folder_tree_restore_state (EMFolderTree *folder_tree,
groups = NULL;
for (ii = 0; groups_arr[ii] != NULL; ii++) {
- groups = g_slist_prepend (groups, groups_arr [ii]);
+ groups = g_slist_prepend (groups, groups_arr[ii]);
}
groups = g_slist_sort (groups, sort_by_store_and_uri);
diff --git a/mail/em-utils.c b/mail/em-utils.c
index f4b0f68299..ddf3986066 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -2104,7 +2104,7 @@ em_utils_url_unescape_amp (const gchar *url)
return NULL;
amps = 0;
- for (i = 0; url [i]; i++) {
+ for (i = 0; url[i]; i++) {
if (url [i] == '&' && strncmp (url + i, "&amp;", 5) == 0)
amps++;
}
@@ -2114,13 +2114,13 @@ em_utils_url_unescape_amp (const gchar *url)
if (!amps)
return buff;
- for (i = 0, j = 0; url [i]; i++, j++) {
- buff [j] = url [i];
+ for (i = 0, j = 0; url[i]; i++, j++) {
+ buff[j] = url[i];
if (url [i] == '&' && strncmp (url + i, "&amp;", 5) == 0)
i += 4;
}
- buff [j] = 0;
+ buff[j] = 0;
return buff;
}
@@ -2330,7 +2330,6 @@ emu_restore_folder_tree_state (EMFolderTree *folder_tree)
GKeyFile *key_file;
const gchar *config_dir;
gchar *filename;
- GError *error = NULL;
g_return_if_fail (folder_tree != NULL);
g_return_if_fail (EM_IS_FOLDER_TREE (folder_tree));
diff --git a/mail/message-list.c b/mail/message-list.c
index 6295766f5d..cf68a06bee 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -236,7 +236,7 @@ enum {
LAST_SIGNAL
};
-static guint message_list_signals [LAST_SIGNAL] = {0, };
+static guint message_list_signals[LAST_SIGNAL] = {0, };
static const gchar *status_icons[] = {
"mail-unread",
@@ -1449,7 +1449,7 @@ get_trimmed_subject (CamelMessageInfo *info)
if (mlist_len &&
*subject == '[' &&
!g_ascii_strncasecmp ((gchar *) subject + 1, mlist, mlist_len) &&
- subject [1 + mlist_len] == ']') {
+ subject[1 + mlist_len] == ']') {
subject += 1 + mlist_len + 1; /* jump over "[mailing-list]" */
found_mlist = TRUE;
@@ -1590,7 +1590,7 @@ ml_tree_value_at_ex (ETreeModel *etm,
/* This is astonisngly poorly written code */
/* To add to the woes, what color to show when the user choose multiple labels ?
- Don't say that I need to have the new labels [with subject] column visible always */
+ Don't say that I need to have the new labels[with subject] column visible always */
colour = camel_message_info_user_tag(msg_info, "color");
due_by = camel_message_info_user_tag(msg_info, "due-by");
@@ -4479,7 +4479,7 @@ regen_list_exec (struct _regen_list_msg *m)
looking_for = m->ml->ensure_uid;
for (i = 0; i < uids->len; i++) {
- if (g_str_equal (looking_for, uids->pdata [i]))
+ if (g_str_equal (looking_for, uids->pdata[i]))
break;
}
diff --git a/mail/message-list.h b/mail/message-list.h
index bc2bc0627b..bf23ddf8eb 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -29,13 +29,26 @@
#include <table/e-tree.h>
#include <shell/e-shell-backend.h>
-G_BEGIN_DECLS
+/* Standard GObject macros */
+#define MESSAGE_LIST_TYPE \
+ (message_list_get_type ())
+#define MESSAGE_LIST(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), MESSAGE_LIST_TYPE, MessageList))
+#define MESSAGE_LIST_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), MESSAGE_LIST_TYPE, MessageListClass))
+#define IS_MESSAGE_LIST(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), MESSAGE_LIST_TYPE))
+#define IS_MESSAGE_LIST_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), MESSAGE_LIST_TYPE))
+#define MESSAGE_LIST_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), MESSAGE_LIST_TYPE, MessageListClass))
-#define MESSAGE_LIST_TYPE (message_list_get_type ())
-#define MESSAGE_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MESSAGE_LIST_TYPE, MessageList))
-#define MESSAGE_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MESSAGE_LIST_TYPE, MessageListClass))
-#define IS_MESSAGE_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MESSAGE_LIST_TYPE))
-#define IS_MESSAGE_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MESSAGE_LIST_TYPE))
+G_BEGIN_DECLS
enum {
COL_MESSAGE_STATUS,
@@ -136,7 +149,8 @@ struct _MessageList {
/* list of outstanding regeneration requests */
GList *regen;
GMutex *regen_lock; /* when writing to the regen, guard with this lock too */
- gchar *pending_select_uid; /* set if we were busy regnerating while we had a select come in */
+ gchar *pending_select_uid; /* set if we were busy regnerating
+ * while we had a select come in */
gboolean pending_select_fallback;
guint regen_timeout_id;
gpointer regen_timeout_msg;
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index 26d6202cf1..a02888db8e 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -38,7 +38,7 @@
# define ETC_LOCALTIME "/etc/localtime"
#endif
-static const gchar * files_to_check [CHECK_NB] = {
+static const gchar * files_to_check[CHECK_NB] = {
ETC_TIMEZONE,
ETC_TIMEZONE_MAJ,
ETC_SYSCONFIG_CLOCK,
diff --git a/modules/network-manager/evolution-network-manager.c b/modules/network-manager/evolution-network-manager.c
index 4a661e2033..60cc0e806a 100644
--- a/modules/network-manager/evolution-network-manager.c
+++ b/modules/network-manager/evolution-network-manager.c
@@ -62,10 +62,11 @@ network_manager_get_shell (ENetworkManager *extension)
}
static void
-nm_connection_closed_cb (GDBusConnection *pconnection, gboolean remote_peer_vanished, GError *error, gpointer user_data)
+nm_connection_closed_cb (GDBusConnection *pconnection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ ENetworkManager *extension)
{
- ENetworkManager *extension = user_data;
-
g_object_unref (extension->connection);
extension->connection = NULL;
@@ -75,12 +76,12 @@ nm_connection_closed_cb (GDBusConnection *pconnection, gboolean remote_peer_vani
static void
network_manager_signal_cb (GDBusConnection *connection,
- const gchar *sender_name,
- const gchar *object_path,
- const gchar *interface_name,
- const gchar *signal_name,
- GVariant *parameters,
- gpointer user_data)
+ const gchar *sender_name,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
{
ENetworkManager *extension = user_data;
EShell *shell;
@@ -122,7 +123,8 @@ network_manager_check_initial_state (ENetworkManager *extension)
/* XXX Assuming this should be safe to call synchronously. */
response = g_dbus_connection_send_message_with_reply_sync (
- extension->connection, message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, 100, NULL, NULL, &error);
+ extension->connection, message,
+ G_DBUS_SEND_MESSAGE_FLAGS_NONE, 100, NULL, NULL, &error);
if (response != NULL) {
GVariant *body = g_dbus_message_get_body (response);
@@ -181,7 +183,10 @@ network_manager_connect (ENetworkManager *extension)
goto fail;
}
- g_signal_connect (extension->connection, "closed", G_CALLBACK (nm_connection_closed_cb), extension);
+ g_signal_connect (
+ extension->connection, "closed",
+ G_CALLBACK (nm_connection_closed_cb), extension);
+
network_manager_check_initial_state (extension);
return FALSE;
diff --git a/plugins/attachment-reminder/attachment-reminder.c b/plugins/attachment-reminder/attachment-reminder.c
index 99f8f080d8..f93467b8de 100644
--- a/plugins/attachment-reminder/attachment-reminder.c
+++ b/plugins/attachment-reminder/attachment-reminder.c
@@ -189,7 +189,7 @@ strip_text_msg (gchar *msg)
gchar *temp;
/* Note : HTML Signatures won't work. Depends on Bug #522784 */
- while (lines [i] && g_strcmp0 (lines[i], SIGNATURE)) {
+ while (lines[i] && g_strcmp0 (lines[i], SIGNATURE)) {
if (!g_str_has_prefix (g_strstrip(lines[i]), ">")) {
temp = stripped_msg;
diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c
index df5e4c3695..ebafc85f7a 100644
--- a/plugins/bbdb/gaimbuddies.c
+++ b/plugins/bbdb/gaimbuddies.c
@@ -531,7 +531,7 @@ get_buddy_icon_from_setting (xmlNodePtr setting)
gchar *icon = NULL;
icon = get_node_text (setting);
- if (icon [0] != '/') {
+ if (icon[0] != '/') {
gchar *path;
path = g_build_path ("/", g_get_home_dir (), ".purple/icons", icon, NULL);
diff --git a/plugins/caldav/caldav-browse-server.c b/plugins/caldav/caldav-browse-server.c
index 8b2d1ae0e4..e7d6140646 100644
--- a/plugins/caldav/caldav-browse-server.c
+++ b/plugins/caldav/caldav-browse-server.c
@@ -271,18 +271,18 @@ add_collection_node_to_tree (GtkTreeStore *store, GtkTreeIter *parent_iter, cons
/* pick the last non-empty path part */
gint idx = 0;
- while (tmp [idx]) {
+ while (tmp[idx]) {
idx++;
}
idx--;
- while (idx >= 0 && !tmp [idx][0]) {
+ while (idx >= 0 && !tmp[idx][0]) {
idx--;
}
if (idx >= 0)
- path = tmp [idx];
+ path = tmp[idx];
}
displayname = soup_uri_decode (path);
diff --git a/plugins/calendar-file/calendar-file.c b/plugins/calendar-file/calendar-file.c
index d46f1a9dc6..7ab2a13259 100644
--- a/plugins/calendar-file/calendar-file.c
+++ b/plugins/calendar-file/calendar-file.c
@@ -91,7 +91,7 @@ refresh_type_changed (GtkComboBox *refresh_type, ESource *source)
gtk_widget_hide (refresh_hbox);
}
- buff [0] = '0' + active;
+ buff[0] = '0' + active;
e_source_set_property (source, "refresh-type", buff);
}
@@ -200,7 +200,7 @@ e_calendar_file_customs (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_box_pack_start ((GtkBox *)box2, w2, FALSE, TRUE, 2);
value = e_source_get_property (source, "refresh-type");
- gtk_combo_box_set_active ((GtkComboBox *)w2, (value && *value && !value[1] && value [0] >= '0' && value [0] <= '2') ? value [0] - '0' : 0);
+ gtk_combo_box_set_active ((GtkComboBox *)w2, (value && *value && !value[1] && value[0] >= '0' && value[0] <= '2') ? value[0] - '0' : 0);
w1 = w2;
w2 = e_plugin_util_add_refresh (NULL, NULL, source, "refresh");
diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c
index 61180b7153..970bdf4f8b 100644
--- a/plugins/calendar-weather/calendar-weather.c
+++ b/plugins/calendar-weather/calendar-weather.c
@@ -69,7 +69,7 @@ e_plugin_lib_enable (EPlugin *epl, gint enable)
{ NULL, NULL }
};
- tmp = _(categories [0].description);
+ tmp = _(categories[0].description);
/* Add the categories icons if we don't have them. */
for (l = e_categories_get_list (); l; l = g_list_next (l)) {
diff --git a/plugins/face/face.c b/plugins/face/face.c
index 468b9273c9..2013f7dac6 100644
--- a/plugins/face/face.c
+++ b/plugins/face/face.c
@@ -75,7 +75,7 @@ get_face_base64 (void)
if (g_file_get_contents (filename, &file_contents, &length, NULL)) {
if (length > 0) {
file_contents = g_realloc (file_contents, length + 1);
- file_contents [length] = 0;
+ file_contents[length] = 0;
} else {
g_free (file_contents);
file_contents = NULL;
diff --git a/plugins/groupwise-features/camel-gw-listener.c b/plugins/groupwise-features/camel-gw-listener.c
index 3539d253cd..308ed517c9 100644
--- a/plugins/groupwise-features/camel-gw-listener.c
+++ b/plugins/groupwise-features/camel-gw-listener.c
@@ -940,7 +940,7 @@ prune_proxies (void) {
GError *err = NULL;
const gchar *parent_id_name = NULL;
gint i;
- ECalSourceType types [] = { E_CAL_SOURCE_TYPE_EVENT,
+ ECalSourceType types[] = { E_CAL_SOURCE_TYPE_EVENT,
E_CAL_SOURCE_TYPE_TODO,
E_CAL_SOURCE_TYPE_JOURNAL
};
diff --git a/plugins/groupwise-features/install-shared.c b/plugins/groupwise-features/install-shared.c
index 55a3fb1664..db906e6952 100644
--- a/plugins/groupwise-features/install-shared.c
+++ b/plugins/groupwise-features/install-shared.c
@@ -82,7 +82,7 @@ install_folder_response (EMFolderSelector *emfs, gint response, gpointer *data)
folder_name = (gchar *)path;
parent_name = NULL;
} else {
- while (names [parts])
+ while (names[parts])
parts++;
folder_name = names[parts -1];
if (parts >= 2)
diff --git a/plugins/groupwise-features/mail-send-options.c b/plugins/groupwise-features/mail-send-options.c
index fb0a3bda14..63bbbe7c9b 100644
--- a/plugins/groupwise-features/mail-send-options.c
+++ b/plugins/groupwise-features/mail-send-options.c
@@ -62,7 +62,7 @@ static void
feed_input_data(ESendOptionsDialog * dialog, gint state, gpointer data)
{
EMsgComposer *comp;
- gchar value [100];
+ gchar value[100];
gchar *temp = NULL;
comp = (EMsgComposer *) data;
diff --git a/plugins/groupwise-features/send-options.c b/plugins/groupwise-features/send-options.c
index 8d9c102b63..a3c08ca90c 100644
--- a/plugins/groupwise-features/send-options.c
+++ b/plugins/groupwise-features/send-options.c
@@ -102,7 +102,8 @@ get_cnc (GtkWindow *parent_window)
}
static void
-e_send_options_load_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGeneral *ggopts)
+e_send_options_load_general_opts (ESendOptionsGeneral *gopts,
+ EGwSendOptionsGeneral *ggopts)
{
time_t temp;
@@ -127,7 +128,8 @@ e_send_options_load_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGene
}
static void
-e_send_options_load_status_options (ESendOptionsStatusTracking *sopts, EGwSendOptionsStatusTracking *gsopts)
+e_send_options_load_status_options (ESendOptionsStatusTracking *sopts,
+ EGwSendOptionsStatusTracking *gsopts)
{
sopts->tracking_enabled = gsopts->tracking_enabled;
sopts->track_when = gsopts->track_when;
@@ -251,7 +253,8 @@ send_options_finalize (void)
}
static void
-e_send_options_copy_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGeneral *ggopts)
+e_send_options_copy_general_opts (ESendOptionsGeneral *gopts,
+ EGwSendOptionsGeneral *ggopts)
{
ggopts->priority = gopts->priority;
@@ -282,7 +285,8 @@ e_send_options_copy_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGene
}
static void
-e_send_options_copy_status_options (ESendOptionsStatusTracking *sopts, EGwSendOptionsStatusTracking *gsopts)
+e_send_options_copy_status_options (ESendOptionsStatusTracking *sopts,
+ EGwSendOptionsStatusTracking *gsopts)
{
gsopts->tracking_enabled = sopts->tracking_enabled;
gsopts->track_when = sopts->track_when;
@@ -296,7 +300,8 @@ e_send_options_copy_status_options (ESendOptionsStatusTracking *sopts, EGwSendOp
}
static gboolean
-check_status_options_changed (EGwSendOptionsStatusTracking *n_sopts, EGwSendOptionsStatusTracking *o_sopts)
+check_status_options_changed (EGwSendOptionsStatusTracking *n_sopts,
+ EGwSendOptionsStatusTracking *o_sopts)
{
return (!(n_sopts->tracking_enabled == o_sopts->tracking_enabled
&& n_sopts->track_when == o_sopts->track_when
@@ -309,7 +314,8 @@ check_status_options_changed (EGwSendOptionsStatusTracking *n_sopts, EGwSendOpti
}
static gboolean
-check_general_changed (EGwSendOptionsGeneral *n_gopts, EGwSendOptionsGeneral *o_gopts)
+check_general_changed (EGwSendOptionsGeneral *n_gopts,
+ EGwSendOptionsGeneral *o_gopts)
{
return (!(n_gopts->priority == o_gopts->priority
&& n_gopts->delay_enabled == o_gopts->delay_enabled
@@ -359,7 +365,7 @@ get_source (ESourceList *list)
{
GSList *p, *l;
gchar **temp = g_strsplit (account->source->url, ";", -1);
- gchar *uri = temp [0];
+ gchar *uri = temp[0];
l = e_source_list_peek_groups (list);
@@ -409,7 +415,9 @@ add_return_value (EGwSendOptionsReturnNotify track,
}
static void
-put_options_in_source (ESource *source, EGwSendOptionsGeneral *gopts, EGwSendOptionsStatusTracking *sopts)
+put_options_in_source (ESource *source,
+ EGwSendOptionsGeneral *gopts,
+ EGwSendOptionsStatusTracking *sopts)
{
gchar *value;
const gchar *val;
@@ -534,7 +542,9 @@ send_options_commit (EPlugin *epl, EConfigHookItemFactoryData *data)
status = e_gw_connection_modify_settings (n_cnc, n_opts);
if (!changed || status != E_GW_CONNECTION_STATUS_OK) {
- g_warning (G_STRLOC "Cannot modify Send Options: %s", e_gw_connection_get_error_message (status));
+ g_warning (
+ G_STRLOC "Cannot modify Send Options: %s",
+ e_gw_connection_get_error_message (status));
g_object_unref (n_opts);
n_opts = NULL;
} else
diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c
index 532316599c..2fb7a12b6e 100644
--- a/plugins/groupwise-features/share-folder-common.c
+++ b/plugins/groupwise-features/share-folder-common.c
@@ -469,7 +469,7 @@ get_container_id(EGwConnection *cnc, const gchar *fname)
names = g_strsplit (fname, "/", -1);
if (names) {
- while (names [parts])
+ while (names[parts])
parts++;
fname = names[i];
}
diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c
index 83ecf6c1bf..d350ef08ee 100644
--- a/plugins/groupwise-features/status-track.c
+++ b/plugins/groupwise-features/status-track.c
@@ -50,7 +50,7 @@ format_date (const gchar * value)
time = e_gw_connection_get_date_from_string (value);
str = ctime (&time);
- str [strlen(str)-1] = '\0';
+ str[strlen(str)-1] = '\0';
return str;
}
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index 13a4868fa9..4b913744cc 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -103,7 +103,7 @@ GtkWidget *em_folder_selection_button_new (const gchar *title, const gchar *capt
void em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const gchar *uri);
const gchar *em_folder_selection_button_get_selection (EMFolderSelectionButton *button);
-static guchar pst_signature [] = { '!', 'B', 'D', 'N' };
+static guchar pst_signature[] = { '!', 'B', 'D', 'N' };
struct _PstImporter {
MailMsg base;
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index 9918fa0967..0b33453ff3 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -86,7 +86,7 @@ static const gchar *em_junk_sa_spamc_binaries [4] = {"spamc", "/usr/bin/spamc",
static const gchar *em_junk_sa_spamd_binaries [4] = {"spamd", "/usr/bin/spamd", "/usr/sbin/spamd", NULL};
#define SPAMD_RESTARTS_SIZE 8
-static time_t em_junk_sa_spamd_restarts [SPAMD_RESTARTS_SIZE] = {0, 0, 0, 0, 0, 0, 0, 0};
+static time_t em_junk_sa_spamd_restarts[SPAMD_RESTARTS_SIZE] = {0, 0, 0, 0, 0, 0, 0, 0};
static gint em_junk_sa_spamd_restarts_count = 0;
/* Variables to indicate whether spamd is running with --allow-tell */
@@ -115,7 +115,7 @@ pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, gin
camel_debug_end ();
}
- program = g_find_program_in_path (argv [0]);
+ program = g_find_program_in_path (argv[0]);
if (program == NULL) {
d(printf ("program not found, returning %d\n", rv_err));
g_set_error (error, EM_JUNK_ERROR, rv_err, _("SpamAssassin not found, code: %d"), rv_err);
@@ -135,8 +135,8 @@ pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, gin
errnosav = errno;
d(printf ("failed to create a pipe (for use with SpamAssassin: %s\n", g_strerror (errno)));
g_set_error (error, EM_JUNK_ERROR, errnosav, _("Failed to create pipe: %s"), g_strerror (errnosav));
- close (fds [0]);
- close (fds [1]);
+ close (fds[0]);
+ close (fds[1]);
errno = errnosav;
return rv_err;
}
@@ -152,9 +152,9 @@ pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, gin
(output_buffer == NULL && dup2 (nullfd, STDOUT_FILENO) == -1) ||
(output_buffer != NULL && dup2 (out_fds[1], STDOUT_FILENO) == -1))
_exit (rv_err & 0377);
- close (fds [0]);
+ close (fds[0]);
if (output_buffer)
- close (out_fds [1]);
+ close (out_fds[1]);
setsid ();
@@ -169,8 +169,8 @@ pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, gin
close (fds[0]);
close (fds[1]);
if (output_buffer) {
- close (out_fds [0]);
- close (out_fds [1]);
+ close (out_fds[0]);
+ close (out_fds[1]);
}
if (errnosav != 0 && errnosav != -1)
g_set_error (error, EM_JUNK_ERROR, errnosav, _("Error after fork: %s"), g_strerror (errnosav));
@@ -181,7 +181,7 @@ pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, gin
/* parent process */
close (fds[0]);
if (output_buffer)
- close (out_fds [1]);
+ close (out_fds[1]);
if (msg) {
stream = camel_stream_fs_new_with_fd (fds[1]);
@@ -300,7 +300,7 @@ em_junk_sa_test_spamd_running (const gchar *binary, gboolean system)
static void
em_junk_sa_test_allow_tell (void)
{
- const gchar *argv [4] = {
+ const gchar *argv[4] = {
"spamc",
"-L",
"forget",
@@ -314,7 +314,7 @@ em_junk_sa_test_allow_tell (void)
static void
em_junk_sa_test_spamassassin (void)
{
- const gchar *argv [3] = {
+ const gchar *argv[3] = {
"spamassassin",
"--version",
NULL,
@@ -395,8 +395,8 @@ 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++) {
- em_junk_sa_use_spamc = em_junk_sa_run_spamd (em_junk_sa_spamd_binaries [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;
break;
@@ -411,8 +411,8 @@ em_junk_sa_find_spamc ()
gint b;
em_junk_sa_use_spamc = FALSE;
- for (b = 0; em_junk_sa_spamc_binaries [b]; b++) {
- em_junk_sa_spamc_binary = em_junk_sa_spamc_binaries [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;
break;
@@ -429,13 +429,13 @@ em_junk_sa_test_spamd (void)
gboolean try_system_spamd = TRUE;
if (em_junk_sa_spamc_gconf_binary) {
- em_junk_sa_spamc_binaries [0] = em_junk_sa_spamc_gconf_binary;
- em_junk_sa_spamc_binaries [1] = NULL;
+ em_junk_sa_spamc_binaries[0] = em_junk_sa_spamc_gconf_binary;
+ em_junk_sa_spamc_binaries[1] = NULL;
}
if (em_junk_sa_spamd_gconf_binary) {
- em_junk_sa_spamd_binaries [0] = em_junk_sa_spamd_gconf_binary;
- em_junk_sa_spamd_binaries [1] = NULL;
+ em_junk_sa_spamd_binaries[0] = em_junk_sa_spamd_gconf_binary;
+ em_junk_sa_spamd_binaries[1] = NULL;
try_system_spamd = FALSE;
}
@@ -456,8 +456,8 @@ 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++) {
- em_junk_sa_spamc_binary = em_junk_sa_spamc_binaries [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;
em_junk_sa_system_spamd_available = TRUE;
@@ -468,8 +468,8 @@ 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++) {
- em_junk_sa_spamc_binary = em_junk_sa_spamc_binaries [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;
em_junk_sa_system_spamd_available = FALSE;
@@ -527,11 +527,11 @@ em_junk_sa_check_respawn_too_fast ()
if (em_junk_sa_spamd_restarts_count >= SPAMD_RESTARTS_SIZE) {
/* all restarts in last 5 minutes */
- rv = (time_now - em_junk_sa_spamd_restarts [em_junk_sa_spamd_restarts_count % SPAMD_RESTARTS_SIZE] < 5*60);
+ rv = (time_now - em_junk_sa_spamd_restarts[em_junk_sa_spamd_restarts_count % SPAMD_RESTARTS_SIZE] < 5*60);
} else
rv = FALSE;
- em_junk_sa_spamd_restarts [em_junk_sa_spamd_restarts_count % SPAMD_RESTARTS_SIZE] = time_now;
+ em_junk_sa_spamd_restarts[em_junk_sa_spamd_restarts_count % SPAMD_RESTARTS_SIZE] = time_now;
em_junk_sa_spamd_restarts_count++;
G_UNLOCK (spamd_restart);
@@ -621,7 +621,7 @@ em_junk_sa_check_junk(EPlugin *ep, EMJunkTarget *target)
G_LOCK (socket_path);
g_free (to_free);
- argv [socket_i] = to_free = g_strdup (em_junk_sa_get_socket_path ());
+ argv[socket_i] = to_free = g_strdup (em_junk_sa_get_socket_path ());
G_UNLOCK (socket_path);
rv = pipe_to_sa_full (msg, NULL, argv, 0, 1, out, &target->error) != 0;
@@ -881,14 +881,14 @@ em_junk_sa_kill_spamd (void)
gint fd = open (em_junk_sa_spamd_pidfile, O_RDONLY);
if (fd != -1) {
- gchar pid_str [16];
+ gchar pid_str[16];
gint bytes;
bytes = read (fd, pid_str, 15);
if (bytes > 0) {
gint pid;
- pid_str [bytes] = 0;
+ pid_str[bytes] = 0;
pid = atoi (pid_str);
if (pid > 0) {
diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c
index 9569a51a12..fec943c021 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -152,7 +152,7 @@ shell_switcher_layout_actions (EShellSwitcher *switcher)
(len * H_PADDING)) / len;
else
extra_width = 0;
- for (p = rows [i]; p != NULL; p = p->next) {
+ for (p = rows[i]; p != NULL; p = p->next) {
GtkAllocation child_allocation;
child_allocation.x = x;
@@ -169,7 +169,7 @@ shell_switcher_layout_actions (EShellSwitcher *switcher)
}
for (i = 0; i <= row_last; i++)
- g_list_free (rows [i]);
+ g_list_free (rows[i]);
g_free (rows);
return y - allocation.y;
diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c
index d47b88e174..ee1af8e3be 100644
--- a/shell/e-shell-utils.c
+++ b/shell/e-shell-utils.c
@@ -236,9 +236,9 @@ e_shell_run_save_dialog (EShell *shell,
gchar **flts = g_strsplit (filters, ";", -1);
gint i;
- for (i = 0; flts [i]; i++) {
+ for (i = 0; flts[i]; i++) {
GtkFileFilter *filter = gtk_file_filter_new ();
- gchar *flt = flts [i];
+ gchar *flt = flts[i];
gchar *delim = strchr (flt, ':'), *next = NULL;
if (delim) {
@@ -269,7 +269,7 @@ e_shell_run_save_dialog (EShell *shell,
gtk_file_chooser_add_filter (file_chooser, filter);
}
- if (flts && flts [0]) {
+ if (flts && flts[0]) {
GtkFileFilter *filter = gtk_file_filter_new ();
gtk_file_filter_add_pattern (filter, "*");
diff --git a/shell/es-event.c b/shell/es-event.c
index 71381c1cfd..c260faebee 100644
--- a/shell/es-event.c
+++ b/shell/es-event.c
@@ -122,9 +122,11 @@ es_event_target_new (ESEvent *eme)
ESEventTargetState *
es_event_target_new_state (ESEvent *eme, gint state)
{
- ESEventTargetState *t = e_event_target_new (&eme->event, ES_EVENT_TARGET_STATE, sizeof (*t));
+ ESEventTargetState *t;
guint32 mask = ~0;
+ t = e_event_target_new (
+ &eme->event, ES_EVENT_TARGET_STATE, sizeof (*t));
t->state = state;
if (state)
@@ -140,8 +142,10 @@ es_event_target_new_state (ESEvent *eme, gint state)
ESEventTargetUpgrade *
es_event_target_new_upgrade (ESEvent *eme, gint major, gint minor, gint revision)
{
- ESEventTargetUpgrade *t = e_event_target_new (&eme->event, ES_EVENT_TARGET_UPGRADE, sizeof (*t));
+ ESEventTargetUpgrade *t;
+ t = e_event_target_new (
+ &eme->event, ES_EVENT_TARGET_UPGRADE, sizeof (*t));
t->major = major;
t->minor = minor;
t->revision = revision;
@@ -152,8 +156,10 @@ es_event_target_new_upgrade (ESEvent *eme, gint major, gint minor, gint revision
ESEventTargetComponent *
es_event_target_new_component (ESEvent *eme, const gchar *id)
{
- ESEventTargetComponent *t = e_event_target_new (&eme->event, ES_EVENT_TARGET_COMPONENT, sizeof (*t));
+ ESEventTargetComponent *t;
+ t = e_event_target_new (
+ &eme->event, ES_EVENT_TARGET_COMPONENT, sizeof (*t));
t->id = id;
return t;
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index 734301ebee..cf5a41eabf 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -291,7 +291,7 @@ e_timezone_dialog_construct (ETimezoneDialog *etd)
priv->map = e_map_new ();
map = GTK_WIDGET (priv->map);
- g_object_weak_ref(G_OBJECT(map), map_destroy_cb, priv);
+ g_object_weak_ref (G_OBJECT (map), map_destroy_cb, priv);
gtk_widget_set_events (map, gtk_widget_get_events (map)
| GDK_LEAVE_NOTIFY_MASK
@@ -334,7 +334,7 @@ e_timezone_dialog_construct (ETimezoneDialog *etd)
static gint
get_local_offset (void)
{
- time_t now = time(NULL), t_gmt, t_local;
+ time_t now = time (NULL), t_gmt, t_local;
struct tm gmt, local;
gint diff;
@@ -349,12 +349,12 @@ get_local_offset (void)
#endif
static icaltimezone*
-get_local_timezone(void)
+get_local_timezone (void)
{
icaltimezone *zone;
gchar *location;
- tzset();
+ tzset ();
location = e_cal_system_timezone_get_location ();
if (location)
@@ -450,12 +450,12 @@ zone_display_name_with_offset (icaltimezone *zone)
struct tm local;
struct icaltimetype tt;
gint offset;
- gchar buffer [100];
- time_t now = time(NULL);
+ gchar buffer[100];
+ time_t now = time (NULL);
gmtime_r ((const time_t *) &now, &local);
tt = tm_to_icaltimetype (&local, TRUE);
- offset = icaltimezone_get_utc_offset(zone, &tt, NULL);
+ offset = icaltimezone_get_utc_offset (zone, &tt, NULL);
format_utc_offset (offset, buffer);
@@ -530,7 +530,7 @@ on_map_motion (GtkWidget *widget, GdkEventMotion *event, gpointer data)
new_zone = get_zone_from_point (etd, priv->point_hover);
- display = zone_display_name_with_offset(new_zone);
+ display = zone_display_name_with_offset (new_zone);
gtk_label_set_text (GTK_LABEL (priv->preview_label), display);
g_free (display);
@@ -661,7 +661,7 @@ get_zone_from_point (ETimezoneDialog *etd,
}
}
- g_return_val_if_reached(NULL);
+ g_return_val_if_reached (NULL);
}
/**
@@ -703,10 +703,10 @@ e_timezone_dialog_set_timezone (ETimezoneDialog *etd,
g_return_if_fail (E_IS_TIMEZONE_DIALOG (etd));
if (!zone)
- zone = get_local_timezone();
+ zone = get_local_timezone ();
if (zone)
- display = zone_display_name_with_offset(zone);
+ display = zone_display_name_with_offset (zone);
priv = etd->priv;
@@ -829,12 +829,12 @@ timezone_combo_set_active_text (GtkComboBox *combo, const gchar *zone_name)
}
static void
-map_destroy_cb(gpointer data, GObject *where_object_was)
+map_destroy_cb (gpointer data, GObject *where_object_was)
{
ETimezoneDialogPrivate *priv = data;
if (priv->timeout_id) {
- g_source_remove(priv->timeout_id);
+ g_source_remove (priv->timeout_id);
priv->timeout_id = 0;
}
return;
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c
index a6f52bf69a..66b055dca6 100644
--- a/widgets/menus/gal-define-views-dialog.c
+++ b/widgets/menus/gal-define-views-dialog.c
@@ -96,10 +96,10 @@ gdvd_button_new_dialog_callback (GtkWidget *widget, gint id, GalDefineViewsDialo
NULL);
if (name && factory) {
- g_strchomp(name);
+ g_strchomp (name);
if (*name != '\0') {
view = gal_view_factory_new_view (factory, name);
- gal_view_collection_append(dialog->collection, view);
+ gal_view_collection_append (dialog->collection, view);
item = dialog->collection->view_data[dialog->collection->view_count-1];
gtk_list_store_append (GTK_LIST_STORE (dialog->model), &iter);
@@ -121,7 +121,7 @@ gdvd_button_new_dialog_callback (GtkWidget *widget, gint id, GalDefineViewsDialo
}
static void
-gdvd_button_new_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
+gdvd_button_new_callback (GtkWidget *widget, GalDefineViewsDialog *dialog)
{
GtkWidget *view_new_dialog = gal_view_new_dialog_new (dialog->collection);
gtk_window_set_transient_for (GTK_WINDOW (view_new_dialog), GTK_WINDOW (dialog));
@@ -131,7 +131,7 @@ gdvd_button_new_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
}
static void
-gdvd_button_modify_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
+gdvd_button_modify_callback (GtkWidget *widget, GalDefineViewsDialog *dialog)
{
GtkTreeIter iter;
GalViewCollectionItem *item;
@@ -148,7 +148,7 @@ gdvd_button_modify_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
}
static void
-gdvd_button_delete_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
+gdvd_button_delete_callback (GtkWidget *widget, GalDefineViewsDialog *dialog)
{
gint row;
GtkTreeIter iter;
@@ -207,7 +207,7 @@ gdvd_selection_changed_callback (GtkTreeSelection *selection, GalDefineViewsDial
}
static void
-gdvd_connect_signal(GalDefineViewsDialog *dialog, const gchar *widget_name, const gchar *signal, GCallback handler)
+gdvd_connect_signal (GalDefineViewsDialog *dialog, const gchar *widget_name, const gchar *signal, GCallback handler)
{
GtkWidget *widget;
@@ -279,10 +279,10 @@ gal_define_views_dialog_init (GalDefineViewsDialog *dialog)
static void
gal_define_views_dialog_dispose (GObject *object)
{
- GalDefineViewsDialog *gal_define_views_dialog = GAL_DEFINE_VIEWS_DIALOG(object);
+ GalDefineViewsDialog *gal_define_views_dialog = GAL_DEFINE_VIEWS_DIALOG (object);
if (gal_define_views_dialog->builder)
- g_object_unref(gal_define_views_dialog->builder);
+ g_object_unref (gal_define_views_dialog->builder);
gal_define_views_dialog->builder = NULL;
if (G_OBJECT_CLASS (gal_define_views_dialog_parent_class)->dispose)
@@ -290,7 +290,7 @@ gal_define_views_dialog_dispose (GObject *object)
}
static void
-gal_define_views_dialog_set_collection(GalDefineViewsDialog *dialog,
+gal_define_views_dialog_set_collection (GalDefineViewsDialog *dialog,
GalViewCollection *collection)
{
gint i;
@@ -384,9 +384,9 @@ gal_define_views_dialog_set_property (GObject *object, guint prop_id, const GVal
switch (prop_id) {
case PROP_COLLECTION:
if (g_value_get_object (value))
- gal_define_views_dialog_set_collection(dialog, GAL_VIEW_COLLECTION(g_value_get_object (value)));
+ gal_define_views_dialog_set_collection (dialog, GAL_VIEW_COLLECTION (g_value_get_object (value)));
else
- gal_define_views_dialog_set_collection(dialog, NULL);
+ gal_define_views_dialog_set_collection (dialog, NULL);
break;
default:
diff --git a/widgets/menus/gal-define-views-dialog.h b/widgets/menus/gal-define-views-dialog.h
index da214af36a..feb349e2d3 100644
--- a/widgets/menus/gal-define-views-dialog.h
+++ b/widgets/menus/gal-define-views-dialog.h
@@ -65,7 +65,7 @@ struct _GalDefineViewsDialogClass {
GtkDialogClass parent_class;
};
-GType gal_define_views_dialog_get_type(void);
+GType gal_define_views_dialog_get_type (void);
GtkWidget * gal_define_views_dialog_new (GalViewCollection *collection);
G_END_DECLS
diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c
index 35a18a2484..2274fd8c78 100644
--- a/widgets/menus/gal-define-views-model.c
+++ b/widgets/menus/gal-define-views-model.c
@@ -33,13 +33,6 @@
G_DEFINE_TYPE (GalDefineViewsModel, gal_define_views_model, E_TABLE_MODEL_TYPE)
-/*
- * GalDefineViewsModel callbacks
- * These are the callbacks that define the behavior of our custom model.
- */
-static void gal_define_views_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void gal_define_views_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-
enum {
PROP_0,
PROP_EDITABLE,
@@ -47,12 +40,64 @@ enum {
};
static void
-gdvm_dispose(GObject *object)
+gal_define_views_model_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GalDefineViewsModel *model;
+
+ model = GAL_DEFINE_VIEWS_MODEL (object);
+
+ switch (property_id) {
+ case PROP_EDITABLE:
+ model->editable = g_value_get_boolean (value);
+ return;
+
+ case PROP_COLLECTION:
+ e_table_model_pre_change (E_TABLE_MODEL (object));
+ if (g_value_get_object (value))
+ model->collection = GAL_VIEW_COLLECTION (
+ g_value_get_object (value));
+ else
+ model->collection = NULL;
+ e_table_model_changed (E_TABLE_MODEL (object));
+ return;
+ }
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+gal_define_views_model_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GalDefineViewsModel *model;
+
+ model = GAL_DEFINE_VIEWS_MODEL (object);
+
+ switch (property_id) {
+ case PROP_EDITABLE:
+ g_value_set_boolean (value, model->editable);
+ return;
+
+ case PROP_COLLECTION:
+ g_value_set_object (value, model->collection);
+ return;
+ }
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+gdvm_dispose (GObject *object)
{
- GalDefineViewsModel *model = GAL_DEFINE_VIEWS_MODEL(object);
+ GalDefineViewsModel *model = GAL_DEFINE_VIEWS_MODEL (object);
if (model->collection)
- g_object_unref(model->collection);
+ g_object_unref (model->collection);
model->collection = NULL;
if (G_OBJECT_CLASS (gal_define_views_model_parent_class)->dispose)
@@ -70,9 +115,9 @@ gdvm_col_count (ETableModel *etc)
static gint
gdvm_row_count (ETableModel *etc)
{
- GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc);
+ GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL (etc);
if (views->collection)
- return gal_view_collection_get_count(views->collection);
+ return gal_view_collection_get_count (views->collection);
else
return 0;
}
@@ -81,10 +126,10 @@ gdvm_row_count (ETableModel *etc)
static gpointer
gdvm_value_at (ETableModel *etc, gint col, gint row)
{
- GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc);
+ GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL (etc);
const gchar *value;
- value = gal_view_get_title (gal_view_collection_get_view(views->collection, row));
+ value = gal_view_get_title (gal_view_collection_get_view (views->collection, row));
return (gpointer)(value ? value : "");
}
@@ -93,11 +138,11 @@ gdvm_value_at (ETableModel *etc, gint col, gint row)
static void
gdvm_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val)
{
- GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc);
+ GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL (etc);
if (views->editable) {
- e_table_model_pre_change(etc);
- gal_view_set_title(gal_view_collection_get_view(views->collection, row), val);
- e_table_model_cell_changed(etc, col, row);
+ e_table_model_pre_change (etc);
+ gal_view_set_title (gal_view_collection_get_view (views->collection, row), val);
+ e_table_model_cell_changed (etc, col, row);
}
}
@@ -105,7 +150,7 @@ gdvm_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val)
static gboolean
gdvm_is_cell_editable (ETableModel *etc, gint col, gint row)
{
- return GAL_DEFINE_VIEWS_MODEL(etc)->editable;
+ return GAL_DEFINE_VIEWS_MODEL (etc)->editable;
}
static void
@@ -117,14 +162,14 @@ gdvm_append_row (ETableModel *etm, ETableModel *source, gint row)
static gpointer
gdvm_duplicate_value (ETableModel *etc, gint col, gconstpointer value)
{
- return g_strdup(value);
+ return g_strdup (value);
}
/* This function frees the value passed to it. */
static void
gdvm_free_value (ETableModel *etc, gint col, gpointer value)
{
- g_free(value);
+ g_free (value);
}
static gpointer
@@ -142,7 +187,7 @@ gdvm_value_is_empty (ETableModel *etc, gint col, gconstpointer value)
static gchar *
gdvm_value_to_string (ETableModel *etc, gint col, gconstpointer value)
{
- return g_strdup(value);
+ return g_strdup (value);
}
/**
@@ -156,11 +201,11 @@ void
gal_define_views_model_append (GalDefineViewsModel *model,
GalView *view)
{
- ETableModel *etm = E_TABLE_MODEL(model);
+ ETableModel *etm = E_TABLE_MODEL (model);
- e_table_model_pre_change(etm);
- gal_view_collection_append(model->collection, view);
- e_table_model_row_inserted(etm, gal_view_collection_get_count(model->collection) - 1);
+ e_table_model_pre_change (etm);
+ gal_view_collection_append (model->collection, view);
+ e_table_model_row_inserted (etm, gal_view_collection_get_count (model->collection) - 1);
}
static void
@@ -206,50 +251,6 @@ gal_define_views_model_init (GalDefineViewsModel *model)
model->collection = NULL;
}
-static void
-gal_define_views_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- GalDefineViewsModel *model;
-
- model = GAL_DEFINE_VIEWS_MODEL (object);
-
- switch (prop_id) {
- case PROP_EDITABLE:
- model->editable = g_value_get_boolean (value);
- break;
-
- case PROP_COLLECTION:
- e_table_model_pre_change(E_TABLE_MODEL(object));
- if (g_value_get_object (value))
- model->collection = GAL_VIEW_COLLECTION(g_value_get_object (value));
- else
- model->collection = NULL;
- e_table_model_changed(E_TABLE_MODEL(object));
- break;
- }
-}
-
-static void
-gal_define_views_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- GalDefineViewsModel *model;
-
- model = GAL_DEFINE_VIEWS_MODEL (object);
-
- switch (prop_id) {
- case PROP_EDITABLE:
- g_value_set_boolean (value, model->editable);
- break;
-
- case PROP_COLLECTION:
- g_value_set_object (value, model->collection);
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
/**
* gal_define_views_model_new
*
@@ -265,7 +266,7 @@ gal_define_views_model_new (void)
et = g_object_new (GAL_DEFINE_VIEWS_MODEL_TYPE, NULL);
- return E_TABLE_MODEL(et);
+ return E_TABLE_MODEL (et);
}
/**
@@ -281,7 +282,7 @@ GalView *
gal_define_views_model_get_view (GalDefineViewsModel *model,
gint n)
{
- return gal_view_collection_get_view(model->collection, n);
+ return gal_view_collection_get_view (model->collection, n);
}
/**
@@ -295,9 +296,9 @@ void
gal_define_views_model_delete_view (GalDefineViewsModel *model,
gint n)
{
- e_table_model_pre_change(E_TABLE_MODEL(model));
- gal_view_collection_delete_view(model->collection, n);
- e_table_model_row_deleted(E_TABLE_MODEL(model), n);
+ e_table_model_pre_change (E_TABLE_MODEL (model));
+ gal_view_collection_delete_view (model->collection, n);
+ e_table_model_row_deleted (E_TABLE_MODEL (model), n);
}
/**
@@ -311,8 +312,8 @@ void
gal_define_views_model_copy_view (GalDefineViewsModel *model,
gint n)
{
- ETableModel *etm = E_TABLE_MODEL(model);
- e_table_model_pre_change(etm);
- gal_view_collection_copy_view(model->collection, n);
- e_table_model_row_inserted(etm, gal_view_collection_get_count(model->collection) - 1);
+ ETableModel *etm = E_TABLE_MODEL (model);
+ e_table_model_pre_change (etm);
+ gal_view_collection_copy_view (model->collection, n);
+ e_table_model_row_inserted (etm, gal_view_collection_get_count (model->collection) - 1);
}
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c
index 296b634e28..56d8044680 100644
--- a/widgets/menus/gal-view-collection.c
+++ b/widgets/menus/gal-view-collection.c
@@ -47,7 +47,7 @@ enum {
LAST_SIGNAL
};
-static guint gal_view_collection_signals [LAST_SIGNAL] = { 0, };
+static guint gal_view_collection_signals[LAST_SIGNAL] = { 0, };
/**
* gal_view_collection_display_view:
@@ -65,7 +65,7 @@ gal_view_collection_display_view (GalViewCollection *collection,
g_return_if_fail (GAL_IS_VIEW (view));
g_signal_emit (collection,
- gal_view_collection_signals [DISPLAY_VIEW], 0,
+ gal_view_collection_signals[DISPLAY_VIEW], 0,
view);
}
@@ -76,20 +76,20 @@ gal_view_collection_changed (GalViewCollection *collection)
g_return_if_fail (GAL_IS_VIEW_COLLECTION (collection));
g_signal_emit (collection,
- gal_view_collection_signals [CHANGED], 0);
+ gal_view_collection_signals[CHANGED], 0);
}
static void
gal_view_collection_item_free (GalViewCollectionItem *item)
{
- g_free(item->id);
+ g_free (item->id);
if (item->view) {
if (item->view_changed_id)
g_signal_handler_disconnect (item->view,
item->view_changed_id);
- g_object_unref(item->view);
+ g_object_unref (item->view);
}
- g_free(item);
+ g_free (item);
}
static gchar *
@@ -101,13 +101,13 @@ gal_view_generate_string (GalViewCollection *collection,
gchar *pointer;
if (which == 1)
- ret_val = g_strdup(gal_view_get_title(view));
+ ret_val = g_strdup (gal_view_get_title (view));
else
ret_val = g_strdup_printf("%s_%d", gal_view_get_title(view), which);
- for (pointer = ret_val; *pointer; pointer = g_utf8_next_char(pointer)) {
- if (!g_unichar_isalnum(g_utf8_get_char(pointer))) {
+ for (pointer = ret_val; *pointer; pointer = g_utf8_next_char (pointer)) {
+ if (!g_unichar_isalnum (g_utf8_get_char (pointer))) {
gchar *ptr = pointer;
- for (; ptr < g_utf8_next_char(pointer); *ptr = '_', ptr++)
+ for (; ptr < g_utf8_next_char (pointer); *ptr = '_', ptr++)
;
}
}
@@ -124,11 +124,11 @@ gal_view_check_string (GalViewCollection *collection,
return FALSE;
for (i = 0; i < collection->view_count; i++) {
- if (!strcmp(string, collection->view_data[i]->id))
+ if (!strcmp (string, collection->view_data[i]->id))
return FALSE;
}
for (i = 0; i < collection->removed_view_count; i++) {
- if (!strcmp(string, collection->removed_view_data[i]->id))
+ if (!strcmp (string, collection->removed_view_data[i]->id))
return FALSE;
}
return TRUE;
@@ -142,17 +142,17 @@ gal_view_generate_id (GalViewCollection *collection,
for (i = 1; TRUE; i++) {
gchar *try;
- try = gal_view_generate_string(collection, view, i);
- if (gal_view_check_string(collection, try))
+ try = gal_view_generate_string (collection, view, i);
+ if (gal_view_check_string (collection, try))
return try;
- g_free(try);
+ g_free (try);
}
}
static void
gal_view_collection_dispose (GObject *object)
{
- GalViewCollection *collection = GAL_VIEW_COLLECTION(object);
+ GalViewCollection *collection = GAL_VIEW_COLLECTION (object);
gint i;
for (i = 0; i < collection->view_count; i++) {
@@ -171,14 +171,14 @@ gal_view_collection_dispose (GObject *object)
for (i = 0; i < collection->removed_view_count; i++) {
gal_view_collection_item_free (collection->removed_view_data[i]);
}
- g_free(collection->removed_view_data);
+ g_free (collection->removed_view_data);
collection->removed_view_data = NULL;
collection->removed_view_count = 0;
- g_free(collection->system_dir);
+ g_free (collection->system_dir);
collection->system_dir = NULL;
- g_free(collection->local_dir);
+ g_free (collection->local_dir);
collection->local_dir = NULL;
g_free (collection->default_view);
@@ -198,7 +198,7 @@ gal_view_collection_class_init (GalViewCollectionClass *klass)
object_class->dispose = gal_view_collection_dispose;
- gal_view_collection_signals [DISPLAY_VIEW] =
+ gal_view_collection_signals[DISPLAY_VIEW] =
g_signal_new ("display_view",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -207,7 +207,7 @@ gal_view_collection_class_init (GalViewCollectionClass *klass)
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, GAL_TYPE_VIEW);
- gal_view_collection_signals [CHANGED] =
+ gal_view_collection_signals[CHANGED] =
g_signal_new ("changed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -277,11 +277,11 @@ gal_view_collection_set_storage_directories (GalViewCollection *collection,
g_return_if_fail (system_dir != NULL);
g_return_if_fail (local_dir != NULL);
- g_free(collection->system_dir);
- g_free(collection->local_dir);
+ g_free (collection->system_dir);
+ g_free (collection->local_dir);
- collection->system_dir = g_strdup(system_dir);
- collection->local_dir = g_strdup(local_dir);
+ collection->system_dir = g_strdup (system_dir);
+ collection->local_dir = g_strdup (local_dir);
}
/**
@@ -315,9 +315,9 @@ view_changed (GalView *view,
item->changed = TRUE;
item->ever_changed = TRUE;
- g_signal_handler_block(G_OBJECT(item->view), item->view_changed_id);
- gal_view_collection_changed(item->collection);
- g_signal_handler_unblock(G_OBJECT(item->view), item->view_changed_id);
+ g_signal_handler_block (G_OBJECT (item->view), item->view_changed_id);
+ gal_view_collection_changed (item->collection);
+ g_signal_handler_unblock (G_OBJECT (item->view), item->view_changed_id);
}
/* Use factory list to load a GalView file. */
@@ -329,7 +329,7 @@ gal_view_collection_real_load_view_from_file (GalViewCollection *collection, con
factory = NULL;
for (factories = collection->factory_list; factories; factories = factories->next) {
- if (type && !strcmp(gal_view_factory_get_type_code(factories->data), type)) {
+ if (type && !strcmp (gal_view_factory_get_type_code (factories->data), type)) {
factory = factories->data;
break;
}
@@ -339,7 +339,7 @@ gal_view_collection_real_load_view_from_file (GalViewCollection *collection, con
view = gal_view_factory_new_view (factory, title);
gal_view_set_title (view, title);
- gal_view_load(view, filename);
+ gal_view_load (view, filename);
return view;
}
return NULL;
@@ -358,7 +358,7 @@ load_single_file (GalViewCollection *collection,
xmlNode *node)
{
GalViewCollectionItem *item;
- item = g_new(GalViewCollectionItem, 1);
+ item = g_new (GalViewCollectionItem, 1);
item->ever_changed = local;
item->changed = FALSE;
item->built_in = !local;
@@ -371,13 +371,13 @@ load_single_file (GalViewCollection *collection,
if (item->filename) {
gchar *fullpath;
- fullpath = g_build_filename(dir, item->filename, NULL);
+ fullpath = g_build_filename (dir, item->filename, NULL);
item->view = gal_view_collection_real_load_view_from_file (collection, item->type, item->title, dir, fullpath);
- g_free(fullpath);
+ g_free (fullpath);
if (item->view) {
item->view_changed_id =
g_signal_connect(item->view, "changed",
- G_CALLBACK(view_changed), item);
+ G_CALLBACK (view_changed), item);
}
}
return item;
@@ -409,7 +409,7 @@ load_single_dir (GalViewCollection *collection,
g_free (filename);
return;
}
- root = xmlDocGetRootElement(doc);
+ root = xmlDocGetRootElement (doc);
for (child = root->xmlChildrenNode; child; child = child->next) {
gchar *id;
gboolean found = FALSE;
@@ -420,7 +420,7 @@ load_single_dir (GalViewCollection *collection,
id = e_xml_get_string_prop_by_name(child, (const guchar *)"id");
for (i = 0; i < collection->view_count; i++) {
- if (!strcmp(id, collection->view_data[i]->id)) {
+ if (!strcmp (id, collection->view_data[i]->id)) {
if (!local)
collection->view_data[i]->built_in = TRUE;
found = TRUE;
@@ -429,7 +429,7 @@ load_single_dir (GalViewCollection *collection,
}
if (!found) {
for (i = 0; i < collection->removed_view_count; i++) {
- if (!strcmp(id, collection->removed_view_data[i]->id)) {
+ if (!strcmp (id, collection->removed_view_data[i]->id)) {
if (!local)
collection->removed_view_data[i]->built_in = TRUE;
found = TRUE;
@@ -441,16 +441,16 @@ load_single_dir (GalViewCollection *collection,
if (!found) {
GalViewCollectionItem *item = load_single_file (collection, dir, local, child);
if (item->filename && *item->filename) {
- collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
+ collection->view_data = g_renew (GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
collection->view_count++;
} else {
- collection->removed_view_data = g_renew(GalViewCollectionItem *, collection->removed_view_data, collection->removed_view_count + 1);
+ 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++;
}
}
- g_free(id);
+ g_free (id);
}
default_view = e_xml_get_string_prop_by_name (root, (const guchar *)"default-view");
@@ -463,8 +463,8 @@ load_single_dir (GalViewCollection *collection,
collection->default_view = default_view;
}
- g_free(filename);
- xmlFreeDoc(doc);
+ g_free (filename);
+ xmlFreeDoc (doc);
}
/**
@@ -487,9 +487,9 @@ gal_view_collection_load (GalViewCollection *collection)
if ((g_mkdir_with_parents (collection->local_dir, 0777) == -1) && (errno != EEXIST))
g_warning ("Unable to create dir %s: %s", collection->local_dir, g_strerror(errno));
- load_single_dir(collection, collection->local_dir, TRUE);
- load_single_dir(collection, collection->system_dir, FALSE);
- gal_view_collection_changed(collection);
+ load_single_dir (collection, collection->local_dir, TRUE);
+ load_single_dir (collection, collection->system_dir, FALSE);
+ gal_view_collection_changed (collection);
collection->loaded = TRUE;
}
@@ -516,7 +516,7 @@ gal_view_collection_save (GalViewCollection *collection)
doc = xmlNewDoc((const guchar *)"1.0");
root = xmlNewNode(NULL, (const guchar *)"GalViewCollection");
- xmlDocSetRootElement(doc, root);
+ xmlDocSetRootElement (doc, root);
if (collection->default_view && !collection->default_view_built_in) {
e_xml_set_string_prop_by_name(root, (const guchar *)"default-view", collection->default_view);
@@ -535,9 +535,9 @@ gal_view_collection_save (GalViewCollection *collection)
e_xml_set_string_prop_by_name(child, (const guchar *)"type", item->type);
if (item->changed) {
- filename = g_build_filename(collection->local_dir, item->filename, NULL);
- gal_view_save(item->view, filename);
- g_free(filename);
+ filename = g_build_filename (collection->local_dir, item->filename, NULL);
+ gal_view_save (item->view, filename);
+ g_free (filename);
}
}
}
@@ -555,8 +555,8 @@ gal_view_collection_save (GalViewCollection *collection)
filename = g_build_filename(collection->local_dir, "galview.xml", NULL);
if (e_xml_save_file (filename, doc) == -1)
g_warning ("Unable to save view to %s - %s", filename, g_strerror(errno));
- xmlFreeDoc(doc);
- g_free(filename);
+ xmlFreeDoc (doc);
+ g_free (filename);
}
/**
@@ -608,8 +608,8 @@ gal_view_collection_get_view_item (GalViewCollection *collection,
{
g_return_val_if_fail (collection != NULL, NULL);
g_return_val_if_fail (GAL_IS_VIEW_COLLECTION (collection), NULL);
- g_return_val_if_fail(n < collection->view_count, NULL);
- g_return_val_if_fail(n >= 0, NULL);
+ g_return_val_if_fail (n < collection->view_count, NULL);
+ g_return_val_if_fail (n >= 0, NULL);
return collection->view_data[n];
}
@@ -630,8 +630,8 @@ gal_view_collection_get_view_id_by_index (GalViewCollection *collection, gint n)
{
g_return_val_if_fail (collection != NULL, NULL);
g_return_val_if_fail (GAL_IS_VIEW_COLLECTION (collection), NULL);
- g_return_val_if_fail(n < collection->view_count, NULL);
- g_return_val_if_fail(n >= 0, NULL);
+ g_return_val_if_fail (n < collection->view_count, NULL);
+ g_return_val_if_fail (n >= 0, NULL);
return g_strdup (collection->view_data[n]->id);
}
@@ -647,27 +647,27 @@ gal_view_collection_append (GalViewCollection *collection,
g_return_if_fail (view != NULL);
g_return_if_fail (GAL_IS_VIEW (view));
- item = g_new(GalViewCollectionItem, 1);
+ item = g_new (GalViewCollectionItem, 1);
item->ever_changed = TRUE;
item->changed = TRUE;
item->built_in = FALSE;
- item->title = g_strdup(gal_view_get_title(view));
- item->type = g_strdup(gal_view_get_type_code(view));
- item->id = gal_view_generate_id(collection, view);
+ item->title = g_strdup (gal_view_get_title (view));
+ item->type = g_strdup (gal_view_get_type_code (view));
+ item->id = gal_view_generate_id (collection, view);
item->filename = g_strdup_printf("%s.galview", item->id);
item->view = view;
item->collection = collection;
- g_object_ref(view);
+ g_object_ref (view);
item->view_changed_id =
g_signal_connect(item->view, "changed",
G_CALLBACK (view_changed), item);
- collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
+ collection->view_data = g_renew (GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
collection->view_count++;
- gal_view_collection_changed(collection);
+ gal_view_collection_changed (collection);
}
void
@@ -681,20 +681,20 @@ gal_view_collection_delete_view (GalViewCollection *collection,
g_return_if_fail (i >= 0 && i < collection->view_count);
item = collection->view_data[i];
- memmove(collection->view_data + i, collection->view_data + i + 1, (collection->view_count - i - 1) * sizeof(GalViewCollectionItem *));
+ memmove (collection->view_data + i, collection->view_data + i + 1, (collection->view_count - i - 1) * sizeof (GalViewCollectionItem *));
collection->view_count--;
if (item->built_in) {
- g_free(item->filename);
+ 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 = 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++;
} else {
gal_view_collection_item_free (item);
}
- gal_view_collection_changed(collection);
+ gal_view_collection_changed (collection);
}
void
@@ -710,26 +710,26 @@ gal_view_collection_copy_view (GalViewCollection *collection,
view = collection->view_data[i]->view;
- item = g_new(GalViewCollectionItem, 1);
+ item = g_new (GalViewCollectionItem, 1);
item->ever_changed = TRUE;
item->changed = FALSE;
item->built_in = FALSE;
- item->title = g_strdup(gal_view_get_title(view));
- item->type = g_strdup(gal_view_get_type_code(view));
- item->id = gal_view_generate_id(collection, view);
+ item->title = g_strdup (gal_view_get_title (view));
+ item->type = g_strdup (gal_view_get_type_code (view));
+ item->id = gal_view_generate_id (collection, view);
item->filename = g_strdup_printf("%s.galview", item->id);
- item->view = gal_view_clone(view);
+ item->view = gal_view_clone (view);
item->collection = collection;
item->view_changed_id =
g_signal_connect(item->view, "changed",
G_CALLBACK (view_changed), item);
- collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
+ collection->view_data = g_renew (GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
collection->view_count++;
- gal_view_collection_changed(collection);
+ gal_view_collection_changed (collection);
}
gboolean
@@ -752,27 +752,27 @@ gal_view_collection_append_with_title (GalViewCollection *collection, const gcha
d(g_print("%s: %p\n", G_STRFUNC, view));
- item = g_new(GalViewCollectionItem, 1);
+ item = g_new (GalViewCollectionItem, 1);
item->ever_changed = TRUE;
item->changed = TRUE;
item->built_in = FALSE;
- item->title = g_strdup(gal_view_get_title(view));
- item->type = g_strdup(gal_view_get_type_code(view));
- item->id = gal_view_generate_id(collection, view);
+ item->title = g_strdup (gal_view_get_title (view));
+ item->type = g_strdup (gal_view_get_type_code (view));
+ item->id = gal_view_generate_id (collection, view);
item->filename = g_strdup_printf("%s.galview", item->id);
item->view = view;
item->collection = collection;
- g_object_ref(view);
+ g_object_ref (view);
item->view_changed_id =
g_signal_connect(item->view, "changed",
G_CALLBACK (view_changed), item);
- collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
+ collection->view_data = g_renew (GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
collection->view_count++;
- gal_view_collection_changed(collection);
+ gal_view_collection_changed (collection);
return item->id;
}
@@ -803,7 +803,7 @@ gal_view_collection_set_nth_view (GalViewCollection *collection, gint i, GalView
item->ever_changed = TRUE;
item->changed = TRUE;
- item->type = g_strdup(gal_view_get_type_code(view));
+ item->type = g_strdup (gal_view_get_type_code (view));
item->view_changed_id =
g_signal_connect(item->view, "changed",
diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c
index 977d58b627..1dcf453c18 100644
--- a/widgets/menus/gal-view-etable.c
+++ b/widgets/menus/gal-view-etable.c
@@ -61,57 +61,57 @@ config_changed (ETableConfig *config, GalViewEtable *view)
{
ETableState *state;
if (view->state)
- g_object_unref(view->state);
+ g_object_unref (view->state);
g_object_get (config,
"state", &state,
NULL);
- view->state = e_table_state_duplicate(state);
+ view->state = e_table_state_duplicate (state);
g_object_unref (state);
- gal_view_changed(GAL_VIEW(view));
+ gal_view_changed (GAL_VIEW (view));
}
static void
gal_view_etable_edit (GalView *view, GtkWindow *parent)
{
- GalViewEtable *etable_view = GAL_VIEW_ETABLE(view);
+ GalViewEtable *etable_view = GAL_VIEW_ETABLE (view);
ETableConfig *config;
- config = e_table_config_new(etable_view->title,
+ config = e_table_config_new (etable_view->title,
etable_view->spec,
etable_view->state,
parent);
g_signal_connect(config, "changed",
- G_CALLBACK(config_changed), view);
+ G_CALLBACK (config_changed), view);
}
static void
gal_view_etable_load (GalView *view,
const gchar *filename)
{
- e_table_state_load_from_file(GAL_VIEW_ETABLE(view)->state, filename);
+ e_table_state_load_from_file (GAL_VIEW_ETABLE (view)->state, filename);
}
static void
gal_view_etable_save (GalView *view,
const gchar *filename)
{
- e_table_state_save_to_file(GAL_VIEW_ETABLE(view)->state, filename);
+ e_table_state_save_to_file (GAL_VIEW_ETABLE (view)->state, filename);
}
static const gchar *
gal_view_etable_get_title (GalView *view)
{
- return GAL_VIEW_ETABLE(view)->title;
+ return GAL_VIEW_ETABLE (view)->title;
}
static void
gal_view_etable_set_title (GalView *view,
const gchar *title)
{
- g_free(GAL_VIEW_ETABLE(view)->title);
- GAL_VIEW_ETABLE(view)->title = g_strdup(title);
+ g_free (GAL_VIEW_ETABLE (view)->title);
+ GAL_VIEW_ETABLE (view)->title = g_strdup (title);
}
static const gchar *
@@ -125,34 +125,34 @@ gal_view_etable_clone (GalView *view)
{
GalViewEtable *gve, *new;
- gve = GAL_VIEW_ETABLE(view);
+ gve = GAL_VIEW_ETABLE (view);
new = g_object_new (GAL_TYPE_VIEW_ETABLE, NULL);
new->spec = gve->spec;
new->title = g_strdup (gve->title);
- new->state = e_table_state_duplicate(gve->state);
+ new->state = e_table_state_duplicate (gve->state);
- g_object_ref(new->spec);
+ g_object_ref (new->spec);
- return GAL_VIEW(new);
+ return GAL_VIEW (new);
}
static void
gal_view_etable_dispose (GObject *object)
{
- GalViewEtable *view = GAL_VIEW_ETABLE(object);
+ GalViewEtable *view = GAL_VIEW_ETABLE (object);
gal_view_etable_detach (view);
- g_free(view->title);
+ g_free (view->title);
view->title = NULL;
if (view->spec)
- g_object_unref(view->spec);
+ g_object_unref (view->spec);
view->spec = NULL;
if (view->state)
- g_object_unref(view->state);
+ g_object_unref (view->state);
view->state = NULL;
if (G_OBJECT_CLASS (gal_view_etable_parent_class)->dispose)
@@ -180,7 +180,7 @@ static void
gal_view_etable_init (GalViewEtable *gve)
{
gve->spec = NULL;
- gve->state = e_table_state_new();
+ gve->state = e_table_state_new ();
gve->title = NULL;
}
@@ -227,16 +227,16 @@ gal_view_etable_construct (GalViewEtable *view,
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (spec), NULL);
if (spec)
- g_object_ref(spec);
+ g_object_ref (spec);
view->spec = spec;
if (view->state)
- g_object_unref(view->state);
- view->state = e_table_state_duplicate(spec->state);
+ g_object_unref (view->state);
+ view->state = e_table_state_duplicate (spec->state);
- view->title = g_strdup(title);
+ view->title = g_strdup (title);
- return GAL_VIEW(view);
+ return GAL_VIEW (view);
}
void
@@ -246,10 +246,10 @@ gal_view_etable_set_state (GalViewEtable *view, ETableState *state)
g_return_if_fail (E_IS_TABLE_STATE (state));
if (view->state)
- g_object_unref(view->state);
- view->state = e_table_state_duplicate(state);
+ g_object_unref (view->state);
+ view->state = e_table_state_duplicate (state);
- gal_view_changed(GAL_VIEW(view));
+ gal_view_changed (GAL_VIEW (view));
}
static void
@@ -261,7 +261,7 @@ table_state_changed (ETable *table, GalViewEtable *view)
g_object_unref (view->state);
view->state = state;
- gal_view_changed(GAL_VIEW(view));
+ gal_view_changed (GAL_VIEW (view));
}
static void
@@ -273,7 +273,7 @@ tree_state_changed (ETree *tree, GalViewEtable *view)
g_object_unref (view->state);
view->state = state;
- gal_view_changed(GAL_VIEW(view));
+ gal_view_changed (GAL_VIEW (view));
}
void
@@ -286,7 +286,7 @@ gal_view_etable_attach_table (GalViewEtable *view, ETable *table)
view->table = table;
- e_table_set_state_object(view->table, view->state);
+ e_table_set_state_object (view->table, view->state);
g_object_ref (view->table);
view->table_state_changed_id =
g_signal_connect(view->table, "state_change",
@@ -303,7 +303,7 @@ gal_view_etable_attach_tree (GalViewEtable *view, ETree *tree)
view->tree = tree;
- e_tree_set_state_object(view->tree, view->state);
+ e_tree_set_state_object (view->tree, view->state);
g_object_ref (view->tree);
view->tree_state_changed_id =
g_signal_connect(view->tree, "state_change",
diff --git a/widgets/menus/gal-view-factory-etable.h b/widgets/menus/gal-view-factory-etable.h
index 79aaa161e9..a107b87083 100644
--- a/widgets/menus/gal-view-factory-etable.h
+++ b/widgets/menus/gal-view-factory-etable.h
@@ -62,7 +62,7 @@ struct _GalViewFactoryEtableClass {
GalViewFactoryClass parent_class;
};
-GType gal_view_factory_etable_get_type(void);
+GType gal_view_factory_etable_get_type (void);
ETableSpecification *
gal_view_factory_etable_get_specification
(GalViewFactoryEtable *factory);
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 0d182608c5..fc5aff0c63 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -55,7 +55,7 @@ enum {
LAST_SIGNAL
};
-static guint gal_view_instance_signals [LAST_SIGNAL] = { 0, };
+static guint gal_view_instance_signals[LAST_SIGNAL] = { 0, };
static void
gal_view_instance_changed (GalViewInstance *instance)
@@ -64,7 +64,7 @@ gal_view_instance_changed (GalViewInstance *instance)
g_return_if_fail (GAL_IS_VIEW_INSTANCE (instance));
g_signal_emit (instance,
- gal_view_instance_signals [CHANGED], 0);
+ gal_view_instance_signals[CHANGED], 0);
}
static void
@@ -74,7 +74,7 @@ gal_view_instance_display_view (GalViewInstance *instance, GalView *view)
g_return_if_fail (GAL_IS_VIEW_INSTANCE (instance));
g_signal_emit (instance,
- gal_view_instance_signals [DISPLAY_VIEW], 0,
+ gal_view_instance_signals[DISPLAY_VIEW], 0,
view);
}
@@ -86,7 +86,7 @@ save_current_view (GalViewInstance *instance)
doc = xmlNewDoc((const guchar *)"1.0");
root = xmlNewNode (NULL, (const guchar *)"GalViewCurrentView");
- xmlDocSetRootElement(doc, root);
+ xmlDocSetRootElement (doc, root);
if (instance->current_id)
e_xml_set_string_prop_by_name (root, (const guchar *)"current_view", instance->current_id);
@@ -95,7 +95,7 @@ save_current_view (GalViewInstance *instance)
if (e_xml_save_file (instance->current_view_filename, doc) == -1)
g_warning ("Unable to save view to %s - %s", instance->current_view_filename, g_strerror(errno));
- xmlFreeDoc(doc);
+ xmlFreeDoc (doc);
}
static void
@@ -105,7 +105,7 @@ view_changed (GalView *view, GalViewInstance *instance)
g_free (instance->current_id);
instance->current_id = NULL;
save_current_view (instance);
- gal_view_instance_changed(instance);
+ gal_view_instance_changed (instance);
}
gal_view_save (view, instance->custom_filename);
@@ -137,8 +137,8 @@ connect_view (GalViewInstance *instance, GalView *view)
disconnect_view (instance);
instance->current_view = view;
- instance->current_title = g_strdup (gal_view_get_title(view));
- instance->current_type = g_strdup (gal_view_get_type_code(view));
+ instance->current_title = g_strdup (gal_view_get_title (view));
+ instance->current_type = g_strdup (gal_view_get_type_code (view));
instance->view_changed_id =
g_signal_connect(instance->current_view, "changed",
G_CALLBACK (view_changed), instance);
@@ -149,7 +149,7 @@ connect_view (GalViewInstance *instance, GalView *view)
static void
gal_view_instance_dispose (GObject *object)
{
- GalViewInstance *instance = GAL_VIEW_INSTANCE(object);
+ GalViewInstance *instance = GAL_VIEW_INSTANCE (object);
if (instance->collection) {
if (instance->collection_changed_id) {
@@ -179,7 +179,7 @@ gal_view_instance_class_init (GalViewInstanceClass *klass)
object_class->dispose = gal_view_instance_dispose;
- gal_view_instance_signals [DISPLAY_VIEW] =
+ gal_view_instance_signals[DISPLAY_VIEW] =
g_signal_new ("display_view",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -188,7 +188,7 @@ gal_view_instance_class_init (GalViewInstanceClass *klass)
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, GAL_TYPE_VIEW);
- gal_view_instance_signals [CHANGED] =
+ gal_view_instance_signals[CHANGED] =
g_signal_new ("changed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -197,7 +197,7 @@ gal_view_instance_class_init (GalViewInstanceClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- gal_view_instance_signals [LOADED] =
+ gal_view_instance_signals[LOADED] =
g_signal_new ("loaded",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
@@ -253,10 +253,10 @@ load_current_view (GalViewInstance *instance)
#ifdef G_OS_WIN32
gchar *locale_filename = g_win32_locale_filename_from_utf8 (instance->current_view_filename);
if (locale_filename != NULL)
- doc = xmlParseFile(locale_filename);
+ doc = xmlParseFile (locale_filename);
g_free (locale_filename);
#else
- doc = xmlParseFile(instance->current_view_filename);
+ doc = xmlParseFile (instance->current_view_filename);
#endif
}
@@ -270,14 +270,14 @@ load_current_view (GalViewInstance *instance)
if (index != -1) {
view = gal_view_collection_get_view (instance->collection,
index);
- view = gal_view_clone(view);
+ view = gal_view_clone (view);
connect_view (instance, view);
}
}
return;
}
- root = xmlDocGetRootElement(doc);
+ root = xmlDocGetRootElement (doc);
instance->current_id = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"current_view", NULL);
if (instance->current_id != NULL) {
@@ -287,7 +287,7 @@ load_current_view (GalViewInstance *instance)
if (index != -1) {
view = gal_view_collection_get_view (instance->collection,
index);
- view = gal_view_clone(view);
+ view = gal_view_clone (view);
}
}
if (view == NULL) {
@@ -301,7 +301,7 @@ load_current_view (GalViewInstance *instance)
connect_view (instance, view);
- xmlFreeDoc(doc);
+ xmlFreeDoc (doc);
}
/**
@@ -415,11 +415,11 @@ gal_view_instance_set_custom_view (GalViewInstance *instance, GalView *view)
connect_view (instance, view);
gal_view_save (view, instance->custom_filename);
save_current_view (instance);
- gal_view_instance_changed(instance);
+ gal_view_instance_changed (instance);
}
static void
-dialog_response(GtkWidget *dialog, gint id, GalViewInstance *instance)
+dialog_response (GtkWidget *dialog, gint id, GalViewInstance *instance)
{
if (id == GTK_RESPONSE_OK) {
gal_view_instance_save_as_dialog_save (GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (dialog));
@@ -436,8 +436,8 @@ gal_view_instance_save_as (GalViewInstance *instance)
dialog = gal_view_instance_save_as_dialog_new (instance);
g_signal_connect(dialog, "response",
- G_CALLBACK(dialog_response), instance);
- gtk_widget_show(dialog);
+ G_CALLBACK (dialog_response), instance);
+ gtk_widget_show (dialog);
}
/* This is idempotent. Once it's been called once, the rest of the calls are ignored. */
diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c
index f364bf0779..1bc9369a48 100644
--- a/widgets/menus/gal-view-new-dialog.c
+++ b/widgets/menus/gal-view-new-dialog.c
@@ -101,8 +101,8 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
- gtk_window_set_resizable (GTK_WINDOW(dialog), TRUE);
- gtk_window_set_modal (GTK_WINDOW(dialog), TRUE);
+ gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
+ gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_window_set_title (GTK_WINDOW(dialog), _("Define New View"));
dialog->collection = NULL;
@@ -112,10 +112,10 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog)
static void
gal_view_new_dialog_dispose (GObject *object)
{
- GalViewNewDialog *gal_view_new_dialog = GAL_VIEW_NEW_DIALOG(object);
+ GalViewNewDialog *gal_view_new_dialog = GAL_VIEW_NEW_DIALOG (object);
if (gal_view_new_dialog->builder)
- g_object_unref(gal_view_new_dialog->builder);
+ g_object_unref (gal_view_new_dialog->builder);
gal_view_new_dialog->builder = NULL;
if (G_OBJECT_CLASS (gal_view_new_dialog_parent_class)->dispose)
@@ -126,7 +126,7 @@ GtkWidget*
gal_view_new_dialog_new (GalViewCollection *collection)
{
GtkWidget *widget =
- gal_view_new_dialog_construct(g_object_new (GAL_VIEW_NEW_DIALOG_TYPE, NULL),
+ gal_view_new_dialog_construct (g_object_new (GAL_VIEW_NEW_DIALOG_TYPE, NULL),
collection);
return widget;
}
@@ -209,16 +209,16 @@ gal_view_new_dialog_construct (GalViewNewDialog *dialog,
gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->list), column);
iterator = dialog->collection->factory_list;
- for (; iterator; iterator = g_list_next(iterator) ) {
+ for (; iterator; iterator = g_list_next (iterator) ) {
GalViewFactory *factory = iterator->data;
GtkTreeIter iter;
- g_object_ref(factory);
+ g_object_ref (factory);
gtk_list_store_append (dialog->list_store,
&iter);
gtk_list_store_set (dialog->list_store,
&iter,
- 0, gal_view_factory_get_title(factory),
+ 0, gal_view_factory_get_title (factory),
1, factory,
-1);
}
@@ -233,7 +233,7 @@ gal_view_new_dialog_construct (GalViewNewDialog *dialog,
sensitize_ok_response (dialog);
- return GTK_WIDGET(dialog);
+ return GTK_WIDGET (dialog);
}
static void
@@ -247,8 +247,8 @@ gal_view_new_dialog_set_property (GObject *object, guint prop_id, const GValue *
switch (prop_id) {
case PROP_NAME:
entry = e_builder_get_widget(dialog->builder, "entry-name");
- if (entry && GTK_IS_ENTRY(entry)) {
- gtk_entry_set_text(GTK_ENTRY(entry), g_value_get_string (value));
+ if (entry && GTK_IS_ENTRY (entry)) {
+ gtk_entry_set_text (GTK_ENTRY (entry), g_value_get_string (value));
}
break;
default:
@@ -268,7 +268,7 @@ gal_view_new_dialog_get_property (GObject *object, guint prop_id, GValue *value,
switch (prop_id) {
case PROP_NAME:
entry = e_builder_get_widget(dialog->builder, "entry-name");
- if (entry && GTK_IS_ENTRY(entry)) {
+ if (entry && GTK_IS_ENTRY (entry)) {
g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (entry)));
}
break;
diff --git a/widgets/menus/gal-view.c b/widgets/menus/gal-view.c
index 3b70c7a3f5..f31f2191cd 100644
--- a/widgets/menus/gal-view.c
+++ b/widgets/menus/gal-view.c
@@ -274,6 +274,6 @@ gal_view_changed (GalView *view)
{
g_return_if_fail (GAL_IS_VIEW (view));
- g_signal_emit (view, signals [CHANGED], 0);
+ g_signal_emit (view, signals[CHANGED], 0);
}
diff --git a/widgets/misc/e-buffer-tagger.c b/widgets/misc/e-buffer-tagger.c
index b3d5a4e61e..217ffdb05b 100644
--- a/widgets/misc/e-buffer-tagger.c
+++ b/widgets/misc/e-buffer-tagger.c
@@ -51,7 +51,7 @@ struct _MagicInsertMatch
typedef struct _MagicInsertMatch MagicInsertMatch;
-static MagicInsertMatch mim [] = {
+static MagicInsertMatch mim[] = {
/* prefixed expressions */
{ "(news|telnet|nntp|file|http|ftp|sftp|https|webcal)://([-a-z0-9]+(:[-a-z0-9]+)?@)?[-a-z0-9.]+[-a-z0-9](:[0-9]*)?(([.])?/[-a-z0-9_$.+!*(),;:@%&=?/~#']*[^]'.}>\\) ,?!;:\"]?)?", NULL, NULL },
{ "(sip|h323|callto):([-_a-z0-9.'\\+]+(:[0-9]{1,5})?(/[-_a-z0-9.']+)?)(@([-_a-z0-9.%=?]+|([0-9]{1,3}.){3}[0-9]{1,3})?)?(:[0-9]{1,5})?", NULL, NULL },
@@ -72,11 +72,11 @@ init_magic_links (void)
return;
for (i = 0; i < G_N_ELEMENTS (mim); i++) {
- mim [i].preg = g_new0 (regex_t, 1);
- if (regcomp (mim [i].preg, mim [i].regex, REG_EXTENDED | REG_ICASE)) {
+ mim[i].preg = g_new0 (regex_t, 1);
+ if (regcomp (mim[i].preg, mim[i].regex, REG_EXTENDED | REG_ICASE)) {
/* error */
- g_free (mim [i].preg);
- mim [i].preg = 0;
+ g_free (mim[i].preg);
+ mim[i].preg = 0;
}
}
}
@@ -87,7 +87,7 @@ markup_text (GtkTextBuffer *buffer)
GtkTextIter start, end;
gchar *text;
gint i;
- regmatch_t pmatch [2];
+ regmatch_t pmatch[2];
gboolean any;
const gchar *str;
gint offset = 0;
@@ -104,14 +104,14 @@ markup_text (GtkTextBuffer *buffer)
while (any) {
any = FALSE;
for (i = 0; i < G_N_ELEMENTS (mim); i++) {
- if (mim [i].preg && !regexec (mim [i].preg, str, 2, pmatch, 0)) {
- gtk_text_buffer_get_iter_at_offset (buffer, &start, offset + pmatch [0].rm_so);
- gtk_text_buffer_get_iter_at_offset (buffer, &end, offset + pmatch [0].rm_eo);
+ if (mim[i].preg && !regexec (mim[i].preg, str, 2, pmatch, 0)) {
+ gtk_text_buffer_get_iter_at_offset (buffer, &start, offset + pmatch[0].rm_so);
+ gtk_text_buffer_get_iter_at_offset (buffer, &end, offset + pmatch[0].rm_eo);
gtk_text_buffer_apply_tag_by_name (buffer, E_BUFFER_TAGGER_LINK_TAG, &start, &end);
any = TRUE;
- str += pmatch [0].rm_eo;
- offset += pmatch [0].rm_eo;
+ str += pmatch[0].rm_eo;
+ offset += pmatch[0].rm_eo;
break;
}
}
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index d346117a8b..f362046ee3 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -1326,7 +1326,7 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
for (day = 0; day < 7; day++) {
layout_set_day_text (calitem, layout, day_index);
gdk_draw_layout (drawable, fg_gc,
- text_x - calitem->day_widths [day_index],
+ text_x - calitem->day_widths[day_index],
text_y,
layout);
text_x += (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
@@ -1368,11 +1368,11 @@ get_digit_fomat ()
gint minor = 0;
gint revision = 0;
- major = atoi (split [0]);
- minor = atoi (split [1]);
+ major = atoi (split[0]);
+ minor = atoi (split[1]);
if (g_strv_length (split) > 2)
- revision = atoi (split [2]);
+ revision = atoi (split[2]);
g_strfreev (split);
if (major > 2 || minor > 2 || (minor == 2 && revision > 2)) {
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index 6d4a9de5e4..eba6d32659 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -66,7 +66,7 @@ enum {
LAST_SIGNAL
};
-static guint ecb_signals [LAST_SIGNAL] = { 0, };
+static guint ecb_signals[LAST_SIGNAL] = { 0, };
enum {
PROP_0,
@@ -93,7 +93,7 @@ get_color (ECanvasBackground *ecb)
static void
ecb_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2)
{
- gdouble i2c [6];
+ gdouble i2c[6];
ArtPoint c1, c2, i1, i2;
ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item);
@@ -380,7 +380,7 @@ ecb_draw (GnomeCanvasItem *item,
{
ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item);
gint x1, x2, y1, y2;
- gdouble i2c [6];
+ gdouble i2c[6];
ArtPoint upper_left, lower_right, ecb_base_point;
/*
@@ -520,7 +520,7 @@ ecb_class_init (ECanvasBackgroundClass *ecb_class)
"Y2",
0.0, G_MAXDOUBLE, 0.0,
G_PARAM_READWRITE));
- ecb_signals [STYLE_SET] =
+ ecb_signals[STYLE_SET] =
g_signal_new ("style_set",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 261d92cf12..11d6c55271 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -727,7 +727,7 @@ idle_handler (gpointer data)
/* Reset idle id */
canvas->idle_id = 0;
- g_signal_emit (canvas, signals [REFLOW], 0);
+ g_signal_emit (canvas, signals[REFLOW], 0);
GDK_THREADS_LEAVE ();
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 77f337e4aa..8c870bb7ad 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -1829,7 +1829,7 @@ on_date_entry_focus_out (GtkEntry *entry,
if (dedit->priv->has_been_changed) {
/* The previous one didn't emit changed signal,
* but we want it even here, thus doing itself. */
- g_signal_emit (dedit, signals [CHANGED], 0);
+ g_signal_emit (dedit, signals[CHANGED], 0);
dedit->priv->has_been_changed = FALSE;
}
} else {
diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c
index bea993e457..7a74edb84a 100644
--- a/widgets/misc/e-popup-menu.c
+++ b/widgets/misc/e-popup-menu.c
@@ -95,7 +95,7 @@ e_popup_menu_create_with_domain (EPopupMenu *menu_list,
separator = !strcmp ("", menu_list[i].name);
- if ((!(separator && last_item_separator)) && !(menu_list [i].disable_mask & hide_mask)) {
+ if ((!(separator && last_item_separator)) && !(menu_list[i].disable_mask & hide_mask)) {
GtkWidget *item = NULL;
if (!separator) {
diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c
index eb10c8c1fe..bc3233a38a 100644
--- a/widgets/misc/e-printable.c
+++ b/widgets/misc/e-printable.c
@@ -44,14 +44,14 @@ enum {
LAST_SIGNAL
};
-static guint e_printable_signals [LAST_SIGNAL] = { 0, };
+static guint e_printable_signals[LAST_SIGNAL] = { 0, };
static void
e_printable_class_init (EPrintableClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- e_printable_signals [PRINT_PAGE] =
+ e_printable_signals[PRINT_PAGE] =
g_signal_new ("print_page",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -61,7 +61,7 @@ e_printable_class_init (EPrintableClass *klass)
G_TYPE_NONE, 4, G_TYPE_OBJECT, G_TYPE_DOUBLE,
G_TYPE_DOUBLE, G_TYPE_BOOLEAN);
- e_printable_signals [DATA_LEFT] =
+ e_printable_signals[DATA_LEFT] =
g_signal_new ("data_left",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -70,7 +70,7 @@ e_printable_class_init (EPrintableClass *klass)
e_marshal_BOOLEAN__NONE,
G_TYPE_BOOLEAN, 0, G_TYPE_NONE);
- e_printable_signals [RESET] =
+ e_printable_signals[RESET] =
g_signal_new ("reset",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -79,7 +79,7 @@ e_printable_class_init (EPrintableClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0, G_TYPE_NONE);
- e_printable_signals [HEIGHT] =
+ e_printable_signals[HEIGHT] =
g_signal_new ("height",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -89,7 +89,7 @@ e_printable_class_init (EPrintableClass *klass)
G_TYPE_DOUBLE, 4, G_TYPE_OBJECT, G_TYPE_DOUBLE,
G_TYPE_DOUBLE, G_TYPE_BOOLEAN);
- e_printable_signals [WILL_FIT] =
+ e_printable_signals[WILL_FIT] =
g_signal_new ("will_fit",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -129,7 +129,7 @@ e_printable_print_page (EPrintable *e_printable,
g_return_if_fail (E_IS_PRINTABLE (e_printable));
g_signal_emit (e_printable,
- e_printable_signals [PRINT_PAGE], 0,
+ e_printable_signals[PRINT_PAGE], 0,
context,
width,
height,
@@ -145,7 +145,7 @@ e_printable_data_left (EPrintable *e_printable)
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE);
g_signal_emit (e_printable,
- e_printable_signals [DATA_LEFT], 0,
+ e_printable_signals[DATA_LEFT], 0,
&ret_val);
return ret_val;
@@ -158,7 +158,7 @@ e_printable_reset (EPrintable *e_printable)
g_return_if_fail (E_IS_PRINTABLE (e_printable));
g_signal_emit (e_printable,
- e_printable_signals [RESET], 0);
+ e_printable_signals[RESET], 0);
}
gdouble
@@ -174,7 +174,7 @@ e_printable_height (EPrintable *e_printable,
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), -1);
g_signal_emit (e_printable,
- e_printable_signals [HEIGHT], 0,
+ e_printable_signals[HEIGHT], 0,
context,
width,
max_height,
@@ -197,7 +197,7 @@ e_printable_will_fit (EPrintable *e_printable,
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE);
g_signal_emit (e_printable,
- e_printable_signals [WILL_FIT], 0,
+ e_printable_signals[WILL_FIT], 0,
context,
width,
max_height,
diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c
index cde4e78494..97528a5639 100644
--- a/widgets/misc/ea-calendar-item.c
+++ b/widgets/misc/ea-calendar-item.c
@@ -350,18 +350,19 @@ ea_calendar_item_get_description (AtkObject *accessible)
static AtkStateSet*
ea_calendar_item_ref_state_set (AtkObject *accessible)
{
- AtkStateSet *state_set;
- GObject *g_obj;
+ AtkStateSet *state_set;
+ GObject *g_obj;
- state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (accessible);
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible));
- if (!g_obj)
- return state_set;
+ state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (accessible);
+ g_obj = atk_gobject_accessible_get_object (
+ ATK_GOBJECT_ACCESSIBLE (accessible));
+ if (!g_obj)
+ return state_set;
- atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
- atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
+ atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
+ atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
- return state_set;
+ return state_set;
}
static gint
diff --git a/widgets/misc/ea-cell-table.c b/widgets/misc/ea-cell-table.c
index be859943fd..b183ef9671 100644
--- a/widgets/misc/ea-cell-table.c
+++ b/widgets/misc/ea-cell-table.c
@@ -38,15 +38,15 @@ ea_cell_table_create (gint rows, gint columns, gboolean column_first)
cell_data->column_labels = g_new0 (gchar *, columns);
for (index = columns -1; index >= 0; --index)
- cell_data->column_labels [index] = NULL;
+ cell_data->column_labels[index] = NULL;
cell_data->row_labels = g_new0 (gchar *, rows);
for (index = rows -1; index >= 0; --index)
- cell_data->row_labels [index] = NULL;
+ cell_data->row_labels[index] = NULL;
cell_data->cells = g_new0 (gpointer, (columns * rows));
for (index = (columns * rows) -1; index >= 0; --index)
- cell_data->cells [index] = NULL;
+ cell_data->cells[index] = NULL;
return cell_data;
}
@@ -57,13 +57,13 @@ ea_cell_table_destroy (EaCellTable * cell_data)
g_return_if_fail (cell_data);
for (index = 0; index < cell_data->columns; ++index)
- if (cell_data->column_labels [index])
- g_free (cell_data->column_labels [index]);
+ if (cell_data->column_labels[index])
+ g_free (cell_data->column_labels[index]);
g_free (cell_data->column_labels);
for (index = 0; index < cell_data->rows; ++index)
- if (cell_data->row_labels [index])
- g_free (cell_data->row_labels [index]);
+ if (cell_data->row_labels[index])
+ g_free (cell_data->row_labels[index]);
g_free (cell_data->row_labels);
for (index = (cell_data->columns * cell_data->rows) -1;
@@ -119,7 +119,7 @@ ea_cell_table_get_cell_at_index (EaCellTable * cell_data,
g_return_val_if_fail (cell_data, NULL);
if (index >=0 && index < (cell_data->columns * cell_data->rows))
- return cell_data->cells [index];
+ return cell_data->cells[index];
return NULL;
}
diff --git a/widgets/table/e-cell-checkbox.c b/widgets/table/e-cell-checkbox.c
index 9264c37ad4..94dd8f36b2 100644
--- a/widgets/table/e-cell-checkbox.c
+++ b/widgets/table/e-cell-checkbox.c
@@ -37,7 +37,7 @@
G_DEFINE_TYPE (ECellCheckbox, e_cell_checkbox, E_TYPE_CELL_TOGGLE)
-static GdkPixbuf *checks [2];
+static GdkPixbuf *checks[2];
static void
ecc_print (ECellView *ecell_view, GtkPrintContext *context,
@@ -66,8 +66,8 @@ e_cell_checkbox_class_init (ECellCheckboxClass *klass)
ECellClass *ecc = E_CELL_CLASS (klass);
ecc->print = ecc_print;
- checks [0] = gdk_pixbuf_new_from_xpm_data (check_empty_xpm);
- checks [1] = gdk_pixbuf_new_from_xpm_data (check_filled_xpm);
+ checks[0] = gdk_pixbuf_new_from_xpm_data (check_empty_xpm);
+ checks[1] = gdk_pixbuf_new_from_xpm_data (check_filled_xpm);
}
static void
diff --git a/widgets/table/e-cell-date-edit.c b/widgets/table/e-cell-date-edit.c
index c15cccef73..4080172058 100644
--- a/widgets/table/e-cell-date-edit.c
+++ b/widgets/table/e-cell-date-edit.c
@@ -63,7 +63,7 @@ static gint e_cell_date_edit_do_popup (ECellPopup *ecp,
gint row,
gint view_col);
static void e_cell_date_edit_set_popup_values (ECellDateEdit *ecde);
-static void e_cell_date_edit_select_matching_time(ECellDateEdit *ecde,
+static void e_cell_date_edit_select_matching_time (ECellDateEdit *ecde,
gchar *time);
static void e_cell_date_edit_show_popup (ECellDateEdit *ecde,
gint row,
@@ -329,11 +329,11 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
G_CALLBACK (e_cell_date_edit_on_ok_clicked),
ecde);
- g_signal_connect((ecde->popup_window),
+ g_signal_connect ((ecde->popup_window),
"key_press_event",
G_CALLBACK (e_cell_date_edit_key_press),
ecde);
- g_signal_connect((ecde->popup_window),
+ g_signal_connect ((ecde->popup_window),
"button_press_event",
G_CALLBACK (e_cell_date_edit_button_press),
ecde);
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c
index 54b19ea851..c005b8371d 100644
--- a/widgets/table/e-cell-date.c
+++ b/widgets/table/e-cell-date.c
@@ -37,9 +37,9 @@
G_DEFINE_TYPE (ECellDate, e_cell_date, E_TYPE_CELL_TEXT)
static gchar *
-ecd_get_text(ECellText *cell, ETableModel *model, gint col, gint row)
+ecd_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
{
- time_t date = GPOINTER_TO_INT (e_table_model_value_at(model, col, row));
+ time_t date = GPOINTER_TO_INT (e_table_model_value_at (model, col, row));
const gchar *fmt_component, *fmt_part = NULL;
if (date == 0) {
@@ -55,9 +55,9 @@ ecd_get_text(ECellText *cell, ETableModel *model, gint col, gint row)
}
static void
-ecd_free_text(ECellText *cell, gchar *text)
+ecd_free_text (ECellText *cell, gchar *text)
{
- g_free(text);
+ g_free (text);
}
static void
@@ -104,7 +104,7 @@ e_cell_date_new (const gchar *fontname, GtkJustification justify)
{
ECellDate *ecd = g_object_new (E_TYPE_CELL_DATE, NULL);
- e_cell_text_construct(E_CELL_TEXT(ecd), fontname, justify);
+ e_cell_text_construct (E_CELL_TEXT (ecd), fontname, justify);
return (ECell *) ecd;
}
diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c
index 67c3117b6b..1e6c4a6efc 100644
--- a/widgets/table/e-cell-hbox.c
+++ b/widgets/table/e-cell-hbox.c
@@ -88,7 +88,7 @@ ecv_kill_view (ECellView *ecv)
(hbox_view->cell_view.kill_view_cb)(ecv, hbox_view->cell_view.kill_view_cb_data);
if (hbox_view->cell_view.kill_view_cb_data)
- g_list_free(hbox_view->cell_view.kill_view_cb_data);
+ g_list_free (hbox_view->cell_view.kill_view_cb_data);
/* kill our subcell view */
for (i = 0; i < hbox_view->subcell_view_count; i++)
@@ -195,7 +195,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
if (width < hbox_view->def_size_cols[i])
width = hbox_view->def_size_cols[i];
if (y < subcell_offset + width)
- return e_cell_event(hbox_view->subcell_views[i], event, hbox_view->model_cols[i], view_col, row, flags, actions);
+ return e_cell_event (hbox_view->subcell_views[i], event, hbox_view->model_cols[i], view_col, row, flags, actions);
subcell_offset += width;
}
return 0;
@@ -213,7 +213,7 @@ ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
for (i = 0; i < hbox_view->subcell_view_count; i++) {
height = e_cell_height (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col, row);
- max_height = MAX(max_height, height);
+ max_height = MAX (max_height, height);
}
return max_height;
}
diff --git a/widgets/table/e-cell-number.c b/widgets/table/e-cell-number.c
index c28d5a40cc..3fd5dcb123 100644
--- a/widgets/table/e-cell-number.c
+++ b/widgets/table/e-cell-number.c
@@ -33,15 +33,15 @@
G_DEFINE_TYPE (ECellNumber, e_cell_number, E_TYPE_CELL_TEXT)
static gchar *
-ecn_get_text(ECellText *cell, ETableModel *model, gint col, gint row)
+ecn_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
{
- return e_format_number(GPOINTER_TO_INT (e_table_model_value_at(model, col, row)));
+ return e_format_number (GPOINTER_TO_INT (e_table_model_value_at (model, col, row)));
}
static void
-ecn_free_text(ECellText *cell, gchar *text)
+ecn_free_text (ECellText *cell, gchar *text)
{
- g_free(text);
+ g_free (text);
}
static void
@@ -76,7 +76,7 @@ e_cell_number_new (const gchar *fontname, GtkJustification justify)
{
ECellNumber *ecn = g_object_new (E_TYPE_CELL_NUMBER, NULL);
- e_cell_text_construct(E_CELL_TEXT(ecn), fontname, justify);
+ e_cell_text_construct (E_CELL_TEXT (ecn), fontname, justify);
return (ECell *) ecn;
}
diff --git a/widgets/table/e-cell-percent.c b/widgets/table/e-cell-percent.c
index 83c60ce855..5b54527f67 100644
--- a/widgets/table/e-cell-percent.c
+++ b/widgets/table/e-cell-percent.c
@@ -59,7 +59,7 @@ ecp_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
}
static void
-ecp_free_text(ECellText *cell, gchar *text)
+ecp_free_text (ECellText *cell, gchar *text)
{
/* Do Nothing. */
}
@@ -145,7 +145,7 @@ e_cell_percent_new (const gchar *fontname, GtkJustification justify)
{
ECellPercent *ecn = g_object_new (E_TYPE_CELL_PERCENT, NULL);
- e_cell_text_construct (E_CELL_TEXT(ecn), fontname, justify);
+ e_cell_text_construct (E_CELL_TEXT (ecn), fontname, justify);
return (ECell *) ecn;
}
diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c
index 1d536026fc..cea43ed53f 100644
--- a/widgets/table/e-cell-pixbuf.c
+++ b/widgets/table/e-cell-pixbuf.c
@@ -103,7 +103,7 @@ pixbuf_kill_view (ECellView *ecell_view)
ecell_view, pixbuf_view->cell_view.kill_view_cb_data);
if (pixbuf_view->cell_view.kill_view_cb_data)
- g_list_free(pixbuf_view->cell_view.kill_view_cb_data);
+ g_list_free (pixbuf_view->cell_view.kill_view_cb_data);
g_free (pixbuf_view);
}
diff --git a/widgets/table/e-cell-size.c b/widgets/table/e-cell-size.c
index e44cc1e678..90964c8f11 100644
--- a/widgets/table/e-cell-size.c
+++ b/widgets/table/e-cell-size.c
@@ -32,9 +32,9 @@
G_DEFINE_TYPE (ECellSize, e_cell_size, E_TYPE_CELL_TEXT)
static gchar *
-ecd_get_text(ECellText *cell, ETableModel *model, gint col, gint row)
+ecd_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
{
- gint size = GPOINTER_TO_INT(e_table_model_value_at(model, col, row));
+ gint size = GPOINTER_TO_INT (e_table_model_value_at (model, col, row));
gfloat fsize;
if (size < 1024) {
@@ -51,9 +51,9 @@ ecd_get_text(ECellText *cell, ETableModel *model, gint col, gint row)
}
static void
-ecd_free_text(ECellText *cell, gchar *text)
+ecd_free_text (ECellText *cell, gchar *text)
{
- g_free(text);
+ g_free (text);
}
static void
@@ -100,7 +100,7 @@ e_cell_size_new (const gchar *fontname, GtkJustification justify)
{
ECellSize *ecd = g_object_new (E_TYPE_CELL_SIZE, NULL);
- e_cell_text_construct(E_CELL_TEXT(ecd), fontname, justify);
+ e_cell_text_construct (E_CELL_TEXT (ecd), fontname, justify);
return (ECell *) ecd;
}
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 1c0cb71eeb..51188aa101 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -101,7 +101,7 @@ enum {
LAST_SIGNAL
};
-static guint signals [LAST_SIGNAL] = { 0 };
+static guint signals[LAST_SIGNAL] = { 0 };
static GdkAtom clipboard_atom = GDK_NONE;
@@ -216,7 +216,7 @@ static void update_im_cursor_location (ECellTextView *tv);
static gchar *
ect_real_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
{
- return e_table_model_value_at(model, col, row);
+ return e_table_model_value_at (model, col, row);
}
static void
@@ -355,7 +355,7 @@ ect_kill_view (ECellView *ecv)
(text_view->cell_view.kill_view_cb)(ecv, text_view->cell_view.kill_view_cb_data);
if (text_view->cell_view.kill_view_cb_data)
- g_list_free(text_view->cell_view.kill_view_cb_data);
+ g_list_free (text_view->cell_view.kill_view_cb_data);
g_free (text_view);
}
@@ -439,13 +439,13 @@ build_attr_list (ECellTextView *text_view, gint row, gint text_length)
bold = ect->bold_column >= 0 &&
row >= 0 &&
- e_table_model_value_at(ecell_view->e_table_model, ect->bold_column, row);
+ e_table_model_value_at (ecell_view->e_table_model, ect->bold_column, row);
strikeout = ect->strikeout_column >= 0 &&
row >= 0 &&
- e_table_model_value_at(ecell_view->e_table_model, ect->strikeout_column, row);
+ e_table_model_value_at (ecell_view->e_table_model, ect->strikeout_column, row);
underline = ect->underline_column >= 0 &&
row >= 0 &&
- e_table_model_value_at(ecell_view->e_table_model, ect->underline_column, row);
+ e_table_model_value_at (ecell_view->e_table_model, ect->underline_column, row);
if (bold || strikeout || underline) {
if (bold) {
@@ -484,7 +484,7 @@ layout_with_preedit (ECellTextView *text_view, gint row, const gchar *text, gint
gchar *preedit_string = NULL;
gint preedit_length = 0;
gint text_length = strlen (text);
- gint mlen = MIN(edit->selection_start,text_length);
+ gint mlen = MIN (edit->selection_start,text_length);
gtk_im_context_get_preedit_string (edit->im_context,
&preedit_string,&preedit_attrs,
@@ -556,7 +556,7 @@ build_layout (ECellTextView *text_view, gint row, const gchar *text, gint width)
context = pango_layout_get_context (layout);
- font_options = get_font_options();
+ font_options = get_font_options ();
pango_cairo_context_set_font_options (context, font_options);
cairo_font_options_destroy (font_options);
pango_layout_context_changed (layout);
@@ -622,9 +622,9 @@ generate_layout (ECellTextView *text_view, gint model_col, gint view_col, gint r
}
if (row >= 0) {
- gchar *temp = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row);
+ gchar *temp = e_cell_text_get_text (ect, ecell_view->e_table_model, model_col, row);
layout = build_layout (text_view, row, temp ? temp : "?", width);
- e_cell_text_free_text(ect, temp);
+ e_cell_text_free_text (ect, temp);
} else
layout = build_layout (text_view, row, "Mumbo Jumbo", width);
@@ -787,7 +787,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
selection_gc = style->base_gc[GTK_STATE_SELECTED];
text_gc = style->text_gc[GTK_STATE_SELECTED];
} else {
- selection_gc = style->base_gc [GTK_STATE_ACTIVE];
+ selection_gc = style->base_gc[GTK_STATE_ACTIVE];
text_gc = style->text_gc[GTK_STATE_ACTIVE];
}
@@ -848,7 +848,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
* Get the background color
*/
static gchar *
-ect_get_bg_color(ECellView *ecell_view, gint row)
+ect_get_bg_color (ECellView *ecell_view, gint row)
{
ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
gchar *color_spec;
@@ -897,7 +897,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
CellEdit *edit = text_view->edit;
GtkWidget *canvas = GTK_WIDGET (text_view->canvas);
gint return_val = 0;
- d(gboolean press = FALSE);
+ d (gboolean press = FALSE);
if (!(flags & E_CELL_EDITING))
return 0;
@@ -1022,7 +1022,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
break;
case GDK_BUTTON_PRESS: /* Fall Through */
- d(press = TRUE);
+ d (press = TRUE);
case GDK_BUTTON_RELEASE:
d(g_print ("%s: %s\n", __FUNCTION__, press ? "GDK_BUTTON_PRESS" : "GDK_BUTTON_RELEASE"));
event->button.x -= 4;
@@ -1158,7 +1158,7 @@ ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
CellEdit *edit;
- ECellText *ect = E_CELL_TEXT(ecell_view->ecell);
+ ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
gchar *temp;
edit = g_new0 (CellEdit, 1);
@@ -1208,15 +1208,15 @@ ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
edit->pointer_in = FALSE;
edit->default_cursor_shown = TRUE;
- temp = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row);
+ temp = e_cell_text_get_text (ect, ecell_view->e_table_model, model_col, row);
edit->old_text = g_strdup (temp);
- e_cell_text_free_text(ect, temp);
+ e_cell_text_free_text (ect, temp);
edit->text = g_strdup (edit->old_text);
#if 0
if (edit->pointer_in) {
if (edit->default_cursor_shown) {
- gdk_window_set_cursor (GTK_WIDGET(item->canvas)->window, text_view->i_cursor);
+ gdk_window_set_cursor (GTK_WIDGET (item->canvas)->window, text_view->i_cursor);
edit->default_cursor_shown = FALSE;
}
}
@@ -1316,9 +1316,9 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
PangoLayout *layout;
PangoContext *pango_context;
PangoFontMetrics *font_metrics;
- ECellText *ect = E_CELL_TEXT(ecell_view->ecell);
+ ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
ECellTextView *ectView = (ECellTextView *)ecell_view;
- GtkWidget *canvas = GTK_WIDGET(ectView->canvas);
+ GtkWidget *canvas = GTK_WIDGET (ectView->canvas);
GtkStyle *style;
PangoDirection dir;
gboolean strikeout, underline;
@@ -1327,7 +1327,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
gdouble ty, ly, text_width = 0.0, text_height = 0.0;
cr = gtk_print_context_get_cairo_context (context);
- string = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row);
+ string = e_cell_text_get_text (ect, ecell_view->e_table_model, model_col, row);
cairo_save (cr);
layout = gtk_print_context_create_pango_layout (context);
@@ -1337,15 +1337,15 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
pango_layout_set_text (layout, string, -1);
get_font_size (layout, font_des, string, &text_width, &text_height);
- cairo_move_to(cr, 2, 2);
+ cairo_move_to (cr, 2, 2);
cairo_rectangle (cr, 2, 2, width + 2, height + 2);
- cairo_clip(cr);
+ cairo_clip (cr);
style = gtk_widget_get_style (canvas);
pango_context = gtk_widget_get_pango_context (canvas);
font_metrics = pango_context_get_metrics (
pango_context, style->font_desc,
- pango_context_get_language(pango_context));
+ pango_context_get_language (pango_context));
ty = (gdouble)(text_height -
pango_font_metrics_get_ascent (font_metrics) -
pango_font_metrics_get_descent (font_metrics)) / 2.0 /(gdouble)PANGO_SCALE;
@@ -1353,9 +1353,9 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
strikeout = ect->strikeout_column >= 0 && row >= 0 &&
e_table_model_value_at (ecell_view->e_table_model, ect->strikeout_column, row);
underline = ect->underline_column >= 0 && row >= 0 &&
- e_table_model_value_at(ecell_view->e_table_model, ect->underline_column, row);
+ e_table_model_value_at (ecell_view->e_table_model, ect->underline_column, row);
- dir = pango_find_base_dir (string, strlen(string));
+ dir = pango_find_base_dir (string, strlen (string));
if (underline) {
ly = ty + (gdouble)pango_font_metrics_get_underline_position (font_metrics)/(gdouble)PANGO_SCALE;
@@ -1388,15 +1388,15 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
cairo_stroke (cr);
}
- cairo_move_to(cr, 2, text_height- 5);
+ cairo_move_to (cr, 2, text_height- 5);
pango_layout_set_width (layout, (width - 4)*PANGO_SCALE);
pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
- pango_cairo_show_layout(cr, layout);
+ pango_cairo_show_layout (cr, layout);
cairo_restore (cr);
pango_font_description_free (font_des);
g_object_unref (layout);
- e_cell_text_free_text(ect, string);
+ e_cell_text_free_text (ect, string);
}
static gdouble
@@ -1413,12 +1413,12 @@ ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
*/
PangoFontDescription *font_des;
PangoLayout *layout;
- ECellText *ect = E_CELL_TEXT(ecell_view->ecell);
+ ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
gchar *string;
gdouble text_width = 0.0, text_height = 0.0;
gint lines=1;
- string = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row);
+ string = e_cell_text_get_text (ect, ecell_view->e_table_model, model_col, row);
layout = gtk_print_context_create_pango_layout (context);
font_des = pango_font_description_from_string ("sans 10"); /* fix me font hardcoded */
@@ -1611,7 +1611,7 @@ e_cell_text_class_init (ECellTextClass *klass)
object_class->get_property = ect_get_property;
object_class->set_property = ect_set_property;
- signals [TEXT_INSERTED] =
+ signals[TEXT_INSERTED] =
g_signal_new ("text_inserted",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST,
@@ -1622,7 +1622,7 @@ e_cell_text_class_init (ECellTextClass *klass)
G_TYPE_POINTER, G_TYPE_INT, G_TYPE_INT,
G_TYPE_INT, G_TYPE_INT);
- signals [TEXT_DELETED] =
+ signals[TEXT_DELETED] =
g_signal_new ("text_deleted",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST,
@@ -1782,7 +1782,7 @@ e_cell_text_commit_cb (GtkIMContext *context,
command.action = E_TEP_INSERT;
command.position = E_TEP_SELECTION;
command.string = (gchar *)str;
- command.value = strlen(str);
+ command.value = strlen (str);
e_cell_text_view_command (edit->tep, &command, edit);
}
@@ -1875,7 +1875,7 @@ e_cell_text_new (const gchar *fontname, GtkJustification justify)
{
ECellText *ect = g_object_new (E_TYPE_CELL_TEXT, NULL);
- e_cell_text_construct(ect, fontname, justify);
+ e_cell_text_construct (ect, fontname, justify);
return (ECell *) ect;
}
@@ -1897,11 +1897,11 @@ e_cell_text_construct (ECellText *cell,
GtkJustification justify)
{
if (!cell)
- return E_CELL(NULL);
+ return E_CELL (NULL);
if (fontname)
cell->font_name = g_strdup (fontname);
cell->justify = justify;
- return E_CELL(cell);
+ return E_CELL (cell);
}
gchar *
@@ -2213,7 +2213,7 @@ _get_position (ECellTextView *text_view, ETextEventProcessorCommand *command)
return edit->selection_end;
}
- g_return_val_if_reached(0);
+ g_return_val_if_reached (0);
return 0; /* Kill warning */
}
@@ -2255,7 +2255,7 @@ _insert (ECellTextView *text_view, const gchar *string, gint value)
if (value <= 0) return;
- edit->selection_start = MIN (strlen(edit->text), edit->selection_start);
+ edit->selection_start = MIN (strlen (edit->text), edit->selection_start);
temp = g_new (gchar, strlen (edit->text) + value + 1);
@@ -2355,8 +2355,8 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *
break;
case E_TEP_SELECT:
edit->selection_end = _get_position (text_view, command);
- sel_start = MIN(edit->selection_start, edit->selection_end);
- sel_end = MAX(edit->selection_start, edit->selection_end);
+ sel_start = MIN (edit->selection_start, edit->selection_end);
+ sel_end = MAX (edit->selection_start, edit->selection_end);
if (sel_start != sel_end) {
e_cell_text_view_supply_selection (edit, command->time, GDK_SELECTION_PRIMARY,
edit->text + sel_start,
@@ -2390,8 +2390,8 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *
change = TRUE;
break;
case E_TEP_COPY:
- sel_start = MIN(edit->selection_start, edit->selection_end);
- sel_end = MAX(edit->selection_start, edit->selection_end);
+ sel_start = MIN (edit->selection_start, edit->selection_end);
+ sel_end = MAX (edit->selection_start, edit->selection_end);
if (sel_start != sel_end) {
e_cell_text_view_supply_selection (edit, command->time, clipboard_atom,
edit->text + sel_start,
@@ -2525,7 +2525,7 @@ _get_tep (CellEdit *edit)
edit->tep = e_text_event_processor_emacs_like_new ();
g_signal_connect (edit->tep,
"command",
- G_CALLBACK(e_cell_text_view_command),
+ G_CALLBACK (e_cell_text_view_command),
(gpointer) edit);
}
}
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index 08a9d8dcc3..35e06fbe79 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -275,7 +275,7 @@ cell_toggle_event (ECellView *ecell_view,
return FALSE;
/* Fall through */
case GDK_BUTTON_PRESS:
- if (!e_table_model_is_cell_editable(ecell_view->e_table_model, model_col, row))
+ if (!e_table_model_is_cell_editable (ecell_view->e_table_model, model_col, row))
return FALSE;
etog_set_value (toggle_view, model_col, view_col, row, value + 1);
@@ -327,7 +327,7 @@ cell_toggle_print (ECellView *ecell_view,
image = g_ptr_array_index (priv->pixbufs, value);
if (image) {
cr = gtk_print_context_get_cairo_context (context);
- cairo_save(cr);
+ cairo_save (cr);
cairo_translate (cr, 0 , 0);
image = gdk_pixbuf_add_alpha (image, TRUE, 255, 255, 255);
image_width = (gdouble)gdk_pixbuf_get_width (image);
@@ -338,7 +338,7 @@ cell_toggle_print (ECellView *ecell_view,
cairo_clip (cr);
gdk_cairo_set_source_pixbuf (cr, image, 0, image_height / 4);
cairo_paint (cr);
- cairo_restore(cr);
+ cairo_restore (cr);
}
}
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index 781579da24..7733b2af17 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -94,9 +94,9 @@ e_cell_tree_get_tree_table_adapter (ETableModel *table_model, gint row)
static gint
visible_depth_of_node (ETableModel *model, gint row)
{
- ETreeModel *tree_model = e_cell_tree_get_tree_model(model, row);
- ETreeTableAdapter *adapter = e_cell_tree_get_tree_table_adapter(model, row);
- ETreePath path = e_cell_tree_get_node(model, row);
+ ETreeModel *tree_model = e_cell_tree_get_tree_model (model, row);
+ ETreeTableAdapter *adapter = e_cell_tree_get_tree_table_adapter (model, row);
+ ETreePath path = e_cell_tree_get_node (model, row);
return (e_tree_model_node_depth (tree_model, path)
- (e_tree_table_adapter_root_node_is_visible (adapter) ? 0 : 1));
}
@@ -107,12 +107,12 @@ visible_depth_of_node (ETableModel *model, gint row)
static gint
offset_of_node (ETableModel *table_model, gint row)
{
- ETreeModel *tree_model = e_cell_tree_get_tree_model(table_model, row);
- ETreePath path = e_cell_tree_get_node(table_model, row);
+ ETreeModel *tree_model = e_cell_tree_get_tree_model (table_model, row);
+ ETreePath path = e_cell_tree_get_node (table_model, row);
if (visible_depth_of_node (table_model, row) >= 0 ||
- e_tree_model_node_is_expandable(tree_model, path)) {
- return (visible_depth_of_node(table_model, row) + 1) * INDENT_AMOUNT;
+ e_tree_model_node_is_expandable (tree_model, path)) {
+ return (visible_depth_of_node (table_model, row) + 1) * INDENT_AMOUNT;
} else {
return 0;
}
@@ -154,7 +154,7 @@ ect_kill_view (ECellView *ecv)
(tree_view->cell_view.kill_view_cb)(ecv, tree_view->cell_view.kill_view_cb_data);
if (tree_view->cell_view.kill_view_cb_data)
- g_list_free(tree_view->cell_view.kill_view_cb_data);
+ g_list_free (tree_view->cell_view.kill_view_cb_data);
/* kill our subcell view */
e_cell_kill_view (tree_view->subcell_view);
@@ -210,12 +210,12 @@ draw_retro_expander (ECellTreeView *ectv, GdkDrawable *drawable, gboolean expand
{
GdkPixbuf *image;
gint image_width, image_height;
- ECellTree *ect = E_CELL_TREE(ectv->cell_view.ecell);
+ ECellTree *ect = E_CELL_TREE (ectv->cell_view.ecell);
image = expanded ? ect->open_pixbuf : ect->closed_pixbuf;
- image_width = gdk_pixbuf_get_width(image);
- image_height = gdk_pixbuf_get_height(image);
+ image_width = gdk_pixbuf_get_width (image);
+ image_height = gdk_pixbuf_get_height (image);
gdk_draw_pixbuf (drawable,
NULL,
@@ -255,8 +255,8 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
gint x1, gint y1, gint x2, gint y2)
{
ECellTreeView *tree_view = (ECellTreeView *)ecell_view;
- ETreeModel *tree_model = e_cell_tree_get_tree_model(ecell_view->e_table_model, row);
- ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row);
+ ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row);
+ ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter (ecell_view->e_table_model, row);
ETreePath node;
GdkRectangle rect, *clip_rect = NULL;
GtkWidget *canvas = GTK_WIDGET (tree_view->canvas);
@@ -311,15 +311,15 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
clip_rect = &rect;
if (selected) {
- foreground = &style->text [GTK_STATE_SELECTED];
+ foreground = &style->text[GTK_STATE_SELECTED];
} else {
- foreground = &style->text [GTK_STATE_NORMAL];
+ foreground = &style->text[GTK_STATE_NORMAL];
}
gdk_gc_set_foreground (tree_view->gc, foreground);
/* draw our lines */
- if (tree_view->retro_look && E_CELL_TREE(tree_view->cell_view.ecell)->draw_lines) {
+ if (tree_view->retro_look && E_CELL_TREE (tree_view->cell_view.ecell)->draw_lines) {
gint depth;
@@ -348,7 +348,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
offset -= INDENT_AMOUNT;
depth = visible_depth_of_node (ecell_view->e_table_model, row) - 1;
while (parent_node && depth != 0) {
- if (e_tree_table_adapter_node_get_next(tree_table_adapter, parent_node)) {
+ if (e_tree_table_adapter_node_get_next (tree_table_adapter, parent_node)) {
gdk_draw_line (drawable, tree_view->gc,
rect.x + offset - INDENT_AMOUNT / 2,
rect.y,
@@ -495,7 +495,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
GdkWindow *window;
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row);
- ETreeTableAdapter *etta = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row);
+ ETreeTableAdapter *etta = e_cell_tree_get_tree_table_adapter (ecell_view->e_table_model, row);
ETreePath node = e_cell_tree_get_node (ecell_view->e_table_model, row);
gint offset = offset_of_node (ecell_view->e_table_model, row);
gint result;
@@ -508,7 +508,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
if (event_in_expander (event, offset, 0)) {
if (e_tree_model_node_is_expandable (tree_model, node)) {
- gboolean expanded = e_tree_table_adapter_node_is_expanded(etta, node);
+ gboolean expanded = e_tree_table_adapter_node_is_expanded (etta, node);
if (tree_view->retro_look)
e_tree_table_adapter_node_set_expanded (etta, node, !expanded);
else {
@@ -590,7 +590,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
}
adjust_event_position (event, -offset);
- result = e_cell_event(tree_view->subcell_view, event, model_col, view_col, row, flags, actions);
+ result = e_cell_event (tree_view->subcell_view, event, model_col, view_col, row, flags, actions);
adjust_event_position (event, offset);
return result;
@@ -616,7 +616,7 @@ ect_max_width (ECellView *ecell_view, gint model_col, gint view_col)
subcell_max_width = e_cell_max_width (tree_view->subcell_view, model_col, view_col);
for (row = 0; row < number_of_rows; row++) {
- ETreeModel *tree_model = e_cell_tree_get_tree_model(ecell_view->e_table_model, row);
+ ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row);
ETreePath node;
GdkPixbuf *node_image;
gint node_image_width = 0;
@@ -624,7 +624,7 @@ ect_max_width (ECellView *ecell_view, gint model_col, gint view_col)
gint offset, subcell_offset;
#if 0
gboolean expanded, expandable;
- ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row);
+ ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter (ecell_view->e_table_model, row);
#endif
node = e_cell_tree_get_node (ecell_view->e_table_model, row);
@@ -657,10 +657,10 @@ ect_max_width (ECellView *ecell_view, gint model_col, gint view_col)
GdkPixbuf *image;
image = (expanded
- ? E_CELL_TREE(tree_view->cell_view.ecell)->open_pixbuf
- : E_CELL_TREE(tree_view->cell_view.ecell)->closed_pixbuf);
+ ? E_CELL_TREE (tree_view->cell_view.ecell)->open_pixbuf
+ : E_CELL_TREE (tree_view->cell_view.ecell)->closed_pixbuf);
- width += gdk_pixbuf_get_width(image);
+ width += gdk_pixbuf_get_width (image);
}
#endif
@@ -717,7 +717,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
if (/* XXX only if we're the active sort */ TRUE) {
ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row);
- ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row);
+ ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter (ecell_view->e_table_model, row);
ETreePath node = e_cell_tree_get_node (ecell_view->e_table_model, row);
gint offset = offset_of_node (ecell_view->e_table_model, row);
gint subcell_offset = offset;
@@ -725,7 +725,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
gboolean expanded = e_tree_table_adapter_node_is_expanded (tree_table_adapter, node);
/* draw our lines */
- if (E_CELL_TREE(tree_view->cell_view.ecell)->draw_lines) {
+ if (E_CELL_TREE (tree_view->cell_view.ecell)->draw_lines) {
gint depth;
if (!e_tree_model_node_is_root (tree_model, node)
@@ -753,7 +753,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
depth = visible_depth_of_node (ecell_view->e_table_model, row) - 1;
offset -= INDENT_AMOUNT;
while (node && depth != 0) {
- if (e_tree_table_adapter_node_get_next(tree_table_adapter, node)) {
+ if (e_tree_table_adapter_node_get_next (tree_table_adapter, node)) {
cairo_move_to (cr,
offset - INDENT_AMOUNT / 2,
height);
diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c
index af3ac2e181..f752e14834 100644
--- a/widgets/table/e-cell-vbox.c
+++ b/widgets/table/e-cell-vbox.c
@@ -82,7 +82,7 @@ ecv_kill_view (ECellView *ecv)
(vbox_view->cell_view.kill_view_cb)(ecv, vbox_view->cell_view.kill_view_cb_data);
if (vbox_view->cell_view.kill_view_cb_data)
- g_list_free(vbox_view->cell_view.kill_view_cb_data);
+ g_list_free (vbox_view->cell_view.kill_view_cb_data);
/* kill our subcell view */
for (i = 0; i < vbox_view->subcell_view_count; i++)
@@ -181,7 +181,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
for (i = 0; i < vbox_view->subcell_view_count; i++) {
gint height = e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row);
if (y < subcell_offset + height)
- return e_cell_event(vbox_view->subcell_views[i], event, vbox_view->model_cols[i], view_col, row, flags, actions);
+ return e_cell_event (vbox_view->subcell_views[i], event, vbox_view->model_cols[i], view_col, row, flags, actions);
subcell_offset += height;
}
return 0;
@@ -215,7 +215,7 @@ ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col)
for (i = 0; i < vbox_view->subcell_view_count; i++) {
gint width = e_cell_max_width (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col);
- max_width = MAX(width, max_width);
+ max_width = MAX (width, max_width);
}
return max_width;
diff --git a/widgets/table/e-cell.c b/widgets/table/e-cell.c
index 6833ccfd43..c45ed680d4 100644
--- a/widgets/table/e-cell.c
+++ b/widgets/table/e-cell.c
@@ -171,7 +171,7 @@ e_cell_init (ECell *cell)
gint
e_cell_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions)
{
- return ECVIEW_EC_CLASS(ecell_view)->event (
+ return ECVIEW_EC_CLASS (ecell_view)->event (
ecell_view, event, model_col, view_col, row, flags, actions);
}
@@ -208,7 +208,7 @@ e_cell_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_v
void
e_cell_realize (ECellView *ecell_view)
{
- ECVIEW_EC_CLASS(ecell_view)->realize (ecell_view);
+ ECVIEW_EC_CLASS (ecell_view)->realize (ecell_view);
}
/**
@@ -220,7 +220,7 @@ e_cell_realize (ECellView *ecell_view)
void
e_cell_kill_view (ECellView *ecell_view)
{
- ECVIEW_EC_CLASS(ecell_view)->kill_view (ecell_view);
+ ECVIEW_EC_CLASS (ecell_view)->kill_view (ecell_view);
}
/**
@@ -234,7 +234,7 @@ e_cell_kill_view (ECellView *ecell_view)
void
e_cell_unrealize (ECellView *ecell_view)
{
- ECVIEW_EC_CLASS(ecell_view)->unrealize (ecell_view);
+ ECVIEW_EC_CLASS (ecell_view)->unrealize (ecell_view);
}
/**
@@ -263,9 +263,9 @@ e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable,
{
g_return_if_fail (ecell_view != NULL);
g_return_if_fail (row >= 0);
- g_return_if_fail (row < e_table_model_row_count(ecell_view->e_table_model));
+ g_return_if_fail (row < e_table_model_row_count (ecell_view->e_table_model));
- ECVIEW_EC_CLASS(ecell_view)->draw (ecell_view, drawable, model_col, view_col, row, flags, x1, y1, x2, y2);
+ ECVIEW_EC_CLASS (ecell_view)->draw (ecell_view, drawable, model_col, view_col, row, flags, x1, y1, x2, y2);
}
/**
@@ -285,8 +285,8 @@ e_cell_print (ECellView *ecell_view, GtkPrintContext *context,
gint model_col, gint view_col, gint row,
gdouble width, gdouble height)
{
- if (ECVIEW_EC_CLASS(ecell_view)->print)
- ECVIEW_EC_CLASS(ecell_view)->print (ecell_view, context, model_col, view_col, row, width, height);
+ if (ECVIEW_EC_CLASS (ecell_view)->print)
+ ECVIEW_EC_CLASS (ecell_view)->print (ecell_view, context, model_col, view_col, row, width, height);
}
/**
@@ -299,8 +299,8 @@ e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context,
gint model_col, gint view_col, gint row,
gdouble width)
{
- if (ECVIEW_EC_CLASS(ecell_view)->print_height)
- return ECVIEW_EC_CLASS(ecell_view)->print_height
+ if (ECVIEW_EC_CLASS (ecell_view)->print_height)
+ return ECVIEW_EC_CLASS (ecell_view)->print_height
(ecell_view, context, model_col, view_col, row, width);
else
return 0.0;
@@ -319,7 +319,7 @@ e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context,
gint
e_cell_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
- return ECVIEW_EC_CLASS(ecell_view)->height (ecell_view, model_col, view_col, row);
+ return ECVIEW_EC_CLASS (ecell_view)->height (ecell_view, model_col, view_col, row);
}
/**
@@ -335,7 +335,7 @@ e_cell_height (ECellView *ecell_view, gint model_col, gint view_col, gint row)
gpointer
e_cell_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
- return ECVIEW_EC_CLASS(ecell_view)->enter_edit (ecell_view, model_col, view_col, row);
+ return ECVIEW_EC_CLASS (ecell_view)->enter_edit (ecell_view, model_col, view_col, row);
}
/**
@@ -352,7 +352,7 @@ e_cell_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint ro
void
e_cell_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context)
{
- ECVIEW_EC_CLASS(ecell_view)->leave_edit (ecell_view, model_col, view_col, row, edit_context);
+ ECVIEW_EC_CLASS (ecell_view)->leave_edit (ecell_view, model_col, view_col, row, edit_context);
}
/**
@@ -372,8 +372,8 @@ e_cell_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint ro
gpointer
e_cell_save_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context)
{
- if (ECVIEW_EC_CLASS(ecell_view)->save_state)
- return ECVIEW_EC_CLASS(ecell_view)->save_state (ecell_view, model_col, view_col, row, edit_context);
+ if (ECVIEW_EC_CLASS (ecell_view)->save_state)
+ return ECVIEW_EC_CLASS (ecell_view)->save_state (ecell_view, model_col, view_col, row, edit_context);
else
return NULL;
}
@@ -392,8 +392,8 @@ e_cell_save_state (ECellView *ecell_view, gint model_col, gint view_col, gint ro
void
e_cell_load_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context, gpointer save_state)
{
- if (ECVIEW_EC_CLASS(ecell_view)->load_state)
- ECVIEW_EC_CLASS(ecell_view)->load_state (ecell_view, model_col, view_col, row, edit_context, save_state);
+ if (ECVIEW_EC_CLASS (ecell_view)->load_state)
+ ECVIEW_EC_CLASS (ecell_view)->load_state (ecell_view, model_col, view_col, row, edit_context, save_state);
}
/**
@@ -410,8 +410,8 @@ e_cell_load_state (ECellView *ecell_view, gint model_col, gint view_col, gint ro
void
e_cell_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state)
{
- if (ECVIEW_EC_CLASS(ecell_view)->free_state)
- ECVIEW_EC_CLASS(ecell_view)->free_state (ecell_view, model_col, view_col, row, save_state);
+ if (ECVIEW_EC_CLASS (ecell_view)->free_state)
+ ECVIEW_EC_CLASS (ecell_view)->free_state (ecell_view, model_col, view_col, row, save_state);
}
/**
@@ -426,7 +426,7 @@ e_cell_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint ro
gint
e_cell_max_width (ECellView *ecell_view, gint model_col, gint view_col)
{
- return ECVIEW_EC_CLASS(ecell_view)->max_width
+ return ECVIEW_EC_CLASS (ecell_view)->max_width
(ecell_view, model_col, view_col);
}
@@ -443,8 +443,8 @@ e_cell_max_width (ECellView *ecell_view, gint model_col, gint view_col)
gint
e_cell_max_width_by_row (ECellView *ecell_view, gint model_col, gint view_col, gint row)
{
- if (ECVIEW_EC_CLASS(ecell_view)->max_width_by_row)
- return ECVIEW_EC_CLASS(ecell_view)->max_width_by_row
+ if (ECVIEW_EC_CLASS (ecell_view)->max_width_by_row)
+ return ECVIEW_EC_CLASS (ecell_view)->max_width_by_row
(ecell_view, model_col, view_col, row);
else
return e_cell_max_width (ecell_view, model_col, view_col);
@@ -463,22 +463,22 @@ e_cell_max_width_by_row (ECellView *ecell_view, gint model_col, gint view_col, g
gboolean
e_cell_max_width_by_row_implemented (ECellView *ecell_view)
{
- return (ECVIEW_EC_CLASS(ecell_view)->max_width_by_row != NULL);
+ return (ECVIEW_EC_CLASS (ecell_view)->max_width_by_row != NULL);
}
gchar *
-e_cell_get_bg_color(ECellView *ecell_view, gint row)
+e_cell_get_bg_color (ECellView *ecell_view, gint row)
{
- if (ECVIEW_EC_CLASS(ecell_view)->get_bg_color)
- return ECVIEW_EC_CLASS(ecell_view)->get_bg_color (ecell_view, row);
+ if (ECVIEW_EC_CLASS (ecell_view)->get_bg_color)
+ return ECVIEW_EC_CLASS (ecell_view)->get_bg_color (ecell_view, row);
else
return NULL;
}
void
-e_cell_style_set(ECellView *ecell_view, GtkStyle *previous_style)
+e_cell_style_set (ECellView *ecell_view, GtkStyle *previous_style)
{
- if (ECVIEW_EC_CLASS(ecell_view)->style_set)
- ECVIEW_EC_CLASS(ecell_view)->style_set (ecell_view, previous_style);
+ if (ECVIEW_EC_CLASS (ecell_view)->style_set)
+ ECVIEW_EC_CLASS (ecell_view)->style_set (ecell_view, previous_style);
}
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index e50d0f4274..3d5a374382 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -47,7 +47,7 @@ enum {
LAST_SIGNAL
};
-static guint etcta_signals [LAST_SIGNAL] = { 0 };
+static guint etcta_signals[LAST_SIGNAL] = { 0 };
/* workaround for avoiding APi breakage */
#define etcta_get_type e_table_click_to_add_get_type
@@ -66,7 +66,7 @@ static void
etcta_cursor_change (GtkObject *object, gint row, gint col, ETableClickToAdd *etcta)
{
g_signal_emit (etcta,
- etcta_signals [CURSOR_CHANGE], 0,
+ etcta_signals[CURSOR_CHANGE], 0,
row, col);
}
@@ -100,7 +100,7 @@ etcta_add_table_header (ETableClickToAdd *etcta, ETableHeader *header)
if (etcta->eth)
g_object_ref (etcta->eth);
if (etcta->row)
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(etcta->row),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etcta->row),
"ETableHeader", header,
NULL);
}
@@ -122,10 +122,10 @@ etcta_add_one (ETableClickToAdd *etcta, ETableModel *one)
if (etcta->one)
g_object_ref (etcta->one);
if (etcta->row)
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(etcta->row),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etcta->row),
"ETableModel", one,
NULL);
- g_object_set(etcta->selection,
+ g_object_set (etcta->selection,
"model", one,
NULL);
}
@@ -137,7 +137,7 @@ etcta_drop_one (ETableClickToAdd *etcta)
return;
g_object_unref (etcta->one);
etcta->one = NULL;
- g_object_set(etcta->selection,
+ g_object_set (etcta->selection,
"model", NULL,
NULL);
}
@@ -163,13 +163,13 @@ etcta_drop_model (ETableClickToAdd *etcta)
static void
etcta_add_message (ETableClickToAdd *etcta, const gchar *message)
{
- etcta->message = g_strdup(message);
+ etcta->message = g_strdup (message);
}
static void
etcta_drop_message (ETableClickToAdd *etcta)
{
- g_free(etcta->message);
+ g_free (etcta->message);
etcta->message = NULL;
}
@@ -204,11 +204,11 @@ etcta_set_property (GObject *object,
switch (prop_id) {
case PROP_HEADER:
etcta_drop_table_header (etcta);
- etcta_add_table_header (etcta, E_TABLE_HEADER(g_value_get_object (value)));
+ etcta_add_table_header (etcta, E_TABLE_HEADER (g_value_get_object (value)));
break;
case PROP_MODEL:
etcta_drop_model (etcta);
- etcta_add_model (etcta, E_TABLE_MODEL(g_value_get_object (value)));
+ etcta_add_model (etcta, E_TABLE_MODEL (g_value_get_object (value)));
break;
case PROP_MESSAGE:
etcta_drop_message (etcta);
@@ -217,15 +217,15 @@ etcta_set_property (GObject *object,
case PROP_WIDTH:
etcta->width = g_value_get_double (value);
if (etcta->row)
- gnome_canvas_item_set(etcta->row,
+ gnome_canvas_item_set (etcta->row,
"minimum_width", etcta->width,
NULL);
if (etcta->text)
- gnome_canvas_item_set(etcta->text,
+ gnome_canvas_item_set (etcta->text,
"width", etcta->width - 4,
NULL);
if (etcta->rect)
- gnome_canvas_item_set(etcta->rect,
+ gnome_canvas_item_set (etcta->rect,
"x2", etcta->width - 1,
NULL);
break;
@@ -234,7 +234,7 @@ etcta_set_property (GObject *object,
return;
}
- gnome_canvas_item_request_update(item);
+ gnome_canvas_item_request_update (item);
}
static void
@@ -285,7 +285,7 @@ etcta_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *p
g_value_set_object (value, etcta->model);
break;
case PROP_MESSAGE:
- g_value_set_string (value, g_strdup(etcta->message));
+ g_value_set_string (value, g_strdup (etcta->message));
break;
case PROP_WIDTH:
g_value_set_double (value, etcta->width);
@@ -334,7 +334,7 @@ item_key_press (ETableItem *item,
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_3270_Enter:
- finish_editing(etcta);
+ finish_editing (etcta);
return TRUE;
}
return FALSE;
@@ -343,7 +343,7 @@ item_key_press (ETableItem *item,
static void
set_initial_selection (ETableClickToAdd *etcta)
{
- e_selection_model_do_something (E_SELECTION_MODEL(etcta->selection),
+ e_selection_model_do_something (E_SELECTION_MODEL (etcta->selection),
0, e_table_header_prioritized_column (etcta->eth),
0);
}
@@ -355,19 +355,19 @@ finish_editing (ETableClickToAdd *etcta)
ETableModel *one;
e_table_item_leave_edit (E_TABLE_ITEM (etcta->row));
- e_table_one_commit(E_TABLE_ONE(etcta->one));
+ e_table_one_commit (E_TABLE_ONE (etcta->one));
etcta_drop_one (etcta);
- gtk_object_destroy(GTK_OBJECT (etcta->row));
+ gtk_object_destroy (GTK_OBJECT (etcta->row));
etcta->row = NULL;
- one = e_table_one_new(etcta->model);
+ one = e_table_one_new (etcta->model);
etcta_add_one (etcta, one);
g_object_unref (one);
- e_selection_model_clear(E_SELECTION_MODEL(etcta->selection));
+ e_selection_model_clear (E_SELECTION_MODEL (etcta->selection));
- etcta->row = gnome_canvas_item_new(GNOME_CANVAS_GROUP(etcta),
- e_table_item_get_type(),
+ etcta->row = gnome_canvas_item_new (GNOME_CANVAS_GROUP (etcta),
+ e_table_item_get_type (),
"ETableHeader", etcta->eth,
"ETableModel", etcta->one,
"minimum_width", etcta->width,
@@ -378,7 +378,7 @@ finish_editing (ETableClickToAdd *etcta)
NULL);
g_signal_connect(etcta->row, "key_press",
- G_CALLBACK(item_key_press), etcta);
+ G_CALLBACK (item_key_press), etcta);
set_initial_selection (etcta);
}
@@ -398,24 +398,24 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_BUTTON_PRESS:
if (etcta->text) {
- gtk_object_destroy(GTK_OBJECT (etcta->text));
+ gtk_object_destroy (GTK_OBJECT (etcta->text));
etcta->text = NULL;
}
if (etcta->rect) {
- gtk_object_destroy(GTK_OBJECT (etcta->rect));
+ gtk_object_destroy (GTK_OBJECT (etcta->rect));
etcta->rect = NULL;
}
if (!etcta->row) {
ETableModel *one;
- one = e_table_one_new(etcta->model);
+ one = e_table_one_new (etcta->model);
etcta_add_one (etcta, one);
g_object_unref (one);
- e_selection_model_clear(E_SELECTION_MODEL(etcta->selection));
+ e_selection_model_clear (E_SELECTION_MODEL (etcta->selection));
- etcta->row = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item),
- e_table_item_get_type(),
+ etcta->row = gnome_canvas_item_new (GNOME_CANVAS_GROUP (item),
+ e_table_item_get_type (),
"ETableHeader", etcta->eth,
"ETableModel", etcta->one,
"minimum_width", etcta->width,
@@ -428,7 +428,7 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
g_signal_connect(etcta->row, "key_press",
G_CALLBACK (item_key_press), etcta);
- e_canvas_item_grab_focus (GNOME_CANVAS_ITEM(etcta->row), TRUE);
+ e_canvas_item_grab_focus (GNOME_CANVAS_ITEM (etcta->row), TRUE);
set_initial_selection (etcta);
}
@@ -447,7 +447,7 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
if (etcta->row) {
e_table_item_leave_edit (E_TABLE_ITEM (etcta->row));
etcta_drop_one (etcta);
- gtk_object_destroy(GTK_OBJECT (etcta->row));
+ gtk_object_destroy (GTK_OBJECT (etcta->row));
etcta->row = NULL;
create_rect_and_text (etcta);
e_canvas_item_move_absolute (etcta->text, 3, 3);
@@ -470,32 +470,32 @@ etcta_reflow (GnomeCanvasItem *item, gint flags)
gdouble old_height = etcta->height;
if (etcta->text) {
- g_object_get(etcta->text,
+ g_object_get (etcta->text,
"height", &etcta->height,
NULL);
etcta->height += 6;
}
if (etcta->row) {
- g_object_get(etcta->row,
+ g_object_get (etcta->row,
"height", &etcta->height,
NULL);
}
if (etcta->rect) {
- g_object_set(etcta->rect,
+ g_object_set (etcta->rect,
"y2", etcta->height - 1,
NULL);
}
if (old_height != etcta->height)
- e_canvas_item_request_parent_reflow(item);
+ e_canvas_item_request_parent_reflow (item);
}
static void
etcta_class_init (ETableClickToAddClass *klass)
{
- GnomeCanvasItemClass *item_class = GNOME_CANVAS_ITEM_CLASS(klass);
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
+ GnomeCanvasItemClass *item_class = GNOME_CANVAS_ITEM_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
klass->cursor_change = NULL;
klass->style_set = etcta_style_set;
@@ -543,7 +543,7 @@ etcta_class_init (ETableClickToAddClass *klass)
0.0, G_MAXDOUBLE, 0.0,
G_PARAM_READABLE | G_PARAM_LAX_VALIDATION));
- etcta_signals [CURSOR_CHANGE] =
+ etcta_signals[CURSOR_CHANGE] =
g_signal_new ("cursor_change",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -552,7 +552,7 @@ etcta_class_init (ETableClickToAddClass *klass)
e_marshal_VOID__INT_INT,
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
- etcta_signals [STYLE_SET] =
+ etcta_signals[STYLE_SET] =
g_signal_new ("style_set",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -583,7 +583,7 @@ etcta_init (ETableClickToAdd *etcta)
etcta->width = 12;
etcta->height = 6;
- etcta->selection = e_table_selection_model_new();
+ etcta->selection = e_table_selection_model_new ();
g_signal_connect(etcta->selection, "cursor_changed",
G_CALLBACK (etcta_cursor_change), etcta);
@@ -608,9 +608,9 @@ void
e_table_click_to_add_commit (ETableClickToAdd *etcta)
{
if (etcta->row) {
- e_table_one_commit(E_TABLE_ONE(etcta->one));
+ e_table_one_commit (E_TABLE_ONE (etcta->one));
etcta_drop_one (etcta);
- gtk_object_destroy(GTK_OBJECT (etcta->row));
+ gtk_object_destroy (GTK_OBJECT (etcta->row));
etcta->row = NULL;
}
create_rect_and_text (etcta);
diff --git a/widgets/table/e-table-column-specification.c b/widgets/table/e-table-column-specification.c
index 0f6acd7fc6..e4e642db4f 100644
--- a/widgets/table/e-table-column-specification.c
+++ b/widgets/table/e-table-column-specification.c
@@ -41,15 +41,15 @@ G_DEFINE_TYPE (ETableColumnSpecification, etcs, G_TYPE_OBJECT)
static void
free_strings (ETableColumnSpecification *etcs)
{
- g_free(etcs->title);
+ g_free (etcs->title);
etcs->title = NULL;
- g_free(etcs->pixbuf);
+ g_free (etcs->pixbuf);
etcs->pixbuf = NULL;
- g_free(etcs->cell);
+ g_free (etcs->cell);
etcs->cell = NULL;
- g_free(etcs->compare);
+ g_free (etcs->compare);
etcs->compare = NULL;
- g_free(etcs->search);
+ g_free (etcs->search);
etcs->search = NULL;
g_free (etcs->sortable);
etcs->sortable = NULL;
@@ -60,7 +60,7 @@ etcs_finalize (GObject *object)
{
ETableColumnSpecification *etcs = E_TABLE_COLUMN_SPECIFICATION (object);
- free_strings(etcs);
+ free_strings (etcs);
G_OBJECT_CLASS (etcs_parent_class)->finalize (object);
}
@@ -104,7 +104,7 @@ void
e_table_column_specification_load_from_node (ETableColumnSpecification *etcs,
const xmlNode *node)
{
- free_strings(etcs);
+ free_strings (etcs);
etcs->model_col = e_xml_get_integer_prop_by_name (node, (const guchar *)"model_col");
etcs->compare_col = e_xml_get_integer_prop_by_name_with_default (node, (const guchar *)"compare_col", etcs->model_col);
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index dd8d995d4a..cce43dc3c8 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -60,7 +60,7 @@ enum {
COLUMN_VALUE
};
-static guint e_table_config_signals [LAST_SIGNAL] = { 0, };
+static guint e_table_config_signals[LAST_SIGNAL] = { 0, };
static void
config_finalize (GObject *object)
@@ -96,7 +96,7 @@ e_table_config_changed (ETableConfig *config, ETableState *state)
{
g_return_if_fail (E_IS_TABLE_CONFIG (config));
- g_signal_emit(G_OBJECT(config), e_table_config_signals [CHANGED], 0, state);
+ g_signal_emit (G_OBJECT (config), e_table_config_signals[CHANGED], 0, state);
}
static void
@@ -136,7 +136,7 @@ e_table_config_class_init (ETableConfigClass *klass)
object_class->finalize = config_finalize;
object_class->get_property = config_get_property;
- e_table_config_signals [CHANGED] =
+ e_table_config_signals[CHANGED] =
g_signal_new ("changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -269,28 +269,28 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
if (is_sort) {
count = e_table_sort_info_sorting_get_count (
config->temp_state->sort_info);
- widgets = &config->sort [0];
+ widgets = &config->sort[0];
} else {
count = e_table_sort_info_grouping_get_count (
config->temp_state->sort_info);
- widgets = &config->group [0];
+ widgets = &config->group[0];
}
for (i = 0; i < 4; i++) {
gboolean sensitive = (i <= count);
const gchar *text = "";
- gtk_widget_set_sensitive (widgets [i].frames, sensitive);
+ gtk_widget_set_sensitive (widgets[i].frames, sensitive);
/*
* Sorting is set, auto select the text
*/
g_signal_handler_block (
- widgets [i].radio_ascending,
- widgets [i].toggled_id);
+ widgets[i].radio_ascending,
+ widgets[i].toggled_id);
g_signal_handler_block (
- widgets [i].combo,
- widgets [i].changed_id);
+ widgets[i].combo,
+ widgets[i].changed_id);
if (i < count) {
GtkToggleButton *a, *d;
@@ -322,21 +322,25 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
* Update radio buttons
*/
a = GTK_TOGGLE_BUTTON (
- widgets [i].radio_ascending);
+ widgets[i].radio_ascending);
d = GTK_TOGGLE_BUTTON (
- widgets [i].radio_descending);
+ widgets[i].radio_descending);
gtk_toggle_button_set_active (col.ascending ? a:d, 1);
} else {
GtkToggleButton *t;
t = GTK_TOGGLE_BUTTON (
- widgets [i].radio_ascending);
+ widgets[i].radio_ascending);
if (is_sort)
- g_return_if_fail (widgets [i].radio_ascending != config->group [i].radio_ascending);
+ g_return_if_fail (
+ widgets[i].radio_ascending !=
+ config->group[i].radio_ascending);
else
- g_return_if_fail (widgets [i].radio_ascending != config->sort [i].radio_ascending);
+ g_return_if_fail (
+ widgets[i].radio_ascending !=
+ config->sort[i].radio_ascending);
gtk_toggle_button_set_active (t, 1);
}
@@ -345,11 +349,11 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
GTK_COMBO_BOX (widgets[i].combo), text);
g_signal_handler_unblock (
- widgets [i].radio_ascending,
- widgets [i].toggled_id);
+ widgets[i].radio_ascending,
+ widgets[i].toggled_id);
g_signal_handler_unblock (
- widgets [i].combo,
- widgets [i].changed_id);
+ widgets[i].combo,
+ widgets[i].changed_id);
}
}
@@ -384,10 +388,10 @@ config_sort_info_update (ETableConfig *config)
g_string_append (res, ", ");
}
- if (res->str [0] == 0)
+ if (res->str[0] == 0)
g_string_append (res, _("Not sorted"));
- gtk_label_set_text (GTK_LABEL(config->sort_label), res->str);
+ gtk_label_set_text (GTK_LABEL (config->sort_label), res->str);
g_string_free (res, TRUE);
}
@@ -425,7 +429,7 @@ config_group_info_update (ETableConfig *config)
if ((i+1) != count)
g_string_append (res, ", ");
}
- if (res->str [0] == 0)
+ if (res->str[0] == 0)
g_string_append (res, _("No grouping"));
gtk_label_set_text (GTK_LABEL (config->group_label), res->str);
@@ -450,7 +454,7 @@ setup_fields (ETableConfig *config)
idx++;
e_table_subset_variable_add (config->shown_model, idx);
- e_table_without_hide (config->available_model, GINT_TO_POINTER(idx));
+ e_table_without_hide (config->available_model, GINT_TO_POINTER (idx));
}
}
e_table_model_thaw ((ETableModel *)config->available_model);
@@ -470,7 +474,7 @@ config_fields_info_update (ETableConfig *config)
if ((*column)->disabled)
continue;
- if (config->state->columns [i] != j)
+ if (config->state->columns[i] != j)
continue;
g_string_append (res, dgettext (config->domain, (*column)->title));
@@ -497,15 +501,16 @@ do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
gtk_widget_grab_focus (GTK_WIDGET (
is_sort
- ? config->sort [0].combo
- : config->group [0].combo));
+ ? config->sort[0].combo
+ : config->group[0].combo));
if (is_sort)
dialog = GTK_DIALOG (config->dialog_sort);
else
dialog = GTK_DIALOG (config->dialog_group_by);
- gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (config->dialog_toplevel));
+ gtk_window_set_transient_for (
+ GTK_WINDOW (dialog), GTK_WINDOW (config->dialog_toplevel));
do {
response = gtk_dialog_run (dialog);
@@ -572,7 +577,7 @@ do_fields_config_dialog (ETableConfig *config)
GTK_WINDOW (config->dialog_toplevel));
do {
- response = gtk_dialog_run (GTK_DIALOG(config->dialog_show_fields));
+ response = gtk_dialog_run (GTK_DIALOG (config->dialog_show_fields));
switch (response) {
case GTK_RESPONSE_OK:
g_object_unref (config->state);
@@ -624,9 +629,11 @@ create_store (ETableConfig *config)
}
static const gchar *spec =
-"<ETableSpecification gettext-domain=\"" GETTEXT_PACKAGE "\" no-headers=\"true\" cursor-mode=\"line\" "
-" draw-grid=\"false\" draw-focus=\"true\" selection-mode=\"browse\">"
-"<ETableColumn model_col= \"0\" _title=\"Name\" minimum_width=\"30\" resizable=\"true\" cell=\"string\" compare=\"string\"/>"
+"<ETableSpecification gettext-domain=\"" GETTEXT_PACKAGE "\""
+" no-headers=\"true\" cursor-mode=\"line\" draw-grid=\"false\" "
+" draw-focus=\"true\" selection-mode=\"browse\">"
+"<ETableColumn model_col= \"0\" _title=\"Name\" minimum_width=\"30\""
+" resizable=\"true\" cell=\"string\" compare=\"string\"/>"
"<ETableState> <column source=\"0\"/>"
"<grouping/>"
"</ETableState>"
@@ -741,7 +748,10 @@ e_table_proxy_gtk_combo_text_new (void)
}
static void
-connect_button (ETableConfig *config, GtkBuilder *builder, const gchar *widget_name, GCallback cback)
+connect_button (ETableConfig *config,
+ GtkBuilder *builder,
+ const gchar *widget_name,
+ GCallback cback)
{
GtkWidget *button = e_builder_get_widget (builder, widget_name);
@@ -755,9 +765,12 @@ static gint
get_source_model_col_index (ETableConfig *config, gint idx)
{
gint visible_index;
- ETableModel *src_model = E_TABLE_SUBSET (config->available_model)->source;
+ ETableModel *src_model;
+
+ src_model = E_TABLE_SUBSET (config->available_model)->source;
- visible_index = e_table_subset_view_to_model_row (E_TABLE_SUBSET (config->available_model), idx);
+ visible_index = e_table_subset_view_to_model_row (
+ E_TABLE_SUBSET (config->available_model), idx);
return GPOINTER_TO_INT (e_table_model_value_at (src_model, 1, visible_index));
}
@@ -822,32 +835,34 @@ configure_sort_dialog (ETableConfig *config, GtkBuilder *builder)
const gchar *algs[] = {"alignment4", "alignment3", "alignment2", "alignment1", NULL};
for (i = 0; i < 4; i++) {
- gchar buffer [80];
+ gchar buffer[80];
snprintf (buffer, sizeof (buffer), "sort-combo-%d", i + 1);
- config->sort [i].combo = e_table_proxy_gtk_combo_text_new ();
- gtk_widget_show (GTK_WIDGET (config->sort [i].combo));
- gtk_container_add (GTK_CONTAINER (e_builder_get_widget (builder, algs [i])), config->sort [i].combo);
+ config->sort[i].combo = e_table_proxy_gtk_combo_text_new ();
+ gtk_widget_show (GTK_WIDGET (config->sort[i].combo));
+ gtk_container_add (
+ GTK_CONTAINER (e_builder_get_widget (
+ builder, algs[i])), config->sort[i].combo);
configure_combo_box_add (
GTK_COMBO_BOX (config->sort[i].combo), "", "");
snprintf (buffer, sizeof (buffer), "frame-sort-%d", i + 1);
- config->sort [i].frames =
+ config->sort[i].frames =
e_builder_get_widget (builder, buffer);
snprintf (
buffer, sizeof (buffer),
"radiobutton-ascending-sort-%d", i+1);
- config->sort [i].radio_ascending = e_builder_get_widget (
+ config->sort[i].radio_ascending = e_builder_get_widget (
builder, buffer);
snprintf (
buffer, sizeof (buffer),
"radiobutton-descending-sort-%d", i+1);
- config->sort [i].radio_descending = e_builder_get_widget (
+ config->sort[i].radio_descending = e_builder_get_widget (
builder, buffer);
- config->sort [i].e_table_config = config;
+ config->sort[i].e_table_config = config;
}
for (l = config->column_names; l; l = l->next) {
@@ -864,15 +879,15 @@ configure_sort_dialog (ETableConfig *config, GtkBuilder *builder)
* After we have runtime modified things, signal connect
*/
for (i = 0; i < 4; i++) {
- config->sort [i].changed_id = g_signal_connect (
- config->sort [i].combo,
+ config->sort[i].changed_id = g_signal_connect (
+ config->sort[i].combo,
"changed", G_CALLBACK (sort_combo_changed),
- &config->sort [i]);
+ &config->sort[i]);
- config->sort [i].toggled_id = g_signal_connect (
- config->sort [i].radio_ascending,
+ config->sort[i].toggled_id = g_signal_connect (
+ config->sort[i].radio_ascending,
"toggled", G_CALLBACK (sort_ascending_toggled),
- &config->sort [i]);
+ &config->sort[i]);
}
}
@@ -936,39 +951,41 @@ configure_group_dialog (ETableConfig *config, GtkBuilder *builder)
const gchar *vboxes[] = {"vbox7", "vbox9", "vbox11", "vbox13", NULL};
for (i = 0; i < 4; i++) {
- gchar buffer [80];
+ gchar buffer[80];
snprintf (buffer, sizeof (buffer), "group-combo-%d", i + 1);
- config->group [i].combo = e_table_proxy_gtk_combo_text_new ();
- gtk_widget_show (GTK_WIDGET (config->group [i].combo));
- gtk_box_pack_start (GTK_BOX (e_builder_get_widget (builder, vboxes [i])), config->group [i].combo, FALSE, FALSE, 0);
+ config->group[i].combo = e_table_proxy_gtk_combo_text_new ();
+ gtk_widget_show (GTK_WIDGET (config->group[i].combo));
+ gtk_box_pack_start (
+ GTK_BOX (e_builder_get_widget (builder, vboxes[i])),
+ config->group[i].combo, FALSE, FALSE, 0);
configure_combo_box_add (
GTK_COMBO_BOX (config->group[i].combo), "", "");
snprintf (buffer, sizeof (buffer), "frame-group-%d", i + 1);
- config->group [i].frames =
+ config->group[i].frames =
e_builder_get_widget (builder, buffer);
snprintf (
buffer, sizeof (buffer),
"radiobutton-ascending-group-%d", i+1);
- config->group [i].radio_ascending = e_builder_get_widget (
+ config->group[i].radio_ascending = e_builder_get_widget (
builder, buffer);
snprintf (
buffer, sizeof (buffer),
"radiobutton-descending-group-%d", i+1);
- config->group [i].radio_descending = e_builder_get_widget (
+ config->group[i].radio_descending = e_builder_get_widget (
builder, buffer);
snprintf (
buffer, sizeof (buffer),
"checkbutton-group-%d", i+1);
- config->group [i].view_check = e_builder_get_widget (
+ config->group[i].view_check = e_builder_get_widget (
builder, buffer);
- config->group [i].e_table_config = config;
+ config->group[i].e_table_config = config;
}
for (l = config->column_names; l; l = l->next) {
@@ -985,15 +1002,15 @@ configure_group_dialog (ETableConfig *config, GtkBuilder *builder)
* After we have runtime modified things, signal connect
*/
for (i = 0; i < 4; i++) {
- config->group [i].changed_id = g_signal_connect (
- config->group [i].combo,
+ config->group[i].changed_id = g_signal_connect (
+ config->group[i].combo,
"changed", G_CALLBACK (group_combo_changed),
- &config->group [i]);
+ &config->group[i]);
- config->group [i].toggled_id = g_signal_connect (
- config->group [i].radio_ascending,
+ config->group[i].toggled_id = g_signal_connect (
+ config->group[i].radio_ascending,
"toggled", G_CALLBACK (group_ascending_toggled),
- &config->group [i]);
+ &config->group[i]);
}
}
@@ -1017,12 +1034,20 @@ config_button_add (GtkWidget *widget, ETableConfig *config)
count = g_list_length (columns);
- config->temp_state->columns = g_renew (int, config->temp_state->columns, config->temp_state->col_count + count);
- config->temp_state->expansions = g_renew (double, config->temp_state->expansions, config->temp_state->col_count + count);
+ config->temp_state->columns = g_renew (
+ int, config->temp_state->columns,
+ config->temp_state->col_count + count);
+ config->temp_state->expansions = g_renew (
+ gdouble, config->temp_state->expansions,
+ config->temp_state->col_count + count);
i = config->temp_state->col_count;
for (column = columns; column; column = column->next) {
- config->temp_state->columns[i] = get_source_model_col_index (config, GPOINTER_TO_INT (column->data));
- config->temp_state->expansions[i] = config->source_spec->columns[config->temp_state->columns[i]]->expansion;
+ config->temp_state->columns[i] =
+ get_source_model_col_index (
+ config, GPOINTER_TO_INT (column->data));
+ config->temp_state->expansions[i] =
+ config->source_spec->columns
+ [config->temp_state->columns[i]]->expansion;
i++;
}
config->temp_state->col_count += count;
@@ -1043,12 +1068,22 @@ config_button_remove (GtkWidget *widget, ETableConfig *config)
for (column = columns; column; column = column->next) {
gint row = GPOINTER_TO_INT (column->data);
- 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));
+ 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->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);
+ config->temp_state->columns = g_renew (
+ int, config->temp_state->columns,
+ config->temp_state->col_count);
+ config->temp_state->expansions = g_renew (
+ gdouble, config->temp_state->expansions,
+ config->temp_state->col_count);
g_list_free (columns);
@@ -1180,7 +1215,9 @@ configure_fields_dialog (ETableConfig *config, GtkBuilder *builder)
"model", &config->available_model,
NULL);
gtk_widget_show_all (etable);
- gtk_label_set_mnemonic_widget (GTK_LABEL (e_builder_get_widget (builder, "label-available")), etable);
+ gtk_label_set_mnemonic_widget (
+ GTK_LABEL (e_builder_get_widget (
+ builder, "label-available")), etable);
/* "custom-shown" widget */
etable = e_table_proxy_etable_shown_new (store);
@@ -1192,12 +1229,22 @@ configure_fields_dialog (ETableConfig *config, GtkBuilder *builder)
"model", &config->shown_model,
NULL);
gtk_widget_show_all (etable);
- gtk_label_set_mnemonic_widget (GTK_LABEL (e_builder_get_widget (builder, "label-displayed")), etable);
-
- connect_button (config, builder, "button-add", G_CALLBACK (config_button_add));
- connect_button (config, builder, "button-remove", G_CALLBACK (config_button_remove));
- connect_button (config, builder, "button-up", G_CALLBACK (config_button_up));
- connect_button (config, builder, "button-down", G_CALLBACK (config_button_down));
+ gtk_label_set_mnemonic_widget (
+ GTK_LABEL (e_builder_get_widget (
+ builder, "label-displayed")), etable);
+
+ connect_button (
+ config, builder, "button-add",
+ G_CALLBACK (config_button_add));
+ connect_button (
+ config, builder, "button-remove",
+ G_CALLBACK (config_button_remove));
+ connect_button (
+ config, builder, "button-up",
+ G_CALLBACK (config_button_up));
+ connect_button (
+ config, builder, "button-down",
+ G_CALLBACK (config_button_down));
setup_fields (config);
diff --git a/widgets/table/e-table-config.h b/widgets/table/e-table-config.h
index c3f994a635..4f690c97cc 100644
--- a/widgets/table/e-table-config.h
+++ b/widgets/table/e-table-config.h
@@ -73,8 +73,8 @@ typedef struct {
GtkWidget *group_label;
GtkWidget *fields_label;
- ETableConfigSortWidgets sort [4];
- ETableConfigSortWidgets group [4];
+ ETableConfigSortWidgets sort[4];
+ ETableConfigSortWidgets group[4];
ETable *available;
ETableWithout *available_model;
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index c05506d953..440446e80f 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -100,10 +100,10 @@ e_table_field_chooser_dialog_init (ETableFieldChooserDialog *e_table_field_choos
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
- widget = e_table_field_chooser_new();
- e_table_field_chooser_dialog->etfc = E_TABLE_FIELD_CHOOSER(widget);
+ widget = e_table_field_chooser_new ();
+ e_table_field_chooser_dialog->etfc = E_TABLE_FIELD_CHOOSER (widget);
- g_object_set(widget,
+ g_object_set (widget,
"dnd_code", e_table_field_chooser_dialog->dnd_code,
"full_header", e_table_field_chooser_dialog->full_header,
"header", e_table_field_chooser_dialog->header,
@@ -112,7 +112,7 @@ e_table_field_chooser_dialog_init (ETableFieldChooserDialog *e_table_field_choos
content_area = gtk_dialog_get_content_area (dialog);
gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0);
- gtk_widget_show (GTK_WIDGET(widget));
+ gtk_widget_show (GTK_WIDGET (widget));
gtk_window_set_title (GTK_WINDOW (dialog), _("Add a Column"));
}
@@ -147,13 +147,13 @@ e_table_field_chooser_dialog_dispose (GObject *object)
static void
e_table_field_chooser_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
- ETableFieldChooserDialog *etfcd = E_TABLE_FIELD_CHOOSER_DIALOG(object);
+ ETableFieldChooserDialog *etfcd = E_TABLE_FIELD_CHOOSER_DIALOG (object);
switch (prop_id) {
case PROP_DND_CODE:
- g_free(etfcd->dnd_code);
- etfcd->dnd_code = g_strdup(g_value_get_string (value));
+ g_free (etfcd->dnd_code);
+ etfcd->dnd_code = g_strdup (g_value_get_string (value));
if (etfcd->etfc)
- g_object_set(etfcd->etfc,
+ g_object_set (etfcd->etfc,
"dnd_code", etfcd->dnd_code,
NULL);
break;
@@ -161,13 +161,13 @@ e_table_field_chooser_dialog_set_property (GObject *object, guint prop_id, const
if (etfcd->full_header)
g_object_unref (etfcd->full_header);
if (g_value_get_object (value))
- etfcd->full_header = E_TABLE_HEADER(g_value_get_object (value));
+ etfcd->full_header = E_TABLE_HEADER (g_value_get_object (value));
else
etfcd->full_header = NULL;
if (etfcd->full_header)
g_object_ref (etfcd->full_header);
if (etfcd->etfc)
- g_object_set(etfcd->etfc,
+ g_object_set (etfcd->etfc,
"full_header", etfcd->full_header,
NULL);
break;
@@ -175,13 +175,13 @@ e_table_field_chooser_dialog_set_property (GObject *object, guint prop_id, const
if (etfcd->header)
g_object_unref (etfcd->header);
if (g_value_get_object (value))
- etfcd->header = E_TABLE_HEADER(g_value_get_object (value));
+ etfcd->header = E_TABLE_HEADER (g_value_get_object (value));
else
etfcd->header = NULL;
if (etfcd->header)
g_object_ref (etfcd->header);
if (etfcd->etfc)
- g_object_set(etfcd->etfc,
+ g_object_set (etfcd->etfc,
"header", etfcd->header,
NULL);
break;
@@ -193,7 +193,7 @@ e_table_field_chooser_dialog_set_property (GObject *object, guint prop_id, const
static void
e_table_field_chooser_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
- ETableFieldChooserDialog *etfcd = E_TABLE_FIELD_CHOOSER_DIALOG(object);
+ ETableFieldChooserDialog *etfcd = E_TABLE_FIELD_CHOOSER_DIALOG (object);
switch (prop_id) {
case PROP_DND_CODE:
g_value_set_string (value, g_strdup (etfcd->dnd_code));
diff --git a/widgets/table/e-table-field-chooser-dialog.h b/widgets/table/e-table-field-chooser-dialog.h
index e2d1c2ef9b..01129ffa09 100644
--- a/widgets/table/e-table-field-chooser-dialog.h
+++ b/widgets/table/e-table-field-chooser-dialog.h
@@ -62,7 +62,7 @@ struct _ETableFieldChooserDialogClass
GtkDialogClass parent_class;
};
-GtkWidget *e_table_field_chooser_dialog_new(void);
+GtkWidget *e_table_field_chooser_dialog_new (void);
GType e_table_field_chooser_dialog_get_type (void);
G_END_DECLS
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index 7108b33ee7..67beee9d52 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -50,7 +50,7 @@ enum {
LAST_SIGNAL
};
-static guint etfci_signals [LAST_SIGNAL] = { 0, };
+static guint etfci_signals[LAST_SIGNAL] = { 0, };
#endif
/* workaround for avoiding API breakage */
@@ -96,7 +96,7 @@ etfci_find_button (ETableFieldChooserItem *etfci, gdouble loc)
gint count;
gdouble height = 0;
- count = e_table_header_count(etfci->combined_header);
+ count = e_table_header_count (etfci->combined_header);
for (i = 0; i < count; i++) {
ETableCol *ecol;
@@ -108,7 +108,7 @@ etfci_find_button (ETableFieldChooserItem *etfci, gdouble loc)
if (height > loc)
return i;
}
- return MAX(0, count - 1);
+ return MAX (0, count - 1);
}
static void
@@ -158,7 +158,7 @@ etfci_reflow (GnomeCanvasItem *item, gint flags)
old_height = etfci->height;
- count = e_table_header_count(etfci->combined_header);
+ count = e_table_header_count (etfci->combined_header);
for (i = 0; i < count; i++) {
ETableCol *ecol;
@@ -172,9 +172,9 @@ etfci_reflow (GnomeCanvasItem *item, gint flags)
etfci->height = height;
if (old_height != etfci->height)
- e_canvas_item_request_parent_reflow(item);
+ e_canvas_item_request_parent_reflow (item);
- gnome_canvas_item_request_update(item);
+ gnome_canvas_item_request_update (item);
}
static void
@@ -184,7 +184,7 @@ etfci_update (GnomeCanvasItem *item,
gint flags)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
- gdouble i2c [6];
+ gdouble i2c[6];
ArtPoint c1, c2, i1, i2;
if (GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->update)
@@ -257,14 +257,14 @@ etfci_drop_full_header (ETableFieldChooserItem *etfci)
g_object_unref (header);
etfci->full_header = NULL;
etfci->height = 0;
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (etfci));
}
static void
full_header_structure_changed (ETableHeader *header,
ETableFieldChooserItem *etfci)
{
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (etfci));
}
static void
@@ -272,7 +272,7 @@ full_header_dimension_changed (ETableHeader *header,
gint col,
ETableFieldChooserItem *etfci)
{
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (etfci));
}
static void
@@ -284,11 +284,11 @@ etfci_add_full_header (ETableFieldChooserItem *etfci,
etfci->full_header_structure_change_id = g_signal_connect (
header, "structure_change",
- G_CALLBACK(full_header_structure_changed), etfci);
+ G_CALLBACK (full_header_structure_changed), etfci);
etfci->full_header_dimension_change_id = g_signal_connect (
header, "dimension_change",
- G_CALLBACK(full_header_dimension_changed), etfci);
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
+ G_CALLBACK (full_header_dimension_changed), etfci);
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (etfci));
}
static void
@@ -311,14 +311,14 @@ etfci_drop_table_header (ETableFieldChooserItem *etfci)
g_object_unref (header);
etfci->header = NULL;
etfci->height = 0;
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (etfci));
}
static void
table_header_structure_changed (ETableHeader *header,
ETableFieldChooserItem *etfci)
{
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (etfci));
}
static void
@@ -326,7 +326,7 @@ table_header_dimension_changed (ETableHeader *header,
gint col,
ETableFieldChooserItem *etfci)
{
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (etfci));
}
static void
@@ -338,11 +338,11 @@ etfci_add_table_header (ETableFieldChooserItem *etfci,
etfci->table_header_structure_change_id = g_signal_connect (
header, "structure_change",
- G_CALLBACK(table_header_structure_changed), etfci);
+ G_CALLBACK (table_header_structure_changed), etfci);
etfci->table_header_dimension_change_id = g_signal_connect (
header, "dimension_change",
- G_CALLBACK(table_header_dimension_changed), etfci);
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
+ G_CALLBACK (table_header_dimension_changed), etfci);
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (etfci));
}
static void
@@ -361,23 +361,23 @@ etfci_set_property (GObject *object,
case PROP_FULL_HEADER:
etfci_drop_full_header (etfci);
if (g_value_get_object (value))
- etfci_add_full_header (etfci, E_TABLE_HEADER(g_value_get_object (value)));
+ etfci_add_full_header (etfci, E_TABLE_HEADER (g_value_get_object (value)));
break;
case PROP_HEADER:
etfci_drop_table_header (etfci);
if (g_value_get_object (value))
- etfci_add_table_header (etfci, E_TABLE_HEADER(g_value_get_object (value)));
+ etfci_add_table_header (etfci, E_TABLE_HEADER (g_value_get_object (value)));
break;
case PROP_DND_CODE:
- g_free(etfci->dnd_code);
- etfci->dnd_code = g_strdup(g_value_get_string (value));
+ g_free (etfci->dnd_code);
+ etfci->dnd_code = g_strdup (g_value_get_string (value));
break;
case PROP_WIDTH:
etfci->width = g_value_get_double (value);
- gnome_canvas_item_request_update(item);
+ gnome_canvas_item_request_update (item);
break;
}
}
@@ -416,12 +416,12 @@ etfci_drag_data_get (GtkWidget *widget,
{
if (etfci->drag_col != -1) {
gchar *string = g_strdup_printf("%d", etfci->drag_col);
- gtk_selection_data_set(selection_data,
+ gtk_selection_data_set (selection_data,
GDK_SELECTION_TYPE_STRING,
- sizeof(string[0]),
+ sizeof (string[0]),
(guchar *)string,
- strlen(string));
- g_free(string);
+ strlen (string));
+ g_free (string);
}
}
@@ -450,7 +450,7 @@ etfci_realize (GnomeCanvasItem *item)
etfci->drag_data_get_id = g_signal_connect (
item->canvas, "drag_data_get",
G_CALLBACK (etfci_drag_data_get), etfci);
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (etfci));
}
static void
@@ -557,16 +557,16 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, gdouble x, gdo
gint drag_col;
gint button_height;
- GtkTargetEntry etfci_drag_types [] = {
+ GtkTargetEntry etfci_drag_types[] = {
{ (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
if (etfci->combined_header == NULL)
return;
- drag_col = etfci_find_button(etfci, y);
+ drag_col = etfci_find_button (etfci, y);
- if (drag_col < 0 || drag_col > e_table_header_count(etfci->combined_header))
+ if (drag_col < 0 || drag_col > e_table_header_count (etfci->combined_header))
return;
ecol = e_table_header_get_column (etfci->combined_header, drag_col);
@@ -581,7 +581,7 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, gdouble x, gdo
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);
- g_free(etfci_drag_types[0].target);
+ g_free (etfci_drag_types[0].target);
button_height = e_table_header_compute_height (ecol, widget);
window = gtk_widget_get_window (widget);
@@ -721,6 +721,6 @@ etfci_init (ETableFieldChooserItem *etfci)
etfci->maybe_drag = 0;
etfci->drag_end_id = 0;
- e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM (etfci), etfci_reflow);
+ e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (etfci), etfci_reflow);
}
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index 2cf0d5f114..54dcdb6e35 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -99,36 +99,36 @@ ensure_nonzero_step_increments (ETableFieldChooser *etfc)
gtk_adjustment_set_step_increment (ha, 16.0);
}
-static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, ETableFieldChooser *etfc)
+static void allocate_callback (GtkWidget *canvas, GtkAllocation *allocation, ETableFieldChooser *etfc)
{
gdouble height;
etfc->last_alloc = *allocation;
- gnome_canvas_item_set( etfc->item,
+ gnome_canvas_item_set ( etfc->item,
"width", (gdouble) allocation->width,
NULL );
- g_object_get(etfc->item,
+ g_object_get (etfc->item,
"height", &height,
NULL);
- height = MAX(height, allocation->height);
- gnome_canvas_set_scroll_region(GNOME_CANVAS( etfc->canvas ), 0, 0, allocation->width - 1, height - 1);
- gnome_canvas_item_set( etfc->rect,
+ height = MAX (height, allocation->height);
+ gnome_canvas_set_scroll_region (GNOME_CANVAS ( etfc->canvas ), 0, 0, allocation->width - 1, height - 1);
+ gnome_canvas_item_set ( etfc->rect,
"x2", (gdouble) allocation->width,
"y2", (gdouble) height,
NULL );
ensure_nonzero_step_increments (etfc);
}
-static void resize(GnomeCanvas *canvas, ETableFieldChooser *etfc)
+static void resize (GnomeCanvas *canvas, ETableFieldChooser *etfc)
{
gdouble height;
- g_object_get(etfc->item,
+ g_object_get (etfc->item,
"height", &height,
NULL);
- height = MAX(height, etfc->last_alloc.height);
+ height = MAX (height, etfc->last_alloc.height);
- gnome_canvas_set_scroll_region (GNOME_CANVAS(etfc->canvas), 0, 0, etfc->last_alloc.width - 1, height - 1);
- gnome_canvas_item_set( etfc->rect,
+ gnome_canvas_set_scroll_region (GNOME_CANVAS (etfc->canvas), 0, 0, etfc->last_alloc.width - 1, height - 1);
+ gnome_canvas_item_set ( etfc->rect,
"x2", (gdouble) etfc->last_alloc.width,
"y2", (gdouble) height,
NULL );
@@ -185,8 +185,8 @@ e_table_field_chooser_init (ETableFieldChooser *etfc)
gtk_widget_push_colormap (gdk_rgb_get_colormap ());
- etfc->rect = gnome_canvas_item_new(gnome_canvas_root( GNOME_CANVAS( etfc->canvas ) ),
- gnome_canvas_rect_get_type(),
+ etfc->rect = gnome_canvas_item_new (gnome_canvas_root ( GNOME_CANVAS ( etfc->canvas ) ),
+ gnome_canvas_rect_get_type (),
"x1", (gdouble) 0,
"y1", (gdouble) 0,
"x2", (gdouble) 100,
@@ -194,8 +194,8 @@ e_table_field_chooser_init (ETableFieldChooser *etfc)
"fill_color", "white",
NULL );
- etfc->item = gnome_canvas_item_new(gnome_canvas_root(etfc->canvas),
- e_table_field_chooser_item_get_type(),
+ etfc->item = gnome_canvas_item_new (gnome_canvas_root (etfc->canvas),
+ e_table_field_chooser_item_get_type (),
"width", (gdouble) 100,
"full_header", etfc->full_header,
"header", etfc->header,
@@ -206,7 +206,7 @@ e_table_field_chooser_init (ETableFieldChooser *etfc)
G_CALLBACK ( resize ),
etfc);
- gnome_canvas_set_scroll_region ( GNOME_CANVAS( etfc->canvas ),
+ gnome_canvas_set_scroll_region ( GNOME_CANVAS ( etfc->canvas ),
0, 0,
100, 100 );
@@ -216,13 +216,13 @@ e_table_field_chooser_init (ETableFieldChooser *etfc)
etfc);
gtk_widget_pop_colormap ();
- gtk_widget_show_all(widget);
+ gtk_widget_show_all (widget);
}
static void
e_table_field_chooser_dispose (GObject *object)
{
- ETableFieldChooser *etfc = E_TABLE_FIELD_CHOOSER(object);
+ ETableFieldChooser *etfc = E_TABLE_FIELD_CHOOSER (object);
g_free (etfc->dnd_code);
etfc->dnd_code = NULL;
@@ -249,14 +249,14 @@ e_table_field_chooser_new (void)
static void
e_table_field_chooser_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
- ETableFieldChooser *etfc = E_TABLE_FIELD_CHOOSER(object);
+ ETableFieldChooser *etfc = E_TABLE_FIELD_CHOOSER (object);
switch (prop_id) {
case PROP_DND_CODE:
- g_free(etfc->dnd_code);
- etfc->dnd_code = g_strdup(g_value_get_string(value));
+ g_free (etfc->dnd_code);
+ etfc->dnd_code = g_strdup (g_value_get_string (value));
if (etfc->item)
- g_object_set(etfc->item,
+ g_object_set (etfc->item,
"dnd_code", etfc->dnd_code,
NULL);
break;
@@ -264,13 +264,13 @@ e_table_field_chooser_set_property (GObject *object, guint prop_id, const GValue
if (etfc->full_header)
g_object_unref (etfc->full_header);
if (g_value_get_object (value))
- etfc->full_header = E_TABLE_HEADER(g_value_get_object (value));
+ etfc->full_header = E_TABLE_HEADER (g_value_get_object (value));
else
etfc->full_header = NULL;
if (etfc->full_header)
g_object_ref (etfc->full_header);
if (etfc->item)
- g_object_set(etfc->item,
+ g_object_set (etfc->item,
"full_header", etfc->full_header,
NULL);
break;
@@ -278,13 +278,13 @@ e_table_field_chooser_set_property (GObject *object, guint prop_id, const GValue
if (etfc->header)
g_object_unref (etfc->header);
if (g_value_get_object (value))
- etfc->header = E_TABLE_HEADER(g_value_get_object (value));
+ etfc->header = E_TABLE_HEADER (g_value_get_object (value));
else
etfc->header = NULL;
if (etfc->header)
g_object_ref (etfc->header);
if (etfc->item)
- g_object_set(etfc->item,
+ g_object_set (etfc->item,
"header", etfc->header,
NULL);
break;
@@ -296,7 +296,7 @@ e_table_field_chooser_set_property (GObject *object, guint prop_id, const GValue
static void
e_table_field_chooser_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
- ETableFieldChooser *etfc = E_TABLE_FIELD_CHOOSER(object);
+ ETableFieldChooser *etfc = E_TABLE_FIELD_CHOOSER (object);
switch (prop_id) {
case PROP_DND_CODE:
diff --git a/widgets/table/e-table-field-chooser.h b/widgets/table/e-table-field-chooser.h
index cff9384895..7cc6e45568 100644
--- a/widgets/table/e-table-field-chooser.h
+++ b/widgets/table/e-table-field-chooser.h
@@ -68,7 +68,7 @@ struct _ETableFieldChooserClass
GtkVBoxClass parent_class;
};
-GtkWidget *e_table_field_chooser_new(void);
+GtkWidget *e_table_field_chooser_new (void);
GType e_table_field_chooser_get_type (void);
G_END_DECLS
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 57a1aa537c..3db409c6a3 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -75,7 +75,7 @@ e_table_group_container_child_node_free (ETableGroupContainer *etgc,
gtk_object_destroy (GTK_OBJECT (child));
e_table_model_free_value (etg->model, etgc->ecol->col_idx,
child_node->key);
- g_free(child_node->string);
+ g_free (child_node->string);
gtk_object_destroy (GTK_OBJECT (child_node->text));
gtk_object_destroy (GTK_OBJECT (child_node->rect));
}
@@ -120,7 +120,7 @@ etgc_dispose (GObject *object)
etgc->selection_model = NULL;
if (etgc->rect)
- gtk_object_destroy (GTK_OBJECT(etgc->rect));
+ gtk_object_destroy (GTK_OBJECT (etgc->rect));
etgc->rect = NULL;
G_OBJECT_CLASS (etgc_parent_class)->dispose (object);
@@ -145,11 +145,11 @@ e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContaine
ETableModel *model, ETableSortInfo *sort_info, gint n)
{
ETableCol *col;
- ETableSortColumn column = e_table_sort_info_grouping_get_nth(sort_info, n);
+ ETableSortColumn column = e_table_sort_info_grouping_get_nth (sort_info, n);
GtkWidget *widget;
GtkStyle *style;
- col = e_table_header_get_column_by_col_idx(full_header, column.column);
+ col = e_table_header_get_column_by_col_idx (full_header, column.column);
if (col == NULL)
col = e_table_header_get_column (full_header, e_table_header_count (full_header) - 1);
@@ -202,7 +202,7 @@ e_table_group_container_new (GnomeCanvasGroup *parent, ETableHeader *full_header
static gint
etgc_event (GnomeCanvasItem *item, GdkEvent *event)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(item);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (item);
gboolean return_val = TRUE;
gboolean change_focus = FALSE;
gboolean use_col = FALSE;
@@ -282,7 +282,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event)
}
}
if (direction == E_FOCUS_END)
- list = g_list_last(etgc->children);
+ list = g_list_last (etgc->children);
else
list = etgc->children;
if (list) {
@@ -306,7 +306,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event)
break;
}
if (return_val == FALSE) {
- if (GNOME_CANVAS_ITEM_CLASS(etgc_parent_class)->event)
+ if (GNOME_CANVAS_ITEM_CLASS (etgc_parent_class)->event)
return GNOME_CANVAS_ITEM_CLASS (etgc_parent_class)->event (item, event);
}
return return_val;
@@ -426,7 +426,7 @@ create_child_node (ETableGroupContainer *etgc, gpointer val)
{
ETableGroup *child;
ETableGroupContainerChildNode *child_node;
- ETableGroup *etg = E_TABLE_GROUP(etgc);
+ ETableGroup *etg = E_TABLE_GROUP (etgc);
child_node = g_new (ETableGroupContainerChildNode, 1);
child_node->rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP (etgc),
@@ -442,7 +442,7 @@ create_child_node (ETableGroupContainer *etgc, gpointer val)
NULL);
child = e_table_group_new (GNOME_CANVAS_GROUP (etgc), etg->full_header,
etg->header, etg->model, etgc->sort_info, etgc->n + 1);
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(child),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (child),
"alternating_row_colors", etgc->alternating_row_colors,
"horizontal_draw_grid", etgc->horizontal_draw_grid,
"vertical_draw_grid", etgc->vertical_draw_grid,
@@ -547,10 +547,10 @@ etgc_add_array (ETableGroup *etg, const gint *array, gint count)
comp_val = (*comp)(lastval, val, cmp_cache);
if (comp_val != 0) {
- child_node = create_child_node(etgc, lastval);
+ child_node = create_child_node (etgc, lastval);
child = child_node->child;
- e_table_group_add_array(child, array + laststart, i - laststart);
+ e_table_group_add_array (child, array + laststart, i - laststart);
child_node->count = i - laststart;
etgc->children = g_list_append (etgc->children, child_node);
@@ -562,10 +562,10 @@ etgc_add_array (ETableGroup *etg, const gint *array, gint count)
e_table_sorting_utils_free_cmp_cache (cmp_cache);
- child_node = create_child_node(etgc, lastval);
+ child_node = create_child_node (etgc, lastval);
child = child_node->child;
- e_table_group_add_array(child, array + laststart, i - laststart);
+ e_table_group_add_array (child, array + laststart, i - laststart);
child_node->count = i - laststart;
etgc->children = g_list_append (etgc->children, child_node);
@@ -582,15 +582,15 @@ etgc_add_all (ETableGroup *etg)
gint *array;
gint count;
- e_sorter_get_sorted_to_model_array(sorter, &array, &count);
+ e_sorter_get_sorted_to_model_array (sorter, &array, &count);
- etgc_add_array(etg, array, count);
+ etgc_add_array (etg, array, count);
}
static gboolean
etgc_remove (ETableGroup *etg, gint row)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
GList *list;
for (list = etgc->children; list; list = g_list_next (list)) {
@@ -617,12 +617,12 @@ etgc_remove (ETableGroup *etg, gint row)
static gint
etgc_row_count (ETableGroup *etg)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
GList *list;
gint count = 0;
- for (list = etgc->children; list; list = g_list_next(list)) {
+ for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroup *group = ((ETableGroupContainerChildNode *)list->data)->child;
- gint this_count = e_table_group_row_count(group);
+ gint this_count = e_table_group_row_count (group);
count += this_count;
}
return count;
@@ -631,7 +631,7 @@ etgc_row_count (ETableGroup *etg)
static void
etgc_increment (ETableGroup *etg, gint position, gint amount)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
GList *list;
for (list = etgc->children; list; list = g_list_next (list))
@@ -642,7 +642,7 @@ etgc_increment (ETableGroup *etg, gint position, gint amount)
static void
etgc_decrement (ETableGroup *etg, gint position, gint amount)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
GList *list;
for (list = etgc->children; list; list = g_list_next (list))
@@ -653,7 +653,7 @@ etgc_decrement (ETableGroup *etg, gint position, gint amount)
static void
etgc_set_focus (ETableGroup *etg, EFocus direction, gint view_col)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
if (etgc->children) {
if (direction == E_FOCUS_END)
e_table_group_set_focus (((ETableGroupContainerChildNode *)g_list_last (etgc->children)->data)->child,
@@ -667,7 +667,7 @@ etgc_set_focus (ETableGroup *etg, EFocus direction, gint view_col)
static gint
etgc_get_focus_column (ETableGroup *etg)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
if (etgc->children) {
GList *list;
for (list = etgc->children; list; list = list->next) {
@@ -684,7 +684,7 @@ etgc_get_focus_column (ETableGroup *etg)
static void
etgc_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
if (row)
*row = -1;
@@ -710,7 +710,7 @@ etgc_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col)
static void
etgc_get_mouse_over (ETableGroup *etg, gint *row, gint *col)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
if (row)
*row = -1;
@@ -741,7 +741,7 @@ etgc_get_mouse_over (ETableGroup *etg, gint *row, gint *col)
static void
etgc_get_cell_geometry (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y, gint *width, gint *height)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
gint ypos;
@@ -768,7 +768,7 @@ etgc_get_cell_geometry (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y
static void etgc_thaw (ETableGroup *etg)
{
- e_canvas_item_request_reflow (GNOME_CANVAS_ITEM(etg));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (etg));
}
static void
@@ -820,7 +820,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp
case PROP_SELECTION_MODEL:
if (etgc->selection_model)
g_object_unref (etgc->selection_model);
- etgc->selection_model = E_SELECTION_MODEL(g_value_get_object (value));
+ etgc->selection_model = E_SELECTION_MODEL (g_value_get_object (value));
if (etgc->selection_model)
g_object_ref (etgc->selection_model);
for (list = etgc->children; list; list = g_list_next (list)) {
@@ -1030,7 +1030,7 @@ etgc_class_init (ETableGroupContainerClass *klass)
static void
etgc_reflow (GnomeCanvasItem *item, gint flags)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(item);
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (item);
gboolean frozen;
g_object_get (etgc,
@@ -1068,7 +1068,7 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
pango_font_metrics_unref (metrics);
}
- extra_height = MAX(extra_height, BUTTON_HEIGHT + BUTTON_PADDING * 2);
+ extra_height = MAX (extra_height, BUTTON_HEIGHT + BUTTON_PADDING * 2);
running_height = extra_height;
@@ -1090,15 +1090,15 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
"height", &item_height,
NULL);
- e_canvas_item_move_absolute (GNOME_CANVAS_ITEM(child_node->text),
+ e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (child_node->text),
GROUP_INDENT,
running_height - BUTTON_PADDING);
- e_canvas_item_move_absolute (GNOME_CANVAS_ITEM(child),
+ e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (child),
GROUP_INDENT,
running_height);
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(child_node->rect),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (child_node->rect),
"x1", (gdouble) 0,
"x2", (gdouble) running_width + GROUP_INDENT,
"y1", (gdouble) running_height - extra_height,
@@ -1122,7 +1122,7 @@ etgc_init (ETableGroupContainer *container)
{
container->children = NULL;
- e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM(container), etgc_reflow);
+ e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (container), etgc_reflow);
container->alternating_row_colors = 1;
container->horizontal_draw_grid = 1;
@@ -1220,10 +1220,10 @@ e_table_group_container_print_page (EPrintable *ep,
return;
} else {
child_node = child->data;
- child_printable = e_table_group_get_printable(child_node->child);
+ child_printable = e_table_group_get_printable (child_node->child);
if (child_printable)
g_object_ref (child_printable);
- e_printable_reset(child_printable);
+ e_printable_reset (child_printable);
}
}
@@ -1236,13 +1236,13 @@ e_table_group_container_print_page (EPrintable *ep,
pango_font_description_free (desc);
while (1) {
- child_height = e_printable_height(child_printable, context, width,yd + 2 * TEXT_AREA_HEIGHT, quantize);
+ child_height = e_printable_height (child_printable, context, width,yd + 2 * TEXT_AREA_HEIGHT, quantize);
cr = gtk_print_context_get_cairo_context (context);
cairo_save (cr);
cairo_rectangle (cr, 0, 0, width,TEXT_AREA_HEIGHT);
cairo_rectangle (cr, 0, 0, 2 * TEXT_AREA_HEIGHT, child_height + TEXT_AREA_HEIGHT);
cairo_set_source_rgb (cr, .7, .7, .7);
- cairo_fill(cr);
+ cairo_fill (cr);
cairo_restore (cr);
cairo_save (cr);
@@ -1250,7 +1250,7 @@ e_table_group_container_print_page (EPrintable *ep,
cairo_clip (cr);
cairo_restore (cr);
- cairo_move_to(cr, 0, 0);
+ cairo_move_to (cr, 0, 0);
if (groupcontext->etgc->ecol->text)
string = g_strdup_printf ("%s : %s (%d item%s)",
groupcontext->etgc->ecol->text,
@@ -1264,17 +1264,17 @@ e_table_group_container_print_page (EPrintable *ep,
child_node->count == 1 ? "" : "s");
pango_layout_set_text (layout, string, -1);
pango_cairo_show_layout (cr, layout);
- g_free(string);
+ g_free (string);
- cairo_translate(cr, 2 * TEXT_AREA_HEIGHT, TEXT_AREA_HEIGHT);
- cairo_move_to(cr, 0, 0);
+ cairo_translate (cr, 2 * TEXT_AREA_HEIGHT, TEXT_AREA_HEIGHT);
+ cairo_move_to (cr, 0, 0);
cairo_rectangle (cr, 0, 0, width - 2 * TEXT_AREA_HEIGHT,child_height);
- cairo_clip(cr);
+ cairo_clip (cr);
e_printable_print_page (child_printable, context, width-2 * TEXT_AREA_HEIGHT, height , quantize);
yd += child_height + TEXT_AREA_HEIGHT;
- if (e_printable_data_left(child_printable))
+ if (e_printable_data_left (child_printable))
break;
child = child->next;
@@ -1286,10 +1286,10 @@ e_table_group_container_print_page (EPrintable *ep,
child_node = child->data;
if (child_printable)
g_object_unref (child_printable);
- child_printable = e_table_group_get_printable(child_node->child);
+ child_printable = e_table_group_get_printable (child_node->child);
if (child_printable)
g_object_ref (child_printable);
- e_printable_reset(child_printable);
+ e_printable_reset (child_printable);
}
if (groupcontext->child_printable)
g_object_unref (groupcontext->child_printable);
@@ -1343,10 +1343,10 @@ e_table_group_container_height (EPrintable *ep,
return 0;
} else {
child_node = child->data;
- child_printable = e_table_group_get_printable(child_node->child);
+ child_printable = e_table_group_get_printable (child_node->child);
if (child_printable)
g_object_ref (child_printable);
- e_printable_reset(child_printable);
+ e_printable_reset (child_printable);
}
}
@@ -1354,12 +1354,12 @@ e_table_group_container_height (EPrintable *ep,
return 0;
while (1) {
- child_height = e_printable_height(child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize);
+ child_height = e_printable_height (child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize);
height -= child_height + TEXT_AREA_HEIGHT;
if (yd != -1) {
- if (!e_printable_will_fit(child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize)) {
+ if (!e_printable_will_fit (child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize)) {
break;
}
@@ -1374,10 +1374,10 @@ e_table_group_container_height (EPrintable *ep,
child_node = child->data;
if (child_printable)
g_object_unref (child_printable);
- child_printable = e_table_group_get_printable(child_node->child);
+ child_printable = e_table_group_get_printable (child_node->child);
if (child_printable)
g_object_ref (child_printable);
- e_printable_reset(child_printable);
+ e_printable_reset (child_printable);
}
if (child_printable)
g_object_unref (child_printable);
@@ -1411,10 +1411,10 @@ e_table_group_container_will_fit (EPrintable *ep,
return will_fit;
} else {
child_node = child->data;
- child_printable = e_table_group_get_printable(child_node->child);
+ child_printable = e_table_group_get_printable (child_node->child);
if (child_printable)
g_object_ref (child_printable);
- e_printable_reset(child_printable);
+ e_printable_reset (child_printable);
}
}
@@ -1422,10 +1422,10 @@ e_table_group_container_will_fit (EPrintable *ep,
will_fit = FALSE;
else {
while (1) {
- child_height = e_printable_height(child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize);
+ child_height = e_printable_height (child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize);
if (yd != -1) {
- if (!e_printable_will_fit(child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize)) {
+ if (!e_printable_will_fit (child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize)) {
will_fit = FALSE;
break;
}
@@ -1441,10 +1441,10 @@ e_table_group_container_will_fit (EPrintable *ep,
child_node = child->data;
if (child_printable)
g_object_unref (child_printable);
- child_printable = e_table_group_get_printable(child_node->child);
+ child_printable = e_table_group_get_printable (child_node->child);
if (child_printable)
g_object_ref (child_printable);
- e_printable_reset(child_printable);
+ e_printable_reset (child_printable);
}
}
@@ -1465,17 +1465,17 @@ e_table_group_container_printable_destroy (gpointer data,
g_object_unref (groupcontext->etgc);
if (groupcontext->child_printable)
g_object_ref (groupcontext->child_printable);
- g_free(groupcontext);
+ g_free (groupcontext);
}
static EPrintable *
etgc_get_printable (ETableGroup *etg)
{
- ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
- EPrintable *printable = e_printable_new();
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
+ EPrintable *printable = e_printable_new ();
ETGCPrintContext *groupcontext;
- groupcontext = g_new(ETGCPrintContext, 1);
+ groupcontext = g_new (ETGCPrintContext, 1);
groupcontext->etgc = etgc;
g_object_ref (etgc);
groupcontext->child = etgc->children;
@@ -1483,23 +1483,23 @@ etgc_get_printable (ETableGroup *etg)
g_signal_connect (printable,
"print_page",
- G_CALLBACK(e_table_group_container_print_page),
+ G_CALLBACK (e_table_group_container_print_page),
groupcontext);
g_signal_connect (printable,
"data_left",
- G_CALLBACK(e_table_group_container_data_left),
+ G_CALLBACK (e_table_group_container_data_left),
groupcontext);
g_signal_connect (printable,
"reset",
- G_CALLBACK(e_table_group_container_reset),
+ G_CALLBACK (e_table_group_container_reset),
groupcontext);
g_signal_connect (printable,
"height",
- G_CALLBACK(e_table_group_container_height),
+ G_CALLBACK (e_table_group_container_height),
groupcontext);
g_signal_connect (printable,
"will_fit",
- G_CALLBACK(e_table_group_container_will_fit),
+ G_CALLBACK (e_table_group_container_will_fit),
groupcontext);
g_object_weak_ref (G_OBJECT (printable),
e_table_group_container_printable_destroy,
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c
index c1ddbb677a..3e63af004d 100644
--- a/widgets/table/e-table-group-leaf.c
+++ b/widgets/table/e-table-group-leaf.c
@@ -59,7 +59,7 @@ enum {
static void
etgl_dispose (GObject *object)
{
- ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF(object);
+ ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (object);
if (etgl->ets) {
g_object_unref (etgl->ets);
@@ -97,7 +97,7 @@ etgl_dispose (GObject *object)
etgl->etgl_key_press_id = 0;
etgl->etgl_start_drag_id = 0;
- gtk_object_destroy (GTK_OBJECT(etgl->item));
+ gtk_object_destroy (GTK_OBJECT (etgl->item));
etgl->item = NULL;
}
@@ -118,14 +118,14 @@ e_table_group_leaf_construct (GnomeCanvasGroup *parent,
ETableModel *model,
ETableSortInfo *sort_info)
{
- etgl->is_grouped = e_table_sort_info_grouping_get_count(sort_info) > 0 ? TRUE : FALSE;
+ etgl->is_grouped = e_table_sort_info_grouping_get_count (sort_info) > 0 ? TRUE : FALSE;
if (etgl->is_grouped)
- etgl->ets = E_TABLE_SUBSET(e_table_sorted_variable_new (model,
+ etgl->ets = E_TABLE_SUBSET (e_table_sorted_variable_new (model,
full_header,
sort_info));
else
- etgl->ets = E_TABLE_SUBSET(e_table_sorted_new (model,
+ etgl->ets = E_TABLE_SUBSET (e_table_sorted_new (model,
full_header,
sort_info));
@@ -166,24 +166,24 @@ e_table_group_leaf_new (GnomeCanvasGroup *parent,
static void
etgl_cursor_change (GtkObject *object, gint row, ETableGroupLeaf *etgl)
{
- if (row < E_TABLE_SUBSET(etgl->ets)->n_map)
- e_table_group_cursor_change (E_TABLE_GROUP(etgl),
- E_TABLE_SUBSET(etgl->ets)->map_table[row]);
+ if (row < E_TABLE_SUBSET (etgl->ets)->n_map)
+ e_table_group_cursor_change (E_TABLE_GROUP (etgl),
+ E_TABLE_SUBSET (etgl->ets)->map_table[row]);
}
static void
etgl_cursor_activated (GtkObject *object, gint view_row, ETableGroupLeaf *etgl)
{
- if (view_row < E_TABLE_SUBSET(etgl->ets)->n_map)
- e_table_group_cursor_activated (E_TABLE_GROUP(etgl),
- E_TABLE_SUBSET(etgl->ets)->map_table[view_row]);
+ if (view_row < E_TABLE_SUBSET (etgl->ets)->n_map)
+ e_table_group_cursor_activated (E_TABLE_GROUP (etgl),
+ E_TABLE_SUBSET (etgl->ets)->map_table[view_row]);
}
static void
etgl_double_click (GtkObject *object, gint model_row, gint model_col, GdkEvent *event,
ETableGroupLeaf *etgl)
{
- e_table_group_double_click (E_TABLE_GROUP(etgl), model_row, model_col, event);
+ e_table_group_double_click (E_TABLE_GROUP (etgl), model_row, model_col, event);
}
static gboolean
@@ -193,10 +193,10 @@ etgl_key_press (GtkObject *object,
GdkEvent *event,
ETableGroupLeaf *etgl)
{
- if (row < E_TABLE_SUBSET(etgl->ets)->n_map && row >= 0)
+ if (row < E_TABLE_SUBSET (etgl->ets)->n_map && row >= 0)
return e_table_group_key_press (
- E_TABLE_GROUP(etgl),
- E_TABLE_SUBSET(etgl->ets)->map_table[row],
+ E_TABLE_GROUP (etgl),
+ E_TABLE_SUBSET (etgl->ets)->map_table[row],
col, event);
else
return FALSE;
@@ -206,16 +206,16 @@ static gboolean
etgl_start_drag (GtkObject *object, gint model_row, gint model_col, GdkEvent *event,
ETableGroupLeaf *etgl)
{
- return e_table_group_start_drag (E_TABLE_GROUP(etgl), model_row, model_col, event);
+ return e_table_group_start_drag (E_TABLE_GROUP (etgl), model_row, model_col, event);
}
static gboolean
etgl_right_click (GtkObject *object, gint view_row, gint model_col, GdkEvent *event,
ETableGroupLeaf *etgl)
{
- if (view_row < E_TABLE_SUBSET(etgl->ets)->n_map)
- return e_table_group_right_click (E_TABLE_GROUP(etgl),
- E_TABLE_SUBSET(etgl->ets)->map_table[view_row],
+ if (view_row < E_TABLE_SUBSET (etgl->ets)->n_map)
+ return e_table_group_right_click (E_TABLE_GROUP (etgl),
+ E_TABLE_SUBSET (etgl->ets)->map_table[view_row],
model_col,
event);
else
@@ -229,9 +229,9 @@ etgl_click (GtkObject *object,
GdkEvent *event,
ETableGroupLeaf *etgl)
{
- if (row < E_TABLE_SUBSET(etgl->ets)->n_map)
- return e_table_group_click (E_TABLE_GROUP(etgl),
- E_TABLE_SUBSET(etgl->ets)->map_table[row],
+ if (row < E_TABLE_SUBSET (etgl->ets)->n_map)
+ return e_table_group_click (E_TABLE_GROUP (etgl),
+ E_TABLE_SUBSET (etgl->ets)->map_table[row],
col,
event);
else
@@ -241,12 +241,12 @@ etgl_click (GtkObject *object,
static void
etgl_reflow (GnomeCanvasItem *item, gint flags)
{
- ETableGroupLeaf *leaf = E_TABLE_GROUP_LEAF(item);
+ ETableGroupLeaf *leaf = E_TABLE_GROUP_LEAF (item);
- g_object_get(leaf->item,
+ g_object_get (leaf->item,
"height", &leaf->height,
NULL);
- g_object_get(leaf->item,
+ g_object_get (leaf->item,
"width", &leaf->width,
NULL);
@@ -256,13 +256,13 @@ etgl_reflow (GnomeCanvasItem *item, gint flags)
static void
etgl_realize (GnomeCanvasItem *item)
{
- ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF(item);
+ ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (item);
if (GNOME_CANVAS_ITEM_CLASS (etgl_parent_class)->realize)
GNOME_CANVAS_ITEM_CLASS (etgl_parent_class)->realize (item);
- etgl->item = E_TABLE_ITEM(gnome_canvas_item_new (
- GNOME_CANVAS_GROUP(etgl),
+ etgl->item = E_TABLE_ITEM (gnome_canvas_item_new (
+ GNOME_CANVAS_GROUP (etgl),
e_table_item_get_type (),
"ETableHeader", E_TABLE_GROUP(etgl)->header,
"ETableModel", etgl->ets,
@@ -279,35 +279,35 @@ etgl_realize (GnomeCanvasItem *item)
etgl->etgl_cursor_change_id = g_signal_connect (etgl->item,
"cursor_change",
- G_CALLBACK(etgl_cursor_change),
+ G_CALLBACK (etgl_cursor_change),
etgl);
etgl->etgl_cursor_activated_id = g_signal_connect (etgl->item,
"cursor_activated",
- G_CALLBACK(etgl_cursor_activated),
+ G_CALLBACK (etgl_cursor_activated),
etgl);
etgl->etgl_double_click_id = g_signal_connect (etgl->item,
"double_click",
- G_CALLBACK(etgl_double_click),
+ G_CALLBACK (etgl_double_click),
etgl);
etgl->etgl_right_click_id = g_signal_connect (etgl->item,
"right_click",
- G_CALLBACK(etgl_right_click),
+ G_CALLBACK (etgl_right_click),
etgl);
etgl->etgl_click_id = g_signal_connect (etgl->item,
"click",
- G_CALLBACK(etgl_click),
+ G_CALLBACK (etgl_click),
etgl);
etgl->etgl_key_press_id = g_signal_connect (etgl->item,
"key_press",
- G_CALLBACK(etgl_key_press),
+ G_CALLBACK (etgl_key_press),
etgl);
etgl->etgl_start_drag_id = g_signal_connect (etgl->item,
"start_drag",
- G_CALLBACK(etgl_start_drag),
+ G_CALLBACK (etgl_start_drag),
etgl);
- e_canvas_item_request_reflow(item);
+ e_canvas_item_request_reflow (item);
}
static void
@@ -315,8 +315,8 @@ etgl_add (ETableGroup *etg, gint row)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
- if (E_IS_TABLE_SUBSET_VARIABLE(etgl->ets)) {
- e_table_subset_variable_add (E_TABLE_SUBSET_VARIABLE(etgl->ets), row);
+ if (E_IS_TABLE_SUBSET_VARIABLE (etgl->ets)) {
+ e_table_subset_variable_add (E_TABLE_SUBSET_VARIABLE (etgl->ets), row);
}
}
@@ -325,8 +325,8 @@ etgl_add_array (ETableGroup *etg, const gint *array, gint count)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
- if (E_IS_TABLE_SUBSET_VARIABLE(etgl->ets)) {
- e_table_subset_variable_add_array (E_TABLE_SUBSET_VARIABLE(etgl->ets), array, count);
+ if (E_IS_TABLE_SUBSET_VARIABLE (etgl->ets)) {
+ e_table_subset_variable_add_array (E_TABLE_SUBSET_VARIABLE (etgl->ets), array, count);
}
}
@@ -335,8 +335,8 @@ etgl_add_all (ETableGroup *etg)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
- if (E_IS_TABLE_SUBSET_VARIABLE(etgl->ets)) {
- e_table_subset_variable_add_all (E_TABLE_SUBSET_VARIABLE(etgl->ets));
+ if (E_IS_TABLE_SUBSET_VARIABLE (etgl->ets)) {
+ e_table_subset_variable_add_all (E_TABLE_SUBSET_VARIABLE (etgl->ets));
}
}
@@ -345,8 +345,8 @@ etgl_remove (ETableGroup *etg, gint row)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
- if (E_IS_TABLE_SUBSET_VARIABLE(etgl->ets)) {
- return e_table_subset_variable_remove (E_TABLE_SUBSET_VARIABLE(etgl->ets), row);
+ if (E_IS_TABLE_SUBSET_VARIABLE (etgl->ets)) {
+ return e_table_subset_variable_remove (E_TABLE_SUBSET_VARIABLE (etgl->ets), row);
}
return FALSE;
}
@@ -356,7 +356,7 @@ etgl_increment (ETableGroup *etg, gint position, gint amount)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
- if (E_IS_TABLE_SUBSET_VARIABLE(etgl->ets)) {
+ if (E_IS_TABLE_SUBSET_VARIABLE (etgl->ets)) {
e_table_subset_variable_increment (
E_TABLE_SUBSET_VARIABLE (etgl->ets),
position, amount);
@@ -368,7 +368,7 @@ etgl_decrement (ETableGroup *etg, gint position, gint amount)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
- if (E_IS_TABLE_SUBSET_VARIABLE(etgl->ets)) {
+ if (E_IS_TABLE_SUBSET_VARIABLE (etgl->ets)) {
e_table_subset_variable_decrement (
E_TABLE_SUBSET_VARIABLE (etgl->ets),
position, amount);
@@ -380,7 +380,7 @@ etgl_row_count (ETableGroup *etg)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
- return e_table_model_row_count(E_TABLE_MODEL(etgl->ets));
+ return e_table_model_row_count (E_TABLE_MODEL (etgl->ets));
}
static void
@@ -391,7 +391,7 @@ etgl_set_focus (ETableGroup *etg, EFocus direction, gint view_col)
if (direction == E_FOCUS_END) {
e_table_item_set_cursor (
etgl->item, view_col,
- e_table_model_row_count (E_TABLE_MODEL(etgl->ets)) - 1);
+ e_table_model_row_count (E_TABLE_MODEL (etgl->ets)) - 1);
} else {
e_table_item_set_cursor (etgl->item, view_col, 0);
}
@@ -465,7 +465,7 @@ etgl_set_property (GObject *object,
case PROP_WIDTH:
etgl->minimum_width = g_value_get_double (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
"minimum_width", etgl->minimum_width,
NULL);
}
@@ -473,20 +473,20 @@ etgl_set_property (GObject *object,
case PROP_LENGTH_THRESHOLD:
etgl->length_threshold = g_value_get_int (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
"length_threshold", etgl->length_threshold,
NULL);
}
break;
case PROP_SELECTION_MODEL:
if (etgl->selection_model)
- g_object_unref(etgl->selection_model);
- etgl->selection_model = E_SELECTION_MODEL(g_value_get_object (value));
+ g_object_unref (etgl->selection_model);
+ etgl->selection_model = E_SELECTION_MODEL (g_value_get_object (value));
if (etgl->selection_model) {
- g_object_ref(etgl->selection_model);
+ g_object_ref (etgl->selection_model);
}
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
"selection_model", etgl->selection_model,
NULL);
}
@@ -495,7 +495,7 @@ etgl_set_property (GObject *object,
case PROP_UNIFORM_ROW_HEIGHT:
etgl->uniform_row_height = g_value_get_boolean (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
"uniform_row_height", etgl->uniform_row_height,
NULL);
}
@@ -504,7 +504,7 @@ etgl_set_property (GObject *object,
case PROP_TABLE_ALTERNATING_ROW_COLORS:
etgl->alternating_row_colors = g_value_get_boolean (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
"alternating_row_colors", etgl->alternating_row_colors,
NULL);
}
@@ -513,7 +513,7 @@ etgl_set_property (GObject *object,
case PROP_TABLE_HORIZONTAL_DRAW_GRID:
etgl->horizontal_draw_grid = g_value_get_boolean (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
"horizontal_draw_grid", etgl->horizontal_draw_grid,
NULL);
}
@@ -522,7 +522,7 @@ etgl_set_property (GObject *object,
case PROP_TABLE_VERTICAL_DRAW_GRID:
etgl->vertical_draw_grid = g_value_get_boolean (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
"vertical_draw_grid", etgl->vertical_draw_grid,
NULL);
}
@@ -531,7 +531,7 @@ etgl_set_property (GObject *object,
case PROP_TABLE_DRAW_FOCUS:
etgl->draw_focus = g_value_get_boolean (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
"drawfocus", etgl->draw_focus,
NULL);
}
@@ -540,7 +540,7 @@ etgl_set_property (GObject *object,
case PROP_CURSOR_MODE:
etgl->cursor_mode = g_value_get_int (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item),
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
"cursor_mode", etgl->cursor_mode,
NULL);
}
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index 4189ae6015..ceec4fd81c 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -49,14 +49,14 @@ enum {
LAST_SIGNAL
};
-static guint etg_signals [LAST_SIGNAL] = { 0, };
+static guint etg_signals[LAST_SIGNAL] = { 0, };
static gboolean etg_get_focus (ETableGroup *etg);
static void
etg_dispose (GObject *object)
{
- ETableGroup *etg = E_TABLE_GROUP(object);
+ ETableGroup *etg = E_TABLE_GROUP (object);
if (etg->header) {
g_object_unref (etg->header);
@@ -105,7 +105,7 @@ e_table_group_new (GnomeCanvasGroup *parent,
{
g_return_val_if_fail (model != NULL, NULL);
- if (n < e_table_sort_info_grouping_get_count(sort_info)) {
+ if (n < e_table_sort_info_grouping_get_count (sort_info)) {
return e_table_group_container_new (
parent, full_header, header, model, sort_info, n);
} else {
@@ -441,7 +441,7 @@ e_table_group_cursor_change (ETableGroup *e_table_group, gint row)
g_return_if_fail (E_IS_TABLE_GROUP (e_table_group));
g_signal_emit (e_table_group,
- etg_signals [CURSOR_CHANGE], 0,
+ etg_signals[CURSOR_CHANGE], 0,
row);
}
@@ -459,7 +459,7 @@ e_table_group_cursor_activated (ETableGroup *e_table_group, gint row)
g_return_if_fail (E_IS_TABLE_GROUP (e_table_group));
g_signal_emit (e_table_group,
- etg_signals [CURSOR_ACTIVATED], 0,
+ etg_signals[CURSOR_ACTIVATED], 0,
row);
}
@@ -482,7 +482,7 @@ e_table_group_double_click (ETableGroup *e_table_group,
g_return_if_fail (E_IS_TABLE_GROUP (e_table_group));
g_signal_emit (e_table_group,
- etg_signals [DOUBLE_CLICK], 0,
+ etg_signals[DOUBLE_CLICK], 0,
row, col, event);
}
@@ -507,7 +507,7 @@ e_table_group_right_click (ETableGroup *e_table_group,
g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE);
g_signal_emit (e_table_group,
- etg_signals [RIGHT_CLICK], 0,
+ etg_signals[RIGHT_CLICK], 0,
row, col, event, &return_val);
return return_val;
@@ -534,7 +534,7 @@ e_table_group_click (ETableGroup *e_table_group,
g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE);
g_signal_emit (e_table_group,
- etg_signals [CLICK], 0,
+ etg_signals[CLICK], 0,
row, col, event, &return_val);
return return_val;
@@ -561,7 +561,7 @@ e_table_group_key_press (ETableGroup *e_table_group,
g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE);
g_signal_emit (e_table_group,
- etg_signals [KEY_PRESS], 0,
+ etg_signals[KEY_PRESS], 0,
row, col, event, &return_val);
return return_val;
@@ -588,7 +588,7 @@ e_table_group_start_drag (ETableGroup *e_table_group,
g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE);
g_signal_emit (e_table_group,
- etg_signals [START_DRAG], 0,
+ etg_signals[START_DRAG], 0,
row, col, event, &return_val);
return return_val;
@@ -628,8 +628,8 @@ etg_event (GnomeCanvasItem *item, GdkEvent *event)
return_val = FALSE;
}
if (return_val == FALSE) {
- if (GNOME_CANVAS_ITEM_CLASS(etg_parent_class)->event)
- return GNOME_CANVAS_ITEM_CLASS(etg_parent_class)->event (item, event);
+ if (GNOME_CANVAS_ITEM_CLASS (etg_parent_class)->event)
+ return GNOME_CANVAS_ITEM_CLASS (etg_parent_class)->event (item, event);
}
return return_val;
@@ -673,7 +673,7 @@ etg_class_init (ETableGroupClass *klass)
klass->get_mouse_over = NULL;
klass->get_cell_geometry = NULL;
- etg_signals [CURSOR_CHANGE] =
+ etg_signals[CURSOR_CHANGE] =
g_signal_new ("cursor_change",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -682,7 +682,7 @@ etg_class_init (ETableGroupClass *klass)
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
- etg_signals [CURSOR_ACTIVATED] =
+ etg_signals[CURSOR_ACTIVATED] =
g_signal_new ("cursor_activated",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -691,7 +691,7 @@ etg_class_init (ETableGroupClass *klass)
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
- etg_signals [DOUBLE_CLICK] =
+ etg_signals[DOUBLE_CLICK] =
g_signal_new ("double_click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -701,7 +701,7 @@ etg_class_init (ETableGroupClass *klass)
G_TYPE_NONE, 3, G_TYPE_INT,
G_TYPE_INT, GDK_TYPE_EVENT);
- etg_signals [RIGHT_CLICK] =
+ etg_signals[RIGHT_CLICK] =
g_signal_new ("right_click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -711,7 +711,7 @@ etg_class_init (ETableGroupClass *klass)
G_TYPE_BOOLEAN, 3, G_TYPE_INT,
G_TYPE_INT, GDK_TYPE_EVENT);
- etg_signals [CLICK] =
+ etg_signals[CLICK] =
g_signal_new ("click",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -721,7 +721,7 @@ etg_class_init (ETableGroupClass *klass)
G_TYPE_BOOLEAN, 3, G_TYPE_INT,
G_TYPE_INT, GDK_TYPE_EVENT);
- etg_signals [KEY_PRESS] =
+ etg_signals[KEY_PRESS] =
g_signal_new ("key_press",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -731,7 +731,7 @@ etg_class_init (ETableGroupClass *klass)
G_TYPE_BOOLEAN, 3, G_TYPE_INT,
G_TYPE_INT, GDK_TYPE_EVENT);
- etg_signals [START_DRAG] =
+ etg_signals[START_DRAG] =
g_signal_new ("start_drag",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
diff --git a/widgets/table/e-table-group.h b/widgets/table/e-table-group.h
index 7ac1a243e8..79093416c6 100644
--- a/widgets/table/e-table-group.h
+++ b/widgets/table/e-table-group.h
@@ -123,7 +123,7 @@ void e_table_group_compute_location (ETableGroup *etg,
gint *y,
gint *row,
gint *col);
-void e_table_group_get_mouse_over(ETableGroup *etg,
+void e_table_group_get_mouse_over (ETableGroup *etg,
gint *row,
gint *col);
void e_table_group_get_cell_geometry (ETableGroup *etg,
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 5084e19ebc..14597c943b 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -61,7 +61,7 @@ enum {
LAST_SIGNAL
};
-static guint ethi_signals [LAST_SIGNAL] = { 0, };
+static guint ethi_signals[LAST_SIGNAL] = { 0, };
#define ARROW_DOWN_HEIGHT 16
#define ARROW_PTR 7
@@ -191,7 +191,7 @@ ethi_update (GnomeCanvasItem *item,
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
- gdouble i2c [6];
+ gdouble i2c[6];
ArtPoint c1, c2, i1, i2;
if (GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update)
@@ -247,7 +247,7 @@ ethi_font_set (ETableHeaderItem *ethi, PangoFontDescription *font_desc)
ethi->font_desc = pango_font_description_copy (font_desc);
ethi->height = e_table_header_item_get_height (ethi);
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(ethi));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (ethi));
}
static void
@@ -270,13 +270,13 @@ ethi_drop_table_header (ETableHeaderItem *ethi)
static void
structure_changed (ETableHeader *header, ETableHeaderItem *ethi)
{
- gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(ethi));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
}
static void
dimension_changed (ETableHeader *header, gint col, ETableHeaderItem *ethi)
{
- gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(ethi));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
}
static void
@@ -293,14 +293,14 @@ ethi_add_table_header (ETableHeaderItem *ethi, ETableHeader *header)
ethi->dimension_change_id = g_signal_connect (
header, "dimension_change",
G_CALLBACK (dimension_changed), ethi);
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(ethi));
- gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(ethi));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (ethi));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
}
static void
ethi_sort_info_changed (ETableSortInfo *sort_info, ETableHeaderItem *ethi)
{
- gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(ethi));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
}
static void
@@ -318,19 +318,19 @@ ethi_set_property (GObject *object,
switch (prop_id) {
case PROP_TABLE_HEADER:
ethi_drop_table_header (ethi);
- ethi_add_table_header (ethi, E_TABLE_HEADER(g_value_get_object (value)));
+ ethi_add_table_header (ethi, E_TABLE_HEADER (g_value_get_object (value)));
break;
case PROP_FULL_HEADER:
if (ethi->full_header)
- g_object_unref(ethi->full_header);
- ethi->full_header = E_TABLE_HEADER(g_value_get_object (value));
+ g_object_unref (ethi->full_header);
+ ethi->full_header = E_TABLE_HEADER (g_value_get_object (value));
if (ethi->full_header)
- g_object_ref(ethi->full_header);
+ g_object_ref (ethi->full_header);
break;
case PROP_DND_CODE:
- g_free(ethi->dnd_code);
+ g_free (ethi->dnd_code);
ethi->dnd_code = g_strdup (g_value_get_string (value));
break;
@@ -364,18 +364,18 @@ ethi_set_property (GObject *object,
break;
case PROP_TABLE:
if (g_value_get_object (value))
- ethi->table = E_TABLE(g_value_get_object (value));
+ ethi->table = E_TABLE (g_value_get_object (value));
else
ethi->table = NULL;
break;
case PROP_TREE:
if (g_value_get_object (value))
- ethi->tree = E_TREE(g_value_get_object (value));
+ ethi->tree = E_TREE (g_value_get_object (value));
else
ethi->tree = NULL;
break;
}
- gnome_canvas_item_request_update(item);
+ gnome_canvas_item_request_update (item);
}
static void
@@ -544,7 +544,7 @@ ethi_add_drop_marker (ETableHeaderItem *ethi, gint col, gboolean recreate)
#define gray50_width 2
#define gray50_height 2
-static gchar gray50_bits [] = {
+static gchar gray50_bits[] = {
0x02, 0x01, };
static void
@@ -688,7 +688,7 @@ scroll_timeout (gpointer data)
hadjustment_value = gtk_adjustment_get_value (adjustment);
if (hadjustment_value != value)
- do_drag_motion(
+ do_drag_motion (
ethi,
ethi->last_drop_context,
ethi->last_drop_x + hadjustment_value,
@@ -837,8 +837,8 @@ ethi_drag_data_received (GtkWidget *canvas,
data = gtk_selection_data_get_data (selection_data);
if (data != NULL) {
- count = e_table_header_count(ethi->eth);
- column = atoi((gchar *)data);
+ count = e_table_header_count (ethi->eth);
+ column = atoi ((gchar *)data);
drop_col = ethi->drop_col;
ethi->drop_col = -1;
@@ -846,13 +846,13 @@ ethi_drag_data_received (GtkWidget *canvas,
for (i = 0; i < count; i++) {
ETableCol *ecol = e_table_header_get_column (ethi->eth, i);
if (ecol->col_idx == column) {
- e_table_header_move(ethi->eth, i, drop_col);
+ e_table_header_move (ethi->eth, i, drop_col);
found = TRUE;
break;
}
}
if (!found) {
- count = e_table_header_count(ethi->full_header);
+ count = e_table_header_count (ethi->full_header);
for (i = 0; i < count; i++) {
ETableCol *ecol = e_table_header_get_column (ethi->full_header, i);
if (ecol->col_idx == column) {
@@ -864,7 +864,7 @@ ethi_drag_data_received (GtkWidget *canvas,
}
}
ethi_remove_drop_marker (ethi);
- gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(ethi));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
}
static void
@@ -879,12 +879,12 @@ ethi_drag_data_get (GtkWidget *canvas,
ETableCol *ecol = e_table_header_get_column (ethi->eth, ethi->drag_col);
gchar *string = g_strdup_printf("%d", ecol->col_idx);
- gtk_selection_data_set(selection_data,
+ gtk_selection_data_set (selection_data,
GDK_SELECTION_TYPE_STRING,
- sizeof(string[0]),
+ sizeof (string[0]),
(guchar *)string,
- strlen(string));
- g_free(string);
+ strlen (string));
+ g_free (string);
}
}
@@ -911,7 +911,7 @@ ethi_drag_drop (GtkWidget *canvas,
if (col != -1) {
gchar *target = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code);
d(g_print ("ethi - %s\n", target));
- gtk_drag_get_data (canvas, context, gdk_atom_intern(target, FALSE), time);
+ gtk_drag_get_data (canvas, context, gdk_atom_intern (target, FALSE), time);
g_free (target);
}
}
@@ -936,7 +936,7 @@ ethi_realize (GnomeCanvasItem *item)
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
GtkStyle *style;
- GtkTargetEntry ethi_drop_types [] = {
+ GtkTargetEntry ethi_drop_types[] = {
{ (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
@@ -1026,19 +1026,19 @@ ethi_draw (GnomeCanvasItem *item,
style = gtk_widget_get_style (GTK_WIDGET (canvas));
if (ethi->sort_info) {
- gint length = e_table_sort_info_grouping_get_count(ethi->sort_info);
+ gint length = e_table_sort_info_grouping_get_count (ethi->sort_info);
gint i;
for (i = 0; i < length; i++) {
- ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i);
+ ETableSortColumn column = e_table_sort_info_grouping_get_nth (ethi->sort_info, i);
g_hash_table_insert (arrows,
GINT_TO_POINTER ((gint) column.column),
GINT_TO_POINTER (column.ascending ?
E_TABLE_COL_ARROW_DOWN :
E_TABLE_COL_ARROW_UP));
}
- length = e_table_sort_info_sorting_get_count(ethi->sort_info);
+ length = e_table_sort_info_sorting_get_count (ethi->sort_info);
for (i = 0; i < length; i++) {
- ETableSortColumn column = e_table_sort_info_sorting_get_nth(ethi->sort_info, i);
+ ETableSortColumn column = e_table_sort_info_sorting_get_nth (ethi->sort_info, i);
g_hash_table_insert (arrows,
GINT_TO_POINTER ((gint) column.column),
GINT_TO_POINTER (column.ascending ?
@@ -1184,7 +1184,7 @@ ethi_end_resize (ETableHeaderItem *ethi)
ethi->resize_col = -1;
ethi->resize_guide = GINT_TO_POINTER (0);
- gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(ethi));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
}
static gboolean
@@ -1220,7 +1220,7 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
GtkStyle *style;
GdkWindow *window;
- GtkTargetEntry ethi_drag_types [] = {
+ GtkTargetEntry ethi_drag_types[] = {
{ (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
@@ -1235,11 +1235,11 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
return;
if (ethi->sort_info) {
- gint length = e_table_sort_info_grouping_get_count(ethi->sort_info);
+ gint length = e_table_sort_info_grouping_get_count (ethi->sort_info);
gint i;
for (i = 0; i < length; i++) {
ETableSortColumn column =
- e_table_sort_info_grouping_get_nth(
+ e_table_sort_info_grouping_get_nth (
ethi->sort_info, i);
group_indent++;
g_hash_table_insert (
@@ -1249,7 +1249,7 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
E_TABLE_COL_ARROW_DOWN :
E_TABLE_COL_ARROW_UP));
}
- length = e_table_sort_info_sorting_get_count(ethi->sort_info);
+ length = e_table_sort_info_sorting_get_count (ethi->sort_info);
for (i = 0; i < length; i++) {
ETableSortColumn column =
e_table_sort_info_sorting_get_nth (
@@ -1264,12 +1264,12 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
}
}
- ethi_drag_types[0].target = g_strdup_printf(
+ ethi_drag_types[0].target = g_strdup_printf (
"%s-%s", ethi_drag_types[0].target, ethi->dnd_code);
list = gtk_target_list_new (
ethi_drag_types, G_N_ELEMENTS (ethi_drag_types));
context = gtk_drag_begin (widget, list, GDK_ACTION_MOVE, 1, event);
- g_free(ethi_drag_types[0].target);
+ g_free (ethi_drag_types[0].target);
ecol = e_table_header_get_column (ethi->eth, ethi->drag_col);
col_width = ecol->width;
@@ -1304,7 +1304,7 @@ typedef struct {
} EthiHeaderInfo;
static void
-ethi_popup_sort_ascending(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_sort_ascending (GtkWidget *widget, EthiHeaderInfo *info)
{
ETableCol *col;
gint model_col = -1;
@@ -1317,7 +1317,7 @@ ethi_popup_sort_ascending(GtkWidget *widget, EthiHeaderInfo *info)
if (col->sortable)
model_col = col->col_idx;
- length = e_table_sort_info_grouping_get_count(ethi->sort_info);
+ length = e_table_sort_info_grouping_get_count (ethi->sort_info);
for (i = 0; i < length; i++) {
ETableSortColumn column = e_table_sort_info_grouping_get_nth (
ethi->sort_info, i);
@@ -1335,7 +1335,7 @@ ethi_popup_sort_ascending(GtkWidget *widget, EthiHeaderInfo *info)
ethi->sort_info);
for (i = 0; i < length; i++) {
ETableSortColumn column =
- e_table_sort_info_sorting_get_nth(
+ e_table_sort_info_sorting_get_nth (
ethi->sort_info, i);
if (model_col == column.column || model_col == -1) {
column.ascending = 1;
@@ -1351,15 +1351,15 @@ ethi_popup_sort_ascending(GtkWidget *widget, EthiHeaderInfo *info)
ETableSortColumn column;
column.column = model_col;
column.ascending = 1;
- length = e_table_sort_info_sorting_get_count(ethi->sort_info);
+ length = e_table_sort_info_sorting_get_count (ethi->sort_info);
if (length == 0)
length++;
- e_table_sort_info_sorting_set_nth(ethi->sort_info, length - 1, column);
+ e_table_sort_info_sorting_set_nth (ethi->sort_info, length - 1, column);
}
}
static void
-ethi_popup_sort_descending(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_sort_descending (GtkWidget *widget, EthiHeaderInfo *info)
{
ETableCol *col;
gint model_col=-1;
@@ -1372,13 +1372,13 @@ ethi_popup_sort_descending(GtkWidget *widget, EthiHeaderInfo *info)
if (col->sortable)
model_col = col->col_idx;
- length = e_table_sort_info_grouping_get_count(ethi->sort_info);
+ length = e_table_sort_info_grouping_get_count (ethi->sort_info);
for (i = 0; i < length; i++) {
- ETableSortColumn column = e_table_sort_info_grouping_get_nth(
+ ETableSortColumn column = e_table_sort_info_grouping_get_nth (
ethi->sort_info, i);
if (model_col == column.column) {
column.ascending = 0;
- e_table_sort_info_grouping_set_nth(
+ e_table_sort_info_grouping_set_nth (
ethi->sort_info, i, column);
found = 1;
break;
@@ -1388,7 +1388,7 @@ ethi_popup_sort_descending(GtkWidget *widget, EthiHeaderInfo *info)
length = e_table_sort_info_sorting_get_count (ethi->sort_info);
for (i = 0; i < length; i++) {
ETableSortColumn column =
- e_table_sort_info_sorting_get_nth(
+ e_table_sort_info_sorting_get_nth (
ethi->sort_info, i);
if (model_col == column.column || model_col == -1) {
@@ -1414,16 +1414,16 @@ ethi_popup_sort_descending(GtkWidget *widget, EthiHeaderInfo *info)
}
static void
-ethi_popup_unsort(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_unsort (GtkWidget *widget, EthiHeaderInfo *info)
{
ETableHeaderItem *ethi = info->ethi;
- e_table_sort_info_grouping_truncate(ethi->sort_info, 0);
- e_table_sort_info_sorting_truncate(ethi->sort_info, 0);
+ e_table_sort_info_grouping_truncate (ethi->sort_info, 0);
+ e_table_sort_info_sorting_truncate (ethi->sort_info, 0);
}
static void
-ethi_popup_group_field(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_group_field (GtkWidget *widget, EthiHeaderInfo *info)
{
ETableCol *col;
gint model_col;
@@ -1435,23 +1435,23 @@ ethi_popup_group_field(GtkWidget *widget, EthiHeaderInfo *info)
column.column = model_col;
column.ascending = 1;
- e_table_sort_info_grouping_set_nth(ethi->sort_info, 0, column);
- e_table_sort_info_grouping_truncate(ethi->sort_info, 1);
+ e_table_sort_info_grouping_set_nth (ethi->sort_info, 0, column);
+ e_table_sort_info_grouping_truncate (ethi->sort_info, 1);
}
static void
-ethi_popup_group_box(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_group_box (GtkWidget *widget, EthiHeaderInfo *info)
{
}
static void
-ethi_popup_remove_column(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_remove_column (GtkWidget *widget, EthiHeaderInfo *info)
{
- e_table_header_remove(info->ethi->eth, info->col);
+ e_table_header_remove (info->ethi->eth, info->col);
}
static void
-ethi_popup_field_chooser(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_field_chooser (GtkWidget *widget, EthiHeaderInfo *info)
{
GtkWidget *etfcd = info->ethi->etfcd.widget;
@@ -1476,12 +1476,12 @@ ethi_popup_field_chooser(GtkWidget *widget, EthiHeaderInfo *info)
}
static void
-ethi_popup_alignment(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_alignment (GtkWidget *widget, EthiHeaderInfo *info)
{
}
static void
-ethi_popup_best_fit(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_best_fit (GtkWidget *widget, EthiHeaderInfo *info)
{
ETableHeaderItem *ethi = info->ethi;
gint width;
@@ -1492,12 +1492,12 @@ ethi_popup_best_fit(GtkWidget *widget, EthiHeaderInfo *info)
/* Add 10 to stop it from "..."ing */
e_table_header_set_size (ethi->eth, info->col, width + 10);
- gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(ethi));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
}
static void
-ethi_popup_format_columns(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_format_columns (GtkWidget *widget, EthiHeaderInfo *info)
{
}
@@ -1524,7 +1524,7 @@ apply_changes (ETableConfig *config, ETableHeaderItem *ethi)
}
static void
-ethi_popup_customize_view(GtkWidget *widget, EthiHeaderInfo *info)
+ethi_popup_customize_view (GtkWidget *widget, EthiHeaderInfo *info)
{
ETableHeaderItem *ethi = info->ethi;
ETableState *state;
@@ -1534,10 +1534,10 @@ ethi_popup_customize_view(GtkWidget *widget, EthiHeaderInfo *info)
e_table_config_raise (E_TABLE_CONFIG (ethi->config));
else {
if (ethi->table) {
- state = e_table_get_state_object(ethi->table);
+ state = e_table_get_state_object (ethi->table);
spec = ethi->table->spec;
} else if (ethi->tree) {
- state = e_tree_get_state_object(ethi->tree);
+ state = e_tree_get_state_object (ethi->tree);
spec = e_tree_get_spec (ethi->tree);
} else
return;
@@ -1562,7 +1562,7 @@ free_popup_info (GtkWidget *w, EthiHeaderInfo *info)
/* Bit 1 is always disabled. */
/* Bit 2 is disabled if not "sortable". */
/* Bit 4 is disabled if we don't have a pointer to our table object. */
-static EPopupMenu ethi_context_menu [] = {
+static EPopupMenu ethi_context_menu[] = {
E_POPUP_ITEM (
N_("Sort _Ascending"),
G_CALLBACK (ethi_popup_sort_ascending), 2),
@@ -1618,7 +1618,7 @@ sort_by_id (GtkWidget *menu_item, ETableHeaderItem *ethi)
e_table_sort_info_sorting_get_count (ethi->sort_info) == 1) {
ETableSortColumn column;
- column = e_table_sort_info_sorting_get_nth(ethi->sort_info, 0);
+ column = e_table_sort_info_sorting_get_nth (ethi->sort_info, 0);
clearfirst = ecol->sortable && ecol->col_idx != column.column;
}
@@ -1631,7 +1631,7 @@ sort_by_id (GtkWidget *menu_item, ETableHeaderItem *ethi)
static void
popup_custom (GtkWidget *menu_item, EthiHeaderInfo *info)
{
- ethi_popup_customize_view(menu_item, info);
+ ethi_popup_customize_view (menu_item, info);
}
static void
@@ -1663,12 +1663,12 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), sub_menu);
gtk_menu_shell_prepend (GTK_MENU_SHELL (popup), menu_item);
- sort_count = e_table_sort_info_sorting_get_count(ethi->sort_info);
+ sort_count = e_table_sort_info_sorting_get_count (ethi->sort_info);
if (sort_count > 1 || sort_count < 1)
sort_col = -1; /* Custom sorting */
else {
- column = e_table_sort_info_sorting_get_nth(ethi->sort_info, 0);
+ column = e_table_sort_info_sorting_get_nth (ethi->sort_info, 0);
sort_col = column.column;
ascending = column.ascending;
}
@@ -1730,7 +1730,7 @@ static void
ethi_button_pressed (ETableHeaderItem *ethi, GdkEventButton *event)
{
g_signal_emit (ethi,
- ethi_signals [BUTTON_PRESSED], 0, event);
+ ethi_signals[BUTTON_PRESSED], 0, event);
}
void
@@ -1747,14 +1747,14 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
if (col->sortable)
model_col = col->col_idx;
- length = e_table_sort_info_grouping_get_count(ethi->sort_info);
+ length = e_table_sort_info_grouping_get_count (ethi->sort_info);
for (i = 0; i < length; i++) {
- ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i);
+ ETableSortColumn column = e_table_sort_info_grouping_get_nth (ethi->sort_info, i);
if (model_col == column.column || model_col == -1) {
gint ascending = column.ascending;
ascending = !ascending;
column.ascending = ascending;
- e_table_sort_info_grouping_set_nth(ethi->sort_info, i, column);
+ e_table_sort_info_grouping_set_nth (ethi->sort_info, i, column);
found = TRUE;
if (model_col != -1)
break;
@@ -1762,9 +1762,9 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
}
if (!found) {
- length = e_table_sort_info_sorting_get_count(ethi->sort_info);
+ length = e_table_sort_info_sorting_get_count (ethi->sort_info);
for (i = 0; i < length; i++) {
- ETableSortColumn column = e_table_sort_info_sorting_get_nth(ethi->sort_info, i);
+ ETableSortColumn column = e_table_sort_info_sorting_get_nth (ethi->sort_info, i);
if (model_col == column.column || model_col == -1) {
gint ascending = column.ascending;
@@ -1787,7 +1787,7 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
} else {
ascending = !ascending;
column.ascending = ascending;
- e_table_sort_info_sorting_set_nth(ethi->sort_info, i, column);
+ e_table_sort_info_sorting_set_nth (ethi->sort_info, i, column);
}
found = TRUE;
if (model_col != -1)
@@ -1801,7 +1801,7 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
column.column = model_col;
column.ascending = 1;
e_table_sort_info_sorting_truncate (ethi->sort_info, 0);
- e_table_sort_info_sorting_set_nth(ethi->sort_info, 0, column);
+ e_table_sort_info_sorting_set_nth (ethi->sort_info, 0, column);
}
}
@@ -1850,7 +1850,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
e_table_header_set_size (ethi->eth, ethi->resize_col, new_width);
- gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(ethi));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
} else if (ethi_maybe_start_drag (ethi, &e->motion)) {
ethi_start_drag (ethi, e);
} else
@@ -1910,7 +1910,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
/* Add 10 to stop it from "..."ing */
e_table_header_set_size (ethi->eth, ethi->resize_col, width + 10);
- gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(ethi));
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ethi));
ethi->maybe_drag = FALSE;
}
break;
@@ -1940,7 +1940,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
}
case GDK_KEY_PRESS:
if ((e->key.keyval == GDK_F10) && (e->key.state & GDK_SHIFT_MASK)) {
- EthiHeaderInfo *info = g_new(EthiHeaderInfo, 1);
+ EthiHeaderInfo *info = g_new (EthiHeaderInfo, 1);
ETableCol *ecol;
GtkMenu *popup;
@@ -2072,7 +2072,7 @@ ethi_class_init (ETableHeaderItemClass *klass)
NULL, dnd_colormap,
&add_col_mask, NULL, (gchar **) add_col_xpm);
- ethi_signals [BUTTON_PRESSED] =
+ ethi_signals[BUTTON_PRESSED] =
g_signal_new ("button_pressed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index f8080997be..fe542d76fc 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -347,7 +347,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
if (g_label == NULL) {
GtkWidget *button = gtk_button_new_with_label("Hi");
- GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_add (GTK_CONTAINER (window), button);
gtk_widget_ensure_style (window);
gtk_widget_ensure_style (button);
@@ -396,7 +396,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
inner_width -= arrow_width + HEADER_PADDING;
break;
default:
- g_return_if_reached();
+ g_return_if_reached ();
}
if (inner_width < 1)
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index 0ec180818e..1a3efafa85 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -52,7 +52,7 @@ enum {
static void eth_set_size (ETableHeader *eth, gint idx, gint size);
static void eth_calc_widths (ETableHeader *eth);
-static guint eth_signals [LAST_SIGNAL] = { 0, };
+static guint eth_signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE (ETableHeader, e_table_header, G_TYPE_OBJECT)
@@ -77,12 +77,12 @@ dequeue (ETableHeader *eth, gint *column, gint *width)
if (!eth->change_queue)
eth->change_tail = NULL;
store = head->data;
- g_slist_free_1(head);
+ g_slist_free_1 (head);
if (column)
*column = store->column;
if (width)
*width = store->width;
- g_free(store);
+ g_free (store);
}
static gboolean
@@ -112,16 +112,16 @@ static void
enqueue (ETableHeader *eth, gint column, gint width)
{
struct two_ints *store;
- store = g_new(struct two_ints, 1);
+ store = g_new (struct two_ints, 1);
store->column = column;
store->width = width;
- eth->change_tail = g_slist_last(g_slist_append(eth->change_tail, store));
+ eth->change_tail = g_slist_last (g_slist_append (eth->change_tail, store));
if (!eth->change_queue)
eth->change_queue = eth->change_tail;
if (!eth->idle) {
- eth->idle = g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc) dequeue_idle, eth, NULL);
+ eth->idle = g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc) dequeue_idle, eth, NULL);
}
}
@@ -138,9 +138,9 @@ static void
eth_do_remove (ETableHeader *eth, gint idx, gboolean do_unref)
{
if (do_unref)
- g_object_unref (eth->columns [idx]);
+ g_object_unref (eth->columns[idx]);
- memmove (&eth->columns [idx], &eth->columns [idx+1],
+ memmove (&eth->columns[idx], &eth->columns[idx+1],
sizeof (ETableCol *) * (eth->col_count - idx - 1));
eth->col_count--;
}
@@ -154,19 +154,19 @@ eth_finalize (GObject *object)
if (eth->sort_info) {
if (eth->sort_info_group_change_id)
- g_signal_handler_disconnect(G_OBJECT(eth->sort_info),
+ g_signal_handler_disconnect (G_OBJECT (eth->sort_info),
eth->sort_info_group_change_id);
- g_object_unref(eth->sort_info);
+ g_object_unref (eth->sort_info);
eth->sort_info = NULL;
}
if (eth->idle)
- g_source_remove(eth->idle);
+ g_source_remove (eth->idle);
eth->idle = 0;
if (eth->change_queue) {
- g_slist_foreach(eth->change_queue, (GFunc) g_free, NULL);
- g_slist_free(eth->change_queue);
+ g_slist_foreach (eth->change_queue, (GFunc) g_free, NULL);
+ g_slist_free (eth->change_queue);
eth->change_queue = NULL;
}
@@ -186,9 +186,9 @@ eth_finalize (GObject *object)
}
static void
-eth_group_info_changed(ETableSortInfo *info, ETableHeader *eth)
+eth_group_info_changed (ETableSortInfo *info, ETableHeader *eth)
{
- enqueue(eth, -1, eth->nominal_width);
+ enqueue (eth, -1, eth->nominal_width);
}
static void
@@ -199,28 +199,28 @@ eth_set_property (GObject *object, guint prop_id, const GValue *val, GParamSpec
switch (prop_id) {
case PROP_WIDTH:
eth->nominal_width = g_value_get_double (val);
- enqueue(eth, -1, eth->nominal_width);
+ enqueue (eth, -1, eth->nominal_width);
break;
case PROP_WIDTH_EXTRAS:
eth->width_extras = g_value_get_double (val);
- enqueue(eth, -1, eth->nominal_width);
+ enqueue (eth, -1, eth->nominal_width);
break;
case PROP_SORT_INFO:
if (eth->sort_info) {
if (eth->sort_info_group_change_id)
g_signal_handler_disconnect (
- G_OBJECT(eth->sort_info),
+ G_OBJECT (eth->sort_info),
eth->sort_info_group_change_id);
g_object_unref (eth->sort_info);
}
- eth->sort_info = E_TABLE_SORT_INFO(g_value_get_object (val));
+ eth->sort_info = E_TABLE_SORT_INFO (g_value_get_object (val));
if (eth->sort_info) {
- g_object_ref(eth->sort_info);
+ g_object_ref (eth->sort_info);
eth->sort_info_group_change_id
= g_signal_connect(G_OBJECT(eth->sort_info), "group_info_changed",
- G_CALLBACK(eth_group_info_changed), eth);
+ G_CALLBACK (eth_group_info_changed), eth);
}
- enqueue(eth, -1, eth->nominal_width);
+ enqueue (eth, -1, eth->nominal_width);
break;
default:
break;
@@ -234,7 +234,7 @@ eth_get_property (GObject *object, guint prop_id, GValue *val, GParamSpec *pspec
switch (prop_id) {
case PROP_SORT_INFO:
- g_value_set_object (val, G_OBJECT(eth->sort_info));
+ g_value_set_object (val, G_OBJECT (eth->sort_info));
break;
case PROP_WIDTH:
g_value_set_double (val, eth->nominal_width);
@@ -277,7 +277,7 @@ e_table_header_class_init (ETableHeaderClass *klass)
E_TABLE_SORT_INFO_TYPE,
G_PARAM_READWRITE));
- eth_signals [STRUCTURE_CHANGE] =
+ eth_signals[STRUCTURE_CHANGE] =
g_signal_new ("structure_change",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -285,7 +285,7 @@ e_table_header_class_init (ETableHeaderClass *klass)
(GSignalAccumulator) NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- eth_signals [DIMENSION_CHANGE] =
+ eth_signals[DIMENSION_CHANGE] =
g_signal_new ("dimension_change",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -293,7 +293,7 @@ e_table_header_class_init (ETableHeaderClass *klass)
(GSignalAccumulator) NULL, NULL,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
- eth_signals [EXPANSION_CHANGE] =
+ eth_signals[EXPANSION_CHANGE] =
g_signal_new ("expansion_change",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -301,7 +301,7 @@ e_table_header_class_init (ETableHeaderClass *klass)
(GSignalAccumulator) NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- eth_signals [REQUEST_WIDTH] =
+ eth_signals[REQUEST_WIDTH] =
g_signal_new ("request_width",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -352,7 +352,7 @@ eth_update_offsets (ETableHeader *eth)
gint x = 0;
for (i = 0; i < eth->col_count; i++) {
- ETableCol *etc = eth->columns [i];
+ ETableCol *etc = eth->columns[i];
etc->x = x;
x += etc->width;
@@ -362,9 +362,9 @@ eth_update_offsets (ETableHeader *eth)
static void
eth_do_insert (ETableHeader *eth, gint pos, ETableCol *val)
{
- memmove (&eth->columns [pos+1], &eth->columns [pos],
+ memmove (&eth->columns[pos+1], &eth->columns[pos],
sizeof (ETableCol *) * (eth->col_count - pos));
- eth->columns [pos] = val;
+ eth->columns[pos] = val;
eth->col_count++;
}
@@ -402,8 +402,8 @@ e_table_header_add_column (ETableHeader *eth, ETableCol *tc, gint pos)
eth_do_insert (eth, pos, tc);
- enqueue(eth, -1, eth->nominal_width);
- g_signal_emit (G_OBJECT (eth), eth_signals [STRUCTURE_CHANGE], 0);
+ enqueue (eth, -1, eth->nominal_width);
+ g_signal_emit (G_OBJECT (eth), eth_signals[STRUCTURE_CHANGE], 0);
}
/**
@@ -425,7 +425,7 @@ e_table_header_get_column (ETableHeader *eth, gint column)
if (column >= eth->col_count)
return NULL;
- return eth->columns [column];
+ return eth->columns[column];
}
/**
@@ -444,7 +444,7 @@ e_table_header_get_column_by_col_idx (ETableHeader *eth, gint col_idx)
for (i = 0; i < eth->col_count; i++) {
if (eth->columns[i]->col_idx == col_idx) {
- return eth->columns [i];
+ return eth->columns[i];
}
}
@@ -485,7 +485,7 @@ e_table_header_index (ETableHeader *eth, gint col)
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), -1);
g_return_val_if_fail (col >= 0 && col < eth->col_count, -1);
- return eth->columns [col]->col_idx;
+ return eth->columns[col]->col_idx;
}
/**
@@ -509,7 +509,7 @@ e_table_header_get_index_at (ETableHeader *eth, gint x_offset)
total = 0;
for (i = 0; i < eth->col_count; i++) {
- total += eth->columns [i]->width;
+ total += eth->columns[i]->width;
if (x_offset < total)
return i;
@@ -539,10 +539,10 @@ e_table_header_get_columns (ETableHeader *eth)
ret = g_new (ETableCol *, eth->col_count + 1);
memcpy (ret, eth->columns, sizeof (ETableCol *) * eth->col_count);
- ret [eth->col_count] = NULL;
+ ret[eth->col_count] = NULL;
for (i = 0; i < eth->col_count; i++) {
- g_object_ref(ret[i]);
+ g_object_ref (ret[i]);
}
return ret;
@@ -564,7 +564,7 @@ e_table_header_get_selected (ETableHeader *eth)
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
for (i = 0; i < eth->col_count; i++) {
- if (eth->columns [i]->selected)
+ if (eth->columns[i]->selected)
selected++;
}
@@ -588,7 +588,7 @@ e_table_header_total_width (ETableHeader *eth)
total = 0;
for (i = 0; i < eth->col_count; i++)
- total += eth->columns [i]->width;
+ total += eth->columns[i]->width;
return total;
}
@@ -609,7 +609,7 @@ e_table_header_min_width (ETableHeader *eth)
total = 0;
for (i = 0; i < eth->col_count; i++)
- total += eth->columns [i]->min_width;
+ total += eth->columns[i]->min_width;
return total;
}
@@ -641,13 +641,13 @@ e_table_header_move (ETableHeader *eth, gint source_index, gint target_index)
if (source_index < target_index)
target_index--;
- old = eth->columns [source_index];
+ old = eth->columns[source_index];
eth_do_remove (eth, source_index, FALSE);
eth_do_insert (eth, target_index, old);
eth_update_offsets (eth);
- g_signal_emit (G_OBJECT (eth), eth_signals [DIMENSION_CHANGE], 0, eth->width);
- g_signal_emit (G_OBJECT (eth), eth_signals [STRUCTURE_CHANGE], 0);
+ g_signal_emit (G_OBJECT (eth), eth_signals[DIMENSION_CHANGE], 0, eth->width);
+ g_signal_emit (G_OBJECT (eth), eth_signals[STRUCTURE_CHANGE], 0);
}
/**
@@ -667,8 +667,8 @@ e_table_header_remove (ETableHeader *eth, gint idx)
g_return_if_fail (idx < eth->col_count);
eth_do_remove (eth, idx, TRUE);
- enqueue(eth, -1, eth->nominal_width);
- g_signal_emit (G_OBJECT (eth), eth_signals [STRUCTURE_CHANGE], 0);
+ enqueue (eth, -1, eth->nominal_width);
+ g_signal_emit (G_OBJECT (eth), eth_signals[STRUCTURE_CHANGE], 0);
}
/*
@@ -714,7 +714,7 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
usable_width = eth->width - left_width - 1;
if (eth->sort_info)
- usable_width -= e_table_sort_info_grouping_get_count(eth->sort_info) * GROUP_INDENT;
+ usable_width -= e_table_sort_info_grouping_get_count (eth->sort_info) * GROUP_INDENT;
/* Calculate minimum_width of stuff on the right as well as
* total usable expansion on the right.
@@ -739,7 +739,7 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
eth->columns[i]->expansion = 0;
}
- g_signal_emit (G_OBJECT (eth), eth_signals [EXPANSION_CHANGE], 0);
+ g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
return;
}
@@ -749,7 +749,7 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
for (i = idx; i < eth->col_count; i++) {
eth->columns[i]->expansion = 0;
}
- g_signal_emit (G_OBJECT (eth), eth_signals [EXPANSION_CHANGE], 0);
+ g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
return;
}
@@ -766,7 +766,7 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
for (i = idx + 1; i < eth->col_count; i++) {
eth->columns[i]->expansion = 0;
}
- g_signal_emit (G_OBJECT (eth), eth_signals [EXPANSION_CHANGE], 0);
+ g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
return;
}
@@ -793,7 +793,7 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
eth->columns[i]->expansion = expansion / expandable_count;
}
}
- g_signal_emit (G_OBJECT (eth), eth_signals [EXPANSION_CHANGE], 0);
+ g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
return;
}
@@ -803,7 +803,7 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
eth->columns[i]->expansion *= expansion / old_expansion;
}
}
- g_signal_emit (G_OBJECT (eth), eth_signals [EXPANSION_CHANGE], 0);
+ g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
}
/**
@@ -834,7 +834,7 @@ e_table_header_col_diff (ETableHeader *eth, gint start_col, gint end_col)
total = 0;
for (col = start_col; col < end_col; col++) {
- total += eth->columns [col]->width;
+ total += eth->columns[col]->width;
}
return total;
@@ -865,7 +865,7 @@ eth_calc_widths (ETableHeader *eth)
widths[i] = eth->columns[i]->min_width + eth->width_extras;
}
if (eth->sort_info)
- extra -= e_table_sort_info_grouping_get_count(eth->sort_info) * GROUP_INDENT;
+ extra -= e_table_sort_info_grouping_get_count (eth->sort_info) * GROUP_INDENT;
if (expansion != 0 && extra > 0) {
for (i = 0; i < last_resizable; i++) {
next_position +=
@@ -887,7 +887,7 @@ eth_calc_widths (ETableHeader *eth)
}
g_free (widths);
if (changed)
- g_signal_emit (G_OBJECT (eth), eth_signals [DIMENSION_CHANGE], 0, eth->width);
+ g_signal_emit (G_OBJECT (eth), eth_signals[DIMENSION_CHANGE], 0, eth->width);
eth_update_offsets (eth);
}
@@ -908,8 +908,8 @@ e_table_header_update_horizontal (ETableHeader *eth)
eth->columns[i]->min_width = width + 10;
eth->columns[i]->expansion = 1;
}
- enqueue(eth, -1, eth->nominal_width);
- g_signal_emit (G_OBJECT (eth), eth_signals [EXPANSION_CHANGE], 0);
+ enqueue (eth, -1, eth->nominal_width);
+ g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
}
gint
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 9bf410a200..48c51d8f75 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -83,7 +83,7 @@ enum {
LAST_SIGNAL
};
-static guint eti_signals [LAST_SIGNAL] = { 0, };
+static guint eti_signals[LAST_SIGNAL] = { 0, };
enum {
PROP_0,
@@ -121,13 +121,13 @@ static void e_table_item_redraw_row (ETableItem *eti, gint row);
#define ETI_ROW_HEIGHT(eti,row) ((eti)->uniform_row_height ? ETI_SINGLE_ROW_HEIGHT ((eti)) : ETI_MULTIPLE_ROW_HEIGHT((eti),(row)))
inline static gint
-model_to_view_row(ETableItem *eti, gint row)
+model_to_view_row (ETableItem *eti, gint row)
{
gint i;
if (row == -1)
return -1;
if (eti->uses_source_model) {
- ETableSubset *etss = E_TABLE_SUBSET(eti->table_model);
+ ETableSubset *etss = E_TABLE_SUBSET (eti->table_model);
if (eti->row_guess >= 0 && eti->row_guess < etss->n_map) {
if (etss->map_table[eti->row_guess] == row) {
return eti->row_guess;
@@ -143,10 +143,10 @@ model_to_view_row(ETableItem *eti, gint row)
}
inline static gint
-view_to_model_row(ETableItem *eti, gint row)
+view_to_model_row (ETableItem *eti, gint row)
{
if (eti->uses_source_model) {
- ETableSubset *etss = E_TABLE_SUBSET(eti->table_model);
+ ETableSubset *etss = E_TABLE_SUBSET (eti->table_model);
if (row >= 0 && row < etss->n_map) {
eti->row_guess = row;
return etss->map_table[row];
@@ -157,7 +157,7 @@ view_to_model_row(ETableItem *eti, gint row)
}
inline static gint
-model_to_view_col(ETableItem *eti, gint col)
+model_to_view_col (ETableItem *eti, gint col)
{
gint i;
if (col == -1)
@@ -171,7 +171,7 @@ model_to_view_col(ETableItem *eti, gint col)
}
inline static gint
-view_to_model_col(ETableItem *eti, gint col)
+view_to_model_col (ETableItem *eti, gint col)
{
ETableCol *ecol = e_table_header_get_column (eti->header, col);
return ecol ? ecol->col_idx : -1;
@@ -193,7 +193,7 @@ eti_grab (ETableItem *eti, guint32 time)
if (eti->grabbed_count == 0) {
eti->gtk_grabbed = FALSE;
eti->grab_cancelled = FALSE;
- if (e_canvas_item_grab(E_CANVAS (item->canvas),
+ if (e_canvas_item_grab (E_CANVAS (item->canvas),
item,
GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK
| GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK,
@@ -223,7 +223,7 @@ eti_ungrab (ETableItem *eti, guint32 time)
gtk_grab_remove (GTK_WIDGET (item->canvas));
eti->gtk_grabbed = FALSE;
}
- gnome_canvas_item_ungrab(item, time);
+ gnome_canvas_item_ungrab (item, time);
eti->grabbed_col = -1;
eti->grabbed_row = -1;
}
@@ -244,7 +244,7 @@ eti_editing (ETableItem *eti)
inline static GdkColor *
eti_get_cell_background_color (ETableItem *eti, gint row, gint col, gboolean selected, gboolean *allocatedp)
{
- ECellView *ecell_view = eti->cell_views [col];
+ ECellView *ecell_view = eti->cell_views[col];
GtkWidget *canvas;
GdkColor *background, bg;
GtkStyle *style;
@@ -256,11 +256,11 @@ eti_get_cell_background_color (ETableItem *eti, gint row, gint col, gboolean sel
if (selected) {
if (gtk_widget_has_focus (canvas))
- background = &style->bg [GTK_STATE_SELECTED];
+ background = &style->bg[GTK_STATE_SELECTED];
else
- background = &style->bg [GTK_STATE_ACTIVE];
+ background = &style->bg[GTK_STATE_ACTIVE];
} else {
- background = &style->base [GTK_STATE_NORMAL];
+ background = &style->base[GTK_STATE_NORMAL];
}
color_spec = e_cell_get_bg_color (ecell_view, row);
@@ -308,11 +308,11 @@ eti_get_cell_foreground_color (ETableItem *eti, gint row, gint col, gboolean sel
if (selected) {
if (gtk_widget_has_focus (canvas))
- foreground = &style->fg [GTK_STATE_SELECTED];
+ foreground = &style->fg[GTK_STATE_SELECTED];
else
- foreground = &style->fg [GTK_STATE_ACTIVE];
+ foreground = &style->fg[GTK_STATE_ACTIVE];
} else {
- foreground = &style->text [GTK_STATE_NORMAL];
+ foreground = &style->text[GTK_STATE_NORMAL];
}
return foreground;
@@ -325,7 +325,7 @@ eti_free_save_state (ETableItem *eti)
!eti->cell_views_realized)
return;
- e_cell_free_state (eti->cell_views [eti->save_col], view_to_model_col(eti, eti->save_col),
+ e_cell_free_state (eti->cell_views[eti->save_col], view_to_model_col (eti, eti->save_col),
eti->save_col, eti->save_row, eti->save_state);
eti->save_row = -1;
eti->save_col = -1;
@@ -355,7 +355,7 @@ eti_realize_cell_views ( ETableItem *eti)
return;
for (i = 0; i < eti->n_cells; i++)
- e_cell_realize (eti->cell_views [i]);
+ e_cell_realize (eti->cell_views[i]);
eti->cell_views_realized = 1;
}
@@ -384,7 +384,7 @@ eti_attach_cell_views (ETableItem *eti)
for (i = 0; i < eti->n_cells; i++) {
ETableCol *ecol = e_table_header_get_column (eti->header, i);
- eti->cell_views [i] = e_cell_new_view (ecol->ecell, eti->table_model, eti);
+ eti->cell_views[i] = e_cell_new_view (ecol->ecell, eti->table_model, eti);
}
eti->needs_compute_height = 1;
@@ -408,7 +408,7 @@ eti_unrealize_cell_views (ETableItem *eti)
eti_free_save_state (eti);
for (i = 0; i < eti->n_cells; i++)
- e_cell_unrealize (eti->cell_views [i]);
+ e_cell_unrealize (eti->cell_views[i]);
eti->cell_views_realized = 0;
}
@@ -420,8 +420,8 @@ eti_detach_cell_views (ETableItem *eti)
eti_free_save_state (eti);
for (i = 0; i < eti->n_cells; i++) {
- e_cell_kill_view (eti->cell_views [i]);
- eti->cell_views [i] = NULL;
+ e_cell_kill_view (eti->cell_views[i]);
+ eti->cell_views[i] = NULL;
}
g_free (eti->cell_views);
@@ -432,7 +432,7 @@ eti_detach_cell_views (ETableItem *eti)
static void
eti_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2)
{
- gdouble i2c [6];
+ gdouble i2c[6];
ArtPoint c1, c2, i1, i2;
ETableItem *eti = E_TABLE_ITEM (item);
@@ -470,7 +470,7 @@ eti_reflow (GnomeCanvasItem *item, gint flags)
eti->needs_compute_height = 0;
}
if (eti->needs_compute_width) {
- gint new_width = e_table_header_total_width(eti->header);
+ gint new_width = e_table_header_total_width (eti->header);
if (new_width != eti->width) {
eti->width = new_width;
e_canvas_item_request_parent_reflow (GNOME_CANVAS_ITEM (eti));
@@ -630,7 +630,7 @@ eti_row_height_real (ETableItem *eti, gint row)
max_h = 0;
for (col = 0; col < cols; col++) {
- h = e_cell_height (eti->cell_views [col], view_to_model_col(eti, col), col, row);
+ h = e_cell_height (eti->cell_views[col], view_to_model_col (eti, col), col, row);
if (h > max_h)
max_h = h;
@@ -645,21 +645,21 @@ confirm_height_cache (ETableItem *eti)
if (eti->uniform_row_height || eti->height_cache)
return;
- eti->height_cache = g_new(int, eti->rows);
+ eti->height_cache = g_new (int, eti->rows);
for (i = 0; i < eti->rows; i++) {
eti->height_cache[i] = -1;
}
}
static gboolean
-height_cache_idle(ETableItem *eti)
+height_cache_idle (ETableItem *eti)
{
gint changed = 0;
gint i;
- confirm_height_cache(eti);
+ confirm_height_cache (eti);
for (i = eti->height_cache_idle_count; i < eti->rows; i++) {
if (eti->height_cache[i] == -1) {
- eti_row_height(eti, i);
+ eti_row_height (eti, i);
changed++;
if (changed >= 20)
break;
@@ -688,20 +688,20 @@ free_height_cache (ETableItem *eti)
eti->uniform_row_height_cache = -1;
if (eti->uniform_row_height && eti->height_cache_idle_id != 0) {
- g_source_remove(eti->height_cache_idle_id);
+ g_source_remove (eti->height_cache_idle_id);
eti->height_cache_idle_id = 0;
}
if ((!eti->uniform_row_height) && eti->height_cache_idle_id == 0)
- eti->height_cache_idle_id = g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc) height_cache_idle, eti, NULL);
+ eti->height_cache_idle_id = g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc) height_cache_idle, eti, NULL);
}
}
static void
calculate_height_cache (ETableItem *eti)
{
- free_height_cache(eti);
- confirm_height_cache(eti);
+ free_height_cache (eti);
+ confirm_height_cache (eti);
}
/*
@@ -721,13 +721,13 @@ eti_row_height (ETableItem *eti, gint row)
calculate_height_cache (eti);
}
if (eti->height_cache[row] == -1) {
- eti->height_cache[row] = eti_row_height_real(eti, row);
+ eti->height_cache[row] = eti_row_height_real (eti, row);
if (row > 0 &&
eti->length_threshold != -1 &&
eti->rows > eti->length_threshold &&
- eti->height_cache[row] != eti_row_height(eti, 0)) {
+ eti->height_cache[row] != eti_row_height (eti, 0)) {
eti->needs_compute_height = 1;
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(eti));
+ e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti));
}
}
return eti->height_cache[row];
@@ -756,14 +756,14 @@ eti_get_height (ETableItem *eti)
return 0;
if (eti->uniform_row_height) {
- gint row_height = ETI_ROW_HEIGHT(eti, -1);
+ gint row_height = ETI_ROW_HEIGHT (eti, -1);
return ((row_height + height_extra) * rows + height_extra);
} else {
gint height;
gint row;
if (eti->length_threshold != -1) {
if (rows > eti->length_threshold) {
- gint row_height = ETI_ROW_HEIGHT(eti, 0);
+ gint row_height = ETI_ROW_HEIGHT (eti, 0);
if (eti->height_cache) {
height = 0;
for (row = 0; row < rows; row++) {
@@ -797,7 +797,7 @@ eti_item_region_redraw (ETableItem *eti, gint x0, gint y0, gint x1, gint y1)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
ArtDRect rect;
- gdouble i2c [6];
+ gdouble i2c[6];
rect.x0 = x0;
rect.y0 = y0;
@@ -824,7 +824,7 @@ e_table_item_row_diff (ETableItem *eti, gint start_row, gint end_row)
end_row = eti->rows;
if (eti->uniform_row_height) {
- return ((end_row - start_row) * (ETI_ROW_HEIGHT(eti, -1) + height_extra));
+ return ((end_row - start_row) * (ETI_ROW_HEIGHT (eti, -1) + height_extra));
} else {
gint row, total;
total = 0;
@@ -908,9 +908,9 @@ eti_request_region_show (ETableItem *eti,
&x1, &y1, &x2, &y2);
if (delay)
- e_canvas_item_show_area_delayed(GNOME_CANVAS_ITEM(eti), x1, y1, x2, y2, delay);
+ e_canvas_item_show_area_delayed (GNOME_CANVAS_ITEM (eti), x1, y1, x2, y2, delay);
else
- e_canvas_item_show_area(GNOME_CANVAS_ITEM(eti), x1, y1, x2, y2);
+ e_canvas_item_show_area (GNOME_CANVAS_ITEM (eti), x1, y1, x2, y2);
}
static void
@@ -930,7 +930,7 @@ eti_show_cursor (ETableItem *eti, gint delay)
}
#if 0
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &cursor_row,
NULL);
#else
@@ -963,7 +963,7 @@ eti_check_cursor_bounds (ETableItem *eti)
return;
}
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &cursor_row,
NULL);
@@ -989,13 +989,13 @@ eti_check_cursor_bounds (ETableItem *eti)
eti->cursor_y1 = y1;
eti->cursor_x2 = x2;
eti->cursor_y2 = y2;
- eti->cursor_on_screen = e_canvas_item_area_shown (GNOME_CANVAS_ITEM(eti), x1, y1, x2, y2);
+ eti->cursor_on_screen = e_canvas_item_area_shown (GNOME_CANVAS_ITEM (eti), x1, y1, x2, y2);
d(g_print ("%s: cursor on screen: %s\n", __FUNCTION__, eti->cursor_on_screen ? "TRUE" : "FALSE"));
}
static void
-eti_maybe_show_cursor(ETableItem *eti, gint delay)
+eti_maybe_show_cursor (ETableItem *eti, gint delay)
{
d(g_print ("%s: cursor on screen: %s\n", __FUNCTION__, eti->cursor_on_screen ? "TRUE" : "FALSE"));
if (eti->cursor_on_screen)
@@ -1019,7 +1019,7 @@ eti_idle_show_cursor_cb (gpointer data)
}
static void
-eti_idle_maybe_show_cursor(ETableItem *eti)
+eti_idle_maybe_show_cursor (ETableItem *eti)
{
d(g_print ("%s: cursor on screen: %s\n", __FUNCTION__, eti->cursor_on_screen ? "TRUE" : "FALSE"));
if (eti->cursor_on_screen) {
@@ -1035,7 +1035,7 @@ eti_cancel_drag_due_to_model_change (ETableItem *eti)
if (eti->maybe_in_drag) {
eti->maybe_in_drag = FALSE;
if (!eti->maybe_did_something)
- e_selection_model_do_something(E_SELECTION_MODEL (eti->selection), eti->drag_row, eti->drag_col, eti->drag_state);
+ e_selection_model_do_something (E_SELECTION_MODEL (eti->selection), eti->drag_row, eti->drag_col, eti->drag_state);
}
if (eti->in_drag) {
eti->in_drag = FALSE;
@@ -1104,7 +1104,7 @@ eti_table_model_changed (ETableModel *table_model, ETableItem *eti)
eti->rows = e_table_model_row_count (eti->table_model);
- free_height_cache(eti);
+ free_height_cache (eti);
eti_unfreeze (eti);
@@ -1113,7 +1113,7 @@ eti_table_model_changed (ETableModel *table_model, ETableItem *eti)
eti->needs_redraw = 1;
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (eti));
- eti_idle_maybe_show_cursor(eti);
+ eti_idle_maybe_show_cursor (eti);
}
static void
@@ -1126,7 +1126,7 @@ eti_table_model_row_changed (ETableModel *table_model, gint row, ETableItem *eti
return;
}
- if ((!eti->uniform_row_height) && eti->height_cache && eti->height_cache[row] != -1 && eti_row_height_real(eti, row) != eti->height_cache[row]) {
+ if ((!eti->uniform_row_height) && eti->height_cache && eti->height_cache[row] != -1 && eti_row_height_real (eti, row) != eti->height_cache[row]) {
eti_table_model_changed (table_model, eti);
return;
}
@@ -1146,7 +1146,7 @@ eti_table_model_cell_changed (ETableModel *table_model, gint col, gint row, ETab
return;
}
- if ((!eti->uniform_row_height) && eti->height_cache && eti->height_cache[row] != -1 && eti_row_height_real(eti, row) != eti->height_cache[row]) {
+ if ((!eti->uniform_row_height) && eti->height_cache && eti->height_cache[row] != -1 && eti_row_height_real (eti, row) != eti->height_cache[row]) {
eti_table_model_changed (table_model, eti);
return;
}
@@ -1169,15 +1169,15 @@ eti_table_model_rows_inserted (ETableModel *table_model, gint row, gint count, E
if (eti->height_cache) {
gint i;
- eti->height_cache = g_renew(int, eti->height_cache, eti->rows);
- memmove(eti->height_cache + row + count, eti->height_cache + row, (eti->rows - count - row) * sizeof(gint));
+ eti->height_cache = g_renew (int, eti->height_cache, eti->rows);
+ memmove (eti->height_cache + row + count, eti->height_cache + row, (eti->rows - count - row) * sizeof (gint));
for (i = row; i < row + count; i++)
eti->height_cache[i] = -1;
}
eti_unfreeze (eti);
- eti_idle_maybe_show_cursor(eti);
+ eti_idle_maybe_show_cursor (eti);
eti->needs_compute_height = 1;
e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti));
@@ -1198,12 +1198,12 @@ eti_table_model_rows_deleted (ETableModel *table_model, gint row, gint count, ET
eti->rows = e_table_model_row_count (eti->table_model);
if (eti->height_cache && (eti->rows > row)) {
- memmove(eti->height_cache + row, eti->height_cache + row + count, (eti->rows - row) * sizeof(gint));
+ memmove (eti->height_cache + row, eti->height_cache + row + count, (eti->rows - row) * sizeof (gint));
}
eti_unfreeze (eti);
- eti_idle_maybe_show_cursor(eti);
+ eti_idle_maybe_show_cursor (eti);
eti->needs_compute_height = 1;
e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti));
@@ -1233,20 +1233,20 @@ e_table_item_redraw_range (ETableItem *eti,
g_return_if_fail (eti != NULL);
g_return_if_fail (E_IS_TABLE_ITEM (eti));
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_col", &cursor_col,
"cursor_row", &cursor_row,
NULL);
if ((start_col == cursor_col) ||
(end_col == cursor_col) ||
- (view_to_model_row(eti, start_row) == cursor_row) ||
- (view_to_model_row(eti, end_row) == cursor_row))
+ (view_to_model_row (eti, start_row) == cursor_row) ||
+ (view_to_model_row (eti, end_row) == cursor_row))
border = 2;
else
border = 0;
- eti_request_region_redraw(eti, start_col, start_row, end_col, end_row, border);
+ eti_request_region_redraw (eti, start_col, start_row, end_col, end_row, border);
}
static void
@@ -1298,11 +1298,11 @@ eti_add_table_model (ETableItem *eti, ETableModel *table_model)
eti_attach_cell_views (eti);
}
- if (E_IS_TABLE_SUBSET(table_model)) {
+ if (E_IS_TABLE_SUBSET (table_model)) {
eti->uses_source_model = 1;
- eti->source_model = E_TABLE_SUBSET(table_model)->source;
+ eti->source_model = E_TABLE_SUBSET (table_model)->source;
if (eti->source_model)
- g_object_ref(eti->source_model);
+ g_object_ref (eti->source_model);
}
eti_freeze (eti);
@@ -1334,8 +1334,8 @@ eti_add_selection_model (ETableItem *eti, ESelectionModel *selection)
selection, "cursor_activated",
G_CALLBACK (eti_cursor_activated), eti);
- eti_selection_change(selection, eti);
- g_signal_emit_by_name (G_OBJECT(eti),
+ eti_selection_change (selection, eti);
+ g_signal_emit_by_name (G_OBJECT (eti),
"selection_model_added", eti->selection);
}
@@ -1381,7 +1381,7 @@ eti_request_column_width (ETableHeader *eth, gint col, ETableItem *eti)
gint width = 0;
if (eti->cell_views && eti->cell_views_realized) {
- width = e_cell_max_width (eti->cell_views[col], view_to_model_col(eti, col), col);
+ width = e_cell_max_width (eti->cell_views[col], view_to_model_col (eti, col), col);
}
return width;
@@ -1423,13 +1423,13 @@ eti_dispose (GObject *object)
eti_remove_selection_model (eti);
if (eti->height_cache_idle_id) {
- g_source_remove(eti->height_cache_idle_id);
+ g_source_remove (eti->height_cache_idle_id);
eti->height_cache_idle_id = 0;
}
eti->height_cache_idle_count = 0;
if (eti->cursor_idle_id) {
- g_source_remove(eti->cursor_idle_id);
+ g_source_remove (eti->cursor_idle_id);
eti->cursor_idle_id = 0;
}
@@ -1451,20 +1451,20 @@ eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe
switch (prop_id) {
case PROP_TABLE_HEADER:
eti_remove_header_model (eti);
- eti_add_header_model (eti, E_TABLE_HEADER(g_value_get_object (value)));
+ eti_add_header_model (eti, E_TABLE_HEADER (g_value_get_object (value)));
break;
case PROP_TABLE_MODEL:
eti_remove_table_model (eti);
- eti_add_table_model (eti, E_TABLE_MODEL(g_value_get_object (value)));
+ eti_add_table_model (eti, E_TABLE_MODEL (g_value_get_object (value)));
break;
case PROP_SELECTION_MODEL:
- g_signal_emit_by_name (G_OBJECT(eti),
+ g_signal_emit_by_name (G_OBJECT (eti),
"selection_model_removed", eti->selection);
eti_remove_selection_model (eti);
if (g_value_get_object (value))
- eti_add_selection_model (eti, E_SELECTION_MODEL(g_value_get_object(value)));
+ eti_add_selection_model (eti, E_SELECTION_MODEL (g_value_get_object (value)));
break;
case PROP_LENGTH_THRESHOLD:
@@ -1493,25 +1493,25 @@ eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe
case PROP_MINIMUM_WIDTH:
case PROP_WIDTH:
- if ((eti->minimum_width == eti->width && g_value_get_double(value) > eti->width) ||
- g_value_get_double(value) < eti->width) {
+ if ((eti->minimum_width == eti->width && g_value_get_double (value) > eti->width) ||
+ g_value_get_double (value) < eti->width) {
eti->needs_compute_width = 1;
e_canvas_item_request_reflow (item);
}
eti->minimum_width = g_value_get_double (value);
break;
case PROP_CURSOR_ROW:
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_col", &cursor_col,
NULL);
- e_table_item_focus (eti, cursor_col != -1 ? cursor_col : 0, view_to_model_row(eti, g_value_get_int (value)), 0);
+ e_table_item_focus (eti, cursor_col != -1 ? cursor_col : 0, view_to_model_row (eti, g_value_get_int (value)), 0);
break;
case PROP_UNIFORM_ROW_HEIGHT:
if (eti->uniform_row_height != g_value_get_boolean (value)) {
eti->uniform_row_height = g_value_get_boolean (value);
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
- free_height_cache(eti);
+ free_height_cache (eti);
eti->needs_compute_height = 1;
e_canvas_item_request_reflow (item);
eti->needs_redraw = 1;
@@ -1543,10 +1543,10 @@ eti_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *psp
g_value_set_double (value, eti->minimum_width);
break;
case PROP_CURSOR_ROW:
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &row,
NULL);
- g_value_set_int (value, model_to_view_row(eti, row));
+ g_value_set_int (value, model_to_view_row (eti, row));
break;
case PROP_UNIFORM_ROW_HEIGHT:
g_value_set_boolean (value, eti->uniform_row_height);
@@ -1665,10 +1665,10 @@ eti_realize (GnomeCanvasItem *item)
eti->fill_gc = gdk_gc_new (window);
eti->grid_gc = gdk_gc_new (window);
- gdk_gc_set_foreground (eti->grid_gc, &style->dark [GTK_STATE_NORMAL]);
+ gdk_gc_set_foreground (eti->grid_gc, &style->dark[GTK_STATE_NORMAL]);
eti->focus_gc = gdk_gc_new (window);
- gdk_gc_set_foreground (eti->focus_gc, &style->bg [GTK_STATE_NORMAL]);
- gdk_gc_set_background (eti->focus_gc, &style->fg [GTK_STATE_NORMAL]);
+ gdk_gc_set_foreground (eti->focus_gc, &style->bg[GTK_STATE_NORMAL]);
+ gdk_gc_set_background (eti->focus_gc, &style->fg[GTK_STATE_NORMAL]);
eti->stipple = gdk_bitmap_create_from_data (NULL, gray50_bits, gray50_width, gray50_height);
gdk_gc_set_ts_origin (eti->focus_gc, 0, 0);
gdk_gc_set_stipple (eti->focus_gc, eti->stipple);
@@ -1681,13 +1681,13 @@ eti_realize (GnomeCanvasItem *item)
eti_realize_cell_views (eti);
- free_height_cache(eti);
+ free_height_cache (eti);
if (item->canvas->focused_item == NULL && eti->selection) {
gint row;
row = e_selection_model_cursor_row (E_SELECTION_MODEL (eti->selection));
- row = model_to_view_row(eti, row);
+ row = model_to_view_row (eti, row);
if (row != -1) {
e_canvas_item_grab_focus (item, FALSE);
eti_show_cursor (eti, 0);
@@ -1716,7 +1716,7 @@ eti_unrealize (GnomeCanvasItem *item)
e_table_item_leave_edit_(eti);
if (eti->height_cache_idle_id) {
- g_source_remove(eti->height_cache_idle_id);
+ g_source_remove (eti->height_cache_idle_id);
eti->height_cache_idle_id = 0;
}
@@ -1754,9 +1754,9 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
gint x1, x2;
gint f_x1, f_x2, f_y1, f_y2;
gboolean f_found;
- gdouble i2c [6];
+ gdouble i2c[6];
ArtPoint eti_base, eti_base_item, lower_right;
- GtkWidget *canvas = GTK_WIDGET(item->canvas);
+ GtkWidget *canvas = GTK_WIDGET (item->canvas);
gint height_extra = eti->horizontal_draw_grid ? 1 : 0;
cairo_t *cr;
@@ -1870,16 +1870,16 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
xd = x_offset;
- selected = e_selection_model_is_row_selected(E_SELECTION_MODEL (eti->selection), view_to_model_row(eti,row));
+ selected = e_selection_model_is_row_selected (E_SELECTION_MODEL (eti->selection), view_to_model_row (eti,row));
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_col", &cursor_col,
"cursor_row", &cursor_row,
NULL);
for (col = first_col; col < last_col; col++) {
ETableCol *ecol = e_table_header_get_column (eti->header, col);
- ECellView *ecell_view = eti->cell_views [col];
+ ECellView *ecell_view = eti->cell_views[col];
gboolean col_selected = selected;
gboolean cursor = FALSE;
ECellFlags flags;
@@ -1891,7 +1891,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
switch (eti->cursor_mode) {
case E_CURSOR_SIMPLE:
case E_CURSOR_SPREADSHEET:
- if (cursor_col == ecol->col_idx && cursor_row == view_to_model_row(eti, row)) {
+ if (cursor_col == ecol->col_idx && cursor_row == view_to_model_row (eti, row)) {
col_selected = !col_selected;
cursor = TRUE;
}
@@ -1975,7 +1975,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
if (!f_found && !selected) {
switch (eti->cursor_mode) {
case E_CURSOR_LINE:
- if (view_to_model_row(eti, row) == cursor_row) {
+ if (view_to_model_row (eti, row) == cursor_row) {
f_x1 = floor (eti_base.x) - x;
f_x2 = floor (lower_right.x) - x;
f_y1 = yd+1;
@@ -1985,7 +1985,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
break;
case E_CURSOR_SIMPLE:
case E_CURSOR_SPREADSHEET:
- if (view_to_model_col(eti, col) == cursor_col && view_to_model_row(eti, row) == cursor_row) {
+ if (view_to_model_col (eti, col) == cursor_col && view_to_model_row (eti, row) == cursor_row) {
f_x1 = xd;
f_x2 = xd + ecol->width;
f_y1 = yd;
@@ -2122,31 +2122,31 @@ static void
eti_cursor_move (ETableItem *eti, gint row, gint column)
{
e_table_item_leave_edit_(eti);
- e_table_item_focus (eti, view_to_model_col(eti, column), view_to_model_row(eti, row), 0);
+ e_table_item_focus (eti, view_to_model_col (eti, column), view_to_model_row (eti, row), 0);
}
static void
eti_cursor_move_left (ETableItem *eti)
{
gint cursor_col, cursor_row;
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_col", &cursor_col,
"cursor_row", &cursor_row,
NULL);
- eti_cursor_move (eti, model_to_view_row(eti, cursor_row), model_to_view_col(eti, cursor_col) - 1);
+ eti_cursor_move (eti, model_to_view_row (eti, cursor_row), model_to_view_col (eti, cursor_col) - 1);
}
static void
eti_cursor_move_right (ETableItem *eti)
{
gint cursor_col, cursor_row;
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_col", &cursor_col,
"cursor_row", &cursor_row,
NULL);
- eti_cursor_move (eti, model_to_view_row(eti, cursor_row), model_to_view_col(eti, cursor_col) + 1);
+ eti_cursor_move (eti, model_to_view_row (eti, cursor_row), model_to_view_col (eti, cursor_col) + 1);
}
static gint
@@ -2203,7 +2203,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
switch (e->button.button) {
case 1: /* Fall through. */
case 2:
- e_canvas_item_grab_focus(GNOME_CANVAS_ITEM(eti), TRUE);
+ e_canvas_item_grab_focus (GNOME_CANVAS_ITEM (eti), TRUE);
gnome_canvas_item_w2i (item, &e->button.x, &e->button.y);
realx = e->button.x;
@@ -2215,42 +2215,42 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
return TRUE;
}
- ecell_view = eti->cell_views [col];
+ ecell_view = eti->cell_views[col];
button = *(GdkEventButton *)e;
button.x = x1;
button.y = y1;
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &cursor_row,
"cursor_col", &cursor_col,
NULL);
- if (cursor_col == view_to_model_col (eti, col) && cursor_row == view_to_model_row(eti, row)) {
+ if (cursor_col == view_to_model_col (eti, col) && cursor_row == view_to_model_row (eti, row)) {
flags = E_CELL_CURSOR;
} else {
flags = 0;
}
- return_val = eti_e_cell_event (eti, ecell_view, (GdkEvent *) &button, button.time, view_to_model_col(eti, col), col, row, flags);
+ return_val = eti_e_cell_event (eti, ecell_view, (GdkEvent *) &button, button.time, view_to_model_col (eti, col), col, row, flags);
if (return_val)
return TRUE;
- g_signal_emit (eti, eti_signals [CLICK], 0,
- row, view_to_model_col(eti, col), &button, &return_val);
+ g_signal_emit (eti, eti_signals[CLICK], 0,
+ row, view_to_model_col (eti, col), &button, &return_val);
if (return_val) {
eti->click_count = 0;
return TRUE;
}
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &cursor_row,
"cursor_col", &cursor_col,
NULL);
eti->maybe_did_something =
- e_selection_model_maybe_do_something(E_SELECTION_MODEL (eti->selection), view_to_model_row(eti, row), view_to_model_col(eti, col), button.state);
- g_object_get(eti->selection,
+ e_selection_model_maybe_do_something (E_SELECTION_MODEL (eti->selection), view_to_model_row (eti, row), view_to_model_col (eti, col), button.state);
+ g_object_get (eti->selection,
"cursor_row", &new_cursor_row,
"cursor_col", &new_cursor_col,
NULL);
@@ -2261,7 +2261,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
eti->click_count++;
eti->row_guess = row;
- if ((!eti_editing(eti)) && e_table_model_is_cell_editable(eti->table_model, cursor_col, row)) {
+ if ((!eti_editing (eti)) && e_table_model_is_cell_editable (eti->table_model, cursor_col, row)) {
e_table_item_enter_edit (eti, col, row);
}
@@ -2271,7 +2271,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (eti_editing (eti)) {
return_val = eti_e_cell_event (eti, ecell_view, (GdkEvent *) &button, button.time,
- view_to_model_col(eti, col), col, row, E_CELL_EDITING | E_CELL_CURSOR);
+ view_to_model_col (eti, col), col, row, E_CELL_EDITING | E_CELL_CURSOR);
if (return_val)
return TRUE;
}
@@ -2293,17 +2293,17 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
break;
case 3:
- e_canvas_item_grab_focus(GNOME_CANVAS_ITEM(eti), TRUE);
+ e_canvas_item_grab_focus (GNOME_CANVAS_ITEM (eti), TRUE);
gnome_canvas_item_w2i (item, &e->button.x, &e->button.y);
if (!find_cell (eti, e->button.x, e->button.y, &col, &row, &x1, &y1))
return TRUE;
- e_selection_model_right_click_down(E_SELECTION_MODEL (eti->selection), view_to_model_row(eti, row), view_to_model_col(eti, col), 0);
+ e_selection_model_right_click_down (E_SELECTION_MODEL (eti->selection), view_to_model_row (eti, row), view_to_model_col (eti, col), 0);
- g_signal_emit (eti, eti_signals [RIGHT_CLICK], 0,
- row, view_to_model_col(eti, col), e, &return_val);
+ g_signal_emit (eti, eti_signals[RIGHT_CLICK], 0,
+ row, view_to_model_col (eti, col), e, &return_val);
if (!return_val)
- e_selection_model_right_click_up(E_SELECTION_MODEL (eti->selection));
+ e_selection_model_right_click_up (E_SELECTION_MODEL (eti->selection));
break;
case 4:
case 5:
@@ -2329,7 +2329,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (eti->maybe_in_drag) {
eti->maybe_in_drag = FALSE;
if (!eti->maybe_did_something)
- e_selection_model_do_something(E_SELECTION_MODEL (eti->selection), eti->drag_row, eti->drag_col, eti->drag_state);
+ e_selection_model_do_something (E_SELECTION_MODEL (eti->selection), eti->drag_row, eti->drag_col, eti->drag_state);
}
if (eti->in_drag) {
eti->in_drag = FALSE;
@@ -2352,7 +2352,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (!find_cell (eti, e->button.x, e->button.y, &col, &row, &x1, &y1))
return TRUE;
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &cursor_row,
"cursor_col", &cursor_col,
NULL);
@@ -2361,12 +2361,12 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
"eti_editing: %s, row:%d:%d, col:%d:%d\n", __FUNCTION__, e->button.button, __LINE__,
eti_editing(eti)?"true":"false", cursor_row, view_to_model_row(eti, row), cursor_col, view_to_model_col(eti, col)));
- if (eti_editing (eti) && cursor_row == view_to_model_row(eti, row) && cursor_col == view_to_model_col(eti, col)) {
+ if (eti_editing (eti) && cursor_row == view_to_model_row (eti, row) && cursor_col == view_to_model_col (eti, col)) {
d(g_print("%s: GDK_BUTTON_RELEASE received, button %d, line: %d\n", __FUNCTION__, e->button.button, __LINE__))
;
- ecell_view = eti->cell_views [col];
+ ecell_view = eti->cell_views[col];
/*
* Adjust the event positions
@@ -2375,11 +2375,11 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
e->button.y = y1;
return_val = eti_e_cell_event (eti, ecell_view, e, e->button.time,
- view_to_model_col(eti, col), col, row, E_CELL_EDITING | E_CELL_CURSOR);
+ view_to_model_col (eti, col), col, row, E_CELL_EDITING | E_CELL_CURSOR);
}
break;
case 3:
- e_selection_model_right_click_up(E_SELECTION_MODEL (eti->selection));
+ e_selection_model_right_click_up (E_SELECTION_MODEL (eti->selection));
return_val = TRUE;
break;
case 4:
@@ -2412,7 +2412,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
return TRUE;
#endif
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &model_row,
"cursor_col", &model_col,
NULL);
@@ -2424,7 +2424,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (eti->maybe_in_drag) {
eti->maybe_in_drag = FALSE;
if (!eti->maybe_did_something)
- e_selection_model_do_something(E_SELECTION_MODEL (eti->selection), eti->drag_row, eti->drag_col, eti->drag_state);
+ e_selection_model_do_something (E_SELECTION_MODEL (eti->selection), eti->drag_row, eti->drag_col, eti->drag_state);
}
if (eti->in_drag) {
eti->in_drag = FALSE;
@@ -2440,7 +2440,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
}
if (model_row != -1 && model_col != -1) {
- g_signal_emit (eti, eti_signals [DOUBLE_CLICK], 0,
+ g_signal_emit (eti, eti_signals[DOUBLE_CLICK], 0,
model_row, model_col, e);
}
}
@@ -2459,7 +2459,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
gboolean drag_handled;
eti->maybe_in_drag = 0;
- g_signal_emit (eti, eti_signals [START_DRAG], 0,
+ g_signal_emit (eti, eti_signals[START_DRAG], 0,
eti->drag_row, eti->drag_col, e, &drag_handled);
if (drag_handled)
eti->in_drag = 1;
@@ -2475,26 +2475,26 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
(row != eti->motion_row || col != eti->motion_col)) {
GdkEvent *cross = gdk_event_new (GDK_LEAVE_NOTIFY);
cross->crossing.time = e->motion.time;
- return_val = eti_e_cell_event (eti, eti->cell_views [eti->motion_col],
+ return_val = eti_e_cell_event (eti, eti->cell_views[eti->motion_col],
cross, cross->crossing.time,
- view_to_model_col(eti, eti->motion_col),
+ view_to_model_col (eti, eti->motion_col),
eti->motion_col, eti->motion_row, 0);
}
eti->motion_row = row;
eti->motion_col = col;
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &cursor_row,
"cursor_col", &cursor_col,
NULL);
flags = 0;
- if (cursor_row == view_to_model_row(eti, row) && cursor_col == view_to_model_col(eti, col)) {
+ if (cursor_row == view_to_model_row (eti, row) && cursor_col == view_to_model_col (eti, col)) {
flags = E_CELL_EDITING | E_CELL_CURSOR;
}
- ecell_view = eti->cell_views [col];
+ ecell_view = eti->cell_views[col];
/*
* Adjust the event positions
@@ -2503,7 +2503,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
e->motion.y = y1;
return_val = eti_e_cell_event (eti, ecell_view, e, e->motion.time,
- view_to_model_col(eti, col), col, row, flags);
+ view_to_model_col (eti, col), col, row, flags);
break;
}
@@ -2513,7 +2513,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
d(g_print("%s: GDK_KEY_PRESS received, keyval: %d\n", __FUNCTION__, (gint) e->key.keyval));
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &cursor_row,
"cursor_col", &cursor_col,
NULL);
@@ -2531,11 +2531,11 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
break;
}
- g_signal_emit (eti, eti_signals [KEY_PRESS], 0,
- model_to_view_row(eti, cursor_row), cursor_col, e, &return_val);
+ g_signal_emit (eti, eti_signals[KEY_PRESS], 0,
+ model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
if ((!return_val) &&
- (atk_get_root() || eti->cursor_mode != E_CURSOR_LINE) &&
- cursor_col != view_to_model_col(eti, 0))
+ (atk_get_root () || eti->cursor_mode != E_CURSOR_LINE) &&
+ cursor_col != view_to_model_col (eti, 0))
eti_cursor_move_left (eti);
return_val = 1;
break;
@@ -2547,11 +2547,11 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
break;
}
- g_signal_emit (eti, eti_signals [KEY_PRESS], 0,
- model_to_view_row(eti, cursor_row), cursor_col, e, &return_val);
+ g_signal_emit (eti, eti_signals[KEY_PRESS], 0,
+ model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
if ((!return_val) &&
- (atk_get_root() || eti->cursor_mode != E_CURSOR_LINE) &&
- cursor_col != view_to_model_col(eti, eti->cols - 1))
+ (atk_get_root () || eti->cursor_mode != E_CURSOR_LINE) &&
+ cursor_col != view_to_model_col (eti, eti->cols - 1))
eti_cursor_move_right (eti);
return_val = 1;
break;
@@ -2562,13 +2562,13 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_KP_Down:
if ((e->key.state & GDK_MOD1_MASK)
&& ((e->key.keyval == GDK_Down ) || (e->key.keyval == GDK_KP_Down))) {
- gint view_col = model_to_view_col(eti, cursor_col);
+ gint view_col = model_to_view_col (eti, cursor_col);
if ((view_col >= 0) && (view_col < eti->cols))
- if (eti_e_cell_event (eti, eti->cell_views [view_col], e, ((GdkEventKey *)e)->time, cursor_col, view_col, model_to_view_row(eti, cursor_row), E_CELL_CURSOR))
+ if (eti_e_cell_event (eti, eti->cell_views[view_col], e, ((GdkEventKey *)e)->time, cursor_col, view_col, model_to_view_row (eti, cursor_row), E_CELL_CURSOR))
return TRUE;
} else
- return_val = e_selection_model_key_press(E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
+ return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
case GDK_Home:
case GDK_KP_Home:
@@ -2578,10 +2578,10 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
}
if (eti->cursor_mode != E_CURSOR_LINE) {
- eti_cursor_move (eti, model_to_view_row(eti, cursor_row), 0);
+ eti_cursor_move (eti, model_to_view_row (eti, cursor_row), 0);
return_val = TRUE;
} else
- return_val = e_selection_model_key_press(E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
+ return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
case GDK_End:
case GDK_KP_End:
@@ -2591,10 +2591,10 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
}
if (eti->cursor_mode != E_CURSOR_LINE) {
- eti_cursor_move (eti, model_to_view_row(eti, cursor_row), eti->cols - 1);
+ eti_cursor_move (eti, model_to_view_row (eti, cursor_row), eti->cols - 1);
return_val = TRUE;
} else
- return_val = e_selection_model_key_press(E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
+ return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
case GDK_Tab:
case GDK_KP_Tab:
@@ -2606,28 +2606,28 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (eti->cursor_mode == E_CURSOR_SPREADSHEET) {
if ((e->key.state & GDK_SHIFT_MASK) != 0) {
/* shift tab */
- if (cursor_col != view_to_model_col(eti, 0))
+ if (cursor_col != view_to_model_col (eti, 0))
eti_cursor_move_left (eti);
- else if (cursor_row != view_to_model_row(eti, 0))
- eti_cursor_move (eti, model_to_view_row(eti, cursor_row) - 1, eti->cols - 1);
+ else if (cursor_row != view_to_model_row (eti, 0))
+ eti_cursor_move (eti, model_to_view_row (eti, cursor_row) - 1, eti->cols - 1);
else
return_val = FALSE;
} else {
if (cursor_col != view_to_model_col (eti, eti->cols - 1))
eti_cursor_move_right (eti);
- else if (cursor_row != view_to_model_row(eti, eti->rows - 1))
- eti_cursor_move (eti, model_to_view_row(eti, cursor_row) + 1, 0);
+ else if (cursor_row != view_to_model_row (eti, eti->rows - 1))
+ eti_cursor_move (eti, model_to_view_row (eti, cursor_row) + 1, 0);
else
return_val = FALSE;
}
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &cursor_row,
"cursor_col", &cursor_col,
NULL);
if (cursor_col >= 0 && cursor_row >= 0 && return_val &&
- (!eti_editing(eti)) && e_table_model_is_cell_editable(eti->table_model, cursor_col, model_to_view_row (eti, cursor_row))) {
- e_table_item_enter_edit (eti, model_to_view_col(eti, cursor_col), model_to_view_row(eti, cursor_row));
+ (!eti_editing (eti)) && e_table_model_is_cell_editable (eti->table_model, cursor_col, model_to_view_row (eti, cursor_row))) {
+ e_table_item_enter_edit (eti, model_to_view_col (eti, cursor_col), model_to_view_row (eti, cursor_row));
}
break;
} else {
@@ -2641,14 +2641,14 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_ISO_Enter:
case GDK_3270_Enter:
if (eti_editing (eti)) {
- ecell_view = eti->cell_views [eti->editing_col];
+ ecell_view = eti->cell_views[eti->editing_col];
return_val = eti_e_cell_event (eti, ecell_view, e, e->key.time,
view_to_model_col (eti, eti->editing_col),
eti->editing_col, eti->editing_row, E_CELL_EDITING | E_CELL_CURSOR | E_CELL_PREEDIT);
if (!return_val)
break;
}
- g_signal_emit (eti, eti_signals [KEY_PRESS], 0,
+ g_signal_emit (eti, eti_signals[KEY_PRESS], 0,
model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
if (!return_val)
return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
@@ -2683,24 +2683,24 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
default:
if (!eti_editing (eti)) {
gint col, row;
- row = model_to_view_row(eti, cursor_row);
- col = model_to_view_col(eti, cursor_col);
- if (col != -1 && row != -1 && e_table_model_is_cell_editable(eti->table_model, cursor_col, row)) {
+ row = model_to_view_row (eti, cursor_row);
+ col = model_to_view_col (eti, cursor_col);
+ if (col != -1 && row != -1 && e_table_model_is_cell_editable (eti->table_model, cursor_col, row)) {
e_table_item_enter_edit (eti, col, row);
}
}
if (!eti_editing (eti)) {
- g_signal_emit (eti, eti_signals [KEY_PRESS], 0,
- model_to_view_row(eti, cursor_row), cursor_col, e, &return_val);
+ g_signal_emit (eti, eti_signals[KEY_PRESS], 0,
+ model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
if (!return_val)
- e_selection_model_key_press(E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
+ e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
} else {
- ecell_view = eti->cell_views [eti->editing_col];
+ ecell_view = eti->cell_views[eti->editing_col];
return_val = eti_e_cell_event (eti, ecell_view, e, e->key.time,
- view_to_model_col(eti, eti->editing_col),
+ view_to_model_col (eti, eti->editing_col),
eti->editing_col, eti->editing_row, E_CELL_EDITING | E_CELL_CURSOR);
if (!return_val)
- e_selection_model_key_press(E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
+ e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
}
break;
}
@@ -2714,7 +2714,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
d(g_print("%s: GDK_KEY_RELEASE received, keyval: %d\n", __FUNCTION__, (gint) e->key.keyval));
- g_object_get(eti->selection,
+ g_object_get (eti->selection,
"cursor_row", &cursor_row,
"cursor_col", &cursor_col,
NULL);
@@ -2723,22 +2723,22 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
return FALSE;
if (eti_editing (eti)) {
- ecell_view = eti->cell_views [eti->editing_col];
+ ecell_view = eti->cell_views[eti->editing_col];
return_val = eti_e_cell_event (eti, ecell_view, e, e->key.time,
- view_to_model_col(eti, eti->editing_col),
+ view_to_model_col (eti, eti->editing_col),
eti->editing_col, eti->editing_row, E_CELL_EDITING | E_CELL_CURSOR);
}
break;
}
case GDK_LEAVE_NOTIFY:
- d(leave = TRUE);
+ d (leave = TRUE);
case GDK_ENTER_NOTIFY:
d(g_print("%s: %s received\n", __FUNCTION__, leave ? "GDK_LEAVE_NOTIFY" : "GDK_ENTER_NOTIFY"));
if (eti->motion_row != -1 && eti->motion_col != -1)
- return_val = eti_e_cell_event (eti, eti->cell_views [eti->motion_col],
+ return_val = eti_e_cell_event (eti, eti->cell_views[eti->motion_col],
e, e->crossing.time,
- view_to_model_col(eti, eti->motion_col),
+ view_to_model_col (eti, eti->motion_col),
eti->motion_col, eti->motion_row, 0);
eti->motion_row = -1;
eti->motion_col = -1;
@@ -2751,9 +2751,9 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (eti->save_row != -1 &&
eti->save_col != -1 &&
!eti_editing (eti) &&
- e_table_model_is_cell_editable(eti->table_model, view_to_model_col (eti, eti->save_col), eti->save_row)) {
+ e_table_model_is_cell_editable (eti->table_model, view_to_model_col (eti, eti->save_col), eti->save_row)) {
e_table_item_enter_edit (eti, eti->save_col, eti->save_row);
- e_cell_load_state (eti->cell_views [eti->editing_col], view_to_model_col(eti, eti->save_col),
+ e_cell_load_state (eti->cell_views[eti->editing_col], view_to_model_col (eti, eti->save_col),
eti->save_col, eti->save_row, eti-