Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/60f8f0126d49dc5313d44858e9b4da0aeb1f5697
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/60f8f0126d49dc5313d44858e9b4da0aeb1f5697
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/60f8f0126d49dc5313d44858e9b4da0aeb1f5697

The branch, master has been updated
       via  60f8f0126d49dc5313d44858e9b4da0aeb1f5697 (commit)
       via  8e0469d41db6b53f75c509d364cf25f3c0abc71a (commit)
       via  82dc6ec097405dbbc179b0ea2b3ff99f980ed107 (commit)
       via  adafe3c750f202791b1d5b100134bb380bcff093 (commit)
       via  33fe0faab6d664a12330ac61a96499970ce3cc94 (commit)
       via  a4e9f41948ddb07e1668a6b8e15c19d1838dc0ab (commit)
       via  26df6ab7dd8fda3bcb1c7bca29608e998fd409f9 (commit)
      from  cafb428a49ad685d14f72c1e2acbf420389150d5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=60f8f0126d49dc5313d44858e9b4da0aeb1f5697
commit 60f8f0126d49dc5313d44858e9b4da0aeb1f5697
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    windows: Enable present_cookies callback
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/frontends/windows/cookies.c b/frontends/windows/cookies.c
index b3c56da..ee754bc 100644
--- a/frontends/windows/cookies.c
+++ b/frontends/windows/cookies.c
@@ -34,6 +34,7 @@
 #include "windows/plot.h"
 #include "windows/corewindow.h"
 #include "windows/cookies.h"
