Exemplo n.º 1
0
void Keymapper::addGameKeymap(Keymap *keymap) {
	if (ConfMan.getActiveDomain() == 0)
		error("Call to Keymapper::addGameKeymap when no game loaded");

	// Detect whether the active game changed since last call.
	// If so, flush the game key configuration.
	if (_gameDomain.getConfigDomain() != ConfMan.getActiveDomain()) {
		cleanupGameKeymaps();
		_gameDomain.setConfigDomain(ConfMan.getActiveDomain());
	}

	initKeymap(_gameDomain, keymap);
}
Exemplo n.º 2
0
Arquivo: rc.c Projeto: galexcode/w3m
void
sync_with_option(void)
{
    if (PagerMax < LINES)
	PagerMax = LINES;
    WrapSearch = WrapDefault;
    parse_proxy();
#ifdef USE_COOKIE
    parse_cookie();
#endif
    initMailcap();
    initMimeTypes();
#ifdef USE_EXTERNAL_URI_LOADER
    initURIMethods();
#endif
#ifdef USE_MIGEMO
    init_migemo();
#endif
#ifdef USE_IMAGE
    if (fmInitialized && displayImage)
	initImage();
#else
    displayImage = FALSE;	/* XXX */
#endif
    loadPasswd();
    loadPreForm();

    if (AcceptLang == NULL || *AcceptLang == '\0') {
	/* TRANSLATORS: 
	 * AcceptLang default: this is used in Accept-Language: HTTP request 
	 * header. For example, ja.po should translate it as
	 * "ja;q=1.0, en;q=0.5" like that.
	 */
	AcceptLang = _("en;q=1.0");
    }
    if (AcceptEncoding == NULL || *AcceptEncoding == '\0')
	AcceptEncoding = acceptableEncoding();
    if (AcceptMedia == NULL || *AcceptMedia == '\0')
	AcceptMedia = acceptableMimeTypes();
    if (fmInitialized) {
	initKeymap(FALSE);
#ifdef USE_MOUSE
	initMouseAction();
#endif				/* MOUSE */
#ifdef USE_MENU
	initMenu();
#endif				/* MENU */
    }
}
Exemplo n.º 3
0
/**
 * @brief Initialize the newt library
 * @return int - 0 for success, else < 0
 */
int newtInit(void) {
    char * MonoValue, * MonoEnv = "NEWT_MONO";
    const char *lang;
    int ret;

    if ((lang = getenv("LC_ALL")) == NULL)
        if ((lang = getenv("LC_CTYPE")) == NULL)
            if ((lang = getenv("LANG")) == NULL)
                lang = "";
    /* slang doesn't support multibyte encodings except UTF-8,
       avoid character corruption by redrawing the screen */
    if (strstr (lang, ".euc") != NULL)
	trashScreen = 1;

    (void) strlen(ident);

    SLutf8_enable(-1);
    SLtt_get_terminfo();
    SLtt_get_screen_size();

    MonoValue = getenv(MonoEnv);
    if ( MonoValue != NULL )
	SLtt_Use_Ansi_Colors = 0;

    if ((ret = SLsmg_init_smg()) < 0)
	return ret;
    if ((ret = SLang_init_tty(0, 0, 0)) < 0)
	return ret;

    initColors();
    newtCursorOff();
    initKeymap();

    SLsignal_intr(SIGWINCH, handleSigwinch);
    SLang_getkey_intr_hook = getkeyInterruptHook;

    return 0;
}
Exemplo n.º 4
0
void Keymapper::addGlobalKeymap(Keymap *keymap) {
	initKeymap(_globalDomain, keymap);
}