Commit Graph

188 Commits

Author SHA1 Message Date
Vincent Sanders
1fc51d1f44 moved most of init to toolbar.c 2019-09-21 10:53:41 +01:00
Vincent Sanders
6bce06b91f fix spelling mistakes from miscellaneous event commit 2019-08-20 16:38:51 +01:00
Vincent Sanders
4dc4d8b318 add miscellaneous event to browser window callback table
extend the browser window callback table with a miscallaneous event
 entry. This is used to replace all browser window callbacks which
 take no parameters.

This reduces the API surface from seven separate calls to a single
 call with an enumeration which may be readily extended.

The initial implementation in the frontends simply calls the original
 implementations to reduce scope for errors.
2019-08-20 00:16:52 +01:00
Vincent Sanders
c0e27bd0da access gtk throbber frames through an interface
This changes the gtk throbber frames to be accessed through an API
  This removes teh nsgtk_throbber global and hides the implementation
  details from the rest of the code.
2019-08-18 14:41:31 +01:00
Vincent Sanders
01f3879b64 Move favicon from url entry widget to notebook tab label 2019-08-15 23:02:04 +01:00
Vincent Sanders
6a1dbd377b
remove login window from gtk front end 2019-08-13 12:09:21 +01:00
Daniel Silverstone
1cf1ec55bc Support SSL verification through new about: handler
In doing this, also propagate why the certificates were bad
so that the page can display a reason.  We will need FatMessages
for all these.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-06 13:15:23 +01:00
Daniel Silverstone
8469f4cc8e Reimplement handling of BAD_AUTH inside browser_window
We now handle authentication requests via an `about:` page
which presents a nice form built into the browser window.
In order to do this, we add internal navigation as a concept
to the browser window and we strip the 401login support from all
frontends except monkey.

The 401login callback is now intended for password safe type support
rather than an immediately interactive prompt.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-06 11:26:47 +01:00
Vincent Sanders
337c2ed7b1 remove unused gtk window interfaces and clean up documentation 2019-08-04 09:47:58 +01:00
Michael Drake
3938d5340b Corewindow: Sanitise scrolling API.
Now the core has a helper so that all the front ends don't need
to implement the scroll to show area API.

Now they simply have get and set scroll APIs.
2019-08-03 15:57:23 +01:00
Vincent Sanders
641f5fb072 make use of improved browser_window_set_scale API in frontends 2019-08-03 15:53:07 +01:00
Vincent Sanders
d4c01894c2 change browser_window_get_features to use unscaled coordinates 2019-08-03 14:29:06 +01:00
Vincent Sanders
0ebfff259f change browser_window_mouse_track to use unscaled coordinates 2019-08-03 14:29:05 +01:00
Vincent Sanders
0a8ed41a1a change browser_window_mouse_click to use unscaled coordinates
this means frontends no longer need to scale mouse click events thus
simplifying their implementation.
2019-08-03 14:29:05 +01:00
Daniel Silverstone
5e8b2d4653 gtk/local_history: Scroll local history to cursor on display
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 21:00:34 +01:00
Daniel Silverstone
c078c3f509 gtk/corewindow.c: Correctly handle scroll_visible
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 21:00:06 +01:00
Daniel Silverstone
6bbdf08cb0 gtk, beos: Run scheduler before fetching fdset
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 17:06:45 +01:00
Vincent Sanders
552aab42e1 remove scaled parameter from get_dimensions 2019-08-02 12:26:20 +01:00
Michael Drake
2943e9ae46 GTK: Update for unscaled bw invalidate rectangle. 2019-08-01 22:34:13 +01:00
Vincent Sanders
5742762070 split browser and browser_window operations 2019-08-01 19:51:19 +01:00
Samuel Dionne-Riel
87177d8aa1 GTK: prefer using curl's intrinsic defaults for CURLOPT_CA*
On distributions that ship only a ca-bundle in `/etc/ssl`, the
configuration set at initialization will force curl to look for
certificates that are not present in this directory.

Removing the setting instead makes curl use its internal default.

The framebuffer frontend will not set this option, and the only
other frontend that sets it is BeOS.

