From: Murray Cumming Date: Thu, 12 Jul 2007 08:14:42 +0000 (+0000) Subject: 2007-07-12 Murray Cumming X-Git-Tag: git_migration_finished~2817 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=825faf83c3a47d709518061ce678b6b391ca78a4 2007-07-12 Murray Cumming * src/dbus_api/modest-dbus-callbacks.c: (on_idle_open_message): Avoided a harmless g_warning(). pmo-trunk-r2721 --- diff --git a/ChangeLog2 b/ChangeLog2 index 279b479..8706b73 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,5 +1,10 @@ 2007-07-12 Murray Cumming + * src/dbus_api/modest-dbus-callbacks.c: (on_idle_open_message): + Avoided a harmless g_warning(). + +2007-07-12 Murray Cumming + * src/dbus_api/modest-dbus-callbacks.c: (on_idle_open_message), Pass the modest account name, not the TnyAccount display name to modest_msg_view_window_new() so that the reply feature works, diff --git a/src/dbus_api/modest-dbus-callbacks.c b/src/dbus_api/modest-dbus-callbacks.c index b7c9af3..b63c3be 100644 --- a/src/dbus_api/modest-dbus-callbacks.c +++ b/src/dbus_api/modest-dbus-callbacks.c @@ -541,14 +541,20 @@ on_idle_open_message (gpointer user_data) g_debug ("modest: %s: Found message.", __FUNCTION__); folder = tny_msg_get_folder (msg); - if (modest_tny_folder_get_local_folder_type (folder) == TNY_FOLDER_TYPE_DRAFTS) { + if (folder && modest_tny_folder_is_local_folder (folder) && + (modest_tny_folder_get_local_folder_type (folder) == TNY_FOLDER_TYPE_DRAFTS)) { g_debug ("TODO: draft messages should be opened in edit mode... "); } header = tny_msg_get_header (msg); + /* TODO: The modest_tny_folder_get_header_unique_id() documentation warns against + * using it with tny_msg_get_header(), and there is a + * " camel_folder_get_full_name: assertion `CAMEL_IS_FOLDER (folder)' failed" runtime warning, + * but it seems to work. + */ msg_uid = modest_tny_folder_get_header_unique_id(header); -/* FIXME: modest_tny_folder_get_header_unique_id warns against this */ + win_mgr = modest_runtime_get_window_mgr (); gdk_threads_enter (); diff --git a/src/modest-tny-folder.h b/src/modest-tny-folder.h index c2c812e..d084390 100644 --- a/src/modest-tny-folder.h +++ b/src/modest-tny-folder.h @@ -156,10 +156,9 @@ TnyAccount *modest_tny_folder_get_account (TnyFolder *folder); * modest_tny_msg_get_header_unique_id: * @header: a #TnyHeader * - * this function returns a unique id for a message summary, that's it - * a TnyHeader retrieved with tny_folder_get_headers (you can not use - * the TnyHeader returned by tny_msg_get_header because it has not an - * uid). + * This function returns a unique id for a message summary from + * a TnyHeader retrieved with tny_folder_get_headers. You can not use + * the TnyHeader returned by tny_msg_get_header because it has no uid. * * This uid is built from the folder URL string and the header uid, * the caller of the function must free the unique id when no longer