From: Sébastien Marie Date: Mon, 3 Nov 2014 18:40:25 +0000 (+0100) Subject: cleanup: RequestQueued autocmd Event X-Git-Url: https://git.owens.tech/style.css/style.css/git?a=commitdiff_plain;h=e8b8b2853fcb744a7a6f1fa1ddb28076799690a8;p=vimb.git cleanup: RequestQueued autocmd Event --- diff --git a/doc/vimb.1 b/doc/vimb.1 index 3a0b719..2ccc308 100644 --- a/doc/vimb.1 +++ b/doc/vimb.1 @@ -648,10 +648,6 @@ Fires when everything that was required to display on the page has been loaded. Fired when some error occurred during the page load that prevented it from being completed. .TP -.B RequestQueued -Fired before each request (and so, multiple times in one page: one time for -each image, css, scripts, frames...). -.TP .B DownloadStart Fired right before a download is started. This is fired for vimb downloads as well as external downloads if 'download-use-external' is enabled. diff --git a/src/autocmd.c b/src/autocmd.c index 87054eb..4ac3569 100644 --- a/src/autocmd.c +++ b/src/autocmd.c @@ -49,7 +49,6 @@ static struct { {"DownloadStart", 0x0020}, {"DownloadFinished", 0x0040}, {"DownloadFailed", 0x0080}, - {"RequestQueued", 0x0100}, }; extern VbCore vb; diff --git a/src/autocmd.h b/src/autocmd.h index 605c4ba..fe3bc04 100644 --- a/src/autocmd.h +++ b/src/autocmd.h @@ -36,7 +36,6 @@ typedef enum { AU_DOWNLOAD_START, AU_DOWNLOAD_FINISHED, AU_DOWNLOAD_FAILED, - AU_REQUEST_QUEUED, } AuEvent; void autocmd_init(void); diff --git a/src/main.c b/src/main.c index 4aa9536..762b2d5 100644 --- a/src/main.c +++ b/src/main.c @@ -93,7 +93,7 @@ void vb_download_internal(WebKitWebView *view, WebKitDownload *download, const c void vb_download_external(WebKitWebView *view, WebKitDownload *download, const char *file); static void download_progress_cp(WebKitDownload *download, GParamSpec *pspec); static void read_from_stdin(void); -#if defined(FEATURE_AUTOCMD) || defined(FEATURE_ARH) +#ifdef FEATURE_ARH static void session_request_queued_cb(SoupSession *session, SoupMessage *msg, gpointer data); #endif @@ -968,7 +968,7 @@ static void setup_signals() NULL ); -#if defined(FEATURE_AUTOCMD) || defined(FEATURE_ARH) +#ifdef FEATURE_ARH g_signal_connect(vb.session, "request-queued", G_CALLBACK(session_request_queued_cb), NULL); #endif @@ -1501,16 +1501,12 @@ static void read_from_stdin(void) g_free(buf); } -#if defined(FEATURE_AUTOCMD) || defined(FEATURE_ARH) +#ifdef FEATURE_ARH static void session_request_queued_cb(SoupSession *session, SoupMessage *msg, gpointer data) { SoupURI *suri = soup_message_get_uri(msg); char *uri = soup_uri_to_string(suri, false); -#ifdef FEATURE_AUTOCMD - autocmd_run(AU_REQUEST_QUEUED, uri, NULL); -#endif - #ifdef DEBUG SoupMessageHeadersIter iter; const char *name, *value; @@ -1522,9 +1518,7 @@ static void session_request_queued_cb(SoupSession *session, SoupMessage *msg, gp } #endif -#ifdef FEATURE_ARH arh_run(vb.config.autoresponseheader, uri, msg); -#endif g_free(uri); }