mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-29 03:17:53 -04:00
[viewer] action.cpp -> action.c
This commit is contained in:
parent
20aeb1cc0e
commit
009d09ba52
@ -10,11 +10,11 @@ SUBDIRS-$(CONFIG_QUICKJS) += quickjs
|
|||||||
|
|
||||||
SUBDIRS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey
|
SUBDIRS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey
|
||||||
|
|
||||||
OBJS-$(CONFIG_ECMASCRIPT_SMJS) += ecmascript.obj localstorage-db.obj spidermonkey.obj timer.obj
|
OBJS-$(CONFIG_ECMASCRIPT_SMJS) += ecmascript.obj ecmascript-c.obj localstorage-db.obj spidermonkey.obj timer.obj
|
||||||
|
|
||||||
OBJS-$(CONFIG_MUJS) += ecmascript.obj localstorage-db.obj mujs.obj timer.obj
|
OBJS-$(CONFIG_MUJS) += ecmascript.obj ecmascript-c.obj localstorage-db.obj mujs.obj timer.obj
|
||||||
|
|
||||||
OBJS-$(CONFIG_QUICKJS) += ecmascript.obj localstorage-db.obj quickjs.obj timer.obj
|
OBJS-$(CONFIG_QUICKJS) += ecmascript.obj ecmascript-c.obj localstorage-db.obj quickjs.obj timer.obj
|
||||||
|
|
||||||
ifeq ($(CONFIG_ECMASCRIPT_SMJS), yes)
|
ifeq ($(CONFIG_ECMASCRIPT_SMJS), yes)
|
||||||
CONFIG_ANY_SPIDERMONKEY = yes
|
CONFIG_ANY_SPIDERMONKEY = yes
|
||||||
|
@ -4,12 +4,33 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "elinks.h"
|
||||||
|
|
||||||
|
#include "dialogs/status.h"
|
||||||
#include "ecmascript/ecmascript-c.h"
|
#include "ecmascript/ecmascript-c.h"
|
||||||
|
#include "intl/libintl.h"
|
||||||
|
#include "session/session.h"
|
||||||
|
#include "util/memory.h"
|
||||||
|
#include "util/string.h"
|
||||||
|
|
||||||
extern int interpreter_count;
|
extern int interpreter_count;
|
||||||
|
extern int ecmascript_enabled;
|
||||||
|
|
||||||
int
|
int
|
||||||
ecmascript_get_interpreter_count(void)
|
ecmascript_get_interpreter_count(void)
|
||||||
{
|
{
|
||||||
return interpreter_count;
|
return interpreter_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
toggle_ecmascript(struct session *ses)
|
||||||
|
{
|
||||||
|
ecmascript_enabled = !ecmascript_enabled;
|
||||||
|
|
||||||
|
if (ecmascript_enabled) {
|
||||||
|
mem_free_set(&ses->status.window_status, stracpy(_("Ecmascript enabled", ses->tab->term)));
|
||||||
|
} else {
|
||||||
|
mem_free_set(&ses->status.window_status, stracpy(_("Ecmascript disabled", ses->tab->term)));
|
||||||
|
}
|
||||||
|
print_screen_status(ses);
|
||||||
|
}
|
||||||
|
@ -5,7 +5,10 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct session;
|
||||||
|
|
||||||
int ecmascript_get_interpreter_count(void);
|
int ecmascript_get_interpreter_count(void);
|
||||||
|
void toggle_ecmascript(struct session *ses);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -160,20 +160,7 @@ read_url_list(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ecmascript_enabled;
|
int ecmascript_enabled;
|
||||||
|
|
||||||
void
|
|
||||||
toggle_ecmascript(struct session *ses)
|
|
||||||
{
|
|
||||||
ecmascript_enabled = !ecmascript_enabled;
|
|
||||||
|
|
||||||
if (ecmascript_enabled) {
|
|
||||||
mem_free_set(&ses->status.window_status, stracpy(_("Ecmascript enabled", ses->tab->term)));
|
|
||||||
} else {
|
|
||||||
mem_free_set(&ses->status.window_status, stracpy(_("Ecmascript disabled", ses->tab->term)));
|
|
||||||
}
|
|
||||||
print_screen_status(ses);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
get_ecmascript_enable(struct ecmascript_interpreter *interpreter)
|
get_ecmascript_enable(struct ecmascript_interpreter *interpreter)
|
||||||
|
@ -17,12 +17,12 @@ if CONFIG_ANY_SPIDERMONKEY
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if conf_data.get('CONFIG_MUJS')
|
if conf_data.get('CONFIG_MUJS')
|
||||||
srcs += files('ecmascript.cpp', 'localstorage-db.cpp', 'mujs.cpp', 'timer.cpp')
|
srcs += files('ecmascript.cpp', 'ecmascript-c.cpp', 'localstorage-db.cpp', 'mujs.cpp', 'timer.cpp')
|
||||||
subdir('mujs')
|
subdir('mujs')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if conf_data.get('CONFIG_QUICKJS')
|
if conf_data.get('CONFIG_QUICKJS')
|
||||||
srcs += files('ecmascript.cpp', 'localstorage-db.cpp', 'quickjs.cpp', 'timer.cpp')
|
srcs += files('ecmascript.cpp', 'ecmascript-c.cpp', 'localstorage-db.cpp', 'quickjs.cpp', 'timer.cpp')
|
||||||
subdir('quickjs')
|
subdir('quickjs')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -2,6 +2,6 @@ top_builddir=../..
|
|||||||
include $(top_builddir)/Makefile.config
|
include $(top_builddir)/Makefile.config
|
||||||
|
|
||||||
SUBDIRS = dump text
|
SUBDIRS = dump text
|
||||||
OBJS = action.obj timer.o viewer.o
|
OBJS = action.o timer.o viewer.o
|
||||||
|
|
||||||
include $(top_srcdir)/Makefile.lib
|
include $(top_srcdir)/Makefile.lib
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "document/document.h"
|
#include "document/document.h"
|
||||||
#include "document/view.h"
|
#include "document/view.h"
|
||||||
#ifdef CONFIG_ECMASCRIPT
|
#ifdef CONFIG_ECMASCRIPT
|
||||||
#include "ecmascript/ecmascript.h"
|
#include "ecmascript/ecmascript-c.h"
|
||||||
#endif
|
#endif
|
||||||
#include "formhist/dialogs.h"
|
#include "formhist/dialogs.h"
|
||||||
#include "globhist/dialogs.h"
|
#include "globhist/dialogs.h"
|
@ -1,3 +1,3 @@
|
|||||||
subdir('dump')
|
subdir('dump')
|
||||||
subdir('text')
|
subdir('text')
|
||||||
srcs += files('action.cpp', 'timer.c', 'viewer.c')
|
srcs += files('action.c', 'timer.c', 'viewer.c')
|
||||||
|
Loading…
Reference in New Issue
Block a user