From: Jean-Philippe Orsini Date: Thu, 25 Apr 2013 08:50:35 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.wpitchoune.net/gitweb/?p=prss.git;a=commitdiff_plain;h=ba998dd7b5a61fc2a1fa25538dc370eff0368c2c --- diff --git a/src/main.c b/src/main.c index 4d180bc..5b23720 100644 --- a/src/main.c +++ b/src/main.c @@ -277,7 +277,7 @@ int headline_cursor_changed_cbk(GtkTreeView *treeview, gpointer data) GtkTreeIter iter; GtkTreeModel *model; struct headline *headline; - const char *str; + char *str; printf("headline_cursor_changed_cbk\n"); @@ -294,6 +294,8 @@ int headline_cursor_changed_cbk(GtkTreeView *treeview, gpointer data) else web_load(""); + free(str); + if (headline->unread) { ttrss_set_article_unread(headline->id, 0); headline->unread = 0; diff --git a/src/ttrss.c b/src/ttrss.c index cc7a369..6e32cc0 100644 --- a/src/ttrss.c +++ b/src/ttrss.c @@ -60,7 +60,7 @@ static void file_set_content(const char *path, const char *content) } } -const char *ttrss_get_headline_content(struct headline *h) +char *ttrss_get_headline_content(struct headline *h) { const char *cache_dir; char *path, *content; diff --git a/src/ttrss.h b/src/ttrss.h index 8fbe148..dcc68f1 100644 --- a/src/ttrss.h +++ b/src/ttrss.h @@ -26,7 +26,7 @@ void ttrss_set_config(const char *url, const char *user, const char *pwd); struct feed **ttrss_get_feeds(); struct feed *ttrss_get_feed(int id); struct headline **ttrss_feed_get_headlines(struct feed *); -const char *ttrss_get_headline_content(struct headline *); +char *ttrss_get_headline_content(struct headline *); void ttrss_set_article_unread(int id, int unread); struct headline *ttrss_get_headline(int id);