1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-12 00:34:47 -04:00
Commit Graph

2833 Commits

Author SHA1 Message Date
Miciah Dashiel Butler Masters
8c5dc2d161 Factor init_textarea_data out of textarea_edit 2007-09-01 09:20:40 +00:00
Miciah Dashiel Butler Masters
cc67edbe1c Drop @textarea_editor global 2007-09-01 09:10:54 +00:00
Miciah Dashiel Butler Masters
d4c262694b Move pointers to struct textarea_data from linked-list to terminal structure 2007-09-01 09:02:01 +00:00
Witold Filipczyk
7726e33b0a bug 181: Simplification. Reverted changes causing incompatibility. 2007-09-01 09:00:36 +00:00
Miciah Dashiel Butler Masters
1000f88748 bug 181: Allow edit textareas using an external editor on slave terminals.
Added EVENT_TEXTAREA used to notify the master terminal
about end of execution of an external program on a slave terminal.
The format of data sent to the master terminal by exec_on_slave_terminal
has changed. Now after 0, fg the value of term is sent.
Therfore this release of ELinks is incompatible with previous releases.

Patch by Witold Filipczyk, taken from his witekfl branch.

Conflicts:

	src/viewer/text/textarea.c
2007-09-01 09:00:33 +00:00
Miciah Dashiel Butler Masters
69cf0d06e2 get_opt_: only look for a domain-specific option if no session-specific one found 2007-08-31 09:48:58 +00:00
Miciah Dashiel Butler Masters
3dbdde0f8f Fix RSS rendering
Fix inverted boolean logic from commit 8e954e9f61 'rss: check for allocation failure of struct rss_renderer' that totally broke RSS rendering.
2007-08-31 00:08:19 +00:00
Miciah Dashiel Butler Masters
9f6ce80da3 Add config/domain.[ch] (doh!) 2007-08-30 23:36:20 +00:00
Miciah Dashiel Butler Masters
f04bc1c7d1 init_template_by_style: collapse some case statements
After commit b66d2bec67 'document: Unify text style -> screen attribute handling', the case statements for CSS_PT_FONT_WEIGHT, CSS_PT_FONT_STYLE, and CSS_PT_TEXT_DECORATION all have common code and therefore collapse nicely.
2007-08-30 23:31:20 +00:00
Miciah Dashiel Butler Masters
5191ed82a1 Move domain-specific options code to config/domain
For great modularity!
2007-08-30 22:03:14 +00:00
Miciah Dashiel Butler Masters
7f247ec293 Factor get_domain_option_from_session out of get_opt_. 2007-08-30 21:50:55 +00:00
Miciah Dashiel Butler Masters
d9ee9464f4 If it still doesn't work, I'll try compiling it before committing the next attempt. 2007-08-30 21:48:58 +00:00
Miciah Dashiel Butler Masters
7a96a2eda9 Fix a build error from the last change to textarea_edit
Just a silly thinko.
2007-08-30 21:48:03 +00:00
Miciah Dashiel Butler Masters
860d3cc5ef Suppress a warning about an uninitialised value in parse_set_common 2007-08-30 21:42:57 +00:00
Miciah Dashiel Butler Masters
bfe6243bc1 Allow session- or domain-specific settings for document.brose.forms.editor 2007-08-30 21:32:21 +00:00
Miciah Dashiel Butler Masters
0e0bacf0d3 Merge branch 'master' of ssh://pasky.or.cz/srv/git/elinks
Conflicts:

	src/document/options.c
2007-08-30 21:13:43 +00:00
Miciah Dashiel Butler Masters
91947860f2 Check session- and domain-specific settings for many options
Pass the session with some get_opt_* calls.  These are the low-hanging fruit.  Some places will be difficult because we don't have the session or for other reasons.
2007-08-30 21:11:51 +00:00
Miciah Dashiel Butler Masters
360b4ebfee textarea_edit: convert unnecessary checks to assertions
If @op == 0, then @fs_, @doc_view_, @link_, and @term_ should all be set.  Assert them instead of checking them with if statements.
2007-08-30 21:09:14 +00:00
Miciah Dashiel Butler Masters
06adbbc524 Add domain-specific options saving and look-up
Note that this is the infrastructure, but all relevant get_opt_* calls must be changed to pass the session so that the domain-specific options are looked up.

Add @want_domain parameter to parse_set_common and read in the domain-name if the flag is set.

Add parse_set_domain wrapper for parse_set_common.

Add "set_domain" configuration directive with the following syntax: set_domain domain option = value

Modify create_config_string and smart_config_output_fn to spit out domain-specific option trees.

Add @smart_config_output_fn_domain global variable to facilitate this.

Define structure domain_tree and define list @domain_trees.

Add routine get_domain_tree to find or, if necessary, create the shadow tree for the given domain name.

Add routine get_domain_option search for an option in all domain shadow-trees and return the option in the best matching domain tree.

Modify get_opt_ to use get_domain_option to check for domain-specific options.

Add clean-up routine done_domain_trees, called on exit, to free any domain trees.
2007-08-30 21:04:31 +00:00
Miciah Dashiel Butler Masters
5ada24f3ef update_cache_document_options: take @ses and pass it to get_opt calls
change_hook_active_link: pass update_cache_document_options @ses.

