Commit Graph

14 Commits

Author SHA1 Message Date
Vincent Sanders
3dca38cf98 Avoid null dereference in gtk resource handling
Ensure the error handling in gtk pixmap resource handling does not
cause a null pointer dereference. Fixes coverity CID 1307743
2016-03-14 15:03:39 +00:00
Vincent Sanders
1e2584aa14 add missing arrow down pixmap resource 2016-03-08 15:58:48 +00:00
Vincent Sanders
1c5a5207fb fix glib resource API usage even when gresource was disabled 2015-06-29 15:48:08 +01:00
Vincent Sanders
796ac470b5 Improve resource code to not try and use g_resource calls when disabled. 2015-06-29 15:11:26 +01:00
Vincent Sanders
ee74f9ac8c Change gtk message and language handling to use resource names
The GTK resource handling can now provide the path to resources rather
than having to compute them separately. This reduces run time
allocation and allows for the resources to be built in if required.

Additionally this tweaks the resource scheme handling to redirect
favicon.ico to resource:favicon.png instead of rewriting directly to
file scheme path allowing the favicon to be a compiled in resource.
2015-06-23 11:53:41 +01:00
Vincent Sanders
11dc7304d9 Allow GTK to include inline resources for default css 2015-06-22 21:03:00 +01:00
Vincent Sanders
a94ae7a80a Allow translation messages to be compiled in as GTK resources 2015-06-21 23:27:22 +01:00
Vincent Sanders
e1bbe4528b Add direct resources to GTK
This adds API to obtain direct pointers to arrays of data from
compiled in resources. Additionally it hooks this up to provide data
for the resourece scheme handler.
2015-06-17 21:35:45 +01:00
Vincent Sanders
be7a45fefe Change gtk to use resource API for throbber 2015-06-17 21:35:40 +01:00
Vincent Sanders
3e2270482f Make GTK resource handling configurable
This makes the GTK resource handling configurable in the same way as
all other pkg-config style feature options.

It is now possible to completely disable compiled in resources if
wanted as well as forcing inline pixdata on if desired.
2015-06-17 21:35:40 +01:00
Vincent Sanders
59fbd51a77 Add legacy support for inline pixbuf usage
Before GResource it was possible to compile pixbufs as inline
elements. This has historically been done for the menu cursor
only.

This change integrates the inline support and uses it when the
GResource support is not selected.
2015-06-17 21:35:40 +01:00
Vincent Sanders
61fdc8fd6f update default gtk window icon source to use resources 2015-06-17 21:35:40 +01:00
Vincent Sanders
8ef292b9ca Change GTK UI builder handling to use resource API
GTK UI builder resources have till now been exclusively stored on disc
requiring netsurf to ship numerous additional resource files. This
requires going to disc every time a UI action is performed which can
become a lot of unwanted file handling.

GLib/GTK has moved towards GResource handling for such resources
instead. It now seems that migrating to this style of usage is
expected and indeed the only portable way to include pixbufs.

This introduces an API to hide the various implementation details of
how resources are handled from the rest of the codebase.
2015-06-17 21:35:40 +01:00
Vincent Sanders
c4d5393a97 move gtk menu cursor creation into separate resourec handling module
The gtk resource handling must be changed for GTK3 as creating from
inline is depricated. This is the first step to splitting out the
support.
2015-06-04 22:43:11 +01:00