evolution-rss r221 - in trunk: . src
- From: lucilanga svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-rss r221 - in trunk: . src
- Date: Tue, 18 Mar 2008 10:12:52 +0000 (GMT)
Author: lucilanga
Date: Tue Mar 18 10:12:51 2008
New Revision: 221
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=221&view=rev
Log:
fix currently read and important items deletion
Modified:
trunk/ChangeLog
trunk/src/rss-config-factory.c
trunk/src/rss.c
Modified: trunk/src/rss-config-factory.c
==============================================================================
--- trunk/src/rss-config-factory.c (original)
+++ trunk/src/rss-config-factory.c Tue Mar 18 10:12:51 2008
@@ -418,7 +418,6 @@
if (feed->del_messages)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton1), feed->del_messages);
g_signal_connect(spinbutton1, "changed", G_CALLBACK(del_messages_cb), feed);
- g_signal_connect(spinbutton1, "editing-done", G_CALLBACK(del_messages_cb), feed);
gtk_box_pack_start (GTK_BOX (hbox1), spinbutton1, FALSE, TRUE, 0);
label2 = gtk_label_new (_("messages"));
gtk_widget_show (label2);
@@ -483,7 +482,6 @@
gtk_window_add_accel_group (GTK_WINDOW (dialog1), accel_group);
gint result = gtk_dialog_run(GTK_DIALOG(dialog1));
- g_print("result:%d\n", result);
switch (result)
{
case GTK_RESPONSE_OK:
Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c (original)
+++ trunk/src/rss.c Tue Mar 18 10:12:51 2008
@@ -157,6 +157,7 @@
extern int xmlSubstituteEntitiesDefaultValue;
rssfeed *rf = NULL;
+gboolean inhibit_read = FALSE; //prevent mail selection when deleting folder
gboolean setup_feed(add_feed *feed);
gchar *display_doc (RDF *r);
@@ -1994,9 +1995,8 @@
#ifdef EVOLUTION_2_12
void org_gnome_cooly_article_show(void *ep, EMEventTargetMessage *t)
{
- if (rf)
- rf->current_uid = t->uid;
- g_print("rf->current_uid:%s\n", t->uid);
+ if (rf && !inhibit_read)
+ rf->current_uid = g_strdup(t->uid);
}
#else
void org_gnome_cooly_article_show(void *ep, void *t)
@@ -4102,17 +4102,16 @@
{
CamelMessageInfo *info;
GPtrArray *uids;
- guint i, j = 0, imax;
+ guint i, j = 0, imax = 0;
guint32 flags;
time_t date, min_date = 0;
uids = camel_folder_get_uids (folder);
for (i = 0; i < uids->len; i++)
{
info = camel_folder_get_message_info(folder, uids->pdata[i]);
-// g_print("rf->current_uid:%s\n",rf->current_uid);
-// g_print("uds_pdata:%s\n",uids->pdata[i]);
- if (info &&
- strncmp(rf->current_uid, uids->pdata[i], strlen(rf->current_uid))) {
+ if (info) {
+ if (!strcmp(rf->current_uid, uids->pdata[i]))
+ goto out;
date = camel_message_info_date_sent(info);
flags = camel_message_info_flags(info);
if (flags & CAMEL_MESSAGE_FLAGGED)
@@ -4185,6 +4184,7 @@
guint del_unread = GPOINTER_TO_INT(g_hash_table_lookup(rf->hrdel_unread, value));
guint del_feed = GPOINTER_TO_INT(g_hash_table_lookup(rf->hrdel_feed, value));
+ inhibit_read = 1;
if (del_feed == 2)
{
guint del_days = GPOINTER_TO_INT(g_hash_table_lookup(rf->hrdel_days, value));
@@ -4193,9 +4193,7 @@
for (i = 0; i < uids->len; i++)
{
info = camel_folder_get_message_info(folder, uids->pdata[i]);
- g_print("rf->current_uid:%d\n",rf->current_uid);
- g_print("uds_pdata:%d\n",uids->pdata[i]);
- if (info && strncmp(rf->current_uid, uids->pdata[i], strlen(rf->current_uid))) {
+ if (info && strcmp(rf->current_uid, uids->pdata[i])) {
date = camel_message_info_date_sent(info);
if (date < now - del_days * 86400)
{
@@ -4233,5 +4231,6 @@
camel_object_unref (folder);
g_print("=> total:%d\n", total);
fail: g_free(real_name);
+ inhibit_read = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]