(no commit message)
authorJean-Philippe Orsini <jeanfi@gmail.com>
Tue, 23 Apr 2013 20:14:09 +0000 (20:14 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Tue, 23 Apr 2013 20:14:09 +0000 (20:14 +0000)
po/fr.gmo
po/fr.po
po/prss.pot
src/ttrss.c

index e8f5f9c..153d302 100644 (file)
Binary files a/po/fr.gmo and b/po/fr.gmo differ
index 33b8e0b..f3f443e 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-22 09:01+0200\n"
+"POT-Creation-Date: 2013-04-23 21:54+0200\n"
 "PO-Revision-Date: 2012-05-13 18:15+0000\n"
 "Last-Translator: jeanfi <Unknown>\n"
 "Language-Team: French <>\n"
@@ -19,7 +19,7 @@ msgstr ""
 "X-Launchpad-Export-Date: 2012-07-02 08:28+0000\n"
 "X-Generator: Launchpad (build 15520)\n"
 
-#: src/main.c:44
+#: src/main.c:47
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -29,37 +29,37 @@ msgid ""
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
 
-#: src/main.c:55
+#: src/main.c:58
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr ""
 
-#: src/main.c:57
+#: src/main.c:60
 msgid "Prss is a GTK+ news reader for tt-rss."
 msgstr ""
 
-#: src/main.c:60
+#: src/main.c:63
 #, fuzzy
 msgid "Options:"
 msgstr "Description:"
 
-#: src/main.c:61
+#: src/main.c:64
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
 msgstr ""
 
-#: src/main.c:66
+#: src/main.c:69
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr ""
 
-#: src/main.c:68
+#: src/main.c:71
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr ""
 
-#: src/main.c:205
+#: src/main.c:341
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr ""
index 4876729..b0a958b 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-22 09:01+0200\n"
+"POT-Creation-Date: 2013-04-23 21:54+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"
@@ -17,7 +17,7 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/main.c:44
+#: src/main.c:47
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -27,36 +27,36 @@ msgid ""
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
 
-#: src/main.c:55
+#: src/main.c:58
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr ""
 
-#: src/main.c:57
+#: src/main.c:60
 msgid "Prss is a GTK+ news reader for tt-rss."
 msgstr ""
 
-#: src/main.c:60
+#: src/main.c:63
 msgid "Options:"
 msgstr ""
 
-#: src/main.c:61
+#: src/main.c:64
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
 msgstr ""
 
-#: src/main.c:66
+#: src/main.c:69
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr ""
 
-#: src/main.c:68
+#: src/main.c:71
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr ""
 
-#: src/main.c:205
+#: src/main.c:341
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr ""
index ae4a1c9..97f2803 100644 (file)
@@ -94,8 +94,11 @@ struct json_object *ws_execute(struct json_object *rq)
        if (rp) {
                content = ws_reply_get_content(rp);
 
-               if (content && !json_object_object_get(rp, "error"))
+               if (content && !json_object_object_get(rp, "error")) {
+                       json_object_get(content);
+                       json_object_put(rp);
                        return content;
+               }
 
                json_object_put(rp);
        }
@@ -105,7 +108,7 @@ struct json_object *ws_execute(struct json_object *rq)
 
 int ws_get_api_version()
 {
-       struct json_object *rp, *rq, *j;
+       struct json_object *rp, *rq;
        int v;
 
        rq = ws_request_new("getApiLevel");
@@ -115,12 +118,7 @@ int ws_get_api_version()
        json_object_put(rq);
 
        if (rp) {
-               j = json_object_object_get(rp, "level");
-
-               if (j)
-                       v = json_object_get_int(j);
-               else
-                       v = 0;
+               v = json_object_get_int(json_object_object_get(rp, "level"));
 
                json_object_put(rp);
        } else {
@@ -144,11 +142,7 @@ char *ws_login()
 
        if (rp) {
                j = json_object_object_get(rp, "session_id");
-
-               if (j)
-                       str = strdup(json_object_get_string(j));
-               else
-                       str = NULL;
+               str = strdup(json_object_get_string(j));
 
                json_object_put(rp);
        } else {