2 * Copyright (C) 2012-2013 jeanfi@gmail.com
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 #include <json/json.h>
26 #include <glib/gi18n.h>
29 static const char *program_name;
31 static struct option long_options[] = {
32 {"version", no_argument, 0, 'v'},
33 {"help", no_argument, 0, 'h'},
37 static void print_version()
39 printf("prss %s\n", VERSION);
40 printf(_("Copyright (C) %s jeanfi@gmail.com\n"
41 "License GPLv2: GNU GPL version 2 or later "
42 "<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>\n"
43 "This is free software: you are free to change and "
45 "There is NO WARRANTY, to the extent permitted by law.\n"),
49 static void print_help()
51 printf(_("Usage: %s [OPTION]...\n"), program_name);
53 puts(_("Prss is a GTK+ news reader for tt-rss."));
57 puts(_(" -h, --help display this help and exit\n"
58 " -v, --version display version information and exit"));
62 printf(_("Report bugs to: %s\n"), PACKAGE_BUGREPORT);
64 printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
68 int main(int argc, char **argv)
72 int optc, cmdok, opti;
74 program_name = argv[0];
76 setlocale(LC_ALL, "");
79 bindtextdomain(PACKAGE, LOCALEDIR);
84 while ((optc = getopt_long(argc, argv, "vh", long_options,
99 if (!cmdok || optind != argc) {
100 fprintf(stderr, _("Try `%s --help' for more information.\n"),
105 gtk_init(NULL, NULL);
106 builder = gtk_builder_new();
107 gtk_builder_add_from_file
109 PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "prss.glade",
111 window = GTK_WIDGET(gtk_builder_get_object(builder, "window"));
113 gtk_builder_connect_signals(builder, NULL);
115 g_object_unref(G_OBJECT(builder));
117 gtk_widget_show_all(window);