From: Jean-Philippe Orsini Date: Fri, 26 Apr 2013 06:25:51 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.wpitchoune.net/gitweb/?p=prss.git;a=commitdiff_plain;h=95162b13ecc70395c10d3cf79757affe6d0c00cf --- diff --git a/po/fr.gmo b/po/fr.gmo index d0e187a..dcc565b 100644 Binary files a/po/fr.gmo and b/po/fr.gmo differ diff --git a/po/fr.po b/po/fr.po index a3e3ef3..3e6fda1 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ptask\n" "Report-Msgid-Bugs-To: jeanfi@gmail.com\n" -"POT-Creation-Date: 2013-04-25 15:45+0200\n" +"POT-Creation-Date: 2013-04-25 21:37+0200\n" "PO-Revision-Date: 2012-05-13 18:15+0000\n" "Last-Translator: jeanfi \n" "Language-Team: French <>\n" @@ -24,7 +24,7 @@ msgstr "" msgid "Cannot open log file: %s" msgstr "" -#: src/main.c:57 +#: src/main.c:63 #, c-format msgid "" "Copyright (C) %s jeanfi@gmail.com\n" @@ -34,37 +34,45 @@ msgid "" "There is NO WARRANTY, to the extent permitted by law.\n" msgstr "" -#: src/main.c:68 +#: src/main.c:74 #, c-format msgid "Usage: %s [OPTION]...\n" msgstr "" -#: src/main.c:70 +#: src/main.c:76 msgid "Prss is a GTK+ news reader for tt-rss." msgstr "" -#: src/main.c:73 +#: src/main.c:79 #, fuzzy msgid "Options:" msgstr "Description:" -#: src/main.c:74 +#: src/main.c:80 msgid "" " -h, --help display this help and exit\n" " -v, --version display version information and exit" msgstr "" -#: src/main.c:79 +#: src/main.c:83 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/main.c:88 #, c-format msgid "Report bugs to: %s\n" msgstr "" -#: src/main.c:81 +#: src/main.c:90 #, c-format msgid "%s home page: <%s>\n" msgstr "" -#: src/main.c:393 +#: src/main.c:419 +msgid "Enables debug mode." +msgstr "" + +#: src/main.c:434 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "" diff --git a/po/prss.pot b/po/prss.pot index e7165db..c390cab 100644 --- a/po/prss.pot +++ b/po/prss.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jeanfi@gmail.com\n" -"POT-Creation-Date: 2013-04-25 15:45+0200\n" +"POT-Creation-Date: 2013-04-25 21:37+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,7 +22,7 @@ msgstr "" msgid "Cannot open log file: %s" msgstr "" -#: src/main.c:57 +#: src/main.c:63 #, c-format msgid "" "Copyright (C) %s jeanfi@gmail.com\n" @@ -32,36 +32,44 @@ msgid "" "There is NO WARRANTY, to the extent permitted by law.\n" msgstr "" -#: src/main.c:68 +#: src/main.c:74 #, c-format msgid "Usage: %s [OPTION]...\n" msgstr "" -#: src/main.c:70 +#: src/main.c:76 msgid "Prss is a GTK+ news reader for tt-rss." msgstr "" -#: src/main.c:73 +#: src/main.c:79 msgid "Options:" msgstr "" -#: src/main.c:74 +#: src/main.c:80 msgid "" " -h, --help display this help and exit\n" " -v, --version display version information and exit" msgstr "" -#: src/main.c:79 +#: src/main.c:83 +msgid " -d, --debug=LEVEL set the debug level, integer between 0 and 3" +msgstr "" + +#: src/main.c:88 #, c-format msgid "Report bugs to: %s\n" msgstr "" -#: src/main.c:81 +#: src/main.c:90 #, c-format msgid "%s home page: <%s>\n" msgstr "" -#: src/main.c:393 +#: src/main.c:419 +msgid "Enables debug mode." +msgstr "" + +#: src/main.c:434 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "" diff --git a/src/glade/prss.glade b/src/glade/prss.glade index d1de23f..832e353 100644 --- a/src/glade/prss.glade +++ b/src/glade/prss.glade @@ -217,6 +217,7 @@ False True True + @@ -240,6 +241,7 @@ False True True + diff --git a/src/main.c b/src/main.c index be1bd04..cfa9218 100644 --- a/src/main.c +++ b/src/main.c @@ -373,6 +373,32 @@ window_delete_event_cbk(GtkWidget *widget, GdkEvent *event, gpointer data) return TRUE; } +void quit_activate_cbk(GtkWidget *menu_item, gpointer data) +{ + log_debug("quit_activate_cbk"); + + gtk_main_quit(); +} + +void help_activate_cbk(GtkWidget *menu_item, gpointer data) +{ + log_debug("help_activate_cbk"); + + gtk_show_about_dialog + (NULL, + "comments", + _("PRSS is a GTK+ client application for Tiny Tiny RSS "), + "copyright", + _("Copyright(c) 2010-2013\njeanfi@gmail.com"), + "logo-icon-name", "prss", + "program-name", "PRSS", + "title", _("About PRSS"), + "version", VERSION, + "website", PACKAGE_URL, + "website-label", _("PRSS Homepage"), + NULL); +} + static void log_init() { char *home, *path, *dir; diff --git a/src/ttrss.c b/src/ttrss.c index 68b54ff..6d4ebd6 100644 --- a/src/ttrss.c +++ b/src/ttrss.c @@ -102,19 +102,11 @@ struct headline **ttrss_feed_get_headlines(struct feed *f) void ttrss_set_article_unread(int id, int unread) { - struct json_object *rp, *rq; - log_debug("ttrss_set_article_unread(%d,%d)", id, unread); - rq = ws_request_new("updateArticle"); - json_object_object_add(rq, "article_ids", json_object_new_int(id)); - json_object_object_add(rq, "field", json_object_new_int(2)); - json_object_object_add(rq, "mode", json_object_new_int(unread)); - - rp = ws_execute(rq); + ws_set_article_unread(id, unread); - json_object_put(rq); - json_object_put(rp); + log_debug("ttrss_set_article_unread(%d,%d)", id, unread); } void ttrss_set_config(const char *url, const char *user, const char *pwd) diff --git a/src/ttrss_ws.c b/src/ttrss_ws.c index 82e9205..94f0fee 100644 --- a/src/ttrss_ws.c +++ b/src/ttrss_ws.c @@ -266,7 +266,7 @@ struct feed **ws_update_feeds(struct feed **feeds) struct feed *feed, **tmp; const char *title, *url; - log_debug("ttrss_get_feeds()"); + log_debug("ws_update_feeds()"); rq = ws_request_new("getFeeds"); @@ -307,7 +307,28 @@ struct feed **ws_update_feeds(struct feed **feeds) feeds = NULL; } - log_debug("ttrss_get_feeds() done"); + log_debug("ws_update_feeds() done"); return feeds; } + +void ws_set_article_unread(int id, int unread) +{ + struct json_object *rp, *rq; + + log_debug("ws_set_article_unread(%d,%d)", id, unread); + + rq = ws_request_new("updateArticle"); + json_object_object_add(rq, "article_ids", json_object_new_int(id)); + json_object_object_add(rq, "field", json_object_new_int(2)); + json_object_object_add(rq, "mode", json_object_new_int(unread)); + + rp = ws_execute(rq); + + json_object_put(rq); + + if (rp) + json_object_put(rp); + + log_debug("ws_set_article_unread(%d,%d) done", id, unread); +} diff --git a/src/ttrss_ws.h b/src/ttrss_ws.h index 7710af4..a6d7e92 100644 --- a/src/ttrss_ws.h +++ b/src/ttrss_ws.h @@ -31,5 +31,6 @@ struct json_object *ws_execute(struct json_object *rq); struct feed **ws_update_feeds(struct feed **feeds); int ws_update_headlines(struct feed *feed); char *ws_get_article_content(int id); +void ws_set_article_unread(int id, int unread); #endif