static void webview_load_status_cb(WebKitWebView *view, GParamSpec *pspec)
{
- const char *uri = webkit_web_view_get_uri(view);
+ const char *uri;
switch (webkit_web_view_get_load_status(view)) {
case WEBKIT_LOAD_PROVISIONAL:
#ifdef FEATURE_AUTOCMD
- autocmd_run(NULL, AU_PAGE_LOAD_PROVISIONAL, uri);
+ autocmd_run(NULL, AU_PAGE_LOAD_PROVISIONAL, NULL);
#endif
/* update load progress in statusbar */
vb.state.progress = 0;
break;
case WEBKIT_LOAD_COMMITTED:
+ uri = webkit_web_view_get_uri(view);
#ifdef FEATURE_AUTOCMD
autocmd_run(NULL, AU_PAGE_LOAD_COMMITED, uri);
#endif
case WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT:
#ifdef FEATURE_AUTOCMD
+ uri = webkit_web_view_get_uri(view);
autocmd_run(NULL, AU_PAGE_LOAD_FIRST_LAYOUT, uri);
#endif
/* if we load a page from a submitted form, leave the insert mode */
break;
case WEBKIT_LOAD_FINISHED:
+ uri = webkit_web_view_get_uri(view);
#ifdef FEATURE_AUTOCMD
autocmd_run(NULL, AU_PAGE_LOAD_FINISHED, uri);
#endif
case WEBKIT_LOAD_FAILED:
#ifdef FEATURE_AUTOCMD
+ uri = webkit_web_view_get_uri(view);
autocmd_run(NULL, AU_PAGE_LOAD_FAILED, uri);
#endif
break;