clear window title at exit
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
AC_INIT(configure.in)
|
AC_INIT(configure.in)
|
||||||
|
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
AM_INIT_AUTOMAKE(ncmpcpp, 0.3.4)
|
AM_INIT_AUTOMAKE(ncmpcpp, 0.3.5_pre)
|
||||||
|
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
|
|
||||||
|
|||||||
@@ -1782,6 +1782,7 @@ int main(int argc, char *argv[])
|
|||||||
errorlog.close();
|
errorlog.close();
|
||||||
Mpd->Disconnect();
|
Mpd->Disconnect();
|
||||||
DestroyScreen();
|
DestroyScreen();
|
||||||
|
WindowTitle("");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,20 +51,18 @@ namespace
|
|||||||
bool block_statusbar_update = 0;
|
bool block_statusbar_update = 0;
|
||||||
bool block_progressbar_update = 0;
|
bool block_progressbar_update = 0;
|
||||||
bool allow_statusbar_unlock = 1;
|
bool allow_statusbar_unlock = 1;
|
||||||
|
|
||||||
# ifndef USE_PDCURSES
|
|
||||||
void WindowTitle(const string &status)
|
|
||||||
{
|
|
||||||
static const string term_type = getenv("TERM") ? getenv("TERM") : "";
|
|
||||||
|
|
||||||
if (term_type != "linux" && Config.set_window_title)
|
|
||||||
std::cout << "\033]0;" << status << "\7";
|
|
||||||
}
|
|
||||||
# else
|
|
||||||
# define WindowTitle(x);
|
|
||||||
# endif // USE_PDCURSES
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef USE_PDCURSES
|
||||||
|
void WindowTitle(const string &status)
|
||||||
|
{
|
||||||
|
static const string term_type = getenv("TERM") ? getenv("TERM") : "";
|
||||||
|
|
||||||
|
if (term_type != "linux" && Config.set_window_title)
|
||||||
|
std::cout << "\033]0;" << status << "\7";
|
||||||
|
}
|
||||||
|
#endif // !USE_PDCURSES
|
||||||
|
|
||||||
void StatusbarGetStringHelper(const std::wstring &)
|
void StatusbarGetStringHelper(const std::wstring &)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
|
|||||||
@@ -24,6 +24,12 @@
|
|||||||
#include "mpdpp.h"
|
#include "mpdpp.h"
|
||||||
#include "ncmpcpp.h"
|
#include "ncmpcpp.h"
|
||||||
|
|
||||||
|
#ifndef USE_PDCURSES
|
||||||
|
void WindowTitle(const std::string &);
|
||||||
|
#else
|
||||||
|
# define WindowTitle(x);
|
||||||
|
#endif // USE_PDCURSES
|
||||||
|
|
||||||
void LockProgressbar();
|
void LockProgressbar();
|
||||||
void UnlockProgressbar();
|
void UnlockProgressbar();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user