* src/modest-ui-actions.c:
authorJose Dapena Paz <jdapena@igalia.com>
Fri, 4 May 2007 14:03:14 +0000 (14:03 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Fri, 4 May 2007 14:03:14 +0000 (14:03 +0000)
        * Minor fix in get_msg_cb to be compatible with
          Tny API change.
* src/widgets/modest-attachment-view.c:
        * Now size label uses modest_text_utils_get_display_size.

pmo-trunk-r1759

src/modest-ui-actions.c
src/widgets/modest-attachment-view.c

index 4a7aeef..830de99 100644 (file)
@@ -98,7 +98,7 @@ do_headers_action (ModestWindow *win,
 
 static void     reply_forward_func     (gpointer data, gpointer user_data);
 
-static void     get_msg_cb             (TnyFolder *folder, TnyMsg *msg,        GError **err,
+static void     get_msg_cb             (TnyFolder *folder, gboolean canceled, TnyMsg *msg, GError **err,
                                        gpointer user_data);
 static void     reply_forward          (ReplyForwardAction action, ModestWindow *win);
 
@@ -869,7 +869,7 @@ modest_ui_actions_toggle_header_list_view (GtkAction *action, ModestMainWindow *
  * function
  */
 static void
-get_msg_cb (TnyFolder *folder, TnyMsg *msg, GError **err, gpointer user_data)
+get_msg_cb (TnyFolder *folder, gboolean canceled, TnyMsg *msg, GError **err, gpointer user_data)
 {
        GetMsgAsyncHelper *helper;
 
index 819185b..70f3b8b 100644 (file)
@@ -34,6 +34,7 @@
 #include <string.h>
 #include <modest-attachment-view.h>
 #include <modest-platform.h>
+#include <modest-text-utils.h>
 
 static GObjectClass *parent_class = NULL;
 
@@ -151,7 +152,11 @@ get_size_idle_func (gpointer data)
        priv->size += readed_size;
 
        if (tny_stream_is_eos (priv->get_size_stream)) {
-               size_string = g_strdup_printf (" (%d kb)", priv->size / 1024);
+               gchar *display_size;
+
+               display_size = modest_text_utils_get_display_size (priv->size);
+               size_string = g_strdup_printf (" (%s)", display_size);
+               g_free (display_size);
                gtk_label_set_text (GTK_LABEL (priv->size_view), size_string);
                g_free (size_string);