+#include "windows/gui.h"
 
 
 struct nsw32_cookie_window {
@@ -170,13 +171,16 @@ static nserror nsw32_cookie_init(HINSTANCE hInstance)
 
 
 /* exported interface documented in windows/cookie.h */
-nserror nsw32_cookies_present(HINSTANCE hInstance)
+nserror nsw32_cookies_present(const char *search_term)
 {
        nserror res;
 
-       res = nsw32_cookie_init(hInstance);
+       res = nsw32_cookie_init(hinst);
        if (res == NSERROR_OK) {
                ShowWindow(cookie_window->core.hWnd, SW_SHOWNORMAL);
+               if (search_term != NULL) {
+                       res = cookie_manager_set_search_string(search_term);
+               }
        }
        return res;
 }
diff --git a/frontends/windows/cookies.h b/frontends/windows/cookies.h
index 8500c78..dd7ae42 100644
--- a/frontends/windows/cookies.h
+++ b/frontends/windows/cookies.h
@@ -35,7 +35,7 @@
  *
  * \return NSERROR_OK on success else appropriate error code on faliure.
  */
-nserror nsw32_cookies_present(HINSTANCE hinstance);
+nserror nsw32_cookies_present(const char *search_term);
 
 /**
  * Free any resources allocated for the cookie window.
diff --git a/frontends/windows/main.c b/frontends/windows/main.c
index 24362df..c051f44 100644
--- a/frontends/windows/main.c
+++ b/frontends/windows/main.c
@@ -43,6 +43,7 @@
 
 #include "windows/findfile.h"
 #include "windows/file.h"
+#include "windows/cookies.h"
 #include "windows/drawable.h"
 #include "windows/corewindow.h"
 #include "windows/download.h"
@@ -370,6 +371,7 @@ static nserror win32_to_unix_commandline(int *argc_out, 
char ***argv_out)
 
 static struct gui_misc_table win32_misc_table = {
        .schedule = win32_schedule,
+       .present_cookies = nsw32_cookies_present,
 };
 
 /**
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 716039a..e682eb8 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1154,7 +1154,7 @@ nsws_window_command(HWND hwnd,
                break;
 
        case IDM_TOOLS_COOKIES:
-               nsw32_cookies_present(hinst);
+               nsw32_cookies_present(NULL);
                break;
 
        case IDM_NAV_BOOKMARKS:


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=8e0469d41db6b53f75c509d364cf25f3c0abc71a
commit 8e0469d41db6b53f75c509d364cf25f3c0abc71a
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    monkey: Support present_cookies
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index 6ff480c..bae8150 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -206,6 +206,16 @@ static nserror gui_launch_url(struct nsurl *url)
        return NSERROR_OK;
 }
 
+static nserror gui_present_cookies(const char *search_term)
+{
+       if (search_term != NULL) {
+               moutf(MOUT_GENERIC, "PRESENT_COOKIES %s", search_term);
+       } else {
+               moutf(MOUT_GENERIC, "PRESENT_COOKIES");
+       }
+       return NSERROR_OK;
+}
+
 static void quit_handler(int argc, char **argv)
 {
        monkey_done = true;
@@ -250,6 +260,7 @@ static struct gui_misc_table monkey_misc_table = {
        .quit = monkey_quit,
        .launch_url = gui_launch_url,
        .login = gui_401login_open,
+       .present_cookies = gui_present_cookies,
 };
 
 static void monkey_run(void)


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=82dc6ec097405dbbc179b0ea2b3ff99f980ed107
commit 82dc6ec097405dbbc179b0ea2b3ff99f980ed107
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    riscos: Enable support for present_cookies
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/frontends/riscos/cookies.c b/frontends/riscos/cookies.c
index 4884950..199699d 100644
--- a/frontends/riscos/cookies.c
+++ b/frontends/riscos/cookies.c
@@ -447,7 +447,7 @@ static nserror ro_cookie_init(void)
 
 
 /* exported interface documented in riscos/cookies.h */
-nserror ro_gui_cookies_present(void)
+nserror ro_gui_cookies_present(const char *search_term)
 {
        nserror res;
 
@@ -457,6 +457,9 @@ nserror ro_gui_cookies_present(void)
                ro_gui_dialog_open_top(cookie_window->core.wh,
                                       cookie_window->core.toolbar,
                                       600, 800);
+               if (search_term != NULL) {
+                       res = cookie_manager_set_search_string(search_term);
+               }
        } else {
                NSLOG(netsurf, INFO, "Failed presenting code %d", res);
        }
diff --git a/frontends/riscos/cookies.h b/frontends/riscos/cookies.h
index 1b07d21..6a21790 100644
--- a/frontends/riscos/cookies.h
+++ b/frontends/riscos/cookies.h
@@ -41,7 +41,7 @@ void ro_gui_cookies_initialise(void);
  *
  * \return NSERROR_OK on success else appropriate error code on faliure.
  */
-nserror ro_gui_cookies_present(void);
+nserror ro_gui_cookies_present(const char *search_term);
 
 /**
  * Free any resources allocated for the cookie window.
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index 52081b2..b0eb232 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -2431,6 +2431,7 @@ static struct gui_misc_table riscos_misc_table = {
 
        .quit = gui_quit,
        .launch_url = gui_launch_url,
+       .present_cookies = ro_gui_cookies_present,
 };
 
 
diff --git a/frontends/riscos/iconbar.c b/frontends/riscos/iconbar.c
index 23f9725..a9a62a9 100644
--- a/frontends/riscos/iconbar.c
+++ b/frontends/riscos/iconbar.c
@@ -232,7 +232,7 @@ bool ro_gui_iconbar_menu_select(wimp_w w, wimp_i i, 
wimp_menu *menu,
                ro_gui_global_history_present();
                return true;
        case COOKIES_SHOW:
-               ro_gui_cookies_present();
+               ro_gui_cookies_present(NULL);
                return true;
        case CHOICES_SHOW:
                ro_gui_configure_show();
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index 5a9a721..2206ae8 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -2638,7 +2638,7 @@ ro_gui_window_menu_select(wimp_w w,
 
                /* cookies actions */
        case COOKIES_SHOW:
-               ro_gui_cookies_present();
+               ro_gui_cookies_present(NULL);
                break;
 
        case COOKIES_DELETE:


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=adafe3c750f202791b1d5b100134bb380bcff093
commit adafe3c750f202791b1d5b100134bb380bcff093
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    amiga: Probably support present_cookies
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/frontends/amiga/cookies.c b/frontends/amiga/cookies.c
index 5d46a3a..3cd32f3 100644
--- a/frontends/amiga/cookies.c
+++ b/frontends/amiga/cookies.c
@@ -345,7 +345,7 @@ ami_cookies_create_window(struct ami_cookie_window 
*cookie_win)
 }
 
 /* exported interface documented in amiga/cookies.h */
