diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-12-16 12:18:00 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-12-16 12:18:00 +0100 |
commit | 48f087b88312143bd77ea68970f0a0c5c5333869 (patch) | |
tree | 795840cd0323339b30db263d14383291eaa3d794 /src/gui/curses | |
parent | 610ef09f19547990abc18857f951a43f4d416a5c (diff) | |
download | weechat-48f087b88312143bd77ea68970f0a0c5c5333869.zip |
Add option "term" for command /debug: display infos about terminal and available colors
Diffstat (limited to 'src/gui/curses')
-rw-r--r-- | src/gui/curses/gui-curses-main.c | 8 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 15 |
2 files changed, 15 insertions, 8 deletions
diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index bc2bfd4c3..2f0822d7b 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -155,14 +155,6 @@ gui_main_init () gui_bar_window_create_win (ptr_bar_win); } } - - /* display infos about terminal and colors */ - if (weechat_debug_core >= 1) - { - gui_chat_printf (NULL, - _("TERM=\"%s\", %d colors available, %d pairs"), - getenv ("TERM"), COLORS, COLOR_PAIRS); - } } /* diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index eaee0d7b7..35ed5f474 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -1485,6 +1485,21 @@ gui_window_set_title (const char *title) } /* + * gui_window_term_display_infos: display some infos about terminal and colors + */ + +void +gui_window_term_display_infos () +{ + gui_chat_printf (NULL, ""); + gui_chat_printf (NULL, _("Terminal infos:")); + gui_chat_printf (NULL, _(" TERM='%s', size: %dx%d"), + getenv("TERM"), gui_term_cols, gui_term_lines); + gui_chat_printf (NULL, _(" %d colors available, %d pairs"), + COLORS, COLOR_PAIRS); +} + +/* * gui_window_objects_print_log: print window Curses objects infos in log * (usually for crash dump) */ |