diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-08-14 09:32:32 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-08-14 09:32:32 +0800 |
commit | 4e9050bc1e3c53e0d1ce17646c01f710085ca681 (patch) | |
tree | 44becdd3ec9fbcac74f0aca934a96ffe5dfd2af1 | |
parent | 8f7b23276dfdbc8e62d9c594556c11fd2ce9b199 (diff) | |
download | gsoc2013-evolution-4e9050bc1e3c53e0d1ce17646c01f710085ca681.tar gsoc2013-evolution-4e9050bc1e3c53e0d1ce17646c01f710085ca681.tar.gz gsoc2013-evolution-4e9050bc1e3c53e0d1ce17646c01f710085ca681.tar.bz2 gsoc2013-evolution-4e9050bc1e3c53e0d1ce17646c01f710085ca681.tar.lz gsoc2013-evolution-4e9050bc1e3c53e0d1ce17646c01f710085ca681.tar.xz gsoc2013-evolution-4e9050bc1e3c53e0d1ce17646c01f710085ca681.tar.zst gsoc2013-evolution-4e9050bc1e3c53e0d1ce17646c01f710085ca681.zip |
Whitespace and coding style cleanup.
-rw-r--r-- | e-util/e-signature.c | 2 | ||||
-rw-r--r-- | em-format/em-format-quote.c | 29 | ||||
-rw-r--r-- | em-format/em-format.c | 77 | ||||
-rw-r--r-- | mail/e-mail-message-pane.c | 2 | ||||
-rw-r--r-- | mail/e-mail-notebook-view.c | 78 | ||||
-rw-r--r-- | mail/e-mail-paned-view.c | 2 | ||||
-rw-r--r-- | mail/e-mail-paned-view.h | 4 | ||||
-rw-r--r-- | mail/e-mail-reader.c | 51 | ||||
-rw-r--r-- | mail/e-mail-reader.h | 2 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-backend.c | 1 | ||||
-rw-r--r-- | modules/mail/em-composer-prefs.c | 48 | ||||
-rw-r--r-- | shell/e-shell-migrate.c | 1 | ||||
-rw-r--r-- | smime/gui/certificate-manager.c | 1 | ||||
-rw-r--r-- | widgets/misc/e-canvas.h | 2 | ||||
-rw-r--r-- | widgets/misc/e-preferences-window.c | 3 | ||||
-rw-r--r-- | widgets/misc/test-preferences-window.c | 2 |
16 files changed, 191 insertions, 114 deletions
diff --git a/e-util/e-signature.c b/e-util/e-signature.c index cc699a0438..6b9c1abdbe 100644 --- a/e-util/e-signature.c +++ b/e-util/e-signature.c @@ -503,7 +503,7 @@ e_signature_set_from_xml (ESignature *signature, const gchar *xml) const gchar *user_data_dir; gchar *basename; gchar *filename; - + user_data_dir = e_get_user_data_dir (); filename = signature->priv->filename; diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c index eadaf7d2b4..bbd2e3e0c6 100644 --- a/em-format/em-format-quote.c +++ b/em-format/em-format-quote.c @@ -264,7 +264,8 @@ static const gchar *addrspec_hdrs[] = { #if 0 /* FIXME: include Sender and Resent-* headers too? */ -/* For Translators only: The following strings are used in the header table in the preview pane */ +/* For Translators only: The following strings are + * used in the header table in the preview pane. */ static gchar *i18n_hdrs[] = { N_("From"), N_("Reply-To"), N_("To"), N_("Cc"), N_("Bcc") }; @@ -387,7 +388,10 @@ emfq_format_header (EMFormat *emf, return; buf = camel_header_unfold (txt); - if (!(addrs = camel_header_address_decode (txt, emf->charset ? emf->charset : emf->default_charset))) { + addrs = camel_header_address_decode ( + txt, emf->charset ? + emf->charset : emf->default_charset); + if (addrs == NULL) { g_free (buf); return; } @@ -485,11 +489,15 @@ emfq_format_message (EMFormat *emf, EMFormatQuote *emfq = (EMFormatQuote *) emf; if (emfq->flags & EM_FORMAT_QUOTE_CITE) - camel_stream_printf(stream, "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->\n" - "<blockquote type=cite>\n"); + camel_stream_printf ( + stream, "<!--+GtkHTML:<DATA class=\"ClueFlow\" " + "key=\"orig\" value=\"1\">-->\n" + "<blockquote type=cite>\n"); if (((CamelMimePart *)emf->message) != part) { - camel_stream_printf(stream, "%s</br>\n", _("-------- Forwarded Message --------")); + camel_stream_printf ( + stream, "%s</br>\n", + _("-------- Forwarded Message --------")); emfq_format_headers (emfq, stream, (CamelMedium *)part); } else if (emfq->flags & EM_FORMAT_QUOTE_HEADERS) emfq_format_headers (emfq, stream, (CamelMedium *)part); @@ -497,7 +505,9 @@ emfq_format_message (EMFormat *emf, em_format_part (emf, stream, part); if (emfq->flags & EM_FORMAT_QUOTE_CITE) - camel_stream_write_string(stream, "</blockquote><!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->", NULL); + camel_stream_write_string ( + stream, "</blockquote><!--+GtkHTML:" + "<DATA class=\"ClueFlow\" clear=\"orig\">-->", NULL); } static void @@ -541,8 +551,11 @@ emfq_text_plain (EMFormat *emf, CAMEL_STREAM_FILTER (filtered_stream), html_filter); g_object_unref (html_filter); - em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, (CamelDataWrapper *)part); - camel_stream_flush((CamelStream *)filtered_stream, NULL); + em_format_format_text ( + EM_FORMAT (emfq), filtered_stream, + CAMEL_DATA_WRAPPER (part)); + + camel_stream_flush (filtered_stream, NULL); g_object_unref (filtered_stream); } diff --git a/em-format/em-format.c b/em-format/em-format.c index 67ed912d50..d978f157c5 100644 --- a/em-format/em-format.c +++ b/em-format/em-format.c @@ -393,7 +393,6 @@ void em_format_class_add_handler (EMFormatClass *emfc, EMFormatHandler *info) { - d(printf("adding format handler to '%s' '%s'\n", g_type_name_from_class((GTypeClass *)emfc), info->mime_type)); info->old = g_hash_table_lookup(emfc->type_handlers, info->mime_type); g_hash_table_insert(emfc->type_handlers, (gpointer) info->mime_type, info); } @@ -582,11 +581,13 @@ em_format_add_puri (EMFormat *emf, d(printf("built cid '%s'\n", puri->cid)); - /* not quite same as old behaviour, it also put in the relative uri and a fallback for no parent uri */ + /* Not quite same as old behaviour, it also put in the + * relative uri and a fallback for no parent uri. */ tmp = camel_mime_part_get_content_location(part); puri->uri = NULL; if (tmp == NULL) { - /* no location, don't set a uri at all, html parts do this themselves */ + /* No location, don't set a uri at all, + * html parts do this themselves. */ } else { if (strchr(tmp, ':') == NULL && emf->base != NULL) { CamelURL *uri; @@ -833,7 +834,9 @@ em_format_part_as (EMFormat *emf, mime_type = "application/octet-stream"; } - ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_attachment(emf, stream, part, mime_type, handle); + EM_FORMAT_GET_CLASS (emf)->format_attachment ( + emf, stream, part, mime_type, handle); + finish: emf->base = base_save; emf->snoop_mime_type = snoop_save; @@ -988,7 +991,8 @@ void em_format_set_default_charset (EMFormat *emf, const gchar *charset) { - if ((emf->default_charset && charset && g_ascii_strcasecmp(emf->default_charset, charset) == 0) + if ((emf->default_charset && charset && + g_ascii_strcasecmp(emf->default_charset, charset) == 0) || (emf->default_charset == NULL && charset == NULL) || (emf->default_charset == charset)) return; @@ -1379,7 +1383,8 @@ em_format_format_text (EMFormat *emf, camel_stream_write_to_stream(mem_stream, (CamelStream *)stream, NULL); camel_stream_flush((CamelStream *)stream, NULL); } else { - ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_optional(emf, stream, (CamelMimePart *)dw, mem_stream); + EM_FORMAT_GET_CLASS (emf)->format_optional ( + emf, stream, (CamelMimePart *)dw, mem_stream); } if (windows) @@ -1455,13 +1460,17 @@ emf_application_xpkcs7mime (EMFormat *emf, /* should this perhaps run off a key of ".secured" ? */ emfc = g_hash_table_lookup(emf->inline_table, emf->part_id->str); if (emfc && emfc->valid) { - em_format_format_secure(emf, stream, emfc->secured, camel_cipher_validity_clone(emfc->valid)); + em_format_format_secure ( + emf, stream, emfc->secured, + camel_cipher_validity_clone (emfc->valid)); return; } context = camel_smime_context_new(emf->session); - emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_ENCRYPTED | EM_FORMAT_VALIDITY_FOUND_SMIME; + emf->validity_found |= + EM_FORMAT_VALIDITY_FOUND_ENCRYPTED | + EM_FORMAT_VALIDITY_FOUND_SMIME; opart = camel_mime_part_new(); valid = camel_cipher_decrypt(context, part, opart, &local_error); @@ -1618,26 +1627,34 @@ emf_multipart_encrypted (EMFormat *emf, /* should this perhaps run off a key of ".secured" ? */ emfc = g_hash_table_lookup(emf->inline_table, emf->part_id->str); if (emfc && emfc->valid) { - em_format_format_secure(emf, stream, emfc->secured, camel_cipher_validity_clone(emfc->valid)); + em_format_format_secure ( + emf, stream, emfc->secured, + camel_cipher_validity_clone (emfc->valid)); return; } mpe = (CamelMultipartEncrypted*)camel_medium_get_content ((CamelMedium *)part); if (!CAMEL_IS_MULTIPART_ENCRYPTED(mpe)) { - em_format_format_error(emf, stream, _("Could not parse MIME message. Displaying as source.")); - em_format_format_source(emf, stream, part); + em_format_format_error ( + emf, stream, _("Could not parse MIME message. " + "Displaying as source.")); + em_format_format_source (emf, stream, part); return; } /* Currently we only handle RFC2015-style PGP encryption. */ protocol = camel_content_type_param(((CamelDataWrapper *)mpe)->mime_type, "protocol"); if (!protocol || g_ascii_strcasecmp (protocol, "application/pgp-encrypted") != 0) { - em_format_format_error(emf, stream, _("Unsupported encryption type for multipart/encrypted")); - em_format_part_as(emf, stream, part, "multipart/mixed"); + em_format_format_error ( + emf, stream, _("Unsupported encryption " + "type for multipart/encrypted")); + em_format_part_as (emf, stream, part, "multipart/mixed"); return; } - emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_ENCRYPTED | EM_FORMAT_VALIDITY_FOUND_PGP; + emf->validity_found |= + EM_FORMAT_VALIDITY_FOUND_ENCRYPTED | + EM_FORMAT_VALIDITY_FOUND_PGP; context = camel_gpg_context_new(emf->session); opart = camel_mime_part_new(); @@ -1743,7 +1760,9 @@ emf_multipart_related (EMFormat *emf, /* set the partid since add_puri uses it */ g_string_append_printf(emf->part_id, ".related.%d", i); - puri = em_format_add_puri(emf, sizeof(EMFormatPURI), NULL, body_part, emf_write_related); + puri = em_format_add_puri ( + emf, sizeof (EMFormatPURI), NULL, + body_part, emf_write_related); g_string_truncate(emf->part_id, partidlen); d(printf(" part '%s' '%s' added\n", puri->uri?puri->uri:"", puri->cid)); } @@ -1760,12 +1779,9 @@ emf_multipart_related (EMFormat *emf, EMFormatPURI *puri = link->data; if (puri->use_count == 0) { - d(printf("part '%s' '%s' used '%d'\n", puri->uri?puri->uri:"", puri->cid, puri->use_count)); if (puri->func == emf_write_related) { g_string_printf(emf->part_id, "%s", puri->part_id); em_format_part(emf, stream, puri->part); - } else { - d(printf("unreferenced uri generated by format code: %s\n", puri->uri?puri->uri:puri->cid)); } } @@ -1793,14 +1809,19 @@ emf_multipart_signed (EMFormat *emf, /* should this perhaps run off a key of ".secured" ? */ emfc = g_hash_table_lookup(emf->inline_table, emf->part_id->str); if (emfc && emfc->valid) { - em_format_format_secure(emf, stream, emfc->secured, camel_cipher_validity_clone(emfc->valid)); + em_format_format_secure ( + emf, stream, emfc->secured, + camel_cipher_validity_clone (emfc->valid)); return; } mps = (CamelMultipartSigned *)camel_medium_get_content ((CamelMedium *)part); - if (!CAMEL_IS_MULTIPART_SIGNED(mps) - || (cpart = camel_multipart_get_part((CamelMultipart *)mps, CAMEL_MULTIPART_SIGNED_CONTENT)) == NULL) { - em_format_format_error(emf, stream, _("Could not parse MIME message. Displaying as source.")); + if (!CAMEL_IS_MULTIPART_SIGNED (mps) + || (cpart = camel_multipart_get_part ((CamelMultipart *)mps, + CAMEL_MULTIPART_SIGNED_CONTENT)) == NULL) { + em_format_format_error ( + emf, stream, _("Could not parse MIME message. " + "Displaying as source.")); em_format_format_source(emf, stream, part); return; } @@ -2024,7 +2045,8 @@ emf_inlinepgp_signed (EMFormat *emf, camel_stream_flush((CamelStream *)filtered_stream, NULL); g_object_unref (filtered_stream); - /* Create a new text/plain MIME part containing the signed content preserving the original part's Content-Type params */ + /* Create a new text/plain MIME part containing the signed + * content preserving the original part's Content-Type params. */ content_type = camel_mime_part_get_content_type (ipart); type = camel_content_type_format (content_type); content_type = camel_content_type_decode (type); @@ -2071,7 +2093,9 @@ emf_inlinepgp_encrypted (EMFormat *emf, gchar *mime_type; GError *local_error = NULL; - emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_ENCRYPTED | EM_FORMAT_VALIDITY_FOUND_PGP; + emf->validity_found |= + EM_FORMAT_VALIDITY_FOUND_ENCRYPTED | + EM_FORMAT_VALIDITY_FOUND_PGP; cipher = camel_gpg_context_new(emf->session); opart = camel_mime_part_new(); @@ -2228,7 +2252,10 @@ em_format_snoop_type (CamelMimePart *part) g_free (magic_type); if (!types_cache) - types_cache = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, (GDestroyNotify) NULL); + types_cache = g_hash_table_new_full ( + g_str_hash, g_str_equal, + (GDestroyNotify) g_free, + (GDestroyNotify) NULL); if (res) { tmp = g_hash_table_lookup (types_cache, res); diff --git a/mail/e-mail-message-pane.c b/mail/e-mail-message-pane.c index 21f8264c84..5936cd8240 100644 --- a/mail/e-mail-message-pane.c +++ b/mail/e-mail-message-pane.c @@ -97,7 +97,7 @@ e_mail_message_pane_new (EShellView *shell_view) widget = g_object_new ( E_TYPE_MAIL_MESSAGE_PANE, "shell-view", shell_view, NULL); - + e_mail_paned_view_set_enable_show_folder (E_MAIL_PANED_VIEW(widget), TRUE); return widget; diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c index 864d78ace1..0480ac281c 100644 --- a/mail/e-mail-notebook-view.c +++ b/mail/e-mail-notebook-view.c @@ -377,7 +377,7 @@ create_tab_label (EMailNotebookView *view, gtk_box_pack_end (GTK_BOX(container), widget, FALSE, FALSE, 0); g_object_set_data ((GObject *)widget, "page", page); g_object_set_data ((GObject *)page, "close-button", widget); - + g_signal_connect ( widget, "clicked", G_CALLBACK (tab_remove_gtk_cb), view); @@ -897,7 +897,7 @@ mail_netbook_view_open_mail (EMailView *view, tab = (EMailTab *)e_mail_tab_new_full (camel_message_info_subject(info), NULL, 1); g_object_set_data ((GObject *)tab, "page", pane); g_object_set_data ((GObject *)pane, "tab", tab); - + clutter_actor_show((ClutterActor *)tab); clone = e_mail_tab_new_full (camel_message_info_subject(info), NULL, 200); @@ -937,7 +937,7 @@ mail_netbook_view_open_mail (EMailView *view, e_mail_reader_set_group_by_threads ( E_MAIL_READER (pane), e_mail_reader_get_group_by_threads (E_MAIL_READER(view))); - + e_mail_reader_enable_show_folder (E_MAIL_READER(pane)); e_mail_reader_set_message (E_MAIL_READER (pane), uid); camel_message_info_free (info); @@ -947,15 +947,15 @@ mail_netbook_view_open_mail (EMailView *view, static ClutterActor * build_histogram (GtkWidget *widget, CamelFolder *folder) { - int week_time = 60 * 60 * 24 * 7; - int weeks[54]; - int i; + gint week_time = 60 * 60 * 24 * 7; + gint weeks[54]; + gint i; GPtrArray *uids; - int max = 1; + gint max = 1; ClutterActor *texture; cairo_t *cr; - float ratio; - int x = 0; + gfloat ratio; + gint x = 0; time_t now = time(NULL); GtkStyle *style; GdkColor *color; @@ -972,7 +972,7 @@ build_histogram (GtkWidget *widget, CamelFolder *folder) CamelMessageInfo *info = camel_folder_get_message_info (folder, uids->pdata[i]); if (info) { time_t dreceived = now - camel_message_info_date_received (info); - int week; + gint week; week = (dreceived / week_time) - 1; if (week > 52) @@ -981,7 +981,7 @@ build_histogram (GtkWidget *widget, CamelFolder *folder) weeks[week]++; camel_message_info_free (info); - } + } } for (i=0; i< 53; i++) { @@ -993,20 +993,19 @@ build_histogram (GtkWidget *widget, CamelFolder *folder) camel_folder_free_uids (folder, uids); - texture = clutter_cairo_texture_new (200, 50); + texture = clutter_cairo_texture_new (200, 50); clutter_actor_set_size (texture, 200, 50); - cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (texture)); + cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (texture)); clutter_actor_show_all (texture); - cairo_save (cr); cairo_new_path (cr); cairo_move_to (cr, x, 50 - (weeks[52] * ratio)); cairo_set_source_rgba (cr, 0.3, 0.2, 0.4, 1.0); - for (i=51; i>=0; i--) { + for (i=51; i>=0; i--) { x+=3; cairo_line_to (cr, x, 50 - (weeks[i]*ratio)); @@ -1023,7 +1022,7 @@ build_histogram (GtkWidget *widget, CamelFolder *folder) cairo_fill (cr); cairo_restore (cr); - cairo_destroy(cr); + cairo_destroy(cr); return texture; } @@ -1114,14 +1113,16 @@ mail_notebook_view_set_folder (EMailReader *reader, g_object_set_data ((GObject *)priv->current_view, "tab", tab); clutter_actor_show((ClutterActor *)tab); - + clone = build_histogram ((GtkWidget *)reader, folder); clutter_actor_set_reactive (clone, FALSE); clutter_actor_show (clone); e_mail_tab_set_preview_actor (tab, clone); e_mail_tab_set_can_close (tab, TRUE); - e_mail_tab_set_preview_mode (tab, e_mail_tab_picker_get_preview_mode(priv->tab_picker)); + e_mail_tab_set_preview_mode ( + tab, e_mail_tab_picker_get_preview_mode ( + priv->tab_picker)); e_mail_tab_picker_add_tab (priv->tab_picker, tab, -1); page = e_mail_tab_picker_get_tab_no (priv->tab_picker, tab); @@ -1155,7 +1156,7 @@ mail_notebook_view_set_folder (EMailReader *reader, e_mail_tab_set_text (tab, camel_folder_get_full_name(folder)); clone = build_histogram ((GtkWidget *)reader, folder); clutter_actor_set_reactive (clone, FALSE); - clutter_actor_show (clone); + clutter_actor_show (clone); e_mail_tab_set_preview_actor (tab, clone); #endif } @@ -1202,11 +1203,11 @@ static gboolean mail_notebook_view_enable_show_folder (EMailReader *reader) { EMailNotebookViewPrivate *priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv; - + if (!priv->current_view) return FALSE; - return e_mail_reader_get_enable_show_folder (E_MAIL_READER(priv->current_view)); + return e_mail_reader_get_enable_show_folder (E_MAIL_READER(priv->current_view)); } static guint @@ -1283,30 +1284,33 @@ e_mail_notebook_view_init (EMailNotebookView *view) static void emnv_show_folder (EMailNotebookView *view, gpointer not_used) { - int pos; + gint pos; EMailNotebookViewPrivate *priv = view->priv; - - pos = emnv_get_page_num (view, (GtkWidget *)E_MAIL_MESSAGE_PANE(priv->current_view)->parent_folder_view); -#if HAVE_CLUTTER + pos = emnv_get_page_num ( + view, (GtkWidget *) E_MAIL_MESSAGE_PANE ( + priv->current_view)->parent_folder_view); + +#if HAVE_CLUTTER e_mail_tab_picker_set_current_tab (priv->tab_picker, pos); mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW(view), pos); #else gtk_notebook_set_current_page (priv->book, pos); #endif - } static void emnv_show_prevtab (EMailNotebookView *view, gpointer not_used) { - int pos; + gint pos; EMailNotebookViewPrivate *priv = view->priv; - - pos = emnv_get_page_num (view, (GtkWidget *)E_MAIL_MESSAGE_PANE(priv->current_view)->parent_folder_view); -#if HAVE_CLUTTER + pos = emnv_get_page_num ( + view, (GtkWidget *) E_MAIL_MESSAGE_PANE ( + priv->current_view)->parent_folder_view); + +#if HAVE_CLUTTER pos = e_mail_tab_picker_get_current_tab (priv->tab_picker); if (pos > 0) { e_mail_tab_picker_set_current_tab (priv->tab_picker, pos-1); @@ -1318,17 +1322,15 @@ emnv_show_prevtab (EMailNotebookView *view, gpointer not_used) gtk_notebook_set_current_page (priv->book, pos-1); #endif - } static void emnv_show_nexttab (EMailNotebookView *view, gpointer not_used) { - int pos; + gint pos; EMailNotebookViewPrivate *priv = view->priv; - -#if HAVE_CLUTTER +#if HAVE_CLUTTER pos = e_mail_tab_picker_get_current_tab (priv->tab_picker); if (pos < (gtk_notebook_get_n_pages (priv->book)-1)) { @@ -1341,23 +1343,21 @@ emnv_show_nexttab (EMailNotebookView *view, gpointer not_used) gtk_notebook_set_current_page (priv->book, pos+1); #endif - } static void emnv_close_tab (EMailNotebookView *view, gpointer not_used) { EMailNotebookViewPrivate *priv = view->priv; - -#if HAVE_CLUTTER - mnv_tab_closed (g_object_get_data((GObject *)priv->current_view, "tab"), + +#if HAVE_CLUTTER + mnv_tab_closed (g_object_get_data((GObject *)priv->current_view, "tab"), view); #else tab_remove_gtk_cb (g_object_get_data((GObject *)priv->current_view, "close-button"), view); #endif - } GtkWidget * diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c index 747147032c..2839c1f44e 100644 --- a/mail/e-mail-paned-view.c +++ b/mail/e-mail-paned-view.c @@ -527,7 +527,7 @@ mail_paned_view_enable_show_folder (EMailReader *reader) EMailPanedViewPrivate *priv; priv = E_MAIL_PANED_VIEW (reader)->priv; - + return priv->enable_show_folder ? TRUE : FALSE; } diff --git a/mail/e-mail-paned-view.h b/mail/e-mail-paned-view.h index 4869a9bb48..5e6879ae94 100644 --- a/mail/e-mail-paned-view.h +++ b/mail/e-mail-paned-view.h @@ -72,8 +72,8 @@ void e_mail_paned_view_hide_message_list_pane (EMailPanedView *view, gboolean visible); GtkWidget * e_mail_paned_view_get_preview (EMailPanedView *view); -void e_mail_paned_view_set_enable_show_folder - (EMailPanedView *view, +void e_mail_paned_view_set_enable_show_folder + (EMailPanedView *view, gboolean set); G_END_DECLS diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 22dccb96ca..fe76e3e7c4 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -717,28 +717,28 @@ static void action_mail_folder_cb (GtkAction *action, EMailReader *reader) { - g_signal_emit (reader, signals[SHOW_FOLDER], 0); + g_signal_emit (reader, signals[SHOW_FOLDER], 0); } static void action_mail_nexttab_cb (GtkAction *action, EMailReader *reader) { - g_signal_emit (reader, signals[SHOW_NEXTTAB], 0); + g_signal_emit (reader, signals[SHOW_NEXTTAB], 0); } static void action_mail_prevtab_cb (GtkAction *action, EMailReader *reader) { - g_signal_emit (reader, signals[SHOW_PREVTAB], 0); + g_signal_emit (reader, signals[SHOW_PREVTAB], 0); } static void action_mail_closetab_cb (GtkAction *action, EMailReader *reader) { - g_signal_emit (reader, signals[CLOSE_TAB], 0); + g_signal_emit (reader, signals[CLOSE_TAB], 0); } static void @@ -1000,7 +1000,9 @@ action_mail_reply_all_cb (GtkAction *action, uid = MESSAGE_LIST (message_list)->cursor_uid; g_return_if_fail (uid != NULL); - mail_get_message (folder, uid, action_mail_reply_all_check, reader, mail_msg_unordered_push); + mail_get_message ( + folder, uid, action_mail_reply_all_check, + reader, mail_msg_unordered_push); return; } action_mail_reply_all_check (NULL, NULL, message, reader); @@ -1033,7 +1035,10 @@ action_mail_reply_list_cb (GtkAction *action, } static void -action_mail_reply_sender_check (CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gpointer user_data) +action_mail_reply_sender_check (CamelFolder *folder, + const gchar *uid, + CamelMimeMessage *message, + gpointer user_data) { GConfClient *gconf = mail_config_get_gconf_client (); EMailReader *reader = user_data; @@ -2533,7 +2538,7 @@ mail_reader_update_actions (EMailReader *reader, gboolean single_message_selected; priv = E_MAIL_READER_GET_PRIVATE (reader); - + shell_backend = e_mail_reader_get_shell_backend (reader); shell = e_shell_backend_get_shell (shell_backend); shell_settings = e_shell_get_shell_settings (shell); @@ -2901,7 +2906,7 @@ mail_reader_class_init (EMailReaderIface *iface) iface->get_selected_uids = mail_reader_get_selected_uids; iface->get_folder = mail_reader_get_folder; iface->get_folder_uri = mail_reader_get_folder_uri; - iface->enable_show_folder = mail_reader_get_enable_show_folder; + iface->enable_show_folder = mail_reader_get_enable_show_folder; iface->set_folder = mail_reader_set_folder; iface->set_message = mail_reader_set_message; iface->open_selected_mail = e_mail_reader_open_selected; @@ -2948,7 +2953,7 @@ mail_reader_class_init (EMailReaderIface *iface) 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); + G_TYPE_NONE, 0); signals[SHOW_NEXTTAB] = g_signal_new ( "show-next-tab", @@ -2957,7 +2962,7 @@ mail_reader_class_init (EMailReaderIface *iface) 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); + G_TYPE_NONE, 0); signals[SHOW_PREVTAB] = g_signal_new ( "show-previous-tab", @@ -2966,7 +2971,7 @@ mail_reader_class_init (EMailReaderIface *iface) 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); + G_TYPE_NONE, 0); signals[CLOSE_TAB] = g_signal_new ( "close-tab", @@ -2975,8 +2980,8 @@ mail_reader_class_init (EMailReaderIface *iface) 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - + G_TYPE_NONE, 0); + signals[UPDATE_ACTIONS] = g_signal_new ( "update-actions", G_OBJECT_CLASS_TYPE (iface), @@ -3757,27 +3762,31 @@ e_mail_reader_show_search_bar (EMailReader *reader) g_signal_emit (reader, signals[SHOW_SEARCH_BAR], 0); } -void +void e_mail_reader_enable_show_folder (EMailReader *reader) { - GtkAction *action; - const gchar *action_name; EMailReaderPrivate *priv; CamelFolder *folder; - char *label; + GtkAction *action; + const gchar *action_name; + const gchar *full_name; + gboolean sensitive; + gchar *label; g_return_if_fail (E_IS_MAIL_READER (reader)); priv = E_MAIL_READER_GET_PRIVATE (reader); folder = e_mail_reader_get_folder (reader); - label = g_strdup_printf (_("Folder '%s'"), camel_folder_get_full_name(folder)); + full_name = camel_folder_get_full_name (folder); + label = g_strdup_printf (_("Folder '%s'"), full_name); action_name = "mail-goto-folder"; action = e_mail_reader_get_action (reader, action_name); - g_object_set (action, "visible", TRUE, - "label", label, NULL); - gtk_action_set_sensitive (action, e_mail_reader_get_enable_show_folder (reader)); + sensitive = e_mail_reader_get_enable_show_folder (reader); + gtk_action_set_label (action, label); + gtk_action_set_visible (action, TRUE); + gtk_action_set_sensitive (action, sensitive); g_free (label); } diff --git a/mail/e-mail-reader.h b/mail/e-mail-reader.h index 187d7a4399..f1e609bbfa 100644 --- a/mail/e-mail-reader.h +++ b/mail/e-mail-reader.h @@ -148,7 +148,7 @@ void e_mail_reader_create_charset_menu void e_mail_reader_show_search_bar (EMailReader *reader); gboolean e_mail_reader_get_enable_show_folder (EMailReader *reader); -void e_mail_reader_enable_show_folder(EMailReader *reader); +void e_mail_reader_enable_show_folder(EMailReader *reader); G_END_DECLS diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index 6655edb4af..870437aeb6 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -479,7 +479,6 @@ mail_shell_backend_constructed (GObject *object) e_mail_shell_settings_init (shell); - /* Setup preference widget factories */ preferences_window = e_shell_get_preferences_window (shell); diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index a87be9e3c5..5e0b3405c5 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -332,16 +332,48 @@ emcp_widget_glade (EConfig *ec, /* plugin meta-data */ static EMConfigItem emcp_items[] = { - { E_CONFIG_BOOK, (gchar *) "", (gchar *) "composer_toplevel", emcp_widget_glade }, - { E_CONFIG_PAGE, (gchar *) "00.general", (gchar *) "vboxComposerGeneral", emcp_widget_glade }, - { E_CONFIG_SECTION, (gchar *) "00.general/00.behavior", (gchar *) "vboxBehavior", emcp_widget_glade }, - { E_CONFIG_SECTION, (gchar *) "00.general/10.alerts", (gchar *) "vboxAlerts", emcp_widget_glade }, - { E_CONFIG_PAGE, (gchar *) "10.signatures", (gchar *) "vboxSignatures", emcp_widget_glade }, + + { E_CONFIG_BOOK, + (gchar *) "", + (gchar *) "composer_toplevel", + emcp_widget_glade }, + + { E_CONFIG_PAGE, + (gchar *) "00.general", + (gchar *) "vboxComposerGeneral", + emcp_widget_glade }, + + { E_CONFIG_SECTION, + (gchar *) "00.general/00.behavior", + (gchar *) "vboxBehavior", + emcp_widget_glade }, + + { E_CONFIG_SECTION, + (gchar *) "00.general/10.alerts", + (gchar *) "vboxAlerts", + emcp_widget_glade }, + + { E_CONFIG_PAGE, + (gchar *) "10.signatures", + (gchar *) "vboxSignatures", + emcp_widget_glade }, + /* signature/signatures and signature/preview parts not usable */ - { E_CONFIG_PAGE, (gchar *) "20.spellcheck", (gchar *) "vboxSpellChecking", emcp_widget_glade }, - { E_CONFIG_SECTION, (gchar *) "20.spellcheck/00.languages", (gchar *) "vbox178", emcp_widget_glade }, - { E_CONFIG_SECTION, (gchar *) "20.spellcheck/00.options", (gchar *) "vboxOptions", emcp_widget_glade }, + { E_CONFIG_PAGE, + (gchar *) "20.spellcheck", + (gchar *) "vboxSpellChecking", + emcp_widget_glade }, + + { E_CONFIG_SECTION, + (gchar *) "20.spellcheck/00.languages", + (gchar *) "vbox178", + emcp_widget_glade }, + + { E_CONFIG_SECTION, + (gchar *) "20.spellcheck/00.options", + (gchar *) "vboxOptions", + emcp_widget_glade }, }; static void diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c index 8986c11201..f4ac0b7de5 100644 --- a/shell/e-shell-migrate.c +++ b/shell/e-shell-migrate.c @@ -77,7 +77,6 @@ shell_xdg_migrate_rename (const gchar *old_filename, return success; } - static gboolean shell_xdg_migrate_rmdir (const gchar *dirname) { diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index 35dd650f63..5ef7c03d38 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -1090,7 +1090,6 @@ populate_ui (CertificateManagerData *cfm) return FALSE; } - GtkWidget * certificate_manager_config_new (EPreferencesWindow *window) { diff --git a/widgets/misc/e-canvas.h b/widgets/misc/e-canvas.h index fbcdd44981..97055ab5ff 100644 --- a/widgets/misc/e-canvas.h +++ b/widgets/misc/e-canvas.h @@ -125,7 +125,7 @@ void e_canvas_item_request_parent_reflow (GnomeCanvasItem *item); void e_canvas_item_set_reflow_callback (GnomeCanvasItem *item, - ECanvasItemReflowFunc func); + ECanvasItemReflowFunc func); gint e_canvas_item_grab (ECanvas *canvas, GnomeCanvasItem *item, guint event_mask, diff --git a/widgets/misc/e-preferences-window.c b/widgets/misc/e-preferences-window.c index 493727c6ae..19053217dd 100644 --- a/widgets/misc/e-preferences-window.c +++ b/widgets/misc/e-preferences-window.c @@ -545,13 +545,12 @@ e_preferences_window_setup (EPreferencesWindow *window) if (!create_fn || gtk_bin_get_child (align)) continue; - content = create_fn (window); if (content) { gtk_widget_show (content); gtk_container_add (GTK_CONTAINER (align), content); } } - + priv->setup = TRUE; } diff --git a/widgets/misc/test-preferences-window.c b/widgets/misc/test-preferences-window.c index c737964518..e35895f118 100644 --- a/widgets/misc/test-preferences-window.c +++ b/widgets/misc/test-preferences-window.c @@ -28,7 +28,7 @@ create_page_number (gint i) { gchar *caption; GtkWidget *widget; - + caption = g_strdup_printf ("Title of page %d", i); widget = gtk_label_new (caption); |