This issue can be observed (likely among other) on the NixOS Linux
distribution.
2019-08-01 12:03:06 +01:00
brabo
ba9f5f8ef0 gtk/fetch.c & monkey/filetype.c: ascii_is_space already checks for newline. 2019-08-01 10:42:08 +01:00
brabo
c90bfb23ad gtk/fetch.c & monkey/filetype.c: small comment correction. 2019-08-01 10:42:08 +01:00
Michael Forney
6a53b447e5 Declare global variables as extern in headers
Otherwise, each source file that includes the header will create a
new definition, which are usually merged together by the linker.

Multiple definitions of an object is not allowed in ISO C.
2019-06-30 09:52:06 +01:00
Vincent Sanders
dddc5eac94 Update schedulers return codes
The GTK and monkey frontends schedulers now return NSERROR_NOT_FOUND
 when a caller is using a negative schedule time to remove a callback.
2019-06-08 13:33:16 +01:00
Vincent Sanders
35bc2ccbb8 change content get_source_data interfaces to return uint8_t and size_t
previously these interfaces returned char * and unsigned int which was
undesirable.
2019-05-05 22:50:25 +01:00
Vincent Sanders
efdea7757b fix enum name incompatability between gtk 2 and 3 2019-05-05 15:38:19 +01:00
Vincent Sanders
6ff3238825 centralise monkey output generation 2018-11-03 15:12:50 +00:00
Michael Drake
96254254a6 GTK: Squash GCC8.2 warning.
frontends/gtk/download.c: In function ‘gui_download_window_create’:
frontends/gtk/download.c:829:10: warning: cast between incompatible function types from ‘gboolean (*)(gboolean)’ {aka ‘int (*)(int)’} to ‘gboolean (*)(void *)’ {aka ‘int (*)(void *)’} [-Wcast-function-type]
          (GSourceFunc) nsgtk_download_update, FALSE);
          ^
2018-11-03 11:00:09 +00:00
Michael Drake
5eb7345cc7 GTK: Make nsgtk_download_selection_action match GFunc prototype.
Squashes GCC 8.2 warning:

frontends/gtk/download.c:244:22: warning: cast between incompatible function types
from ‘nsgtk_download_selection_action’ {aka ‘void (*)(struct gui_download_window *)’}
to ‘void (*)(void *, void *)’ [-Wcast-function-type]
  g_list_foreach(dls, (GFunc)action, NULL);
                      ^
2018-11-03 08:48:24 +00:00
Michael Drake
df79047cb6 GTK: Squash a couple of warnings from GCC 8.2.
frontends/gtk/download.c: In function ‘nsgtk_download_do’:
frontends/gtk/download.c:238:24: warning: cast between incompatible function
types from ‘void (*)(GtkTreePath *)’ {aka ‘void (*)(struct _GtkTreePath *)’}
to ‘void (*)(void *, void *)’ [-Wcast-function-type]
   g_list_foreach(rows, (GFunc)gtk_tree_path_free, NULL);
                        ^
frontends/gtk/download.c:239:24: warning: cast between incompatible function
types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type]
   g_list_foreach(rows, (GFunc)g_free, NULL);
                        ^
