Commit Graph

946 Commits

Author SHA1 Message Date
Vincent Sanders
822e3a8fd0 Allow gtk preferences language selection resource to be inline
This allows the languages resource to be read from file or from inline
data. Additionally it fixes a bug where the language combo box would
always be reset to en as the default regardless of what was currently
configured.
2015-06-25 23:46:35 +01:00
Vincent Sanders
5bd7606103 Update GTK url bar completion to navigate on selection 2015-06-23 23:22:42 +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
Michael Drake
83f77d3a41 Don't need gtkdefault.css now. 2015-06-22 14:24:51 +01:00
Michael Drake
51a92fbd84 Consolidate default style. 2015-06-22 14:17:02 +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
67ded2a02a This moves message loading out of netsurf_init into each frontend
The translated message loading is dependant on configuration of
resource location in each frontend, additionally they should have the
ability to deal with errors in this loading in a implementation
specific manner.

This also extends the message loading API to be capable of loading
from an inline memory buffer instead of from a file.
2015-06-21 23:27:22 +01:00
Vincent Sanders
9ccf0cee9f Change GTK resource path to use the users netsurf directory
This changes the path used to find resources from containg a hard
coded ${HOME}/.netsurf to using the computed path to the users netsurf
config.
2015-06-21 23:27:21 +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
16fbb97dbb Add links to dutch resources for gtk frontend 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
Vincent Sanders
0d811963c1 fixup all the remaining logging macro callsites
The semantic patch tool appears to have missed some difficult to
reason about callsites which have now been manually cleaned up
2015-05-28 17:06:18 +01:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Vincent Sanders
a098626ff1 Fix warnings about using integer absolute operations on floating point values 2015-05-21 13:04:29 +01:00
Vincent Sanders
a29e9589f6 Change how GDK image resources are compiled in.
The compiled in image resources were being created as a structure in a
generated c source file. The generation of this file caused constness
warning as a guint8 * was initialised from a const char array.

This changes the generation and use of these compiled in resources to
use the raw inline form as suggested by the documentation removing the
const warning.
2015-05-20 16:43:48 +01:00
Vincent Sanders
7e2f1094ce Remove unused thumbnail sources from core and gtk 2015-04-23 22:50:16 +01:00
Vincent Sanders
8ccbc960d3 Change gtk bitmap render to use scaled content redraw. 2015-04-23 22:50:10 +01:00
Vincent Sanders
de98108e7f Add render to bitmap operations and update gtk to provide it. 2015-04-22 23:14:51 +01:00
Vincent Sanders
e7f9dbcb10 Remove webp image handling
The bitmap and image handling interfaces have changed within NetSurf
and the webp image handling has not been fixed up appropriately to
cope.

After discussion with the other developers it has been decided that
the webp support is not worth the necessary development effort to
rewrite and maintain.

The webp format is not in wide usage and Mozilla, Microsoft and Apple
have not adopted it. This means the removal will not adversely impact
NetSurf.

Resolves:2310
2015-04-21 14:03:02 +01:00
Vincent Sanders
eab53da088 Remove unecessary inclusion of the image bitmap header 2015-04-20 22:03:43 +01:00
Vincent Sanders
2465fc4e6b move the mandantory library config for libcss and libdom to core makefile 2015-04-17 22:48:55 +01:00
Vincent Sanders
89a3f250d2 Ensure GTK source viewer reports errors appropriately. 2015-04-17 10:40:11 +01:00
Vincent Sanders
7ec917eed2 ensure memory is freed on error path in gtk viewdata 2015-04-17 10:06:21 +01:00
Vincent Sanders
82c1ed9f4a Ensure gtk XDG editor handling never uses an unintialised value. 2015-04-17 09:34:52 +01:00
Vincent Sanders
9679561eca Update monkey frontend to use bitmap operation table. 2015-04-15 22:05:10 +01:00
Vincent Sanders
cc11912da1 Convert framebuffer frontend to bitmap operations table. 2015-04-14 23:08:02 +01:00
Vincent Sanders
c02f552e87 chnage GTK frontend to using bitmap operation table 2015-04-13 23:49:44 +01:00
Vincent Sanders
4133154215 fix documentation errors in gtk introduced by recent updates. 2015-04-12 21:42:33 +01:00
Vincent Sanders
de09dc8efd clean up gtk gui header usage and includes 2015-04-12 20:26:53 +01:00
Vincent Sanders
d513d6261a actually add the files from the previous gtk ssl rework commit 2015-04-12 17:55:46 +01:00
Vincent Sanders
c134750575 split out gtk SSL certificate verification dialog impementation. 2015-04-12 17:26:22 +01:00
Vincent Sanders
fb73ff80ed Fixup gtk3 ssl certificate dialog and ensure its parent is set. 2015-04-12 13:52:56 +01:00
Vincent Sanders
997e8999d5 Refactor GTK toolbar handling to correctly cope with text labels 2015-04-12 01:12:43 +01:00
Vincent Sanders
f3158f79b6 remove usage of deprecated gtk alignment interface 2015-04-11 22:32:08 +01:00
Vincent Sanders
5e51600cfe Add gtk compatability for margin setting. 2015-04-11 18:41:00 +01:00
Vincent Sanders
df4e9e322d Add widget alignment gtk compatability interface. 2015-04-11 15:20:52 +01:00
Vincent Sanders
e193566de4 Improve the stock icon/icon name compatability logic to be explicit 2015-04-11 00:28:32 +01:00
Vincent Sanders
4f13cbd31c Fixup deprication of gtk_icon_size_lookup_for_settings in gtk 3.10 2015-04-10 16:39:23 +01:00
Vincent Sanders
267fb0b00e cope with deprication of image menus in GTK 3.10 2015-04-10 16:20:55 +01:00
Vincent Sanders
1922eb1e2a remove no longer required gtk_dialog_get_action_area compatability interface 2015-04-10 15:23:15 +01:00
Vincent Sanders
98f8acdfe5 Change gtk about dialog construction to use the API as intended.
The about dialog box construction was awkward and brittle using
several depricated interfaces. This changes it to use a more generic
dialog creation and uses the response API to simplify click
processing.

It would be even better to use the gtk about dialog but that is a more
invasive change.
2015-04-10 13:19:22 +01:00
Vincent Sanders
44c0196dbf extend GTK 3 compatability with opacity and viewport helpers 2015-04-10 00:36:47 +01:00
Vincent Sanders
85f90899ed Fix up silly recusrsion typo in nsgtk_button_new_from_stock compatability 2015-04-10 00:24:01 +01:00
Vincent Sanders
50f68b11a4 fixup default toolbar button creation for depricated GTK 3 operations 2015-04-10 00:06:48 +01:00