Commit Graph

117 Commits

Author SHA1 Message Date
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
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
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
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
c02f552e87 chnage GTK frontend to using bitmap operation table 2015-04-13 23:49:44 +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
Witold Filipczyk
befa5e6ed3 To avoid namespace conflicts with ncurses add NetSurf key prefix.
Adds a NetSurf key code prefix of NS_ to all key codes.
2015-03-27 09:36:19 +00:00
Vincent Sanders
5eefe00163 remove unecessary includes from gtk gui 2014-12-27 22:25:38 +00:00
Vincent Sanders
bbcb7d91b2 fix amiga pdf save include 2014-10-27 00:07:15 +00:00
Vincent Sanders
d204d6d555 Clean up saving as PDF
This removes the global PDF_Password interface that had completely
bitrotted and moves it into the standard misc operation table with a
sensible defualt implementation.

This also cleans up and fixes the gtk frontend implementation of the
pdf password callback so it compiles.

Finally this moves the implementation to a sensible place alongside
the other exporters reducing target makefile complexity futher.
2014-10-26 23:53:14 +00:00
Vincent Sanders
14e2829489 remove the die API from the core.
The die() API for abnormal termination does not belong within the core
of netsurf and instead errors are propogated back to the callers.

This is the final part of this change and the API is now only used within
some parts of the frontends
2014-10-26 12:42:53 +00:00
Michael Drake
58c0fe8cc7 Don't take core/front-end choice away from user. 2014-10-24 21:03:21 +01:00
Michael Drake
94f32b8369 Move create_form_select_menu to window gui table. 2014-10-24 20:45:21 +01:00
Vincent Sanders
f97c0109a6 Update gtk frontend to cope with split operations table headers 2014-10-16 22:33:44 +01:00
Michael Drake
63645c4c32 Fix core create_form_select_menu API to pass gw, rather than bw out to front ends. 2014-10-16 12:39:31 +01:00
Michael Drake
1b7ce53aad Remove seemingly unused global. 2014-10-16 12:21:37 +01:00
Vincent Sanders
3fa0ed01c0 add API to set DPI 2014-10-13 02:34:10 +01:00
Vincent Sanders
79c6617cfb move gtk to using its own main loop instead of core polling 2014-09-22 18:11:39 +01:00
Vincent Sanders
841bc17090 move gtk execution loop to main() 2014-09-22 18:11:23 +01:00
Vincent Sanders
91deff3797 fix menu and C-q gtk exiting (closes bug #2184) 2014-08-23 17:10:39 -07:00
Vincent Sanders
d0da99beca extend gtk viewdata to open files in an editor using the freedesktop default app specification 2014-08-16 23:33:12 +01:00
Vincent Sanders
58eea873f8 rationalise source view 2014-08-01 01:00:13 +01:00
Vincent Sanders
55669387ff clean up gtk scaffolding interface, remove lots of cruft and globals 2014-07-27 18:07:00 +01:00
Vincent Sanders
5b4d38b29b stop using certificate data from the stack outside the message context. 2014-07-17 15:20:38 +01:00
Vincent Sanders
18aefabd20 change reformat to be driven from the scheduler like redraw 2014-07-01 09:27:20 +01:00
Vincent Sanders
8944edd649 convert all frontends to scheduled fetch operation 2014-06-26 19:05:59 +01:00
Vincent Sanders
f1c2dde13b extend file table with mkdir all and make fs backing store use it.
enable fs backing store for RISC OS.
2014-06-05 12:06:47 +01:00
Vincent Sanders
7d02ae916a make launch_url core operation use nsurl 2014-05-27 23:52:35 +01:00
Vincent Sanders
a6d3ceae0e Completely re-write web search provider handling 2014-05-25 01:01:59 +01:00
Vincent Sanders
a4be7f7d1a ensure new config directories can be created. 2014-05-13 17:49:23 +01:00
Vincent Sanders
6d3f5d2338 Enable filesystem based cache in gtk frontend 2014-05-13 15:53:06 +01:00
Vincent Sanders
64f607760b add backing store storage path to browser initialisation 2014-05-13 15:53:06 +01:00
Vincent Sanders
ccc9ad969b fix gtk options loading 2014-05-12 23:46:31 +01:00
Vincent Sanders
16b11e7238 ensure operations tables are registered as early as possible. 2014-05-10 10:22:10 +01:00
Vincent Sanders
2326d3c503 remove unecessary utils/url.h includes 2014-05-09 10:15:42 +01:00
Vincent Sanders
c56642819e add file operations table and make all frontends use it.
This rationalises the path construction and basename file
operations. The default implementation is POSIX which works for all
frontends except windows, riscos and amiga which have differeing path
separators and rules.

These implementations are significantly more robust than the previous
nine implementations and also do not use unsafe strncpy or buffers
with arbitrary length limits.

These implementations also carry full documentation comments.
2014-05-07 16:24:51 +01:00
Vincent Sanders
a73f22c966 make gtk commandline filename loading use snprintf 2014-04-30 13:56:01 +01:00
Vincent Sanders
1fd565cba7 make GTK configuration handling conform to XDG specification. 2014-04-28 16:37:00 +01:00
Vincent Sanders
4d4d74c8cd move page search gui callbacks to their own operations table 2014-03-18 22:32:52 +00:00
Vincent Sanders
87f6314dab move scheduleing into browser operation table 2014-03-09 15:37:40 +00:00
Michael Drake
af014bce99 Allow tab creation without history clone. Changes browser_window_create and browser_window_navigate flags. 2014-02-10 14:08:45 +00:00
Michael Drake
5f517cc714 Don't need browser_private.h any more. 2014-02-08 17:13:04 +00:00
Michael Drake
8deb9ec25c Native select menu interface shouldn't force front end to dig inside bw struct. 2014-02-08 17:11:55 +00:00
Vincent Sanders
886a3106db move utf8 local conversion operations to table 2014-02-01 22:17:36 +00:00