cleanup: RequestQueued autocmd Event
authorSébastien Marie <semarie@users.noreply.github.com>
Mon, 3 Nov 2014 18:40:25 +0000 (19:40 +0100)
committerSébastien Marie <semarie@users.noreply.github.com>
Mon, 3 Nov 2014 18:40:25 +0000 (19:40 +0100)
doc/vimb.1
src/autocmd.c
src/autocmd.h
src/main.c

index 3a0b719..2ccc308 100644 (file)
@@ -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.
index 87054eb..4ac3569 100644 (file)
@@ -49,7 +49,6 @@ static struct {
     {"DownloadStart",    0x0020},
     {"DownloadFinished", 0x0040},
     {"DownloadFailed",   0x0080},
-    {"RequestQueued",    0x0100},
 };
 
 extern VbCore vb;
index 605c4ba..fe3bc04 100644 (file)
@@ -36,7 +36,6 @@ typedef enum {
     AU_DOWNLOAD_START,
     AU_DOWNLOAD_FINISHED,
     AU_DOWNLOAD_FAILED,
-    AU_REQUEST_QUEUED,
 } AuEvent;
 
 void autocmd_init(void);
index 4aa9536..762b2d5 100644 (file)
@@ -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);
 }