From 3433b743b81494973ff59ab796ce2bce63469d19 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Sat, 25 Nov 2006 01:53:36 +0100 Subject: [PATCH] drop the stupid xterm.h header. Signed-off-by: Pierre Habouzit --- lib-ui/curs_main.c | 15 +++++++-------- main.c | 2 +- xterm.h | 23 ----------------------- 3 files changed, 8 insertions(+), 32 deletions(-) delete mode 100644 xterm.h diff --git a/lib-ui/curs_main.c b/lib-ui/curs_main.c index 6e20d66..ddb5be5 100644 --- a/lib-ui/curs_main.c +++ b/lib-ui/curs_main.c @@ -14,6 +14,7 @@ #include #include +#include #include @@ -26,14 +27,11 @@ #include "recvattach.h" #include "buffy.h" #include "thread.h" -#include "xterm.h" #include -#include - #ifdef USE_NNTP -#include "nntp/nntp.h" +#include #endif #ifdef USE_SASL @@ -549,10 +547,11 @@ int mutt_index_menu (void) sidebar_set_buffystats (Context); menu->redraw &= ~REDRAW_STATUS; if (option (OPTXTERMSETTITLES)) { - menu_status_line (buf, sizeof (buf), menu, NONULL (XtermTitle)); - mutt_xterm_set_title (buf); - menu_status_line (buf, sizeof (buf), menu, NONULL (XtermIcon)); - mutt_xterm_set_icon (buf); + menu_status_line(buf, sizeof(buf), menu, NONULL(XtermTitle)); + printf("\033]2;%s\007", buf); + menu_status_line(buf, sizeof(buf), menu, NONULL(XtermIcon)); + printf("\033]1;%s\007", buf); + fflush(stdout); } } diff --git a/main.c b/main.c index 3624bb6..23af035 100644 --- a/main.c +++ b/main.c @@ -859,7 +859,7 @@ int main (int argc, char **argv) || !explicit_folder) { mutt_index_menu (); if (option (OPTXTERMSETTITLES)) - mutt_xterm_set_title (NONULL (XtermLeave)); + printf("\033]2;%s\007", NONULL(XtermLeave)); if (Context) p_delete(&Context); } diff --git a/xterm.h b/xterm.h deleted file mode 100644 index ffb162d..0000000 --- a/xterm.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of mutt-ng, see http://www.muttng.org/. - * It's licensed under the GNU General Public License, - * please see the file GPL in the top level source directory. - */ -#ifndef MUTT_XTERM_H -#define MUTT_XTERM_H - -#include - -/* sets the current xterm's title */ -static inline void mutt_xterm_set_title(const char *title) { - printf("\033]2;%s\007", NONULL(title)); - fflush(stdout); -} - -/* sets the current xterm's icon */ -static inline void mutt_xterm_set_icon(const char *name) { - printf("\033]1;%s\007", NONULL(name)); - fflush(stdout); -} - -#endif /* !MUTT_XTERM_H */ -- 2.20.1