2007-06-20 Murray Cumming <murrayc@murrayc-desktop>
authorMurray Cumming <murrayc@murrayc.com>
Wed, 20 Jun 2007 15:03:06 +0000 (15:03 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Wed, 20 Jun 2007 15:03:06 +0000 (15:03 +0000)
* 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

ChangeLog2
src/maemo/easysetup/modest-easysetup-country-combo-box.c
src/maemo/modest-msg-edit-window.c
src/maemo/modest-progress-bar-widget.c
tests/dbus_api/test_compose_mail.c

index bb31ab9..bcb7a8f 100644 (file)
@@ -1,5 +1,19 @@
 2007-06-20  Murray Cumming  <murrayc@murrayc-desktop>
 
 2007-06-20  Murray Cumming  <murrayc@murrayc-desktop>
 
+       * 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  <murrayc@murrayc-desktop>
+
        * 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.
        * 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.
index a0dba8b..ce9f823 100644 (file)
@@ -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
 #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); */
        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);
                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
 }
 
 static void
index 2cd56e6..42c30cd 100644 (file)
@@ -1478,7 +1478,7 @@ modest_msg_edit_window_attach_file (ModestMsgEditWindow *window)
        ModestMsgEditWindowPrivate *priv;
        GtkWidget *dialog = NULL;
        gint response = 0;
        ModestMsgEditWindowPrivate *priv;
        GtkWidget *dialog = NULL;
        gint response = 0;
-       GSList *uris;
+       GSList *uris = NULL;
        GSList *uri_node;
        
        priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window);
        GSList *uri_node;
        
        priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window);
index 9459be1..bd4cc3e 100644 (file)
@@ -402,10 +402,14 @@ modest_progress_bar_widget_set_progress (ModestProgressBarWidget *self,
        priv = MODEST_PROGRESS_BAR_WIDGET_GET_PRIVATE (self);
        
        /* Set progress */
        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),
                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 */
                gtk_progress_bar_pulse (GTK_PROGRESS_BAR (priv->progress_bar));
 
        /* Set text */
index bcda820..afc3f34 100644 (file)
@@ -31,10 +31,10 @@ int main(int argc, char *argv[])
                
        
        if (!ret) {
                
        
        if (!ret) {
-                       printf("libmodest_dbus_client_open_message() failed.\n");
+               printf("libmodest_dbus_client_compose_mai() failed.\n");
                return OSSO_ERROR;
        } else {
                return OSSO_ERROR;
        } else {
-               printf("libmodest_dbus_client_open_message() succeeded!\n");
+               printf("libmodest_dbus_client_compose_mail() succeeded\n");
        }
                
     /* Exit */
        }
                
     /* Exit */