mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05: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
|
||||
|
||||
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)
|
||||
CONFIG_ANY_SPIDERMONKEY = yes
|
||||
|
@ -4,12 +4,33 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "elinks.h"
|
||||
|
||||
#include "dialogs/status.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 ecmascript_enabled;
|
||||
|
||||
int
|
||||
ecmascript_get_interpreter_count(void)
|
||||
{
|
||||
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" {
|
||||
#endif
|
||||
|
||||
struct session;
|
||||
|
||||
int ecmascript_get_interpreter_count(void);
|
||||
void toggle_ecmascript(struct session *ses);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -160,20 +160,7 @@ read_url_list(void)
|
||||
}
|
||||
}
|
||||
|
||||
static 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 ecmascript_enabled;
|
||||
|
||||
int
|
||||
get_ecmascript_enable(struct ecmascript_interpreter *interpreter)
|
||||
|
@ -17,12 +17,12 @@ if CONFIG_ANY_SPIDERMONKEY
|
||||
endif
|
||||
|
||||
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')
|
||||
endif
|
||||
|
||||
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')
|
||||
endif
|
||||
|
||||
|
@ -2,6 +2,6 @@ top_builddir=../..
|
||||
include $(top_builddir)/Makefile.config
|
||||
|
||||
SUBDIRS = dump text
|
||||
OBJS = action.obj timer.o viewer.o
|
||||
OBJS = action.o timer.o viewer.o
|
||||
|
||||
include $(top_srcdir)/Makefile.lib
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "document/document.h"
|
||||
#include "document/view.h"
|
||||
#ifdef CONFIG_ECMASCRIPT
|
||||
#include "ecmascript/ecmascript.h"
|
||||
#include "ecmascript/ecmascript-c.h"
|
||||
#endif
|
||||
#include "formhist/dialogs.h"
|
||||
#include "globhist/dialogs.h"
|
@ -1,3 +1,3 @@
|
||||
subdir('dump')
|
||||
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