Now when changing the global settings, it will not simply copy the new values for the global settings to the document-options cache, but also check session-specific settings.  This doesn't really matter yet, since the options in question can't be set on a per-session basis, but is in preparation for future changes.
2007-08-30 19:19:57 +00:00
Jonas Fonseca
19f3fd686c Compile fix for commit e876df70d8 2007-08-29 20:51:43 +02:00
Miciah Dashiel Butler Masters
f5e6ed4dd7 Drop @options parameter from create_config_string and write_config_file
Hard-code it to config_options.
2007-08-29 13:43:15 +00:00
Miciah Dashiel Butler Masters
d1e16e1066 get_option_shadow: Set OPT_TOUCHED on the new option 2007-08-29 13:34:43 +00:00
Miciah Dashiel Butler Masters
9a5f76dbd5 Move is_in_domain from cookies/cookies.c to protocol/uri.c and export 2007-08-29 13:33:19 +00:00
Miciah Dashiel Butler Masters
7f042a49d7 Factor parse_set_common out of parse_set 2007-08-29 13:30:40 +00:00
Jonas Fonseca
8e954e9f61 rss: check for allocation failure of struct rss_renderer 2007-08-29 12:05:10 +02:00
Jonas Fonseca
6ebcce0655 rss: document the rss_renderer members 2007-08-29 12:02:36 +02:00
Jonas Fonseca
f2db9c07ed rss: remove the horrible text collection code which didn't do anything 2007-08-29 11:27:54 +02:00
Jonas Fonseca
86ffd94237 rss: simplify rendering to be done while parsing 2007-08-29 11:21:06 +02:00
Jonas Fonseca
0a5ee2d3de rss: move the rendering code above the push/pop handlers 2007-08-29 02:29:58 +02:00
Jonas Fonseca
51fec0ec52 rss: rename rss_renderer variables from data to rss 2007-08-29 02:26:53 +02:00
Jonas Fonseca
16a4110467 rss: minor cleanups 2007-08-29 02:15:06 +02:00
Jonas Fonseca
19b271e417 rss: remove check for rss_renderer->text that is already done above 2007-08-29 02:13:26 +02:00
Jonas Fonseca
8c4191fe87 rss: assert that node->parent is always set 2007-08-29 02:13:10 +02:00
Jonas Fonseca
af4b7bed84 Use the new OBJS-unless$(CONFIG_FOO) instead of $(call not,...) 2007-08-29 01:57:01 +02:00
Petr Baudis
6b05ddb762 Remove unnecessary document/html/parser.h includes 2007-08-29 00:08:05 +02:00
Petr Baudis
d905fb803a Makefile.lib: Fix the $(OBJS) rule 2007-08-28 23:35:22 +02:00
Petr Baudis
e876df70d8 document/html: Make HTML parser state transparent
Before, *_html_parser_state() operated with struct html_element *. Now, it is
transparent for the renderer (just void *), so that DOM won't have to provide
this struct but will be able to use something internal.
2007-08-28 23:35:00 +02:00
Petr Baudis
14ae8ecc01 Makefile.lib: Add support for "unless" config-driven rules
Normally, you can add some objects or subdirs to the build if some
config variable is set to yes, by doing:

	SUBDIRS-$(CONFIG_FOO)

Now you can do it the other way too, including stuff if some
variable is set to no:

	SUBDIRS-unless$(CONFIG_FOO)

This will be used for switching between two HTML parser implementations.
2007-08-28 22:55:26 +02:00
Petr Baudis
e5539a9937 document/html: Move enum html_special_type from parser.h to renderer.h
...since it is renderer interface.
2007-08-28 22:19:33 +02:00
Petr Baudis
a74af825e2 document/dom/rss.c: Add extra styles
Style aux got split to styles author, author-date-sep and date.
2007-08-28 21:34:32 +02:00
Petr Baudis
b457af1984 document/dom/source.c: Trivial simplification 2007-08-28 21:31:49 +02:00
Petr Baudis
baeb0cb0d5 document/dom: Move stylesheet parsing out of style loop
...for better clarity of the document initialization functions.
2007-08-28 21:31:25 +02:00
Petr Baudis
a9619bce80 document/renderer.c: Fix description 2007-08-28 21:28:32 +02:00
Petr Baudis
dc0cf23631 document/dom: Simplify init_template_by_style() usage
It doesn't take the useless styling information but just uses options->default_style.
2007-08-28 21:28:03 +02:00
Petr Baudis
55495ab655 document: Turn options' default_fg, default_bg to default_style
...as struct text_style. This way it might be possible later to
add other default formatting attributes by CSS and it allows
quite a code simplification in the DOM renderer.
2007-08-28 21:16:44 +02:00
Petr Baudis
db9431465f document: Move text_style-related stuff to dedicated format.*
We will need to include it from options.h and the include chain just
wouldn't work. And it feels like a hack to have it in renderer.h anyway.
2007-08-28 21:05:00 +02:00
Petr Baudis
b66d2bec67 document: Unify text style -> screen attribute handling
Currently, all DOM, HTML and plain renderers had their own routine for
conversion from text style to screen attribute. This moves text_style and
text_style_format from html/parser.h to renderer.h and introduces new generic
routine get_screen_chracter_template() that is used by all the specific
rendering engines.
2007-08-28 21:02:08 +02:00
Petr Baudis
38ee8a137c document/dom/util.*: Make init_template() private 2007-08-28 20:32:15 +02:00
Petr Baudis
070d335796 document: struct format_attr -> struct text_style_format 2007-08-28 20:17:53 +02:00