aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl-core.c
diff options
context:
space:
mode:
authorGravatar Rob <rob.manea@gmail.com>2009-11-20 14:50:49 +0100
committerGravatar Rob <rob.manea@gmail.com>2009-11-20 14:50:49 +0100
commitfef9c29ed78b87193ad951bf64e962bfa7cff0cd (patch)
tree0a9255ebed32c48520b256b32e17edca0a90cce0 /uzbl-core.c
parentb40b524072a4e72a209830d2060f99a210f93433 (diff)
generate BUITLINS event only once on startup
Diffstat (limited to 'uzbl-core.c')
-rw-r--r--uzbl-core.c17
1 files changed, 5 insertions, 12 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) {