aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-12-07 22:30:49 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-12-07 23:04:45 +0800
commit7b98c39b0adecc942c091d293032851149107dbc (patch)
tree8588a63b94eebcb0ad06cab29dee3ee5474e4d3e
parentc9edf5ef1f8cba1556fabfa9234b5cb155b59ceb (diff)
downloadgsoc2013-evolution-7b98c39b0adecc942c091d293032851149107dbc.tar
gsoc2013-evolution-7b98c39b0adecc942c091d293032851149107dbc.tar.gz
gsoc2013-evolution-7b98c39b0adecc942c091d293032851149107dbc.tar.bz2
gsoc2013-evolution-7b98c39b0adecc942c091d293032851149107dbc.tar.lz
gsoc2013-evolution-7b98c39b0adecc942c091d293032851149107dbc.tar.xz
gsoc2013-evolution-7b98c39b0adecc942c091d293032851149107dbc.tar.zst
gsoc2013-evolution-7b98c39b0adecc942c091d293032851149107dbc.zip
Coding style and whitespace cleanup.
-rw-r--r--addressbook/gui/widgets/e-contact-map-window.h2
-rw-r--r--addressbook/gui/widgets/eab-contact-formatter.c4
-rw-r--r--calendar/gui/comp-util.c52
-rw-r--r--calendar/gui/e-calendar-selector.c20
-rw-r--r--calendar/gui/ea-gnome-calendar.c2
-rw-r--r--composer/e-msg-composer.c44
-rw-r--r--e-util/test-source-selector.c171
-rw-r--r--libemail-engine/mail-folder-cache.c10
-rw-r--r--libgnomecanvas/gnome-canvas-text.c3
-rw-r--r--mail/e-mail-backend.c5
-rw-r--r--mail/e-mail-migrate.c5
-rw-r--r--mail/em-subscription-editor.c8
-rw-r--r--modules/cal-config-weather/evolution-cal-config-weather.c36
-rw-r--r--modules/calendar/e-cal-shell-view-private.c10
-rw-r--r--modules/itip-formatter/itip-view.c2
-rw-r--r--plugins/external-editor/external-editor.c5
-rw-r--r--shell/e-convert-local-mail.c10
17 files changed, 247 insertions, 142 deletions
diff --git a/addressbook/gui/widgets/e-contact-map-window.h b/addressbook/gui/widgets/e-contact-map-window.h
index 2db0bb6a78..ba4ffb89ab 100644
--- a/addressbook/gui/widgets/e-contact-map-window.h
+++ b/addressbook/gui/widgets/e-contact-map-window.h
@@ -63,7 +63,7 @@ struct _EContactMapWindowClass {
GtkWindowClass parent_class;
void (*show_contact_editor) (EContactMapWindow *window,
- const gchar *contact_uid);
+ const gchar *contact_uid);
};
GType e_contact_map_window_get_type (void) G_GNUC_CONST;
diff --git a/addressbook/gui/widgets/eab-contact-formatter.c b/addressbook/gui/widgets/eab-contact-formatter.c
index 0601291ed4..11371ac525 100644
--- a/addressbook/gui/widgets/eab-contact-formatter.c
+++ b/addressbook/gui/widgets/eab-contact-formatter.c
@@ -701,8 +701,8 @@ render_personal_column (EABContactFormatter *formatter,
static void
render_other_column (EABContactFormatter *formatter,
- EContact *contact,
- GString *buffer)
+ EContact *contact,
+ GString *buffer)
{
GString *accum = g_string_new ("");
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index b2569d53bb..e7253753e0 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -852,7 +852,7 @@ async_context_free (AsyncContext *async_context)
static void
add_timezone_to_cal_cb (icalparameter *param,
- gpointer data)
+ gpointer data)
{
struct ForeachTzidData *ftd = data;
icaltimezone *tz = NULL;
@@ -882,8 +882,8 @@ add_timezone_to_cal_cb (icalparameter *param,
/* Helper for cal_comp_transfer_item_to() */
static void
cal_comp_transfer_item_to_thread (GSimpleAsyncResult *simple,
- GObject *source_object,
- GCancellable *cancellable)
+ GObject *source_object,
+ GCancellable *cancellable)
{
AsyncContext *async_context;
GError *local_error = NULL;
@@ -903,12 +903,12 @@ cal_comp_transfer_item_to_thread (GSimpleAsyncResult *simple,
void
cal_comp_transfer_item_to (ECalClient *src_client,
- ECalClient *dest_client,
- icalcomponent *icalcomp_vcal,
- gboolean do_copy,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+ ECalClient *dest_client,
+ icalcomponent *icalcomp_vcal,
+ gboolean do_copy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GSimpleAsyncResult *simple;
AsyncContext *async_context;
@@ -940,8 +940,8 @@ cal_comp_transfer_item_to (ECalClient *src_client,
gboolean
cal_comp_transfer_item_to_finish (ECalClient *client,
- GAsyncResult *result,
- GError **error)
+ GAsyncResult *result,
+ GError **error)
{
GSimpleAsyncResult *simple;
@@ -959,11 +959,11 @@ cal_comp_transfer_item_to_finish (ECalClient *client,
gboolean
cal_comp_transfer_item_to_sync (ECalClient *src_client,
- ECalClient *dest_client,
- icalcomponent *icalcomp_vcal,
- gboolean do_copy,
- GCancellable *cancellable,
- GError **error)
+ ECalClient *dest_client,
+ icalcomponent *icalcomp_vcal,
+ gboolean do_copy,
+ GCancellable *cancellable,
+ GError **error)
{
icalcomponent *icalcomp;
icalcomponent *icalcomp_event, *subcomp;
@@ -1051,7 +1051,7 @@ cal_comp_transfer_item_to_sync (ECalClient *src_client,
if (e_cal_util_component_is_instance (icalcomp_event)) {
GSList *ecalcomps = NULL, *eiter;
- ECalComponent *comp ;
+ ECalComponent *comp;
success = e_cal_client_get_objects_for_uid_sync (src_client, uid, &ecalcomps, cancellable, error);
if (!success)
@@ -1066,7 +1066,8 @@ cal_comp_transfer_item_to_sync (ECalClient *src_client,
for (eiter = ecalcomps; eiter; eiter = g_slist_next (eiter)) {
comp = eiter->data;
- icalcomponent_add_component (icalcomp,
+ icalcomponent_add_component (
+ icalcomp,
icalcomponent_new_clone (e_cal_component_get_icalcomponent (comp)));
}
}
@@ -1081,7 +1082,7 @@ cal_comp_transfer_item_to_sync (ECalClient *src_client,
new_uid = e_cal_component_gen_uid ();
if (icalcomponent_isa (icalcomp) == ICAL_VCALENDAR_COMPONENT) {
/* in case of a vCalendar, the component might have detached instances,
- thus change the UID on all of the subcomponents of it */
+ * thus change the UID on all of the subcomponents of it */
for (subcomp = icalcomponent_get_first_component (icalcomp, icalcomp_kind);
subcomp;
subcomp = icalcomponent_get_next_component (icalcomp, icalcomp_kind)) {
@@ -1102,7 +1103,7 @@ cal_comp_transfer_item_to_sync (ECalClient *src_client,
if (icalcomponent_isa (icalcomp) == ICAL_VCALENDAR_COMPONENT) {
/* in case of a vCalendar, the component might have detached instances,
- thus check timezones on all of the subcomponents of it */
+ * thus check timezones on all of the subcomponents of it */
for (subcomp = icalcomponent_get_first_component (icalcomp, icalcomp_kind);
subcomp && ftd.success;
subcomp = icalcomponent_get_next_component (icalcomp, icalcomp_kind)) {
@@ -1121,13 +1122,14 @@ cal_comp_transfer_item_to_sync (ECalClient *src_client,
gboolean did_add = FALSE;
/* in case of a vCalendar, the component might have detached instances,
- thus add the master object first, and then all of the subcomponents of it */
+ * thus add the master object first, and then all of the subcomponents of it */
for (subcomp = icalcomponent_get_first_component (icalcomp, icalcomp_kind);
subcomp && !did_add;
subcomp = icalcomponent_get_next_component (icalcomp, icalcomp_kind)) {
if (icaltime_is_null_time (icalcomponent_get_recurrenceid (subcomp))) {
did_add = TRUE;
- success = e_cal_client_create_object_sync (dest_client, subcomp,
+ success = e_cal_client_create_object_sync (
+ dest_client, subcomp,
&new_uid, cancellable, error);
g_free (new_uid);
}
@@ -1144,12 +1146,14 @@ cal_comp_transfer_item_to_sync (ECalClient *src_client,
subcomp = icalcomponent_get_next_component (icalcomp, icalcomp_kind)) {
if (!icaltime_is_null_time (icalcomponent_get_recurrenceid (subcomp))) {
if (did_add) {
- success = e_cal_client_modify_object_sync (dest_client, subcomp,
+ success = e_cal_client_modify_object_sync (
+ dest_client, subcomp,
CALOBJ_MOD_THIS, cancellable, error);
} else {
/* just in case there are only detached instances and no master object */
did_add = TRUE;
- success = e_cal_client_create_object_sync (dest_client, subcomp,
+ success = e_cal_client_create_object_sync (
+ dest_client, subcomp,
&new_uid, cancellable, error);
g_free (new_uid);
}
diff --git a/calendar/gui/e-calendar-selector.c b/calendar/gui/e-calendar-selector.c
index c134d299a4..5244d93c7d 100644
--- a/calendar/gui/e-calendar-selector.c
+++ b/calendar/gui/e-calendar-selector.c
@@ -49,10 +49,10 @@ enum {
static void
cal_transferring_update_alert (ECalendarSelector *calendar_selector,
- EShellView *shell_view,
- const gchar *domain,
- const gchar *calendar,
- const gchar *message)
+ EShellView *shell_view,
+ const gchar *domain,
+ const gchar *calendar,
+ const gchar *message)
{
ECalendarSelectorPrivate *priv;
EShellContent *shell_content;
@@ -98,8 +98,8 @@ typedef struct _TransferItemToData {
static void
transfer_item_to_cb (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
+ GAsyncResult *result,
+ gpointer user_data)
{
TransferItemToData *titd = user_data;
GError *error = NULL;
@@ -130,8 +130,8 @@ transfer_item_to_cb (GObject *source_object,
static void
destination_client_connect_cb (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
+ GAsyncResult *result,
+ gpointer user_data)
{
EClient *client;
TransferItemToData *titd = user_data;
@@ -181,8 +181,8 @@ exit:
static void
source_client_connect_cb (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
+ GAsyncResult *result,
+ gpointer user_data)
{
EClient *client;
TransferItemToData *titd = user_data;
diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c
index 9fd48565a9..4f8e31d8a4 100644
--- a/calendar/gui/ea-gnome-calendar.c
+++ b/calendar/gui/ea-gnome-calendar.c
@@ -162,7 +162,7 @@ ea_gnome_calendar_get_label_description (GnomeCalendar *gcal)
view_type = gnome_calendar_get_view (gcal);
calendar_view = gnome_calendar_get_calendar_view (gcal, view_type);
- if(!e_calendar_view_get_visible_time_range (
+ if (!e_calendar_view_get_visible_time_range (
calendar_view, &start_time, &end_time)) {
g_warn_if_reached ();
return NULL;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index eeff715787..a0e4f52159 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1120,17 +1120,19 @@ composer_build_message (EMsgComposer *composer,
context->session = e_msg_composer_ref_session (composer);
context->from = e_msg_composer_get_from (composer);
- if ((flags & COMPOSER_FLAG_PGP_SIGN) != 0 && (flags & COMPOSER_FLAG_DRAFT) == 0)
- context->pgp_sign = TRUE;
+ if ((flags & COMPOSER_FLAG_DRAFT) == 0) {
+ if ((flags & COMPOSER_FLAG_PGP_SIGN) != 0)
+ context->pgp_sign = TRUE;
- if ((flags & COMPOSER_FLAG_PGP_ENCRYPT) != 0 && (flags & COMPOSER_FLAG_DRAFT) == 0)
- context->pgp_encrypt = TRUE;
+ if ((flags & COMPOSER_FLAG_PGP_ENCRYPT) != 0)
+ context->pgp_encrypt = TRUE;
- if ((flags & COMPOSER_FLAG_SMIME_SIGN) != 0 && (flags & COMPOSER_FLAG_DRAFT) == 0)
- context->smime_sign = TRUE;
+ if ((flags & COMPOSER_FLAG_SMIME_SIGN) != 0)
+ context->smime_sign = TRUE;
- if ((flags & COMPOSER_FLAG_SMIME_ENCRYPT) != 0 && (flags & COMPOSER_FLAG_DRAFT) == 0)
- context->smime_encrypt = TRUE;
+ if ((flags & COMPOSER_FLAG_SMIME_ENCRYPT) != 0)
+ context->smime_encrypt = TRUE;
+ }
context->need_thread =
context->pgp_sign || context->pgp_encrypt ||
@@ -1572,7 +1574,6 @@ msg_composer_subject_changed_cb (EMsgComposer *composer)
static void
msg_composer_mail_identity_changed_cb (EMsgComposer *composer)
{
- EMsgComposerPrivate *p = composer->priv;
EMailSignatureComboBox *combo_box;
ESourceMailComposition *mc;
ESourceOpenPGP *pgp;
@@ -1580,6 +1581,7 @@ msg_composer_mail_identity_changed_cb (EMsgComposer *composer)
EComposerHeaderTable *table;
GtkToggleAction *action;
ESource *source;
+ gboolean active;
gboolean can_sign;
gboolean pgp_sign;
gboolean smime_sign;
@@ -1610,21 +1612,29 @@ msg_composer_mail_identity_changed_cb (EMsgComposer *composer)
smime_encrypt = e_source_smime_get_encrypt_by_default (smime);
can_sign =
- (p->mime_type == NULL) ||
+ (composer->priv->mime_type == NULL) ||
e_source_mail_composition_get_sign_imip (mc) ||
- (g_ascii_strncasecmp (p->mime_type, "text/calendar", 13) != 0);
+ (g_ascii_strncasecmp (
+ composer->priv->mime_type,
+ "text/calendar", 13) != 0);
action = GTK_TOGGLE_ACTION (ACTION (PGP_SIGN));
- gtk_toggle_action_set_active (action, (can_sign && pgp_sign) ||
- (p->is_from_message && gtk_toggle_action_get_active (action)));
+ active = gtk_toggle_action_get_active (action);
+ active &= composer->priv->is_from_message;
+ active |= (can_sign && pgp_sign);
+ gtk_toggle_action_set_active (action, active);
action = GTK_TOGGLE_ACTION (ACTION (SMIME_SIGN));
- gtk_toggle_action_set_active (action, (can_sign && smime_sign) ||
- (p->is_from_message && gtk_toggle_action_get_active (action)));
+ active = gtk_toggle_action_get_active (action);
+ active &= composer->priv->is_from_message;
+ active |= (can_sign && smime_sign);
+ gtk_toggle_action_set_active (action, active);
action = GTK_TOGGLE_ACTION (ACTION (SMIME_ENCRYPT));
- gtk_toggle_action_set_active (action, smime_encrypt ||
- (p->is_from_message && gtk_toggle_action_get_active (action)));
+ active = gtk_toggle_action_get_active (action);
+ active &= composer->priv->is_from_message;
+ active |= smime_encrypt;
+ gtk_toggle_action_set_active (action, active);
combo_box = e_composer_header_table_get_signature_combo_box (table);
e_mail_signature_combo_box_set_identity_uid (combo_box, uid);
diff --git a/e-util/test-source-selector.c b/e-util/test-source-selector.c
index f8f7031d02..1a0427a9d9 100644
--- a/e-util/test-source-selector.c
+++ b/e-util/test-source-selector.c
@@ -26,7 +26,7 @@
static void
dump_selection (ESourceSelector *selector,
- const gchar *extension_name)
+ const gchar *extension_name)
{
GList *list, *link;
@@ -55,45 +55,54 @@ dump_selection (ESourceSelector *selector,
static void
selection_changed_callback (ESourceSelector *selector)
{
+ const gchar *extension_name;
+
g_print ("Selection changed!\n");
- dump_selection (selector, g_object_get_data (G_OBJECT (selector), EXTENSION_NAME_KEY));
+
+ extension_name = g_object_get_data (
+ G_OBJECT (selector), EXTENSION_NAME_KEY);
+ dump_selection (selector, extension_name);
}
static void
enable_widget_if_opened_cb (ESourceSelector *selector,
- GtkWidget *widget)
+ GtkWidget *widget)
{
GHashTable *opened_sources;
ESource *source;
+ gboolean sensitive = FALSE;
opened_sources = g_object_get_data (G_OBJECT (selector), OPENED_KEY);
g_return_if_fail (opened_sources != NULL);
source = e_source_selector_ref_primary_selection (selector);
- gtk_widget_set_sensitive (widget, source && g_hash_table_lookup (opened_sources, source) != NULL);
- if (source)
- g_object_unref (source);
+ if (source != NULL)
+ sensitive = g_hash_table_contains (opened_sources, source);
+ gtk_widget_set_sensitive (widget, sensitive);
+ g_clear_object (&source);
}
static void
disable_widget_if_opened_cb (ESourceSelector *selector,
- GtkWidget *widget)
+ GtkWidget *widget)
{
GHashTable *opened_sources;
ESource *source;
+ gboolean sensitive = FALSE;
opened_sources = g_object_get_data (G_OBJECT (selector), OPENED_KEY);
g_return_if_fail (opened_sources != NULL);
source = e_source_selector_ref_primary_selection (selector);
- gtk_widget_set_sensitive (widget, source && g_hash_table_lookup (opened_sources, source) == NULL);
- if (source)
- g_object_unref (source);
+ if (source != NULL)
+ sensitive = !g_hash_table_contains (opened_sources, source);
+ gtk_widget_set_sensitive (widget, sensitive);
+ g_clear_object (&source);
}
static void
open_selected_clicked_cb (GtkWidget *button,
- ESourceSelector *selector)
+ ESourceSelector *selector)
{
GHashTable *opened_sources;
ESource *source;
@@ -102,24 +111,41 @@ open_selected_clicked_cb (GtkWidget *button,
g_return_if_fail (opened_sources != NULL);
source = e_source_selector_ref_primary_selection (selector);
- if (!source)
+ if (source == NULL)
return;
- if (!g_hash_table_lookup (opened_sources, source)) {
+ if (!g_hash_table_contains (opened_sources, source)) {
EClient *client;
- GError *error = NULL;
ECalClientSourceType source_type;
+ gpointer data;
+ GError *local_error = NULL;
+
+ data = g_object_get_data (G_OBJECT (selector), SOURCE_TYPE_KEY);
+ source_type = GPOINTER_TO_UINT (data);
- source_type = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (selector), SOURCE_TYPE_KEY));
if (source_type == E_CAL_CLIENT_SOURCE_TYPE_LAST)
- client = e_book_client_connect_sync (source, NULL, &error);
+ client = e_book_client_connect_sync (
+ source, NULL, &local_error);
else
- client = e_cal_client_connect_sync (source, source_type, NULL, &error);
- if (error) {
- g_warning ("Failed to open '%s': %s", e_source_get_display_name (source), error->message);
- } else {
- g_hash_table_insert (opened_sources, g_object_ref (source), client);
- g_signal_emit_by_name (selector, "primary-selection-changed", 0);
+ client = e_cal_client_connect_sync (
+ source, source_type, NULL, &local_error);
+
+ if (client != NULL) {
+ g_hash_table_insert (
+ opened_sources,
+ g_object_ref (source),
+ g_object_ref (client));
+ g_signal_emit_by_name (
+ selector, "primary-selection-changed", 0);
+ g_object_unref (client);
+ }
+
+ if (local_error != NULL) {
+ g_warning (
+ "Failed to open '%s': %s",
+ e_source_get_display_name (source),
+ local_error->message);
+ g_error_free (local_error);
}
}
@@ -128,7 +154,7 @@ open_selected_clicked_cb (GtkWidget *button,
static void
close_selected_clicked_cb (GtkWidget *button,
- ESourceSelector *selector)
+ ESourceSelector *selector)
{
GHashTable *opened_sources;
ESource *source;
@@ -137,19 +163,20 @@ close_selected_clicked_cb (GtkWidget *button,
g_return_if_fail (opened_sources != NULL);
source = e_source_selector_ref_primary_selection (selector);
- if (!source)
+ if (source == NULL)
return;
if (g_hash_table_remove (opened_sources, source))
- g_signal_emit_by_name (selector, "primary-selection-changed", 0);
+ g_signal_emit_by_name (
+ selector, "primary-selection-changed", 0);
g_object_unref (source);
}
static GtkWidget *
create_page (ESourceRegistry *registry,
- const gchar *extension_name,
- ECalClientSourceType source_type)
+ const gchar *extension_name,
+ ECalClientSourceType source_type)
{
GtkWidget *widget, *subwindow, *selector, *button_box;
GtkGrid *grid;
@@ -158,7 +185,8 @@ create_page (ESourceRegistry *registry,
grid = GTK_GRID (gtk_grid_new ());
subwindow = gtk_scrolled_window_new (NULL, NULL);
- g_object_set (G_OBJECT (subwindow),
+ g_object_set (
+ G_OBJECT (subwindow),
"halign", GTK_ALIGN_FILL,
"hexpand", TRUE,
"valign", GTK_ALIGN_FILL,
@@ -166,7 +194,8 @@ create_page (ESourceRegistry *registry,
NULL);
selector = e_source_selector_new (registry, extension_name);
- g_object_set (G_OBJECT (selector),
+ g_object_set (
+ G_OBJECT (selector),
"halign", GTK_ALIGN_FILL,
"hexpand", TRUE,
"valign", GTK_ALIGN_FILL,
@@ -179,7 +208,8 @@ create_page (ESourceRegistry *registry,
gtk_grid_attach (grid, subwindow, 0, 0, 1, 5);
button_box = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
- g_object_set (G_OBJECT (button_box),
+ g_object_set (
+ G_OBJECT (button_box),
"halign", GTK_ALIGN_START,
"hexpand", FALSE,
"valign", GTK_ALIGN_START,
@@ -189,16 +219,27 @@ create_page (ESourceRegistry *registry,
widget = gtk_button_new_with_label ("Open selected");
gtk_container_add (GTK_CONTAINER (button_box), widget);
- g_signal_connect (widget, "clicked", G_CALLBACK (open_selected_clicked_cb), selector);
- g_signal_connect (selector, "primary-selection-changed", G_CALLBACK (disable_widget_if_opened_cb), widget);
+
+ g_signal_connect (
+ widget, "clicked",
+ G_CALLBACK (open_selected_clicked_cb), selector);
+ g_signal_connect (
+ selector, "primary-selection-changed",
+ G_CALLBACK (disable_widget_if_opened_cb), widget);
widget = gtk_button_new_with_label ("Close selected");
gtk_container_add (GTK_CONTAINER (button_box), widget);
- g_signal_connect (widget, "clicked", G_CALLBACK (close_selected_clicked_cb), selector);
- g_signal_connect (selector, "primary-selection-changed", G_CALLBACK (enable_widget_if_opened_cb), widget);
+
+ g_signal_connect (
+ widget, "clicked",
+ G_CALLBACK (close_selected_clicked_cb), selector);
+ g_signal_connect (
+ selector, "primary-selection-changed",
+ G_CALLBACK (enable_widget_if_opened_cb), widget);
widget = gtk_label_new ("");
- g_object_set (G_OBJECT (widget),
+ g_object_set (
+ G_OBJECT (widget),
"halign", GTK_ALIGN_FILL,
"hexpand", FALSE,
"valign", GTK_ALIGN_FILL,
@@ -207,7 +248,8 @@ create_page (ESourceRegistry *registry,
gtk_grid_attach (grid, widget, 1, 1, 1, 1);
widget = gtk_check_button_new_with_label ("Show colors");
- g_object_set (G_OBJECT (widget),
+ g_object_set (
+ G_OBJECT (widget),
"halign", GTK_ALIGN_START,
"hexpand", FALSE,
"valign", GTK_ALIGN_END,
@@ -222,7 +264,8 @@ create_page (ESourceRegistry *registry,
G_BINDING_SYNC_CREATE);
widget = gtk_check_button_new_with_label ("Show icons");
- g_object_set (G_OBJECT (widget),
+ g_object_set (
+ G_OBJECT (widget),
"halign", GTK_ALIGN_START,
"hexpand", FALSE,
"valign", GTK_ALIGN_END,
@@ -237,7 +280,8 @@ create_page (ESourceRegistry *registry,
G_BINDING_SYNC_CREATE);
widget = gtk_check_button_new_with_label ("Show toggles");
- g_object_set (G_OBJECT (widget),
+ g_object_set (
+ G_OBJECT (widget),
"halign", GTK_ALIGN_START,
"hexpand", FALSE,
"valign", GTK_ALIGN_END,
@@ -251,10 +295,25 @@ create_page (ESourceRegistry *registry,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- opened_sources = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_object_unref, g_object_unref);
- g_object_set_data_full (G_OBJECT (selector), OPENED_KEY, opened_sources, (GDestroyNotify) g_hash_table_unref);
- g_object_set_data (G_OBJECT (selector), SOURCE_TYPE_KEY, GUINT_TO_POINTER (source_type));
- g_object_set_data_full (G_OBJECT (selector), EXTENSION_NAME_KEY, g_strdup (extension_name), g_free);
+ opened_sources = g_hash_table_new_full (
+ (GHashFunc) g_direct_hash,
+ (GEqualFunc) g_direct_equal,
+ (GDestroyNotify) g_object_unref,
+ (GDestroyNotify) g_object_unref);
+ g_object_set_data_full (
+ G_OBJECT (selector),
+ OPENED_KEY,
+ opened_sources,
+ (GDestroyNotify) g_hash_table_unref);
+ g_object_set_data (
+ G_OBJECT (selector),
+ SOURCE_TYPE_KEY,
+ GUINT_TO_POINTER (source_type));
+ g_object_set_data_full (
+ G_OBJECT (selector),
+ EXTENSION_NAME_KEY,
+ g_strdup (extension_name),
+ (GDestroyNotify) g_free);
/* update buttons */
g_signal_emit_by_name (selector, "primary-selection-changed", 0);
@@ -283,22 +342,34 @@ on_idle_create_widget (ESourceRegistry *registry)
gtk_notebook_append_page (
GTK_NOTEBOOK (notebook),
- create_page (registry, E_SOURCE_EXTENSION_CALENDAR, E_CAL_CLIENT_SOURCE_TYPE_EVENTS),
+ create_page (
+ registry,
+ E_SOURCE_EXTENSION_CALENDAR,
+ E_CAL_CLIENT_SOURCE_TYPE_EVENTS),
gtk_label_new ("Calendars"));
gtk_notebook_append_page (
GTK_NOTEBOOK (notebook),
- create_page (registry, E_SOURCE_EXTENSION_MEMO_LIST, E_CAL_CLIENT_SOURCE_TYPE_MEMOS),
+ create_page (
+ registry,
+ E_SOURCE_EXTENSION_MEMO_LIST,
+ E_CAL_CLIENT_SOURCE_TYPE_MEMOS),
gtk_label_new ("Memos"));
gtk_notebook_append_page (
GTK_NOTEBOOK (notebook),
- create_page (registry, E_SOURCE_EXTENSION_TASK_LIST, E_CAL_CLIENT_SOURCE_TYPE_TASKS),
+ create_page (
+ registry,
+ E_SOURCE_EXTENSION_TASK_LIST,
+ E_CAL_CLIENT_SOURCE_TYPE_TASKS),
gtk_label_new ("Tasks"));
gtk_notebook_append_page (
GTK_NOTEBOOK (notebook),
- create_page (registry, E_SOURCE_EXTENSION_ADDRESS_BOOK, E_CAL_CLIENT_SOURCE_TYPE_LAST),
+ create_page (
+ registry,
+ E_SOURCE_EXTENSION_ADDRESS_BOOK,
+ E_CAL_CLIENT_SOURCE_TYPE_LAST),
gtk_label_new ("Books"));
gtk_widget_show_all (window);
@@ -311,16 +382,16 @@ main (gint argc,
gchar **argv)
{
ESourceRegistry *registry;
- GError *error = NULL;
+ GError *local_error = NULL;
gtk_init (&argc, &argv);
- registry = e_source_registry_new_sync (NULL, &error);
+ registry = e_source_registry_new_sync (NULL, &local_error);
- if (error != NULL) {
+ if (local_error != NULL) {
g_error (
"Failed to load ESource registry: %s",
- error->message);
+ local_error->message);
g_assert_not_reached ();
}
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index 37e19706e6..bcf74bb0af 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -1156,16 +1156,18 @@ rename_folders (MailFolderCache *cache,
oldfile = g_strdup_printf ("%s/custom_view-%s.xml", config_dir, olduri);
newfile = g_strdup_printf ("%s/custom_view-%s.xml", config_dir, newuri);
if (g_rename (oldfile, newfile) == -1) {
- g_warning ("%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
- oldfile, newfile, g_strerror (errno));
+ g_warning (
+ "%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
+ oldfile, newfile, g_strerror (errno));
}
g_free (oldfile);
g_free (newfile);
oldfile = g_strdup_printf ("%s/current_view-%s.xml", config_dir, olduri);
newfile = g_strdup_printf ("%s/current_view-%s.xml", config_dir, newuri);
if (g_rename (oldfile, newfile) == -1) {
- g_warning ("%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
- oldfile, newfile, g_strerror (errno));
+ g_warning (
+ "%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
+ oldfile, newfile, g_strerror (errno));
}
g_free (oldfile);
g_free (newfile);
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c
index eddc87ebf4..23c52847b1 100644
--- a/libgnomecanvas/gnome-canvas-text.c
+++ b/libgnomecanvas/gnome-canvas-text.c
@@ -941,7 +941,8 @@ gnome_canvas_text_set_property (GObject *object,
(color.blue & 0xff00) |
0xff);
} else {
- g_warning ("%s: Failed to parse color form string '%s'",
+ g_warning (
+ "%s: Failed to parse color form string '%s'",
G_STRFUNC, color_name);
}
}
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index e51a83eacc..ff2b8c8442 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -638,8 +638,9 @@ mail_backend_folder_renamed_cb (MailFolderCache *folder_cache,
/* Ignore errors; doesn't matter. */
if (g_rename (oldname, newname) == -1) {
- g_warning ("%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
- oldname, newname, g_strerror (errno));
+ g_warning (
+ "%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
+ oldname, newname, g_strerror (errno));
}
g_free (oldname);
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 6a97b7342f..dbd80334cc 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -267,8 +267,9 @@ em_rename_view_in_folder (gpointer data,
newname = g_build_filename (views_dir, newfile, NULL);
if (g_rename (oldname, newname) == -1) {
- g_warning ("%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
- oldname, newname, g_strerror (errno));
+ g_warning (
+ "%s: Failed to rename '%s' to '%s': %s", G_STRFUNC,
+ oldname, newname, g_strerror (errno));
}
g_checksum_free (checksum);
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index 52a7314ec5..86d99838d0 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -1596,8 +1596,12 @@ subscription_editor_constructed (GObject *object)
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (em_subscription_editor_parent_class)->constructed (object);
- g_signal_connect (editor, "delete-event", G_CALLBACK (subscription_editor_delete_event_cb), NULL);
- g_signal_connect (editor, "response", G_CALLBACK (subscription_editor_response_cb), NULL);
+ g_signal_connect (
+ editor, "delete-event",
+ G_CALLBACK (subscription_editor_delete_event_cb), NULL);
+ g_signal_connect (
+ editor, "response",
+ G_CALLBACK (subscription_editor_response_cb), NULL);
}
static void
diff --git a/modules/cal-config-weather/evolution-cal-config-weather.c b/modules/cal-config-weather/evolution-cal-config-weather.c
index 25b3c2bda0..1e4160dc8d 100644
--- a/modules/cal-config-weather/evolution-cal-config-weather.c
+++ b/modules/cal-config-weather/evolution-cal-config-weather.c
@@ -79,7 +79,8 @@ cal_config_weather_location_to_string (GBinding *binding,
if (location) {
gdouble latitude, longitude;
- gchar lat_str[G_ASCII_DTOSTR_BUF_SIZE + 1], lon_str[G_ASCII_DTOSTR_BUF_SIZE + 1];
+ gchar lat_str[G_ASCII_DTOSTR_BUF_SIZE + 1];
+ gchar lon_str[G_ASCII_DTOSTR_BUF_SIZE + 1];
gweather_location_get_coords (location, &latitude, &longitude);
@@ -96,13 +97,13 @@ cal_config_weather_location_to_string (GBinding *binding,
static GWeatherLocation *
cal_config_weather_find_location_by_coords (GWeatherLocation *start,
- gdouble latitude,
- gdouble longitude)
+ gdouble latitude,
+ gdouble longitude)
{
GWeatherLocation *location, **children;
gint ii;
- if (!start)
+ if (start == NULL)
return NULL;
location = start;
@@ -117,8 +118,9 @@ cal_config_weather_find_location_by_coords (GWeatherLocation *start,
children = gweather_location_get_children (location);
for (ii = 0; children[ii]; ii++) {
- location = cal_config_weather_find_location_by_coords (children[ii], latitude, longitude);
- if (location)
+ location = cal_config_weather_find_location_by_coords (
+ children[ii], latitude, longitude);
+ if (location != NULL)
return location;
}
@@ -154,7 +156,8 @@ cal_config_weather_string_to_location (GBinding *binding,
latitude = g_ascii_strtod (tokens[0], NULL);
longitude = g_ascii_strtod (tokens[1], NULL);
- match = cal_config_weather_find_location_by_coords (world, latitude, longitude);
+ match = cal_config_weather_find_location_by_coords (
+ world, latitude, longitude);
g_value_set_boxed (target_value, match);
@@ -167,7 +170,7 @@ cal_config_weather_string_to_location (GBinding *binding,
static gboolean
is_locale_metric (void)
{
- const char *fmt;
+ const gchar *fmt;
fmt = nl_langinfo (_NL_MEASUREMENT_MEASUREMENT);
if (fmt && *fmt == 2)
@@ -179,7 +182,7 @@ is_locale_metric (void)
static ESourceWeatherUnits
cal_config_weather_get_units_from_locale (void)
{
- return is_locale_metric() ?
+ return is_locale_metric () ?
E_SOURCE_WEATHER_UNITS_CENTIGRADE :
E_SOURCE_WEATHER_UNITS_FAHRENHEIT;
}
@@ -211,11 +214,13 @@ cal_config_weather_insert_widgets (ESourceConfigBackend *backend,
GWeatherLocation *world;
GtkWidget *widget;
Context *context;
+ const gchar *extension_name;
const gchar *uid;
#if HAVE_NL_LANGINFO
gboolean is_new_source;
- is_new_source = !e_source_has_extension (scratch_source, E_SOURCE_EXTENSION_WEATHER_BACKEND);
+ is_new_source = !e_source_has_extension (
+ scratch_source, E_SOURCE_EXTENSION_WEATHER_BACKEND);
#endif
context = g_slice_new (Context);
@@ -241,15 +246,17 @@ cal_config_weather_insert_widgets (ESourceConfigBackend *backend,
/* keep the same order as in the ESourceWeatherUnits */
gtk_combo_box_text_append_text (
GTK_COMBO_BOX_TEXT (widget),
- /* TRANSLATOR: This is the temperature in degrees Fahrenheit (\302\260 is U+00B0 DEGREE SIGN) */
+ /* Translators: This is the temperature in degrees
+ * Fahrenheit. (\302\260 is U+00B0 DEGREE SIGN) */
_("Fahrenheit (\302\260F)"));
gtk_combo_box_text_append_text (
GTK_COMBO_BOX_TEXT (widget),
- /* TRANSLATOR: This is the temperature in degrees Celsius (\302\260 is U+00B0 DEGREE SIGN) */
+ /* Translators: This is the temperature in degrees
+ * Celsius. (\302\260 is U+00B0 DEGREE SIGN) */
_("Centigrade (\302\260C)"));
gtk_combo_box_text_append_text (
GTK_COMBO_BOX_TEXT (widget),
- /* TRANSLATOR: This is the temperature in kelvin */
+ /* Translators: This is the temperature in kelvin. */
_("Kelvin (K)"));
e_source_config_insert_widget (
config, scratch_source, _("Units:"), widget);
@@ -257,7 +264,8 @@ cal_config_weather_insert_widgets (ESourceConfigBackend *backend,
e_source_config_add_refresh_interval (config, scratch_source);
- extension = e_source_get_extension (scratch_source, E_SOURCE_EXTENSION_WEATHER_BACKEND);
+ extension_name = E_SOURCE_EXTENSION_WEATHER_BACKEND;
+ extension = e_source_get_extension (scratch_source, extension_name);
#if HAVE_NL_LANGINFO
if (is_new_source)
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index c03b3e3b00..581ef162a9 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -995,9 +995,9 @@ e_cal_shell_view_set_status_message (ECalShellView *cal_shell_view,
static void
cal_transferring_update_alert (ECalShellView *cal_shell_view,
- const gchar *domain,
- const gchar *calendar,
- const gchar *message)
+ const gchar *domain,
+ const gchar *calendar,
+ const gchar *message)
{
ECalShellViewPrivate *priv;
EShellContent *shell_content;
@@ -1039,8 +1039,8 @@ typedef struct _TransferItemToData {
static void
transfer_item_to_cb (GObject *src_object,
- GAsyncResult *result,
- gpointer user_data)
+ GAsyncResult *result,
+ gpointer user_data)
{
TransferItemToData *titd = user_data;
GError *error = NULL;
diff --git a/modules/itip-formatter/itip-view.c b/modules/itip-formatter/itip-view.c
index 0759285d1a..62ef4fe1f0 100644
--- a/modules/itip-formatter/itip-view.c
+++ b/modules/itip-formatter/itip-view.c
@@ -910,7 +910,7 @@ append_info_item_row (ItipView *view,
id = g_strdup_printf ("%s_row_%d", table_id, item->id);
#if WEBKIT_CHECK_VERSION(2,2,0) /* XXX should really be (2,1,something) */
- webkit_dom_element_set_id (WEBKIT_DOM_ELEMENT(row), id);
+ webkit_dom_element_set_id (WEBKIT_DOM_ELEMENT (row), id);
#else
webkit_dom_html_element_set_id (row, id);
#endif
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index 97cb6abf5e..5029298ca8 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -377,8 +377,9 @@ external_editor_thread (gpointer user_data)
/* We no longer need that temporary file */
if (g_remove (filename) == -1)
- g_warning ("%s: Failed to remove file '%s': %s",
- G_STRFUNC, filename, g_strerror (errno));
+ g_warning (
+ "%s: Failed to remove file '%s': %s",
+ G_STRFUNC, filename, g_strerror (errno));
g_free (filename);
}
}
diff --git a/shell/e-convert-local-mail.c b/shell/e-convert-local-mail.c
index ab773813d1..7cde47848d 100644
--- a/shell/e-convert-local-mail.c
+++ b/shell/e-convert-local-mail.c
@@ -173,8 +173,9 @@ rename_mbox_dir (ESource *mbox_source,
if (need_rename) {
if (g_rename (old_mail_dir, new_mail_dir) == -1)
- g_warning ("%s: Failed to rename '%s' to '%s': %s",
- G_STRFUNC, old_mail_dir, new_mail_dir, g_strerror (errno));
+ g_warning (
+ "%s: Failed to rename '%s' to '%s': %s",
+ G_STRFUNC, old_mail_dir, new_mail_dir, g_strerror (errno));
}
g_free (old_mail_dir);
@@ -253,8 +254,9 @@ migrate_mbox_to_maildir (EShell *shell,
path = g_build_filename (data_dir, "local", NULL);
g_object_set (settings, "path", path, NULL);
if (g_mkdir (path, 0700) == -1)
- g_warning ("%s: Failed to make directory '%s': %s",
- G_STRFUNC, path, g_strerror (errno));
+ g_warning (
+ "%s: Failed to make directory '%s': %s",
+ G_STRFUNC, path, g_strerror (errno));
g_free (path);
g_object_unref (settings);