Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fun.git;a=commitdiff;h=ee682aedc9c26aecbdc000a21c4a483b05a715ec

commit ee682aedc9c26aecbdc000a21c4a483b05a715ec
Author: Priyank <[EMAIL PROTECTED]>
Date:   Mon Mar 31 00:36:40 2008 +0530

fun-news_interface: re-populate the news list after an update
* fun-news_backend:
fun_populate_existing_news_list(): reverse the newslist
fun_news_backend_init(): don't reverse the newslist.

diff --git a/src/fun-news_backend.c b/src/fun-news_backend.c
index e6bf1b5..7950d75 100644
--- a/src/fun-news_backend.c
+++ b/src/fun-news_backend.c
@@ -196,7 +196,8 @@ fun_populate_existing_news_list (void)
}
}
fclose (fp);
-
+       e_news_item_list = g_list_reverse (e_news_item_list);
+
return;
}

@@ -513,7 +514,6 @@ fun_news_backend_init (void)
/* populate the existing list of news items
* stored on disk */
fun_populate_existing_news_list ();
-       e_news_item_list = g_list_reverse (e_news_item_list);

return;
}
diff --git a/src/fun-news_interface.c b/src/fun-news_interface.c
index 9f53a7c..329a38d 100644
--- a/src/fun-news_interface.c
+++ b/src/fun-news_interface.c
@@ -88,8 +88,7 @@ fun_news_interface_init (void)
/* the news check timeout */
seconds += 60;
g_timeout_add_seconds (seconds, (GSourceFunc)fun_news_check_func, NULL);
-       //fun_news_check_func ();
-
+
return;
}

@@ -177,8 +176,12 @@ fun_news_check_func (void)
}
if (lastitem)
{
+               /* re-populate the existing list */
+               fun_populate_existing_news_list ();
+               /* display a notification */
fun_tooltip_set_text (_("Latest News"), lastitem->title);
fun_tooltip_show (icon);
+               fun_news_interface_populate_newslist ();
}
return TRUE;
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to