2018-11-03 08:39:05 +00:00
Vincent Sanders
8687265c9a fix stupid typo in previous commit 2018-10-08 12:33:58 +01:00
Vincent Sanders
a8ee1c2d63 explicitly check for null string before compare 2018-10-06 15:44:17 +01:00
Vincent Sanders
83512a6ff5 squash clang warning about increased alignment requirements. 2018-09-26 17:21:05 +01:00
Vincent Sanders
2596331640 seems freebsd needs _XOPEN_SOURCE for math.h macros to be defined 2018-09-06 12:10:38 +01:00
Vincent Sanders
6ce6b62099 stop defining _XOPEN_SOURCE
This is necessary with some libc as it overrides _POSIX_C_SOURCE
and removes definitions of scandir etc.
2018-09-06 11:33:02 +01:00
Vincent Sanders
9142bab736 remove a warning on openbsd 2018-08-28 22:17:02 +01:00
Michael Drake
d54e0461ad GTK: Remove logging during window resize. 2018-08-27 20:04:24 +01:00
Vincent Sanders
487309a1e6 fixup usage of gvalue init macro 2018-08-26 11:22:20 +01:00
Vincent Sanders
4765c68a15 fix gtk 3 deprication warnings 2018-08-26 10:12:35 +01:00
Vincent Sanders
f4620a3f68 remove depricated gtk 3 interfaces 2018-08-24 20:25:14 +01:00
Vincent Sanders
2f663987c5 do not use strlen as a variable name 2018-08-21 14:59:29 +01:00
Vincent Sanders
650ac58604 Improve GTK login dialog 2018-08-19 23:16:16 +01:00
Michael Drake
6144993c8a GTK: Update for new HTTP auth API. 2018-08-15 07:19:58 +01:00
Michael Drake
09b015bf11 Browser: Rename function to access bw URL. 2018-07-23 10:47:26 +01:00
Michael Drake
8332bf6b2a Plotters: Remove width param from path plotter.
We now use the stroke_width in the plot_style.
2018-05-23 13:48:17 +01:00
Michael Drake
66493421e6 Plotters: Change stroke width in the plot_style_t to fixed point. 2018-05-23 13:04:19 +01:00
Michael Drake
a58d97a41a Plotters: Add plot_style_fixed type, and use for font size. 2018-05-23 11:48:35 +01:00
Vincent Sanders
0569fbf170 change tab next and back accelerators
fixes bug #2581
2018-04-22 14:03:18 +01:00
Vincent Sanders
d196ea7795 fix gtk accelerator loading 2018-04-22 14:03:18 +01:00
Vincent Sanders
cfa5856eea Initial conversion of GTK accelerators to separate config file 2018-04-22 14:03:18 +01:00
Daniel Silverstone
c1e30c0c3a Initial shuffle of stuff out of !NetSurf 2018-04-22 10:41:55 +01:00
Vincent Sanders
eba0fd70eb clean up toolbar configuration to be slightly less buggy 2017-12-10 22:57:06 +00:00
Michael Drake
e418416c77 Squash remaining GCC7 -Wimplicit-fallthrough warnings. 2017-10-23 09:46:02 +01:00
Daniel Silverstone
d3493b138f Initialise DPI earlier so that it works for treeviews 2017-09-19 15:13:51 +01:00
Daniel Silverstone
8123e65351 Finalise nslog layer properly in closedown 2017-09-10 14:22:05 +01:00
Michael Drake
d17b710fa9 GTK: Corewindow: Fix modifier keys on mouse click.
Modifiers were getting unset for the click (release) events.
2017-09-09 14:38:49 +01:00
Vincent Sanders
f89f7192ef fix size+t formatting in logging 2017-09-07 21:08:02 +01:00
Vincent Sanders
3a633acc3f fixup junk comment close 2017-09-07 18:33:07 +01:00
Vincent Sanders
5d6f189d8b Fixup everything the semantic patch missed 2017-09-07 18:12:09 +01:00
Vincent Sanders
b9bdc279f2 Update scheduler logging to use catagory 2017-09-07 15:30:08 +01:00
Vincent Sanders
75018632a9 Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done

@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Vincent Sanders
5a40e94df6 remove unecessary textarea include 2017-08-27 15:46:00 +01:00
Michael Drake
dfa1e0bcd3 GTK: Ensure core windows are fully initialised. 2017-06-11 10:05:59 +01:00
Michael Drake
92ecc77768 Core window: Ensure all front ends initialise drag_status. 2017-06-10 18:10:07 +01:00
Michael Drake
50371731e3 GTK: Ensure drag status is initialised in core windows. 2017-06-10 17:55:18 +01:00
Michael Drake
b0358727d9 GTK: Don't need to treat local history specially now. 2017-06-10 11:53:58 +01:00
Vincent Sanders
2bec7f113c fix gtk bitmap doccomment to be truthful 2017-06-09 22:01:05 +01:00
Vincent Sanders
703427a486 Update documentation removing junk and moving to markdown for most text files 2017-06-09 17:30:00 +01:00
Vincent Sanders
3c1a6f9c52 update gtk frontend for corewindow API change 2017-05-23 09:45:37 +01:00
Vincent Sanders
87ed0904e0 Merge branch 'vince/scroll-api' 2017-04-26 22:28:41 +01:00
Vincent Sanders
0f039b4421 Update GTK frontend for set_scroll API change 2017-04-26 22:24:57 +01:00
Michael Drake
4b76d2096d GTK: Optimise tiled bitmap plotting, and scaled bitmap rendering.
We now let Cairo deal with the tiling.  Also we don't keep cached
scaled bitmaps any more.  The speedup for small bitmap tile sizes
is huge.
2017-04-26 12:38:04 +01:00
Vincent Sanders
72bd28d16e update GTK frontend for reformat API change 2017-04-26 09:47:55 +01:00
Michael Drake
a137de40a9 GTK: Update for core hotlist API change. 2017-04-25 12:08:32 +01:00
Vincent Sanders
d930da3899 update gtk frontend with invalidate window API change 2017-04-23 12:05:30 +01:00
Michael Drake
2c8a47b7d4 GTK: Slight optimisation to nsfont_split().
When we aren't modifying the line, pango_layout_get_line_readonly()
is a faster alternative to pango_layout_get_line().
2017-04-11 16:32:03 +01:00
Michael Drake
90100bbd45 GTK: Font rendering: Use same pango layout for painting as for measuring.
With this change we are consistent about how the pango layout
we use is created.

