Skip to content

Commit

Permalink
Add webview widget stop method.
Browse files Browse the repository at this point in the history
  • Loading branch information
mason-larobina committed Sep 1, 2010
1 parent c2140e1 commit 9b28f26
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions common/tokenize.gperf
Expand Up @@ -75,6 +75,7 @@ spacing
spawn
spawn_sync
ssl_trusted
stop
switch
text
textbutton
Expand Down
10 changes: 10 additions & 0 deletions widgets/webview.c
Expand Up @@ -827,6 +827,15 @@ luaH_webview_loading(lua_State *L)
return 1;
}

static gint
luaH_webview_stop(lua_State *L)
{
widget_t *w = luaH_checkudata(L, 1, &widget_class);
GtkWidget *view = g_object_get_data(G_OBJECT(w->widget), "webview");
webkit_web_view_stop_loading(WEBKIT_WEB_VIEW(view));
return 0;
}

/* check for trusted ssl certificate */
static gint
luaH_webview_ssl_trusted(lua_State *L)
Expand Down Expand Up @@ -896,6 +905,7 @@ luaH_webview_index(lua_State *L, luakit_token_t token)
PF_CASE(LOADING, luaH_webview_loading)
PF_CASE(RELOAD, luaH_webview_reload)
PF_CASE(SSL_TRUSTED, luaH_webview_ssl_trusted)
PF_CASE(STOP, luaH_webview_stop)
/* push source viewing methods */
PF_CASE(GET_VIEW_SOURCE, luaH_webview_get_view_source)
PF_CASE(SET_VIEW_SOURCE, luaH_webview_set_view_source)
Expand Down

0 comments on commit 9b28f26

Please sign in to comment.