ui/misc.cc File Reference

Go to the source code of this file.

Functions

bool isXTerm ()
 Indicates whether or not the terminal is an X Terminal.
static int mystrcmp (const char *s1, const char *s2)
 Wrapper function.
void setTerminalTitle (const std::string &title)
 Set the title on a terminal.

Variables

static const char * xterms []
 The terminals we know.


Function Documentation

bool isXTerm (  ) 

Indicates whether or not the terminal is an X Terminal. It uses the termname() function to determine the type of terminal. It compares the return value of termname() with the values stored in xterms.

The function is always available, but always returns false if termname is not supported

Return values:
\c true if the terminal is an X Terminal, false otherwise.

Definition at line 97 of file misc.cc.

References mystrcmp(), and xterms.

Referenced by setTerminalTitle().

static int mystrcmp ( const char *  s1,
const char *  s2 
) [inline, static]

Wrapper function for strncasecmp, strncmp, strcmp.

Parameters:
s1 String one
s2 String two

Definition at line 72 of file misc.cc.

Referenced by isXTerm().

void setTerminalTitle ( const std::string &  title  ) 

If supported, set the title on a terminal. The function is always available, but might not have an effect.

Parameters:
title the title to set

Definition at line 117 of file misc.cc.

References isXTerm().

Referenced by MainWindow::lockScreen(), and MainWindow::printTitle().


Variable Documentation

const char* xterms[] [static]

Initial value:

 {
    "xterm",
    "dtterm",
    NULL
}
Holds the terminals we know that can have set the title.

Definition at line 58 of file misc.cc.

Referenced by isXTerm().


Generated on Mon Apr 13 17:29:47 2009 for YAPET by  doxygen 1.5.8