diff options
-rw-r--r-- | src/fe-text/irssi.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c index 5172f2ac..eb151ae7 100644 --- a/src/fe-text/irssi.c +++ b/src/fe-text/irssi.c @@ -22,8 +22,10 @@ #include "module-formats.h" #include "args.h" #include "signals.h" +#include "levels.h" #include "core.h" +#include "printtext.h" #include "fe-common-core.h" #include "fe-common-irc.h" #include "themes.h" @@ -54,6 +56,17 @@ void mainwindow_activity_deinit(void); static GMainLoop *main_loop; int quitting; +static const char *firsttimer_text = + "Looks like this is the first time you run irssi.\n" + "This is just a reminder that you really should go read\n" + "startup-HOWTO if you haven't already. Irssi's default\n" + "settings aren't probably what you've used to, and you\n" + "shouldn't judge the whole client as crap based on them.\n\n" + "You can find startup-HOWTO and more irssi beginner info at\n" + "http://irssi.org/beginner/"; +static int display_firsttimer = FALSE; + + static void sig_exit(void) { g_main_quit(main_loop); @@ -115,6 +128,11 @@ static void textui_finish_init(void) #endif signal_emit("irssi init finished", 0); + if (display_firsttimer) { + printtext_window(active_win, MSGLEVEL_CLIENTNOTICE, + "%s", firsttimer_text); + } + screen_refresh_thaw(); } @@ -150,20 +168,6 @@ static void textui_deinit(void) core_deinit(); } -static void irssi_firsttimer(void) -{ - char str[2]; - - printf("\nLooks like this is the first time you run irssi.\n"); - printf("This is just a reminder that you really should go read\n"); - printf("startup-HOWTO if you haven't already. Irssi's default\n"); - printf("settings aren't probably what you've used to, and you\n"); - printf("shouldn't judge the whole client as crap based on them.\n\n"); - printf("You can find startup-HOWTO and more irssi beginner info at\n"); - printf("http://irssi.org/beginner/\n"); - fgets(str, sizeof(str), stdin); -} - static void check_oldcrap(void) { FILE *f; @@ -208,7 +212,7 @@ static void check_files(void) path = g_strdup_printf("%s/.irssi", g_get_home_dir()); if (stat(path, &statbuf) != 0) { /* ~/.irssi doesn't exist, first time running irssi */ - irssi_firsttimer(); + display_firsttimer = TRUE; } else { check_oldcrap(); } |