diff options
author | Not Zed <NotZed@Ximian.com> | 2005-08-24 11:08:37 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2005-08-24 11:08:37 +0800 |
commit | 12beb061d31660310586b81c8223e2b0ce05008d (patch) | |
tree | c610befaf8609845a83b213c34086562bdd2f6e9 | |
parent | 2e1a44dad5030f227cbf6f25c23e3c0a167d34c2 (diff) | |
download | gsoc2013-evolution-12beb061d31660310586b81c8223e2b0ce05008d.tar.gz gsoc2013-evolution-12beb061d31660310586b81c8223e2b0ce05008d.tar.zst gsoc2013-evolution-12beb061d31660310586b81c8223e2b0ce05008d.zip |
only define skip_content: if it is used. (menu_file_add_attachment_cb):
2005-08-23 Not Zed <NotZed@Ximian.com>
* e-msg-composer.c (build_message): only define skip_content: if
it is used.
(menu_file_add_attachment_cb): fixed the warning. Boy, what on
earth is this thing doing!
(add_to_bar): fix signature to match code.
(emcab_add): more warning fixes for bizarre functions.
(emcab_popup_position): more casting crap
* e-msg-composer-hdrs.c (addressbook_dialog_response): Remove
unused.
(account_can_send): make this static, and define before first use.
: include missing e-name-selector-entry header.
(create_headers): fix casts/style
(e_msg_composer_hdrs_set_to, e_msg_composer_hdrs_set_cc)
(e_msg_composer_hdrs_set_bcc, e_msg_composer_hdrs_get_to)
(e_msg_composer_hdrs_get_cc, e_msg_composer_hdrs_get_bcc): remove
unused str. lazy addressbook hackers!
svn path=/trunk/; revision=30218
-rw-r--r-- | composer/ChangeLog | 20 | ||||
-rw-r--r-- | composer/e-msg-composer-hdrs.c | 61 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 11 |
3 files changed, 51 insertions, 41 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 31dceae278..e37640c29e 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,23 @@ +2005-08-23 Not Zed <NotZed@Ximian.com> + + * e-msg-composer.c (build_message): only define skip_content: if + it is used. + (menu_file_add_attachment_cb): fixed the warning. Boy, what on + earth is this thing doing! + (add_to_bar): fix signature to match code. + (emcab_add): more warning fixes for bizarre functions. + (emcab_popup_position): more casting crap + + * e-msg-composer-hdrs.c (addressbook_dialog_response): Remove + unused. + (account_can_send): make this static, and define before first use. + : include missing e-name-selector-entry header. + (create_headers): fix casts/style + (e_msg_composer_hdrs_set_to, e_msg_composer_hdrs_set_cc) + (e_msg_composer_hdrs_set_bcc, e_msg_composer_hdrs_get_to) + (e_msg_composer_hdrs_get_cc, e_msg_composer_hdrs_get_bcc): remove + unused str. lazy addressbook hackers! + 2005-07-27 Mengjie Yu <meng-jie.yu@sun.com> * e-msg-composer-select-file.h: diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c index 1361c0dfff..34f8b91f8a 100644 --- a/composer/e-msg-composer-hdrs.c +++ b/composer/e-msg-composer-hdrs.c @@ -37,6 +37,7 @@ #include <libgnomeui/gnome-uidefs.h> #include <libgnome/gnome-i18n.h> #include <libedataserverui/e-name-selector.h> +#include <libedataserverui/e-name-selector-entry.h> #include "Composer.h" @@ -129,8 +130,6 @@ static int signals[LAST_SIGNAL]; static void addressbook_dialog_response (ENameSelectorDialog *name_selector_dialog, gint response, gpointer user_data) { - EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (user_data); - gtk_widget_hide (GTK_WIDGET (name_selector_dialog)); } @@ -229,6 +228,26 @@ from_changed (GtkWidget *item, gpointer data) g_signal_emit (hdrs, signals [FROM_CHANGED], 0); } +static gboolean +account_can_send (EAccount *account) +{ + static CamelStore *store; + CamelException ex; + gboolean result = FALSE; + + if (!account->parent_uid) + return TRUE; + + if (!(store = (CamelStore *) camel_session_get_service (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL), CAMEL_PROVIDER_STORE, &ex))) { + camel_exception_clear (&ex); + return result; + } else if (store->mode & CAMEL_STORE_WRITE) + result = TRUE; + + camel_object_unref (store); + return result; +} + static void account_added_cb (EAccountList *accounts, EAccount *account, EMsgComposerHdrs *hdrs) { @@ -328,26 +347,6 @@ account_removed_cb (EAccountList *accounts, EAccount *account, EMsgComposerHdrs } } -gboolean -account_can_send (EAccount *account) -{ - static CamelStore *store; - CamelException ex; - gboolean result = FALSE; - - if (!account->parent_uid) - return TRUE; - - if (!(store = (CamelStore *) camel_session_get_service (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL), CAMEL_PROVIDER_STORE, &ex))) { - camel_exception_clear (&ex); - return result; - } else if (store->mode & CAMEL_STORE_WRITE) - result = TRUE; - - camel_object_unref (store); - return result; -} - static GtkWidget * create_from_optionmenu (EMsgComposerHdrs *hdrs) { @@ -623,23 +622,22 @@ create_headers (EMsgComposerHdrs *hdrs) */ priv->reply_to.label = gtk_label_new_with_mnemonic (_("_Reply-To:")); priv->reply_to.entry = gtk_entry_new (); - gtk_label_set_mnemonic_widget (priv->reply_to.label, priv->reply_to.entry); + gtk_label_set_mnemonic_widget((GtkLabel *)priv->reply_to.label, priv->reply_to.entry); /* * From */ priv->from.label = gtk_label_new_with_mnemonic (_("Fr_om:")); priv->from.entry = create_from_optionmenu (hdrs); - gtk_label_set_mnemonic_widget (priv->from.label, e_msg_composer_hdrs_get_from_omenu (hdrs)); + gtk_label_set_mnemonic_widget((GtkLabel *)priv->from.label, e_msg_composer_hdrs_get_from_omenu (hdrs)); /* * Subject */ priv->subject.label = gtk_label_new_with_mnemonic (_("S_ubject:")); priv->subject.entry = gtk_entry_new (); - gtk_label_set_mnemonic_widget (priv->subject.label, priv->subject.entry); - g_signal_connect (priv->subject.entry, "changed", - G_CALLBACK (entry_changed), hdrs); + gtk_label_set_mnemonic_widget((GtkLabel *)priv->subject.label, priv->subject.entry); + g_signal_connect(priv->subject.entry, "changed", G_CALLBACK(entry_changed), hdrs); /* * To, CC, and Bcc @@ -1207,8 +1205,6 @@ void e_msg_composer_hdrs_set_to (EMsgComposerHdrs *hdrs, EDestination **to_destv) { - char *str; - g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs)); destinations_to_name_selector_entry (E_NAME_SELECTOR_ENTRY (hdrs->priv->to.entry), to_destv); @@ -1218,8 +1214,6 @@ void e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs, EDestination **cc_destv) { - char *str; - g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs)); destinations_to_name_selector_entry (E_NAME_SELECTOR_ENTRY (hdrs->priv->cc.entry), cc_destv); @@ -1232,8 +1226,6 @@ void e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs, EDestination **bcc_destv) { - char *str; - g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs)); destinations_to_name_selector_entry (E_NAME_SELECTOR_ENTRY (hdrs->priv->bcc.entry), bcc_destv); @@ -1459,7 +1451,6 @@ destination_list_to_destv (GList *destinations) EDestination ** e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs) { - char *str = NULL; EDestinationStore *destination_store; GList *destinations; EDestination **destv = NULL; @@ -1479,7 +1470,6 @@ e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs) EDestination ** e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs) { - char *str = NULL; EDestinationStore *destination_store; GList *destinations; EDestination **destv = NULL; @@ -1499,7 +1489,6 @@ e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs) EDestination ** e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs) { - char *str = NULL; EDestinationStore *destination_store; GList *destinations; EDestination **destv = NULL; diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index ac30da6c14..d8257155d2 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -809,8 +809,9 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data) camel_mime_part_set_encoding (CAMEL_MIME_PART (new), plain_encoding); camel_object_unref (current); +#if defined (HAVE_NSS) && defined (SMIME_SUPPORTED) skip_content: - +#endif if (recipients) { for (i=0; i<recipients->len; i++) g_free(recipients->pdata[i]); @@ -1657,7 +1658,7 @@ menu_file_close_cb (BonoboUIComponent *uic, } static void -add_to_bar (GtkWidget *composer, GSList *names, int is_inline) +add_to_bar (EMsgComposer *composer, GSList *names, int is_inline) { while (names) { e_attachment_bar_attach((EAttachmentBar *)((EMsgComposer *)composer)->attachment_bar, names->data, is_inline ? "inline" : "attachment"); @@ -1671,7 +1672,7 @@ menu_file_add_attachment_cb (BonoboUIComponent *uic, const char *path) { EMsgComposer *composer = E_MSG_COMPOSER (data); - GtkWindow *toplevel = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (composer->attachment_bar))); + EMsgComposer *toplevel = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (composer->attachment_bar))); GtkWidget **attachment_selector = e_attachment_bar_get_selector(E_ATTACHMENT_BAR(composer->attachment_bar)); e_msg_composer_select_file_attachments (toplevel, attachment_selector, add_to_bar); @@ -3371,7 +3372,7 @@ static void emcab_add(EPopup *ep, EPopupItem *item, void *data) { EAttachmentBar *bar = data; - GtkWindow *toplevel = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (bar))); + EMsgComposer *toplevel = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (bar))); GtkWidget **attachment_selector = e_attachment_bar_get_selector(E_ATTACHMENT_BAR(bar)); e_msg_composer_select_file_attachments (toplevel, attachment_selector, add_to_bar); @@ -3415,7 +3416,7 @@ emcab_popup_position(GtkMenu *menu, int *x, int *y, gboolean *push_in, gpointer if (selection == NULL) return; - image = gnome_icon_list_get_icon_pixbuf_item (icon_list, (gint)selection->data); + image = gnome_icon_list_get_icon_pixbuf_item (icon_list, GPOINTER_TO_INT(selection->data)); if (image == NULL) return; |