mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
util: cosmetic updates to the list of terminals for wmmenugen
Added a comment to describe each terminal, so it will be easier to maintain the list in the future; added const attributes to help compiler generate better code; changed list parsing to use the size of the array instead of a null pointer mark for better compiled result. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
ecbee34f3a
commit
b431dcc399
@@ -26,10 +26,20 @@
|
|||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
|
|
||||||
static char *terminals[] = {
|
|
||||||
"x-terminal-emulator", "aterm","eterm", "gnome-terminal", "konsole",
|
static const char *const terminals[] = {
|
||||||
"kterm", "mlterm", "rxvt", "mrxvt", "pterm", "xterm", "dtterm",
|
"x-terminal-emulator", /* Debian wrapper to launch user's prefered X terminal */
|
||||||
NULL
|
"aterm", /* AfterStep's X terminal, which provides "transparency" */
|
||||||
|
"eterm", /* Enlightenment's terminal, designed for eye-candyness (and efficiency) */
|
||||||
|
"gnome-terminal", /* GNOME project's terminal */
|
||||||
|
"konsole", /* KDE project's terminals */
|
||||||
|
"kterm", /* a Multi-Lingual Terminal based on xterm, originally by Katsuya Sano */
|
||||||
|
"mlterm", /* a Multi-Lingual Terminal emulator written from scratch */
|
||||||
|
"rxvt", /* a slimmed-down xterm */
|
||||||
|
"mrxvt", /* rxvt with support for tabs amongst other things */
|
||||||
|
"pterm", /* terminal based on PuTTY, a popular SSH client for Windows */
|
||||||
|
"xterm", /* the standard terminal provided by the X Window System */
|
||||||
|
"dtterm" /* provided by CDE, a frequent Desktop Environment in proprietary UNIXs */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* pick a terminal emulator by finding the first existing entry of `terminals'
|
/* pick a terminal emulator by finding the first existing entry of `terminals'
|
||||||
@@ -50,7 +60,7 @@ char *find_terminal_emulator(void)
|
|||||||
if (!path)
|
if (!path)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (i = 0; terminals[i]; i++) {
|
for (i = 0; i < wlengthof(terminals); i++) {
|
||||||
t = wfindfile(path, terminals[i]);
|
t = wfindfile(path, terminals[i]);
|
||||||
if (t) {
|
if (t) {
|
||||||
wfree(t);
|
wfree(t);
|
||||||
|
|||||||
Reference in New Issue
Block a user