Commit Graph

116 Commits

Author SHA1 Message Date
Quentin Rameau 75e3fe5b95 Adapting the whole surf structure to new settings 2016-07-05 13:01:56 +02:00
Quentin Rameau 11b34c0814 Adapt default parameters to new config style 2016-07-05 13:01:56 +02:00
Dmitrij D. Czarkoff d04fb9bff3 Disable globbing in curl command
Curl is invoked for downloading particular files.  Without "-g" flag it would
apply globbing rules to URLs, which may end badly in case URL is not properly
quoted.
2016-03-06 09:34:07 +01:00
Quentin Rameau af7522006b Get rid of JavaScript for scrolling in views
This is still a hack, until WebKitGTK gives us a more practical and
stable way to do that. Manipulating directly the DOM inside a
webextension is a pain and only usable with unstable API atm.
2016-03-02 14:46:14 +01:00
Quentin Rameau 981ade6eeb Add webkit language settings
You can now set your prefered website languages in order.
It is also possible to enable spell checking in the same way.
2015-11-22 19:13:48 +01:00
Quentin Rameau fef80cd56c Un(g)boolify to separate GTK dependant code from the rest 2015-11-22 02:03:26 +01:00
Quentin Rameau 11fa5a7a4d Style update for indentation 2015-11-22 01:42:34 +01:00
Quentin Rameau 954a718197 Add mouse function to play medias in external player
Control + left click launches mpv with the target media url.
2015-11-21 19:53:29 +01:00
Quentin Rameau 432f3c6b53 Style change in functions ordering
Try to group and order functions in a logical manner.
Same thing for config keybindings.
2015-11-21 19:14:08 +01:00
Quentin Rameau 5bca222339 Adapt user agent handling
Now we can only append Surf version to the default WebKit user agent
instead of setting the whole string (while this remains possible to do).
2015-11-20 17:12:00 +01:00
Quentin Rameau 5def2e51da Adapt config MACROs SETPROP, DOWNLOAD, PLUMB
As we now use directly const strings from WebKitGTK, “constify” arg void
pointer.
2015-11-20 16:35:13 +01:00
Quentin Rameau 2d1e422368 Rename mouse functions to clickFUNCTION() 2015-11-20 16:27:02 +01:00
Quentin Rameau 82abf5154f Adapt toggle(), clean some config parameters
Regroup all toggles in an enum and handle them with a unique function
via a switch. That lets us take different actions for each toggle.
Add a frame flatenning and a dns preteching options.
2015-11-20 15:48:04 +01:00
Quentin Rameau 526b974c33 Adapt find()
Slightly new behaviour: searching again for the same string (via MOD+/)
resets the search (ie restarts search from document top).
Searching for an empty string stops the search (ie all highlights are
removed).
2015-11-20 01:12:28 +01:00
Quentin Rameau 42fdc77f5e Remove togglescrollbars()
We do not have access to scrollbars and will have to manipulate DOM to
do that.
2015-11-20 00:58:14 +01:00
Quentin Rameau a53dc90171 Adapt scrolling
In fact, we have a scrolling handle ersatz for now using JavaScript
calls as we don't have access anymore to scrollbars.
We'll have to manipulate the DOM directly (later).
2015-11-20 00:53:14 +01:00
Quentin Rameau c4f01cd18b Adapt inspector handling
The inspector is now easily manageable via API, there's no need for
keeping its state in the Client.
2015-11-20 00:46:11 +01:00
Quentin Rameau d6794e0d75 Rename fullscreen() to togglefullscreen()
And handle c->fullscreen value in winevent(). This way we keep track of
fullscreen state even if we did not directly initiate the fullscreen.
2015-11-20 00:34:22 +01:00
Quentin Rameau f6a35e5fbf Adapted buttonrelease()
Use the current hit test (c->mousepos) to determine where the mouse
pointer is.
It is possible to link an action to a click and still propagate the
event after that by setting the “stop event” parameter of a Button to 0.
2015-11-20 00:34:21 +01:00
Quentin Rameau b9530ad5d1 Modify the context name of the hit tests
These relate more to the position of the pointer when an event occurs.
2015-11-20 00:34:20 +01:00
Quentin Rameau 0f3e3bf669 Move all necessary initialisation to newview()
Most all the settings and callbacks are set before view creation.
Create a related view (with inherited settings) if asked to.
2015-11-20 00:34:19 +01:00
Quentin Rameau 4415c475f7 Remove source(), it has been removed from webkit2gtk
WebKit2GTK doesn't provide a direct way to view source anymore, we'll
have to do that ourselves with a GtkSourceView if we still need that.
2015-11-18 14:59:13 +01:00
Quentin Rameau 566b452b46 Port surf to gtk3 2015-11-17 17:05:05 +01:00
Quentin Rameau 5333171961 Be more specific about what enablestyles parameter does.
The enablestyles configuration variable and parameter flag manages the
global application of styles, not just the site-specific styles.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-11-03 19:45:50 +01:00
Christoph Lohmann d486169fa4 Style changes in config.def.h. 2015-10-31 17:49:36 +01:00
Quentin Rameau 1554354f16 Fix atom value parsing in SETPROP
xprop(1) encloses the returned atom string value in double quotes while
it doesn't when the value is unset. Original simple parsing would fail
and parse the atom name instead of getting an empty value.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-10-13 14:28:09 +02:00
Quentin Rameau 9b6998e7ae Fix type of strictssl property.
Thanks to Mark Edgar <medgar123@gmail.com> for having spotted this.
2015-07-13 13:31:22 +02:00
Markus Teich 29c2ab207a allow buttonrelease customization in config.h
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-02-10 19:05:39 +01:00
Christoph Lohmann b36921fbe8 Add some description for the plumb feature. 2015-01-19 22:16:07 +01:00
Christoph Lohmann 9c3b5ad353 Add plumbing functionality. 2015-01-19 22:15:18 +01:00
Christoph Lohmann 7c34d5061e Add a comment about how the styles are iterated.
Thanks quing for noticing.
2015-01-18 14:41:20 +01:00
Christoph Lohmann 117d484833 Adding disk cache support for soup.
This is a merge of the patch of Ben Woolley <tautolog@gmail.com>
2015-01-17 20:50:21 +01:00
Christoph Lohmann c2da2bae5d Major styles update.
In config.h there is now some styles array to apply site-specific styles.
This can be toggled using the -mM flags. If a stylefile is manually specified,
then this will overwrite everything.
2015-01-17 07:19:48 +01:00
Markus Teich ea9d60c5c0 fix some indentation in config.def.h
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-02-28 18:16:22 +01:00
Christoph Lohmann 7ad886fb0b Change the accept no third party in the doc to the right meaning. 2014-01-30 20:57:24 +01:00
Christoph Lohmann 780cca964c Add a way to define the cookie policy.
This adds the -a flag to define a string of the toggle string for the cookie
policy modes. There is now a new »cookiepolicies« string in config.h and the
Mod+Shift+a now can toggle the policy but will not cause a reload, because
this would only add a burden when toggling through accept and not accept.

