total_size += att_size;
if (att_size > allowed_size) {
- g_warning ("%s: total size: %u",
- __FUNCTION__, (unsigned int)total_size);
+ g_debug ("%s: total size: %u",
+ __FUNCTION__, (unsigned int)total_size);
break;
}
allowed_size -= att_size;
modest_ui_actions_on_msg_link_hover (ModestMsgView *msgview, const gchar* link,
ModestWindow *win)
{
- /* g_message ("%s %s", __FUNCTION__, link); */
+ /* g_debug ("%s %s", __FUNCTION__, link); */
}
const gchar *address,
ModestWindow *win)
{
- /* g_message ("%s %s", __FUNCTION__, address); */
+ /* g_debug ("%s %s", __FUNCTION__, address); */
}
static void
modest_msg_view_window_remove_attachments (MODEST_MSG_VIEW_WINDOW (msg_view_window), TRUE);
else {
/* do nothing; uid was registered before, so window is probably on it's way */
- g_warning ("debug: header %p has already been registered", header);
+ g_debug ("header %p has already been registered", header);
}
} else {
ModestMailOperation *mail_op = NULL;
return removed;
}
-void
+static void
+on_fetch_images_performer (gboolean canceled,
+ GError *err,
+ GtkWindow *parent_window,
+ TnyAccount *account,
+ gpointer user_data)
+{
+ if (err || canceled) {
+ /* Show an unable to retrieve images ??? */
+ return;
+ }
+
+ /* Note that the user could have closed the window while connecting */
+ if (GTK_WIDGET_VISIBLE (parent_window))
+ modest_msg_view_window_fetch_images ((ModestMsgViewWindow *) parent_window);
+ g_object_unref ((GObject *) user_data);
+}
+
+void
modest_ui_actions_on_fetch_images (GtkAction *action,
ModestWindow *window)
{
g_return_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window));
- modest_msg_view_window_fetch_images (MODEST_MSG_VIEW_WINDOW (window));
-
+ modest_platform_connect_and_perform ((GtkWindow *) window, TRUE,
+ NULL,
+ on_fetch_images_performer,
+ g_object_ref (window));
}
void