Now it always comes from a pango_layout_new() call on a pango context
that comes from gdk_pango_context_get().

Previously the pango layout used for painting came from a call
to pango_cairo_create_layout(), which required a global called
"current_cr" (a cairo drawing context), which is only valid
during redraw (painting).  Since it was only valid during
painting, this source could not be used for pango layout
creation for the measuring code.
2017-04-11 16:13:13 +01:00
Vincent Sanders
ca942e9e26 fix use of uninitialised variables in gtk print
fixes errors detected by coverity.
2017-03-04 14:23:06 +00:00
Vincent Sanders
7dee82d900 remove unused computed rectangle in gtk local hostory redraw 2017-02-26 16:26:50 +00:00
Vincent Sanders
86134d9881 add local history destruction for gtk 2017-02-26 16:26:50 +00:00
Vincent Sanders
1820bb7e63 fix remaining doccomment errors 2017-02-22 08:30:58 +00:00
Vincent Sanders
8ddb9df377 update gtk frontend to use corewindow local history 2017-02-17 09:06:32 +00:00
Vincent Sanders
9d0943b8e5 remove redundant global context 2017-02-15 08:37:52 +00:00
Vincent Sanders
6741b6e287 clean up incorrect documentation comments from plotter API rework 2017-02-14 23:06:04 +00:00
Vincent Sanders
7b9fa8d7eb fix plotter merge 2017-02-12 20:31:18 +00:00
Vincent Sanders
78d601eb76 Update GTK plotters to use new API 2017-02-11 13:57:07 +00:00
Daniel Silverstone
10f1b7a1aa Fix up GTK+ hotlist finalisation to clean up properly 2017-02-05 10:43:58 +00:00
Vincent Sanders
6075feb487 create netsurf inttypes header to have portable integer formatting macros 2017-01-21 14:20:55 +00:00
Vincent Sanders
70d700b26c rationalise use of utils/utils.h header 2017-01-19 21:15:08 +00:00
Vincent Sanders
7dab7cb43d move plot style header to netsurf include directory
move plotter style header and adjust all callers to use only what they
actually require.
2017-01-13 10:03:24 +00:00
Vincent Sanders
9be0f4ccaf fixup usage of directory creation macro in Makefiles 2017-01-07 13:21:25 +00:00
Michael Drake
4e5e9f1f5a gtk: Update for new hotlist API.
This allows the hotlist backend to work before the hotlist window opens.
2016-12-29 14:49:39 +00:00
Vincent Sanders
f68a3f9d61 improve gtk corewindow documentation 2016-12-26 13:24:22 +00:00
Vincent Sanders
2adf0a9c44 clean up documentation of GTK core window interfaces 2016-10-26 13:58:51 +01:00
Vincent Sanders
1de0ebf2e5 fix gtk install target to cope with gtk3 2016-10-05 19:44:49 +01:00
Vincent Sanders
975931a4f6 fix gtk3 build with corewindow 2016-10-05 19:43:19 +01:00
Vincent Sanders
0dcfc2fc5d fix use of default image on menu entries for gtk frontend 2016-09-27 21:17:33 +01:00
Vincent Sanders
1beb1e938f make GTK frontend mime type processing use explicit ascii processing 2016-09-07 21:45:16 +01:00
Vincent Sanders
a8a6098f68 move core window API into netsurf header path 2016-08-18 21:07:04 +01:00