-nserror ami_cookies_present(void)
+nserror ami_cookies_present(const char *search_term)
 {
        struct ami_cookie_window *ncwin;
        nserror res;
@@ -395,6 +395,10 @@ nserror ami_cookies_present(void)
 
        cookie_window = ncwin;
 
-       return NSERROR_OK;
+       if (search_term != NULL) {
+               res = cookie_manager_set_search_string(search_term);
+       }
+
+       return res;
 }
 
diff --git a/frontends/amiga/cookies.h b/frontends/amiga/cookies.h
index 6858e4c..6eb525c 100644
--- a/frontends/amiga/cookies.h
+++ b/frontends/amiga/cookies.h
@@ -20,6 +20,6 @@
 #define AMIGA_COOKIES_H
 
 /** Open the cookie viewer */
-nserror ami_cookies_present(void);
+nserror ami_cookies_present(const char *search_term);
 #endif
 
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index e4dca8c..673f751 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -6509,6 +6509,7 @@ static struct gui_misc_table amiga_misc_table = {
 
        .quit = gui_quit,
        .launch_url = gui_launch_url,
+       .present_cookies = ami_cookies_present,
 };
 
 /** Normal entry point from OS */
diff --git a/frontends/amiga/gui_menu.c b/frontends/amiga/gui_menu.c
index 64dd7fb..b9c0dd9 100644
--- a/frontends/amiga/gui_menu.c
+++ b/frontends/amiga/gui_menu.c
@@ -336,7 +336,7 @@ HOOKF(void, ami_menu_item_browser_globalhistory, APTR, 
window, struct IntuiMessa
 
 HOOKF(void, ami_menu_item_browser_cookies, APTR, window, struct IntuiMessage *)
 {
-       ami_cookies_present();
+       ami_cookies_present(NULL);
 }
 
 HOOKF(void, ami_menu_item_browser_foreimg, APTR, window, struct IntuiMessage *)


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=33fe0faab6d664a12330ac61a96499970ce3cc94
commit 33fe0faab6d664a12330ac61a96499970ce3cc94
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    beos: Add NULL so present_cookies is filled
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index 74a5365..cbfe352 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -997,6 +997,7 @@ static struct gui_misc_table beos_misc_table = {
        gui_launch_url,
        NULL, //401login
        NULL, // pdf_password (if we have Haru support)
+       NULL, // present_cookies
 };
 
 


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=a4e9f41948ddb07e1668a6b8e15c19d1838dc0ab
commit a4e9f41948ddb07e1668a6b8e15c19d1838dc0ab
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    gtk: Implement handling of new present_cookies callback
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/frontends/gtk/cookies.c b/frontends/gtk/cookies.c
index d787e35..0df9719 100644
--- a/frontends/gtk/cookies.c
+++ b/frontends/gtk/cookies.c
@@ -309,13 +309,14 @@ static nserror nsgtk_cookies_init(void)
 
 
 /* exported function documented gtk/cookies.h */
-nserror nsgtk_cookies_present(void)
+nserror nsgtk_cookies_present(const char *search_term)
 {
        nserror res;
 
        res = nsgtk_cookies_init();
        if (res == NSERROR_OK) {
                gtk_window_present(cookie_window->wnd);
+               res = cookie_manager_set_search_string(search_term);
        }
        return res;
 }
diff --git a/frontends/gtk/cookies.h b/frontends/gtk/cookies.h
index c1a68b7..b8fc9ab 100644
--- a/frontends/gtk/cookies.h
+++ b/frontends/gtk/cookies.h
@@ -28,7 +28,7 @@
  *
  * \return NSERROR_OK on success else appropriate error code on faliure.
  */
-nserror nsgtk_cookies_present(void);
+nserror nsgtk_cookies_present(const char *search_term);
 
 /**
  * Free any resources allocated for the cookie window.
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index 17dbc49..e5006d9 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -1183,6 +1183,7 @@ static struct gui_misc_table nsgtk_misc_table = {
        .quit = gui_quit,
        .launch_url = gui_launch_url,
        .pdf_password = nsgtk_pdf_password,
+       .present_cookies = nsgtk_cookies_present,
 };
 
 
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index d089732..32adabc 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -3022,7 +3022,7 @@ static gboolean
 showcookies_button_clicked_cb(GtkWidget *widget, gpointer data)
 {
        nserror res;
-       res = nsgtk_cookies_present();
+       res = nsgtk_cookies_present(NULL);
        if (res != NSERROR_OK) {
                NSLOG(netsurf, INFO, "Unable to initialise cookies window.");
        }


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=26df6ab7dd8fda3bcb1c7bca29608e998fd409f9
commit 26df6ab7dd8fda3bcb1c7bca29608e998fd409f9
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    misc: Add a present_cookies to guit->misc and use it
    
    In order that we present the cookies window usefully, change
    browser_window to request presentation of the cookies window
    via a gui misc callback.
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index ea84e19..e79dcc1 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -4802,9 +4802,7 @@ nserror browser_window_show_cookies(
        lwc_string *host = nsurl_get_component(url, NSURL_HOST);
        const char *string = (host != NULL) ? lwc_string_data(host) : NULL;
 
-       /** \todo Ensure cookie manager is open.  (Ask front end.) */
-
-       err = cookie_manager_set_search_string(string);
+       err = guit->misc->present_cookies(string);
 
        if (host != NULL) {
                lwc_string_unref(host);
diff --git a/desktop/gui_factory.c b/desktop/gui_factory.c
index 4a9a585..a4532fe 100644
--- a/desktop/gui_factory.c
+++ b/desktop/gui_factory.c
@@ -657,6 +657,12 @@ gui_default_pdf_password(char **owner_pass, char 
**user_pass, char *path)
        save_pdf(path);
 }
 
+static nserror
+gui_default_present_cookies(const char *search_term)
+{
+       return NSERROR_NOT_IMPLEMENTED;
+}
+
 /** verify misc table is valid */
 static nserror verify_misc_register(struct gui_misc_table *gmt)
 {
@@ -683,6 +689,9 @@ static nserror verify_misc_register(struct gui_misc_table 
*gmt)
        if (gmt->pdf_password == NULL) {
                gmt->pdf_password = gui_default_pdf_password;
        }
+       if (gmt->present_cookies == NULL) {
+               gmt->present_cookies = gui_default_present_cookies;
+       }
        return NSERROR_OK;
 }
 
diff --git a/include/netsurf/misc.h b/include/netsurf/misc.h
index ee5d00d..00ac705 100644
--- a/include/netsurf/misc.h
+++ b/include/netsurf/misc.h
@@ -116,6 +116,14 @@ struct gui_misc_table {
         */
        void (*pdf_password)(char **owner_pass, char **user_pass, char *path);
 
+       /**
+        * Request that the cookie manager be displayed
+        *
+        * \param search_term The search term to be set (NULL if no search)
+        *
+        * \return NSERROR_OK on success
+        */
+       nserror (*present_cookies)(const char *search_term);
 };
 
 #endif


-----------------------------------------------------------------------

Summary of changes:
 desktop/browser_window.c    |    4 +---
 desktop/gui_factory.c       |    9 +++++++++
 frontends/amiga/cookies.c   |    8 ++++++--
 frontends/amiga/cookies.h   |    2 +-
 frontends/amiga/gui.c       |    1 +
 frontends/amiga/gui_menu.c  |    2 +-
 frontends/beos/gui.cpp      |    1 +
 frontends/gtk/cookies.c     |    3 ++-
 frontends/gtk/cookies.h     |    2 +-
 frontends/gtk/gui.c         |    1 +
 frontends/gtk/toolbar.c     |    2 +-
 frontends/monkey/main.c     |   11 +++++++++++
 frontends/riscos/cookies.c  |    5 ++++-
 frontends/riscos/cookies.h  |    2 +-
 frontends/riscos/gui.c      |    1 +
 frontends/riscos/iconbar.c  |    2 +-
 frontends/riscos/window.c   |    2 +-
 frontends/windows/cookies.c |    8 ++++++--
 frontends/windows/cookies.h |    2 +-
 frontends/windows/main.c    |    2 ++
 frontends/windows/window.c  |    2 +-
 include/netsurf/misc.h      |    8 ++++++++
 22 files changed, 62 insertions(+), 18 deletions(-)

diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index ea84e19..e79dcc1 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -4802,9 +4802,7 @@ nserror browser_window_show_cookies(
        lwc_string *host = nsurl_get_component(url, NSURL_HOST);
        const char *string = (host != NULL) ? lwc_string_data(host) : NULL;
 
-       /** \todo Ensure cookie manager is open.  (Ask front end.) */
-
-       err = cookie_manager_set_search_string(string);
+       err = guit->misc->present_cookies(string);
 
        if (host != NULL) {
                lwc_string_unref(host);
diff --git a/desktop/gui_factory.c b/desktop/gui_factory.c
index 4a9a585..a4532fe 100644
--- a/desktop/gui_factory.c
+++ b/desktop/gui_factory.c
@@ -657,6 +657,12 @@ gui_default_pdf_password(char **owner_pass, char 
**user_pass, char *path)
        save_pdf(path);
 }
 
+static nserror
+gui_default_present_cookies(const char *search_term)
+{
+       return NSERROR_NOT_IMPLEMENTED;
+}
+
 /** verify misc table is valid */
 static nserror verify_misc_register(struct gui_misc_table *gmt)
 {
@@ -683,6 +689,9 @@ static nserror verify_misc_register(struct gui_misc_table 
*gmt)
        if (gmt->pdf_password == NULL) {
                gmt->pdf_password = gui_default_pdf_password;
        }
+       if (gmt->present_cookies == NULL) {
+               gmt->present_cookies = gui_default_present_cookies;
+       }
        return NSERROR_OK;
 }
 
diff --git a/frontends/amiga/cookies.c b/frontends/amiga/cookies.c
index 5d46a3a..3cd32f3 100644
--- a/frontends/amiga/cookies.c
+++ b/frontends/amiga/cookies.c
@@ -345,7 +345,7 @@ ami_cookies_create_window(struct ami_cookie_window 
*cookie_win)
 }
 
 /* exported interface documented in amiga/cookies.h */
-nserror ami_cookies_present(void)
+nserror ami_cookies_present(const char *search_term)
 {
        struct ami_cookie_window *ncwin;
        nserror res;
@@ -395,6 +395,10 @@ nserror ami_cookies_present(void)
 
        cookie_window = ncwin;
 
-       return NSERROR_OK;
+       if (search_term != NULL) {
+               res = cookie_manager_set_search_string(search_term);
+       }
+
+       return res;
 }
 
diff --git a/frontends/amiga/cookies.h b/frontends/amiga/cookies.h
index 6858e4c..6eb525c 100644
--- a/frontends/amiga/cookies.h
+++ b/frontends/amiga/cookies.h
@@ -20,6 +20,6 @@
 #define AMIGA_COOKIES_H
 
 /** Open the cookie viewer */
-nserror ami_cookies_present(void);
+nserror ami_cookies_present(const char *search_term);
 #endif
 
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index e4dca8c..673f751 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -6509,6 +6509,7 @@ static struct gui_misc_table amiga_misc_table = {
 
        .quit = gui_quit,
        .launch_url = gui_launch_url,
+       .present_cookies = ami_cookies_present,
 };
 
 /** Normal entry point from OS */
diff --git a/frontends/amiga/gui_menu.c b/frontends/amiga/gui_menu.c
index 64dd7fb..b9c0dd9 100644
--- a/frontends/amiga/gui_menu.c
+++ b/frontends/amiga/gui_menu.c
@@ -336,7 +336,7 @@ HOOKF(void, ami_menu_item_browser_globalhistory, APTR, 
window, struct IntuiMessa
 
 HOOKF(void, ami_menu_item_browser_cookies, APTR, window, struct IntuiMessage *)
 {
-       ami_cookies_present();
+       ami_cookies_present(NULL);
 }
 
 HOOKF(void, ami_menu_item_browser_foreimg, APTR, window, struct IntuiMessage *)
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index 74a5365..cbfe352 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -997,6 +997,7 @@ static struct gui_misc_table beos_misc_table = {
        gui_launch_url,
        NULL, //401login
        NULL, // pdf_password (if we have Haru support)
+       NULL, // present_cookies
 };
 
 
diff --git a/frontends/gtk/cookies.c b/frontends/gtk/cookies.c
index d787e35..0df9719 100644
--- a/frontends/gtk/cookies.c
+++ b/frontends/gtk/cookies.c
@@ -309,13 +309,14 @@ static nserror nsgtk_cookies_init(void)
 
 
 /* exported function documented gtk/cookies.h */
-nserror nsgtk_cookies_present(void)
+nserror nsgtk_cookies_present(const char *search_term)
 {
        nserror res;
 
        res = nsgtk_cookies_init();
        if (res == NSERROR_OK) {
                gtk_window_present(cookie_window->wnd);
+               res = cookie_manager_set_search_string(search_term);
        }
        return res;
 }
diff --git a/frontends/gtk/cookies.h b/frontends/gtk/cookies.h
index c1a68b7..b8fc9ab 100644
--- a/frontends/gtk/cookies.h
+++ b/frontends/gtk/cookies.h
@@ -28,7 +28,7 @@
  *
  * \return NSERROR_OK on success else appropriate error code on faliure.
  */
-nserror nsgtk_cookies_present(void);
+nserror nsgtk_cookies_present(const char *search_term);
 
 /**
  * Free any resources allocated for the cookie window.
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index 17dbc49..e5006d9 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -1183,6 +1183,7 @@ static struct gui_misc_table nsgtk_misc_table = {
        .quit = gui_quit,
        .launch_url = gui_launch_url,
        .pdf_password = nsgtk_pdf_password,
+       .present_cookies = nsgtk_cookies_present,
 };
 
 
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index d089732..32adabc 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -3022,7 +3022,7 @@ static gboolean
 showcookies_button_clicked_cb(GtkWidget *widget, gpointer data)
 {
        nserror res;
-       res = nsgtk_cookies_present();
+       res = nsgtk_cookies_present(NULL);
        if (res != NSERROR_OK) {
                NSLOG(netsurf, INFO, "Unable to initialise cookies window.");
        }
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index 6ff480c..bae8150 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -206,6 +206,16 @@ static nserror gui_launch_url(struct nsurl *url)
        return NSERROR_OK;
 }
 
+static nserror gui_present_cookies(const char *search_term)
+{
+       if (search_term != NULL) {
+               moutf(MOUT_GENERIC, "PRESENT_COOKIES %s", search_term);
+       } else {
+               moutf(MOUT_GENERIC, "PRESENT_COOKIES");
+       }
+       return NSERROR_OK;
+}
+
 static void quit_handler(int argc, char **argv)
 {
        monkey_done = true;
@@ -250,6 +260,7 @@ static struct gui_misc_table monkey_misc_table = {
        .quit = monkey_quit,
        .launch_url = gui_launch_url,
        .login = gui_401login_open,
+       .present_cookies = gui_present_cookies,
 };
 
 static void monkey_run(void)
diff --git a/frontends/riscos/cookies.c b/frontends/riscos/cookies.c
index 4884950..199699d 100644
--- a/frontends/riscos/cookies.c
+++ b/frontends/riscos/cookies.c
@@ -447,7 +447,7 @@ static nserror ro_cookie_init(void)
 
 
 /* exported interface documented in riscos/cookies.h */
-nserror ro_gui_cookies_present(void)
+nserror ro_gui_cookies_present(const char *search_term)
 {
        nserror res;
 
@@ -457,6 +457,9 @@ nserror ro_gui_cookies_present(void)
                ro_gui_dialog_open_top(cookie_window->core.wh,
                                       cookie_window->core.toolbar,
                                       600, 800);
+               if (search_term != NULL) {
+                       res = cookie_manager_set_search_string(search_term);
+               }
        } else {
                NSLOG(netsurf, INFO, "Failed presenting code %d", res);
        }
diff --git a/frontends/riscos/cookies.h b/frontends/riscos/cookies.h
index 1b07d21..6a21790 100644
--- a/frontends/riscos/cookies.h
+++ b/frontends/riscos/cookies.h
@@ -41,7 +41,7 @@ void ro_gui_cookies_initialise(void);
  *
  * \return NSERROR_OK on success else appropriate error code on faliure.
  */
-nserror ro_gui_cookies_present(void);
+nserror ro_gui_cookies_present(const char *search_term);
 
 /**
  * Free any resources allocated for the cookie window.
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index 52081b2..b0eb232 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -2431,6 +2431,7 @@ static struct gui_misc_table riscos_misc_table = {
 
        .quit = gui_quit,
        .launch_url = gui_launch_url,
+       .present_cookies = ro_gui_cookies_present,
 };
 
 
diff --git a/frontends/riscos/iconbar.c b/frontends/riscos/iconbar.c
index 23f9725..a9a62a9 100644
--- a/frontends/riscos/iconbar.c
+++ b/frontends/riscos/iconbar.c
@@ -232,7 +232,7 @@ bool ro_gui_iconbar_menu_select(wimp_w w, wimp_i i, 
wimp_menu *menu,
                ro_gui_global_history_present();
                return true;
        case COOKIES_SHOW:
-               ro_gui_cookies_present();
+               ro_gui_cookies_present(NULL);
                return true;
        case CHOICES_SHOW:
                ro_gui_configure_show();
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index 5a9a721..2206ae8 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -2638,7 +2638,7 @@ ro_gui_window_menu_select(wimp_w w,
 
                /* cookies actions */
        case COOKIES_SHOW:
-               ro_gui_cookies_present();
+               ro_gui_cookies_present(NULL);
                break;
 
        case COOKIES_DELETE:
diff --git a/frontends/windows/cookies.c b/frontends/windows/cookies.c
index b3c56da..ee754bc 100644
--- a/frontends/windows/cookies.c
+++ b/frontends/windows/cookies.c
@@ -34,6 +34,7 @@
 #include "windows/plot.h"
 #include "windows/corewindow.h"
 #include "windows/cookies.h"
+#include "windows/gui.h"
 
 
 struct nsw32_cookie_window {
@@ -170,13 +171,16 @@ static nserror nsw32_cookie_init(HINSTANCE hInstance)
 
 
 /* exported interface documented in windows/cookie.h */
-nserror nsw32_cookies_present(HINSTANCE hInstance)
+nserror nsw32_cookies_present(const char *search_term)
 {
        nserror res;
 
-       res = nsw32_cookie_init(hInstance);
+       res = nsw32_cookie_init(hinst);
        if (res == NSERROR_OK) {
                ShowWindow(cookie_window->core.hWnd, SW_SHOWNORMAL);
+               if (search_term != NULL) {
+                       res = cookie_manager_set_search_string(search_term);
+               }
        }
        return res;
 }
diff --git a/frontends/windows/cookies.h b/frontends/windows/cookies.h
index 8500c78..dd7ae42 100644
--- a/frontends/windows/cookies.h
+++ b/frontends/windows/cookies.h
@@ -35,7 +35,7 @@
  *
  * \return NSERROR_OK on success else appropriate error code on faliure.
  */
-nserror nsw32_cookies_present(HINSTANCE hinstance);
+nserror nsw32_cookies_present(const char *search_term);
 
 /**
  * Free any resources allocated for the cookie window.
diff --git a/frontends/windows/main.c b/frontends/windows/main.c
index 24362df..c051f44 100644
--- a/frontends/windows/main.c
+++ b/frontends/windows/main.c
@@ -43,6 +43,7 @@
 
 #include "windows/findfile.h"
 #include "windows/file.h"
+#include "windows/cookies.h"
 #include "windows/drawable.h"
 #include "windows/corewindow.h"
 #include "windows/download.h"
@@ -370,6 +371,7 @@ static nserror win32_to_unix_commandline(int *argc_out, 
char ***argv_out)
 
 static struct gui_misc_table win32_misc_table = {
        .schedule = win32_schedule,
+       .present_cookies = nsw32_cookies_present,
 };
 
 /**
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 716039a..e682eb8 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1154,7 +1154,7 @@ nsws_window_command(HWND hwnd,
                break;
 
        case IDM_TOOLS_COOKIES:
-               nsw32_cookies_present(hinst);
+               nsw32_cookies_present(NULL);
                break;
 
        case IDM_NAV_BOOKMARKS:
diff --git a/include/netsurf/misc.h b/include/netsurf/misc.h
index ee5d00d..00ac705 100644
--- a/include/netsurf/misc.h
+++ b/include/netsurf/misc.h
@@ -116,6 +116,14 @@ struct gui_misc_table {
         */
        void (*pdf_password)(char **owner_pass, char **user_pass, char *path);
 
+       /**
+        * Request that the cookie manager be displayed
+        *
+        * \param search_term The search term to be set (NULL if no search)
+        *
+        * \return NSERROR_OK on success
+        */
+       nserror (*present_cookies)(const char *search_term);
 };
 
 #endif


-- 
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to