Commit Graph

980 Commits

Author SHA1 Message Date
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
Vincent Sanders
23ae8ccf11 Extend gtk compatability to fix more items depricated in GTK 3.10 2015-04-09 23:25:05 +01:00
Vincent Sanders
ab997398ad cope with deprication of gtk_style_context_get_font 2015-04-09 14:10:14 +01:00
Vincent Sanders
b9b952cddf Ensure the about dialog construction does not cause warnings
The about dialog construction calls were missing a NULL sentinal which
was causing warnings on GTK 3 builds.
2015-04-09 11:43:53 +01:00
Vincent Sanders
ae98fbe8c8 Only define compatability helpers for sexy icons if required.
The helper nsgtk_widget_get_state is only necessary for sexy icons and
introduces unecessary GTK 3 compatability issues otehrwise.
2015-04-09 11:41:06 +01:00
Vincent Sanders
5a14a74ab1 Update gtk compatability header to cope with deprication of stock icon interface 2015-04-08 22:21:30 +01:00
Vincent Sanders
a838fa3ee9 Improve split message generation
Changes the way message files are generated to be driven by make as
rules rather than from explicit macro calls causing their regeneration
every build.

A secondary benefit is that errors in message generation actually stop
the build instead of being ignored

Each frontend will require its filter settings updated to avoid
getting the default message filter of "any". Initially gtk has been
adapted as proof of concept.
2015-04-07 00:44:35 +01:00
Vincent Sanders
ea9a2ff01d Fix up some doxygen errors 2015-04-03 00:28:22 +01:00
Vincent Sanders
e62db5a49c define _DEFAULT_SOURCE as well as _BSD_SOURCE to supress warnings in glibc 2.12 2015-03-28 18:25:41 +00: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
8a99b045bc Remove url from content thumbnailers API
The content thumbnailers for each frontend were being provided the
contents url. This was only ever used to call the urldb thumbnail
setting API.

This changes it so the single callsite that passed a valid url adds
the bitmap to that url itself in desktop_history.c instead of forcing
every frontend to require the urldb API.

Additionally the old API could pass the url as NULL which was causing
asserts where this was not an expected parameter value. Because of
this this fixes bug #2286 which was also present in the monkey
frontend as both called nsurl_access() on the url without the NULL
check and caused an assertion.
2015-03-15 00:00:45 +00:00
Vincent Sanders
5d3cc513a3 Fixup gtk viewdata window to open at appropriate size
The size hints given were insufficient for gtk to open the window at a
sensible size or position. This fixes it to open with a default
640x480 size which is a reasonable compromise.

The gtk3 ui builder file was completely reconstructed from fresh as it
was broken and was not working.
2015-03-06 17:16:09 +00:00
Michael Drake
cbd9d710a3 Use forward declaration instead of #include for nsurl. 2015-02-26 16:14:23 +00:00
Michael Drake
30909f8ed5 Move FILE_SCHEME_PREFIX to corestrings. 2015-02-26 16:14:23 +00:00
John-Mark Bell
5f0964fa09 GTK: inherit GTK version from environment. 2015-02-24 14:07:47 +00:00
Vincent Sanders
6b645664fe add missing includes 2014-12-27 22:48:37 +00:00
Vincent Sanders
5eefe00163 remove unecessary includes from gtk gui 2014-12-27 22:25:38 +00:00
Vincent Sanders
959af3dc28 Add XDG desktop file for GTK frontend
The XDG spec allows for software to specify how it is executed and
presented in a graphical environment by using a desktop file
http://standards.freedesktop.org/desktop-entry-spec/latest/

