diff options
author | Robert Manea <gotmor@gmail.com> | 2009-05-25 12:50:05 +0200 |
---|---|---|
committer | Robert Manea <gotmor@gmail.com> | 2009-05-25 12:50:05 +0200 |
commit | 5085ffdd5b07cdf71b07d3e0973f0d014313ceb6 (patch) | |
tree | 7151916ed79628bd49dbd589e7d44419b3b67798 | |
parent | f467ef9dc05a4dca9221c30f3da565c16aee8542 (diff) |
added inject_html variable
-rw-r--r-- | uzbl.c | 12 | ||||
-rw-r--r-- | uzbl.h | 3 |
2 files changed, 14 insertions, 1 deletions
@@ -61,7 +61,8 @@ typedef void (*Command)(WebKitWebView*, GArray *argv); /* commandline arguments (set initial values for the state variables) */ -const GOptionEntry entries[] = +static const +GOptionEntry entries[] = { { "uri", 'u', 0, G_OPTION_ARG_STRING, &uzbl.state.uri, "Uri to load at startup (equivalent to 'set uri = URI')", "URI" }, @@ -93,6 +94,7 @@ const struct { /* variable name pointer to variable in code type callback function */ /* --------------------------------------------------------------------------------------- */ { "uri", PTR(uzbl.state.uri, STR, cmd_load_uri)}, + { "inject_html", PTR(uzbl.behave.inject_html, STR, cmd_inject_html)}, { "status_message", PTR(uzbl.gui.sbar.msg, STR, update_title)}, { "show_status", PTR(uzbl.behave.show_status, INT, cmd_set_status)}, { "status_top", PTR(uzbl.behave.status_top, INT, move_statusbar)}, @@ -1308,6 +1310,14 @@ cmd_socket_dir() { } static void +cmd_inject_html() { + if(uzbl.behave.inject_html) { + webkit_web_view_load_html_string (uzbl.gui.web_view, + uzbl.behave.inject_html, NULL); + } +} + +static void cmd_modkey() { int i; char *buf; @@ -166,6 +166,7 @@ typedef struct { guint resizable_txt; gchar* default_encoding; guint enforce_96dpi; + gchar *inject_html; /* command list: name -> Command */ GHashTable* commands; @@ -480,5 +481,7 @@ cmd_default_encoding(); static void cmd_enforce_96dpi(); +static void +cmd_inject_html(); /* vi: set et ts=4: */ |