2003-09-22  Radek Doulik  <rodo@ximian.com>

	* libgtkhtml.pc.in (Cflags): remove a11y lib reference

	* Makefile.am (libgtkhtml_3_0_la_LIBADD): link against a11y lib,
	use GAIL libs

2004-02-18  JP Rosevear <jpr@ximian.com>

	* Makefile.am: remove disable deprecated flags

2003-12-10  Yong Sun <Yong.Sun@sun.com>

	* htmlengine-edit-cursor.c: correct the calculation of 
	cursor's height
	
2003-11-20  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-text.c (upper_lower): use g_utf8 functions to
	lower/upper string

2003-10-15  Frederic Crozat  <fcrozat@mandrakesoft.com>

	* htmlobject.c: (handle_object_data):
	Close comment when saving object data, part 2 (bug #38589)

2003-10-14  Radek Doulik  <rodo@ximian.com>

	* htmlobject.c (select_range): select containers

	* htmlinterval.c (select_object): select range in containers

2003-10-14  Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
	
	* htmlclueflow.c (search_text): Fixes for supporting forward
	multibyte search, backward search and backward multibyte search.

	(search_set_info): -do-

2003-10-13  Frederic Crozat  <fcrozat@mandrakesoft.com>

	* htmlobject.c: (object_save_data):
	Close comment when saving object data (bug #38589).

2003-07-31  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit.c (html_engine_select_spell_word_editable): fix
	cittation

2003-09-19  Jeremy Katz  <katzj@redhat.com>

	* htmlengine.c (html_engine_get_type): Use GType instead of guint.
	* htmlengine.h: Likewise.

2003-09-05  Antonio Xu  <antonio.xu@sun.com>

	* gtkhtml.c (new_obj_from_uri): Use HTML_IS_PLAIN_PAINTER to judge
	html edit model, and use g_filename_from_uri to get the image file's
	real path, fix bug #47988 #47990.

2003-09-03  Dan Winship  <danw@ximian.com>

	* Makefile.am (testgtkhtml_LDFLAGS): Remove -static again

2003-09-01  Maxx Cao  <maxx.cao@sun.com>

	* htmltextslave.c (get_offset_for_pointer): add consideration for
	one-character text, fix bug #47676.

2003-08-15  Antonio Xu  <antonio.xu@sun.com>

	* htmlengine-edit-movement.c (html_engine_jump_at): add
	gtk_html_im_reset before html_engine_get_object_at, fix bug #47349.

2003-08-15  Antonio Xu  <antonio.xu@sun.com>

	* htmlengine-edit-cut-and-paste.c (insert_object_do): copy cursor
	instead of receate a new cursor, fix bug #45911.

2003-08-12  Antonio Xu  <antonio.xu@sun.com>

	* gtkhtml.c (new_obj_from_uri): Use pixbuf to judge what kind of
	image type being supported by gtkhtml, fix bug #47543.

2003-08-07  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (key_press_event): only reset the blinking cursor if
	we are editable.

2003-08-01  Radek Doulik  <rodo@ximian.com>

	* htmlobject.c (get_length): objects not accepting cursor have
	zero length

2003-07-28  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (get_tags): fix color check to save color attribute
	for blue text

2003-07-15  Radek Doulik  <rodo@ximian.com>

	* htmlprinter.c (alloc_font): fallback to 1st available font only
	when default fonts aren't available

2003-07-03  Radek Doulik  <rodo@ximian.com>

	* htmlobject.c (html_object_cursor_backward): allow offset == 0 if
	prev object doesn't accept cursor
	(move_object_downtree_cursor): skip cursor non-accepting objects

	* gtkhtml.c (key_press_event): reset blinking cursor if key was
	used

2003-07-07  Yuedong Du  <yuedong.du@sun.com>

        * gtkhtml.c (add_bindings): remove keybinding for Control+Tab/
        Shift+Control+Tab, fix bug #45825

2003-06-27  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_editor_event): initialize retval to NULL

2003-06-26  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (button_press_event): fix coordinates
	(shift_to_iframe_parent): ditto

2003-06-24  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_body): add helper functions to push/pop clue
	levels.
	(html_engine_finalize): unref the body background.  If the body
	stack isn't empty clear it.

2003-06-20  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (gtk_html_editor_event_command): unset the args.
	(gtk_html_editor_event): unset and free the return value.

	* htmlfontmanager.c: fix ref font refcounting problems.

	* htmlgdkpainter.c (unref_font): free the font description.

	* htmlmap.c (html_map_destroy): free the map structure as well.

	* htmlpainter.c (finalize): free the font_face.

	* htmlstyle.c (html_style_add_attribute): keep the correct ref
	count on the color.

	* htmltable.c (divide_into_percented_all): don't leak active.

2003-06-25  Radek Doulik  <rodo@ximian.com>

	* htmlgdkpainter.c (alloc_font): the face now contain family, not
	whole font name

	* htmlengine-print.c (print_with_header_footer): use
	gtk_html_set_fonts

	* gtkhtml.c (gtk_html_set_fonts): new helper function, sets fonts
	from style to painter's font manager, use families rather than
	complete description name for face
	(style_set): use gtk_html_set_fonts

2003-06-13  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_finalize): clear some of the various
	state tables.

2003-06-12  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (destroy): free base_url.

	* htmltable.c (destroy): free columnFixed array.

2003-06-10  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (style_set): free the var_name.
	(selection_get): don't leak the selection string.
	(finalize): free the body_stack.

2003-06-09  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_finalize): don't leak body_stack.

2003-05-21  Larry Ewing  <lewing@ximian.com>

	* libgtkhtml.pc.in (Version): set version correctly.

2003-05-20  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_resolve_image_url): unset oarg not iarg
	and dup the string.

	* gtkhtml.h: add prototypes.

	* htmlengine-edit-cut-and-paste.c (use_pictograms): use get_magic_smileys.
	(check_magic_link): use get_magic_links.

	* htmlengine-edit.c: use get_inline_spelling.

	* htmlclueflow.c: use get_inline_spelling.

	* gtkhtml.c (gtk_html_set_iframe_parent): use parents
	animate_setting.

        * htmlimage.c: add html_image_factory_get/set_animate and
	html_image_factory_start_animations.
	
        * htmlimage.h: add prototypes.	

	* gtkhtml.c: add gtk_html_get/set_animate.
	
	* gtkhtml.h: add prototypes.
	
	* htmlimage.c (draw_plain): fix the text position, add
	highlighting.

2003-05-19  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-enums.h: make the flags actually be flags.

2003-05-18  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_iframe): fix the margin calculations.

	* htmlframe.c: remove e_scroll_frame ifdef, set scrolled window
	frame type.

	* htmliframe.c: remove e_scroll_frame ifdef, set scrolled window
	frame type.

2003-05-19  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_update_event): set need_update flag
	when not realized
	(html_engine_realize): schedule update if need_update is TRUE
	(html_engine_get_language): make sure return value is non-NULL

2003-05-19  Larry Ewing  <lewing@ximian.com>

	* htmlurl.c: fix some of the url code to make testgtkhtml happier.

2003-05-16  Radek Doulik  <rodo@ximian.com>

	* htmlprinter.c (printer_get_page_width): don't convert value,
	it's not needed
	(printer_get_page_height): use gnome_print_config_get_page_size
	instead of deprecated gnome_print_job_get_page_size_from_config
	(BTW, the gnome_print_config_get_page_size calls this deprecated
	function, funny :)

	* testgtkhtml.c (print_preview_cb): as below
	(printer_get_page_width): ditto
	after discussion with danw I made margins be fixed value (.5")

	* htmlprinter.c (draw_text): descender is negative value in
	gnome2, code updated
	(calc_text_size): ditto
	(calc_text_size_bytes): ditto

	* htmlengine-print.c: remove SPACING_FACTOR - not needed and broken, 

	* htmlprinter.c (TEMP_MARGIN): increase margins a little bit (.5")
	and make them fixed size instead of percentage of width

2003-05-16  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (add_bindings): as below

	* keybindingsrc.emacs: don't use ISO_Left_Tab, Shift Tab is mapped
	to it

2003-05-13  Larry Ewing  <lewing@ximian.com>

	* htmlfontmanager.c (html_font_manager_set_default): clear both
	fonts if fixed font description changes so that if the fixed font
	changes but the variable does not the plain painter will still
	pick up the change.  See bug #41751.

2003-05-08  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (key_press_event): workaround about Shift-TAB
	problem. gtk activates TAB binding even for Shift-TAB. we don't
	call key_press_handler of parent class for Shift-TAB now to avoid
	TAB binding to be activated. I have sent mail to Owen meanwhile
	asking him to help with it on gtk side.

2003-05-07  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (button_press_event): pass event->time to
	gdk_pointer_grab instead of 0.
	(button_release_event): pass event->time instead of 0.

2003-05-06  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (drag_data_received): call move_before_paste only
	before first paste
	(drag_data_received): call gtk_drag_finish everytime with success
	set appropriately
	(drag_data_received): fix the len parameter in call to
	html_engine_paste_object

2003-05-02  Radek Doulik  <rodo@ximian.com>

	* htmlsearch.h: make start_pos and end_pos signed

	* htmlclueflow.c (search): handle containers in search, take care
	about start_pos

2003-05-02  Radek Doulik  <rodo@ximian.com>

	* htmlimage.c (html_image_factory_register): insert ip into loaded
	images table even if url == "" so we keep track of all ip's. this
	fixes the crash when inserting html src with image with "" url and
	also doesn't leak ip's

	* gtkhtml.c (gtk_html_set_default_content_type): remove unused
	variable

2003-05-01  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_thaw_idle_flush): actually remove the
	idle function when we thaw.

2003-05-01  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (calc_preferred_width): fix width calculation for
	TABS, it fixes the min_width calculation of PRE flows as PRE flows
	calculate theirs min width from child preffered width

2003-04-30  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_draw_real): clip the bounds with
	html_engine_intersection instead of the crop_iframe_to_parent.
	(html_engine_intersection): reorder the logic.

	* htmlobject.c (html_object_calc_abs_position): always take any
	frame offset into account when calculating the position of the
	object.

	* htmltext.c: remove extra space at beginning of file.

2003-04-29  Larry Ewing  <lewing@ximian.com>

	* htmltext.c (calc_word_width): walk the string in our own loop
	and use the offsets directly rather than calulating them from the
	pointer.
	(min_word_width_calc_tabs): only calc the tabs in the segment if
	we find a tab in the segment while walking it. 
	(html_text_magic_link): remove broken logic that was running the
	regex over and over and over.

	* htmltextslave.c (get_offset_for_pointer): don't do a linear
	search for the cursor position, measuring the strings is too
	expensive.
	(get_words_width): replace strchr with our own walking loops so
	that we don't have to walk the string twice.
	(get_offset_for_bounded_width): ditto.
	(hts_fit_line): same as above, and make the logic a little easier
	to read.
	(draw_highlighted): only do the measurments and drawing that is
	actually on screen and within this slave.

2003-04-23  Radek Doulik  <rodo@ximian.com>
	
	* htmltextslave.c (get_words_width): fix len calculation, we are
	incrementing the space now so we have to substract 1 here

	* htmlclueflow.c (layout_line): set current object y to let object
	know on what line it lives

2003-04-21  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (html_clueflow_get_line_offset): go forward
	instead of backward from head of line when calculating line offset

	* htmltext.c (html_text_text_line_length): modify line_offset only
	if != -1

2003-04-18  Radek Doulik  <rodo@ximian.com>
 
	* htmltext.c (min_word_width): renamed to express the
	functionality better
	(min_word_width_calc_tabs): renamed as well, fix the
	calculation. the minimal word width is the width of word idx (with
	optional non-breaking prefix) on begin of line

	* htmltextslave.c (get_words_width): locate the right word, do not
	stay at first space
	(get_words_width): don't substract tabs, they are already included
	in len and width has already one space width for each of them

2003-04-24  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_freeze): call gtk_html_im_reset when
	freezing (count == 0)

	* htmlcursor.c: call gtk_html_im_reset whenever we move cursor

	* gtkhtml.c (gtk_html_im_reset): new function, resets im context
	if need_im_reset is TRUE
	(key_press_event): call im context first, set need_im_reset

2003-04-23  Larry Ewing  <lewing@ximian.com>

	* htmlanchor.c (check_point): override the default check_point
	with one that always returns NULL.

2003-04-16  Larry Ewing  <lewing@ximian.com>

	* htmlembedded.c (copy): comment out debug wanring.

	* htmltextarea.c (copy): comment out debug warning.

	* htmlselect.c (copy): comment out debug warning.

	* htmltextinput.c (copy): comment out debug warning.

	* htmlimage.c (html_image_pointer_queue_animation): only queue the
	animation if one hasn't already been queued.
	(html_image_pointer_run_animation): clear the timeout source.

	* htmlstyle.c (html_style_free): actually free the style.

	* gtkhtml-properties.c (gtk_html_class_properties_new): don't dup
	the name string, and don't alloc an uneeded font description.

	* gtkhtml.c (style_set): free the name string, and don't alloc an
	uneeded font description.
	(gtk_html_set_default_content_type): use g_ascii_strdown
	correctly.

2003-04-15  Larry Ewing  <lewing@ximian.com>

	* htmldrawqueue.c (clear): clip the cleared area to the visible
	area.

	* htmliframe.c (calc_size): let the engine know what size we
	decided it was (for later clipping).

	* htmlengine.c (html_engine_intersection): clip to the top iframe
	always.
	(html_engine_get_viewport): simple helper function.

2003-04-14  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (thaw_idle): fix the area passed to the cleanup
	function.
	(clear_changed_area): pass the correct extents to
	::draw_background.
	
	* htmldrawqueue.c (clear): pass the correct extents to
	draw_background.
	(draw_obj): the same.

2003-04-14  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_stream_end): set newPage to false to
	avoid the cursor jumping to home
	(html_engine_set_editable): ditto

2003-04-09  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_finalize): remove any pending
	redraw_idle functions;

	* gtkhtml.c (client_notify_widget): remove spell color cruft.

	* gtkhtml-properties.c: remove unused members.

	* gtkhtml-properties.h: remove usless members.

2003-04-09  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_init): set language to NULL
	(html_engine_get_language): new method

	* gtkhtml.c (command): use html_engine_get_language
	(gtk_html_api_set_language): ditto

	* gtkhtml-properties.c (gtk_html_class_properties_new): use
	e_iconv_locale_language as default language

2003-04-09  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (style_set): move font setting logic to here, don't
	use the properties setting (styles are per instance).
	(client_notify_widget): remove all the color and font setting
	logic to use per setting styles.
	(gtk_html_set_default_background): removed old broken function.

	* gtkhtml.h: remove prototype of set_default_background.
	
2003-04-08  Larry Ewing  <lewing@ximian.com>

	* htmlgdkpainter.c (alloc_font): don't force monospace fonts to be
	"Monospace" family, this ruins style settings for fixed_font_name.

	* htmlcolorset.c (html_colorset_set_style): make the default
	parsing logic slightly more robust.

2003-04-08  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (set_painter): new method, reset indent_width

	* gtkhtml.c (get_line_height): calc the line height again, was
	disabled during porting

2003-04-08  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-propmanager.h: fix object and class types.

	* gtkhtml-properties.c (gtk_html_class_properties_new): NULL
	protect the widget parameter.

	* gtkhtml.c (style_set): rework the logic to read the style
	property.

	* htmlengine-save.c (html_engine_save_string_append_nonbsp): add
	const.

2003-04-08  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (add_bindings): removed C-space, put it into emacs
	bindings so that Chinese SCIM could catch C-space

	* htmltext.c (get_glyphs): shape only when item->length > 0
	(html_text_op_cut_helper): destroy items when cutting part of text

2003-04-08  Larry Ewing  <lewing@ximian.com>

	* htmlgdkpainter.c (alloc_font): make sure that we end up with a
	valid font description. Fixes #40898.

	* htmlimage.c (html_image_factory_get_missing): helper function to
	load the gtkstock missing image item.
	(draw): add logic to draw missing image icon.

2003-04-07  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (style_set): pass the widget instead of the style.

	* htmlcolorset.h: fixup prototype.

	* htmlcolorset.c (html_colorset_set_style): retrieve the color of
	the links and spell error from the style properties.h

2003-04-07  Radek Doulik  <rodo@ximian.com>

	* keybindingsrc.emacs: change Home/End bindings

2003-04-07  Larry Ewing  <lewing@ximian.com>

	* htmltext.c (append_selection_string): use the new helper, this
	is the chosen solution to 37172.
	
	* htmlclueflow.c (save_plain): use the new helper function.

	* htmlengine-save.c (html_engine_save_string_append_nonbsp): add
	helper function.

2003-04-07  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (delete_object): test for active
	selection after selection update

2003-04-04  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_factory_unregister): make sure we always
	clear the factory when we are removed from it, ad guard against
	double removal.  Fixes Ximian #40627

2003-04-03  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (selection_received): add UTF8_STRING dnd support.

	* htmlengine.c: don't try to create image inputs with no src url.

2003-04-03  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_set_paragraph_style): if selection is
	active, change style everytime
	(scroll_timeout_cb): don't clamp coordinates if we are already at
	the boundaries

	* htmlengine-edit-cut-and-paste.c (delete_object): update
	selection after cursor/mark move

2003-04-03  Not Zed  <NotZed@Ximian.com>

	** for bug 40450, based on patch from <philip.zhao@sun.com>

	* htmltextslave.c (html_text_slave_nb_width)
	(html_text_slave_remove_leading_space): Remove inline keyword on
	non-static methods.

	* htmlobject.c (html_object_engine_translation): change the //
	comment to a /* comment, // not supported by ansi c.
	(html_object_next_leaf, html_object_prev_leaf,
	html_object_next_cursor, html_object_prev_cursor): Remove inline
	keyword on non-static methods.

2003-04-02  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-propmanager.c (gtk_html_propmanager_get_type): start
	porting to gobject.

2003-04-02  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (html_engine_delete): fix cursor
	position afterwards

	* gtkhtml.c (gtk_html_im_delete_surrounding_cb): fix cursor
	movement, return to original position if possible
	(key_press_event): call gtk_im_context_filter_keypress only when
	binding not handled
	(key_release_event): ditto

2003-04-02  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c: be more careful about zeroing some of the timeouts.

2003-04-01  Larry Ewing  <lewing@ximian.com>

	* htmlengine-edit-cursor.c (html_engine_draw_cursor_in_area):
	update the im_context cursor location as it moves.

2003-04-01  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (hts_fit_line): fix breaking

	* htmlclueflow.c (layout_line): don't force objects to go to next
	line once we reach right margin

	* htmltext.c (calc_min_width): fix one-word texts, update
	surrounding text objects

2003-03-31  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (word_width): fixed for tabs

	* htmltextslave.c (get_words_width): fixed for tabs

	* gtkhtml.c: load emacs keybindings, use them if gconf value of
	/desktop/gnome/interface/gtk_key_theme is Emacs

	* Makefile.am (keybindings_DATA): install keybindings.emacs again

2003-03-27  Larry Ewing  <lewing@ximian.com>

	* Makefile.am (AM_CFLAGS): use AM_CFLAGS instead of CFLAGS
	reformat includes.

2003-03-27  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_get_spell_word): fix move to the
	beginning of a word

	* htmlclueflow.c (end_of_word): fix the logic for citation so
	couldn't is one word and not two

2003-03-26  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (draw_spell_errors): as below

	* htmltext.c (html_text_text_line_length): take care about line
	offset -1 (notabs)

2003-03-25  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.h (struct _GtkHTMLEditorAPI): added language argument to
	add_to_personal

2003-03-24  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (html_text_magic_link): avoid uninitialized uc use

	* htmlengine-edit-tablecell.c (move_cell_rd): remember the removed cell

	* gtkhtml.c: declare get/set property inside USE_PROPS #idef block

2003-03-23  Larry Ewing  <lewing@ximian.com>

	* htmlfontmanager.c (get_font_num): make get_font_num more robust
	against invalid styles just in case.

2003-03-20  Larry Ewing  <lewing@ximian.com>

	* htmltextslave.c: remove unused variables.

	* htmltext.c: remove unused variables.

2003-03-19  Larry Ewing  <lewing@ximian.com>

	* htmliframe.c (check_point): fix the point calculation for
	iframes.

2003-03-18  Larry Ewing  <lewing@ximian.com>

	* htmlprinter.c (draw_text): add return value.

	* htmlpainter.c: add missing include.

	* htmlimage.c (html_image_pointer_run_animation): remove unused
	variables.

	* htmlgdkpainter.c (draw_spell_error): remove unsued variable, add
	a return value.

	* htmltable.h (html_table_end_table): add prototype.

	* htmlengine-edit-tablecell.c: remove debug printfs
	(move_cell_rd_undo_free): add a return type.

	* gtkhtml-properties.c (gtk_html_class_properties_new): warning
	cleanups.

	* htmlclueflow.c (calc_size): warning cleanups.

2003-03-18  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (realize): call gtk_im_context_set_client_window
	(unrealize): ditto
	(gtk_html_init): connect new im callbacks

	* Makefile.am: removed gtkhtml-im.[ch]

	* gtkhtml.c (key_press_event): use im context
	(key_release_event): handle this event
	(focus_in_event): use im context
	(focus_out_event): ditto

2003-03-17  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (html_clueflow_get_line_offset): pass line_offset
	to html_text_text_line_length

	* htmltextslave.c (html_get_glyphs_non_tab): make this function
	public

	* htmlgdkpainter.c
	(html_gdk_painter_text_itemize_and_prepare_glyphs): don't count
	tab width

2003-03-14  Radek Doulik  <rodo@ximian.com>

	* htmlgdkpainter.c (draw_spell_error): use shift_items

	* htmlplainpainter.c (draw_text): use shift_items

2003-03-13  Larry Ewing  <lewing@ximian.com>

	* htmliframe.c (check_point): remove incorrect addition of margins
	in point calculation.

2003-03-12  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (html_text_text_line_length): fix line_offset
	calculation

	* htmltextslave.c (html_text_slave_get_line_offset): removed
	line_offset parameter, updated all callers

	* htmlclueflow.c (html_clueflow_get_line_offset): don't allow head
	to be set to NULL

	* htmltextslave.c (calc_width): fix width calculation for tabs

2003-03-11  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (get_glyphs_base_text): return glyphs

	* htmlprinter.c (draw_text): fix print_y position

2003-03-10  Larry Ewing  <lewing@ximian.com>

	* htmlprinter.c (print_pixbuf): add a helper function to print
	pixbufs now that gnome print no longer has a print_pixbuf call.

2003-03-09  Larry Ewing  <lewing@ximian.com>

	* htmltextslave.c (get_glyphs_part): fix the check for itmems.

2003-03-08  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_timer_event): flush the update timers
	before removing them.

2003-03-07  Radek Doulik  <rodo@ximian.com>

	* Makefile.am (CFLAGS): add -@GTKHTML_RELEASE@ to ICONDIR

2003-03-05  Larry Ewing  <lewing@ximian.com>

	* Makefile.am (uninstall-hook): add unistall-hook to remove
	renamed .pc file.

2003-03-04  Larry Ewing  <lewing@ximian.com>

	* htmltext.c (get_glyphs): use item->offset rather than adding
	lengths to find the current position.

2003-03-04  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_make_cursor_visible): let's keep
	cursor inside borders

	* gtkhtml.c (command): make SCROLL and FOCUS commands work just
	for non editable mode, let SCROLL commands set binding_handled so
	key are not propagated to parent's scrollbars

	* htmltext.c (html_text_request_word_width): destroy cached items
	when HTML_CHANGE_WORD_WIDTH

2003-03-03  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (draw_spell_errors): use items cache
	(draw_normal): use get_glyphs_part if posStart > 0

	* htmlgdkpainter.c (draw_spell_error): fixed spell errors drawing

	* htmltext.c (text_len): change passed string instead of
	text->text, update all callers, fixes #38964

2003-03-02  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_thaw_idle_flush): change idle_reset to
	idle_flush so that we always thaw the changes.

2003-02-28  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_resolve_image_url): fix the GValue usage.

	* htmlclueflow.c (copy): actually commit the copy fix.

	* htmlengine.c: turn off debug log that accidenetally got turned on.

	* gtkhtml.c (gtk_html_api_set_language): change assertion to check.

2003-02-27  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (end_of_word): make sure we check for the end of
	the buffer.

	* htmltokenizer.c (add_unichar_validated): new helper function to
	checkvalidity of unichar before adding it to the stream.
	(in_entity): use add_unichar_validated here to make sure that
	invalid entity references don't corrupt the utf8 stream.

2003-02-27  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (text_len): replace invalid utf8 with [?]

	* htmltokenizer.c (in_entity): extend the max length of number to
	10 digits (0xffffffff = 4294967295)

	* htmltext.c (forward_get_nb_width): reverse prev/next to avoid
	infinite loops in broken html documents (where empty text objects
	are created)

2003-02-25  Larry Ewing  <lewing@ximian.com>

	* htmlpainter.c: remove h_utf8*

	* htmltext.c: same.

	* htmltextslave.c: same.

2003-02-24  Larry Ewing  <lewing@ximian.com>

	* htmlgdkpainter.c (draw_pixmap): remove helper function.

	* gtkhtml.c: add a couple more properties.

	* htmlclueflow.c (relayout): add engine offsets to the draw call.

2003-02-24  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-properties.c (gtk_html_class_properties_new): don't free
	fixed_name, it's stored in p

	* gtkhtml.c: don't use keybindings_theme, hardcode keybindings as
	gtk does (they could be changed in gtkrc file)

	* gtkhtml-properties.c: removed keybindings_theme

	* Makefile.am: removed keybindingsrc.* files parts

2003-02-23  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c: stub in some gobject property code.

	* gtkhtml-properties.c (gtk_html_class_properties_new): read the
	settings from from the style.

	* gtkhtml.c (gtk_html_class_init): add style properties for colors
	and fixed font.

2003-02-21  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c: refactor animation drawing, remove broken
	HTMLImageAnimation structure, fix drawing while scrolling.
	
	* gtkhtml.c (gtk_html_begin_full): pass priv->content_type if the
	arg is NULL.

2003-02-20  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c: correct the drawing region for the offsets.

2003-02-20  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (set_fonts_idle): don't set font's in iframe, parent
	gtkhtml takes care of it

	* htmltext.c (html_utf8_strnchr): new helper function
	(html_text_text_line_length): use own html_utf8_strnchr, this
	increases speed really dramatically ;-)

	* gtkhtml.c (style_set): don't set fonts in idle time, but right
	now, this avoids recalculating whole document (after content is
	loaded)

	* htmltext.c (html_text_text_line_length): modify line_offset
	parameter
	(translated_len): new helper function
	(calc_word_width): correct offsets fot tabs

	* htmlpainter.c (html_painter_translate_text): dereference
	line_offset

	* htmltext.c (get_glyphs): translate special characters

2003-02-19  Radek Doulik  <rodo@ximian.com>

	* htmlplainpainter.c (draw_text): prepare temporary items and
	glyphs when needed

	* htmltextslave.c (get_glyphs_part): translate text before shaping
	(get_glyphs): ditto

	* htmlpainter.c (html_painter_translate_text): new function,
	exports painter text translation
	(calc_translated_text_bytes): return bytes length instead of delta
	(html_painter_calc_text_size): use bytes return value from
	calc_translated_text_bytes, this saves us one walk thru the whole
	text, removed unnecessary (forgotten?) second call to
	calc_translated_text_bytes
	(html_painter_draw_text): use bytes instead of delta as above

2003-02-18  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (calc_word_width): use cached items only for non
	empty texts to make pango shape happy

	* htmltextslave.c (calc_width): use cached items and glyphs

	* htmltext.c (calc_word_width): use cached items and call shape
	just once
	(html_text_get_items): return items just for gdk and plain painter
	so printing works right again

	* htmltextslave.c (get_items): use html_text_get_items
	(draw_highlighted): use cached items and glyphs

	* htmlengine.c (parse_i): don't pass possibly uninitialized memory
	to tokenizer

2003-02-07  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (draw_quotes): move the plain painter check out
	of the loop.

2003-02-05  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_f): no pending para for forms.

	* htmlclueflow.c: use new painter methods that cache the indent
	widths.
	
	* htmlfontmanager.h: add cache for indent memebers.

	* htmlfontmanger.c: add cache members to html_font_new.

	* htmlpainter.h: add accessors for indent caches.

	* htmlpainter.c: add accessors for indent caches.

	* htmlgdkpainter.c: calc widths of block indents.

	* htmlprinter.c: calc widths of block indents.
	
2003-02-04  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (get_indent): cache the indent level since this
	gets called a lot.

	* htmlclueflow.h: add indent_width member.

2003-01-29  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cursor.c (html_engine_draw_cursor_in_area):
	updated for changed coordinates

2003-01-28  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-properties.c (gtk_html_class_properties_new): get
	default print font faces from style

	* htmlprinter.c (alloc_font): remove workaround for old gimp print

2003-01-22  Radek Doulik  <rodo@ximian.com>

	* testgtkhtml.c (print_preview_cb): close print job before
	creating preview

2003-01-21  Larry Ewing  <lewing@ximian.com>

	* htmltextslave.c (hts_fit_line): make sure we never call strchr
	on a NULL string.  This tends to happen if two consecutive spaces
	enter the token stream.

2003-01-18  Larry Ewing  <lewing@ximian.com>

	* htmlselect.c (html_select_set_text): make sure we have a longest
	string.

2003-01-17  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (style_set): get the new size when the style changes.

	* gtkhtml-properties.c: disable gconf for the font settings use
	the style values instead.

2003-01-16  Larry Ewing  <lewing@ximian.com>

	* htmltablecell.c (draw_background_helper): don't poke into the
	table for the background, tables draw their own background now.

	* htmltable.c (draw_background_helper): draw table backgrounds the
	way mozilla does.

	* gtkhtml.c (gtk_html_set_magnification): only try to change the
	clue if it exists.

2003-01-15  Larry Ewing  <lewing@ximian.com>

	* htmlgdkpainter.c (html_gdk_painter_new): initialize the style.
	(alloc_font): use the style as a fallback, use
	pango_font_description_from_string to get the font description.

	* gtkhtml.c (style_set): update the font when the style changes.

	* gtkhtml-properties.c (gtk_html_class_properties_new): use the
	style font description.

2003-01-15  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_draw_real): set Engine::expose
	(html_engine_add_expose): added expose parameter, use struct
	HTMLEngineExpose to store expose parameter as well

	* htmlembedded.c (draw): queue widget draw only when we aren't
	drawing on expose event request because it's already handled in
	gtk_container code and was causing infinite loops

	* gtkhtml.c (expose): use html_engine_expose

	* htmlengine.c (html_engine_expose): new function, used from
	expose event handler

2003-01-14  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (key_press_event): paste text only when event->length > 0

2003-01-13  Larry Ewing  <lewing@ximian.com>

	* htmlengine-edit-table.c (html_engine_goto_table): pass arguments
	not prototypes.

2002-12-16  Larry Ewing  <lewing@ximian.com>

	* htmlshape.c: fix parsing of negative numbers.

	* htmlstyle.h: add prototypes. 

	* htmlstyle.c (html_style_add_background_image): add background
	iumage property.
	(html_style_add_background_color): add background color property.

2002-12-14  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_factory_register): make sure we add an
	aimation to the image.

2002-12-13  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cursor.c (draw_cursor_rectangle): fix color
	allocation

2002-12-10  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-tablecell.c (expand_rspan): move remaining cells
	(expand_cspan): ditto
	(move_cell_rd): helper function, move cell right/down

2002-12-06  Larry Ewing  <lewing@ximian.com>

	* htmlengine-edit-table.h (html_table_insert_column): fix the insert
	row/column prototypes so that gtkhtml builds again.

2002-12-06  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-table.c (html_table_insert_column): make it work
	with rspan/cspan
	(html_table_insert_row): ditto

2002-12-05  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_editor_event_command): init GValue before
	use

	* htmlimage.c (html_image_resolve_image_url): init GValue before
	use

	* htmlengine-edit-tablecell.c (html_engine_set_cspan): new method
	(html_engine_set_rspan): ditto, TODO
	(expand_cspan): ditto, not finished yet
	(collapse_cspan): ditto, TODO

	* htmlengine-edit-table.c (html_table_insert_column): renamed, now
	is public
	(html_table_insert_row): ditto

	* htmltablecell.c (html_table_cell_is_empty): new method, moved
	from htmltable.c, it's now public

	* htmlengine-edit-cut-and-paste.c (html_engine_delete):
	reimplemented, make it work better with tables

2002-12-02  Radek Doulik  <rodo@ximian.com>

	* htmlimage.c (move_image_pointers): emit url requested signal, so
	moved image pointers are loaded

2002-11-27  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (button_press_event): return TRUE so we could
	g_connect_after in control

2002-11-26  Larry Ewing  <lewing@ximian.com>

	* htmltablecell.c (draw_background_helper): don't try to get a
	pixbuf from a NULL animation.

	* gtkhtml.c (gtk_html_insert_html_generic): re-add the form
	pasting fix tht seems to have been lost somewhere..

2002-11-26  Not Zed  <NotZed@Ximian.com>

	* htmlembedded.c (draw): Dont do a queue_redraw if we're ever
	asked to draw.  Hack-fix to stop evolution-mail hanging so often.
	Added FIXME about it.

2002-11-21  Radek Doulik  <rodo@ximian.com>

	* htmlplainpainter.c (draw_text): use lower level pango iface

	* htmlgdkpainter.c
	(html_gdk_painter_text_itemize_and_prepare_glyphs): exported

	* htmltextslave.c (get_words_width): make sure we don't read
	word_width [-1]

	* htmlclueflow.c (object_nb_width): fixed typo, use
	html_text_slave_get_nb_width instead of html_text_slave_nb_width

2002-11-20  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_i): parse style args.

	* htmlstyle.c: add missing includes.

	* htmlstyle.h: add missing prototypes.

	* htmllinktext.c (get_font_style): stop forcing an underline.

	* htmlengine.c: change push_span to push_element. Make current_*
	skip elements with no style set.  Make elements that restore
	alignment use the e->divAlign not pAlign and clear pAlign whenever
	we push a block.
	(parse_a): parse style attribute on a element.
	(parse_b): parse style attribute on b element.
	(parse_h): pop ID_HEADER blocks before starting a new header.
	
	* htmlstyle.c: added.  Moves the style setting logic into a
	separate file. Add demonstration parser for style attributes (a
	real parser will come later).

	* htmlstyle.h: added.

	* Makefile.am: add htmlstyle.[ch]

2002-11-19  Not Zed  <NotZed@Ximian.com>

	* htmlclosures.list: BOOL:POINTER -> BOOL:OBJECT
	removed VOID:POINTER,POINTER
	VOID:POINTER,POINTER,POINTER -> VOID:STRING,STRING,STRING

	* htmlengine.c (html_engine_class_init): change
	marshal_BOOL_POINTER -> BOOL__OBJECT for object_requested signal.
	(html_engine_class_init): submit -> STRING_STRING_STRING.

	* gtkhtml.c (gtk_html_class_init): change marshal_BOOL__POINTER ->
	BOOL__OBJECT for object_requested.   Also changed marshaller for
	iframe_created signal to be VOID__OBJECT.
	(gtk_html_class_init): url_requested -> STRING__POINTER.
	(gtk_html_class_init): submit -> STRING_STRING_STRING

2002-11-18  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_body): pop things off the body stack in the
	proper order.
	(check_prev): make sure we make a new linktext if the url is
	different.

2002-11-18  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c: Merge the various text styles into a span style
	and fix the current_* functions to pull the values from there.
	This fixes some obscure style bugs and cleans up the code a lot.

	* htmlenging.h: remove a bunch of unused stacks and variables.

2002-11-17  Chris Toshok  <toshok@ximian.com>

	* gtkhtml.c (gtk_html_set_iframe_parent): remove extra 0 from
	g_signal_emit.

2002-11-15  Radek Doulik  <rodo@ximian.com>

	* Makefile.am: generate htmlmarshal.[ch] from htmlclosures.list by
	glib-genmarshal

	* htmlclosures.list: new file

2002-11-14  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_command): fix GEnumClass retrieval

2002-11-13  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_factory_register): small cleanups for
	new stream logic.

	* gtkhtml-enums.h: add begin types enum.

	* gtkhtml.h: begine to move some items into a group that we can
	hopefully remove.

	* gtkhtml.c (gtk_html_begin_full): add the start of a replacement
	for gtk_html_begin_content.

2002-11-13  Not Zed  <NotZed@Ximian.com>

	* htmltokenizer.h: Use g object cast checks, not gtk object ones.

2002-11-11  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (idle_handler): flush the draw queue before we scroll
	to reduce drawing artifacts

2002-11-11  Radek Doulik  <rodo@ximian.com>

	* htmlgdkpainter.c (draw_text): fixed
	GTK_HTML_FONT_STYLE_STRIKEOUT

2002-11-07  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_o): free the value.

	* htmlselect.c (html_select_set_text): free the placeholder before
	we overwrite it.

	* htmlgdkpainter.c (draw_text): free the glyphs and items we
	create.

2002-11-07  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (calc_word_width): calc ascent/descent for empty
	texts

2002-11-07  Larry Ewing  <lewing@ximian.com>

	* htmlselect.c (html_select_set_text): clear the requisition size
	whenever we add a string.

	* htmltextinput.c: fix the requested width calculation.

2002-11-06  Radek Doulik  <rodo@ximian.com>

	* htmlgdkpainter.c: use lower level pango iface

	* libgtkhtml.pc.in (gtkhtml_datadir): added gtkhtml_datadir
	(NotZed)

2002-11-05  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (selection_received): pad citations with a <br> to
	avoid agressive merging.

	* htmlobject.c: remove html_object_calc_intersection and replace
	with html_object_intersect that uses GdkRectangle.

	* htmlobject.h: fix prototypes.
	
	* htmlimage.c: replace ArtIRect with GdkRectangle.

	* htmltable.c: replace ArtIRect with GdkRectangle.

	* htmltablecell.c: replace ArtIRect with GdkRectangle.

	* htmltextslave.c: replace ArtIRect with GdkRectangle.

	* htmlframe.c: replace ArtIRect with GdkRectangle.

	* htmlframeset.c: replace ArtIRect with GdkRectangle.

	* htmliframe.c: replace ArtIRect with GdkRectangle.

	* htmlplainpainter.c: replace ArtIRect with GdkRectangle.

2002-11-05  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (draw): protect the draw function from images that
	are not loaded.

	* htmlclueflow.c (draw_quotes): fix printing.

	* htmlgdkpainter.c (draw_background): use GdkRectangles instead of
	ArtIRects, support full alpha on table and body bg images.
	(draw_pixmap): use GdkRectangles.

	* htmlclueflow.c (draw_quotes): use GdkRectangles.

2002-11-05  Radek Doulik  <rodo@ximian.com>

	* htmlframe.c (frame_submit): use g_signal_emit_by_name
	(frame_object_requested): ditto
	(calc_size): use set_size_request
	(html_frame_set_size): ditto
	(html_frame_init): ditto

	* htmliframe.c (iframe_object_requested): use
	g_signal_emit_by_name
	(calc_size): use set_size_request
	(html_iframe_init): ditto

	* htmltextinput.c (html_text_input_key_pressed): use
	g_signal_stop_emission_by_name
	(html_text_input_init): use set_size_request

	* htmltextarea.c (html_textarea_init): use set_size_request

	* htmlselect.c (html_select_init): use set_size_request
	(html_select_init): ditto
	(html_select_init): use gtk_editable_set_editable
	(html_select_set_text): use set_size_request
	(html_select_set_text): ditto

	* htmlprinter.c (draw_embedded): use g_signal_emit_by_name
	(ref_font): use g_object_ref
	(unref_font): use g_object_unref
	(html_printer_new): use g_object_ref

	* htmlobject.c (html_object_set_data): don't use
	g_quark_from_string, it's already used in g_datalist_set_data_full
	macro

	* htmlfontmanager.c (manager_alloc_font): removed
	get_name_from_face, simplified

	* htmlgdkpainter.c (draw_embedded): use g_signal_emit_by_name

	* htmlengine.c (update_embedded): use g_object_get_data

	* htmlengine-print.c (print_with_header_footer): use g_object_ref

	* gtkhtml-embedded.c (gtk_html_embedded_new): use set_size_request
	instead of deprecated set_usize
	(gtk_html_embedded_changed): use g_signal_emit
	(gtk_html_embedded_new): use g_object_new

	* testgtkhtml.c: ported from 1.2 version

	* Makefile.am: reenabled testgtkhtml

2002-11-04  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (draw_item): fix the x position of the bullet.

2002-10-10  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (check_flows): set style just
	when needed (beginning flow will end empty so it should get style
	from last one)

	* htmlclueflow.c (op_cut): update item numbers only on cut
	boundaries
	(merge): removed style copying as it is no more needed

	* htmlengine-edit-clueflowstyle.c (undo_or_redo): set style before
	item_type so item_numbers will be updated right

2002-10-08  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (parse_l): set flow item color

	* htmlclueflow.c (destroy): unref color
	(html_clueflow_init): set item_color to NULL
	(html_clueflow_set_item_color): new method for setting item_color
	(draw_item): use item color
	(html_clueflow_style_equals): new method compares two flows,
	returns TRUE if they have the same style

	* htmlclueflow.h: added item_color

	* htmlgdkpainter.c (font_name_substitute_attr): removed asserts,
	could return NULL, name could be NULL as well
	(e_font_from_face): handle NULL from substitute

	* htmlengine-edit.c (html_engine_indent_paragraph): renamed, allow
	indentation of non PRE paragraphs as well
	(go_to_begin_of_para): take care of table boundaries
	(html_engine_indent_paragraph): ditto

2002-09-19  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (get_pre_padding): don't add pre padding for
	non-items flows following items with the same level
	(write_flow_tag): add <BR> for non-item flows following items with
	the same level

2002-11-03  Larry Ewing  <lewing@ximian.com>

	* htmlgdkpainter.c (draw_pixmap): fix coloring logic.
	(create_temporary_pixbuf): clear the pixbuf before we use it.

	* htmlimage.c (html_image_factory_types): add disabled code to use
	gtk-pixbuf features in gtk+-2.2

	* htmltext.c (append_selection_string): use g_string_function that
	exists now.

	* htmlgdkpainter.c (draw_pixmap): remove a bunch of code now that
	gdk can do real alpha blending.
	(html_gdk_painter_realize): use html_painter_alloc_color instead
	of doing ourselves.
	(alloc_color): get the color from the gdkrgb color cube, don't try
	to alloc it ourselves.
	(free_color): don't need to do anything here now.  The color code
	can be vastly simplified now with the new interfaces but we should
	do a step by step refactoring and this is the first step.

	* htmlimage.c: move the timeout into the image_pointer so that we
	only queue one per url, refactor start, stop and timeout functions
	for the new logic.
	(html_image_pointer_run_animation): don't try to draw images
	without animations (happens in c&p images).

	* htmlimage.h: move animation timeout from HTMLImage to
	HTMLImagePointer.

2002-11-03  Larry Ewing  <lewing@ximian.com>

	* htmlimage.h: remove pixbuf argument from HTMLImagePointer, we
	use animations for holding everything now.  Add an iter structure.

	* htmlimage.c: add initial support for animations back into html
	image.

	* htmltablecell.c (draw_background_helper): use animation
	structure now.

	* htmlengine.c (html_engine_draw_background): use animation
	structure now.

2002-11-02  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (ucs2_order): fix the names of UCS-2BE and UCS-2LE,
	and captialize the rest for fun.
	(selection_get): use the new gtk functions to convert strings
	for selections and clean up logic.
	(selection_received): use the new gtk functions to handle charset
	conversion and clean up logic.
	(scroll_timeout_cb): add the offsets.
	(motion_notify_event): remove the offsets.
	(button_release_event): remove the offsets.

	* htmlfontmanager.c (get_name_from_face): disable all the logic
	here.  Rodo, can you look at this, is it still needed?

	* gtkhtml.c (selection_received): protect ouselves from failed
	conversions.

2002-10-28  Larry Ewing  <lewing@ximian.com>

	* htmlselect.c (html_select_set_text): only measure the string if
	there is one.

	* htmliframe.c (check_page_split): Initialize the engine from the
	the proper pointer.

	* htmlfontmanager.c (html_font_manager_set_default): add header to
	silence warning.

	* htmlgdkpainter.c (find_font_with_similar_size): silence
	warnings.
	
	* htmlclueflow.c (update_line_positions): silence warning.

2002-10-27  Larry Ewing  <lewing@ximian.com>

	* htmlgdkpainter.c (e_font_from_face): use helper function to
	lookup fonts in the fontset and build a new fontset.
	(e_font_lookup_face): helper function that handles the font
	lookup.

	* htmltable.c (check_point): return with warning if we haven't had
	calc_size called yet.

2002-10-25  Larry Ewing  <lewing@ximian.com>

	* keybindingsrc.ms: remove C-s binding for strikethrough.

	* htmlclueflow.c (draw_quotes): use draw_gt_line to fill draw >s
	along the edge of the flow.  Fixes #29570.
	(draw_gt_line): helper function.

2002-10-23  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (need_blockquote_padding): add new helper
	function to sort out the level padding issue.

2002-10-25  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (button_release_event): don't clear in_selection until
	we are done with it.

2002-10-18  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (parse_p): <p>, </p> create new flows here to have
	right flow attributes
	(html_engine_init): init avoid_para to FALSE so <p>abc is rendered
	right
	(html_engine_parse): ditto

2002-10-17  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c: set pending_para to FALSE
	call close_flow as well
	(parse_o): use finish_flow in <ol>
	(parse_u): use finish_flow in <ul>

2002-10-16  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (parse_b): use finish_flow instead of close_flow to
	avoid unwanted empty flows

2002-10-11  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (fix_last_clueflow): renamed from
	ensure_last_clueflow, discard last flow if empty
	(parse_u): close flow and add new empty one on </ul>
	(parse_o): as above for </ol>
	(parse_body): discard last flow if empty

2002-10-16  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c: (parse_body): save & restore e->pending_para and
	e->avoid_para
	(parse_c): close flow only if non empty, otherwise just set its
	halign
	(parse_f): don't set pending para on <form>, just close flow if
	non empty
	(parse_table): don't add pending paragraph on end of cells
	(form_begin): new extracted function
	(form_end): ditto
	(parse_i): if form is NULL create new default form around to at
	least render it (as mozilla does)

2002-10-04  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_get_paragraph_indentation): new method,
	exports engine functionality

2002-10-04  Radek Doulik  <rodo@ximian.com>

	* htmlcluev.c (draw): fixed calculation of x,y for aligned objects
	drawing

2002-10-03  Radek Doulik  <rodo@ximian.com>

	* testgtkhtml.c (goto_url): set base before loading

2002-10-07  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (get_offset_for_pointer): fix for utf8, start on
	right beginning of slave (Larry)

	* htmltext.c (get_cursor_base): check for offset > slave->posStart
	(get_cursor_base): move to next text only if it doesn't start with
	' '
	(get_cursor): ditto

	* htmltable.c (html_table_end_table): return number of cells in
	table

	* htmlengine.c (parse_table): check if table has any cell after
	html_table_end_table

2002-10-01  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (get_offset_for_pointer): fixed offset
	computation, use utf8 functions instead of using byte positions

2002-09-30  Radek Doulik  <rodo@ximian.com>

	* htmlprinter.c (draw_text): removed unused local variable

	* htmlengine.c (update_embedded): removed unused local variable

	* gtkhtml.c (gtk_html_insert_html_generic): check tmp formlist
	instead of html one

2002-09-24  Radek Doulik  <rodo@ximian.com>

	* htmlobject.c (move_object_cursor): continue move to next in case
	we can't find any leaf accepting cursor. this fixes cursor
	navigation in documents containing empty iframes

	* htmltextslave.c (get_offset_for_pointer): check for space to be
	!= NULL

	* htmlclueflow.c (layout_line): do not wrap in PRE paragraphs

	* gtkhtml.c (load_keybindings): removed Esc bindinding

2002-09-20  Radek Doulik  <rodo@ximian.com>

	* htmltablecell.c (save): check for self->parent

2002-09-19  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_draw_real): crop iframes to avoid
	whole iframes drawing
	(update_embedded): crop iframe size here as well

2002-09-18  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (calc_size): split just long words

2002-09-18  Radek Doulik  <rodo@ximian.com>

	* htmlprinter.c (draw_text): use gnome_print_show_sized

	* htmltext.c (get_tags): write opening tags for next text to
	closing tags of this one
	(get_tags): simplified and corrected <font> tag saving, it's not
	optimal in space, but at least correct

2002-09-16  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (parse_body): push/pop block here to fix
	<table><tr><td><font color=white>aaa</tr></td></table>
	(html_engine_selection_contains_link): new method
	(html_engine_selection_contains_object_type): new method

	* htmlengine-edit-cut-and-paste.c (append_flow): don't move whole
	flows, just object in them to preserve flow attributes

2002-09-13  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c: reimplemented font style parsing to allow non
	nested font style tags

2002-09-12  Bastien Nocera  <hadess@hadess.net>

	* gtkhtml.c: (get_line_height): hack around use of
	html_painter_calc_ascent and html_painter_calc_descent so that we're
	able to compile it.

2002-09-12  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (get_tags): don't get next/prev text objects across
	cluev boundaries
	(get_tags): fix </FONT> duplication and restoring right attributes

	* htmlengine.c (parse_a): don't push color for links
	(close_anchor): don't pop color
	(insert_text): use right default color for links

2002-09-05  Radek Doulik  <rodo@ximian.com>

	* htmliframe.c (op_copy): set iframe's clue parent

	* htmlobject.c (html_object_op_copy): added parent parameter

	* htmliframe.c (copy): copy html and clue as well, initialize
	_painter
	(destroy): unref painter just when non-NULL
	(op_copy): implemented
	(copy): don't copy content here, but in op_copy

2002-09-04  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (set_focus_child): call parent's set_focus_child
	method
	(gtk_html_insert_html_generic): delete selection first

2002-08-30  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (insert_tab_or_next_cell): paste text instead of
	inserting it

2002-08-28  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (client_notify_widget): spell check or clear spell
	checking errors on live_spell_check flag change
	(command): added scroll-bod, scroll-eod commands
	(command): allow copy in non editing mode and bind it to C-c

2002-08-27  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c: fix scroll behavior, work around layout
	page_increment = height / 2

2002-08-26  Radek Doulik  <rodo@ximian.com>

	* htmlobject.c (move_object_cursor): don't allow objects not
	capable of accepting cursor to accept it

2002-08-23  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (validate_tables): new function,
	inserts new line in case we end with invalid flow layout after
	delete

2002-08-22  Radek Doulik  <rodo@ximian.com>

	* htmltext.c: allow + in user name in mail addres and don't allow
	wwwblabla, ftpbla, ...

	* gtkhtml.c (drag_begin): select dragged object
	(dnd_link_set): no dnd in edit mode
	(dnd_link_unset): ditto

	* htmlengine.c (html_engine_stream_write): in case size == -1
	calculate length of buffer

2002-08-21  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (set_focus_child): test if object is not an frame
	before setting it as focus_object

2002-08-20  Radek Doulik  <rodo@ximian.com>

	* htmlprinter.c (alloc_font): scale width using new macro

	* htmlprinter.h (SCALE_GNOME_PRINT_FONT_TO_ENGINE): new macro for
	scaling font width

2002-08-19  Radek Doulik  <rodo@ximian.com>

	* htmlcluev.c (draw): fixed width and height of aligned objects
	drawing

2002-07-30  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (use_pictograms): don't put
	pictograms in the middle of words

2002-07-17  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (get_tags): optimized output

2002-07-29  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_focus): make sure embedded object
	widget is non NULL

2002-07-26  Radek Doulik  <rodo@ximian.com>

	* htmlobject.c (handle_object_data): don't clear class data here
	as it could break hash foreach loop
	(clear_data): clear them later here

2002-07-25  Radek Doulik  <rodo@ximian.com>

	* htmlobject.c (next_prev_cursor_object): use html_cursor_init
	(copy_data): duplicate the key
	(html_object_set_data): use _full version with g_free
	(copy_data): use _full version with g_free

	* htmlcursor.c (html_cursor_init): new function to initialize all
	cursor fields

	* htmlclueflow.c (layout_line): update height just when really needed

2002-07-24  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (insert_tab_or_next_cell): insert 4 &nbsp;'s when no
	TAB available

2002-07-18  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit.c (html_engine_set_title): emit TITLE_CHANGED
	signal

2002-07-15  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (layout_line): fix new line condition

2002-07-12  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_set_class_data): return if class_name
	is NULL
	(get_class_table): ditto
	(parse_d): be more careful when class_name is NULL

2002-07-09  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (divide_upto_preferred_width): fixed part
	calculation

	* htmltextslave.c (get_offset_for_pointer): fixed offset
	calculation

2002-07-08  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (draw_item): use first slave for postion
	calculation instead of text object, this fixes item drawing with
	new layouting

2002-07-05  Radek Doulik  <rodo@ximian.com>

	* keybindingsrc.ms: added C-backspace and C-delete for delete
	{forward,backward} word

	* htmlengine-edit-fontstyle.c (get_url_or_target_from_selection):
	removed obsolete assert

	* htmlclueflow.c (update_top_height): fixed align=top
	(end_of_word): fix citations and spell checking 'spell check' is
	no more marked as mispelled

2002-07-03  Radek Doulik  <rodo@ximian.com>

	* htmlimage.c (html_image_get_actual_width): use max_width instead
	of engine view width

2002-07-02  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (focus): disabled link navigation in editing mode

2002-06-25  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (hts_fit_line): take care about line breaking
	here as well as we don't usually calculate min width anymore.

2002-06-20  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c:  update focus_object to work properly with frames
	(focus): try to be clever about borders

	* htmlengine.c: update focus_object to work properly with frames

	* htmlgdkpainter.c (alloc_e_font_try): use gdk_fontset_load only
	when necessary, otherwise use gdk_font_load

	* htmlobject.c (html_object_engine): new function, returns engine
	which contains clue which object directly (no frames on way from
	clue to object)
	(html_object_calc_abs_position): correct calculation, take care of
	frames and thus border size

2002-06-18  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (focus): fixed horizontal offset calculation

2002-06-06  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_insert_html_generic): added tmp parameter,
	which when non-null is used as source of insertion, it's destroyed
	afterwards
	(gtk_html_insert_gtk_html): new method, takes to_be_destroyed
	gtkhtml widget and inserts its content into html gthtml

2002-05-30  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (draw): call get_body with table coordinates

	* htmlengine.c (html_engine_draw_real): substract borders from
	engine height before comparing with engine clue height

2002-05-28  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_init): set default content type to
	"html/text; charset=utf-8"

2002-05-23  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c: moved properties initialization to instance init,
	suggested by Michael Meeks

2002-05-24  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (selection_get): handle pasting text/html.
	(init): add text/html target.

2002-05-22  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_set_paragraph_style): fix the styles equal
	condition

2002-05-20  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-clueflowstyle.c
	(html_engine_set_clueflow_style): added dir parameter, fixed undo

	* htmlengine-edit-cut-and-paste.c (check_flows): new helper
	functions, takes care about clueflow's style changes

2002-05-17  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (skip_host): fix this for base_urls with hosts but
	without trailing /s.

2002-05-16  Radek Doulik  <rodo@ximian.com>

	* libgtkhtml.pc.in (Cflags): fix include directory

2002-05-13  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-properties.c (gtk_html_class_properties_update): suggest
	gconf sync

2002-05-09  Radek Doulik  <rodo@ximian.com>

	* htmlgdkpainter.c: create PangoLayout just once

2002-05-07  Radek Doulik  <rodo@ximian.com>

	* Makefile.am: fixed .la versioning

	* libgtkhtml.pc.in (Libs): added a11y lib

	* gtkhtml.c (client_notify_widget): use /keybindings_theme in
	widget and not class notify

2002-04-18  Radek Doulik  <rodo@ximian.com>

	* htmlprinter.c (insure_paper): use default paper name in case of
	wrong translation

2002-04-16  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (drag_data_received): allow drop just links of known
	protocols

2002-03-25  Radek Doulik  <rodo@ximian.com>

	* htmlplainpainter.c (html_plain_painter_new): create and ref
	pango context

	* htmlimage.c (html_image_factory_end_pixbuf): unref loader once
	not needed
	(free_image_ptr_data): close loader before unrefing

	* htmlclueflow.c (end_of_word): don't check for *cn to recognize
	one char length words

	* htmlengine.c (html_engine_calc_size): use border when setting
	e->clue coordinates

2002-03-18  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_set_focus): test for clue before
	calling html_object_forall on clue

2002-03-11  Radek Doulik  <rodo@ximian.com>

	* htmlprinter.c (calc_text_width): use correct len (in bytes) for
	gnome print function

	* htmlpainter.c (html_painter_calc_text_width_bytes): new method
	(correct_width): new optimized helper function, replaces old
	rewritting functions used in non-bytes version

	* htmltext.c (calc_word_width): use bytes version

	* htmlprinter.c (calc_text_width_bytes): new implementation

	* htmlgdkpainter.c (calc_text_width_bytes): new implementation

	* htmlpainter.c (html_painter_calc_text_width_bytes): new function
	which uses byte len instead of uc-char len (index)

	* htmlfontmanager.c (html_font_new): added nbsp and space width to
	the font structure

2002-03-07  Larry Ewing  <lewing@ximian.com>

	* htmltextslave.c (html_text_slave_get_text): cache this result.
	(split): pass an optional charStart setting to allow filling the
	above cache without recomputing the pointer from the offset.
	(hts_fit_line): update the start position cache as we walk
	forward.  And pass the start pointer to the split call.
	(draw_highlighted): opitmize the pointer offset calculations.
	(html_text_slave_init): initialize that cache value to NULL.

	* htmltextslave.h: add charStart cache entry.

2002-03-06  Larry Ewing  <lewing@ximian.com>

	* htmltextslave.c: undo the s/g_utf8/h_utf8/ use a #define instead.
	Add comment explaining this choice.

	* htmltext.c: same as above.
	
	* htmltextslave.c: optimize, I'll be more specific when I'm done.

	* htmltext.c: see above.

2002-03-05  Larry Ewing  <lewing@ximian.com>

	* htmlbutton.c (html_button_init): mark strings for translation.
	Add missing includes for _() definition.

	* htmlselect.c: convert from utf8 properly and use needs_update
	boolean to postpone setting the popdown strings until they are
	needed.  Because of how GtkCombo is implemented setting popdown
	strings is extremely expensive.

	* htmlselect.h: add update boolean.

	* htmltextinput.c: handle utf8 strings correctly.

	* htmltextarea.c (html_textarea_set_text): convert string to gtk
	charset before setting gtk widget.

	* htmlbutton.c (html_button_init): convert to gtk string before
	creating label.

2002-02-26  Larry Ewing  <lewing@ximian.com>

        * gtkhtml.c: rename to gtk_html_get_url_blah, still bad but a
	little better.

	* gtkhtml.h: ditto.

	* htmliframe.c: fix for renaming.

	* htmlframe.c: same as above.
	
2002-02-26  Larry Ewing  <lewing@ximian.com>

	* htmliframe.c: remove the unused on_url and link_clicked handlers
	and add note that these signals do not cascade.  Use
	gtk_html_get_base_relative in set_base now.

	* htmlframe.c: same as above.

	* gtkhtml.c: make link_clicked and on_url resolve urls relative to
	the frame they are in.  moved the relative url code in here.
	gtk_html_get_base_relative and gtk_html_get_object_relative
	function for the relative url parsing.  These should probably get
	better names.

	* gtkhtml.h: add the new function prototypes.

2002-02-25  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (use_pictograms): set ALT text
	to picto image
	(html_engine_insert_text): don't use smiley's in plain text mode

	* htmlimage.c (calc_size): draw ALT text with PLAIN painter
	(calc_size): update for ALT text and PLAIN painter

	* htmlengine-edit-cursor.c (html_engine_draw_image_cursor): fixed
	rectangle calculation

2002-02-24  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (html_engine_url_requested_cb): expand urls relative
	to the document url.

	* htmlframe.c (html_frame_init): request the initial url on the
	parent.
	(html_frame_url_requested): let the widget expand the relative
	urls.

	* htmliframe.c (html_frame_init): request the initial url on the
	parent.
	(html_iframe_url_requested): let the widget expand the relative
	urls.

2002-02-23  Larry Ewing  <lewing@ximian.com>

	* htmlframe.c: change relative url lookup.

	* htmliframe.c: change relative url handling.  Fix check_url logic
	for scrolled case.

	* gtkhtml.c (gtk_html_set_base): remove the old parsing logic.

2002-02-22  Radek Doulik  <rodo@ximian.com>

	* htmlimage.c (update_or_redraw): don't draw or schedule engine
	update in blocking mode

2002-02-15  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (new_obj_from_uri): don't remove http:// from link text
	(new_obj_from_uri): don't be too smart about URL's, people don't
	like ;-)
	(idle_handler): don't just check for thaw idle handler scheduled,
	but also if html engine isn't actually frozen
	(button_press_event): unset button1_pressed flag for 2x and 3x
	click, it fixes word and line selection in iframes

	* htmlinterval.c (html_point_max): handle case, when one point's
	object is container of another (as could happen with tables)

2002-02-14  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (command): set return value for cursor-{forward,backward}

2002-02-12  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (write_list_finish_tags): new helper method,
	takes care about writing right list ending tags
	(write_pre_tags): use write_list_finish_tags
	(write_post_tags): ditto
	(get_end_tag_item): extracted helper function
	(get_end_tag): use get_end_tag_item

	* htmlimage.c (html_image_animation_timeout): test if delay is >
	0 (before we have been testing for != 0)

	* gtkhtml.c (gtk_html_has_undo): renamed from gtk_html_is_dirty

	* htmlundo.c (html_undo_has_undo_steps): renamed from
	html_undo_is_dirty

2002-02-11  Radek Doulik  <rodo@ximian.com>

	* htmlselection.c (html_engine_select_interval): don't activate
	PRIMARY selection
	(html_engine_update_selection_active_state): new helper function

	* gtkhtml.c (key_press_event): set event_time
	(button_press_event): if we are provider of PRIMARY, copy
	selection to primary object
	(button_release_event): don't copy to primary, just in case we are
	provider of PRIMARY
	(button_release_event): update selection active state, don't copy
	to primary object
	(selection_get): if primary is non-NULL, use it, otherwise get
	selection from engine
	(selection_received): don't copy primary, just use it directly and
	reset it to NULL
	(cursor_move): update selection active state
	(move_selection): ditto
	(gtk_html_select_word): ditto
	(gtk_html_select_line): ditto
	(gtk_html_select_paragraph): ditto
	(gtk_html_select_paragraph_extended): ditto
	(gtk_html_select_all): ditto, don't copy to primary

	* gtkhtml-private.h: added event_time

2002-02-11  Larry Ewing  <lewing@ximian.com>

	* htmltokenizer.c (in_script_or_style): fix obvious error in
	growing the scriptCode buffer, use g_realloc instead.

2002-02-06  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (drag_data_received): remove \n\r in the end of url's
	(drag_data_received): allow dropping of uri lists instead of just
	one uri, implemented image dropping

2002-02-05  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (realize): changed defaults to all
	(drag_data_received): when dropped on selection, it pastes over it
	fix cursor position

2002-01-31  Radek Doulik  <rodo@ximian.com>

	* keybindingsrc.*: removed paragraph formatting bindings, so now
	it works thru menu bindings

2002-01-29  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c: added close_flow to few places to avoid empty
	clueflows in tree

	* htmlselection.c (html_engine_select_all): as below

	* htmlengine-edit-cut-and-paste.c (html_engine_copy_object): check
	if e->clue is not empty

2002-01-28  Radek Doulik  <rodo@ximian.com>

	* htmlengine-print.c (print_page): fix header printing

2002-01-27  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.h: add set_title prototype.

	* gtkhtml.c: add gtk_html_set_title to match gtk_html_get_title.

2002-01-25  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit.c (html_engine_set_title): new method for title setting

2002-01-24  Larry Ewing  <lewing@ximian.com>

	* htmlpainter.c: remove uneeded semicolons after
	DEFINE_UNIMPLEMENTED definitions.  They are spurious and cause
	some compilers to complain.  Thanks to Tim Mooney
	<mooney@dogbert.cc.ndsu.nodak.edu> for the patch.  Fixes
	http://bugzilla.ximian.com/show_bug.cgi?id=19189
	
2002-01-14  Larry Ewing  <lewing@ximian.com>

	* htmlengine-edit-cursor.c (html_engine_draw_cursor_in_area): wrap
	im call in #ifdef GTK_HTML_USE_XIM

2002-01-14  Radek Doulik  <rodo@ximian.com>

	* keybindingsrc.*: bind style-itemalpha command

	* gtkhtml.c (command): implement style-itemalpha command

2002-01-11  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (get_offset_for_pointer): optimized to use word
	width cache

2002-01-10  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit.c (html_engine_new_text): could return link
	object again

	* htmlengine-edit-fontstyle.c (html_engine_text_style_object): new
	helper function
	(html_engine_get_document_url): use html_engine_text_style_object
	to change link editing behaviour
	(html_engine_get_document_font_style): ditto
	(html_engine_get_document_color): ditto

	* htmlengine-save.c (html_encode_entities): renamed from
	encode_entities, exported, allow encoded_len_return to be NULL

2002-01-08  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (html_engine_edit_set_link):
	renamed from html_engine_set_link

	* htmlengine-edit-clueflowstyle.c (get_props_and_set): set changes
	to recalculate word widths and layout properly

	* gtkhtml-properties.c: don't save spell properties, load spell
	properties

2002-01-04  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-private.h: add notify_spell_id

	* gtkhtml.c (client_notify_spell_widget): new function
	(init_properties_widget): watch gnome spell configuration, use
	client_notify_spell_widget

2001-12-21  Larry Ewing  <lewing@ximian.com>

	* Makefile.am (libgtkhtml_la_LDFLAGS): add GTKHTML_RELEASE to the
	flags and install headers into proper place.

2001-12-20  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_images_ref): new method
	(gtk_html_images_unref): ditto
	(gtk_html_image_ref): ditto
	(gtk_html_image_unref): ditto
	(gtk_html_image_preload): ditto

	* htmlengine.c (html_engine_begin): don't use factory cleanup, we
	don't need it anymore and we want preloaded images to be kept

2001-12-18  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (class_init): added call to gdk_rgb_init

	* htmlengine-edit-clueflowstyle.c (set_clueflow_style_in_region):
	avoid skipping end and continuing to the end of document

2001-12-17  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_api_set_language): use engine language prior
	to class one

	* htmlengine.c (html_engine_set_language): new method, set
	language for spell checking

	* htmlengine.h: added language item

2001-12-14  Larry Ewing  <lewing@ximian.com>

	* htmliframe.c (html_iframe_init): dup the url.
	(destroy): free the url.

2001-12-13  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-im.h (gtk_html_im_position_update): add prototype for
	html_engine_draw_cursor_in_area.

	* htmlengine-edit-cursor.c (html_engine_draw_cursor_in_area):
	update the preedit posistion.

	* gtkhtml-im.c (gtk_html_im_position_update): update the posistion
	of the XIM preedit block (This XIM patch is based on the patch by
	ynakai@redhat.com and fixes
	http://bugzilla.ximian.com/show_bug.cgi?id=9526)

2001-12-12  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (command): implemented kill-word and
	backward-kill-word commands

2001-12-11  Radek Doulik  <rodo@ximian.com>

	* htmlengine-print.c (html_engine_print_with_header_footer):
	minimal scale 0.5, so we stop on scale, which is still readable

	* htmlselect.c (html_select_set_text): make it safe when
	select->strings == NULL

2001-12-06  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (split): removed old obsolete forgotten code

2001-12-05  Radek Doulik  <rodo@ximian.com>

	* htmlprinter.c (insure_paper): use _("US-Letter") as fallback,
	add printer parameter to be able to get paper from master
	(html_printer_new): add master parameter, to be remembered, needed
	for paper
	half margins as they are too wide in gnome-paper

	* gtkhtml.c (gtk_html_print_set_master): new helper function
 
	* gtkhtml-properties.c: set default print size back to 10

	* htmlprinter.c (insure_paper): use print master to get its paper

	* gtkhtml-private.h: added print_master

	* htmlprinter.c (html_printer_get_page_height): use top and bottom
	margins

	* gtkhtml-properties.c: change default size for printing fonts to
	9

2001-12-09  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_insert_html_generic): freeze/thaw

	* htmlimage.c (save): save links
	(html_image_get_actual_width): exported, updated to allow painter
	== NULL
	(html_image_get_actual_height): likewise
	(set_link): use color

2001-12-03  Radek Doulik  <rodo@ximian.com>

	* htmlimage.c (draw): use new colors

	* htmltextslave.c (draw_highlighted): use new colors

	* htmlpainter.c: remove html_painter_get_highlight_color, it's now
	obsolete

	* htmlcolorset.c: added entries for highlight colors in non-focus
	state

	* htmlframe.c (html_frame_init): as below, BTW, iframe and frame
	has so much shared code, that I believe they should be inherit
	from generic frame parent which should hold shared code

	* htmliframe.c (html_iframe_init): set focus by parent

2001-11-29  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (set_focus): new helper function
	(html_engine_set_focus): foreach frame/iframe set painter focus,
	uses set_focus helper

2001-11-27  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (html_text_magic_link): use
	html_cursor_jump_to_position_no_spell instead of
	html_cursor_jump_to_position to avoid unwanted spell checker calls
	which are performance expensive

	* gtkhtml.c: updated for spell checking changes

	* htmlengine.c (html_engine_get_spell_word): renamed from
	html_engine_get_word and updated
	(html_engine_spell_word_is_valid): likewise
	(html_engine_replace_spell_word_with): likewise

	* htmlengine-edit.c (html_engine_spell_check_range): updated

	* htmlclueflow.c (begin_of_word): update for spell word selection
	(end_of_word): ditto

	* htmlselection.c (html_selection_spell_word): new helper
	function used for word selection for spell checking

	* htmlengine-edit.c (html_engine_select_spell_word_editable): new
	function, selects word for spell checking, it differs from word
	selection by 2xclick

2001-11-26  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (scroll): use MAX (0, upper) to avoid negative values
	(scroll_by_amount): refactored - remove redundant local variables

2001-11-21  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (selection_clear_event): unselect only when widget is
	non editable, otherwise keep selection valid

	* htmlimage.c (draw): use html_painter_set_focus

	* htmltextslave.c (draw_highlighted): use html_painter_set_focus

	* gtkhtml.c (focus_in_event): set painter focus, redraw selection
	(focus_out_event): ditto

	* htmlpainter.c (html_painter_set_focus): remember focus in
	painter
	(html_painter_get_highlight_color): get highlight color depending
	on focus

	* htmlengine.c (html_engine_redraw_selection): new helper function

	* htmlclueflow.c (calc_size): place check for changed size before
	html_object_calc_size
	(merge): set change size to head of self and tail of with
	(split): set change size aroud and child object 

2001-11-20  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (insert_empty_paragraph): check
	if original paragraph is empty link and in such case replace link
	with empty text

	* htmllinktext.c (html_link_text_to_text): changed return value,
	now this method return newly created object with the same text as
	link and same text attributes as font style/face and with default
	text color

	* htmlengine-edit.c (html_engine_new_text): don't ever create
	links here

	* htmlengine-search.c (display_search_results): use move_to_found
	only for non editable widget

	* htmlclueflow.c (search_set_info): use strlen instead of
	Text::text_len because of utf8
	(search_set_info): use g_utf8_pointer_to_offset
	(search_text): use strlen
	(search_set_info): added text parameter

2001-11-19  Radek Doulik  <rodo@ximian.com>

	* htmlengine-search.c (display_search_results): hide/show cursor

	* htmlselection.c (html_engine_select_interval): wrap in hide/show
	cursor
	(html_engine_unselect_all): ditto
	(html_engine_disable_selection): ditto

	* htmlengine-search.c (html_engine_search_next): if engine is
	editable, use html_engine_search rather than
	html_engine_search_next to respect cursor position 

	* htmlengine.c (replace): don't replace with empty text's, just
	delete selection in such case

2001-11-15  Radek Doulik  <rodo@ximian.com>

	* htmlcluev.c (do_layout): test if it's new flow by old_y and not
	old_y_off

2001-11-15  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-properties.c (get_font_name): 
	(get_default_fonts): move these out of the gconf #ifdef.  Patch
	from Michael Granger <ged@FaerieMUD.org>. Fixes Ximian 15251
	
2001-11-14  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (parse_halign): allow halign be "middle", which is
	common mistake

2001-11-14  Larry Ewing  <lewing@ximian.com>

	* htmlcolorset.c (html_colorset_set_style): use the fg[SELECTED]
	instead of text[SELECTED] since that is what the silly gtk+
	widgets do.

2001-11-12  Radek Doulik  <rodo@ximian.com>

	* htmlcluev.c (do_layout): compare curr y_off's (y - ascent) and
	not old and new curr->y

2001-11-08  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-properties.c (gtk_html_class_properties_new): get
	default encoding from default widget style font
	(gtk_html_class_properties_load): ditto
	(get_default_fonts): new helper function
	(get_font_name): stolen from e-font.c

	* htmlengine-edit-text.c (find_first): use g_unichar_isalnum
	(html_engine_capitalize_word): test if next char is alnum
	before doing forward_word
	(upper_lower): don't g_assert here as it's not needed, just test
	if we have text object to modify

2001-11-06  Radek Doulik  <rodo@ximian.com>

	* htmlgdkpainter.c (alloc_e_font_try): try to use gdk_font_load
	for fixed font, if gdk_fontset_load doesn't load fixed font for us

2001-11-05  Radek Doulik  <rodo@ximian.com>
 
	* htmlengine-edit-cut-and-paste.c
	(html_engine_cut_and_paste_begin): check for e->mark != NULL
 
2001-11-05  Larry Ewing  <lewing@ximian.com>

	* htmlselection.h (html_selection_current_time): s/()/(void)/

2001-11-02  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (get_cursor): if we are between two text objects, use
	the second one fixes #14153

2001-11-03  Radek Doulik  <rodo@ximian.com>

	* htmlengine-print.c (html_engine_print_with_header_footer): set
	font manager defaults before we do test for fixed font

2001-11-01  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_replace_word_with): disable selection,
	don't store selection across replace

	* htmlembedded.c (destroy): if changed_id > 0 then disconnect it

	* htmlembedded.h: added changed_id, where we store handler id from
	connected html_embedded_object_changed

	* htmlembedded.c (html_embedded_object_changed): moved from
	htmlengine.c and renamed

2001-10-31  Ettore Perazzoli  <ettore@ximian.com>

	* htmliframe.c (html_iframe_init): Set ->scroll before calling
	`html_iframe_set_scrolling()'.  Fixes #14098.

2001-10-30  Larry Ewing  <lewing@ximian.com>

	* htmlselection.c (html_selection_current_time): add helper
	function.

	* htmlselection.h (html_selection_current_time): add prototype.

	* gtkhtml.c (gtk_html_set_base): add call to set the document
	base.
	(gtk_html_get_base): get the document base.
	(gtk_html_cut): html_selection_current_time.
	(gtk_html_copy): html_selection_current_time.
	(gtk_html_paste): html_selection_current_time.
	
	* gtkhtml.h: add *_base prototypes.

	* gtkhtml-private.h: add base_url member.

	* htmliframe.c (html_iframe_init): use set_scrolling.
	(html_iframe_set_scrolling): add.
	(calc_size): use set_scrolling.

	* htmliframe.h (html_iframe_set_scrolling): add helper function.

	* htmlengine.c (block_end_div): set e->divAlign too.  Fixes 
	Ximian #9167.
	
2001-10-30  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (html_table_set_max_width): set max_width to
	min_width if min_width > max_width

	* htmlengine-edit-cut-and-paste.c (insert_empty_paragraph): move
	undo level end to wrap event
	(html_engine_insert_text): added event emitting, it need to be
	fixed later to have new event type for it, now it uses command
	insert-paragraph
	(html_engine_insert_text): wrap it in undo level

	* gtkhtml.c (gtk_html_editor_event_command): added 'before' flag

	* gtkhtml-enums.h: split GTK_HTML_EDITOR_EVENT_COMMAND in
	GTK_HTML_EDITOR_EVENT_COMMAND_BEFORE and
	GTK_HTML_EDITOR_EVENT_COMMAND_AFTER

	* htmlimage.c (get_actual_width): fix scale for pixel size

2001-10-30  Larry Ewing  <lewing@ximian.com>

	* htmlcluev.c (do_layout): shut up compiler.

	* htmltokenizer.c: get rid of cut & pasted functions they are in
	gal now.

2001-10-29  Larry Ewing  <lewing@ximian.com>

	* htmltable.c (merge): shut up the compiler.

	* htmlengine.c (parse_c): tweak reseting center.
	
2001-10-29  Ettore Perazzoli  <ettore@ximian.com>
 
 	* htmlengine.c (html_engine_init): Init `->pAlign' and
 	`->divAlign' to `HTML_ALIGN_NONE'.
 	(new_flow): Use `->pAlign' instead of `->divAlign'.
 	(block_end_clueflow_style): Likewise.
 	(block_end_div): Likewise.
 	(parse_table): Likewise.
 	(parse_a): Likewise.
 	(parse_c): Likewise.
 	(parse_d): Likewise.
 	(parse_h): Likewise.
 	(parse_p): Likewise.
 	(parse_p): Set the pAlign to be the same as the divAlign by
 	default when starting a new paragraph.  When closing a paragraph,
 	set pAlign to be the same as divAlign.
 	(parse_d): Set both pAlign and divAlign for `<div>'.

2001-10-30  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (set_color): remove call to relayout

	* htmlengine-edit-fontstyle.c (object_set_font_style): use
	html_object_prev_not_slave
	(set_color): ditto
	(set_empty_flow_color): new function + undo
	(set_empty_flow_style): ditto

2001-10-29  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_destroy): timers live in the selection
	updater too, clear it before we destroy the objects.

	* htmlgdkpainter.c (alloc_e_font_try): use gdk_fontset_load (patch
	from  Kjartan Maraas <kmaraas@gnome.org>).  see Ximian #11883.

2001-10-29  Radek Doulik  <rodo@ximian.com>

	* htmlprinter.c: use gnome_font_get_width_utf8_sized

	* htmlobject.c (html_object_cursor_backward): handle aligned clues

	* htmlengine.c (html_engine_calc_min_width): use pixel_size

	* htmlprinter.c (get_font_size): new helper function
	(alloc_font): use get_font_size, which uses scale attribute

	* htmlengine-print.c (html_engine_print_with_header_footer): set
	scale

	* htmlprinter.c: use scale attribute

	* htmlprinter.h: added scale attribute

	* htmlpainter.c (html_painter_get_font): check if font is non-NULL
	before dereferencing

	* htmlprinter.c (alloc_font): if we can't allocate selected face
	and even Courier or Helvetica, fallback to first font from
	gnome_font_family_list

	* htmlfontmanager.c (html_font_manager_get_font): replace g_error
	with g_warning and test if font is non-NULL when setting to font
	manager

	* htmlprinter.c (begin): added call to gnome_print_beginpage

	* htmlengine-print.c (do_we_have_default_font): new helper
	function
	(html_engine_print_with_header_footer): don't print if we are
	unable to allocate default font

	* htmlcluev.c (check_point): check align_right_list too
	(check_point): translate aligned clues coordinates

2001-10-29  Ettore Perazzoli  <ettore@ximian.com>

	* htmlselection.c (html_engine_select_interval): Peek the time
	from `gtk_get_current_event()'.

	* gtkhtml.c (get_current_time): New function to get the current
	time from `gtk_get_current_event()' [if the latter fails, it just
	resorts to `GDK_CURRENT_TIME'].
	(gtk_html_paste): Use it instead of just `GDK_CURRENT_TIME' as the
	timestamp.
	(gtk_html_copy): Likewise.
	(gtk_html_cut): Likewise.

2001-10-29  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (command): check if word is non-NULL, don't leak it

2001-10-28  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (command): stop insertion links on new paragraphs.

	* htmlengine-edit-cut-and-paste.c (html_engine_cut_line): wrap cut
	line in an undo level.
	(html_engine_set_insertion_link): set the insertion color if there
	is a url.
	(insert_empty_paragraph): the command resets the link for us now.
	
	* htmlimage.c (stop_anim): remove the stall timeout here as well.
	(html_image_pointer_remove_stall): helper function.
	(html_image_pointer_unref): use remove_stall.
	(check_point): go before or after by splitting in the middle.
	This is at least more usable that the old method.

	* htmlengine.c (html_engine_destroy): stop all animations and
	destroy stall timers before we enter the destroy processing.
	
	* gtkhtml.c: add accessor to the allow_frameset disable code.

	* gtkhtml.h: add prototypes.

2001-10-27  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (scroll_by_amount): fix this so that we never scroll
	farther down the page than we want to (adj->val -
	adj->page_size). Fixes Ximian #2504.

	* htmltokenizer.c (in_entity): always collapse the entity even in
	tags and element names.

	* htmlengine.c (html_engine_destroy): make the engine safe for
	reentrant calls that could result from destroying embedded objects
	that might iterate the main loop. Fixes ximian #13699.

2001-10-26  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (op_copy): handle cspan, rspan
	added few g_return_if_fail's

	* htmlclueflow.c (calc_size): if width_left < 0 and ! firstRun,
	then break line here
	(draw_background): don't call html_object_draw for parent as this
	means we draw itself too (so when flow is drawed from drawing
	queue, it's rendered twice which means uglyness for gdkxft) I've
	tried to reproduce bug #6, for which this was intended as fix, but
	can't reproduce it, so I hope #6 is fixed properly now.

	* htmlobject.c (html_object_is_clue): added HTML_TYPE_CLUEALIGNED,
	which Larry probably forgot commit

2001-10-25  Larry Ewing  <lewing@ximian.com>

        * htmlembedded.c (destroy): clean up the signals and unset the
        object data so that even if the widget lives on if doesn't kill
        us.
        (html_embedded_allocate): rename for the fun of it.
        (html_embedded_new_widget): pass em as object data so that the
        signal will be removed when we destroy.

	* htmltokenizer.c (flush_entity): don't add the TAG_ESCAPE to the
	output when fluhing the entity.
	(in_entity): don't collapse entities in tags or attributes.

	* htmlimage.c (image_update_url): don't do anything if there is no
	map.
	(get_url): return the image->url if final->url is NULL.

2001-10-25  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (insert_object): use
	html_cursor_jump_to_position_no_spell
	(insert_object_do): ditto
	(insert_object): ditto

	* htmlcursor.c (html_cursor_jump_to_position_no_spell): new
	function, preserves engine's need_spell_check flag while jumps

	* htmlengine-edit-cut-and-paste.c (append_object): remember
	position when empty flow is already prepared

	* htmlengine.c (check_cursor): new function, checks if cursor
	position is valid

	* htmlengine-edit-cut-and-paste.c (insert_object_do): save orig
	cursor after split
	(insert_object_do): preserve position before for orig
	(isolate_tables): rewritten once more
	(insert_undo_action): update to isolate_tables changes
	(insert_setup_undo): ditto
	(insert_object): ditto

	* htmlobject.c (move_object_cursor): allow cursor moves in flow
	where containers are mixed with leaf objects

2001-10-24  Larry Ewing  <lewing@ximian.com>

	* htmlobject.c (html_object_is_clue): add HTML_TYPE_CLUEALIGNED to
	the type list.

	* htmlimage.c (html_image_animation_new): initialize some
	variables that were missed.

	* htmlengine.c (html_engine_destroy): remove the thaw idle if we
	are destroyed.

2001-10-24  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (insert_empty_paragraph): added
	add_undo parameter which specifies, if undo action should be added
	(delete_object): ditto
	(isolate_tables): rewritten
	(insert_object): updated to new isolate_tables

	* htmltable.c (op_copy): fill empty cells with cells with empty
	texts, fix copying start condition

2001-10-23  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (split): redo splits on table boundaries

	* htmltokenizer.c (g_utf8_get_char_validated): make it static to
	avoid compiler warning

	* htmltable.c (merge): take care of prev_c1 when moving cells
	handle case when merging two cells better - fix cursor position

	* htmlclue.c (html_clue_append_after): be more carefull
	(html_clue_append): ditto

	* htmlengine-edit-cut-and-paste.c (insert_object_do): check for
	clue

	* htmlobject.c (html_object_is_clue): new function

	* htmlclueflow.c (merge): merge always

	* htmltable.c (split): add dup to parent clue
	(merge): c1 = c2 to be sure c1_prev is valid

2001-10-22  Larry Ewing  <lewing@ximian.com>

	* htmlclue.c (op_helper): don't do anything to last until we've
	checked to make sure the clue isn't empty and last is not NULL.

2001-10-22  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit.c (html_engine_select_word_editable): use
	html_selection_word

	* htmlselection.c (html_selection_word): new method
	(word_interval): use html_selection_word

	* htmlengine-edit-cut-and-paste.c (html_engine_delete_container):
	reorder selection related method calls
	(html_engine_delete_n): ditto + added freeze/thaw

	* htmlpainter.c (html_painter_draw_spell_error): return width of
	spell error underline (which is width of underlined text)

	* htmltextslave.c (draw_spell_errors): fixed misplaced
	misspell-underlines, optimized

2001-10-21  Larry Ewing  <lewing@ximian.com>

	* htmldrawqueue.c (html_draw_queue_clear): take care of
	pending_frees here this way we don't leak if when the queue is
	cleared.
	(html_draw_queue_flush): don't free free_pending obects here, just
	don't draw them.

	* htmlobject.c (destroy): make sure cleanup everything even if
	redraw is pending, otherwise the drwaqueue code will leak this.

2001-10-20  Larry Ewing  <lewing@ximian.com>

	* htmliframe.c (copy): add a partial copy implementation to
	make things slightly less prone to breaking.
	(html_iframe_class_init): use copy.

2001-10-19  Dan Winship  <danw@frotz.mysterion.org>

	* gtkhtml-stream.c (gtk_html_stream_vprintf): Fix another
	ppc-breaking stdarg buglet.

2001-10-19  Radek Doulik  <rodo@ximian.com>

	* htmlinterval.c (unselect_object): queue draw only if engine is
	not frozen
	(select_object): ditto

	* htmlimage.c (update_or_redraw): use html_engine_flush_draw_queue
	instead of html_draw_queue_flush and html_engine_queue_draw
	instead of html_draw_queue_add

	* htmlengine.c (html_engine_flush_draw_queue): flush only if not
	frozen
	(html_engine_freeze): flush draw queue before freeze

	* htmlengine-edit-cut-and-paste.c (set_cursor_at_end_of_object):
	preserve need_spell_check flag

	* gtkhtml.c (expose): do simple draw as engine now handles frozen
	state by itself

	* htmlengine.c (html_engine_draw_real): renamed from
	html_engine_draw
	(html_engine_draw): handle frozen draws

	* htmlclueflow.c (op_helper): remove slaves only when cut or in
	copy result

	* htmlclue.c (op_helper): make it work even when containing slaves

	* htmlengine.c (html_engine_add_expose): new method, stores expose
	rectangle in SList to be processed in thaw
	(thaw_idle): call do_pending_expose, clear and reset
	pending_expose list
	(do_pending_expose): do pending exposes

	* gtkhtml.c (expose): if engine is frozen, then add expose to
	pending to be processed in final thaw

	* htmlengine.c (thaw_idle): check for freeze_count if we aren't
	frozen again
	(html_engine_thaw): don't decrease freeze_count if it equals to 1,
	do it in thaw_idle

	* htmlengine-edit-cut-and-paste.c (html_engine_copy_object): don't
	freeze and thaw in copy, copy should not modify our tree, so we
	don't need to update it after

2001-10-18  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (update_embedded): go ahead and draw the
	background.  This cuts down on flashing when switching pages
	quickly.

2001-10-18  Radek Doulik  <rodo@ximian.com>

	* htmltablecell.c (calc_size): fix rendering

2001-10-18  Larry Ewing  <lewing@ximian.com>

	* htmltokenizer.c: fix to guarantee no invalid utf8 sequences can
	make it past any part of the tokenizer into the tokens.  This is
	critical to prevent looping in g_utf8* on certain input.

2001-10-17  Larry Ewing  <lewing@ximian.com>

	* htmltext.c (html_text_set_text): update the text_len when we set
	the text.

	* htmlembedded.c (destroy): sink any widget that hasn't been
	parented yet.

2001-10-17  Radek Doulik  <rodo@ximian.com>

	* htmlobject.c (html_object_add_to_changed): new function, adds
	object to changed list and tries to minimalize repeated drawing

	* htmlengine-edit-cut-and-paste.c (delete_object_do): flush queue
	before delete to avoid deleted object drawing

	* htmlengine.c (html_engine_flush_draw_queue): make it possible
	flush draw queue when engine is frozen

	* htmltext.c (html_text_op_cut_helper): fix rendering

2001-10-16  Larry Ewing  <lewing@ximian.com>

	* htmlselect.c (copy): implement enough of copy that it no longer
	crashes when copied.

2001-10-17  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (calc_size): fix rendering issues

2001-10-16  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (html_text_get_nb_width): fix for case where more
	than 2 non-breakable texts are in line, use get_next_nb_width
	(get_next_nb_width): new helper function

2001-10-16  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c: include <stdlib.h> for abs definition.

	* htmlengine.h: add allow_frameset boolean.

	* htmlengine.c (html_engine_init): add allow_frameset paramter.
	(parse_f): only parse the frameset and frames if allow_frameset is
	true.
	(parse_n): only discard the noframes body if allow_frameset is
	true.
	(html_engine_init): initialize allow_frameset.

	* htmltokenizer.c (add_byte): discard '\0' on input, it just
	confuses the rest of the tokenizer and serves no purpose.

2001-10-15  Radek Doulik  <rodo@ximian.com>

	* handle "font size points" attribute everywhere

	* gtkhtml-properties.h: added points attributes

	* gtkhtml.c (selection_received): automagic links when pasting
	text from selection

	* htmlclueflow.c (add_clear_area): new helper function
	(calc_size): use add_clear_area in case we need to erase area
	behind flow, which has just shrinked

	* htmlcluev.c (add_clear_area_behind): set width and height to
	HTMLObjectClearRectangle

	* htmlengine.c (clear_changed_area): use width and height from
	HTMLObjectClearRectangle

	* htmlobject.h: added width and height to HTMLObjectClearRectangle

2001-10-14  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (render_cur_frame): add hack to turn off alpha
	blending durring an animation.  Since gifs are the only animation
	type gdk-pixbuf supports it breaks nothing an makes for a big
	spead increase.

2001-10-14  Jon Trowbridge  <trow@ximian.com>

	* htmlframe.c (html_frame_init): On second thought, maybe sharing
	the tokenizers isn't such a good idea after all...

	* htmliframe.c (html_iframe_init): Ditto.

2001-10-13  Jon Trowbridge  <trow@ximian.com>

	* htmliframe.c (html_iframe_init): The iframe's HTMLEngine needs
	to share the parent's HTMLTokenizer, not a copy. (Bug #11638)

	* htmlframe.c (html_frame_init): Likewise, the frame's HTMLEngine
	needs to share the parent's HTMLTokenizer, not a copy. (also Bug
	#11638)

2001-10-12  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (draw_changed_objects): test if we already have
	window

	* htmlobject.c (html_object_engine_intersection): new function,
	extracted
	(html_object_engine_translation): ditto

	* htmldrawqueue.c (draw_obj): refactorize, extracted few functions

	* htmlcluev.c (do_layout): handle case where width is > max_width
	and schedule area clear to changed_objs
	also store changed objs to local list which is prepend to global
	one on end

	* htmlengine.c (draw_changed_objects): handle area clears
	(clear_changed_area): do area clear here
	(html_engine_intersection): new extracted function

	* gtkhtml.c (gtk_html_begin): return NULL to avoid compiler
	warning

	* htmlclue.c (split): reset self::x,y to get right redraw in plain
	text mode

	* htmltext.c (get_tags): don't use </FONT size=...>, but just
	</FONT>
	(get_tags): join <tag> and </tag> additions together

	* htmlclueflow.c (save): in case of PRE paragraph, write final \n
	just after content
	(write_pre_tags): don't write \n for PRE here
	(save): don't put \n after <DIV>, </DIV>
	(save): put alignment tags inside

2001-10-12  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (gtk_html_private_calc_scrollbars): don't clip the
	page width it leads to bad things.
	(gtk_html_begin): add a precondition to try to see

2001-10-09  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (get_pre_padding): fixed pre/post padding between
	list and non list paragraphs
	(need_list_begin): fix for list/non-list
	(need_list_end): ditto

	* htmlengine.c (parse_l): close flow on </li>

	* htmlclueflow.c: fixed pre/post padding (was wrong between pre
	and non-pre paragraphs with different indentation levels)
	fixed list indentation (was wrong for indented lists and for inner
	lists with longer indentation)
	fixed pre/post padding on end of list
	prettyfied save output
	(write_pre_tags): fix list, nonlist paragraph on the same level

	* htmlengine-save.c (get_body): add new line after <BODY>

2001-10-09  Larry Ewing  <lewing@ximian.com>

	* htmltextslave.c (get_offset_for_bounded_width): remove redundant
	calls to html_text_get_text since it is actually expensive.

2001-10-08  Larry Ewing  <lewing@ximian.com>

	* htmlselect.c (html_select_add_option): don't add static strings
	to a list that we free all the items in.  Also some formatting
	changes in random places.  Fixes Ximian #8629

2001-10-08  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_api_set_language): new helper private
	function, used to set language thru editor API
	(gtk_html_set_editor_api): set language
	(client_notify_widget): set language
	(client_notify_widget): recheck spelling

	* gtkhtml.h (struct _GtkHTMLEditorAPI): added set_language method

	* htmlengine.c (html_engine_get_word): utf8-ize this function

2001-10-06  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_set_url): call register with reload set
	to false.

2001-10-05  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-stream.c (gtk_html_stream_vprintf): fix the limiting
	code.

2001-10-05  Radek Doulik  <rodo@ximian.com>

	* htmlimage.c (html_image_factory_end_pixbuf): call
	gdk_pixbuf_loader_close and get pixbuf from loader if we don't
	have it yet
	(html_image_edit_set_url): renamed from html_image_set_url, editor
	will use this one
	(html_image_set_url): reincarnate old one
	(free_image_ptr_data): new helper function
	(html_image_pointer_unref): use free_image_ptr_data
	(html_image_factory_register): ditto, fixed reload
	(html_image_set_url): call html_image_factory_register with reaload TRUE

2001-10-03  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-stream.c (gtk_html_stream_vprintf): limit the potential
	alloca size so that bad things are less likely to happen.

2001-10-01  Larry Ewing  <lewing@ximian.com>

	* htmlsearch.c (html_search_new): silence warnings for unused
	variables.

	* gtkhtml-stream.c: add stdlib.h include.

	* htmlsearch.c (html_search_new): handle the nongnu regex case
	properly.  From David Kaelbling <drk@sgi.com>

	* htmlentity.c: add gtkhtml-compat.h include for alloca
	definition.  From David Kaelbling <drk@sgi.com>

	* htmlpainter.c: add gtkhtml-compat.h include for alloca
	definition.  From David Kaelbling <drk@sgi.com>

	* gtkhtml-stream.c (gtk_html_stream_vprintf): 
	(gtk_html_stream_printf): add helper functions
	for writing to streams to cut down the duplication of code that is
	floating around.

	* gtkhtml-stream.h: add prototypes for stream_printf and
	stream_vfprintf

	* htmlengine.c (parse_f): go ahead and pass the NULL on through.

	* htmltokenizer.c (add_byte): make the unknown character a ? so
	that we can distinguish it from a the underscore that camel will
	provide.

2001-09-26  Larry Ewing  <lewing@ximian.com>

	* htmlform.c (html_form_add_radio): handle a NULL name for the
	radio group without.  I'm not sure what the proper thing to do
	here is, but crashing is not a good thing.

	* htmlengine-edit-clueflowstyle.h: make the prototype match the
	function (spotted by Dan Nguyen <dnn@austin.ibm.com>).

2001-09-25  Lauris Kaplinski  <lauris@ximian.com>

	* htmlprinter.c (draw_panel): Close path before fill
	(draw_background): Ditto
	(begin): Close path before clip
	(prepare_rectangle): Close path

2001-09-21  Larry Ewing  <lewing@ximian.com>

	* htmltext.c (is_convert_nbsp_needed): silence a warning.
	(is_convert_nbsp_needed): fix this properly.

	* htmlpainter.c: add #include <stdlib.h> to cover the alloca
	prototype.

	* htmlgdkpainter.c (gtkhtml_private_split_name): ifdef out since
	it is currently unused.

	* Makefile.am (testgtkhtml_LDADD): remove -static it was breaking
	the build under libtool-1.4 and FreeBSD.
	(gtest_LDADD): same.

2001-09-19    <NotZed@Ximian.com>

	* htmltokenizer.c (add_byte): Check that utf8_length doesn't
	outgrow our buffer.  The g_utf_get_char_extended function seems
	broken in a way i can't fathom right now.

2001-09-18  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_factory_end_pixbuf): let the pointer
	close the loader when it is freed, not before then so that
	html_image_set_url works properly.

2001-09-17  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit.c (html_engine_prev_cell): don't call
	gtk_html_edit_make_cursor_visible
	(html_engine_next_cell): ditto

	* gtkhtml.c (destroy): move gconf related code before html->priv
	is freed

	* htmlclueflow.c (get_start_tag): added few \n
	(get_end_tag): ditto, use need_list_end instead of need_list_begin

2001-09-16  Radek Doulik  <rodo@ximian.com>

	* htmlcluev.c (find_free_area): fixed test for checking if margins
	changed

2001-09-14  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (calc_size): take care of case when lmargin >=
	rmargin, could happen if there is wide aligned object, which takes
	whole max_width, so we must find another free area, otherwise we
	end in infinite loop, where width_left <= 0
	(calc_size): recalc margins only if area was sufficient, in other
	case we have already calculated new and right margins and there
	they were recalculated to wrong values, which could trap us in an
	infinite loop

	* htmltextslave.c(slave_split_if_too_long): new function, use
	html_object_calc_abs_position to calc absolute slave position and
	bound width by MAX_WIDGET_WIDTH - x
	(calc_size): if slave width > max_width, use slave_split_if_too_long

	* htmlengine.c (html_engine_calc_size): don't use min_width as
	lower bound of max_width

	* htmltable.c (html_table_set_max_width): calc max_width as MAX
	(max_width, min_width)

2001-09-13  Larry Ewing  <lewing@ximian.com>

	* htmlengine-save.c (html_engine_save_encode): actually free the
	encoding buffer.  Wow that was a huge leak, fixes ximian #9691.

2001-09-12  Larry Ewing  <lewing@ximian.com>

	* htmlgdkpainter.c (alloc_e_font_try): free the temp strings even
	if we exit with and error.

2001-09-12  Radek Doulik  <rodo@ximian.com>

	* htmlgdkpainter.c (alloc_e_font_do): renamed from alloc_e_font
	(alloc_e_font): if we cannot alloc font with requsted style, try
	to allocate simplified styles of the same face before we fallback
	to fixed
	(alloc_e_font_try): use gdk_font_load and then
	e_font_from_gdk_font instead of e_font_from_gdk_name to avoid
	fixed font creation
	(alloc_e_font_try): comment out fixed font test which was
	probably wrong
	(alloc_e_font_try): use e_font_from_gdk_name to be sure that
	fontset is used when needed

	* gtkhtml.c (client_notify_widget): update tkey compares for
	/font_variable instead of /font_variable_family and likewise for
	/font_fixed

	* htmlengine.c (html_engine_make_cursor_visible): allow cursor to
	be 1 pixel outside view - it doesn't matter now, as we don't allow
	edit margin widths in editor, once we do, we must take care about
	case when rightBorder == 0

	* htmlengine-edit-cursor.c (refresh_under_cursor): left and top
	border widths were interchanged

2001-09-10  Larry Ewing  <lewing@ximian.com>

	* htmlframe.c (html_frame_init): handle NULL and empty urls by
	loading a blank page in the frame.

2001-09-10  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_calc_size): use pixel size

	* keybindingsrc.*: update TAB/Shift TAB bindings

	* gtkhtml.c (load_keybindings): bind C-S-+ and C-+ to ZOOM_IN
	(load_keybindings): don't bind TAB/Shift TAB
	(command): simplify command binded to TAB/Shift TAB

2001-09-08  Dan Winship  <danw@ximian.com>

	* gtkhtml.c (destroy): unref the engine rather than explicitly
	destroying it.

2001-09-07  Radek Doulik  <rodo@ximian.com>

	* applied boc's patch
	* gtkhtml.c (destroy): remove set_font idle
	(destroy): remove gconf notification callback
	(init_properties_widget): remember client notify ID
	(init): zero gconf and XIM fields (it isn't needed because gnew0,
	but we does this for other fields too anyway)
	(init_properties): initialize gconf by itself if needed and print
	warning about it

	* Makefile.am (gtest_LDADD): added GCONF_LIBS

	* htmltextslave.c (get_offset_for_bounded_width): for ' ' search
	in sep instead of text->text
	(calc_size): test for split only for slave->posLen > 1
	(calc_size): split only if pos > 0

2001-09-06  Radek Doulik  <rodo@ximian.com>

	* htmlimage.c (update_or_redraw): new helper function, takes care
	about updating when new data arrives thru stream. It schedules
	update only if image size changed, otherwise it just redraws
	(html_image_factory_end_pixbuf): use update_or_redraw
	(html_image_factory_area_prepared): ditto

2001-09-03  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (parse_table): don't discard broken tables

2001-09-01  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (copy): make a reference.
	(html_image_factory_unregister): fix this properly.

2001-08-31  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_factory_unregister): change the test now
	that we unref before we remove.

2001-08-31  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cursor.c: define stipple colors on the
	beggining, it will make it easier for tigert to tune stipple
	lines colors

2001-08-30  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (draw_highlighted): updated to use faster line
	offset calculation using html_painter_calc_text_width

	* htmlpainter.c (calc_text_bytes_delta): new helper function, it
	does 1st pass of translating \t and &nbsp; - calculates right size
	of translated string
	(translate_text_special_chars): 2nd pass which finally translates
	\t and &nbsp;
	(put_last): helper inline function
	(html_painter_draw_text): use new translating function
	(html_painter_calc_text_width): ditto
	(html_painter_calc_text_width): changed line_offset to pointer, we
	update line_offset now to line offset on the end of string

	* htmltext.c (split_word_width): removed as it's broken, don't
	bother with it for now

	* htmlpainter.c (html_painter_draw_text): handle &nbsp; before
	this we have left nbsp drawing on X, but some fonts drawed char
	160 a '='
	(draw_current): helper inlined function to draw current undrawed
	text before we draw/skip special characters (&nbsp; and \t)

2001-08-29  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (calc_size): split if width > MAX_WIDGET_WIDTH
	(get_offset_for_bounded_width): new helper function
	(calc_width): update for MAX_WIDGET_WIDTH changes

	* htmlenums.h (MAX_WIDGET_WIDTH): define it as 32000

	* htmlengine.c (html_engine_calc_size): make max_width <=
	MAX_WIDGET_WIDTH

	* gtkhtml.c (gtk_html_private_calc_scrollbars): don't let width be
	greater than MAX_WIDGET_WIDTH

2001-08-28  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-properties.c (gtk_html_class_properties_new): use rather
	g_new0
	(gtk_html_class_properties_load): assign 65535 instead of 0xffff
	as default (looks like gnome_config doesn't understand HEXadecimal
	numbers)

2001-08-27  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_private_calc_scrollbars): don't let
	adjustment values go out of bounds
	(gtk_html_update_scrollbars_on_resize): new function, updates
	scroll bars after widget is resized, tries to keep view position
	({x,y}_offset on the same place
	(gtk_html_private_calc_scrollbars): keep scrollbars in bounds,
	it's probably unneeded now, but to be sure
	(size_allocate): use gtk_html_update_scrollbars_on_resize, take
	care of adjustment changes
	(button_press_event): reversed font-zooming direction

	* htmlimage.c (html_image_set_url): re-register image pointer even
	if url is the same as before as image could actually change
	between
	(html_image_set_url): schedule update and set change
	(html_image_set_border): set change
	(html_image_set_size): ditto
	(html_image_set_spacing): ditto
	(html_image_factory_unregister): unref before test for refcount,
	fix g_assert condition, unref when removing from factory hash
	table

2001-08-24  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (update_embedded): fix the x and y offsets of the
	area we begin the painter on.

2001-08-24  Radek Doulik  <rodo@ximian.com>

	* htmlengine-search.c (html_engine_search): update to respect
	search info changes

	* htmlengine-edit-cut-and-paste.c (insert_object): call
	insert_object_do only if len > 0

	* htmlsearch.c (html_search_new): when editable, start at current
	cursor position

2001-08-24  Larry Ewing  <lewing@ximian.com>

	* htmlengine-edit-selection-updater.c: remove the
	html_object_ref/unref calls on the engine.  They are are wrong.
	html_engine_edit_selection_updater_destroy will never get
	called because the ref in html_engine_edit_selection_updater_new
	will keep html_engine_destroy from ever being run.  Thanks go to
	Jacob for tracking this down. Fixes ximian #7168

2001-08-24  Radek Doulik  <rodo@ximian.com>

	* htmlprinter.c (alloc_font): extract family name from face and
	use that for font lookup

	* htmlfontmanager.c (html_font_manager_get_attr): renamed from
	get_attr, exported

2001-08-23  Radek Doulik  <rodo@ximian.com>

	* htmltext.c (check_last_white): new inlined helper function
	(check_prev_white): ditto
	(is_convert_nbsp_needed): updated, check for
	&nbsp;...&nbsp;<space>
	(write_prev_white_space):  new inlined helper function
	(write_last_white_space): ditto
	(convert_nbsp): updated, convert to &nbsp;...&nbsp;<space>
	(merge_word_width): commented out unused condition

2001-08-22  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cursor.c (html_engine_setup_blinking_cursor):
	start with shown cursor
	(html_engine_setup_blinking_cursor): call blink_timeout_cb
	directly 1st time
	(html_engine_draw_cursor_in_area): draw object cursors only when 

	* htmlengine-edit-clueflowstyle.c (get_props_and_set): when we are
	changing from !item at indent level 0, set insentation to 1 and
	likewise for item --> !item && indentation == 1

	* htmlclueflow.c (html_clueflow_set_style): don't change
	indentation here

2001-08-22  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (check_point): fix some stupidness of mine.

	* htmlclueflow.c (check_point): make sure that head and tail are
	not NULL before we dereference them.  Fixes ximian #5434.

2001-08-21  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (write_pre_tags): add some parens.

	* gtkhtml.c (gtk_html_set_paragraph_alignment): emit alignment
	changed signals for we we change the alignment.

2001-08-21  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (write_pre_tags): check for curr_tag != NULL as
	pointed out by danw

2001-08-20  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (html_clueflow_set_style): fix condition to avoid
	wrong indentation for H1

2001-08-17  Radek Doulik  <rodo@ximian.com>

	* keybindingsrc.{ms,emacs,xeamcs}: changed C-TAB rather to pure
	indent-more and S-C-TAB to indent-less

	* gtkhtml.c (insert_tab_or_indent_more_or_next_cell): new helper
	function for new GTK_HTML_COMMAND_INDENT_INC_OR_NEXT_CELL command

	* keybindingsrc.{ms,emacs,xeamcs}: added C-TAB for
	indent-more-or-next-cell

	* htmlengine-edit-cursor.c: added table and image cursor, fixed
	few problems

	* htmlcursor.h: added new type HTMLCursorRectangle

2001-08-16  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cursor.c (move_rect): extracted helper function
	(clip_rect): ditto
	(draw_cursor_rectangle): new helper function
	(html_engine_draw_cell_cursor): new method for cell cursor
	drawing, uses draw_cursor_rectangle
	(html_engine_draw_cursor_in_area): call
	html_engine_draw_cell_cursor

	* htmlclueflow.c (update_item_number): don't update for non-items
	(op_cut): fixed few cases of item sequences and for crash in case
	that flow was whole deleted and destroyed

2001-08-15  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (get_pre_padding): don't handle ordered items
	differently
	(get_prev_relative_item): new helper function
	(get_next_relative_item): ditto
	(update_item_number): use new functions, allow lists to be
	interrupted by list with higher level
	(CLUEFLOW_ITEM_MARKER): make it 6 chars wide as number markers

	* gtkhtml.c (command): don't decrease indent on list item, rather
	just delete

	* htmlclueflow.c (save_plain): add padding even to empty lines,
	so we get item headings
	(plain_get_marker): new helper function
	(plain_padding): use plain_get_marker

	* htmlengine-edit-clueflowstyle.c: updated for list changes

	* htmlengine.c: rewritten/updated [un]ordered lists

	* htmlclueflow.c: rewritten/updated [un]ordered lists, implemented
	[un]ordered lists saving

	* htmlenums.h: redefined HTMLListType
	HTML_CLUEFLOW_STYLE_LIST_ITEM instead of plenty item types

	* gtkhtml.c (clueflow_style_to_paragraph_style): added item_type
	parametr
	(paragraph_style_to_clueflow_style): likewise

	* gtkhtml-enums.h: added
	GTK_HTML_COMMAND_PARAGRAPH_STYLE_ITEMALPHA command

2001-08-14  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (update_embedded): add begin/end painter calls
	around the update calls for things like HTMLImageInput.  

2001-08-13  Radek Doulik  <rodo@ximian.com>

	* htmlselection.c (test_point): new helper function
	(html_engine_point_in_selection): new method, tests if point is in
	the selection

	* htmlclueflow.c (merge): ops, remove HTML_CLUEV cast

	* gtkhtml.c (gtk_html_update_styles): exported

	* htmlengine-edit-table.c: be more careful about HTMLObject types

	* htmlimage.c (html_image_set_url): set object change flags on url
	change

	* htmlclueflow.c (merge): copy all fields

2001-08-09  Radek Doulik  <rodo@ximian.com>

	* htmlcursor.c (backward_in_flow): fixed. before, we could end
	between two text objects in the middle of the line

2001-08-10  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (realize): if no one has put us in a scrolled window
	or set our adjustments go ahead and create the adjustments
	ourself.  This will prevent the widget from sefaulting in this
	case.

2001-08-09  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (save_plain): never let the requested length be
	less than zero.

2001-08-09  Joe Shaw  <joe@ximian.com>

	* gtkhtml.c (button_press_event): Don't grab the focus unless
	button 1 is pressed or, in editable mode, button 2 or 3 are
	pressed. This has the effect, in evolution, of allowing the folder
	tree or the message list to keep its focus if you use the mouse
	wheel in the message viewing pane.

2001-08-09  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-enums.h: added grab-focus command

2001-08-08  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-selection-updater.c (updater_idle_callback):
	restore selection_mode flag

	* htmlselection.c (html_engine_disable_selection): disable
	selection mode

2001-08-07  Radek Doulik  <rodo@ximian.com>

	* testgtkhtml.c (redirectFilter): do not use g_free on memory
	allocated by HTAnchor_address

	* gtkhtml.c (button_press_event): disable selection mode
	(command): added GTK_HTML_COMMAND_COPY_AND_DISABLE_SELECTION
	command

	* gtkhtml-properties.c (gtk_html_class_properties_new): make ms
	bindings default

	* htmlcluev.c (check_point): fix for padding != 0

2001-08-06  Larry Ewing  <lewing@ximian.com>

	* htmlclue.c (op_helper): don't segfault in the assertion if the
	clue is empty.

2001-08-03  Radek Doulik  <rodo@ximian.com>

	* htmlengine.h: added block_selection flag

	* htmlselection.c (html_engine_activate_selection): test for
	block_selection
	(html_engine_block_selection): new helper function
	(html_engine_unblock_selection): ditto

	* htmlengine-edit-cut-and-paste.c (delete_object): send delete
	event
	(insert_empty_paragraph): replace empty text in new empty flow by
	text with current style

	* gtkhtml.c (gtk_html_editor_event): new helper function

	* gtkhtml-enums.h: added GTK_HTML_EDITOR_EVENT_DELETE

2001-08-02  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-table.c (table_set_bg_color): use gdk_color_copy
	and gdk_color_free instead of g_new and g_free

	* htmltablecell.c (save): save BACKGROUND as well

	* htmlobject.c (html_object_get_cursor): make cursor of non-text
	objects be at least 10 points high

2001-07-31  Larry Ewing  <lewing@ximian.com>

	* htmltable.c: wrap debug ouput with #ifdef GTKHTML_DEBUG_TABLE

	* htmlengine-edit-cut-and-paste.c: wrap debug ouput with #ifdef GTKHTML_DEBUG_TABLE

	* htmltextslave.c (draw_highlighted): remove debugging output.

2001-07-31  Radek Doulik  <rodo@ximian.com>

	* htmlfontmanager.c (html_font_set_init): use memset rather than
	bzero

	* htmlengine-edit-cursor.c (html_engine_hide_cursor): don't draw
	cursor here

	* htmltext.c (get_cursor_base): set base to Text coordinates if
	there are no slaves
	(get_cursor): if there are no slaves, use Text ascent/descent
	(html_text_op_cut_helper): remove text slaves
	(remove_text_slaves): new extracted function
	(fit_line): use remove_text_slaves

2001-07-30  Larry Ewing  <lewing@ximian.com>

	The following is a patch from Damian Ivereigh <damian@cisco.com>
	it has only the slight modification of moving the new members into
	the priv structure rather than the public one.
	
	* htmlengine-edit-cut-and-paste.c (html_engine_copy_object): add
	new function.
	(html_engine_copy): use html_engine_copy_object.

	* htmlengine-edit-cut-and-paste.h: add html_engine_copy_object.

	* gtkhtml-private.h: add holders for the primary selection.

	* gtkhtml.h: change the request_paste prototype.

	* gtkhtml.c (button_press_event): update the primary selection.
	and set in selection when if we've selected a word or line.
	(button_release_event): copy to the primary selection.
	(selection_get): get the selection based on which one atom is
	passed.
	(selection_received): distinguish between the clipboard and
	primary.  Pass the selection type when we recurse.
	(gtk_html_request_paste): add atom type parameter and pass it
	along when we convert.
	(init): initialize the primary selection holders and add the
	clipboard target.
	(gtk_html_cut): cut to the clipboard.
	(gtk_html_copy): copy to the clipboard.
	(gtk_html_paste): paste from the clipboard.

2001-07-30  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (pref_right_margin): reuse old hack to keep plain
	text editing work, before I fix aligned objects calculation

2001-07-26  Chema Celorio  <chema@celorio.com>

	* htmlimage.c (html_image_factory_area_updated): remove a
	g_warning

2001-07-27  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (write_pre_tags): test if flow doesn't contain
	table, in this case we don't want to save <BR> or \n

	* htmltablecell.c (save): commnted out my hack for &nbsp; saving
	to empty cells

	* htmlengine.c (parse_table): insert empty paragraph in empty
	cells

2001-07-26  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_command): update styles if needed

	* gtkhtml-enums.h: added commands for delete table/row/col/cell
	contents

	* gtkhtml.c (command): use gtk_html_undo/redo rather than
	html_engine_ ones

	* htmltablecell.c (merge): fixed cells merging

	* gtkhtml.c (command): set update_styles for more commands
	(update_styles): fixed indentation change signal emiting
	(key_press_event): don't check cursor position for update, it's
	obsolete

2001-07-25  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-table.c (html_engine_table_set_spacing): added
	relative parameter
	(html_engine_table_set_padding): ditto
	(table_set_padding): check for t != NULL
	(table_set_spacing): ditto

	* keybindingsrc.ms: added bindings for table spacing/padding, I
	must change spell checking bindings to avoid conflicts :-(

	* gtkhtml-enums.h: added new command for table spacing/padding
	change

2001-07-25  Jon Trowbridge  <trow@ximian.com>

	* htmlsearch.c (html_search_set_forward): Check that
	search != NULL. (Bug #4869)

2001-07-24  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-table.c (html_engine_get_table): don't fail,
	just return NULL

	* htmlengine-edit-tablecell.c (html_engine_get_table_cell): don't
	fail, just return NULL

	* htmlengine-edit-cut-and-paste.c (append_object): remove unwanted
	empty flows, fix cursor position

	* htmlengine-edit.c (html_engine_next_cell): fixed for multi flow
	cells
	(html_engine_prev_cell): likewise

	* htmlengine-edit-tablecell.c
	(html_engine_delete_table_cell_contents): new method

	* htmlengine-edit-table.c (html_engine_delete_table): new method

2001-07-23  Jon Trowbridge  <trow@ximian.com>

	* htmlengine-search.c (html_engine_search_set_forward): Added.
	Allows you to change the direction of an on-going search.

	* gtkhtml-search.c (gtk_html_engine_search_set_forward): Added.
	Allows you to change the direction of an on-going search.

2001-07-23  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-clueflowstyle.c: remove undo field as it's not
	needed
	(undo_or_redo): use dir parameter
	(style_operation_new): remove undo parameter

	* htmlengine-edit-table.c (html_engine_table_goto_0_0): fixed loop
	condition
	(html_engine_table_goto_0_0): renamed, exported
	(html_engine_table_goto_col): likewise
	(html_engine_table_goto_row): likewise
	(html_engine_table_goto_pos): likewise

2001-07-20  Radek Doulik  <rodo@ximian.com>

	* htmlcursor.c: reverted ettore's revert of begin/end line
	enhancement for table cells, because otherwise it breaks prev/next
	cell methods. I hope to consult that with ettore to find out
	solution for his "cursor is going outside document range" problem

	* htmlengine-edit-table.c (goto_col): new helper function
	(goto_row): likewise
	(goto_begin): likewise
	(html_engine_table_set_rows): new method
	(html_engine_table_set_cols): new method

	* htmlengine-edit.c (html_engine_next_cell): new function,
	extracted
	(html_engine_prev_cell): new function, extracted

2001-07-19  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-stream.c (gtk_html_stream_new): add a types function
	that returns the supported content types on the stream.  Now it is
	possible for the app to figure out wether or not it should wrap
	image data in html for display.
	(stream_log_types): add a log implementation of the types function.
	(gtk_html_stream_log_new): take an already existing stream instead
	of all the component parts, this makes it slightly easier to log
	random streams.
	(gtk_html_stream_get_types): get the supported content types of a
	given stream.

	* gtkhtml-stream.h: add gtk_html_stream_get_types and fixup other
	prototypes.

	* gtkhtml-types.h: add GtkHTMLStreamTypesFunc typedef.

	* htmlengine.c (html_engine_stream_types): add engine
	stream_types.
	(html_engine_stream_write): renamed from html_engine_write.
	(html_engine_strean_end): renamed from html_engine_end.
	(html_engine_begin): use the reworked html_stream_log_new function.

	* htmlimage.c (html_image_factory_types): add a simple stream type
	function.
	(html_image_pointer_load): add the types function.

2001-07-18  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_get_max_width): change return value to
	gint, take care to return values > 0

2001-07-17  Larry Ewing  <lewing@ximian.com>

	* htmlobject.c (html_object_get_uris): #if 0 this unused function.
	
	* htmlimage.c (html_image_factory_get_engine): #if 0 it out.

2001-07-17  Radek Doulik  <rodo@ximian.com>

	* htmltokenizer.c (html_tokenizer_real_end): return blocked tokens
	to tokenizer

	* gtkhtml.c (delete_one): take care of cursor offset when
	deleteing container

	* htmlengine-edit-cut-and-paste.c (delete_object_do): removed
	expected_len hack

	* htmltable.c (cut_partial): don't shrink when start_col ==
	end_col

	* htmlengine.c (html_engine_calc_size): set max_width to MAX(view
	width, min_width)

	* htmlclueflow.c (calc_size): do not allow width exceed max_width

2001-07-17  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-embedded.c: add some missing documentation.

2001-07-13  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_table): initialize cellwidth_percent and
	cellheight_percent each time through the loop.

2001-07-12  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-stream.h: add types include.

2001-07-08  Larry Ewing  <lewing@ximian.com>

	Chema <chema@ximian.com> pointed out that we were inheriting a lot
	of includes from <libgnomeprint/gnome-print.h> which is getting
	cleaned up in the gnome-print trunk.  This is basically his patch
	minus a couple things I didn't want to do yet.
	
	* htmltokenizer.c: add gtkobject include.

	* htmltextinput.c: add gtksignal include.
	* htmlgdkpainter.c: same.

	* htmltable.c: include stdio.h.
	* htmltextslave.c: same. 
	* htmlengine.c: same.
	* gtkhtmldebug.c: same.
	* htmlengine-edit-cut-and-paste.c: same.

	* htmltablecell.c (merge): use g_print.
	* htmlengine-edit-table.c (html_engine_insert_table_row): same.

	* htmlimage.c (get_src): add missing prototype.  use g_print.

	* htmlform.h: add gtkradiobutton.h include.

	* htmlengine-edit-text.c (upper_lower): remove debugging printf.

	* gtkhtml-stream.c: add missing includes.

2001-07-05  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (focus): add Jacobs temporary fix to let focus work
	better.

2001-07-02  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_class_init): hook up get_src.
	(get_src): add get_src implementation.

	* htmlobject.h: add html_object_get_src prototype, and get_src
	class method.

	* htmlobject.c (get_src): add default get_src implementation.
	(html_object_get_src): add public method for getting source url.

2001-07-01  Larry Ewing  <lewing@ximian.com>

	* htmltext.c (set_link): respect new semantics.

	* htmllinktext.h (html_link_text_to_text): remove unused
	prototype.

	* htmllinktext.c (set_link): make this respect the new set_link
	semantics.
	(remove_link): removed.
	(html_link_text_set_url): remove this completely unused function.
	
	* htmlobject.h: remove remove_link from the class structure,
	html_object_set_link (o, color, NULL, NULL) has the same effect
	now and we might as well clean up the class structure a little.

	* htmlobject.c (html_object_remove_link): make remove_link proxy
	to set_link.

	* htmlimage.c (set_link): clean this up a little.
	(html_image_init): fix dup target not url.
	(remove_link): removed.
	(html_image_class_init): remove remove_link.
	(html_image_factory_area_updated): add area_updated handler.
	(html_image_factory_register): connect handler.

	* htmlpainter.c (html_painter_set_font_face): remove redundant if.

	* htmlframe.c (calc_size): use html_frame_set_scrolling.

2001-06-29  Ettore Perazzoli  <ettore@ximian.com>

	I am reverting Radek's changes of 2001-06-21 as they make cursor
	movement at the beginning or the end of the document behave
	erratically.

	* htmlcursor.c (forward_in_flow): `#if 0'ed out.
	(backward_in_flow): Likewise.
	(html_cursor_end_of_line): Use `forward()' instead of
	`forward_in_flow()'.
	(html_cursor_end_of_line): Use `backward()' instead of
	`backward_in_flow()'.

2001-06-26  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (command): renamed SET_MARK to SELECTION_MODE, use
	selection mode flag
	(cursor_move): use selection mode flag
	(load_keybindings): added more hardwired bindings

	* htmlengine.h: added selection_mode flag

	* htmlengine.c (html_engine_get_view_width): don't allow width < 0
	(html_engine_get_view_height): likewise

2001-06-25  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (delete_one): new helper function, deletes container
	or cursor position +/-1

	* htmlengine-edit-cut-and-paste.c (html_engine_delete_container):
	new function, deletes whole container

	* htmlfontmanager.c (get_real_font_size): redone, now it's more
	similiar to mozilla font scaling

	* gtkhtml.c (gtk_html_set_magnification): don't allow sizes < 4

2001-06-23  Larry Ewing  <lewing@ximian.com>

	* htmltokenizer.c (add_byte): new function to sanitize invalid
	utf-8 strings.
	(in_plain): use add_byte.

2001-06-21  Radek Doulik  <rodo@ximian.com>

	* htmlcursor.c (forward_in_flow): new helper function
	(backward_in_flow): ditto
	(html_cursor_end_of_line): use forward_in_flow
	(html_cursor_beginning_of_line): use backward_in_flow

	* htmltable.c (calc_column_width_step): removed hopefully last
	forgoten substract by table->padding

2001-06-20  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_halign): helper function to parse halign
	values.
	(add_pending_paragraph_break): move this logic that is duplicated
	in several places into a function.
	(parse_table): use parse_halign, and add_pending_paragraph.
	(parse_a): small cleanups, add id logic.
	(parse_f): remove redundant NULL checks.
	(parse_s): ditto.
	(parse_h): use parse_halign.
	(parse_p): ditto.
	(parse_d): ditto.
	(parse_l): use add_pending_paragraph.
	(append_element): ditto.
	(parse_o): rework if statement.
	(parse_u): ditto.

2001-06-20  Radek Doulik  <rodo@ximian.com>

	* htmlcluev.c (find_free_area): uncomment loop break try_y ==
	next_y - not sure why it was commented out, I am going to
	investigate it more

	* gtkhtml.c (set_magnification): new helper function
	(gtk_html_set_magnification): make it work for pages with
	frames/iframes

2001-06-19  Radek Doulik  <rodo@ximian.com>

	* htmltablecell.c (calc_min_width): use parent method

	* htmltable.c (calc_column_width_step): don't add padding
	(html_table_set_cells_max_width): don't substract padding

	* htmlcluev.c (get_right_margin): substract 2 * padding
	(do_layout): fix for padding
	(calc_min_width): new method, takes care for padding
	(calc_preferred_width): ditto
	(set_max_width): fix for padding

	* htmlobject.c (html_object_get_left_margin): added painter parameter
	(html_object_get_right_margin): ditto

	* htmlgdkpainter.c (alloc_e_font_try): added medium, bold, roman,
	italic parameters
	(try_font_possible_names): new function, try more weights/slants
	(alloc_e_font): use try_font_possible_names
	(alloc_e_font_try): don't allow sizes < 0

2001-06-18  Radek Doulik  <rodo@ximian.com>

	* htmlfontmanager.c (html_font_manager_clear_font_cache): new
	method
	(html_font_manager_set_magnification): ditto

	* gtkhtml.c (gtk_html_set_magnification): new method, sets
	magnification, which is used for font sizes.
	(gtk_html_zoom_in): new method
	(gtk_html_zoom_out): ditto
	(gtk_html_zoom_reset): ditto
	(load_keybindings): bind C-=/C--/C-8 and keypad C-+/C--/C-* for
	zooming
	(button_press_event): bind C-scroll wheel to zooming,
	unfortunatelly Gtk is a little broken and doesn't pass these
	events to widgets with visible scrollbars :-(
	(gtk_html_command): renamed from gtk_html_editor_command

	* gtkhtml-enums.h: new commands for zooming

	* htmlframeset.c (set_max_width): implemented

	* gtkhtml.c (gtk_html_set_iframe_parent): added frame parameter,
	remember frame in html

	* htmlengine.c (html_engine_get_max_width): take care of FRAMES
	and IFRAMES

	* gtkhtmldebug.c (gtk_html_debug_dump_object): added FRAME and
	FRAMESET

	* gtkhtml.h: added frame pointer

2001-06-14  Radek Doulik  <rodo@ximian.com>

	* htmlgdkpainter.c (alloc_e_font_it_known): handle NULL face
	properly
	(alloc_e_font_it_known): new helper function, extracted
	(alloc_e_font_it): 1st try to load exact size font, if not
	available then try to look for nearest size

	* htmlengine-edit-table.c (table_set_border_width): don't allow
	border < 0

2001-06-13  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-table.c (table_set_bg_color): free bgColor
	before set it to NULL

2001-06-12  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (html_table_end_table): check for table->cells
	[r][c]

2001-06-11  Radek Doulik  <rodo@ximian.com>

	* htmltablecell.c (save): save &nbsp; to empty cells

	* htmltable.c (check_point): check for valid column
	(html_table_end_table): remove empty cells

	* gtkhtml.c (replace_nbsp): new helper function
	(selection_get): replace &nbsp; with ' ' for
	STRING/TEXT/COMPOUND_TEXT

	* htmlengine-edit-table.c (html_engine_insert_table): new function

2001-06-08  Radek Doulik  <rodo@ximian.com>

	* htmltokenizer.c (in_comment): don't allow comment end like this
	-a->

2001-06-07  Radek Doulik  <rodo@ximian.com>

	* Makefile.am (INCLUDES): added IMLIB cflags

	* htmlengine-edit-cut-and-paste.c (delete_object): check table
	only when cursor and mark are in non-empty flows
	(insert_object_do): be more careful about paragraph inserting
	around tables
	(insert_empty_paragraph): new extracted method, use undo direction
	(html_engine_insert_empty_paragraph): use insert_empty_paragraph
	(append_object): increment len by 2 when splitting

	* htmlclueflow.c (op_helper): don't handle tables specialy

	* htmlenumutils.c (html_valign_name): return "middle" MIDDLE value
	instead of "center"

	* htmlengine-edit-cut-and-paste.c (append_object): freeze/thaw
	engine and set changes
	(html_engine_append_object): removed freeze/thaw here
	(insert_object): moved tables fix here (from insert_object_do as
	we don't want two UNDO steps to be created)

	* htmlinterval.c (html_interval_flat): make this method public
	(html_interval_select): use flat interval

	* htmltext.c (word_get_position): kill warning

2001-06-05  Larry Ewing  <lewing@ximian.com>

	* htmlframe.c (html_frame_init): attach submit to frame_submit.
	(frame_submit): proxy signal, needs a little more love.

	* htmltextinput.c (html_text_input_key_pressed): fix a stupid cut
	& paste bug so that the enter handler actually works.

	* htmlradio.c (html_radio_init): call html_form_add_radio and
	change protype.
	(html_radio_new): change prototype.

	* htmlradio.h (html_radio_new): change prototype.

	* htmlengine.c (parse_input): fix to html_radio_new to match the
	new protoype.

	* htmlform.h: add prototype for html_form_add_radio.

	* htmlform.c (html_form_destroy): free the group hash.
	(html_form_add_radio): new function to handle radio groups
	correctly.
	(destroy_radio): helper to destroy the has entries.

2001-06-05  Radek Doulik  <rodo@ximian.com>

	* htmltablecell.c (calc_min_width): fixed for NOWRAP and
	non-fixed-width case

2001-06-04  Larry Ewing  <lewing@ximian.com>

	* htmltextinput.c (html_text_input_key_pressed): Make enter focus
	on the next widget or submit the form if there are no more
	widgets.  This is based on a patch by someone who's name I can't
	find, I'll update this entry when I do.
	(html_text_input_init): attach html_text_input_key_pressed to the
	widget.

	* htmlengine.c (html_engine_destroy): destroy the stacks we had
	missed.
	(parse_f): destroy the frame if we don't add it.
	(parse_iframe): add disabled code to use frame here.
	(html_engine_stop_parser): clear the frame stack.

2001-06-02  Larry Ewing  <lewing@ximian.com>

	* htmlframe.c (destroy): free the url.
	(html_frame_init): set the initial margins on the frame to 0 this
	seems to be what mozilla does.

	* htmlframeset.c (calc_size): free the temp arrays.

2001-06-01  Larry Ewing  <lewing@ximian.com>

	* htmltablecell.c (calc_min_width): fix the logic so that
	min_width doesn't return larger than needed be we still break the
	loop.

	* htmlframe.c (calc_min_width): Fix the logic for frames that have
	a specified width;

	* htmlframe.c (frame_url_requested): increment cur in the loop.
	(set_max_width): if the size is given the min width is

	* htmltablecell.c (calc_min_width): break the resize loop that was
	occuring when no_wrap and HTML_OBJECT_FLAGS_FIXED_WIDTH were both
	set (fixes http://bugzilla.helixcode.com/show_bug.cgi?id=3164).
	
2001-05-31  Larry Ewing  <lewing@ximian.com>

	* htmlframe.c (check_point): take the scrolling into account when
	doing check_point.

	* htmlframeset.c (html_frameset_init): ugh, fix bug introduced in
	the reworking.

	* htmlshape.c (html_shape_point): remove silly macros and fix
	distance macro so that circles actually work.

	* htmlimage.c (image_update_url): fix this properly this time.

	* htmlshape.c (html_shape_point): add tests for poly and default.
	(html_shape_new): move from separate shape structures to a single
	structure with a pointer array holding HTMLLengths.  I still need
	to add support for actually using the percentage lengths.

	* htmlshape.h: add prototypes for HTMLLength functions.

	* htmlframeset.c (html_frameset_init): move the HTMLLength
	functions into htmlshape since we can use them there, and make
	them public.

	* htmlengine.c (parse_a): let the shape routine figure out if the
	shape is valid if we have either a type or coords.

	* htmlimage.c (image_update_url): translate x and y by o->x and o->y.

2001-05-31  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_set_map): rename and add ismap logic. 
	(destroy): free final_url.
	(copy): copy new members.
	(image_update_url): add ismap logic.
	(html_image_init): initialize new members.

	* htmlimage.h: Add ismap and final_url members.

	* htmlengine.c (parse_i): add ismap support.

2001-05-30  Radek Doulik  <rodo@ximian.com>

	* htmltablecell.c (save): save align/valign

	* htmlobject.c (set_painter): as below
	(html_object_set_painter): as below, simplyfied

	* htmliframe.c (set_painter): as below

	* htmlframe.c (set_painter): removed max_width parameter

	* htmlengine.c (html_engine_set_painter): don't call
	html_object_clear_word_width as it's no more needed
	(html_engine_set_painter): don't call calc_min_width as this is
	also no more needed
	(html_engine_set_painter): don't compute max_width as it's now
	handled properly in calc_size using get_page_width/height
	(html_engine_calc_size): use get_page_width/height, simplified
	(get_max_width): new helper function

	* htmlclueflow.c (pref_right_margin): removed obsolete method
	(calc_size): use html_object_get_right_margin instead of
	pref_right_margin
	(calc_size): take care of PRE when calling fit_line

	* gtkhtml.c (size_allocate): do calc size always

	* htmlprinter.c (class_init): as below

	* htmlplainpainter.c (class_init): as below

	* htmlgdkpainter.c (class_init): implemented and plugged in new
	virtual methods

	* htmlpainter.h: added new virtual methods get_page_width/height

	* htmltablecell.c (save): updated to use percent_width
	(html_table_cell_init): initialize percent_width, percent_height

	* htmlengine-edit-tablecell.c (html_engine_table_cell_set_width):
	new function

	* htmltablecell.c (save): use heading
	(save): use no_wrap

	* htmlengine-edit-tablecell.c
	(html_engine_table_cell_set_no_wrap): new function
	(html_engine_table_cell_set_heading): ditto

	* htmlclueflow.c (get_default_font_style): take care of heading
	cells
	(html_clueflow_get_halignment): ditto

	* htmltablecell.h: added heading flag

	* htmlengine.c (parse_table): use Cell::no_wrap instead of setting
	NOWRAP style, which has been removed (now we can have nowrap cells
	with all possible clueflow styles, which was before impossible)
	(parse_table): remember heading in cell

	* htmltablecell.h: added no_wrap flag

	* htmltablecell.c (calc_min_width): use no_wrap

2001-05-30  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (image_update_url): temp hack to piggyback url
	selection onto point calculation.  
	(check_point): call image_update_url.
	(html_image_set_usemap): add.
	(html_image_init): initialize usemap.
	(destroy): free usemap.
	(copy): dup usemap.

	* htmlimage.h: add html_image_set_usemap prototype, and usemap
	member.

	* htmlmap.h: format change ;)

	* htmlengine.c (parse_i): add the map to the image
	(parse_m): fix length.

	* htmlframeset.c (calc_min_width): add hack to force size
	calculation when the widget gets a new allocation.
	(forall): fix this.
	(is_container): add.
	remove debug g_warnings.

2001-05-29  Larry Ewing  <lewing@ximian.com>

	* htmltokenizer.c (end_tag): remove frameset warnings.

	* htmlengine.h: add new members for frame and map support.

	* htmlengine.c (close_anchor): remove extra if.
	(parse_frameset): new function to handle framsets.
	(parse_iframe): cleanup attribute parsing, add stubs.
	(parse_a): add initial area handling, misc cleanups.
	(parse_f): add frame and frameset parsing.
	(parse_m): add initial map handling.
	(parse_n): add stub fror noframe handling.
	(html_engine_init): initialize framestack and map.

	* htmlclueflow.c (save_plain): fix the wraping function that was
	broken in the move to g_unicode.

	* htmlenums.h: add new types.

	* htmltype.c (html_types_init): init new types.
	(html_type_name): add new types.

	* htmltypes.h: add new types.

	* Makefile.am: add new files.

	* gtkhtml.c (on_object): remove redundant checks.
	(set_pointer_url): move logic here.

	* htmlframeset.h:
	* htmlframeset.c:
	* htmlframe.c:
	* htmlframe.h:
	* htmlmap.c:
	* htmlmap.h:
	* htmlshape.c:
	* htmlshape.h: Commit pending files without hooking them into the
	build so that I can use cvs to track revisions.

2001-05-29  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-clueflowstyle.c
	(html_engine_get_current_clueflow_alignment): use
	html_clueflow_get_halignment

	* htmlengine.c (parse_table): use halign of table cells
	(parse_c): </center> resets divAlign to NONE
	(html_engine_parse): initialize divAlign to NONE
	(parse_table): for non-heading table cells init halign to NONE

	* htmlclueflow.c (html_clueflow_get_halignment): if halign ==
	NONE, then try to use parent cell halign

2001-05-29  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (set_pointer_url): add helper function.

	* htmltablecell.c (save): save rowspan and colspan when writing
	the table back out.

2001-05-28  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (html_clueflow_get_line_offset): initialize o it
	was never getting set.

2001-05-25  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (check_table_0): new helper
	function
	(check_table_1): ditto
	(delete_object): shrink selection before delete (for some table
	related cases)

2001-05-24  Radek Doulik  <rodo@ximian.com>

	* replaced HTML_VALIGN_CENTER with HTML_VALIGN_MIDDLE everywhere

	* htmlengine.c (parse_i): replace align=center with align=middle
	according to standard

2001-05-23  Larry Ewing  <lewing@ximian.com>

	* htmlprinter.c (draw_text): terminate the temporary string at the
	last character, not the last character + 1.

	* htmltokenizer.c (end_tag): do not discard the line feeds
	following a opening tag inside a pre tag, but discard them
	otherwise.  This should avoid the unintentional spaces introduced
	by the previous change.

2001-05-22  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_d): close the flow unconditionaly for dd but
	only change the indent level if we are in a list.

	* htmltokenizer.c (end_tag): only discard the first LF in an
	opening tag if it is a pre or textarea element (fixes
	http://bugzilla.helixcode.com/show_bug.cgi?id=2093)
	
2001-05-22  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-tablecell.c (html_engine_table_cell_set_valign):
	new method
	(html_engine_table_cell_set_halign): ditto

	* htmltablecell.c (html_table_cell_init): changed initial
	alignment

	* htmlengine-edit-tablecell.c
	(html_engine_table_cell_set_bg_color): new method
	(html_engine_table_cell_set_bg_pixmap): ditto
	(html_engine_get_table_cell): ditto

2001-05-21  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-table.c (html_engine_table_set_align): updated
	to use ClueAligned
	(html_engine_table_set_width): new function

2001-05-18  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (parse_table): added support for align=left/right
	for tables

	* htmlengine-edit-table.c (html_engine_table_set_align): new
	function

2001-05-18  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_d): fix dt rendering so that it always
	splits the flow, even outside of dl, this is "feature" of
	netscape/mozilla is used in several prominant places like bonsai
	(fixes http://bugzilla.helixcode.com/show_bug.cgi?id=2043).

2001-05-17  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_f): fix color parsing so that it pushes the
	current color rather than black if no color is specified (fixes
	http://bugzilla.ximian.com/show_bug.cgi?id=2911).

2001-05-17  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-table.c (html_engine_table_set_bg_color): alloc
	space for new color if needed

	* htmltablecell.h: removed padding

	* htmlengine-edit-table.c (new_cell): don't set cell background
	from table (it's resolved dynamically now)
	(html_engine_table_set_bg_color): allow NULL c which means disable
	bg color
	(html_engine_get_table): new helper function
	(html_engine_table_set_padding): new method
	(html_engine_table_set_border_width): added t parameter

	* htmlimage.c (html_image_pointer_load): ref image pointer
	(html_image_factory_register): don't ref image pointer before
	loading (it's done in load now) but ref all image pointers (for
	register)
	(html_image_factory_unregister): unref image pointer in unregister

	* htmltablecell.c (draw_background_helper): use table bg pixmap if
	needed

	* htmlengine.c (parse_table): don't use table bg pixmap as starting
	row bg pixmap

	* htmlengine-edit-table.c (html_engine_table_set_bg_color): new
	method
	(html_engine_table_set_bg_pixmap): new method

	* htmlengine.c (parse_table): don't use table bg color as starting
	row color

	* htmltablecell.c (draw_background_helper): use table bg color if
	needed

2001-05-15  Radek Doulik  <rodo@ximian.com>

	* htmltablecell.h (HTML_IS_TABLE_CELL): renamed from
	IS_HTML_TABLE_CELL

	* tabs should work now nicely for plain text mode and for PRE

2001-05-10  Jon Trowbridge  <trow@ximian.com>

	* htmliframe.c (html_iframe_init): When rendering a frame, make
	sure that you use the same kind of tokenizer as is being used
	by the parent widget.

	* htmltokenizer.c (html_tokenizer_class_init): Change "begin" and
	"end" from virtual functions to signals with the HTMLTokenizer's
	traditional begin and end behavior as the default handlers.  Add
	the "fully_tokenized" signal.
	(html_tokenizer_begin): Replace the virtual function machinery
	with a signal emission.
	(html_tokenizer_end): Replace the virtual function machinery with
	a signal emission.
	 (html_tokenizer_clone): Added.  Allocates a tokenizer of the same
	type.

2001-05-10  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (mouse_change_pos): make the magic distance threshold
	depend on the space width.
	(focus): start of new focus handler.

	* htmltext.c: update the magic url matching regex to handle
	unsername:passwd@ and % escapes and keep trailing slash.

2001-05-09  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_color): rework the code to handle broken
	color specifications the same way netscape and mozilla do.  We
	were still missing one case.

2001-05-09  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (command): added insert-tab and
	insert-tab-or-indent-more commands

	* htmltokenizer.c (in_comment): allow all characters to be between
	-- and > on comment end (it's not as standard says, but we
	probably want to act the same as netscape and mozilla)

2001-05-08  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (draw_spell_errors): updated

	* htmlgdkpainter.c (draw_spell_error): updated

	* htmlpainter.c (html_painter_draw_text): don't draw when
	drawed_len > len
	(html_painter_draw_spell_error): removed off parameter, now we
	call draw_spell_error with exact x position and text which should
	be error-highlighted

	* htmlgdkpainter.c (draw_spell_error): use line_offset

	* gtkhtml-properties.c: added select prev/next word commands

	* gtkhtml.c (move_selection): select prev/next word

	* htmlpainter.c (html_painter_draw_text): slightly refactored

2001-05-07  Radek Doulik  <rodo@ximian.com>

	* htmltextslave.c (draw_normal): use line_offset
	(draw_highlighted): ditto
	(get_offset_for_pointer): ditto

	* htmltext.c (offset_to_line_offset): new helper function
	(get_line_length): new method implementation
	(html_text_get_line_offset): new method
	(html_text_get_line_offset_at_offset): new method
	(calc_word_width): added line_offset parameter
	(html_text_request_word_width): use line_offset
	(get_cursor_base): use line_offset

	* htmlpainter.c (html_painter_calc_text_width): added line_offset
	parameter, handle tabs properly
	(html_painter_draw_text): ditto

	* htmlobject.c (get_line_length): new generic method
	implementation
	(html_object_get_line_length): new method, returns length in
	line_offset metric (offset with tabs expanded)

	* htmlclueflow.c (html_clueflow_get_line_offset): new function

2001-05-04  Radek Doulik  <rodo@ximian.com>

	* htmltokenizer.c (html_tokenizer_add_pending): add '\t' for tab,
	not spaces
	removed prePos counter

2001-05-06  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_input): add missing break, thanks go to
	"Giancarlo Capella" <capella@teleion.it> for finding this.
	(parse_body): s/p/e/

2001-05-03  Larry Ewing  <lewing@ximian.com>

	* htmliframe.c (calc_size): use either e_scroll_frame or scrolled
	window.
	(html_iframe_init): ditto.

2001-05-06  Jon Trowbridge  <trow@ximian.com>

	* htmltext.c (text_len): Call g_utf8_validate on the string
	before g_utf8_strlen-ing it.

	* htmltypes.h: Added typedef for HTMLTokenizerClass.

	* htmlengine.c (html_engine_set_tokenizer): Added.  Allows the
	HTMLEngine's tokenizer to be changed.

	* htmltokenizer.c: Converted HTMLTokenizer to be a GtkObject with
	a vtable for the basic operations.  Renamed the existing functions
	as html_tokenizer_real_foo and made them the default vtable
	entries for HTMLTokenizerClass.  Changed the html_tokenizer_foo
	functions to just be wrappers around calls to the appropriate
	vtable entries.  The previous struct HTMLTokenizer, which was
	totally private, is now struct _HTMLTokenizerPrivate.  Lots of
	references to entries in that struct have been changed to reflect
	all of the renaming, but no non-trivial changes were needed to
	make everything work.

2001-05-03  Radek Doulik  <rodo@ximian.com>

	* htmlundo.c (html_undo_do_undo): block events during undo/redo
	(html_undo_do_redo): ditto

	* htmlengine-edit-cut-and-paste.c (delete_object_do): move cursor
	to right position after cut & merge

	* htmlclue.c (op_helper): append only non-null cut/copied objects
	to result

	* htmlclueflow.c (could_merge): new helper function, extracted
	from merge
	(op_helper): new helper function, extracted from op_cut and
	op_copy
	(op_helper): take care of operations which boundary begins/ends on
	table end/begin

	* gtkhtml.c (gtk_html_editor_event_command): take care of
	block_events flag

	* htmlengine.h: added block_events flag

	* gtkhtml.c (gtk_html_undo): added update_styles call
	(gtk_html_redo): ditto

	* htmlenums.h: added HTML_ENGINE_SET_CLUEFLOW_INDENTATION_ALL

	* htmlengine-edit-cut-and-paste.c (append_object):
	added dir parameter
	(append_object): new method, extracted from
	html_engine_append_object
	(insert_object_do): added dir parameter

2001-05-02  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (gtk_html_load_from_string): use stream_write instead
	of write.

	* gtkhtml.h: remove unused prototype.

	* gtkhtml-stream.h: remove prototypes for nonexistant functions.

	* htmlengine.c (parse_iframe): parse the frameborder option, and
	cleanup the width/height parsing.

2001-04-30  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-properties.c: Frederic Crozat <fcrozat@mandrakesoft.com>
	- This patch (against gtkhtml 0.9.2) adds a missing include and therefore
	remove a warning when compiling with latest glibc (2.2.2)

2001-04-29  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit.c (html_engine_spell_check_range): if (begin)
	object hasn't parent just return

	* htmlclueflow.c (html_clueflow_spell_check): keep
	g_return_if_fail as spell_checking fail is not fatal, so we want
	only warning and no crash

	* htmlengine-edit.c (html_engine_spell_check_range): check if
	object has parent and if it's clueflow

2001-04-27  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (html_clueflow_spell_check): change assertion
	into g_return_if_fails to keep the flow == NULL case from being
	fatal until it can be looked into more deeply.

2001-04-27  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (set_cursor_at_end_of_object):
	new extracted function, sets cursor to end of object and adds len
	to the cursor position
	(insert_object_do): ops, moved set_cursor_at_end_of_object to
	right place

	* htmltable.c (cut_partial): don't merge if start == end

	* htmlobject.c (html_object_get_bound_list): test for list->next
	also to avoid leafs

	* htmlengine-edit-cut-and-paste.c (remove_empty_and_merge): don't
	test left == NULL resp. right == NULL as it's already tested above
	(insert_object_do): use html_object_heads_list and
	html_object_tails_list
	(get_tree_bounds_for_merge): remove - obsolete
	(html_object_heads_list and html_object_tails_list extracted from
	this one

	* htmlobject.c (html_object_tails_list): new (extracted) method
	(html_object_heads_list): ditto
	(html_object_merge_down): new method
	(merge_down): new helper function

	* htmltable.c (cut_partial): take care of case when cursor is on
	table boundary
	(cut_partial): when start_col == end_col, merge approriate cells

2001-04-25  Dan Winship  <danw@ximian.com>

	* gtkhtml.c, htmlclueflow.c, htmlcursor.c, htmlcursor.h,
	htmlengine-edit-cut-and-paste.c, htmlengine-edit-movement.c,
	htmlengine-edit.c, htmlengine-edit.h, htmlengine-save.c,
	htmlengine-search.c, htmlengine.c, htmlentity.c, htmlgdkpainter.c,
	htmlinterval.c, htmlplainpainter.c, htmlprinter.c, htmlsearch.c,
	htmltext.c, htmltext.h, htmltextslave.c, htmltokenizer.c,
	htmltokenizer.h:
	Replace libunicode calls with gunicode and e-unicode calls. 

2001-04-25  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_schedule_redraw): new functions,
	schedules redraw to be done in idle time
	(html_engine_block_redraw): block redraw until unblock is called
	(html_engine_unblock_redraw): unblock redraws, redraw if needed

	* gtkhtml.c (command): new commands - block/unblock redraw

	* htmlselection.c (html_engine_activate_selection): activate only
	if widget is already realized

	* htmlobject.c (destroy): free object data
	(html_object_set_data): change type of value to gchar *
	(html_object_get_parent_level): new method, returns depth in tree
	(number of parents)

	* htmlimage.c (html_image_pointer_load): new extracted method

	* htmlengine.c (parse_d): set flow data to current flow

	* htmlengine-edit.c (html_engine_set_data_by_type): change type of
	value to gchar * (it's simpler and we could destroy data simplier)

	* htmlcursor.c (html_cursor_beginning_of_paragraph): updated to
	work with tables
	(html_cursor_end_of_paragraph): likewise

	* htmlclueflow.c (merge): copy data from cf2 if cf1 is empty

	* gtkhtmldebug.c (dump_data): new helper function, dumps object
	data
	(dump_object_simple): dump object data

	* gtkhtml.c (gtk_html_insert_html): use
	html_image_factory_move_images

	* htmlimage.c (html_image_factory_move_images): new method, moves
	all image poiters from one factory to another

	* gtkhtml.c (gtk_html_insert_html): new method, inserts html
	generated from html source, hacked - creates new widget and steals
	it's content and destroy it, insert content to original one

2001-04-20  Radek Doulik  <rodo@ximian.com>

	* htmlobject.c (destroy): free object data
	(free_data): helper function

	* gtkhtml.c (gtk_html_editor_command): added boolean return value

	* htmlengine.c (flow_new): new wrapper around flow constructor
	which sets object data

	* gtkhtml.c (command): new command implementations

	* gtkhtml-enums.h: added cursor-bod/eod commands

2001-04-22  Ariel Rios  <ariel@linuxppc.org>

	* test.c (button_cb): Remove stupid warning on callback.

2001-04-21  Ariel Rios  <ariel@linuxppc.org>

	* Makefile.am (noinst_PROGRAMS): Add gtest

	* test.c : This file provides a nice simple
	test application for GtkHTML altho it is a 
	little hacky at some points. However it should
	be enough to get started with using the widget

2001-04-17  Larry Ewing  <lewing@ximian.com>

	* htmliframe.c (draw): clean up the draw routine a little.
	(html_iframe_init): remove redundant condition.

2001-04-17  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-fontstyle.c (html_engine_set_font_style): like
	with color setting

	* gtkhtml-enums.h: moved new commands to the end

	* htmlengine-edit-fontstyle.c (html_engine_set_color): set
	insertion color also for selection case

	* htmlselection.c (html_engine_is_selection_active): call
	html_engine_edit_selection_updater_do_idle

	* htmlengine.h: added cursor_position_stack to keep cursor
	positions for save/restore commands

	* gtkhtml-properties.c: added command names

	* gtkhtml-enums.h: new commands - save/restore cursor position

	* gtkhtml.c (gtk_html_select_paragraph_extended): new function

	* htmlengine-edit.c
	(html_engine_select_paragraph_extended): new function

	* keybindingsrc.ms: added C-a for select-all and C-p for select
	paragraph

	* keybindingsrc.xemacs: like for emacs ones

	* keybindingsrc.emacs: added C-a, C-e

	* gtkhtml.c (BCOM): remove C-a and C-e from hardcoded bindings

	* htmlengine-edit-movement.c (html_engine_beginning_of_paragraph):
	new function
	(html_engine_end_of_paragraph): ditto

	* htmlengine-edit.c (html_engine_select_paragraph_editable): new
	function
	(html_engine_select_all_editable): ditto

	* gtkhtml.c (gtk_html_select_paragraph): new function
	(gtk_html_select_all): ditto

	* gtkhtml-properties.c: added new commands

	* gtkhtml-enums.h: added selection commands

2001-04-16  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_table): silence warning.

	* htmlclueflow.c (calc_preferred_width): initialize next to NULL.

	* htmlplainpainter.c (draw_text): remove unused variable.
	(calc_text_width): remove unused function.
	
        The following changes to enable embedded printing are all from a
	slightly renamed and reworked patch from Bill Gribble
	<grib@gnumatic.com>.  Thanks.
	
	* htmlembedded.h (html_embedded_get_widget): add prototype.

	* htmlembedded.c (draw): call html_painter_draw_embedded.
	(html_embedded_get_widget): added helper function.

	* htmlpainter.h: add the draw_embedded member function.

	* htmlpainter.c (class_init): initialize draw_embedded.
	(html_painter_draw_embedded): wrapper function for the class
	function.

	* htmlprinter.c (draw_embedded): fire the draw_print save the
	context and fire the draw_print signal where appropriate.
	(class_init): use draw_embedded.

	* htmlgdkpainter.c (draw_embedded): fire the draw_gdk signal if
	the embedded widget is a GtkHTMLEmbedded widget.
	(class_init): use draw_embedded.
	
	* gtkhtml-embedded.h: add draw_print and draw_gdk signals.

	* gtkhtml-embedded.c: add draw_gdk and draw_print signals.
	(gtk_html_embedded_class_init): init the signal handlers.

	* htmliframe.c (html_iframe_init): initialize iframe->gdk_painter
	to NULL.  
	(set_painter): do proper refcounting of the iframe->gdk_painter.
	(iframe_set_gdk_painter): helper function to handle setting the
	painter.
	(destroy): use the helper funtion to make sure we remove the last
	reference to the the painter.

2001-04-14  Larry Ewing  <lewing@ximian.com>

	* htmlfontmanager.c (html_font_manager_finalize): free the face.

	* htmlpainter.c (finalize): destroy the colorset.

	* htmlengine-print.c (html_engine_print_with_header_footer): ref
	the old painter while we print.

	* htmlengine.c (html_engine_set_painter): fixup refcounting of
	painters.
	(html_engine_destroy): use unref instead of destroy.

2001-04-13  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_f): make sure we don't hold two references
	to the color.

2001-04-12  Dan Winship  <danw@ximian.com>

	* htmlengine.c (parse_iframe): Don't leak.

2001-04-12  Radek Doulik  <rodo@ximian.com>

	* htmlgdkpainter.c (html_gdk_painter_unrealize): check if painter
	is already realized

2001-04-11  Radek Doulik  <rodo@ximian.com>

	* htmlplainpainter.c (alloc_fixed_font): if face == NULL pass NULL
	- NULL means that fixed font is requested

	* gtkhtml.c (command): ops, removed unwanted calls to
	update_styles

	* htmlengine-edit-fontstyle.c (html_engine_set_font_style):
	changed order back to AND, OR
	(get_color_from_selection): use point for movement thru selection
	(get_color_from_selection): don't get color from end of objects
	(get_font_style_from_selection): likewise

	* gtkhtml.c (button_press_event): fixed Bug 2166:
	With Evolution, start composing a new message; type out a few lines. Click
	to insert the cursor somewhere, and then click backwards in the text to
	select a range. Now click outside of the selection. The GtkHTML component
	should go away, leaving a grey box.

2001-04-07  Dan Winship  <danw@ximian.com>

	* htmlprinter.c (DARK, LIGHT):
	* htmlgdkpainter.c (DARK, LIGHT):
	* htmlengine-edit-rule.c (SET, SETO):
	* gtkhtml-properties.c (GET, SET, GET, GETS, COPYS): Remove
	inappropriate uses of ## in macro definitions.

	* htmltextslave.h: 
	* htmltable.h: Remove (unused) non-extern declarations of
	html_table_class and html_text_slave_class.

	* htmlclue.c: Make parent_class static

2001-04-03  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (check_prev): check faces

	* htmlfontmanager.c (strip_white_space): new helper function
	(alloc_new_font): allow white spaces in face list
	(get_name_from_face): use 13th and 14th attribute instead of 12th
	and 13th

2001-04-02  Larry Ewing  <lewing@ximian.com>

	* htmlclueflow.c (write_pre_tags): only write a \n for PRE flows,
	rather than a <br>\n.

2001-03-30  Larry Ewing  <lewing@ximian.com>

	* htmlobject.c (copy): copy pref_width.

	* gtkhtml.c (selection_received): use unicode_strlen on the
	selection data lenght.  Why are we not using byte ranges for
	insert_text and paste_text?

	* htmlengine-edit-cut-and-paste.c (html_engine_insert_text): use
	unicode_strlen.

	* htmlobject.c (html_object_init): init min_width and pref_width.

	* htmlplainpainter.c (alloc_fixed_font): use the parent class to
	do the work, just override the settings.  remove a bunch of
	duplicated support functions

	* htmlengine.c (parse_table): close_anchor at the begining of a
	new cell since <a> elements cannot span cells.  Remove it from the
	closing tag because that presumes there is a valid closing tag.
	We need more regression tests.
	
	* htmlengine.c (parse_table): close_anchor at the end of a row to
	make sure stray anchors don't wrap.

	* htmlclueflow.c (calc_padding): temporary hack to swtich to
	remove padding in the text/plain case.  This will get moved into
	the painter soon.
	(save_plain): use calc_padding based on the painter from the
	current engine and don't automatically assume it.

2001-03-29  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (gtk_html_build_with_gconf): helper function, returns
	TRUE if gtkhtml was built with gconf support. it's provided for
	scripting languages

	* htmlengine-edit-table.c (delete_table_row): updated
	(delete_row_undo_action): use DeleteCellsUndo data

	* htmltext.c (get_tags): added quotes

	* htmlengine-save.c (color_to_string): use %02x instead of %2x to
	avoid colors like <BODY BGCOLOR="#98cc 0">

	* htmlengine-edit-table.c (insert_table_row): fixed cursor
	position, added row_cells parameter
	(delete_row_setup_undo): rewritten to use cells data

2001-03-29  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (on_object): free the pointer_url before we set it to
	NULL.

2001-03-28  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-table.c (insert_table_column): added column
	parameter, when non-NULL, use it as newly created cell-places
	content
	(delete_column_setup_undo): use new undo data and remember deleted
	cells for later undo (insertion)

2001-03-27  Larry Ewing  <lewing@ximian.com>

	* htmliframe.c (destroy): disconnect the signals from the html
	widget that refer to the iframe since the iframe_created.
	(html_iframe_class_init): use the new destroy handler.

2001-03-26  Larry Ewing  <lewing@ximian.com>

	* keybindingsrc.emacs: disable autofill.

2001-03-27  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (append_selection_string): start tabbing on first
	non-empty cell

	* htmlclueflow.c (merge): use style of second flow if first one is
	empty
	(pref_right_margin): removed unused variable

	* htmlengine-search.c (move_to_found): fixed coordinates
	calculation

	* htmlclueflow.c (calc_preferred_width): don't remove trailing
	space width on the end of paragraph

2001-03-26  Larry Ewing  <lewing@ximian.com>

	* Makefile.am: add htmlplainpainter.[ch]

	* htmlclueflow.c (pref_right_margin): determine the prefered
	margin based on the width of the line in plain painters.

2001-03-26  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-search.c (gtk_html_engine_search_incremental): added
	wrappers around html_engine_search_... methods

	* htmltokenizer.c (in_extension): even more safe extension
	handling

	* htmlcolor.c (html_color_unref): really free color

	* htmlengine.c (parse_d): better checking

	* htmltokenizer.c (in_extension): don't check for extension end in
	quted input

2001-03-26  Larry Ewing  <lewing@ximian.com>

	* htmlplainpainter.c: html painter for plain mode.  The idea here
	is that rather than loosing valuable information when converting
	from html to plain and back again we change the painter to draw
	the html how it will render in text plain mode.  This is not close
	to perfect yet, but with a little work it should get better.

	* htmlplainpainter.h: header for plain mode.

2001-03-22  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c: remove references to load_in_progress.
	gtk_html_write and gtk_html_end are now just proxies to
	gtk_html_stream_write and gtk_html_stream_end.

	* gtkhtml.h: remove references to load_in_progress.

2001-03-22  Radek Doulik  <rodo@ximian.com>

	* htmlinterval.c: removed some warnings

	* htmlengine.c (text_new): new helper function, takes care of
	setting class_data to HTMLText objects

	* htmltokenizer.c: added searchGtkHTMLCount and extension in
	HTMLTokenizer
	(in_comment): look for extension in comment (like <!--+GtkHTML:
	-->
	(in_extension): new function, handles gtkhtml extension
	(html_tokenizer_tokenize_one_char): extracted from
	html_tokenizer_write

	* htmlengine.c: added class_data hash table to Engine to store
	object data to be set by class
	(html_engine_set_class_data): new function, sets data to
	class_data table
	(html_engine_clear_class_data): clears previously set class_data
	(html_engine_set_object_data): set data to object according to
	class_data
	(get_class_table_sure): helper function
	(get_class_table): helper function
	(parse_d): parse <DATA ...> tag, this tag is stored in comments
	(maybe we should parse it only when in comment?)
	(html_engine_class_data_clear): clear whole class_data table
	(class_data_table_free_func): helper function
	(class_data_free_func): helper function

	* gtkhtml.c: new signal IFRAME_CREATED
	(gtk_html_set_iframe_parent): emit new signal

2001-03-21  Kjartan Maraas  <kmaraas@gnome.org>

	* htmlanchor.c: #include <string.h>
	* htmlpainter.c: Same here.
	* htmltable.c: Init two vars to zero to avoid "could be used
	uninitialized" warnings.
	
2001-03-20  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-enums.h: new command
	GTK_HTML_COMMAND_TEXT_SET_DEFAULT_COLOR

2001-03-20  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_begin): add LOG_INPUT ifdef here.
	(parse_s): compare against the full length of the string.
	(parse_h):  use the full length again.

	* gtkhtml.c: Add documentation for several more functions.
	(gtk_html_begin_content): remove LOG_INPUT #define, do this in
	html_engine_begin, with gtk_html_stream_log_being now.
	(gtk_html_write): removed logging code.
	(gtk_html_end): removed logging code.
	(gtk_html_export): rename the content and data
	arguments for clarity.
	
2001-03-19  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-stream.c (gtk_html_stream_log_new): helper function to
	allow logging on any stream created with gtk_html_stream_log_new
	rather than gtkhtml_stream_new.
	(stream_log_write): proxy the write to the internal stream.
	(stream_log_close): proxy the close to the internal stream and
	clean up.

	* gtkhtml-stream.h: add prototype for gtk_html_stream_log_new.

2001-03-15  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (accepts_cursor): accept cursor

	* htmlobject.c (move_object_downtree): stop on containers, which
	accepts cursor (like tables)

2001-03-18  Larry Ewing  <lewing@ximian.com>

	* keybindingsrc.emacs: add bindings for space-and-fill and
	break-and-fill for testing.

	* htmlengine.c: fix more warnings I left.

	* gtkhtml.c (command): add handlers for the space-and-fill and
	break-and-fill.

	* gtkhtml-properties.c: add enum entries for space-and-fill, and
	break-and-fill.

	* htmlengine-edit.h (clueflow_style_to_paragraph_style): add
	prototypes

	* htmlengine-edit.c (html_engine_fill_pre_line): utility function
	to word wrap pre lines.
	(html_engine_space_and_fill_line): insert space then fill line.
	(html_engine_break_and_fill_line): fill line then insert paragraph.

2001-03-15  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (update_embedded): add prototype and fix warnings.

2001-03-14  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_update_event): do a container forall
	on the layout to move offscreen objects off of the screen.
	(update_embedded): a hack of a function to make sure objects get
	moved out of the way properly.
	(parse_object): remove the call to set "embeddedelement" this is
	taken care of elsewhere now.

	* htmlembedded.c (html_embedded_set_widget): set "embeddedelement"
	data on the widget.

2001-03-14  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-table.c (new_cell): set cell bgcolor, bgpixmap
	and padding
	(insert_table_column): fixed cursor position and cursor movement
	afret insertion

	* htmltext.c (calc_min_width): make minimal width be always >= 1
	(calc_preferred_width): ditto

	* htmltextslave.c (calc_size): make width be always >= 1

	* htmlengine-edit-table.c (html_engine_insert_table_1_1): create
	width=100% table

2001-03-13  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_object_changed): call html_object_calc_size
	on the embedded element rather than html_embedded_size_recalc.

	* htmlembedded.c (calc_size): take the descent from the embedded
	element into account.  Remove the requirement that the widget be
	realized.
	(html_embedded_size_recalc): removed, use html_object_calc_size
	instead.
	
	* htmlembedded.h (html_embedded_size_recalc): remove prototype.

2001-03-13  Radek Doulik  <rodo@ximian.com>

	* gtkhtml.c (command): return for already handled commands

	* htmltext.c: fixed matching, removed * from final char match,
	which made it useless, added ?!;: to forbidden terminal characters

	* htmlengine-edit-cut-and-paste.c (html_engine_insert_text): stop
	inserting links after ' ' (space)

	* htmlundo.c (html_undo_level_end): copy save_undo to level anyway
	(redo_level_end): ditto

	* htmlengine-edit-cut-and-paste.c
	(html_engine_insert_empty_paragraph): stop inserting links
	after paragraph insertion

	* gtkhtml.c (command): set update_styles
	(move_selection): ditto
	(cursor_move): ditto
	(key_press_event): use update_styles

	* gtkhtml-private.h: added update_styles flag

2001-03-12  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-search.c (destroy): don't set gtkhtml's data here, as
	gtkhtml is already destroyed

2001-03-11  Larry Ewing  <lewing@ximian.com>

	* htmlinterval.h: fix harmless typo in copyright header.

2001-03-10  Larry Ewing  <lewing@ximian.com>

	* gtkhtml-search.c (destroy): dereference data before we destroy
	it, this should fix the crashes ettore has been seeing.

2001-03-08  Larry Ewing  <lewing@ximian.com>

	* htmlbutton.c (html_button_class_init): add encode method.
	(encode): new method to encode the button value. (patch from "Bill
	Gribble" <grib@gnumatic.com>)

	* htmlbutton.h: add success indicator. (patch from "Bill Gribble"
	<grib@gnumatic.com>)

	* htmlengine.c (parse_object_params): handle the multiple leading
	spaces you can get from tabs and &nbsp; correctly.
	(is_leading_space): helper funtion to find leading whitespace.

	* htmlclueflow.c: use IS_UTF8_NBSP.
	
	* htmlentity.h (IS_UTF8_NBSP): helper macro to match &nbsp;

2001-03-08  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-search.c (data_destroy): don't destroy widget, as this
	is called from widget destroy handler

2001-03-07  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (parse_t): only emit the title changed signal if we
	have a valid title and were already in a title tag.

2001-03-07  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-table.c (delete_column_setup_undo): new undo
	setup for column delete
	(delete_column_undo_action_before): 1st undo action (insert after)
	(delete_column_undo_action_after): 2nd undo action (insert before)

	* htmlundo-action.c (html_undo_action_destroy): check for
	action->data before unref'ing them

	* htmltable.h (HTML_IS_TABLE): use HTML_CHECK_TYPE

	* htmltypes.h (HTML_CHECK_TYPE): new macro

	* htmlengine-edit-table.c (html_engine_insert_table_1_1): move 1
	step back to inserted table
	(insert_table_column): move to the 1st cell of inserted column
	(delete_table_column): fix cursor position after column removed
	(insert_table_column): extracted from
	html_engine_insert_table_column
	(delete_table_column): extracted from
	html_engine_delete_table_column
	(insert_column_setup_undo): new function
	(insert_column_undo_action): new undo action

	* htmltable.h (IS_HTML_TABLE): renamed to HTML_IS_TABLE

2001-03-06  JP Rosevear  <jpr@ximian.com>

	* Makefile.am: make htmltablepriv.h a source

2001-03-06  Radek Doulik  <rodo@ximian.com>

	* keybindingsrc.{ms,emacs}: new bindings

	* gtkhtml.c (command): use new command

	* htmlengine-edit-table.c (html_engine_delete_table_column): new
	command implementation

	* gtkhtml.c (command): use new table methods

	* htmlengine-edit-table.c (html_engine_insert_table_column): new
	table command

	* htmltablepriv.h: new file for private HTMLTable methods

	* htmlengine-edit-cut-and-paste.c (html_engine_append_object): new
	method, splits at cursor upto level 'level' and appends object
	right there

	* htmlengine-edit-table.c (html_engine_insert_table_1_1): new
	command implementation

	* htmlengine-edit-cut-and-paste.c (look_for_non_appendable): check
	for parent type insted of object itself

	* htmlobject.c (html_object_merge): work around nested types
	(CLUEV, TABLECELL)

	* gtkhtml-properties.c: added new commands definitions

	* htmlengine-edit-cut-and-paste.c (split_and_add_empty_texts): in
	case of '' split after

	* htmltable.c (merge): take care of merging 1 row table with other
	one
	(merge): fixed cells setting in output (t1) table

2001-03-02  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (calc_size): test for already properly sized
	columnOpt, if needed call set_max_width

	* htmlclueflow.c (check_point): check for p != NULL

	* htmltext.c (copy): g_strdup face, it caused some crashes in
	destroy method before

2001-02-20  Larry Ewing  <lewing@ximian.com>

	* htmlobject.c (html_object_check_point): allways return NULL when
	width or height == 0.

	* htmlclueflow.c (check_point): fix logic to work with zero
	height objects.  This should fix the looping bug the red-carpet
	guys were seeing.

2001-02-15  Dan Winship  <danw@ximian.com>

	* htmltext.c (split_word_width): fix up a g_renew use to fix a
	crash when typing.

2001-02-12  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (check_magic_link): try magic
	links only for HTMLText and not link

	* htmltext.c (html_text_magic_link): save and restore cursor
	position
	(html_text_magic_link): wrapped in one undo step
	(paste_link): ops, removed level step here
	(paste_link): take care for case when cursor in on end of previous
	object

2001-02-09  Radek Doulik  <rodo@ximian.com>

	* htmldrawqueue.c (html_draw_queue_flush): do clear/draw_obj only
	if GtkHTML has window

	* htmliframe.c (draw): use parent_class draw method for non
	printer painters

	* htmlembedded.c: reworked size calculation/allocation, removed
	ugly hacks ;-)

	* gtkhtml-embedded.c (gtk_html_embedded_new): don't set
	resize_mode to QUEUE

	* gtkhtml.c (gtk_html_set_default_content_type): take care of
	content_type == NULL

2001-02-08  Frederic Crozat <fcrozat@mandrakesoft.com>

	* gtkhtml.c (client_notify_widget): rename font_var_family and
	font_fix_family to font_var and font_fix

2001-02-08  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (divide_left_by_preferred_width): expand only
	columns with pref > fixed

	* htmltext.c (merge_word_width): fixed

2001-02-07  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (draw): use HTML_IS_PRINTER to detect printer object
	cleanly. (from Dave Benson <daveb@ffem.org>)

	* htmltokenizer.c (html_tokenizer_end): clear dest.
	(html_tokenizer_reset): free the token buffer list, and clear dest
	and size. (from Dave Benson <daveb@ffem.org>)

2001-02-01  Larry Ewing  <lewing@ximian.com>

	* gtkhtml.c (mouse_change_pos): allow a little bit of motion
	before we decide it isn't a click on a url.  This should probably be
	reworked to function more like netscape over urls.

2001-02-01  Radek Doulik  <rodo@ximian.com>

	* htmlcursor.c (html_cursor_end_of_line): take care of objects
	with different height on one line
	(html_cursor_beginning_of_line): ditto
	(html_cursor_up): ditto
	(html_cursor_down): ditto

2001-02-01  Larry Ewing  <lewing@ximian.com>

	* htmlembedded.c (calc_size): fix the bug I introduced last week
	that caused htmliframes too loop in their size negotiation.

2001-01-31  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (html_engine_insert_text): delay
	spell check only for newly typed words

2001-01-30  Radek Doulik  <rodo@ximian.com>

	* htmlengine.c (html_engine_set_painter): take care of borber

	* htmliframe.c (draw): take care of html border, fixes iframes
	printing

	* htmlcluev.c (check_point): take care of Objects with zero width

	* htmlclueflow.c (check_point): take care of Objects with zero
	width

	* htmltextslave.c (check_point): take care of ''

	* htmlimage.c (get_actual_width): use actual engine
	(get_actual_height): likewise

	* htmliframe.c (set_max_width): implemented set max width
	(calc_min_width): rewritten, use html_engine_calc_min_width, this
	fixes Evolution welcome message problem

	* htmlengine.c (html_engine_get_view_width): take care of iframes
	(html_engine_get_view_height): likewise
	(html_engine_calc_min_width): new method

2001-01-29  Radek Doulik  <rodo@ximian.com>

	* htmlimage.c (calc_min_width): fix min width for images with
	percented height

2001-01-29  Larry Ewing  <lewing@ximian.com>

	* htmlengine.c (html_engine_begin): call html_engine_id_table_clear.
	(html_engine_id_table_clear): move the table reset functions to a
	helper funtion.

2001-01-29  Radek Doulik  <rodo@ximian.com>

	* gtkhtml-search.c (hide): new helper function
	(data_destroy): ditto
	(focus_out_event): new signal handler
	(destroy): ditto
	(gtk_html_isearch): don't destroy input line, hide instead, store
	data in input line widget data

	* gtkhtml-private.h: added search_input_line

2001-01-29  Larry Ewing  <lewing@ximian.com>

	* htmltable.c (html_table_init): remove reference to refcount.
	Remove unused link/unlink funtions.

	* htmltablecell.h: remove unused refcount member.  Remore
	link/unlink prototypes.

	* htmltable.c (set_cell): remove useless call to
	html_table_cell_link.

2001-01-29  Radek Doulik  <rodo@ximian.com>

	* htmltable.c (destroy): reversed order of walk thru table as we
	don't want access freed memory

	* htmlengine.c (html_engine_add_object_with_id): strdup key only
	if it's a new one, else pass old_key (take a look in glib sources
	if you don't beleive it's right :)

2001-01-26  Radek Doulik  <rodo@ximian.com>

	* htmlclueflow.c (html_clueflow_spell_check): draw spelled range
	only if engine isn't frozen

	* htmlengine.c (parse_table): don't ignore nowrap

2001-01-25  Radek Doulik  <rodo@ximian.com>

	* htmlengine-edit-cut-and-paste.c (html_engine_insert_text): don't
	do spell check yourself and rather pass check param to
	insert_object

2001-01-25  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (gtk_html_new): added doc comment to test doc stuff
	(gtk_html_new_from_string): added new constructor

	* gtkhtml-stream.h (gtk_html_stream_unref): moved
	gtk_html_stream_ref, gtk_html_stream_unref from gtkhtml.h

	* htmltablecell.c (calc_size): new method, take care of fixed
	height
	(clue_move_children): new helper function
	(html_table_cell_set_fixed_height): new function

	* htmlengine.c (parse_table): support <td height=[number]>

	* htmltablecell.c (html_table_cell_init): added fixed_height

2001-01-25  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_pointer_timeout): only queue a redraw if
	there is an image object to queue it on (not a background).

2001-01-24  Larry Ewing  <lewing@ximian.com>

	* htmlimage.c (html_image_pointer_timeout): draw the borders now
	that we think we've waited long enough.  The idea here is that we
	are too agressive about drawing the box where the image should be
	and it results in ugly artifacts.  Now we wait a STALL_INTERVAL
	amount of time before we start drawing the box.
	(html_image_pointer_new): initialize the timer.
	(html_image_pointer_unref): clear the timer if it is still around.
	(draw): short circuit if stall is not set.

	* htmlimage.h: add stall flag and stall timeout to track stream
	progress.

	* htmlembedded.c (calc_size): use the requisition because the
	allocation fluctuates too much.

	* gtkhtml-embedded.c (gtk_html_embedded_new): listen to the size
	parameters passed along in the html.

2001-01-24  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit.c (html_engine_spell_check_range): check for
	properties:live spell checking

	* htmltext.c (split_word_width): do renew only when words !=
	s->words (not needed, but old way I got segv with efence, weird)

	* htmlengine.c: added need_spell_check flag

	* htmlengine-edit-cut-and-paste.c: do spell checking only on word
	ends and use need_spell_check engine flag

	* htmlcursor.c: check for need_spell_check before cursor move

	* htmlclueflow.c (html_clueflow_spell_check): queue draw checked
	interval
	(queue_draw): helper function

	* testgtkhtml.c (print_footer): add param to quiet warning

2001-01-23  Larry Ewing  <lewing@helixcode.com>

	* htmlcolorset.c: unref all the colors when we destroy the
	colorset (from iain@ximian.com).

	* htmlengine.c: unref the insertion_color. (iain)

	* htmltext.c: free text->face in destroy. (iain)

	* htmltable.c: initialize higher_span.

2001-01-23  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-print.c: use user_data in printing

	* gtkhtml.c (gtk_html_print_with_header_footer): added user_data
	parameter for language bindings

	* htmlengine.c (thaw_idle): use gtk_html_edit_make_cursor_visible

	* gtkhtml.c (gtk_html_edit_make_cursor_visible): new function
	(key_press_event): don't do queue_draw here
	(move_selection): use gtk_html_edit_make_cursor_visible
	(cursor_move): ditto

	* htmlengine.c (html_engine_make_cursor_visible): let cursor
	always rather end in right-bottom

2001-01-19  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit.c (html_engine_indent_pre_paragraph): changed
	undo name

	* htmlclueflow.c (html_clueflow_set_style): clear word width when
	changing from/to PRE

	* htmlengine.c (html_engine_set_painter): use
	html_object_clear_word_width

	* htmlobject.c (html_object_clear_word_width): new function

	* htmlengine-edit.c (html_engine_indent_pre_paragraph): new
	function, indents pre paragraph to 72 chars
	(go_to_begin_of_pre_para): helper function
	(try_break_this_line): ditto

	* htmlengine.c (html_engine_thaw): add show cursor if idle already
	added
	(html_engine_freeze): hide always cursor

	* htmlengine-edit-cut-and-paste.c (html_engine_delete_n): don't do
	cut here, just delete

	* htmlcursor.c (html_cursor_beginning_of_paragraph): new function
	(html_cursor_end_of_paragraph): new function

	* htmlengine.c (clear_word_width): new helper function
	(html_engine_set_painter): clear word width cache

	* htmltext.c (html_text_clear_word_width): make this function
	public

2001-01-18  Radek Doulik  <rodo@helixcode.com>

	* htmltext.c (object_split): take care of split in &nbsp; sequence

	* htmlobject.c (html_object_merge): added engine parameter

	* htmlengine-edit-cut-and-paste.c (html_engine_insert_text): call
	convert nbsp

	* htmltext.c (merge_word_width): new function
	(object_merge): use merge_word_width

	* gtkhtml.c (command): added
	GTK_HTML_COMMAND_DELETE_BACK_OR_INDENT_DEC command
	(load_keybindings): bind backspace to new command

	* htmlengine-edit.c (html_engine_cursor_on_bop): new function
	(html_engine_get_indent): new function

	* htmlrule.c (save): save all attributes

	* htmltext.c (html_text_op_cut_helper): convert nbsp
	(html_text_convert_nbsp): new helper function, takes care of nbsp
	converting
	(convert_nbsp): refactored, does only actual rewrite
	(is_convert_nbsp_needed): extracted 1st pass where we find out if
	convert is neccessary
	(split_word_width): new functions, takes care of word_width cache
	for splitted text
	(clear_word_width): helper function, clears word width cache

2001-01-16  Radek Doulik  <rodo@helixcode.com>

	* htmlclue.c (forall): use pnext to remember p->next as p could be
	removed in func call

	* gtkhtml.c (gtk_html_set_color): new function

	* htmltext.c (html_text_op_cut_helper): remove spell errors from
	cuted part

	* htmlengine-edit-cut-and-paste.c (prepare_delete_bounds): if
	level > 1 prepend NULL before left and right

	* htmlclueflow.c (get_post_padding): add post padding for header
	preceding another header too

	* htmlengine.c (insert_text): create new text if para is pending

2001-01-12  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (search): fixed crash for empty document

2001-01-11  Radek Doulik  <rodo@helixcode.com>

	* htmlclue.c (merge): merge all clues

	* htmltext.c (html_text_op_cut_helper): move spell_errors
	(html_text_op_cut_helper): remove spell errors when cutting whole
	text
	(object_split): update spell errors
	(remove_spell_errors): make it exact
	(object_split): do convert_nbsp
	(object_merge): do convert_nbsp

	* htmlgdkpainter.c (alloc_e_font_it): do n1 -> n2 -> n3 instead of
	n1 -> n3

	* gtkhtml.c (selection_received): paste only in editable
	(gtk_html_request_paste): ditto

	* htmlgdkpainter.c (alloc_e_font_it): substitute size by * when
	looking for closest font

	* gtkhtml.c (scroll): repeat two lines when scrolling by page
	(scroll): use rather 2.5 * size
	(cursor_move): try to repeat last 2 lines while scrolling by page
	(2.5 * size)

	* htmlengine-edit-clueflowstyle.c
	(html_engine_set_clueflow_style): free/thaw engine

	* htmlclueflow.c (check_point): fixed case when flow indent level
	> 0

	* htmlfontmanager.c: use full font name

	* gtkhtml-properties.c: read/store full font name

2001-01-10  Radek Doulik  <rodo@helixcode.com>

	* htmlobject.c (html_object_get_tail_leaf): new function, moved
	from cut&paste
	(html_object_get_head_leaf): ditto
	(html_object_get_selection_string): new function, returns
	selection string for object
	(select_object): helper function for
	html_object_get_selection_string
	(unselect_object): ditto

	* gtkhtml.c (gtk_html_cut): set selection owner
	(gtk_html_copy): likewise
	(command): use gtk_html_copy, gtk_html_cut
	(button_release_event): use gtk_html_copy

	* htmlengine-edit-cut-and-paste.c (html_engine_paste_text): add
	undo level "Paste text"
	(html_engine_paste_object): added undo level "Paste"

	* gtkhtml.c (gtk_html_request_paste): do PASTE if no selection
	available
	(button_release_event): copy selection to clipboard
	(gtk_html_paste): use gtk_html_request_paste instead of
	html_engine_paste
	(selection_received): if it's selection from us, use
	html_engine_paste rather than text version of data
	(command): call gtk_html_paste rather than html_engine_paste as we
	want take care of XSelection while pasting
	(command): don't cut before inserting rule
	(command): don't cut before inserting empty para, do delete instead

2001-01-09  Dave Camp <dave@helixcode.com>

	* Makefile.am (libgtkhtml_HEADERS): Added htmlengine-cut-and-paste.h

2001-01-09  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_p): don't push DIV block
	(parse_p): don't pop it
	(add_line_break): add para with empty text only when !HTML_CLUE
	(clue)->head

	* htmltext.c (html_text_append): new helper method

	* htmlengine.c (parse_h): don't place hrule in own flow
	(add_line_break): when flow == NULL, add para with empty text
	(insert_text): replaced crappy code with html_text_append method
	call

2001-01-08  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-cut-and-paste.c (html_point_get_left): remove
	allow_null parameter
	(html_point_get_right): likewise

	* htmlobject.c (html_object_op_cut): add left, right parameters

	* gtkhtml.c (idle_handler): take care of thaw_idle handler

	* htmltext.c (calc_min_width): use strlen rather than
	unicode_index_to_offset

	* htmltextslave.c (get_offset_for_pointer): renamed from
	html_text_slave_get_offset_for_pointer, make it private

	* htmlobject.c (html_object_next_not_type): new helper function
	(html_object_prev_not_type): ditto

	* htmlclueflow.c (check_point): rewritten, take care of objects
	with different (ascent + descent)'s

	* htmltextslave.c (check_point): implement this method

	* htmltext.c (check_point): return just NULL, left work to
	clueflow which is container

2001-01-05  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_freeze): hide cursor
	(thaw_idle): show cursor
	(html_engine_thaw_idle_reset): show cursor

	* htmlclueflow.c (get_text): use html_object_next_not_slave
	(get_text_bytes): ditto

	* htmlengine.c (thaw_idle): don't reset blinking

	* htmlengine-edit-cursor.c (html_engine_draw_cursor_in_area):
	don't draw cursor if engine is freezed

	* htmlengine.c (html_engine_thaw): do thaw in idle time

	* htmltext.c (html_text_op_cut_helper): use new object helper
	functions

	* htmlobject.c (html_object_move_cursor_before_remove): new helper
	function
	(html_object_move_cursor_before_remove): ditto
	(op_cut): use these helper functions

	* htmlengine-edit-cut-and-paste.c (delete_object_do): use disable
	selection instead of deactivate to deselect deleted objects
	(html_point_get_left): added allow_null parameter
	(html_point_get_right): likewise
	(prepare_delete_bounds): allow NULL for bounds, but not for from,
	to
	(remove_empty_and_merge): make sure cursor have no zero offset if
	there is prev object
	(html_point_get_right): don't allow NULL for ''
	(html_point_get_left): likewise
	(move_cursor_before_delete): extracted from delete_object_do,
	fixed
	(place_cursor_before_mark): extracted from delete_object_do
	(delete_object_do): refactored, use move_cursor_before_delete and
	place_cursor_before_mark

	* htmlengine.c (html_engine_thaw): use html_draw_queue_clear

	* htmldrawqueue.c (html_draw_queue_clear): new function
	(html_draw_queue_flush): use html_draw_queue_clear

	* htmlengine-edit-cut-and-paste.c (delete_object): don't set
	cursor to home, op_cut take care of cursor now

	* htmlobject.c (html_object_op_copy): pass engine instead of empty
	text
	(html_object_op_cut): likewise
	(op_cut): take care of cursor

2001-01-04  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-cut-and-paste.c (check_magic_link): new helper
	function
	(html_engine_insert_empty_paragraph): use check_magic_link
	(html_engine_insert_text): likewise

	* htmltext.c (html_text_magic_link): moved magic links code here
	(paste_link): use paste_object + undo levels

	* htmlengine-edit-table.c (html_engine_insert_table): likewise

	* htmlengine-edit-rule.c (html_engine_insert_rule): don't destroy
	rule after pasting

	* htmlengine-edit-images.c (html_engine_insert_image): don't
	destroy image after pasting

2001-01-03  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-cut-and-paste.c (remove_empty_and_merge): remove
	child before destroy

	* htmllinktextmaster.c (html_link_text_master_class_init): set
	merge method

	* htmlobject.c (html_object_destroy): ops, take back remove_child
	to merge
	(html_object_merge): remove child

2000-12-29  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (divide_into_percented): fixed, there was error in
	part calculation in case left < to_fill

2000-12-21  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (html_table_end_row): fixed crash for empty row
	<tr></tr>

2000-12-20  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (get_actual_width): use top_html_engine
	(get_actual_height): likewise

2000-12-19  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (selection_received): use unicode_strlen

2000-12-18  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (html_clueflow_spell_check): free the text
	returned from get_text to fix a leak.
	Free the interval when we create a new one, stops leak.

	* htmltext.c (html_text_spell_errors_clear_interval): clean up
	memory leak.

2000-12-15  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (calc_percentage_step): extracted from
	calc_col_percentage, take care of cspan
	(calc_col_percentage): use calc_percentage_step
	(divide_into_percented): be exact here

	* htmlengine-edit-cut.c (html_engine_cut): update selection before
	cut

	* htmltablecell.c (calc_min_width): don't use fixed_width as
	min_width
	(calc_preferred_width): for fixed width cells use it as preferred

	* htmltable.c (calc_preferred_width): calc also fixed width cells
	preferred width to columnPref array
	(divide_upto_preferred_width): extracted from
	divide_into_variable_all
	(divide_into_variable_all): first divide in fixed width cells,
	then to auto-width ones
	(divide_left_by_preferred_width): extracted from
	divide_into_variable_all

	* htmltablecell.c (html_table_cell_get_fixed_width): new helper
	function

	* htmltable.h: added array columnFixed with fixed widths of
	columns

	* htmltable.c (calc_column_width_template): added parameter pref,
	it should be array with preferred width used by portioning width
	of spaned columns

2000-12-14  Larry Ewing  <lewing@helixcode.com>

	* gtkhtml.c (gtk_html_begin_content): arggggh... use the content
	type we are passed not the default.  This breaks the logic in the
	editor component.

	* htmlimage.c (save_plain): make sure we initialize the return
	value

2000-12-14  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_i): don't set eat_space here
	(parse_a): rather do it here

2000-12-14  Larry Ewing  <lewing@helixcode.com>

	* gtkhtml.c (destroy): free content_type.
	(init): initialize content_type.
	(gtk_html_begin_content): add entry point for specifying content type
	at stream initialization.
	(gtk_html_set_default_content_type): new funtion to set the
	default content type assumption of new streams.

	* htmlengine.h: add content_type to html_engine_begin prototype.

	* htmlengine.c (html_engine_begin): add content_type parameter.

	* gtkhtml-private.h: add content_type to private structure.

	* htmliframe.c (html_iframe_init): make iframe inheirit default
	content_type.

	* gtkhtml.h: add gtk_html_set_default_content_type and
	gtk_html_begin_content.
	
	* htmltokenizer.c (html_tokenizer_write): remove call to
	html_tokenizer_begin as it shouldn't be needed any more.
	(charset_is_utf8): temporary helper function.
	(html_tokenizer_begin): add content_type argument to allow support
	for multiple charsets.
	(in_plain): do not convert to utf-8 if we are expecting utf-8

2000-12-14  Kjartan Maraas  <kmaraas@gnome.org>

	* *.c: Added #include <config.h> to all .c files and fixed some
	_() marked strings to be N_() since they are static.
	
2000-12-13  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (shift_to_iframe_parent): remove -1
	(enter_notify_event): use shift_to_iframe_parent
	(mouse_change_pos): set in_selection only if selection non-empy
	(compare coordinates)

2000-12-12  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-fontstyle.c (html_engine_set_color): if color ==
	NULL use default Text color

	* htmltablecell.c (calc_preferred_width): implemented
	calc_preferred_width

	* htmlengine-edit-movement.c (html_engine_forward_word): fixed one
	char word case
	(html_engine_backward_word): make it dual to
	html_engine_forward_word

2000-12-12  Iain Holmes  <iain@helixcode.com>

	* gtkhtml.c (on_object): Emit the ON_URL signal when there is no object.

2000-12-12  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (draw): use pixel size for cell content panel
	(calc_column_width_template): take care for cspan
	(calc_column_width_step): likewise, calc exactly
	(divide_into_percented): calc exactly

2000-12-12  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (draw): fix list item marker position tweak and
	rounding slightly.

2000-12-11  Radek Doulik  <rodo@helixcode.com>

	* htmlprinter.c (draw_pixmap): let gnome-print do alpha stuff

	* htmlengine-print.c (html_engine_print_set_min_split_index): new
	helper setting function
	(print_all_pages): use min_split_index

	* htmlengine.h: added min_split_index for printing 

	* Makefile.am (testgtkhtml_SOURCES): move htmlurl.h here

	* htmlprinter.c (draw_panel): do shadings

	* htmltypes.h: removed HTMLURL

2000-12-10  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (forall): call func also on self

	* htmlcluev.c (find_free_area): break cycle if try_y == next_y to
	avoid infinite cycles

	* htmltable.c (calc_min_width): use pixel_size for specified_width
	(calc_preferred_width): likewise
	(html_table_set_max_width): likewise

2000-12-08  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_object_params): make sure we parse the
	string once we have already removed TAG_ESCAPE so that param
	parsing works properly.

2000-12-08  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (get_bg_color): new method
	(draw): use parent color for border panel
	(draw): use cell color for its border panel
	fix border_extra everywhere
	(LL): use unsigned long long while scaling to avoid overflows
	while printing

	* htmlobject.c (html_object_set_bg_color): new function

	* htmltable.c (divide_into_variable_all): calc exactly :)

	* htmlpainter.c (html_painter_draw_panel): added parameter bg
	(color)

2000-12-07  Larry Ewing  <lewing@helixcode.com>

	* gtkhtml.c (selection_get): whoops encode COMPOUND_TEXT as well
	see comments.

2000-12-07  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-search.c: reworked, use new API

	* removed gtkhtml-input.[ch], implemented it thru editor API

2000-12-07  Larry Ewing  <lewing@helixcode.com>

	* htmlengine-save.c (html_engine_save_buffer_new): add cast to
	cleanup warning.
	(html_engine_save): cleanup warning.
	(html_engine_save_plain): cleanup warning.

	* htmlengine-save.h: make prototypes match.
	
	* gtkhtml-private.h: add last_selection_type parameter to the the
	private stucture to track what selections whe have requested.

	* gtkhtml.h: change gtk_html_request_paste prototype to
	include type parameter.

	* gtkhtml.c: added UTF8_STRING (and UTF-8) targets to support the
	various X selection atoms people are using.
	(selection_get): support the new targets.
	(init): add new targets.

2000-12-07  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c: border extra tweakings

	* htmlgdkpainter.c (draw_panel): changed border drawing
	(find_font): if found bigger and smaller font than requsted,
	choose according to size known from font style

	* htmltable.c: fix HTML_CHANGE_PREF_WIDTH brokeness
	count padding to cell width

	* htmlgdkpainter.c: removed obsolete code

2000-12-06  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_object_params): use
	html_tokenizer_peek_token check for pending <param> tags
	nondestructively.
	(parse_object): clean up the calls to parse_body, and discard_body
	now that we have no longer already popped the token off the stack.

	* htmltokenizer.h: add prototype for html_tokenizer_peek_token.

	* htmltokenizer.c (html_tokenizer_peek_token): add a new function
	to peek at the next token nondestructively.

	* htmlengine.c (parse_object): make sure we actually match the end
	tag properly.

2000-12-06  Radek Doulik  <rodo@helixcode.com>

	* htmlobject.c (html_object_calc_preferred_width): cache
	pref_width

	* htmlobject.h: added pref_width

	* htmlembedded.c (allocate): set HTML_CHANGE_ALL

	* htmltext.c (split): set HTML_CHANGE_ALL

	* htmlimage.c (html_image_factory_area_prepared): set HTML_CHANGE_ALL

	* htmlinterval.c (select_object): use top engine for select_in and
	"right one" for select_range call

2000-12-06  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_object): change ret_val to object_found to
	make the meaning clear. Let me make this clear if you return TRUE
	in your object_requested signal we will use the embedded element,
	if you return false we will parse and use the contents between
	<object> and </object>.  Also free type and classid.

	* gtkhtml.c (html_engine_object_requested_cb): change ret_val to
	object_found to make the meaning clear.

2000-12-06  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (calc_column_width_step): take care of cspan
	(calc_column_width_template): do steps for all possible cspans

	* htmlengine.c (parse_i): set eat_space to FALSE after <img>

	* htmltable.c (divide_into_percented): don't substract max_size
	[c] from MIN, but from total_width part
	(calc_lowest_fill): new helper function
	(divide_into_variable_all): use calc_lowest_fill, updated first
	step of dividing between cols with pref width < actual
	(calc_column_width_step): extracted from
	calc_column_width_template

	* htmlengine.c (parse_body): set eat_space to FALSE
	(insert_text): drop consequent spaces
	(parse_s): set eat_space to FALSE after </select>
	(parse_t): likewise after </textarea>

	* htmlengine.h: added Engine::eat_space flag

	* htmlgdkpainter.c (alloc_e_font): drop our heuristic and let
	EFont do the job
	(alloc_e_font): drop fixed font if face != NULL
	(alloc_e_font): use our heuristic for size
	(alloc_e_font_it): new helper function
	(alloc_e_font): try to alloc "obligue" when no italics found

	* htmltable.c (divide_into_variable_all): more tuning

	* htmlengine.c (parse_p): don't reset divAlign
	(parse_d): likewise
	(html_engine_parse): set divAlign to HTML_HALIGN_LEFT

	* htmltable.c: I have completely rewritten size calculating,
	scaling part is done in html_table_set_max_width, calc_size is
	partialy rewritten and partialy refactored. I hope it finally work
	correctly. It's at least correct in cases I know, which were
	miscalculated before. One TODO: implement exact dividing of left
	width using an DDA like algorhytm
	(divide_into_variable_all): don't add to columns, which already
	met their preferred width

2000-12-05  Radek Doulik  <rodo@helixcode.com>

	* htmlobject.c (fit_line): fixed condition o->width < width_left
	to o->width <= width_left

	* htmlenums.h: add HTML_CHANGE_PREF_WIDTH

2000-12-05  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_object): applied patch from Bill Gribble
	<grib@gnumatic.com> to fix param parsing for object tags.
	(parse_object_params): same.

	* gtkhtml-embedded.c (gtk_html_embedded_new): (from patch) add
	data argument.  Also fixed some prototype indentation.

	* gtkhtml-embedded.h: (from patch) add data variable.

2000-12-04  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (cell_end_col): new helper function
	(calc_column_min_widths): take care of FIXED width cells and for
	colspan

	* htmltable.h: removed ColInfo, RowInfo, colInfo

	* htmltable.c: removed obsolete calc_col_info,
	html_table_add_col_info

	* htmltable.h: removed obsolete colSpan

	* htmltable.c (calc_column_min_widths): simplify condition

	* htmltable.h: removed obsolete colType

	* htmltable.c (calc_preferred_width): use COLUMN_PREF_POS
	(calc_min_width): use COLUMN_POS

	* htmltable.h: removed obsolete _minWidth, _prefWidth

	* htmlengine-edit-paste.c (prepare_clueflows): fix case when
	engine->cursor->object->next == NULL

	* htmlinterval.c (select_object): use selected_in
	(html_interval_select): set selected_in to FALSE before selecting

	* htmlengine.h: added flag selected_in

	* htmltextmaster.c (calc_size): set ascent, descent

2000-12-01  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (button_press_event): changed some logic, scroll wheel
	no more unselects, ...

2000-11-30  Radek Doulik  <rodo@helixcode.com>

	* htmlentity.c: killed warning

	* htmlengine.c (html_engine_update_event): reorder actions, set
	adjustments

2000-11-28  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (init_properties): updated to latest gconf

	* gtkhtml-properties.c: as below
	(GET): use gconf_client_get_without_default and gconf_value_free
	instead of gconf_client_get_full and gconf_value_destroy

	* gtkhtml.c: aplied patch form Chipzz@ULYSSIS.Org
	fixes gconf typos

2000-11-27  Radek Doulik  <rodo@helixcode.com>

	* gtkhtmldebug.c (gtk_html_debug_dump_object): dump ascent and
	descent

	* htmliframe.c (check_point): take care for border area

2000-11-24  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (bin_search_index): new function
	(to_index): new helper function
	(get_bounds): rewritten, uses to_index and bin_search_index
	(check_page_split): updated

	* htmlclueflow.c (check_point): check for p coordinates instead of
	self ones
	(check_point): refactoring: remove tmp var obj1
	(check_point): refactoring: remove tmp var x1, y1
	(check_point): use html_object_next_not_slave

2000-11-22  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (select_range): new method

	* htmltablecell.c (save): add \" around color
	(save): save width attribute

	* htmltable.c (save): save percent if percent > 0 instead of
	specified width

	* htmltablecell.c (save): fixed test

	* htmltable.c (save): added BACKGROUND, CELLSPACING, CELLPADDING,
	WIDTH and BORDER attributes

	* htmlimage.c (html_image_resolve_image_url): also strdup image
	url if not resolved
	(save): g_free url always

	* htmlimage.h (HTML_IMAGE_POINTER): define HTML_IMAGE_POINTER

	* htmltable.c (html_table_init): set bgPixmap to NULL

	* htmltable.h: added bgPixmap to HTMLTable

	* htmltablecell.c (save): make tags uppercase

	* htmltable.c (save): make tags uppercase

	* htmltext.c (get_tags): make tags uppercase

	* htmltablecell.c (save): save bgcolor attribute in TD tag

	* htmltable.c (save): save bgcolor attribute in TABLE tag

	* htmlengine.c (parse_table): set table->bgColor

	* htmltable.c (destroy): free bgColor
	(html_table_init): set bgColor to NULL

	* htmltable.h: added bgColor to HTMLTable structure

	* htmlengine-search.c (display_search_results): use new selection
	API

	* htmlcursor.c (forward): use html_object_next_leaf_not_type
	instead of html_object_next_leaf
	(backward): likewise

	* htmlobject.c (html_object_next_not_slave): don't require
	p->parent
	(html_object_prev_not_slave): likewise
	(html_object_next_leaf_not_type): fixed, use rv when going forward
	(html_object_prev_leaf_not_type): likewise

	* htmlundo.c (do_action): removed warning

	* htmlengine.c (html_engine_normalize_cursor): use
	html_engine_edit_selection_updater_update_now

	* htmlcursor.c (normalize): use html_object_get_length
	(normalize): use html_object_prev_not_slave

	* htmlinterval.c (html_interval_new_from_cursor): take care of
	cursors order

	* htmlengine-edit-selection-updater.c: removed old_point from
	HTMLEngineEditSelectionUpdater, it's not needed anymore
	(updater_idle_callback): use new selection API

	* htmlselection.c (html_engine_set_active_selection): moved from
	htmlengine.c
	(html_engine_activate_selection): renomed from html_engine_set_active_selection
	(html_engine_select_interval): use html_engine_activate_selection

	* htmlinterval.c (unselect_object): moved from htmlselection.c
	(html_interval_unselect): new function

	* htmlselection.c (html_engine_select_interval): new function
	(selection_helper): use html_engine_select_interval
	(html_engine_select_region): use html_engine_select_interval

	* htmlinterval.c (select_object): moved from htmlselection.c

	* htmlselection.c (html_engine_select_region): use html_interval_select

	* htmlinterval.c (html_interval_select): rewritten

2000-11-21  Joe Shaw  <joe@helixcode.com>

	* htmlengine.c (parse_i): Advance the token by only 3 spaces instead of
	8 for the "id" tag. This is a holdover from when it was called
	"imageid".

2000-11-21  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (clear_selection): new helper function
	(html_engine_destroy): use clear_selection
	(html_engine_begin): use clear_selection

	* gtkhtml.c (mouse_change_pos): added window parameter
	(on_object): likewise
	(scroll_update_mouse): updated
	(motion_notify_event): updated
	(enter_notify_event): updated

	* htmlselection.c (html_engine_unselect_all): use
	html_engine_get_top_html_engine

	* htmlengine.c (html_engine_get_top_html_engine): new helper
	function, returns engine from TOP html widget - the one without
	iframe_parent

	* htmliframe.c (append_selection_string): new method

	* gtkhtml.c (shift_to_iframe_parent): new helper function
	(motion_notify_event): use shift_to_iframe_parent
	(button_press_event): shift_to_iframe_parent
	(button_release_event): shift_to_iframe_parent

	* Makefile.am (libgtkhtml_HEADERS): added gtkhtml-enums.h and
	gtkhtml-types.h to libgtkhtml_HEADERS

	* htmlinterval.c (do_downtree_lines_intersection): follow engine
	on way down

2000-11-20  Radek Doulik  <rodo@helixcode.com>

	* htmliframe.c (is_container): iframe is container
	(draw_background): empty method

	* htmldrawqueue.c (draw_obj): take care of iframes

	* htmliframe.c (html_iframe_init): set clue parent to iframe

2000-11-19  Radek Doulik  <rodo@helixcode.com>

	* htmliframe.c (get_engine): new method

	* htmlinterval.c (html_interval_forall): use html_object_get_engine

	* htmlobject.c (get_engine): new virtual method
	(html_object_get_engine): new function

	* htmliframe.c (head): new method
	(tail): new method

2000-11-16  Radek Doulik  <rodo@helixcode.com>

	* htmlobject.c (next): changed to return child->next
	(prev): likewise

	* htmlclue.c: removed next, prev methods

	* htmlobject.c (html_object_next_not_slave): use html_object_next

	* htmlenums.[ch]: renamed from htmlenum

	* htmltypes.h: new file, I've moved some type definitions here to
	avoid annoying circular dependency problems, more types to store
	here in future :)

2000-11-15  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_init): set selection to NULL

	* replaced engine->active_selection with
	html_engine_is_selection_active (engine) call everywhere

	* htmlengine.h: removed active_selection from Engine

	* htmlselection.c (html_engine_is_selection_active): new function,
	replaces engine->active_selection

	* htmlengine.h: added selection interval to engine

	* htmlobject.c (html_object_next_leaf_not_type): new function,
	does next leaf as long as leaf type is t
	(html_object_prev_leaf_not_type): likewise

	* htmlinterval.c (html_interval_select): use
	html_object_next_leaf_not_type instead of
	html_object_next_not_slave

	* htmlselection.[ch]: new files, contain selection stuff moved
	from htmlengine.[ch]

	* htmlobject.c (html_object_forall): added engine parameter +
	update all calls

	* htmltable.c (check_row_split): new helper function
	(check_page_split): try to split row so long as all cells are
	happy with it

2000-11-14  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (check_page_split): new method
	(html_table_class_init): use check_page_split

	* htmlclue.c (check_page_split): don't move y to relative
	coordinates as it's already in them

	* htmltable.c (forall): simplified cell condition

	* htmlprinter.c (html_printer_new): don't save context here

2000-11-13  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-properties.c: added new commands

	* gtkhtml.c (command): implemented new commands

	* gtkhtml.h: added new command cursor-forward/backward

	* htmlengine.c (parse_s): better <s>, </s> recognizing

	* htmltable.c (calc_col_info): add border size to minimal size

2000-11-12  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_s): make sure we close the s tag.

2000-11-11  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (copy): make sure we copy the percent parameters as
	well or bad things happen.

2000-11-10  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_s): added <S></S><STRIKE></STRIKE> tags
	added ID_STRIKEOUT

	* Makefile.am (libgtkhtml_la_SOURCES): added htmlenum.[ch]

	* htmlimageinput.c (html_imageinput_init): updated to use
	percentage

	* htmlengine-edit-images.c (html_engine_insert_image): updated to
	use percentage

	* htmlengine.c (parse_i): updated to use percentage

	* htmlimage.c (save): added ALIGN attribute
	(save): added ALT attribute
	(html_image_init): use percentage
	(html_image_set_size): changed to use new percentage

	* htmlenum.c (html_valign_name): get vertical align value name
	(html_halign_name): likewise

	* htmlenum.[ch]: new files, for html enum utils

	* htmlimage.c (get_actual_width): use html_engine_get_view_width
	and percent_width
	(get_actual_height): likewise
	(save): updated to percenatage, also save width instead of height

	* htmlengine.c (html_engine_get_view_width): new helper function
	(html_engine_get_view_height): likewise

	* htmlimage.h: added percent_width/height to HTMLImage

	* htmlengine.c (html_engine_add_object_with_id): change type of
	old_key to gpointer to avoid compiler warning

	* htmltext.c: removed unused code

2000-11-10  Vladimir Vukicevic  <vladimir@helixcode.com>

	* gtkhtml.c, gtkhtml.h (gtk_html_get_object_by_id): Added
	more generic version of imageid hack; got rid of get_image_by_
	imageid.

	* htmlengine.c, htmlengine.h: Added
	html_engine_add_object_with_id and html_engine_get_object_by_id,
	for associating objects with ids. Added id= tag, but only to
	images. Removed imageid tag. Changed parse_i to use
	add_object for images.

2000-11-10  Radek Doulik  <rodo@helixcode.com>

	* htmltextslave.c (get_ys): helper function, calculates y shift
	for sub/super script
	(draw_spell_errors): use get_ys
	(draw_normal): likewise
	(draw_highlighted): likewise

	* gtkhtmlfontstyle.c (gtk_html_font_style_merge): check for
	DEFAULT style and replace it with SIZE_3

2000-11-09  Radek Doulik  <rodo@helixcode.com>

	* gtkhtmlfontstyle.h: added GTK_HTML_FONT_STYLE_SUBSCRIPT and
	GTK_HTML_FONT_STYLE_SUPERSCRIPT

	* htmlengine.c: added ID_SUB, ID_SUP
	(parse_s): added <sub> and <sup> tags

	* htmlentity.c: added all entities from XHTML 1.0

	* htmltokenizer.c (in_entity): removed old code which doesn't make
	sense to me, let me know if you are aware of idea of this code
	(in_entity): check for searchCount > 9 (&thetasym;)

	* htmlentity.c: removed old code

2000-11-08  Larry Ewing  <lewing@helixcode.com>

	* htmltable.c (save_plain): add simple test/plain save method.
	(html_table_class_init): use save_plain.
	(save): use the result of the calls to html_object_save.

	* htmlimage.c (save_plain): only try to output the alt text if it
	is present.

2000-11-08  Radek Doulik  <rodo@helixcode.com>

	* htmlcolorset.c (SET_GCOLOR): set color only if it's unchanged

	* htmltablecell.c (save): likewise

	* htmltable.c (save): added simple save method

2000-11-07  Larry Ewing  <lewing@helixcode.com>

	* htmlrule.c (html_rule_class_init): use save_plain.
	(save_plain): add a simple rule to the text/plain output.

	* htmlclueflow.c (save_plain): use format string.

	* htmlengine-save.c (write_header): use a format string rather
	than passing the body directly.
	(html_engine_save_buffer_receiver): fix argument type.
	
	* htmlclueflow.c (string_append_nonbsp): make sure we count the
	extra bytes we lose when converting nbsp to a space.
	(save_plain): make sure we deal with byte length and character
	length where appropriate.

2000-11-07  Radek Doulik  <rodo@helixcode.com>

	* htmltextslave.c (could_remove_leading_space): new helper
	function
	(fit_line): use could_remove_leading_space
	(could_remove_leading_space): don't remove on begin of para

	* htmlengine.c (insert_text): eat space on beggining of link

	* htmlgdkpainter.c (calc_text_width): *sigh*, *sigh*, *sigh*,
	replaced painter->text_style with style, this solves random
	bad/good layout problem

2000-11-06  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (save_plain): disable broken condition checks.

2000-11-04  Larry Ewing  <lewing@helixcode.com>

	* htmltext.c (save_plain): remove call to encode_text_to_8bit
	because this actually breaks the mailer which now assumes it is
	getting text/plain in utf-8 not an 8bit character set.  Also stop
	stipping the nbsp here since we can use it in the wrapping code in
	the clueflow. 

	* htmlclueflow.c (save_plain): test for nbsp properly here, and
	convert use append_nonbsp to spaces.
	(string_append_nonbsp): convert utf-8 nbsp sequence to spaces so
	that we put make things less difficult for other mailers.

	* htmlengine.c (parse_i): parse the alt attribute when parsing the
	img element.

	* htmlimage.c (copy): copy alt contents.
	(html_image_set_alt): set the contents of the alt member.
	(html_image_init): initialize alt to NULL;
	
	* htmlimage.h: add html_image_set_alt.

2000-11-04  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (html_image_resolve_image_url): rename from
	resolve_image_url, make it public

	* htmlengine-save.c (get_body): use html_image_resolve_image_url

2000-11-03  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (resolve_image_url): new function, resolves image
	URL using GTK_HTML_EDITOR_EVENT_IMAGE_URL
	(save): use resolve_image_url

2000-11-02  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.h (struct _GtkHTMLEditorAPI): add return value for event
	(_GtkHTMLEditorEventType): added IMAGE_URL editor event

2000-11-03  Dan Winship  <danw@helixcode.com>

	* htmlobject.c (destroy): Free self->object_data before freeing
	self.

2000-11-03  Larry Ewing  <lewing@helixcode.com>

	* htmliframe.c (html_iframe_init): remove out of date comment.
	(iframe_size_changed): correct type of the first arg in the
	function prototype.

	* htmlobject.c (copy): init the datalist before we start copying
	the items into it.  This was cause lots of segfaults in the
	editor.

2000-11-02  Radek Doulik  <rodo@helixcode.com>

	* htmltokenizer.c (prepare_enough_space): raise reserve in buffer
	from 5 to 32

2000-11-01  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (load_bindings_from_file): use g_file_test instead of
	g_file_exist

	* htmltable.c (destroy): fixed cell skipping contidion

	* htmlengine.c (parse_table): ignore nowrap if width is set

	* htmltokenizer.c (html_tokenizer_begin): don't alloc buffer
	(html_tokenizer_end): ser t->size to 0
	(prepare_enough_space): grow t->size by 1/4*t->size + 5
	(TOKEN_BUFFER_SIZE): changed initial token buffer size to 1 << 10

2000-10-31  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c: likewise

	* gtkhtml-im.c: replaced GTKHTML_USE_XIM with GTK_HTML_USE_XIM

	* gtkhtml.c (gtk_html_editor_command): do editor command
	(gtk_html_editor_event_command): new function, "emits"
	EditorAPI event
	(get_value_nick): helper function
	(load_keybindings): added KP_Enter
	(key_press_event): use event->string if e_utf8_from_gtk_event_key
	doesn't handle that, also use it only if length == 1 and string
	[0] < 0x80 as we don't want illegal UTF-8 sequences

	* htmltext.c (spell_error_destroy): commented out g_free 

	* htmlengine-edit-fontstyle.c: removed old unused code, this
	avoids warnings and this code still remain in older versions in
	CVS

	* htmlengine-edit-delete.c (html_engine_delete): use
	html_clueflow_new_from_flow

	* htmlengine-edit-insert.c (insert_para): use
	html_clueflow_new_from_flow

	* htmlclueflow.c (html_clueflow_new_from_flow): new function,
	creates new clueflow with same attributes (style, level,
	object_data)
	(html_clueflow_split): use html_clueflow_new_from_flow

	* htmlobject.c (html_object_copy_data_from_object): new function,
	copies data references from src object to dest one

	* gtkhtml.c (command): new command implemented

	* gtkhtml.h: added command indent-zero

	* gtkhtml.c (gtk_html_set_indent): renamed from gtk_html_indent
	(gtk_html_modify_indent_by_delta): new function

	* htmlclueflow.c (html_clueflow_modify_indentation_by_delta):
	renamed from old html_clueflow_indent

	* keybindingsrc.emacs: likewise

	* keybindingsrc.ms: changed to use ...-toggle

	* gtkhtml.h: renamed toggle bold/italic/underline/strikeout
	commands, added on/off bold/italic/underline/strikeout commands

2000-10-30  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit.c (html_engine_set_data_by_type): new function,
	sets data to objects with given type

	* htmlobject.c (html_object_set_data): new function for setting
	object data
	(html_object_get_data): new function for accessing object data

	* htmlobject.h: added object_data

	* htmltype.c: added hash table type name --> type
	(build_type_names_table): helper function for initial build of
	type_names hash table
	(html_type_from_name): new function, translates type name to type
	using type_names table

2000-10-29  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-insert.c (insert_para): emit editor event with
	INSERT_PARAGRAPH command

	* gtkhtml.c (gtk_html_editor_event_command): new function

	* gtkhtml.h (struct _GtkHTMLEditorAPI): added event to EditorAPI

2000-10-26  Michael Meeks  <michael@helixcode.com>

	* htmlprinter.c (alloc_font): signdness fix.

	* htmlengine-edit-text.c (upper_lower): ditto.

	* htmlengine-edit-text.c (find_first): ditto.

2000-10-26  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_body): call insert_text also for spaces

	* htmlfontmanager.c (alloc_new_font): g_strdup key while inserting
	to hash table
	(destroy_font_set_foreach): g_free key while removing from hash
	table

	* gtkhtml-private.h: include config.h

	* gtkhtml-im.c: include config.h

	* htmlrule.c (fit_line): new virtual method implementation
	(draw): updated for new sizing
	(calc_size): likewise
	(html_rule_class_init): set fit_line

2000-10-25  Radek Doulik  <rodo@helixcode.com>

	* htmltokenizer.c: changed pre to gint to imitate stacked
	behaviour of parser
	(end_tag): updated for stacked pre

	* htmlengine.c (parse_b): added </br> with the same meaning as
	<br> to render broken pages

	* gtkhtml-properties.c: added GTK_HTML_COMMAND_INSERT_RULE

	* keybindingsrc.emacs: added popup-menu, property-dialog,
	insert-rule

	* keybindingsrc.ms: added popup-menu, property-dialog

	* gtkhtml.c (command): implemented insert-rule

	* keybindingsrc.ms: added insert-rule

	* htmlclueflow.c (html_clueflow_spell_check): likewise

	* gtkhtml.c (command): use editor_data instead of spell_data

	* htmlclueflow.c (html_clueflow_spell_check): likewise

	* gtkhtml.c (init): likewise
	(command): likewise

	* htmlengine.c (html_engine_spell_check): use editor_api

	* gtkhtml.c (gtk_html_set_editor_api): updated to set EditorAPI

	* gtkhtml.h (struct _GtkHTMLEditorAPI): extend EditSpellAPI to
	general EditorAPI

	* gtkhtml-properties.c: added new commands

	* gtkhtml.h: added new editor commands for popup menu and property
	dialog

2000-10-24  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-save.c (get_body): added background attribute

2000-10-23  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_d): set divAlign to left before parsing
	actual alignment
	(parse_p): likewise

	* htmlengine-edit.h: publicate in scope of gtkhtml sources some
	usefull functions for translating between types

	* htmlengine-save.c (html_engine_save_get_paragraph_style): new
	helper function
	(html_engine_save_get_paragraph_align): likewise

	* htmlclueflow.c (save): fixed typo

	* gtkhtml.h: gtk_html_load_from_string const safe

	* htmlengine.c (parse_one_token): commented out warning

	* gtkhtml.c (cursor_move): not abort with bad params, only warn
	(move_selection): likewise
	(scroll): likewise
	(gtk_marshal_NONE__INT_INT_FLOAT): added new marshaler

2000-10-20  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-save.c (html_engine_save_get_sample_body): new
	function, used by component for sample views
	(get_body): helper function extracted from write_header
	(write_header): use get_body

	* htmlengine-edit-insert.c (html_engine_insert): try to make magic
	links also after '>', ')' - this could simplify of mail adresses,
	for example Ape <primate@helixcode.com> should do the right thing
	now ;-)

	* htmlengine-edit.c (html_is_in_word): changed back from isalnum
	to isalpha

2000-10-19  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (bin_search_eq_or_lower_index): fixed to not access
	a [-1]

	* gtkhtml-input.c (focus_out): add focus_out signal handler for
	entry
	(set_html_focus): new helper function to set focus back to html
	widget
	(gtk_html_input_line_deactivate): don't set focus to html widget,
	leave that on set_html_focus
	(key_press_event): use set_html_focus
	(focus_out): call set_html_focus in idle callback (otherwise focus
	will be broken)

2000-10-18  Radek Doulik  <rodo@helixcode.com>

	* keybindingsrc.ms: like for emacs

	* keybindingsrc.emacs: changed indentation bindings

	* gtkhtml.c (command): reset html->binding_handled to TRUE in
	editable part

	* htmlclueflow.c (save_plain): add \n for empty paragraphs

	* keybindingsrc.emacs: removed C-left, C-right as they are already
	in standard bindings

	* gtkhtml.c (load_keybindings): removed M-f, M-b from default
	binding

2000-10-17  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-fontstyle.c (object_set_font_style): changed
	order or bit operations, first do OR and then AND
	(html_engine_set_font_style): likewise

	* gtkhtml.c (gtk_html_load_from_string): new helper function, does
	begin, write, end to simplify short/easy html doc loading

	* htmltokenizer.c (in_plain): declare as inline

	* htmltable.c (get_bounds): extract method
	(check_point): optimize

	* htmlentity.c (html_entity_parse): kill warning

	* htmliframe.c (iframe_object_requested): set ret_val only once

	* htmlengine.c (parse_object): don't discard body if we get object
	requested and discard it otherwise

2000-10-16  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-embedded.c (gtk_html_embedded_set_parameter): check for
	already set parameters and don't leak memory

	* htmlengine-save.c (encode_entities): update to non-utf8 texts,
	save all 8bit range instead of encoding it as #-1; it's wrong
	here, but it may work at least with iso-latin-1 I hope,
	new painter should replace it soon
	(write_header): set charset to UTF-8
	(encode_entities): reverted last change

2000-10-15  Radek Doulik  <rodo@helixcode.com>

	* htmltext.c (save_plain): cut down text from utf8 to 8bit before
	plain saving (this fixes anoying A^ for now, should be replaced
	later by text painter)

	* htmlclueflow.c (save_plain): replaced '\240' with ENTITY_NBSP to
	avoid compiler warnings and kill always true compares
	(save_plain): don't use unicode functions here, as text is not in
	utf8 now

2000-10-13  Lauris Kaplinski  <lauris@helixcode.com>

	* htmltokenizer.c: Renamed g_unichar_to_utf8 to html_unichar_to_utf8

2000-10-13  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-rule.c (html_rule_set): new function for setting
	rule parameters

2000-10-12  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (save_plain): wrap the text contained within the
	clue.
	(plain_padding): helper function to determine line padding
	(string_append_len): helper funtion to encode write lengths of
	text.

	* htmlclue.c (save_plain): add arg.

	* htmltext.c (save_plain): add arg.

	* htmlobject.h: add width args to save_plain functions.

	* htmlobject.c (save_plain): add requested_width arg.
	(html_object_save_plain): add arg.

	* htmlengine-save.h: add prototype for save buffer functions.

	* htmlengine-save.c: added functions to create a save buffer to
	hold text before wrapping.
	
2000-10-12  Radek Doulik  <rodo@helixcode.com>

	* htmlrule.c (copy): copy also length and size

2000-10-11  Radek Doulik  <rodo@helixcode.com>

	* Makefile.am (CFLAGS): removed pspell flags
	(testgtkhtml_LDADD): removed pspell libs

2000-10-11  Larry Ewing  <lewing@helixcode.com>

	* htmlengine-edit-selection-updater.c (extend_selection): handle
	the NULL obj here as well.

2000-10-10  Larry Ewing  <lewing@helixcode.com>

	* htmlengine-edit-selection-updater.c (extend_selection): make
	sure tht we deal gracefully when next/prev leaf is NULL.

	* htmlobject.c (destroy): add code to poison destroyed memory.

2000-10-10  Radek Doulik  <rodo@helixcode.com>

	* new spell checking API GtkHTMLEditSpellAPI, it's here as I don't
	want to make libgtkhtml depend on Bonobo, just editor component
	which will use this API

	* removed pspell checking #ifdef's

	* gtkhtml-private.h: like below

	* gtkhtml.c (set_fonts_idle): test for GTKHTML_HAVE_GCONF instead
	of PSPELL which was mistaken
	(set_fonts): likewise

	* htmltable.c (expand_columns): use g_renew
	(expand_rows): likewise
	(inc_rows): expand rows by .25*allocRows instead of +10

2000-10-09  Larry Ewing  <lewing@helixcode.com>

	* htmltext.c (convert_nbsp): initialize rv and rp to NULL.

	* htmlfontmanager.c (alloc_new_font): initialize font to NULL.

	* gtkhtml.c: update to use priv structure.
	(destroy): free priv structure.
	(init): allocate the priv structure.
	(class_init): always initialize the spell suggestion signal.

	* gtkhtml.h: Move several of the gtkhtml public structure entries 
	to a private structure. Always include the spell_suggestion
	request signal so that our class structure does not change size.
	Also always define all the entries in the Command type enum so
	that values do not change based on the inclusion of spelling
	support.

	* gtkhtml-im.c: use html->priv for the gdk input method
	structures.

	* gtkhtml-private.h: add structure definition for GtkHTMLPrivate
	here.

2000-10-06  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (BSCROLL): use GTK_TYPE_SCROLL_TYPE instead of
	GTK_TYPE_ENUM

	* htmlembedded.c (calc_min_width): calc it only if widget is
	already realized, use allocation
	(calc_size): likewise

	* gtkhtml.c (size_allocate): call calc_size only when clue
	min_width is less than available width

	* htmltable.c (draw): optimized drawing, hopefully call draw
	method only on cells in drawed area, use bin_search_eq_or_lower_index
	(bin_search_eq_or_lower_index): helper function

	* htmltokenizer.c (prepare_enough_space): inc tokenizer buffer in
	bigger steps + use realloc

2000-10-04  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (set_editor_keybindings): new helper function
	(gtk_html_set_editable): use set_editor_keybindings
	(load_bindings_from_file): new extracted function
	(load_keybindings): use load_bindings_from_file

	* gtkhtml.h: add editor_bindings to GtkHTML

	* gtkhtml.c (command): new commands implementation

	* gtkhtml.h: new commands - focus-forward/backward

	* gtkhtml.c (focus): container signal handler
	(class_init): add focus

2000-10-03  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_update_event): do cursor home only
	when newPage is TRUE

	* htmltext.c (insert_text): set changes also to parent clue

	* gtkhtml.c (gtk_html_set_paragraph_style): call queue_draw to
	make cursor visible

	* htmlclueflow.c (html_clueflow_set_style): schedule update
	(relayout): new method, if min_width > max_width do
	engine_calc_size and draw

2000-10-02  Radek Doulik  <rodo@helixcode.com>

	* kill some warnings

	* htmltable.c (prev_col_do_cspan): alloc cells before doing
	column spanning

	* htmltokenizer.c (in_plain): use g_unichar_to_utf8

	* htmltable.c (scale_columns): use cell->col
	(calc_column_widths): likewise
	(calc_row_heights): use cell->row
	(calc_size): use cell->col
	(draw): use cell->col and cell->row

2000-09-29  Larry Ewing  <lewing@helixcode.com>

	* gtkhtml.h: turn GTK_HTML_USE_XIM off for the time being.

	* gtkhtml-im.c: wrap contents in ifdef since the structures will
	not be defined.
	
2000-09-29  Larry Ewing  <lewing@helixcode.com>

	* gtkhtml.c (style_set): 
	(realize): 
	(unrealize): 
	(size_allocate): 
	(focus_in_event): 
	(focus_out_event): add entry points for XIM handling.  This is the
	first pass integrating the XIM patches from
	garetxe@euskalnet.net

	* gtkhtml.h: define GTK_HTML_USE_XIM until the configure check is
	written
 
	* gtkhtml-im.c: file added

	* gtkhtml-im.h: file added

2000-09-29  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-search.c (add_iframe_off): new helper function
	(move_to_found): updated to work with IFrames

	* gtkhtml-search.c (changed): call html_engine_search_incremental
	only for non "" texts

	* htmltable.c (html_table_end_table): don't cal lprev_col_do_cspan
	anymore

	* htmliframe.c (search): fixes

2000-09-29  Joe Shaw  <joe@helixcode.com>

	* htmltable.c (do_rspan): Remove printf.
	(html_table_add_cell): call do_cspan after setting the cell so that
	column spanning works correctly.

2000-09-29  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (inc_columns): fix col calculation

2000-09-28  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-search.c (changed): update for
	html_engine_search_incremental changes

	* htmlengine-search.c (html_engine_search_incremental): updated,
	so it could be used without former call to html_engine_search,
	also added forward argument

	* htmltable.c (scale_columns): fixed condition, where r could be
	as high as table->totalRows, which was invalid
	refactored + fixed col/row span

2000-09-27  Radek Doulik  <rodo@helixcode.com>

	* htmltextslave.c (calc_size): updated to UTF8 (I've missed this
	one before, *sigh*)
	(fit_line): use html_text_get_text
	(fit_line): likewise
	(draw_spell_errors): likewise
	(draw_normal): likewise
	(html_text_slave_get_offset_for_pointer): likewise

	* gtkhtmldebug.c (gtk_html_debug_dump_object): new function
	(gtk_html_debug_dump_object): updated slave printing to UTF8

	* htmliframe.c (calc_min_width): don't call html_engine_calc_size
	as it is not needed

	* htmlengine.c: include htmlengine-search.h

	* htmltablecell.c (html_table_cell_class_init): removed
	set_max_width virtual method as it was the same as parent class
	(ClueV)

	* htmlcluev.c (do_layout): extracted get_lmargin
	(get_lmargin): new helper function

	* htmltable.c (html_table_add_cell): increase table->col by
	previous cell colspan

	* htmlclueflow.c (spell_check_word_mark): use interval length
	instead of text_len
	(html_clueflow_spell_check): likewise

	* htmltable.c (optimize_cell_width): fixed calculation of addSize
	(calc_size): fixed calculation of available_width
	this fixes annoying horizontal scrollbar appearance in evolution

2000-09-26  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-search.c (key_press): test e->search_info != NULL

	* htmlsearch.c (html_search_set_forward): added assert

	* gtkhtml.c (move_selection): set binding_handled = TRUE
	(command): binding_handled = FALSE
	(key_press_event): don't call parent key_press handler, as it
	calls bindings_activate, which we don't want to be called again

	* htmliframe.c (search): new virtual method implementation,
	forwards search down the iframe

	* htmlengine-search.c (display_search_results): unselect also for
	root engine (right now it's iframe parent's engine if iframe
	parent != NULL)
	(get_root_engine): helper function

	* htmlengine-search.[ch]: new files, search stuff moved here from
	htmlengine.[ch]

	* htmltokenizer.c (html_tokenizer_write): refactored

2000-09-21  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_init): don't use gtk_object_unref in
	embedded stack - this should fix Joe's problem - I'll look closer
	on this later

	* htmlimage.c: refcounting for image pointers

2000-09-20  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c: update timeouts replaced by idle callbacks
	(html_engine_begin): move factory cleanup + stop
	animations here

	* htmltextmaster.c (html_text_master_magic_link): fixed for ' '
	case

	* htmltext.c (convert_nbsp): reset state to 0 after first pass

	* htmltextmaster.c (html_text_master_magic_link): test mim
	[i].preg != NULL

	* htmliframe.c (set_painter): remember gdk_painter
	(draw): draw only with non-gdk painters, also move widget to right
	place

	* gtkhtml.c (focus_in_event): fixed iframes handling
	(button_press_event): fixed mouse wheel scrolling with iframes

2000-09-19  Radek Doulik  <rodo@helixcode.com>

	* htmlprinter.c (draw_text): updated to UTF8

	* gtkhtml.c (key_press_event): check for str != NULL

	* htmlgdkpainter.c (draw_text): use unicode_strlen
	instead of strlen

	* htmlengine-edit-insert.c (html_engine_insert): use unicode_strlen
	instead of strlen
	(do_insert): updated to utf8

	* htmlgdkpainter.c (draw_spell_error): fixed off/len calculation

	* htmlclueflow.c (spell_check_word_mark): use unicode_strlen
	instead of strlen

2000-09-18  Radek Doulik  <rodo@helixcode.com>

	* htmlgdkpainter.c: use e-font
	(get_font): look for unicode font first

	* gtkhtml.c (key_press_event): use e_utf8_from_gtk_event_key

2000-09-15  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.h: rename button_pressed flag to button1_pressed and use
	if for button 1 only

	* htmlembedded.c (destroy): remove widget from html widget

2000-09-14  Dan Winship  <danw@helixcode.com>

	* htmlembedded.c (destroy): Just hide the embedded widget rather
	than destroying it, to prevent it from being destroyed twice.

2000-09-14  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-movement.c (html_engine_forward_word): refactored
	(html_engine_backward_word): likewise

	* gtkhtml.c (load_keybindings): added M-left, M-b bindings for
	backward-word and likewise for forward-word

	* htmltable.c (set_cell): new helper function, sets cell in table
	on col,row
	(add_cell): refactored set_cells function, filling table with
	cells, which have cspan or rspan > 1 is delayed to
	html_table_end_table, also use set_cell
	(cell_fill): new helper function, fills cell in table (if cspan or
	rspan > 1)
	(html_table_end_table): fill table with cells here
	(get_rc): not needed anymore
	(next): remove call to get_rc
	(prev): likewise

	* htmltablecell.h: added position info to TableCell (col, row)

	* htmlengine-save.c (encode_entities): updated for utf8

	* htmlclueflow.c (spell_check_word_mark): index -> offset and not
	reversed

2000-9-13  Larry Ewing  <lewing@helixcode.com>

	* htmliframe.c (iframe_object_requested): hook up the object
	requested signal.

2000-09-13  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_set_arg): configure pspell to use utf8
	encoding

	* htmltext.c: use unicode_offset_to_index and
	unicode_index_to_offset everywhere
	(convert_nbsp): updated to support utf8

	* htmlgdkpainter.c (utf8_gdk_text_width): last argument changed to
	len and bytes are calculated using unicode_offset_to_index
	(utf8_gdk_draw_text): likewise

2000-09-12  Radek Doulik  <rodo@helixcode.com>

	* htmltextslave.c (draw_spell_errors): use HTMLSpellErrorColor

	* htmlengine.c (html_engine_set_arg): moved spell initialization
	here

	* htmlclueflow.c (html_clueflow_spell_check): do live spell
	checking only if enabled in properties

	* gtkhtml.c: added support for spell checking properties
	(init_properties_widget): new helper function

	* gtkhtml-properties.h: added spell properties

	* htmlcolorset.h (_HTMLColorId): added HTMLSpellErrorColor

	* htmltextslave.c (draw_spell_errors): use HTMLSpellErrorColor

2000-09-08  Radek Doulik  <rodo@helixcode.com>

	* testgtkhtml.c (print_preview_cb): add footer printing (- page number -)
	(print_footer): footer printing

	* htmltextslave.c (fit_line): add cast to make compiler happy

	* htmlprinter.c (do_rectangle): refactored, split to do_rectangle
	and prepare_rectangle
	(prepare_rectangle): new helper function, also do coordinates
	conversions here
	(set_clip_rectangle): implemented this method, also use
	prepare_rectangle

	* htmlobject.c (check_page_split): return 0 instead of y as we
	don't want include this object in upcoming page (it doesn't fit
	there - this is the reason it was called)

	* htmliframe.c (check_page_split): forward to Engine::clue

	* htmlclueflow.c (check_page_split): removed, no more needed

	* htmlclue.c (check_page_split): moved here from ClueV + updated

	* htmlprinter.c (html_printer_scale_to_gnome_print): exported this
	function for engine
	(html_printer_coordinates_to_gnome_print): likewise

	* htmlengine-print.c (html_engine_print_with_header_footer): likewise
	(print_header_footer): helper function for header/footer printing
	(print_page): use print_header_footer

	* gtkhtml.c (gtk_html_print_with_header_footer): new function,
	allows printing headers/footers

	* htmlfontmanager.c (alloc_new_font): pass face_list to
	html_font_set_new instead of *face which is already freed

	* htmlprinter.c: likewise

	* htmlpainter.c: likewise

	* htmlgdkpainter.c: update fort fontmanager changes

	* htmlpainter.h: add unref_font virtual method

	* htmlfontmanager.c: use ref/unref_font everywhere
	(html_font_manager_get_font): ref font if using default instead of
	unavailable face

	* htmlfontmanager.h: add ref_font + unref_font to font manager

2000-09-06  Lauris Kaplinski  <lauris@helixcode.com>

	* htmlgdkpainter.c (utf8_gdk_text_width): translate 0xa0 -> 0x20
	(utf8_gdk_draw_text): Same

2000-09-06  Radek Doulik  <rodo@helixcode.com>

	* htmltextslave.c (fit_line): fixed eating condition once again

	* htmlgdkpainter.h: removed font_style from gdk_painter as it is
	obsolete

	* htmlgdkpainter.c (draw_text): use painter->font_style instead of
	gdk_painter->font_style

	* htmlfontmanager.c (alloc_new_font): create empty set if none of
	faces exists

	* htmltextslave.c (fit_line): dont eat beggining space on
	beginning of paragraph

	* htmlclueflow.c (html_clueflow_spell_check): don't check spell if
	tail is NULL

	* htmltokenizer.c (html_tokenizer_add_pending): don't insert 0xa0
	instead of space - no more needed and it was causing problems as
	0xa0 is not used for &nbsp; anymore

	* htmlgdkpainter.c (draw_spell_error): fix width calculation

2000-09-05  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (scroll): lower page increment by one "standard" line
	height

	* htmlfontmanager.c (html_font_set_get_idx): dec size for index
	(html_font_set_get_idx): handle GTK_HTML_FONT_STYLE_DEFAULT case
	(get_font_size): tuned so that it works fine with 12pt default
	font
	(get_real_font_size): renamed from get_font_size
	(get_font_num): new helper function
	(html_font_set_get_idx): use it
	(get_real_font_size): use it
	(html_font_set_font): test if new font isn't the same one

	* gtkhtmlfontstyle.h (GTK_HTML_FONT_STYLE_MAX_FONT): use ITALIC
	instead of BOLD

2000-09-04  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (calc_column_widths): use pixel_size
	(calc_row_heights): use pixel_size

	* htmlcluev.c (do_layout): use pixel_size for padding

	* htmlengine-print.c (html_engine_print): use them

	* gtkhtml-properties.[ch]: add separate font family/sizes for
	printing

2000-09-01  Radek Doulik  <rodo@helixcode.com>

	* htmlfontmanager.[ch]: new fontmanager

	* htmlgdkpainter.c (utf8_gdk_text_width): move html_gdk_text_width
	here, as htmlgdkfontmanager.c is obsolete now
	(utf8_gdk_draw_text): likewise

	* htmlpainter.c (html_painter_set_font_style): make this method
	static
	(html_painter_get_font_style): likewise
	(html_painter_set_font_face): likewise

	* gtkhtml.c (set_fonts_idle): use new font manager

2000-08-31  Lauris Kaplinski  <lauris@helixcode.com>

	* htmlgdkfontmanager.h:
	* htmlgdkfontmanager.c (html_gdk_text_width): Calculate UTF-8 text width
	(html_gdk_draw_text): Draw UTF-8 text

	* htmlgdkpainter.c (draw_spell_error): Use fontmanager text width
	(draw_text): Use fontmanager methods
	(calc_text_width): Same

	* htmltokenizer.c (html_tokenizer_write): Convert entityValue to UTF-8
	
2000-08-31  Radek Doulik  <rodo@helixcode.com>

	* htmlgdkfontmanager.c (font_face_exists): free list
	(html_gdk_font_manager_find_face): fixed walk thru families which
	has been broken by Lauris rewrite

	* htmliframe.c (draw): forwards draw to embeded widget
	(set_painter): sets painter to embeded widget's engine
	(forall): forward forall method
	(calc_size): don't use pixel_size here
	(html_iframe_class_init): set new virtual function implementations

	* htmlengine-print.c (html_engine_print): use
	html_engine_set_painter

	* htmlengine.c (html_engine_set_painter): new function, sets
	painter to engine

	* htmlobject.c (set_painter): new virtual method
	(html_object_set_painter): new function, uses forall to call
	set_painter on all objects
	(set_painter_forall): helper function

	* gtkhtml-input.c (gtk_html_input_line_destroy): deactivate only
	if previosly activated, fixed unref of ebox instead of frame

2000-08-30  Radek Doulik  <rodo@helixcode.com>

	* testgtkhtml.c: added Simple tree dump to debug menu

2000-08-29  Radek Doulik  <rodo@helixcode.com>

	* htmlclue.c 

	* htmltable.c (append_selection_string): new method
	(html_table_class_init): added append_selection_string

	* htmlclueflow.c (append_selection_string): call Clue super method
	here

	* htmlclue.c (append_selection_string): added selection string
	getting method to Clue
	(html_clue_class_init): added append_selection_string

	* htmlengine.c (get_selection_forall_func): removed
	(html_engine_get_selection_string): instead of calling foreach, do
	traversing thru tree in Object methods

2000-08-28  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml-properties.c (DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE_S):
	New #defines.  The default font size is now 12 points, instead of
	the huge 14 point.
	(gtk_html_class_properties_new): Use them.
	(gtk_html_class_properties_load): Use them.

2000-08-28  Radek Doulik  <rodo@helixcode.com>

	* htmlgdkfontmanager.c (html_gdk_font_manager_find_face): do
	return activities only on one place

	* htmlengine-edit.c (html_engine_selection_pop): switched cursor
	and mark here

2000-08-27  Lauris Kaplinski  <lauris@helixcode.com>

	* gtkhtml.c (set_fonts_idle): Use fontmanager method
	(set_fonts): #ifdef GTKHTML_HAVE_GCONF to kill warning

	* htmlengine.c (parse_font_face): Use painter method instead

	* htmlentity.h: Removed html_entity_prepare, as 0x160 is valid
	unicode char

	* htmlentity.c (html_entity_parse): Use hash table

	* htmlfont.h:
	* htmlfont.c: Removed Gdk dependant parts (which were unused)

	* htmlfontface.h: Removed Gdk dependant members and al methods

	* htmlfontface.c: This is empty now, so will be removed

	* htmlgdkfontmanager.h: Added HTMLGdkFontFace structure
	(html_gdk_font_manager_find_face): Replacement
	(html_gdk_font_manager_set_fixed): Set fixed family + size
	(html_gdk_font_manager_set_variable): Set variable family + size

	* htmlgdkfontmanager.c: Moved htmlfontface stuff here to increase
	code managebility

	* htmlgdkpainter.c (calc_ascent): Use (HTMLGdkFontFace *) cast
	(calc_descent): Same
	(calc_text_width): Same
	(draw_text): Dont translate 0xa0 -> 0x20
	(find_font_face): New class method

	* htmlpainter.h (::find_font_face): New class method
	(html_painter_find_font_face): New accessor function
	* htmlpainter.c: Same
	
2000-08-24  JP Rosevear  <jpr@helixcode.com>

	* Makefile.am: Build testgtkhtml with glibwww2

2000-08-24  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (motion_notify_event): Return FALSE if this is not the
	window we are interested in.
	(button_press_event): Don't add a GTK+ grab.  Check the result of
	the grab.  Use the right window.  Don't set `owner_events'.

2000-08-22  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-properties.c (gtk_html_class_properties_new): defaults
	to 14pt and helvetica

	* gtkhtml.c (init_properties): load properties here for non-gconf
	version

	* gtkhtml-properties.c (gtk_html_class_properties_load): changed
	gnome-config default font size to 14pt and var font to helvetica
	(gtk_html_class_properties_load): removed gnome_config_sync call

	* gtkhtml.c (on_object): renamed from on_url
	(on_object): reset html->pointer_url to NULL and mouse cursor to
	html->arrow_cursor
	(enter_notify_event): new event handler, call mouse_change_pos
	here

	* htmlengine.c (parse_body): don't insert " ", this fixes problem
	with linked images but maybe broke another cases? any complains?
	(parse_d): fix <div> case when on beggining of new flow (head ==
	NULL) set e->flow align to divAlign

	* htmlclueflow.c (calc_size): disabled width setting to rmargin -
	o->x (Larry could you pls check this?)

	* htmltext.c (html_text_init): don't call convert_nbsp here as we
	want &nbsp; not disappear from texts

	* htmlclueflow.c (calc_preferred_width): use
	html_object_next_not_slave instead of obj->next and
	html_object_prev_not_slave likewise

2000-08-21  Mathieu Lacage <mathieu@eazel.com>

	* src/Makefile.am : add LIBADD variable so that ldd reports correct
	output on libgtkhtml.so

2000-08-21  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (next_obj_and_clear): fixed for interval checking
	(spell_check_word_mark): likewise

	* htmltext.c (html_text_init): initialize face to NULL

	* gtkhtml.c (set_fonts_idle): use html_gdk_font_manager_set_size,
	so fonts scale nicely when changing size of variable width fonts
	in capplet
	(set_fonts_idle): get fixed face for fix and not variable

	* htmlgdkfontmanager.c (html_gdk_font_manager_set_size): new
	function, sets size to all non-default faces

	* htmlgdkfontmanager.[ch]: rewritten

	* htmlfontface.[ch]: new files

	* htmlengine.c (current_font_face): new helper function
	(push_font_face): likewise
	(pop_font_face): likewise
	(parse_font_face): likewise

	* gtkhtml.c (gtk_html_construct): moved set_fonts + gconf
	notification here, because engine is created
	(gtk_html_construct): call set_fonts_idle instead of set_fonts

	* htmlengine.c (html_engine_init): initialize clue to NULL

2000-08-18  Larry Ewing  <lewing@helixcode.com>

	* gtkhtml.c (set_fonts_idle): check to make sure we have an engine
	and a clue before we start operating on it.  I'll look more
	carefully at this tomorrow, but I need to read mail now.

2000-08-17  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (init): add gconf notification

	* htmlgdkfontmanager.c (html_gdk_font_manager_set_family_var): new
	helper function
	(html_gdk_font_manager_set_family_fix): new helper function
	(html_gdk_font_manager_set_size_var): new helper function
	(html_gdk_font_manager_set_size_fix): new helper function
	(release_fonts): new helper function - releases loaded fonts
	(load_font): rewritten
	(get_closest_font): helper function, tries get closest font to
	required, if not found returns fixed font or g_assert's when fixed
	is not available
	(get_font): helper function
	(test_font): helper function, uses XListFonts
	(get_size): helper function, gets font size from font name

	* htmlgdkfontmanager.h: added family_var, family_fix, size_var and
	size_fix attributes

	* gtkhtml.c (client_notify_class): class gconf notification
	(client_notify_widget): widgets notification, font attributes are
	set here
	(set_fonts): helper function for font setting
	(set_fonts_idle): idle cb for font setting

	* gtkhtml-properties.c (gtk_html_class_properties_new): set
	default values for font attributes
	(gtk_html_class_properties_load): updated
	(gtk_html_class_properties_update): updated
	(gtk_html_class_properties_save): updated

	* gtkhtml-properties.h: added new attributes for fonts settings

2000-08-15  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (button_press_event): do paste only in editable widget

	* htmlengine.c (html_engine_get_word): likewise
	(html_engine_word_is_valid): likewise
	(html_engine_replace_word_with): likewise

	* htmlengine-edit.c (html_engine_spell_check_range): likewise

	* htmlclueflow.c (html_clueflow_spell_check): use html_is_in_word
	instead of isalpha

2000-08-14  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (selection_helper): new helper function
	(html_engine_select_line): use selection_helper here
	(html_engine_select_word): likewise
	(word_interval): select word interval for selection_helper used in
	select_word
	(line_interval): likewise

	* gtkhtml.c (gtk_html_select_word): respect allow_selection
	(gtk_html_select_line): likewise

	* htmlengine.c (html_engine_select_line): use html_interval_select

	* htmlinterval.c (html_interval_select): new function, selects
	interval into selection

	* htmlengine.c (html_engine_set_active_selection): new fuction,
	sets active_selection flag + gtk selection owner
	(html_engine_get_cursor): new function, returns cursor with actual
	position, works also for non-editable widget

	* gtkhtml.c (gtk_html_select_word): new function, selects word
	(gtk_html_select_line): new function, selects line
	(button_press_event): select word by 2xclick and line by 3xclick

	* htmlengine-edit.c (html_engine_select_word_editable): new
	function, same as below, but for editable widget
	(html_engine_select_line_editable): likewise

	* htmlengine.c (html_engine_select_word): new function, selects
	word after mouse 2xclick
	(html_engine_select_line): likewise for line

	* htmlobject.c (html_object_next_by_type): new helper function
	(html_object_prev_by_type): likewise

	* htmlengine.c (html_engine_select_region): removed queue_draw
	arg (it was always used as TRUE)
	(html_engine_unselect_all): likewise

	* htmlengine-edit-delete.c (html_engine_delete): use
	html_engine_spell_check_range here

	* htmltext.c (split_spell_errors): new helper function
	(split): use split_spell_errors here
	(html_text_spell_errors_add): use g_list_insert_sorted here as we
	could now add new errors in the middle of list instead of
	appending to the end

2000-08-13  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-insert.c (insert_para): use
	html_engine_spell_check_range here
	(insert_chars): refactored, return only on end of function,
	updated to use html_engine_spell_check_range here, do also
	html_engine_move_cursor instead of calling it in do_insert twice

	* htmlengine-edit.c (html_engine_spell_check_range): new function,
	does spell checking on range given by two cursors - cursors must
	be in same paragraph

	* htmlclueflow.c (html_clueflow_spell_check): updated to work on
	interval
	(spell_check_word_mark): likewise
	(next_obj_and_clear): likewise
	(get_text): likewise

	* htmlinterval.[ch]: new files for helper HTMLInterval API +
	implementation

	* htmltext.c (move_spell_errors): new helper function, moves spell
	errors after offset by delta
	(remove_spell_errors): new helper function remove spell errors in
	length len after offset
	(insert_text): use move_spell_errors here
	(remove_text): use move_spell_errors and remove_spell_errors here
	(html_text_spell_errors_clear_interval): new function, clears
	spell errors in interval

2000-08-11  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_get_word): don't use engine cursor but
	make dup instead

	* htmlclueflow.c (get_text): refactored
	(interval_get_start): new helper function, computes starting
	offset in obj relevant to interval
	(interval_get_len): new helper function, computes object len
	relevant to interval
	(get_text_len): extracted from get_text, simplified
	(get_text): uses get_text_len
	(next_obj): simplified, uses html_object_get_length now

	* htmltextslave.c (html_text_slave_class_init): added get_length
	virtual method
	(get_length): return 0 here

2000-08-11  Larry Ewing  <lewing@helixcode.com>

	* htmltextslave.c (html_text_slave_trail_space_width): removed
	this as it is no longer needed.

	* htmltextslave.h: remove html_text_slave_trail_space_width
	prototype.

	* htmlclueflow.c (calc_size): stop subracting the width of the
	trailing space of the total width of the cluflow.  This is no
	longer needed and was causing artifacts.

2000-08-10  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (load_keybindings): disabled g_warning about missing
	binding file

	* htmlclueflow.c (html_clueflow_spell_check): fixed resolving
	is_text by test if obj != NULL

	* htmltextmaster.c (get_cursor_base): fix slave condition for
	slave identification (replaced < with <=)

2000-08-10  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (html_engine_unrealize): add an unrealize function
	to as a slightly reworked version of the patch that Kevin A Gibbs 
	<kgibbs@stanford.edu> sent in to fix unrelization of the widget
	(thanks Kevin).

	* htmlengine.h: add prototype.
	
	* gtkhtml.c (unrealize): call html_engine_unrealize. 

2000-08-05  Radek Doulik  <rodo@helixcode.com>

	* htmltext.c (html_text_get_nb_width): handle "" case
	(html_text_get_nb_width): extracted forwarding of get_nb_width to
	(forward_get_nb_width): new helper function

	* htmltextslave.c (get_next_nb_width): fixed "" case

	* htmltext.c (calc_min_width): fixed "" case

2000-08-04  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (insert_text): don't eat leading spaces in <PRE>
	block

	* htmlprinter.c (draw_panel): scale border size to printer
	coordinates
	(begin): #ifdef'ed debugging rectangle

	* htmlengine-print.c (html_engine_print): use
	html_object_change_set_down here to force complete calcsize

	* htmlobject.c (html_object_change_set_down): new function, set
	changes to this object and all it's childern

2000-08-03  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit.c (html_engine_cut_and_paste_begin): hide cursor
	here
	(html_engine_cut_and_paste_end): show it here

	* gtkhtml.c (motion_notify_event): fixed editor cursor setting on
	click

	* htmlprinter.c (draw_background): added quick color printing
	bacground, pixmaps + tiling to be implemented later

	* htmlengine-print.c (print_all_pages): fixed page printing loop

	* htmlprinter.c (finalize): don't showpage here as it was already
	done
	(begin): set debug rounding line to dashed .5pt gray line

	* htmlengine-print.c (print_all_pages): force new_split_offset
	also when new_split_offset == split_offset

2000-08-02  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (on_url): added assert here
	(mouse_change_pos): call on_url only if obj != NULL
	(scroll_update_mouse): call mouse_change_pos only if widget
	already realized

	* htmlclueflow.c (get_post_padding): removed previous uncorrect
	fix

	* htmltable.c (fit_line): override this virtual method as we do
	not want calc_size to be called here - it is expensive and
	unneeded

	* htmltextslave.c (fit_line): split only when len < posLen

	* gtkhtml.c (motion_notify_event): split
	(mouse_change_pos): new helper function, uses on_url
	(on_url): new helper function
	(scroll_update_mouse): new helper function
	(vertical_scroll_cb): call scroll_update_mouse, so mouse is
	updated when scrolling
	(horizontal_scroll_cb): likewise

2000-08-01  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-insert.c: same as below

	* htmltype.c: same as below

	* htmlengine.c: removed inclusion of htmllinktext.h

	* htmlobject.h: removed nb_width from htmlobject as it is not
	needed/used anymore

	* htmlclueflow.c (should_break): not needed anymore - removed
	(calc_size): first try of renice of this ugly function, we don't
	need is_pre anymore, some code extracted to helper function
	set_line_x, fixed first_run arg value for fit_line, fixed FIT_NONE
	case

	* gtkhtmldebug.c (dump_object_simple): added dumping of TextSlave
	text
	(gtk_html_debug_dump_object_type): added new function

	* Makefile.am: removed htmllinktext.[ch] from sources/headers

	* htmltype.c (html_types_init): removed LinkText type init

	* htmllinktext.[ch]: removed, they were not used anywhere
	
	* htmlobject.c (fit_line): do fitting here instead of simply
	returning FIT_COMPLETE

	* htmltextslave.c (debug_print): new helper function, move debug
	stuff here
	(fit_line): rewritten, should be exact now :)
	(split_at_newline): removed, no more needed
	(get_next_nb_width): new helper function
	(fit_line): do incremental calc_text_width here, so it's much
	faster now

	* htmltext.c (calc_preferred_width): moved here from TextMaster
	(html_text_get_nb_width): helper function returns non-breakable
	text width on begin/end of this text
	(calc_min_width): moved from TextMaster + rewritten

	* htmlclueflow.c (calc_min_width): rewritten

2000-07-31  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (motion_notify_event): set ibeam cursor only when
	selection allowed

	* htmlengine.c (parse_color): try to pad color string with 0 when
	too short
	(parse_table): do | on parse_color result so when color not
	successfuly parsed and we have table or row color, it remains set
	to this color

2000-07-28  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (get_post_padding): add post padding to items
	(not final one)

2000-07-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltext.c (get_tags): Use lowercase for tags.

	* htmlclueflow.c (get_tag): Use lowercase for tags.
	(write_pre_tags): Likewise.
	(get_tag_for_style): Likewise.
	(halign_to_string): Likewise.
	(save): Likewise.
	(save): Likewise.

2000-07-28  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (button_press_event): Don't select the region if
	`allow_selection' is false.
	(motion_notify_event): Don't select anything if `allow_selection'
	is false.

2000-07-27  Joe Shaw  <joe@helixcode.com>

	* src/htmltokenizer.c (html_tokenizer_write): Initialize the tokenizer
	if it hasn't been already.
	
2000-07-27  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (spell_check_word): fixed bad condition in
	g_assert

2000-07-26  Larry Ewing  <lewing@helixcode.com>

	* htmlembedded.c (html_embedded_set_widget): call force_placement.
	(force_placement): The hack to force the widget to get size
	allocated lives here now.

	* htmliframe.c (html_iframe_init): remove the hack for allocation
	from here since it is now in htmlembedded.

	* htmlengine.c (html_engine_destroy): only destroy the spell
	checker if it was properly made.

2000-07-26  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (html_clueflow_spell_check): as below

	* htmlengine.c (html_engine_spell_check): do spell checking only
	if spell_checker was successfuly created

2000-07-24  Peter Williams  <peterw@helixcode.com>

	* gtkhtml.c (setup_scroll_timeout): Use GDK_THREADS_LEAVE/ENTER
	around our direct call the scroll_timeout_cb so that we don't
	deadlock, as we're in a GDK event loop so the threads are locked
	already.

2000-07-21  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-properties.c (gtk_html_class_properties_load):
	implemented gnome_config properties loading
	(gtk_html_class_properties_save): and saving

	* htmlclueflow.c (next_obj): new helper function, skips to next
	non-slave object and updates offset and is_text flag
	(spell_check_word): simplified, use next_obj
	(html_clueflow_spell_check): fixed case, when after add to
	session/personal dictionary word is checked OK and is on the end
	of flow - before there were not cleared spell errors

2000-07-20  Ramiro Estrugo  <ramiro@eazel.com>

	* gtkhtml-properties.c:
	* gtkhtml.c: (class_init):
	* htmltext.c: (destroy):
	Protect more pspell dependent code with #ifdef GTKHTML_HAVE_PSPELL.

2000-07-20  Radek Doulik  <rodo@helixcode.com>

	* htmltext.c (copy_helper): copy spell_errors here
	(destroy): clear spell_errors here

	* htmlcursor.c (html_cursor_get_prev_char): new function, returns
	char before cursor

	* gtkhtml.c: new signal spell_suggestion_request for spell checker
	suggestions handling

	* keybindingsrc.emacs: added bindings for new commands

	* keybindingsrc.ms: added bindings for new commands

	* gtkhtml-properties.c: added new commands

	* gtkhtml.h: added spell-suggest, spell-personal-add,
	spell-session-add commands

	* htmlengine.c (html_engine_get_word): new function, returns word
	at cursor
	(html_engine_word_is_valid): new function, returns FALSE if word
	at cursor is invalid by spell checker
	(html_engine_replace_word_with): new function, replaces word at
	cursor with new one

2000-07-19  Radek Doulik  <rodo@helixcode.com>

	* htmlcursor.c (html_cursor_get_current_char): use
	html_object_next_not_slave here

2000-07-18  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-paste.c (do_paste): use SPELL_CHECK

	* htmlengine-edit-insert.c (do_insert): use SPELL_CHECK

	* htmlengine-edit-delete.c (html_engine_delete): use SPELL_CHECK

	* htmlclueflow.h (SPELL_CHECK): new macro - spell checks clue flow

2000-07-15  Radek Doulik  <rodo@helixcode.com>

	* WIP: spell checking

2000-07-15  Larry Ewing  <lewing@helixcode.com>

	* htmldrawqueue.c (clear): draw the background properly.

2000-07-14  Radek Doulik  <rodo@helixcode.com>

	* htmliframe.c (html_iframe_init): set iframe parent

	* gtkhtml.c (gtk_html_set_iframe_parent): wrapper to set iframe
	parent
	(focus_in_event): if embedded in iframe, give focus to iframe
	parent
	(focus_out_event): updated, handle focus only when not iframe
	embedded

	* gtkhtml.h: added iframe parent to GtkHTML

	* htmltextmaster.c (calc_min_width): fix <PRE> minimal width
	calculation

2000-07-12  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-properties.c (gtk_html_class_properties_load): removed
	compiler warning

	* htmlengine-save.c (encode_entities): added &nbsp; encoding

	* htmlengine.c (html_engine_select_region): changed selection
	behaviour, don't unselect when selection active and pointer moves
	outside an object
	+ select one offset length in object if pointer moves (try move
	pointer over image)

	* htmlimageinput.c: url and target could be NULL now, so images
	with NULL url don't act as links

	* htmlgdkpainter.c (draw_pixmap): save one div here

2000-07-11  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (gtk_html_set_font_style): emit
	INSERTION_FONT_STYLE_CHANGED signal
	(command): use gtk_html_set_font_style and
	gtk_html_toggle_font_style here

	* htmlengine-edit-fontstyle.c (html_engine_set_font_style): return
	TRUE if insertion_font_style changed

2000-07-10  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (load_keybindings): set binding_set to klass bindings
	set before setting standard bindings
	(load_keybindings): clear also klass bindings

2000-07-10  Larry Ewing  <lewing@helixcode.com>

	* htmlengine-edit-fontstyle.c: remove
	html_engine_set_font_style_old as it is no longer being used
	anywhere

	* htmlgdkpainter.c (draw_panel): clean up an an incorrect cast of
	a colorset.

2000-07-07  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (init_properties): be more verbose about gconf errors
	(command): call copy only when selection is active
	(command): call paste only when cut_buffer != NULL

	* testgtkhtml.c (main): added gconf_init

2000-07-06  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c: removed gtkhtmllib_init
	(init_properties): complain if gconf is not initialized (g_error)
	(init_properties): create gconf_client here

2000-07-05  Radek Doulik  <rodo@helixcode.com>

	* patch from LotR applied

	* htmlengine-edit-selection-updater.c (updater_idle_callback):
	disable selection if mark and cursor have the same position

2000-07-05  Dan Winship  <danw@helixcode.com>

	* htmllinktextmaster.c (save): 
	* htmllinktext.c (save): 
	* htmltext.c (save, save_plain): Fix calls to
	html_engine_save_output_string to be safe when the text contains
	%-signs.

2000-07-05  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (load_keybindings): when keybindings file not found,
	bind default bindings anyway

	* htmlengine-edit-fontstyle.c (html_engine_set_font_style): I have
	problems with font style setting, so I have implemented quick
	replacement, which uses cut&paste

	* htmlengine-edit-delete.c (delete_different_parent): set pnext
	before removing p from parent

	* htmlengine-edit-paste.c (merge_possibly): remove empty text
	objects here, this fixes well known magic links bug
	(do_paste): try to merge for all pasted objects, this simplifies
	cut&paste commands (they do not need try to merge by itself)
	(prepare_clueflows): do split_first_clueflow_at_cursor also when
	append is TRUE

	* htmlengine-edit-insert.c (equal_insertion): fixed case when
	target is NULL

	* htmlengine-edit-paste.c (split_first_clueflow_at_cursor):
	simplified, use only append_after (it will call prepend if needed)
	(prepend_object): likewise

	* htmlengine-edit-insert.c (insert_chars_different_style): don't
	split text when inserting on end of it (where offset == text_len)
	so we don't get empty link/textmasters any more
	(insert_chars_at_not_text): simplified, use only append_after (it
	will call prepend if needed)

	* htmlclue.c (html_clue_append_after): when where == NULL then
	call html_clue_prepend instead

2000-07-04  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-text.c (upper_lower): removed quick selection
	bug fix
	(html_engine_capitalize_word): also make tail of word lowercase
	instead of only uppercase first letter

	* htmlobject.c (select_range): mark object selected only when
	length > 0 or start < object length

2000-07-03  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-text.c (upper_lower): quick fix for bug in
	selection, going to fix selection now

	* gtkhtml.h: new commands enum entries

	* gtkhtml.c (command): call capitalize + up/downcase
	implementation

	* keybindingsrc.ms: the same as in emacs, could someone point me
	to right MS bindings?

	* keybindingsrc.emacs: added new bindings M-c,M-u,M-l

	* htmlengine-edit-text.c: new file
	(html_engine_capitalize_word): capitalize word implementation
	(html_engine_upcase_downcase_word): up/downcase word implementation
	(find_first): helper function, finds 1st alphanum char in forward
	direction
	(upper_lower): helper function, converts text in cut_buffer to
	up/downcase

Sat Jul 01 11:50:30 2000  George Lebl <jirka@5z.com>

	* gtkhtml.[ch]:  Add a gtkhtmllib_is_initialized call to find out if
	  we have been initialized.  Also don't initialize gconf if it has
	  already been initialized.

2000-07-01  Radek Doulik  <rodo@helixcode.com>

	* keybindingsrc.ms: added new bindings for inc/dec font size

	* gtkhtml.c (command): added calls for inc/dec font size

	* htmlengine-edit-fontstyle.c (html_engine_font_size_inc_dec): new
	function implementing command for increase/decrease font size
	(inc_dec_size_cb): iterator function for inc/dec in cut&paste
	(inc_dec_size): helper function - computes increased/decreased
	font size

	* htmlengine-edit.c (html_engine_cut_and_paste): new function to
	simplify implementation of simple editor commands

2000-06-30  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-insert.c: added url, target to ActionData
	(do_redo): use url, target
	(create_action_data): likewise
	(decide_color): new function, helps to decide which color for
	text/links
	(do_insert): use url, target
	(equal_insertion): new helper function, decides whether the text
	object has same attributes as insertion

	* htmlengine-edit-fontstyle.c (html_engine_get_document_target):
	fix, return html_object_get_target and not html_object_get_url

	* gtkhtml.c (button_press_event): shift + mouse press button
	extends/reduces selection

	* keybindingsrc.emacs: added shift movement selection also to
	emacs keybindings + C-Insert copy S-Insert paste and S-Delete cut

	* htmltext.c (get_tags): colors attribute saving

2000-06-29  Larry Ewing  <lewing@helixcode.com>

	* htmliframe.c (iframe_url_requested): remove "this is a note"
	warning for peterw's peace of mind.

2000-06-29  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-images.c (html_engine_insert_image): use
	HTMLColor here

	* htmlcolor.c (html_color_new_from_gdk_color): make const safe

	* htmlengine.c (html_engine_destroy): destroy insertion_url/target

	* htmlengine.h: add insertion_urt/target

	* htmlengine-edit-fontstyle.c (html_engine_set_font_style): set
	insertion style only when no selection active

2000-06-28  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (html_image_init): initialize some important
	variables properly.
	Remove the work around for animation sizes, gtkhtml now will
	require gdk-pixbuf 0.9 or later to funtion properly for animated
	gifs.

2000-06-28  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_unselect_all): reset shift_selection
	flag

	* keybindingsrc.ms: new bindings for new commands

	* htmlengine.h: added shift_selection flag to engine

	* gtkhtml.c (move_selection): new commands implementation

	* gtkhtml.h: added new commands for ms like shift selection

	* htmllinktextmaster.c (html_link_text_master_to_text): fixed
	compiler warning

2000-06-28  Larry Ewing  <lewing@helixcode.com>

	* htmllinktextmaster.c (copy_helper): move the url and target
	copying to here.
	(copy): call copy_helper.
	(extract_text): This was needed to properly support the cut
	buffer, otherwise we ended up with invalid url and target strings.
	(split): call copy_helper.
	(html_link_text_master_class_init): use our extract_text method.

2000-06-28  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-properties.c: likewise

	* gtkhtml-properties.h: likewise

	* gtkhtml.c: likewise

	* gtkhtml.h: make gconf usage optional

2000-06-28  Larry Ewing  <lewing@helixcode.com>

	* htmlengine-edit-delete.c (safe_remove): once again do not access
	the next member after you have destroyed the object.

2000-06-27  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (write_pre_tags): Renamed from
	`write_indentation_tags'.  Write an initial `<BR>' if appropriate.
	(write_post_tags): New.
	(write_indentation_tags): Renamed from
	`write_indentation_tags_helper'.  Write an initial newline if
	@last_value is different from @new_value.
	(save): Use it.  Don't output the <BR> here.
	(append_selection_string): Removed bogus `putchar'.
	(write_indent): New.
	(write_indentation_tags): Use it.
	(save): Use it to write indentation spaces before the actual
	contents if the paragraph is not a PRE paragraph.

2000-06-27  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (push_color): ref color when pushing on stack

	* htmlimage.c (copy): ref color only if non-NULL

	* htmlengine-save.c (write_header): implemented color attributes saving

        * near every .c[h] file updated to use HTMLColor
	
	* htmlcolorset.c: updated to use HTMLColor

	* htmlcolor.h: new API for colors handling

2000-06-27  Larry Ewing  <lewing@helixcode.com>

	* htmlclue.c (destroy): don't read the next member from an object
	after we have destroyed that object.

2000-06-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): Relayout the
	following paragraph too.

2000-06-26  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-fontstyle.c
	(html_engine_update_insertion_color): test for NULL new_color

	* gtkhtml.c (gtk_html_set_paragraph_alignment): renamed
	(gtk_html_get_paragraph_alignment): new wrapper function
	(gtk_html_get_paragraph_style): likewise

2000-06-23  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-fontstyle.c
	(html_engine_update_insertion_color): new function, used in
	update_styles
	(html_engine_get_color): new function, simply returns engine
	insertion color
	(html_engine_get_document_color): new function, returns color of
	text under cursor or in selection

	* gtkhtml.c: added signal insertion_color_changed
	(update_styles): emit insertion_color_changed signal when needed

	* htmlengine-edit-insert.c (html_engine_insert): use insertion color
	(create_action_data): remember color
	(do_redo): use remebered color
	(do_insert): use color
	(insert_chars): test also color equality along with style equality
	(insert_chars_at_not_text): use color
	(insert_chars_different_style): use color
	(insert_para): use insertion color

	* htmlengine.h: added insertion color to engine

	* htmlengine-edit.c (html_engine_cut_and_paste_begin): new
	function, initialization of cut&paste
	(html_engine_cut_and_paste_end): new function, finishes cut&paste

	* htmlengine-edit-fontstyle.c (html_engine_set_color): as below
	(html_engine_set_color): use new cut&paste functions

	* htmlengine-edit-insert.c (html_engine_insert_link): use push/pop
	selection
	(html_engine_remove_link): likewise

	* htmlengine-edit.c (html_engine_selection_push): new function to
	store current selection on stack
	(html_engine_selection_pop): new function to restore selection
	from stack

	* htmlengine.h: added insertion color

	* htmlengine-edit-fontstyle.c
	(html_engine_get_document_font_style): new function, returns
	fontstyle from document (HTMLText or selection)
	(html_engine_get_font_style): new function, returns current font
	style (insertion style or if it is default then document font style)
	(html_engine_font_style_toggle): updated to use html_engine_get_font_style
	(html_engine_update_insertion_font_style): updated to use
	html_engine_get_document_font_style

	* gtkhtml.c (key_press_event): update styles only if cursor
	changed position

	* keybindingsrc.ms: same as below

	* keybindingsrc.emacs: added new bindings (Alt 1..7 sets font sizes)

	* gtkhtml.c (command): new commands implementation

	* gtkhtml-properties.c: added new commands for size setting/increasing/decreasing

2000-06-22  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (draw_background): draw our parent in the region
	we are drawing our background bacause we may be flowing around
	something.  This "fixes" bug #6 but now the image drawing code
	needs to be written properly to only draw the region we actually
	request otherwise we will get odd effects on images with
	tranparency.

	* htmlengine.c (html_engine_end): make sure we end the tokenizer
	before we update the engine, otherwise we do not parse trailing
	text because it is only appended after html_tokenizer_end is
	called.

	* htmliframe.c (html_iframe_init): inherit the colorset from the
	parent gtkhtml.

2000-06-21  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (html_image_init): make sure url/target is always !=
	NULL

	* htmlengine-edit-insert.c (html_engine_remove_link_object): use
	html_object_get_length here

	* htmltext.c (get_length): new method, returns text_len
	(html_text_class_init): set get_length method

	* htmlobject.c (get_length): method for htmlobject, returns 1
	(html_object_get_length): new function, returns object length
	(html_object_class_init): set get_length

	* htmlobject.h: added new virtual method get_length

	* htmlengine-edit-insert.c (html_engine_remove_link): new
	function, removes link(s) from selection
	(html_engine_remove_link_object): new function, removes link from
	obj arg

	* htmlimage.c (remove_link): new function, clears url/target
	attributes

	* htmllinktextmaster.c (remove_link): new function, returns text
	master with the same content/style
	(html_link_text_master_class_init): set remove_link method

	* htmlobject.c (html_object_remove_link): new function, returns
	linked object replacement, otherwise NULL

	* htmlobject.h: new virtual method remove_link

	* htmlengine-edit-insert.c (html_engine_insert_link): same as below

	* htmlengine-edit-paste.c (html_engine_paste_object): use
	cut_buffer push/pop functions

	* htmlengine-edit.c (html_engine_cut_buffer_push): new function lo
	"legalize" cut_buffer switching hack
	(html_engine_cut_buffer_pop): opposite to previous one

	* keybindingsrc.ms: added undo/redo to MS like bindings, changed
	alignment modifiers to <Ctrl><Alt>

	* htmlimage.c (set_link): new function, sets urt and target for
	image

	* htmlengine-edit-insert.c (html_engine_insert_link): rewritten,
	now it does copy, modify cut buffer to contain linked objects and
	then paste it back. In case of empty selection, it paste empty
	link text master object

	* htmllinktext.c (set_link): new function, sets url and target,
	returns NULL
	(html_link_text_class_init): set set_link

	* htmltextmaster.c (set_link): new virt. function - returns
	created linktextmaster
	(html_text_master_class_init): set set_link

	* htmlobject.c (html_object_set_link): new function for link setting
	(html_object_class_init): set set_link virtual function to NULL

2000-06-19  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (clean_bindings_set): I must clean all 3 possible
	binding_set's - this maybe fixed by adding new functions to gtk
	(load_keybindings): now it could load custom bindings

	* keybindingsrc.emacs: same as below

	* keybindingsrc.ms: removed binding to GtkHTML class, done in
	gtkhtml.c now

2000-06-19  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (load_keybindings): Map shift+backspace to
	`DELETE_BACK'.

2000-06-19  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete_selection): Update
	the selection before deleting it.

	* htmlengine-edit-copy.c (html_engine_copy): Update the selection
	before copying.
	(html_engine_copy_to_buffer): Likewise.

	* keybindingsrc.emacs: Bind "cut-line" to "<Ctrl>k".

	* gtkhtml-properties.c: Add a "cut-line" command and bind it as
	`GTK_HTML_COMMAND_CUT_LINE'.

	* gtkhtml.c (command): Handle `GTK_HTML_COMMAND_CUT_LINE'.

	* gtkhtml.h: New command `GTK_HTML_COMMAND_CUT_LINE'.

	* gtkhtml-keybinding.c (cut_line): New.

	* htmlengine-edit-cut.c (html_engine_cut): Update the selection
	before doing anything.
	(html_engine_cut_line): New.

	* gtkhtml.c (load_keybindings): Load the keybindings from
	$(prefix)/share/gtkhtml instead of using the gnome_datadir.

2000-06-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_set_editable): Bring the cursor home
	only after ensuring the thing is actually editing-compatible
	[i.e., after calling `ensure_editable()'].

2000-06-17  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (gtk_html_set_editable): If the widget has become
	editable, update the styles with `update_styles()'.
	(gtk_html_begin): Added precondition: @html is not editable.

	* gtkhtml.c (command): Delete the selection appropriately for
	`COMMAND_INSERT_PARAGRAPH', `COMMAND_DELETE',
	`COMMAND_DELETE_BACK'.
	(selection_received): Delete the selection before inserting.
	(key_press_event): Likewise.

	* htmlengine-edit-delete.c (html_engine_delete_selection): New.

2000-06-16  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c: moved enum some defs to gtkhtml-properties.c + some
	minor keybindings changes

2000-06-14  Larry Ewing  <lewing@helixcode.com>

	* htmliframe.c (html_iframe_init): place the widget offscreen
	initialy so that it can size allocate.

2000-06-15  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-properties.c (gtk_html_class_properties_load): use val
	== NULL test instead of !dflt

	* keybindingsrc.emacs: same as in keybindingsrc.ms

2000-06-14  Radek Doulik  <rodo@helixcode.com>

	* keybindingsrc.ms: paragraph styles binded to Ctrl 1..8 + 0 and
	Ctrl-Alt 1..3

	* gtkhtml.c: more keybindings - paragraph styles

	* Makefile.am (testgtkhtml_LDADD): removed -lgconf-gtk which was
	hack and is fixed now

	* testgtkhtml.c (main): call gtkhtmllib_init

        keybindings support + gtkhtml config capplet using gconf
	
	* gtkhtml.c (key_press_event): so, finnaly insert everything which
	nas state not containing Ctrl,Alt
	(gtkhtmllib_init): new function, please call it before using
	gtkhtml widget (we need this for gconf init)

2000-06-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (save_plain): For indented paragraphs, emit as
	many tabs as the level of indentation before the actual contents.

2000-06-12  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (key_press_event): insert text also with LOCK_MASK bit
	turned on
	(key_press_event): queue draw + update style every time we handle key_press

2000-06-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (get_tag_for_item_group): Removed.
	(save): Don't use it anymore.  This will make us produce somewhat
	invalid HTML, but at least indentation will look right.

	* htmlengine.c (html_engine_queue_clear): Call
	`html_colorset_get_color_allocated' instead of
	`html_colorset_get_color', so that we get an allocated color.
	This fixes the "black box when deleting" bug.

	* htmlengine.h: Remove `bDrawBackground' from `HTMLEngine'.  It
	was not being used anywhere.

	* htmlclueflow.c (calc_size): Remove all the text slaves before
	doing anything else.
	(get_pre_padding): New.
	(add_pre_padding): Rewritten to use it.
	(get_post_padding): New.
	(add_post_padding): Rewritten to use it.
	(save_plain): If the pre padding is greater than zero, emit a
	newline before the body of the paragraph.  Likewise, if the post
	padding is greater than zero, emit an extra newline after the body
	of the paragraph.  This way, the plaintext output mimics the
	appearance of the graphically rendered HTML at least a little bit.
	(relayout_with_siblings): Renamed from
	`relayout_for_level_change'.
	(html_clueflow_set_style): Use it.  This way a style change
	updates the padding for the siblings too when necessary.
	(html_clueflow_set_indentation): Use it.
	(html_clueflow_indent): Use it.

	* htmlengine.c (html_engine_normalize_cursor): New.

	* htmlengine-edit-fontstyle.c (set_font_style_in_selection):
	Update the selection before doing anything else.
	(merge_safely): New arg @engine.  Removed args @cursor and @mark.
	(merge_backward): New arg @engine.  Removed args @cursor and
	@mark.
	(merge_forward): Likewise.
	(set_font_style): Call
	`html_engine_edit_selection_updater_cursor_changed'.

	* htmlengine-edit-selection-updater.c
	(html_engine_edit_selection_updater_update_now): Renamed from
	`html_engine_edit_selection_update_now'.
	(html_engine_edit_selection_updater_cursor_changed): New.  This
	function must be called when the object to which the cursor points
	has been destroyed, and consequently the cursor's object pointer
	has changed.

	* gtkhtml.c (scroll): Provide initialization for `delta' to
	placate the whingin' compiler.

2000-06-12  Dan Winship  <danw@helixcode.com>

	* htmltextmaster.c: fix up the MagicInsertMatch regexps: "[_-a-z]"
	doesn't even compile on my machine, and backslashes aren't needed
	(or correct) inside [].

2000-06-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcolorset.c (html_colorset_set_style): Use ->base instead of
	->bg so we look like GtkEntry, GtkCList and the like.

2000-06-12  Radek Doulik  <rodo@helixcode.com>

	* keybindingsrc.emacs: added new bindings

	* keybindingsrc.ms: added new bindings

	* gtkhtml.c (command): new commands implementation

	* gtkhtml.h: new commands for align and indentation

	* gtkhtml.c (load_keybindings): fixed keybindings file path (added
	gtkhtml to it)

	* keybindingsrc.ms:  added font style bindings

	* keybindingsrc.emacs: added font style bindings

	* gtkhtml.c (command): new commands implementation

	* htmlengine-edit-fontstyle.c (html_engine_font_style_toggle): new
	function, used to toggle font style

	* gtkhtml.h: added new commands for font style toggling

	* Makefile.am (keybindings_DATA): added keybindingsrc.emacs and
	keybindingsrc.ms to EXTRA_DIST and let it install

	* gtkhtml.c (load_keybindings): load emacs keybindings (for now,
	later it will be selectable)

2000-06-11  Radek Doulik  <rodo@helixcode.com>

	* Makefile.am (libgtkhtml_la_SOURCES): removed
	gtkhtml-keybinding.[ch] as they are obsolete now - keybings are
	now in gtkhtml.[ch] + rc files

	* gtkhtml.c (class_init): three keybindings signals -
	scroll/cursor_move/command
	default keybindings moved to new function
	(load_keybindings): register default keybindings (+ load from file
	- to be completed)
	(register_enums): register new ENUM types for better rc bindings definition
	(scroll): scroll signal handler
	(cursor_move): cursor movement handler
	(command): command signal handler
	(key_press_event): rewritten, now it first tries activate
	keybindings, next insert text and if not handled forward it to parent

2000-06-09  Ariel Rios  <ariel@arcavia.com>

	* Makefile.am: Added htmlengine-edit-rule.c and html-engine-rule.h
	
	* htmlengine-edit-rule.h (html_engine_insert_rule): Added function for inserting an HTML rule.

	* htmlengine-edit-rule.c: Ditto.

2000-06-08  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (key_press_event): call parent keypress handler if not
	handled by itself

	* testgtkhtml.c (main): set initial focus to html widget

	* gtkhtml.c (class_init): added scroll_vertical, scroll_horizontal
	signals
	added keybindings for new signals (Up/Down, PgUp, PgDown,
	Left/Right, Shift-Left/Right, space/backspace)
	(scroll): new function - scrolls by scroll_type passed adjustment
	(scroll_vertical): new signal handler, scrolls vertical adjustment
	(scroll_horizontal): new signal handler, scrolls horizontal adjustment

2000-06-07  Larry Ewing  <lewing@helixcode.com>

	* htmliframe.c (iframe_size_changed): schedule and updated
	whenever we are notified that the size has changed.
	(html_iframe_init): connect to the size_changed signal of the
	embedded gtkhtml widget.
	(iframe_url_requested): remove the spurious calls to
	html_embedded_size_recalc and html_engine_schedule_update.

	* htmlcolorset.c (html_colorset_set_by): unset the changed flag.
	(html_colorset_set_unchanged): this function updates all colors in
	the the colorset if thier changed flag is not set.
	(html_colorset_set_style): update the colorset based on the style.
	(html_colorset_new): use html_coloset_set_style rather than using
	the style directly.
	(html_colorset_set_color): set the changed flag for each color we
	set.

	* htmlcolorset.h (struct _HTMLColorSet): add array of changed flags.

	* gtkhtml.c (gtk_html_private_calc_scrollbars): emit SIZE_CHANGED
	so that htmlembedded can update the embedded widget when needed.
	(class_init): add size_changed signal and style_set
	(realize): attach the style from the window.
	(style_set): update the default colorset and the current colorset
	based on the new style.

	* gtkhtml.h: add size_changed signal to the class.

2000-06-07  Radek Doulik  <rodo@helixcode.com>

	* htmltextmaster.c (html_text_master_magic_link): use forward
	match direction instead of backward so http://www.helixcode.com is
	linked correctly (lewing, thanks for point that)

        * everywhere changed to use new colorsets
	
	* htmlsettings.c: colors part rewritten to use new colorsets

	* htmlcolorset.c: rewritten, now we have master colorset in engine
	and slave colorsets in painters
	colors are set by default to colors from GtkHTML widget style

	* gtkhtml.c (gtk_html_construct): fixed engine widget setting

	* htmlengine.c (html_engine_class_init): added arg html
	(html_engine_set_arg): new handler
	(html_engine_new): update to use new arg

	* htmlgdkpainter.c (draw_panel): updated to display better limit cases

2000-06-06  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_input): correctly use the member element,
	this cast was scary.  Fixes bugs #11899 #1202 and #11902 at
	http://bugs.gnome.org/
	
2000-06-06  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_get_object_at): correct also x
	coordinate when y < e->topBorder

	* htmlclueflow.c (check_point): corrected bounding condition - now
	you don't loose selection by moving mouse above gtkhtml area

2000-06-05  Radek Doulik  <rodo@helixcode.com>

	* htmltextmaster.c (html_text_master_magic_link): stop search also
	on spaces
	updated regex for mailto:, also remove A-Z as we ICASE

	* htmllinktextmaster.c (html_link_text_master_to_text): new
	function used to replace link by normal text

	* htmlengine-edit-paste.c (html_engine_replace_by_object):
	replaces region by new_obj (used from magic links/remove link)

	* htmltextmaster.c (html_text_master_magic_link): rewritten using
	regex
	(html_engine_init_magic): magic links initializations - compiles
	regexps
	

2000-06-04  Ariel Rios  <ariel@arcavia.com>

	* htmlengine-edit-table.h: (html_engine_create_table) Added proto.

	* htmlengine-edit-table.c (html_engine_create_table): Create and
	return a new table.
	(html_engine_insert_table) We now create the table and add rows
	and cols as required. Still need to find a good way to send the
	cell parameters.
	

2000-06-03  Ariel Rios  <ariel@arcavia.com>

	* htmlengine-edit-table.c: New file needed to add table editing
	capabilities.
	(html_engine_insert_table): Creates a new table and paste it.	
	(html_engine_insert_table): Creates and returns a new cell.
	
	* htmlengine-edit-table.h: Ditto.

2000-06-04  Radek Doulik  <rodo@heltixcode.com>

	* htmlengine-edit-insert.c (html_engine_insert): use magic links
	when inserting ' ' or '\n'

	* htmltextmaster.c (html_text_master_magic_link): new function for
	magical text to link morphing (uses paste)

2000-06-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (save): Don't print a newline at the end when
	style is HTML_CLUEFLOW_STYLE_PRE because that causes <pre> to
	duplicate newlines.

2000-06-02  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (html_engine_update_event): remove debugging printf
	for release.

	* htmlengine-edit-delete.c (html_engine_delete): add cast to
	silence warning.
	
2000-06-02  Dan Winship  <danw@helixcode.com>

	* htmlembedded.c (html_embedded_size_recalc): replace a variable
	initialization that got lost yesterday.

2000-06-01  Larry Ewing  <lewing@helixcode.com>

	* htmlclue.c (destroy): rework that last commit to do things
	slightly differently, html_clue_remove had unintended side
	effects.

2000-06-01  Larry Ewing  <lewing@helixcode.com>

	* htmlclue.c (destroy): remove the objects before we destroy them
	to make sure the clue is in a sane state.

2000-06-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): Save the parent
	of the start object so that we don't segfault when the object gets
	unparented.

2000-06-01  Christopher James Lahey  <clahey@helixcode.com>

	* htmlengine.c (html_engine_destroy): Check that engine->clue
	isn't NULL so that we don't crash.

2000-06-01  Larry Ewing  <lewing@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): queue a redraw
	when we text_len == 0 since we have now lost all text slaves and
	they cannot queue a redraw in the area they have exposed (FIXME).

2000-06-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltype.c: #include "htmliframe.h".

	* htmlengine.c (parse_object): Added missing `HTML_OBJECT()' cast.

	* gtkhtml.c (gtk_html_export): Return FALSE if the type is not
	either `text/html" or "text/plain".

	* htmlengine-edit-delete.c (html_engine_delete): Added a nasty
	workaround to make deletion of an end-of-paragraph correctly
	undoable.  The deletion undo code should be changed to use
	`html_engine_copy()' somehow instead.

2000-05-31  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_object): make sure we don't leak the object
	if the handler returns false.
	(parse_iframe): display the body of the iframe if there is no url
	to load discard it otherwise.  This should eventually be extended
	to allow errors in the stream to cause the body to be displayed.
	(parse_i): remove the closing ifrmae tag check it is now handled
	in parse_iframe.

	* htmlengine.h (RIGHT_BORDER): changd to 10, 20 was an odd
	choice.
	
2000-05-31  Larry Ewing  <lewing@helixcode.com>

	* htmliframe.c (set_max_width): a huge hack to trick the clueflow
	into doing the right thing for the time being.

	* htmlembedded.c (html_embedded_size_recalc): fix assumption that
	em->widget is a gtk_html_embedded.

2000-05-30  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (html_engine_destroy): destroy the clue as well
	fixes http://bugzilla.helixcode.com/show_bug.cgi?id=200
	
2000-05-30  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_object): call gtk_html_embedded_new with
	content type argment.

	* gtkhtml-embedded.h: add type to object definition.

	* gtkhtml-embedded.c (gtk_html_embedded_new): add type argument.
	(gtk_html_embedded_finalize): free type member.

2000-05-30  Larry Ewing  <lewing@helixcode.com>

	* gtkhtml.c (html_engine_object_requested_cb): check and return
	the return value.
	(class_init): change the object_requested signal to have a return
	value.

	* gtkhtml.h: change the object_requested signal prototype.

	* htmlengine.c (discard_body): new helper function to discard
	tokens before end tag.
	(parse_object): added function to handle the elements inside an
	object tag.
	(parse_o): call parse_object.
	(html_engine_class_init): change the object_requested signal to
	have a boolean return value.

	* htmlengine.h: change the object_requested signal prototype.

	* testgtkhtml.c (object_requested_cmd): add a testcase for
	object_request to return FALSE.

2000-05-30  Larry Ewing  <lewing@helixcode.com>

	* htmliframe.c (calc_size): preliminary code to try to get a
	proper size when width and height are not set.
	(html_iframe_init): initialize the new variables and properly set
	width and height.
	(calc_min_width): add the start of a new implementation, this
	should fix dan's problem with resizing in the short term. needs
	more work though.

	* htmliframe.h: add variables for the scroll widget and the html
	widget for now.
	
	* htmlengine.c (parse_iframe): change default size.

2000-05-29  Dan Winship  <danw@helixcode.com>

	* htmlclueflow.c (html_clueflow_class_init): Fix typo. (Don't use
	save_plain to implement HTMLObject:save.)

	* htmlengine-save.c (html_engine_save_plain): Call
	html_object_save_plain rather than html_object_save.

2000-05-29  Larry Ewing  <lewing@helixcode.com>

	* htmlembedded.c (draw): try to be smarted about when we queue a
	redraw.

	* htmlengine-save.c (html_engine_save_plain): add new save
	function for text/plain support.
	(write_header): actually use the gtkhtml VERSION string when
	printing out the header.

	* htmlengine-save.h: expose the new save function.
	
	* htmlengine.c (html_engine_calc_size): rename p to e.
	(parse_iframe): start of iframe support.
	(parse_i): call parse_iframe.

	* Makefile.am (libgtkhtml_HEADERS): add htmliframe.h

	* htmlimage.c (draw): use calc_intersect instead of the old
	check to make sure we are within the bounds.

	* htmltextslave.c (draw): use calc_intersect instead of the old
	check to make sure we are within the bounds.

	* htmltype.h: add iframe type.

	* htmltype.c (html_types_init): call html_iframe_type_init.
	(html_type_name): add IFrame type.

	* htmlclue.c (save_plain): add method.
	(html_clue_class_init): use save_plain.

	* htmlclueflow.c (save_plain): add method.
	(html_clueflow_class_init): use save_plain.

	* gtkhtml.c (gtk_html_export): new export interface, all this
	new export/save stuff needs renaming but I want to get an
	implementation done immediately.

	* gtkhtml.h: add gtk_html_export.
	
	* htmlobject.h: add save_plain method.

	* htmlobject.c (save_plain): add default implementation.
	(html_object_class_init): use save_plain.
	(html_object_save_plain): add entry point.

	* htmltext.c (get_tags): fix the order so our tags are not assured
	to be nested.
	(save_plain): add save_plain to write out plaintext.
	(html_text_class_init): add save_plain.

2000-05-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c: New members `orig_clueflow_style',
	`orig_halignment' and `orig_indentation' in `ActionData'.
	(action_data_from_cut_buffer): New args @orig_clueflow_style,
	@orig_halignment, @orig_indentation.  Assign their values to the
	corresponding member in `ActionData'.
	(html_engine_paste): Retrieve the style parameters of the current
	clueflow and pass them to `action_data_from_cut_buffer()'.
	(do_undo): Reset the original clueflow style according to the values
	in the ActionData.  [Fixes #13]

	* htmlengine-edit-clueflowstyle.c
	(free_prop_list): New helper function.
	(undo_or_redo_destroy_closure): Use it.
	(set_clueflow_style_at_cursor): New arg @do_undo.  If false,
	don't save undo information.
	(html_engine_set_clueflow_style): New arg @do_undo.  If false,
	don't save undo information.
	(set_clueflow_style_in_region): New arg @do_undo.  If false,
	don't save undo information.

	* testgtkhtml.c (goto_url): Updated to the new `gtk_html_begin()'
	API.  Call the `url_requested' callback directly, in a yucky way,
	to reflect the fact that GtkHTML does no longer emit the
	"url_requested" signal for the initial URL.

	* htmlengine-edit-delete.c (delete_different_parent): Get rid of
	unused variables.

	* htmlclueflow.c (save): Added a couple casts to placate the
	whiny compiler.

	* htmlengine.c (html_engine_begin): Removed arg @url and
	corresponding [broken] reference handling.  Also, don't emit
	"url_requested".
	(html_engine_update_event): Removed reference handling.

	* htmlengine.h: Removed member `reference' in `struct
	_HTMLEngine'.

	* gtkhtml.c (gtk_html_begin): Removed arg @url.

	* gtkhtml.h: Removed of GtkHTMLStreamHandle.  Instead, use
	`GtkHTMLStream *'s throughout.

	* gtkhtml-stream.h: Don't define `GtkHTMLStream' anymore.

	* htmlengine.c: `select', `queue_draw' and `active_selection'
	bitfields changed from gbooleans to guints in `SelectRegionData'.

	* htmltext.h: `color_allocated' bitfield changed from gboolean to
	guint.

	* htmltablecell.h: `have_bg' and `bg_allocated' bitfields
	changed from gbooleans to guints.

	* htmlsettings.h: `underlineLinks' and `forceDefaults' bitfields
	changed from gbooleans to guints.

	* htmlobject.h: `redraw_pending' and `selected' bitfields
	changed from gbooleans to guints.

	* htmlimage.h: `color_allocated' and `have_color' bitfields
	changed from gbooleans to guints.

	* htmlengine.h: `have_focus' bitfield changed from gboolean to
	guint.

	* htmlengine-save.h: `error' bitfield changed from gboolean to
	guint.

	* htmlcursor.h: `have_target_x' bitfield changed from gboolean to
	guint.

	* gtkhtml.h: Replaced gboolean bitfields into guints.  [Gboolean
	is signed so compilers might complain.]

2000-05-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c (html_engine_paste_object): Eeek!  Free
	the temporary cut buffer, not the real cut buffer.

	* htmlengine-edit-insert.c (insert_para): Create the empty
	HTMLTextMaster when splitting at offset == 0 even when the
	cursor's object is not text.

	* htmlengine-edit-delete.c (delete_in_object): Destroy a non-text
	object only if the starting offset is zero and the end offset is
	greater than zero.
	(delete_different_parent): Rewritten to make more sense.

	* htmltextmaster.c (merge): If this object is empty, copy font
	style and color from the other one.

	* htmltext.c (check_merge): If either of the two text elements is
	empty, return TRUE.

	* htmlengine-edit-insert.c (insert_para): Use
	`html_text_master_destroy_slaves' instead of destroying slaves
	manually.
	(split_object): New helper function, that splits a text object
	into two text objects or a non-text object into itself and an
	empty text object.

	* gtkhtml-keybinding.c (handle_none): Use
	`gtk_html_debug_dump_tree_simple' instead of
	`gtk_html_debug_dump_tree'.  The latter is too unreadable to be
	useful.  [Maybe we should actually get rid of it at some point.]
	(handle_alt): Removed stale debugging message.

	* htmlengine-edit-paste.c (remove_element_if_empty_text): New
	helper function to destroy an object if it is an empty text
	element.
	(move_cursor_to_safe_object): Helper function for
	`remove_element_if_empty_text'.
	(do_paste): Call `remove_element_if_empty_text' on the first and
	last inserted elements, so that we eat resulting stale empty text
	elements.

	* htmlengine-edit-images.c (html_engine_insert_image): Removed
	debugging message.

2000-05-21  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml-keybinding.c (handle_ctrl): Make `C-d' delete forwards
	instead of backwards.

2000-05-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c (prepare_clueflows): Make sure `first'
	is made false after the first round in all cases.
	(do_paste): Fix pasting of consecutive HTMLClueFlows.

2000-05-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-fontstyle.c (set_font_style): Added
	slow-but-working relayout-and-redraw machinery.
	(move_to_next_text_segment_forwards): Use
	`html_object_next_not_slave()' instead of just `->next' for
	correct behavior.
	(move_to_next_text_segment_backwards): Likewise, with
	`html_object_prev_not_slave()' instead of `->prev'.

	* htmltextmaster.c (get_cursor_base): Spit a warning message if we
	have no slaves.

	* htmltext.c (set_font_style): Set `HTML_CHANGE_ALL' as the change
	flag.

	* htmlengine-edit-fontstyle.c (merge_safely): Destroy the slaves
	of @text and @other by calling `html_text_master_destroy_slaves()'.

	* htmltextmaster.c (html_text_master_destroy_slaves): New function.

	* htmlengine-edit-paste.c (html_engine_paste_object): Eeek!  Don't
	set the cut buffer.

	* htmlengine-edit.c (html_engine_undo): Don't freeze/thaw anymore.
	(html_engine_redo): Likewise.

	* htmlengine-edit-insert.c (do_insert): Skip the inserted text
	too.
	(do_redo): Don't move the cursor after inserting anymore.
	(html_engine_insert): Likewise.
	(do_undo): Delete backwards instead of forwards.

2000-05-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextmaster.c (merge): Call `html_object_change_set()' with
	`HTML_CHANGE_ALL' to trigger a complete layout recalculation for
	the object.

	* htmlengine-edit-delete.c: Redone in a cleaner way.

	* htmlengine-edit-fontstyle.c (set_font_style): Normalize the
	cursor before returning.

	* htmlcursor.c (html_cursor_jump_to): Normalize the cursor before
	moving.

	* htmlengine-edit-fontstyle.c (set_font_style_in_selection):
	@do_undo renamed to @want_undo to avoid conflicts with the
	`do_undo()' function.
	(set_font_style): Likewise.
	(move_to_next_text_segment_forwards): New helper function that
	moves the cursor to the right until there is a non-empty text
	segment on the right of the cursor.
	(move_to_next_text_segment_backwards): Similiar helper function,
	but checking and moving to the left.
	(do_undo): Use them after moving the cursor by the size of the
	changed segment.  This makes sure we correctly handle the case
	with end-of-paragraphs within the selection.

2000-05-17  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-clueflowstyle.c (set_clueflow_style_in_region):
	Prevent segfault by stopping at the last element.

	* htmlengine-edit-fontstyle.c (set_font_style): Update `p' when
	splitting at start.

2000-05-17  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (save): fixup the save code for lists a little,
	now the clueflow save code is scattered with is_item checks
	we need to rework how lists are done, I'll probably do
	it shortly.
	(get_tag_for_item_group): another hack for lists.

	* htmlclueflow.c (is_similar): remove the special case for lists.

2000-05-16  Larry Ewing  <lewing@helixcode.com>

	* htmlrule.c (save): add shade option and and FIXME comment for
	all the possible missing parameters. 

	* htmlengine-save.c (html_engine_save_output_string): change to
	use va_list... the old interface was just too tedious.

	* htmlengine-save.h: change to match new va_list interface.

	* htmlclueflow.c (write_indentation_tags_helper): change to use
	new output string interface.
	(save) the same.

	* htmlimage.c (save): add a save function.
	(html_image_set_url): rename from html_image_set_filename.

	* htmlimage.h: rename html_image_set_filename to html_image_set_url.

2000-05-11  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (is_similar): don't merge list items.
	(calc_size): rework to make sure we don't include the height of
	the first item in a new line in the previous lines ascent
	calculation, we now assume whenever a run ends there is an
	implicit newline.2000-05-16  Larry Ewing  <lewing@helixcode.com>

	* htmlrule.c (save): add shade option and and FIXME comment for
	all the possible missing parameters. 


	* htmlgdkpainter.c (draw_background): optimize this greatly for a couple
	of special cases.

2000-05-09  Ettore Perazzoli  <ettore@helixcode.com>

	* Version 0.2.

2000-05-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlprinter.c (draw_background): Param @color made const.

	* htmlgdkpainter.c (draw_pixmap): Removed unused variable.
	(draw_background): Param @color made const.

	* htmlengine-edit-paste.c (do_paste): Cast to HTMLClueFlow to
	prevent a warning.

	* gtkhtml.c (selection_received): Removed unused variable.

	* htmlpainter.h: Arg @color in virtual method `draw_background'
	made const.

2000-05-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_undo): Freeze/thaw.
	Unfortunately something bad is going on in the relayout code.
	(html_engine_redo): Likewise.

2000-05-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-fontstyle.c (set_font_style): Don't do stupid
	merging.  Decrease count when splitting and setting the font.
	Don't make your life harder when merging.  Overall fixup.
	(merge_backward): Return value changed from `void' to `gboolean'.
	Return true if a merge happened.
	(merge_forward): Likewise.

	* htmltextmaster.c (calculate_new_selection): New helper function.
	(merge): Use it.

2000-05-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-fontstyle.c (do_redo): Reverse the direction for redo.

2000-05-08  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-fontstyle.c (figure_interval): Get rid of unused
	variables.

	* htmltextmaster.c (merge): Fix broken merging in the case in
	which the select length of self is zero.

2000-05-08  Larry Ewing  <lewing@helixcode.com>

	* gtkhtml.c (button_press_event): let button 2 request a paste.
	(selection_get): add TEXT and COMPOUND_TEXT types.
	(selection_received): add preliminary handler for receiving
	seletions.
	(class_init): add select_received handler to the class.
	(init): add the extra targets.

	* gtkhtml.h: expose gtk_html_request_paste to the world.

	* htmlengine.c (html_engine_begin): add the url_requested signal
	back it was accidentally removed.

2000-05-07  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (html_image_set_size): changed percent changing
	behavior to hopefully correct one

	* htmlengine.c (html_engine_parse): reset indent_level to 0

	* htmlengine-edit-paste.c (do_undo): removed delete bug workaround
	as it seems to work now

	* htmlengine-edit-delete.c (merge_text_at_cursor): updated it to
	merge both directions (need ie. after delete of non-text object)
	(delete_different_parent): don't destroy objects going to save_buffer
	(delete_same_parent): likewise
	(delete_different_parent): also append objects from deleted
	paragraphs to save_buffer
	(append_to_buffer): added debug msg + don't insert "" to save buffer

	* htmlimage.c (html_image_init): removed assertion on *filename
	(html_image_factory_register): likewise
	(html_image_factory_register): load image only if != ""

	* htmlengine-edit-paste.c (do_paste): possibly add "" to clueflow
	if bailing out (this fixes pasting parbreak and undo after delete of parbreak)

2000-05-07  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): Avoid looking for
	the end point beyond the end of the text.

	* htmlengine-edit.c
	(html_engine_undo): Unselect all.
	(html_engine_redo): Don't freeze/thaw.
	(html_engine_undo): Don't freeze/thaw here either.

2000-05-07  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c
	(html_engine_delete): Avoid looking for the end point beyond the
	end of the text.
	(merge_text_at_cursor): If merging is not possible, return the
	current offset unmodified.

2000-05-07  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (html_engine_end): if editable call
	html_cursor_home to make sure that even if the the whole buffer is
	loaded in one pass we don't end up with a cursor at an incorrect
	location.

2000-05-06  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_table): don't create bg ptr if background=""
	(parse_b): likewise

	* htmlimage.c (html_image_factory_register): added test for ""
	filename - now it is forbidden
	(html_image_init): likewise
	(html_image_set_filename): likewise

	* htmlundo.c (html_undo_do_undo): do undo only if stack is
	non-empty and don't complain when called with empty stack
	(html_undo_do_redo): likewise

	* htmltext.c (insert_text): partialy rewritten, inserts whole text
	now and calls new convert_nbsp hack
	(convert_nbsp): new function, converts sequence of [<space>&nbsp']
	to sequence with starting space and &nbsp; chars
	(remove_text): use convert_nbsp
	(html_text_init): likewise

	* gtkhtml-keybinding.c (handle_ctrl): added C-z for UNDO and C-r
	for REDO (it is not Emacs like, but helps a lot for testing)

2000-05-05  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): restore cursor
	position before do_undo
	(html_engine_delete): if remove text from last object, save it
	also in save_buffer
	(html_engine_delete): destroy_orig only if it is on object begin,
	when offset ==0, if destroy_orig for nontext increase count,
	so we move one more point forward, later move one point backward
	if destroy_orig

	* htmlengine-edit-insert.c (insert_chars_at_not_text): set cursor
	to beggining of inserted text

2000-05-05  Larry Ewing  <lewing@helixcode.com>

	* htmlembedded.c (draw): queue a draw on the widget when we get a
	draw event, should fix the disappearing embedded widgets.

2000-05-04  Radek Doulik  <rodo@helixcode.com>

	* htmlcursor.c (forward): move cursor also behind non-text
	objects

2000-05-03  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (replace): use html_engine_edit_selection_update_now
	(html_engine_replace_do): disable selection on end of replace
	(parse_a): added missing gdk_color_copy

	* htmlengine-edit-selection-updater.c
	(html_engine_edit_selection_update_now): new function, removes
	idle callback and does update immediately.

	* htmlengine.c (display_search_results): use mark/cursor when
	editable

	* htmltext.c (html_text_set_text): set change flags

	* htmlengine.c (html_engine_parse): reset search & replace engine

2000-05-02  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (cleanup_images): if there are no interestes don't try to
	to free them.

2000-05-01  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (save): rework the saving code so that we merge
	paragraphs of similiar types.
	(is_similar): compare the two flows to see if they can be merged.

2000-04-30  Radek Doulik  <rodo@helixcode.com>

	* htmlsettings.c (html_settings_free_colors): free colors only
	when they've been allocated

	* gtkhtml.c (gtk_html_set_default_background_color): set bgcolor
	in default settings

	* htmlpainter.c (html_painter_draw_background): added const to
	color arg

	* htmlengine.h: removed bgColor and bgColor_allocated

	* gtkhtml.c (gtk_html_set_default_background_color): use new settings

	* htmlengine-edit-insert.c (html_engine_insert_link): use new settings

	* htmlsettings.c (html_settings_reset): new function used to reset
	values (now only collors) from orig settings

	* htmlengine.c (parse_b): update to new settings
	(parse_b): added alink color parsing
	(html_engine_parse): updated for new settings
	(html_engine_draw_background): likewise
	(html_engine_queue_clear): likewise

	* htmlsettings.c (html_settings_set_color): new function for color setting
	(html_settings_get_color): get color (possibly unallocated)
	(html_settings_get_color_allocated): get allocated color
	(html_settings_free_colors): free colors scheduled to be freed and
	possibly also other colors

	* htmlsettings.h: added alink and text color

2000-04-29  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-insert.c
	(do_undo): Undelete `num_chars' character, not just one, you
	doofus.

2000-04-29  Radek Doulik  <rodo@helixcode.com>

	* htmllinktextmaster.c (html_link_text_master_set_url): new setting function 

	* htmltext.c (html_text_set_text): new setting function

2000-04-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c
	(delete_different_parent): `html_object_dup()' before adding to
	the buffer.

	* htmlengine-edit-fontstyle.c: Redone, with undo/redo support.

2000-04-28  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (html_image_set_spacing): set hspace, vspace,
	updated to schedule update
	(html_image_set_filename): set filename, if changed, uregister
	current image_ptr and register new one
	(html_image_set_valign): set valign, if needed shedules update
	(html_image_set_border): set border, if needed shedules update
	(html_image_set_size): set specified_width, specified_height,
	percent, if needed shedules update

2000-04-27  Radek Doulik  <rodo@helixcode.com>

	* testgtkhtml.c (main): test gtk_html_set_default_background_color
	- set light blue background

	* htmlengine.c (html_engine_parse): free allocated bgColor

	* gtkhtml.c (gtk_html_set_default_background_color): new function
	for Dan :)
	(realize): removed setting of bgcolor to gtk bg[NORMAL] color,
	when needed use gtk_html_set_default_background_color instead

2000-04-26  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-paste.c (skip): removed
	(obj_len): new function, returns 1 for non-text, text_len else
	(append_object): don't use skip, keep cursor consistent
	(prepend_object): likewise
	(do_paste): keep cursor consistent, don't use skip, also merge
	objects copied from ClueFlows
	(do_undo): use backward arg of html_engine_delete instead of
	calling html_engine_move_cursor
	hack around html_engine_delete bug - loop buffer_count times and
	remove one char each time - hopefully I correct it

2000-04-25  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-insert.c (html_engine_insert_link): new function
	for link insertion

2000-04-24  Dan Winship  <danw@helixcode.com>

	* htmlengine.c (html_engine_destroy): remove the updateTimer, if
	it's active.
	(html_engine_timer_event): if calling html_engine_update_event,
	remove the updateTimer first, since update_event will clear it.
	(html_engine_end): before calling html_engine_timer_event,
	remove the timerId, since timer_event will clear it.

	Fixes problems with timers being called after the object is
	destroyed.

2000-04-24  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_replace_do): updated to use ask
	function with data

	* htmlreplace.c (html_replace_new): added data arg to ask function

	* Makefile.am (libgtkhtml_la_SOURCES): removed gtkhtml-search.[ch]
	gtkhtml-replace.[ch], gtkhtml-edit-image.[ch]

	* htmlengine-edit-images.c (html_engine_insert_image): removed
	g_return_if_fail (halign != HTML_HALIGN_NONE); as we don't use
	halignment at all

	* gtkhtml.c: removed dialogs deps

	* testgtkhtml.c: removed menus/callbacks using dialogs

	* gtkhtml.h (gtk_html_redo): removed image/search/replace dialog
	functions

2000-04-24  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c
	(skip): Fixed so that it does not skip more than needed when at
	the end of a paragraph.

2000-04-24  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-images.c
	(html_engine_insert_image): We cannot support editing of haligned
	images, so avoid doing that.

2000-04-24  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-edit-image.c (gtk_html_image_dialog_new): lifted dialog
	design up
	(checked_value): creates check/spin button pair
	(check_toggled): checkbuttons callback
	(percent_toggled): percent toggle callback
	(width_toggled): width toggle callback for percent checkbutton
	(menu_activate): align menuitems callback
	(insert): callback which calls image insertion

	* htmlengine-edit-images.c (html_engine_insert_image): updated to
	use valign/halign

2000-04-23  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-images.c (html_engine_insert_image): added
	halign, hspace, vspace args

2000-04-23  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c: Implemented undo/redo.
	(append_to_buffer): New function.
	(delete_same_parent): Return a cut buffer with the stuff that we
	have deleted in it.
	(delete_different_parent): Likewise.
	(html_engine_delete): Updated to setup the undo information too.
	New params @do_undo and @backwards.  @do_undo specifies if we want
	undo information or not, @backwards if we want to delete forwards
	or backwards.

	* htmltextmaster.c
	(copy_text_master_members): New helper function.
	(copy): Use it.
	(extract_text): New function, implementation of
	`HTMLText::extract_text()'.
	(html_text_master_class_init): Install it.

	* htmltext.c
	(copy_helper): New helper function.
	(copy): Use it.
	(extract_text): New function, implementation of
	`HTMLText::extract_text()'.
	(html_text_extract_text): New function.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `extract_text'.

2000-04-23  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-paste.c (html_engine_paste_object): call
	html_engine_paste - this does also cut before insert and fixes
	undo/redo

2000-04-23  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c
	(html_image_new): @filename made const-safe.
	(html_image_init): Likewise.

	* htmlengine-edit-images.c: New file.
	(html_engine_insert_image): Moved here from `htmlengine-edit.c'.
	New params for all the properties of the image object.

2000-04-22  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(replace): Use `html_engine_paste_object()' instead of overriding
	the engine's cut buffer and using `html_engine_paste()'.

	* htmlengine-edit.c
	(html_engine_insert_image): Use `html_engine_paste_object()'.

	* htmlengine-edit-paste.c
	(html_engine_paste_object): New function.

	* htmlengine-edit-cut.c
	(html_engine_cut): New param @do_undo.  If false, don't save undo
	information.

	* htmlengine-edit-paste.c
	(html_engine_paste): New param @do_undo.  If false, don't save
	undo information.

2000-04-22  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c
	(main): We definitely don't want this test program to let users
	edit pages.

	* htmlbutton.c
	(html_button_init): Added an assertion for the case in which
	`type' is unknown.

	* htmlengine.c: Don't care if we have already parsed a `<body>'
	tag; the new `<body>' will just override the existing params.
	Don't initialize `leftBorder', `rightBorder', `topBorder' and
	`bottomBorder' either.
	(html_engine_parse): Do it here instead.  Don't init `bodyParsed'
	anymore.

	* htmlengine.h: Removed member `bodyParsed'.

2000-04-22  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-paste.c (html_engine_paste):  use undo levels

	* htmlengine.c (move_to_found): if editable jump with cursor to
	end of founded text
	(html_engine_replace_do): use undo levels

	* htmlundo.h (HTML_UNDO_LIMIT): raised from 10 to 1024

	* htmlundo.c (level_new): new ctor
	(level_destroy): new dtor
	(html_undo_level_begin): begins new undo level - stores current
	level on levels stack and starts new one
	(redo_level_begin): likewise for redo
	(redo_step_action): redo step action function
	(redo_level_end): end of redo level
	(undo_step_action): undo step action function
	(html_undo_level_end): end of undo level - closes current undo
	level and pops another one from levels stack
	(html_undo_add_undo_action): use undo LIMIT only for first/base undo level

	* htmlundo.h: added undo_levels, redo_levels lists for
	level-stacks

2000-04-22  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcursor.c
	(html_cursor_jump_to_position): Fix precondition: a zero position
	is valid!

	* gtkhtml-keybinding.c
	(insert_para): Updated to use `html_engine_insert()' instead of
	`html_engine_insert_para()'.

	* htmlengine-edit-insert.c: Extensively reorganized.  Implemented
	complete undo/redo support.
	(html_engine_insert_para): Removed.

2000-04-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c
	(calc_size): Update the y coordinate correctly for
	`HTML_VALIGN_TOP' objects.

2000-04-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(ensure_last_clueflow): New function.  If the last
	HTMLClueFlow is empty, fill it with a zero-length text element.
	(html_engine_end): Call it.

2000-04-21  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtmldebug.c
	(gtk_html_debug_dump_tree_simple): Removed unused variable `i'.

	* htmltable.c
	(draw): Removed unused variable `cellpaint'.

	* htmlengine-save.c: #include "gtkhtmldebug.h".

	* htmlimage.c
	(html_image_new): Constify `color'.
	(html_image_init): Likewise.

2000-04-21  Radek Doulik  <rodo@helixcode.com>

	* testgtkhtml.c (image_cb): added insert image to menu + callback

	* gtkhtml-edit-image.h: new file, ImageDialog definition

	* gtkhtml-edit-image.c: new file, implements image insert dialog
	(gtk_html_image_dialog_new): new ctor

	* Makefile.am: added gtkhtml-edit-image.[hc]

	* htmlengine-edit.c (html_engine_insert_image): new function,
	inserts image to document

	* htmlimage.c (copy): added valign, hspace and vspace copying,
	also add dest image to image_ptr interests
	(html_image_animation_timeout): removed some unused
	variables to make compiler happy

2000-04-21  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml-keybinding.c
	(paste): Don't disable the selection anymore, as
	`html_engine_paste()' now does the right thing.

	* htmlengine-edit-selection-updater.c
	(updater_idle_callback): Get rid of ugly, useless `goto'.
	(update_selection): When unselecting everything if the mark and
	the cursor are at the same position, re-set `active_selection' to
	be true.

	* htmlengine-edit.c
	(html_engine_set_mark): Set `active_selection' true.

	* htmlengine-edit-paste.c
	(html_engine_paste): Destroy the cut buffer before re-assigning
	it.
	(update_cursor_position): Removed.

2000-04-20  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (close_flow): eat trailing spaces in ClueFlow

	* testgtkhtml.c (main): commented out gtk_html_set_editable as it
	could break things, so uncomment it yourself if you want to test
	replacing

	* gtkhtml-replace.c (gtk_html_replace_dialog_new): replace dialog ctor
	(ask_dialog_new): ask dialog ctor
	(replace_do): calls html_engine_replace_do, it is used from button
	callbacks

	* gtkhtml-replace.h: replace and replace ask dialogs iface

	* htmlreplace.c (html_replace_new): new ctor
	(html_replace_destroy): new dtor

	* htmlreplace.h: replace info struct iface

	* testgtkhtml.c: new menu "Edit" for search/replace testing
	(main): make widget editable, so we could test some of editing
	stuff here instead of fiddling with components all the time
	(load_done): new replace callback

	* htmltable.c (search): hopefully fixed backward search

	* htmlengine.c (move_to_found): new function, implements jump to
	resulty of search. It nows focuses to whole text slaves, so maybe
	I could enhance it by Slave offset precission
	(html_engine_search_next): fixed, now it returns right retval
	instead of FALSE
	(html_engine_replace): text replacing, does search and ask caller
	then what to do
	(html_engine_replace_do): this one is called from
	html_engine_replace's caller with approriate answer, so it could
	do Replace, ReplaceAll, Next(aka skip) and Cancel.
	(replace): this one does the work, yes replaces text. it prepares
	cut_buffer and then calls html_edit_paste. after paste it updates
	search_info

	* htmlengine-edit-paste.c (html_engine_paste): do this: if there
	is selection, cut first this selection and then do paste. I mean
	this is the right behaviour we want, comments? It needs check, if
	it is oook with undo stuff

	* htmlclueflow.c (search_set_info): updated to use stop_pos and tail

	* htmlsearch.h: added fields stop_pos and last to remember tail of
	founded selection

	* gtkhtml.c (gtk_html_replace): new function, launches/shows
	replace dialog

	* gtkhtml.h: added fields for Replace and Replace Ask dialogs

	* Makefile.am: added new files htmlreplace.[hc], gtkhtml-replace.[hc]

	* htmlengine.c (display_search_results): now it correctly jumps to
	founded text

	* htmlembedded.c (calc_size): set width and height to minimize updates
	(calc_min_width): likewise

2000-04-19  Larry Ewing  <lewing@helixcode.com>

	* htmltablecell.c (draw_background_helper): use the new super cool
	html_painter_draw_background to draw the background of the cell
	and change the arguments to use an ArtIRect.  No longer deal with
	the padding outside of the cluev, the fact that we were meant that
	the cell needed to draw outside it's bounding box.  Now we need to
	fix cluev to do the right thing all the time with padding.
	(draw_background)
	(draw): check the interection before drawing.
	(html_table_cell_init): set the cluev padding rather than the
	table cell padding.  The padding should be handled by the cluev
	completely. but the cluev isn't perfect in how it does this right
	now (see http://www.helixcode.com/ and look at the monkey image.	

	* htmltable.c (calc_row_heights): 
	(calc_size): 
	(calc_size): remove padding, this isn't completely done but I want
	to get the current code in the repository.
	(draw): use the new object intersection test.

	* htmlpainter.c (class_init): 
	(draw_background): replace draw_background_pixmap with draw_background.

	* htmlpainter.h: the same.

	* htmlprinter.c: the same.
	
	* htmlobject.c (html_object_calc_intersection): convenience
	function for calculating the intersection of the drawing region
	and an object.

	* htmlobject.h: make html_object_calc_intersection public.

	* htmlgdkpainter.c (draw_background): change
	draw_background_pixmap to draw_background and add an argument for
	color so that we can optimize drawing later. Also add offset
	arguments since we are now correctly only drawing part of the
	backround and must know where starting offset is.
	(class_init): initialize draw_background.

	* htmlengine.c (html_engine_draw_background): change
	draw_backround to a public function and use the new
	html_painter_draw_background function.

	* htmlengine.h: add html_engine_draw_background.

	* htmldrawqueue.c (draw_obj): use the new
	html_engine_draw_background function.

2000-04-18  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (html_engine_draw): fix the region we choose to
	draw on the toplevel clue.

2000-04-18  Radek Doulik  <rodo@helixcode.com>

	* htmltextarea.c (html_textarea_init): like bellow

	* htmlselect.c (html_select_init): like bellow

	* htmlcheckbox.c (html_checkbox_init): like bellow

	* htmlradio.c (html_radio_new): like bellow

	* htmlbutton.c (html_button_init): like bellow

	* htmltextinput.c (html_text_input_init): use
	html_embedded_set_widget and simplifed

2000-04-17  Radek Doulik  <rodo@helixcode.com>

	* htmlembedded.h: caching of width and height of widget to
	minimize updates

	* htmlembedded.c (html_embedded_set_widget): new function, used to
	set widget for embedded object
	(request): new gignal handler
	(allocate): new gignal handler
	(calc_min_width): use allocation only if widget is already
	allocated
	(calc_size): likewise

2000-04-17  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c
	(save): Changed <br> output policy: we now output them only if the
	paragraph is of style HTML_CLUEFLOW_STYLE_NORMAL and it's the
	first in its parent clue.

	* htmllinktextmaster.c
	(html_link_text_master_new_with_size): New function.
	(html_link_text_master_new): Rewritten by means of it.
	(get_selection): New function, implementing the
	`HTMLObject::get_selection()' method for `HTMLLinkTextMaster's.
	(html_link_text_master_class_init): Install it.
	(html_link_text_master_init): New arg @len.

	* htmlobject.c
	(copy): Added missing instructions to copy certain struct members.

	* htmlengine-edit-paste.c
	(update_cursor_position): Removed.
	(do_paste): Use `html_engine_cut_buffer_count()' instead.  Also,
	fix updating the cursor while pasting empty paragraphs, by calling
	`skip()' whenever we encounter two consecutive HTMLClueFlows in
	the buffer.

	* htmlengine-cutbuffer.c
	(html_engine_cut_buffer_count): New function.

	* htmlengine-edit-cut.c
	(html_engine_cut): Disable the selection with
	`html_engine_disable_selection()'.

	* htmlengine-cutbuffer.c
	(html_engine_cut_buffer_dup): Make it work.

2000-04-17  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (display_search_results): use html_engine_jump_to_object

	* htmlclueflow.c (search_text): implemented backward substring
	search, also search backwards thru childern
	(search_text): fixed ClueFlow traversing, fixed backward substring
	and updated regex search for backward search

2000-04-16  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (search): set regular when showing dialog again

2000-04-16  Larry Ewing  <lewing@helixcode.com>

	* testgtkhtml.c (stop_cb): the stream handler takes care of
	killing the stream.

	* htmlengine.c (html_engine_select_region): remove small leak.
	
2000-04-17  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(search): Added missing `GTK_WIDGET()' cast.

	* htmlengine-edit-cut.c: Rewritten to use the new cursor/region
	handling code.  Also implemented support for undo and redo.

	* htmlengine-edit-paste.c
	(closure_destroy): Use `html_cut_buffer_destroy ()'.
	(html_engine_paste_buffer): New function.

	* htmlengine-edit-paste.c
	(action_data_from_cut_buffer): Use the new function
	`html_engine_cut_buffer_dup()'.

	* htmlengine-cutbuffer.c
	(html_engine_cut_buffer_destroy): Removed arg @engine.
	(html_engine_cut_buffer_dup): New function.

2000-04-17  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_destroy): Remove the timeout
	associated with `timerId', if any.

2000-04-15  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclue.c
	(destroy): Made the code readable.

	* htmlengine-edit-delete.c
	(delete_different_parent): Make the style of the second paragraph
	"win" over that of the first one, so that inserting a paragraph
	break is specular to removing it.

	* htmlengine-edit-paste.c
	(update_cursor_position): Changed to return the number added to
	the cursor's position counter.
	(do_paste): New function, doing all of the pasting work previously
	done by `html_engine_paste()'.  Also return the number of
	character elements pasted.
	(do_undo): New function, implementing the "undo" action.
	(do_redo): New function, implementing the "redo" action.
	(setup_undo): New function, to set up the "undo" action.
	(setup_undo): New function, to set up the "redo" action.
	(html_engine_paste): Rewritten to use these new function, and
	support undo properly.

2000-04-15  Radek Doulik  <rodo@helixcode.com>

	* htmlsearch.c (html_search_new): updated to use GNU regex when
	possible

	* htmlclueflow.c (search_text): likewise

	* htmltextslave.c (fit_line): removed eating of spaces at the
	beggining of line. Lewing please could you take a look at it?
	Is it ok to remove?

2000-04-15  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c
	(html_engine_delete): Restore the original `position' value in the
	cursor after deleting.

	* htmlengine-edit-paste.c
	(skip): If this is the last HTMLClueFlow (`next' is NULL), put the
	cursor at the end of the current object.

	* htmlengine-edit-paste.c
	(html_engine_paste): Handle correct pasting of empty
	HTMLClueFlows.  Also, removed unused variable.

	* htmlobject.c
	(get_selection): Unselect the copy obtained through
	`html_object_dup()'.

2000-04-14  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c
	(split_first_clueflow_at_cursor): Trigger a recalculation of
	everything in the dupped HTMLClueFlow with
	`html_object_change_set()'.
	(add_new_clueflow): Likewise.
	(html_engine_paste): Likewise.

2000-04-15  Radek Doulik  <rodo@helixcode.com>

	* htmlsearch.c (html_search_new): use POSIX calls instead of GNU
	for better portability

	* htmlclueflow.c (search): use cur = HTML_OBJECT
	(info->found->data) instead of g_list_last (found) as we don't
	want miss something :)
	(search_text): use POSIX calls instead of GNU for better portability

2000-04-14  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c: Cleaned up and made robust.  I also
	added a few g_assert()s around in the process, just to make sure
	things are really working.
	(skip): Don't touch the cursor's position counter.
	(html_engine_paste): Likewise.
	(update_cursor_position): New helper function, for updating the
	position counter correctly.
	(prepare_clueflows): New param `append'.  If true, handle creation
	of clueflows for the case in which append to the current object
	instead of prepending to it.
	(html_engine_paste): Pass the appropriate `append' value to
	`prepare_clueflows()'.
	(add_empty_text_master_to_clueflow): New helper function.
	(split_first_clueflow_at_cursor): Use it.
	(prepare_clueflows): If the last HTMLClueFlow is not followed by
	anything, add an empty HTMLTextMaster to it using
	`add_empty_text_master_to_clueflow()'.

	* htmlengine-edit-insert.c
	(html_engine_insert_para): Increment cursor's position counter.

	* htmlengine-edit-paste.c
	(split_at_cursor): In the case of a non-text object, return
	`FALSE' if the offset is zero; otherwise, return `TRUE'.
	(skip): If the following object is NULL, go at the beginning of
	the following HTMLClueFlow.
	(prepare_clueflows): Add the clueflows in the right position.

	* htmlengine-edit-paste.c: Use `gtk_html_debug_dump_tree_simple()'
	instead of `gtk_html_debug_dump_tree()' which is way too verbose.

	* gtkhtmldebug.c
	(gtk_html_debug_dump_tree_simple): New function.
	(gtk_html_debug_dump_list_simple): New function.

	* gtkhtml-keybinding.c
	(paste): New function.
	(handle_ctrl): Bind it to `C-y'.
	(cut): New function.
	(handle_ctrl): Bind it to `C-w'.
	(copy): New function.
	(handle_alt): Bind it to `M-w'.

	* htmlundo-action.h: Changed `description' not to be const
	anymore.

	* htmlengine-edit-selection-updater.c
	(reduce_selection): Unset the selection for HTMLClueFlows
	correctly.

2000-04-14  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-search.c (gtk_html_search_dialog_new): updated to
	support regex

	* gtkhtml.c (gtk_html_search_regex): new function to invoke regex
	search dialog

	* htmlclueflow.c (search_text): use regex for search_regex

	* htmlsearch.c (html_search_new): use ENTITY_NBSP in translation
	table, so &nbsp;'s will be correctly translated to spaces when
	searching
	(html_search_new): updated to support regex

	* htmlentity.h (ENTITY_NBSP): ENTITY_NBSP moved here as it is used
	in htmlsearch

	* htmlsearch.c (html_search_new): added translation table for
	non-case-sensitive searches
	(html_search_destroy): destroy trans table

	* htmlclueflow.c (search): added test for search_next as clueflow
	could also act as any other clue, so may contain non-text childern

	* htmlengine.c (html_engine_search): search for text and selects
	found text
	(html_engine_search_next): continue search

	* gtkhtml.c (gtk_html_search): activate search dialog
	(gtk_html_search_next): search_next or activate search dialog,
	when no previous search was done

	* gtkhtml-search.c (gtk_html_search_dialog_new): new ctor
	(gtk_html_search_dialog_destroy): new dtor
	(gtk_html_search_dialog_run): run search dialog

	* gtkhtml-search.h: new file - interface for Search dialog

	* htmlsearch.c (html_search_new): new ctor
	(html_search_destroy): new dtor
	(html_search_push): push for stack of callers - this stack is
	for search_next to continue Object tree traversing
	(html_search_pop): pop for stack of callers
	(html_search_child_on_stack): test if on top of stack is child of obj

	* htmlsearch.h: new file, contains definition of HTMLSearch helper
	structure and its interface func's

	* Makefile.am (libgtkhtml_HEADERS): replaced gtkhtml-search.c with
	gtkhtml-search.h added htmlsearch.[ch], gtkhtml-search.[ch]

2000-04-13  Larry Ewing  <lewing@helixcode.com>

	* htmlgdkpainter.c (draw_pixmap): do full alpha-blending on
	images.  This is just testing code right now, and everything is
	the same as it used to be if you turn off gdk_painter->alpha.  It
	is dog slow for animations, but that is easy enough to fix.
	(draw_background_pixmap): fix the optimized draw_background_pixmap
	to work for transparent images in table cells again (check
	http://www.helicode.com/ for the rendering problems this fixes).

	* htmlimage.c (html_image_factory_frame_done): make the signature
	of the signal that is now being emitted for frame done.  This
	looks like a recent bug fix in gdk-pixbuf, you will need to update
	it again.

2000-04-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-clueflowstyle.c: Rewritten in a better, cleaner
	way, taking advantage of the changes in cursor and selection
	handling.

	* htmlengine-edit-selection-updater.c: Use `HTMLCursor''s member
	`position' instead of `relative_position', which is now gone.

	* htmlengine-edit-paste.c
	(skip): Update `position' in the cursor, instead of
	`relative_position', which is now gone.
	(html_engine_paste): Likewise.

	* htmlengine-edit-insert.c
	(html_engine_insert): Use `html_cursor_get_position()' instead of
	using the relative position.  Also, don't reset the relative
	position.

	* htmlundo.c
	(do_action): Don't call `html_cursor_set_relative()'.  Instead,
	use `html_cursor_jump_to_position()' to restore the cursor
	position.
	(html_undo_discard_redo): Set `redo_stack' to NULL.

	* htmlundo-action.c
	(html_undo_action_new): Strdup the description before storing it
	into the struct.
	(html_undo_action_destroy): Free the description.

	* htmlundo-action.h: Member `relative_position' replaced by member
	`position'.

	* htmlcursor.c: Updated to use `position' instead of
	`relative_position' throughout.
	(html_cursor_home): Do not call `html_cursor_reset_relative()'
	anymore.
	(html_cursor_get_relative): Removed.
	(html_cursor_set_relative): Removed.
	(html_cursor_reset_relative): Removed.
	(html_cursor_goto_zero): Removed.
	(html_cursor_set_position): Removed.
	(html_cursor_get_position): New function.
	(html_cursor_jump_to_position): New function.

	* htmlcursor.h: Member `relative_position' removed.  New member
	`position'.

	* htmlundo.c
	(html_undo_add_undo_action): Don't destroy the redo list.

	* htmlengine-edit-selection-updater.c
	(extend_selection): Use `html_cursor_precedes()'.
	(reduce_selection): Use `html_cursor_precedes()' and
	`html_cursor_follows()'.

	* htmlcursor.c
	(html_cursor_precedes): New function.
	(html_cursor_follows): New function.
	(html_cursor_get_current_char): Made const-safe.

	* htmlengine-edit-selection-updater.c
	(extend_selection): Updated to use `html_object_next_for_cursor()'
	and `html_object_prev_for_cursor()' instead of
	`html_cursor_forward_object()' and
	`html_cursor_backward_object()'.
	(reduce_selection): Likewise.

	* htmlcursor.c
	(forward_object): Rewritten to only take and return an `HTMLObject
	*'.
	(forward): Updated accordingly.
	(html_cursor_forward_object): Removed.
	(html_next_object_for_cursor): New function.
	(backward_object): Rewritten to only take and return an
	`HTMLObject *'.
	(backward): Updated accordingly.
	(html_cursor_backward_object): Removed.
	(html_prev_object_for_cursor): New function.

	* htmlclueflow.c
	(html_clueflow_indent): Added preconditions for @engine.
	(html_clueflow_set_halignment): Likewise.
	(html_clueflow_set_style): Likewise.
	(html_clueflow_set_properties): Likewise.
	(html_clueflow_get_style): New function.
	(html_clueflow_get_halignment): New function.
	(html_clueflow_set_indentation): New function.
	(html_clueflow_get_indentation): New function.

2000-04-12  Radek Doulik  <rodo@helixcode.com>

	* htmltablecell.c (draw_background_helper): as below

	* htmlengine.c (draw_background): update to use modified
	draw_background_pixmap

	* htmlgdkpainter.c (draw_background_pixmap): changed
	functionality, instead of width and height it has tile_width and
	tile_height args and do bgPixmap tiling

2000-04-11  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (calc_size): do calc_col_info only when min_width
	change flag is set
	(calc_preferred_width): likewise

2000-04-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(html_engine_disable_selection): Handle the mark only if the
	engine is editable.
	(html_engine_set_editable): Disable the selection before changing
	the editable state.

	* gtkhtml.c
	(motion_notify_event): Do not set the mark if not editable.

2000-04-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-cut.c
	(html_engine_cut): Use `html_engine_disable_selection()' instead
	of `html_engine_unselect_all()'.

	* gtkhtml.c
	(button_press_event): Use `html_engine_disable_selection()'
	instead of `html_engine_unselect_all()'.
	(selection_clear_event): Likewise.

	* gtkhtml-keybinding.c
	(forward): Don't unselect the region.
	(backward): Likewise.
	(up): Likewise.
	(down): Likewise.
	(beginning_of_line): Likewise.
	(end_of_line): Likewise.
	(page_up): Likewise.
	(page_down): Likewise.
	(forward_word): Likewise.
	(backward_word): Likewise.
	(beginning_of_document): Likewise.
	(end_of_document): Likewise.
	(delete): Use `html_engine_disable_selection()' instead of
	`html_engine_unselect_all()'.
	(insert_para): Likewise.
	(handle_none): Likewise.
	(unselect_all): Removed.
	(disable_selection): New function.
	(handle_ctrl): Map it to `C-g'.

	* htmlengine.c
	(html_engine_disable_selection): New function.

	* htmlcursor.c
	(forward): After going to the next object, increment the offset by
	one if it is the first child.

	* htmlengine-edit-movement.c
	(update_selection_if_necessary): New helper function.
	(html_engine_move_cursor): Call it to update the selection when
	moving the cursor.
	(html_engine_end_of_document): Likewise.

	* htmlengine.c
	(html_engine_init): Initialize `selection_updater'
	(html_engine_destroy): Destroy it.

	* htmlengine.h: New member `selection_updater' in `HTMLEngine'.

	* htmlengine-edit-selection-updater.h: New file.
	* htmlengine-edit-selection-updater.c: New file.

	* htmlcursor.c
	(html_cursor_equal): Made params const-safe.

	* htmlengine.c
	(html_engine_unselect_all): Do not destroy the mark if it is NULL.

	* htmlengine.c (parse_h): Center `<hr>'s by default.

2000-04-11  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (get_actual_height): 
	(get_actual_width): copy netscapes method of scaling the image in
	both dimensions even in only one dimension is specified.  This
	should fix the flag problems on http://www.suse.com/

	* htmlengine.c (parse_table): fix typo in alignment parsing.

2000-04-11  Darin Adler  <darin@eazel.com>

	* htmlgdkpainter.c: (create_temporary_pixbuf), (drawpixmap):
	Updated for new GdkPixbuf.

	* htmlimage.c: (html_image_animation_new),
	(html_image_animation_start), (html_image_animation_timeout),
	(render_cur_frame), (animation_actual_width),
	(animation_actual_height): Updated for new GdkPixbuf.

2000-04-11  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_update_event): removed if (e->parsing)
	around scrollbars updating - does anybody know why it was here?
	(html_object_changed): removed definition of
	html_engine_update_event and html_engine_schedule_update as it was
	already defined above

	* htmltokenizer.c: rewritten tokenizer blocking - I have removed
	Blocking token struct as it is no more needed
	added tokens_num and blocking_tokens_num counters to tokenizer struct
	(html_tokenizer_blocking_push): new function, blocking now works
	as simple stack implemented with GList containing HTMLTokenType's
	(html_tokenizer_blocking_pop): pop from blocking stack
	(html_tokenizer_blocking_get_name): get name of TokenType on top
	of blocking stack
	(html_tokenizer_has_more_tokens): it is now so simple :)
	(html_tokenizer_write): updated to use new blocking

2000-04-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlrule.c
	(draw): Fixed bogus brace placement that caused aligned rules not
	to be laid out correctly.

	* htmlengine.c
	(parse_table): Do not override horizontal alignment if no
	alignment is specified.  Also removed some bogus code.
	(parse_h): Removed bogus horizontal alignment assignment.

2000-04-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_table): No longer make tables centered when they have a
	percent or absolute width.  This is not correct as far as I know.

2000-04-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcursor.c
	(forward_object): New helper function.
	(forward): Use it.
	(html_cursor_forward_object): New function.
	(backward_object): New helper function.
	(backward): Use it.
	(html_cursor_backward_object): New function.
	(html_cursor_home): Changed so that it does not need
	`html_cursor_forward()' anymore.

	* gtkhtml-keybinding.c
	(set_mark): New helper function.
	(handle_ctrl): Bind it to the `C-SPC'.
	(unselect_all): New function.
	(handle_ctrl): Bind it to `C-g'.

	* htmlengine-edit.c
	(html_engine_set_mark): New function.
	(html_engine_redo): Added precondition: @e must be editable.
	(html_engine_undo): Likewise.

	* htmlengine.c
	(html_engine_init): Initialize `mark' to NULL.
	(html_engine_destroy): Destroy `mark' if not NULL.
	(html_engine_unselect_all): Destroy `mark' and set it to NULL.

	* htmlengine.h: New member `mark' in `HTMLEngine'.

2000-04-10  Larry Ewing  <lewing@helixcode.com>

	* htmlpainter.h: added new GtkHTMLEtchStyle enum and change the
	draw_panel argument types to match.

	* htmlgdkpainter.c (draw_panel): change inset type to
	GtkHTMLEtchStyle enum.  For GTK_HTML_ETCH_NONE draw in the current
	pen color.
	(create_temporary_pixbuf): remove unused variables and function
	calls.

	* htmlpainter.c (html_painter_draw_panel): change inset type.

	* htmlprinter.c (draw_panel): change inset type.
	(do_rectangle): remove color set to black.
	
	* htmlrule.c (draw): call html_painter_draw_panel with proper
	style.

	* htmltable.c (draw): call html_painter_draw_panel with proper
	style.
	
	* htmlimage.h: added color variables to image structure.

	* htmlimage.c (reset): clear color_allocated flag.
	(copy): copy the new color information.
	(draw): pass the new panel type flag.  Draw the image border if we
	have one, and pass the hightlight color to the animation.
	(html_image_class_init): use the new reset.
	(html_image_init): added color argument and initialized the color
	variables.
	(html_image_new): added color argument.
	(render_cur_frame): added highlight color argument, and used it.

	* htmlimageinput.c (html_imageinput_init): call html_image_new
	with proper arguments.

	* htmlengine.c (parse_i): pass the current color to html_image_new
	for drawing borders.

2000-04-10  Radek Doulik  <rodo@helixcode.com>

	* htmltokenizer.c (html_token_buffer_new): constructor of new
	structure HTMLTokenBuffer
	(html_token_buffer_destroy): new destructor
	(html_token_buffer_append_token): append token to token buffer
	(html_tokenizer_new): use HTMLTokenBuffer's
	(html_tokenizer_next_token): rewritten to use HTMLTokenBuffer's
	(html_tokenizer_has_more_tokens): likewise
	(html_tokenizer_reset): updated to HTMLTokenBuffer's
	(html_tokenizer_begin): updated to HTMLTokenBuffer's
	(html_tokenizer_append_token): rewritten
	(html_tokenizer_append_token_buffer): rewritten

	* htmltokenizer.h: cleaned interface - most of tokenizer functions
	are now static, whole tokenizer structure is private

	* htmltokenizer.c: rewritte of token buffers

2000-04-09  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_table): save e->noWrap in noWrap_save and
	restore it on return (this fixes case when there are nested table
	cells with nowrap option set)

	* gtkhtmldebug.c (gtk_html_debug_dump_tree): dump also min_width

	* htmltext.c (insert_text): set change flags
	(remove_text): likewise

	* htmlclueflow.c (html_clueflow_split): set change flags for
	original clue

	* htmltext.c (split): set min_width change flag for original Text

	* htmlimage.c (html_image_factory_area_prepared): set change flags on images using this image_ptr

	* htmltextslave.c (html_text_slave_init): clear min_width change
	bit as textslaves have min_width always 0

	* htmlclue.c (html_clue_append_after): added call to html_object_change_set
	(html_clue_append): likewise
	(html_clue_prepend): likewise
	(html_clue_append_right_aligned): likewise
	(html_clue_append_left_aligned): likewise

	* htmlobject.c (html_object_change_set): new function - set change
	flags of object and of all its parents

	* htmlobject.h: new enum for change flag bits
	flag for info about cached info added to HTMLObject
	added min_width to cache calc_min_width

	* htmlengine.c (draw_background): fill with bgColor also when it
	has background pixmap, because it could contain transparent
	pixels as www.post.cz

2000-04-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c
	(html_image_factory_end_pixbuf): Changed param types to match new
	GtkHTMLStream stuff.
	(html_image_factory_write_pixbuf): Likewise.

	* htmlengine.c
	(html_engine_write): Get a `GtkHTMLStream *' instead of a
	`GtkHTMLStreamHandle' as the @handle param.
	(html_engine_end): Likewise.

	* gtkhtml-private.h
	(gtk_html_private_calc_scrollbars): Prototype moved here.

	* gtkhtml-private.h: Removed GtkHTMLStream functions and typedefs.

	* gtkhtmlstream.h: New file, header for `gtkhtmlstream.c'.

	* gtkhtml-stream.c: Renamed from `htmlstream.c'.  Cleaned up a
	little, and added preconditions.  Use `GtkHTMLStream *' instead of
	`GtkHTMLStreamHandle' all over the place.
	(gtk_html_stream_ref): Removed.
	(gtk_html_stream_unref): Removed.
	(gtk_html_stream_destroy): New function.
	(gtk_html_stream_close): Renamed from `gtk_html_stream_end'.
	(gtk_html_stream_new): Removed param @url.

	* htmlprinter.c
	(set_color): New helper function.
	(draw_line): Set the line width to `PIXEL_SIZE' before drawing.
	(draw_rect): Likewise.
	(do_request_delete): Helper function.
	(draw_rect): Use it.
	(draw_panel): Use it.

2000-04-08  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_table): change the default alignment for
	percent and fixed width tables to HTML_HALIGN_CENTER.

	* htmlimage.c (html_image_animation_stop): change argument to
	HTMLImageAnimation.
	(html_image_animation_destroy): call html_image_animation_stop
	before we destroy the animation so we don't get a stray timeout.

2000-04-08  Larry Ewing  <lewing@helixcode.com>

	* htmltablecell.c (draw_background_helper): account for pixel_size
	when drawing background color and pixmaps.
	(draw): account for pixel_size when checking bounds.

	* htmlengine.c (parse_h): set the default size of rules to 2 pixels.
	(html_engine_update_event): Jump to the anchor after adjusting the
	document bounds and Keep jumping to the position of the
	anchor.  This corrects some problems when the layout changes but
	is still a bit of a hack.
	(html_engine_begin): remember to strip the leading # from the
	value we look up so that we look for the same thing we store.
	Always free the reference before setting it now that we don't
	constantly remove it.

	* htmlrule.c (calc_size): mimic the netscape behaviour by having a
	minimum hr size then padding every larger size with one pixel on
	top and bottom.
	(draw): use html_painter_draw_panel/rect to properly support the
	size arguments and set the pen color for noshade.  Also make sure
	that we always put the extra padding at the bottom of the rule.
	
2000-04-07  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (draw): use 1st frame when printing

2000-04-06  Radek Doulik  <rodo@helixcode.com>

	* htmltokenizer.c (html_tokenizer_end): destroy blocking tokens to
	be sure

	* htmlengine.c (parse_a): moved target = g_strdup (p + 7); behind
	#if 0 to not leak memory

	* htmltokenizer.c (html_tokenizer_write): g_free blocking token

	* htmlembedded.c (destroy): if widget has parent then destroy else
	unref

	* htmltable.c (destroy): loop thru allocRows and not thru
	totalRows
	removed add_row_info one line function as it has been used only
	once, from HTMLTable removed rowInfo as it has ben used only in
	calc_col_info
	(calc_col_info): g_free rowInfo

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-clueflowstyle.c: Added members `mask',
	`alignment' to `SetClueFlowStyleForallData'.
	(set_clueflow_style_in_region_forall): Change the attributes
	associated with the bits set in `mask'.

	* htmlengine-edit-clueflowstyle.h: Fix typo in
	`HTMLEngineSetClueFlowStyleMast': `ENGNIE' -> `ENGINE'.

	* htmlrule.c
	(html_rule_new): @max_width renamed to @length.
	(html_rule_init): Likewise.  Set `rule->lenght' and update the
	`FIXEDWIDTH' flag appropriately.  Do not set ascent/descent here.
	But do set the new member `size'.
	(calc_min_width): Do the Right Thing.
	(draw): Display the correct width, using `max_width' instead of
	`width' as appropriate.
	(calc_size): New function, implementation of
	`HTMLObject::calc_size()'.
	(html_rule_class_init): Install it.

	* htmlrule.h: New members `length' and `size' in `HTMLRule'.

	* htmltext.c
	(html_text_init): Respect the passed length param @len properly.

	* gtkhtmldebug.c
	(gtk_html_debug_dump_tree): Print `text_len' for text objects too.

	* htmlengine-edit-delete.c
	(delete_same_parent): Prevent NULL crash.

2000-04-06  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (html_image_factory_area_prepared): ref pixbuf
	(html_image_factory_frame_done): ref animation
	(html_image_factory_end_pixbuf): unref loader instead of only
	closing it
	(html_image_factory_area_prepared): catch only first pixbuf
	(copy): use g_strdup for url and target
	(destroy): g_free url and target

	* htmlcluev.c (html_cluev_class_init): removed FIXME as it don't
	need destroy

	* htmltablecell.c (html_table_cell_unlink): removed FIXME, use
	html_object_destroy instead of g_free
	(html_table_cell_class_init): removed FIXME for destroy as cell
	has no allocated mem and so don't need it (clue destroy is called
	instead by html_object_destroy)

	* htmlform.c (html_form_destroy): destroy elements

	* htmlimage.c (html_image_animation_destroy): g_free HTMLImageAnimation

	* testgtkhtml.c (parse_href): added 3x html_url_destroy (tmpurl);

	* htmltable.c (destroy): free table->cells
	(destroy): free table->rowInfo
	(add_columns): use g_new instead of g_malloc
	(destroy): added g_array_free
	
	* htmlimage.c (html_image_pointer_destroy): unref animation

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlobject.c
	(relayout): Use `prev_ascent' and `prev_descent' instead of the
	values in yourself as they are set to zero after the call to
	`html_object_reset()'.

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimageinput.c
	(draw): Do not set `width', `ascent'.
	(calc_min_width): New function, implementation of
	`HTMLObject::calc_min_width()'.
	(calc_size): New function, implementation of
	`HTMLObject::calc_size()'.

	* htmlembedded.c
	(calc_size): New function, implementation of
	`HTMLObject::calc_size()'.
	(calc_min_width): New function, implementation of
	`HTMLObject::calc_min_width()'.
	(html_embedded_class_init): Install them.

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c
	(animation_actual_width): Return `w'.  Made static.
	(animation_actual_height): Return `h'.  Made static.

	* htmltable.c
	(draw): Don't paint anything unless we have at least
	one row.

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltablecell.c
	(reset): New function, implementation of `HTMLObject::reset()'.
	Set `bg_allocated' to `FALSE'.

	* htmltext.c
	(reset): New function, implementation of `HTMLObject::reset()'.
	Set `color_allocated' to `FALSE' so that we don't get fooled if
	the painter changes.
	(html_text_class_init): Install the method.

	* htmltable.c
	(calc_size): Use the pixel size, dammit!

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcluev.c
	(set_max_width): Set the maximum width from `max_width', not
	`o->width'!

	* htmlimage.c (get_actual_width): Calculate width based on the
	percent value using double arithmetic to avoid overflow.
	* htmlrule.c (draw): Likewise.
	* htmltable.c (calc_col_info): Likewise.
	* htmltable.c (scale_columns): Likewise.
	* htmltable.c (calc_column_widths): Likewise.
	* htmltable.c (calc_size): Likewise.

	* htmltable.c
	(scale_columns): Calculate proportions through doubles to avoid
	overflow.

2000-04-05  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-paste.c (split_first_clueflow_at_cursor): removed strdup

	* htmllinktext.c (split): removed strdup, set text_len to new value

	* htmltextmaster.c (get_selection): removed strdup

	* htmlengine-edit-insert.c (html_engine_insert_para): removed strdup
	(do_insert_different_style): removed strdup
	(do_insert_not_text): removed strdup

	* htmlengine.c (insert_text): removed strdup
	(create_empty_text): removed strdup
	(ensure_editable): removed strdup

	* htmltextmaster.c (html_text_master_init): new arg len
	(html_text_master_new_with_len): new constructor

	* htmltext.c (html_text_init): now uses g_str(n)dup, new arg len
	(destroy): new destructor
	(html_text_new_with_len): new constructor

2000-04-05  Larry Ewing  <lewing@helixcode.com>

	* htmltable.c (calc_size): set the table width after we have
	calculated the optimal size.  Fixes rendering of tables with
	borders (tests/test6.html).

2000-04-05  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltable.c
	(calc_col_info): If the size is specified as a percent value, then
	we *don't* want to set the minimum size as the percentage of the
	maximum width!

	* htmltablecell.c
	(set_max_width): Don't set the width.

	* htmltable.c
	(set_max_width): Don't set the width.

	* htmlrule.c
	(set_max_width): Don't set the width.

	* htmlcluev.c
	(set_max_width): Don't set the width.

	* htmlcluealigned.c
	(html_cluealigned_init): Don't set the width.  Broken!

	* htmlclue.c
	(calc_min_width): Don't be stupid and don't set the minimum width
	to the current width when you are a fixed width object.
	(calc_preferred_width): Likewise for the preferred width.

	* htmlcluev.c
	(get_right_margin): Use the maximum width instead of the max
	between the maximum width and the effective one for calculating
	the margin.
	(set_max_width): Always set `max_width', even if we are a
	fixed-width object.

	* htmlengine.c
	(parse_h): Set `divAlign' according to the value of the "align="
	attribute, and save the old value through the first arg in
	`push_block'.
	(block_end_clueflow_style): Set `divAlign' from `miscData1'.
	(parse_p): Pass the current `divAlign' as the first misc arg in
	`push_block'.
	(parse_a): Likewise.
	(parse_h): Likewise.
	(draw_background): Made static.

2000-04-05  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c
	(parse_href): Make sure `tmpurl' is always destroyed.

	* htmlcluev.c
	(do_layout): If we are doing the layout from scratch, initially
	set the width to zero.

	* htmlclue.c
	(reset): Invoke the parent class' reset implementation too.

	* htmlobject.c
	(reset): Set width, descent and ascent to zero.

	* htmltablecell.c
	(calc_min_width): Do not set the object's width.
	This is BROKEN.

	* htmltable.c
	(a_colinfo): Removed.
	(COLUMN_INFO): New, saner macro replacing it.
	(a_coltype): Removed.
	(COLUMN_TYPE): New, saner macro replacing it.
	(a_columnpos): Removed.
	(COLUMN_TYPE): New, saner macro replacing it.
	(a_columnprefpos): Removed.
	(COLUMN_PREF_POS): New, saner macro replacing it.
	(a_colspan): Removed.
	(COLUMN_SPAN): New, saner macro replacing it.
	(a_columnopt): Removed.
	(COLUMN_OPT): New, saner macro replacing it.
	(a_rowheights): Removed.
	(ROW_HEIGHT): New, saner macro replacing it.
	(calc_col_info): Consider pixel size throughout.
	(optimize_cell_width): Likewise.
	(scale_columns): Likewise.
	(calc_column_widths): Likewise.
	(calc_row_heights): Likewise.
	(calc_size): Likewise.
	(draw): Likewise.
	(html_table_new): Removed params @x, @y, @max_width.
	(html_table_init): Likewise.  Initialize `specified_width'.
	Removed broken percent handling.
	(calc_size): Use `html_object_set_max_width' instead of
	`html_table_cell_set_width()'.
	(calc_col_info): Use `specified_width' for the size.
	(calc_size): If the object has a fixed width or has a
	percent-specified size, set the width accordingly and then call
	`optimize_cell_width()'.  Otherwise, just set the width and avoid
	calling `optimize_cell_width()'.

	* htmltable.h: Renamed `ColType' to `ColumnType' and changed the
	value names so that they make more sense.  `ColInfo_t' renamed to
	`ColumnInfo'.  `RowInfo_t' renamed to `RowInfo'.  New member
	`specified_width' in `HTMLTable'.

	* htmlimage.c
	(calc_min_width): Use the pixel size when dealing with `hspace'
	and `vspace'.
	(calc_preferred_width): Likewise.
	(calc_size): Likewise.

	* htmltablecell.c
	(html_table_cell_init): Remove parameter `max_width'.  Initialize
	`fixed_width' to be zero.  Also, do not set the object's `width'
	field here.  This is BROKEN!
	(html_table_cell_new): Remove parameter `max_width'.
	(html_table_cell_set_width): Removed.
	(html_table_cell_set_fixed_width): New function.
	(calc_min_width): Use `fixed_width' instead of `maxWidth'.  Also,
	consider the pixel size as retrieved through
	`html_painter_get_pixel_size()'.

	* htmltablecell.h: New member `fixed_width' in `HTMLTableCell'.

	* htmlcluev.c
	(html_cluev_new): Removed parameter `max_width'.
	(html_cluev_init): Likewise.

	* htmlengine.c
	(parse_t): Do not suppress paragraphs after the table.

	* htmltextslave.c
	(html_text_slave_trail_space_width): Always return zero for a
	zero-length slave.

2000-04-05  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (html_image_animation_timeout): use html_engine_draw
	instead of trying to start the painter by hand.  Make a
	delay_time == 0 behave the same as delay_time == 1 to make sure we
	have some idle time (this seems to be what netscape does too).
	(render_cur_frame): do less work now that we are only being called
	from the draw method.
	(animation_actual_height):
	(animation_actual_width): quick hacks to work around bugs in
	gdk-pixbuf, will be removed shortly.

2000-04-05  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (should_break): fixed to break between text and
	non-text objects, return if it shold break after obj instead as
	before before object (this makes http://www.stjerneskolan.com more
	happy, but there remains some ?table? problems)

	* htmlengine.c (parse_b): reset to default border size

	* htmltable.c (html_table_class_init): set parent_class

2000-04-04  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (render_cur_frame): implement
	GDK_PIXBUF_FRAME_DISPOSE, fix: fill background rectangle first

	* htmlstringtokenizer.c (html_string_tokenizer_destroy): make sure
	that buffer exists before g_free it

	* htmltextarea.c (destroy): replaced html_embedded_class with parent_class

	* htmltable.c (destroy): replaced html_object_class with parent_class

	* htmlselect.c (destroy): replaced html_embedded_class with parent_class

	* htmlimageinput.c (destroy): replaced html_embedded_class with parent_class

	* htmlembedded.c (destroy): replaced html_object_class with parent_class

	* htmlelement.c (destroy): replaced html_object_class with parent_class

	* htmlclue.c (destroy): replaced html_object_class with parent_class

	* htmlanchor.c (destroy): added call to parent_class destroy

	* htmlimage.c: don't use members of GdkPixbufAnimation directly
	and use gdk_pixbuf functions instead, so code is cleaner now
	(destroy): destroy animation structure, call parent_class destroy
	(html_image_animation_destroy): new HTMLImageAnimation destructor
	(html_image_pointer_new): new constructor
	(html_image_pointer_destroy): new detructor

2000-04-04  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (html_image_animation_timeout): increment the
	current frame after the timeout has expired so that if there is an
	expose event before the time is out we have the proper current image.
	(render_cur_frame): fix the rendering for frame->action ==
	GDK_PIXBUF_FRAME_DISPOSE.	

2000-04-04  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_h): Close the current flow before adding the object.

2000-04-03  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(init): Initialize `scroll_timeout_id' to zero.
	(destroy): If `scroll_timeout_id' is nonzero, remove timeout of
	which it is the ID.
	(scroll_timeout_cb): New function, handling the scroll timeout.
	(setup_scroll_timeout): New function to set up the scroll timeout.
	(remove_scroll_timeout): New function to remove the scroll
	timeout.
	(motion_notify_event): If we are selecting and the mouse gets
	outside the window, set up the scroll timeout so that we allow
	scrolling during selection.
	(button_release_event): Remove the scroll timeout.
	(gtk_html_private_calc_scrollbars): Set upper limits for the
	adjustments as well.

	* gtkhtml.h: New member `scroll_timeout_id'.

2000-04-03  Radek Doulik  <rodo@helixcode.com>

	* htmltextmaster.c (calc_min_width): rewritten calculating of
	min_width, instead of calling html_painter_calc_text_width for
	each char call it for whole words

2000-04-03  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(button_press_event): Clean up and re-indent a bit.

	* htmlengine.c
	(parse_i): Fix braino: make sure `valign' is set to
	`HTML_ALIGN_BOTTOM' if initially `HTML_VALIGN_NONE".

2000-04-03  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextmaster.c
	(select_range): Make sure we don't select beyond the end of the
	text.

	* gtkhtml.c
	(button_release_event): Become owner of the X11 selection if we
	were doing a mouse selection.
	(selection_get): New function.
	(selection_clear_event): New function.
	(class_init): Install them as implementation of the corresponding
	GtkWidget virtual methods.
	(init): Add "STRING" selection targets to the widget.

	* htmlengine.c
	(html_engine_goto_anchor): New param @anchor.  Made non-static,
	cleaned up a bit.
	(html_engine_get_selection_string): New function.
	
	* gtkhtml.c
	(gtk_html_jump_to_anchor): New function.

	* htmlclueflow.c
	(append_selection_string): New function,
	implementation of `HTMLObject::append_selection_string()'.
	(html_clueflow_class_init): Install it.

	* htmltextmaster.c
	(append_selection_string): New function, implementation of
	`HTMLObject::append_selection_string()'.
	(html_text_master_class_init): Install it.

	* htmlobject.c
	(append_selection_string): New function, default implementation of
	`HTMLObject::append_selection_string'
	(html_object_class_init): Install it.
	(html_object_append_selection_string): New function.

	* htmlobject.h: New virtual method `HTMLObject::append_selection_string'.

2000-04-03  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (get_actual_width): updated to use
	GdkPixbufAnimation width
	(get_actual_height): the same
	(draw): remember image offset in HTMLImageAnimation, draw right
	frame of animation

	* htmlengine.c (html_engine_begin): stop animations from last run
	(html_engine_end): also stop animations
	(html_engine_update_event): deactivate animations before completely
	redraw

	* htmlimage.c (html_image_animation_new): contructor of
	HTMLImageAnimation
	(html_image_factory_stop_animations): removes animation timeout
	handler to stop animation
	(html_image_factory_deactivate_animations): sets
	HTMLImageAnimation::active flag to FALSE to all animations
	(html_image_animation_timeout): timeout handler - draws animation
	only if active && visible - animation drawing is now done not much
	efficiently as there is probably bug in gdk_pixbuf_composite which
	will be more efficient to use
	(render_cur_frame): workaround gdk_pixbuf_composite

	* htmlimage.h: HTMLImageAnimation structure to store some info
	about animation - it is used in HTMLImage, but only if there are
	>1 frames

	* htmlimage.c (html_image_factory_register): connect to signals
	frame_done and animation_done
	(html_image_factory_frame_done): frame_done signal handler, if
	image has >1 frames => start animation
	(html_image_factory_animation_done): animation_done - does nothing
	for now

2000-04-03  Jacob Berkman  <jacob@helixcode.com>

	* gtkhtml.c (gtk_html_get_title): return NULL if title is NULL (should
	this be a g_return_val_if_fail()?)

	* gtkhtml.[ch] (gtk_html_construct): new function so that the gtkhtml
	widget can be subclassed and used with language bindings

2000-04-02  Jonas Borgström  <jonas_b@bitsmart.com>

	* gtkhtml.c and testgtkhtml.c (on_button_press_event): Moved mouse wheel
	scrolling from testgtkhtml.c to gtkhtml.c.

2000-04-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c: New value `ID_STRONG' for enum `ID'.
	(parse_s): Use `GTK_HTML_FONT_STYLE_SIZE_2' instead of just `2'.
	Implement `<strong>' and `</strong>'.
	(parse_b): Make `<big>' use `GTK_HTML_FONT_STYLE_SIZE_4' instead
	of `GTK_HTML_FONT_STYLE_SIZE_3'.

2000-04-01  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_b): add support for marginwidth and
	marginheight in the <BODY> tag

2000-04-01  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(gtk_html_parse): Removed deprecated function.
	(gtk_html_private_calc_scrollbars): Renamed from
	`gtk_html_calc_scrollbars'.  

2000-04-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(current_color): Removed unused variable.

2000-04-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c: Use `HTMLStringTokenizer' instead of
	`StringTokenizer'.

	* htmlengine.h: Use `HTMLStringTokenizer' instead of
	`StringTokenizer'.

	* htmlstringtokenizer.c: New file.
	* htmlstringtokenizer.h: New file.

	* stringtokenizer.c: Removed.
	* stringtokenizer.h: Removed.

2000-04-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_p): Close the current flow on `<pre>'.

2000-03-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_a): Push link color into the color stack when encountering
	a `<a>' tag.
	(close_anchor): If there is a `url' and/or a `target', pop a color
	from the color stack.

2000-04-01  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (TIMER_INTERVAL): set TIMER_INTERVAL to 300

2000-03-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_f): `</form>' opens a new paragraph too.

2000-03-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_f): `<form>' also opens a new paragraph.

2000-03-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_i): Handle attribute `align=center' for the `<img>' tag.

	* htmlclueflow.c
	(calc_size): Handle vertical alignment of objects properly.  Also,
	I cleaned up the code a little bit.  (But it's still painfully
	ugly.)

	* htmlimage.c
	(get_valign): New private function, implementation of
	`HTMLObject::get_valign'.  Return the value of the `valign' member
	in the `HTMLImage'.
	(html_image_class_init): Install it.
	(calc_size): Set the descent to zero.  Both horizontal borders go
	into the ascent instead.

	* htmlobject.c
	(get_valign): New private function, default implementation for
	`HTMLObject::get_valign'.  Always return `HTML_VALIGN_BOTTOM'.
	(html_object_class_init): Install it.
	(html_object_get_valign): New function.

	* htmlobject.h: New virtual method `HTMLObject::get_valign'.

	* htmlimageinput.c
	(html_imageinput_init): Create the new image with
	`HTML_VALIGN_BOTTOM' vertical alignment.

	* htmlengine.c
	(parse_i): Use the vertical alignment value as a parameter for the
	new image.  Do not put the image into an HTMLClueAligned anymore
	to make vertical alignment work.

	* htmlimage.c
	(html_image_init): New param `valign'.  Initialize the `valign'
	member from it.
	(html_image_new): New param `valign'.  Pass it to
	`html_image_init()'.

	* htmlimage.h: New member `valign' in `HTMLImage'.

2000-03-30  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c
	(html_image_init): @width and @height changed to be `gint16's.
	@percent and @border changed to be `gint8's.
	(html_image_new): Likewise.

	* htmlimage.h: Changed `vspace', `hspace' and `border' to be
	`gint8's instead of `gint's.  `specified_width',
	`specified_height' changed to be `gshort's instead of `gint's.

2000-03-30  Matt Wilson  <msw@redhat.com>

	* htmlclueflow.c (should_break): protect from accessing
	master->text[-1] by checking to make sure text->text_len > 0

	* htmltextmaster.c (html_text_master_trail_space_width): protect
	from accessing text->text[-1] by checking to make sure
	text->text_len > 0

2000-03-30  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_b): added leftmargin, rightmargin, topmargin
	and bottommargin to <body ...> to make fresheat & co. happy :)

	* htmlimage.c (calc_preferred_width): added hspace
	(calc_preferred_width):  added hspace
	(calc_size): added hspace and vspace

	* htmlimage.h: added hspace, vspace image attributes - these are
	already deprecated, but for example Slashdot uses it

	* htmlengine.c: added html_image_set_spacing for HTMLImage

2000-03-29  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (get_actual_width): updated to use
	GdkPixbufAnimation width
	(get_actual_height): the same
	(draw): remember image offset in HTMLImageAnimation, draw right
	frame of animation

	* htmlengine.c (html_engine_begin): stop animations from last run
	(html_engine_end): also stop animations
	(html_engine_update_event): deactivate animations before completely
	redraw

	* htmlimage.c (html_image_animation_new): contructor of HTMLImageAnimation
	(html_image_factory_stop_animations): removes animation timeout
	handler to stop animation
	(html_image_factory_deactivate_animations): sets
	HTMLImageAnimation::active flag to FALSE to all animations
	(html_image_animation_timeout): timeout handler - draws animation
	only if active && visible - animation drawing is now done not much
	efficiently as there is probably bug in gdk_pixbuf_composite which
	will be more efficient to use
	(render_cur_frame): workaround gdk_pixbuf_composite

	* htmlimage.h: HTMLImageAnimation structure to store some info
	about animation - it is used in HTMLImage, but only if there are
	>1 frames

	* htmlimage.c (html_image_factory_register): connect to signals
	frame_done and animation_done
	(html_image_factory_frame_done): frame_done signal handler, if
	image has >1 frames => start animation
	(html_image_factory_animation_done): animation_done - does nothing
	for now

2000-03-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltablecell.c
	(draw_background_helper): Use `gdk_pixbuf_get_width()' and
	`gdk_pixbuf_get_height()' instead of accessing the GdkPixbuf
	fields directly.

	* htmlgdkpainter.c
	(draw_background_pixmap): Use `gdk_pixbuf_get_width()' and
	`gdk_pixbuf_get_height()' instead of accessing the GdkPixbuf
	fields directly.

	* htmlengine.c
	(draw_background): Use `gdk_pixbuf_get_width()' and
	`gdk_pixbuf_get_height()' instead of accessing the GdkPixbuf
	fields directly.

2000-03-27  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c: Removed unused (global) variables.

	* htmltextarea.c
	(html_textarea_init): Removed unused variable.

	* htmlentity.c
	(html_entity_prepare): Made const-safe.

	* htmlentity.h
	(html_entity_prepare): Make prototype const-safe.

	* htmlgdkpainter.c: #include "htmlentity.h".

2000-03-27  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueh.c
	(calc_size): Set the ascent even for `HTML_VALIGN_TOP'.  This is
	*not* the correct fix, but it looks better, at least on Slashdot.
	Anyway, we should not be putting images into HTMLClueH's when they
	are aligned; this simply makes it impossible to align them
	properly, because we don't know where the baseline is!  Instead,
	we should probably have an `alignment' attribute in `HTMLObject'
	`and HTMLClueFlow's flowing code should respect it.

2000-03-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcluev.c
	(check_point): Check that the point expressed by the @x, @y
	coordinates is actually in the object.

2000-03-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmldrawqueue.c
	(draw_obj): If the object is transparent, draw the background too.

	* htmltablecell.c
	(draw_background_helper): New helper function.
	(draw): Use it.
	(draw_background): New function, implementation of
	`HTMLObject::draw_background()'.
	(html_table_cell_class_init): Install the `draw_background'
	implementation.

	* htmlobject.c
	(is_transparent): New function, default implementation for
	`HTMLObject::is_transparent()'.
	(draw_background): New function, default implementation for
	`HTMLObject::draw_background'.
	(html_object_class_init): Install them.
	(html_object_is_transparent): New function.
	(html_object_draw_background): New function.

	* htmlobject.h: New virtual methods `is_transparent',
	`draw_background'.

2000-03-36  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmltextarea.c (on_button_press_event): New function.
	It returns TRUE, so the events don't get passed to the parent widget.
	This makes it possible to enter text in textareas.

	* gtkhtml.c (motion_notify_event): Check if the cursor is over a form element.
	If so, don't try to select it.
	This makes the engine not selecting text when you scroll a listbox.

2000-03-26  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (calc_preferred_width): remove trailing space
	width at end of line(s)
	(calc_size): same as above

	* htmltextslave.c (html_text_slave_trail_space_width): like bellow

	* htmltextmaster.c (html_text_master_trail_space_width): new
	function, returns trailing space width if it is here, otherwise 0

	* gtkhtmldebug.c (gtk_html_debug_dump_tree): also print TextSlave
	text

2000-03-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (insert_text): Reverted previous change, as it
	breaks spaces between normal text and links, among other things.

2000-03-26  Radek Doulik  <rodo@helixcode.com>

	* htmlcluev.c (find_free_area): choose rmargin as MAX(max_width,
	width) so centering works happily now - like on helixcode page
	(get_right_margin): the same

	* htmlobject.c (get_right_margin): same as above

	* htmlengine.c (insert_text): added trailing space eating, so we
	have no problems with longer texts later (there was problem, when
	sometimes we count them and sometimes not (Master::min_width and
	others)) */

2000-03-25  Radek Doulik  <rodo@helixcode.com>

	* gtkhtmldebug.c (gtk_html_debug_dump_tree): added width,
	max_width to HTMLObject dump and HAlign, VAlign to HTMLClue
	descendants

2000-03-25  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcluev.c
	(do_layout): Use `html_object_get_left_margin()' instead of
	`html_clue_get_left_margin()'.
	(get_left_margin): Get an `HTMLObject *' instead of an `HTMLClue
	*'.
	(get_right_margin): Likewise.

	* htmlclueh.c
	(calc_size): Use `html_object_get_left_margin()' instead of
	`html_clue_get_left_margin()'.

	* htmlclueflow.c
	(calc_size): Use `html_object_get_left_margin()' and
	`html_object_get_right_margin()' instead of
	`html_clue_get_left_margin()' and `html_clue_get_right_margin()'.

	* gtkhtml-keybinding.c: #include "gtkhtmldebug.h".

	* htmlobject.c
	(get_left_margin): New function.
	(get_right_margin): New function.
	(html_object_class_init): Install them as the default
	implementations of `get_left_margin' and `get_right_margin'.

	* htmlobject.h: Moved here.  This is not very nice, but we need to
	make it work.

	* htmlclue.c
	(get_left_margin): Removed.
	(get_right_margin): Removed.
	(html_clue_class_init): Do not install them anymore.
	(html_clue_get_left_margin): Removed.
	(html_clue_get_right_margin): Removed.

	* htmlclue.h: Removed `get_left_margin', `get_right_margin'
	methods.

	* htmltable.c
	(check_point): Do not reset `offset_return'.  (Why would you ever
	want to do that!?!?!?)
	(forall): New function, implementation of `HTMLObject::forall()'.
	(html_table_class_init): Install it.
	(set_cells): Set the cell's parent pointer.

2000-03-24  Ettore Perazzoli  <ettore@helixcode.com>

	* Makefile.am [! LIBWWW]: Do not build `testgtkhtml'.

2000-03-24  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (html_image_factory_frame_done): I have started work
	on gif animations using gdk-pixbuf, but it seems to me, that
	progressive loading of animated gifs is still unimplemented

	* htmlcluev.c (do_layout): change width, if o->width <
	o->max_width instead of o->width > o->max_width - this made cells
	shorter than they actually was - this one fixes also moved bg
	pixmap on www.helixcode.com page and surely another ones

2000-03-23  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (should_break): fixed case, when obj is on the
	beginning of clue list (it returned TRUE before, which was bad)

2000-03-23  Radek Doulik  <rodo@ucw.cz>

	* htmlclueflow.c (calc_min_width): fill HTMLObject::nb_width
	(calc_size): use HTMLObject::nb_width

	* htmlobject.h: added nb_width - width of following non-breaking
	list of objects

	* htmltextmaster.c (calc_min_width): removed run_width +=
	space_width as we don't want add spaces to minimal width

	* htmlclueflow.c (should_break): new function, decides if line
	should be broken before obj
	(calc_min_width): uses should_break function
	(calc_size):  uses should_break function

	* htmlgdkpainter.c (draw_text): uses html_entity_prepare
	(calc_text_width):  uses html_entity_prepare

	* htmlentity.c (html_entity_prepare): prepares text to
	draw/get_width - now it only replaces &nbsp; with ' '

2000-03-22  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (add_pre_padding): Also increment the `y' value
	if we add padding.
	(add_post_padding): Likewise.

	* htmlobject.c (relayout): Subtract `ascent + descent' from the y
	position to make the HTMLClueFlow::calc_size() code happy.  Sigh.
	This code is so ugly.

2000-03-20  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (parse_m): When parsing `content=', spaces are
	valid separators.

2000-03-20  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (focus_out_event): Removed annoying debugging message.
	(focus_in_event): Likewise.

2000-03-18  Jonas Borgström  <jonas_b@bitsmart.com>

	* testgtkhtml.c (url_requested): Only use redirect filters on the
	first file requested on each page load (the main html file).

2000-03-18  Jonas Borgström  <jonas_b@bitsmart.com>

	This is quite a big change to htmlclueflow. Hope I didn't break anything.
	I have tested it quite some time now and I think it works great.
	And the text reflows great around the aligned topic images on slashdot.

	But don't hesitate to back out my changes if it breaks something.
	
	* htmlclueflow.c (calc_size): Use lmargin and rmargin correct. And some other
	changes to make right aligned items to reflow correctly.

	* htmlcluev.c (get_right_margin): Corrected the margin calculation.
	(find_free_area): Corrected the boundary checking.
	(append_right_aligned): Made it behave more like append_left_aligned ().
	
	* tests/bugs.html: Removed www.slashdot.org entry, it looks great now.

2000-03-17  Jonas Borgström  <jonas_b@bitsmart.com>

	Second attempt of fixing <br> sorry about this.
	
	* htmlengine.c (add_line_break): Only insert create_empty_text (); when
	the clue is empty.
	(new_flow): Only do html_clue_append if firstobject is non NULL.

	* tests/bugs.html: Removed www.gimp.org entry, it looks great now.

2000-03-17  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmltextslave.c (calc_size): Backed out my previous checkin.
	It didn't handle multiple <br> after each other very well

	* tests/bugs.html: Added www.gimp.org again. With better bug desciption.

2000-03-17  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c: s/char/gchar/.
	* gtkhtml.h: Likewise.

2000-03-17  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(gtk_html_get_title): New function.

2000-03-17  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c
	(title_changed_cb): New param `title'.  Use `g_strconcat()'
	instead of `g_strdup_printf()'.

	* gtkhtml.c
	(html_engine_title_changed_cb): Updated to set the new `new_title'
	parameter in "title_changed".
	(class_init): Set up "title_changed" with a new `GTK_TYPE_STRING'
	param.

	* gtkhtml.h: Parameter `new_title' added to signal "title_changed".

2000-03-17  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmltextslave.c (calc_size): Set ascent and descent
	to zero if the width also is zero. This helps <br> not make to much space.

	* tests/bugs.html: Removed www.gimp.org entry, it looks great now.

2000-03-17  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmlengine.c (parse_p): Handle <p align=xxx>.
	
	* tests/bugs.html: Removed gtk.themes.org entry, it looks great now.
	  Removed www.gnome.org entry, it looks ok now.

2000-03-13  Dan Winship  <danw@helixcode.com>

	* htmlengine.c (html_engine_end): don't call gtk_timeout_remove if
	no timer is set.

2000-03-13  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c
	(remove_slaves_at_cursor): New helper function.
	(html_engine_paste): Call it before manipulating the text.

	* htmlclueflow.c
	(html_clueflow_remove_text_slaves): New function.

	* htmlengine-edit-paste.c
	(merge_possibly): New helper function.
	(html_engine_paste): Use it to merge the first and last pasted
	objects with their neighbours.

	* gtkhtml-keybinding.c
	(handle_none): Cause `GDK_F12' to dump the tree.

	* htmlengine-edit-cut.c
	(cursor_at_end_of_region): New function to detect if the cursor is
	at the end or the beginning of the selected region.
	(html_engine_cut): Use `cursor_at_end_of_region' to find out if we
	actually need to move the cursor back; if not, don't move the
	cursor.

	* htmlengine.c
	(add_line_break): Just create a new flow.  I hope this won't break
	anything.

	* htmlclueflow.c
	(halign_to_string): New helper function.
	(save): Use it to write a `DIV' tag to align the paragraph
	properly.

2000-03-13  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-save.c
	(write_header): Do not write a `<title>' tag
	if there is no title.  This also prevents a segfault.

2000-03-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextmaster.c
	(get_selection): Use the `size_return' parameter properly.

	* htmlobject.c
	(get_selection): New parameter `size_return'.  Set `*size_return'
	to 1 before returning.
	(html_object_get_selection): New parameter `size_return'.

	* htmlobject.h: New parameter `size_return' in
	`HTMLObject::get_selection'.

	* htmlengine-edit-cut.c
	(html_engine_cut): Implemented, by means of
	`html_engine_move_cursor()' and `html_engine_delete()'.

	* htmlengine-edit-copy.c
	(copy): New helper function.
	(html_engine_copy): Return value changed to `guint': return the
	length of the cut buffer.  Rewritten to use the `copy' helper
	function.
	(html_engine_copy_to_buffer): New function.

2000-03-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c
	(html_engine_delete): Prevent bogus deletion of `destroy_orig'
	caused by using `->next' instead of `html_object_next_not_slave()'.

	* htmlengine-edit-insert.c
	(do_insert_different_style): Use `html_object_prev_not_slave()'.

	* htmlengine-edit-delete.c
	(delete_same_parent): Use `html_object_next_not_slave()'.
	(delete_different_parent): Likewise.
	(merge_text_at_cursor): Likewise.
	(html_engine_delete): Likewise.

	* htmlcursor.c
	(forward): Use `html_object_next_not_slave()' instead of
	`next_not_slave'.
	(next_not_slave): Removed.
	(html_cursor_get_current_char): Likewise.

	* htmlobject.c
	(html_object_is_text): Added precondition (@object != NULL).
	(html_object_next_not_slave): New function.
	(html_object_prev_not_slave): New function.

	* htmlcursor.c
	(normalize): New helper function.
	(html_cursor_normalize): Rewritten by means of it.
	(html_cursor_jump_to): Use it to normalize @object and @offset.
	(html_cursor_get_current_char): Get the next non-`HTMLTextSlave'
	element instead of just the next element.

	* gtkhtml.c
	(init): Initialize `ibeam_cursor'.
	(destroy): Destroy `ibeam_cursor'.
	(motion_notify_event): Change the cursor to the ibeam on text
	elements, or if we are on a link text element and editing is
	enabled.

	* gtkhtml.h: New member `ibeam_cursor' in `GtkHTML'.

2000-03-12  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(size_allocate): Recalculate size and toolbars only if the size
	has changed.

	* htmlclueflow.c
	(check_point): Fix clicking in the blank area on top/left of the
	HTMLClueFlow.

2000-03-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-cursor.c
	(html_engine_hide_cursor): Draw the cursor only if the engine is
	editable.
	(html_engine_show_cursor): Likewise.

	* htmldrawqueue.c
	(draw_obj): Draw the cursor only if the engine is editable.
	(clear): Likewise.

2000-03-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextmaster.c
	(check_point): Do not make the offset be greater than the string's
	length.

	* htmlclueflow.c
	(check_point): New function, implementation of
	`HTMLObject::check_point'.
	(html_clueflow_class_init): Install it.

	* htmltextmaster.c
	(check_point): Consider an object to be on a new line by comparing
	the y coordinate too.

	* htmlengine.c
	(html_engine_get_object_at): If `for_cursor', clip the coordinates
	to the cluev's area.

2000-03-09  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(focus_in_event): Give the engine the focus with
	`html_engine_set_focus()'.
	(focus_out_event): Remove the focus from the engine with
	`html_engine_set_focus()'.

	* htmlengine.c
	(html_engine_set_focus): New function.

	* htmlengine.h: New member `have_focus' in `HTMLEngine'.

	* gtkhtml.c
	(destroy): Argh!  Destroy the `HTMLEngine'!

	* gtkhtml-keybinding.c
	(gtk_html_handle_key_event): If the key event is handled, reset
	the blinking cursor with `html_engine_reset_blinking_cursor()'.

	* htmlengine.c
	(html_engine_init): Initialize `blinking_timer_id'.
	(html_engine_destroy): If `blinking_timer_id' is nonzero, remove
	the corresponding timeout.
	(html_engine_set_editable): If the engine becomes editable, call
	`html_engine_setup_blinking_cursor()'.  If it beomes non editable,
	call `html_engine_stop_blinking_cursor()'.

	* htmlengine-edit-cursor.c
	(html_engine_setup_blinking_cursor): New function.
	(html_engine_stop_blinking_cursor): New function.
	(html_engine_reset_blinking_cursor): New function.
	(blink_timeout_cb): New static function that implements cursor
	blinking.

	* htmlengine.h: New members `blinking_timer_id', `blinking_status'
	in `HTMLEngine'.

	* htmldrawqueue.c
	(draw_obj): Don't draw objects whose width and/or height is zero.

	* htmlengine.c
	(html_engine_draw_cursor): Removed.
	(html_engine_flush_draw_queue): Don't call it anymore.  Added
	precondition: `e' must be an HTMLEngine.
	(html_engine_queue_draw): Added precondition: `e' must be an
	HTMLEngine.

	* htmlengine-edit-movement.c
	(html_engine_move_cursor): Use `html_engine_{hide,show}_cursor()'
	instead of `html_engine_draw_cursor()'.
	(html_engine_jump_to_object): Likewise.
	(html_engine_beginning_of_document): Likewise.
	(html_engine_end_of_document): Likewise.
	(html_engine_beginning_of_line): Likewise.
	(html_engine_end_of_line): Likewise.
	(html_engine_scroll_down): Likewise.
	(html_engine_scroll_up): Likewise.
	(html_engine_forward_word): Likewise.
	(html_engine_backward_word): Likewise.

	* htmlengine-edit-delete.c
	(html_engine_delete): Use `html_engine_{hide,show}_cursor()'
	instead of `html_engine_draw_cursor()'.

	* htmlengine-edit-insert.c
	(html_engine_insert_para): Use `html_engine_{hide,show}_cursor()'
	instead of `html_engine_draw_cursor()'.

	* htmlengine-edit-inster.c
	(html_engine_insert): Use `html_engine_{hide,show}_cursor()'
	instead of `html_engine_draw_cursor()'.

	* htmlengine-edit-cursor.c
	(html_engine_draw_cursor_in_area): Moved here from `htmlengine.c'.
	Do not draw anything if `cursor_hide_count' is greater than zero.
	(html_engine_show_cursor): New function.
	(html_engine_hide_cursor): New function.

	* htmlengine-edit-cursor.h: New file.
	* htmlengine-edit-cursor.c: New file.

	* htmlengine.c
	(html_engine_draw_cursor_in_area): Removed.
	(html_engine_init): Initialize `cursor_hide_count' to zero.

	* htmlengine.h: New member `cursor_hide_count' in `HTMLEngine'.

	* htmldrawqueue.c
	(clear): Draw the cursor in the cleared area.
	(draw_obj): Likewise.

2000-03-08  Ettore Perazzoli  <ettore@helixcode.com>

	* htmldrawqueue.c
	(html_draw_queue_flush): Flush the clearing queue before the
	drawing one.

	* htmlclueflow.c
	(relayout_and_draw): Removed.
	(relayout_for_level_change): New helper function.
	(html_clueflow_indent): Just return if `indentation' is zero.
	Avoid doing a relayout if indentation does not change.  Use
	`relayout_for_level_change'.
	(html_clueflow_set_style): Use `html_object_relayout ()' instead
	of `relayout_and_draw()'.
	(html_clueflow_set_halignment): Likewise.
	(html_clueflow_set_properties): Likewise.

	* htmlcluev.c
	(do_layout): New parameter `engine'.  New parameter `relayout'.  If
	true, use `html_object_relayout()' instead of
	`html_object_calc_size()'.
	(relayout): If `child' is NULL, use `head'.

2000-03-08  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(block_end_quote): Use `HTMLEngine' member `indent_level' instead
	of `list_level', `quote_level'.
	(block_end_list): Likewise.
	(parse_table): Likewise.
	(parse_b): Likewise.
	(parse_d): Likewise.
	(parse_l): Likewise.
	(parse_o): Likewise.
	(parse_u): Likewise.
	(html_engine_init): Likewise.
	(ensure_editable): Updated for `html_clueflow_new()'.

	* htmlengine-edit-clueflowstyle.c: Removed members `quote_level',
	`list_level' in `OriginalClueFlowProps'; replaced them with a
	single `level' member.
	(get_props): Updated accordingly.
	(set_props): Likewise.
	(html_engine_get_current_clueflow_indentation): Just use the
	`level' member in `HTMLClueFlow' instead of the old `list_level'
	and `quote_level'.

	* gtkhtmldebug.c
	(gtk_html_debug_dump_tree): Print `level' instead of `quote_level'
	and `list_level' that do not exist anymore.

	* htmlclueflow.c
	(copy): Copy `level'.  Don't copy `list_level' and `quote_level'
	anymore as they are gone.
	(add_pre_padding): Updated to use `level' instead of
	`list_level'/`quote_level'.
	(add_post_padding): Likewise.
	(draw): Use `level' instead of `list_level'.
	(write_indentation_tags): Use `last_level' in
	`HTMLEngineSaveState' instead of `last_quote_level',
	`last_list_level'.
	(html_clueflow_init): Removed parameters `quote_level',
	`indent_level'.  Only get a generic `level' parameter instead.
	(html_clueflow_new): Likewise.
	(html_clueflow_set_properties): Likewise.
	(html_clueflow_get_properties): Likewise for `list_level_return'
	and `quote_level_return'.
	(html_clueflow_split): Updated accordingly.
	(html_clueflow_indent): Simply increase/decrease `level'.

	* htmlengine-save.c
	(html_engine_save): Initialize `last_level' instead of
	`last_quote_level' and `last_list_level', that don't exist
	anymore.

	* htmlengine-save.h: Members `last_quote_level',
	`last_list_level' in `HTMLEngineSaveState' removed.  New member
	`last_level'.

	* htmlclueflow.h: Members `quote_level' and `list_level' removed
	from `HTMLClueFlow'.  New member `level' which is used for both
	lists and blockquotes.

	* gtkhtml.c
	(update_styles): Use `html_engine_get_editable' instead of the
	`editable' member that does not exist anymore.
	(key_press_event): Likewise.
	(motion_notify_event): Likewise.
	(button_press_event): Likewise.
	(gtk_html_get_editable): Likewise.
	(init): Do not init `editable' anymore.
	(gtk_html_end): Do not call `html_engine_set_editable()' anymore.
	(gtk_html_set_editable): Inconditionally call
	`html_engine_set_editable()'.
	(gtk_html_begin): Do not make the engine non-editable anymore.

	* gtkhtml.h: Removed member `editable'.

	* htmlengine.c
	(html_engine_set_editable): Added preconditions.
	(html_engine_get_editable): New function.
	(html_engine_end): Make sure the thing is editable if `editable'
	is true, by calling `ensure_editable()'.

	* htmlengine.c
	(html_engine_end): Just before emitting the "load_done" signal,
	call `html_engine_timer_event()' repeatedly, until it returns
	FALSE: this way, we make sure all the pending text is parsed.
	Then remove the timeout, as it is not necessary anymore.
	(html_engine_stop_parser): Reset `timerId'.

	* htmlengine-edit-movement.c
	(html_engine_jump_to_object): Normalize cursor after changing it.

	* htmlengine.c
	(html_engine_unselect_all): Do not traverse the whole tree if we
	are sure there is no current selection [`active_selection' is
	FALSE].

2000-03-07  Elliot Lee  <sopwith@redhat.com>
	
	* htmlbutton.c, htmlcheckbox.c, htmlengine-save.c,
	 htmlgdkfontmanager.c, htmlgdkpainter.c htmlhidden.c,
	 htmlprintfontmanager.c, htmlradio.c, htmltext.c, htmltextinput.c,
	 htmltextmaster.c: #include <string.h>

2000-03-07  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(gtk_html_calc_scrollbars): Do not set lower/upper limits for the
	toolbars explicitly anymore. Also, do not use
	`gtk_layout_set_size()' if the size has not actually changed.

	* gtkhtml-keybinding.c
	(page_up): Unselect all.
	(page_down): Likewise.
	(forward_word): Likewise.
	(backward_word): Likewise.
	(beginning_of_document): New function.
	(end_of_document): New function.
	(gtk_html_handle_key_event): Do not care about the shift status
	when dispatching to `handle_ctrl()' or `handle_alt()'.
	(handle_ctrl): Map `GDK_Home' to `beginning_of_document()',
	`GDK_End' to `end_of_document()'.
	(handle_alt): Map `<' to `beginning_of_document()' and `>' to
	`end_of_document()'.

	* htmlcursor.c
	(html_cursor_beginning_of_document): New function.
	(html_cursor_end_of_document): New function.

	* htmlengine-edit-movement.c
	(html_engine_beginning_of_document): New function.
	(html_engine_end_of_document): New function.

	* htmlengine-edit-insert.c
	(do_insert_different_style): Don't crash if there is no previous
	non-HTMLTextSlave element.

	* htmlengine.c
	(ensure_editable): New helper function.
	(html_engine_load_empty): Use it.  Basically, we now start/stop
	the parser and call `ensure_editable()' to make sure the resulting
	thing is editable correctly.
	(html_engine_set_editable): If the engine is now editable, make
	sure it can actually be edited with `ensure_editable()'.
	(html_engine_set_base_url): Removed.
	(parse_b): Emit signal directly, instead of using
	`html_engine_set_base_url()'.

	* htmlcluev.c
	(relayout): Always queue a clear when needed, even if we have no
	parents.

	* htmlobject.c
	(relayout): Always queue a clear when needed, even if we have no
	parents, as the new relayout logic requires this.

2000-03-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): Call
	`html_cursor_normalize()' on exit.

	* htmlcursor.c (html_cursor_normalize): New function.  If the
	cursor points to an object's zero offset and there is an object
	before this one, we change the pointer to point to the object
	before it, and the offset to the size of the object.

	* htmlengine-edit-delete.c (html_engine_delete): Argh.  Initialize
	`orig_object' and `orig_offset' at the right time.

2000-03-03  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): Move to the next
	object without changing the actual position if we are at the very
	end of a text object, and this is not the last object.

	* htmlcursor.c (forward): When choosing between an object and the
	next one, choose the first one.
	(backward): Likewise.

	* htmlengine-edit-insert.c (do_insert): Play with the cursor
	pointer so that it points to an adiacent text object if possible.
	Otherwise, just call `do_insert_not_text()'.
	(do_insert_not_text): Implemented.

	* gtkhtml.c (update_styles): Do nothing if the widget is not
	editable.

	* htmlengine.c (html_engine_init): Initialize `editable' to be
	FALSE.

	* testgtkhtml.c (main): After creating the HTMLwidget, invoke
	`gtk_html_load_empty' on it.

	* gtkhtml.c (gtk_html_load_empty): New function.

	* htmlengine.c (html_engine_load_empty): New function.

2000-03-01  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml-keybinding.c
	(forward_word): New private function.
	(backward_word): New private function.
	(handle_alt): Map `M-f' and `M-b' to `forward_word' and
	`backward_word', respectively.
	(handle_ctrl): Map `C-Right' and `C-Left' to `forward_word' and
	`backward_word', respectively.

	* htmlengine-edit-movement.c
	(html_engine_forward_word): New function.
	(html_engine_backward_word): New function.

	* htmlcursor.c
	(html_cursor_goto_zero): More preconditions.
	(html_cursor_get_current_char): New function.

	* htmlengine-edit-fontstyle.c (merge_safely): Update the cursor
	offset if the cursor is in the object we are merging and we are
	prepending.

	* htmltextmaster.c (merge): Ooops.

	* htmlengine-edit-movement.c
	(html_engine_scroll_down): New function.
	(html_engine_scroll_up): New function.

2000-02-28  Paolo Molaro  <lupus@linuxcare.com>

	* gtkhtml.c: use GTK_TYPE_OBJECT instead of GTK_TYPE_POINTER
	  in signal creation for args that are objects.

2000-02-28  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_table): parse <th> correctly so that we
	don't end up with spurious blocks which cause cells to grow.

2000-02-27  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (calc_preferred_width): return the width we calculate not
	the pixel_size.

	* htmltextslave.c (fit_line): eat up space we find at the start of lines.

2000-02-27  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml-keybinding.c (beginning_of_line): New function.
	(end_of_line): New function.
	(handle_ctrl): `C-a' moves to the beginning of the current line;
	`C-e' to the end.
	(handle_none): `GDK_Home' moves to the beginning of the current line;
	`GDK_End' to the end.

	* htmlengine-edit-movement.c (html_engine_end_of_line): New function.
	(html_engine_beginning_of_line): New function.

	* htmlengine-edit-movement.c: New file.
	* htmlengine-edit-movement.h: New file.

	* htmlcursor.c (html_cursor_end_of_line): New function.
	(html_cursor_beginning_of_line): New function.

	* htmlengine-edit.c (html_engine_jump_to_object): Removed.
	(html_engine_move_cursor): Removed.
	(html_engine_jump_at): Removed.

	* gtkhtml.c (key_press_event): Use `gtk_html_handle_key_event()'
	from `gtkhtml-keybinding.c'.

	* gtkhtml-keybinding.c: New file.
	* gtkhtml-keybinding.h: New file.

	* htmlengine-edit-delete.c: New file.
	* htmlengine-edit-delete.h: New file.

	* htmlengine-edit.c (html_engine_delete): Removed.

	* htmlengine-edit-fontstyle.c (split_safely): New helper function.
	This splits text and makes sure that the cursor's object pointer
	and offset are still valid after the split.
	(set_font_style_in_selection_forall): Use it.
	(set_font_style_in_selection_forall): Likewise.

	* htmlengine-edit-insert.c (html_engine_insert_para): Calc size on
	the two halves of the paragraph that gets splitted.

	* htmlcluev.c (do_layout): New helper function.
	(calc_size): Use it.
	(relayout): New function, implementation of
	`HTMLObject::relayout'.  It uses `do_layout', and relayouts
	objects in the clue without recalculating the size for each of
	them.
	(html_cluev_class_init): Install the new `relayout'
	implementation.

2000-02-26  Larry Ewing  <lewing@helixcode.com>

	* htmlclueh.c (calc_size): for HTML_VALIGN_TOP the clue->descent
	should be incremented rather than the clue->ascent to get the
	correct flow in the the remaining items.

2000-02-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c (html_engine_paste) [! PARANOID_DEBUG]:
	Removed ultra-verbose debugging messages.

	* gtkhtml.c (class_init): Setup
	"current_paragraph_alignment_changed".
	(update_styles): Emit it if the current paragraph alignment is
	changed.
	(init): Initialize `paragraph_alignment' to
	`GTK_HTML_PARAGRAPH_ALIGNMENT_LEFT'.
	(gtk_html_align_paragraph): New function.
	(paragraph_alignment_to_html): New helper function.
	(html_alignment_to_paragraph): New helper function.
	(gtk_html_cut): New function.
	(gtk_html_copy): New function.
	(gtk_html_paste): New function.
	(gtk_html_undo): New function.
	(gtk_html_redo): New function.
	(key_press_event): Use `gtk_html_{cut,copy,paste,undo,redo}'
	instead of `html_engine_{cut,copy,paste,undo,redo}'.

	* gtkhtml.h: New enum `GtkHTMLParagraphAlignment'. New signal
	"current_paragraph_alignment_changed".  New member
	`paragraph_alignment' in `GtkHTML'.

	* htmlengine-edit-clueflowstyle.c
	(html_engine_get_current_clueflow_alignment): New function.

	* gtkhtml.h: New enum `GtkHTMLParagraphAlignment'.

	* gtkhtml.c (update_styles): Emit "paragraph_indentation_changed"
	if the indentation changes.
	(class_init): Setup "paragraph_indentation_changed".
	(init): Initialize `paragraph_indentation' to 0.
	(gtk_html_indent): New functon.

	* gtkhtml.h: New signal "paragraph_indentation_changed".  New
	member `paragraph_indentation' in `GtkHTML'.

	* htmlengine-edit-clueflowstyle.c
	(html_engine_set_clueflow_style): New parameters `indentation',
	`alignment', `mask'.
	(set_clueflow_style_in_region_redo): Likewise.
	(set_clueflow_style): Likewise.  Handle indentation.
	(html_engine_get_current_clueflow_indentation): New function.

	* htmlclueflow.c (html_clueflow_indent): New function.
	(html_clueflow_set_halignment): New function.
	(html_clueflow_set_properties): New function.
	(html_clueflow_get_properties): New function.

	* htmlclueflow.c (write_indentation_tags_helper): New helper
	function.
	(write_indentation_tags): New helper function.
	(save): Use it to write the proper indentation tags.  Also, output
	a BR for everything except headers and paragraphs containting
	rulers.

	* htmlengine-save.c (html_engine_save): Initialize
	`last_quote_level' and `last_list_level' in the
	`HTMLEngineSaveState' struct to zero.

	* htmlengine-save.h: New members `last_quote_level' and
	`last_list_level' in `HTMLEngineSaveState'.

	* htmltextmaster.c (split): Set `select_length' and `select_start'
	to zero in the new element.

2000-02-25  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-insert (html_engine_insert_para): Removed some
	bogocode.

	* htmltext.c (split): Do return empty text elements if cutting at
	the very beginning or the very end of the object.
	* htmltextmaster.c (split): Likewise.

	* htmlengine-edit-fontstyle.c (set_font_style_in_selection) [!
	PARANOID_DEBUG]: Disabled debugging messages.

	* htmlobject.c (relayout): Do not relayout everything if the size
	did not change.

	* gtkhtml.c (update_styles): Use
	`html_engine_update_insertion_font_style()'.
	(key_press_event): Don't update the style when inserting text.

	* htmlengine-edit-fontstyle.c
	(html_engine_get_current_insertion_font_style): Removed.
	(html_engine_update_insertion_font_style): New function.

2000-02-24  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (cleanup_selection_and_style): New helper function.
	(key_press_event): Use it when moving the cursor around.

	* htmlengine-edit-insert.c (do_insert_different_style): Handle the
	`offset == 0' case correctly.

	* htmlvspace.c (calc_size): Updated to return the boolean value.

	* htmltextmaster.c (calc_size): Always return FALSE.

	* htmltext.c (calc_size): Updated to return the boolean value.

	* htmltable.c (calc_size): Updated to return the boolean value.

	* htmlcluev.c (calc_size): Updated to return the boolean value.

	* htmlclueh.c (calc_size): Updated to return the boolean value.

	* htmlclueflow.c (calc_size): Updated to return the boolean value.

	* htmlcluealigned.c (calc_size): Updated to return the boolean
	value.

	* htmlclue.c (calc_size): Updated to return the boolean value.

	* htmlobject.c (relayout): Use the return value from
	`html_object_calc_size()' to decide if the element needs to be
	redrawn.
	(calc_size): Updated to return the boolean value.

	* htmlobject.h: Make `HTMLObject::calc_size' return a gboolean.
	If true, it means that the object has changed and needs to be re
	laid out and redrawn for interactive editing.

2000-02-24  Larry Ewing  <lewing@helixcode.com>

	* htmltable.c (calc_column_widths): fix a typo by replacing
	cell->padding with cell->spacing in the original calculation.
	
	* htmlgdkpainter.c (draw_pixmap): rewrite the clipping code to use
	irect_intersect.
	(draw_background_pixmap): use gdk_pixbuf_render_to_drawable_alpha
	to get proper alpha clipping.
	(create_temporary_pixbuf): remove x and y args and the associated
	checking because they are no longer needed.
	
	* htmltablecell.c (draw): properly discount cell->padding for the
	background color and pixmap.  If a background color is set paint
	it even if a background pixmap is set so that we have the correct
	background for the transparent regions.

2000-02-24  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclue.c (html_clue_append_after): Added preconditions.

	* htmltext.c (insert_text): Do not relayout the parent if it's
	NULL.

	* htmlengine-edit.c (html_engine_insert_para): Removed.
	(html_engine_insert): Removed.
	* htmlengine-edit-insert.c: Moved here, with the related helper
	functions.

	* htmlengine-edit-insert.h: New file.
	* htmlengine-edit-insert.c: New file.

	* gtkhtml.c (button_release_event): If ending a selection, update
	the style status.

	* htmlengine-edit-fontstyle.c
	(get_font_style_from_selection_forall): New helper function.
	(get_font_style_from_selection): New helper function; it
	calculates the attributes to display in the editor when a region
	is selected.
	(html_engine_get_current_insertion_font_style): Use it when we
	have an active selection.

	* gtkhtml.c (key_press_event): Unselect all when moving, inserting
	or deleting stuff.
	(motion_notify_event): Move the insertion cursor where the pointer
	is if the engine is editable.

	* htmlengine-edit-fontstyle.c (merge_safely): New function to
	merge, destroy and update the cursor if necessary.
	(merge_backward): Use it.
	(merge_forward): Likewise.

	* htmlengine-edit-fontstyle.c (merge_backward): Merge with
	`prepend' set to TRUE so that we don't destroy the current object.

	* htmltextmaster.c (merge): Match the new `HTMLText::merge'.

	* htmltext.c (html_text_merge): Match the new `HTMLText::merge'.
	(merge): Likewise.  Added precondition: the two objects must have
	the same type.

	* htmltext.h: New arg `prepend' to `HTMLText::merge'.  Take a
	single object instead of a list as a parameter.

2000-02-23  Ettore Perazzoli  <ettore@helixcode.com>

	* htmllinktextmaster.c (split): Rewritten to use
	`html_text_split()'.

	* htmltextmaster.c (split): Rewritten to use `html_text_split()'.

	* htmltext.c (split): Instead of creating the new item with
	`html_text_master_new()', use `g_malloc()' and the `size' member
	in the class description struct; then initialize with
	`html_text_master_init()'.  This way, it's easier to derive the
	method in the subclass.

2000-02-22  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-fontstyle.c (merge_forward): Do not to attempt
	to merge with elements that are not of the same type.
	(merge_backward): Likewise.

2000-02-22 Elliot Lee  <sopwith@redhat.com>

	* htmlimageinput.c, htmllinktext.c, htmlselect.c, htmlsettings.c,
	  htmltable.c, htmltextarea.c: #include <string.h>

2000-02-22  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (key_press_event): Do not update styles if the
	keypress was not handled.
	(update_styles): Kick me.

	* htmlengine-edit-fontstyle.c
	(html_engine_get_current_insertion_font_style): A
	`GTK_HTML_FONT_STYLE_DEFAULT' is always overridden by the
	element's font style.

	* gtkhtml.c (class_init): Set up signal
	"insertion_font_style_changed".
	(update_styles): Deal with the font style too.

	* gtkhtml.h: New signal "insertion_font_style_changed".  New
	member `insertion_font_style'.

2000-02-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_update_event): Do not draw if the
	painter is not realized.  This is a quick and dirty fix, I am not
	sure what is going on in here.

	* htmlgdkpainter.c (html_gdk_painter_realized): New function.

	* htmltext.c (check_merge): New function, implementation of
	`HTMLText::check_merge'.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `HTMLText::check_merge'.

	* htmlengine-edit-fontstyle.c (html_engine_set_font_style):
	Changed parameters: get an AND mask and an OR mask for modifying
	the style.
	(set_font_style_in_selection_forall): Use a SetFontStyleForallData
	closure, so that we can store both masks.
	(set_font_style_in_selection): Likewise.
	* gtkhtml.c (gtk_html_set_font_style): Likewise.

	* htmltextmaster.c (merge): Completed code to preserve selection
	when merging.
	(split): Preserve selection here too.

	* htmlengine-edit-fontstyle.c
	(set_font_style_in_selection_forall): Make it work.

	* htmlembedded.c (html_embedded_grab_cursor): Removed spurious
	debugging message.

	* gtkhtml.c (gtk_html_allow_selection): New function.
	(init): Initialize `allow_selection' to TRUE.
	(button_press_event): Do not grab the pointer if `allow_selection'
	is FALSE.
	(realize): Removed spurious `g_message()'.

	* gtkhtml.h: New member `allow_selection'.

	* htmllinktext.c (html_link_text_new): Get rid of some
	ultra-verbose debugging messages.

	* All files: use the new `gtk_html_debug_log()' call instead of
	plain `g_print()'.

	* htmlcursor.c (debug_location): Always compile this in,
	unconditionally.  At least for now.  Also, new parameter `html':
	use `gtk_html_debug_log()'.

2000-02-20  Ettore Perazzoli  <ettore@helixcode.com>

	* debug.h: Renamed to `gtkhtmldebug.h'.
	* debug.c: Renamed to `gtkhtmldebug.c'.

	* gtkhtml.c (gtk_html_enable_debug): New function.

	* gtkhtml.h: New member `debug' in `GtkHTML'.

2000-02-19  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlfontstyle.h, htmlfontstyle.c: Removed.
	* gtkhtmlfontstyle.h, gtkhtmlfontstyle.c: New replacements.  We
	now use `GtkHTMLFontStyle' instead of `HTMLFontStyle' throughout,
	so that the values can be exposed to the API.

	* gtkhtml.c (font_style_to_internal): New helper function.
	(gtk_html_set_font_style): New function.

	* gtkhtml.h: New enum `GtkHTMLFontStyle'.

	* htmlengine-edit-fontstyle.c: New file.
	* htmlengine-edit-fontstyle.h: New file.

	* htmlengine-edit-paste.c: #include "debug.h".

2000-02-20  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmlclueflow.c (calc_min_width): Don't do any wrapping with the 
	HTML_CLUEFLOW_STYLE_NOWRAP style.

	* htmlclueflow.h: Added new style HTML_CLUEFLOW_STYLE_NOWRAP.

	* htmlengine.c (parse_table): Use style HTML_CLUEFLOW_STYLE_NOWRAP on
	tablecells with the "nowrap" keyword.

	* htmltextmaster.c (calc_min_width): Don't do any wrapping with the 
	HTML_CLUEFLOW_STYLE_NOWRAP style.

	* testgtkhtml.c: Added tests/test11.html.

	* tests/test1.html: New testcase for tables with the "nowrap" keyword.	
	
2000-02-20  Jonas Borgström  <jonas_b@bitsmart.com>
	
	* htmlcheckbox.c (encode): New function.
	(html_checkbox_init): Set value to "on" if it's NULL.
	Use ftk_check_button instead of gtk_toggle_button.
	
	* htmlengine.c (parse_input): Pass &e->form->radio_group to html_radio_new ().
	
	* htmlform.c (html_form_new): Initialize form->radio_group to ZERO.
	
	* htmlform.h: (GSList *radio_group) new member, it is used by the radio 
	buttons on the form.

	* htmlradio.c (encode): New function.
	(html_radio_new, html_radio_init): New argument: GSList **radio_group.
	(html_checkbox_init): Set value to "on" if it's NULL.

	* htmlradio.h: Changed the arguments for html_radio_new and html_radio_init.

	* tests/test9.html: Added <imput type=radio> Testcase.


2000-02-19  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltext.c (html_text_set_font_style): New function.
	(html_text_set_color): New function.
	(set_font_style): New function, implementation of
	`HTMLText::set_font_style'.
	(set_color): New function, implementation of
	`HTMLText::set_color'.
	(html_text_class_init): Install implementations.

	* htmltext.h: New virtual methods `HTMLText::set_color' and
	`HTMLText::set_font_style'.

	* htmltextmaster.c (merge): New function, implementation of
	`HTMLText::merge'.

	* htmltext.c (merge): New function, default (non) implementation
	of `HTMLText::merge()'.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `HTMLText::merge'.

	* htmlengine.h: New member `insertion_font_style'.

	* htmlengine-edit-styles.c: Renamed to `htmlengine-edit-styles.c'.
	* htmlengine-edit-styles.h: Renamed to `htmlengine-edit-styles.h'.

2000-02-16  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (key_press_event): Temporarily bind `GDK_F3' to
	"cut", `GDK_F4' to "copy" and `GDK_F5' to "paste".

	* htmlengine-edit-paste.c: New file.
	* htmlengine-edit-paste.h: New file.

	* htmltextmaster.c (get_selection): New function, implementation
	of `HTMLObject::get_selection'.
	(html_text_master_class_init): Install the implementation.

	* htmlclue.c (forall): Call the function on self after calling
	it on all the objects, instead of doing it before.

	* htmltextslave.c (select_range): New function, implementation of
	`HTMLObject::select_range'.  Do nothing and always return FALSE,
	so that the object can never be selected in any way.
	(html_text_slave_class_init): Install implementation.

	* htmlengine-edit-copy.c (html_engine_copy): New function.

	* htmltextslave.c (calc_size): Removed newline stuff.
	(draw_newline_highlight): Removed.
	(draw_highlighted): Removed newline stuff.
	(draw): Removed newline stuff.
	(check_newline): Removed.

	* htmltextmaster.c (select_range): Removed newline stuff.

	* htmltext.c (calc_size): Removed newline stuff.
	(have_newline): Removed.
	(html_text_have_newline): Removed.

	* htmltext.h: Removed virtual method `have_newline'.

2000-02-15  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextinput.c: `parent_class' should be `HTMLEmbeddedClass *',
	not `HTMLEmbedded *'.

	* htmlobject.c (html_object_get_selection): New function.
	(get_selection): New function, default implementation of
	`HTMLObject::get_selection'.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `HTMLObject::get_selection'.

	* All object implementations: implement `HTMLObject::copy'.  Also,
	keep track of the parent's class where not done already.

	* htmlobject.c (copy): New function, default implementation of
	`HTMLObject::copy'.
	(html_object_class_init): Install it.
	(html_object_copy): New function.
	(html_object_dup): New function.

	* htmlobject.h: New virtual method `HTMLObject::copy'.

	* htmlembedded.c (html_embedded_type_init): Use
	`HTML_TYPE_EMBEDDED', not `HTML_TYPE_ELEMENT'.

	* htmltype.h: s/HTML_TYPE_ELEMENT/HTML_TYPE_EMBEDDED/.
	* htmltype.c (html_type_name): Updated accordingly.

	* All object implementations: Use the `object_size' parameter.

	* htmlobject.c (html_object_class_init): New parameter
	`object_size'.

	* htmlobject.h: New member `object_size' in `HTMLObjectClass'.

	* htmlobject.h: New virtual methods `HTMLObject::copy',
	`HTMLObject::get_selection'.

	* htmlengine-edit-cut.c: New file.
	* htmlengine-edit-cut.h: New file.

	* htmlengine-edit-copy.c: New file.
	* htmlengine-edit-copy.h: New file.

2000-02-14  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_init): Initialize `cut_buffer' as
	NULL.
	(html_engine_destroy): Destroy the cut buffer, if any.

	* htmlengine.h: New member `cut_buffer'.

	* htmlengine-edit.c (html_engine_undo): Freeze before undoing,
	thaw afterwards.
	(html_engine_redo): Freeze before redoing, thaw afterwards.

	* htmlobject.c (relayout): Do nothing if the engine is frozen.

	* htmlengine.c (html_engine_init): Initialize `freeze_count'.
	(html_engine_freeze): New function.
	(html_engine_thaw): New function.
	(html_engine_frozen): New function.
	(html_engine_queue_draw): Actually queue only if the engine is not
	frozen.
	(html_engine_queue_clear): Likewise.

	* htmlengine.h: New member `freeze_count' in `HTMLEngine'.

	* htmlengine-cutbuffer.c: New file.
	* htmlengine-cutbuffer.h: New file.

	* htmlengine-edit-styles.c: Implemented paragraph style selection
	in a region, with undo/redo support.

	* htmlengine.c: New member `active_selection' in
	`SelectRegionData'.
	(html_engine_init): Initialize `active_selection' to FALSE.
	(html_engine_unselect_all): Set `active_selection' to FALSE.
	(select_region_forall): Set `active_selection' in the selection
	data to TRUE as soon as at least an item is selected.
	(html_engine_select_region): Copy `active_selection' from the
	selection data to the engine.

	* htmlengine.h: New member `active_selection' in `HTMLEngine'.

2000-02-13  Miguel de Icaza  <miguel@gnu.org>

	* htmlengine.c (html_engine_draw): Do not paint if the width or
	the height are zero.  Fixes crash (as this case is also window == NULL).

2000-02-12  Joe Shaw <joe@helixcode.com>

	* gtkhtml-embedded.c (gtk_html_set_parameter): g_strdup the parameter
	name because we cannot assume that it won't be freed during the life
	of the application.
	* gtkhtml-embedded.c (free_param): Added freeing of the key.

2000-02-12  Joe Shaw <joe@helixcode.com>

	* gtkhtml.c (expose): Did the same thing as I did with the draw
	method; see below.

2000-02-11  Joe Shaw <joe@helixcode.com>

	* gtkhtml.c (draw): Fixed a bug where embedded widgets were not being
	repainted correctly; the widget was updating all of its child widgets 
	and then painting over them. The order has been switched; thus, the 
	widget repaints itself first and then its child widgets are redrawn.
	
	* htmlembedded.c (html_embedded_new_widget): Connected the 
	button_press_event signal to a new handler, html_embedded_grab_cursor,
	that does not propagate up the tree so that embedded text widgets, 
	such as GtkEntry, retain the cursor.

2000-02-10  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (gtk_html_set_paragraph_style): New function.
	(button_press_event): Update styles when moving the cursor
	position at a mouse click.

	* htmlengine-edit-styles.c
	(html_engine_set_clueflow_style): New function.

	* htmlclueflow.c (html_clueflow_set_style): New function.

	* gtkhtml.c (update_styles): New helper function.
	(clueflow_style_to_paragraph_style): New helper function.
	(class_init): Install new signal
	`current_paragraph_style_changed'.
	(init): Initialize `paragraph_style' to
	`GTK_HTML_PARAGRAPH_STYLE_NORMAL'.

	* gtkhtml.h: New enum `GtkHTMLParagraphStyle'.  New signal
	`current_paragraph_style_changed'.  New member
	`GtkHTMLParagraphStyle'.

	* htmlengine-edit-styles.c: New file.
	* htmlengine-edit-styles.h: New file.

	* htmlengine-edit.c (html_engine_insert): Avoid inserting anything
	if the current object is NULL.

	* htmlundo.c (html_undo_add_undo_action): Update the stack size
	value when removing an element.

2000-02-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_insert): Support undo.

	* gtkhtml.c (key_press_event): (Temporarily) bind F1 to "undo", F2
	to "redo".

	* htmlengine-edit.c (html_engine_undo): New function.
	(html_engine_redo): New function.

	* htmlengine.c (html_engine_init): Initialize `undo'.
	(html_engine_destroy): Destroy it.

	* htmlengine.h: New member `undo' in `HTMLEngine'.

	* htmlundo-action.c: New file.
	* htmlundo-action.h: New file.

	* htmlundo.c: New file.
	* htmlundo.h: New file.

	* htmlcursor.c (html_cursor_goto_zero): New function.

	* htmlengine-edit.c (html_engine_jump_to_object): Use
	`html_cursor_jump_to()'.

	* htmlcursor.c (html_cursor_copy): New function.
	(html_cursor_dup): Use it.
	(html_cursor_up): Use it instead of doing direct C assignments
	between the structs.
	(html_cursor_down): Likewise.
	(html_cursor_jump_to): New function.  It is necessary to jump to a
	position while keeping the relative position value intact.
	(html_cursor_home): Reset relative position.

	* htmlcursor.c (html_cursor_new): Initialize `relative_position'.
	(html_cursor_get_relative): New function.
	(html_cursor_reset_relative): New function.
	(html_cursor_home): Set relative position to zero.
	(forward): Increment relative position if successfull.
	(backward): Decrement relative position if successfull.
	(html_cursor_up): Update relative position.
	(html_cursor_down): Likewise.
	(debug_location): Print relative position too.
	(_HTML_CURSOR_DEBUG): Enable.

	* htmlcursor.h: New member `relative_position'.

2000-02-08  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltable.c (calc_min_width): Call `calc_col_info()' before
	returning the value.
	(calc_preferred_width): Likewise.

	* htmlprinter.c (draw_panel): Implemented.  It does actually just
	draws a rectangle for now.
	(class_init): Install it.
	(PIXEL_SIZE): Changed to .5.

	* htmlengine-print.c (html_engine_print): When you call
	`html_engine_calc_size()', it uses `html_object_calc_min_size()'
	to decide the layout width, but the minimum HTMLTable width does
	not really change before you call `html_object_calc_size()' on it.
	So, we have to add an extra call to `html_engine_calc_size()'
	here, to make sure the minimum width is correct when we go back
	from the GnomePrint painter to the GDK one.

	* htmlengine.c (parse_h): Optimize and make more readable the
	H[1-6] checks.

2000-02-07  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltable.c (calc_preferred_width): Do not calc_size.
	(calc_min_width): Likewise.

2000-02-04  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c (calc_min_width): Fixed brainos.

	* htmltablecell.c (html_table_cell_new): Removed parameters `x'
	and `y'.  Renamed `max_width' to `specified_width'
	(html_table_cell_init): Likewise.

	* htmlimage.c (get_actual_width): New param `painter'.  The
	returned value is now expressed in painter units, instead of image
	pixel units.
	(get_actual_height): Likewise.
	(calc_preferred_width): Updated accordingly.
	(calc_min_width): Updated accordingly.
	(calc_size): Updated accordingly.
	(draw): Updated accordingly.

	* htmlimage.c (draw): Draw an highlighted pixmap when selected.

	* htmlgdkpainter.c (draw_pixmap): Fixed to handle the composition
	color more nicely.

2000-02-03  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlprinter.c (draw_text): Use `gnome_font_get_underline_position()'
	and `gnome_font_get_underline_thickness()' to get the
	strikeout/underline line right.

	* htmlprintfontmanager.c (load_font): Changed default font size
	from 12 pt. to 10 pt.

	* htmlprinter.c (begin): Do a gsave and setup a clip region.
	Also, paint a rectangle around the clip region to make debugging
	easier.
	(end): Do a grestore.
	(draw_line): Added missing `gnome_print_newpath()' call.
	(draw_rect): Likewise.
	(fill_rect): Likewise.
	(draw_text): Likewise.

	* htmlclueflow.c (check_page_split): New function, implementation
	of `HTMLObject::check_page_split'.
	(html_clueflow_class_init): Install it.

	* htmlcluev.c (check_page_split): New function, implementation of
	`HTMLObject::check_page_split()'.
	(html_cluev_class_init): Install it.

	* htmlobject.c (html_object_check_page_split): New function.
	(check_page_split): New function, default implementation for
	`HTMLObject::check_split'.
	(html_object_class_init): Install it.

	* htmlprinter.c (html_printer_get_page_height): New function.

	* htmlobject.h: New virtual method `HTMLObject::check_split'.

	* htmlprinter.c (draw_pixmap): Convert RGBA into RGB if necessary.

	* htmlobject.c (calc_min_width): Calc size before returning the
	width.
	(calc_preferred_width): Likewise.
	* htmlrule.c (calc_min_width): Likewise.
	* htmltable.c (calc_min_width): Likewise.
	(calc_preferred_width): Likewise.

	* htmlimage.c (draw): Multiply scaled width/height by the pixel
	size.

	* htmlprinter.c (draw_pixmap): Implemented.

	* htmlimage.c (draw): Take advantage of `scale_width',
	`scale_height', `color' in `html_painter_draw_pixmap()'.
	(html_image_update_scaled_pixbuf): Removed.
	(html_image_setup): Removed.
	(html_image_factory_area_updated): Removed.
	(html_image_factory_register): Do not connect "area_updated"
	anymore.
	(html_image_factory_end_pixbuf): Don't do any scaled-related stuff
	anymore.
	(html_image_factory_area_prepared): Always schedule an update.

	* htmlgdkpainter.c (draw_pixmap): Updated to use the new
	parameters.
	* htmlprinter.c (draw_pixmap): Likewise.

	* htmlpainter.c (html_painter_draw_pixmap): New params
	`scale_width', `scale_height', `color'.  Removed clipping params.

	* htmlpainter.h: New params `scale_width', `scale_height', `color'
	and removed clipping params in virtual method
	`HTMLPainter::draw_pixmap'.

	* htmlimage.c: Cleaned up the mess.
	(html_image_init): Removed arg `max_width'.  Simplified to just do
	what it should do.
	(html_image_new): Updated accordingly.
	(get_actual_width): New helper function.
	(get_actual_height): New helper function.
	(calc_size): Actually do what expected to.
	(calc_preferred_width): Likewise.
	(calc_min_width): Likewise.
	(set_max_width): Removed.
	(html_image_class_init): Do not install anymore.

	* htmlimage.h: Get rid of `predefinedWidth', `predefinedHeight',
	`engine', `scaled' and `scaled_pixbuf'.  New members
	`specified_width', `specified_height'.

2000-02-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltablecell.c (html_table_cell_set_width): New arg
	`painter'.

	* htmlobject.h: New argument `painter' in virtual methods
	`set_max_ascent', `set_max_descent', `set_max_width'.

	* htmlclueflow.c: Removed hardcoded values `VERTICAL_PAD',
	`BULLET_SIZE', `BULLET_HPAD', `BULLET_VPAD', `INDENT_UNIT'.
	(add_pre_padding): Added arg `pad'.
	(add_post_padding): Likewise.
	(calc_padding): New function.
	(calc_size): Use it.
	(get_indent): New arg `painter'.
	(set_max_width): New arg `painter'.
	(calc_indent_unit): New function.
	(get_indent): Use it.
	(calc_bullet_size): New function.
	(get_indent): Use it.
	(draw): Use it.

	* htmlobject.h: Size-related members in `HTMLObject' changed to be
	`gint's instead of `gshort's.

2000-02-01  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c: Added a "print preview" menu item.
	(print_preview_cb): Callback for the menu: it does the preview.

	* gtkhtml.c (gtk_html_print): New function.

	* htmlengine-print.c: New file, implementing printing for
	HTMLEngine.
	* htmlengine-print.h: Corresponding header file.

	* htmlprintfontmanager.c: New file, implementing the font manager
	for HTMLPrinter.
	* htmlprintfontmanager.h: Corresponding header file.

	* htmlprinter.c: New file, implementing a HTMLPainter suitable for
	printing.
	* htmlprinter.h: Corresponding header.

	* htmlclueflow.c (html_clueflow_init): Removed parameter `font'.
	(html_clueflow_new): Likewise.

	* htmlclueflow.h: Removed member `font'.

	* htmlgdkpainter.c: Use `htmlgdkfontmanager.c' instead of
	`htmlfontmanager.c'.

	* All files: updated to use `htmlfontstyle.c' and
	`htmlfontstyle.c' instead of `htmlfontmanager.c' and
	`htmlfontmanager.h' for HTMLFontStyle handling.

	* htmlfontstyle.h: New file.
	* htmlfontstyle.c: New file.

	* htmlgdkfontmanager.c: New file.
	* htmlgdkfontmanager.h: New file.

	* htmlfontmanager.c: Removed.
	* htmlfontmanager.h: Removed.

	* htmlengine.c: Updated to use `HTMLGdkPainter' instead of the
	old `HTMLPainter'.
	* htmlengine.h: Likewise.

	* htmlgdkpainter.c: New file, an HTMLPainter-derived class
	implementing a GDK-based painter.
	* htmlgdkpainter.h: Header for it.

	* htmlpainter.c: Rewritten as an abstract GTK+ class.
	* htmlpainter.h: Likewise.

	* htmlengine.c (html_engine_parse): No need to allocate the
	settings' colors anymore.

	* htmlpainter.c (html_painter_get_window): Removed.
	(html_painter_alloc_color): Updated to work without it.
	(html_painter_free_color): Likewise.

2000-01-30  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (check_prev): Take account for the color too.
	(insert_text): Updated accordingly.
	(parse_b): Use `e->settings->vLinkColor' for vlink colors, instead of
	`e->settings->linkColor'.

2000-01-29  Ettore Perazzoli  <ettore@helixcode.com>

	* htmldrawqueue.c (clear_element_new_with_background): Use the
	return value from `gdk_pixbuf_ref()'.  It is not void anymore;
	please update to the latest gdk-pixbuf if you do GtkHTML
	development.
	* htmlimage.c (draw): Likewise.

2000-01-29  Jonas Borgström <jonas_b@bitsmart.com>

	* htmlengine.c (insert_text): Use e->settings->linkColor as the color
	for links.

	* htmldrawqueue.c (clear_element_new_with_background): gdk_pixbuf_ref ()
	returns void don't use the return value.

2000-01-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (parse_color): New function to parse colors.  If
	`gdk_color_parse()' fails, it prepends a `#' and tries again.
	(parse_table): Use `parse_color()' instead of `gdk_color_parse()'.
	(parse_b): Likewise.
	(parse_f): Likewise.

	* htmltokenizer.c (html_tokenizer_new): Initialize all the members
	of the struct individually.

	* htmltextmaster.c (select_range): Take account for newline
	selection when deciding whether to redraw or now.

	* htmltextslave.c (draw): Consider a line that only has the
	newline highlighted as highlighted.

	* htmlengine.c (insert_text): Refuse to insert leading white space
	if we have no paragraph, if there is a pending paragraph or if the
	current clueflow is empty.
	(is_whitespace): Removed.

	* htmlengine.h: Made `avoid_para' and `pending_para' plain
	booleans (no longer 1 bit wide) because debugging is easier this
	way.

	* htmlengine.c (parse_d): Close the flow and set a pending
	paragraph instead of adding a newline.
	(insert_text): Skip all the leading whitespace if we are about to
	create a new paragraph. 

2000-01-28  NotZed  <notzed@zedzone.helixcode.com>

	* tests/test10.html: A simple test driver for embedded widgets.

2000-01-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextslave.c (calc_size): Inconditionally add the width of a
	space.

	* htmltextmaster.c (calc_min_width): Add the width of a space.

	* htmlengine.c (html_engine_parse): Initialize
	`pending_para_alignment' to `HTML_HALIGN_LEFT'.
	(insert_paragraph_break): New parameter `align'.

	* htmlengine.h: New member `pending_para_alignment' in
	`htmlengine.h'.

	* htmlengine.c (parse_table): Restore quote and list level and
	flow pointer before adding the table to the tree.

	* debug.c (debug_dump_tree): Also print the list/quote level for
	HTMLClueFlows.

	* testgtkhtml.c (object_timeout): Added `GTK_WIDGET()' cast.
	(object_requested_cmd): Likewise.  Also, added a `GtkFunction'
	cast.

	* htmlembedded.c (html_embedded_new_widget): Removed unused
	variables.

	* htmlengine.c (parse_o): Added a `GTK_WIDGET()' cast to placate
	the compiler.

	* htmlclue.c (destroy): Use an HTMLClue pointer instead of an
	HTMLObject one, to prevent a warning.

2000-01-27  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_insert_para): Use both
	`list_level' and `quote_level'.

	* htmlengine.c (html_engine_init): Init `quote_level',
	`list_level'.
	(block_end_list): Renamed to `block_end_level'.  Set `list_level'
	and `quote_level'.
	(block_end_indent): Renamed to `block_end_quote'.  Use
	`quote_level'.
	(parse_table): Restore both `quote_level' and `list_level'.
	(parse_d): Increase `list_level' for `<dir>'.  (I am not sure how
	to handle this for now.)  Increase/decrease `quote_level' for
	`<dl>', `<dd>' and `<dt>'.
	(parse_l): Use `list_level' and `quote_level' when creating the
	new clueflow.
	(parse_o): Use `list_level' for `<ol>'.
	(parse_u): Use `quote_level' for `<ul>'.
	(parse_b): Use `quote_level' for `<blockquote>'.

	* htmlengine.h: `indent' replaced by `quote_level', `list_level'.

	* htmlclueflow.c (html_clueflow_new): New params `list_level',
	`quote_level'.
	(html_clueflow_init): Likewise.
	(add_pre_padding): A change in quote level always adds a space.  A
	change in list level works like before.
	(add_post_padding): Likewise.
	(draw): Updated to just use `list_level' for deciding the bullet's
	shape.
	(get_indent): Updated to use `list_level' and `quote_level'.

	* htmlclueflow.h: Member `level' replaced by `list_level',
	`quote_level'.

	* htmlengine.c (parse_u): Insert a paragraph break if a paragraph
	space is pending and the indentation level is greater than zero.
	(block_end_list): Only erase pending paragraph spaces and prohibit
	new paragraphs if the indentation level is equal to zero.

	* htmltextmaster.c (check_point): Select the newline.

	* htmltextslave.c (calc_size): Add the size of a space if this is
	the last slave of a newline'd text master.
	(draw_newline): New helper function.
	(draw_normal): Draw a space by using it, if we are before a new
	line.
	(draw_highlighted): Likewise.

	* htmltext.c (html_text_have_newline): New function.
	(have_new_line): New function, default implementation of
	`HTMLText::have_newline'.
	(html_text_class_init): Install it.
	(calc_size): If the object has a new line add the width of a space
	to it.

	* htmltext.h: New virtual method `HTMLText::have_newline'.

2000-01-26  Michael Zucchi  <notzed@zedzone.helixcode.com>

	* Makefile.am (libgtkhtml_HEADERS): Renamed htmlelement.h,
	to htmlembedded.h, added gtkhtml-embedded.h.

	* testgtkhtml.c (object_requested_cmd): Add a signal handler for
	testing custom widgets using the object specifier.

	* htmlengine.c (html_engine_class_init): Create object_requested
	signal.

	* gtkhtml.c (gtk_html_new): Link to object_requested signal of
	htmlengine to proxy the call.
	(class_init): Create the new object_requested signal.
	(html_engine_object_requested_cb): Implement the signal proxy.

	* htmlengine.c (html_engine_stop_parser): Clear timerID if we
	remove the timeout.
	(html_object_changed): Use schedule_update to update, dont update
	directly.

	* htmlembedded.c (html_embedded_size_recalc): Force a size
	recalculation of an embedded widget.
	(html_embedded_new_widget): Create a new html embedded element
	from a htmlembedded widget.

	* htmlelement.[ch]: Renamed to htmlembedded.[ch], should probably
	be somehting more different to gtkhtml-embedded, but its not that
	hard to change.
	
	* htmlengine.c (html_engine_init): Initialise the embeddedStack, a
	stack of gtkhtmlembedded widgets.
	(html_engine_destroy): Destroy the embeddedStack.

	* gtkhtml.h: Added object_requested signal, for embedding widgets.

	* htmlengine.h (HTMLEngine): Added embeddedStack for embedded
	widgets.
	(HTMLEngineClass): Added object_requested signal, for embedding
	object widgets.

	* htmlengine.c (html_object_changed): Called when an embedded
	changes, causes a re-layout.  This should probably be queued until
	an idle time.
	(parse_o): Added support for <OBJECT> element.  Returns a callback
	"object_requested" to application.  The semantic of having
	alternative text for non-instantiationable objects is not
	implemented.
	(parse_p): Added <PARAM> element, for object parameters.

	* gtkhtml-embedded.c/h: New object.  A container object for
	embeddeing custom widgets into gtk-html.  It basically notifies
	the caller when its content or layout information about it
	changes.

2000-01-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmllinktextmaster.c (save): New function, implementing
	`HTMLObject::save'.
	(html_link_text_master_class_init): Install it.

	* htmllinktext.c (save): New function, implementing
	`HTMLObject::save'.
	(html_link_text_class_init): Install it.

	* htmlrule.c (save): New function, implementing
	`HTMLObject::save'.
	(html_rule_class_init): Install it.

	* htmlengine-save.c (encode_entities): `&apos;' is not valid in
	HTML.  Removed (now) unused variable `html'.

	* htmlengine-save.c (write_header): Use uppercase tags for consistency.
	(write_end): Likewise.

	* htmltext.c (get_tags): New helper functions to get the font
	style tags associated with the text element.

	* htmlclueflow.c (save): New function, implementation of
	`HTMLObject::save'.  Add the proper start/end tags according to
	the clueflow's style.
	(html_clueflow_class_init): Install this method implementation.
	(get_tag_for_style): New helper function to get the tag associated
	with a specific style.

	* htmlclue.c (save): New function, implementation of
	`HTMLObject::save'.  It saves all the children.
	(html_clue_class_init): Install this method implementation.

	* htmlengine-save.c (write_header): New function to write the
	start of the HTML file.
	(write_end): New function to write the end of the HTML file.
	(html_engine_save): Use them.
	(save_forall): Removed.
	(html_engine_save): Just save the main (vertical) clue.

	* htmlengine-save.c (html_engine_save_output_string): New function
	to write a plain, unencoded string.

	* htmltext.c (save): Use `html_engine_save_encode()' to write the
	string encoded with entities.

	* htmlengine-save.c (encode_entities): New helper function to
	encode a string through entities.
	(html_engine_save_encode): New function to write an encoded
	buffer.
	(html_engine_save_encode_string): New to write an encoded
	zero-terminated string.

2000-01-25  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclue.c (destroy): Always ensure the tree is in a valid state
	by removing the clue node before destroying it.

2000-01-25  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (idle_handler): Call `gtk_html_calc_scrollbars' to
	update the scrollbars.

	* gtkhtml.c (gtk_html_save): New function.

	* htmltext.c (save): New function, implementation of
	`HTMLObject::save'.  For now, it just dumps the text.
	(html_text_class_init): Install it.

	* htmlcursor.c (html_cursor_home): Removed debugging message.

	* htmlobject.c (html_object_save): New function.
	(save): New function, default implementation of
	`HTMLObject::save'.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `HTMLObject::save'.

	* htmlengine-save.h: New file.
	* htmlengine-save.c: New file.

	* htmlengine.c (html_engine_set_editable): Move the cursor to the
	home if the widget becomes editable.  Also, if the editable state
	changes, redraw the whole thing.
	(html_engine_timer_event): Move the cursor home.
	(html_engine_update_event): Move the cursor home at the end of
	parsing.

	* testgtkhtml.c (goto_url): Do not call `gtk_html_parse()'
	anymore.

	* gtkhtml.c (init): Initialize `editable' to `FALSE'.
	(gtk_html_parse): Turned into a dummy.
	(gtk_html_begin): Call `html_engine_parse()' too.  Also set
	`load_in_progress' to `TRUE' and the engine's editable state to
	`FALSE'.
	(gtk_html_end): Set `load_in_progress' to `FALSE'.  Set the
	engine's editable state according to the value of the `editable'
	member.
	(gtk_html_set_editable): New function.
	(gtk_html_get_editable): New function.

	* gtkhtml.h: New members `editable', `load_in_progress' in
	`GtkHTML'.

	* Makefile.am (libgtkhtmldir): Never compile the HTML component.

	* htmlengine.c (html_engine_timer_event): No longer do the ugly
	font saving/restoring trick.  I actually don't understand why it
	was there.

	* htmldrawqueue.c (draw_obj): Don't draw the cursor here as the
	idle loop handler will take care of it.

	* gtkhtml.c (key_press_event): Don't move the cursor forward when
	inserting text, as `html_engine_insert()' now does this.

	* htmlengine-edit.c (html_engine_insert): Move the cursor forward.

2000-01-24  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c (accepts_cursor): New function, implementation of
	`HTMLObject::accepts_cursor'.  It always returns `TRUE', so that
	we can actually move the cursor to an image and edit it.
	(html_image_class_init): Install it.

	* htmlengine-edit.c (merge_text_at_cursor): Fix merging.

	* htmlcursor.c (html_cursor_dup): New function to duplicate a
	cursor.

	* gtkhtml.c (focus_in_event): New function, implementation for
	`GtkWidget::focus_in_event'.
	(focus_out_event): New function, implementation for
	`GtkWidget::focus_out_event'.
	(class_init): Install these.
	(button_press_event): Grab the focus.

	* htmlobject.c (relayout): If the object has no parent and has
	shrunk, queue a clear for the area that is not covered by the
	object anymore.

	* htmlengine.c (html_engine_queue_clear): New function.

	* htmldrawqueue.c (html_draw_queue_add_clear): New function.
	(html_draw_queue_add_clear_with_background): New function.
	(clear): New static function to clear an area specified by an
	HTMLClearElement.
	(html_draw_queue_flush): Flush the clear queue as well.
	(html_draw_queue_add): Emit the "draw_pending" signal only if the
	clear queue is empty too.
	(clear_element_new): New static function to create a clear element
	with a solid color background.
	(clear_element_new_with_background): New static function to create
	a clear element with a pixmap background.
	(clear_element_destroy): New static function to destroy a clear
	element.

	* htmldrawqueue.h: Added an HTMLClearElement queue for erasing
	parts of the window.

	* htmltextslave.c (fit_line): Do not chop the last word if there
	is enough space, even if there is another object after this one.

	* htmltextslave.c (html_text_slave_get_offset_for_pointer):
	Compare with the middle position of the character, not the
	leftmost border, so that it's easier to make selections.

	* htmltextslave.c (draw_highlighted): Fix off-by-one selection
	highlight.
	(html_text_slave_get_offset_for_pointer): Consider the last
	character too.

2000-01-24 Elliot Lee  <sopwith@redhat.com>

	* htmlform.c: Include string.h to eliminate warning.

2000-01-24  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (expose): Return `TRUE'.
	(selection_idle_handler): Removed.
	(motion_notify_event): Do not use an idle handler anymore.

	* gtkhtml.h: Removed `selection_idle_handler_id', `selection_x2',
	`selection_y2'.

	* htmltextmaster.c (select_range): Fixed range comparisons.  I
	think I need to sleep.

	* htmldrawqueue.c (draw_obj): Do not paint the cursor if the
	engine is not editable.
	(html_draw_queue_flush): Removed debugging message.

	* htmlengine.c (html_engine_flush_draw_queue): Only draw the
	cursor if the engine is not editable.
	(html_engine_draw): Do not draw the cursor if not editable.
	(html_engine_draw_cursor_in_area): g_assert() that the widget is
	editable.

	* gtkhtml.c (selection_idle_handler): New function, to perform
	selection in the idle loop.
	(motion_notify_event): Set it up in the idle handler to perform
	selection.
	(destroy): Remove the selection idle, if any.
	(init): Initialize `selection_idle_handler_id' to zero.
	(gtk_html_end): Removed debugging message.

	* gtkhtml.h: New member `selection_idle_handler_id' in `GtkHTML'.

2000-01-23  Federico Mena Quintero  <federico@helixcode.com>

	* gtkhtml.c (realize): Set the background pixmap to NONE so that
	it does not flicker as much when scrolling.

2000-01-23  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextmaster.c (check_point): Fix selection for slaves after
	the first one.

	* htmlobject.c (check_point): Fix braino: `for_cursor' is a
	`gboolean', not a `gpointer'.

	* htmltextmaster.c (split): Set the selection on the new element
	by hand instead of calling `html_object_select_range()'.

	* gtkhtml.c (motion_notify_event): Call
	`html_engine_select_region' with `TRUE' as the `queue_draw'
	parameter.

	* htmlengine.c (html_engine_select_region): New param
	`queue_draw'.  When not FALSE, put all the objects that change
	selection state on the draw queue.
	(select_region_forall): Updated to do this.
	(html_engine_unselect_all): New param `queue_draw', honoured by
	using `SelectRegionData'.
	(unselect_forall): Updated accordingly.

	* htmlobject.h (select_range): Updated with the `engine' and
	`queue_draw' params.
	(html_object_select_range): Likewise.

	* htmlobject.h: New params `engine', `queue_draw' in
	`HTMLObject::select_range'.

	* htmltextmaster.c (check_point): Removed debugging message.

	* gtkhtml.c (button_press_event): Sum the X/Y offsets before
	passing the coordinates to `html_engine_jump_at'.
	(motion_notify_event): Sum the X/Y offsets before calling
	`html_engine_get_link_at' too.

	* htmlengine.c (html_engine_get_object_at): Do not add the X/Y
	offsets when calling the `check_point' method on the parent clue.

	* htmltextslave.c (fit_line) [HTML_TEXT_SLAVE_DEBUG]: Updated
	debugging code to use the new HTMLFitType values.

	* htmltextmaster.c (check_point): Added ugly kludges to make the
	mouse selection move the cursor and selected text as expected,
	when outside the bounds.

	* htmltextslave.c (check_point): New function, implementation for
	`HTMLObject::check_point'.  Always return NULL: this makes sure
	the object cannot be selected with the mouse.
	(html_text_slave_class_init): Install it.

	* htmlengine.c (html_engine_get_object_at): New param
	`for_cursor'.
	(html_engine_select_region): If any of the extremes is not in an
	object, unselect all.

	* htmlobject.h: New parameter `for_cursor' in
	`HTMLObject::check_point'.  All the method implementations updated.

	* htmltable.c (is_container): New function, implementation of
	`HTMLObject::is_container'.  It returns TRUE.
	(html_table_class_init): Install it.

	* htmlclue.c (is_container): New function, implementation of
	`HTMLObject::is_container'.  It returns TRUE.
	(html_clue_class_init): Install it.

	* htmlobject.c (is_container): New function, default
	implementation for `HTMLObject::is_container'.
	(html_object_class_init): Install it.
	(html_object_is_container): New function.

	* htmlobject.h: New virtual method `is_container'.

	* htmlengine.c: Added members `x1', `y1', `x2', `y2' to
	`SelectionRegionData'.
	(html_engine_select_region): Initialize them to the pointer x/y
	values relative to the objects that bound the selection.  Also,
	g_free() the data.

	* htmltextslave.c (draw_highlighted): Fix off-by-one error.

2000-01-22  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_select_region): New function.
	(html_engine_unselect_all): New function.

	* htmlclue.c (forall): New function, implementation of
	`HTMLObject::forall'.
	(html_clue_class_init): Install it.

	* htmlobject.c (html_object_forall): New function.
	(forall): New function, default implementation of
	`HTMLObject::forall'.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `forall'.

	* htmlcursor.c (html_cursor_backward_element): New function.

	* htmlcursor.c (debug_location): Made a non-op by default.

	* gtkhtml.c (init): Initialize the new GtkHTML member variables.
	(button_press_event): Return `TRUE' as we always handle the press.
	Do not emit `link_clicked' anymore.  Grab the pointer.  Set
	`in_selection' to TRUE, and initialize `selection_x1' and
	`selection_y1'.  Unselect all in the engine.
	(button_release_event): Remove the grab.  Don't emit the
	"link_clicked" signal if we are performing a selection.  Set
	`in_button' and `in_selection' to FALSE.
	(motion_notify_event): Handle the selection if button is pressed.

	* gtkhtml.h: New members `selection_x1', `selection_y1',
	`selection_x2', `selection_y2', `button_pressed' and
	`in_selection' in `GtkHTML'.

	* htmlobject.c (select_range): Braino fix.

	* htmltextmaster.c (select_range): If the lenght is negative,
	select the whole text.

2000-01-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c (generate_pixbuf_for_selection): New helper
	function.
	(draw): By using it, display a color-composed image, using the
	selection color.

	* htmlcolorset.c (html_color_set_new): I never learn: use 16-bit
	color values.  Also, make highlight foreground color different
	from the highlight color.

	* htmltextslave.c (draw_highlighted): New helper function.
	(draw_normal): New helper function.
	(draw): Draw highlighted text when appropriate, using the above
	two functions.

	* htmlpainter.c (html_painter_draw_text): Made param `text'
	const-safe.

	* htmltextmaster.c (html_text_master_init): Initialize
	`select_start', `select_length'.
	(select_range): New function, implementation of
	`HTMLObject::select_range()'.
	(split): Split the selection between self the newly created text
	master.
	(insert_text): New function, implementation of
	`HTMLText::insert_text'.  Used to update the selection after
	selection happens.
	(remove_text): New function, implementation of
	`HTMLText::remove_text'.  Used to update the selection after the
	removal happens.
	(html_text_master_class_init): Install these implementations.

	* htmltextmaster.h: New member `select_start', `select_length'.

	* htmlobject.c (html_object_select): Removed.
	(select_range): New function, default implementation of
	`HTMLObject::select_range()'.
	(html_object_select_range): New function.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `HTMLObject::select_range()'.

	* htmlengine.c (html_engine_init): Set the color set in the
	painter.

	* htmlpainter.c (html_painter_get_default_background_color): New
	function.
	(html_painter_get_default_foreground_color): Removed.
	(html_painter_get_default_link_color): Removed.
	(html_painter_get_default_highlight_color): Removed.
	(html_painter_get_default_highlight_foreground_color): Removed.
	(html_painter_draw_cursor): Removed.
	(html_painter_realize): Cleaned up a bit.
	(html_painter_new): Set `color_set' to NULL.
	(allocate_color_set): New helper function to allocate the
	HTMLColorSet colors.
	(html_painter_set_color_set): New function.
	(html_painter_realize): Allocate colors if `color_set' is not
	NULL.

	* htmlpainter.h: New member `color_set' in `HTMLPainter'.

	* htmlengine.c: Updated to use `htmlcolorset.c' instead of
	`htmlenginecolorset.c'.
	(html_engine_get_background_color): Removed.
	(html_engine_get_foreground_color): Removed.
	(html_engine_get_link_color): Removed.
	(html_engine_get_highlight_color): Removed.
	(html_engine_get_highlight_foreground_color): Removed.

	* htmlengine.h: Likewise.

	* htmlcolorset.c: New file.
	* htmlcolorset.h: New file.

	* htmlenginecolorset.c: Removed.
	* htmlenginecolorset.h: Removed.

2000-01-20  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlobject.c (draw): Removed param `cursor'.

	* htmlobject.h: Removed param `cursor' in `HTMLObject::draw'.  All
	the implementations fixed in all the classes.

	* htmlengine.c (html_engine_init): Initialize `color_set'.
	(html_engine_destroy): Destroy the color set.
	(html_engine_realize): Realize the color set.
	(html_engine_get_background_color): New function.
	(html_engine_get_foreground_color): New function.
	(html_engine_get_link_color): New function.
	(html_engine_get_highlight_color): New function.
	(html_engine_get_highlight_foreground_color): New function.

	* htmlengine.h: New member `color_set'.

	* htmlenginecolorset.h: New file.
	* htmlenginecolorset.c: New file.

	* htmlobject.c (html_object_init): Initialize `selected' to FALSE.
	(html_object_select): New function.

	* htmlobject.h: New flag `selected' in `HTMLObject'.

	* htmlengine-edit.c (merge_text_at_cursor): Changed so that slaves
	between the two elements are removed only if the two elements can
	actually be merged.

	* htmltextmaster.c (fit_line): Use `html_clue_append_after()'.
	* htmltextslave.c (split): Likewise.

	* htmlengine-edit.c (delete_different_parent): Avoid destroying
	the slaves after the first parent.
	(delete_same_parent): Likewise.

	* htmltextslave.c (fit_line): Remove the object from the parent
	before destroying it.
	(split): Split the assertion so that it's obvious to see what is
	wrong.
	(split_at_newline): Braino fix.  Get the owner's text, as we are
	no HTMLText-derived class.

	* htmlengine-edit.c (html_engine_insert_para): Remove the object
	from the parent before destroying it.

	* htmltextmaster.c (fit_line): Remove the object from the parent
	before destroying it.

	* debug.c (debug_dump_tree): Display the HTMLTextSlave intervals
	as [start, end] instead of [start, len].

	* gtkhtml.c (button_press_event): Implemented.

	* htmlengine-edit.c (html_engine_jump_to): Renamed to
	`html_engine_jump_to_object' and made void.
	(html_engine_jump_at): New function.

	* htmlengine.c (html_engine_get_object_at): New function.

2000-01-19  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltable.c (mouse_event): Removed.
	(html_table_class_init): Do not install it.

	* htmlimageinput.c (mouse_event): Removed.
	(html_imageinput_class_init): Do not install it.

	* htmlengine.c (html_engine_mouse_event): Removed.

	* htmlcluev.c (mouse_event): Removed.
	(html_cluev_class_init): Do not install it.

	* htmlclue.c (mouse_event): Removed.
	(html_clue_class_init): Do not install it.

	* gtkhtml.c (button_press_event): Do not call
	`html_engine_mouse_event' anymore.  We are going to do this
	differently.
	(button_release_event): Likewise.

	* htmlobject.c (mouse_event): Removed.
	(html_object_class_init): Do not install it anymore.
	(html_object_mouse_event): Removed.

	* htmlobject.h: Removed `mouse_event' virtual method.

2000-01-19  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcluev.c (check_point): Fixed to use the correct offsets.

	* htmlengine.c (html_engine_mouse_event): Make the cursor jump to
	the specified position if the engine is editable.

	* htmlengine-edit.c (html_engine_jump_to): New function.

	* htmltextmaster.c (check_point): New function, implementation of
	`HTMLObject::check_point()'.
	(html_text_master_class_init): Install it.

	* htmltextslave.c (html_text_slave_get_offset_for_pointer): New
	function.

	* htmlobject.h: New arg `painter' in `check_point'.  All the
	method implementations updated.
	* htmlobject.c (check_point): Updated accordingly.

	* htmltextslave.c (fit_line): Removed `#if 0'ed code.

	* htmlobject.h: New parameter `offset_return' in
	`HTMLObject::check_point'.  Through this, the object can also
	return a cursor offset.
	* htmlobject.c (html_object_check_point): Accordingly, new
	parameter `offset_return'.
	* htmlengine.c (html_engine_get_link_at): Updated accordingly.
	* htmlclue.c (check_point): Updated to get the extra parameter.
	* htmlcluev.c (check_point): Likewise.
	* htmlobject.c (check_point): Likewise.

	* htmlengine-edit.c (html_engine_delete): When a non-text, destroy
	the element.

	* htmlcursor.c (html_cursor_up): Use
	`html_object_get_cursor_base', not `html_object_get_cursor'.
	(html_cursor_down): Likewise.

	* htmltextmaster.c (get_cursor_base): New function, implementation
	of `HTMLObject::get_cursor_base'.
	(html_text_master_class_init): Install it.
	(get_cursor): Rewritten by means of `html_object_get_cursor_base'.

	* htmltext.c (get_cursor_base): New function, implementation of
	`HTMLObject::get_cursor_base'.
	(html_text_class_init): Install it.
	(get_cursor): Rewritten by means of `html_object_get_cursor_base'.

	* htmlobject.c (html_object_get_cursor_base): New function.
	(get_cursor_base): New function, default implementation of
	`HTMLObject::get_cursor_base'.
	(html_object_class_init): Install it.
	(get_cursor): Rewritten by means of `html_object_get_cursor_base'.

	* htmlobject.h: New virtual method `get_cursor_base'.

	* debug.c (debug_dump_tree): Print the object position.

	* htmlengine-edit.c (merge_text_at_cursor): Return the amount of
	characters added to the current element.
	(html_engine_delete): Sum it to the cursor's current offset.

	* htmlcursor.c (backward): Don't go beyond the last character if
	there is another element after it.

2000-01-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (merge_text_at_cursor): New function,
	attempting to merge the text element at the cursor with the
	previous text element, if any and if of the same type and with the
	same attributes.
	(html_engine_delete): Call it.

	* htmlengine-edit.c (delete_different_parent): New param
	`destroy_start'.  If `FALSE', do not destroy the `start_object'.
	(delete_same_parent): Likewise.
	(html_engine_delete): Do not destroy an empty text object if it's
	the last in the clue or it's followed by a vspace.

	* htmlrule.c (draw): Don't call the parent class' `draw' method.

	* htmlobject.c (draw): Don't draw the cursor.

	* htmldrawqueue.c (draw_obj): Draw the cursor in the area we have
	repainted.

	* htmlengine.c (draw_cursor): Removed.
	(html_engine_draw_cursor_in_area): Replaced by this one.
	(html_engine_draw): Updated to use this one.
	(html_engine_draw_cursor): Likewise.

	* htmltextslave.c (fit_line): Do not skip leading space anymore.

	* htmlengine.c (html_engine_make_cursor_visible): Argh.
	s/rightBorder/topBorder/.
	(draw_cursor): Fixed.

	* gtkhtml.c (key_press_event): Queue a draw if return value is
	`TRUE'.

2000-01-18  Jonas Borgström <jonas_b@bitsmart.com>

	* htmlengine.c (parse_input): Modified the forms code to work with the
	new htmlengine. Changed html_clue_append to append_element. And did some
	code cleanup.

2000-01-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (append_element): Silly me.  Don't add the object
	to the flow twice when creating a new flow!

	* htmlcursor.c (forward): Fixed navigation at the end of the
	element so that it works with empty elements.
	(backward): Likewise.
	(next_not_slave): Fixed so that it starts from the object after
	`object', not `object' itself.

	* htmlengine.c (current_clueflow_style): If the stack is empty,
	return `HTML_CLUEFLOW_STYLE_NORMAL', not `HTML_CLUEFLOW_STYLE_P'.

	* htmlclueflow.c (get_default_font_style): Removed handling of
	`HTML_CLUEFLOW_STYLE_P'.

	* debug.c (clueflow_style_to_string): Removed handling of
	`HTML_CLUEFLOW_STYLE_P'.

	* htmlclueflow.h: Get rid of `HTML_CLUEFLOW_STYLE_P' as we don't
	need it.

	* htmlengine.c (html_engine_init): The default value for
	`editable' should be FALSE!

	* htmlengine.c (html_engine_flush_draw_queue): Draw cursor
	before/after flushing the queue.

	* htmlengine-edit.c (html_engine_insert_para): Draw cursor
	before/after doing the stuff.
	(html_engine_insert): Likewise.

	* htmlcursor.c (html_cursor_up): Rewritten by means of
	`html_object_get_cursor'.

	* htmltextmaster.c (calc_char_position): Removed.
	(get_cursor): New function, implementation of
	`HTMLObject::get_cursor'.
	(html_text_master_class_init): Install it.
	(get_cursor): When we encounter a non-HTMLTextSlave object, we
	should break the loop, not continue it.

	* htmltext.c (html_text_calc_char_position): Removed.
	(calc_char_position): Removed.
	(get_cursor): New function, implementation of
	`HTMLObject::get_cursor'.
	(html_text_class_init): Install it.

	* htmltext.h: Removed `calc_char_position' method.

	* htmlobject.c (html_object_get_cursor): New function.
	(accepts_cursor): Return TRUE by default.
	(get_cursor): New function, implementation of
	`HTMLObject::get_cursor'.
	(class_init): Install it.

	* htmlobject.h: New virtual method `get_cursor'.

	* htmlengine-edit.c (queue_draw_for_cursor): Removed.
	(html_engine_move_cursor): Use `html_draw_cursor' instead.

	* htmlengine.c (html_engine_init): Initialize `invert_gc' to
	`NULL'.
	(html_engine_destroy): Destroy `invert_gc' if not `NULL'.
	(html_engine_realize): Initialize `invert_gc' by creating a
	`GDK_INVERT' GC.
	(html_engine_draw_cursor): New function.

	* htmlengine.h: New member `invert_gc' in `HTMLEngine'.

2000-01-17  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c: Do not #include "htmlpainter.h" anymore.
	(realize): Call `html_engine_realize' instead of accessing the
	painter and calling `html_painter_realize' directly.

	* htmlengine.c (html_engine_init): Initialize member `window' to
	NULL.
	(html_engine_realize): New function.

	* htmlengine.h: New member `window' in `HTMLEngine'.

	* htmlengine.h (html_painter_set_background_color): Removed bogus
	proto.

	* htmlclueflow.c (draw): Use `html_painter_get_black' to set the
	pen color for the bullet.  I think we should be using the font
	color instead, but it's fine for now.

	* htmlpainter.c (html_painter_get_black): New function.

	* htmlclue.c (draw): Removed bogus code to draw rects around the
	clue and getting rid of corresponding variables.  This was not
	even that useful for debugging, as it was intrinsecally broken.

	* htmlclueflow.c (add_pre_padding): Add some padding for `<pre>'
	as well, if the previous element is not a `<pre>' one.
	(add_post_padding): Likewise, but checking with the next element
	instead of the previous one.

	* htmlengine.c (parse_body): Handle `\n' by inserting a line
	break.

	* htmltype.c: Do not call `html_bullet_type_init()' anymore.

	* htmlbullet.c: Removed.
	* htmlbullet.h: Removed.

	* htmlengine.c (html_engine_init): Initialize `avoid_para' to
	`TRUE', `pending_para' to FALSE.
	(html_engine_parse): Likewise.
	(all functions): Updated to use these new members.
	(block_end_list): Avoid adding empty paragraph breaks after this.
	(block_end_indent): Likewise.
	(parse_f): Fix relative font size.

	* htmlengine.h: New elements `avoid_para', `pending_para'.

	* htmlengine.c (close_flow): Added ugly hack to check if the flow
	ends with a vspace.  If it does, the vspace is killed.  Yes, I
	should do it differently, but let's just get it to work now.

2000-01-16  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcluev.c (get_right_clear): New function, implementation of
	`HTMLClue::get_right_clear'.
	(get_left_clear): New function, implementation of
	`HTMLClue::get_left_clear'.
	(html_cluev_class_init): Install virtual methods.

	* htmlclueflow.c (add_post_padding): Add padding even if the next
	object is an header.

	* htmlfontmanager.c: Use a static array for calculating the real
	font size.  (Yes, this is just a temporary hack.)

	* htmlclueflow.c (calc_preferred_width): Use `get_indent()'
	correctly instead of simply multiplying the level by the indent
	size.

	* htmlrule.c (draw): Fix braino: `HTML_HALIGN_RIGHT' and
	`HTML_HALIGN_LEFT' were swapped.

2000-01-13  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c: Changed to display bullets correctly even if
	`level' is zero.  (Which should not happen according to the
	standard, but it does happen in practice.)

	* htmlengine.c (html_engine_init): Initialize `pending_vspace' to
	zero.
	(html_engine_insert_text): Removed.
	(insert_pending_vspace): New function.
	(insert_text): New function.
	(add_line_break): New function.
	(block_end_font): No longer insert a vspace.
	(block_end_list): Likewise.
	(parse_body): Do not set `vspace_inserted' anymore.  `\n' just
	causes `pending_vspace' to be inconditionally incremented.
	(All functions): Use `add_line_break' to force line breaks instead
	of `html_engine_insert_vspace()'.
	(parse_h): Set `pending_vspace' to 0 when opening/closing headers.
	Insert pending vspace before adding a rule.
	(parse_i): Insert pending vspace before adding the image.
	(parse_l): Insert pending vspace before creating the new clue.
	(html_engine_insert_vspace): Removed.
	(close_flow): New parameter `clue'.

	* htmlengine.h: `vspace_inserted' removed.  New member
	`pending_vspace'.

	* htmlvspace.c (html_vspace_new): Removed parameter `space'.
	(html_vspace_init): Removed parameter `space'.  Do not init
	`ascent', `descent' anymore.
	(calc_size): New function, implementation for
	`HTMLObject::calc_size'.
	(html_vspace_class_init): Install it.

2000-01-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (calc_size): Add padding at the end only.

	* htmlstack.c (html_stack_pop): Added precondition.

	* htmlengine.c (parse_a): Do not force color and font for links
	anymore.

	* htmllinktextmaster.c (get_font_style): New function,
	implementing `HTMLText::get_font_style'.  It forces the font style
	to be underlined.
	(html_link_text_master_class_init): Install it.

	* htmllinktext.c (get_font_style): New function, implementing
	`HTMLText::get_font_style'.  It forces the font style to be
	underlined.
	(html_link_text_class_init): Install it.

	* htmltablecell.c (html_table_cell_init): Initialize
	`bg_allocated' to `FALSE'.
	(set_bg_color): Set `bg_allocated' to `FALSE' if the new color is
	different from the existing one.
	(draw): If `bg_allocated' is `FALSE', allocate the color and set
	`bg_allocated' to `TRUE'.

	* htmltablecell.h: New member `bg_allocated' in `HTMLTableCell'.

	* htmlengine.c (html_engine_init): Set `bgColor_allocated' to
	`FALSE'.
	(draw_background): If `bgColor_allocated' is `FALSE', allocate
	`bgColor' in the engine's painter.
	(parse_b): Set `bgColor_allocated' to FALSE when setting a new
	`bgColor'.
	(close_anchor): Do not pop color on links anymore.

	* htmlengine.h: New member `bgColor_allocated' in `HTMLEngine'.

2000-01-10  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (current_color): New function.
	(html_engine_set_named_color): Removed.
	(push_color): New function.
	(pop_color): New function.
	(html_engine_stop_parser): Clear all the stacks except the
	list/glossary ones as I am still unsure how to handle them.
	(html_engine_pop_color): Removed.
	(All functions): Updated to use these new color stack functions.
	Also, use `gdk_color_parse()' instead of
	`html_engine_set_named_color'.

	* htmlengine.h (html_painter_set_background_color): Removed
	prototype (what the hell is this doing here!?).

	* htmllinktext.c (html_link_text_init): New parameter `color'.
	(html_link_text_new): New parameter `color'.

	* htmltextslave.c (draw): Set the color using
	`html_text_get_color()'.

	* htmltext.c (html_text_init): New parameter `color', to
	initialize the `color' member.  Alos, set `color_allocated' to
	FALSE.
	(html_text_new): New parameter `color'.
	(get_color): New function, default implementation for
	`HTMLText::get_color'.
	(html_text_get_color): New function.
	(draw): Use it.

	* htmltext.h: New members `color', `color_allocated'.  New virtual
	method `HTMLText::get_color'.

	* htmltable.c (draw): Removed stupid "nonono" message.  :-)

	* htmlengine.c (parse_t): Don't put the a new table in itw own
	HTMLClueFlow anymore: close the current flow, and append to the
	specified clue.

	* htmltextslave.c (calc_size): New function, implementation for
	`HTMLObject::calc_size'.
	(html_text_slave_class_init): Install it.

	* htmlclueflow.c (html_clueflow_get_default_font_style): New
	function.
	(get_default_font_style): Default implementation for
	`HTMLClueFlow::get_default_font_style'; just a stub for now.
	(html_clueflow_class_init): Install it.

	* htmlclueflow.h: New virtual method
	`HTMLClueFlow::get_default_font' to get the font associated with
	the HTMLClueFlow's style.

	* htmlclueflow.h (HTML_CLUEFLOW_CLASS): Fixed (do the correct
	cast).

	* htmltextmaster.c (calc_min_width): Implemented.
	(calc_preferred_width): Implemented.
	(calc_size): New function, implementing `HTMLObject::calc_size'.
	(html_text_master_class_init): Install it.

	* htmltext.c (calc_size): New function, implementation of
	`HTMLObject::calc_size()'.
	(html_text_class_init): Install it.

	* htmltext.c (html_text_get_font_style): New function.
	(get_font_style): Default implementation for
	`HTMLText::get_font_style'.
	(html_text_class_init): Install it.
	(draw): Use it.
	(calc_size): Use it.

	* htmltext.h: New virtual method `HTMLText::get_font_style'.

2000-01-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlobject.h: New arg `painter' in `HTMLObject::calc_size';
	removed arg `parent'.  New arg `painter' in
	`HTMLObject::calc_preferred_width', `HTMLObject::calc_min_width'
	and `HTMLObject::fit_line' as well.
	* htmlclue.c: Updated accordingly.
	* htmlclue.h: Updated accordingly.
	* htmlcluealigned.c: Updated accordingly.
	* htmlcluealigned.h: Updated accordingly.
	* htmlclueflow.c: Updated accordingly.
	* htmlclueflow.h: Updated accordingly.
	* htmlclueh.c: Updated accordingly.
	* htmlclueh.h: Updated accordingly.
	* htmlcluev.c: Updated accordingly.
	* htmlcluev.h: Updated accordingly.
	* htmlengine.c: Updated accordingly.
	* htmlimage.c: Updated accordingly.
	* htmlimage.h: Updated accordingly.
	* htmllinktext.c: Updated accordingly.
	* htmllinktext.h: Updated accordingly.
	* htmllinktextmaster.c: Updated accordingly.
	* htmllinktextmaster.h: Updated accordingly.
	* htmlobject.c: Updated accordingly.
	* htmlobject.h: Updated accordingly.
	* htmlrule.c: Updated accordingly.
	* htmlrule.h: Updated accordingly.
	* htmlstream.c: Updated accordingly.
	* htmltable.c: Updated accordingly.
	* htmltablecell.c: Updated accordingly.
	* htmltext.c: Updated accordingly.
	* htmltextmaster.c: Updated accordingly.
	* htmltextslave.c: Updated accordingly.
	* htmlvspace.c: Updated accordingly.
	* htmlvspace.h: Updated accordingly.

	* htmlpainter.c (html_painter_calc_ascent): New function.
	(html_painter_calc_descent): New function.
	(html_painter_calc_text_width): New function.

	* htmltable.c (find_anchor): Kill unused variable.

	* htmltype.c (html_types_init): Don't call `html_hspace_init()'
	anymore.

	* htmlhspace.c: Removed.
	* htmlhspace.h: Removed.

	* htmlengine.c: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.  Also, we do not hardcode the font and color all the
	time anymore: instead, we let the HTMLClueFlow specify the default
	font.
	(select_font_full): Removed.
	(select_font_relative): Removed.
	(current_font_style): New utility function.
	(push_font_style): New utility function.
	(pop_font_style): New utility function.
	(current_clueflow_style): New utility function.
	(push_clueflow_style): New utility function.
	(pop_clueflow_style): New utility function.
	(close_anchor): No longer pop the font.
	(html_engine_parse): Initialize the font stack with
	`HTML_FONT_STYLE_DEFAULT'.
	(html_engine_select_font): Removed.
	(html_engine_get_current_font): Removed.
	(html_engine_insert_text): Parameter `font' removed.  Always use
	the current font style.
	(new_flow): Removed parameter `style'.  Get the style from the top
	of the ClueFlow style stack using `current_clueflow_style'.
	(block_end_clueflow_style): New function.

	* htmlengine-edit.c (html_engine_insert_para): Use an empty
	HTMLTextMaster element instead of an hspace for the new clue.

	* htmlengine.h: New member `clueflow_style_stack' in `HTMLEngine'.

	* htmltextmaster.c (calc_min_width): Always return 0.
	(calc_preferred_width): Return bogus 100 for now.

	* htmltextmaster.h: Removed members `minWidth', `prefWidth'.

	* htmlclueflow.h: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.
	* htmlclueflow.c: Likewise.

	* htmllinktextmaster.h: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.
	* htmllinktextmaster.c: Likewise.

	* htmllinktext.h: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.
	* htmllnktext.c: Likewise.

	* htmltext.h: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.
	* htmltext.c: Likewise.

	* htmltextmaster.h: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.
	* htmltextmaster.c: Likewise.

2000-01-08  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (draw): Temporarily disabled bullet painting
	code.

	* htmlpainter.c (html_painter_set_font): Removed.
	(html_painter_set_font_style): Replaced by this one.
	(html_painter_get_font): Removed.
	(html_painter_get_font_style): Replaced by this one.
	(html_painter_new): New arg `font_manager', to set the
	`font_manager' member.
	(html_painter_draw_text): Retrieve the font using
	`html_font_manager_get_gdk_font()'.  Also, handle underline and
	strikeout according to the value of the `style' member.

	* htmlpainter.h: Member `font' removed: replaced by `font_style'.
	New member `font_manager', pointer to an HTMLFontManager.

	* htmlfont.c: Removed.
	* htmlfont.h: Removed.

	* htmlengine.c (html_engine_init): Initialize member
	`font_manager'.
	(html_engine_destroy): Destroy the font manager.

	* htmlengine.h: New member `font_manager' in `HTMLEngine'.
	Members `fs', `cs' renamed to `font_stack' and `color_stack',
	respectively.  `bold', `underline', `fontsize' removedq.

	* htmlfontmanager.c: New file.
	* htmlfontmanager.h: New file.

	* htmlpainter.c: Moved some functions around to make the code
	cleaner.
	(html_painter_alloc_color): New function.
	(html_painter_free_color): New function.

2000-01-07  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlfont.c, htmlfont.h: Removed.

	* Makefile.am (libgtkhtml_HEADERS): Added `htmlurl.h'.

	* htmlengine.c (parse_body): Insert vspace instead of creating a
	new flow for every newline in the `<pre>' case.
	(html_engine_new_flow): Removed.
	(new_flow): New function, replaces `html_engine_new_flow'.  It has
	a `style' parameter to specify the HTMLClueFlowStyle for the new
	flow.  Callers updated.
	(parse_p): Inconditionally create a new `HTML_CLUEFLOW_STYLE_P'
	flow for the `<p>' tag.  Always close the current one when you get
	a `</p>' tag.  Likewise with `HTML_CLUEFLOW_STYLE_PRE' and
	`<pre>'/`</pre>'.
	(parse_h): Inconditionally create a new flow of the appropriate
	`HTML_CLUEFLOW_STYLE_H*' style.
	(parse_t): Inconditionally create a new flow.

	* debug.c (clueflow_style_to_string): New helper function.
	(debug_dump_tree): Print the ClueFlowStyle for HTMLClueFlow
	objects using it.  Also, print the text for `HTMLLinkText' and
	`HTMLLinkTextMaster' objects as well.

	* htmlclueflow.c (calc_size): Do not split lines if style is
	`HTML_CLUEFLOW_STYLE_PRE'.
	(calc_min_width): Handle HTML_CLUEFLOW_STYLE_PRE correctly.

	* htmlclueflow.h: Added `HTML_CLUEFLOW_STYLE_PRE'.

2000-01-06  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (key_press_event): Move the cursor forward by the
	number of characters inserted.

	* htmlengine-edit.c (html_engine_insert): Return the number of
	characters actually inserted.

	* htmltextslave.c (draw): Updated to use `HTMLText::text_len'
	instead of `HTMLTextMaster::strLen'.
	(fit_line): Likewise.

	* htmltextmaster.c (fit_line): Updated to use `HTMLText::text_len'
	instead of `HTMLTextMaster::strLen'.
	(split): Likewise.
	(insert_text): Removed.
	(remove_text): Removed.
	(html_text_master_class_init): Updated accordingly.
	(html_text_master_init): Do not initialize `strLen' anymore.

	* htmllinktextmaster.c (split): Updated to use `HTMLText::text_len'
	instead of `HTMLTextMaster::strLen'.

	* htmltextmaster.h: Removed member `strLen'.

	* htmltext.c (insert_text): Return value changed from `void' to
	`guint': return the number of characters actually inserted.  Also,
	make sure there are never two consecutive spaces in the resulting
	string.
	(html_text_insert_text): Updated accordingly.
	(calc_actual_len): New helper function for `insert_text'.
	(copy_collapsing_spaces): New helper function for `insert_text'.
	(html_text_init): Initialize `text_len'.
	(remove_text): Update `text_len'.
	(insert_text): Update `text_len'.

	* htmltext.h: New member `text_len' for storing the text's length.

	* htmlengine.c (parse_h): Do not create a new flow for the rule,
	unless there is no current flow.

	* htmlrule.c (html_rule_new): New parameter `halign'.
	(html_rule_init): Likewise.
	(set_max_width): Always set `width' to `max_width'.
	(draw): Only draw the specified percent of the width, and align
	according to the `halign' value.

	* htmlrule.h: New member `halign'.

	* htmlengine-edit.c (html_engine_insert_para): Do not add an
	`HTMLHSpace' at the end of the paragraph anymore.

	* htmlclueflow.c (html_clueflow_split): Removed HTMLHSpace kludge.

	* htmlvspace.c (accepts_cursor): New function, implementation for
	`HTMLObject::accepts_cursor()'.  Always return `TRUE'.
	(html_vspace_class_init): Install it.

	* htmlclueflow.c: New constant `VERTICAL_PAD'.
	(calc_size): Add `VERTICAL_PAD' to the `ascent' value before the
	size computation and to the `descent' value after it, if the style
	is not that of an itemized list: this pads the HTMLClueFlow
	vertically.

	* htmlimage.c: #include <gdk-pixbuf/gdk-pixbuf.h>.

2000-01-05  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_insert_text): Rewritten to always
	create HTMLTextMasters and no HTMLHSpaces.
	(html_engine_insert_vspace): Do not create a new clueflow for the
	vspace: the vspace will just be at the end of the existing flow.
	(parse_h): Do not put the rule in a new HTMLClueFlow (that's a
	waste!).
	(close_flow): No longer append an hspace.
	(parse_p): Always create a new flow with `html_engine_new_flow()'.

	* htmlfont.c (html_font_equal): New function.

	* htmltextslave.c (split): New helper function.
	(split_at_newline): New helper function.
	(fit_line): Use them.  The TextSlave is now split at the first
	newline character before starting the fit process.

2000-01-06  Jonas Borgström <jonas_b@bitsmart.com>

	* Makefile.am : Moving htmlurl.c from libgtkhtml_SOURCES to testgtkhtml_SOURCES

	* gtkhtml.c : (gtk_html_set_base_url) : removed function, not needed.

	* gtkhtml.h : removed function gtk_html_set_base_url

	* htmlengine.c : Removed ALL use of HTMLURL from htmlengine.c. htmlengine shouldn't do any url handling.

	* htmlengine.h : Removed ALL HTMLURL variables

	* testgtkhtml.c : testgtkhtml.c is now doing ALL url handing, it shouldn't be in htmlengine.c
	
2000-01-06  Jonas Borgström <jonas_b@bitsmart.com>
 
	This adds support for scaling images.
	OBS! You need a fresh gdk_pixbuf from the CVS.

	* htmlimage.h : New members: gboolean scaled and GdkPixbuf *scaled_pixbuf;

	* htmlimage.c : (destroy) : unref scaled_pixbuf if used;
	(html_image_update_scaled_pixbuf) : New function updates the local
	scaled copy of image_ptr->pixbuf
	(html_image_setup) : Set scaled to TRUE if object->width !=
	image_ptr->pixbuf->art_pixbuf->width.
	(html_image_factory_area_updated) : Call
	html_image_update_scaled_pixbuf if scaled.
	(html_image_factory_end_pixbuf) : Call
	html_image_update_scaled_pixbuf if scaled.
	(html_image_factory_register) : Scale the image if necesary if it
	already is loaded.
	
2000-01-05  Jonas Borgström <jonas_b@bitsmart.com>

	[This adds support for references in urls.]
	
	* htmlanchor.c (find_anchor): New function.
	
	* htmlclue.c (find_anchor): New function.
	
	* htmltable.c (find_anchor): New function.

	* htmlengine.c (html_engine_begin): Check if the url wants to view
	a reference on the current page, if so don't load it again, just
	scroll.
	
	(html_engine_goto_anchor): New function. Searches for an anchor
	and scrolls the page.

	* htmlengine.h : Added new member, reference. It is the reference
	html_engine_goto_anchor searches for.

	* htmlimage.c (cleanup_images): Only destroy ptr->pixbuf if it's not NULL.

	* htmlurl.c (html_url_to_string): Add the reference to the string
	also.

	* testgtkhtml.c (entry_goto_url): g_strdup the string from the
	entry.
	(goto_url): Only call gtk_html_parse () When gtk_html_begin
	returns non NULL. Don't call gtk_html_parse when the engine only
	scrolls the page (On a #reference).

2000-01-04  Jonas Borgström <jonas_b@bitsmart.com>

	* htmlengine.c : (parse_b): Added "clear=xxx" support in <br> tags.
	(parse_d): Fixed dt function. 
	http://cvs.gnome.org/bonsai/rview.cgi?root=/cvs/gnome looks better now.
	
	(parse_table): Added support for nowrap argument in <td> tags.
			Now http://www.themes.org looks ok.
	
	(parse_table): Added workaround for bad html in table and form combination, 
		       to make gnome bonsai pages render ok.
	
	(parse_f): With a <form action=> defaults to the current URI.
	
	(html_engine_insert_text): Uses HTMLText instead of HTMLTextMaster with NOWRAP

	* htmlengine.h: New variable gboolean noWrap.

	* htmlurl.[ch] (html_url_dup): New flag HTML_URL_DUP_NOCGIARGS.
		
2000-01-03  Jonas Borgström <jonas_b@bitsmart.com>
	
	* Makefile.am : Added htmlimageinput.c and htmlimageinput.h

	* gtkhtml.c (button_press_event): Call html_engine_mouse_event

	* htmlengine.c (html_engine_mouse_event): New function.
	(parse_input): Added imageinput support.

	* htmltype.[ch]: Added class HTMLImageInput.
	
	* htmlimageinput.[ch]: New files.

2000-01-03  Jonas Borgström <jonas_b@bitsmart.com>

	* Makefile.am : Added htmltextarea and htmlselect
	
	* htmlbutton.c (draw): Removed function.
	
	* htmltextinput.c (draw): Removed function.
	
	* htmlradio.c (draw): Removed function.
	
	* htmlcheckbox.c (draw): Removed function.
	
	* htmlselect.[ch]: New file.

	* htmltextarea.[ch]: New file.

	* htmlelement.c (draw): Added function.

	* htmlengine.c (parse_t): Added <textarea> support.
	
	* htmlengine.h: Added inTextArea and formTextArea.

	* htmltype.[ch]: Added class HTMLTextArea.

	* tests/test9.html: Extended test.

2000-01-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (delete_same_parent): Save the parent before
	destroying the object.

	* htmlclueflow.c (html_clueflow_split): Set tail.

	* htmlengine-edit.c (delete_different_parent): Do not move
	TextSlaves; destroy them instead.

	* htmltext.c (remove_text): Always queue a redraw for the parent.

2000-01-02  Jonas Borgström <jonas_b@bitsmart.com>

	* htmlengine.c (parse_input): Added more support for <input> tag
	
	* htmlbutton.[ch], htmltextinput.[ch], 
	  htmlradio.[ch], htmlcheckbox.[ch],
	  htmlhidden.[ch], htmlform.[ch] and
	  htmlelement.[ch] More frame work.

	* gtkhtml.[ch], htmlengine.[ch]: Added New signal 'submit'

	* testgtkhtml.c: Added submit support.

2000-01-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlfont.c (html_font_calc_width): Made const safe.

2000-01-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_delete): Rewritten in a saner
	way.
	(delete_same_parent): Helper function for `html_engine_delete'.
	(delete_different_parent): Helper function for
	`html_engine_delete'.

	* htmldrawqueue.c (draw_obj): Renamed `x', `y', `width', `height'
	to `x1',`y1', `x2', `y2' so that the names make sense.  Also, clip
	the painting region.

2000-01-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (parse_l): Do not use `indentSize' anymore -- just
	use `listLevel'.

2000-01-02  Jonas Borgström <jonas_b@bitsmart.com>

	* htmlengine.c (parse_input): Added more support for <input> tag
	
	* htmlbutton.[ch] : new files, button form element.

	* htmltextinput.[ch]: New files, textinput form element.
	
	* htmlradio.[ch]: New files, radio form element.
	The radio elements start flickering on mouseover.
	
	* htmlcheckbox.[ch]: New files, checkbox form element.

	* htmlhidden.[ch]: New files, hidden form element.

	* htmlclue.c (destroy): Enabled destroying again.

	* htmllinktextmaster.c: Fixed incorrect parent_class.

	* htmltable.c (destroy): New function, free objects.

	* htmltype.[ch]: Added new classes.
	
	* Makefile.am: Added New files

2000-01-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlanchor.c (set_max_ascent): Do not change the y.  I have no
	idea why this is done, and breaks the layout of anchors.

	* htmlengine.c (html_engine_new_flow): Argh!  It was setting the
	indentation level in an hideous way.  Anyway, it currently simply
	uses the parameter in `html_clueflow_new()'.
	(INDENT_SIZE): Constant removed.  Instead, we increment/decrement
	indentation level by 1, as HTMLClueFlow takes care of using the
	correct raw offset for us now.
	(parse_b): Modified accordingly.
	(parse_d): Likewise.
	(parse_o): Likewise.
	(parse_u): Likewise.
	(parse_l): Instead of doing all the cluev/clueh/clueflow mess,
	just create a clueflow with an itemized style.  Wee!  This
	dramatically reduces the complexity of the code and the overhead
	of itemized lists in the tree.
	(to_roman): Removed.

	* htmltext.c (remove_text): Actually return a value, as expected.
	(html_text_remove_text): Likewise.

	* htmlclueflow.c (html_clueflow_init): New parameters `font',
	`style', `level' to initialize the corresponding new members.  Do
	not initialize `curr', `tail', `head' as they are initialized by
	`html_clue_init()' already.
	(html_clueflow_new): New parameters `font', `style' and `level',
	passed to `html_clueflow_init()'.
	(INDENT_UNIT): New constant.
	(set_max_width): Use `level' instead of `indent', by multiplying
	by `INDENT_UNIT'.
	(calc_min_width): Likewise.
	(calc_size): Likewise.
	(calc_preferred_width): Likewise.
	(draw): New function, implementation for `HTMLObject::draw'.  This
	is now necessary to draw the bullets/numbers with style
	`HTML_CLUEFLOW_STYLE_ITEM*'.
	(html_clueflow_class_init): Install it.

	* htmlclueflow.h: New enum `HTMLClueFlowStyle'.  New members
	`font', `level', `style' in `HTMLClueFlow'.  Removed member
	`indent'.

	* htmlobject.h: Do not #include "htmlfont.h" anymore.

2000-01-01  Jonas Borgström <jonas_b@bitsmart.com>

	* htmlengine.c (parse_i): Added support for <input> tag
	(parse_f): Added support for <form> tag
	(parse_input): New function
	
	* htmlengine.h: Added new members form and formList

	* htmlform.c: New file, initial form support
	* htmlform.h: New file.
	
	* testgtkhtml.c: Added test9.html.
	
	* test9.html: New form test.

	* Makefile.am: Added htmlform.c and htmlform.h

1999-12-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (calc_size): Set `o->y' as for some reason it
	does not work without it.  I have to find out what this is exactly
	for.

1999-12-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (close_flow): Avoid segfault if there is no prev.

1999-12-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (html_clueflow_init): Removed parameters `x',
	`y', `max_width', `percent'.  I have no idea why they are here
	actually.
	(html_clueflow_new): Likewise.  All callers updated.

	* htmlengine-edit.c (html_engine_delete): Merge the next clueflow
	with the current one if deleting at the end of the flow itself.
	This does not completely work yet; I have to fix some stuff in the
	way the tree is generated first.

	* htmlengine.c (parse_m): Made local variable `content' const
	correct.

	* htmlclue.c (html_clue_remove): New function.
	(html_clue_prepend): Doc'ed and added preconditions.
	(html_clue_append): Likewise.

	* htmltext.c (remove_text): Return the number of characters
	actually deleted.
	(html_text_remove_text): Likewise.
	* htmltextmaster.c (remove_text): Updated accordingly.

1999-12-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_insert_para): Inserting a
	paragraph at the beginning of a paragraph correctly results in an
	empty paragraph now.

	* htmlclueflow.c (html_clueflow_split): Deal with splitting at the
	head of the clue correctly.
	(calc_size): Consider the object's height even if at the left
	margin.  I am not sure this is correct fix, but I don't see the
	reason for not doing it this way, and the previous code did not
	handle a hspace alone in a clueflow as expected.

1999-12-30  Jonas Borgström <jonas_b@bitsmart.com>

	* htmlengine.c (parse_m): Added support for META refresh
	
	* htmlengine.[ch] (redirect): New signal
	
	* gtkhtml.[ch] (redirect): New signal

	* testgtkhtml.c (on_redirect): New function, support for META redirection.

1999-12-30  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlobject.c (destroy): Do not deal with the font anymore.

	* htmlobject.h: Removed member `font' from `HTMLObject'.  Bleargh.
	This was truly awful and caused a lot of confusion in the code (as
	`HTML_{TEXT,HSPACE} (obj)->font' was used and `obj->font' was
	always NULL).  It also wasted 4 bytes per object just for nothing.

	* htmltext.c (html_text_init): Precondition: the font pointer must
	not be NULL.

	* htmllinktext.c (split): New function, implementation for
	`HTMLText::split'.
	(html_link_text_class_init): Install it.

	* htmllinktextmaster.c (split): New function, implementation for
	`HTMLText::split'.
	(html_link_text_master_class_init): Install it.

	* htmltextmaster.c (split): New function, implementation for
	`HTMLText::split'.
	(html_text_master_class_init): Install it.

	* htmltext.c (html_text_split): New function.
	(split): New function, default implementation for
	`HTMLText::split()'.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `split'.

	* htmlclue.c (html_clue_prepend): New function.
	(html_clue_append_after): New function.

	* htmllinktextmaster.c (html_link_text_master_init): Removed
	parameter `painter'.
	(html_link_text_master_new): Likewise.

	* htmlclue.c (html_clue_append): Set the child's `next' pointer to
	NULL.

	* htmltextmaster.c (html_text_master_init): Removed parameter
	`painter'.
	(html_text_master_new): Likewise.

	* htmltext.c (html_text_init): Removed parameter `painter'.
	(html_text_new): Likewise.

	* htmlhspace.c (html_hspace_init): Removed parameter `painter'.
	(html_hspace_new): Likewise.

	* htmlclue.c (html_clue_split): New function.

	* htmlobject.c (html_object_set_parent): Allow setting a NULL
	parent.

	* htmlcursor.c (forward): Never put the cursor after the last
	character of the text.
	(backward): Likewise.

	* htmlengine.c: Moved helper functions on top.
	(close_flow): New helper function for closing the current
	ClueFlow.
	(block_end_pre): Use it.
	(html_engine_insert_vspace): Use it.
	(block_end_list): Use it.
	(block_end_indent): Use it.
	(parse_b): Use it.

	* htmlhspace.c (draw): Call `HTMLObject::draw()' so that we can
	have the cursor on this.
	(accepts_cursor): New function, implementation for
	`HTMLObject::accepts_cursor()'.
	(html_hspace_class_init): Install it.
	(html_hspace_init): Set the width to 1 if the hspace is invisible.

	* htmlengine.c (html_engine_end): Move the cursor to the home
	position only if the engine is in the editable state.

1999-12-29  Ettore Perazzoli  <ettore@helixcode.com>

	* htmldrawqueue.c (html_draw_queue_flush): Destroy the object
	(without drawing it) if it has `free_pending' true.

	* htmlobject.c (destroy): If the object has a redraw pending, do
	not `g_free()' it; instead, set `free_pending' to `TRUE'.
	(html_object_init): Set `free_pending' to `TRUE'.
	(html_object_destroy): If `free_pending' is true, just `g_free()'
	the object instead of calling the `destroy' method.

	* htmlobject.h: New member `free_pending' in `HTMLObject'.

	* gtkhtml.c (key_press_event): Handle `GDK_BackSpace' by moving
	the cursor to the left and then, if the movement was successful,
	deleting to the right.

	* htmlengine-edit.c (html_engine_move_cursor): Return value
	changed to `guint': return the number of movement actions actually
	taken.  Also, I cleaned up the code a bit.

	* htmlcursor.c (forward): Return value type changed to `gboolean':
	return TRUE if the movement was successful, FALSE otherwise.
	(backward): Likewise.
	(html_cursor_forward): Likewise.
	(html_cursor_backward): Likewise.
	(html_cursor_up): Likewise.
	(html_cursor_down): Likewise.
	(backward): If the cursor is in a NULL position at the beginning
	of the call, move it home.  (Temporary, but consistent with what
	the other cursor movement functions do.)

	* htmlengine-edit.c (queue_draw_for_cursor): Queue the draw even
	if we are not on a text element.

	* htmlcursor.c (next): Removed debugging messages.
	(debug_location): New function to print the cursor position on the
	HTML tree for debugging purposes.
	(html_cursor_home): Use it.
	(html_cursor_forward): Likewise.
	(html_cursor_backward): Likewise.
	(html_cursor_up): Likewise.

	* htmlrule.c (accepts_cursor): New function, implementation of
	`HTMLObject::accepts_cursor'.  This returns TRUE so that you can
	now put the cursor on a rule.
	(html_rule_class_init): Install it.
	(draw): Call `HTMLObject::draw()' so that the cursor is drawn when
	on the rule.  Also, fixed the out-of-area check.

	* htmlcursor.c (forward): Use `html_object_accepts_cursor()'.
	(backward): Likewise.
	(html_cursor_up): Deal with non-HTMLText objects.
	(html_cursor_down): Likewise.

	* htmltext.c (accepts_cursor): New function, implementation of
	`HTMLObject::accepts_cursor'.
	(html_text_class_init): Install it.

	* htmlobject.c (html_object_accepts_cursor): New function.
	(accepts_cursor): New function, default implementation for the
	`accepts_cursor' virtual method.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `accepts_cursor'.

	* htmlengine.c (html_engine_get_type): Removed prototype here.
	* htmlengine.h (html_engine_get_type): Moved here.

	* htmlengine-edit.c (queue_draw_for_cursor): Use
	`html_object_is_text()'.
	(html_engine_insert): Likewise.

	* htmlcursor.c (is_text): Removed.
	(forward): Use `html_object_is_text()' instead.
	(backward): Likewise.

	* htmlobject.c (html_object_is_text): New function.  Ugliest thing
	on Earth, but cheap and working for now.

	* htmlengine-edit.c (html_engine_delete): Added precondition:
	check that `e' is an HTMLEngine.
	(html_engine_insert): Likewise.

	* htmlengine.h (IS_HTML_ENGINE): Renamed to `HTML_IS_ENGINE'.
	(IS_HTML_ENGINE_CLASS): Renamed to `HTML_IS_ENGINE_CLASS'.
	(TYPE_HTML_ENGINE): Renamed to `HTML_TYPE_ENGINE'.

1999-12-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlpainter.c (html_painter_draw_cursor): Fix the cursor height:
	it was one pixel too high.

	* htmlobject.c (html_object_calc_abs_position): Take account for
	the ascent.

	* gtkhtml.c (idle_handler): Make cursor visible.

	* htmlengine.c (html_engine_make_cursor_visible): New function.

	* gtkhtml.c (key_press_event): Handle `GDK_Delete' and
	`GDK_KP_Delete'.

	* htmlengine-edit.c (html_engine_delete): New function.

	* htmltextmaster.c (remove_text): New function, implementation for
	the `remove_text' method.
	(html_text_master_class_init): Install it.

	* htmltext.c (html_text_insert_text): Added precondition on
	parameter `engine'.
	(html_text_remove_text): New function.
	(remove_text): New function, default implementation for the
	`remove_text' method.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `remove_text'.

	* htmlobject.c (html_object_calc_abs_position): Actually use local
	variable `p'.

	* htmlcursor.c (forward): New helper function.
	(html_cursor_forward): Use it.  Added preconditions.
	(backward): New helper function.
	(html_cursor_backward): Use it.  Added preconditions.
	(html_cursor_up): Set the target X value before anything else, to
	make sure it is always set correctly.  Use `backward()' instead of
	`html_cursor_backward()'.
	(html_cursor_down): Likewise.  Use `forward()' instead of
	`html_cursor_forward()'.
	(html_cursor_new): Initialize `have_target_x' to FALSE, not TRUE.

	* htmltextmaster.c (calc_char_position): Make sure the coordinates
	are always calculated.

	* htmltextslave.c (fit_line): Destroy the next object instead of
	just `g_free()'ing it.  Do not kill the space between the various
	TextSlaves: instead, keep it at the end of the slave.

	* htmlengine-edit.c (queue_draw_for_cursor): Do nothing if the
	pointer to the current object is NULL.

	* htmlurl.c (concat_dir_and_file): Made static.

	* testgtkhtml.c (netin_stream_free): Call `gtk_html_end()' again.
	It does not seem to cause crashes anymore.

	* htmldrawqueue.c (draw_obj): Removed debugging message.

	* gtkhtml.c: Do not #include <stdio.h> anymore.
	(html_engine_draw_pending_cb): Removed debugging message.

	* htmlcursor.c (html_cursor_forward): Skip TextMaster-derived
	objects.

	* gtkhtml.c (key_press_event): Handle `GDK_Up' and `GDK_Down'.

	* htmlengine-edit.c (html_engine_move_cursor): Handle
	`HTML_ENGINE_CURSOR_UP' and `HTML_ENGINE_CURSOR_DOWN'.

	* htmlcursor.c (html_cursor_new): Init `target_x',
	`have_target_x'.
	(html_cursor_equal): New function.
	(html_cursor_up): New function.
	(html_cursor_down): New function.
	(html_cursor_forward): Set `have_target_x' to FALSE.
	(html_cursor_backward): Likewise.

	* htmlcursor.h: New members `target_x', `have_target_x' in
	`HTMLCursor'.

	* htmlobject.c (html_object_calc_abs_position): New function.

	* htmltextmaster.c (calc_char_position): Implementation of the
	`HTMLText::calc_char_position' method.
	(html_text_master_class_init): Install it.

	* htmltext.c (html_text_calc_char_position): New function.
	(calc_char_position): Default implementation for the
	`calc_char_position' method.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `calc_char_position'.

1999-12-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltext.c (insert_text): Relayout the parent instead of just
	this text.

	* htmlobject.c (relayout): Set the X/Y position manually if this
	is the toplevel object.  Ugly, but there is no way around it for
	now.

1999-12-23  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_move_cursor): Queue a redraw for
	the cursor.

	* htmltextmaster.c (queue_draw): New function, implementation for
	the `queue_draw' method.
	(html_text_master_class_init): Install it.

	* htmltext.c (html_text_queue_draw): New function.
	(queue_draw): Default implementation for the `queue_draw' method.
	(html_text_class_init): Install it.
	(insert_text): Queue a draw if the parent did not change after
	relayout (and consequently did not queue a draw for itself).

	* htmltext.h: New virtual method `queue_draw'.

	* htmlclueflow.c (calc_size): Do not assign `o->y' anymore.  I am
	not 100% sure that this does not break anything, but at the same
	time I don't see any reason why the y value should be set here.
	So if this breaks, probably it means that something is broken
	somewhere else.

	* htmlcluev.c (calc_size): Replaced hideous binary shift with a
	multiplication.

        [1999-12-22]

	* htmlfont.c (create_gdk_font): `family' made const.
	(html_font_new): Removed unused variable.
	(create_gdk_font): Removed unused variable.

	* htmlcursor.c: #include "htmlclue.h".

	* htmlobject.h: Moved all the typedefs on top, before the #include
	section.

	* htmltext.c (html_text_insert_text): New parameter `engine'.
	(insert_text): New parameter `engine'.  Queue a redraw for the
	object.

	* htmltext.h: New parameter `engine' in method `insert_text'.

	* htmlobject.c (html_object_relayout): New argument `engine'.
	(relayout): New argument `engine'.  Queue a redraw for the object
	if the size changes and the object has no parent, or if the size
	changes and the parent's size does not change.

	* htmlobject.h: New argument `engine' in method `relayout'.

	* htmlengine.c (html_engine_queue_draw): New function.

	* htmlengine-edit.c (html_engine_move_cursor): Do not redraw
	everything.

	* htmlcursor.c (html_cursor_backward): Removed debugging message.
	(html_cursor_forward): Removed debugging message.

	* gtkhtml.c (html_engine_url_requested_cb): First argument
	corrected from `GtkHTML' to `HTMLEngine'.
	(html_engine_draw_pending_cb): New function.
	(gtk_html_new): Connect it to the "draw_pending" signal of the
	HTMLEngine.

	* htmlengine.c: New signal `draw_pending'.
	(html_engine_class_init): Install it.

	* htmlengine.h: Type of first argument in the `url_requested'
	method corrected from `GtkHTML' to `HTMLEngine'.  New signal
	`draw_pending'.

	* gtkhtml.c (idle_handler): New function, flushing the engine's
	draw queue.
	(init): Init it.
	(destroy): Remove pending idle handler.
	(queue_draw): New utility function installing the idle handler.

	* htmlengine.c (html_engine_flush_draw_queue): New function.

	* gtkhtml.h: New member `idle_handler_id' in `GtkHTML'.

	* gtkhtml.c (destroy): Call the parent class' `destroy' method.

	* htmlengine.h: New member `draw_queue' in `HTMLEngine'.
	* htmlengine.c (html_engine_init): Init it.
	(html_engine_destroy): Destroy it.

	* gtkhtml.c: Cleaned up a bit.

	[1999-12-21]

	* htmllinktext.c (html_link_text_new): Use `g_print' instead of
	`printf' for debugging messages.

	* htmltext.c (draw): Removed debugging mesasge.

	* htmlobject.h: New member `redraw_pending' in `HTMLObject'.
	* htmlobject.c (html_object_init): Initialize it to FALSE.

	* htmldrawqueue.c: New file.
	* htmldrawqueue.h: New file.

	* htmltextslave.c (draw): Draw the cursor if it's in the owner,
	instead of the slave.

	* htmlcursor.c (html_cursor_forward): Move on the masters instead
	of the slaves.  The slaves are not a good place for anchoring the
	cursor, as they can be destroyed/recreated without the cursor's
	control.
	(html_cursor_backward): Likewise.

	[1999-12-20]

	* htmlengine.c (html_engine_insert_text): `str' made const.
	`g_strdup()' strings before passing to the text object creation
	functions.

	* htmltextmaster.c (insert_text): New HTMLTextMaster-specific
	implementation for the `insert_text' virtual method.
	(html_text_master_class_init): Install it.

	* htmltext.c (insert_text): Make the text pointer point to the new
	buffer.

	* testgtkhtml.c (main): Removed unused variables.

	* gtkhtml.c (key_press_event): If we are given a nonempty string,
	insert it and move the cursor to the right.

	* htmltext.c (insert_text): Relayout parent.
	(html_text_class_init): Install `insert_text' as the default
	implementation for the `insert_text' method.

	* htmlengine-edit.c (html_engine_cursor_move): Renamed to
	`html_engine_move_cursor'.
	(html_engine_insert_text): New function; not quite finished yet.

	* htmlengine-cursor.c: Renamed to `htmlengine-edit.c'.
	* htmlengine-cursor.h: Renamed to `htmlengine-edit.h'.

	* htmlengine.h: Member `show_cursor' in `HTMLEngine' renamed to
	`editable'.

	* htmlengine.c (html_engine_show_cursor): Renamed to
	`html_engine_set_editable'.

	* htmlobject.c (html_object_relayout): New function.
	(relayout): Default implementation for `relayout'.
	(html_object_class_init): Install it.

	* htmlobject.h: New method `relayout'.

	* htmltextmaster.c (htmL_text_master_get_slave): New function.

	* htmltext.c: Make the `insert_text' method get an integer offset
	instead of a pointer to an `HTMLCursor' object.
	(html_text_insert_text): Updated accordingly.

	[1999-12-13]

	* htmlobject.c (html_object_check_point): Removed debugging code.
	(html_object_draw): Removed debugging code.

1999-12-20  Ariel Rios  <jarios@usa.net>

	* gtkhtml.h: (gtk_html_stream_unref): Moved
	  from gtkhtm-private.h as per Elliot's 
	  recomendation.
	  (gtk_html_stream_ref): Ditto.
	  
	* gtkhtml-private.h:(gtk_html_stream_unref) The function
	  header was moved unto gtkhtml.h
	  (gtk_html_stream_ref) Ditto.

1999-12-19  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmlurl.c (html_url_append_path): Strip cgi args
	
1999-12-15  Ariel Rios <jarios@usa.net>
	
          Contributed by Marius Vollmer.

	* gtkhtml-private.h: Add ref_count element in GtkHTML struct.
	(gtk_html_stream_unref): New prototype.
	(gtk_html_stream_ref): New prototype.
	  These two functions would maintain a reference count on a
	  GtkHTMLStream handle so that the struct would only be freed when the
	  ref count reaches zero. gtk_html_stream_new would return a stream
	  with ref_count == 1 and gtk_html_stream_end would flag the stream as
	  terminated and call gtk_html_stream_unref; gtk_html_stream_write
	  would recognize a terminated stream.

	* htmlstream.c (gtk_html_stream_unref): Added.
	(gtk_html_stream_ref): Added.
	(gtk_html_stream_new): Added declararion of new ref_count element.
	(gtk_html_stream_write): Instead of g_freeing the stream here, we
	set write_callback and end_callback as NULL. Then we call
	gtk_html_stream_unref to g_free the handle.

1999-12-15  Havoc Pennington  <hp@redhat.com>

	* gtkhtml.c (gtk_html_realize): Add button press/release to the
	event mask so we get link clicks

1999-12-15  Havoc Pennington  <hp@redhat.com>

	* htmlurl.c (html_url_new): put in a phony path if we return
	because the path string has length 0

1999-12-15  Havoc Pennington  <hp@redhat.com>

	* testgtkhtml.c (main): remove explicit adjustment-setting

	* gtkhtml.c (gtk_html_new): no adjustment args, don't init the
	adjustment fields. This causes Breakage but it's necessary
	probably (and approved by Anders)

	* htmlurl.c (html_url_new): Put in a warning if an HTMLURL with
	NULL path is returned, this is a bug that needs fixing
	(html_url_append_path): put in an assertion that url->path != NULL

1999-12-15  Havoc Pennington  <hp@pobox.com>

	* gtkhtml.c (gtk_html_set_adjustments): zero the connection ID
	if we don't fill it in, avoids a warning message.

1999-12-14  Havoc Pennington  <hp@pobox.com>

	* gtkhtml.c (gtk_html_new): Use
	gtk_widget_set_scroll_adjustments() to set the adjustments
	(gtk_html_class_init): install a scroll adjustments handler
	(gtk_html_set_adjustments): implement this - it connects to the
	adjustments.
	(gtk_html_class_init): add destroy handler

	* gtkhtml.h: add fields to store adjustment connections

1999-12-13  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (gtk_html_size_allocate): Do not call
	`html_engine_calc_absolute_pos' anymore.

	* htmlengine.c (html_engine_calc_absolute_pos): Removed.
	(html_engine_update_event): Do not call it anymore.

	* htmltable.c (calc_absolute_pos): Removed.
	(html_table_class_init): Do not install anymore.

	* htmlclue.c (calc_absolute_pos): Removed.
	(html_clue_class_init): Do not install anymore.

	* htmlobject.c (html_object_init): Do not initialize `abs_x',
	`abs_y' anymore.
	(calc_absolute_posi: Removed.
	(html_object_class_init): Do not install anymore.
	(html_object_calc_absolute_pos): Removed.

	* htmlobject.h: Remove `abs_x', `abs_y'.  Removed
	`calc_absolute_pos' virtual function.

1999-12-12  Miguel de Icaza  <miguel@helixcode.com>

	* htmlengine.c (draw_background): Removed the clipping from here,
	it fixes the double buffering problems.

	* htmlfont.c (create_gdk_font): Fixed memory leaks.

1999-12-12  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (gtk_html_init): Use `GDK_HAND2' and `GDK_LEFT_PTR' as
	the hand/arrow cursors.

	* htmltext.c (html_text_insert_text): New function.
	(insert_text): New function.

	* htmltext.h: New virtual method `insert_text'.

	* htmlurl.c (html_url_destroy): Added precondition.

	* gtkhtml.c (gtk_html_set_geometry): Removed unused function.

	* htmlpainter.c (html_painter_set_font): Destroy the existing
	font, duplicate the new one.

	* htmlfont.c (html_font_destroy): Do not unref the GdkFont if
	NULL.
	(html_font_dup): New function.

	* testgtkhtml.c (title_changed_cb): Removed debugging message.
	Also, free memory returned by `g_strdup_printf()'.

	* htmltable.c (calc_col_info): Free existing row information
	before allocating new.
	(html_table_init): Make sure all the members are initialized.

1999-12-12  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmlurl.c (html_url_to_string): html_url_to_string produced
	incorrect urls on url with a port number.
	
	* htmlengine.c (parse_i): Modified the image loading a bit.

1999-12-12  Jonas Borgström  <jonas_b@bitsmart.com>

	* testgtkhtml.c (on_stop): Delete all requests.
	(goto_url): Delete requests.

1999-12-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextslave.c (fit_line): Set `prev' on the next, if any.

	* gtkhtml.c (key_press_event): Move left too.

	* htmlcursor.c (html_cursor_backward): Implemented.
	(prev): Removed.

1999-12-12  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmlengine.c (parse_table): Added support for backgrounds in tables.
	(parse_href): Better handling of "" hrefs.

	* htmlimage.c (html_image_factory_register(): Insert url into list
	before emitting signal.

	* htmlpainter.c (html_painter_draw_background: Added two
	parameters, pix_width, pix_height.

	* htmltablecell.c (draw): Added support for backgrounds:
	http.//www.themes.org looks great now :)
	(html_table_cell_set_pixmap): New function.

1999-12-12  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c (on_link_followed): New function.
	(main): Instead of connecting `on_button_release_event' to the
	"button_release_event" signal, connect `on_link_followed' to
	"link_followed".
	 (on_button_release_event): Removed.

	* gtkhtml.c: `link_followed' signal renamed to `link_clicked'.
	(gtk_html_button_press_event): New function.  Not doing anything
	for now.
	(gtk_html_button_release_event): New function.  Emit
	"link_clicked" on button release if the pointer is on a URL.
	(gtk_html_class_init): Install them as the "button_press_event"
	and "button_release_event" implementations.

1999-12-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextslave.c (fit_line): Do not assign to `next_obj->prev' if
	`next_obj' is NULL.

1999-12-11  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmlengine.c (html_engine_set_base_url): New function
	(parse_s): New function, added support for <small> and </small>
	(html_engine_begin): set newPage = TRUE
	(html_engine_update_event): Scroll page to top if newPage is set.

	* htmlengine.h:(html_engine): new member newPage
	
	* gtkhtml.c (gtkhtml_set_base_url): New function

	* testgtkhtml.c (main): Add a default filter callback (request_terminater).
	(request_terminater): New function. Terminates requests.
	(url_requested): Adds filters for 4 different redirections.
			 Redirections are now handled properly.
	(redirectFilter): New function. calls gtk_html_set_base_url on redirection.
	
	* htmlurl.c (html_url_new): if path == NULL set it to "/"
	(html_url_append_path) Cut the path at the first '/' from the right.
	
1999-12-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextslave.c (fit_line): Update the `prev' pointer.

	* htmltextmaster.c (fit_line): Update the `prev' pointer.

	* htmlclue.c (html_clue_append): Set the `prev' pointer as well.

	* htmlobject.c (html_object_init): Initialize it.

	* htmlobject.h: New member `prev' in `HTMLObject'.

	* htmlcursor.c (html_cursor_backward): New function, does nothing for now.

1999-12-11  Matt Wilson  <msw@redhat.com>

	* htmlurl.c (html_url_append_path): removed dependency on
	gnome by re-implementing g_concat_dir_and_file

1999-12-11  Elliot Turner  <turnere@MimeStar.com>

	* htmlengine.c (parse_m): New function to deal with the `meta'
	tag.
	(parse_table): Remove tmpCell stuff that resulted in random
	segfaults.
	(parse_i): Don't set the parent in the ClueAligned object in
	advance.
	(parse_table): Likewise.

1999-12-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcursor.c (html_cursor_forward): Some navigation fixes.

	* debug.c (debug_dump_tree): Print out the value of the parent
	pointer too.

	* htmltextslave.c (fit_line): Set the parent on the slave.

	* htmltextmaster.c (fit_line): Set the parent on the slave.

	* htmltextslave.c (draw): Draw the cursor if the cursor is here.

	* htmltext.c (draw): Draw the cursor if the cursor is here.

	* htmlobject.c (draw): Draw the cursor if the cursor is here.

	* htmlobject.h: New argument `cursor' in the `draw' method.  All
	of the related functions updated accordingly.

	* htmlengine-cursor.h, htmlengine-cursor.c: New files.

	* gtkhtml.c (key_press_event): New function, implementation for
	the `key_press_event' virtual method.
	(gtk_html_realize): Removed double realization.  Also, add
	`GDK_KEY_PRESS_MASK' and `GDK_KEY_RELEASE_MASK' to the event mask
	for the bin window.

	* htmltext.c (draw_cursor): New function, implementation of the
	`draw_cursor' virtual method.
	(html_text_class_init): Install it.

	* htmlpainter.c (html_painter_draw_cursor): New function.

	* htmlcursor.c (html_cursor_forward): New function to make the
	cursor go forward on the tree.

	* testgtkhtml.c: Big hack to at least make the stop button really
	stop loading.  Something is still wrong, though, as we get no
	callback when the input stream ends.  Help is welcome.  So, there
	is a new local variable called `html_handle' to hold the main html
	stream handle.
	(goto_url): Initialize it with the return value from
	`gtk_html_begin'.
	(stop_cb): Stop the stream and set `html_handle' to NULL.

	* htmlengine.c (html_engine_end): Position the cursor at the
	beginning of the document.

	* htmlcursor.c (html_cursor_home): New function to position the
	cursor at the beginning of the document.

1999-12-10  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcursor.c (html_cursor_destroy): Added precondition.

	* htmlengine.h (html_engine_get_doc_width): Added prototype.

	* htmlengine.c (parse_body): Add cast to `html_clue_append' call.

	* htmlpainter.h: New member `black' in `HTMLPainter', holding the
	GdkColor for black.
	* htmlpainter.c (html_painter_realize): Allocate it.

	* htmlengine.c (draw_cursor): New function.
	(html_engine_parse): Set the cursor to point at the first clue.

	* htmlpainter.c (html_painter_draw_line): New function.

	* htmlengine.h: New members `cursor', `show_cursor' in `struct
	HTMLEngine'.
	* htmlengine.c (html_engine_init): Init them.
	(html_engine_destroy): Destroy the cursor.

1999-12-11  Anders Carlsson  <andersca@gnu.org>

	* htmlengine.c (parse_body): Add a handler for the '\n' tag
	that's used for newlines in <pre>...</pre>

1999-12-11  Anders Carlsson  <andersca@gnu.org>

	* testgtkhtml.c (main): Set policy to only show scrollbars when needed.

	* gtkhtml.c (gtk_html_calc_scrollbars): use gtk_layout_set_size ();

1999-12-11  Anders Carlsson  <andersca@gnu.org>

	* testgtkhtml.c (main): Use a scrolled window instead of
	a scroll bar.

	* gtkhtml.c (gtk_html_horizontal_scroll): Added function.
	(gtk_html_new): Connect signal to function.
	(gtk_html_calc_scrollbars): Calculate adjustment for horizontal
	scrollbar as well.

	* htmlengine.c: Added functions for calculating document width

1999-12-10  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.h (html_engine_draw_background): Removed prototype.

	* htmlengine.c (html_engine_show_cursor): New function.
	(html_engine_init): Initialize `show_cursor' to TRUE.
	(html_engine_draw_background): Made static and renamed to
	`draw_background'.
	(html_engine_draw): Updated accordingly.

	* htmlengine.h: New flag `show_cursor' in `struct HTMLEngine'.

	* htmlcursor.c, htmlcursor.h: New files.

1999-12-10  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmlengine.c (parse_i): Do not pass NULL pointer to
	html_url_to_string.
	
1999-12-10  Ettore Perazzoli  <ettore@helixcode.com>

	* All files: updated to match these changes.

	* htmlclue.c (html_clue_append): Set the parent of the object to
	this one.

	* htmlobject.h: New member `parent' in `HTMLObject'.
	* htmlobject.c (html_object_init): Set it to NULL.
	(html_object_set_parent): New function.

1999-12-10  Jonas Borgström  <jonas_b@bitsmart.com>

	* gtkhtml.c (gtk_html_begin): Scroll page to the top on new url
	
	* htmltokenizer.c (html_tokenizer_write): Fixing parsing of entity.
	
	* htmlentity.c (html_entity_parse): Corrected function.
	
1999-12-09  Miguel de Icaza  <miguel@gnu.org>

	* htmlpainter.c (html_painter_draw_pixmap): fix the offsets.

1999-12-09  Anders Carlsson  <andersca@gnu.org>

	* htmltable.c (draw): Doh! Fixed a silly bug where
	it checked c against totalRows, changing to r reallly
	speeded up test6.html

1999-12-09  Jonas Borgström  <jonas_b@bitsmart.com>

	* htmlengine.c (parse_a, parse_b, parse_i): Send Absolute urls to
	images.

	* testgtkhtml.c: New Features:
	  * Follow links with mouse click works now.
	  * Implemented Back, Forward, Reload, Home.
	  * Added popup menu (Back, Forward, Home)
	  * Added Go menu (Back, Forward, Home and History list)
	  * Added Wheel mouse scrolling support.
	  * Prepend "http://" To urls if needed.
	  
	* htmlurl.c (html_url_append_path): Fixed correct url handling.

1999-12-08  Miguel de Icaza  <miguel@gnu.org>

	* htmlpainter.c (html_painter_end): Another off-by one error fix.
	(html_painter_draw_panel): Adapt this routine to use the double
	buffering scheme
	(html_painter_draw_background_pixmap): Ditto.

	* htmlurl.c (html_url_append_path): Memory leak fix, and crash fix.

	* htmlpainter.c (html_painter_end): Fix off by one error.
	(html_painter_new): Double buffering is now the default.
	(html_painter_draw_pixmap): Remove soptimization to fix image repainting.
	(html_painter_draw_pixmap): Use proper API.  

1999-12-07  Ettore Perazzoli  <ettore@gnu.org>

	* htmlurl.c (scan_user_and_password): Renamed to `scan_host_info'.
	Do the right thing with URLs that do not have a slash after the
	host name (e.g. because there is no path).

	* htmlengine.c (parse_href): Do the right thing with
	duplicating/changing the HTMLURL structs.

1999-12-06  Ettore Perazzoli  <ettore@gnu.org>

	* testgtkhtml.c (on_url): Removed unused variable.
	(url_requested): Made `ctmp' const.

	* htmltype.c: #include "htmlanchor.h".

	* htmlobject.c (html_object_check_point): Removed unused variable.

	* gtkhtml.c (gtk_html_set_geometry): `#if 0'ed out as currently
	unused.

	* htmlengine.h: Changed type of `url' to `HTMLURL'.
	* htmlengine.c: All functions changed accordingly (i.e. to use
	`HTMLURL' internally, instead of `gchar *').

	* htmlengine.c (parse_href): New function for dealing with links
	properly (i.e. handling relative ones etc.).
	(parse_a): Use it.

	* htmlengine.h: New member `actualURL' in `HTMLEngine'.
	* htmlengine.c (html_engine_begin): Set it.
	(html_engine_init): Init it to NULL.
	(html_engine_destroy): Free it.

	* htmlurl.c: New file.
	* htmlurl.h: New file.

	* htmlfont.c (html_font_new): Made prototype const-safe.

	* htmlpainter.h (html_painter_draw_panel): New function prototype.

	* htmlclue.h (html_clue_append_left_aligned): Added missing prototype.

	* htmltokenizer.c (html_tokenizer_write): Parse the entity with
	`html_entity_parse()'.

	* htmlentity.c, htmlentity.h: New files dealing with entity.
	(html_entity_parse): New function.

	* htmlengine.c (parse_i): Use the current URL and target for the
	new image.

	* htmlimage.c (html_image_init): New parameters `url', `target'.
	(html_image_new): Likewise.

	* htmlimage.h: New members `url' and `target' in `HTMLImage'.

1999-12-03  Ettore Perazzoli  <ettore@gnu.org>

	* testgtkhtml.c (do_request_delete): Do not delete the request.  I
	am not sure if it's supposed to be necessary or not, but it does
	cause crashes.

	* htmlengine.c (parse_b): Oops, fix the `gtk_signal_emit()' calls.

	* htmlobject.c (html_object_get_url): Removed debugging message.

	* gtkhtml.c (gtk_html_motion_notify_event): Keep track of the
	current URL through `pointer_url'.  Also, emit the signal when the
	current URL changes.

	* testgtkhtml.c: Show usage of the `on_url' signal.

	* htmlimage.c (html_image_factory_register): Set the `stream'
	member to point to the newly created stream.
	(html_image_get_stream): New function returning a pointer to the
	stream object.

	* htmlimage.h: New member `stream' in `HTMLImage'.

	* gtkhtml.c (html_engine_title_changed_cb): New signal handler for
	the `title_changed' signal in the HTMLEngine.
	(html_engine_set_base_cb): Likewise for `set_base'.
	(html_engine_set_base_target_cb): Likewise for `set_base_target'.
	(html_engine_load_done_cb): Likewise for `load_done'.
	(gtk_html_new): Connect the signal handlers to the newly created
	object.
	(gtk_html_motion_notify_event): Don't free the URL we get from
	`html_engine_get_link_at()' anymore.

	* htmlengine.c (html_engine_begin): Emit the
	`url_requested_signal' after creating the stream.

	* htmlstream.c (gtk_html_stream_new): Do not make the GtkHTML
	widget emit any signal!

	* htmlengine.c: `html_engine_signals' renamed to `signals' and
	made static.  Also, added "set_base_target", "set_base",
	"load_done", "title_changed" own signals.
	(parse_b): Make the engine emit signals, not the owner widget.
	(parse_t): Likewise.
	(html_engine_end): Likewise.

	* gtkhtml-private.h: Removed signals from here.
	* gtkhtml.c: Moved here.  Also, changed the name from
	`html_signals' to `signals'.

	* gtkhtml.h, gtkhtml.c: New signal `on_url'.

	* gtkhtml.h: New member `pointer_url' in `GtkHTML'.
	* gtkhtml.c (gtk_html_init): Init it to NULL.
	(destroy): `g_free()' it.

	* gtkhtml.c (gtk_html_motion_notify_event): Updated to the const
	return of `html_engine_get_link_at()'.

	* htmlengine.c (html_engine_get_link_at): Return value made const.
	So, we don't strdup the value from `html_object_get_url()'
	anymore.

	* gtkhtml.c (destroy): New function, implementation of the
	`destroy' method.
	(gtk_html_class_init): Install it.
	(gtk_html_realize): Set the arrow cursor as the initial cursor for
	the new widget.

	* gtkhtml.h: New members `hand_cursor' and `arrow_cursor'.
	* gtkhtml.c (gtk_html_init): Init them.

	* htmlengine.c (html_engine_get_uri_at_pointer): Renamed to
	`html_engine_get_link_at'.
	* htmlengine.h: Updated likewise.
	* gtkhtml.c (gtk_html_motion_notify_event): Updated accordingly.

1999-12-04  Anders Carlsson  <andersca@gnu.org>

	* htmlsettings.c: Fix the correct number of font sizes, it's 7 not 6.

	* htmltable.c (draw): Use html_painter_draw_panel for table borders.

	* htmlpainter.c (html_painter_draw_panel): New function for drawing a
	3d panel.

	* htmlimage.c (draw): Use html_painter_draw_panel for pictures that
	are not yet loaded.

1999-12-03  Ettore Perazzoli  <ettore@gnu.org>

	* htmllinktextmaster.c (html_link_text_master_init): `url' and
	`target' made const.  Strdup before assigning.
	(html_link_text_master_new): Likewise.
	(get_url): Removed debugging message.

	* htmllinktext.c (html_link_text_init): Strdup the URL and the
	target strings.
	(html_link_text_new): Made the `url' and `target' arguments const.
	(html_link_text_init): Likewise.

	* htmltextslave.c (get_url): Implementation of the `get_url'
	virtual method.
	(html_text_slave_class_init): Install it.

	* gtkhtml.c (motion_notify_event): New function, handler for the
	`notify_event' signal.
	(gtk_html_class_init): Install it.

1999-12-04  Anders Carlsson  <andersca@gnu.org>

	* htmlcluev.c (appended): Traverse the aligned list, not the
	regular object tree list. This fixes the slashdot bug (Finally).

1999-12-03  Ettore Perazzoli  <ettore@gnu.org>

	* htmltable.c (check_point): Implementation of `check_point'.
	(html_table_class_init): Install it.

	* htmlcluev.c (check_point): Implementation of `check_point'.
	(html_cluev_class_init): Install it.

	* htmlclue.c (check_point): Implementation of `check_point'.
	(html_clue_class_init): Install it.

	* htmlobject.c (check_point): Default implementation for
	`check_point'.
	(html_object_class_init): Install it.
	(html_object_check_point): New function.
	
	* htmlobject.h: New virtual method `check_point'.

1999-12-03  Ettore Perazzoli  <ettore@gnu.org>

	* htmltable.c (mouse_event): New function, implementing the
	`mouse_event()' virtual method.
	(html_table_class_init): Install it.

	* htmlcluev.c (mouse_event): New function, implementing the
	`mouse_event()' virtual method.
	(html_cluev_class_init): Install it.

	* htmlclue.c (mouse_event): New function, implementing the
	`mouse_event()' virtual method.
	(html_clue_class_init): Install it.

	* htmlobject.c (mouse_event): Default implementation for
	`mouse_event()'.
	(html_object_class_init): Install it.
	(html_object_mouse_event): New function.

	* htmlobject.h: New virtual method `mouse_event()'.

	* htmllinktextmaster.c: The parent class is
	`HTMLLinkTextMasterClass', not `HTMLTextMasterClass'.

	* htmlobject.h: Renamed `ClearType' to `HTMLClearType'; made the
	ids uppercase and prefixed with `HTML_CLEAR_'.  Similiar treatmant
	for `HTMLVAlignType' and `HTMLHAlignType'.  Changed values for
	`HTMLFitType' to be all uppercase and be prefixed with `HTML_FIT'
	as well.  All instances updated.

1999-11-28  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (parse_b): Handle `link=', `vlink=' and `text=' in
	`<body>'.
	(html_engine_init): Allocate `defaultSettings'.
	(html_engine_destroy): Free it.
	(html_engine_parse): AAARGH!  Colors must *never* be allocated
	with `g_new()'!  Anyway, we needed to push the default color, not
	an arbitrary black.
	(html_engine_parse): Allocate colors in the defaultSettings and
	copy to the settings.  Use the settings to set the initial font.
	(parse_a): Color and underline links according to the settings.
	(parse_table): Honour the `forceDefault' flag in the settings.
	(select_font_full): New helper function.
	(parse_c): Use it.  Set the correct font for `<code>'.
	(select_font_relative): New function.
	(parse_h): Use it to deal with header font sizes correctly.
	(parse_t): Use correct font for `<tt>'.
	(parse_p): Use correct font for `<pre>'.

	* htmlengine.h: New member `defaultSettings' in `HTMLEngine'.

	* htmlsettings.c (html_settings_set_font_sizes): New function.
	(html_settings_get_font_sizes): New function.
	(html_settings_reset_font_sizes): New function.
	(HTML_NUM_FONT_SIZES): New constant.
	(html_settings_alloc_colors): New function.
	(html_settings_copy): New function.
	(html_settings_set_fixed_font_face): New function.
	(html_settings_set_font_base_face): New function.

	* htmlsettings.h: Updated `HTMLSettings' to contain all the fields
	in the original KHTMLW code.  `fontbasesize' renamed to
	`fontBaseSize' and `bgcolor' to `bgColor', for consistency.

1999-11-28  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (select_font_relative): Call `html_engine_set_font'
	so that it does not crash.

1999-11-28  Ettore Perazzoli  <ettore@gnu.org>

	* htmlimage.c (draw): Quick hack to always draw the border
	rectangle.

	* htmltablecell.h: Fixed typo in `HTMLTableCellClass'.

	* htmlobject.c (html_object_draw): Added debug message.

	* htmlcluev.c (draw): Add `x' to `tx' and `y - ascent' to `ty', as
	the original HTMLW code does.  Also, draw left-aligned items as
	well.  Also, I fixed the drawing calls: stupid polymorphism!

1999-11-27  Ettore Perazzoli  <ettore@gnu.org>

	* htmltokenizer.c (html_tokenizer_add_pending): Fixed typo: `%
	TAB_SIZE' instead of `& TAB_SIZE'.

1999-11-27  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.h: Removed `parseFuncArray[]' from `struct
	_HTMLEngine'.
	* htmlengine.c: Moved here.
	(html_engine_init): Do not install `parseFuncArray' anymore.

	* htmlengine.c (parse_t): Implemented `<tt>' handling (wrong font
	though).

1999-11-26  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (html_engine_init): Init `inPre', `inTitle'.
	(block_end_pre): New function.
	(parse_p): Implemented `<pre>' handling.  Also, call
	`close_anchor()' appropriately for the `<p>' case.
	(html_engine_pop_font): Report a warning if the stack is empty
	after popping to prevent segfault.
	(html_engine_new_flow): Handle `inPre'.
	(parse_v): New function, implementing `<var>'.
	(html_engine_init): Install it in the parsing vtable.
	(parse_u): Enable code for `<ul>'.

	* htmlengine.h: New member `inPre' in `HTMLEngine'.

1999-11-26  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (html_engine_init): Init `tempStrings'.
	(html_engine_destroy): Free it.
	(to_roman): New function.
	(parse_l): Implemented ordered lists.
	(parse_o): Implemented.  (Parses only `<ol>' and not `<option>'
	for now.)
	(html_engine_init): Install `parse_o' in the parsing vtable.
	(block_end_list): Pop and destroy the list on the top of the
	listStack.

	* htmlengine.h: New member `tempStrings' in `HTMLEngine'.

	* htmlengine.c (html_engine_init): Init `glossaryStack'.
	(html_engine_destroy): Destroy it.
	(parse_d): Implemented `<dl>', `<dd>' and `<dt>' from the KHTMLW
	source.
	(html_engine_new_flow): Use the indent value from the HTMLEngine,
	not the clue!
	(parse_k): New function, parsing for the `<kbd>' tag.
	(html_engine_init): Install it.
	(parse_l): Call `close_anchor' for `<li>'.  Also, use
	`html_stack_is_empty()' instead of `html_stack_count()' for
	checking for emptiness.

	* htmlengine.h: New enum `HTMLGlossaryEntry'.  New member
	`glossaryStack' in `HTMLEngine'.

	* htmlstack.c (html_stack_clear): If the `free_func' is NULL,
	don't try to free elements.
	(html_stack_top): If the stack is empty, return NULL.

1999-11-26  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.h: Replaced `HTMLListStack' with an `HTMLStack'.
	* htmlengine.c: Updated accordingly.

	* htmllist.h: `ListType' renamed to `HTMLListType', `ListNumType'
	renamed to `HTMLListNumType'.  Also, changed the values to upper
	case, and prefixed them with `HTML_LIST_TYPE' and
	`HTML_LIST_NUM_TYPE' respectively.  Occurrences updated.

	* htmllist.c, htmllist.h: Removed `HTMLListStack' implementation.

	* htmlengine.c (parse_a): Get `<address>' to work.

	* htmlengine.h: Replaced the `HTMLFontStack' with an `HTMLStack'.
	* htmlengine.c: Updated accordingly.

	* htmlfont.c, htmlfont.h: Removed the `HTMLFontStack'
	implementation.

	* htmlfont.c (html_font_new): Init `textColor'.
	(html_font_destroy): Free `textColor' if not NULL.
	(html_font_set_color): New function.
	* htmlengine.c (html_engine_parse): Use it.
	(html_engine_select_font): Use it.

	* htmlengine.h: Replaced the `HTMLColorStack' stack with a
	`HTMLStack'.
	* htmlengine.c: All the functions updated accordingly.
	(html_engine_pop_color): Free the popped color.

	* htmlcolor.c, htmlcolor.h: Removed.  #inclusions from other
	source files removed as well.

	* htmlstack.c, htmlstack.h: Implementation of a generic
	`HTMLStack' type.

	* htmlengine.c: New typedef `BlockStackElement'.
	(block_stack_element_new): New static function, derived from
	`html_stack_element_new()'.
	(html_engine_push_block): Updated to use it.
	(html_block_stack_element_free): New function.
	(html_engine_free_block): Updated to use it.
	(html_engine_push_block): Removed.
	(push_block): New static function replacing it.  Former callers of
	`html_engine_push_block' updated to use it.
	(html_engine_free_block): Removed.
	(free_block): New static function replacing it.  Former callers of
	`html_engine_free_block' updated to use it.
	(html_engine_pop_block): Removed.
	(pop_block): New static function replacing it.  Former callers of
	`html_engine_pop_block' updated to use it.
	(html_engine_block_end_font): Removed.
	(block_end_font): New static function replacing it.  Former
	callers of `html_engine_block_end_font' updated to use it.
	(html_engine_block_end_color_font): Removed.
	(block_end_color_font): New static function replacing it.  Former
	callers of `html_engine_block_end_color_font' updated to use it.
	(html_engine_block_end_list): Removed.
	(block_end_list): New static function replacing it.  Former
	callers of `html_engine_block_end_list' updated to use it.
	(html_engine_block_end_indent): Removed.
	(block_end_indent): New static function replacing it.  Former
	callers of `html_block_end_indent' updated to use it.
	(html_engine_block_end_div): Removed.
	(block_end_div): New static function replacing it.  Former callers
	of `html_engine_block_end_div' updated to use it.
	* htmlengine.h: Updated prototypes accordingly.

	* htmlengine.h: New typedef `HTMLBlockStackElement' that will
	replace former `HTMLStackElement'.

	* htmlstack.c (html_stack_element_new): Removed.  This function is
	only used by `htmlengine.c' for the block stack, so the name is
	misleading.

	* htmlengine.c (parse_d): Enable code for `</div>' which was `#if
	0'ed by mistake.

1999-11-26  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (parse_table): Call `close_anchor()' when `</table'
	is encountered.  Added support for `<caption>'.  Handle headings.
	Destroy objects correctly.  Handle Left/Right alignment.  With all
	of this, this function should finally be completely ported.
	(set_base_url): New function; for now it's just a dummy.
	(select_font_relative): New function; incomplete.
	(html_engine_block_end_indent): New function.
	(parse_b): Ported `<base>', `<big>' and `<blockquote>' from
	KHTMLW.
	(parse_c): Added `<cite>' and `<code>'.  Font for `<code>' is
	wrong for now.
	(html_engine_begin): Removed unused variable.
	(html_engine_block_end_div): New function.
	(parse_d): New function, implementing only `<dir>' and `<div>' for
	now.
	(html_engine_init): Install it in the parse array.

	* htmlcluev.c (remove_aligned_by_parent): Implemented (from
	`HTMLClueV::removeAlignedByParent()').
	(calc_size): Call it (as the corresponding KHTMLW function did).

	* htmlclueflow.c (calc_size): Handle clear types correctly, using
	`html_clue_get_{left,right}_clear()'.

	* htmlclue.c (html_clue_get_right_clear): New function.
	(html_clue_get_left_clear): New function.
	(get_left_clear): Default implementation of the `get_left_clear()'
	virtual method.
	(get_right_clear): Default implementation of the `get_right_clear()'
	virtual method.
	(html_clue_class_init): Install them.
	(find_free_area): Default implementation changed to match the
	KHTMLW one.

	* htmlclue.h: New virtual methods `get_right_clear()' and
	`get_left_clear()'.
	(html_clue_get_right_clear): New prototype.
	(html_clue_get_left_clear): New prototype.

1999-11-26  Anders Carlsson  <andersca@gnu.org>

	* htmlengine.c (html_engine_draw_background): Use the new function
	when drawing backgrounds.

	* htmlpainter.c (html_painter_draw_background_pixmap): Added a new
	function for drawing the background pixmap.

	* debug.c: Adapted the debug code to the new object system.

	* htmlbullet.c (draw): Fixed the bullet redraw bug.

	* htmlimage.c (draw): Fixed the image redraw bug.

1999-11-25  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c: Added `ID_I' to enum `ID'.
	(parse_h): Removed extra `html_engine_select_font()' call which
	should not be there.
	(parse_i): Added code to deal with the `<i>' tag.
	(html_engine_set_named_color): Aaargh.  Return `TRUE'!
	(parse_a): Pass `TRUE' as the last argument to
	`html_engine_push_block()' when doing the "address" tag.

	* htmlengine.c (html_engine_set_named_color): Return value made
	`gboolean': return FALSE if the color could not be parsed.
	(parse_b): If `html_engine_set_named_color()' fails, don't mark
	the color as set.
	(parse_table): Likewise.

	* htmlengine.h (html_engine_set_named_color): Updated prototype.

1999-11-24  Ettore Perazzoli  <ettore@gnu.org>

	* htmllinktextmaster.c (html_link_text_master_class_init): Assign
	`parent_class' correctly.

	* htmlengine.c (parse_table): Use `html_object_set_bg_color()'
	instead of setting `cell->bg' directly.  Also, avoid using the
	colors if they have not set explicitly.  This fixes the random
	color bugs we were having with tables.

	* htmltablecell.c (set_bg_color): Implementation of the
	`set_bg_color' virtual method for HTMLTableCell.
	(html_table_cell_class_init): Install it.

	* htmlobject.c (html_object_set_bg_color): New function.
	(set_bg_color): Default implementation for the `set_bg_color'
	method.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `set_bg_color'.

	* htmltablecell.h: New member `have_bg' in `HTMLTableCell'.
	* htmltablecell.c (html_table_cell_init): Init it to `FALSE'.
	(draw): Don't draw the background if you don't have a background
	color.

	* htmlengine.c (parse_l): Removed allocation of `fontbasecolor'.
	(html_engine_draw_background): `bgColor' is now always allocated.
	(html_engine_parse): `settings->bgcolor' is no longer a pointer,
	so deal with it.
	(parse_h): Added code from KHTMLW to deal with different alignments
	and sizes.

	* htmlsettings.h: Type of members `bgcolor' and `fontbasecolor' in
	`HTMLSettings' changed from `GdkColor *' to `GdkColor'.
	* htmlsettings.c (html_settings_destroy): Updated accordingly.
	(html_settings_new): Likewise.

	* htmlengine.c (parse_b): Updated accordingly.
	(html_engine_parse): Likewise.
	(html_engine_draw_background): Likewise.

	* htmlengine.h: Type of member `bgcolor' in `HTMLEngine' changed
	from `GdkColor *' to `GdkColor'.

	* htmlclue.c (draw): Do not draw a green rect around the clue
	anymore.

	* htmltablecell.c (draw): Removed meaningless check for a non-zero
	pixel value.

	* htmlengine.c: Added `ID_EM' to enum `ID'.
	(parse_e): New function, imported from KHTMLW.
	(html_engine_init): Install it.

	* htmlengine.c: Renamed all the `html_engine_parse_*()' functions
	to `parse_*()', made static and moved to the top of the file.
	* htmlengine.h: Removed public prototypes accordingly.

1999-11-23  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (html_engine_new_flow): Updated accordingly.
	(html_engine_insert_vspace): Updated accordingly.
	(html_engine_insert_text): Updated accordingly.
	(html_engine_parse_b): Updated accordingly.
	(html_engine_parse_i): Updated accordingly.
	(html_engine_parse_l): Updated accordingly.
	(html_engine_parse_f): Fixed allocation of `color' which caused a
	memory leak.

	* htmlclue.c (html_clue_append): Type of arg `clue' changed to
	from `HTMLObject' to `HTMLClue'.

	* htmlengine.c (html_engine_parse): Use `lucida' instead of
	`times' (temp hack).

	* htmlfont.c (create_gdk_font): Temp hack to make font handling
	behave a little more sanely.

	* htmlcluev.h: Fixed braino `HTMLClue' -> `HTMLClueClass'.

	* htmlengine.c (html_engine_insert_text): Ported all the code from
	the corresponding function in KHTMLW.
	(html_engine_parse_a): New function, ported from
	`KHTMLWidget::parseA' in KHTMLW.
	(html_engine_init): Install it.
	(close_anchor): New helper function, ported from
	`KHTMLWidget::closeAnchor()'.

	* htmlengine.h: New members `url', `target' and `baseTarget' in
	`struct _HTMLEngine'.
	* htmlengine.c (html_engine_init): Init them.
	(html_engine_destroy): Free them.

	* htmltype.h: New types `HTML_TYPE_LINKTEXT',
	`HTML_TYPE_LINKTEXTMASTER'.
	* htmltype.c (html_type_name): Updated accordingly.

	* htmllinktextmaster.c: New file, implementing the
	`HTMLLinkTextMaster' class.

	* htmlobject.c (get_url): Default implementation for the `get_url'
	virtual method.
	(get_target): Default implementation for the `get_target' virtual
	method.
	(find_anchor): Default implementation for the `find_anchor'
	virtual method.
	(html_object_class_init): Install these functions in the class
	structure.
	(html_object_get_url): New function.
	(html_object_get_target): New function.
	(html_object_find_anchor): New function.

	* htmlobject.h: New virtual methods `get_url', `get_target' and
	`find_anchor' in `HTMLObjectClass'.

	* htmlengine.h: Replaced `HTMLFontWeight weight' with `gboolean
	bold'.
	* htmlengine.c (html_engine_parse): Updated accordingly.
	(html_engine_select_font): Likewise.
	(html_engine_parse_b): Likewise.
	(html_engine_parse_h): Likewise.

	* htmllinktext.c, htmllinktext.h: New files, implementing the
	`HTMLLinkText' class.

	* htmlanchor.c, htmlanchor.h: New files, implementing
	`HTMLAnchor'.

1999-11-17  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (html_engine_parse_body): Handle empty space
	correctly.  (Added a bunch of lines from the KHTMLW original.)
	This fixes the bug reported in the previous ChangeLog entry.
	(html_tokenizer_write): Added missing increment for `t->dest' when
	a sequence that is too long is ignored.

1999-11-17  Ettore Perazzoli  <ettore@gnu.org>

	* htmltokenizer.c (html_tokenizer_write): Changed handling of
	space according to the KHTMLW source; I am not sure why it was
	done differently.  Something is still wrong though, as `<li> <p>'
	introduces a vspace while `<li><p>' does not.

	* htmlengine.c (html_engine_parse_l): Set `vspace_inserted' to
	TRUE when parsing `li'.  Otherwise, things like
	`<li><p>text</p></li>' incorrectly insert a newline between the
	bullet and the text.

1999-11-17  Ettore Perazzoli  <ettore@gnu.org>

	* Makefile.am (dist-hook): Removed wrong `cp' line.
	(libgtkhtml_HEADERS): Added `gtkhtml-private'.

	* Reimplemented object handling for all the object classes.  We
	still need to fix all the `destroy' handlers and generally
	double-check that things are working right.

	* htmltype.c, htmltype.h: New files implementing a very minimal
	static object system.

	* debug.c (debug_dump_object_type): Removed.
	(debug_dump_tree): Do nothing for now, while we fix the object
	system.

1999-11-11  Elliot Lee  <sopwith@redhat.com>

	* testgtkhtml.c: WWW_SOURCE, not WWW_PRESENT (so it will work with local files).
	* htmlengine.c: Use canonicalized URL for stream creation.

1999-11-09  Ettore Perazzoli  <ettore@gnu.org>

	* Makefile.am: Compile as a standalone library `libgtkhtml.la'.

1999-10-30  Michael Meeks  <mmeeks@gnu.org>

	* html-component.c (embeddable_factory): Add persist stream interface.
	Set stream item = NULL.
	(embeddable_destroy_cb): Kill stream after use.
	(embeddable_load, load_html_from_stream): vicious hack.
	(save_html): stub.
	(view_factory): Hack out view_date->html and move into embeddable_data,
	far reaching change; we need doc / view.

	* Makefile.am (gnorba_DATA): redundant ( kill ).

1999-10-30  Michael Meeks  <mmeeks@gnu.org>

	* Makefile.am (gnorba_DATA): Add gnorba install.

	* html-component.c (update_view): just do a gtk_widget_queue_draw +
	fix args. (view_update): kill.

1999-10-28  Miguel de Icaza  <miguel@gnu.org>

	* htmlpainter.c (html_painter_begin): Use the propper offset here
	when clearing the rectangle.

	* gtkhtml.c (gtk_html_vertical_scroll): Remove the spurious call
	to repaint the whole exposed region.
	(gtk_html_new): If the adjustment was not passed, create it, so
	that we can connect to the signal changed emmission before the
	layout

	* htmlpainter.c (html_painter_draw_text): Adjust the text output
	offset too.

1999-10-26  Miguel de Icaza  <miguel@gnu.org>

	* gtkhtml.c (gtk_html_vertical_scroll): Do not force a redraw anymore.
	(gtk_html_new): Now we take two adjustment arguments.
	(gtk_html_init): Do not create an artificial scrollbar nor its
	adjustments. 
	(gtk_html_calc_scrollbars): This should be no longer required;  An
	alternate mechanism should be pursued.
	(gtk_html_calc_scrollbars): Update the adjustment here.
	(gtk_html_init): Set the APP_PAINTABLE bit here.

1999-10-25  Miguel de Icaza  <miguel@gnu.org>

	* htmlengine.c (html_engine_timer_event): Use exported routines to
	access the painter.

	* htmlpainter.c (html_painter_clear, html_painter_realize,
	html_painter_being, html_painter_end): New methods to implement
	double buffering.
	
	Moved HTMLPainter structure here to make it completely opaque.

	Added preconditions everywhere.

	Made all methods aware of the painter offset, to support double
	buffering. 
	
1999-10-24  Miguel de Icaza  <miguel@gnu.org>

	* gtkhtml.c (gtk_html_unrealize): Added unrealize handler.

1999-10-24  Richard Hult  <rhult@frenzy.hemmet.chalmers.se>

	* testgtkhtml.c (main): Exit when the window is deleted.

1999-10-23  Miguel de Icaza  <miguel@gnu.org>

	* htmltextmaster.c (html_text_master_fit_line): Use
	html_object_destroy here instead of g_free directly.

	* htmlengine.c (html_engine_parse_b): Set the color using the
	proper API to insure proper color allocation management (Gdk uses
	chunks).

	* htmlsettings.c (html_settings_destroy): New method.
	(html_settings_set_bgcolor): New method.

	* htmllist.c (html_list_destroy): New method.
	(html_list_stack_clear): Implement.

	* htmlcolor.c (html_color_stack_destroy): Added destroy method.
	(html_color_stack_clear): Implemented.

	* htmlfont.c (html_font_stack_destroy): Added destroy method.

	* stringtokenizer.c (string_tokenizer_destroy): Added destroy method.

	* htmltokenizer.c (html_tokenizer_destroy): Added destroy method
	and release reosouorces.
	(html_tokenizer_reset): Free buffers here.

	* htmlengine.c (html_engine_class_init): Added destroy handler.

	* htmltokenizer.c (html_tokenizer_begin): Fixed FIXME.

	* htmlcluev.c (html_cluev_appended): Initialize this one.
	(cluev_next_aligned): Utility routine to kill warnings.

	* htmlfont.c (html_font_destroy): Add a destructor for fonts.
	(html_font_stack_clear): Added font stack destruction code.

	Added precondition entry points.
	
1999-10-17  Richard Hult  <rhult@hem2.passagen.se>

	* htmlengine.[ch]: Turn the engine into a GtkObject.

1999-10-17  Anders Carlsson  <andersca@gnu.org>

	* testgtkhtml.c: The goto button shouldn't be able to focus

1999-10-17  Richard Hult  <rhult@hem2.passagen.se>

	* html-component.c: Use a GtkHTML widget directly instead of duplicating the code here.

1999-10-17  Anders Carlsson  <andersca@gnu.org>

	* testgtkhtml.c: More work on the ui

1999-10-17  Richard Hult  <rhult@hem2.passagen.se>

	* Makefile.am: Fixed component build.