This version is taken from my Debian packaging but should be useful
for other operating systems.
2014-12-25 15:49:35 +00:00
Vincent Sanders
e467077a21 move host based default settings to core as tehy are not frontend dependant 2014-12-21 16:22:54 +00:00
Vincent Sanders
193a5c80b7 ensure gtk build on freebsd uses the correct iconv 2014-12-21 15:06:07 +00:00
Vincent Sanders
8e60d32831 remove some warnings from freebsd build 2014-12-21 02:01:45 +00:00
Vincent Sanders
c6ada5c089 Cope with freebsd gdk paths 2014-12-21 01:25:36 +00:00
Vincent Sanders
79e501075a make the form select menu API smaller.
By hiding all but the form selection menu option structure from code
outside of render this reduces the API to the absolute minimum to
support this feature.
2014-11-13 21:52:08 +00:00
Vincent Sanders
9fde3502b6 doxygen cleanups in utils 2014-11-12 23:27:13 +00:00
Vincent Sanders
1a7d00076d cleanup Doxygen warnings 2014-11-12 19:31:39 +00:00
Vincent Sanders
a99b1325d7 Doxygen cleanups 2014-11-12 11:45:07 +00:00
Anthony J. Bentley
ad414165f9 Typo fix: maintinance → maintenance in gtk frontend (closes #2217) 2014-11-10 22:39:28 +00:00
Vincent Sanders
33eb1f413a Doxygen warning fixes 2014-11-10 20:15:14 +00:00
Vincent Sanders
d1f2d29e10 Doxygen cleanups and documentation additions 2014-11-10 17:00:15 +00:00
Vincent Sanders
5562c9a553 Continue doxygen error cleanup. 2014-11-08 22:08:29 +00:00
Vincent Sanders
05a64bfde9 fix up more doxygen errors 2014-11-08 16:49:32 +00:00
Vincent Sanders
8f64d5d223 Improve Doxygen documentation 2014-11-08 12:35:11 +00:00
Vincent Sanders
f287379a7c Fix several doxygen issues 2014-11-08 11:38:20 +00:00
Vincent Sanders
3405803280 Improve content encoding information API
Extend the content_get_encoding() API to retrieve the source of
the encoding as well as the actual encoding.
2014-11-07 12:33:34 +00:00
Vincent Sanders
8c2cfecfb5 Allow content handlers to have debug values set through API
Previously content handler debugging features were accessed by global
variables. This allows the setting of debugging parameters via a
content API giving per content control over debugging features.
Currently only used by the html content handler to toggle global
redraw debugging.
2014-11-06 22:51:46 +00:00
Vincent Sanders
46f369ca9e move themse install to its own header 2014-11-06 14:19:15 +00:00
Vincent Sanders
8ec7ad053a Make the fetching of a contents encoding generic.
The frontends previously had to use an html renderer API to get the
encoding of a content. This also required the explicit checking of the
contents type rather than using the existing content API to abstract
this knowledge.
2014-11-05 23:44:31 +00:00
Vincent Sanders
ba3671d147 ensure gtk thumbnail content has a minimum render width. (fix coverity 1109861) 2014-11-04 20:41:31 +00:00
Vincent Sanders
b4f3eaf082 check stat return value (fixes coverity 1109842) 2014-11-04 20:41:31 +00:00
Vincent Sanders
c14ddad660 change url setting api to take an nsurl instead of a text string 2014-11-02 22:30:45 +00:00
Vincent Sanders
ad343eccb1 remove unecessary utils/types.h
This cleans up this header and moves the functionality into more
useful places while reducing the include complexity but only pulling
in whats required.
2014-11-02 20:10:32 +00:00
Vincent Sanders
c31c4babe1 Change contextual content retrieval to browser features.
Update the API which allows frontends to acquire the page features
(images, link urls or form elements) present at the given coordinates
within a browser window.

By making this an explicit browser_window API and using the browser.h
header for the associated data structure with a more appropriate API
naming the usage is much more obvious and contained.

Additionally the link url is now passed around as a nsurl stopping it
being converted from nsurl to text and back again several times.
2014-11-02 15:46:42 +00:00
Michael Drake
3c82214998 Don't need the old url header. 2014-10-31 14:34:14 +00:00
Vincent Sanders
ce3d991918 use nsurl_nice and remove url_nice
change all callers over to using new API for generating nice filenames
from a url and remove the old API.
2014-10-31 00:24:57 +00:00
Vincent Sanders
7ace528729 Update url setting API to return nserror code instead of calling warn_user 2014-10-29 00:18:12 +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
Michael Drake
6b846c363d Add trivial maps facilitator at about:maps
This is a simple HTML front end for the Google Static Maps API, since
we don't yet have enough JS support for the full Google Maps.

See:
  https://developers.google.com/maps/documentation/staticmaps/
2014-10-22 20:42: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
02bbaa3e88 split version info into its own header and remove unnecessary nesurf.h includes
The netsurf.h header should *only* contain the registration, core
initialisation and finalisation methods. Version information is best
placed in its own header.

Also remove any unneeded inclusion of this header limiting it to
solely the places the relevant API is required.
2014-10-13 15:08:16 +01:00
Vincent Sanders
fa8d690005 remove unused include 2014-10-13 13:38:08 +01:00
Vincent Sanders
17be8cf216 Put the font operations table alongside all the other core API
The netsurf core is driven from numerous operation tables most of
which are now set through a common netsurf_register() interface. The
font and plotting interfaces are currently separate and unlike all the
other operation tables are modified for differing contexts.

This change moves the font operations alongside all the other
operations table and remove unnecessary interaction with the renderers
font internals. Further this also removes the need for css internals
to be visible in frontends.
2014-10-13 11:56:31 +01:00
Vincent Sanders
3fa0ed01c0 add API to set DPI 2014-10-13 02:34:10 +01:00
Vincent Sanders
e825f38437 move about and preferences window handling to more sensible position 2014-09-22 23:18:03 +01:00
Vincent Sanders
9487076f2a remove old notes that are no longer relevant 2014-09-22 22:58:27 +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
a8101a99ea use gtk completion variable and remove uneeded include of netsurf.h 2014-09-22 18:11:39 +01:00
Vincent Sanders
0de8cfc9d4 add flag to allow gtk loop to be signalled to exit 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
Michael Drake
d3d682e51b Remove redundant code. 2014-09-06 11:26:02 +01:00
Vincent Sanders
4f530a3f8f Pull warning flags out into variables that can be overriden seperately for C and C++ 2014-09-05 16:01:44 +01:00
Michael Drake
b7b70a3ca8 Merge branch 'master' of git://git.netsurf-browser.org/netsurf 2014-08-26 17:59:19 +01:00