From a896d7726e8f7cce133a53a3b5a477a4902505c3 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Thu, 21 May 2009 20:36:12 +0200 Subject: [PATCH] Several build fixes for Diablo --- .../easysetup/modest-easysetup-wizard-dialog.c | 9 ++--- src/maemo/modest-address-book.c | 5 ++- src/maemo/modest-platform.c | 36 ++++++++++---------- src/modest-address-book.h | 1 + src/modest-local-folder-info.c | 5 +++ src/modest-utils.c | 2 +- src/widgets/modest-header-view-render.c | 2 +- 7 files changed, 33 insertions(+), 27 deletions(-) diff --git a/src/maemo/easysetup/modest-easysetup-wizard-dialog.c b/src/maemo/easysetup/modest-easysetup-wizard-dialog.c index 54e80dd..743a9dc 100644 --- a/src/maemo/easysetup/modest-easysetup-wizard-dialog.c +++ b/src/maemo/easysetup/modest-easysetup-wizard-dialog.c @@ -584,23 +584,24 @@ on_user_username_changed(GtkWidget* widget, ModestEasysetupWizardDialog *self) { ModestEasysetupWizardDialogPrivate* priv; gchar* provider_id = NULL; + EasysetupProviderComboBox *combo; priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self); /* Work out the user email address */ - provider_id = modest_provider_picker_get_active_provider_id ( - MODEST_PROVIDER_PICKER (priv->account_serviceprovider_picker)); + combo = EASYSETUP_PROVIDER_COMBO_BOX (priv->combo_account_serviceprovider); + provider_id = easysetup_provider_combo_box_get_active_provider_id (combo); if (provider_id) { gchar *email_address; gchar *domain_name = modest_presets_get_domain (priv->presets, provider_id); email_address = g_strdup_printf ("%s@%s", - hildon_entry_get_text (HILDON_ENTRY (priv->entry_user_username)), + gtk_entry_get_text (GTK_ENTRY (priv->entry_user_username)), domain_name); /* Update the email address */ - hildon_entry_set_text (HILDON_ENTRY (priv->entry_user_email), email_address); + gtk_entry_set_text (GTK_ENTRY (priv->entry_user_email), email_address); g_free (email_address); g_free (domain_name); diff --git a/src/maemo/modest-address-book.c b/src/maemo/modest-address-book.c index 7baa3e5..b881632 100644 --- a/src/maemo/modest-address-book.c +++ b/src/maemo/modest-address-book.c @@ -1043,7 +1043,6 @@ modest_address_book_has_address (const gchar *address) const gchar * modest_address_book_get_my_name () { - OssoABookSelfContact *self_contact = osso_abook_self_contact_get_default (); - - return osso_abook_contact_get_display_name (OSSO_ABOOK_CONTACT (self_contact)); + /* There is no support to get my own contact in this version */ + return NULL; } diff --git a/src/maemo/modest-platform.c b/src/maemo/modest-platform.c index 8df3cda..8f1ba2f 100644 --- a/src/maemo/modest-platform.c +++ b/src/maemo/modest-platform.c @@ -103,19 +103,27 @@ on_modest_conf_update_interval_changed (ModestConf* self, static gboolean check_required_files (void) { - FILE *mcc_file = modest_utils_open_mcc_mapping_file (NULL); + FILE *mcc_file = modest_utils_open_mcc_mapping_file (FALSE,NULL); if (!mcc_file) { g_printerr ("modest: check for mcc file failed\n"); return FALSE; - } else + } else fclose (mcc_file); - + + + mcc_file = modest_utils_open_mcc_mapping_file (TRUE, NULL); + if (!mcc_file) { + g_printerr ("modest: check for mcc file (for LC_MESSAGES) failed\n"); + return FALSE; + } else + fclose (mcc_file); + if (access(MODEST_PROVIDER_DATA_FILE, R_OK) != 0 && access(MODEST_FALLBACK_PROVIDER_DATA_FILE, R_OK) != 0) { g_printerr ("modest: cannot find providers data\n"); return FALSE; } - + return TRUE; } @@ -1244,28 +1252,24 @@ modest_platform_on_new_headers_received (GList *URI_list, MODEST_CONF_NOTIFICATION_IDS, MODEST_CONF_VALUE_INT, NULL); - iter = header_list; + iter = URI_list; while (iter) { - gchar *display_address = NULL, *summary = NULL; - const gchar *display_date; + gchar *display_address = NULL; gboolean first_notification = TRUE; gint notif_id; - gchar *str; ModestMsgNotificationData *data; data = (ModestMsgNotificationData *) iter->data; - /* constant string, don't free */ - display_date = modest_text_utils_get_display_date (tny_header_get_date_received (header)); - display_address = g_strdup (data->from); modest_text_utils_get_display_address (display_address); /* string is changed in-place */ - summary = g_strdup_printf ("%s - %s", display_date, display_address); - notification = hildon_notification_new (summary, + notification = hildon_notification_new (display_address, data->subject, "qgn_list_messagin", "email.arrive"); + g_free (display_address); + /* Add DBus action */ hildon_notification_add_dbus_action(notification, "default", @@ -1274,7 +1278,7 @@ modest_platform_on_new_headers_received (GList *URI_list, MODEST_DBUS_OBJECT, MODEST_DBUS_IFACE, MODEST_DBUS_METHOD_OPEN_MESSAGE, - G_TYPE_STRING, data->url, + G_TYPE_STRING, data->uri, -1); /* Play sound if the user wants. Show the LED @@ -1305,10 +1309,6 @@ modest_platform_on_new_headers_received (GList *URI_list, don't care about if the notification was removed or not to store the list in gconf */ - /* Free & carry on */ - g_free (display_address); - g_free (summary); - iter = g_list_next (iter); } diff --git a/src/modest-address-book.h b/src/modest-address-book.h index 67a0e63..907c066 100644 --- a/src/modest-address-book.h +++ b/src/modest-address-book.h @@ -32,6 +32,7 @@ #ifndef __MODEST_ADDRESS_BOOK_H__ #define __MODEST_ADDRESS_BOOK_H__ +#include #include #include diff --git a/src/modest-local-folder-info.c b/src/modest-local-folder-info.c index 0647f58..d0bcb75 100644 --- a/src/modest-local-folder-info.c +++ b/src/modest-local-folder-info.c @@ -115,7 +115,12 @@ modest_per_account_local_outbox_folder_info_get_maildir_path (const gchar* accou /* This directory should contain an "outbox" child directory: */ gchar *escaped, *filename; +#if GLIB_CHECK_VERSION(2, 16, 0) escaped = g_uri_escape_string (account_name, NULL, FALSE); +#else + /* TODO: escape without calling glib */ + escaped = g_strdup (account_name); +#endif filename = g_build_filename (g_get_home_dir(), MODEST_DIR, MODEST_PER_ACCOUNT_LOCAL_OUTBOX_FOLDERS_MAILDIR, diff --git a/src/modest-utils.c b/src/modest-utils.c index 5f934c1..3d82fc6 100644 --- a/src/modest-utils.c +++ b/src/modest-utils.c @@ -841,7 +841,7 @@ modest_utils_open_mcc_mapping_file (gboolean from_lc_messages, gboolean *transla env_list = getenv ("LANG"); } parts = g_strsplit (env_list, ":", 0); - gchar *path1; + gchar *path1 = NULL; const gchar* path2 = MODEST_MCC_MAPPING; if (translated) diff --git a/src/widgets/modest-header-view-render.c b/src/widgets/modest-header-view-render.c index 1e4fcbf..ee6ce3d 100644 --- a/src/widgets/modest-header-view-render.c +++ b/src/widgets/modest-header-view-render.c @@ -133,7 +133,7 @@ set_cell_text (GtkCellRenderer *renderer, { gboolean strikethrough; gboolean bold_is_active_color; - GdkColor *color; + GdkColor *color = NULL; PangoWeight weight; bold_is_active_color = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (renderer), BOLD_IS_ACTIVE_COLOR)); -- 1.7.9.5