Changeset 2670
- Timestamp:
- 09/03/07 13:04:38
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/camel/camel-folder-summary.c (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c (modified) (2 diffs)
- trunk/tests/c-demo/tny-demoui-summary-view.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r2668 r2670 6 6 really recognizable anymore so it shouldn't copy the copyright of the 7 7 original as this is not a copy anymore. 8 * Date, Received, INTERNALDATE: fixes 8 9 9 10 2007-09-03 Javier Fernandez Garcia-Boente <jfernandez@igalia.com> trunk/libtinymail-camel/camel-lite/camel/camel-folder-summary.c
r2667 r2670 2088 2088 mi->cc = camel_pstring_add (g_strdup (""), TRUE); 2089 2089 2090 mi->date_sent = camel_header_decode_date(camel_header_raw_find(&h, "date", NULL), &tzone); 2091 mi->date_sent += (tzone / 100) * 60 * 60; 2092 mi->date_sent += (tzone % 100) * 60; 2093 2090 mi->date_sent = camel_header_decode_date(camel_header_raw_find(&h, "date", NULL), NULL); 2094 2091 received = camel_header_raw_find(&h, "received", NULL); 2095 2092 2096 2093 if (received) 2097 r = strrchr(received, ';'); 2098 if (r) { 2099 mi->date_received = camel_header_decode_date(r + 1, &tzone); 2100 mi->date_received += (tzone / 100) * 60 * 60; 2101 mi->date_received += (tzone % 100) * 60; 2102 } else if (received) { 2103 mi->date_received = camel_header_decode_date(received, &tzone); 2104 mi->date_received += (tzone / 100) * 60 * 60; 2105 mi->date_received += (tzone % 100) * 60; 2106 } else 2107 mi->date_received = mi->date_sent; 2094 received = strrchr(received, ';'); 2095 if (received) 2096 mi->date_received = camel_header_decode_date(received + 1, NULL); 2097 else 2098 mi->date_received = time (&mi->date_received); 2108 2099 2109 2100 msgid = camel_header_msgid_decode(camel_header_raw_find(&h, "message-id", NULL)); trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c
r2482 r2670 2888 2888 /* ... it does */ 2889 2889 2890 if ((idate = g_datalist_get_data (&data, "INTERNALDATE"))) 2890 if ((idate = g_datalist_get_data (&data, "INTERNALDATE"))) 2891 2891 mi->info.date_received = decode_internaldate ((const unsigned char *) idate); 2892 2893 if (mi->info.date_received == -1)2894 mi->info.date_received = mi->info.date_sent;2895 2892 2896 2893 return mi; … … 3170 3167 uidset = imap_uid_array_to_set (folder->summary, needheaders, uid, UID_SET_LIMIT, &uid); 3171 3168 if (!camel_imap_command_start (store, folder, ex, 3172 "UID FETCH %s (FLAGS RFC822.SIZE BODY.PEEK[%s])",3169 "UID FETCH %s (FLAGS RFC822.SIZE INTERNALDATE BODY.PEEK[%s])", 3173 3170 uidset, header_spec)) 3174 3171 { trunk/tests/c-demo/tny-demoui-summary-view.c
r2620 r2670 94 94 GtkTreeView *mailbox_view, *header_view; 95 95 TnyMsgView *msg_view; 96 GtkWidget *status, *progress, *online_button, *poke_button, *sync_button; 96 GtkWidget *status, *progress, *online_button, *poke_button, 97 *sync_button, *killacc_button; 97 98 guint status_id; 98 99 gulong mailbox_select_sid; … … 438 439 g_object_unref (a_iter); 439 440 g_object_unref (accounts); 441 } 442 443 444 445 static void 446 killacc_button_toggled (GtkToggleButton *togglebutton, gpointer user_data) 447 { 448 TnySummaryView *self = user_data; 449 TnyDemouiSummaryViewPriv *priv = TNY_DEMOUI_SUMMARY_VIEW_GET_PRIVATE (self); 450 TnyList *accounts = tny_simple_list_new (); 451 TnyIterator *a_iter; 452 453 tny_account_store_get_accounts (priv->account_store, accounts, 454 TNY_ACCOUNT_STORE_STORE_ACCOUNTS); 455 456 a_iter = tny_list_create_iterator (accounts); 457 458 GObject *a_cur = TNY_ACCOUNT (tny_iterator_get_current (a_iter)); 459 460 g_object_unref (a_iter); 461 g_object_unref (accounts); 462 463 printf ("%d\n", a_cur->ref_count); 464 465 g_object_unref (a_cur); 466 g_object_unref (a_cur); 467 g_object_unref (a_cur); 468 g_object_unref (a_cur); 469 g_object_unref (a_cur); 470 440 471 } 441 472 … … 1669 1700 priv->poke_button = gtk_button_new_with_label ("Poke status"); 1670 1701 priv->sync_button = gtk_button_new_with_label ("Sync"); 1702 priv->killacc_button = gtk_button_new_with_label ("Kill account"); 1703 1671 1704 priv->current_accounts = NULL; 1672 1705 … … 1679 1712 g_signal_connect (G_OBJECT (priv->sync_button), "clicked", 1680 1713 G_CALLBACK (sync_button_clicked), self); 1714 1715 g_signal_connect (G_OBJECT (priv->killacc_button), "clicked", 1716 G_CALLBACK (killacc_button_toggled), self); 1681 1717 1682 1718 #if PLATFORM==1 … … 1708 1744 gtk_box_pack_start (GTK_BOX (priv->status), priv->poke_button, FALSE, FALSE, 0); 1709 1745 gtk_box_pack_start (GTK_BOX (priv->status), priv->sync_button, FALSE, FALSE, 0); 1746 gtk_box_pack_start (GTK_BOX (priv->status), priv->killacc_button, FALSE, FALSE, 0); 1710 1747 1711 1748 gtk_widget_show (priv->online_button); 1712 1749 gtk_widget_show (priv->poke_button); 1750 gtk_widget_show (priv->killacc_button); 1713 1751 gtk_widget_show (priv->sync_button); 1714 1752 gtk_widget_show (priv->status);
