aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-11-10 11:40:00 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-11-11 04:54:43 +0800
commit2c4ae5e7685c462f8d464448e4617b8dea029e72 (patch)
treec34f0cbb7c500ff70f10fce846631b0a948b341c /plugins
parent583da46b8caf4b2a8b548b03c38fe0e84164abfb (diff)
downloadgsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.tar.gz
gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.tar.zst
gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/bbdb/bbdb.c19
-rw-r--r--plugins/dbx-import/dbx-importer.c8
-rw-r--r--plugins/email-custom-header/email-custom-header.c26
-rw-r--r--plugins/external-editor/external-editor.c9
-rw-r--r--plugins/mail-notification/mail-notification.c14
-rw-r--r--plugins/mail-to-task/mail-to-task.c60
-rw-r--r--plugins/mailing-list-actions/mailing-list-actions.c11
-rw-r--r--plugins/pst-import/pst-importer.c30
-rw-r--r--plugins/publish-calendar/publish-calendar.c76
-rw-r--r--plugins/publish-calendar/url-editor-dialog.c13
-rw-r--r--plugins/save-calendar/rdf-format.c5
-rw-r--r--plugins/save-calendar/save-calendar.c30
-rw-r--r--plugins/templates/templates.c73
13 files changed, 225 insertions, 149 deletions
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index b06d168fed..c19551944b 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -361,7 +361,7 @@ bbdb_do_it (EBookClient *client,
g_error_free (error);
}
- g_object_unref (G_OBJECT (contact));
+ g_object_unref (contact);
g_free (uid);
}
@@ -383,7 +383,7 @@ bbdb_create_book_client (gint type)
if (type == AUTOMATIC_CONTACTS_ADDRESSBOOK)
enable = g_settings_get_boolean (settings, CONF_KEY_ENABLE);
if (!enable) {
- g_object_unref (G_OBJECT (settings));
+ g_object_unref (settings);
return NULL;
}
@@ -394,7 +394,7 @@ bbdb_create_book_client (gint type)
else
uid = g_settings_get_string (
settings, CONF_KEY_WHICH_ADDRESSBOOK);
- g_object_unref (G_OBJECT (settings));
+ g_object_unref (settings);
shell = e_shell_get_default ();
registry = e_shell_get_registry (shell);
@@ -428,11 +428,14 @@ bbdb_open_book_client (EBookClient *client)
if (!client)
return FALSE;
- if (!e_client_open_sync (E_CLIENT (client), FALSE, NULL, &error)) {
- g_warning ("bbdb: failed to open addressbook: %s", error ? error->message : "Unknown error");
- if (error)
- g_error_free (error);
+ e_client_open_sync (E_CLIENT (client), FALSE, NULL, &error);
+
+ if (error != NULL) {
+ g_warning (
+ "bbdb: failed to open addressbook: %s",
+ error->message);
g_object_unref (client);
+ g_error_free (error);
return FALSE;
}
@@ -448,7 +451,7 @@ bbdb_check_gaim_enabled (void)
settings = g_settings_new (CONF_SCHEMA);
gaim_enabled = g_settings_get_boolean (settings, CONF_KEY_ENABLE_GAIM);
- g_object_unref (G_OBJECT (settings));
+ g_object_unref (settings);
return gaim_enabled;
}
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index 7f850ae631..5d00da5e19 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -359,7 +359,8 @@ static gboolean dbx_load_index_table (DbxImporter *m, guint32 pos, guint32 *inde
return FALSE;
}
- d (printf ("Index at %x: indexCount %x, anotherTablePtr %x\n",
+ d (
+ printf ("Index at %x: indexCount %x, anotherTablePtr %x\n",
pos, tindex.indexCount, tindex.anotherTablePtr));
if (tindex.indexCount > 0) {
@@ -658,8 +659,9 @@ dbx_import_file (DbxImporter *m)
camel_operation_progress (cancellable, 100 * i / m->index_count);
if (!dbx_read_email (m, m->indices[i], tmpfile, &dbx_flags)) {
- d (printf ("Cannot read email index %d at %x\n",
- i, m->indices[i]));
+ d (
+ printf ("Cannot read email index %d at %x\n",
+ i, m->indices[i]));
if (m->base.error != NULL)
goto out;
missing++;
diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c
index 07d0f280ae..5f66489c07 100644
--- a/plugins/email-custom-header/email-custom-header.c
+++ b/plugins/email-custom-header/email-custom-header.c
@@ -151,7 +151,8 @@ epech_fill_widgets_with_data (CustomHeaderOptionsDialog *mch)
if (priv->flag == 0) {
gtk_combo_box_set_active ((GtkComboBox *) sub_combo_box_fill->header_value_combo_box,0);
} else {
- gtk_combo_box_set_active ((GtkComboBox *) sub_combo_box_fill->header_value_combo_box,
+ gtk_combo_box_set_active (
+ (GtkComboBox *) sub_combo_box_fill->header_value_combo_box,
g_array_index (priv->header_index_type, gint, set_index_column));
}
}
@@ -189,7 +190,7 @@ epech_header_options_cb (GtkDialog *dialog,
break;
}
- g_signal_emit (G_OBJECT (func_data), signals[MCH_RESPONSE], 0, state);
+ g_signal_emit (func_data, signals[MCH_RESPONSE], 0, state);
}
static gboolean
@@ -315,7 +316,9 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch)
str = g_dpgettext2 (GETTEXT_PACKAGE, "email-custom-header-Security", security_field);
gtk_label_set_markup (GTK_LABEL (priv->header_type_name_label), str);
- gtk_table_attach (GTK_TABLE (priv->header_table), priv->header_type_name_label, 0, 1, row, column,
+ gtk_table_attach (
+ GTK_TABLE (priv->header_table),
+ priv->header_type_name_label, 0, 1, row, column,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
@@ -330,7 +333,8 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch)
temp = &g_array_index (priv->email_custom_header_details, EmailCustomHeaderDetails,sub_index);
sub_combo_box_ptr = &g_array_index (priv->combo_box_header_value, HeaderValueComboBox,sub_index);
- gtk_table_attach (GTK_TABLE (priv->header_table),
+ gtk_table_attach (
+ GTK_TABLE (priv->header_table),
sub_combo_box_ptr->header_value_combo_box, 1, 2, row_combo, column_combo,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
@@ -424,7 +428,8 @@ epech_append_to_custom_header (CustomHeaderOptionsDialog *dialog,
temp_header_value_ptr = &g_array_index (temp_header_ptr->sub_header_type_value, CustomSubHeader,sub_type_index);
if (sub_type_index == g_array_index (priv->header_index_type, gint, index_subtype)) {
- e_msg_composer_set_header (composer, (temp_header_ptr->header_type_value)->str,
+ e_msg_composer_set_header (
+ composer, (temp_header_ptr->header_type_value)->str,
(temp_header_value_ptr->sub_header_string_value)->str);
}
}
@@ -566,7 +571,8 @@ commit_changes (ConfigData *cd)
while (valid) {
gchar *keyword = NULL, *value = NULL;
- gtk_tree_model_get (model, &iter,
+ gtk_tree_model_get (
+ model, &iter,
HEADER_KEY_COLUMN, &keyword,
HEADER_VALUE_COLUMN, &value,
-1);
@@ -848,8 +854,9 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
gtk_tree_view_set_model (GTK_TREE_VIEW (cd->treeview), GTK_TREE_MODEL (cd->store));
renderer = gtk_cell_renderer_text_new ();
- col_pos = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (cd->treeview), -1, _("Key"),
- renderer, "text", HEADER_KEY_COLUMN, NULL);
+ col_pos = gtk_tree_view_insert_column_with_attributes (
+ GTK_TREE_VIEW (cd->treeview), -1, _("Key"),
+ renderer, "text", HEADER_KEY_COLUMN, NULL);
col = gtk_tree_view_get_column (GTK_TREE_VIEW (cd->treeview), col_pos -1);
gtk_tree_view_column_set_resizable (col, TRUE);
gtk_tree_view_column_set_reorderable (col, TRUE);
@@ -864,7 +871,8 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
G_CALLBACK (cell_editing_canceled_cb), cd);
renderer = gtk_cell_renderer_text_new ();
- col_pos = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (cd->treeview), -1, _("Values"),
+ col_pos = gtk_tree_view_insert_column_with_attributes (
+ GTK_TREE_VIEW (cd->treeview), -1, _("Values"),
renderer, "text", HEADER_VALUE_COLUMN, NULL);
col = gtk_tree_view_get_column (GTK_TREE_VIEW (cd->treeview), col_pos -1);
gtk_tree_view_column_set_resizable (col, TRUE);
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index 42cdb9f9ff..0c43acbfdc 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -290,7 +290,7 @@ external_editor_thread (gpointer user_data)
settings = g_settings_new ("org.gnome.evolution.plugin.external-editor");
editor_cmd = g_settings_get_string (settings, "command");
if (!editor_cmd) {
- if (!(editor_cmd = g_strdup (g_getenv ("EDITOR"))) )
+ if (!(editor_cmd = g_strdup (g_getenv ("EDITOR"))))
/* Make gedit the default external editor,
* if the default schemas are not installed
* and no $EDITOR is set. */
@@ -302,7 +302,7 @@ external_editor_thread (gpointer user_data)
&& gtk_html_get_cursor_pos (
gtkhtml_editor_get_html (
GTKHTML_EDITOR (composer)), &position, &offset)
- && position >= 0 && offset >= 0) {
+ && position >= 0 && offset >= 0) {
gchar *tmp = editor_cmd;
gint lineno;
gboolean set_nofork;
@@ -365,8 +365,9 @@ external_editor_thread (gpointer user_data)
htmltext = camel_text_to_html (buf, CAMEL_MIME_FILTER_TOHTML_PRE, 0);
- array = g_array_sized_new (TRUE, TRUE,
- sizeof (gpointer), 2 * sizeof (gpointer));
+ array = g_array_sized_new (
+ TRUE, TRUE,
+ sizeof (gpointer), 2 * sizeof (gpointer));
array = g_array_append_val (array, composer);
array = g_array_append_val (array, htmltext);
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index 94cfa6c6c1..cc01d65c30 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -509,13 +509,15 @@ do_play_sound (gboolean beep,
if (!beep) {
#ifdef HAVE_CANBERRA
if (!use_theme && file && *file)
- ca_context_play (mailnotification, 0,
- CA_PROP_MEDIA_FILENAME, file,
- NULL);
+ ca_context_play (
+ mailnotification, 0,
+ CA_PROP_MEDIA_FILENAME, file,
+ NULL);
else
- ca_context_play (mailnotification, 0,
- CA_PROP_EVENT_ID,"message-new-email",
- NULL);
+ ca_context_play (
+ mailnotification, 0,
+ CA_PROP_EVENT_ID,"message-new-email",
+ NULL);
#endif
} else
gdk_beep ();
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 36801ccb99..a9a2042bef 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -291,9 +291,10 @@ set_description (ECalComponent *comp,
/* convert to UTF-8 string */
if (str && content->mime_type->params && content->mime_type->params->value) {
- convert_str = g_convert (str, strlen (str),
- "UTF-8", content->mime_type->params->value,
- &bytes_read, &bytes_written, NULL);
+ convert_str = g_convert (
+ str, strlen (str),
+ "UTF-8", content->mime_type->params->value,
+ &bytes_read, &bytes_written, NULL);
}
text = g_new0 (ECalComponentText, 1);
@@ -589,14 +590,16 @@ do_ask (const gchar *text,
gboolean is_create_edit_add)
{
gint res;
- GtkWidget *dialog = gtk_message_dialog_new (NULL,
+ GtkWidget *dialog = gtk_message_dialog_new (
+ NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION,
is_create_edit_add ? GTK_BUTTONS_NONE : GTK_BUTTONS_YES_NO,
"%s", text);
if (is_create_edit_add) {
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+ gtk_dialog_add_buttons (
+ GTK_DIALOG (dialog),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_EDIT, GTK_RESPONSE_YES,
GTK_STOCK_NEW, GTK_RESPONSE_NO,
@@ -642,21 +645,24 @@ get_question_add_all_mails (ECalClientSourceType source_type,
switch (source_type) {
case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
/* Translators: Note there are always more than 10 mails selected */
- ask = ngettext ("You have selected %d mails to be converted to events. Do you really want to add them all?",
- "You have selected %d mails to be converted to events. Do you really want to add them all?",
- count);
+ ask = ngettext (
+ "You have selected %d mails to be converted to events. Do you really want to add them all?",
+ "You have selected %d mails to be converted to events. Do you really want to add them all?",
+ count);
break;
case E_CAL_CLIENT_SOURCE_TYPE_TASKS:
/* Translators: Note there are always more than 10 mails selected */
- ask = ngettext ("You have selected %d mails to be converted to tasks. Do you really want to add them all?",
- "You have selected %d mails to be converted to tasks. Do you really want to add them all?",
- count);
+ ask = ngettext (
+ "You have selected %d mails to be converted to tasks. Do you really want to add them all?",
+ "You have selected %d mails to be converted to tasks. Do you really want to add them all?",
+ count);
break;
case E_CAL_CLIENT_SOURCE_TYPE_MEMOS:
/* Translators: Note there are always more than 10 mails selected */
- ask = ngettext ("You have selected %d mails to be converted to memos. Do you really want to add them all?",
- "You have selected %d mails to be converted to memos. Do you really want to add them all?",
- count);
+ ask = ngettext (
+ "You have selected %d mails to be converted to memos. Do you really want to add them all?",
+ "You have selected %d mails to be converted to memos. Do you really want to add them all?",
+ count);
break;
default:
g_assert_not_reached ();
@@ -712,8 +718,9 @@ comp_editor_title_changed (GtkWidget *widget,
comp_name = g_strndup (title, splitter - title - 1);
task_name = g_strdup (splitter + 2);
- new_title = g_strdup_printf ("%s (%d/%d) - %s",
- comp_name, mc->mails_done, mc->mails_count, task_name);
+ new_title = g_strdup_printf (
+ "%s (%d/%d) - %s",
+ comp_name, mc->mails_done, mc->mails_count, task_name);
/* Remember the new title, so that when gtk_window_set_title() causes
* this handler to be recursively called, we can recognize that and
@@ -760,7 +767,8 @@ do_manage_comp_idle (struct _manage_comp *mc)
if (!e_cal_component_set_icalcomponent (edit_comp, icalcomponent_new_clone (mc->stored_comp))) {
g_object_unref (edit_comp);
edit_comp = NULL;
- error = g_error_new (E_CAL_CLIENT_ERROR,
+ error = g_error_new (
+ E_CAL_CLIENT_ERROR,
E_CAL_CLIENT_ERROR_INVALID_OBJECT,
"%s", _("Invalid object returned from a server"));
@@ -785,8 +793,9 @@ do_manage_comp_idle (struct _manage_comp *mc)
/* FIXME Pass in the EShell instance. */
shell = e_shell_get_default ();
- editor = get_component_editor (shell, mc->client, edit_comp,
- edit_comp == mc->comp, &error);
+ editor = get_component_editor (
+ shell, mc->client, edit_comp,
+ edit_comp == mc->comp, &error);
if (editor && !error) {
/* Force editor's title change */
@@ -838,8 +847,10 @@ do_mail_to_event (AsyncData *data)
GError *err = NULL;
/* open the task client */
- if (!e_client_open_sync (E_CLIENT (client), FALSE, NULL, &err)) {
- report_error_idle (_("Cannot open calendar. %s"), err ? err->message : _("Unknown error."));
+ e_client_open_sync (E_CLIENT (client), FALSE, NULL, &err);
+
+ if (err != NULL) {
+ report_error_idle (_("Cannot open calendar. %s"), err->message);
} else if (e_client_is_readonly (E_CLIENT (client))) {
if (err)
report_error_idle ("Check readonly failed. %s", err->message);
@@ -1218,9 +1229,10 @@ mail_to_event (ECalClientSourceType source_type,
else
data->selected_text = NULL;
- thread = g_thread_try_new (NULL, (GThreadFunc) do_mail_to_event, data, &error);
- if (!thread) {
- g_warning (G_STRLOC ": %s", error ? error->message : "Unknown error");
+ thread = g_thread_try_new (
+ NULL, (GThreadFunc) do_mail_to_event, data, &error);
+ if (error != NULL) {
+ g_warning (G_STRLOC ": %s", error->message);
g_error_free (error);
} else {
g_thread_unref (thread);
diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c
index b31414276b..fb6be6ba1d 100644
--- a/plugins/mailing-list-actions/mailing-list-actions.c
+++ b/plugins/mailing-list-actions/mailing-list-actions.c
@@ -193,10 +193,13 @@ emla_list_action_cb (CamelFolder *folder,
}
for (t = 0; t < G_N_ELEMENTS (emla_action_headers); t++) {
- if (emla_action_headers[t].action == context->action &&
- (header = camel_medium_get_header (CAMEL_MEDIUM (message),
- emla_action_headers[t].header)) != NULL)
- break;
+ if (emla_action_headers[t].action == context->action) {
+ header = camel_medium_get_header (
+ CAMEL_MEDIUM (message),
+ emla_action_headers[t].header);
+ if (header != NULL)
+ break;
+ }
}
if (!header) {
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index 958b374ebc..e691962f67 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -1403,8 +1403,9 @@ pst_process_email (PstImporter *m,
} else if (item->body.str) {
camel_mime_part_set_content (CAMEL_MIME_PART (msg), item->body.str, strlen (item->body.str), "text/plain");
} else {
- g_warning ("Email without body. Subject:%s",
- (item->subject.str ? item->subject.str : "(empty)"));
+ g_warning (
+ "Email without body. Subject:%s",
+ (item->subject.str ? item->subject.str : "(empty)"));
camel_mime_part_set_content (CAMEL_MIME_PART (msg), "\n", 1, "text/plain");
}
@@ -1510,7 +1511,7 @@ contact_set_date (EContact *contact,
EContactField id,
FILETIME *date)
{
- if (date && (date->dwLowDateTime || date->dwHighDateTime) ) {
+ if (date && (date->dwLowDateTime || date->dwHighDateTime)) {
time_t t1;
struct tm tm;
EContactDate *bday;
@@ -1580,17 +1581,20 @@ pst_process_contact (PstImporter *m,
contact_set_string (ec, E_CONTACT_ORG_UNIT, c->department.str);
contact_set_string (ec, E_CONTACT_TITLE, c->job_title.str);
- contact_set_address (ec,E_CONTACT_ADDRESS_WORK,
- c->business_address.str, c->business_city.str, c->business_country.str,
- c->business_po_box.str, c->business_postal_code.str, c->business_state.str, c->business_street.str);
+ contact_set_address (
+ ec,E_CONTACT_ADDRESS_WORK,
+ c->business_address.str, c->business_city.str, c->business_country.str,
+ c->business_po_box.str, c->business_postal_code.str, c->business_state.str, c->business_street.str);
- contact_set_address (ec,E_CONTACT_ADDRESS_HOME,
- c->home_address.str, c->home_city.str, c->home_country.str,
- c->home_po_box.str, c->home_postal_code.str, c->home_state.str, c->home_street.str);
+ contact_set_address (
+ ec,E_CONTACT_ADDRESS_HOME,
+ c->home_address.str, c->home_city.str, c->home_country.str,
+ c->home_po_box.str, c->home_postal_code.str, c->home_state.str, c->home_street.str);
- contact_set_address (ec,E_CONTACT_ADDRESS_OTHER,
- c->other_address.str, c->other_city.str, c->other_country.str,
- c->other_po_box.str, c->other_postal_code.str, c->other_state.str, c->other_street.str);
+ contact_set_address (
+ ec,E_CONTACT_ADDRESS_OTHER,
+ c->other_address.str, c->other_city.str, c->other_country.str,
+ c->other_po_box.str, c->other_postal_code.str, c->other_state.str, c->other_street.str);
contact_set_string (ec, E_CONTACT_PHONE_ASSISTANT, c->assistant_phone.str);
contact_set_string (ec, E_CONTACT_PHONE_BUSINESS_FAX, c->business_fax.str);
@@ -1699,7 +1703,7 @@ struct icaltimetype
get_ical_date (FILETIME *date,
gboolean is_date)
{
- if (date && (date->dwLowDateTime || date->dwHighDateTime) ) {
+ if (date && (date->dwLowDateTime || date->dwHighDateTime)) {
time_t t;
t = pst_fileTimeToUnixTime (date);
diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c
index ab3e36dd6d..9a06c45b38 100644
--- a/plugins/publish-calendar/publish-calendar.c
+++ b/plugins/publish-calendar/publish-calendar.c
@@ -182,9 +182,10 @@ publish_uri_async (EPublishUri *uri)
GThread *thread = NULL;
GError *error = NULL;
- thread = g_thread_try_new (NULL, (GThreadFunc) publish_no_succ_info, uri, &error);
- if (!thread) {
- g_warning (G_STRLOC ": %s", error ? error->message : "Unknown error");
+ thread = g_thread_try_new (
+ NULL, (GThreadFunc) publish_no_succ_info, uri, &error);
+ if (error != NULL) {
+ g_warning (G_STRLOC ": %s", error->message);
g_error_free (error);
} else {
g_thread_unref (thread);
@@ -328,16 +329,21 @@ ask_password (GMountOperation *op,
username = soup_uri_get_user (soup_uri);
password = e_passwords_get_password (NULL, ms->uri->location);
- req_pass = ((username && *username) && !(ms->uri->service_type == TYPE_ANON_FTP &&
- !strcmp (username, "anonymous"))) ? TRUE : FALSE;
+ req_pass =
+ ((username && *username) &&
+ !(ms->uri->service_type == TYPE_ANON_FTP &&
+ !strcmp (username, "anonymous")));
if (!password && req_pass) {
gboolean remember = FALSE;
- password = e_passwords_ask_password (_("Enter password"), NULL, ms->uri->location, message,
- E_PASSWORDS_REMEMBER_FOREVER | E_PASSWORDS_SECRET | E_PASSWORDS_ONLINE,
- &remember,
- NULL);
+ password = e_passwords_ask_password (
+ _("Enter password"), NULL,
+ ms->uri->location, message,
+ E_PASSWORDS_REMEMBER_FOREVER |
+ E_PASSWORDS_SECRET |
+ E_PASSWORDS_ONLINE,
+ &remember, NULL);
if (!password) {
/* user canceled password dialog */
@@ -379,9 +385,10 @@ ask_question (GMountOperation *op,
primary = g_strndup (message, strlen (message) - strlen (primary));
}
- dialog = gtk_message_dialog_new (NULL,
- 0, GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_NONE, "%s", primary);
+ dialog = gtk_message_dialog_new (
+ NULL,
+ 0, GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_NONE, "%s", primary);
g_free (primary);
if (secondary) {
@@ -728,10 +735,11 @@ url_edit_clicked (GtkButton *button,
url_editor = url_editor_dialog_new (model, uri);
if (url_editor_dialog_run ((UrlEditorDialog *) url_editor)) {
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- URL_LIST_ENABLED_COLUMN, uri->enabled,
- URL_LIST_LOCATION_COLUMN, uri->location,
- URL_LIST_URL_COLUMN, uri, -1);
+ gtk_list_store_set (
+ GTK_LIST_STORE (model), &iter,
+ URL_LIST_ENABLED_COLUMN, uri->enabled,
+ URL_LIST_LOCATION_COLUMN, uri->location,
+ URL_LIST_URL_COLUMN, uri, -1);
id = GPOINTER_TO_UINT (g_hash_table_lookup (uri_timeouts, uri));
if (id)
@@ -771,9 +779,10 @@ url_remove_clicked (GtkButton *button,
gtk_tree_model_get (model, &iter, URL_LIST_URL_COLUMN, &url, -1);
- confirm = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
- _("Are you sure you want to remove this location?"));
+ confirm = gtk_message_dialog_new (
+ NULL, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
+ _("Are you sure you want to remove this location?"));
gtk_dialog_add_button (GTK_DIALOG (confirm), GTK_STOCK_CANCEL, GTK_RESPONSE_NO);
gtk_dialog_add_button (GTK_DIALOG (confirm), GTK_STOCK_REMOVE, GTK_RESPONSE_YES);
gtk_dialog_set_default_response (GTK_DIALOG (confirm), GTK_RESPONSE_CANCEL);
@@ -863,14 +872,16 @@ publish_calendar_locations (EPlugin *epl,
renderer = gtk_cell_renderer_toggle_new ();
g_object_set (renderer, "activatable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (ui->treeview), -1, _("Enabled"),
- renderer, "active", URL_LIST_ENABLED_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes (
+ GTK_TREE_VIEW (ui->treeview), -1, _("Enabled"),
+ renderer, "active", URL_LIST_ENABLED_COLUMN, NULL);
g_signal_connect (
renderer, "toggled",
G_CALLBACK (url_list_enable_toggled), ui);
renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (ui->treeview), -1, _("Location"),
- renderer, "text", URL_LIST_LOCATION_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes (
+ GTK_TREE_VIEW (ui->treeview), -1, _("Location"),
+ renderer, "text", URL_LIST_LOCATION_COLUMN, NULL);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ui->treeview));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
g_signal_connect (
@@ -910,10 +921,11 @@ publish_calendar_locations (EPlugin *epl,
EPublishUri *url = (EPublishUri *) l->data;
gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter,
- URL_LIST_ENABLED_COLUMN, url->enabled,
- URL_LIST_LOCATION_COLUMN, url->location,
- URL_LIST_URL_COLUMN, url, -1);
+ gtk_list_store_set (
+ store, &iter,
+ URL_LIST_ENABLED_COLUMN, url->enabled,
+ URL_LIST_LOCATION_COLUMN, url->location,
+ URL_LIST_URL_COLUMN, url, -1);
l = g_slist_next (l);
}
@@ -995,9 +1007,13 @@ e_plugin_lib_enable (EPlugin *ep,
uris = g_settings_get_strv (settings, PC_SETTINGS_URIS);
g_object_unref (settings);
- thread = g_thread_try_new (NULL, (GThreadFunc) publish_uris_set_timeout, uris, &error);
- if (!thread) {
- g_warning ("Could create thread to set timeout for publishing uris : %s", error ? error->message : "Unknown error");
+ thread = g_thread_try_new (
+ NULL, (GThreadFunc)
+ publish_uris_set_timeout, uris, &error);
+ if (error != NULL) {
+ g_warning (
+ "Could create thread to set timeout "
+ "for publishing uris : %s", error->message);
g_error_free (error);
} else {
g_thread_unref (thread);
diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c
index 3e97756d03..5f8a68e693 100644
--- a/plugins/publish-calendar/url-editor-dialog.c
+++ b/plugins/publish-calendar/url-editor-dialog.c
@@ -87,12 +87,13 @@ create_uri (UrlEditorDialog *dialog)
if (uri->location)
g_free (uri->location);
- uri->location = g_strdup_printf ("%s://%s%s%s%s%s%s%s",
- method,
- username, (username[0] != '\0') ? "@" : "",
- server,
- (port[0] != '\0') ? ":" : "", port,
- (file[0] != '/') ? "/" : "", file);
+ uri->location = g_strdup_printf (
+ "%s://%s%s%s%s%s%s%s",
+ method,
+ username, (username[0] != '\0') ? "@" : "",
+ server,
+ (port[0] != '\0') ? ":" : "", port,
+ (file[0] != '/') ? "/" : "", file);
g_free (server);
g_free (file);
diff --git a/plugins/save-calendar/rdf-format.c b/plugins/save-calendar/rdf-format.c
index c4326ccd0f..28e0b4c35f 100644
--- a/plugins/save-calendar/rdf-format.c
+++ b/plugins/save-calendar/rdf-format.c
@@ -75,8 +75,9 @@ display_error_message (GtkWidget *parent,
{
GtkWidget *dialog;
- dialog = gtk_message_dialog_new (GTK_WINDOW (parent), 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", error->message);
+ dialog = gtk_message_dialog_new (
+ GTK_WINDOW (parent), 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+ "%s", error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c
index 6577335519..9e2c99754e 100644
--- a/plugins/save-calendar/save-calendar.c
+++ b/plugins/save-calendar/save-calendar.c
@@ -87,7 +87,8 @@ on_type_combobox_changed (GtkComboBox *combobox,
gtk_combo_box_get_active_iter (combobox, &iter);
- gtk_tree_model_get (model, &iter,
+ gtk_tree_model_get (
+ model, &iter,
DEST_HANDLER, &handler, -1);
if (handler->options_widget)
@@ -152,18 +153,21 @@ ask_destination_and_save (ESourceSelector *selector,
gtk_list_store_clear (store);
renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
- gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo),
- renderer, "text", DEST_NAME_COLUMN, NULL);
+ gtk_cell_layout_set_attributes (
+ GTK_CELL_LAYOUT (combo),
+ renderer, "text", DEST_NAME_COLUMN, NULL);
while (format_handlers) {
handler = format_handlers->data;
gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter, DEST_NAME_COLUMN,
+ gtk_list_store_set (
+ store, &iter, DEST_NAME_COLUMN,
handler->combo_label, -1);
gtk_list_store_set (store, &iter, DEST_HANDLER, handler, -1);
if (handler->options_widget) {
- gtk_box_pack_start (GTK_BOX (extra_widget),
+ gtk_box_pack_start (
+ GTK_BOX (extra_widget),
GTK_WIDGET (handler->options_widget), TRUE, TRUE, 0);
gtk_widget_hide (handler->options_widget);
}
@@ -182,12 +186,13 @@ ask_destination_and_save (ESourceSelector *selector,
G_CALLBACK (on_type_combobox_changed), extra_widget);
g_object_set_data (G_OBJECT (combo), "format-box", hbox);
- dialog = gtk_file_chooser_dialog_new (_("Select destination file"),
- NULL,
- GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE_AS, GTK_RESPONSE_OK,
- NULL);
+ dialog = gtk_file_chooser_dialog_new (
+ _("Select destination file"),
+ NULL,
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_SAVE_AS, GTK_RESPONSE_OK,
+ NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), extra_widget);
@@ -201,7 +206,8 @@ ask_destination_and_save (ESourceSelector *selector,
gchar *tmp = NULL;
gtk_combo_box_get_active_iter (combo, &iter);
- gtk_tree_model_get (model, &iter,
+ gtk_tree_model_get (
+ model, &iter,
DEST_HANDLER, &handler, -1);
dest_uri = gtk_file_chooser_get_uri
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index 75876f9507..8aa33f8605 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -168,7 +168,8 @@ commit_changes (UIData *ui)
gchar *keyword, *value;
gchar *key;
- gtk_tree_model_get (model, &iter,
+ gtk_tree_model_get (
+ model, &iter,
CLUE_KEYWORD_COLUMN, &keyword,
CLUE_VALUE_COLUMN, &value,
-1);
@@ -263,8 +264,9 @@ key_cell_edited_callback (GtkCellRendererText *cell,
gtk_tree_model_get_iter_from_string (model, &iter, path_string);
gtk_tree_model_get (model, &iter, CLUE_VALUE_COLUMN, &value, -1);
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- CLUE_KEYWORD_COLUMN, new_text, CLUE_VALUE_COLUMN, value, -1);
+ gtk_list_store_set (
+ GTK_LIST_STORE (model), &iter,
+ CLUE_KEYWORD_COLUMN, new_text, CLUE_VALUE_COLUMN, value, -1);
g_free (value);
commit_changes (ui);
@@ -286,8 +288,9 @@ value_cell_edited_callback (GtkCellRendererText *cell,
gtk_tree_model_get (model, &iter, CLUE_KEYWORD_COLUMN, &keyword, -1);
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- CLUE_KEYWORD_COLUMN, keyword, CLUE_VALUE_COLUMN, new_text, -1);
+ gtk_list_store_set (
+ GTK_LIST_STORE (model), &iter,
+ CLUE_KEYWORD_COLUMN, keyword, CLUE_VALUE_COLUMN, new_text, -1);
g_free (keyword);
commit_changes (ui);
@@ -307,13 +310,16 @@ clue_add_clicked (GtkButton *button,
gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc) clue_foreach_check_isempty, ui);
/* Disconnect from signal so that we can create an empty row */
- g_signal_handlers_disconnect_matched (G_OBJECT (model), G_SIGNAL_MATCH_FUNC, 0, 0, NULL, clue_check_isempty, ui);
+ g_signal_handlers_disconnect_matched (
+ model, G_SIGNAL_MATCH_FUNC,
+ 0, 0, NULL, clue_check_isempty, ui);
/* TODO : Trim and check for blank strings */
new_clue = g_strdup ("");
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- CLUE_KEYWORD_COLUMN, new_clue, CLUE_VALUE_COLUMN, new_clue, -1);
+ gtk_list_store_set (
+ GTK_LIST_STORE (model), &iter,
+ CLUE_KEYWORD_COLUMN, new_clue, CLUE_VALUE_COLUMN, new_clue, -1);
focus_col = gtk_tree_view_get_column (GTK_TREE_VIEW (ui->treeview), CLUE_KEYWORD_COLUMN);
path = gtk_tree_model_get_path (model, &iter);
@@ -466,16 +472,18 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
gtk_tree_view_set_model (GTK_TREE_VIEW (ui->treeview), GTK_TREE_MODEL (ui->store));
renderer_key = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (ui->treeview), -1, _("Keywords"),
- renderer_key, "text", CLUE_KEYWORD_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes (
+ GTK_TREE_VIEW (ui->treeview), -1, _("Keywords"),
+ renderer_key, "text", CLUE_KEYWORD_COLUMN, NULL);
g_object_set (renderer_key, "editable", TRUE, NULL);
g_signal_connect (
renderer_key, "edited",
(GCallback) key_cell_edited_callback, ui);
renderer_value = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (ui->treeview), -1, _("Values"),
- renderer_value, "text", CLUE_VALUE_COLUMN, NULL);
+ gtk_tree_view_insert_column_with_attributes (
+ GTK_TREE_VIEW (ui->treeview), -1, _("Values"),
+ renderer_value, "text", CLUE_VALUE_COLUMN, NULL);
g_object_set (renderer_value, "editable", TRUE, NULL);
g_signal_connect (
renderer_value, "edited",
@@ -732,11 +740,13 @@ fill_template (CamelMimeMessage *message,
g_object_unref (stream);
if (template_html && !message_html) {
- gchar *html = camel_text_to_html (message_body->str, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL |
- CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES |
- CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS |
- CAMEL_MIME_FILTER_TOHTML_MARK_CITATION |
- CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES, 0);
+ gchar *html = camel_text_to_html (
+ message_body->str,
+ CAMEL_MIME_FILTER_TOHTML_CONVERT_NL |
+ CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES |
+ CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS |
+ CAMEL_MIME_FILTER_TOHTML_MARK_CITATION |
+ CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES, 0);
g_string_assign (message_body, html);
g_free (html);
} else if (!template_html && message_html) {
@@ -882,30 +892,37 @@ create_new_message (CamelFolder *folder,
m_header = m_header->next;
}
/* Now replace $ORIG[subject] variable, handling possible base64 encryption */
- replace_template_variable (subject, "subject",
+ replace_template_variable (
+ subject, "subject",
camel_mime_message_get_subject (message));
header->value = g_strdup (subject->str);
g_string_free (subject, TRUE);
}
- camel_medium_add_header (CAMEL_MEDIUM (new),
- header->name,
- header->value);
+ camel_medium_add_header (
+ CAMEL_MEDIUM (new),
+ header->name,
+ header->value);
}
header = header->next;
}
/* Set the To: field to the same To: field of the message we are replying to. */
- camel_mime_message_set_recipients (new, CAMEL_RECIPIENT_TYPE_TO,
- camel_mime_message_get_from (message));
+ camel_mime_message_set_recipients (
+ new, CAMEL_RECIPIENT_TYPE_TO,
+ camel_mime_message_get_from (message));
/* Copy the CC and BCC from the template.*/
- camel_mime_message_set_recipients (new, CAMEL_RECIPIENT_TYPE_CC,
- camel_mime_message_get_recipients (template, CAMEL_RECIPIENT_TYPE_CC));
-
- camel_mime_message_set_recipients (new, CAMEL_RECIPIENT_TYPE_BCC,
- camel_mime_message_get_recipients (template, CAMEL_RECIPIENT_TYPE_BCC));
+ camel_mime_message_set_recipients (
+ new, CAMEL_RECIPIENT_TYPE_CC,
+ camel_mime_message_get_recipients (
+ template, CAMEL_RECIPIENT_TYPE_CC));
+
+ camel_mime_message_set_recipients (
+ new, CAMEL_RECIPIENT_TYPE_BCC,
+ camel_mime_message_get_recipients (
+ template, CAMEL_RECIPIENT_TYPE_BCC));
/* Create the composer */
em_utils_edit_message (shell, folder, new, message_uid);