Thanks Quentin Rameau <quinq.ml@gmail.com> for the suggestions!
2014-01-30 20:36:06 +01:00
Christoph Lohmann 432f45a852 Add zoom level support. 2013-10-19 18:55:53 +02:00
Christoph Lohmann 237e10058a Add fullscreen mode as flag and config option. 2013-08-25 19:50:40 +02:00
Anselm R Garbe 7001df98d1 applied Nick's 96dpi patch, thanks 2013-07-20 08:52:10 +02:00
Christoph Lohmann 067c313e6c Allowing geo location policy decisions. 2013-04-28 21:26:56 +02:00
Christoph Lohmann 083ea8ecde Add an option to disable the indicators. 2013-04-14 14:26:44 +02:00
Nick White a383964c95 Ensure curl follows redirects for downloads
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-03-31 11:57:34 +02:00
Alexander Sedov e0e4a844f7 A typo in SETPROP macro: should be ``printf %b'', not ``printf''.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-03-30 06:49:57 +01:00
Alexander Sedov f6dc8b2541 Fixed SETPROP() macro behaviour in config.def.h to handle escapes correctly.
xprop prints information in format PROPERTY(STRING) = "escaped string",
which causes problem with repeated Ctrl-F: any non-ascii turns into
\ooo\ooo, this later turns into \\ooo\\ooo, and so on. To de-escape
string, printf(1) is used, getting information from xargs -0; without -0
xargs will try to handle escapes by itself and also do shenanigans
with quotes, which is totally undesired.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-03-21 18:10:35 +01:00
Christoph Lohmann d02f73d990 Adding a default font size option.
Thanks Alexander Sedov <alex0player@gmail.com>!
2013-03-14 06:35:42 +01:00
Christoph Lohmann badb84387e Adding kiosk mode.
Thanks to Christian Hesse <mail@eworm.de>!
2013-03-11 21:26:22 +01:00
Carlos J. Torres fe3bd631d4 disable/toggle scrollbars
* add flag to main
	* add flag to manual
	* add signal handler to block default scrollbar policy
	* add toggle of scrollbars (hacky - but no reload) with a twitch
	* add key map to manual
	* add commandline flag to children surfers
	* update TODO
	* sort stuff alphabetically for the style inquisition

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-02-25 13:42:19 +01:00
Christoph Lohmann bd5bbb7fc3 Add a toggle command for the stylefile.
The patch adds some better formatting for the manpage too.

Thanks to Nick <suckless-dev@njw.me.uk> for the toggle patch!
2013-02-16 16:18:05 +01:00
Carlos J. Torres ba634ea8e3 fix DOWNLOAD macro to use cookiefile variable
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-02-13 06:49:17 +01:00
Jens Nyberg 3c1ed5d56a Removed progress indicator
This removes the progress indicator and replaces it with
letters in the window title.

T/U: Trusted, Untrusted
P/-: Proxy, No proxy

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-02-12 21:10:43 +01:00