2007-07-26 Murray Cumming <murrayc@murrayc.com>
+ * src/modest-ui-actions.h:
+ * src/modest-ui-actions.c: Added
+ modest_do_refresh_current_folder() containing some code from
+ modest_ui_actions_on_send_receive().
+ * src/dbus_api/modest-dbus-callbacks.c: (on_idle_send_receive):
+ Call modest_do_refresh_current_folder() before refreshing the
+ requested account, as in modest_ui_actions_on_send_receive().
+ This is strange, but seems to be necessary to show new mails.
+ Now new emails are finally visible in the UI when downloaded
+ via the automatic update interval, fixing bug NB#57458.
+ This also works because bug NB#57458 has been fixed somehow.
+
+2007-07-26 Murray Cumming <murrayc@murrayc.com>
+
* src/dbus_api/modest-dbus-callbacks.c: (modest_dbus_req_filter):
printf more details when we get unhandled D-Bus methods, because
it is interesting.
/* Pick the main window if it exists */
win = modest_window_mgr_get_main_window (modest_runtime_get_window_mgr ());
+ /* This seems to be necessary to show new messages in the current window.
+ * I would expect this to be after the send_receive, but maybe
+ * this makes a connection too. murrayc. */
+ modest_do_refresh_current_folder (win);
+
/* Send & receive all if "Update automatically" is set */
/* TODO: check the auto-update parameter in the configuration */
modest_ui_actions_do_send_receive_all (win);
DBusMessage *message,
void *user_data)
{
- printf ("DEBUG: %s\n", __FUNCTION__);
gboolean handled = FALSE;
if (dbus_message_is_method_call (message,
handled = TRUE;
}
else {
- g_debug (" debug: %s: Unexpected D-Bus method: Interface=%s, Member=%s\n",
+ /* Note that this mentions methods that were already handled in modest_dbus_req_handler(). */
+ g_debug (" debug: %s: Unexpected (maybe already handled) D-Bus method:\n Interface=%s, Member=%s\n",
__FUNCTION__, dbus_message_get_interface (message),
dbus_message_get_member(message));
}
account_names = NULL;
}
-/*
- * Handler of the click on Send&Receive button in the main toolbar
- */
-void
-modest_ui_actions_on_send_receive (GtkAction *action, ModestWindow *win)
+void
+modest_do_refresh_current_folder(ModestWindow *win)
{
- /* Check if accounts exist */
- gboolean accounts_exist =
- modest_account_mgr_has_accounts(modest_runtime_get_account_mgr(), TRUE);
-
- /* If not, allow the user to create an account before trying to send/receive. */
- if (!accounts_exist)
- modest_ui_actions_on_accounts (NULL, win);
-
/* Refresh currently selected folder. Note that if we only
- want to retrive the headers, then the refresh only will
+ want to retreive the headers, then the refresh only will
invoke a poke_status over all folders, i.e., only the
total/unread count will be updated */
if (MODEST_IS_MAIN_WINDOW (win)) {
if (folder_store)
g_object_unref (folder_store);
}
+}
+
+
+/*
+ * Handler of the click on Send&Receive button in the main toolbar
+ */
+void
+modest_ui_actions_on_send_receive (GtkAction *action, ModestWindow *win)
+{
+ /* Check if accounts exist */
+ gboolean accounts_exist =
+ modest_account_mgr_has_accounts(modest_runtime_get_account_mgr(), TRUE);
+
+ /* If not, allow the user to create an account before trying to send/receive. */
+ if (!accounts_exist)
+ modest_ui_actions_on_accounts (NULL, win);
+
+ modest_do_refresh_current_folder (win);
/* Refresh the active account */
modest_ui_actions_do_send_receive (NULL, win);
void modest_ui_actions_do_send_receive (const gchar *account_name,
ModestWindow *win);
+void
+modest_do_refresh_current_folder(ModestWindow *win);
+
/**
* modest_ui_actions_on_send_receive:
* @action: a #GtkAction