2007-07-12 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Thu, 12 Jul 2007 08:14:42 +0000 (08:14 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Thu, 12 Jul 2007 08:14:42 +0000 (08:14 +0000)
* src/dbus_api/modest-dbus-callbacks.c: (on_idle_open_message):
Avoided a harmless g_warning().

pmo-trunk-r2721

ChangeLog2
src/dbus_api/modest-dbus-callbacks.c
src/modest-tny-folder.h

index 279b479..8706b73 100644 (file)
@@ -1,5 +1,10 @@
 2007-07-12  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/dbus_api/modest-dbus-callbacks.c: (on_idle_open_message):
+       Avoided a harmless g_warning().
+
+2007-07-12  Murray Cumming  <murrayc@murrayc.com>
+
        * 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,
index b7c9af3..b63c3be 100644 (file)
@@ -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 ();
index c2c812e..d084390 100644 (file)
@@ -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