Async retrieval API in modest_platform_run_header_details_dialog.
authorJose Dapena Paz <jdapena@igalia.com>
Fri, 17 Apr 2009 18:22:33 +0000 (18:22 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Fri, 17 Apr 2009 18:22:33 +0000 (18:22 +0000)
pmo-trunk-r8923

src/gnome/modest-platform.c
src/hildon2/modest-platform.c
src/maemo/modest-platform.c
src/modest-platform.h
src/modest-ui-actions.c

index a4817aa..33493c3 100644 (file)
@@ -546,7 +546,9 @@ modest_platform_run_folder_details_dialog (GtkWindow *parent_window,
 
 void
 modest_platform_run_header_details_dialog (GtkWindow *parent_window,
 
 void
 modest_platform_run_header_details_dialog (GtkWindow *parent_window,
-                                          TnyHeader *header)
+                                          TnyHeader *header,
+                                          gboolean async_get_size, 
+                                          TnyMsg *msg)
 {
        GtkWidget *dialog;
        
 {
        GtkWidget *dialog;
        
index 9ce024a..fee5512 100644 (file)
@@ -2436,7 +2436,9 @@ modest_platform_run_folder_details_dialog (GtkWindow *parent_window,
 
 void
 modest_platform_run_header_details_dialog (GtkWindow *parent_window,
 
 void
 modest_platform_run_header_details_dialog (GtkWindow *parent_window,
-                                          TnyHeader *header)
+                                          TnyHeader *header,
+                                          gboolean async_get_size,
+                                          TnyMsg *msg)
 {
        GtkWidget *dialog;
 
 {
        GtkWidget *dialog;
 
index 08cc03b..c56fbdf 100644 (file)
@@ -2148,7 +2148,9 @@ modest_platform_run_folder_details_dialog (GtkWindow *parent_window,
 
 void
 modest_platform_run_header_details_dialog (GtkWindow *parent_window,
 
 void
 modest_platform_run_header_details_dialog (GtkWindow *parent_window,
-                                          TnyHeader *header)
+                                          TnyHeader *header,
+                                          gboolean async_get_size,
+                                          TnyMsg *msg)
 {
        GtkWidget *dialog;
        
 {
        GtkWidget *dialog;
        
index 52dd6b2..36752bd 100644 (file)
@@ -519,11 +519,15 @@ void     modest_platform_run_folder_details_dialog (GtkWindow *parent_window,
  * modest_platform_run_header_details_dialog:
  * @parent_window: the parent #GtkWindow for the new dialog
  * @header: the #TnyHeader whose details will be shown
  * modest_platform_run_header_details_dialog:
  * @parent_window: the parent #GtkWindow for the new dialog
  * @header: the #TnyHeader whose details will be shown
+ * @async_get_size: %TRUE if size is obtained asynchronously from @msg
+ * @msg: a #TnyMsg
  *
  * Shows the header details dialog
  **/
 void     modest_platform_run_header_details_dialog (GtkWindow *parent_window,
  *
  * Shows the header details dialog
  **/
 void     modest_platform_run_header_details_dialog (GtkWindow *parent_window,
-                                                   TnyHeader *header);
+                                                   TnyHeader *header,
+                                                   gboolean async_get_size,
+                                                   TnyMsg *msg);
 
 /**
  * modest_platform_on_runtime_initialized:
 
 /**
  * modest_platform_on_runtime_initialized:
index 0fae3f9..a1bea67 100644 (file)
@@ -4592,7 +4592,18 @@ headers_action_show_details (TnyHeader *header,
                             gpointer user_data)
 
 {
                             gpointer user_data)
 
 {
-       modest_platform_run_header_details_dialog (GTK_WINDOW (window), header);
+       gboolean async_retrieval;
+       TnyMsg *msg = NULL;
+
+       if (MODEST_IS_MSG_VIEW_WINDOW (window)) {
+               async_retrieval = TRUE;
+               msg = modest_msg_view_window_get_message (MODEST_MSG_VIEW_WINDOW (window));
+       } else {
+               async_retrieval = FALSE;
+       }
+       modest_platform_run_header_details_dialog (GTK_WINDOW (window), header, async_retrieval, msg);
+       if (msg)
+               g_object_unref (msg);
 }
 
 /*
 }
 
 /*