(no commit message)
authorJean-Philippe Orsini <jeanfi@gmail.com>
Fri, 26 Apr 2013 06:25:51 +0000 (06:25 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Fri, 26 Apr 2013 06:25:51 +0000 (06:25 +0000)
po/fr.gmo
po/fr.po
po/prss.pot
src/glade/prss.glade
src/main.c
src/ttrss.c
src/ttrss_ws.c
src/ttrss_ws.h

index d0e187a..dcc565b 100644 (file)
Binary files a/po/fr.gmo and b/po/fr.gmo differ
index a3e3ef3..3e6fda1 100644 (file)
--- 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 <Unknown>\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 ""
index e7165db..c390cab 100644 (file)
@@ -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 <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\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 ""
index d1de23f..832e353 100644 (file)
                         <property name="can_focus">False</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
+                        <signal name="activate" handler="quit_activate_cbk" swapped="no"/>
                       </object>
                     </child>
                   </object>
                         <property name="can_focus">False</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
+                        <signal name="activate" handler="help_activate_cbk" swapped="no"/>
                       </object>
                     </child>
                   </object>
index be1bd04..cfa9218 100644 (file)
@@ -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;
index 68b54ff..6d4ebd6 100644 (file)
@@ -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)
index 82e9205..94f0fee 100644 (file)
@@ -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);
+}
index 7710af4..a6d7e92 100644 (file)
@@ -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