diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 04:58:27 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 04:58:27 +0800 |
commit | 333656eba50f2120bbee3e817b8faf0baf448faf (patch) | |
tree | 3869bc4847dd4ab67625b82207ff98ef19045e8d /plugins/exchange-operations | |
parent | 1682814ef78902b385fe84589f8755b0ff4b5b5a (diff) | |
parent | ffa17ed195a6bbb40d386fb572b7941e22f47f8d (diff) | |
download | gsoc2013-evolution-333656eba50f2120bbee3e817b8faf0baf448faf.tar gsoc2013-evolution-333656eba50f2120bbee3e817b8faf0baf448faf.tar.gz gsoc2013-evolution-333656eba50f2120bbee3e817b8faf0baf448faf.tar.bz2 gsoc2013-evolution-333656eba50f2120bbee3e817b8faf0baf448faf.tar.lz gsoc2013-evolution-333656eba50f2120bbee3e817b8faf0baf448faf.tar.xz gsoc2013-evolution-333656eba50f2120bbee3e817b8faf0baf448faf.tar.zst gsoc2013-evolution-333656eba50f2120bbee3e817b8faf0baf448faf.zip |
Merge branch 'warnings'
Diffstat (limited to 'plugins/exchange-operations')
8 files changed, 60 insertions, 52 deletions
diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c index ccfb6afb71..6785585af8 100644 --- a/plugins/exchange-operations/exchange-account-setup.c +++ b/plugins/exchange-operations/exchange-account-setup.c @@ -59,25 +59,25 @@ void org_gnome_exchange_commit (EPlugin *epl, EConfigHookItemFactoryData *data); GtkWidget* org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactoryData *data); CamelServiceAuthType camel_exchange_ntlm_authtype = { - /* i18n: "Secure Password Authentication" is an Outlookism */ - N_("Secure Password"), + /* i18n: "Secure Password Authentication" is an Outlookism */ + (gchar *) N_("Secure Password"), - /* i18n: "NTLM" probably doesn't translate */ - N_("This option will connect to the Exchange server using " - "secure password (NTLM) authentication."), + /* i18n: "NTLM" probably doesn't translate */ + (gchar *) N_("This option will connect to the Exchange server " + "using secure password (NTLM) authentication."), - "NTLM", - TRUE + (gchar *) "NTLM", + TRUE }; CamelServiceAuthType camel_exchange_password_authtype = { - N_("Plaintext Password"), + (gchar *) N_("Plaintext Password"), - N_("This option will connect to the Exchange server using " - "standard plaintext password authentication."), + (gchar *) N_("This option will connect to the Exchange server " + "using standard plaintext password authentication."), - "Basic", - TRUE + (gchar *) "Basic", + TRUE }; diff --git a/plugins/exchange-operations/exchange-config-listener.c b/plugins/exchange-operations/exchange-config-listener.c index 308e73daaf..19d5846aa7 100644 --- a/plugins/exchange-operations/exchange-config-listener.c +++ b/plugins/exchange-operations/exchange-config-listener.c @@ -89,7 +89,7 @@ static void account_changed (EAccountList *account_listener, EAccount *account); static void account_removed (EAccountList *account_listener, EAccount *account); -#if LDEAD +#ifdef LDEAD static void exchange_add_autocompletion_folders (GConfClient *gc_client, ExchangeAccount *account); #endif @@ -229,7 +229,7 @@ add_defaults_for_account (ExchangeConfigListener *config_listener, EAccount *eaccount; gboolean save = FALSE; -#if LDEAD +#ifdef LDEAD exchange_add_autocompletion_folders (config_listener->priv->gconf, account); #endif @@ -1230,7 +1230,7 @@ exchange_config_listener_modify_esource_group_name (ExchangeConfigListener *excl g_object_unref (a_source_list); } -#if LDEAD +#ifdef LDEAD /** * exchange_add_autocompletion_folders: * diff --git a/plugins/exchange-operations/exchange-delegates-user.c b/plugins/exchange-operations/exchange-delegates-user.c index 66a7e71014..635e82ade7 100644 --- a/plugins/exchange-operations/exchange-delegates-user.c +++ b/plugins/exchange-operations/exchange-delegates-user.c @@ -301,12 +301,13 @@ exchange_delegates_user_edit (ExchangeAccount *account, CamelMessageInfo *info; char *self_address, *delegate_mail_subject; char *role_name; - char *role_name_final = ""; + GString *role_name_final; const char *recipient_address; const char *delegate_exchange_dn; const char *msg_part1 = NULL, *msg_part2 = NULL; + role_name_final = g_string_new (""); self_address = g_strdup (exchange_account_get_email_id (account)); @@ -339,11 +340,13 @@ exchange_delegates_user_edit (ExchangeAccount *account, combobox = glade_xml_get_widget (xml, widget_names[i]); role = e_dialog_combo_box_get (combobox, exchange_perm_map); role_name = g_strdup (map_to_full_role_name(role)); - role_name_final = g_strconcat (role_name_final, "<tr><td>" , folder_names_for_display[i], - ":</td><td>", role_name, "</td> </tr>", NULL); + g_string_append_printf ( + role_name_final, + "<tr><td>%s:</td><td>%s</td></tr>", + folder_names_for_display[i], role_name); } - camel_stream_printf (stream, "%s</table>", role_name_final); + camel_stream_printf (stream, "%s</table>", role_name_final->str); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)) == TRUE) { /* To translators: This message is included if the delegatee has been given access @@ -360,7 +363,7 @@ exchange_delegates_user_edit (ExchangeAccount *account, "to see my private items.")); camel_data_wrapper_construct_from_stream (delegate_mail_text, stream); g_free (role_name); - g_free (role_name_final); + g_string_free (role_name_final, TRUE); camel_object_unref (stream); part = camel_mime_part_new (); diff --git a/plugins/exchange-operations/exchange-folder-permission.c b/plugins/exchange-operations/exchange-folder-permission.c index ad36853cf1..11d9b84f5e 100644 --- a/plugins/exchange-operations/exchange-folder-permission.c +++ b/plugins/exchange-operations/exchange-folder-permission.c @@ -59,7 +59,7 @@ void org_gnome_exchange_menu_cal_permissions (EPlugin *ep, ECalMenuTargetSelect gchar *selected_exchange_folder_uri = NULL; static EPopupItem popup_items[] = { - { E_POPUP_ITEM, "30.emc.10", N_("Permissions..."), org_folder_permissions_cb, NULL, "folder-new", 0, EM_POPUP_FOLDER_INFERIORS } + { E_POPUP_ITEM, (gchar *) "30.emc.10", (gchar *) N_("Permissions..."), org_folder_permissions_cb, NULL, (gchar *) "folder-new", 0, EM_POPUP_FOLDER_INFERIORS } }; static void diff --git a/plugins/exchange-operations/exchange-folder-subscription.c b/plugins/exchange-operations/exchange-folder-subscription.c index 05229c0838..ab63a5dd3e 100644 --- a/plugins/exchange-operations/exchange-folder-subscription.c +++ b/plugins/exchange-operations/exchange-folder-subscription.c @@ -94,10 +94,10 @@ setup_name_selector (GladeXML *glade_xml, ENameSelector **name_selector_ret) } static void -setup_folder_name_combo (GladeXML *glade_xml, gchar *fname) +setup_folder_name_combo (GladeXML *glade_xml, const gchar *fname) { GtkComboBox *combo; - char *strings[] = { + const gchar *strings[] = { "Calendar", "Inbox", "Contacts", @@ -286,7 +286,7 @@ subscribe_to_folder (GtkWidget *dialog, gint response, gpointer data) } gboolean -create_folder_subscription_dialog (ExchangeAccount *account, gchar *fname) +create_folder_subscription_dialog (ExchangeAccount *account, const gchar *fname) { ENameSelector *name_selector; GladeXML *glade_xml; diff --git a/plugins/exchange-operations/exchange-folder-subscription.h b/plugins/exchange-operations/exchange-folder-subscription.h index 26b4bc3642..f4a329c19a 100644 --- a/plugins/exchange-operations/exchange-folder-subscription.h +++ b/plugins/exchange-operations/exchange-folder-subscription.h @@ -22,6 +22,6 @@ #define __EXCHANGE_FOLDER_SUBSCRIPTION_H__ gboolean -create_folder_subscription_dialog (ExchangeAccount *account, gchar *fname); +create_folder_subscription_dialog (ExchangeAccount *account, const gchar *fname); #endif diff --git a/plugins/exchange-operations/exchange-folder.c b/plugins/exchange-operations/exchange-folder.c index b2b53d1bb3..1c2334e2dc 100644 --- a/plugins/exchange-operations/exchange-folder.c +++ b/plugins/exchange-operations/exchange-folder.c @@ -44,7 +44,7 @@ #include "addressbook/gui/widgets/eab-popup.h" #include "exchange-folder-subscription.h" -void org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target, gchar *fname); +void org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target, const gchar *fname); void org_gnome_exchange_inbox_subscription (EPlugin *ep, EMMenuTargetSelect *target); void org_gnome_exchange_addressbook_subscription (EPlugin *ep, EMMenuTargetSelect *target); void org_gnome_exchange_calendar_subscription (EPlugin *ep, EMMenuTargetSelect *target); @@ -64,7 +64,7 @@ static void exchange_get_folder (char *uri, CamelFolder *folder, void *data); static EPopupItem popup_inbox_items[] = { - { E_POPUP_ITEM, "29.inbox_unsubscribe", N_("Unsubscribe Folder..."), org_gnome_exchange_folder_inbox_unsubscribe, NULL, "folder-new", 0, EM_POPUP_FOLDER_INFERIORS } + { E_POPUP_ITEM, (gchar *) "29.inbox_unsubscribe", (gchar *) N_("Unsubscribe Folder..."), org_gnome_exchange_folder_inbox_unsubscribe, NULL, (gchar *) "folder-new", 0, EM_POPUP_FOLDER_INFERIORS } }; void @@ -233,7 +233,7 @@ org_gnome_exchange_check_inbox_subscribed (EPlugin *ep, EMPopupTargetFolder *tar } static EPopupItem popup_items[] = { - { E_POPUP_ITEM, "29.calendar_unsubscribe", N_("Unsubscribe Folder..."), org_gnome_exchange_folder_unsubscribe, NULL, "folder-new", 0, EM_POPUP_FOLDER_INFERIORS } + { E_POPUP_ITEM, (gchar *) "29.calendar_unsubscribe", (gchar *) N_("Unsubscribe Folder..."), org_gnome_exchange_folder_unsubscribe, NULL, (gchar *) "folder-new", 0, EM_POPUP_FOLDER_INFERIORS } }; void @@ -243,7 +243,7 @@ popup_free (EPopup *ep, GSList *items, void *data) } static EPopupItem popup_ab_items[] = { - { E_POPUP_ITEM, "29.address_book_unsubscribe", N_("Unsubscribe Folder..."), org_gnome_exchange_folder_ab_unsubscribe, NULL, "folder-new", 0, EM_POPUP_FOLDER_INFERIORS } + { E_POPUP_ITEM, (gchar *) "29.address_book_unsubscribe", (gchar *) N_("Unsubscribe Folder..."), org_gnome_exchange_folder_ab_unsubscribe, NULL, (gchar *) "folder-new", 0, EM_POPUP_FOLDER_INFERIORS } }; void @@ -541,7 +541,7 @@ org_gnome_exchange_folder_unsubscribe (EPopup *ep, EPopupItem *p, void *data) void -org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target, gchar *fname) +org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target, const gchar *fname) { ExchangeAccount *account = NULL; gint mode; @@ -573,24 +573,27 @@ org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target, void org_gnome_exchange_calendar_subscription (EPlugin *ep, EMMenuTargetSelect *target) { - gchar *folder_name = N_("Calendar"); + const gchar *folder_name = N_("Calendar"); org_gnome_exchange_folder_subscription (ep, target, folder_name); } + void org_gnome_exchange_addressbook_subscription (EPlugin *ep, EMMenuTargetSelect *target) { - gchar *folder_name = N_("Contacts"); + const gchar *folder_name = N_("Contacts"); org_gnome_exchange_folder_subscription (ep, target, folder_name); } + void org_gnome_exchange_tasks_subscription (EPlugin *ep, EMMenuTargetSelect *target) { - gchar *folder_name = N_("Tasks"); + const gchar *folder_name = N_("Tasks"); org_gnome_exchange_folder_subscription (ep, target, folder_name); } + void org_gnome_exchange_inbox_subscription (EPlugin *ep, EMMenuTargetSelect *target) { - gchar *folder_name = N_("Inbox"); + const gchar *folder_name = N_("Inbox"); org_gnome_exchange_folder_subscription (ep, target, folder_name); } diff --git a/plugins/exchange-operations/exchange-operations.c b/plugins/exchange-operations/exchange-operations.c index 94240c051a..a42e867446 100644 --- a/plugins/exchange-operations/exchange-operations.c +++ b/plugins/exchange-operations/exchange-operations.c @@ -30,24 +30,26 @@ ExchangeConfigListener *exchange_global_config_listener=NULL; -static char *error_ids[] = { "config-error", - "password-weak-error", - "password-change-error", - "password-change-success", - "account-offline", - "password-incorrect", - "account-domain-error", - "account-mailbox-na", - "account-version-error", - "account-wss-error", - "account-no-mailbox", - "account-resolve-error", - "account-connect-error", - "password-expired", - "account-unknown-error", - "account-quota-error", - "account-quota-send-error", - "account-quota-warn" }; +static const gchar *error_ids[] = { + "config-error", + "password-weak-error", + "password-change-error", + "password-change-success", + "account-offline", + "password-incorrect", + "account-domain-error", + "account-mailbox-na", + "account-version-error", + "account-wss-error", + "account-no-mailbox", + "account-resolve-error", + "account-connect-error", + "password-expired", + "account-unknown-error", + "account-quota-error", + "account-quota-send-error", + "account-quota-warn" +}; static void free_exchange_listener (void) |