summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2014-02-24 13:37:09 +0100
committerportix <portix@gmx.net>2014-02-24 13:37:09 +0100
commit33c8454f1d8c0be290486dc5ddd4190025e48538 (patch)
treeab9c83a98cf5ec678b0ad8fa0ad40a7b3d432aaf
parentb608cfe5a6a5a4f4c91a937503fa0fd804f2d09d (diff)
downloaddwb-33c8454f1d8c0be290486dc5ddd4190025e48538.zip
Using arg.i for bind id
-rw-r--r--src/scripts.c6
-rw-r--r--src/scripts.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/scripts.c b/src/scripts.c
index 69405e79..c1da4f0c 100644
--- a/src/scripts.c
+++ b/src/scripts.c
@@ -2023,7 +2023,7 @@ global_unbind(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, si
if (JSValueIsNumber(ctx, argv[0])) {
int id = (int)JSValueToNumber(ctx, argv[0], exc);
for (l = dwb.keymap; l; l=l->next)
- if (KEYMAP_MAP(l)->prop & CP_SCRIPT && KEYMAP_MAP(l)->arg.n == id) {
+ if (KEYMAP_MAP(l)->prop & CP_SCRIPT && KEYMAP_MAP(l)->arg.i == id) {
break;
}
}
@@ -2047,7 +2047,7 @@ global_unbind(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, si
{
// don't free it yet, if unbind is called from inside a bind
// callback parse_command_line and eval_key would use an invalid keymap
- KEYMAP_MAP(l)->arg.n = 0;
+ KEYMAP_MAP(l)->arg.i = 0;
for (GList *gl = dwb.override_keys; gl; gl=gl->next)
{
@@ -2118,7 +2118,7 @@ global_bind(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size
JSValueProtect(ctx, func);
ret = ++id;
- Arg a = { .js = func, .n = ret };
+ Arg a = { .js = func, .i = ret };
KeyMap *map = dwb_add_key(keystr, name, callback, (Func)scripts_eval_key, option, &a);
if (override)
dwb.override_keys = g_list_prepend(dwb.override_keys, map);
diff --git a/src/scripts.h b/src/scripts.h
index f79adb1f..492e2dd7 100644
--- a/src/scripts.h
+++ b/src/scripts.h
@@ -87,7 +87,7 @@ gboolean scripts_load_chrome(JSObjectRef, const char *);
void scripts_load_extension(const char *);
void scripts_clear_keymap(KeyMap *km);
-#define SCRIPTS_INVALID_BIND(m) (((m)->map->prop & CP_SCRIPT) && (m)->map->arg.n == 0)
+#define SCRIPTS_INVALID_BIND(m) (((m)->map->prop & CP_SCRIPT) && (m)->map->arg.i == 0)
#define EMIT_SCRIPT(sig) ((dwb.misc.script_signals & (1ULL<<SCRIPTS_SIG_##sig)))
#define SCRIPTS_EMIT_RETURN(signal, json, val) G_STMT_START \
if (scripts_emit(&signal)) { \