From cfc5a57255927e45d7cecfa70cf69c7e4d13bc44 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Sun, 25 Jan 2015 18:18:31 +0330 Subject: [PATCH] txtwin: remove txtwin_gtk_init() --- cnoor.c | 5 ++--- txtwin.c | 8 ++++---- txtwin.h | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cnoor.c b/cnoor.c index b0175e9..516a878 100644 --- a/cnoor.c +++ b/cnoor.c @@ -1,9 +1,9 @@ /* * cnoor - a small framebuffer Quran viewer * - * Copyright (C) 2009-2013 Ali Gholami Rudi + * Copyright (C) 2009-2015 Ali Gholami Rudi * - * This program is released under the modified BSD license. + * This program is released under the Modified BSD license. */ #include #include @@ -95,7 +95,6 @@ int main(int argc, char **argv) fprintf(stderr, "cnoor: invalid sura number\n"); return 1; } - txtwin_gtk_init(argc, argv); show(sura); return 0; } diff --git a/txtwin.c b/txtwin.c index e1327ce..1c62825 100644 --- a/txtwin.c +++ b/txtwin.c @@ -229,17 +229,17 @@ void txtwin_loop(void) } } -void txtwin_gtk_init(int argc, char **argv) +static void txtwin_gtk_init(void) { - g_type_init(); - g_set_prgname("cpan"); - setlocale(LC_ALL, ""); } void txtwin_init(char *sura) { char *clear = "\x1b[2J\x1b[H"; char *hide = "\x1b[?25l"; + setlocale(LC_ALL, ""); + g_type_init(); + g_set_prgname("cnoor"); fontmap = pango_ft2_font_map_new(); pango_ft2_font_map_set_resolution(PANGO_FT2_FONT_MAP(fontmap), DPI, DPI); context = pango_font_map_create_context(PANGO_FONT_MAP(fontmap)); diff --git a/txtwin.h b/txtwin.h index ab1505a..69b8cd8 100644 --- a/txtwin.h +++ b/txtwin.h @@ -1,5 +1,4 @@ void txtwin_init(char *name); -void txtwin_gtk_init(int argc, char **argv); void txtwin_free(void); void txtwin_loop(void); void txtwin_line(void); -- 2.11.4.GIT