evolution-rss r220 - in trunk: . src
- From: lucilanga svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-rss r220 - in trunk: . src
- Date: Tue, 18 Mar 2008 08:36:04 +0000 (GMT)
Author: lucilanga
Date: Tue Mar 18 08:36:04 2008
New Revision: 220
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=220&view=rev
Log:
del_{messages,days} fix update
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 08:36:04 2008
@@ -139,10 +139,11 @@
g_source_remove(rf->rc_id);
if (active)
{
+ gtk_spin_button_update((GtkSpinButton *)data);
//we have to make sure we have a timeout value
if (!gconf_client_get_float(rss_gconf, GCONF_KEY_REP_CHECK_TIMEOUT, NULL))
gconf_client_set_float (rss_gconf, GCONF_KEY_REP_CHECK_TIMEOUT,
- gtk_spin_button_get_value((GtkSpinButton *)data), NULL);
+ gtk_spin_button_get_value((GtkSpinButton *)data), NULL);
if (rf->rc_id)
g_source_remove(rf->rc_id);
rf->rc_id = g_timeout_add (60 * 1000 * gtk_spin_button_get_value((GtkSpinButton *)data),
@@ -155,6 +156,7 @@
rep_check_timeout_cb (GtkWidget *widget, gpointer data)
{
gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data));
+ gtk_spin_button_update((GtkSpinButton *)widget);
gconf_client_set_float (rss_gconf, GCONF_KEY_REP_CHECK_TIMEOUT,
gtk_spin_button_get_value((GtkSpinButton*)widget), NULL);
if (active)
@@ -416,6 +418,7 @@
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);
@@ -480,6 +483,7 @@
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:
@@ -508,7 +512,9 @@
feed->del_feed=i;
feed->del_unread = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(checkbutton4));
+ gtk_spin_button_update((GtkSpinButton *)spinbutton1);
feed->del_messages = gtk_spin_button_get_value((GtkSpinButton *)spinbutton1);
+ gtk_spin_button_update((GtkSpinButton *)spinbutton2);
feed->del_days = gtk_spin_button_get_value((GtkSpinButton *)spinbutton2);
feed->add = 1;
// there's no reason to feetch feed if url isn't changed
Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c (original)
+++ trunk/src/rss.c Tue Mar 18 08:36:04 2008
@@ -1996,6 +1996,7 @@
{
if (rf)
rf->current_uid = t->uid;
+ g_print("rf->current_uid:%s\n", t->uid);
}
#else
void org_gnome_cooly_article_show(void *ep, void *t)
@@ -4106,14 +4107,12 @@
time_t date, min_date = 0;
uids = camel_folder_get_uids (folder);
for (i = 0; i < uids->len; i++)
- g_print("uids->pdata:%d\n", uids->pdata[i]);
-
- 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 && &rf->current_uid != &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))) {
date = camel_message_info_date_sent(info);
flags = camel_message_info_flags(info);
if (flags & CAMEL_MESSAGE_FLAGGED)
@@ -4148,8 +4147,8 @@
}
}
}
-out: camel_message_info_free(info);
}
+out: camel_message_info_free(info);
}
camel_folder_freeze(folder);
if (min_date)
@@ -4196,7 +4195,7 @@
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 && rf->current_uid != uids->pdata[i]) {
+ if (info && strncmp(rf->current_uid, uids->pdata[i], strlen(rf->current_uid))) {
date = camel_message_info_date_sent(info);
if (date < now - del_days * 86400)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]