X-Git-Url: https://git.wpitchoune.net/gitweb/?p=prss.git;a=blobdiff_plain;f=src%2Fmain.c;h=9de84d4f59111de7361d2e05d0347c4fc59e7fb3;hp=e20243336eb42a069a9d83226a9b95f49b8dd345;hb=1070b8de5c6cdf5e5958675a1b90f0af3e3f4688;hpb=2acb4f4b249348eeb6ca4bf37836889be55418ff diff --git a/src/main.c b/src/main.c index e202433..9de84d4 100644 --- a/src/main.c +++ b/src/main.c @@ -22,12 +22,12 @@ #include #include -#include "ttrss.h" #include #include #include -#include "phttp.h" +#include "http.h" +#include "ttrss.h" #include "webbrowser.h" static const char *program_name; @@ -81,9 +81,10 @@ void update() GtkTreeIter iter; char *title; - ttrss_login(g_settings_get_string(settings, "url"), - g_settings_get_string(settings, "user"), - g_settings_get_string(settings, "password")); + ws_init(g_settings_get_string(settings, "url"), + g_settings_get_string(settings, "user"), + g_settings_get_string(settings, "password")); + ws_open_session(); model = gtk_tree_view_get_model(GTK_TREE_VIEW(w_treeview)); @@ -243,14 +244,21 @@ int headline_cursor_changed_cbk(GtkTreeView *treeview, gpointer data) str = ttrss_get_headline_content(headline); - if (headline->unread) - ttrss_set_article_unread(headline->id, 0); - if (str) web_load(str); else web_load(""); + if (headline->unread) { + ttrss_set_article_unread(headline->id, 0); + headline->unread = 0; + } + + gtk_list_store_set(GTK_LIST_STORE(model), + &iter, + 0, headline->title, + -1); + gtk_tree_path_free(path); } @@ -335,7 +343,7 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } - phttp_init(); + http_init(); gtk_init(NULL, NULL); settings = g_settings_new("prss");