aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--uzbl-core.c17
-rw-r--r--uzbl-core.h2
2 files changed, 6 insertions, 13 deletions
diff --git a/uzbl-core.c b/uzbl-core.c
index e25385c..e2f550b 100644
--- a/uzbl-core.c
+++ b/uzbl-core.c
@@ -652,8 +652,7 @@ struct {const char *key; CommandInfo value;} cmdlist[] =
{ "menu_image_remove", {menu_remove_image, TRUE} },
{ "menu_editable_remove", {menu_remove_edit, TRUE} },
{ "hardcopy", {hardcopy, TRUE} },
- { "include", {include, TRUE} },
- { "builtins", {builtins, TRUE} }
+ { "include", {include, TRUE} }
};
void
@@ -666,14 +665,8 @@ commands_hash(void)
g_hash_table_insert(uzbl.behave.commands, (gpointer) cmdlist[i].key, &cmdlist[i].value);
}
-// TODO: we should probably build the command list once and just re-use that on every
-// invocation of "builtins"
void
-builtins(WebKitWebView *page, GArray *argv, GString *result) {
- (void) page;
- (void) argv;
- // see TODO below
- (void) result;
+builtins() {
unsigned int i,
len = LENGTH(cmdlist);
GString *command_list = g_string_new("");
@@ -683,9 +676,6 @@ builtins(WebKitWebView *page, GArray *argv, GString *result) {
g_string_append_c(command_list, ' ');
}
- // TODO: Do we also want to query for the builtins without generating an event?
- //result = command_list;
-
send_event(BUILTINS, command_list->str, NULL);
g_string_free(command_list, TRUE);
}
@@ -2521,6 +2511,9 @@ main (int argc, char* argv[]) {
g_free(t);
}
+ /* generate an event with a list of built in commands */
+ builtins();
+
gtk_widget_grab_focus (GTK_WIDGET (uzbl.gui.web_view));
if (uzbl.state.verbose) {
diff --git a/uzbl-core.h b/uzbl-core.h
index 4779139..83fa4b2 100644
--- a/uzbl-core.h
+++ b/uzbl-core.h
@@ -473,7 +473,7 @@ void
include(WebKitWebView *page, GArray *argv, GString *result);
void
-builtins(WebKitWebView *page, GArray *argv, GString *result);
+builtins();
typedef void (*Command)(WebKitWebView*, GArray *argv, GString *result);