diff options
author | Timo Sirainen <cras@irssi.org> | 2000-12-03 05:47:50 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-12-03 05:47:50 +0000 |
commit | 043d9b8079d622862f5b967a7a6392e64fa3fa51 (patch) | |
tree | 76eaaedf29ab6754735a83f0af9d7129d9933ebf /src/fe-text/irssi.c | |
parent | f1580a67447ff97d852cbfef9ed41c3f7583e71b (diff) | |
download | irssi-043d9b8079d622862f5b967a7a6392e64fa3fa51.zip |
print the firsttimer info to irssi's window instead of stdout.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@942 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/irssi.c')
-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(); } |