{ "toggle_insert_mode", {toggle_insert_mode, 0} },
{ "runcmd", {runcmd, NOSPLIT} },
{ "set", {set_var, NOSPLIT} },
+ { "get", {get_var, NOSPLIT} },
{ "dump_config", {act_dump_config, 0} },
{ "keycmd", {keycmd, NOSPLIT} },
{ "keycmd_nl", {keycmd_nl, NOSPLIT} },
}
static void
+get_var(WebKitWebView *page, GArray *argv) {
+ (void) page;
+ get_var_value(argv_idx(argv, 0));
+}
+
+static void
act_dump_config() {
dump_config();
}
}
static gboolean
-get_var_value(gchar *name) {
+get_var_value(const gchar *name) {
uzbl_cmdprop *c;
if( (c = g_hash_table_lookup(uzbl.comm.proto_var, name)) ) {
else
printf("Error in command: %s\n", tokens[0]);
}
- /* GET command */
- else if(ctl_line[0] == 'g' || ctl_line[0] == 'G') {
- tokens = g_regex_split(uzbl.comm.get_regex, ctl_line, 0);
- if(tokens[0][0] == 0) {
- get_var_value(tokens[1]);
- }
- else
- printf("Error in command: %s\n", tokens[0]);
- }
/* BIND command */
else if(ctl_line[0] == 'b' || ctl_line[0] == 'B') {
tokens = g_regex_split(uzbl.comm.bind_regex, ctl_line, 0);
set_var_value(gchar *name, gchar *val);
static gboolean
+get_var_value(const gchar *name);
+
+static gboolean
new_window_cb (WebKitWebView *web_view, WebKitWebFrame *frame, WebKitNetworkRequest *request, WebKitWebNavigationAction *navigation_action, WebKitWebPolicyDecision *policy_decision, gpointer user_data);
WebKitWebView*
set_var(WebKitWebView *page, GArray *argv);
static void
+get_var(WebKitWebView *page, GArray *argv);
+
+static void
act_dump_config();
static void