diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-09-15 22:52:36 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-09-15 22:52:36 +0100 |
commit | c67c4aa999f44b728bc508ff24060ea605f17e1e (patch) | |
tree | 399e8b7891b671e141d93c5e084cadc57e34c2b2 | |
parent | dc48c0c22fb9612a464429d851b502a0d5718790 (diff) | |
download | netsurf-c67c4aa999f44b728bc508ff24060ea605f17e1e.tar.gz netsurf-c67c4aa999f44b728bc508ff24060ea605f17e1e.tar.bz2 |
add cookie icon and use it for show cookies toolbar button
-rw-r--r-- | frontends/gtk/gui.c | 9 | ||||
-rw-r--r-- | frontends/gtk/res/netsurf.gresource.xml | 1 | ||||
-rw-r--r-- | frontends/gtk/resources.c | 1 | ||||
-rw-r--r-- | frontends/gtk/toolbar_items.h | 2 | ||||
-rw-r--r-- | resources/icons/show-cookie.png | bin | 0 -> 303 bytes |
5 files changed, 11 insertions, 2 deletions
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c index 9b42ef96b..205c5481b 100644 --- a/frontends/gtk/gui.c +++ b/frontends/gtk/gui.c @@ -270,7 +270,14 @@ static nserror nsgtk_add_named_icons_to_theme(void) pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, false, 8, 8, 32); } gtk_icon_theme_add_builtin_icon("local-history", 32, pixbuf); - #endif + + res = nsgdk_pixbuf_new_from_resname("icons/show-cookie.png", &pixbuf); + if (res != NSERROR_OK) { + pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, false, 8, 24, 24); + } + gtk_icon_theme_add_builtin_icon("show-cookie", 24, pixbuf); + +#endif return NSERROR_OK; } diff --git a/frontends/gtk/res/netsurf.gresource.xml b/frontends/gtk/res/netsurf.gresource.xml index b475dc5fb..d9aa92119 100644 --- a/frontends/gtk/res/netsurf.gresource.xml +++ b/frontends/gtk/res/netsurf.gresource.xml @@ -57,6 +57,7 @@ <file>quirks.css</file> <file>netsurf.png</file> <file>default.ico</file> + <file>icons/show-cookie.png</file> <file>icons/local-history.png</file> <file>icons/arrow-l.png</file> <file>icons/content.png</file> diff --git a/frontends/gtk/resources.c b/frontends/gtk/resources.c index 9fd71166e..f48ddb410 100644 --- a/frontends/gtk/resources.c +++ b/frontends/gtk/resources.c @@ -96,6 +96,7 @@ static struct nsgtk_resource_s pixbuf_resource[] = { RES_ENTRY("netsurf.xpm"), RES_ENTRY("menu_cursor.png"), RES_ENTRY("icons/local-history.png"), + RES_ENTRY("icons/show-cookie.png"), RES_ENTRY("throbber/throbber0.png"), RES_ENTRY("throbber/throbber1.png"), RES_ENTRY("throbber/throbber2.png"), diff --git a/frontends/gtk/toolbar_items.h b/frontends/gtk/toolbar_items.h index 7a35112d6..344c09771 100644 --- a/frontends/gtk/toolbar_items.h +++ b/frontends/gtk/toolbar_items.h @@ -139,7 +139,7 @@ TOOLBAR_ITEM(LOCALHISTORY_BUTTON, localhistory, true, y, p, , NULL) TOOLBAR_ITEM(GLOBALHISTORY_BUTTON, globalhistory, true, y, p, gtkGlobalHistory, NULL) TOOLBAR_ITEM(ADDBOOKMARKS_BUTTON, addbookmarks, true, y, p, gtkAddBookMarks, NULL) TOOLBAR_ITEM(SHOWBOOKMARKS_BUTTON, showbookmarks, true, b, p, gtkShowBookMarks, "user-bookmarks") -TOOLBAR_ITEM(SHOWCOOKIES_BUTTON, showcookies, true, y, p, gtkShowCookies, NULL) +TOOLBAR_ITEM(SHOWCOOKIES_BUTTON, showcookies, true, b, p, gtkShowCookies, "show-cookie") TOOLBAR_ITEM(OPENLOCATION_BUTTON, openlocation, true, y, p, gtkOpenLocation, NULL) TOOLBAR_ITEM(NEXTTAB_BUTTON, nexttab, false, n, y, gtkNextTab, "media-skip-forward") TOOLBAR_ITEM(PREVTAB_BUTTON, prevtab, false, n, y, gtkPrevTab, "media-skip-backward") diff --git a/resources/icons/show-cookie.png b/resources/icons/show-cookie.png Binary files differnew file mode 100644 index 000000000..8e449721c --- /dev/null +++ b/resources/icons/show-cookie.png |