From: Murray Cumming Date: Wed, 20 Jun 2007 15:03:06 +0000 (+0000) Subject: 2007-06-20 Murray Cumming X-Git-Tag: git_migration_finished~3187 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=f213c6daa765f3de742ba2a2475a5ecf4c181d94 2007-06-20 Murray Cumming * src/maemo/easysetup/modest-easysetup-country-combo-box.c: (load_from_file): Sort the list. The unsorted list would be more noticeable in non-English locales. * src/maemo/modest-msg-edit-window.c: (modest_msg_edit_window_attach_file): Initialize a variable to avoid a warning and fix the build. * src/maemo/modest-progress-bar-widget.c: (modest_progress_bar_widget_set_progress): Avoid a division by zero, to avoid a g_warning, and probably to avoid a crash. pmo-trunk-r2340 --- diff --git a/ChangeLog2 b/ChangeLog2 index bb31ab9..bcb7a8f 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,5 +1,19 @@ 2007-06-20 Murray Cumming + * src/maemo/easysetup/modest-easysetup-country-combo-box.c: + (load_from_file): Sort the list. The unsorted list would be more noticeable + in non-English locales. + + * src/maemo/modest-msg-edit-window.c: + (modest_msg_edit_window_attach_file): Initialize a variable to avoid a + warning and fix the build. + + * src/maemo/modest-progress-bar-widget.c: + (modest_progress_bar_widget_set_progress): Avoid a division by zero, to + avoid a g_warning, and probably to avoid a crash. + +2007-06-20 Murray Cumming + * src/modest-search.c: (modest_search_folder): Check for a GError when calling tny_folder_get_headers(), to show that this is not the cause of later failure. diff --git a/src/maemo/easysetup/modest-easysetup-country-combo-box.c b/src/maemo/easysetup/modest-easysetup-country-combo-box.c index a0dba8b..ce9f823 100644 --- a/src/maemo/easysetup/modest-easysetup-country-combo-box.c +++ b/src/maemo/easysetup/modest-easysetup-country-combo-box.c @@ -194,7 +194,7 @@ static void load_from_file (EasysetupCountryComboBox *self) #ifndef MODEST_HILDON_VERSION_0 const gchar* filepath = PROVIDER_DATA_DIR "/mcc_mapping"; #else - /* this is the official version, in the 'operator-wizard-settings' package */ + /* This is the official version, in the 'operator-wizard-settings' package */ const gchar* filepath = "/usr/share/operator-wizard/mcc_mapping"; #endif /*MODEST_HILDON_VERSION_0*/ /* printf ("DEBUG: %s: filepath=%s\n", __FUNCTION__, filepath); */ @@ -300,6 +300,10 @@ static void load_from_file (EasysetupCountryComboBox *self) free (line); fclose (file); + + /* Sort the items: */ + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (liststore), + MODEL_COL_NAME, GTK_SORT_ASCENDING); } static void diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index 2cd56e6..42c30cd 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -1478,7 +1478,7 @@ modest_msg_edit_window_attach_file (ModestMsgEditWindow *window) ModestMsgEditWindowPrivate *priv; GtkWidget *dialog = NULL; gint response = 0; - GSList *uris; + GSList *uris = NULL; GSList *uri_node; priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window); diff --git a/src/maemo/modest-progress-bar-widget.c b/src/maemo/modest-progress-bar-widget.c index 9459be1..bd4cc3e 100644 --- a/src/maemo/modest-progress-bar-widget.c +++ b/src/maemo/modest-progress-bar-widget.c @@ -402,10 +402,14 @@ modest_progress_bar_widget_set_progress (ModestProgressBarWidget *self, priv = MODEST_PROGRESS_BAR_WIDGET_GET_PRIVATE (self); /* Set progress */ - if (total != 100) /* FIXME: tinymail send 1/100 when it doesn't know better.. */ + if (total != 100) /* FIXME: tinymail send 1/100 when it doesn't know better.. */ { + gdouble percent = 0; + if (total != 0) /* Avoid division by zero. */ + percent = (gdouble)done/(gdouble)total; + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->progress_bar), - (gdouble)done/(gdouble)total); - else + percent); + }else gtk_progress_bar_pulse (GTK_PROGRESS_BAR (priv->progress_bar)); /* Set text */ diff --git a/tests/dbus_api/test_compose_mail.c b/tests/dbus_api/test_compose_mail.c index bcda820..afc3f34 100644 --- a/tests/dbus_api/test_compose_mail.c +++ b/tests/dbus_api/test_compose_mail.c @@ -31,10 +31,10 @@ int main(int argc, char *argv[]) if (!ret) { - printf("libmodest_dbus_client_open_message() failed.\n"); + printf("libmodest_dbus_client_compose_mai() failed.\n"); return OSSO_ERROR; } else { - printf("libmodest_dbus_client_open_message() succeeded!\n"); + printf("libmodest_dbus_client_compose_mail() succeeded\n"); } /* Exit */