1
2009-06-04 Denis Pauk <pauk.denis@gmail.com>
5
* Makefile.am: add option HAVE_NEWSOUP
6
* testgtkhtml.c: ifdef HAVE_NEWSOUP
7
enable support cookies in soup
9
2009-04-10 Milan Crha <mcrha@redhat.com>
11
** Fix for bug #494986
13
* gtkhtml-private.h: (struct _GtkHTMLPrivate):
14
* gtkhtml.c: (any_has_cursor_moved), (any_has_skip_update_cursor),
15
(idle_handler), (gtk_html_init), (cursor_move), (move_selection):
16
Do not block view update when cursor changed in any frame of the
19
2009-04-09 Matthew Barnes <mbarnes@redhat.com>
21
* testgtkhtml.c (main):
22
Rip out the SoupCookieJar code, since it requires libsoup 2.26
23
and it's not worth a dependency bump just for a test program.
25
2009-04-09 Matthew Barnes <mbarnes@redhat.com>
28
Fix compiler warnings and coding style.
30
2009-04-09 Milan Crha <mcrha@redhat.com>
32
** Fix for bug #494986
34
* gtkhtml-private.h: (struct _GtkHTMLPrivate):
35
* gtkhtml.c: (idle_handler), (html_engine_draw_pending_cb),
36
(button_release_event), (gtk_html_init):
37
Do not centre to cursor position on click over URL and draw event.
39
2009-04-09 Tobias Mueller <tobiasmue@svn.gnome.org>
41
* gtkhtml.c (gtk_html_set_fonts):
42
* htmlpainter.c (html_painter_alloc_font):
43
Use the boolean parameter "points" properly to know whether
44
a font is point or pixel sized.
46
* testgtkhtml.c (draw_page_cb):
47
Have a testcase for that as well.
49
Patch by Alexander Sack <asac@jwsdot.com>
53
2009-04-08 Tobias Mueller <tobiasmue@svn.gnome.org>
55
* htmlsearch.c (html_search_new):
56
Use a proper format string ("%s") for g_warning.
58
* htmlclueflow.c (write_flow_tag):
59
Use a proper format string ("%s") for html_engine_save_output_string.
63
2009-03-02 Matt McCutchen <matt@mattmccutchen.net>
65
Now that gtkhtml's handling of entities in input has been fixed
66
comprehensively in bug 552357, revert previous workarounds, as
69
* gtkhtml/gtkhtml/htmltokenizer.c:
70
* gtkhtml/gtkhtml/ChangeLog:
71
* gtkhtml/gtkhtml/htmltext.c:
72
* gtkhtml/gtkhtml/htmlutils.c:
73
* gtkhtml/gtkhtml/htmlutils.h:
74
* gtkhtml/gtkhtml/Makefile.am:
75
* gtkhtml/gtkhtml/htmlobject.c:
76
* gtkhtml/gtkhtml/gtkhtml.c:
77
Revert gtkhtml revision 8605 (workaround for bug 485700).
79
* gtkhtml/gtkhtml/htmlengine-save.h, gtkhtml/gtkhtml/htmlengine-save.c
80
(html_engine_save_delims_and_vals): New function to help output
81
properly entity-encoded tags with attributes.
83
* gtkhtml/gtkhtml/htmltext.c:
84
* gtkhtml/gtkhtml/htmlimage.c:
85
* gtkhtml/gtkhtml/htmlobject.c:
86
* gtkhtml/gtkhtml/htmliframe.c:
87
* gtkhtml/gtkhtml/htmltablecell.c:
88
* gtkhtml/gtkhtml/htmltable.c: Entity-encode attributes where
91
** Part of the fix for bug #549838
93
2009-02-18 Matthew Barnes <mbarnes@redhat.com>
96
* gtkhtml-propmanager.h:
97
Remove these dead files.
100
htmlengine-edit-table.h listed twice.
102
2009-02-16 Matthew Barnes <mbarnes@redhat.com>
106
* htmlengine-print.c (engine_print_draw_page):
107
Replace a g_assert() with g_return_if_fail().
108
Avoids a crash caused by a GtkPrint page range bug.
110
2009-02-16 Milan Crha <mcrha@redhat.com>
112
** Fix for bug #571654
114
* htmlselection.c: (html_engine_clear_selection):
115
Clear also primary selection.
117
2009-02-12 Milan Crha <mcrha@redhat.com>
119
** Fix for bug #569365
121
* htmlengine-edit-cursor.c: (draw_cursor_rectangle),
122
(html_engine_draw_cursor_in_area):
123
Do not draw a cursor without a window.
125
2009-01-29 Milan Crha <mcrha@redhat.com>
127
** Fix for bug #532165
129
* htmlimage.c: (destroy), (update_or_redraw),
130
(html_image_pointer_queue_animation),
131
(html_image_pointer_load): Do not crash when factory gone.
133
2009-01-23 Denis Pauk <pauk.denis@gmail.com>
135
** Fix for bug #567697
137
* htmlentity.h: (INVALID_ENTITY_CHARACTER_MARKER):
138
* htmlentity.c: (html_entity_parse):
139
* htmltokenizer.c: (html_tokenizer_convert_entity),
140
(convert_text_encoding):
141
Do not strip invalid entities, rather return them back as text.
143
2009-01-22 Bharath Acharya <abharath@novell.com>
145
** Fix for bug #465432 (BNC)
147
* htmlengine-edit-cut-and-paste.c (html_engine_delete): cluev end is in
148
the selection. Lets handle this case just like simple delete.
151
If you create a table and then put text into the table and then attempt
152
to remove parts of that text; the text is removed to end of string.
154
1) Create a 3x3 table
155
2) click into a cell, and type in "This is how it deletes badly"
156
3) Highlight the word "how" and then hit backspace to remove it.
158
the rest of the words gets deleted as well. This is not picked up by
159
Redo and the user will lose all of their text.
161
2009-01-22 Bharath Acharya <abharath@novell.com>
163
** Fix for bug #464064 (BNC)
165
* htmlengine-edit-table.c (table_set_bg_color_undo_action): The undo
166
for the second iteration makes table go null. Just have a check to
167
prevent the unwanted call.
171
-> open a new composer window.
172
-> create a table with background color.
173
-> type few characters.
174
-> now do ctrl+z till all the characters are removed.
175
-> evolution will crash at the end.
177
2009-01-15 Milan Crha <mcrha@redhat.com>
179
** Fix for bug #565491
181
* htmlengine.c (insert_text): Preserve leading space only
182
when in the editing mode, otherwise strip it as before.
184
2009-01-11 Matthew Barnes <mbarnes@redhat.com>
188
* htmlengine.c (insert_text):
189
Preserve up to one leading space when parsing HTML. Eliminates
190
strange cut-and-paste behavior when the text segment has leading
193
2009-01-11 Matthew Barnes <mbarnes@redhat.com>
196
* gtkhtml-embedded.c:
199
* htmlengine-search.c:
205
Fix what we can with GSEAL_ENABLE defined.
207
2009-01-05 Matthew Barnes <mbarnes@redhat.com>
210
Fix coding style and compiler warnings.
212
2008-12-23 Denis Pauk <pauk.denis@gmail.com>
214
** Fix for bug #552357
218
* htmlentity.c: Fixes invalid reads and memory usage.
220
2008-12-22 Matthew Barnes <mbarnes@redhat.com>
222
** Fixes part of bug #536625
224
* htmlengine.c (new_parse_body):
225
Free the string returned by html_tokenizer_next_token().
227
2008-12-10 Denis Pauk <pauk.denis@gmail.com>
229
** Fix for bug #552357
231
* gtkhtml/htmltokenizer.c
232
* gtkhtml/htmltokenizer.h
233
* gtkhtml/htmlradio.c
235
* gtkhtml/htmlengine.c
236
* gtkhtml/htmlengine.h
237
* gtkhtml/htmlbutton.c
238
* gtkhtml/htmltextarea.c
239
* gtkhtml/htmlembedded.c
240
* gtkhtml/htmlembedded.h
241
* gtkhtml/htmlselect.c
242
* gtkhtml/htmlcheckbox.c
243
* gtkhtml/htmlhidden.c
244
* gtkhtml/testgtkhtml.c
245
* gtkhtml/htmlimageinput.c
247
* gtkhtml/htmltextinput.c
248
support http-equiv and set encoding (gtk_html_set_default_content_type)
249
if it exist in http - headers and re-coding resulted query from form
250
(support not utf8 encoding).
251
For use new behavior need
252
gtk_html_set_default_engine(html, TRUE);
254
gtk_html_begin_full in
255
GtkHTMLBeginFlags with GTK_HTML_BEGIN_CHANGECONTENTTYPE.
257
2008-12-09 Matthew Barnes <mbarnes@redhat.com>
259
** Fixes part of bug #563841
261
* htmlengine-edit-cut-and-paste.c (use_pictograms):
262
Refresh the pictogram parser. Use standard icon names for
263
smiley faces and recognize more of them.
265
2008-12-09 Milan Crha <mcrha@redhat.com>
267
** Fix for bug #555388
269
* htmlengine-edit-table.c: (table_set_align):
270
Do not crash on undo of a table creation.
272
2008-11-05 Milan Crha <mcrha@redhat.com>
274
** Fix for bug #338921
276
* htmlimage.c: (html_image_factory_end_pixbuf):
277
Do not crash when the interest in the image left before it was loaded.
279
2008-10-30 Matthew Barnes <mbarnes@redhat.com>
282
* gtkhtml-propmanager.c:
283
Only include toplevel headers for GLib and GTK+.
285
2008-10-03 Milan Crha <mcrha@redhat.com>
287
** Fix for bug #546155
289
* htmltext.c: (convert_nbsp), (update_index_interval):
290
Update correct index, otherwise it crashes.
292
2008-09-29 Milan Crha <mcrha@redhat.com>
294
** Fix for bug #554326
296
* gtkhtml.c: (update_primary_selection):
297
Ask for clipboard only when have something to store there.
299
2008-09-15 Milan Crha <mcrha@redhat.com>
301
** Fix for bug #423395
303
* gtkhtml.c: (goto_caret_anchor), (focus_in_event), (focus):
304
Ensure cursor at the right position even when first time
305
focusing to the widget.
307
2008-09-01 Matthew Barnes <mbarnes@redhat.com>
309
* testgtkhtml.c (goto_url), (test_cb):
310
Use g_get_current_dir() instead of getcwd().
312
* htmlpainter.c (html_painter_calc_entries_size):
313
Initialize font_size and font_style, to make compiler happy.
315
2008-08-28 Matthew Barnes <mbarnes@redhat.com>
317
* htmltext.c (min_word_width_calc_tabs):
318
Disable this unused function. Maybe remove it in the future.
320
2008-08-17 Matthew Barnes <mbarnes@redhat.com>
323
Remove declaration for gtk_html_request_paste(). The actual
324
function was removed in revision 8594 (Oct 2007), but I guess
325
the API break was never noticed.
327
2008-08-15 Matthew Barnes <mbarnes@redhat.com>
329
* htmlengine.c: Fix compiler warnings.
331
2008-08-12 Tobias Mueller <tobiasmue@svn.gnome.org>
333
* htmlengine.c: Sanitize HTMLENGINE by checking whether we have
335
Also move from g_assert to g_return_[val_]_if_fail.
338
2008-07-31 Milan Crha <mcrha@redhat.com>
340
** Fix for bug #545559
342
* htmlengine.c: (html_engine_finalize):
343
* htmlengine-edit-cursor.h: (html_engine_set_cursor_blink_timeout):
344
* htmlengine-edit-cursor.c: (html_engine_set_cursor_blink_timeout),
345
(html_engine_setup_blinking_cursor),
346
(html_engine_stop_blinking_cursor),
347
(html_engine_reset_blinking_cursor):
348
* gtkhtml.c: (client_notify_cursor_blink), (gtk_html_class_init):
349
Respect Gnome settings regarding cursor blinking.
351
2008-07-14 Milan Crha <mcrha@redhat.com>
353
** Fix for bug #540929
355
* htmlframeset.c: (calc_dimension): Stop expanding columns as soon
356
as there were no columns expanded during the cycle.
358
2008-07-02 Milan Crha <mcrha@redhat.com>
360
** Fix for bug #493783
362
* htmlengine.c: (html_engine_opened_streams_set):
363
Restore last scrollbar position when done with substreams.
364
* gtkhtml.c: (vertical_scroll_cb), (horizontal_scroll_cb):
365
Skip the event when should keep_scroll.
367
2008-06-30 Matthew Barnes <mbarnes@redhat.com>
369
** Fixes the final issue in bug #446894
371
* htmlprinter.c (html_printer_new):
372
Use the widget style's font rather than a hardcoded font. Fixes
373
both the font kerning issue and the issue where the printed font
374
does not match the on-screen font.
376
2008-06-27 Milan Crha <mcrha@redhat.com>
378
** Fix for bug #540342
380
* htmlframeset.h: (HTML_IS_FRAMESET): Defined type check macro.
381
* gtkhtml.c: (reparent_embedded): Reparent HTML_FRAMESET too.
383
2008-06-20 Suman Manjunath <msuman@novell.com>
385
* gtkhtml.h: Fixed a mismatch in signature of gtk_html_get_type()
386
between the declaration and definition.
388
2008-06-18 Milan Crha <mcrha@redhat.com>
390
** Fix for bug #423395
392
* gtkhtml-private.h: (struct _GtkHTMLPrivate): New property.
393
* gtkhtml.h: (gtk_html_set_caret_first_focus_anchor):
394
* gtkhtml.c: (gtk_html_set_caret_first_focus_anchor), (destroy),
395
(focus), (gtk_html_init): New API to let GtkHTML know where
396
to place cursor on the first focus event, based on the anchor name.
398
2008-06-09 Milan Crha <mcrha@redhat.com>
400
** Fix for bug #533741 (Patch by Vaclav Slavik.)
402
* gtkhtml.c: (get_selection_string), (gtk_html_get_selection_html),
403
(gtk_html_get_selection_plain_text), (utf8_filter_out_bom),
404
(clipboard_paste_received_cb), (create_clipboard_contents),
405
(update_primary_selection): Don't insert BOM into UTF-8 text when
406
copying to clipboard; filter it out when pasting from clipboard.
408
2008-05-19 Srinivasa Ragavan <sragavan@novell.com>
410
** Fix for bug #524338
412
* gtkhtml/htmltext.c: Reverting the fix for bug #342659 which caused
415
2008-04-05 Matthew Barnes <mbarnes@redhat.com>
417
** Fixes part of bug #526152
419
* gtkhtml-properties.c (gtk_html_class_properties_load):
421
* gtkhtml.c (destroy), (client_notify_spell_widget),
422
(setup_class_properties), (init_properties_widget):
423
Defer management of spell check languages and color to the editor
424
component. The last remnants of GnomeSpell have been swept away.
426
2008-04-01 Matthew Barnes <mbarnes@redhat.com>
428
* htmlrule.h: Define HTML_IS_RULE().
430
2008-03-27 Milan Crha <mcrha@redhat.com>
432
** Fix for bug #339093
434
* gtkhtml-private.h: (struct _GtkHTMLPrivate):
435
* gtkhtml.c: (key_press_event), (gtk_html_init), (command):
436
Skip ZOOM commands only when in non-editing mode and when not
437
invoked by key bindings.
439
2008-03-25 Takao Fujiwara <takao.fujiwara@sun.com>
441
reviewed by: Milan Crha <mcrha@redhat.com>
445
* htmlclueflow.c: (search_text):
446
* htmlengine-search.c: (html_engine_search_next_int),
447
(html_engine_search_next), (html_engine_search_incremental):
448
* htmlsearch.c: (html_search_new):
449
Revised the algorithm in search_text() so that the email
450
composed widow does not go to the infinite loop with multibyte chars.
452
2008-03-14 Matthew Barnes <mbarnes@redhat.com>
456
* htmlengine-print.c (print_with_header_footer):
457
Merge two similar translated strings.
459
2008-03-11 Matthew Barnes <mbarnes@redhat.com>
461
** Fixes bug #266206 (original patch by Owen Taylor)
463
* gtkhtml.c (get_surrounding_text):
464
Fix problem where we'd call gtk_im_context_set_surrounding()
465
with and uninitialized value for offset.
467
* gtkhtml.c (gtk_html_im_delete_surrounding_cb):
468
Handle the case where offset < 0 and n_chars < -offset.
470
2008-03-02 Srinivasa Ragavan <sragavan@novell.com>
472
** Fix for bug #519463 from Tor Lillqvist
474
* gtkhtml.c: (utf16_order), (utf16_to_utf8_with_bom_check),
475
(drag_data_get), (clipboard_paste_received_cb): treat pasted non-UTF-8
476
data as UTF-16 and not UCS-2
478
2008-02-26 Milan Crha <mcrha@redhat.com>
480
** Fix for bug #467791
482
* htmlengine.c: (element_parse_a):
483
Accept "shape", "coords" attributes only when inside "map" element.
485
2008-02-19 Milan Crha <mcrha@redhat.com>
487
** Fix for bug #391730
489
* gtkhtml.c: (update_primary_selection):
490
Process only if selection is allowed and take care of NULL as text.
491
* gtkhtml.c: (focus), (cursor_move), (gtk_html_select_word),
492
(gtk_html_select_line), (gtk_html_select_paragraph),
493
(gtk_html_select_paragraph_extended), (gtk_html_select_all):
494
Ensure update primary selection.
496
2008-01-29 Srinivasa Ragavan <sragavan@novell.com>
498
* htmlengine-edit-clueflowstyle.c: (undo_or_redo),
499
(set_clueflow_style_in_region): Move to G_STRFUNC
501
2008-01-25 Johnny Jacob <jjohnny@novell.com>
503
** Fix for bug #371011
504
** Patch by Matthew Barnes <mbarnes@redhat.com>.
506
* htmlengine-edit-clueflowstyle.c (undo_or_redo): Null check.
508
2008-01-24 Milan Crha <mcrha@redhat.com>
510
** Fix for bug #447122
512
* htmlclueflow.c: (search_text): Move to next character when
513
searching forward also when found as first character of paragraph.
515
2008-01-23 Tor Lillqvist <tml@novell.com>
517
* testgtkhtml.c: #undef DATADIR on Windows do avoid clash.
519
2008-01-22 Milan Crha <mcrha@redhat.com>
521
** Fix for bug #505819
523
* gtkhtml.c: (clipboard_paste_received_cb): Removed (probably)
524
forgotten g_object_unref. We should not unref ourself.
526
2008-01-17 Dan Winship <danw@gnome.org>
528
* testgtkhtml.c: Port from libsoup 2.2 to 2.4. Remove old libsoup
531
2008-01-16 Milan Crha <mcrha@redhat.com>
533
** Fix for bug #431190
535
* htmliframe.c: (find_anchor), (html_iframe_class_init):
536
* htmlframe.c: (find_anchor), (html_frame_class_init):
537
Look for anchors in FRAME and IFRAME too.
539
2008-01-02 Milan Crha <mcrha@redhat.com>
541
** Fix for bug #447122
543
* htmlclueflow.c: (search_text):
544
Move to next character when searching forward.
546
2008-01-02 Milan Crha <mcrha@redhat.com>
548
** Part of fix for bug #317823
551
* gtkhtml.c: (gtk_html_get_image_src_at),
552
(gtk_html_get_cursor_image_src): New API functions to obtain
553
source URL for the image at the specified place in the widget.
555
2008-01-02 Andre Klapper <a9016009@gmx.de>
557
* htmlengine.c: do not crash on html messages that use "shape"
558
without "map". workaround for bug #467791.
560
2007-12-22 Matthew Barnes <mbarnes@redhat.com>
562
** Fixes part of bug #493709
564
* gtkhtml-search.c (gtk_html_isearch):
565
* htmlform.c (html_form_add_radio), (destroy_radio):
566
* testgtkhtml.c (object_timeout), (object_requested_cmd):
567
Use g_object_ref() instead of gtk_widget_ref() (deprecated).
568
Use g_object_unref() instead of gtk_widget_unref() (deprecated).
572
Use GtkComboBoxEntry instead of GtkCombo (deprecated).
573
Use a common model for both the GtkComboBoxEntry and GtkTreeView.
576
Use the new GtkTooltip API instead of GtkTooltips.
578
2007-12-17 Matthew Barnes <mbarnes@redhat.com>
580
* htmlimage.c (html_image_set_alt):
581
Make the 'alt' parameter constant.
583
2007-11-22 Matthew Barnes <mbarnes@redhat.com>
587
* htmltext.c (merge_spell_errors):
588
New function consumes two sorted lists of SpellErrors and returns a
589
single sorted list of SpellErrors with no duplicates.
591
* htmltext.c (object_merge), (html_text_spell_errors_add):
592
Call merge_spell_errors() instead of g_list_insert_sorted() or
595
2007-11-22 Milan Crha <mcrha@redhat.com>
597
** Fix for bug #494170
599
* htmltokenizer.c: (in_script_or_style):
600
Accept also spaces between element name and end of tag
601
when looking for end of style/script tag.
603
2007-11-22 Milan Crha <mcrha@redhat.com>
605
** Fix for bug #435620
607
* htmlcluev.c: (set_max_height):
608
Do not recalculate size of the object every call of set_max_height.
610
2007-11-05 Milan Crha <mcrha@redhat.com>
612
* gtkhtml.h: (gtk_html_get_selection_plain_text):
613
* gtkhtml.h: (gtk_html_get_selection_plain_text):
614
Extending API to get selection as plain-text. (With bug #334675.)
616
2007-11-03 Matthew Barnes <mbarnes@redhat.com>
618
** Remove dead files from source control. The dates below
619
indicate when the file was removed from Makefile.am.
620
Fixes part of bug #478670.
622
* tests/bg.png (no history)
623
* 32.png (no history)
624
* gtkhtml-im.c (Mar 2003)
625
* gtkhtml-im.h (Mar 2003)
626
* gtkhtml-input.c (Dec 2000)
627
* gtkhtml-keybinding.c (Jun 2000)
628
* gtkhtml-propmanager.c (Nov 2002)
629
* gtkhtml-propmanager.c (Nov 2002)
630
* html-component.c (Nov 2002)
631
* htmlelement.c (Nov 2002)
632
* htmlfont.c (Dec 2000)
633
* htmlfontface.c (Sep 2000)
634
* keybindingssrc.xemacs (Feb 2003)
636
2007-11-02 Matthew Barnes <mbarnes@redhat.com>
640
* htmlengine-edit-cut-and-paste.c (use_pictograms):
641
Use stock icons when converting an emoticon to an image.
643
2007-11-01 Milan Crha <mcrha@redhat.com>
645
** Fix for bug #318592
647
* gtkhtml-private.h: (struct _GtkHTMLPrivate):
648
New member 'in_url_test_mode'.
649
* gtkhtml-enums.h: (enum GtkHTMLEditorEventType):
650
New value 'GTK_HTML_EDITOR_EVENT_LINK_CLICKED'.
651
* gtkhtml.c: (update_mouse_cursor), (key_press_event),
652
(key_release_event), (on_object), (gtk_html_init):
653
When editable, then tracking Control key to enable clicking on links
654
to test them. Signal "link_clicked" is now emitted only when not in
655
editable mode or when in test_url_mode (before it was emitted always).
656
Also marked links as visited when clicked on them in editable mode.
657
Event "link_clicked" is emitted as editor event too in case of
658
active editable mode.
660
2007-10-31 Matthew Barnes <mbarnes@redhat.com>
662
* htmlsearch.c (html_search_new):
663
* htmlcursor.h (html_cursor_forward_one), (html_cursor_backward_one):
664
Fix some recently introduced compiler warnings.
666
2007-10-26 Milan Crha <mcrha@redhat.com>
668
** Fix for bug #485700
670
* htmltext.c: (html_link_set_url_and_target), (html_link_new):
671
Always escape amps when creating new/changing links.
672
* htmlobject.c: (html_object_get_complete_url):
673
Always unescape amps when returning complete urls.
674
* gtkhtml.c: (set_pointer_url):
675
Always unescape amps when storing pointer_url.
677
* htmlutils.c: (html_utils_maybe_escape_amp),
678
(html_utils_maybe_unescape_amp):
679
New source files to store utility functions.
680
* Makefile.am: Add new source files.
681
* htmltokenizer.c: (end_tag): Always unset priv->aTag when at the end
682
of tag to parse escaped sequences correctly.
684
2007-10-24 Milan Crha <mcrha@redhat.com>
686
** Fix for bug #488167
688
* gtkhtml.c: (focus):
689
Change focused object only when not focused before.
691
2007-10-24 Milan Crha <mcrha@redhat.com>
693
** Fix for bug #487841
695
* htmlengine.c: (html_engine_focus),
696
(html_engine_update_focus_if_necessary):
697
Free memory allocated by html_object_get_complete_url.
699
2007-10-14 Hiroyuki Ikezoe <poincare@ikezoe.net>
701
** Fixes part of bug #258374
703
* gtkhtml.c: Rewrite copy-and-paste handling with GtkClipboard instead
704
of selection_XX event.
706
2007-09-14 Akira TAGOH <akira@tagoh.org>
710
* gtkhtml.c (gtk_html_im_commit_cb): Move the cursor within only
711
the preedit string regardless of what PangoLogAttr decides.
712
(gtk_html_im_preedit_changed_cb): likewise.
713
(gtk_html_im_delete_surrounding_cb): likewise.
715
* htmlobject.c (html_object_class_init): Add new methods,
716
cursor_forward_one and cursor_backward_one that is supposed to exactly
717
move the cursor by one character.
718
(html_object_cursor_forward_one): New function.
719
(html_object_cursor_backward_one): New function.
721
* htmlcursor.c (forward): Add an argument to change the behavior of
722
forward a cursor according to it.
723
(html_cursor_forward_one): New function to move forward exactly by one
725
(backward): Add an argument to change the behavior of backward
726
a cursor according to it.
727
(html_cursor_backward_one): New function to move backward exactly by
729
(html_cursor_exactly_jump_to): New function that doesn't adjust
730
the cursor position against PangoLogAttr. this function will be useful
731
when the cursor position exactly has to be moved with the given offset.
732
(html_cursor_exactly_jump_to_position): New function that doesn't
733
adjust the cursor position against PangoLogAttr. this function will be
734
useful when the cursor position exactly has to be moved to the given
736
(html_cursor_exactly_jump_to_position_no_spell): likewise the above but
739
2007-08-24 Matthew Barnes <mbarnes@redhat.com>
743
* htmltext.c: Implement cursor_forward, cursor_backward, and
745
* htmlcursor.c: Pass an engine to forward/backward functions.
746
* htmlobject.[ch]: Add an HTMLEngine parameter to cursor_forward and
747
cursor_backward methods. Add a backspace method.
748
* htmlengine-edit-cut-and-paste.c (html_engine_delete_n):
749
Delete key deletes entire glyph, backspace deletes a vowel.
750
Patch from Akira TAGOH.
752
2007-08-24 Irene Huang <Irene.Huang@sun.com>
756
* htmlengine-edit-table.c: (html_engine_delete_table_column),
757
(html_engine_get_table_start_end_cells),
758
(html_engine_delete_table_row): When html selection is active, delete
759
all the selected rows/columns instead of one.
761
2007-08-23 Matthew Barnes <mbarnes@redhat.com>
763
* htmlengine-print.c (print_page):
764
Fix a regression in the deprecated printing API (#446894).
766
2007-08-23 Rohini S <srohini@novell.com>
770
* htmltokenizer.c (html_tokenizer_init), (end_tag), (in_space_or_tab),
771
(html_tokenizer_tokenize_one_char): Modified _HTMLTokenizerPrivate struct
772
to include a new boolean member variable aTag which checks if the tokenizer
773
is currently parsing a Link. The functions are modified to escape HTML
776
2007-08-09 Irene Huang <Irene.Huang@sun.com>
780
* htmlrule.c: (fit_line): If o->percent (percent value of the rule object)
781
is 0, change the width according to the number of pixels:(HTMLRule *)o->length.
783
2007-08-09 Milan Crha <mcrha@redhat.com>
785
** Fix for bug #426496
787
* htmlembedded.c: (destroy):
788
Unref widget after ref_sink it to get rid of it.
790
* gtkhtml.c: (scroll_command): Removed compiler warning.
792
2007-07-27 Matthew Barnes <mbarnes@redhat.com>
795
Remove the non-PANGO_1_5_OR_HIGHER code since we currently
796
require Pango 1.16 or higher. (#380534)
798
2007-07-03 Matthew Barnes <mbarnes@redhat.com>
800
** Fixes part of bug #446894
802
* gtkhtml.[ch] (gtk_html_print_operation_run):
803
New API uses the given GtkPrintOperation to print a document.
804
Just calls html_engine_print_operation_run().
807
Define new callback function typedefs for use with
808
gtk_html_print_operation_run().
810
* htmlengine.c (html_engine_realize), (html_engine_unrealize),
811
(thaw_idle): Don't assume painter is an HtmlGdkPainter.
813
* htmlengine-print.[ch]:
814
Add html_engine_print_operation_run().
815
Merge html_engine_print() and html_engine_print_with_header_footer().
816
Other cosmetic cleanups.
819
Remove the SCALE_PANGO_TO_GNOME_PRINT() macro.
820
Remove html_printer_coordinates_to_gnome_print(); use the
821
SCALE_ENGINE_TO_GNOME_PRINT() macro instead.
822
Remove margin calculation functions; the margins have already been
823
accounted for in the Cairo context returned by GtkPrintContext.
824
Call pango_units_to_double() instead of using the
825
SCALE_PANGO_TO_GNOME_PRINT() macro.
826
Other cosmetic cleanups.
828
2007-07-03 Yi Jin <yi.jin@sun.com>
830
* htmlengine-edit-cut-and-paste.c: (html_engine_cut):
831
Emit delete signal when cut text.
834
2007-07-03 Yi Jin <yi.jin@sun.com>
836
* gtkhtml.c: (add_bindings):
837
When press control+shift+left/right, emit caret_moved signal.
840
2007-06-18 Milan Crha <mcrha@redhat.com>
842
* Fix for bug #443219
844
* htmlframeset.c: (calc_dimension): Added test on non-NULL dim and
845
span, span is NULL when no inner frame is defined.
847
2007-06-16 Srinivasa Ragavan <sragavan@novell.com>
849
** Added support for magic spacebar to browse till end of the document
850
and return status if end is reached.
853
* gtkhtml-properties.c:
854
* gtkhtml.c: (scroll), (scroll_command), (command), (add_bindings):
856
2007-04-20 Yi Jin <yi.jin@sun.com>
859
* gtkhtml.c: (cursor_move), (add_bindings):
861
Make message "object:text-caret-moved" generated when
862
user hits left/right key with shift key held down.
864
2007-04-20 Srinivasa Ragavan <sragavan@novell.com>
866
* htmltext.c: Fix for bug #331813 from Gilles Dartiguelongue
867
for fixing the url highlighting.
869
2007-04-20 Srinivasa Ragavan <sragavan@novell.com>
871
* htmlengine.c: (element_parse_hr): Fix for bug #420493 from Ebby
874
2007-04-18 simon.zheng <simon.zheng@sun.com>
878
* htmlclueflow.c: (search_text):
879
* htmlsearch.c: (html_search_new):
880
Support searching UTF-8 strings.
882
2007-04-16 Kjartan Maraas <kmaraas@gnome.org>
884
* htmlengine.c: (html_engine_focus): Initialize some
885
variables that need it. Patch from nix at go-nix ca.
888
2007-04-16 Kjartan Maraas <kmaraas@gnome.org>
890
* htmlengine-search.c: (html_engine_search),
891
(html_engine_search_next):
892
* htmlsearch.c: (html_search_new): Avoid dereferencing
893
NULL pointers in searches. Patch from nix at go-nix ca.
896
2007-04-16 Kjartan Maraas <kmaraas@gnome.org>
898
* gtkhtml.c: (key_press_event): Emit LINK_CLICKED
899
*after* setting the link as visited. Fixes a crash.
900
Patch from nix at go-nix ca. Bug #410317.
902
2007-04-16 Kjartan Maraas <kmaraas@gnome.org>
904
* htmlengine.c: (html_engine_parse): Clear the selection
905
after destroying the current document. Patch from
906
nix at go-nix ca. Bug #410317.
908
2007-04-16 Kjartan Maraas <kmaraas@gnome.org>
910
* gtkhtml.c: (unrealize): Detach IMContext when
911
the GtkHTML widget is unrealized. Patch from
912
nix at go-nix ca. Bug #410317.
914
2007-04-16 Kjartan Maraas <kmaraas@gnome.org>
916
* htmlengine.c: (html_engine_parse): Set the engine's
917
focus object to NULL in html_engine_parse(). Patch from
918
nix at go-nix ca. Bug #410317.
920
2007-04-16 Kjartan Maraas <kmaraas@gnome.org>
922
* gtkhtml.c: (destroy): Unref the IM context in ::destroy
923
Patch from nix at go-nix ca. Bug #410317.
925
2007-04-03 Sankar P <psankar@novell.com>
927
* htmlobject.c: (html_object_get_cursor):
928
On Caret mode, message scrolls to the bottom of the list.
929
Fixes #374869 and a few duplicates.
931
2007-03-12 Harish Krishnaswamy <kharish@novell.com>
933
* Makefile.am : Fix for #401970 committed after approval from
936
2007-02-27 Matthew Barnes <mbarnes@redhat.com>
940
* testgtkhtml.c (draw_page_cb): pango_language_get_default() is too
941
new to be using just yet. Use gtk_get_default_langage() instead.
943
2007-02-26 Matthew Barnes <mbarnes@redhat.com>
947
* Makefile.am: Re-enable testgtkhtml.
949
* testgtkhtml.c: Make printing work again.
953
2007-02-26 Srinivasa Ragavan <sragavan@novell.com>
956
* htmltext.c: Patch from Gilles Dartiguelongue
958
2007-02-12 Kjartan Maraas <kmaraas@gnome.org>
960
* htmlcursor.c: Add missing include.
961
* htmlstyle.c: Same here.
963
2007-02-12 Srinivasa Ragavan <sragavan@novell.com>
965
** Printer fixes from Ebby Wiselyn and Removal of libgnomeprint*
966
dependency from Matthew Barnes.
968
* Makefile.am: Temprorary comment of testgtkhtml
969
* gtkhtml-embedded.h:
974
* htmlengine-print.c: (print_with_header_footer):
975
* htmlengine-print.h:
976
* htmlprinter.c: (printer_get_page_height),
977
(printer_get_page_width), (get_lmargin), (get_rmargin),
978
(get_tmargin), (get_bmargin), (finalize), (begin), (end),
979
(prepare_rectangle), (do_rectangle), (draw_border),
980
(draw_background), (print_pixbuf), (draw_pixmap), (fill_rect),
981
(draw_lines), (draw_glyphs), (draw_embedded), (html_printer_init),
985
* test.c: (print_cb): Commented out print code temprorarily.
987
2007-02-12 Srinivasa Ragavan <sragavan@novell.com>
989
reviewed by: <delete if not using a buddy>
992
* gtkhtml-embedded.h:
997
* htmlengine-print.c: (print_with_header_footer):
998
* htmlengine-print.h:
999
* htmlprinter.c: (printer_get_page_height),
1000
(printer_get_page_width), (get_lmargin), (get_rmargin),
1001
(get_tmargin), (get_bmargin), (finalize), (begin), (end),
1002
(prepare_rectangle), (do_rectangle), (draw_border),
1003
(draw_background), (print_pixbuf), (draw_pixmap), (fill_rect),
1004
(draw_lines), (draw_glyphs), (draw_embedded), (html_printer_init),
1008
* test.c: (print_cb):
1010
2007-02-10 Kjartan Maraas <kmaraas@gnome.org>
1012
* gtkhtml-embedded.c: (gtk_html_embedded_finalize):
1013
* gtkhtml-properties.c: (get_locale_language),
1014
(gtk_html_cursor_skip_get_type), (gtk_html_command_get_type):
1015
* gtkhtml.c: (get_font_options),
1016
(gtk_html_get_paragraph_alignment), (gtk_html_build_with_gconf):
1017
* htmlclueh.c: (html_clueh_init):
1018
* htmlcluev.c: (remove_aligned_by_parent), (relayout),
1020
* htmlembedded.c: (html_embedded_object_changed):
1021
* htmlengine-edit-tablecell.c:
1022
* htmlengine-print.c: (print_with_header_footer):
1023
* htmlengine.c: (html_element_push):
1025
* htmlobject.c: (calc_min_width), (calc_preferred_width),
1027
* htmlprinter.c: (get_rmargin), (get_tmargin):
1028
* htmlstringtokenizer.c: (html_string_tokenizer_tokenize):
1029
* htmltype.c: (build_type_names_table):
1031
* test-suite.c: (get_plain):
1032
* testgtkhtml.c: (resize_cb):
1033
Fix a bunch of warnings from sparse:
1034
- ANSIfication of function declarations
1035
- Remove some unused code
1036
- Return something from get_tmargin()
1037
- NULL vs 0/FALSE fixes
1038
- Make some things static
1040
2007-01-30 Kjartan Maraas <kmaraas@gnome.org>
1042
* htmltext.c: Fix warnings introduced by the sip patch.
1044
2007-01-30 Kjartan Maraas <kmaraas@gnome.org>
1046
* htmlengine.c: (current_alignment), (insert_text):
1047
Fix spacing issues. Patch from nix@go-nix.ca. Closes
1050
2007-01-29 Kjartan Maraas <kmaraas@gnome.org>
1052
* htmltext.c: Support SIP/H.323 addresses. Patch from
1053
Gilles Dartiguelongue. Closes bug 331813.
1055
2007-01-29 Kjartan Maraas <kmaraas@gnome.org>
1057
* htmltable.c: (destroy), (copy_sized):
1058
* htmltablecell.c: (destroy), (copy), (html_table_cell_class_init):
1059
Fix crash with copying a table that has bgimage set. Patch from
1060
Chris Heath. Closes bug 362194.
1062
2007-01-29 Kjartan Maraas <kmaraas@gnome.org>
1064
* htmlsearch.c: (html_search_destroy):
1065
Fix a leak. Patch from Chris Heath. Closes bug 338884.
1067
2007-01-28 Matthew Barnes <mbarnes@redhat.com>
1069
** Fixes bug #394182 ("Massive Code Cleanup")
1072
Use g_object_ref_sink() instead of gtk_object_sink().
1078
* htmlengine-edit-text.c:
1079
* htmlengine-save.c:
1087
Fix some compiler warnings.
1091
* htmlengine-edit-cursor.c:
1092
* htmlengine-edit-selection-updater.c:
1095
Use g_idle_add() instead of gtk_idle_add().
1096
Use g_timeout_add() instead of gtk_timeout_add().
1097
Use g_source_remove() instead of gtk_idle_remove().
1098
Use g_source_remove() instead of gtk_timeout_remove().
1100
* testgtkhtml.c: Rewrite toolbar construction to use GtkToolItem.
1102
2007-01-25 Kjartan Maraas <kmaraas@gnome.org>
1104
* gtkhtml-stream.c: (gtk_html_stream_vprintf): Fix off by one
1105
in allocation. Patch from John N. Laliberte. Closes bug #373092.
1107
2007-01-22 Srinivasa Ragavan <sragavan@novell.com>
1109
** Commiting Ebby's patch for GtkPrintMigration.
1112
* gtkhtml.c: (gtk_html_print_page),
1113
(gtk_html_print_page_with_header_footer),
1114
(gtk_html_print_page_get_pages_num):
1116
* htmlengine-print.c: (print_header_footer), (print_page),
1117
(print_all_pages), (print_with_header_footer), (html_engine_print),
1118
(html_engine_print_with_header_footer),
1119
(html_engine_print_get_pages_num):
1120
* htmlengine-print.h:
1121
* htmlprinter.c: (insure_config), (printer_get_page_height),
1122
(printer_get_page_width), (get_lmargin), (get_rmargin),
1123
(get_tmargin), (get_bmargin),
1124
(html_printer_coordinates_to_gnome_print), (finalize), (begin),
1125
(end), (set_pen), (prepare_rectangle), (do_rectangle),
1126
(set_clip_rectangle), (draw_line), (draw_border),
1127
(draw_background), (print_pixbuf), (draw_pixmap), (fill_rect),
1128
(draw_lines), (draw_glyphs), (draw_embedded), (html_printer_new),
1129
(html_printer_get_page_height):
1131
* test.c: (print_cb):
1133
2007-01-05 Chris Heath <chris@heathens.co.nz>
1135
** Fix for bug #360393
1137
* htmlengine-edit-fontstyle.c (html_engine_get_document_color):
1138
Be consistent about reffing the return value;
1139
(html_engine_update_insertion_color): Fix memory leak
1140
* htmlengine-edit-table.c (delete_cells_undo_destroy): Ditto
1141
* htmlengine-edit.c (html_engine_set_mark): Ditto
1142
* htmlengine.c (html_engine_finalize): Ditto
1143
* htmlmap.c (html_map_destroy): Ditto
1145
2006-12-03 Matthew Barnes <mbarnes@redhat.com>
1147
** Fixes bug #353424
1149
* htmltokenizer.c: (html_tokenizer_finalize)
1150
Chain up to parent class.
1152
2006-11-06 Srinivasa Ragavan <sragavan@novell.com>
1154
** Fix for bug #350981
1156
* htmlgdkpainter.c: (begin): Unref if not null, instead of asserting.
1158
2006-10-13 Harish Krishnaswamy <kharish@novell.com>
1160
* htmlentity.[ch]: Set the license terms to LGPL fixing
1161
an inadvertent error that had existed all along.
1163
2006-08-28 Theppitak Karoonboonyanan <thep@linux.thai.net>
1165
* gtkhtml.c (gtk_html_im_retrieve_surrounding_cb),
1166
(get_surrounding_text): Fix crasher, string concatenation, and memory
1167
leak. Also convert char offset to byte offset as required by
1168
gtk_im_context_set_surrounding().
1170
Fixes bug #270248, #353192.
1172
2006-08-22 Srinivasa Ragavan <sragavan@novell.com>
1174
** Fix for bug #334205
1176
* Makefile.am: Patch from Mikhail Zabaluev to fix undefined symbol in
1179
2006-02-28 Rohini S <srohini@novell.com>
1181
* htmltext.c (html_text_calc_part_width): Fix a critical warning
1185
2006-08-17 Kjartan Maraas <kmaraas@gnome.org>
1187
* gtkhtml.c (get_font_options), (client_notify_spell_widget):
1190
2006-07-31 Bastien Nocera <hadess@hadess.net>
1192
reviewed by: Veerapuram Varadhan <vvaradhan@novell.com>
1194
* htmltext.c: Add "'" (single quote) as a possible character in
1199
2006-07-31 Bj�rn Lindqvist <bjourne@gmail.com>
1201
Reviewed by Harish Krishnaswamy <kharish@novell.com>
1203
* htmltext.c: (save), (update_index_interval),
1204
(append_selection_string), (html_text_set_text):
1205
Mop compiler warnings. Fixes #335072.
1207
2006-06-15 Nancy Cai <nancy.cai@sun.com>
1210
* htmltext.c: (html_text_prepare_attrs): Correct display direction
1213
2006-07-24 Harish Krishnaswamy <kharish@novell.com>
1215
* gtkhtml.c: (get_font_options): Handle cases when the
1216
props are undefined. This bug is currently causing Evo
1217
to crash as soon as it comes up.
1219
2006-07-06 Andre Klapper <a9016009@gmx.de>
1221
* htmlengine-edit-fontstyle.c:
1222
(html_engine_get_document_font_style),
1223
(html_engine_set_font_style): Fix for #327326, again.
1225
2006-07-06 Andre Klapper <a9016009@gmx.de>
1227
* htmlengine-edit-fontstyle.c:
1228
(html_engine_get_document_font_style),
1229
(html_engine_set_font_style): Fix for #327326.
1230
Patch submitted by srohini@novell.com and
1231
vvaradhan@novell.com.
1233
2006-06-12 Rohini S <srohini@novell.com>
1235
* gtkhtml.c (add_bindings): Key bindings for Tables changed
1239
2006-06-12 Rohini S <srohini@novell.com>
1243
* htmlclueflow.c (html_clueflow_real_get_direction): Remove direction association
1246
2006-06-08 Rohini S <srohini@novell.com>
1248
* htmlclueflow.c (get_start_indent_item): Check Unordered lists too.
1252
2006-06-08 Sebastien Bacher <seb128@debian.org>
1254
* htmltext.c: Fixing glyph representation of Tab.
1255
Fixes bug #334873. (Committed by Andre Klapper)
1257
2006-04-26 Li Yuan <li.yuan@sun.com>
1259
* htmlobject.c: (move_object_downtree_cursor):
1260
The second htmlobject in a clue could be a clue too, so we need
1261
a recursive function.
1265
2006-04-24 Harish Krishnaswamy <kharish@novell.com>
1267
* gtkhtml.c: (gtk_html_im_commit_cb):
1268
Fixes #321310. Patch submitted by Hiroyuki Ikezoe
1269
<poincare at ikezoe dot net>
1271
2006-04-24 Chris Heath <chris@heathens.co.nz>
1273
* htmlengine.c (element_parse_object), (element_parse_cell),
1274
(set_object_data): Fix memory leaks
1275
* htmlcursor.c (html_cursor_beginning_of_paragraph),
1276
(html_cursor_end_of_paragraph): ditto
1277
* gtkhtml.c (button_press_event): ditto
1278
* htmlstyle.c (html_style_free): ditto
1280
2006-04-05 Jeff Cai <jeff.cai@sun.com>
1282
* htmlengine-edit-cut-and-paste.c: (remove_empty_and_merge):
1283
Clone glist in case that it is be freed twice.
1287
2006-03-25 Andreas K�hler <andi5.py@gmx.net>
1289
* htmlprinter.c: fix typo to enable printing of embedded objects
1290
in gnucash. Fixes bug #332884. (Committed by Andre Klapper)
1292
2006-03-22 Andreas K�hler <andi5.py@gmx.net>
1294
* htmlengine.c: fix assigning height attributes of <object>s and
1295
<iframe>s. Fixes bug #330017. (Committed by Andre Klapper)
1297
2006-03-08 Jeff Cai <jeff.cai@sun.com>
1299
* htmlselection.c: (html_engine_is_selection_active):
1300
No need to check before the function returns.
1304
2006-03-01 Srinivasa Ragavan <sragavan@novell.com>
1306
* gtkhtml.c: (setup_class_properties), (next_uri),
1307
(new_img_obj_from_uri), (init_properties_widget): Commited Tor's patch
1308
for solving build break
1310
2006-02-28 Kjartan Maraas <kmaraas@gnome.org>
1312
* gtkhtml.c: (button_press_event), (get_selection_string),
1313
(gtk_html_class_init), (init_properties_widget):
1314
* gtkhtmldebug.c: (gtk_html_debug_dump_object):
1315
* htmlbutton.c: (html_button_init):
1316
* htmlcheckbox.c: (html_checkbox_init):
1317
* htmlclue.c: (split):
1318
* htmlclueflow.c: (html_clueflow_get_halignment), (draw_item),
1319
(get_start_indent_item), (write_flow_tag), (save_plain),
1320
(html_clueflow_set_halignment):
1321
* htmlcursor.c: (html_cursor_up), (html_cursor_down):
1322
* htmlembedded.c: (html_embedded_real_calc_size):
1323
* htmlengine-edit-cursor.c: (html_engine_draw_image_cursor):
1324
* htmlengine-edit-cut-and-paste.c: (point_get_parent_list),
1326
* htmlengine-edit-fontstyle.c: (get_font_style_from_selection):
1327
* htmlengine-edit.c: (html_engine_fill_pre_line):
1328
* htmlengine-save.c: (get_body):
1329
* htmlengine.c: (insert_text), (element_parse_object),
1330
(element_parse_iframe), (element_parse_meta), (element_parse_li),
1331
(html_engine_set_property), (html_engine_timer_event),
1332
(html_engine_get_spell_word):
1333
* htmlframe.c: (html_frame_init):
1334
* htmlhidden.c: (html_hidden_class_init):
1335
* htmliframe.c: (op_copy), (save):
1338
* htmlprinter.c: (draw_pixmap):
1339
* htmlradio.c: (html_radio_init):
1340
* htmlselect.c: (html_select_init), (html_select_set_text):
1341
* htmltablecell.c: (draw_background_helper):
1343
* htmltext.c: (html_text_prepare_attrs):
1344
* htmltextarea.c: (html_textarea_init):
1345
* htmltextinput.c: (html_text_input_init):
1346
* htmltextslave.c: (split), (draw), (html_text_slave_init):
1347
* test-stress.c: (test_level_1):
1348
* testgtkhtml.c: (goto_url):
1349
Various cleanups of warnings from the Intel C/C++ compiler:
1351
- Remove redundant break; statements and semi-colons
1352
- Remove unused variables
1353
- Remove unused static functions
1354
- Remove redundant prototypes
1355
- Add some NULL checks
1356
- Mark some functions and data as static
1357
- Use guint for 1-bit bitfields
1358
- Fix some cases of local variables shadowing stuff with wider scope
1359
- Remove checks for <= 0 on unsigned int.
1361
2006-02-27 Rohini S <srohini@novell.com>
1363
* htmlengine.c (new_parse_body, parse_one_token):
1364
Functions modified not to parse html tags in a <TEXTAREA> block.
1368
2006-02-22 Rohini S <srohini@novell.
1370
* gtkhtml.c (gtk_html_toggle_font_style): Can toggle font style only in html
1374
2006-02-21 Rohini S <srohini@novell.
1376
* gtkhtml.c (command): Resets IMContext before selection.
1380
2006-02-16 Rohini S <srohini@novell.com>
1382
* gtkhtml.c (drag_data_received, new_img_obj_from_uri): Function modified to
1383
add images to editor in html mode during DnD.
1387
2006-02-21 Rohini S <srohini@novell.com>
1389
* htmltext.c: Changed regular expression to match sftp url's too.
1394
2006-02-15 Rohini S <srohini@novell.com>
1396
* htmlsearch.c (html_search_new): Function modified to include offset zero too.
1400
2006-02-06 Simon Zheng <simon.zheng@sun.com>
1402
* htmlundo.c (action_do_and_destroy_redo): As undo_used stack is
1403
possibly empty, check validity at first. Fixes bug #327850
1405
2006-02-09 Irene Huang <Irene.Huang@sun.com>
1409
* htmlcursor.c: (move_right): Add code to handle cursor movements when
1410
cursor->object->parent is NULL.
1412
2006-02-09 Irene Huang <Irene.Huang@sun.com>
1416
* htmlcursor.c: (html_cursor_down): Check the direction
1417
of text (Change the value of dir) even if new_line is not found.
1419
2006-02-06 Veerapuram Varadhan <vvaradhan@novell.com>
1421
** Fixes bug #326366
1423
* gtkhtml.c: Make sure gconf_client is not NULL. G_CRITICAL warning fix.
1425
2006-02-06 Irene Huang <Irene.Huang@sun.com>
1429
* htmlclue.c: (op_helper): Change if ((o == NULL)
1430
&& (last == NULL)) to if ((o == NULL) || (last == NULL))
1432
2006-01-20 Rohini S <srohini@novell.com>
1434
* htmlengine.c (element_parse_tr): Function modified to set
1435
valign attribute correctly.
1439
2006-01-20 Rohini S <srohini@novell.com>
1441
* htmlengine-edit-cut-and-paste.c (html_engine_insert_empty_paragraph):
1442
Sets paragraph style to normal if previous paragraph is a heading.
1446
2006-01-16 Rohini S <srohini@novell.com>
1448
* htmlengine.c (element_parse_table): Modified to reset padding value to
1453
2006-01-17 Rohini S <srohini@novell.com>
1455
* gtkhtml.c (add_bindings): Key bindings Shift + Enter,
1456
Shift + Return also set to Insert Paragraph
1460
2006-01-16 Srinivasa Ragavan <sragavan@novell.com>
1462
** Fixes bug #256142 (Committing Rohini's patch)
1464
* htmltext.c: Changed the regular expression for url.
1466
2006-01-05 Veerapuram Varadhan <vvaradhan@novell.com>
1468
Committing for Rohini <srohini@novell.com>
1470
* htmlengine.c (html_engine_spell_word): Function modified to
1475
2005-10-22 Kaushal Kumar <kakumar@novell.com>
1477
* htmlprinter.c (draw_border): Do not draw peripheral border since
1478
it is not needed and causes alignment issue.
1482
2005-09-26 Kaushal Kumar <kakumar@novell.com>
1484
* htmltext.c (html_text_sanitize): Fix C89 build break due to a
1485
C99 style variable declaration.
1487
Patch by: Jens Granseuer
1490
2005-09-21 Kaushal Kumar <kakumar@novell.com>
1492
* htmlengine-edit.c (html_engine_selection_push),
1493
(html_engine_selection_pop), (html_engine_selection_stack_top),
1494
(html_engine_selection_stack_top_modify): Clean-up selection stack
1497
Patch by: Owen Taylor (otaylor@redhat.com)
1500
2005-09-11 Tor Lillqvist <tml@novell.com>
1502
* gtkhtml.c (gtk_html_filename_to_uri,
1503
gtk_html_filename_from_uri): New functions. Like
1504
g_filename_to_uri() and _from_uri(), except also accept
1505
non-absolute filenames and URIs pointing to such. As far as I know
1506
relative file: URIs should *not* contain the file: scheme prefix,
1507
or any hostname including slashes around hostname. But accept URIs
1508
like file:foo.bar, or even foo:/dir/path/foo.bar anyway for
1509
backward compatibility. URI-encode and decode. Handle drive
1511
(main) Unit test (obvously not compiled normally, copy-paste to a
1514
* gtkhtml-private.h: Declare above new functions.
1516
* htmlurl.c (host_url_new): On Win32, skip slash in front of drive
1519
* testgtkhtml.c: Use stdio wrapper to open file. Use binary mode
1520
on Win32. Use gtk_html_filename_from_uri() instead of just
1521
stripping away the file: prefix. Use f_filename_to_uri() instead
1522
of just prefixing file:.
1529
* testgtkhtml.c: Use g_ascii_strcasecmp() for portability and
1530
well-definedness instead of strcasecmp(). Ditto for
1531
g_ascii_strncasecmp() instead of strncasecmp().
1533
2005-08-23 Not Zed <NotZed@Ximian.com>
1535
* test-suite.c (plain_save_receiver): use right type for len.
1537
* gtkhtml.c (drag_data_get): use right type for g_convert.
1539
2005-01-11 Not Zed <NotZed@Ximian.com>
1541
* Makefile.am: put the version in pkgconfig_DATA and remove the
1542
install-data-hook. This was breaking on amd64 systems with a
1545
2005-08-22 David Malcolm <dmalcolm@redhat.com>
1547
* gtkhtml.c (gtk_html_im_retrieve_surrounding_cb): Remove assumption
1548
about order of evaluation of arguments; fix warning.
1550
2005-08-22 Kaushal Kumar <kakumar@novell.com>
1552
* gtkhtml.c (motion_notify_event): Fetch the mouse motion coordinates
1553
directly since the hint usage is broken.
1555
Patch by: Srinivasa Ragavan.
1558
2005-08-22 Kaushal Kumar <kakumar@novell.com>
1560
* htmlengine.c (element_parse_li): Push the list item display type as
1561
DISPLAY_LIST_ITEM instead of DISPLAY_BLOCK.
1565
2005-08-22 Tor Lillqvist <tml@novell.com>
1567
* Makefile.am: Include dllmain.c on Win32. Pass all the pathname
1568
defines in AM_CFLAGS so the path mangling in dllmain.c can use
1571
* dllmain.c: New file. Contains the run-time path construction
1572
mechanism used on Win32.
1574
* gtkhtml-private.h: On Win32 redefine the compile-time pathname
1575
macros as calls to the functions in dllmain.c instead.
1577
* gtkhtml.c (gtk_html_class_init): Construct filename to parse at
1578
run-time, as PREFIX expands to a function call on Win32.
1580
* htmlengine-edit-cut-and-paste.c (use_pictograms): Construct
1581
filename at run-time. Use g_filename_to_uri() to construct the URI
1582
instead of just prefixing with file://, which doesn't work for
1583
Win32 file: URIs which look like file:///c:/foo/bar/tem.png.
1585
2005-08-19 Kaushal Kumar <kakumar@novell.com>
1587
* htmlengine.c (element_parse_object): Redirect commandline spew as debug log.
1589
Patch by: Julien Gilli.
1592
2005-08-17 Mengjie Yu <meng-jie.yu@sun.com>
1594
* htmltext.c: (html_text_prepare_attrs),
1595
(html_text_get_pango_info):
1597
Change function name prepare_attrs to html_text_prepare_attrs and make it
1598
a new public API. We will call it in a11y part.
1602
2005-08-16 Kaushal Kumar <kakumar@novell.com>
1604
* gtkhtml-stream.c (gtk_html_stream_vprintf): Some clean-ups.
1606
2005-08-12 Kaushal Kumar <kakumar@novell.com>
1608
* gtkhtml-stream.c (gtk_html_stream_vprintf): Use g_strdup_vprintf instead of
1609
g_printf_string_upper_bound since the latter returns incorrect values.
1611
Fixes tasks and contact list dump in evolution.
1614
2005-08-05 Kaushal Kumar <kakumar@novell.com>
1616
* htmlengine-edit.c (html_engine_get_insert_level_for_object): Advance clue
1617
to next level to fix infinite looping for cursor level.
1621
2005-08-03 Kaushal Kumar <kakumar@novell.com>
1623
* htmlengine-edit-cut-and-paste.c (check_for_simple_containers): Fix the
1624
handling of simple deletion of text from table cells.
1626
Fixes bugs #300130, 309174.
1628
2005-07-11 Diego Gonzalez <diego@pemas.net>
1630
* htmldrawqueue.c (clear_element_destroy): replace deprecated
1631
gdk_pixbuf_unref call and use g_object_unref instead.
1632
* htmlgdkpainter.c (draw_pixmap): ditto
1633
* htmlimage.c (html_image_factory_free): ditto
1635
2005-07-07 Kjartan Maraas <kmaraas@gnome.org>
1637
* htmlclueflow.c: (write_item_marker): Plug a leak
1639
2005-07-11 Kaushal Kumar <kakumar@novell.com>
1641
* htmlpainter.c (html_painter_set_widget): Call the set_widget directly
1642
instead of returning it.
1643
Patch from Damien Carbery. Fixes bug #309785.
1645
2005-07-06 Mengjie Yu <meng-jie.yu@sun.com>
1647
* gtkhtml.c: (gtk_html_class_init):
1649
Change the signal name object_deleted to object_delete.
1651
* htmlengine-edit-cut-and-paste.c: (html_engine_delete):
1652
We should emit the object_delete signal before we really delete it
1653
since gnopernicus will check them before deleting.
1657
2005-07-06 Kaushal Kumar <kakumar@novell.com>
1659
* gtkhtml.c (gtk_html_class_init): Fix typo. Fixes bug #309242.
1661
2005-05-03 Srinivasa Ragavan <sragavan@novell.com>
1663
* gtkhtml.c (selection_received), (drag_data_received):
1664
Added code to support DnD of evolution mail, contacts, calendar,
1667
2005-05-19 Changwoo Ryu <cwryu@debian.org>
1669
* htmlclueflow.c: function search_text(..) pass a non negative value to
1670
g_utf8_offset_to_pointer call.
1671
* htmlsearch.c : function html_search_new (..)Set the cursor position
1672
to 0 if it is negative.
1674
2005-05-17 Changwoo Ryu <cwryu@debian.org>
1676
* Makefile.am (INCLUDES): use I18N_LIB_CFLAGS.
1677
* htmlgdkpainter.c: include <glib/gi18n-lib.h> instead of
1678
<glib/gi18n.h> to specify the translation domain explicitly.
1679
* htmlengine-print.c: likewise.
1680
* htmlbutton.c: likewise.
1681
* html-component.c: likewise.
1682
* htmlembedded.c: likewise.
1683
* htmlrule.c: likewise.
1684
* gtkhtml-properties.c: likewise.
1685
* gtkhtml.c: likewise.
1689
2005-05-17 Radek Doulik <rodo@novell.com>
1691
* gtkhtml.c (gtk_html_get_url_at): new helper function to get url
1693
(gtk_html_get_cursor_url): new helper function to get url of
1695
(gtk_html_set_tokenizer): new helper function to set tokenizer for
1698
* Makefile.am: moved private .h files to sources so that they
1701
2005-05-11 Mengjie Yu <meng-jie.yu@sun.com>
1703
* htmlengine-edit-table.c: (delete_column_undo_action),
1704
(delete_column_setup_undo), (html_table_delete_column),
1705
(delete_row_undo_action), (delete_row_setup_undo),
1706
(html_table_delete_row):
1707
Make sure we can get right table object before Undo.
1711
2005-05-04 Ganesh <rganesan@novell.com>
1713
* htmltext.c (prepare_attrs): checking for FALSE instead of 0
1715
* htmltext.c (html_text_append): Passing FALSE to initialize the link
1716
structure visited flag.
1718
* htmltext.c (html_text_add_link_full): Passing FALSE to initialize the
1719
link structure visited flag.
1721
* htmltext.c (html_link_dup): Initialize the is_visited flag while dup.
1723
* htmltext.c (html_link_new): Initialize the is_visited flag for new link.
1725
* htmltext.h : Changed declarion of html_link_new() function.
1727
2005-05-05 Radek Doulik <rodo@novell.com>
1729
* htmlengine-save.c (html_engine_save_buffer_free): make it
1730
possible to get the buffer string from freed buffer, for that pass
1731
FALSE as string_free. it works similar to g_string_free
1733
* gtkhtml-enums.h: added GTK_HTML_COMMAND_IS_SELECTION_ACTIVE
1735
* gtkhtml-properties.c: added GTK_HTML_COMMAND_IS_SELECTION_ACTIVE
1737
* gtkhtml.c: added GTK_HTML_COMMAND_IS_SELECTION_ACTIVE
1738
(get_selection_string): new helper function to get selection
1739
string for text/html or text/plain
1740
(gtk_html_get_selection_html): new method to get text/html
1741
selection from gtkhtml
1743
2005-05-04 Ganesh <rganesan@novell.com>
1745
* htmltext.c (html_text_set_link_visited): new function to set the
1748
* htmltext.c (html_text_change_set): new function to set change to
1749
text and all its slaves
1751
* gtkhtml.c (key_press_event): call the html_set_link_visited function
1752
to set the flag for key press (Enter key).
1754
* gtkhtml.c (button_release_event): call the html_set_link_visited function
1755
to set the flag for mouse click.
1757
* htmlcolorset.c (html_colorset_new): set the clink color to red.
1759
* htmlcolorset.c (html_colorset_set_style): set the vlink color to red.
1761
* htmltext.c (prepare_attrs) : prepare the pango attribute with appropriate
1764
* htmltext.h : Declare new funciton and variable.
1766
2005-05-03 Radek Doulik <rodo@novell.com>
1768
* htmltextslave.[ch]: removed deprecated glyphs field
1770
* gtkhtml.c (selection_get): free save buffer
1772
* htmlengine.c (element_parse_a): free target before leaving
1774
2005-04-29 Radek Doulik <rodo@novell.com>
1776
* htmlcluev.c (html_cluev_set_style): unref background color
1777
before setting new value we get from style. fix typo where we were
1778
unrefing border color twice instead of freeing background_color
1779
(html_cluev_destroy): added destructor so that we unref colors we
1782
* htmlengine.c (element_parse_html): free the element before
1783
leaving the function
1785
2005-04-28 Radek Doulik <rodo@novell.com>
1787
* htmlengine.c: created new html_element_new constructor and
1788
renamed the old one to html_element_new_parse. make all the places
1789
to call new constructor instead of creating element structure
1790
themselfs. all the uses of html_element_new were updated to use
1791
the html_element_new_parse. removed free_element function and call
1792
html_element_free destructor instead of it.
1794
2005-04-11 Radek Doulik <rodo@novell.com>
1796
* htmlundo.c (html_undo_destroy): destroy lists and levels as well
1797
(level_destroy): use destroy_action_list
1799
* htmltextslave.c (glyph_items_destroy): destroy only non NULL
1800
glyph strings, fix list type
1801
(get_glyph_items_in_range): destroy old list
1802
(clear_glyph_items): cdestroy glyph items and not glyphs list
1803
(destroy): destroy glyph items as well
1805
* htmltext.c (html_text_get_attr_list_list): destroy iterator
1806
(save): destroy iterator
1807
(remove_one): destroy link when it's removed
1809
* htmlinterval.c (do_downtree_lines_intersection): as below
1811
* htmlengine-edit-movement.c
1812
(html_engine_edit_cursor_position_restore): free the link once
1815
* htmlengine-edit-cut-and-paste.c (delete_object_do): destroy all
1817
(insert_object_do): likewise
1819
* gtkhtmldebug.c (gtk_html_debug_list_attrs): destroy iterator
1821
2005-04-06 Radek Doulik <rodo@novell.com>
1823
* added [un]block-selection commands. these are going to be used
1824
from evolution's composer to avoid selection overriding when
1825
changing signature (#36972)
1827
2005-04-07 Tor Lillqvist <tml@novell.com>
1829
Port to Windows, initial commit.
1831
* Makefile.am (libgtkhtml_3_8_la_LDFLAGS): Add -no-undefined.
1832
(libgtkhtml_3_8_la_LIBADD): Add REGEX_LIBS.
1834
* gtkhtml-properties.c (get_locale_language): Use
1835
g_win32_getlocale() on Windows.
1838
* htmlplainpainter.c: Remove unused gdkx.h.
1840
2005-04-04 Yu Mengjie <meng-jie.yu@sun.com>
1842
* gtkhtml.c: (idle_handler), (gtk_html_adjust_cursor_position):
1843
Check whether we have iframe_parent.
1847
2005-03-29 Radek Doulik <rodo@novell.com>
1849
* test-suite.c (test_cursor_around_anchors): added test for cursor
1850
movement around anchors (they do not accpet cursor).
1852
* htmlobject.c (html_cursor_allow_zero_offset): new helper
1853
function, decides whether we can move cursor to 0 offset on object
1854
use html_cursor_allow_zero_offset where approriate
1856
* htmlengine.c (block_end_display_block): add empty flow in case
1859
* htmlcursor.c: make it possible to control cursor debug output by
1860
environment variable
1861
(html_cursor_home): fix typo causing crash
1863
2005-03-26 Yu Mengjie <meng-jie.yu@sun.com>
1865
* gtkhtml.c: (scroll):
1866
we should not scroll gtkhtml widget if caret mode is on.
1870
2005-03-23 Radek Doulik <rodo@novell.com>
1872
* htmlgdkpainter.c (draw_glyphs): maintain fg color unchanged
1873
after and during drawing
1875
2005-03-21 Radek Doulik <rodo@novell.com>
1877
* htmlengine.c (element_parse_cell): set padding to the style
1878
applied on newly created cell
1880
2005-03-16 Radek Doulik <rodo@novell.com>
1882
* whenever getting engine from painter, use html_object_engine to
1883
retrieve the right engine for that object as painters are shared
1884
between different frame level engines
1886
* htmlgdkpainter.c (draw_glyphs): use pen color, only set fg color
1887
if overriden by pango attributes or passed color
1889
* htmltextslave.c (draw_text): set pen color before drawing glyphs
1891
2005-03-15 Radek Doulik <rodo@novell.com>
1893
* htmltext.c (prepare_attrs): add size attributes in case
1894
magnification != 1.0
1896
2005-03-14 Radek Doulik <rodo@novell.com>
1898
* test-suite.c (test_cursor_around_image): added new test for
1899
cursor movement around images
1900
put widget into scrolled window for convenience
1902
* htmltextslave.c (html_text_slave_cursor_left_one): move to
1903
boundary only if there's no prev object
1904
(html_text_slave_cursor_right_one): remove unneeded braces
1906
* htmlcursor.c (move_right): move offset one step forward when
1907
moving between neighbor objects
1909
2005-03-10 Radek Doulik <rodo@novell.com>
1911
* test-suite.c (test_delete_around_table): added new test for
1912
deleting around tables which was broken lately (on 2005-02-03)
1914
* htmlengine-edit-cut-and-paste.c (check_for_simple_delete): use
1915
check_for_simple_containers on object parents rather than on
1916
objects. this fixes deletion when cursor is before/after table.
1917
(check_for_simple_containers): add table cell to simple containers
1918
as they are same sa cluev's
1920
* htmlobject.c (html_object_real_cursor_right): test for RTL
1921
rather than LTR so that DERIVED defaults to LTR
1922
(html_object_real_cursor_left): ditto
1924
* test-suite.c (test_table_cell_parsing): added test to check
1925
correct cell parsing
1927
* htmlengine.c (block_end_cell): call close_flow to avoid empty
1930
2005-03-10 Mengjie Yu <meng-jie.yu@sun.com>
1932
* gtkhtml.c: (gtk_html_set_color):we should pass the insertion_color.
1937
2005-03-07 Radek Doulik <rodo@novell.com>
1939
* htmltext.c (html_text_cursor_next_slave): make sure we handle
1940
the case where there is second or later empty slave
1942
2005-03-07 Radek Doulik <rodo@novell.com>
1944
* htmltextslave.c (html_text_slave_get_left_edge_offset): make
1945
sure offset is in slave boundaries (should not happen with below
1946
fixes anymore, but to be sure)
1948
* htmlcursor.c: pass engine deeper in cursor function so that we
1949
can call object funtions with painter
1951
* htmlobject.c: as below
1953
* htmltext.c: as below
1955
* htmltextslave.c: add painter to cursor movements function
1956
arguments to be able to recalculate items. there was a race
1957
condition where cursor movement happened before line breaks were
1958
recalculated which lead to infinite loop.
1960
2005-03-03 Radek Doulik <rodo@novell.com>
1962
* test-suite.c (test_insert_nested_cluevs): added test for
1963
inserting nested cluevs
1965
* htmlengine-edit.c (html_engine_get_insert_level_for_object): new
1966
helper function, calculates insert level at cursor position for
1967
object. it makes sure that insert level isn't greater than cursor
1970
2005-02-28 Radek Doulik <rodo@novell.com>
1972
* htmltext.c (html_text_direction_pango_to_html): new helper
1973
function to convert pango direction to gtkhtml's html direction
1975
* htmlengine.c: parse BR and P direction attribute
1977
* htmlengine-save.c: save body direction
1979
* htmlengine-edit.c (html_engine_edit_set_direction): new helper
1980
function to set direction to cursor flow
1982
* htmlengine-edit-cut-and-paste.c
1983
(html_engine_insert_empty_paragraph): use keymap direction for new
1986
* htmlclueflow.c: save direction to HTML output
1988
* gtkhtml.c: use keymap_direction signal on keymap to set flow
1989
direction. handle widget's direction changed signal to set body
1992
2005-02-27 Mengjie Yu <meng-jie.yu@sun.com>
1994
* gtkhtml.c: (add_bindings): Handle Sun Type 6 Keyboard's
1995
Undo, Copy, Paste and Cut key.
1999
2005-02-23 Mengjie Yu <meng-jie.yu@sun.com>
2001
* gtkhtml.c: (focus):we need cursor_changed signal even not in
2006
2005-02-22 Mengjie Yu <meng-jie.yu@sun.com>
2008
* htmlengine-edit-cut-and-paste.c: (insert_empty_paragraph):
2009
emit the object_inserted signal when inserting an empty
2014
2005-02-21 Radek Doulik <rodo@novell.com>
2016
* htmltextslave.c (html_text_slave_get_glyph_item_at_offset): add
2017
painter parameter to avoid passing NULL to get glyph items in case
2018
we have painter pointer ready
2019
(html_text_slave_get_glyph_items): recalc glyph items only if
2024
2005-02-18 Radek Doulik <rodo@novell.com>
2026
* htmlcursor.c (html_cursor_down): copy cursor to orig_cursor on
2027
the begin to avoid crashes when copying it back
2030
(test_cursor_left_right_on_lines_boundaries_wo_white): added new
2031
test for moving cursor accros line boundary without white space
2033
* htmltextslave.c (html_text_slave_get_left_edge): move right in
2034
case we are on line boundary without white space
2035
(html_text_slave_get_right_edge): as above, but move left
2037
2005-02-15 Radek Doulik <rodo@novell.com>
2039
* htmltextslave.c (draw_text): scale down run_width to engine
2042
2005-02-11 Radek Doulik <rodo@novell.com>
2044
* htmlclueflow.c (plain_padding): append/prepend space to cite string
2045
(draw_quotes): don't add space width, it's now already in indent width
2046
(get_level_indent): add space width to indent width
2050
2005-02-10 Radek Doulik <rodo@novell.com>
2052
* test-suite.c: added tests for plain save indentation
2054
* htmlclueflow.c (save_plain): fixed plain padding for RTL
2056
2005-02-09 Radek Doulik <rodo@novell.com>
2058
* test-suite.c: added test for outer quotes inside table
2060
* htmlengine.c: push list stack around table parsing
2062
* htmlclueflow.c: fixed margins calculation for RTL
2064
2005-02-08 Harry Lu <harry.lu@sun.com>
2066
* gtkhtml.c: (key_press_event): return correct value.
2067
(gtk_html_class_init): define "command" signal correctly.
2068
(command): return correct value.
2069
* htmlclosures.list: add a marshal.
2071
2005-02-07 Radek Doulik <rodo@novell.com>
2073
* htmlclueflow.c (draw_item): fixed RTL rendering
2074
(draw_quotes): ditto
2075
(html_clueflow_real_get_direction): for flows beginning with empty
2076
text use direction of previous flow
2078
2005-02-03 Radek Doulik <rodo@novell.com>
2080
* test-suite.c (test_delete_nested_cluevs_and_undo): added new
2081
test for deletion across nested cluev's
2083
* htmlobject.c (html_object_get_insert_level): fix level
2084
calculation for nested cluev's
2086
* htmlengine-edit-cut-and-paste.c (html_engine_delete): do the
2087
"simple" delete for nested cluev's
2089
* htmlclueflow.c (op_helper): update length calculation logic to
2090
work with nested cluev's
2092
* htmlcluev.c (copy): copy direction and background color
2094
* htmltext.c (copy): copy direction
2096
* htmlclueflow.c (copy): copy direction
2098
* htmlcluealigned.h: removed declaration of html_cluealigned_class
2099
to fix compilation with gcc 4.0.0 (fix by amd)
2101
* htmltext.c: added ' to regexp for mail address recognition
2105
2005-02-02 Radek Doulik <rodo@novell.com>
2107
* test-suite.c (test_cursor_around_containers): added new test for
2108
cursor movement around containers (tables)
2110
* htmlcursor.c (move_to_prev_object): set cursor offset to edges
2111
only for non container objects
2112
(move_to_next_object): ditto
2116
2005-02-01 Radek Doulik <rodo@novell.com>
2118
* test-suite.c (test_cursor_beol_rtl): finished this test
2119
(main): don't show the widgets, it's not needed so far
2121
* htmlcursor.c: fixed line up/down to work OK with RTL direction
2123
2005-01-31 Radek Doulik <rodo@ximian.com>
2125
* htmlengine-edit-table.c: disable selection before deleting
2128
* gtkhtml.c (child_size_allocate): use
2129
html_object_calc_abs_position_in_frame instead of
2130
html_object_calc_abs_position, it fixes the nested iframes
2133
* htmlobject.c (html_object_calc_abs_position_in_frame): new
2134
helper function to calculate absolute position in object's frame
2136
2005-01-28 Radek Doulik <rodo@ximian.com>
2138
* test-suite.c: added more tests, cursor movement on lines
2139
boundaries (for RTL as well), capitalize/upcase/lowcase test
2140
added simple test groups
2142
* htmlengine-edit-text.c (html_engine_capitalize_word): refactored
2143
to remove unneeded variable
2145
* Makefile.am (test-memcheck): added test-memcheck rule to run
2146
regression test suite with valgrind's memcheck tool
2148
* htmlengine-edit-text.c (find_first): use unichar instead of char
2149
(html_engine_capitalize_word): use unichar instead of char
2151
2005-01-27 Radek Doulik <rodo@ximian.com>
2153
* htmltablecell.c (calc_min_width): use preffered width if nowrap
2154
keyword is used (fix by Changwoo Ryu)
2156
2005-01-26 Radek Doulik <rodo@ximian.com>
2158
* htmltextslave.c (hts_fit_line): set tab widths
2160
* htmltext.c (html_text_get_pango_info): shape tabs similar as
2163
2005-01-26 Mengjie Yu <meng-jie.yu@sun.com>
2165
* htmlengine.c: (html_engine_parse):
2166
fix #70083 We need to set engine is parsing before all
2167
content are destroied.
2169
2005-01-25 Radek Doulik <rodo@ximian.com>
2171
* Makefile.am: added test and test-verbose rules
2173
* test-suite.c (test_cursor_left_right_on_items_boundaries): added
2176
* htmltextslave.c: fixed cursor movement, implemented new
2177
functions for cursor movement, removed old code
2178
(draw_text): draw selected glyph only if selection inersection
2179
width is greater than zero
2180
(html_text_slave_cursor_left_one): fixed movement on items
2183
* htmltext.c: updated direction handling, fixed cursor movement,
2184
fixed cursor base, implemented new functions for cursor movement
2186
* htmlobject.c: make cursor_[forward/backward] virtual, added new
2187
virtual functions cursor_[left/right], added new virtual functions
2188
to get left/right object edge offsets
2190
* htmlgdkpainter.c: fixed spell errors drawing
2192
* htmlengine-edit-movement.c: use html_cursor_[right/left]
2195
* htmlcursor.c: added html_cursor_[left/right] for ltr/rtl cursor
2198
2005-01-24 Mengjie Yu <meng-jie.yu@sun.com>
2202
* gtkhtml.c: (command):
2203
make Home/End navigation work properly when Caret Mode is enabled
2206
2005-01-22 Radek Doulik <rodo@ximian.com>
2208
* test-suite.c: added test for outer quotes inside div block
2210
* added test-suite.c from RTL branch
2212
* htmlengine.c (html_engine_ensure_editable): just make sure head
2213
of top level clue is non null. head now can be cluev as well when
2214
for example <div> is at the beggining of html document
2215
(push_clue_style): do not push list stack so that we don't lose
2216
quotes and lists in the inner block. Fixes broken quotes in
2217
replies in evolution.
2219
* htmltextslave.c (html_text_slave_init): make sure glyph_items is
2222
2005-01-21 Radek Doulik <rodo@ximian.com>
2224
* htmlobject.c (html_object_real_get_direction): do not traverse
2225
to top parent, our parent will do that if necessary
2229
2005-01-20 Radek Doulik <rodo@ximian.com>
2231
* htmlengine.c (html_engine_begin): check environment variable
2232
GTK_HTML_LOG_INPUT_STREAM for enabling logging, enable LOG_INPUT
2235
* gtkhtml-stream.c (gtk_html_stream_log_new): add .html extension
2238
2005-01-05 Mengjie Yu <meng-jie.yu@sun.com>
2241
* gtkhtml.c: (button_press_event):check for caret_mode
2243
2005-01-04 Radek Doulik <rodo@ximian.com>
2245
* htmltextslave.c: size calculation rewritten, updated line
2246
breaking, create new glyph items for line broken items, drawing
2247
rewritten, offset calculation rewritten
2249
* htmltext.c: use pango glyph items instead of just items
2250
(prepare_attrs): do not set selection colors by pango attributes,
2251
it breaks graphemes in some languages. selection colors are
2252
applied at draw time
2253
(html_tmp_fix_pango_glyph_string_get_logical_widths): temporary
2254
function to replace pango function with bug
2255
(html_text_tail_white_space): fixed offset calculation
2256
(select_range): use pango cursor position attribute
2258
* htmlpainter.c: remember clip rectangle, added function to query
2260
added new function to draw glyphs directly
2262
* htmlobject.c (select_object): pass engine to avoid crash in
2263
underlying functions
2265
* htmlgdkpainter.c (begin): reset clip rectangle
2266
(set_clip_rectangle): transform painters coordinates to gdk ones,
2268
(draw_glyphs): added fg/bg colors to override style/text colors -
2269
selection uses that to force selection foreground color to all
2272
* htmlclueflow.c (html_clueflow_real_get_direction): derive
2273
direction from text children
2275
* gtkhtmldebug.c: print out more information regarding pango info
2278
2004-12-27 Radek Doulik <rodo@ximian.com>
2280
* htmlengine.c (html_engine_get_cursor): check for cursor object,
2281
fixes crash when double clicking outside a body clue
2285
2004-12-15 Mengjie Yu <meng-jie.yu@sun.com>
2287
* gtkhtml.c: (key_press_event):
2288
fix #70085 the focus object may be a frame or an iframe, if so,
2289
we must check its focus object recursively.
2291
2004-12-14 Mengjie Yu <meng-jie.yu@sun.com>
2293
* gtkhtml.c: (focus), (gtk_html_class_init), (cursor_move):
2294
fix #70078 Add new signals when for insert/delete
2295
change gtk_html_a11y_cursor_move_cb to cursor_changed_cb
2297
fix #70078 add signal field
2299
* htmlengine-edit-cut-and-paste.c: (insert_object_for_undo),
2300
(html_engine_delete):
2301
fix #70078 emit signal when insert/delete objects
2303
2004-09-29 Radek Doulik <rodo@ximian.com>
2305
* gtkhtml.c (drag_data_received): call gdk_window_get_pointer so
2306
that we get window coordinates
2310
2004-10-15 Radek Doulik <rodo@ximian.com>
2312
* htmlengine.c (html_engine_replace_do): return true if replacing
2317
2004-11-29 Radek Doulik <rodo@ximian.com>
2319
* htmlengine.c: make sure we free whole array from g_strsplit
2321
* htmltext.c (html_text_pango_info_destroy): free entries as well
2323
2004-11-23 Radek Doulik <rodo@ximian.com>
2325
* htmlimage.c (html_image_real_calc_size): use
2326
html_object_get_flow instead of using o->parent which might be
2330
* htmlobject.c (html_object_get_flow): new helper function,
2331
returns object's flow parent
2335
2004-11-19 Radek Doulik <rodo@ximian.com>
2337
* htmlstyle.c (parse_border): quiet compiler
2339
2004-11-11 Radek Doulik <rodo@ximian.com>
2341
* htmltablecell.c: handle direction
2343
* htmlobject.c: added virtual direction property
2345
* htmlengine.c: added direction property, added HTML tag
2347
* htmlclueflow.c: handle direction, align accordingly to direction
2349
* htmlcluev.c: added direction property
2351
* gtkhtmldebug.c (gtk_html_debug_log): display direction info
2353
2004-11-10 Radek Doulik <rodo@ximian.com>
2355
* gtkhtml.c (gtk_html_im_commit_cb): reverted patch from Leon Ho
2356
as it breaks non IM input
2358
Thu Sep 16 18:05:52 2004 Owen Taylor <otaylor@redhat.com>
2360
* gtkhtml.c (gtk_html_im_commit_cb): Commit text before
2361
any preedit text, not after. This is needed to get partial
2362
commits to work properly. (#65670, Leon Ho)
2364
Thu Sep 16 14:07:31 2004 Owen Taylor <otaylor@redhat.com>
2368
* htmltext.[ch] (html_text_sanitize): Convert text_len() into
2369
a more-public helper function, fix problem where text_len()
2370
was calling g_utf8_validate() without a length even when
2371
the length was being passed in.
2373
* htmltext.c (html_text_init, html_text_append,
2374
html_engine_insert_text_with_extra_attributes): Use
2375
html_text_sanitize() to fix bugs where strlen(str) was being
2376
used ignoring the passed in length.
2378
* htmlengine-edit-cut-and-paste.[ch]: Fix len argument of
2379
html_engine_insert_text_with_extra_attributes() to be gint,
2380
not guint, -1 was supported and used.
2382
Tue Sep 7 21:27:44 2004 Owen Taylor <otaylor@redhat.com>
2384
* gtkhtmlpainter.[ch]: Split html_painter_calc_text_size()
2385
into a simple html_painter_calc_text_size() and a complex
2386
html_painter_calc_entries_size(), and
2387
html_painter_draw_text() into a simple html_painter_draw_text()
2388
and a complex html_painter_draw_entries()
2390
* gtkhtml.c htmlclueflow.c htmlimage.c: Adapt to the above, fix
2391
some places where inconsistent font styles/faces were being used
2392
for measuring and drawing. Fix a place in htmlimage.c where
2393
a random font style/face was being used to draw text.
2395
* gtkhtmlpainter.[ch]: Remove unused html_painter_calc_text_size_bytes()
2397
* htmlpainter.[ch] htmltextslave.c htmlgdkpainter.c:
2398
Remove lots of useless parameters from html_painter_draw_spell_error().
2400
* htmlpainter.[ch] htmlgdkpainter.c htmlprinter.c:
2401
Change draw_text() virtual method into draw_glyphs() which takes
2402
a single PangoGlyphString rather than an indefinite combination
2403
of text and/or HTMLTextPangoInfo/GList.
2405
* htmlpainter.c: Rewrite the text drawing code to fix
2406
character/glyph confusion, and a bug where we drawing too
2409
* htmltext.[ch] htmlpainter.c: Keep the family/style we used
2410
for itemization in the HTMLTextPangoInfo structure, so that
2411
when we later need the space width, we can get the correct one.
2413
* htmltextslave.c (draw_normal) htmltext.c (html_text_calc_text_size):
2414
Remove a left-over HTML_IS_PRINTER() checks.
2416
* htmltext.c: Add a size attribute if we are overriding the font
2417
with the fixed font, and the fixed font size is different from
2418
the variable font size.
2420
* htmlgdkpainter.h: Remove leftover declaration of
2421
html_gdk_painter_text_itemize_and_prepare_glyphs().
2423
Thu Sep 2 14:00:08 2004 Owen Taylor <otaylor@redhat.com>
2425
* htmltextslave.c: Fix HTMLObject->width to be in engine
2426
coordinates not Pango units. (Patch from Radek Doulik, #64430)
2428
Mon Aug 9 16:52:07 2004 Owen Taylor <otaylor@redhat.com>
2430
* htmlpainter.c (html_painter_pango_to_engine/engine_to_pango):
2431
Guard against overflow.
2433
Tue Jul 20 11:27:40 2004 Owen Taylor <otaylor@redhat.com>
2435
* htmltext.c (html_text_calc_part_width): Fix ascent and descent
2438
2004-07-15 Owen Taylor <otaylor@redhat.com>
2440
* htmlpainter.[ch] htmlgdkpainter.c htmlprinter.c:
2441
Add a common implementation of text size calculation and font handling
2442
in HTMLPainter and use that for HTMLGdkPainter and HtmlPrinter.
2444
* htmlprinter.[ch]: Rewrite text rendering to use new facilities
2445
in gnome-print for painting PangoGlyphStrings.
2447
* htmlprinter.c: Use pango_font_metrics_get_strikethrough/underline_thickness()
2448
for underline/strikethrough positioning.
2450
* htmlpainter.[ch] htmlplainpainter.c htmlgdkpainter.[ch]
2451
htmlclueflow.c: Add a PangoContext field to the HTMLPainter structure,
2452
use it when we need a context rather than gtk_widget_get_pango_context().
2454
* htmlpainter.[ch] htmlgdkpainter.c htmlprinter.c: Add
2455
html_painter_pango_to_engine(), html_painter_engine_to_pango() for
2456
unit conversion, engine_to_pango struct field.
2458
* htmlprinter.[ch] htmlengine-print.c: Add html_print_set_scale(),
2459
use it rather than changing fields directly.
2461
* htmlpainter.[ch]: Remove calc_text_size/calc_text_size_bytes
2462
virtual functions and just used fixed Pango-only implementations
2464
* htmltext.c htmltextslave.c: Remove
2465
(HTML_IS_GDK_PAINTER (painter) || HTML_IS_PLAIN_PAINTER (painter))
2466
conditionalizations; fallbacks are no longer necessary since all
2467
backends are properly Pango based.
2469
* htmltext.c htmltextslave.c: Do width computations in Pango
2470
units, convert with html_painter_pango_to_engine(), rather than
2471
using PANGO_PIXELS().
2473
* htmltext.c (html_text_tail_white_space): Change to return
2474
Pango units, add a doc comment.
2476
* htmlpainter.[ch] htmltypes.h htmlgdkpainter.c htmlprinter.c:
2477
Encapsulate Pango attributes => drawing properties into
2478
html_pango_get_item_properties ().
2480
* htmltextslave.c (update_lb): Remove an unused parameter, add
2483
2004-07-15 Owen Taylor <otaylor@redhat.com>
2485
* test.c: Automatically scan tests/ directories for
2486
files and display them in a popup menu. Add a "Print"
2487
button to generate a PS file and run ggv on it.
2490
* tests/pango.html: Add a test that stresses the
2491
internationalization abilities of GtkHTML's Pango
2494
2004-11-09 Radek Doulik <rodo@ximian.com>
2496
* htmltext.c (html_text_init): make sure the text ends with \0 (in
2497
case someone gives us string str longer then length len)
2498
(html_text_set_text): ditto, alloc last byte as well
2500
* htmlpainter.c (html_painter_text_itemize_and_prepare_glyphs):
2501
reset *glyphs to NULL before if blocks
2502
(html_painter_get_type): make alloc font, ref font, unref font non
2504
(html_painter_calc_entries_size): get font only if needed
2506
2004-11-02 Radek Doulik <rodo@ximian.com>
2508
* htmlstyle.c: added padding
2509
parse shorthand border: property
2511
* htmlengine.c: put additional cluev around display blocks to be
2512
able to draw borders specified in style="...", we will use that in
2513
evolution mail view in <DIV></DIV> blocks
2515
* htmlcluev.c: added background color, use padding from style
2517
* gtkhtmldebug.c (gtk_html_debug_dump_object): moved debug details
2518
for text object from simple to normal debug dump
2520
2004-11-01 Radek Doulik <rodo@ximian.com>
2522
* added id to html object and border to html cluev
2524
2004-10-22 Changwoo Ryu <cwryu@debian.org>
2526
* htmlclueflow.c (utf8_width): new function to calculate UTF-8
2528
(utf8_length_in_width): new function to find the length of string
2529
starting on the given string which is not exceeding the specified
2531
(save_plain): wrap lines by cell widths rather than byte lengths.
2535
2004-10-13 Radek Doulik <rodo@ximian.com>
2537
* htmlengine-edit-text.c (upper_lower): set text_len and
2538
text_bytes to right values
2542
2004-10-11 Radek Doulik <rodo@ximian.com>
2544
* gtkhtml.c (gtk_html_size_request): make sure we keep layout in
2545
the same state as before we were called (scrolled window may issue
2546
additional size request after widget was already allocated)
2550
2004-10-08 Radek Doulik <rodo@ximian.com>
2552
* htmltext.c (html_text_remove_unwanted_line_breaks): added "$+?"
2553
to nonbreaking characters (comon in urls)
2555
Addition to #54852 fix
2557
2004-10-01 JP Rosevear <jpr@novell.com>
2559
* libgtkhtml.pc.in: expose gtkhtml_apiverison as a variable
2561
2004-09-28 Radek Doulik <rodo@ximian.com>
2563
* htmlclueflow.c (save_plain): do not let wi drop under clen. it
2564
results into negative len value and outbounded memory
2565
reads. (might help with #62597)
2567
2004-09-23 Radek Doulik <rodo@ximian.com>
2569
* gtkhtml.c (expand_relative): do not search for ":" in url, it
2570
may be used in other parts than uri scheme delimiter. instead
2571
parse beginning of url to see if it has url scheme (and thus is
2573
(html_engine_set_base_cb): set base when received set_base from
2575
(url_is_absolute): new helper function to identify absolute url's
2579
2004-09-22 Radek Doulik <rodo@ximian.com>
2581
* htmltext.c (html_text_remove_unwanted_line_breaks): added '-' to
2582
unwanted break characters
2583
(html_text_remove_unwanted_line_breaks): fix braces breaking
2587
2004-09-02 Radek Doulik <rodo@ximian.com>
2589
* htmlprinter.c (process_attrs): get fixed style from pango family
2592
* htmltextslave.c (draw_normal): add flow style when printing
2594
* htmltext.c (html_text_change_attrs): make this method public so
2595
that we can use it in htmltextslave.c
2596
(html_text_calc_text_size): add flow style when printing
2600
2004-09-20 Radek Doulik <rodo@ximian.com>
2602
* htmltext.c (style_from_attrs): handle PANGO_ATTR_FAMILY, we use
2603
that now only for FIXED style
2604
(unset_style_filter): ditto
2606
2004-09-17 Radek Doulik <rodo@ximian.com>
2608
* Makefile.am: api version 3.1 -> 3.6
2610
2004-09-16 Radek Doulik <rodo@ximian.com>
2612
* htmltable.c (divide_upto_preferred_width): divide the less of
2613
left width and total preferred minus already divided, renamed few
2614
variables to make it more readable
2618
* htmlundo.c: revert the freeze_counter test
2620
* gtkhtml.c (gtk_html_im_commit_cb): use undo freeze/thaw (patch
2621
from Yukihiro Nakai <ynakai@redhat.com>)
2623
* htmlundo.c: added freeze/thaw API (patch from Yukihiro Nakai
2624
<ynakai@redhat.com>)
2628
2004-09-02 Radek Doulik <rodo@ximian.com>
2630
* htmlrule.c (fit_line): make sure the rule width doesn't exceed
2635
2004-08-16 Radek Doulik <rodo@ximian.com>
2637
* htmliframe.c (html_iframe_init): load empty iframe if depth > 10
2641
* htmlgdkpainter.c (begin): fix from Robert McQueen, make sure
2642
that our backstore pixmap has colormap
2646
2004-08-12 Radek Doulik <rodo@ximian.com>
2648
* htmltable.c (divide_upto_preferred_width): in case we are
2649
extending column missing minimal width completely, set min_fill to
2650
to_fill minus added width and not whole preferred width of that
2651
column (that lead to negative values before)
2653
2004-08-10 Radek Doulik <rodo@ximian.com>
2655
* htmlengine-edit-cursor.c (refresh_under_cursor): do not refresh
2656
cursor rectangle with negative width or height
2657
(draw_cursor_rectangle): do not draw cursor rectangle with
2658
negative width or height
2660
Fixes (partialy) #62483
2662
* htmltable.c (calc_lowest_fill): return total filled size
2663
(divide_upto_preferred_width): fixed to divide the left space
2664
correctly and faster
2668
2004-08-05 Radek Doulik <rodo@ximian.com>
2670
* htmlembedded.c (calc_min_width): calc min with for unrealized
2671
widgets as well, it's OK to call gtk_widget_size_request. for
2672
invissible widgets (hidden) return 0 minimal width
2676
2004-08-03 Radek Doulik <rodo@ximian.com>
2678
* gtkhtml.c (drag_data_received): do not use title from
2679
MOZILLA_URL in plaintext mode unless dnd context action >
2680
GDK_ACTION_COPY. this means that we paste url in plain text or
2681
title similar as in html mode if you press Shift or Meta Shift
2685
* htmltext.c (html_text_set_style_in_range): avoid setting default
2690
2004-07-28 Radek Doulik <rodo@ximian.com>
2692
* htmlengine.c: ref embedded widget when pushing it to the
2693
embedded stack and unref it when poping back
2697
2004-07-22 Rodney Dawes <dobey@novell.com>
2699
* Makefile.am (AM_CFLAGS, *dir, *_LDADD): Use GTKHTML_API_VERSION
2700
* gtkhtml.c (gtk_html_class_init): Use GTKHTML_RELEASE_STRING
2701
* libgtkhtml.pc.in: Use GTKHTML_API_VERSION for directory paths
2703
2004-07-20 Radek Doulik <rodo@ximian.com>
2705
* htmlengine-edit-text.c (set_link): do not leak memory - free
2706
url, init url, target to NULL to quiet compiler
2708
2004-07-19 Radek Doulik <rodo@ximian.com>
2710
* htmlframe.c (html_frame_real_calc_size): as below
2712
* htmliframe.c (html_iframe_real_calc_size): do not queue size
2713
request to avoid infinite loop
2715
* htmlengine.c (html_engine_stream_end): queue resize after
2718
* htmlembedded.c: set size of requisition to 0x0 before calling
2721
* gtkhtml.c: handle size request, do own size allocate for
2722
children widgets. move construct call from _new methods to init so
2723
that it's easy to derive widget from us
2725
* htmltext.c (save_open_attrs): save <TT>
2726
(save_close_attrs): save </TT>
2728
2004-06-25 Radek Doulik <rodo@ximian.com>
2730
* htmlengine-edit-text.c (html_engine_set_link): update it so that
2731
it handles the link removals as well
2732
(set_link): call html_text_remove_links or html_object_remove_link
2733
when complete_url is NULL
2735
* htmltext.c (html_text_remove_links): new function, removes all
2736
links from text object
2738
2004-06-24 Radek Doulik <rodo@ximian.com>
2740
* htmlprinter.c (show_sized_with_nbsps_replaced): helper function
2741
to replace nbsp's before passing text to gnome print as it has
2742
problems with printing nbsp;'s to pdf
2743
(draw_text): use show_sized_with_nbsps_replaced
2747
2004-06-21 Radek Doulik <rodo@ximian.com>
2749
* gtkhtml.c (reparent_embedded): new helper function to reparent
2750
embedded objects from tmp html widget
2751
(gtk_html_insert_html_generic): use reparent_embedded
2755
2004-06-18 Radek Doulik <rodo@ximian.com>
2757
* htmltext.c (html_text_get_pango_info): add link format attrs for
2762
* htmlengine.c (new_parse_body): if tokenizer returns NULL even if
2763
it claims it has more tokens, break the loop
2765
Should help with #58264
2767
2004-06-17 Radek Doulik <rodo@ximian.com>
2769
* htmlobject.c (next_prev_cursor_object): use offset for all
2770
containers, not just tables
2772
* htmlengine.c (html_engine_get_focus_object): remember object's
2773
engine as we go down the hierarchy, get focus object offset from
2774
that remembered engine
2778
* htmlframe.c (html_frame_init): as below
2780
* htmliframe.c (html_iframe_init): set base url and various other
2781
fields before calling gtk_html_set_iframe_parent which emits
2782
iframe_created signal
2784
* gtkhtml.c (gtk_html_set_base): remove unused 'priv' variable
2788
2004-06-16 Eric Zhao <eric.zhao@sun.com>
2790
* htmlengine.c: (html_engine_update_focus_if_necessary):
2791
disable set_focus when in edit_mode, fixes #59935.
2793
2004-06-15 Radek Doulik <rodo@ximian.com>
2795
* gtkhtml.c (drag_data_get): handle MOZILLA_URL, it contains
2800
* htmltextslave.c (clear_glyphs): new helper function
2801
(destroy): call clear_glyphs
2802
(get_glyphs): call clear_glyphs so that we don't leak glyphs when
2805
This leak fix is from Owen Taylor <owen@redhat.com>
2807
2004-06-08 Radek Doulik <rodo@ximian.com>
2809
* htmlengine-save.c (html_engine_save_buffer_peek_text_bytes):
2810
renamed from html_engine_save_buffer_peek_text_len to avoid
2813
* htmlclueflow.c (save_plain): init 'bytes' using
2814
html_engine_save_buffer_peek_text_bytes
2816
* gtkhtmldebug.c (dump_object_simple): added more pango log
2819
* htmlclueflow.c (save_plain): use
2820
html_text_remove_unwanted_line_breaks
2822
* htmltext.c (html_text_remove_unwanted_line_breaks): new helper
2823
method to remove linebreaks around punctuation
2824
(html_text_get_pango_info): use
2825
html_text_remove_unwanted_line_breaks
2827
* htmlengine-save.c (html_engine_save_buffer_clear_line_breaks):
2828
remove now obsolete method
2832
2004-06-06 Eric Zhao <eric.zhao@sun.com>
2834
Fixes #46761, make the caret consistent with focus.
2836
* gtkhtml.c: (focus): change caret to the focused object.
2837
* htmlengine-edit-movement.c: (html_engine_move_cursor),
2838
(html_engine_beginning_of_document), (html_engine_end_of_document),
2839
(html_engine_beginning_of_line), (html_engine_end_of_line),
2840
(html_engine_beginning_of_paragraph),
2841
(html_engine_end_of_paragraph), (html_engine_scroll_down),
2843
* htmlengine.c: (html_engine_update_focus_if_necessary):
2844
* htmlengine.h: set focus to the object if it's focusable.
2846
Sat Jun 5 12:16:00 2004 Owen Taylor <otaylor@redhat.com>
2848
* gtkhtml.c (new_obj_from_uri): Fix unitialized variable usage.
2850
* gtkhtml.c (gtk_html_modify_indent_by_delta)
2851
gtkhtmldebug.c (gtk_html_debug_list_attrs):
2852
htmlimage.c (html_image_pointer_load):
2853
htmltext.c (html_text_remove_link_line_breaks,
2854
html_text_get_attr_list_list, tml_utf8_strnchr):
2855
Add missing statics.
2857
* gtkhtmldebug.c (dump_object_simple): Fix aliasing problem.
2859
* htmlengine.c (html_element_get_attr): Use a GCC-specific
2860
definition of html_element_get_attr to avoid stric-aliasing
2863
* htmlengine.c (html_engine_draw_focus_object):
2864
Remove unused functions.
2866
* htmlengine.c (html_element_parse_i18n, html_element_parse_events):
2867
#ifdef out unused functions.
2869
* htmlengine.c: Fix subscript/superscript confusion.
2871
* htmlgdkpainter.c (draw_background, draw_pixmap): Remove usage
2872
of deprecated gdk_pixbuf_render_to_drawable_*, remove support
2873
for bilevel pixbuf rendering since the underlying GDK functions
2874
always do full-alpha.
2876
* htmlgdkpainter.[ch]: Remove HTMLGdkPainter.alpha member variable.
2878
* htmltext.c (html_text_magic_link): Rewrite scan-forward loop
2879
to avoid spurious unitialized variable warning.
2881
* htmltext.c (is_convert_nbsp_needed convert_nbsp): Rewrite
2882
loop-over-UTF-8 loops to be more normal, add some comments, fix
2883
a spurious unitialized variable warning.
2885
* Makefile.am (htmlmarshal.c): Add #include htmarshal.h to the
2886
top of the generated htmlmarshal.c.
2888
2004-06-04 Radek Doulik <rodo@ximian.com>
2890
* added few missing inludes of header files
2892
* testgtkhtml.c (main): remove unused variable
2894
* htmltextslave.c (draw_normal): remove unused variable
2895
(calc_offset): ditto
2897
* htmltext.c (html_text_get_pango_info): remove unused variable
2898
(calc_min_width): ditto
2900
(convert_nbsp): ditto, change return type to void
2901
(html_text_convert_nbsp): ditto
2904
* htmltable.c (check_page_split): remove unused variable
2906
* htmlstyle.c: always return value
2908
* htmlprinter.c (draw_text): remove unused variable
2911
* htmlimage.c (html_image_pointer_update): removed unused variable
2913
* htmlgdkpainter.c (text_width): removed unused variable
2915
* htmlengine.c (current_row_valign): return default return value
2916
if table stack is empty
2917
(current_row_align): ditto
2918
(push_block): removed unused variable
2919
(element_parse_iframe): added braces
2920
(element_parse_a): removed unused variables
2921
(element_parse_img): added braces
2922
(element_parse_ol): removed unused variable
2923
(element_parse_table): added braces
2924
(element_parse_table): removed unused variable
2925
(parse_one_token): ditto
2927
* htmlengine-save.c (get_body): remove unused variable 'margins'
2929
* htmlengine-print.c (print_with_header_footer): remove unused
2932
* htmlengine-edit-fontstyle.c (html_engine_get_document_color):
2933
remove unused variable 'index'
2935
* htmlcluev.c (set_max_height): removed unused variable 'obj'
2937
* htmlclueflow.c: removed some unused variables and methods
2939
* gtkhtml.c (gtk_html_set_fonts): remove unused variable 'name'
2940
(toplevel_unmap): return FALSE. it wasn't returning any value and
2941
we don't want to stop the event propagation
2942
(focus): avoid ambiguous else
2943
(focus): remove unused 'cur' variable
2944
(gtk_html_begin_content): remove unused variable 'handle'
2946
2004-06-03 Radek Doulik <rodo@ximian.com>
2948
* gtkhtml.c (style_set): refresh pango info
2952
* gtkhtml.c (drag_data_received): looks like Larry's patch from
2953
2004-05-06 was broken (wrong version?). Removed uninitialized i
2954
variable. Use selection_data->length, pass title to
2956
(new_obj_from_uri): added title argument, it's used for link text
2957
in case it's non NULL
2961
* gtkhtml.c (add_bindings): added missing KP_Home, KP_End bindings
2965
2004-06-01 Radek Doulik <rodo@ximian.com>
2967
* htmliframe.c (check_page_split): multiply border height by pixel
2970
* htmltext.c (calc_preferred_width): set self->y so that printing
2971
is not messed up (wrong return from page_split with invalid text
2972
objects where ascent > y)
2974
* htmlobject.c (html_object_check_page_split): added painter
2979
2004-05-28 Radek Doulik <rodo@ximian.com>
2981
* htmltextslave.c: update html_text_calc_text_size calls
2984
* htmltext.c (html_text_calc_text_size): pass only
2985
start_byte_offset and calculate the text here. we were sometime
2986
passing wrong start_byte_offset's. the text and start_byte_offset
2988
update html_text_calc_text_size calls everywhere
2990
* htmlprinter.c (text_size): use iterator for all glyph strings,
2992
(text_size): process extra item attrs after passed attrs are
2993
processed so that links fg color is not lost
2995
(alloc_font): set italic to TRUE or FALSE, libgnomeprint now acts
2998
* htmltextslave.c (draw_normal): fixed end_index calculation for
3001
2004-05-27 Radek Doulik <rodo@ximian.com>
3003
* htmlprinter.c (text_size): use double for width calculation to
3004
avoid numeric errors
3007
* htmltextslave.c (update_lb): calculate the printer width the
3008
same way as for gdk painters
3009
(hts_fit_line): ditto
3011
* htmlpainter.h: removed color set from painter, we now use only
3012
the global one from engine. having own sets in painters caused a
3013
lot of pain by having to update those when global one
3014
updated. there were still problems with it (wrong selection color
3015
in test editor when switched to plain text mode and probably few
3016
more). updated everywhere the color set usage
3020
2004-05-26 Radek Doulik <rodo@ximian.com>
3022
* htmltext.c (html_text_op_copy_helper): update spell errors
3026
2004-05-25 Radek Doulik <rodo@ximian.com>
3028
* htmlengine-save.c (html_engine_save_buffer_clear_line_breaks):
3031
* htmltext.c (html_text_remove_link_line_breaks): allow line
3032
breaks in links on white chars
3034
* htmltablecell.c (calc_min_width): use parent class min_width
3035
method instead of preferred_width
3037
* htmltable.c (calc_min_width): calculate preffered widths so we
3038
can use them when dividing span cells min width, used columnPref
3039
in 2nd calc_column_width_template call
3040
(calc_preferred_width): always call html_object_calc_min_width to
3041
be sure that we have columnPref table ready to use
3045
2004-05-24 Radek Doulik <rodo@ximian.com>
3047
* htmlclueflow.c (save_plain): collect similar items to one long
3048
temporary one, call html_engine_save_buffer_clear_line_breaks to
3049
avoid breaking in links
3051
* htmlengine-save.c (html_engine_save_add_nb_interval): new method
3052
to add non breaking interval (used when saving plain text as we
3053
don't have link info in flow::save_plain)
3054
(html_engine_save_buffer_clear_line_breaks): new method to clear
3055
line breaks in pango logical attributes in intervals defined while
3058
2004-05-21 Radek Doulik <rodo@ximian.com>
3060
* htmltext.c: remove attrs from entries and put it in pango info
3061
structure, it simplifies a lot of things
3063
* htmlclueflow.c (save_plain): updated for new
3064
html_text_is_line_break signature
3066
* htmltext.c (html_text_remove_link_line_breaks): new helper
3067
function to remove line breaks in links
3068
(html_text_get_pango_info): call html_text_remove_link_line_breaks
3069
after the attributes are defined
3071
* htmltextslave.c (hts_fit_line): do not break on item boundaries
3073
* htmltext.c (html_text_is_line_break): do not check for white
3074
space before line_break, it breaks other languages as Japanese and
3076
(calc_min_width): do not break on item boundaries
3077
(html_text_get_pango_info): call pango break on temporary item
3078
which spans across items with the same lang_engine
3080
2004-05-19 Radek Doulik <rodo@ximian.com>
3082
* htmlengine-save.c (html_engine_save_buffer_peek_text_len): new
3083
helper function to get buffer len
3085
* htmliframe.c (save): use html_engine_save_output_buffer because
3086
html_engine_save_output_string uses format string and thus we have
3087
to esacape '%' chars or save it as it is with
3088
html_engine_save_output_buffer
3091
* htmlengine-save.c (html_engine_save_output_buffer): new funtion
3092
to save unmodified text.
3096
* htmlselection.c (html_engine_is_selection_active): put back the
3097
change Larry reverted and add test for editable so that it doesn't
3098
break the non editable mode
3100
2004-05-18 Larry Ewing <lewing@ximian.com>
3102
* htmlselection.c (html_engine_is_selection_active): revert the
3103
last change because it breaks copy/paste selection handling in the
3104
mail view. See #58607
3106
2004-05-17 Radek Doulik <rodo@ximian.com>
3108
* htmlimage.c (html_image_pointer_update): check that engine->clue
3109
is image's parent before asking for redraw
3111
* htmlobject.c (op_cut): set change to parent object and set its
3112
width to zero to force redraw
3117
* htmlgdkpainter.c (alloc_font): as below
3119
* htmlclueflow.c (pref_right_margin): calculate the width as
3120
MAX(width of space, width of e) for plain painter so that we get
3121
"better" results in case user sets proportional font for fixed
3124
* htmlprinter.c (alloc_font): as below
3126
* htmlgdkpainter.c (alloc_font): pass width of 'e' character to
3129
* htmlpainter.c (html_painter_get_e_width): new helper function
3131
* htmlfontmanager.c (html_font_new): added e_width parameter
3133
* htmlfontmanager.h: cache width of char 'e'
3135
Fixes a case when we have a proportional font set for fixed style
3136
font, it's only a semisolution but it will save us hopefully a lot
3139
* htmlengine.c (element_parse_li): in case we are adding to
3140
toplevel blockquote flow, change it's type to unordered list
3141
(element_parse_blockquote): pop ID_LI in case we had <LI> items
3142
inside blockquote flow
3143
(element_parse_ol): moved few lines so that they are consitent
3144
with UL and BLOCKQUOTE
3145
(element_parse_ul): ditto
3147
Fixes nested item lists parsing
3149
* gtkhtmldebug.c (gtk_html_debug_dump_object): print levels
3151
2004-05-14 Radek Doulik <rodo@ximian.com>
3153
* htmlselection.c (html_engine_is_selection_active): check for
3154
mark as well, it should be non-null, but it looks like in some
3155
situations it isn't. I am unable to reproduce that problem
3156
occuring in #44521. This change should avoid the crash at least. I
3157
hope it may give us some idea how does it happen.
3159
* htmlengine-edit.c (html_engine_next_cell): move cursor forward
3160
after the new row is created
3164
* gtkhtml.c (destroy): remove monospace_font notify callback
3168
2004-05-13 Larry Ewing <lewing@ximian.com>
3170
* htmlengine.c (html_engine_get_image_factory): we can't use the
3171
toplevel engine here if we do we break relative urls and image
3172
updating from loading and animations. If we want to preserve
3173
ifame factories through reloads we'll have to somethign else.
3175
2004-05-13 Radek Doulik <rodo@ximian.com>
3177
* htmlengine-edit.c (html_engine_new_text): do not check if color
3178
equals link, test just for text default color, link color is not
3181
* htmltext.c (html_text_get_first_color_in_range): do not check if
3182
color equals link color, the link color attributes are handled at
3184
(html_text_get_first_color_in_range): if no color set, use default
3189
* htmlengine.c (element_parse_img): set eat_space to FALSE again,
3190
it was lost somewhere during parser changes
3194
2004-05-11 Radek Doulik <rodo@ximian.com>
3196
* htmltextslave.c (hts_fit_line): use html_text_slave_get_text
3197
instead of expensive html_text_get_text call
3199
* htmltext.c (html_text_calc_part_width): added start parameter to
3200
save html_text_get_text calls, updated every caller
3202
* htmlengine.c (element_parse_a): get attribute "href" to value
3203
and not to target - caused uninitialized memory be duplicated
3207
2004-05-10 Radek Doulik <rodo@ximian.com>
3209
* htmlclueflow.c (layout_line): do not recalc size for splitted
3210
slaves as we only need asc/dsc and this we already know
3212
* htmltext.c (html_text_calc_part_width): update asc, dsc only
3213
when font or language changes
3215
2004-05-09 Radek Doulik <rodo@ximian.com>
3217
* gtkhtml.c (client_notify_monospace_font): test if engine and
3218
painter are already created
3220
2004-05-07 Radek Doulik <rodo@ximian.com>
3222
* htmlcolorset.c (html_colorset_set_style): use cite_color
3223
property for default value or text color from style
3225
* htmltext.c (html_text_get_pango_info): use Cite color for text
3226
objects in HTML_LIST_TYPE_BLOCKQUOTE_CITE flows
3228
* htmlcolorset.c: set default Cite color
3230
* gtkhtml.c (gtk_html_class_init): added cite_color property
3232
2004-05-06 David Malcolm <dmalcolm@redhat.com>
3234
* htmlimage.c (save): printf-style string should use a "%%" for
3235
a percent sign rather than "\%"
3237
* htmlengine-save.h (html_engine_save_output_string): add
3238
function attribute G_GNUC_PRINTF
3240
2004-05-06 Larry Ewing <lewing@ximian.com>
3242
* gtkhtml.c (drag_data_received): break instead of return to allow
3243
gtk_drag_finish to be called properly. Do bytewise comparison
3244
after we've converted to utf8, I know it will work in ucs2 as well
3245
but it makes me cringe.
3247
2004-04-27 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
3249
#56867 Dnd a UTF-8 url to mail compose and Evolution bombs
3251
* gtkhtml.c (drag_data_received): Changed the len argument of
3252
new_obj_from_uri to -1. This len argument will be passed down to
3253
htmltext.c (text_len), which is expecting -1 for determining the
3256
#57691 Dnd a non-UTF8 multibyte URL caused [?] in Composer
3258
* gtkhtml.c (drag_data_received): Changed to accommodate
3259
DND_TARGET_TYPE_MOZILLA_URL, which's cp'ied from gnome_terminal
3262
(ucs2_to_utf8_with_bom_check) New function for converting
3263
from ucs2 to utf8 with support for BOM to dtermine Big/Little
3264
endian ordering of the data.
3266
(selection_received) Created ucs2_to_utf8_with_bom_check with
3267
th existing code from here, so call ucs2_to_utf8_with_bom_check.
3269
2004-05-06 Radek Doulik <rodo@ximian.com>
3271
* htmlenums.h: added cite color
3273
* gtkhtml.c (style_set): use html_engine_refresh_fonts
3274
(client_notify_monospace_font): ditto
3276
* htmlengine.c (html_engine_refresh_fonts): new method to refresh
3277
the content of widget after fonts were changed
3279
2004-05-05 Radek Doulik <rodo@ximian.com>
3281
* htmltext.c (calc_font_size_filter): set fixed font family here
3284
* gtkhtml.c (gtk_html_set_fonts): use
3285
/desktop/gnome/interface/monospace_font_name gconf key for default
3286
monospace font so that we behave as gnome applications
3287
(client_notify_monospace_font): when monospace font changes,
3288
update appropriately
3289
(gtk_html_init): watch for monospace font changes
3291
* htmltext.c (html_text_change_attrs): add avoid_default_size
3293
(html_text_get_pango_info): avoid resetting font size to default
3295
2004-05-03 Radek Doulik <rodo@ximian.com>
3297
* htmlimage.c (ref_image_ptr): ref only successfuly loaded images
3298
(unref_image_ptr): ditto
3300
2004-04-28 Radek Doulik <rodo@ximian.com>
3302
* htmlengine-edit-cut-and-paste.c (html_engine_paste_link): new
3303
function to paste text links
3305
* htmlengine-edit-text.c (html_engine_set_link): new function to
3306
set link on selection
3307
(set_link): helper function which set's link on texts and images
3309
2004-04-27 Radek Doulik <rodo@ximian.com>
3311
* htmlengine.c, htmlembedded.c: added few debug printf's to get
3312
more info for #56717
3314
* gtkhtml.c (gtk_html_begin): use gtk_html_begin_full
3315
(gtk_html_begin_content): ditto
3317
2004-04-26 Radek Doulik <rodo@ximian.com>
3319
* gtkhtml.c (gtk_html_update_scrollbars_on_resize): do not set
3320
adjusments when keep_scroll is set
3321
(gtk_html_begin_full): handle new flags
3322
(size_allocate): do not set adjusments when keep_scroll is set
3324
* htmlengine.c (html_engine_stream_end): use new opened_streams
3325
counter helper functions instead of accessing that counter
3327
(html_engine_update_event): do not set adjusments when keep_scroll
3329
(html_engine_begin): use new opened_streams counter helper
3330
functions instead of accessing that counter directly
3332
* htmlimage.c (html_image_pointer_load): use new opened_streams
3333
counter helper functions instead of accessing that counter
3335
(html_image_factory_end_pixbuf): ditto
3337
* htmlengine.c (html_engine_opened_streams_increment)
3338
(html_engine_opened_streams_decrement)
3339
(html_engine_opened_streams_set): new helper functions for setting
3340
opened streams counter. it takes also care about new
3341
HTMLEngine::keep_scroll flag
3343
* gtkhtml-enums.h: added GTK_HTML_BEGIN_BLOCK_* flags for blocking
3344
progressive updates while loading html document and images
3346
* gtkhtml.c (gtk_html_begin_full): unref refed images after
3347
html_engine_parse instead of doing that before that call as old
3348
images are unrefed during it
3349
(new_obj_from_uri): use html_engine_get_image_factory
3351
* htmlengine-edit-cut-and-paste.c (use_pictograms): use
3352
html_engine_get_image_factory
3354
* htmlengine-edit-images.c (html_engine_insert_image): use
3355
html_engine_get_image_factory
3357
* htmlengine.c (html_engine_get_image_factory): help function to
3358
get engine's image factory. use the one from top level engine
3359
(element_parse_img): use html_engine_get_image_factory
3361
2004-04-23 Radek Doulik <rodo@ximian.com>
3363
* htmltext.c (html_text_get_pango_info): do not use
3364
pango_attr_list_splice and use pango_attr_list_change directly
3366
2004-04-22 Radek Doulik <rodo@ximian.com>
3368
* htmltext.c (save_text): use <= end_index in last part - bad typo
3369
causing infinite loop
3371
2004-04-21 Radek Doulik <rodo@ximian.com>
3373
* htmltext.c (save_link_open): do not bother with underline and
3374
color attributes, they are not generated for links anymore
3375
(save_link_close): ditto
3376
(save): do not handle links here, as we want another tags first
3377
(save_text): handle links saving here
3381
2004-04-20 Radek Doulik <rodo@ximian.com>
3383
* htmlengine-edit-table.c (html_engine_table_goto_col): cursor
3384
forward before getting 1st cell
3385
(html_engine_table_goto_row): ditto
3387
2004-04-14 Radek Doulik <rodo@ximian.com>
3389
* htmltext.c (html_text_get_pango_info): add links and flow
3390
attributes only for non plain painters
3392
2004-03-26 Larry Ewing <lewing@ximian.com>
3394
* htmlengine.c: replace all parse_color calls with
3395
html_parse_color. Remove duplicate parse_color definition.
3397
* htmlstyle.c: replace all parse_color calls with
3400
2004-04-05 Radek Doulik <rodo@ximian.com>
3402
* htmltext.c (cut_links_full): extended cut_links to handle the
3403
case when no collapsing of cutted area is wanted (shrink == 0)
3404
(cut_links): use cut_links_full
3405
(html_text_add_link_full): rewritten, cut links first, then add
3408
* htmlengine.c (apply_attributes): do not apply blue
3409
color/underline for links
3410
(element_parse_a): do not set color and underline to the style
3412
2004-04-01 Radek Doulik <rodo@ximian.com>
3414
* htmlengine.c (insert_text): do not merge parent's flow style,
3417
* htmltext.c (html_text_change_attrs): extracted this new helper
3418
function from html_text_set_style_in_range so that we are able to
3419
set attributes on attribute lists as well
3420
(html_text_get_pango_info): set parent's folder style to attrs
3425
2004-03-31 Radek Doulik <rodo@ximian.com>
3427
* htmltext.c (html_text_set_style_in_range): always apply size
3428
attr so that we can scale
3429
(html_pango_attr_font_size_calc): when no size attr is set handle
3430
it as default size 3
3431
(save_open_attrs): save font size only when necessary
3432
(save_close_attrs): ditto
3434
2004-03-26 Radek Doulik <rodo@ximian.com>
3436
* htmlstyle.c (parse_color): do not copy more than 7 bytes which
3437
we have allocated on stack
3439
2004-03-25 Radek Doulik <rodo@ximian.com>
3441
* htmlengine.c (add_line_break): do not check clue->head, it's not
3443
(block_end_pre): finish flow
3444
(element_parse_pre): use finish flow instead of close flow so that
3445
we don't loose empty paragraph
3446
(element_parse_blockquote): ditto
3448
* htmltokenizer.c (in_tag): do not discard pending LF in pre
3449
(insert_paragraph_break): removed unused function
3453
2004-03-23 Radek Doulik <rodo@ximian.com>
3455
* htmltable.c (save): do not write \n after </TABLE>, leave that
3458
* htmlclueflow.c (write_flow_tag): write \n after start tag,
3459
doesn't harm for non PRE and is needed fro PRE paragraphs
3460
(write_flow_tag): write <BR> or \n if PRE or end of para with
3461
different style than the next one, do it before end tag
3462
(html_clueflow_contains_table): new helper method
3463
(write_flow_tag): do not write <BR> after tables
3465
2004-03-22 Radek Doulik <rodo@ximian.com>
3467
* gtkhtml.c (command): added new commands implementation
3469
* gtkhtml-properties.c: as below
3471
* gtkhtml-enums.h: added GTK_HTML_COMMAND_EDITABLE_ON,
3472
GTK_HTML_COMMAND_EDITABLE_OFF
3474
2004-03-18 Radek Doulik <rodo@ximian.com>
3476
* htmlengine.c (html_engine_set_editable): call
3477
gtk_html_drag_dest_set
3479
* gtkhtml.c (gtk_html_drag_dest_set): new helper function, sets
3480
drag destination depending on editable state
3481
(realize): call gtk_html_drag_dest_set
3483
* htmlengine.c (block_end_cell): make sure the cell doesn't end
3484
empty. add new flow with an empty text in that case
3486
* htmlclue.c (html_clue_is_empty): moved from
3487
HTMLTableCell::html_table_cell_is_empty
3489
Needed to fix #55735
3491
* htmltokenizer.c (add_unichar): translate characters from range
3492
128 - 159 from win1252 encoding to unicode as other browsers
3493
do. yup, we support more brokeness now
3497
2004-03-15 Radek Doulik <rodo@ximian.com>
3499
* htmlengine.c (thaw_idle): do partial redraw only if widget is
3501
(html_engine_unrealize): remove scheduled thaw idle here and don't
3504
2004-03-12 Radek Doulik <rodo@ximian.com>
3506
* Makefile.am (EXTRA_DIST): remove pkgconfig_DATA
3507
(pkgconfig_DATA): create from pkgconfig_in_files
3511
2004-03-09 Radek Doulik <rodo@ximian.com>
3513
* htmltext.c (copy): reset selection
3515
* htmlobject.c (copy): reset selected to FALSE
3517
2004-03-05 Radek Doulik <rodo@ximian.com>
3519
* htmlclueflow.c (search): use is_text instead of calling
3520
html_object_is_text again
3521
(search_text): fix for utf8, mostly use index instead of characted
3522
position and bytes length instead of character length
3523
(search_set_info): ditto
3525
* htmlengine.c (replace): initialize found_bytes instead of
3528
* htmlsearch.c (set_text): use bytes instead of character length
3529
(html_search_new): use text_bytes field
3531
* htmlsearch.h: len --> bytes
3535
2004-03-04 Radek Doulik <rodo@ximian.com>
3537
* gtkhtml.c (cursor_move): do not proceed if we are not in
3538
editable or caret mode
3542
* htmlclueflow.c (save_plain): use html_text_is_line_break
3543
(forward_items): new helper method to travel on text items
3544
(backward_items): ditto
3548
2004-03-03 Radek Doulik <rodo@ximian.com>
3550
* htmltextslave.c (hts_fit_line): use html_text_is_line_break
3552
* htmltext.c (html_text_is_line_break): new helper function, uses
3553
pango log attribute only when there's a white space before line
3554
break or there's non NULL pango language engine in item's analysis
3555
(calc_min_width): use html_text_is_line_break
3557
2004-03-02 <rodo@ximian.com>
3559
* htmltext.c (html_text_op_cut_helper): convert nbsp's in rvt as
3561
(is_convert_nbsp_needed): remember changes in changes SList
3562
(add_change): new helper method
3563
(check_last_white): return value now means if change occured
3564
(check_prev_white): ditto
3565
(html_text_convert_nbsp): update attributes and links indexes to
3567
(free_changes): helper method to free changes list
3568
(update_links): helper method to change indexes in links
3569
(update_attributes): new helper method to change indexes in
3571
(update_attributes_filter): attribute filter used to change
3572
indexes of one attribute
3573
(update_index_interval): update index interval for changes
3575
2004-02-26 <rodo@ximian.com>
3577
* htmlimage.c (html_image_init): initialize animation_active to
3581
* htmlobject.c (copy): initialize draw_focused to FALSE
3583
2004-02-25 <rodo@ximian.com>
3585
* add prefix to some static functions for better readability of
3588
* htmlclueflow.c (layout_line): do not calc size if it was already
3589
calculated (cur == begin)
3590
(html_clue_flow_layout): remove unused variable end
3594
* htmltext.c (html_text_set_style_in_range): create size attr only
3595
for sizes != 3 (default)
3597
* htmlgdkpainter.c (alloc_font): use
3598
pango_font_description_set_size when creating from face
3599
(alloc_font): use gtk_widget_get_style
3600
(html_gdk_painter_real_set_widget): override base method, get
3603
* htmlpainter.c (html_painter_set_widget): make the method virtual
3605
* gtkhtml.c (gtk_html_set_iframe_parent): set iframe painter
3606
widget to toplevel gtkhtml, set fonts of iframe
3607
(gtk_html_get_top_html): new helper method
3608
(gtk_html_set_fonts): get style from top level gtkhtml
3610
* gtkhtmldebug.c (dump_object_simple): dump [i]frames in simple
3613
2004-02-20 Radek Doulik <rodo@ximian.com>
3615
* htmlengine.c (html_element_has_attr): new macro, returns true if
3617
(html_element_get_attr): return true only if *value is non null,
3618
update all calls which just checks if attr is available to use
3623
2004-02-19 Radek Doulik <rodo@ximian.com>
3625
* htmltext.c (html_text_get_pango_info): use text->text_bytes
3628
* htmltokenizer.c (add_unichar_validated): use g_unichar_validate
3630
* htmltext.c (cut_links): fixed for links behind cutted interval
3632
2004-02-11 Radek Doulik <rodo@ximian.com>
3634
* htmltext.c: when updating link's start_offset,
3635
end_offset, update indexes as well (Fixes #50005,#50777)
3637
* htmltext.c (save_close_attrs): check that closing font tag is
3638
neccessary for text size
3640
* htmlcluev.c (set_max_height): reset curr when setting max height
3641
to avoid wrong y positions of children objects (do_layout will
3644
* htmlclue.c (set_max_height): set max height only if ascent <
3647
2004-02-09 Radek Doulik <rodo@ximian.com>
3649
* htmltextslave.c (hts_fit_line): do not update lb again if we
3650
already did at offset == lbo
3652
2004-02-03 Radek Doulik <rodo@ximian.com>
3654
* gtkhtml.c (get_value_nick): use g_type_class_ref/unref rather
3655
than g_type_class_peek
3657
* htmltext.c (html_text_tail_white_space): fix "\ttext" and offset
3658
== 1 problem where we were accessing memory before string begin
3659
(save): make sure end_index <= text->text_bytes
3661
2004-02-02 Radek Doulik <rodo@ximian.com>
3663
* htmltext.c (html_text_convert_nbsp): update text_bytes
3667
2004-01-19 Radek Doulik <rodo@ximian.com>
3669
* htmltext.c (html_text_get_pango_info): set plain text size if
3671
(save_open_attrs): check the attr klass before accessing its
3673
(html_pango_attr_font_size_calc): use fix_size for fixed style
3674
(html_text_set_style_in_range): don't mask the size style so that
3675
we can identify fixed styles and set fixed size in that case
3677
2003-12-02 Jan Arne Petersen <jpetersen@uni-bonn.de>
3679
* htmlengine-edit-cut-and-paste.c: (use_pictograms): store
3680
the replaced text as "picto" data in the html image object.
3681
(html_engine_delete_n): replace the smiley with the original text
3682
when a smiley is deleted.
3684
2004-01-07 Radek Doulik <rodo@ximian.com>
3686
* gtkhtml-properties.c (get_locale_language): new function, based
3687
on e-iconv.c:e_iconv_locale_language
3688
(gtk_html_class_properties_new): use new function to remove gal
3691
2004-01-02 Radek Doulik <rodo@ximian.com>
3693
* gtkhtml.c (gtk_html_im_preedit_changed_cb): use extra attributes
3696
* htmltext.c: use extra attributes
3698
* htmlengine-edit-cut-and-paste.c
3699
(html_engine_paste_text_with_extra_attributes): renamed, uses
3700
extra attributes instead of the normal ones
3702
* htmltext.h: added extra pango attributes, which are displayed
3703
even in plain text mode
3705
* gtkhtml.c (gtk_html_im_commit_cb): update im_pre_pos
3706
(gtk_html_im_preedit_changed_cb): restore initial position when
3707
preedit string deleted
3709
2003-12-18 Dan Winship <danw@ximian.com>
3711
* testgtkhtml.c (main): s/soup_session_new/soup_session_async_new/
3713
2003-12-15 Radek Doulik <rodo@ximian.com>
3715
* htmlgdkpainter.c (text_size): use font metrics for
3718
* gtkhtml.c (gtk_html_set_fonts): don't scale font size down
3720
2003-12-12 Radek Doulik <rodo@ximian.com>
3722
* gtkhtml.c (gtk_html_im_preedit_changed_cb): updated, should be
3725
* htmlengine-edit.c (html_engine_selection_stack_top): new
3726
function, it gets cursor and mark's positions from top of
3728
(html_engine_selection_stack_top_modify): new function for
3729
modifying cursor and mark's positions on top of selection stack
3731
2003-12-10 Yong Sun <Yong.Sun@sun.com>
3733
* htmlengine-edit-cursor.c: correct the calculation of
3736
2003-12-08 Radek Doulik <rodo@ximian.com>
3738
* htmltext.c (html_text_op_cut_helper): remove spell errors from
3739
outside of cutted text
3741
2003-12-05 Larry Ewing <lewing@ximian.com>
3743
* htmltext.c (save_text_part): don't leak the dup'd string.
3745
2003-12-05 Radek Doulik <rodo@ximian.com>
3747
* htmlengine.c (html_engine_flush): as below
3749
* gtkhtml.c (gtk_html_flush): new method, does all scheduled
3752
2003-12-04 Larry Ewing <lewing@ximian.com>
3754
* gtkhtml.c (selection_get): explicitly append a string terminator
3755
to the buffer to make newer mozillas happy.
3757
2003-12-03 Larry Ewing <lewing@ximian.com>
3759
* htmlengine.c: Use parser_clue whereever the the parser is
3760
actively adding elements. Us the generic clue where the display
3761
engine is processing.
3763
* htmlengine.h: add parser_clue to hold the root of the current
3766
2003-12-03 Radek Doulik <rodo@ximian.com>
3768
* htmlprinter.c (get_font_size): scale font size down from pango
3771
* htmlgdkpainter.c (alloc_font): don't scale font size up, it's
3772
already in pango metric now
3774
* htmlfontmanager.c (get_real_font_size): keep size in pango
3777
* htmltext.c (html_pango_attr_font_size_calc): pango is using
3778
1/PANGO_SCALE and not 1/1000 as stated in documentation - pointed
3781
2003-12-02 Radek Doulik <rodo@ximian.com>
3783
* htmltext.c (html_pango_attr_font_size_calc): scale down the font
3784
size here, before setting to pango attribute, it's already
3787
* htmlfontmanager.c (html_font_manager_init): use PANGO_SCALE for font
3789
(get_real_font_size): use PANGO_PIXELS to scale down font sizes
3791
* gtkhtml.c (gtk_html_set_magnification): use PANGO_SCALE for font
3794
* gtkhtml-propmanager.c (gtk_html_propmanager_apply): PANGO_SCALE
3797
* gtkhtml.c (gtk_html_set_fonts): don't scale font size down here
3799
2003-11-24 Radek Doulik <rodo@ximian.com>
3801
* htmlgdkpainter.c (item_gc): set a default color
3803
2003-11-20 Radek Doulik <rodo@ximian.com>
3805
* htmlengine-edit-text.c (upper_lower): use g_utf8 functions to
3808
2003-11-18 Radek Doulik <rodo@ximian.com>
3810
* Makefile.am: enable deprecated gtk stuff. gtkcombo.h is
3811
deprecated in gnome2.5. we will require gnome-2.5 soon
3813
2003-11-14 Radek Doulik <rodo@ximian.com>
3815
* htmlprinter.c (process_attrs): set default font fg color
3817
* htmltextslave.c (update_lb): get the right text portion
3819
2003-11-10 Larry Ewing <lewing@ximian.com>
3821
* gtkhtml.c (D_IM): move all the IM debug spewage into D_IM
3824
2003-11-07 Radek Doulik <rodo@ximian.com>
3826
* htmltext.c (paste_link): set link color and underline
3827
(html_text_append_link): new method, adds link and sets style and
3828
color, use that new method where appropriate, old add_link was
3829
renamed to append_link as it may be called only on text object
3830
creation and it just appends link to list of links, doesn't care
3831
about placing it at the right place in the list and trimming
3834
2003-10-22 Radek Doulik <rodo@ximian.com>
3836
* htmltext.c (save_open_attrs): save text size
3838
* htmlengine-edit.c (html_engine_new_text): apply text attributes
3839
(html_engine_new_text): set only non-default colors/styles
3841
2003-10-21 Radek Doulik <rodo@ximian.com>
3843
* htmltext.c (save_close_attrs): don't free attrs when save fails
3845
* htmlgdkpainter.c (draw_spell_error): sum width of all glyphs
3847
* htmltext.c (save_text): test *l to be non NULL
3849
2003-10-20 Radek Doulik <rodo@ximian.com>
3851
* htmltext.c (save): reverse copied list
3852
(save): reverse attrs list here, don't free it in save_close_attrs
3854
2003-10-15 Larry Ewing <lewing@ximian.com>
3856
* htmltext.c (html_link_free): null protect this function.
3857
(save): NULL protect.
3859
2003-10-15 Frederic Crozat <fcrozat@mandrakesoft.com>
3861
* htmlobject.c: (handle_object_data):
3862
Close comment when saving object data, part 2 (bug #38589)
3864
2003-10-14 Radek Doulik <rodo@ximian.com>
3866
* htmlobject.c (select_range): select containers
3868
* htmlinterval.c (select_object): select range in containers
3870
2003-10-13 Frederic Crozat <fcrozat@mandrakesoft.com>
3872
* htmlobject.c: (object_save_data):
3873
Close comment when saving object data (bug #38589).
3875
2003-10-06 Larry Ewing <lewing@ximian.com>
3877
* htmlobject.c (html_object_fit_line): remove explicit call to
3880
* htmlengine.c: move more parsers to html_element interface.
3882
* htmltable.c (html_table_class_init): remove fit_line
3883
implementation, it isn't needed ans breaks inline tables.
3885
* htmlgdkpainter.c: fixup close bracket placement.
3887
2003-10-02 Larry Ewing <lewing@ximian.com>
3889
* htmltext.c (select_range): reset the pango info for all the
3890
objects who might be affected by the selection change.
3892
* htmltextslave.c (draw): all drawing is handled by draw_normal
3893
since the htmltext passes the selection as pango attributes.
3895
* htmltext.c (html_text_get_pango_info): add selection drawing here.
3897
2003-09-30 Radek Doulik <rodo@ximian.com>
3899
* htmliframe.c (html_iframe_init): as below
3901
* htmlframe.c (html_frame_init): load content before setting
3904
* use engine->stopped everywhere where we emit url_requested
3907
* gtkhtml.c (gtk_html_stop): Stop requesting any more data by
3908
url_requested signal.
3910
* htmlengine.c (html_engine_stop): new function, sets stopped flag
3911
to this and all children's engines
3913
2003-09-29 Larry Ewing <lewing@ximian.com>
3915
* htmlengine.c (html_engine_finalize): use g_source_remove
3917
(current_bg_color): drop ID_EQ calls.
3919
* htmlclueflow.c (get_item_marker_str): use ascii only ("* ") for
3920
plain painter, always draw glyphs no speacial path for other chars.
3921
(get_item_marker_str): don't pass in the len since it is part of
3924
2003-09-17 Larry Ewing <lewing@ximian.com>
3926
* htmlshape.h: remove HTMLLength definition.
3928
* htmlshape.c: include htmlstyle.h and remove html_length_new
3929
since it was a bit heavy.
3931
* htmlframeset.c: include htmlsyle.h
3933
* htmlengine.c: use the height and width style props in the table
3936
* htmstyle.h: add new prototypes and HTMLLength definition.
3938
* htmlstyle.c: add height, width and clear settings.
3940
* htmlenums.h: add HTML_CLEAR_INHERIT.
3942
* htmltablecell.c (draw): remove ifdefed out code.
3944
2003-09-25 Radek Doulik <rodo@ximian.com>
3946
* htmltextslave.c (update_lb): don't scale new_ltw by
3947
PANGO_PIXELS, it's already in pixels, use new_ltw(width) for new aw
3948
instead of new_lwl(len)
3950
* htmlclueflow.c (save_plain): use pango_itemize and pango_break
3951
to decide where break lines
3953
2003-09-23 Radek Doulik <rodo@ximian.com>
3955
* htmlpainter.c (html_painter_calc_text_size): remove obsolete
3958
2003-09-22 Radek Doulik <rodo@ximian.com>
3960
* libgtkhtml.pc.in (Cflags): remove a11y lib reference
3962
* Makefile.am (libgtkhtml_3_1_la_LIBADD): link against a11y lib,
3965
2003-09-19 Jeremy Katz <katzj@redhat.com>
3967
* htmlengine.c (html_engine_get_type): Use GType instead of guint.
3968
* htmlengine.h: Likewise.
3970
2003-09-18 Radek Doulik <rodo@ximian.com>
3972
* htmltext.c (html_text_set_style_in_range): handle FIXED style
3973
(html_text_set_style_in_range): use Monospace font when
3974
e->painter->font_manager.fixed.face == NULL
3976
* htmlengine.c (insert_text): merge parent clueflow style
3978
* htmlimage.c: take care for images blocking
3980
* gtkhtml.c (gtk_html_set_images_blocking): added new method,
3981
toggles image streams blocking. set_blocking toggles content
3982
blocking - when enabled, widget is updated after all content is
3983
loaded, images blocking blocks updates until images are fully
3986
2003-09-17 Dan Winship <danw@ximian.com>
3988
* testgtkhtml.c: Make this compile with either soup 2.0 or 2.2
3990
2003-09-16 Larry Ewing <lewing@ximian.com>
3992
* htmltext.c: remove ;; in several places so it will compile on
3995
2003-09-04 Radek Doulik <rodo@ximian.com>
3997
* htmlengine.c (element_parse_font): parse style
3999
2003-09-11 Larry Ewing <lewing@ximian.com>
4001
* htmlstyle.c (html_style_add_background_color): use htmlcolor.
4002
(html_style_add_attribute): parse a few more attributes.
4004
* htmlstyle.h: switch to using htmlcolor instead of gdkcolor.
4006
* htmlengine.c (element_parse_table): support display:
4007
inline-table, move to htmlelement code.
4008
(element_parse_tr): move to htmlelement code.
4009
(element_parse_cell): combine parse_th and parse_td logic into one
4010
function, use htmlelement code.
4012
2003-09-10 Larry Ewing <lewing@ximian.com>
4014
* htmlengine.c (current_alignment): make alignment only work if we
4015
cross a block element.
4016
(html_element_push): don't pop the anon pre until we've pushed it.
4018
* htmlstyle.c (html_style_add_attribute): add some new atttributes
4019
to the attribute parsing code.
4020
(html_style_add_attribute): fix accidental breakage.
4022
* htmlengine.c: refactor the inline parsers to use html_element
4025
2003-09-06 Larry Ewing <lewing@ximian.com>
4027
* htmltablecell.c (save): use the right tag when closing cells
4028
(original patch by Roy Rankin).
4030
2003-09-05 Larry Ewing <lewing@ximian.com>
4032
* htmlengine.c (pop_element_by_type): add new pop element variant
4033
that takes the display type as an argument. This cleans up the
4034
places where we use pop_element to restructure the document as
4037
2003-09-05 Antonio Xu <antonio.xu@sun.com>
4039
* gtkhtml.c (new_obj_from_uri): Use HTML_IS_PLAIN_PAINTER to judge
4040
html edit model, and use g_filename_from_uri to get the image file's
4041
real path, fix bug #47988 #47990.
4043
2003-09-04 Larry Ewing <lewing@ximian.com>
4045
* htmlengine.c (current_font_style): optimize this a little and
4046
don't traverse above table cells when looking for the font style
4047
(this happens a lot and we might be deep in a table).
4049
* htmlstyle.c: add html_style_set_display.
4051
* htmlstyle.h: add html_style_set_display prototype and
4052
HTMLDisplayType enum.
4054
* htmlengine.c: add style display type and move from using the id
4055
to using the display type for document fixups and style lookups.
4056
Remove the level setting as well and only use the display style.
4058
2003-09-03 Dan Winship <danw@ximian.com>
4060
* Makefile.am (testgtkhtml_LDFLAGS): Remove -static again
4062
2003-09-02 Maxx Cao <maxx.cao@sun.com>
4063
* gtkhtml.c (focus): reset selection when focus moved
4064
(move_selection): add consideration for caret mode
4065
(command): handle selection command for caret mode
4066
* htmlengine-edit-cursor.c (clip_cursor): fixed some calculation
4068
* htmlengine-edit.c (html_engine_set_mark): consider caret mode
4069
* htmlengine.c (html_engine_draw_real): consider caret mode
4070
* htmlselection.c (remove_mark): consider caret mode
4072
2003-09-01 Yuedong Du <yuedong.du@sun.com>
4074
* htmlobject.c: (destroy), (copy), (html_object_init),
4075
(html_object_get_index), (html_object_set_data_nocp),
4076
(html_object_set_data_full_nocp), (html_object_get_data_nocp): add
4077
new data list just to avoid copy when duplicate html object.
4078
* htmlobject.h: ditto
4080
2003-08-28 Larry Ewing <lewing@ximian.com>
4082
* gtkhtml-private.h: add toplevel_unmap_handler.
4084
* gtkhtml.c (drag_data_received): add back some missing logic.
4086
2003-08-27 Larry Ewing <lewing@ximian.com>
4088
* gtkhtml.c (drag_data_received): use selection_recieved to handle
4089
incoming drops and add text/html as a supported drop type.
4091
2003-08-23 Larry Ewing <lewing@ximian.com>
4093
* htmlstyle.c (parse_color): fix copy length.
4095
2003-08-15 Antonio Xu <antonio.xu@sun.com>
4097
* htmlengine-edit-movement.c (html_engine_jump_at): add
4098
gtk_html_im_reset before html_engine_get_object_at, fix bug #47349.
4100
2003-08-15 Antonio Xu <antonio.xu@sun.com>
4102
* htmlengine-edit-cut-and-paste.c (insert_object_do): copy cursor
4103
instead of receate a new cursor, fix bug #45911.
4105
2003-08-12 Antonio Xu <antonio.xu@sun.com>
4107
* gtkhtml.c (new_obj_from_uri): Use pixbuf to judge what kind of
4108
image type being supported by gtkhtml, fix bug #47543.
4110
2003-08-07 Larry Ewing <lewing@ximian.com>
4112
* htmlengine.c: more formatting changes, fix inPre to actually be
4113
correct when in a pre block.
4115
2003-08-07 Radek Doulik <rodo@ximian.com>
4117
* htmltextslave.c (get_glyphs): watch for RECALC_PI changes
4119
* htmlengine.c (html_engine_set_painter): set ALL changes to
4120
recreate pango info and glyphs
4122
* htmltextslave.c (update_lb): extracted function
4123
(hts_fit_line): similar changes as in htmltext.c(calc_min_width)
4125
* htmltext.c (calc_nb_before): fix direction. it doesn't work very
4126
well now though, we need to join text objects with different
4128
(calc_nb_after): likewise
4129
(update_mw): new extracted function
4130
(calc_min_width): use update_mw, fix line breaking between items
4133
2003-08-06 Radek Doulik <rodo@ximian.com>
4135
* htmlpainter.c (shift_glyphs): shift glyphs by 2 list items as it
4136
now contains pango item indexes as well
4138
2003-08-05 Radek Doulik <rodo@ximian.com>
4140
* gtkhtml.c (drag_motion): new method, show cursor during drag
4142
image resize by moving image's right bottom corner
4144
2003-08-01 Radek Doulik <rodo@ximian.com>
4146
* introduced html_engine_get_{left|right|top|bottom}_border, use
4149
* htmlengine.c (html_engine_calc_size): force default border
4150
widths for plain painter
4152
* htmlobject.c (get_length): objects not accepting cursor have
4155
2003-07-31 Radek Doulik <rodo@ximian.com>
4157
* htmlengine-save.c (get_body): save margins
4159
* gtkhtml.c (new_obj_from_uri): use strcasecmp instead of strcmp
4160
for image extensions
4161
added .svg[z] for Jakub
4163
* htmlengine-edit.c (html_engine_select_spell_word_editable): fix
4166
2003-07-30 Radek Doulik <rodo@ximian.com>
4168
* htmltextslave.c: as below
4170
* htmltext.c: break text on item boundaries
4172
2003-07-30 Larry Ewing <lewing@ximian.com>
4174
* htmlengine.c: fix logic that was causing some extra p breaks on
4175
/. move some blocks around.
4177
* htmlengine.c: spit up the element parsers into separate
4178
functions invoked from the dispatch table. This causes a lot of
4179
code churn but should end up being largely the same functionally.
4180
The next step is to combine the simialar functions which should
4181
reduce the code size quite a bit.
4183
2003-07-29 Larry Ewing <lewing@ximian.com>
4185
* htmlengine.c: change the id from a static enum to a gquark so
4186
that we can move towards a dispatch table. Remove pending_para it
4187
was evil and never actually turned on anymore.
4188
(parse_one_token): switch to using a dynamic dispatch table for
4191
* htmlengine.h: remove pending_para it was the wrong way to do
4192
this and leads to more trouble than good.
4194
2003-07-29 Radek Doulik <rodo@ximian.com>
4196
* htmlgdkpainter.c (draw_text): use str instead of dereferencing
4197
list data, list is already shifted at this point
4199
* htmlplainpainter.c: as below
4201
* htmlgdkpainter.c: use item intex from glyphs list
4203
* htmltextslave.c: put item index to glyphs list
4205
2003-07-28 Radek Doulik <rodo@ximian.com>
4207
* htmltext.c (get_tags): fix color check to save color attribute
4210
2003-07-26 Larry Ewing <lewing@ximian.com>
4212
* htmlengine.c (parse_p): make sure we update the alignment even
4213
if we don't start a new flow.
4215
2003-07-25 Larry Ewing <lewing@ximian.com>
4217
* Makefile.am (noinst_PROGRAMS): bump version numbers.
4219
2003-07-25 Radek Doulik <rodo@ximian.com>
4221
* htmltextslave.c (hts_fit_line): don't set width for empty slaves
4222
(they need width == 1 to be able to be selected)
4223
(get_offset_for_pointer): fix len initialization, fix border
4225
(get_offset_for_pointer): extracted calc_offset function, handle
4226
slave->posLen < 2 as special case
4227
(hts_fit_line): pass start_pointer to split, hinted by Larry
4229
2003-07-24 Larry Ewing <lewing@ximian.com>
4231
* htmlvspace.[ch]: remove these files that haven't been in the
4234
* htmltypes.h: remove vspace reference.
4236
* htmltype.c (html_type_name): remove vspace reference.
4238
* htmlenums.h: remove vspace references.
4240
* htmlengine.c: redo anchor closing logic. Change dir parsing.
4242
* htmlengine.c (parse_d): don't push another level for DT just
4243
keep the DL level. We should however set the item flag but we can
4246
2003-07-23 Larry Ewing <lewing@ximian.com>
4248
* htmlengine.c: Rewrite the block stack and move most of the
4249
closing element logic into the end functions. make all the
4250
various block elements have the same level. Redo list parsing.
4251
This patch encompasses a lot of changes it probably breaks a few
4253
(push_block_element): merge the block stack and the span stack
4255
(block_end_map): a new end function for maps. This is tested and
4256
conforms to what mozilla does.
4257
(block_end_option): a nes end function for options, has not yet
4260
* htmltypes.h: remove the blockstack element typedef it shouldn't
4261
have been here in the first place.
4263
* htmlengine.h: remove the now unused blockstack.
4265
2003-07-23 Radek Doulik <rodo@ximian.com>
4267
* htmlengine.c (html_engine_set_painter): fix printing, don't
4268
reset pango info on painter switching
4270
2003-07-20 Larry Ewing <lewing@ximian.com>
4272
* htmlengine.c (pop_element): move everything to using the pop
4273
element, makr pop_block a special case of the pop_element code.
4274
(block_end_heading): make a helper function so that the this
4275
closing code can be remove from the parser section.
4276
(parse_t): make the <th> and <td> parser get the alignment from
4277
after we've fixed up the block stack.
4279
2003-07-19 Larry Ewing <lewing@ximian.com>
4281
* htmlengine.c: remove all occurances of push/pop_span, use the
4282
element interface directly. Start work on new element interface.
4284
* htmlstyle.c (html_style_set_font_size): make sure to mask the
4285
whole size when setting the size.
4287
2003-07-17 Larry Ewing <lewing@ximian.com>
4289
* htmlengine.c (parse_p): still push the element if avoid para is
4290
true since we want to pick up alignment changes etc.
4292
2003-07-16 Larry Ewing <lewing@ximian.com>
4294
* htmlengine.c (parse_color): no longer zero fill to match
4296
(current_row_align): add hack to get the current row alignment.
4297
(parse_t): use current_row_align in th and td. Also on't
4298
explicitly override the aligment in td.
4300
* htmlstyle.c (parse_color): no longer zero fill because mozilla
4301
doesn't (netscape did).
4303
* htmlengine.c: big refactoring of the parser logic, makes table
4304
parse incremental and moves a bunch of the logic into the style
4305
code. Needs more work to make it clean but I want it in CVS now.
4307
* htmlengine.h: add and remove some members for the new parser.
4309
2003-07-15 Radek Doulik <rodo@ximian.com>
4311
* htmlprinter.c (alloc_font): fallback to 1st available font only
4312
when default fonts aren't available
4314
2003-07-15 Yuedong Du <yuedong.du>
4316
* gtkhtml.c: (set_caret_mode): stop blinking cursor if turn the caret
4318
(style_set): according to Larry's suggestion, do not widget
4319
style to implement caret mode.
4320
(gtk_html_class_init): ditto.
4321
(gtk_html_set_caret_mode), (gtk_html_get_caret_mode): new function
4322
to get/set the caret mode flag.
4324
* gtkhtml.h: declaration of the new function, and remove duplicate
4325
declaration of declaration.
4327
2003-07-10 Larry Ewing <lewing@ximian.com>
4329
* htmldrawqueue.c: remove unused function.
4331
* htmlengine-edit-cursor.c (clip_cursor): rename and do a little
4334
2003-07-10 Yuedong Du <yuedong.du@sun.com>
4336
* gtkhtml.c (set_caret_mode): new function to enable caret mode.
4337
(style_set): set the caret mode flag according to style.
4338
(button_press_event): when caret mode is on, mouse click will
4339
cause cursor jump to the clicked position.
4340
(gtk_html_class_init): introduce a new style property.
4341
(cursor_move): remove the limitation that curosr can only be moved
4344
* htmlengine-edit-cursor.c (html_engine_hide_cursor): ditto, and
4345
when reading html mail, cursor need to be draw on the embedded html
4346
widget. So need to find the right widget when drawing.
4347
(html_engine_show_cursor): ditto
4348
(clip_rect): don't return false in the case that x1,y1 is equal to
4349
x1+width, y1+height.
4350
(html_engine_draw_cursor_in_area): when drawing cursor on embedded
4351
gtkhtml widget, remember the cursor position is actually related to
4352
top html widget. So we need sub the offset of embedded html widget.
4354
* htmlengine-eidt-movement.c (html_engine_scroll_down): fix a small
4355
bug that cause the hide count of htmlcursor incorrect.
4357
* htmlengine.h: introduce new flag into HTMLEngine, to indicate
4358
whether caret mode is on.
4360
* htmlengine.c: setup blinking cursor when caret mode is on.
4362
* htmliframe.c: initialize the cursor_hide_count in embedded html
4363
engine. see bug #44607
4365
2003-07-03 Radek Doulik <rodo@ximian.com>
4367
* htmlobject.c (html_object_cursor_backward): allow offset == 0 if
4368
prev object doesn't accept cursor
4369
(move_object_downtree_cursor): skip cursor non-accepting objects
4371
* gtkhtml.c (key_press_event): reset blinking cursor if key was
4374
2003-07-09 Larry Ewing <lewing@ximian.com>
4376
* htmlengine.c (html_engine_freeze): only process the updates on
4377
the first freeze, and add some checking to call (to fix the other
4378
problem York pointed out on irc.)
4380
2003-07-08 Larry Ewing <lewing@ximian.com>
4382
* htmltextslave.c (draw_focus): substitute p with painter (Thanks
4383
to York for pointing it out).
4385
* htmlimage.c (draw_focus): subsitute p with painter.
4387
* htmlclueflow.c: remove draw_background.
4389
* htmldrawqueue.c: don't do any drawing directly, simply
4390
invalidate the regions, let the expose handler deal with the
4391
drawing. Remove a lot of unused cruft and focus drawing code.
4393
* htmlengine.c: make all the draw queues invalidate the regions
4394
instead of drawing directly.
4396
* htmlengine.h: remove draw_focus_object, that is handled by the
4397
object's ::draw method now.
4399
* htmlframe.c: remove draw_background.
4401
* htmlframeset.c: remove draw_background.
4403
* htmliframe.c: remove draw_background.
4405
* htmlimage.c: rework animation timeout handling, make
4406
area_updated do something useful.
4408
* htmlobject.c: remove drawbackgound code.
4410
* htmlobject.h: add draw_focused boolean.
4412
* htmltable.c: remove ::draw_background logic that is no longer
4415
* htmltablecell.c: remove draw_background code that is no longer
4418
* htmltextslave.c (draw_focus): add a method to draw focus here.
4419
The drawing routine should be into the painter next.
4421
2003-07-07 Yuedong Du <yuedong.du@sun.com>
4423
* gtkhtml.c (add_bindings): remove keybinding for Control+Tab/
4424
Shift+Control+Tab, fix bug #45825
4426
2003-06-27 Radek Doulik <rodo@ximian.com>
4428
* gtkhtml.c (gtk_html_editor_event): initialize retval to NULL
4430
2003-06-26 Radek Doulik <rodo@ximian.com>
4432
* gtkhtml.c (button_press_event): fix coordinates
4433
(shift_to_iframe_parent): ditto
4435
2003-06-24 Larry Ewing <lewing@ximian.com>
4437
* htmlengine.c (parse_body): add helper functions to push/pop clue
4439
(html_engine_finalize): unref the body background. If the body
4440
stack isn't empty clear it.
4442
2003-06-20 Larry Ewing <lewing@ximian.com>
4444
* gtkhtml.c (gtk_html_editor_event_command): unset the args.
4445
(gtk_html_editor_event): unset and free the return value.
4447
* htmlfontmanager.c: fix ref font refcounting problems.
4449
* htmlgdkpainter.c (unref_font): free the font description.
4451
* htmlmap.c (html_map_destroy): free the map structure as well.
4453
* htmlpainter.c (finalize): free the font_face.
4455
* htmlstyle.c (html_style_add_attribute): keep the correct ref
4458
* htmltable.c (divide_into_percented_all): don't leak active.
4460
2003-06-25 Radek Doulik <rodo@ximian.com>
4462
* htmlgdkpainter.c (alloc_font): the face now contain family, not
4465
* htmlengine-print.c (print_with_header_footer): use
4468
* gtkhtml.c (gtk_html_set_fonts): new helper function, sets fonts
4469
from style to painter's font manager, use families rather than
4470
complete description name for face
4471
(style_set): use gtk_html_set_fonts
4473
2003-06-13 Larry Ewing <lewing@ximian.com>
4475
* htmlengine.c (html_engine_finalize): clear some of the various
4478
2003-06-12 Larry Ewing <lewing@ximian.com>
4480
* gtkhtml.c (destroy): free base_url.
4482
* htmltable.c (destroy): free columnFixed array.
4484
2003-06-10 Larry Ewing <lewing@ximian.com>
4486
* gtkhtml.c (style_set): free the var_name.
4487
(selection_get): don't leak the selection string.
4488
(finalize): free the body_stack.
4490
2003-06-09 Larry Ewing <lewing@ximian.com>
4492
* htmlengine.c (html_engine_finalize): don't leak body_stack.
4494
2003-05-21 Larry Ewing <lewing@ximian.com>
4496
* libgtkhtml.pc.in (Version): set version correctly.
4498
2003-05-20 Larry Ewing <lewing@ximian.com>
4500
* htmlimage.c (html_image_resolve_image_url): unset oarg not iarg
4503
* gtkhtml.h: add prototypes.
4505
* htmlengine-edit-cut-and-paste.c (use_pictograms): use get_magic_smileys.
4506
(check_magic_link): use get_magic_links.
4508
* htmlengine-edit.c: use get_inline_spelling.
4510
* htmlclueflow.c: use get_inline_spelling.
4512
* gtkhtml.c (gtk_html_set_iframe_parent): use parents
4515
* htmlimage.c: add html_image_factory_get/set_animate and
4516
html_image_factory_start_animations.
4518
* htmlimage.h: add prototypes.
4520
* gtkhtml.c: add gtk_html_get/set_animate.
4522
* gtkhtml.h: add prototypes.
4524
* htmlimage.c (draw_plain): fix the text position, add
4527
2003-05-19 Larry Ewing <lewing@ximian.com>
4529
* gtkhtml-enums.h: make the flags actually be flags.
4531
2003-05-18 Larry Ewing <lewing@ximian.com>
4533
* htmlengine.c (parse_iframe): fix the margin calculations.
4535
* htmlframe.c: remove e_scroll_frame ifdef, set scrolled window
4538
* htmliframe.c: remove e_scroll_frame ifdef, set scrolled window
4541
2003-05-19 Radek Doulik <rodo@ximian.com>
4543
* htmlengine.c (html_engine_update_event): set need_update flag
4545
(html_engine_realize): schedule update if need_update is TRUE
4546
(html_engine_get_language): make sure return value is non-NULL
4548
2003-05-19 Larry Ewing <lewing@ximian.com>
4550
* htmlurl.c: fix some of the url code to make testgtkhtml happier.
4552
2003-05-16 Radek Doulik <rodo@ximian.com>
4554
* htmlprinter.c (printer_get_page_width): don't convert value,
4556
(printer_get_page_height): use gnome_print_config_get_page_size
4557
instead of deprecated gnome_print_job_get_page_size_from_config
4558
(BTW, the gnome_print_config_get_page_size calls this deprecated
4561
* testgtkhtml.c (print_preview_cb): as below
4562
(printer_get_page_width): ditto
4563
after discussion with danw I made margins be fixed value (.5")
4565
* htmlprinter.c (draw_text): descender is negative value in
4566
gnome2, code updated
4567
(calc_text_size): ditto
4568
(calc_text_size_bytes): ditto
4570
* htmlengine-print.c: remove SPACING_FACTOR - not needed and broken,
4572
* htmlprinter.c (TEMP_MARGIN): increase margins a little bit (.5")
4573
and make them fixed size instead of percentage of width
4575
2003-05-16 Radek Doulik <rodo@ximian.com>
4577
* gtkhtml.c (add_bindings): as below
4579
* keybindingsrc.emacs: don't use ISO_Left_Tab, Shift Tab is mapped
4582
2003-05-13 Larry Ewing <lewing@ximian.com>
4584
* htmlfontmanager.c (html_font_manager_set_default): clear both
4585
fonts if fixed font description changes so that if the fixed font
4586
changes but the variable does not the plain painter will still
4587
pick up the change. See bug #41751.
4589
2003-05-08 Radek Doulik <rodo@ximian.com>
4591
* gtkhtml.c (key_press_event): workaround about Shift-TAB
4592
problem. gtk activates TAB binding even for Shift-TAB. we don't
4593
call key_press_handler of parent class for Shift-TAB now to avoid
4594
TAB binding to be activated. I have sent mail to Owen meanwhile
4595
asking him to help with it on gtk side.
4597
2003-05-07 Larry Ewing <lewing@ximian.com>
4599
* gtkhtml.c (button_press_event): pass event->time to
4600
gdk_pointer_grab instead of 0.
4601
(button_release_event): pass event->time instead of 0.
4603
2003-05-06 Radek Doulik <rodo@ximian.com>
4605
* gtkhtml.c (drag_data_received): call move_before_paste only
4607
(drag_data_received): call gtk_drag_finish everytime with success
4609
(drag_data_received): fix the len parameter in call to
4610
html_engine_paste_object
4612
2003-05-02 Radek Doulik <rodo@ximian.com>
4614
* htmlsearch.h: make start_pos and end_pos signed
4616
* htmlclueflow.c (search): handle containers in search, take care
4619
2003-05-02 Radek Doulik <rodo@ximian.com>
4621
* htmlimage.c (html_image_factory_register): insert ip into loaded
4622
images table even if url == "" so we keep track of all ip's. this
4623
fixes the crash when inserting html src with image with "" url and
4624
also doesn't leak ip's
4626
* gtkhtml.c (gtk_html_set_default_content_type): remove unused
4629
2003-05-01 Larry Ewing <lewing@ximian.com>
4631
* htmlengine.c (html_engine_thaw_idle_flush): actually remove the
4632
idle function when we thaw.
4634
2003-05-01 Radek Doulik <rodo@ximian.com>
4636
* htmltext.c (calc_preferred_width): fix width calculation for
4637
TABS, it fixes the min_width calculation of PRE flows as PRE flows
4638
calculate theirs min width from child preffered width
4640
2003-04-30 Larry Ewing <lewing@ximian.com>
4642
* htmlengine.c (html_engine_draw_real): clip the bounds with
4643
html_engine_intersection instead of the crop_iframe_to_parent.
4644
(html_engine_intersection): reorder the logic.
4646
* htmlobject.c (html_object_calc_abs_position): always take any
4647
frame offset into account when calculating the position of the
4650
* htmltext.c: remove extra space at beginning of file.
4652
2003-04-29 Larry Ewing <lewing@ximian.com>
4654
* htmltext.c (calc_word_width): walk the string in our own loop
4655
and use the offsets directly rather than calulating them from the
4657
(min_word_width_calc_tabs): only calc the tabs in the segment if
4658
we find a tab in the segment while walking it.
4659
(html_text_magic_link): remove broken logic that was running the
4660
regex over and over and over.
4662
* htmltextslave.c (get_offset_for_pointer): don't do a linear
4663
search for the cursor position, measuring the strings is too
4665
(get_words_width): replace strchr with our own walking loops so
4666
that we don't have to walk the string twice.
4667
(get_offset_for_bounded_width): ditto.
4668
(hts_fit_line): same as above, and make the logic a little easier
4670
(draw_highlighted): only do the measurments and drawing that is
4671
actually on screen and within this slave.
4673
2003-04-23 Radek Doulik <rodo@ximian.com>
4675
* htmltextslave.c (get_words_width): fix len calculation, we are
4676
incrementing the space now so we have to substract 1 here
4678
* htmlclueflow.c (layout_line): set current object y to let object
4679
know on what line it lives
4681
2003-04-21 Radek Doulik <rodo@ximian.com>
4683
* htmlclueflow.c (html_clueflow_get_line_offset): go forward
4684
instead of backward from head of line when calculating line offset
4686
* htmltext.c (html_text_text_line_length): modify line_offset only
4689
2003-04-18 Radek Doulik <rodo@ximian.com>
4691
* htmltext.c (min_word_width): renamed to express the
4692
functionality better
4693
(min_word_width_calc_tabs): renamed as well, fix the
4694
calculation. the minimal word width is the width of word idx (with
4695
optional non-breaking prefix) on begin of line
4697
* htmltextslave.c (get_words_width): locate the right word, do not
4699
(get_words_width): don't substract tabs, they are already included
4700
in len and width has already one space width for each of them
4702
2003-04-24 Radek Doulik <rodo@ximian.com>
4704
* htmlengine.c (html_engine_freeze): call gtk_html_im_reset when
4705
freezing (count == 0)
4707
* htmlcursor.c: call gtk_html_im_reset whenever we move cursor
4709
* gtkhtml.c (gtk_html_im_reset): new function, resets im context
4710
if need_im_reset is TRUE
4711
(key_press_event): call im context first, set need_im_reset
4713
2003-04-23 Larry Ewing <lewing@ximian.com>
4715
* htmlanchor.c (check_point): override the default check_point
4716
with one that always returns NULL.
4718
2003-04-16 Larry Ewing <lewing@ximian.com>
4720
* htmlembedded.c (copy): comment out debug wanring.
4722
* htmltextarea.c (copy): comment out debug warning.
4724
* htmlselect.c (copy): comment out debug warning.
4726
* htmltextinput.c (copy): comment out debug warning.
4728
* htmlimage.c (html_image_pointer_queue_animation): only queue the
4729
animation if one hasn't already been queued.
4730
(html_image_pointer_run_animation): clear the timeout source.
4732
* htmlstyle.c (html_style_free): actually free the style.
4734
* gtkhtml-properties.c (gtk_html_class_properties_new): don't dup
4735
the name string, and don't alloc an uneeded font description.
4737
* gtkhtml.c (style_set): free the name string, and don't alloc an
4738
uneeded font description.
4739
(gtk_html_set_default_content_type): use g_ascii_strdown
4742
2003-04-15 Larry Ewing <lewing@ximian.com>
4744
* htmldrawqueue.c (clear): clip the cleared area to the visible
4747
* htmliframe.c (calc_size): let the engine know what size we
4748
decided it was (for later clipping).
4750
* htmlengine.c (html_engine_intersection): clip to the top iframe
4752
(html_engine_get_viewport): simple helper function.
4754
2003-04-14 Larry Ewing <lewing@ximian.com>
4756
* htmlengine.c (thaw_idle): fix the area passed to the cleanup
4758
(clear_changed_area): pass the correct extents to
4761
* htmldrawqueue.c (clear): pass the correct extents to
4763
(draw_obj): the same.
4765
2003-04-14 Radek Doulik <rodo@ximian.com>
4767
* htmlengine.c (html_engine_stream_end): set newPage to false to
4768
avoid the cursor jumping to home
4769
(html_engine_set_editable): ditto
4771
2003-04-09 Larry Ewing <lewing@ximian.com>
4773
* htmlengine.c (html_engine_finalize): remove any pending
4774
redraw_idle functions;
4776
* gtkhtml.c (client_notify_widget): remove spell color cruft.
4778
* gtkhtml-properties.c: remove unused members.
4780
* gtkhtml-properties.h: remove usless members.
4782
2003-04-09 Radek Doulik <rodo@ximian.com>
4784
* htmlengine.c (html_engine_init): set language to NULL
4785
(html_engine_get_language): new method
4787
* gtkhtml.c (command): use html_engine_get_language
4788
(gtk_html_api_set_language): ditto
4790
* gtkhtml-properties.c (gtk_html_class_properties_new): use
4791
e_iconv_locale_language as default language
4793
2003-04-09 Larry Ewing <lewing@ximian.com>
4795
* gtkhtml.c (style_set): move font setting logic to here, don't
4796
use the properties setting (styles are per instance).
4797
(client_notify_widget): remove all the color and font setting
4798
logic to use per setting styles.
4799
(gtk_html_set_default_background): removed old broken function.
4801
* gtkhtml.h: remove prototype of set_default_background.
4803
2003-04-08 Larry Ewing <lewing@ximian.com>
4805
* htmlgdkpainter.c (alloc_font): don't force monospace fonts to be
4806
"Monospace" family, this ruins style settings for fixed_font_name.
4808
* htmlcolorset.c (html_colorset_set_style): make the default
4809
parsing logic slightly more robust.
4811
2003-04-08 Radek Doulik <rodo@ximian.com>
4813
* htmlclueflow.c (set_painter): new method, reset indent_width
4815
* gtkhtml.c (get_line_height): calc the line height again, was
4816
disabled during porting
4818
2003-04-08 Larry Ewing <lewing@ximian.com>
4820
* gtkhtml-propmanager.h: fix object and class types.
4822
* gtkhtml-properties.c (gtk_html_class_properties_new): NULL
4823
protect the widget parameter.
4825
* gtkhtml.c (style_set): rework the logic to read the style
4828
* htmlengine-save.c (html_engine_save_string_append_nonbsp): add
4831
2003-04-08 Radek Doulik <rodo@ximian.com>
4833
* gtkhtml.c (add_bindings): removed C-space, put it into emacs
4834
bindings so that Chinese SCIM could catch C-space
4836
* htmltext.c (get_glyphs): shape only when item->length > 0
4837
(html_text_op_cut_helper): destroy items when cutting part of text
4839
2003-04-08 Larry Ewing <lewing@ximian.com>
4841
* htmlgdkpainter.c (alloc_font): make sure that we end up with a
4842
valid font description. Fixes #40898.
4844
* htmlimage.c (html_image_factory_get_missing): helper function to
4845
load the gtkstock missing image item.
4846
(draw): add logic to draw missing image icon.
4848
2003-04-07 Larry Ewing <lewing@ximian.com>
4850
* gtkhtml.c (style_set): pass the widget instead of the style.
4852
* htmlcolorset.h: fixup prototype.
4854
* htmlcolorset.c (html_colorset_set_style): retrieve the color of
4855
the links and spell error from the style properties.h
4857
2003-04-07 Radek Doulik <rodo@ximian.com>
4859
* keybindingsrc.emacs: change Home/End bindings
4861
2003-04-07 Larry Ewing <lewing@ximian.com>
4863
* htmltext.c (append_selection_string): use the new helper, this
4864
is the chosen solution to 37172.
4866
* htmlclueflow.c (save_plain): use the new helper function.
4868
* htmlengine-save.c (html_engine_save_string_append_nonbsp): add
4871
2003-04-07 Radek Doulik <rodo@ximian.com>
4873
* htmlengine-edit-cut-and-paste.c (delete_object): test for active
4874
selection after selection update
4876
2003-04-04 Larry Ewing <lewing@ximian.com>
4878
* htmlimage.c (html_image_factory_unregister): make sure we always
4879
clear the factory when we are removed from it, ad guard against
4880
double removal. Fixes Ximian #40627
4882
2003-04-03 Larry Ewing <lewing@ximian.com>
4884
* gtkhtml.c (selection_received): add UTF8_STRING dnd support.
4886
* htmlengine.c: don't try to create image inputs with no src url.
4888
2003-04-03 Radek Doulik <rodo@ximian.com>
4890
* gtkhtml.c (gtk_html_set_paragraph_style): if selection is
4891
active, change style everytime
4892
(scroll_timeout_cb): don't clamp coordinates if we are already at
4895
* htmlengine-edit-cut-and-paste.c (delete_object): update
4896
selection after cursor/mark move
4898
2003-04-03 Not Zed <NotZed@Ximian.com>
4900
** for bug 40450, based on patch from <philip.zhao@sun.com>
4902
* htmltextslave.c (html_text_slave_nb_width)
4903
(html_text_slave_remove_leading_space): Remove inline keyword on
4906
* htmlobject.c (html_object_engine_translation): change the //
4907
comment to a /* comment, // not supported by ansi c.
4908
(html_object_next_leaf, html_object_prev_leaf,
4909
html_object_next_cursor, html_object_prev_cursor): Remove inline
4910
keyword on non-static methods.
4912
2003-04-02 Larry Ewing <lewing@ximian.com>
4914
* gtkhtml-propmanager.c (gtk_html_propmanager_get_type): start
4917
2003-04-02 Radek Doulik <rodo@ximian.com>
4919
* htmlengine-edit-cut-and-paste.c (html_engine_delete): fix cursor
4922
* gtkhtml.c (gtk_html_im_delete_surrounding_cb): fix cursor
4923
movement, return to original position if possible
4924
(key_press_event): call gtk_im_context_filter_keypress only when
4926
(key_release_event): ditto
4928
2003-04-02 Larry Ewing <lewing@ximian.com>
4930
* htmlimage.c: be more careful about zeroing some of the timeouts.
4932
2003-04-01 Larry Ewing <lewing@ximian.com>
4934
* htmlengine-edit-cursor.c (html_engine_draw_cursor_in_area):
4935
update the im_context cursor location as it moves.
4937
2003-04-01 Radek Doulik <rodo@ximian.com>
4939
* htmltextslave.c (hts_fit_line): fix breaking
4941
* htmlclueflow.c (layout_line): don't force objects to go to next
4942
line once we reach right margin
4944
* htmltext.c (calc_min_width): fix one-word texts, update
4945
surrounding text objects
4947
2003-03-31 Radek Doulik <rodo@ximian.com>
4949
* htmltext.c (word_width): fixed for tabs
4951
* htmltextslave.c (get_words_width): fixed for tabs
4953
* gtkhtml.c: load emacs keybindings, use them if gconf value of
4954
/desktop/gnome/interface/gtk_key_theme is Emacs
4956
* Makefile.am (keybindings_DATA): install keybindings.emacs again
4958
2003-03-27 Larry Ewing <lewing@ximian.com>
4960
* Makefile.am (AM_CFLAGS): use AM_CFLAGS instead of CFLAGS
4963
2003-03-27 Radek Doulik <rodo@ximian.com>
4965
* htmlengine.c (html_engine_get_spell_word): fix move to the
4968
* htmlclueflow.c (end_of_word): fix the logic for citation so
4969
couldn't is one word and not two
4971
2003-03-26 Radek Doulik <rodo@ximian.com>
4973
* htmltextslave.c (draw_spell_errors): as below
4975
* htmltext.c (html_text_text_line_length): take care about line
4978
2003-03-25 Radek Doulik <rodo@ximian.com>
4980
* gtkhtml.h (struct _GtkHTMLEditorAPI): added language argument to
4983
2003-03-24 Radek Doulik <rodo@ximian.com>
4985
* htmltext.c (html_text_magic_link): avoid uninitialized uc use
4987
* htmlengine-edit-tablecell.c (move_cell_rd): remember the removed cell
4989
* gtkhtml.c: declare get/set property inside USE_PROPS #idef block
4991
2003-03-23 Larry Ewing <lewing@ximian.com>
4993
* htmlfontmanager.c (get_font_num): make get_font_num more robust
4994
against invalid styles just in case.
4996
2003-03-20 Larry Ewing <lewing@ximian.com>
4998
* htmltextslave.c: remove unused variables.
5000
* htmltext.c: remove unused variables.
5002
2003-03-19 Larry Ewing <lewing@ximian.com>
5004
* htmliframe.c (check_point): fix the point calculation for
5007
2003-03-18 Larry Ewing <lewing@ximian.com>
5009
* htmlprinter.c (draw_text): add return value.
5011
* htmlpainter.c: add missing include.
5013
* htmlimage.c (html_image_pointer_run_animation): remove unused
5016
* htmlgdkpainter.c (draw_spell_error): remove unsued variable, add
5019
* htmltable.h (html_table_end_table): add prototype.
5021
* htmlengine-edit-tablecell.c: remove debug printfs
5022
(move_cell_rd_undo_free): add a return type.
5024
* gtkhtml-properties.c (gtk_html_class_properties_new): warning
5027
* htmlclueflow.c (calc_size): warning cleanups.
5029
2003-03-18 Radek Doulik <rodo@ximian.com>
5031
* gtkhtml.c (realize): call gtk_im_context_set_client_window
5033
(gtk_html_init): connect new im callbacks
5035
* Makefile.am: removed gtkhtml-im.[ch]
5037
* gtkhtml.c (key_press_event): use im context
5038
(key_release_event): handle this event
5039
(focus_in_event): use im context
5040
(focus_out_event): ditto
5042
2003-03-17 Radek Doulik <rodo@ximian.com>
5044
* htmlclueflow.c (html_clueflow_get_line_offset): pass line_offset
5045
to html_text_text_line_length
5047
* htmltextslave.c (html_get_glyphs_non_tab): make this function
5051
(html_gdk_painter_text_itemize_and_prepare_glyphs): don't count
5054
2003-03-14 Radek Doulik <rodo@ximian.com>
5056
* htmlgdkpainter.c (draw_spell_error): use shift_items
5058
* htmlplainpainter.c (draw_text): use shift_items
5060
2003-03-13 Larry Ewing <lewing@ximian.com>
5062
* htmliframe.c (check_point): remove incorrect addition of margins
5063
in point calculation.
5065
2003-03-12 Radek Doulik <rodo@ximian.com>
5067
* htmltext.c (html_text_text_line_length): fix line_offset
5070
* htmltextslave.c (html_text_slave_get_line_offset): removed
5071
line_offset parameter, updated all callers
5073
* htmlclueflow.c (html_clueflow_get_line_offset): don't allow head
5076
* htmltextslave.c (calc_width): fix width calculation for tabs
5078
2003-03-11 Radek Doulik <rodo@ximian.com>
5080
* htmltextslave.c (get_glyphs_base_text): return glyphs
5082
* htmlprinter.c (draw_text): fix print_y position
5084
2003-03-10 Larry Ewing <lewing@ximian.com>
5086
* htmlprinter.c (print_pixbuf): add a helper function to print
5087
pixbufs now that gnome print no longer has a print_pixbuf call.
5089
2003-03-09 Larry Ewing <lewing@ximian.com>
5091
* htmltextslave.c (get_glyphs_part): fix the check for itmems.
5093
2003-03-08 Larry Ewing <lewing@ximian.com>
5095
* htmlengine.c (html_engine_timer_event): flush the update timers
5096
before removing them.
5098
2003-03-07 Radek Doulik <rodo@ximian.com>
5100
* Makefile.am (CFLAGS): add -@GTKHTML_RELEASE@ to ICONDIR
5102
2003-03-05 Larry Ewing <lewing@ximian.com>
5104
* Makefile.am (uninstall-hook): add unistall-hook to remove
5107
2003-03-04 Larry Ewing <lewing@ximian.com>
5109
* htmltext.c (get_glyphs): use item->offset rather than adding
5110
lengths to find the current position.
5112
2003-03-04 Radek Doulik <rodo@ximian.com>
5114
* htmlengine.c (html_engine_make_cursor_visible): let's keep
5115
cursor inside borders
5117
* gtkhtml.c (command): make SCROLL and FOCUS commands work just
5118
for non editable mode, let SCROLL commands set binding_handled so
5119
key are not propagated to parent's scrollbars
5121
* htmltext.c (html_text_request_word_width): destroy cached items
5122
when HTML_CHANGE_WORD_WIDTH
5124
2003-03-03 Radek Doulik <rodo@ximian.com>
5126
* htmltextslave.c (draw_spell_errors): use items cache
5127
(draw_normal): use get_glyphs_part if posStart > 0
5129
* htmlgdkpainter.c (draw_spell_error): fixed spell errors drawing
5131
* htmltext.c (text_len): change passed string instead of
5132
text->text, update all callers, fixes #38964
5134
2003-03-02 Larry Ewing <lewing@ximian.com>
5136
* htmlengine.c (html_engine_thaw_idle_flush): change idle_reset to
5137
idle_flush so that we always thaw the changes.
5139
2003-02-28 Larry Ewing <lewing@ximian.com>
5141
* htmlimage.c (html_image_resolve_image_url): fix the GValue usage.
5143
* htmlclueflow.c (copy): actually commit the copy fix.
5145
* htmlengine.c: turn off debug log that accidenetally got turned on.
5147
* gtkhtml.c (gtk_html_api_set_language): change assertion to check.
5149
2003-02-27 Larry Ewing <lewing@ximian.com>
5151
* htmlclueflow.c (end_of_word): make sure we check for the end of
5154
* htmltokenizer.c (add_unichar_validated): new helper function to
5155
checkvalidity of unichar before adding it to the stream.
5156
(in_entity): use add_unichar_validated here to make sure that
5157
invalid entity references don't corrupt the utf8 stream.
5159
2003-02-27 Radek Doulik <rodo@ximian.com>
5161
* htmltext.c (text_len): replace invalid utf8 with [?]
5163
* htmltokenizer.c (in_entity): extend the max length of number to
5164
10 digits (0xffffffff = 4294967295)
5166
* htmltext.c (forward_get_nb_width): reverse prev/next to avoid
5167
infinite loops in broken html documents (where empty text objects
5170
2003-02-25 Larry Ewing <lewing@ximian.com>
5172
* htmlpainter.c: remove h_utf8*
5176
* htmltextslave.c: same.
5178
2003-02-24 Larry Ewing <lewing@ximian.com>
5180
* htmlgdkpainter.c (draw_pixmap): remove helper function.
5182
* gtkhtml.c: add a couple more properties.
5184
* htmlclueflow.c (relayout): add engine offsets to the draw call.
5186
2003-02-24 Radek Doulik <rodo@ximian.com>
5188
* gtkhtml-properties.c (gtk_html_class_properties_new): don't free
5189
fixed_name, it's stored in p
5191
* gtkhtml.c: don't use keybindings_theme, hardcode keybindings as
5192
gtk does (they could be changed in gtkrc file)
5194
* gtkhtml-properties.c: removed keybindings_theme
5196
* Makefile.am: removed keybindingsrc.* files parts
5198
2003-02-23 Larry Ewing <lewing@ximian.com>
5200
* gtkhtml.c: stub in some gobject property code.
5202
* gtkhtml-properties.c (gtk_html_class_properties_new): read the
5203
settings from from the style.
5205
* gtkhtml.c (gtk_html_class_init): add style properties for colors
5208
2003-02-21 Larry Ewing <lewing@ximian.com>
5210
* htmlimage.c: refactor animation drawing, remove broken
5211
HTMLImageAnimation structure, fix drawing while scrolling.
5213
* gtkhtml.c (gtk_html_begin_full): pass priv->content_type if the
5216
2003-02-20 Larry Ewing <lewing@ximian.com>
5218
* htmlengine.c: correct the drawing region for the offsets.
5220
2003-02-20 Radek Doulik <rodo@ximian.com>
5222
* gtkhtml.c (set_fonts_idle): don't set font's in iframe, parent
5223
gtkhtml takes care of it
5225
* htmltext.c (html_utf8_strnchr): new helper function
5226
(html_text_text_line_length): use own html_utf8_strnchr, this
5227
increases speed really dramatically ;-)
5229
* gtkhtml.c (style_set): don't set fonts in idle time, but right
5230
now, this avoids recalculating whole document (after content is
5233
* htmltext.c (html_text_text_line_length): modify line_offset
5235
(translated_len): new helper function
5236
(calc_word_width): correct offsets fot tabs
5238
* htmlpainter.c (html_painter_translate_text): dereference
5241
* htmltext.c (get_glyphs): translate special characters
5243
2003-02-19 Radek Doulik <rodo@ximian.com>
5245
* htmlplainpainter.c (draw_text): prepare temporary items and
5248
* htmltextslave.c (get_glyphs_part): translate text before shaping
5251
* htmlpainter.c (html_painter_translate_text): new function,
5252
exports painter text translation
5253
(calc_translated_text_bytes): return bytes length instead of delta
5254
(html_painter_calc_text_size): use bytes return value from
5255
calc_translated_text_bytes, this saves us one walk thru the whole
5256
text, removed unnecessary (forgotten?) second call to
5257
calc_translated_text_bytes
5258
(html_painter_draw_text): use bytes instead of delta as above
5260
2003-02-18 Radek Doulik <rodo@ximian.com>
5262
* htmltext.c (calc_word_width): use cached items only for non
5263
empty texts to make pango shape happy
5265
* htmltextslave.c (calc_width): use cached items and glyphs
5267
* htmltext.c (calc_word_width): use cached items and call shape
5269
(html_text_get_items): return items just for gdk and plain painter
5270
so printing works right again
5272
* htmltextslave.c (get_items): use html_text_get_items
5273
(draw_highlighted): use cached items and glyphs
5275
* htmlengine.c (parse_i): don't pass possibly uninitialized memory
5278
2003-02-07 Larry Ewing <lewing@ximian.com>
5280
* htmlclueflow.c (draw_quotes): move the plain painter check out
5283
2003-02-05 Larry Ewing <lewing@ximian.com>
5285
* htmlengine.c (parse_f): no pending para for forms.
5287
* htmlclueflow.c: use new painter methods that cache the indent
5290
* htmlfontmanager.h: add cache for indent memebers.
5292
* htmlfontmanger.c: add cache members to html_font_new.
5294
* htmlpainter.h: add accessors for indent caches.
5296
* htmlpainter.c: add accessors for indent caches.
5298
* htmlgdkpainter.c: calc widths of block indents.
5300
* htmlprinter.c: calc widths of block indents.
5302
2003-02-04 Larry Ewing <lewing@ximian.com>
5304
* htmlclueflow.c (get_indent): cache the indent level since this
5307
* htmlclueflow.h: add indent_width member.
5309
2003-01-29 Radek Doulik <rodo@ximian.com>
5311
* htmlengine-edit-cursor.c (html_engine_draw_cursor_in_area):
5312
updated for changed coordinates
5314
2003-01-28 Radek Doulik <rodo@ximian.com>
5316
* gtkhtml-properties.c (gtk_html_class_properties_new): get
5317
default print font faces from style
5319
* htmlprinter.c (alloc_font): remove workaround for old gimp print
5321
2003-01-22 Radek Doulik <rodo@ximian.com>
5323
* testgtkhtml.c (print_preview_cb): close print job before
5326
2003-01-21 Larry Ewing <lewing@ximian.com>
5328
* htmltextslave.c (hts_fit_line): make sure we never call strchr
5329
on a NULL string. This tends to happen if two consecutive spaces
5330
enter the token stream.
5332
2003-01-18 Larry Ewing <lewing@ximian.com>
5334
* htmlselect.c (html_select_set_text): make sure we have a longest
5337
2003-01-17 Larry Ewing <lewing@ximian.com>
5339
* gtkhtml.c (style_set): get the new size when the style changes.
5341
* gtkhtml-properties.c: disable gconf for the font settings use
5342
the style values instead.
5344
2003-01-16 Larry Ewing <lewing@ximian.com>
5346
* htmltablecell.c (draw_background_helper): don't poke into the
5347
table for the background, tables draw their own background now.
5349
* htmltable.c (draw_background_helper): draw table backgrounds the
5352
* gtkhtml.c (gtk_html_set_magnification): only try to change the
5355
2003-01-15 Larry Ewing <lewing@ximian.com>
5357
* htmlgdkpainter.c (html_gdk_painter_new): initialize the style.
5358
(alloc_font): use the style as a fallback, use
5359
pango_font_description_from_string to get the font description.
5361
* gtkhtml.c (style_set): update the font when the style changes.
5363
* gtkhtml-properties.c (gtk_html_class_properties_new): use the
5364
style font description.
5366
2003-01-15 Radek Doulik <rodo@ximian.com>
5368
* htmlengine.c (html_engine_draw_real): set Engine::expose
5369
(html_engine_add_expose): added expose parameter, use struct
5370
HTMLEngineExpose to store expose parameter as well
5372
* htmlembedded.c (draw): queue widget draw only when we aren't
5373
drawing on expose event request because it's already handled in
5374
gtk_container code and was causing infinite loops
5376
* gtkhtml.c (expose): use html_engine_expose
5378
* htmlengine.c (html_engine_expose): new function, used from
5379
expose event handler
5381
2003-01-14 Radek Doulik <rodo@ximian.com>
5383
* gtkhtml.c (key_press_event): paste text only when event->length > 0
5385
2003-01-13 Larry Ewing <lewing@ximian.com>
5387
* htmlengine-edit-table.c (html_engine_goto_table): pass arguments
5390
2002-12-16 Larry Ewing <lewing@ximian.com>
5392
* htmlshape.c: fix parsing of negative numbers.
5394
* htmlstyle.h: add prototypes.
5396
* htmlstyle.c (html_style_add_background_image): add background
5398
(html_style_add_background_color): add background color property.
5400
2002-12-14 Larry Ewing <lewing@ximian.com>
5402
* htmlimage.c (html_image_factory_register): make sure we add an
5403
aimation to the image.
5405
2002-12-13 Radek Doulik <rodo@ximian.com>
5407
* htmlengine-edit-cursor.c (draw_cursor_rectangle): fix color
5410
2002-12-10 Radek Doulik <rodo@ximian.com>
5412
* htmlengine-edit-tablecell.c (expand_rspan): move remaining cells
5413
(expand_cspan): ditto
5414
(move_cell_rd): helper function, move cell right/down
5416
2002-12-06 Larry Ewing <lewing@ximian.com>
5418
* htmlengine-edit-table.h (html_table_insert_column): fix the insert
5419
row/column prototypes so that gtkhtml builds again.
5421
2002-12-06 Radek Doulik <rodo@ximian.com>
5423
* htmlengine-edit-table.c (html_table_insert_column): make it work
5425
(html_table_insert_row): ditto
5427
2002-12-05 Radek Doulik <rodo@ximian.com>
5429
* gtkhtml.c (gtk_html_editor_event_command): init GValue before
5432
* htmlimage.c (html_image_resolve_image_url): init GValue before
5435
* htmlengine-edit-tablecell.c (html_engine_set_cspan): new method
5436
(html_engine_set_rspan): ditto, TODO
5437
(expand_cspan): ditto, not finished yet
5438
(collapse_cspan): ditto, TODO
5440
* htmlengine-edit-table.c (html_table_insert_column): renamed, now
5442
(html_table_insert_row): ditto
5444
* htmltablecell.c (html_table_cell_is_empty): new method, moved
5445
from htmltable.c, it's now public
5447
* htmlengine-edit-cut-and-paste.c (html_engine_delete):
5448
reimplemented, make it work better with tables
5450
2002-12-02 Radek Doulik <rodo@ximian.com>
5452
* htmlimage.c (move_image_pointers): emit url requested signal, so
5453
moved image pointers are loaded
5455
2002-11-27 Radek Doulik <rodo@ximian.com>
5457
* gtkhtml.c (button_press_event): return TRUE so we could
5458
g_connect_after in control
5460
2002-11-26 Larry Ewing <lewing@ximian.com>
5462
* htmltablecell.c (draw_background_helper): don't try to get a
5463
pixbuf from a NULL animation.
5465
* gtkhtml.c (gtk_html_insert_html_generic): re-add the form
5466
pasting fix tht seems to have been lost somewhere..
5468
2002-11-26 Not Zed <NotZed@Ximian.com>
5470
* htmlembedded.c (draw): Dont do a queue_redraw if we're ever
5471
asked to draw. Hack-fix to stop evolution-mail hanging so often.
5472
Added FIXME about it.
5474
2002-11-21 Radek Doulik <rodo@ximian.com>
5476
* htmlplainpainter.c (draw_text): use lower level pango iface
5479
(html_gdk_painter_text_itemize_and_prepare_glyphs): exported
5481
* htmltextslave.c (get_words_width): make sure we don't read
5484
* htmlclueflow.c (object_nb_width): fixed typo, use
5485
html_text_slave_get_nb_width instead of html_text_slave_nb_width
5487
2002-11-20 Larry Ewing <lewing@ximian.com>
5489
* htmlengine.c (parse_i): parse style args.
5491
* htmlstyle.c: add missing includes.
5493
* htmlstyle.h: add missing prototypes.
5495
* htmllinktext.c (get_font_style): stop forcing an underline.
5497
* htmlengine.c: change push_span to push_element. Make current_*
5498
skip elements with no style set. Make elements that restore
5499
alignment use the e->divAlign not pAlign and clear pAlign whenever
5501
(parse_a): parse style attribute on a element.
5502
(parse_b): parse style attribute on b element.
5503
(parse_h): pop ID_HEADER blocks before starting a new header.
5505
* htmlstyle.c: added. Moves the style setting logic into a
5506
separate file. Add demonstration parser for style attributes (a
5507
real parser will come later).
5509
* htmlstyle.h: added.
5511
* Makefile.am: add htmlstyle.[ch]
5513
2002-11-19 Not Zed <NotZed@Ximian.com>
5515
* htmlclosures.list: BOOL:POINTER -> BOOL:OBJECT
5516
removed VOID:POINTER,POINTER
5517
VOID:POINTER,POINTER,POINTER -> VOID:STRING,STRING,STRING
5519
* htmlengine.c (html_engine_class_init): change
5520
marshal_BOOL_POINTER -> BOOL__OBJECT for object_requested signal.
5521
(html_engine_class_init): submit -> STRING_STRING_STRING.
5523
* gtkhtml.c (gtk_html_class_init): change marshal_BOOL__POINTER ->
5524
BOOL__OBJECT for object_requested. Also changed marshaller for
5525
iframe_created signal to be VOID__OBJECT.
5526
(gtk_html_class_init): url_requested -> STRING__POINTER.
5527
(gtk_html_class_init): submit -> STRING_STRING_STRING
5529
2002-11-18 Larry Ewing <lewing@ximian.com>
5531
* htmlengine.c (parse_body): pop things off the body stack in the
5533
(check_prev): make sure we make a new linktext if the url is
5536
2002-11-18 Larry Ewing <lewing@ximian.com>
5538
* htmlengine.c: Merge the various text styles into a span style
5539
and fix the current_* functions to pull the values from there.
5540
This fixes some obscure style bugs and cleans up the code a lot.
5542
* htmlenging.h: remove a bunch of unused stacks and variables.
5544
2002-11-17 Chris Toshok <toshok@ximian.com>
5546
* gtkhtml.c (gtk_html_set_iframe_parent): remove extra 0 from
5549
2002-11-15 Radek Doulik <rodo@ximian.com>
5551
* Makefile.am: generate htmlmarshal.[ch] from htmlclosures.list by
5554
* htmlclosures.list: new file
5556
2002-11-14 Radek Doulik <rodo@ximian.com>
5558
* gtkhtml.c (gtk_html_command): fix GEnumClass retrieval
5560
2002-11-13 Larry Ewing <lewing@ximian.com>
5562
* htmlimage.c (html_image_factory_register): small cleanups for
5565
* gtkhtml-enums.h: add begin types enum.
5567
* gtkhtml.h: begine to move some items into a group that we can
5570
* gtkhtml.c (gtk_html_begin_full): add the start of a replacement
5571
for gtk_html_begin_content.
5573
2002-11-13 Not Zed <NotZed@Ximian.com>
5575
* htmltokenizer.h: Use g object cast checks, not gtk object ones.
5577
2002-11-11 Larry Ewing <lewing@ximian.com>
5579
* gtkhtml.c (idle_handler): flush the draw queue before we scroll
5580
to reduce drawing artifacts
5582
2002-11-11 Radek Doulik <rodo@ximian.com>
5584
* htmlgdkpainter.c (draw_text): fixed
5585
GTK_HTML_FONT_STYLE_STRIKEOUT
5587
2002-11-07 Larry Ewing <lewing@ximian.com>
5589
* htmlengine.c (parse_o): free the value.
5591
* htmlselect.c (html_select_set_text): free the placeholder before
5594
* htmlgdkpainter.c (draw_text): free the glyphs and items we
5597
2002-11-07 Radek Doulik <rodo@ximian.com>
5599
* htmltext.c (calc_word_width): calc ascent/descent for empty
5602
2002-11-07 Larry Ewing <lewing@ximian.com>
5604
* htmlselect.c (html_select_set_text): clear the requisition size
5605
whenever we add a string.
5607
* htmltextinput.c: fix the requested width calculation.
5609
2002-11-06 Radek Doulik <rodo@ximian.com>
5611
* htmlgdkpainter.c: use lower level pango iface
5613
* libgtkhtml.pc.in (gtkhtml_datadir): added gtkhtml_datadir
5616
2002-11-05 Larry Ewing <lewing@ximian.com>
5618
* gtkhtml.c (selection_received): pad citations with a <br> to
5619
avoid agressive merging.
5621
* htmlobject.c: remove html_object_calc_intersection and replace
5622
with html_object_intersect that uses GdkRectangle.
5624
* htmlobject.h: fix prototypes.
5626
* htmlimage.c: replace ArtIRect with GdkRectangle.
5628
* htmltable.c: replace ArtIRect with GdkRectangle.
5630
* htmltablecell.c: replace ArtIRect with GdkRectangle.
5632
* htmltextslave.c: replace ArtIRect with GdkRectangle.
5634
* htmlframe.c: replace ArtIRect with GdkRectangle.
5636
* htmlframeset.c: replace ArtIRect with GdkRectangle.
5638
* htmliframe.c: replace ArtIRect with GdkRectangle.
5640
* htmlplainpainter.c: replace ArtIRect with GdkRectangle.
5642
2002-11-05 Larry Ewing <lewing@ximian.com>
5644
* htmlimage.c (draw): protect the draw function from images that
5647
* htmlclueflow.c (draw_quotes): fix printing.
5649
* htmlgdkpainter.c (draw_background): use GdkRectangles instead of
5650
ArtIRects, support full alpha on table and body bg images.
5651
(draw_pixmap): use GdkRectangles.
5653
* htmlclueflow.c (draw_quotes): use GdkRectangles.
5655
2002-11-05 Radek Doulik <rodo@ximian.com>
5657
* htmlframe.c (frame_submit): use g_signal_emit_by_name
5658
(frame_object_requested): ditto
5659
(calc_size): use set_size_request
5660
(html_frame_set_size): ditto
5661
(html_frame_init): ditto
5663
* htmliframe.c (iframe_object_requested): use
5664
g_signal_emit_by_name
5665
(calc_size): use set_size_request
5666
(html_iframe_init): ditto
5668
* htmltextinput.c (html_text_input_key_pressed): use
5669
g_signal_stop_emission_by_name
5670
(html_text_input_init): use set_size_request
5672
* htmltextarea.c (html_textarea_init): use set_size_request
5674
* htmlselect.c (html_select_init): use set_size_request
5675
(html_select_init): ditto
5676
(html_select_init): use gtk_editable_set_editable
5677
(html_select_set_text): use set_size_request
5678
(html_select_set_text): ditto
5680
* htmlprinter.c (draw_embedded): use g_signal_emit_by_name
5681
(ref_font): use g_object_ref
5682
(unref_font): use g_object_unref
5683
(html_printer_new): use g_object_ref
5685
* htmlobject.c (html_object_set_data): don't use
5686
g_quark_from_string, it's already used in g_datalist_set_data_full
5689
* htmlfontmanager.c (manager_alloc_font): removed
5690
get_name_from_face, simplified
5692
* htmlgdkpainter.c (draw_embedded): use g_signal_emit_by_name
5694
* htmlengine.c (update_embedded): use g_object_get_data
5696
* htmlengine-print.c (print_with_header_footer): use g_object_ref
5698
* gtkhtml-embedded.c (gtk_html_embedded_new): use set_size_request
5699
instead of deprecated set_usize
5700
(gtk_html_embedded_changed): use g_signal_emit
5701
(gtk_html_embedded_new): use g_object_new
5703
* testgtkhtml.c: ported from 1.2 version
5705
* Makefile.am: reenabled testgtkhtml
5707
2002-11-04 Larry Ewing <lewing@ximian.com>
5709
* htmlclueflow.c (draw_item): fix the x position of the bullet.
5711
2002-10-10 Radek Doulik <rodo@ximian.com>
5713
* htmlengine-edit-cut-and-paste.c (check_flows): set style just
5714
when needed (beginning flow will end empty so it should get style
5717
* htmlclueflow.c (op_cut): update item numbers only on cut
5719
(merge): removed style copying as it is no more needed
5721
* htmlengine-edit-clueflowstyle.c (undo_or_redo): set style before
5722
item_type so item_numbers will be updated right
5724
2002-10-08 Radek Doulik <rodo@ximian.com>
5726
* htmlengine.c (parse_l): set flow item color
5728
* htmlclueflow.c (destroy): unref color
5729
(html_clueflow_init): set item_color to NULL
5730
(html_clueflow_set_item_color): new method for setting item_color
5731
(draw_item): use item color
5732
(html_clueflow_style_equals): new method compares two flows,
5733
returns TRUE if they have the same style
5735
* htmlclueflow.h: added item_color
5737
* htmlgdkpainter.c (font_name_substitute_attr): removed asserts,
5738
could return NULL, name could be NULL as well
5739
(e_font_from_face): handle NULL from substitute
5741
* htmlengine-edit.c (html_engine_indent_paragraph): renamed, allow
5742
indentation of non PRE paragraphs as well
5743
(go_to_begin_of_para): take care of table boundaries
5744
(html_engine_indent_paragraph): ditto
5746
2002-09-19 Radek Doulik <rodo@ximian.com>
5748
* htmlclueflow.c (get_pre_padding): don't add pre padding for
5749
non-items flows following items with the same level
5750
(write_flow_tag): add <BR> for non-item flows following items with
5753
2002-11-03 Larry Ewing <lewing@ximian.com>
5755
* htmlgdkpainter.c (draw_pixmap): fix coloring logic.
5756
(create_temporary_pixbuf): clear the pixbuf before we use it.
5758
* htmlimage.c (html_image_factory_types): add disabled code to use
5759
gtk-pixbuf features in gtk+-2.2
5761
* htmltext.c (append_selection_string): use g_string_function that
5764
* htmlgdkpainter.c (draw_pixmap): remove a bunch of code now that
5765
gdk can do real alpha blending.
5766
(html_gdk_painter_realize): use html_painter_alloc_color instead
5768
(alloc_color): get the color from the gdkrgb color cube, don't try
5769
to alloc it ourselves.
5770
(free_color): don't need to do anything here now. The color code
5771
can be vastly simplified now with the new interfaces but we should
5772
do a step by step refactoring and this is the first step.
5774
* htmlimage.c: move the timeout into the image_pointer so that we
5775
only queue one per url, refactor start, stop and timeout functions
5777
(html_image_pointer_run_animation): don't try to draw images
5778
without animations (happens in c&p images).
5780
* htmlimage.h: move animation timeout from HTMLImage to
5783
2002-11-03 Larry Ewing <lewing@ximian.com>
5785
* htmlimage.h: remove pixbuf argument from HTMLImagePointer, we
5786
use animations for holding everything now. Add an iter structure.
5788
* htmlimage.c: add initial support for animations back into html
5791
* htmltablecell.c (draw_background_helper): use animation
5794
* htmlengine.c (html_engine_draw_background): use animation
5797
2002-11-02 Larry Ewing <lewing@ximian.com>
5799
* gtkhtml.c (ucs2_order): fix the names of UCS-2BE and UCS-2LE,
5800
and captialize the rest for fun.
5801
(selection_get): use the new gtk functions to convert strings
5802
for selections and clean up logic.
5803
(selection_received): use the new gtk functions to handle charset
5804
conversion and clean up logic.
5805
(scroll_timeout_cb): add the offsets.
5806
(motion_notify_event): remove the offsets.
5807
(button_release_event): remove the offsets.
5809
* htmlfontmanager.c (get_name_from_face): disable all the logic
5810
here. Rodo, can you look at this, is it still needed?
5812
* gtkhtml.c (selection_received): protect ouselves from failed
5815
2002-10-28 Larry Ewing <lewing@ximian.com>
5817
* htmlselect.c (html_select_set_text): only measure the string if
5820
* htmliframe.c (check_page_split): Initialize the engine from the
5823
* htmlfontmanager.c (html_font_manager_set_default): add header to
5826
* htmlgdkpainter.c (find_font_with_similar_size): silence
5829
* htmlclueflow.c (update_line_positions): silence warning.
5831
2002-10-27 Larry Ewing <lewing@ximian.com>
5833
* htmlgdkpainter.c (e_font_from_face): use helper function to
5834
lookup fonts in the fontset and build a new fontset.
5835
(e_font_lookup_face): helper function that handles the font
5838
* htmltable.c (check_point): return with warning if we haven't had
5839
calc_size called yet.
5841
2002-10-25 Larry Ewing <lewing@ximian.com>
5843
* keybindingsrc.ms: remove C-s binding for strikethrough.
5845
* htmlclueflow.c (draw_quotes): use draw_gt_line to fill draw >s
5846
along the edge of the flow. Fixes #29570.
5847
(draw_gt_line): helper function.
5849
2002-10-23 Larry Ewing <lewing@ximian.com>
5851
* htmlclueflow.c (need_blockquote_padding): add new helper
5852
function to sort out the level padding issue.
5854
2002-10-25 Larry Ewing <lewing@ximian.com>
5856
* gtkhtml.c (button_release_event): don't clear in_selection until
5857
we are done with it.
5859
2002-10-18 Radek Doulik <rodo@ximian.com>
5861
* htmlengine.c (parse_p): <p>, </p> create new flows here to have
5862
right flow attributes
5863
(html_engine_init): init avoid_para to FALSE so <p>abc is rendered
5865
(html_engine_parse): ditto
5867
2002-10-17 Radek Doulik <rodo@ximian.com>
5869
* htmlengine.c: set pending_para to FALSE
5870
call close_flow as well
5871
(parse_o): use finish_flow in <ol>
5872
(parse_u): use finish_flow in <ul>
5874
2002-10-16 Radek Doulik <rodo@ximian.com>
5876
* htmlengine.c (parse_b): use finish_flow instead of close_flow to
5877
avoid unwanted empty flows
5879
2002-10-11 Radek Doulik <rodo@ximian.com>
5881
* htmlengine.c (fix_last_clueflow): renamed from
5882
ensure_last_clueflow, discard last flow if empty
5883
(parse_u): close flow and add new empty one on </ul>
5884
(parse_o): as above for </ol>
5885
(parse_body): discard last flow if empty
5887
2002-10-16 Radek Doulik <rodo@ximian.com>
5889
* htmlengine.c: (parse_body): save & restore e->pending_para and
5891
(parse_c): close flow only if non empty, otherwise just set its
5893
(parse_f): don't set pending para on <form>, just close flow if
5895
(parse_table): don't add pending paragraph on end of cells
5896
(form_begin): new extracted function
5898
(parse_i): if form is NULL create new default form around to at
5899
least render it (as mozilla does)
5901
2002-10-04 Radek Doulik <rodo@ximian.com>
5903
* gtkhtml.c (gtk_html_get_paragraph_indentation): new method,
5904
exports engine functionality
5906
2002-10-04 Radek Doulik <rodo@ximian.com>
5908
* htmlcluev.c (draw): fixed calculation of x,y for aligned objects
5911
2002-10-03 Radek Doulik <rodo@ximian.com>
5913
* testgtkhtml.c (goto_url): set base before loading
5915
2002-10-07 Radek Doulik <rodo@ximian.com>
5917
* htmltextslave.c (get_offset_for_pointer): fix for utf8, start on
5918
right beginning of slave (Larry)
5920
* htmltext.c (get_cursor_base): check for offset > slave->posStart
5921
(get_cursor_base): move to next text only if it doesn't start with
5925
* htmltable.c (html_table_end_table): return number of cells in
5928
* htmlengine.c (parse_table): check if table has any cell after
5929
html_table_end_table
5931
2002-10-01 Radek Doulik <rodo@ximian.com>
5933
* htmltextslave.c (get_offset_for_pointer): fixed offset
5934
computation, use utf8 functions instead of using byte positions
5936
2002-09-30 Radek Doulik <rodo@ximian.com>
5938
* htmlprinter.c (draw_text): removed unused local variable
5940
* htmlengine.c (update_embedded): removed unused local variable
5942
* gtkhtml.c (gtk_html_insert_html_generic): check tmp formlist
5945
2002-09-24 Radek Doulik <rodo@ximian.com>
5947
* htmlobject.c (move_object_cursor): continue move to next in case
5948
we can't find any leaf accepting cursor. this fixes cursor
5949
navigation in documents containing empty iframes
5951
* htmltextslave.c (get_offset_for_pointer): check for space to be
5954
* htmlclueflow.c (layout_line): do not wrap in PRE paragraphs
5956
* gtkhtml.c (load_keybindings): removed Esc bindinding
5958
2002-09-20 Radek Doulik <rodo@ximian.com>
5960
* htmltablecell.c (save): check for self->parent
5962
2002-09-19 Radek Doulik <rodo@ximian.com>
5964
* htmlengine.c (html_engine_draw_real): crop iframes to avoid
5965
whole iframes drawing
5966
(update_embedded): crop iframe size here as well
5968
2002-09-18 Radek Doulik <rodo@ximian.com>
5970
* htmltextslave.c (calc_size): split just long words
5972
2002-09-18 Radek Doulik <rodo@ximian.com>
5974
* htmlprinter.c (draw_text): use gnome_print_show_sized
5976
* htmltext.c (get_tags): write opening tags for next text to
5977
closing tags of this one
5978
(get_tags): simplified and corrected <font> tag saving, it's not
5979
optimal in space, but at least correct
5981
2002-09-16 Radek Doulik <rodo@ximian.com>
5983
* htmlengine.c (parse_body): push/pop block here to fix
5984
<table><tr><td><font color=white>aaa</tr></td></table>
5985
(html_engine_selection_contains_link): new method
5986
(html_engine_selection_contains_object_type): new method
5988
* htmlengine-edit-cut-and-paste.c (append_flow): don't move whole
5989
flows, just object in them to preserve flow attributes
5991
2002-09-13 Radek Doulik <rodo@ximian.com>
5993
* htmlengine.c: reimplemented font style parsing to allow non
5994
nested font style tags
5996
2002-09-12 Bastien Nocera <hadess@hadess.net>
5998
* gtkhtml.c: (get_line_height): hack around use of
5999
html_painter_calc_ascent and html_painter_calc_descent so that we're
6002
2002-09-12 Radek Doulik <rodo@ximian.com>
6004
* htmltext.c (get_tags): don't get next/prev text objects across
6006
(get_tags): fix </FONT> duplication and restoring right attributes
6008
* htmlengine.c (parse_a): don't push color for links
6009
(close_anchor): don't pop color
6010
(insert_text): use right default color for links
6012
2002-09-05 Radek Doulik <rodo@ximian.com>
6014
* htmliframe.c (op_copy): set iframe's clue parent
6016
* htmlobject.c (html_object_op_copy): added parent parameter
6018
* htmliframe.c (copy): copy html and clue as well, initialize
6020
(destroy): unref painter just when non-NULL
6021
(op_copy): implemented
6022
(copy): don't copy content here, but in op_copy
6024
2002-09-04 Radek Doulik <rodo@ximian.com>
6026
* gtkhtml.c (set_focus_child): call parent's set_focus_child
6028
(gtk_html_insert_html_generic): delete selection first
6030
2002-08-30 Radek Doulik <rodo@ximian.com>
6032
* gtkhtml.c (insert_tab_or_next_cell): paste text instead of
6035
2002-08-28 Radek Doulik <rodo@ximian.com>
6037
* gtkhtml.c (client_notify_widget): spell check or clear spell
6038
checking errors on live_spell_check flag change
6039
(command): added scroll-bod, scroll-eod commands
6040
(command): allow copy in non editing mode and bind it to C-c
6042
2002-08-27 Radek Doulik <rodo@ximian.com>
6044
* gtkhtml.c: fix scroll behavior, work around layout
6045
page_increment = height / 2
6047
2002-08-26 Radek Doulik <rodo@ximian.com>
6049
* htmlobject.c (move_object_cursor): don't allow objects not
6050
capable of accepting cursor to accept it
6052
2002-08-23 Radek Doulik <rodo@ximian.com>
6054
* htmlengine-edit-cut-and-paste.c (validate_tables): new function,
6055
inserts new line in case we end with invalid flow layout after
6058
2002-08-22 Radek Doulik <rodo@ximian.com>
6060
* htmltext.c: allow + in user name in mail addres and don't allow
6061
wwwblabla, ftpbla, ...
6063
* gtkhtml.c (drag_begin): select dragged object
6064
(dnd_link_set): no dnd in edit mode
6065
(dnd_link_unset): ditto
6067
* htmlengine.c (html_engine_stream_write): in case size == -1
6068
calculate length of buffer
6070
2002-08-21 Radek Doulik <rodo@ximian.com>
6072
* gtkhtml.c (set_focus_child): test if object is not an frame
6073
before setting it as focus_object
6075
2002-08-20 Radek Doulik <rodo@ximian.com>
6077
* htmlprinter.c (alloc_font): scale width using new macro
6079
* htmlprinter.h (SCALE_GNOME_PRINT_FONT_TO_ENGINE): new macro for
6082
2002-08-19 Radek Doulik <rodo@ximian.com>
6084
* htmlcluev.c (draw): fixed width and height of aligned objects
6087
2002-07-30 Radek Doulik <rodo@ximian.com>
6089
* htmlengine-edit-cut-and-paste.c (use_pictograms): don't put
6090
pictograms in the middle of words
6092
2002-07-17 Radek Doulik <rodo@ximian.com>
6094
* htmltext.c (get_tags): optimized output
6096
2002-07-29 Radek Doulik <rodo@ximian.com>
6098
* htmlengine.c (html_engine_focus): make sure embedded object
6101
2002-07-26 Radek Doulik <rodo@ximian.com>
6103
* htmlobject.c (handle_object_data): don't clear class data here
6104
as it could break hash foreach loop
6105
(clear_data): clear them later here
6107
2002-07-25 Radek Doulik <rodo@ximian.com>
6109
* htmlobject.c (next_prev_cursor_object): use html_cursor_init
6110
(copy_data): duplicate the key
6111
(html_object_set_data): use _full version with g_free
6112
(copy_data): use _full version with g_free
6114
* htmlcursor.c (html_cursor_init): new function to initialize all
6117
* htmlclueflow.c (layout_line): update height just when really needed
6119
2002-07-24 Radek Doulik <rodo@ximian.com>
6121
* gtkhtml.c (insert_tab_or_next_cell): insert 4 's when no
6124
2002-07-18 Radek Doulik <rodo@ximian.com>
6126
* htmlengine-edit.c (html_engine_set_title): emit TITLE_CHANGED
6129
2002-07-15 Radek Doulik <rodo@ximian.com>
6131
* htmlclueflow.c (layout_line): fix new line condition
6133
2002-07-12 Radek Doulik <rodo@ximian.com>
6135
* htmlengine.c (html_engine_set_class_data): return if class_name
6137
(get_class_table): ditto
6138
(parse_d): be more careful when class_name is NULL
6140
2002-07-09 Radek Doulik <rodo@ximian.com>
6142
* htmltable.c (divide_upto_preferred_width): fixed part
6145
* htmltextslave.c (get_offset_for_pointer): fixed offset
6148
2002-07-08 Radek Doulik <rodo@ximian.com>
6150
* htmlclueflow.c (draw_item): use first slave for postion
6151
calculation instead of text object, this fixes item drawing with
6154
2002-07-05 Radek Doulik <rodo@ximian.com>
6156
* keybindingsrc.ms: added C-backspace and C-delete for delete
6157
{forward,backward} word
6159
* htmlengine-edit-fontstyle.c (get_url_or_target_from_selection):
6160
removed obsolete assert
6162
* htmlclueflow.c (update_top_height): fixed align=top
6163
(end_of_word): fix citations and spell checking 'spell check' is
6164
no more marked as mispelled
6166
2002-07-03 Radek Doulik <rodo@ximian.com>
6168
* htmlimage.c (html_image_get_actual_width): use max_width instead
6169
of engine view width
6171
2002-07-02 Radek Doulik <rodo@ximian.com>
6173
* gtkhtml.c (focus): disabled link navigation in editing mode
6175
2002-06-25 Radek Doulik <rodo@ximian.com>
6177
* htmltextslave.c (hts_fit_line): take care about line breaking
6178
here as well as we don't usually calculate min width anymore.
6180
2002-06-20 Radek Doulik <rodo@ximian.com>
6182
* gtkhtml.c: update focus_object to work properly with frames
6183
(focus): try to be clever about borders
6185
* htmlengine.c: update focus_object to work properly with frames
6187
* htmlgdkpainter.c (alloc_e_font_try): use gdk_fontset_load only
6188
when necessary, otherwise use gdk_font_load
6190
* htmlobject.c (html_object_engine): new function, returns engine
6191
which contains clue which object directly (no frames on way from
6193
(html_object_calc_abs_position): correct calculation, take care of
6194
frames and thus border size
6196
2002-06-18 Radek Doulik <rodo@ximian.com>
6198
* gtkhtml.c (focus): fixed horizontal offset calculation
6200
2002-06-06 Radek Doulik <rodo@ximian.com>
6202
* gtkhtml.c (gtk_html_insert_html_generic): added tmp parameter,
6203
which when non-null is used as source of insertion, it's destroyed
6205
(gtk_html_insert_gtk_html): new method, takes to_be_destroyed
6206
gtkhtml widget and inserts its content into html gthtml
6208
2002-05-30 Radek Doulik <rodo@ximian.com>
6210
* htmltable.c (draw): call get_body with table coordinates
6212
* htmlengine.c (html_engine_draw_real): substract borders from
6213
engine height before comparing with engine clue height
6215
2002-05-28 Radek Doulik <rodo@ximian.com>
6217
* gtkhtml.c (gtk_html_init): set default content type to
6218
"html/text; charset=utf-8"
6220
2002-05-23 Radek Doulik <rodo@ximian.com>
6222
* gtkhtml.c: moved properties initialization to instance init,
6223
suggested by Michael Meeks
6225
2002-05-24 Larry Ewing <lewing@ximian.com>
6227
* gtkhtml.c (selection_get): handle pasting text/html.
6228
(init): add text/html target.
6230
2002-05-22 Radek Doulik <rodo@ximian.com>
6232
* gtkhtml.c (gtk_html_set_paragraph_style): fix the styles equal
6235
2002-05-20 Radek Doulik <rodo@ximian.com>
6237
* htmlengine-edit-clueflowstyle.c
6238
(html_engine_set_clueflow_style): added dir parameter, fixed undo
6240
* htmlengine-edit-cut-and-paste.c (check_flows): new helper
6241
functions, takes care about clueflow's style changes
6243
2002-05-17 Larry Ewing <lewing@ximian.com>
6245
* gtkhtml.c (skip_host): fix this for base_urls with hosts but
6246
without trailing /s.
6248
2002-05-16 Radek Doulik <rodo@ximian.com>
6250
* libgtkhtml.pc.in (Cflags): fix include directory
6252
2002-05-13 Radek Doulik <rodo@ximian.com>
6254
* gtkhtml-properties.c (gtk_html_class_properties_update): suggest
6257
2002-05-09 Radek Doulik <rodo@ximian.com>
6259
* htmlgdkpainter.c: create PangoLayout just once
6261
2002-05-07 Radek Doulik <rodo@ximian.com>
6263
* Makefile.am: fixed .la versioning
6265
* libgtkhtml.pc.in (Libs): added a11y lib
6267
* gtkhtml.c (client_notify_widget): use /keybindings_theme in
6268
widget and not class notify
6270
2002-04-18 Radek Doulik <rodo@ximian.com>
6272
* htmlprinter.c (insure_paper): use default paper name in case of
6275
2002-04-16 Radek Doulik <rodo@ximian.com>
6277
* gtkhtml.c (drag_data_received): allow drop just links of known
6280
2002-03-25 Radek Doulik <rodo@ximian.com>
6282
* htmlplainpainter.c (html_plain_painter_new): create and ref
6285
* htmlimage.c (html_image_factory_end_pixbuf): unref loader once
6287
(free_image_ptr_data): close loader before unrefing
6289
* htmlclueflow.c (end_of_word): don't check for *cn to recognize
6290
one char length words
6292
* htmlengine.c (html_engine_calc_size): use border when setting
6295
2002-03-18 Radek Doulik <rodo@ximian.com>
6297
* htmlengine.c (html_engine_set_focus): test for clue before
6298
calling html_object_forall on clue
6300
2002-03-11 Radek Doulik <rodo@ximian.com>
6302
* htmlprinter.c (calc_text_width): use correct len (in bytes) for
6303
gnome print function
6305
* htmlpainter.c (html_painter_calc_text_width_bytes): new method
6306
(correct_width): new optimized helper function, replaces old
6307
rewritting functions used in non-bytes version
6309
* htmltext.c (calc_word_width): use bytes version
6311
* htmlprinter.c (calc_text_width_bytes): new implementation
6313
* htmlgdkpainter.c (calc_text_width_bytes): new implementation
6315
* htmlpainter.c (html_painter_calc_text_width_bytes): new function
6316
which uses byte len instead of uc-char len (index)
6318
* htmlfontmanager.c (html_font_new): added nbsp and space width to
6321
2002-03-07 Larry Ewing <lewing@ximian.com>
6323
* htmltextslave.c (html_text_slave_get_text): cache this result.
6324
(split): pass an optional charStart setting to allow filling the
6325
above cache without recomputing the pointer from the offset.
6326
(hts_fit_line): update the start position cache as we walk
6327
forward. And pass the start pointer to the split call.
6328
(draw_highlighted): opitmize the pointer offset calculations.
6329
(html_text_slave_init): initialize that cache value to NULL.
6331
* htmltextslave.h: add charStart cache entry.
6333
2002-03-06 Larry Ewing <lewing@ximian.com>
6335
* htmltextslave.c: undo the s/g_utf8/h_utf8/ use a #define instead.
6336
Add comment explaining this choice.
6338
* htmltext.c: same as above.
6340
* htmltextslave.c: optimize, I'll be more specific when I'm done.
6342
* htmltext.c: see above.
6344
2002-03-05 Larry Ewing <lewing@ximian.com>
6346
* htmlbutton.c (html_button_init): mark strings for translation.
6347
Add missing includes for _() definition.
6349
* htmlselect.c: convert from utf8 properly and use needs_update
6350
boolean to postpone setting the popdown strings until they are
6351
needed. Because of how GtkCombo is implemented setting popdown
6352
strings is extremely expensive.
6354
* htmlselect.h: add update boolean.
6356
* htmltextinput.c: handle utf8 strings correctly.
6358
* htmltextarea.c (html_textarea_set_text): convert string to gtk
6359
charset before setting gtk widget.
6361
* htmlbutton.c (html_button_init): convert to gtk string before
6364
2002-02-26 Larry Ewing <lewing@ximian.com>
6366
* gtkhtml.c: rename to gtk_html_get_url_blah, still bad but a
6371
* htmliframe.c: fix for renaming.
6373
* htmlframe.c: same as above.
6375
2002-02-26 Larry Ewing <lewing@ximian.com>
6377
* htmliframe.c: remove the unused on_url and link_clicked handlers
6378
and add note that these signals do not cascade. Use
6379
gtk_html_get_base_relative in set_base now.
6381
* htmlframe.c: same as above.
6383
* gtkhtml.c: make link_clicked and on_url resolve urls relative to
6384
the frame they are in. moved the relative url code in here.
6385
gtk_html_get_base_relative and gtk_html_get_object_relative
6386
function for the relative url parsing. These should probably get
6389
* gtkhtml.h: add the new function prototypes.
6391
2002-02-25 Radek Doulik <rodo@ximian.com>
6393
* htmlengine-edit-cut-and-paste.c (use_pictograms): set ALT text
6395
(html_engine_insert_text): don't use smiley's in plain text mode
6397
* htmlimage.c (calc_size): draw ALT text with PLAIN painter
6398
(calc_size): update for ALT text and PLAIN painter
6400
* htmlengine-edit-cursor.c (html_engine_draw_image_cursor): fixed
6401
rectangle calculation
6403
2002-02-24 Larry Ewing <lewing@ximian.com>
6405
* gtkhtml.c (html_engine_url_requested_cb): expand urls relative
6406
to the document url.
6408
* htmlframe.c (html_frame_init): request the initial url on the
6410
(html_frame_url_requested): let the widget expand the relative
6413
* htmliframe.c (html_frame_init): request the initial url on the
6415
(html_iframe_url_requested): let the widget expand the relative
6418
2002-02-23 Larry Ewing <lewing@ximian.com>
6420
* htmlframe.c: change relative url lookup.
6422
* htmliframe.c: change relative url handling. Fix check_url logic
6425
* gtkhtml.c (gtk_html_set_base): remove the old parsing logic.
6427
2002-02-22 Radek Doulik <rodo@ximian.com>
6429
* htmlimage.c (update_or_redraw): don't draw or schedule engine
6430
update in blocking mode
6432
2002-02-15 Radek Doulik <rodo@ximian.com>
6434
* gtkhtml.c (new_obj_from_uri): don't remove http:// from link text
6435
(new_obj_from_uri): don't be too smart about URL's, people don't
6437
(idle_handler): don't just check for thaw idle handler scheduled,
6438
but also if html engine isn't actually frozen
6439
(button_press_event): unset button1_pressed flag for 2x and 3x
6440
click, it fixes word and line selection in iframes
6442
* htmlinterval.c (html_point_max): handle case, when one point's
6443
object is container of another (as could happen with tables)
6445
2002-02-14 Radek Doulik <rodo@ximian.com>
6447
* gtkhtml.c (command): set return value for cursor-{forward,backward}
6449
2002-02-12 Radek Doulik <rodo@ximian.com>
6451
* htmlclueflow.c (write_list_finish_tags): new helper method,
6452
takes care about writing right list ending tags
6453
(write_pre_tags): use write_list_finish_tags
6454
(write_post_tags): ditto
6455
(get_end_tag_item): extracted helper function
6456
(get_end_tag): use get_end_tag_item
6458
* htmlimage.c (html_image_animation_timeout): test if delay is >
6459
0 (before we have been testing for != 0)
6461
* gtkhtml.c (gtk_html_has_undo): renamed from gtk_html_is_dirty
6463
* htmlundo.c (html_undo_has_undo_steps): renamed from
6466
2002-02-11 Radek Doulik <rodo@ximian.com>
6468
* htmlselection.c (html_engine_select_interval): don't activate
6470
(html_engine_update_selection_active_state): new helper function
6472
* gtkhtml.c (key_press_event): set event_time
6473
(button_press_event): if we are provider of PRIMARY, copy
6474
selection to primary object
6475
(button_release_event): don't copy to primary, just in case we are
6477
(button_release_event): update selection active state, don't copy
6479
(selection_get): if primary is non-NULL, use it, otherwise get
6480
selection from engine
6481
(selection_received): don't copy primary, just use it directly and
6483
(cursor_move): update selection active state
6484
(move_selection): ditto
6485
(gtk_html_select_word): ditto
6486
(gtk_html_select_line): ditto
6487
(gtk_html_select_paragraph): ditto
6488
(gtk_html_select_paragraph_extended): ditto
6489
(gtk_html_select_all): ditto, don't copy to primary
6491
* gtkhtml-private.h: added event_time
6493
2002-02-11 Larry Ewing <lewing@ximian.com>
6495
* htmltokenizer.c (in_script_or_style): fix obvious error in
6496
growing the scriptCode buffer, use g_realloc instead.
6498
2002-02-06 Radek Doulik <rodo@ximian.com>
6500
* gtkhtml.c (drag_data_received): remove \n\r in the end of url's
6501
(drag_data_received): allow dropping of uri lists instead of just
6502
one uri, implemented image dropping
6504
2002-02-05 Radek Doulik <rodo@ximian.com>
6506
* gtkhtml.c (realize): changed defaults to all
6507
(drag_data_received): when dropped on selection, it pastes over it
6510
2002-01-31 Radek Doulik <rodo@ximian.com>
6512
* keybindingsrc.*: removed paragraph formatting bindings, so now
6513
it works thru menu bindings
6515
2002-01-29 Radek Doulik <rodo@ximian.com>
6517
* htmlengine.c: added close_flow to few places to avoid empty
6520
* htmlselection.c (html_engine_select_all): as below
6522
* htmlengine-edit-cut-and-paste.c (html_engine_copy_object): check
6523
if e->clue is not empty
6525
2002-01-28 Radek Doulik <rodo@ximian.com>
6527
* htmlengine-print.c (print_page): fix header printing
6529
2002-01-27 Larry Ewing <lewing@ximian.com>
6531
* gtkhtml.h: add set_title prototype.
6533
* gtkhtml.c: add gtk_html_set_title to match gtk_html_get_title.
6535
2002-01-25 Radek Doulik <rodo@ximian.com>
6537
* htmlengine-edit.c (html_engine_set_title): new method for title setting
6539
2002-01-24 Larry Ewing <lewing@ximian.com>
6541
* htmlpainter.c: remove uneeded semicolons after
6542
DEFINE_UNIMPLEMENTED definitions. They are spurious and cause
6543
some compilers to complain. Thanks to Tim Mooney
6544
<mooney@dogbert.cc.ndsu.nodak.edu> for the patch. Fixes
6545
http://bugzilla.ximian.com/show_bug.cgi?id=19189
6547
2002-01-14 Larry Ewing <lewing@ximian.com>
6549
* htmlengine-edit-cursor.c (html_engine_draw_cursor_in_area): wrap
6550
im call in #ifdef GTK_HTML_USE_XIM
6552
2002-01-14 Radek Doulik <rodo@ximian.com>
6554
* keybindingsrc.*: bind style-itemalpha command
6556
* gtkhtml.c (command): implement style-itemalpha command
6558
2002-01-11 Radek Doulik <rodo@ximian.com>
6560
* htmltextslave.c (get_offset_for_pointer): optimized to use word
6563
2002-01-10 Radek Doulik <rodo@ximian.com>
6565
* htmlengine-edit.c (html_engine_new_text): could return link
6568
* htmlengine-edit-fontstyle.c (html_engine_text_style_object): new
6570
(html_engine_get_document_url): use html_engine_text_style_object
6571
to change link editing behaviour
6572
(html_engine_get_document_font_style): ditto
6573
(html_engine_get_document_color): ditto
6575
* htmlengine-save.c (html_encode_entities): renamed from
6576
encode_entities, exported, allow encoded_len_return to be NULL
6578
2002-01-08 Radek Doulik <rodo@ximian.com>
6580
* htmlengine-edit-cut-and-paste.c (html_engine_edit_set_link):
6581
renamed from html_engine_set_link
6583
* htmlengine-edit-clueflowstyle.c (get_props_and_set): set changes
6584
to recalculate word widths and layout properly
6586
* gtkhtml-properties.c: don't save spell properties, load spell
6589
2002-01-04 Radek Doulik <rodo@ximian.com>
6591
* gtkhtml-private.h: add notify_spell_id
6593
* gtkhtml.c (client_notify_spell_widget): new function
6594
(init_properties_widget): watch gnome spell configuration, use
6595
client_notify_spell_widget
6597
2001-12-21 Larry Ewing <lewing@ximian.com>
6599
* Makefile.am (libgtkhtml_la_LDFLAGS): add GTKHTML_RELEASE to the
6600
flags and install headers into proper place.
6602
2001-12-20 Radek Doulik <rodo@ximian.com>
6604
* gtkhtml.c (gtk_html_images_ref): new method
6605
(gtk_html_images_unref): ditto
6606
(gtk_html_image_ref): ditto
6607
(gtk_html_image_unref): ditto
6608
(gtk_html_image_preload): ditto
6610
* htmlengine.c (html_engine_begin): don't use factory cleanup, we
6611
don't need it anymore and we want preloaded images to be kept
6613
2001-12-18 Radek Doulik <rodo@ximian.com>
6615
* gtkhtml.c (class_init): added call to gdk_rgb_init
6617
* htmlengine-edit-clueflowstyle.c (set_clueflow_style_in_region):
6618
avoid skipping end and continuing to the end of document
6620
2001-12-17 Radek Doulik <rodo@ximian.com>
6622
* gtkhtml.c (gtk_html_api_set_language): use engine language prior
6625
* htmlengine.c (html_engine_set_language): new method, set
6626
language for spell checking
6628
* htmlengine.h: added language item
6630
2001-12-14 Larry Ewing <lewing@ximian.com>
6632
* htmliframe.c (html_iframe_init): dup the url.
6633
(destroy): free the url.
6635
2001-12-13 Larry Ewing <lewing@ximian.com>
6637
* gtkhtml-im.h (gtk_html_im_position_update): add prototype for
6638
html_engine_draw_cursor_in_area.
6640
* htmlengine-edit-cursor.c (html_engine_draw_cursor_in_area):
6641
update the preedit posistion.
6643
* gtkhtml-im.c (gtk_html_im_position_update): update the posistion
6644
of the XIM preedit block (This XIM patch is based on the patch by
6645
ynakai@redhat.com and fixes
6646
http://bugzilla.ximian.com/show_bug.cgi?id=9526)
6648
2001-12-12 Radek Doulik <rodo@ximian.com>
6650
* gtkhtml.c (command): implemented kill-word and
6651
backward-kill-word commands
6653
2001-12-11 Radek Doulik <rodo@ximian.com>
6655
* htmlengine-print.c (html_engine_print_with_header_footer):
6656
minimal scale 0.5, so we stop on scale, which is still readable
6658
* htmlselect.c (html_select_set_text): make it safe when
6659
select->strings == NULL
6661
2001-12-06 Radek Doulik <rodo@ximian.com>
6663
* htmltable.c (split): removed old obsolete forgotten code
6665
2001-12-05 Radek Doulik <rodo@ximian.com>
6667
* htmlprinter.c (insure_paper): use _("US-Letter") as fallback,
6668
add printer parameter to be able to get paper from master
6669
(html_printer_new): add master parameter, to be remembered, needed
6671
half margins as they are too wide in gnome-paper
6673
* gtkhtml.c (gtk_html_print_set_master): new helper function
6675
* gtkhtml-properties.c: set default print size back to 10
6677
* htmlprinter.c (insure_paper): use print master to get its paper
6679
* gtkhtml-private.h: added print_master
6681
* htmlprinter.c (html_printer_get_page_height): use top and bottom
6684
* gtkhtml-properties.c: change default size for printing fonts to
6687
2001-12-09 Radek Doulik <rodo@ximian.com>
6689
* gtkhtml.c (gtk_html_insert_html_generic): freeze/thaw
6691
* htmlimage.c (save): save links
6692
(html_image_get_actual_width): exported, updated to allow painter
6694
(html_image_get_actual_height): likewise
6695
(set_link): use color
6697
2001-12-03 Radek Doulik <rodo@ximian.com>
6699
* htmlimage.c (draw): use new colors
6701
* htmltextslave.c (draw_highlighted): use new colors
6703
* htmlpainter.c: remove html_painter_get_highlight_color, it's now
6706
* htmlcolorset.c: added entries for highlight colors in non-focus
6709
* htmlframe.c (html_frame_init): as below, BTW, iframe and frame
6710
has so much shared code, that I believe they should be inherit
6711
from generic frame parent which should hold shared code
6713
* htmliframe.c (html_iframe_init): set focus by parent
6715
2001-11-29 Radek Doulik <rodo@ximian.com>
6717
* htmlengine.c (set_focus): new helper function
6718
(html_engine_set_focus): foreach frame/iframe set painter focus,
6719
uses set_focus helper
6721
2001-11-27 Radek Doulik <rodo@ximian.com>
6723
* htmltext.c (html_text_magic_link): use
6724
html_cursor_jump_to_position_no_spell instead of
6725
html_cursor_jump_to_position to avoid unwanted spell checker calls
6726
which are performance expensive
6728
* gtkhtml.c: updated for spell checking changes
6730
* htmlengine.c (html_engine_get_spell_word): renamed from
6731
html_engine_get_word and updated
6732
(html_engine_spell_word_is_valid): likewise
6733
(html_engine_replace_spell_word_with): likewise
6735
* htmlengine-edit.c (html_engine_spell_check_range): updated
6737
* htmlclueflow.c (begin_of_word): update for spell word selection
6738
(end_of_word): ditto
6740
* htmlselection.c (html_selection_spell_word): new helper
6741
function used for word selection for spell checking
6743
* htmlengine-edit.c (html_engine_select_spell_word_editable): new
6744
function, selects word for spell checking, it differs from word
6745
selection by 2xclick
6747
2001-11-26 Radek Doulik <rodo@ximian.com>
6749
* gtkhtml.c (scroll): use MAX (0, upper) to avoid negative values
6750
(scroll_by_amount): refactored - remove redundant local variables
6752
2001-11-21 Radek Doulik <rodo@ximian.com>
6754
* gtkhtml.c (selection_clear_event): unselect only when widget is
6755
non editable, otherwise keep selection valid
6757
* htmlimage.c (draw): use html_painter_set_focus
6759
* htmltextslave.c (draw_highlighted): use html_painter_set_focus
6761
* gtkhtml.c (focus_in_event): set painter focus, redraw selection
6762
(focus_out_event): ditto
6764
* htmlpainter.c (html_painter_set_focus): remember focus in
6766
(html_painter_get_highlight_color): get highlight color depending
6769
* htmlengine.c (html_engine_redraw_selection): new helper function
6771
* htmlclueflow.c (calc_size): place check for changed size before
6772
html_object_calc_size
6773
(merge): set change size to head of self and tail of with
6774
(split): set change size aroud and child object
6776
2001-11-20 Radek Doulik <rodo@ximian.com>
6778
* htmlengine-edit-cut-and-paste.c (insert_empty_paragraph): check
6779
if original paragraph is empty link and in such case replace link
6782
* htmllinktext.c (html_link_text_to_text): changed return value,
6783
now this method return newly created object with the same text as
6784
link and same text attributes as font style/face and with default
6787
* htmlengine-edit.c (html_engine_new_text): don't ever create
6790
* htmlengine-search.c (display_search_results): use move_to_found
6791
only for non editable widget
6793
* htmlclueflow.c (search_set_info): use strlen instead of
6794
Text::text_len because of utf8
6795
(search_set_info): use g_utf8_pointer_to_offset
6796
(search_text): use strlen
6797
(search_set_info): added text parameter
6799
2001-11-19 Radek Doulik <rodo@ximian.com>
6801
* htmlengine-search.c (display_search_results): hide/show cursor
6803
* htmlselection.c (html_engine_select_interval): wrap in hide/show
6805
(html_engine_unselect_all): ditto
6806
(html_engine_disable_selection): ditto
6808
* htmlengine-search.c (html_engine_search_next): if engine is
6809
editable, use html_engine_search rather than
6810
html_engine_search_next to respect cursor position
6812
* htmlengine.c (replace): don't replace with empty text's, just
6813
delete selection in such case
6815
2001-11-15 Radek Doulik <rodo@ximian.com>
6817
* htmlcluev.c (do_layout): test if it's new flow by old_y and not
6820
2001-11-15 Larry Ewing <lewing@ximian.com>
6822
* gtkhtml-properties.c (get_font_name):
6823
(get_default_fonts): move these out of the gconf #ifdef. Patch
6824
from Michael Granger <ged@FaerieMUD.org>. Fixes Ximian 15251
6826
2001-11-14 Radek Doulik <rodo@ximian.com>
6828
* htmlengine.c (parse_halign): allow halign be "middle", which is
6831
2001-11-14 Larry Ewing <lewing@ximian.com>
6833
* htmlcolorset.c (html_colorset_set_style): use the fg[SELECTED]
6834
instead of text[SELECTED] since that is what the silly gtk+
6837
2001-11-12 Radek Doulik <rodo@ximian.com>
6839
* htmlcluev.c (do_layout): compare curr y_off's (y - ascent) and
6840
not old and new curr->y
6842
2001-11-08 Radek Doulik <rodo@ximian.com>
6844
* gtkhtml-properties.c (gtk_html_class_properties_new): get
6845
default encoding from default widget style font
6846
(gtk_html_class_properties_load): ditto
6847
(get_default_fonts): new helper function
6848
(get_font_name): stolen from e-font.c
6850
* htmlengine-edit-text.c (find_first): use g_unichar_isalnum
6851
(html_engine_capitalize_word): test if next char is alnum
6852
before doing forward_word
6853
(upper_lower): don't g_assert here as it's not needed, just test
6854
if we have text object to modify
6856
2001-11-06 Radek Doulik <rodo@ximian.com>
6858
* htmlgdkpainter.c (alloc_e_font_try): try to use gdk_font_load
6859
for fixed font, if gdk_fontset_load doesn't load fixed font for us
6861
2001-11-05 Radek Doulik <rodo@ximian.com>
6863
* htmlengine-edit-cut-and-paste.c
6864
(html_engine_cut_and_paste_begin): check for e->mark != NULL
6866
2001-11-05 Larry Ewing <lewing@ximian.com>
6868
* htmlselection.h (html_selection_current_time): s/()/(void)/
6870
2001-11-02 Radek Doulik <rodo@ximian.com>
6872
* htmltext.c (get_cursor): if we are between two text objects, use
6873
the second one fixes #14153
6875
2001-11-03 Radek Doulik <rodo@ximian.com>
6877
* htmlengine-print.c (html_engine_print_with_header_footer): set
6878
font manager defaults before we do test for fixed font
6880
2001-11-01 Radek Doulik <rodo@ximian.com>
6882
* htmlengine.c (html_engine_replace_word_with): disable selection,
6883
don't store selection across replace
6885
* htmlembedded.c (destroy): if changed_id > 0 then disconnect it
6887
* htmlembedded.h: added changed_id, where we store handler id from
6888
connected html_embedded_object_changed
6890
* htmlembedded.c (html_embedded_object_changed): moved from
6891
htmlengine.c and renamed
6893
2001-10-31 Ettore Perazzoli <ettore@ximian.com>
6895
* htmliframe.c (html_iframe_init): Set ->scroll before calling
6896
`html_iframe_set_scrolling()'. Fixes #14098.
6898
2001-10-30 Larry Ewing <lewing@ximian.com>
6900
* htmlselection.c (html_selection_current_time): add helper
6903
* htmlselection.h (html_selection_current_time): add prototype.
6905
* gtkhtml.c (gtk_html_set_base): add call to set the document
6907
(gtk_html_get_base): get the document base.
6908
(gtk_html_cut): html_selection_current_time.
6909
(gtk_html_copy): html_selection_current_time.
6910
(gtk_html_paste): html_selection_current_time.
6912
* gtkhtml.h: add *_base prototypes.
6914
* gtkhtml-private.h: add base_url member.
6916
* htmliframe.c (html_iframe_init): use set_scrolling.
6917
(html_iframe_set_scrolling): add.
6918
(calc_size): use set_scrolling.
6920
* htmliframe.h (html_iframe_set_scrolling): add helper function.
6922
* htmlengine.c (block_end_div): set e->divAlign too. Fixes
6925
2001-10-30 Radek Doulik <rodo@ximian.com>
6927
* htmltable.c (html_table_set_max_width): set max_width to
6928
min_width if min_width > max_width
6930
* htmlengine-edit-cut-and-paste.c (insert_empty_paragraph): move
6931
undo level end to wrap event
6932
(html_engine_insert_text): added event emitting, it need to be
6933
fixed later to have new event type for it, now it uses command
6935
(html_engine_insert_text): wrap it in undo level
6937
* gtkhtml.c (gtk_html_editor_event_command): added 'before' flag
6939
* gtkhtml-enums.h: split GTK_HTML_EDITOR_EVENT_COMMAND in
6940
GTK_HTML_EDITOR_EVENT_COMMAND_BEFORE and
6941
GTK_HTML_EDITOR_EVENT_COMMAND_AFTER
6943
* htmlimage.c (get_actual_width): fix scale for pixel size
6945
2001-10-30 Larry Ewing <lewing@ximian.com>
6947
* htmlcluev.c (do_layout): shut up compiler.
6949
* htmltokenizer.c: get rid of cut & pasted functions they are in
6952
2001-10-29 Larry Ewing <lewing@ximian.com>
6954
* htmltable.c (merge): shut up the compiler.
6956
* htmlengine.c (parse_c): tweak reseting center.
6958
2001-10-29 Ettore Perazzoli <ettore@ximian.com>
6960
* htmlengine.c (html_engine_init): Init `->pAlign' and
6961
`->divAlign' to `HTML_ALIGN_NONE'.
6962
(new_flow): Use `->pAlign' instead of `->divAlign'.
6963
(block_end_clueflow_style): Likewise.
6964
(block_end_div): Likewise.
6965
(parse_table): Likewise.
6966
(parse_a): Likewise.
6967
(parse_c): Likewise.
6968
(parse_d): Likewise.
6969
(parse_h): Likewise.
6970
(parse_p): Likewise.
6971
(parse_p): Set the pAlign to be the same as the divAlign by
6972
default when starting a new paragraph. When closing a paragraph,
6973
set pAlign to be the same as divAlign.
6974
(parse_d): Set both pAlign and divAlign for `<div>'.
6976
2001-10-30 Radek Doulik <rodo@ximian.com>
6978
* htmltext.c (set_color): remove call to relayout
6980
* htmlengine-edit-fontstyle.c (object_set_font_style): use
6981
html_object_prev_not_slave
6983
(set_empty_flow_color): new function + undo
6984
(set_empty_flow_style): ditto
6986
2001-10-29 Larry Ewing <lewing@ximian.com>
6988
* htmlengine.c (html_engine_destroy): timers live in the selection
6989
updater too, clear it before we destroy the objects.
6991
* htmlgdkpainter.c (alloc_e_font_try): use gdk_fontset_load (patch
6992
from Kjartan Maraas <kmaraas@gnome.org>). see Ximian #11883.
6994
2001-10-29 Radek Doulik <rodo@ximian.com>
6996
* htmlprinter.c: use gnome_font_get_width_utf8_sized
6998
* htmlobject.c (html_object_cursor_backward): handle aligned clues
7000
* htmlengine.c (html_engine_calc_min_width): use pixel_size
7002
* htmlprinter.c (get_font_size): new helper function
7003
(alloc_font): use get_font_size, which uses scale attribute
7005
* htmlengine-print.c (html_engine_print_with_header_footer): set
7008
* htmlprinter.c: use scale attribute
7010
* htmlprinter.h: added scale attribute
7012
* htmlpainter.c (html_painter_get_font): check if font is non-NULL
7013
before dereferencing
7015
* htmlprinter.c (alloc_font): if we can't allocate selected face
7016
and even Courier or Helvetica, fallback to first font from
7017
gnome_font_family_list
7019
* htmlfontmanager.c (html_font_manager_get_font): replace g_error
7020
with g_warning and test if font is non-NULL when setting to font
7023
* htmlprinter.c (begin): added call to gnome_print_beginpage
7025
* htmlengine-print.c (do_we_have_default_font): new helper
7027
(html_engine_print_with_header_footer): don't print if we are
7028
unable to allocate default font
7030
* htmlcluev.c (check_point): check align_right_list too
7031
(check_point): translate aligned clues coordinates
7033
2001-10-29 Ettore Perazzoli <ettore@ximian.com>
7035
* htmlselection.c (html_engine_select_interval): Peek the time
7036
from `gtk_get_current_event()'.
7038
* gtkhtml.c (get_current_time): New function to get the current
7039
time from `gtk_get_current_event()' [if the latter fails, it just
7040
resorts to `GDK_CURRENT_TIME'].
7041
(gtk_html_paste): Use it instead of just `GDK_CURRENT_TIME' as the
7043
(gtk_html_copy): Likewise.
7044
(gtk_html_cut): Likewise.
7046
2001-10-29 Radek Doulik <rodo@ximian.com>
7048
* gtkhtml.c (command): check if word is non-NULL, don't leak it
7050
2001-10-28 Larry Ewing <lewing@ximian.com>
7052
* gtkhtml.c (command): stop insertion links on new paragraphs.
7054
* htmlengine-edit-cut-and-paste.c (html_engine_cut_line): wrap cut
7055
line in an undo level.
7056
(html_engine_set_insertion_link): set the insertion color if there
7058
(insert_empty_paragraph): the command resets the link for us now.
7060
* htmlimage.c (stop_anim): remove the stall timeout here as well.
7061
(html_image_pointer_remove_stall): helper function.
7062
(html_image_pointer_unref): use remove_stall.
7063
(check_point): go before or after by splitting in the middle.
7064
This is at least more usable that the old method.
7066
* htmlengine.c (html_engine_destroy): stop all animations and
7067
destroy stall timers before we enter the destroy processing.
7069
* gtkhtml.c: add accessor to the allow_frameset disable code.
7071
* gtkhtml.h: add prototypes.
7073
2001-10-27 Larry Ewing <lewing@ximian.com>
7075
* gtkhtml.c (scroll_by_amount): fix this so that we never scroll
7076
farther down the page than we want to (adj->val -
7077
adj->page_size). Fixes Ximian #2504.
7079
* htmltokenizer.c (in_entity): always collapse the entity even in
7080
tags and element names.
7082
* htmlengine.c (html_engine_destroy): make the engine safe for
7083
reentrant calls that could result from destroying embedded objects
7084
that might iterate the main loop. Fixes ximian #13699.
7086
2001-10-26 Radek Doulik <rodo@ximian.com>
7088
* htmltable.c (op_copy): handle cspan, rspan
7089
added few g_return_if_fail's
7091
* htmlclueflow.c (calc_size): if width_left < 0 and ! firstRun,
7092
then break line here
7093
(draw_background): don't call html_object_draw for parent as this
7094
means we draw itself too (so when flow is drawed from drawing
7095
queue, it's rendered twice which means uglyness for gdkxft) I've
7096
tried to reproduce bug #6, for which this was intended as fix, but
7097
can't reproduce it, so I hope #6 is fixed properly now.
7099
* htmlobject.c (html_object_is_clue): added HTML_TYPE_CLUEALIGNED,
7100
which Larry probably forgot commit
7102
2001-10-25 Larry Ewing <lewing@ximian.com>
7104
* htmlembedded.c (destroy): clean up the signals and unset the
7105
object data so that even if the widget lives on if doesn't kill
7107
(html_embedded_allocate): rename for the fun of it.
7108
(html_embedded_new_widget): pass em as object data so that the
7109
signal will be removed when we destroy.
7111
* htmltokenizer.c (flush_entity): don't add the TAG_ESCAPE to the
7112
output when fluhing the entity.
7113
(in_entity): don't collapse entities in tags or attributes.
7115
* htmlimage.c (image_update_url): don't do anything if there is no
7117
(get_url): return the image->url if final->url is NULL.
7119
2001-10-25 Radek Doulik <rodo@ximian.com>
7121
* htmlengine-edit-cut-and-paste.c (insert_object): use
7122
html_cursor_jump_to_position_no_spell
7123
(insert_object_do): ditto
7124
(insert_object): ditto
7126
* htmlcursor.c (html_cursor_jump_to_position_no_spell): new
7127
function, preserves engine's need_spell_check flag while jumps
7129
* htmlengine-edit-cut-and-paste.c (append_object): remember
7130
position when empty flow is already prepared
7132
* htmlengine.c (check_cursor): new function, checks if cursor
7135
* htmlengine-edit-cut-and-paste.c (insert_object_do): save orig
7137
(insert_object_do): preserve position before for orig
7138
(isolate_tables): rewritten once more
7139
(insert_undo_action): update to isolate_tables changes
7140
(insert_setup_undo): ditto
7141
(insert_object): ditto
7143
* htmlobject.c (move_object_cursor): allow cursor moves in flow
7144
where containers are mixed with leaf objects
7146
2001-10-24 Larry Ewing <lewing@ximian.com>
7148
* htmlobject.c (html_object_is_clue): add HTML_TYPE_CLUEALIGNED to
7151
* htmlimage.c (html_image_animation_new): initialize some
7152
variables that were missed.
7154
* htmlengine.c (html_engine_destroy): remove the thaw idle if we
7157
2001-10-24 Radek Doulik <rodo@ximian.com>
7159
* htmlengine-edit-cut-and-paste.c (insert_empty_paragraph): added
7160
add_undo parameter which specifies, if undo action should be added
7161
(delete_object): ditto
7162
(isolate_tables): rewritten
7163
(insert_object): updated to new isolate_tables
7165
* htmltable.c (op_copy): fill empty cells with cells with empty
7166
texts, fix copying start condition
7168
2001-10-23 Radek Doulik <rodo@ximian.com>
7170
* htmltable.c (split): redo splits on table boundaries
7172
* htmltokenizer.c (g_utf8_get_char_validated): make it static to
7173
avoid compiler warning
7175
* htmltable.c (merge): take care of prev_c1 when moving cells
7176
handle case when merging two cells better - fix cursor position
7178
* htmlclue.c (html_clue_append_after): be more carefull
7179
(html_clue_append): ditto
7181
* htmlengine-edit-cut-and-paste.c (insert_object_do): check for
7184
* htmlobject.c (html_object_is_clue): new function
7186
* htmlclueflow.c (merge): merge always
7188
* htmltable.c (split): add dup to parent clue
7189
(merge): c1 = c2 to be sure c1_prev is valid
7191
2001-10-22 Larry Ewing <lewing@ximian.com>
7193
* htmlclue.c (op_helper): don't do anything to last until we've
7194
checked to make sure the clue isn't empty and last is not NULL.
7196
2001-10-22 Radek Doulik <rodo@ximian.com>
7198
* htmlengine-edit.c (html_engine_select_word_editable): use
7201
* htmlselection.c (html_selection_word): new method
7202
(word_interval): use html_selection_word
7204
* htmlengine-edit-cut-and-paste.c (html_engine_delete_container):
7205
reorder selection related method calls
7206
(html_engine_delete_n): ditto + added freeze/thaw
7208
* htmlpainter.c (html_painter_draw_spell_error): return width of
7209
spell error underline (which is width of underlined text)
7211
* htmltextslave.c (draw_spell_errors): fixed misplaced
7212
misspell-underlines, optimized
7214
2001-10-21 Larry Ewing <lewing@ximian.com>
7216
* htmldrawqueue.c (html_draw_queue_clear): take care of
7217
pending_frees here this way we don't leak if when the queue is
7219
(html_draw_queue_flush): don't free free_pending obects here, just
7222
* htmlobject.c (destroy): make sure cleanup everything even if
7223
redraw is pending, otherwise the drwaqueue code will leak this.
7225
2001-10-20 Larry Ewing <lewing@ximian.com>
7227
* htmliframe.c (copy): add a partial copy implementation to
7228
make things slightly less prone to breaking.
7229
(html_iframe_class_init): use copy.
7231
2001-10-19 Dan Winship <danw@frotz.mysterion.org>
7233
* gtkhtml-stream.c (gtk_html_stream_vprintf): Fix another
7234
ppc-breaking stdarg buglet.
7236
2001-10-19 Radek Doulik <rodo@ximian.com>
7238
* htmlinterval.c (unselect_object): queue draw only if engine is
7240
(select_object): ditto
7242
* htmlimage.c (update_or_redraw): use html_engine_flush_draw_queue
7243
instead of html_draw_queue_flush and html_engine_queue_draw
7244
instead of html_draw_queue_add
7246
* htmlengine.c (html_engine_flush_draw_queue): flush only if not
7248
(html_engine_freeze): flush draw queue before freeze
7250
* htmlengine-edit-cut-and-paste.c (set_cursor_at_end_of_object):
7251
preserve need_spell_check flag
7253
* gtkhtml.c (expose): do simple draw as engine now handles frozen
7256
* htmlengine.c (html_engine_draw_real): renamed from
7258
(html_engine_draw): handle frozen draws
7260
* htmlclueflow.c (op_helper): remove slaves only when cut or in
7263
* htmlclue.c (op_helper): make it work even when containing slaves
7265
* htmlengine.c (html_engine_add_expose): new method, stores expose
7266
rectangle in SList to be processed in thaw
7267
(thaw_idle): call do_pending_expose, clear and reset
7269
(do_pending_expose): do pending exposes
7271
* gtkhtml.c (expose): if engine is frozen, then add expose to
7272
pending to be processed in final thaw
7274
* htmlengine.c (thaw_idle): check for freeze_count if we aren't
7276
(html_engine_thaw): don't decrease freeze_count if it equals to 1,
7279
* htmlengine-edit-cut-and-paste.c (html_engine_copy_object): don't
7280
freeze and thaw in copy, copy should not modify our tree, so we
7281
don't need to update it after
7283
2001-10-18 Larry Ewing <lewing@ximian.com>
7285
* htmlengine.c (update_embedded): go ahead and draw the
7286
background. This cuts down on flashing when switching pages
7289
2001-10-18 Radek Doulik <rodo@ximian.com>
7291
* htmltablecell.c (calc_size): fix rendering
7293
2001-10-18 Larry Ewing <lewing@ximian.com>
7295
* htmltokenizer.c: fix to guarantee no invalid utf8 sequences can
7296
make it past any part of the tokenizer into the tokens. This is
7297
critical to prevent looping in g_utf8* on certain input.
7299
2001-10-17 Larry Ewing <lewing@ximian.com>
7301
* htmltext.c (html_text_set_text): update the text_len when we set
7304
* htmlembedded.c (destroy): sink any widget that hasn't been
7307
2001-10-17 Radek Doulik <rodo@ximian.com>
7309
* htmlobject.c (html_object_add_to_changed): new function, adds
7310
object to changed list and tries to minimalize repeated drawing
7312
* htmlengine-edit-cut-and-paste.c (delete_object_do): flush queue
7313
before delete to avoid deleted object drawing
7315
* htmlengine.c (html_engine_flush_draw_queue): make it possible
7316
flush draw queue when engine is frozen
7318
* htmltext.c (html_text_op_cut_helper): fix rendering
7320
2001-10-16 Larry Ewing <lewing@ximian.com>
7322
* htmlselect.c (copy): implement enough of copy that it no longer
7323
crashes when copied.
7325
2001-10-17 Radek Doulik <rodo@ximian.com>
7327
* htmltable.c (calc_size): fix rendering issues
7329
2001-10-16 Radek Doulik <rodo@ximian.com>
7331
* htmltext.c (html_text_get_nb_width): fix for case where more
7332
than 2 non-breakable texts are in line, use get_next_nb_width
7333
(get_next_nb_width): new helper function
7335
2001-10-16 Larry Ewing <lewing@ximian.com>
7337
* htmlclueflow.c: include <stdlib.h> for abs definition.
7339
* htmlengine.h: add allow_frameset boolean.
7341
* htmlengine.c (html_engine_init): add allow_frameset paramter.
7342
(parse_f): only parse the frameset and frames if allow_frameset is
7344
(parse_n): only discard the noframes body if allow_frameset is
7346
(html_engine_init): initialize allow_frameset.
7348
* htmltokenizer.c (add_byte): discard '\0' on input, it just
7349
confuses the rest of the tokenizer and serves no purpose.
7351
2001-10-15 Radek Doulik <rodo@ximian.com>
7353
* handle "font size points" attribute everywhere
7355
* gtkhtml-properties.h: added points attributes
7357
* gtkhtml.c (selection_received): automagic links when pasting
7360
* htmlclueflow.c (add_clear_area): new helper function
7361
(calc_size): use add_clear_area in case we need to erase area
7362
behind flow, which has just shrinked
7364
* htmlcluev.c (add_clear_area_behind): set width and height to
7365
HTMLObjectClearRectangle
7367
* htmlengine.c (clear_changed_area): use width and height from
7368
HTMLObjectClearRectangle
7370
* htmlobject.h: added width and height to HTMLObjectClearRectangle
7372
2001-10-14 Larry Ewing <lewing@ximian.com>
7374
* htmlimage.c (render_cur_frame): add hack to turn off alpha
7375
blending durring an animation. Since gifs are the only animation
7376
type gdk-pixbuf supports it breaks nothing an makes for a big
7379
2001-10-14 Jon Trowbridge <trow@ximian.com>
7381
* htmlframe.c (html_frame_init): On second thought, maybe sharing
7382
the tokenizers isn't such a good idea after all...
7384
* htmliframe.c (html_iframe_init): Ditto.
7386
2001-10-13 Jon Trowbridge <trow@ximian.com>
7388
* htmliframe.c (html_iframe_init): The iframe's HTMLEngine needs
7389
to share the parent's HTMLTokenizer, not a copy. (Bug #11638)
7391
* htmlframe.c (html_frame_init): Likewise, the frame's HTMLEngine
7392
needs to share the parent's HTMLTokenizer, not a copy. (also Bug
7395
2001-10-12 Radek Doulik <rodo@ximian.com>
7397
* htmlengine.c (draw_changed_objects): test if we already have
7400
* htmlobject.c (html_object_engine_intersection): new function,
7402
(html_object_engine_translation): ditto
7404
* htmldrawqueue.c (draw_obj): refactorize, extracted few functions
7406
* htmlcluev.c (do_layout): handle case where width is > max_width
7407
and schedule area clear to changed_objs
7408
also store changed objs to local list which is prepend to global
7411
* htmlengine.c (draw_changed_objects): handle area clears
7412
(clear_changed_area): do area clear here
7413
(html_engine_intersection): new extracted function
7415
* gtkhtml.c (gtk_html_begin): return NULL to avoid compiler
7418
* htmlclue.c (split): reset self::x,y to get right redraw in plain
7421
* htmltext.c (get_tags): don't use </FONT size=...>, but just
7423
(get_tags): join <tag> and </tag> additions together
7425
* htmlclueflow.c (save): in case of PRE paragraph, write final \n
7427
(write_pre_tags): don't write \n for PRE here
7428
(save): don't put \n after <DIV>, </DIV>
7429
(save): put alignment tags inside
7431
2001-10-12 Larry Ewing <lewing@ximian.com>
7433
* gtkhtml.c (gtk_html_private_calc_scrollbars): don't clip the
7434
page width it leads to bad things.
7435
(gtk_html_begin): add a precondition to try to see
7437
2001-10-09 Radek Doulik <rodo@ximian.com>
7439
* htmlclueflow.c (get_pre_padding): fixed pre/post padding between
7440
list and non list paragraphs
7441
(need_list_begin): fix for list/non-list
7442
(need_list_end): ditto
7444
* htmlengine.c (parse_l): close flow on </li>
7446
* htmlclueflow.c: fixed pre/post padding (was wrong between pre
7447
and non-pre paragraphs with different indentation levels)
7448
fixed list indentation (was wrong for indented lists and for inner
7449
lists with longer indentation)
7450
fixed pre/post padding on end of list
7451
prettyfied save output
7452
(write_pre_tags): fix list, nonlist paragraph on the same level
7454
* htmlengine-save.c (get_body): add new line after <BODY>
7456
2001-10-09 Larry Ewing <lewing@ximian.com>
7458
* htmltextslave.c (get_offset_for_bounded_width): remove redundant
7459
calls to html_text_get_text since it is actually expensive.
7461
2001-10-08 Larry Ewing <lewing@ximian.com>
7463
* htmlselect.c (html_select_add_option): don't add static strings
7464
to a list that we free all the items in. Also some formatting
7465
changes in random places. Fixes Ximian #8629
7467
2001-10-08 Radek Doulik <rodo@ximian.com>
7469
* gtkhtml.c (gtk_html_api_set_language): new helper private
7470
function, used to set language thru editor API
7471
(gtk_html_set_editor_api): set language
7472
(client_notify_widget): set language
7473
(client_notify_widget): recheck spelling
7475
* gtkhtml.h (struct _GtkHTMLEditorAPI): added set_language method
7477
* htmlengine.c (html_engine_get_word): utf8-ize this function
7479
2001-10-06 Larry Ewing <lewing@ximian.com>
7481
* htmlimage.c (html_image_set_url): call register with reload set
7484
2001-10-05 Larry Ewing <lewing@ximian.com>
7486
* gtkhtml-stream.c (gtk_html_stream_vprintf): fix the limiting
7489
2001-10-05 Radek Doulik <rodo@ximian.com>
7491
* htmlimage.c (html_image_factory_end_pixbuf): call
7492
gdk_pixbuf_loader_close and get pixbuf from loader if we don't
7494
(html_image_edit_set_url): renamed from html_image_set_url, editor
7496
(html_image_set_url): reincarnate old one
7497
(free_image_ptr_data): new helper function
7498
(html_image_pointer_unref): use free_image_ptr_data
7499
(html_image_factory_register): ditto, fixed reload
7500
(html_image_set_url): call html_image_factory_register with reaload TRUE
7502
2001-10-03 Larry Ewing <lewing@ximian.com>
7504
* gtkhtml-stream.c (gtk_html_stream_vprintf): limit the potential
7505
alloca size so that bad things are less likely to happen.
7507
2001-10-01 Larry Ewing <lewing@ximian.com>
7509
* htmlsearch.c (html_search_new): silence warnings for unused
7512
* gtkhtml-stream.c: add stdlib.h include.
7514
* htmlsearch.c (html_search_new): handle the nongnu regex case
7515
properly. From David Kaelbling <drk@sgi.com>
7517
* htmlentity.c: add gtkhtml-compat.h include for alloca
7518
definition. From David Kaelbling <drk@sgi.com>
7520
* htmlpainter.c: add gtkhtml-compat.h include for alloca
7521
definition. From David Kaelbling <drk@sgi.com>
7523
* gtkhtml-stream.c (gtk_html_stream_vprintf):
7524
(gtk_html_stream_printf): add helper functions
7525
for writing to streams to cut down the duplication of code that is
7528
* gtkhtml-stream.h: add prototypes for stream_printf and
7531
* htmlengine.c (parse_f): go ahead and pass the NULL on through.
7533
* htmltokenizer.c (add_byte): make the unknown character a ? so
7534
that we can distinguish it from a the underscore that camel will
7537
2001-09-26 Larry Ewing <lewing@ximian.com>
7539
* htmlform.c (html_form_add_radio): handle a NULL name for the
7540
radio group without. I'm not sure what the proper thing to do
7541
here is, but crashing is not a good thing.
7543
* htmlengine-edit-clueflowstyle.h: make the prototype match the
7544
function (spotted by Dan Nguyen <dnn@austin.ibm.com>).
7546
2001-09-25 Lauris Kaplinski <lauris@ximian.com>
7548
* htmlprinter.c (draw_panel): Close path before fill
7549
(draw_background): Ditto
7550
(begin): Close path before clip
7551
(prepare_rectangle): Close path
7553
2001-09-21 Larry Ewing <lewing@ximian.com>
7555
* htmltext.c (is_convert_nbsp_needed): silence a warning.
7556
(is_convert_nbsp_needed): fix this properly.
7558
* htmlpainter.c: add #include <stdlib.h> to cover the alloca
7561
* htmlgdkpainter.c (gtkhtml_private_split_name): ifdef out since
7562
it is currently unused.
7564
* Makefile.am (testgtkhtml_LDADD): remove -static it was breaking
7565
the build under libtool-1.4 and FreeBSD.
7566
(gtest_LDADD): same.
7568
2001-09-19 <NotZed@Ximian.com>
7570
* htmltokenizer.c (add_byte): Check that utf8_length doesn't
7571
outgrow our buffer. The g_utf_get_char_extended function seems
7572
broken in a way i can't fathom right now.
7574
2001-09-18 Larry Ewing <lewing@ximian.com>
7576
* htmlimage.c (html_image_factory_end_pixbuf): let the pointer
7577
close the loader when it is freed, not before then so that
7578
html_image_set_url works properly.
7580
2001-09-17 Radek Doulik <rodo@ximian.com>
7582
* htmlengine-edit.c (html_engine_prev_cell): don't call
7583
gtk_html_edit_make_cursor_visible
7584
(html_engine_next_cell): ditto
7586
* gtkhtml.c (destroy): move gconf related code before html->priv
7589
* htmlclueflow.c (get_start_tag): added few \n
7590
(get_end_tag): ditto, use need_list_end instead of need_list_begin
7592
2001-09-16 Radek Doulik <rodo@ximian.com>
7594
* htmlcluev.c (find_free_area): fixed test for checking if margins
7597
2001-09-14 Radek Doulik <rodo@ximian.com>
7599
* htmlclueflow.c (calc_size): take care of case when lmargin >=
7600
rmargin, could happen if there is wide aligned object, which takes
7601
whole max_width, so we must find another free area, otherwise we
7602
end in infinite loop, where width_left <= 0
7603
(calc_size): recalc margins only if area was sufficient, in other
7604
case we have already calculated new and right margins and there
7605
they were recalculated to wrong values, which could trap us in an
7608
* htmltextslave.c(slave_split_if_too_long): new function, use
7609
html_object_calc_abs_position to calc absolute slave position and
7610
bound width by MAX_WIDGET_WIDTH - x
7611
(calc_size): if slave width > max_width, use slave_split_if_too_long
7613
* htmlengine.c (html_engine_calc_size): don't use min_width as
7614
lower bound of max_width
7616
* htmltable.c (html_table_set_max_width): calc max_width as MAX
7617
(max_width, min_width)
7619
2001-09-13 Larry Ewing <lewing@ximian.com>
7621
* htmlengine-save.c (html_engine_save_encode): actually free the
7622
encoding buffer. Wow that was a huge leak, fixes ximian #9691.
7624
2001-09-12 Larry Ewing <lewing@ximian.com>
7626
* htmlgdkpainter.c (alloc_e_font_try): free the temp strings even
7627
if we exit with and error.
7629
2001-09-12 Radek Doulik <rodo@ximian.com>
7631
* htmlgdkpainter.c (alloc_e_font_do): renamed from alloc_e_font
7632
(alloc_e_font): if we cannot alloc font with requsted style, try
7633
to allocate simplified styles of the same face before we fallback
7635
(alloc_e_font_try): use gdk_font_load and then
7636
e_font_from_gdk_font instead of e_font_from_gdk_name to avoid
7638
(alloc_e_font_try): comment out fixed font test which was
7640
(alloc_e_font_try): use e_font_from_gdk_name to be sure that
7641
fontset is used when needed
7643
* gtkhtml.c (client_notify_widget): update tkey compares for
7644
/font_variable instead of /font_variable_family and likewise for
7647
* htmlengine.c (html_engine_make_cursor_visible): allow cursor to
7648
be 1 pixel outside view - it doesn't matter now, as we don't allow
7649
edit margin widths in editor, once we do, we must take care about
7650
case when rightBorder == 0
7652
* htmlengine-edit-cursor.c (refresh_under_cursor): left and top
7653
border widths were interchanged
7655
2001-09-10 Larry Ewing <lewing@ximian.com>
7657
* htmlframe.c (html_frame_init): handle NULL and empty urls by
7658
loading a blank page in the frame.
7660
2001-09-10 Radek Doulik <rodo@ximian.com>
7662
* htmlengine.c (html_engine_calc_size): use pixel size
7664
* keybindingsrc.*: update TAB/Shift TAB bindings
7666
* gtkhtml.c (load_keybindings): bind C-S-+ and C-+ to ZOOM_IN
7667
(load_keybindings): don't bind TAB/Shift TAB
7668
(command): simplify command binded to TAB/Shift TAB
7670
2001-09-08 Dan Winship <danw@ximian.com>
7672
* gtkhtml.c (destroy): unref the engine rather than explicitly
7675
2001-09-07 Radek Doulik <rodo@ximian.com>
7677
* applied boc's patch
7678
* gtkhtml.c (destroy): remove set_font idle
7679
(destroy): remove gconf notification callback
7680
(init_properties_widget): remember client notify ID
7681
(init): zero gconf and XIM fields (it isn't needed because gnew0,
7682
but we does this for other fields too anyway)
7683
(init_properties): initialize gconf by itself if needed and print
7686
* Makefile.am (gtest_LDADD): added GCONF_LIBS
7688
* htmltextslave.c (get_offset_for_bounded_width): for ' ' search
7689
in sep instead of text->text
7690
(calc_size): test for split only for slave->posLen > 1
7691
(calc_size): split only if pos > 0
7693
2001-09-06 Radek Doulik <rodo@ximian.com>
7695
* htmlimage.c (update_or_redraw): new helper function, takes care
7696
about updating when new data arrives thru stream. It schedules
7697
update only if image size changed, otherwise it just redraws
7698
(html_image_factory_end_pixbuf): use update_or_redraw
7699
(html_image_factory_area_prepared): ditto
7701
2001-09-03 Radek Doulik <rodo@ximian.com>
7703
* htmlengine.c (parse_table): don't discard broken tables
7705
2001-09-01 Larry Ewing <lewing@ximian.com>
7707
* htmlimage.c (copy): make a reference.
7708
(html_image_factory_unregister): fix this properly.
7710
2001-08-31 Larry Ewing <lewing@ximian.com>
7712
* htmlimage.c (html_image_factory_unregister): change the test now
7713
that we unref before we remove.
7715
2001-08-31 Radek Doulik <rodo@ximian.com>
7717
* htmlengine-edit-cursor.c: define stipple colors on the
7718
beggining, it will make it easier for tigert to tune stipple
7721
2001-08-30 Radek Doulik <rodo@ximian.com>
7723
* htmltextslave.c (draw_highlighted): updated to use faster line
7724
offset calculation using html_painter_calc_text_width
7726
* htmlpainter.c (calc_text_bytes_delta): new helper function, it
7727
does 1st pass of translating \t and - calculates right size
7728
of translated string
7729
(translate_text_special_chars): 2nd pass which finally translates
7731
(put_last): helper inline function
7732
(html_painter_draw_text): use new translating function
7733
(html_painter_calc_text_width): ditto
7734
(html_painter_calc_text_width): changed line_offset to pointer, we
7735
update line_offset now to line offset on the end of string
7737
* htmltext.c (split_word_width): removed as it's broken, don't
7738
bother with it for now
7740
* htmlpainter.c (html_painter_draw_text): handle before
7741
this we have left nbsp drawing on X, but some fonts drawed char
7743
(draw_current): helper inlined function to draw current undrawed
7744
text before we draw/skip special characters ( and \t)
7746
2001-08-29 Radek Doulik <rodo@ximian.com>
7748
* htmltextslave.c (calc_size): split if width > MAX_WIDGET_WIDTH
7749
(get_offset_for_bounded_width): new helper function
7750
(calc_width): update for MAX_WIDGET_WIDTH changes
7752
* htmlenums.h (MAX_WIDGET_WIDTH): define it as 32000
7754
* htmlengine.c (html_engine_calc_size): make max_width <=
7757
* gtkhtml.c (gtk_html_private_calc_scrollbars): don't let width be
7758
greater than MAX_WIDGET_WIDTH
7760
2001-08-28 Radek Doulik <rodo@ximian.com>
7762
* gtkhtml-properties.c (gtk_html_class_properties_new): use rather
7764
(gtk_html_class_properties_load): assign 65535 instead of 0xffff
7765
as default (looks like gnome_config doesn't understand HEXadecimal
7768
2001-08-27 Radek Doulik <rodo@ximian.com>
7770
* gtkhtml.c (gtk_html_private_calc_scrollbars): don't let
7771
adjustment values go out of bounds
7772
(gtk_html_update_scrollbars_on_resize): new function, updates
7773
scroll bars after widget is resized, tries to keep view position
7774
({x,y}_offset on the same place
7775
(gtk_html_private_calc_scrollbars): keep scrollbars in bounds,
7776
it's probably unneeded now, but to be sure
7777
(size_allocate): use gtk_html_update_scrollbars_on_resize, take
7778
care of adjustment changes
7779
(button_press_event): reversed font-zooming direction
7781
* htmlimage.c (html_image_set_url): re-register image pointer even
7782
if url is the same as before as image could actually change
7784
(html_image_set_url): schedule update and set change
7785
(html_image_set_border): set change
7786
(html_image_set_size): ditto
7787
(html_image_set_spacing): ditto
7788
(html_image_factory_unregister): unref before test for refcount,
7789
fix g_assert condition, unref when removing from factory hash
7792
2001-08-24 Larry Ewing <lewing@ximian.com>
7794
* htmlengine.c (update_embedded): fix the x and y offsets of the
7795
area we begin the painter on.
7797
2001-08-24 Radek Doulik <rodo@ximian.com>
7799
* htmlengine-search.c (html_engine_search): update to respect
7802
* htmlengine-edit-cut-and-paste.c (insert_object): call
7803
insert_object_do only if len > 0
7805
* htmlsearch.c (html_search_new): when editable, start at current
7808
2001-08-24 Larry Ewing <lewing@ximian.com>
7810
* htmlengine-edit-selection-updater.c: remove the
7811
html_object_ref/unref calls on the engine. They are are wrong.
7812
html_engine_edit_selection_updater_destroy will never get
7813
called because the ref in html_engine_edit_selection_updater_new
7814
will keep html_engine_destroy from ever being run. Thanks go to
7815
Jacob for tracking this down. Fixes ximian #7168
7817
2001-08-24 Radek Doulik <rodo@ximian.com>
7819
* htmlprinter.c (alloc_font): extract family name from face and
7820
use that for font lookup
7822
* htmlfontmanager.c (html_font_manager_get_attr): renamed from
7825
2001-08-23 Radek Doulik <rodo@ximian.com>
7827
* htmltext.c (check_last_white): new inlined helper function
7828
(check_prev_white): ditto
7829
(is_convert_nbsp_needed): updated, check for
7830
... <space>
7831
(write_prev_white_space): new inlined helper function
7832
(write_last_white_space): ditto
7833
(convert_nbsp): updated, convert to ... <space>
7834
(merge_word_width): commented out unused condition
7836
2001-08-22 Radek Doulik <rodo@ximian.com>
7838
* htmlengine-edit-cursor.c (html_engine_setup_blinking_cursor):
7839
start with shown cursor
7840
(html_engine_setup_blinking_cursor): call blink_timeout_cb
7842
(html_engine_draw_cursor_in_area): draw object cursors only when
7844
* htmlengine-edit-clueflowstyle.c (get_props_and_set): when we are
7845
changing from !item at indent level 0, set insentation to 1 and
7846
likewise for item --> !item && indentation == 1
7848
* htmlclueflow.c (html_clueflow_set_style): don't change
7851
2001-08-22 Larry Ewing <lewing@ximian.com>
7853
* htmlclueflow.c (check_point): fix some stupidness of mine.
7855
* htmlclueflow.c (check_point): make sure that head and tail are
7856
not NULL before we dereference them. Fixes ximian #5434.
7858
2001-08-21 Larry Ewing <lewing@ximian.com>
7860
* htmlclueflow.c (write_pre_tags): add some parens.
7862
* gtkhtml.c (gtk_html_set_paragraph_alignment): emit alignment
7863
changed signals for we we change the alignment.
7865
2001-08-21 Radek Doulik <rodo@ximian.com>
7867
* htmlclueflow.c (write_pre_tags): check for curr_tag != NULL as
7870
2001-08-20 Radek Doulik <rodo@ximian.com>
7872
* htmlclueflow.c (html_clueflow_set_style): fix condition to avoid
7873
wrong indentation for H1
7875
2001-08-17 Radek Doulik <rodo@ximian.com>
7877
* keybindingsrc.{ms,emacs,xeamcs}: changed C-TAB rather to pure
7878
indent-more and S-C-TAB to indent-less
7880
* gtkhtml.c (insert_tab_or_indent_more_or_next_cell): new helper
7881
function for new GTK_HTML_COMMAND_INDENT_INC_OR_NEXT_CELL command
7883
* keybindingsrc.{ms,emacs,xeamcs}: added C-TAB for
7884
indent-more-or-next-cell
7886
* htmlengine-edit-cursor.c: added table and image cursor, fixed
7889
* htmlcursor.h: added new type HTMLCursorRectangle
7891
2001-08-16 Radek Doulik <rodo@ximian.com>
7893
* htmlengine-edit-cursor.c (move_rect): extracted helper function
7895
(draw_cursor_rectangle): new helper function
7896
(html_engine_draw_cell_cursor): new method for cell cursor
7897
drawing, uses draw_cursor_rectangle
7898
(html_engine_draw_cursor_in_area): call
7899
html_engine_draw_cell_cursor
7901
* htmlclueflow.c (update_item_number): don't update for non-items
7902
(op_cut): fixed few cases of item sequences and for crash in case
7903
that flow was whole deleted and destroyed
7905
2001-08-15 Radek Doulik <rodo@ximian.com>
7907
* htmlclueflow.c (get_pre_padding): don't handle ordered items
7909
(get_prev_relative_item): new helper function
7910
(get_next_relative_item): ditto
7911
(update_item_number): use new functions, allow lists to be
7912
interrupted by list with higher level
7913
(CLUEFLOW_ITEM_MARKER): make it 6 chars wide as number markers
7915
* gtkhtml.c (command): don't decrease indent on list item, rather
7918
* htmlclueflow.c (save_plain): add padding even to empty lines,
7919
so we get item headings
7920
(plain_get_marker): new helper function
7921
(plain_padding): use plain_get_marker
7923
* htmlengine-edit-clueflowstyle.c: updated for list changes
7925
* htmlengine.c: rewritten/updated [un]ordered lists
7927
* htmlclueflow.c: rewritten/updated [un]ordered lists, implemented
7928
[un]ordered lists saving
7930
* htmlenums.h: redefined HTMLListType
7931
HTML_CLUEFLOW_STYLE_LIST_ITEM instead of plenty item types
7933
* gtkhtml.c (clueflow_style_to_paragraph_style): added item_type
7935
(paragraph_style_to_clueflow_style): likewise
7937
* gtkhtml-enums.h: added
7938
GTK_HTML_COMMAND_PARAGRAPH_STYLE_ITEMALPHA command
7940
2001-08-14 Larry Ewing <lewing@ximian.com>
7942
* htmlengine.c (update_embedded): add begin/end painter calls
7943
around the update calls for things like HTMLImageInput.
7945
2001-08-13 Radek Doulik <rodo@ximian.com>
7947
* htmlselection.c (test_point): new helper function
7948
(html_engine_point_in_selection): new method, tests if point is in
7951
* htmlclueflow.c (merge): ops, remove HTML_CLUEV cast
7953
* gtkhtml.c (gtk_html_update_styles): exported
7955
* htmlengine-edit-table.c: be more careful about HTMLObject types
7957
* htmlimage.c (html_image_set_url): set object change flags on url
7960
* htmlclueflow.c (merge): copy all fields
7962
2001-08-09 Radek Doulik <rodo@ximian.com>
7964
* htmlcursor.c (backward_in_flow): fixed. before, we could end
7965
between two text objects in the middle of the line
7967
2001-08-10 Larry Ewing <lewing@ximian.com>
7969
* gtkhtml.c (realize): if no one has put us in a scrolled window
7970
or set our adjustments go ahead and create the adjustments
7971
ourself. This will prevent the widget from sefaulting in this
7974
2001-08-09 Larry Ewing <lewing@ximian.com>
7976
* htmlclueflow.c (save_plain): never let the requested length be
7979
2001-08-09 Joe Shaw <joe@ximian.com>
7981
* gtkhtml.c (button_press_event): Don't grab the focus unless
7982
button 1 is pressed or, in editable mode, button 2 or 3 are
7983
pressed. This has the effect, in evolution, of allowing the folder
7984
tree or the message list to keep its focus if you use the mouse
7985
wheel in the message viewing pane.
7987
2001-08-09 Radek Doulik <rodo@ximian.com>
7989
* gtkhtml-enums.h: added grab-focus command
7991
2001-08-08 Radek Doulik <rodo@ximian.com>
7993
* htmlengine-edit-selection-updater.c (updater_idle_callback):
7994
restore selection_mode flag
7996
* htmlselection.c (html_engine_disable_selection): disable
7999
2001-08-07 Radek Doulik <rodo@ximian.com>
8001
* testgtkhtml.c (redirectFilter): do not use g_free on memory
8002
allocated by HTAnchor_address
8004
* gtkhtml.c (button_press_event): disable selection mode
8005
(command): added GTK_HTML_COMMAND_COPY_AND_DISABLE_SELECTION
8008
* gtkhtml-properties.c (gtk_html_class_properties_new): make ms
8011
* htmlcluev.c (check_point): fix for padding != 0
8013
2001-08-06 Larry Ewing <lewing@ximian.com>
8015
* htmlclue.c (op_helper): don't segfault in the assertion if the
8018
2001-08-03 Radek Doulik <rodo@ximian.com>
8020
* htmlengine.h: added block_selection flag
8022
* htmlselection.c (html_engine_activate_selection): test for
8024
(html_engine_block_selection): new helper function
8025
(html_engine_unblock_selection): ditto
8027
* htmlengine-edit-cut-and-paste.c (delete_object): send delete
8029
(insert_empty_paragraph): replace empty text in new empty flow by
8030
text with current style
8032
* gtkhtml.c (gtk_html_editor_event): new helper function
8034
* gtkhtml-enums.h: added GTK_HTML_EDITOR_EVENT_DELETE
8036
2001-08-02 Radek Doulik <rodo@ximian.com>
8038
* htmlengine-edit-table.c (table_set_bg_color): use gdk_color_copy
8039
and gdk_color_free instead of g_new and g_free
8041
* htmltablecell.c (save): save BACKGROUND as well
8043
* htmlobject.c (html_object_get_cursor): make cursor of non-text
8044
objects be at least 10 points high
8046
2001-07-31 Larry Ewing <lewing@ximian.com>
8048
* htmltable.c: wrap debug ouput with #ifdef GTKHTML_DEBUG_TABLE
8050
* htmlengine-edit-cut-and-paste.c: wrap debug ouput with #ifdef GTKHTML_DEBUG_TABLE
8052
* htmltextslave.c (draw_highlighted): remove debugging output.
8054
2001-07-31 Radek Doulik <rodo@ximian.com>
8056
* htmlfontmanager.c (html_font_set_init): use memset rather than
8059
* htmlengine-edit-cursor.c (html_engine_hide_cursor): don't draw
8062
* htmltext.c (get_cursor_base): set base to Text coordinates if
8064
(get_cursor): if there are no slaves, use Text ascent/descent
8065
(html_text_op_cut_helper): remove text slaves
8066
(remove_text_slaves): new extracted function
8067
(fit_line): use remove_text_slaves
8069
2001-07-30 Larry Ewing <lewing@ximian.com>
8071
The following is a patch from Damian Ivereigh <damian@cisco.com>
8072
it has only the slight modification of moving the new members into
8073
the priv structure rather than the public one.
8075
* htmlengine-edit-cut-and-paste.c (html_engine_copy_object): add
8077
(html_engine_copy): use html_engine_copy_object.
8079
* htmlengine-edit-cut-and-paste.h: add html_engine_copy_object.
8081
* gtkhtml-private.h: add holders for the primary selection.
8083
* gtkhtml.h: change the request_paste prototype.
8085
* gtkhtml.c (button_press_event): update the primary selection.
8086
and set in selection when if we've selected a word or line.
8087
(button_release_event): copy to the primary selection.
8088
(selection_get): get the selection based on which one atom is
8090
(selection_received): distinguish between the clipboard and
8091
primary. Pass the selection type when we recurse.
8092
(gtk_html_request_paste): add atom type parameter and pass it
8093
along when we convert.
8094
(init): initialize the primary selection holders and add the
8096
(gtk_html_cut): cut to the clipboard.
8097
(gtk_html_copy): copy to the clipboard.
8098
(gtk_html_paste): paste from the clipboard.
8100
2001-07-30 Radek Doulik <rodo@ximian.com>
8102
* htmlclueflow.c (pref_right_margin): reuse old hack to keep plain
8103
text editing work, before I fix aligned objects calculation
8105
2001-07-26 Chema Celorio <chema@celorio.com>
8107
* htmlimage.c (html_image_factory_area_updated): remove a
8110
2001-07-27 Radek Doulik <rodo@ximian.com>
8112
* htmlclueflow.c (write_pre_tags): test if flow doesn't contain
8113
table, in this case we don't want to save <BR> or \n
8115
* htmltablecell.c (save): commnted out my hack for saving
8118
* htmlengine.c (parse_table): insert empty paragraph in empty
8121
2001-07-26 Radek Doulik <rodo@ximian.com>
8123
* gtkhtml.c (gtk_html_command): update styles if needed
8125
* gtkhtml-enums.h: added commands for delete table/row/col/cell
8128
* gtkhtml.c (command): use gtk_html_undo/redo rather than
8131
* htmltablecell.c (merge): fixed cells merging
8133
* gtkhtml.c (command): set update_styles for more commands
8134
(update_styles): fixed indentation change signal emiting
8135
(key_press_event): don't check cursor position for update, it's
8138
2001-07-25 Radek Doulik <rodo@ximian.com>
8140
* htmlengine-edit-table.c (html_engine_table_set_spacing): added
8142
(html_engine_table_set_padding): ditto
8143
(table_set_padding): check for t != NULL
8144
(table_set_spacing): ditto
8146
* keybindingsrc.ms: added bindings for table spacing/padding, I
8147
must change spell checking bindings to avoid conflicts :-(
8149
* gtkhtml-enums.h: added new command for table spacing/padding
8152
2001-07-25 Jon Trowbridge <trow@ximian.com>
8154
* htmlsearch.c (html_search_set_forward): Check that
8155
search != NULL. (Bug #4869)
8157
2001-07-24 Radek Doulik <rodo@ximian.com>
8159
* htmlengine-edit-table.c (html_engine_get_table): don't fail,
8162
* htmlengine-edit-tablecell.c (html_engine_get_table_cell): don't
8163
fail, just return NULL
8165
* htmlengine-edit-cut-and-paste.c (append_object): remove unwanted
8166
empty flows, fix cursor position
8168
* htmlengine-edit.c (html_engine_next_cell): fixed for multi flow
8170
(html_engine_prev_cell): likewise
8172
* htmlengine-edit-tablecell.c
8173
(html_engine_delete_table_cell_contents): new method
8175
* htmlengine-edit-table.c (html_engine_delete_table): new method
8177
2001-07-23 Jon Trowbridge <trow@ximian.com>
8179
* htmlengine-search.c (html_engine_search_set_forward): Added.
8180
Allows you to change the direction of an on-going search.
8182
* gtkhtml-search.c (gtk_html_engine_search_set_forward): Added.
8183
Allows you to change the direction of an on-going search.
8185
2001-07-23 Radek Doulik <rodo@ximian.com>
8187
* htmlengine-edit-clueflowstyle.c: remove undo field as it's not
8189
(undo_or_redo): use dir parameter
8190
(style_operation_new): remove undo parameter
8192
* htmlengine-edit-table.c (html_engine_table_goto_0_0): fixed loop
8194
(html_engine_table_goto_0_0): renamed, exported
8195
(html_engine_table_goto_col): likewise
8196
(html_engine_table_goto_row): likewise
8197
(html_engine_table_goto_pos): likewise
8199
2001-07-20 Radek Doulik <rodo@ximian.com>
8201
* htmlcursor.c: reverted ettore's revert of begin/end line
8202
enhancement for table cells, because otherwise it breaks prev/next
8203
cell methods. I hope to consult that with ettore to find out
8204
solution for his "cursor is going outside document range" problem
8206
* htmlengine-edit-table.c (goto_col): new helper function
8207
(goto_row): likewise
8208
(goto_begin): likewise
8209
(html_engine_table_set_rows): new method
8210
(html_engine_table_set_cols): new method
8212
* htmlengine-edit.c (html_engine_next_cell): new function,
8214
(html_engine_prev_cell): new function, extracted
8216
2001-07-19 Larry Ewing <lewing@ximian.com>
8218
* gtkhtml-stream.c (gtk_html_stream_new): add a types function
8219
that returns the supported content types on the stream. Now it is
8220
possible for the app to figure out wether or not it should wrap
8221
image data in html for display.
8222
(stream_log_types): add a log implementation of the types function.
8223
(gtk_html_stream_log_new): take an already existing stream instead
8224
of all the component parts, this makes it slightly easier to log
8226
(gtk_html_stream_get_types): get the supported content types of a
8229
* gtkhtml-stream.h: add gtk_html_stream_get_types and fixup other
8232
* gtkhtml-types.h: add GtkHTMLStreamTypesFunc typedef.
8234
* htmlengine.c (html_engine_stream_types): add engine
8236
(html_engine_stream_write): renamed from html_engine_write.
8237
(html_engine_strean_end): renamed from html_engine_end.
8238
(html_engine_begin): use the reworked html_stream_log_new function.
8240
* htmlimage.c (html_image_factory_types): add a simple stream type
8242
(html_image_pointer_load): add the types function.
8244
2001-07-18 Radek Doulik <rodo@ximian.com>
8246
* htmlengine.c (html_engine_get_max_width): change return value to
8247
gint, take care to return values > 0
8249
2001-07-17 Larry Ewing <lewing@ximian.com>
8251
* htmlobject.c (html_object_get_uris): #if 0 this unused function.
8253
* htmlimage.c (html_image_factory_get_engine): #if 0 it out.
8255
2001-07-17 Radek Doulik <rodo@ximian.com>
8257
* htmltokenizer.c (html_tokenizer_real_end): return blocked tokens
8260
* gtkhtml.c (delete_one): take care of cursor offset when
8263
* htmlengine-edit-cut-and-paste.c (delete_object_do): removed
8266
* htmltable.c (cut_partial): don't shrink when start_col ==
8269
* htmlengine.c (html_engine_calc_size): set max_width to MAX(view
8272
* htmlclueflow.c (calc_size): do not allow width exceed max_width
8274
2001-07-17 Larry Ewing <lewing@ximian.com>
8276
* gtkhtml-embedded.c: add some missing documentation.
8278
2001-07-13 Larry Ewing <lewing@ximian.com>
8280
* htmlengine.c (parse_table): initialize cellwidth_percent and
8281
cellheight_percent each time through the loop.
8283
2001-07-12 Larry Ewing <lewing@ximian.com>
8285
* gtkhtml-stream.h: add types include.
8287
2001-07-08 Larry Ewing <lewing@ximian.com>
8289
Chema <chema@ximian.com> pointed out that we were inheriting a lot
8290
of includes from <libgnomeprint/gnome-print.h> which is getting
8291
cleaned up in the gnome-print trunk. This is basically his patch
8292
minus a couple things I didn't want to do yet.
8294
* htmltokenizer.c: add gtkobject include.
8296
* htmltextinput.c: add gtksignal include.
8297
* htmlgdkpainter.c: same.
8299
* htmltable.c: include stdio.h.
8300
* htmltextslave.c: same.
8301
* htmlengine.c: same.
8302
* gtkhtmldebug.c: same.
8303
* htmlengine-edit-cut-and-paste.c: same.
8305
* htmltablecell.c (merge): use g_print.
8306
* htmlengine-edit-table.c (html_engine_insert_table_row): same.
8308
* htmlimage.c (get_src): add missing prototype. use g_print.
8310
* htmlform.h: add gtkradiobutton.h include.
8312
* htmlengine-edit-text.c (upper_lower): remove debugging printf.
8314
* gtkhtml-stream.c: add missing includes.
8316
2001-07-05 Larry Ewing <lewing@ximian.com>
8318
* gtkhtml.c (focus): add Jacobs temporary fix to let focus work
8321
2001-07-02 Larry Ewing <lewing@ximian.com>
8323
* htmlimage.c (html_image_class_init): hook up get_src.
8324
(get_src): add get_src implementation.
8326
* htmlobject.h: add html_object_get_src prototype, and get_src
8329
* htmlobject.c (get_src): add default get_src implementation.
8330
(html_object_get_src): add public method for getting source url.
8332
2001-07-01 Larry Ewing <lewing@ximian.com>
8334
* htmltext.c (set_link): respect new semantics.
8336
* htmllinktext.h (html_link_text_to_text): remove unused
8339
* htmllinktext.c (set_link): make this respect the new set_link
8341
(remove_link): removed.
8342
(html_link_text_set_url): remove this completely unused function.
8344
* htmlobject.h: remove remove_link from the class structure,
8345
html_object_set_link (o, color, NULL, NULL) has the same effect
8346
now and we might as well clean up the class structure a little.
8348
* htmlobject.c (html_object_remove_link): make remove_link proxy
8351
* htmlimage.c (set_link): clean this up a little.
8352
(html_image_init): fix dup target not url.
8353
(remove_link): removed.
8354
(html_image_class_init): remove remove_link.
8355
(html_image_factory_area_updated): add area_updated handler.
8356
(html_image_factory_register): connect handler.
8358
* htmlpainter.c (html_painter_set_font_face): remove redundant if.
8360
* htmlframe.c (calc_size): use html_frame_set_scrolling.
8362
2001-06-29 Ettore Perazzoli <ettore@ximian.com>
8364
I am reverting Radek's changes of 2001-06-21 as they make cursor
8365
movement at the beginning or the end of the document behave
8368
* htmlcursor.c (forward_in_flow): `#if 0'ed out.
8369
(backward_in_flow): Likewise.
8370
(html_cursor_end_of_line): Use `forward()' instead of
8371
`forward_in_flow()'.
8372
(html_cursor_end_of_line): Use `backward()' instead of
8373
`backward_in_flow()'.
8375
2001-06-26 Radek Doulik <rodo@ximian.com>
8377
* gtkhtml.c (command): renamed SET_MARK to SELECTION_MODE, use
8379
(cursor_move): use selection mode flag
8380
(load_keybindings): added more hardwired bindings
8382
* htmlengine.h: added selection_mode flag
8384
* htmlengine.c (html_engine_get_view_width): don't allow width < 0
8385
(html_engine_get_view_height): likewise
8387
2001-06-25 Radek Doulik <rodo@ximian.com>
8389
* gtkhtml.c (delete_one): new helper function, deletes container
8390
or cursor position +/-1
8392
* htmlengine-edit-cut-and-paste.c (html_engine_delete_container):
8393
new function, deletes whole container
8395
* htmlfontmanager.c (get_real_font_size): redone, now it's more
8396
similiar to mozilla font scaling
8398
* gtkhtml.c (gtk_html_set_magnification): don't allow sizes < 4
8400
2001-06-23 Larry Ewing <lewing@ximian.com>
8402
* htmltokenizer.c (add_byte): new function to sanitize invalid
8404
(in_plain): use add_byte.
8406
2001-06-21 Radek Doulik <rodo@ximian.com>
8408
* htmlcursor.c (forward_in_flow): new helper function
8409
(backward_in_flow): ditto
8410
(html_cursor_end_of_line): use forward_in_flow
8411
(html_cursor_beginning_of_line): use backward_in_flow
8413
* htmltable.c (calc_column_width_step): removed hopefully last
8414
forgoten substract by table->padding
8416
2001-06-20 Larry Ewing <lewing@ximian.com>
8418
* htmlengine.c (parse_halign): helper function to parse halign
8420
(add_pending_paragraph_break): move this logic that is duplicated
8421
in several places into a function.
8422
(parse_table): use parse_halign, and add_pending_paragraph.
8423
(parse_a): small cleanups, add id logic.
8424
(parse_f): remove redundant NULL checks.
8426
(parse_h): use parse_halign.
8429
(parse_l): use add_pending_paragraph.
8430
(append_element): ditto.
8431
(parse_o): rework if statement.
8434
2001-06-20 Radek Doulik <rodo@ximian.com>
8436
* htmlcluev.c (find_free_area): uncomment loop break try_y ==
8437
next_y - not sure why it was commented out, I am going to
8440
* gtkhtml.c (set_magnification): new helper function
8441
(gtk_html_set_magnification): make it work for pages with
8444
2001-06-19 Radek Doulik <rodo@ximian.com>
8446
* htmltablecell.c (calc_min_width): use parent method
8448
* htmltable.c (calc_column_width_step): don't add padding
8449
(html_table_set_cells_max_width): don't substract padding
8451
* htmlcluev.c (get_right_margin): substract 2 * padding
8452
(do_layout): fix for padding
8453
(calc_min_width): new method, takes care for padding
8454
(calc_preferred_width): ditto
8455
(set_max_width): fix for padding
8457
* htmlobject.c (html_object_get_left_margin): added painter parameter
8458
(html_object_get_right_margin): ditto
8460
* htmlgdkpainter.c (alloc_e_font_try): added medium, bold, roman,
8462
(try_font_possible_names): new function, try more weights/slants
8463
(alloc_e_font): use try_font_possible_names
8464
(alloc_e_font_try): don't allow sizes < 0
8466
2001-06-18 Radek Doulik <rodo@ximian.com>
8468
* htmlfontmanager.c (html_font_manager_clear_font_cache): new
8470
(html_font_manager_set_magnification): ditto
8472
* gtkhtml.c (gtk_html_set_magnification): new method, sets
8473
magnification, which is used for font sizes.
8474
(gtk_html_zoom_in): new method
8475
(gtk_html_zoom_out): ditto
8476
(gtk_html_zoom_reset): ditto
8477
(load_keybindings): bind C-=/C--/C-8 and keypad C-+/C--/C-* for
8479
(button_press_event): bind C-scroll wheel to zooming,
8480
unfortunatelly Gtk is a little broken and doesn't pass these
8481
events to widgets with visible scrollbars :-(
8482
(gtk_html_command): renamed from gtk_html_editor_command
8484
* gtkhtml-enums.h: new commands for zooming
8486
* htmlframeset.c (set_max_width): implemented
8488
* gtkhtml.c (gtk_html_set_iframe_parent): added frame parameter,
8489
remember frame in html
8491
* htmlengine.c (html_engine_get_max_width): take care of FRAMES
8494
* gtkhtmldebug.c (gtk_html_debug_dump_object): added FRAME and
8497
* gtkhtml.h: added frame pointer
8499
2001-06-14 Radek Doulik <rodo@ximian.com>
8501
* htmlgdkpainter.c (alloc_e_font_it_known): handle NULL face
8503
(alloc_e_font_it_known): new helper function, extracted
8504
(alloc_e_font_it): 1st try to load exact size font, if not
8505
available then try to look for nearest size
8507
* htmlengine-edit-table.c (table_set_border_width): don't allow
8510
2001-06-13 Radek Doulik <rodo@ximian.com>
8512
* htmlengine-edit-table.c (table_set_bg_color): free bgColor
8513
before set it to NULL
8515
2001-06-12 Radek Doulik <rodo@ximian.com>
8517
* htmltable.c (html_table_end_table): check for table->cells
8520
2001-06-11 Radek Doulik <rodo@ximian.com>
8522
* htmltablecell.c (save): save to empty cells
8524
* htmltable.c (check_point): check for valid column
8525
(html_table_end_table): remove empty cells
8527
* gtkhtml.c (replace_nbsp): new helper function
8528
(selection_get): replace with ' ' for
8529
STRING/TEXT/COMPOUND_TEXT
8531
* htmlengine-edit-table.c (html_engine_insert_table): new function
8533
2001-06-08 Radek Doulik <rodo@ximian.com>
8535
* htmltokenizer.c (in_comment): don't allow comment end like this
8538
2001-06-07 Radek Doulik <rodo@ximian.com>
8540
* Makefile.am (INCLUDES): added IMLIB cflags
8542
* htmlengine-edit-cut-and-paste.c (delete_object): check table
8543
only when cursor and mark are in non-empty flows
8544
(insert_object_do): be more careful about paragraph inserting
8546
(insert_empty_paragraph): new extracted method, use undo direction
8547
(html_engine_insert_empty_paragraph): use insert_empty_paragraph
8548
(append_object): increment len by 2 when splitting
8550
* htmlclueflow.c (op_helper): don't handle tables specialy
8552
* htmlenumutils.c (html_valign_name): return "middle" MIDDLE value
8555
* htmlengine-edit-cut-and-paste.c (append_object): freeze/thaw
8556
engine and set changes
8557
(html_engine_append_object): removed freeze/thaw here
8558
(insert_object): moved tables fix here (from insert_object_do as
8559
we don't want two UNDO steps to be created)
8561
* htmlinterval.c (html_interval_flat): make this method public
8562
(html_interval_select): use flat interval
8564
* htmltext.c (word_get_position): kill warning
8566
2001-06-05 Larry Ewing <lewing@ximian.com>
8568
* htmlframe.c (html_frame_init): attach submit to frame_submit.
8569
(frame_submit): proxy signal, needs a little more love.
8571
* htmltextinput.c (html_text_input_key_pressed): fix a stupid cut
8572
& paste bug so that the enter handler actually works.
8574
* htmlradio.c (html_radio_init): call html_form_add_radio and
8576
(html_radio_new): change prototype.
8578
* htmlradio.h (html_radio_new): change prototype.
8580
* htmlengine.c (parse_input): fix to html_radio_new to match the
8583
* htmlform.h: add prototype for html_form_add_radio.
8585
* htmlform.c (html_form_destroy): free the group hash.
8586
(html_form_add_radio): new function to handle radio groups
8588
(destroy_radio): helper to destroy the has entries.
8590
2001-06-05 Radek Doulik <rodo@ximian.com>
8592
* htmltablecell.c (calc_min_width): fixed for NOWRAP and
8593
non-fixed-width case
8595
2001-06-04 Larry Ewing <lewing@ximian.com>
8597
* htmltextinput.c (html_text_input_key_pressed): Make enter focus
8598
on the next widget or submit the form if there are no more
8599
widgets. This is based on a patch by someone who's name I can't
8600
find, I'll update this entry when I do.
8601
(html_text_input_init): attach html_text_input_key_pressed to the
8604
* htmlengine.c (html_engine_destroy): destroy the stacks we had
8606
(parse_f): destroy the frame if we don't add it.
8607
(parse_iframe): add disabled code to use frame here.
8608
(html_engine_stop_parser): clear the frame stack.
8610
2001-06-02 Larry Ewing <lewing@ximian.com>
8612
* htmlframe.c (destroy): free the url.
8613
(html_frame_init): set the initial margins on the frame to 0 this
8614
seems to be what mozilla does.
8616
* htmlframeset.c (calc_size): free the temp arrays.
8618
2001-06-01 Larry Ewing <lewing@ximian.com>
8620
* htmltablecell.c (calc_min_width): fix the logic so that
8621
min_width doesn't return larger than needed be we still break the
8624
* htmlframe.c (calc_min_width): Fix the logic for frames that have
8627
* htmlframe.c (frame_url_requested): increment cur in the loop.
8628
(set_max_width): if the size is given the min width is
8630
* htmltablecell.c (calc_min_width): break the resize loop that was
8631
occuring when no_wrap and HTML_OBJECT_FLAGS_FIXED_WIDTH were both
8632
set (fixes http://bugzilla.helixcode.com/show_bug.cgi?id=3164).
8634
2001-05-31 Larry Ewing <lewing@ximian.com>
8636
* htmlframe.c (check_point): take the scrolling into account when
8639
* htmlframeset.c (html_frameset_init): ugh, fix bug introduced in
8642
* htmlshape.c (html_shape_point): remove silly macros and fix
8643
distance macro so that circles actually work.
8645
* htmlimage.c (image_update_url): fix this properly this time.
8647
* htmlshape.c (html_shape_point): add tests for poly and default.
8648
(html_shape_new): move from separate shape structures to a single
8649
structure with a pointer array holding HTMLLengths. I still need
8650
to add support for actually using the percentage lengths.
8652
* htmlshape.h: add prototypes for HTMLLength functions.
8654
* htmlframeset.c (html_frameset_init): move the HTMLLength
8655
functions into htmlshape since we can use them there, and make
8658
* htmlengine.c (parse_a): let the shape routine figure out if the
8659
shape is valid if we have either a type or coords.
8661
* htmlimage.c (image_update_url): translate x and y by o->x and o->y.
8663
2001-05-31 Larry Ewing <lewing@ximian.com>
8665
* htmlimage.c (html_image_set_map): rename and add ismap logic.
8666
(destroy): free final_url.
8667
(copy): copy new members.
8668
(image_update_url): add ismap logic.
8669
(html_image_init): initialize new members.
8671
* htmlimage.h: Add ismap and final_url members.
8673
* htmlengine.c (parse_i): add ismap support.
8675
2001-05-30 Radek Doulik <rodo@ximian.com>
8677
* htmltablecell.c (save): save align/valign
8679
* htmlobject.c (set_painter): as below
8680
(html_object_set_painter): as below, simplyfied
8682
* htmliframe.c (set_painter): as below
8684
* htmlframe.c (set_painter): removed max_width parameter
8686
* htmlengine.c (html_engine_set_painter): don't call
8687
html_object_clear_word_width as it's no more needed
8688
(html_engine_set_painter): don't call calc_min_width as this is
8690
(html_engine_set_painter): don't compute max_width as it's now
8691
handled properly in calc_size using get_page_width/height
8692
(html_engine_calc_size): use get_page_width/height, simplified
8693
(get_max_width): new helper function
8695
* htmlclueflow.c (pref_right_margin): removed obsolete method
8696
(calc_size): use html_object_get_right_margin instead of
8698
(calc_size): take care of PRE when calling fit_line
8700
* gtkhtml.c (size_allocate): do calc size always
8702
* htmlprinter.c (class_init): as below
8704
* htmlplainpainter.c (class_init): as below
8706
* htmlgdkpainter.c (class_init): implemented and plugged in new
8709
* htmlpainter.h: added new virtual methods get_page_width/height
8711
* htmltablecell.c (save): updated to use percent_width
8712
(html_table_cell_init): initialize percent_width, percent_height
8714
* htmlengine-edit-tablecell.c (html_engine_table_cell_set_width):
8717
* htmltablecell.c (save): use heading
8720
* htmlengine-edit-tablecell.c
8721
(html_engine_table_cell_set_no_wrap): new function
8722
(html_engine_table_cell_set_heading): ditto
8724
* htmlclueflow.c (get_default_font_style): take care of heading
8726
(html_clueflow_get_halignment): ditto
8728
* htmltablecell.h: added heading flag
8730
* htmlengine.c (parse_table): use Cell::no_wrap instead of setting
8731
NOWRAP style, which has been removed (now we can have nowrap cells
8732
with all possible clueflow styles, which was before impossible)
8733
(parse_table): remember heading in cell
8735
* htmltablecell.h: added no_wrap flag
8737
* htmltablecell.c (calc_min_width): use no_wrap
8739
2001-05-30 Larry Ewing <lewing@ximian.com>
8741
* htmlimage.c (image_update_url): temp hack to piggyback url
8742
selection onto point calculation.
8743
(check_point): call image_update_url.
8744
(html_image_set_usemap): add.
8745
(html_image_init): initialize usemap.
8746
(destroy): free usemap.
8749
* htmlimage.h: add html_image_set_usemap prototype, and usemap
8752
* htmlmap.h: format change ;)
8754
* htmlengine.c (parse_i): add the map to the image
8755
(parse_m): fix length.
8757
* htmlframeset.c (calc_min_width): add hack to force size
8758
calculation when the widget gets a new allocation.
8760
(is_container): add.
8761
remove debug g_warnings.
8763
2001-05-29 Larry Ewing <lewing@ximian.com>
8765
* htmltokenizer.c (end_tag): remove frameset warnings.
8767
* htmlengine.h: add new members for frame and map support.
8769
* htmlengine.c (close_anchor): remove extra if.
8770
(parse_frameset): new function to handle framsets.
8771
(parse_iframe): cleanup attribute parsing, add stubs.
8772
(parse_a): add initial area handling, misc cleanups.
8773
(parse_f): add frame and frameset parsing.
8774
(parse_m): add initial map handling.
8775
(parse_n): add stub fror noframe handling.
8776
(html_engine_init): initialize framestack and map.
8778
* htmlclueflow.c (save_plain): fix the wraping function that was
8779
broken in the move to g_unicode.
8781
* htmlenums.h: add new types.
8783
* htmltype.c (html_types_init): init new types.
8784
(html_type_name): add new types.
8786
* htmltypes.h: add new types.
8788
* Makefile.am: add new files.
8790
* gtkhtml.c (on_object): remove redundant checks.
8791
(set_pointer_url): move logic here.
8800
* htmlshape.h: Commit pending files without hooking them into the
8801
build so that I can use cvs to track revisions.
8803
2001-05-29 Radek Doulik <rodo@ximian.com>
8805
* htmlengine-edit-clueflowstyle.c
8806
(html_engine_get_current_clueflow_alignment): use
8807
html_clueflow_get_halignment
8809
* htmlengine.c (parse_table): use halign of table cells
8810
(parse_c): </center> resets divAlign to NONE
8811
(html_engine_parse): initialize divAlign to NONE
8812
(parse_table): for non-heading table cells init halign to NONE
8814
* htmlclueflow.c (html_clueflow_get_halignment): if halign ==
8815
NONE, then try to use parent cell halign
8817
2001-05-29 Larry Ewing <lewing@ximian.com>
8819
* gtkhtml.c (set_pointer_url): add helper function.
8821
* htmltablecell.c (save): save rowspan and colspan when writing
8824
2001-05-28 Larry Ewing <lewing@ximian.com>
8826
* htmlclueflow.c (html_clueflow_get_line_offset): initialize o it
8827
was never getting set.
8829
2001-05-25 Radek Doulik <rodo@ximian.com>
8831
* htmlengine-edit-cut-and-paste.c (check_table_0): new helper
8833
(check_table_1): ditto
8834
(delete_object): shrink selection before delete (for some table
8837
2001-05-24 Radek Doulik <rodo@ximian.com>
8839
* replaced HTML_VALIGN_CENTER with HTML_VALIGN_MIDDLE everywhere
8841
* htmlengine.c (parse_i): replace align=center with align=middle
8842
according to standard
8844
2001-05-23 Larry Ewing <lewing@ximian.com>
8846
* htmlprinter.c (draw_text): terminate the temporary string at the
8847
last character, not the last character + 1.
8849
* htmltokenizer.c (end_tag): do not discard the line feeds
8850
following a opening tag inside a pre tag, but discard them
8851
otherwise. This should avoid the unintentional spaces introduced
8852
by the previous change.
8854
2001-05-22 Larry Ewing <lewing@ximian.com>
8856
* htmlengine.c (parse_d): close the flow unconditionaly for dd but
8857
only change the indent level if we are in a list.
8859
* htmltokenizer.c (end_tag): only discard the first LF in an
8860
opening tag if it is a pre or textarea element (fixes
8861
http://bugzilla.helixcode.com/show_bug.cgi?id=2093)
8863
2001-05-22 Radek Doulik <rodo@ximian.com>
8865
* htmlengine-edit-tablecell.c (html_engine_table_cell_set_valign):
8867
(html_engine_table_cell_set_halign): ditto
8869
* htmltablecell.c (html_table_cell_init): changed initial
8872
* htmlengine-edit-tablecell.c
8873
(html_engine_table_cell_set_bg_color): new method
8874
(html_engine_table_cell_set_bg_pixmap): ditto
8875
(html_engine_get_table_cell): ditto
8877
2001-05-21 Radek Doulik <rodo@ximian.com>
8879
* htmlengine-edit-table.c (html_engine_table_set_align): updated
8881
(html_engine_table_set_width): new function
8883
2001-05-18 Radek Doulik <rodo@ximian.com>
8885
* htmlengine.c (parse_table): added support for align=left/right
8888
* htmlengine-edit-table.c (html_engine_table_set_align): new
8891
2001-05-18 Larry Ewing <lewing@ximian.com>
8893
* htmlengine.c (parse_d): fix dt rendering so that it always
8894
splits the flow, even outside of dl, this is "feature" of
8895
netscape/mozilla is used in several prominant places like bonsai
8896
(fixes http://bugzilla.helixcode.com/show_bug.cgi?id=2043).
8898
2001-05-17 Larry Ewing <lewing@ximian.com>
8900
* htmlengine.c (parse_f): fix color parsing so that it pushes the
8901
current color rather than black if no color is specified (fixes
8902
http://bugzilla.ximian.com/show_bug.cgi?id=2911).
8904
2001-05-17 Radek Doulik <rodo@ximian.com>
8906
* htmlengine-edit-table.c (html_engine_table_set_bg_color): alloc
8907
space for new color if needed
8909
* htmltablecell.h: removed padding
8911
* htmlengine-edit-table.c (new_cell): don't set cell background
8912
from table (it's resolved dynamically now)
8913
(html_engine_table_set_bg_color): allow NULL c which means disable
8915
(html_engine_get_table): new helper function
8916
(html_engine_table_set_padding): new method
8917
(html_engine_table_set_border_width): added t parameter
8919
* htmlimage.c (html_image_pointer_load): ref image pointer
8920
(html_image_factory_register): don't ref image pointer before
8921
loading (it's done in load now) but ref all image pointers (for
8923
(html_image_factory_unregister): unref image pointer in unregister
8925
* htmltablecell.c (draw_background_helper): use table bg pixmap if
8928
* htmlengine.c (parse_table): don't use table bg pixmap as starting
8931
* htmlengine-edit-table.c (html_engine_table_set_bg_color): new
8933
(html_engine_table_set_bg_pixmap): new method
8935
* htmlengine.c (parse_table): don't use table bg color as starting
8938
* htmltablecell.c (draw_background_helper): use table bg color if
8941
2001-05-15 Radek Doulik <rodo@ximian.com>
8943
* htmltablecell.h (HTML_IS_TABLE_CELL): renamed from
8946
* tabs should work now nicely for plain text mode and for PRE
8948
2001-05-10 Jon Trowbridge <trow@ximian.com>
8950
* htmliframe.c (html_iframe_init): When rendering a frame, make
8951
sure that you use the same kind of tokenizer as is being used
8952
by the parent widget.
8954
* htmltokenizer.c (html_tokenizer_class_init): Change "begin" and
8955
"end" from virtual functions to signals with the HTMLTokenizer's
8956
traditional begin and end behavior as the default handlers. Add
8957
the "fully_tokenized" signal.
8958
(html_tokenizer_begin): Replace the virtual function machinery
8959
with a signal emission.
8960
(html_tokenizer_end): Replace the virtual function machinery with
8962
(html_tokenizer_clone): Added. Allocates a tokenizer of the same
8965
2001-05-10 Larry Ewing <lewing@ximian.com>
8967
* gtkhtml.c (mouse_change_pos): make the magic distance threshold
8968
depend on the space width.
8969
(focus): start of new focus handler.
8971
* htmltext.c: update the magic url matching regex to handle
8972
unsername:passwd@ and % escapes and keep trailing slash.
8974
2001-05-09 Larry Ewing <lewing@ximian.com>
8976
* htmlengine.c (parse_color): rework the code to handle broken
8977
color specifications the same way netscape and mozilla do. We
8978
were still missing one case.
8980
2001-05-09 Radek Doulik <rodo@ximian.com>
8982
* gtkhtml.c (command): added insert-tab and
8983
insert-tab-or-indent-more commands
8985
* htmltokenizer.c (in_comment): allow all characters to be between
8986
-- and > on comment end (it's not as standard says, but we
8987
probably want to act the same as netscape and mozilla)
8989
2001-05-08 Radek Doulik <rodo@ximian.com>
8991
* htmltextslave.c (draw_spell_errors): updated
8993
* htmlgdkpainter.c (draw_spell_error): updated
8995
* htmlpainter.c (html_painter_draw_text): don't draw when
8997
(html_painter_draw_spell_error): removed off parameter, now we
8998
call draw_spell_error with exact x position and text which should
8999
be error-highlighted
9001
* htmlgdkpainter.c (draw_spell_error): use line_offset
9003
* gtkhtml-properties.c: added select prev/next word commands
9005
* gtkhtml.c (move_selection): select prev/next word
9007
* htmlpainter.c (html_painter_draw_text): slightly refactored
9009
2001-05-07 Radek Doulik <rodo@ximian.com>
9011
* htmltextslave.c (draw_normal): use line_offset
9012
(draw_highlighted): ditto
9013
(get_offset_for_pointer): ditto
9015
* htmltext.c (offset_to_line_offset): new helper function
9016
(get_line_length): new method implementation
9017
(html_text_get_line_offset): new method
9018
(html_text_get_line_offset_at_offset): new method
9019
(calc_word_width): added line_offset parameter
9020
(html_text_request_word_width): use line_offset
9021
(get_cursor_base): use line_offset
9023
* htmlpainter.c (html_painter_calc_text_width): added line_offset
9024
parameter, handle tabs properly
9025
(html_painter_draw_text): ditto
9027
* htmlobject.c (get_line_length): new generic method
9029
(html_object_get_line_length): new method, returns length in
9030
line_offset metric (offset with tabs expanded)
9032
* htmlclueflow.c (html_clueflow_get_line_offset): new function
9034
2001-05-04 Radek Doulik <rodo@ximian.com>
9036
* htmltokenizer.c (html_tokenizer_add_pending): add '\t' for tab,
9038
removed prePos counter
9040
2001-05-06 Larry Ewing <lewing@ximian.com>
9042
* htmlengine.c (parse_input): add missing break, thanks go to
9043
"Giancarlo Capella" <capella@teleion.it> for finding this.
9044
(parse_body): s/p/e/
9046
2001-05-03 Larry Ewing <lewing@ximian.com>
9048
* htmliframe.c (calc_size): use either e_scroll_frame or scrolled
9050
(html_iframe_init): ditto.
9052
2001-05-06 Jon Trowbridge <trow@ximian.com>
9054
* htmltext.c (text_len): Call g_utf8_validate on the string
9055
before g_utf8_strlen-ing it.
9057
* htmltypes.h: Added typedef for HTMLTokenizerClass.
9059
* htmlengine.c (html_engine_set_tokenizer): Added. Allows the
9060
HTMLEngine's tokenizer to be changed.
9062
* htmltokenizer.c: Converted HTMLTokenizer to be a GtkObject with
9063
a vtable for the basic operations. Renamed the existing functions
9064
as html_tokenizer_real_foo and made them the default vtable
9065
entries for HTMLTokenizerClass. Changed the html_tokenizer_foo
9066
functions to just be wrappers around calls to the appropriate
9067
vtable entries. The previous struct HTMLTokenizer, which was
9068
totally private, is now struct _HTMLTokenizerPrivate. Lots of
9069
references to entries in that struct have been changed to reflect
9070
all of the renaming, but no non-trivial changes were needed to
9071
make everything work.
9073
2001-05-03 Radek Doulik <rodo@ximian.com>
9075
* htmlundo.c (html_undo_do_undo): block events during undo/redo
9076
(html_undo_do_redo): ditto
9078
* htmlengine-edit-cut-and-paste.c (delete_object_do): move cursor
9079
to right position after cut & merge
9081
* htmlclue.c (op_helper): append only non-null cut/copied objects
9084
* htmlclueflow.c (could_merge): new helper function, extracted
9086
(op_helper): new helper function, extracted from op_cut and
9088
(op_helper): take care of operations which boundary begins/ends on
9091
* gtkhtml.c (gtk_html_editor_event_command): take care of
9094
* htmlengine.h: added block_events flag
9096
* gtkhtml.c (gtk_html_undo): added update_styles call
9097
(gtk_html_redo): ditto
9099
* htmlenums.h: added HTML_ENGINE_SET_CLUEFLOW_INDENTATION_ALL
9101
* htmlengine-edit-cut-and-paste.c (append_object):
9103
(append_object): new method, extracted from
9104
html_engine_append_object
9105
(insert_object_do): added dir parameter
9107
2001-05-02 Larry Ewing <lewing@ximian.com>
9109
* gtkhtml.c (gtk_html_load_from_string): use stream_write instead
9112
* gtkhtml.h: remove unused prototype.
9114
* gtkhtml-stream.h: remove prototypes for nonexistant functions.
9116
* htmlengine.c (parse_iframe): parse the frameborder option, and
9117
cleanup the width/height parsing.
9119
2001-04-30 Radek Doulik <rodo@ximian.com>
9121
* gtkhtml-properties.c: Frederic Crozat <fcrozat@mandrakesoft.com>
9122
- This patch (against gtkhtml 0.9.2) adds a missing include and therefore
9123
remove a warning when compiling with latest glibc (2.2.2)
9125
2001-04-29 Radek Doulik <rodo@ximian.com>
9127
* htmlengine-edit.c (html_engine_spell_check_range): if (begin)
9128
object hasn't parent just return
9130
* htmlclueflow.c (html_clueflow_spell_check): keep
9131
g_return_if_fail as spell_checking fail is not fatal, so we want
9132
only warning and no crash
9134
* htmlengine-edit.c (html_engine_spell_check_range): check if
9135
object has parent and if it's clueflow
9137
2001-04-27 Larry Ewing <lewing@ximian.com>
9139
* htmlclueflow.c (html_clueflow_spell_check): change assertion
9140
into g_return_if_fails to keep the flow == NULL case from being
9141
fatal until it can be looked into more deeply.
9143
2001-04-27 Radek Doulik <rodo@ximian.com>
9145
* htmlengine-edit-cut-and-paste.c (set_cursor_at_end_of_object):
9146
new extracted function, sets cursor to end of object and adds len
9147
to the cursor position
9148
(insert_object_do): ops, moved set_cursor_at_end_of_object to
9151
* htmltable.c (cut_partial): don't merge if start == end
9153
* htmlobject.c (html_object_get_bound_list): test for list->next
9156
* htmlengine-edit-cut-and-paste.c (remove_empty_and_merge): don't
9157
test left == NULL resp. right == NULL as it's already tested above
9158
(insert_object_do): use html_object_heads_list and
9159
html_object_tails_list
9160
(get_tree_bounds_for_merge): remove - obsolete
9161
(html_object_heads_list and html_object_tails_list extracted from
9164
* htmlobject.c (html_object_tails_list): new (extracted) method
9165
(html_object_heads_list): ditto
9166
(html_object_merge_down): new method
9167
(merge_down): new helper function
9169
* htmltable.c (cut_partial): take care of case when cursor is on
9171
(cut_partial): when start_col == end_col, merge approriate cells
9173
2001-04-25 Dan Winship <danw@ximian.com>
9175
* gtkhtml.c, htmlclueflow.c, htmlcursor.c, htmlcursor.h,
9176
htmlengine-edit-cut-and-paste.c, htmlengine-edit-movement.c,
9177
htmlengine-edit.c, htmlengine-edit.h, htmlengine-save.c,
9178
htmlengine-search.c, htmlengine.c, htmlentity.c, htmlgdkpainter.c,
9179
htmlinterval.c, htmlplainpainter.c, htmlprinter.c, htmlsearch.c,
9180
htmltext.c, htmltext.h, htmltextslave.c, htmltokenizer.c,
9182
Replace libunicode calls with gunicode and e-unicode calls.
9184
2001-04-25 Radek Doulik <rodo@ximian.com>
9186
* htmlengine.c (html_engine_schedule_redraw): new functions,
9187
schedules redraw to be done in idle time
9188
(html_engine_block_redraw): block redraw until unblock is called
9189
(html_engine_unblock_redraw): unblock redraws, redraw if needed
9191
* gtkhtml.c (command): new commands - block/unblock redraw
9193
* htmlselection.c (html_engine_activate_selection): activate only
9194
if widget is already realized
9196
* htmlobject.c (destroy): free object data
9197
(html_object_set_data): change type of value to gchar *
9198
(html_object_get_parent_level): new method, returns depth in tree
9201
* htmlimage.c (html_image_pointer_load): new extracted method
9203
* htmlengine.c (parse_d): set flow data to current flow
9205
* htmlengine-edit.c (html_engine_set_data_by_type): change type of
9206
value to gchar * (it's simpler and we could destroy data simplier)
9208
* htmlcursor.c (html_cursor_beginning_of_paragraph): updated to
9210
(html_cursor_end_of_paragraph): likewise
9212
* htmlclueflow.c (merge): copy data from cf2 if cf1 is empty
9214
* gtkhtmldebug.c (dump_data): new helper function, dumps object
9216
(dump_object_simple): dump object data
9218
* gtkhtml.c (gtk_html_insert_html): use
9219
html_image_factory_move_images
9221
* htmlimage.c (html_image_factory_move_images): new method, moves
9222
all image poiters from one factory to another
9224
* gtkhtml.c (gtk_html_insert_html): new method, inserts html
9225
generated from html source, hacked - creates new widget and steals
9226
it's content and destroy it, insert content to original one
9228
2001-04-20 Radek Doulik <rodo@ximian.com>
9230
* htmlobject.c (destroy): free object data
9231
(free_data): helper function
9233
* gtkhtml.c (gtk_html_editor_command): added boolean return value
9235
* htmlengine.c (flow_new): new wrapper around flow constructor
9236
which sets object data
9238
* gtkhtml.c (command): new command implementations
9240
* gtkhtml-enums.h: added cursor-bod/eod commands
9242
2001-04-22 Ariel Rios <ariel@linuxppc.org>
9244
* test.c (button_cb): Remove stupid warning on callback.
9246
2001-04-21 Ariel Rios <ariel@linuxppc.org>
9248
* Makefile.am (noinst_PROGRAMS): Add gtest
9250
* test.c : This file provides a nice simple
9251
test application for GtkHTML altho it is a
9252
little hacky at some points. However it should
9253
be enough to get started with using the widget
9255
2001-04-17 Larry Ewing <lewing@ximian.com>
9257
* htmliframe.c (draw): clean up the draw routine a little.
9258
(html_iframe_init): remove redundant condition.
9260
2001-04-17 Radek Doulik <rodo@ximian.com>
9262
* htmlengine-edit-fontstyle.c (html_engine_set_font_style): like
9265
* gtkhtml-enums.h: moved new commands to the end
9267
* htmlengine-edit-fontstyle.c (html_engine_set_color): set
9268
insertion color also for selection case
9270
* htmlselection.c (html_engine_is_selection_active): call
9271
html_engine_edit_selection_updater_do_idle
9273
* htmlengine.h: added cursor_position_stack to keep cursor
9274
positions for save/restore commands
9276
* gtkhtml-properties.c: added command names
9278
* gtkhtml-enums.h: new commands - save/restore cursor position
9280
* gtkhtml.c (gtk_html_select_paragraph_extended): new function
9283
(html_engine_select_paragraph_extended): new function
9285
* keybindingsrc.ms: added C-a for select-all and C-p for select
9288
* keybindingsrc.xemacs: like for emacs ones
9290
* keybindingsrc.emacs: added C-a, C-e
9292
* gtkhtml.c (BCOM): remove C-a and C-e from hardcoded bindings
9294
* htmlengine-edit-movement.c (html_engine_beginning_of_paragraph):
9296
(html_engine_end_of_paragraph): ditto
9298
* htmlengine-edit.c (html_engine_select_paragraph_editable): new
9300
(html_engine_select_all_editable): ditto
9302
* gtkhtml.c (gtk_html_select_paragraph): new function
9303
(gtk_html_select_all): ditto
9305
* gtkhtml-properties.c: added new commands
9307
* gtkhtml-enums.h: added selection commands
9309
2001-04-16 Larry Ewing <lewing@ximian.com>
9311
* htmlengine.c (parse_table): silence warning.
9313
* htmlclueflow.c (calc_preferred_width): initialize next to NULL.
9315
* htmlplainpainter.c (draw_text): remove unused variable.
9316
(calc_text_width): remove unused function.
9318
The following changes to enable embedded printing are all from a
9319
slightly renamed and reworked patch from Bill Gribble
9320
<grib@gnumatic.com>. Thanks.
9322
* htmlembedded.h (html_embedded_get_widget): add prototype.
9324
* htmlembedded.c (draw): call html_painter_draw_embedded.
9325
(html_embedded_get_widget): added helper function.
9327
* htmlpainter.h: add the draw_embedded member function.
9329
* htmlpainter.c (class_init): initialize draw_embedded.
9330
(html_painter_draw_embedded): wrapper function for the class
9333
* htmlprinter.c (draw_embedded): fire the draw_print save the
9334
context and fire the draw_print signal where appropriate.
9335
(class_init): use draw_embedded.
9337
* htmlgdkpainter.c (draw_embedded): fire the draw_gdk signal if
9338
the embedded widget is a GtkHTMLEmbedded widget.
9339
(class_init): use draw_embedded.
9341
* gtkhtml-embedded.h: add draw_print and draw_gdk signals.
9343
* gtkhtml-embedded.c: add draw_gdk and draw_print signals.
9344
(gtk_html_embedded_class_init): init the signal handlers.
9346
* htmliframe.c (html_iframe_init): initialize iframe->gdk_painter
9348
(set_painter): do proper refcounting of the iframe->gdk_painter.
9349
(iframe_set_gdk_painter): helper function to handle setting the
9351
(destroy): use the helper funtion to make sure we remove the last
9352
reference to the the painter.
9354
2001-04-14 Larry Ewing <lewing@ximian.com>
9356
* htmlfontmanager.c (html_font_manager_finalize): free the face.
9358
* htmlpainter.c (finalize): destroy the colorset.
9360
* htmlengine-print.c (html_engine_print_with_header_footer): ref
9361
the old painter while we print.
9363
* htmlengine.c (html_engine_set_painter): fixup refcounting of
9365
(html_engine_destroy): use unref instead of destroy.
9367
2001-04-13 Larry Ewing <lewing@ximian.com>
9369
* htmlengine.c (parse_f): make sure we don't hold two references
9372
2001-04-12 Dan Winship <danw@ximian.com>
9374
* htmlengine.c (parse_iframe): Don't leak.
9376
2001-04-12 Radek Doulik <rodo@ximian.com>
9378
* htmlgdkpainter.c (html_gdk_painter_unrealize): check if painter
9381
2001-04-11 Radek Doulik <rodo@ximian.com>
9383
* htmlplainpainter.c (alloc_fixed_font): if face == NULL pass NULL
9384
- NULL means that fixed font is requested
9386
* gtkhtml.c (command): ops, removed unwanted calls to
9389
* htmlengine-edit-fontstyle.c (html_engine_set_font_style):
9390
changed order back to AND, OR
9391
(get_color_from_selection): use point for movement thru selection
9392
(get_color_from_selection): don't get color from end of objects
9393
(get_font_style_from_selection): likewise
9395
* gtkhtml.c (button_press_event): fixed Bug 2166:
9396
With Evolution, start composing a new message; type out a few lines. Click
9397
to insert the cursor somewhere, and then click backwards in the text to
9398
select a range. Now click outside of the selection. The GtkHTML component
9399
should go away, leaving a grey box.
9401
2001-04-07 Dan Winship <danw@ximian.com>
9403
* htmlprinter.c (DARK, LIGHT):
9404
* htmlgdkpainter.c (DARK, LIGHT):
9405
* htmlengine-edit-rule.c (SET, SETO):
9406
* gtkhtml-properties.c (GET, SET, GET, GETS, COPYS): Remove
9407
inappropriate uses of ## in macro definitions.
9410
* htmltable.h: Remove (unused) non-extern declarations of
9411
html_table_class and html_text_slave_class.
9413
* htmlclue.c: Make parent_class static
9415
2001-04-03 Radek Doulik <rodo@ximian.com>
9417
* htmlengine.c (check_prev): check faces
9419
* htmlfontmanager.c (strip_white_space): new helper function
9420
(alloc_new_font): allow white spaces in face list
9421
(get_name_from_face): use 13th and 14th attribute instead of 12th
9424
2001-04-02 Larry Ewing <lewing@ximian.com>
9426
* htmlclueflow.c (write_pre_tags): only write a \n for PRE flows,
9427
rather than a <br>\n.
9429
2001-03-30 Larry Ewing <lewing@ximian.com>
9431
* htmlobject.c (copy): copy pref_width.
9433
* gtkhtml.c (selection_received): use unicode_strlen on the
9434
selection data lenght. Why are we not using byte ranges for
9435
insert_text and paste_text?
9437
* htmlengine-edit-cut-and-paste.c (html_engine_insert_text): use
9440
* htmlobject.c (html_object_init): init min_width and pref_width.
9442
* htmlplainpainter.c (alloc_fixed_font): use the parent class to
9443
do the work, just override the settings. remove a bunch of
9444
duplicated support functions
9446
* htmlengine.c (parse_table): close_anchor at the begining of a
9447
new cell since <a> elements cannot span cells. Remove it from the
9448
closing tag because that presumes there is a valid closing tag.
9449
We need more regression tests.
9451
* htmlengine.c (parse_table): close_anchor at the end of a row to
9452
make sure stray anchors don't wrap.
9454
* htmlclueflow.c (calc_padding): temporary hack to swtich to
9455
remove padding in the text/plain case. This will get moved into
9457
(save_plain): use calc_padding based on the painter from the
9458
current engine and don't automatically assume it.
9460
2001-03-29 Radek Doulik <rodo@ximian.com>
9462
* gtkhtml.c (gtk_html_build_with_gconf): helper function, returns
9463
TRUE if gtkhtml was built with gconf support. it's provided for
9466
* htmlengine-edit-table.c (delete_table_row): updated
9467
(delete_row_undo_action): use DeleteCellsUndo data
9469
* htmltext.c (get_tags): added quotes
9471
* htmlengine-save.c (color_to_string): use %02x instead of %2x to
9472
avoid colors like <BODY BGCOLOR="#98cc 0">
9474
* htmlengine-edit-table.c (insert_table_row): fixed cursor
9475
position, added row_cells parameter
9476
(delete_row_setup_undo): rewritten to use cells data
9478
2001-03-29 Larry Ewing <lewing@ximian.com>
9480
* gtkhtml.c (on_object): free the pointer_url before we set it to
9483
2001-03-28 Radek Doulik <rodo@ximian.com>
9485
* htmlengine-edit-table.c (insert_table_column): added column
9486
parameter, when non-NULL, use it as newly created cell-places
9488
(delete_column_setup_undo): use new undo data and remember deleted
9489
cells for later undo (insertion)
9491
2001-03-27 Larry Ewing <lewing@ximian.com>
9493
* htmliframe.c (destroy): disconnect the signals from the html
9494
widget that refer to the iframe since the iframe_created.
9495
(html_iframe_class_init): use the new destroy handler.
9497
2001-03-26 Larry Ewing <lewing@ximian.com>
9499
* keybindingsrc.emacs: disable autofill.
9501
2001-03-27 Radek Doulik <rodo@ximian.com>
9503
* htmltable.c (append_selection_string): start tabbing on first
9506
* htmlclueflow.c (merge): use style of second flow if first one is
9508
(pref_right_margin): removed unused variable
9510
* htmlengine-search.c (move_to_found): fixed coordinates
9513
* htmlclueflow.c (calc_preferred_width): don't remove trailing
9514
space width on the end of paragraph
9516
2001-03-26 Larry Ewing <lewing@ximian.com>
9518
* Makefile.am: add htmlplainpainter.[ch]
9520
* htmlclueflow.c (pref_right_margin): determine the prefered
9521
margin based on the width of the line in plain painters.
9523
2001-03-26 Radek Doulik <rodo@ximian.com>
9525
* gtkhtml-search.c (gtk_html_engine_search_incremental): added
9526
wrappers around html_engine_search_... methods
9528
* htmltokenizer.c (in_extension): even more safe extension
9531
* htmlcolor.c (html_color_unref): really free color
9533
* htmlengine.c (parse_d): better checking
9535
* htmltokenizer.c (in_extension): don't check for extension end in
9538
2001-03-26 Larry Ewing <lewing@ximian.com>
9540
* htmlplainpainter.c: html painter for plain mode. The idea here
9541
is that rather than loosing valuable information when converting
9542
from html to plain and back again we change the painter to draw
9543
the html how it will render in text plain mode. This is not close
9544
to perfect yet, but with a little work it should get better.
9546
* htmlplainpainter.h: header for plain mode.
9548
2001-03-22 Larry Ewing <lewing@ximian.com>
9550
* gtkhtml.c: remove references to load_in_progress.
9551
gtk_html_write and gtk_html_end are now just proxies to
9552
gtk_html_stream_write and gtk_html_stream_end.
9554
* gtkhtml.h: remove references to load_in_progress.
9556
2001-03-22 Radek Doulik <rodo@ximian.com>
9558
* htmlinterval.c: removed some warnings
9560
* htmlengine.c (text_new): new helper function, takes care of
9561
setting class_data to HTMLText objects
9563
* htmltokenizer.c: added searchGtkHTMLCount and extension in
9565
(in_comment): look for extension in comment (like <!--+GtkHTML:
9567
(in_extension): new function, handles gtkhtml extension
9568
(html_tokenizer_tokenize_one_char): extracted from
9569
html_tokenizer_write
9571
* htmlengine.c: added class_data hash table to Engine to store
9572
object data to be set by class
9573
(html_engine_set_class_data): new function, sets data to
9575
(html_engine_clear_class_data): clears previously set class_data
9576
(html_engine_set_object_data): set data to object according to
9578
(get_class_table_sure): helper function
9579
(get_class_table): helper function
9580
(parse_d): parse <DATA ...> tag, this tag is stored in comments
9581
(maybe we should parse it only when in comment?)
9582
(html_engine_class_data_clear): clear whole class_data table
9583
(class_data_table_free_func): helper function
9584
(class_data_free_func): helper function
9586
* gtkhtml.c: new signal IFRAME_CREATED
9587
(gtk_html_set_iframe_parent): emit new signal
9589
2001-03-21 Kjartan Maraas <kmaraas@gnome.org>
9591
* htmlanchor.c: #include <string.h>
9592
* htmlpainter.c: Same here.
9593
* htmltable.c: Init two vars to zero to avoid "could be used
9594
uninitialized" warnings.
9596
2001-03-20 Radek Doulik <rodo@ximian.com>
9598
* gtkhtml-enums.h: new command
9599
GTK_HTML_COMMAND_TEXT_SET_DEFAULT_COLOR
9601
2001-03-20 Larry Ewing <lewing@ximian.com>
9603
* htmlengine.c (html_engine_begin): add LOG_INPUT ifdef here.
9604
(parse_s): compare against the full length of the string.
9605
(parse_h): use the full length again.
9607
* gtkhtml.c: Add documentation for several more functions.
9608
(gtk_html_begin_content): remove LOG_INPUT #define, do this in
9609
html_engine_begin, with gtk_html_stream_log_being now.
9610
(gtk_html_write): removed logging code.
9611
(gtk_html_end): removed logging code.
9612
(gtk_html_export): rename the content and data
9613
arguments for clarity.
9615
2001-03-19 Larry Ewing <lewing@ximian.com>
9617
* gtkhtml-stream.c (gtk_html_stream_log_new): helper function to
9618
allow logging on any stream created with gtk_html_stream_log_new
9619
rather than gtkhtml_stream_new.
9620
(stream_log_write): proxy the write to the internal stream.
9621
(stream_log_close): proxy the close to the internal stream and
9624
* gtkhtml-stream.h: add prototype for gtk_html_stream_log_new.
9626
2001-03-15 Radek Doulik <rodo@ximian.com>
9628
* htmltable.c (accepts_cursor): accept cursor
9630
* htmlobject.c (move_object_downtree): stop on containers, which
9631
accepts cursor (like tables)
9633
2001-03-18 Larry Ewing <lewing@ximian.com>
9635
* keybindingsrc.emacs: add bindings for space-and-fill and
9636
break-and-fill for testing.
9638
* htmlengine.c: fix more warnings I left.
9640
* gtkhtml.c (command): add handlers for the space-and-fill and
9643
* gtkhtml-properties.c: add enum entries for space-and-fill, and
9646
* htmlengine-edit.h (clueflow_style_to_paragraph_style): add
9649
* htmlengine-edit.c (html_engine_fill_pre_line): utility function
9650
to word wrap pre lines.
9651
(html_engine_space_and_fill_line): insert space then fill line.
9652
(html_engine_break_and_fill_line): fill line then insert paragraph.
9654
2001-03-15 Larry Ewing <lewing@ximian.com>
9656
* htmlengine.c (update_embedded): add prototype and fix warnings.
9658
2001-03-14 Larry Ewing <lewing@ximian.com>
9660
* htmlengine.c (html_engine_update_event): do a container forall
9661
on the layout to move offscreen objects off of the screen.
9662
(update_embedded): a hack of a function to make sure objects get
9663
moved out of the way properly.
9664
(parse_object): remove the call to set "embeddedelement" this is
9665
taken care of elsewhere now.
9667
* htmlembedded.c (html_embedded_set_widget): set "embeddedelement"
9670
2001-03-14 Radek Doulik <rodo@ximian.com>
9672
* htmlengine-edit-table.c (new_cell): set cell bgcolor, bgpixmap
9674
(insert_table_column): fixed cursor position and cursor movement
9677
* htmltext.c (calc_min_width): make minimal width be always >= 1
9678
(calc_preferred_width): ditto
9680
* htmltextslave.c (calc_size): make width be always >= 1
9682
* htmlengine-edit-table.c (html_engine_insert_table_1_1): create
9685
2001-03-13 Larry Ewing <lewing@ximian.com>
9687
* htmlengine.c (html_object_changed): call html_object_calc_size
9688
on the embedded element rather than html_embedded_size_recalc.
9690
* htmlembedded.c (calc_size): take the descent from the embedded
9691
element into account. Remove the requirement that the widget be
9693
(html_embedded_size_recalc): removed, use html_object_calc_size
9696
* htmlembedded.h (html_embedded_size_recalc): remove prototype.
9698
2001-03-13 Radek Doulik <rodo@ximian.com>
9700
* gtkhtml.c (command): return for already handled commands
9702
* htmltext.c: fixed matching, removed * from final char match,
9703
which made it useless, added ?!;: to forbidden terminal characters
9705
* htmlengine-edit-cut-and-paste.c (html_engine_insert_text): stop
9706
inserting links after ' ' (space)
9708
* htmlundo.c (html_undo_level_end): copy save_undo to level anyway
9709
(redo_level_end): ditto
9711
* htmlengine-edit-cut-and-paste.c
9712
(html_engine_insert_empty_paragraph): stop inserting links
9713
after paragraph insertion
9715
* gtkhtml.c (command): set update_styles
9716
(move_selection): ditto
9717
(cursor_move): ditto
9718
(key_press_event): use update_styles
9720
* gtkhtml-private.h: added update_styles flag
9722
2001-03-12 Radek Doulik <rodo@ximian.com>
9724
* gtkhtml-search.c (destroy): don't set gtkhtml's data here, as
9725
gtkhtml is already destroyed
9727
2001-03-11 Larry Ewing <lewing@ximian.com>
9729
* htmlinterval.h: fix harmless typo in copyright header.
9731
2001-03-10 Larry Ewing <lewing@ximian.com>
9733
* gtkhtml-search.c (destroy): dereference data before we destroy
9734
it, this should fix the crashes ettore has been seeing.
9736
2001-03-08 Larry Ewing <lewing@ximian.com>
9738
* htmlbutton.c (html_button_class_init): add encode method.
9739
(encode): new method to encode the button value. (patch from "Bill
9740
Gribble" <grib@gnumatic.com>)
9742
* htmlbutton.h: add success indicator. (patch from "Bill Gribble"
9743
<grib@gnumatic.com>)
9745
* htmlengine.c (parse_object_params): handle the multiple leading
9746
spaces you can get from tabs and correctly.
9747
(is_leading_space): helper funtion to find leading whitespace.
9749
* htmlclueflow.c: use IS_UTF8_NBSP.
9751
* htmlentity.h (IS_UTF8_NBSP): helper macro to match
9753
2001-03-08 Radek Doulik <rodo@ximian.com>
9755
* gtkhtml-search.c (data_destroy): don't destroy widget, as this
9756
is called from widget destroy handler
9758
2001-03-07 Larry Ewing <lewing@ximian.com>
9760
* htmlengine.c (parse_t): only emit the title changed signal if we
9761
have a valid title and were already in a title tag.
9763
2001-03-07 Radek Doulik <rodo@ximian.com>
9765
* htmlengine-edit-table.c (delete_column_setup_undo): new undo
9766
setup for column delete
9767
(delete_column_undo_action_before): 1st undo action (insert after)
9768
(delete_column_undo_action_after): 2nd undo action (insert before)
9770
* htmlundo-action.c (html_undo_action_destroy): check for
9771
action->data before unref'ing them
9773
* htmltable.h (HTML_IS_TABLE): use HTML_CHECK_TYPE
9775
* htmltypes.h (HTML_CHECK_TYPE): new macro
9777
* htmlengine-edit-table.c (html_engine_insert_table_1_1): move 1
9778
step back to inserted table
9779
(insert_table_column): move to the 1st cell of inserted column
9780
(delete_table_column): fix cursor position after column removed
9781
(insert_table_column): extracted from
9782
html_engine_insert_table_column
9783
(delete_table_column): extracted from
9784
html_engine_delete_table_column
9785
(insert_column_setup_undo): new function
9786
(insert_column_undo_action): new undo action
9788
* htmltable.h (IS_HTML_TABLE): renamed to HTML_IS_TABLE
9790
2001-03-06 JP Rosevear <jpr@ximian.com>
9792
* Makefile.am: make htmltablepriv.h a source
9794
2001-03-06 Radek Doulik <rodo@ximian.com>
9796
* keybindingsrc.{ms,emacs}: new bindings
9798
* gtkhtml.c (command): use new command
9800
* htmlengine-edit-table.c (html_engine_delete_table_column): new
9801
command implementation
9803
* gtkhtml.c (command): use new table methods
9805
* htmlengine-edit-table.c (html_engine_insert_table_column): new
9808
* htmltablepriv.h: new file for private HTMLTable methods
9810
* htmlengine-edit-cut-and-paste.c (html_engine_append_object): new
9811
method, splits at cursor upto level 'level' and appends object
9814
* htmlengine-edit-table.c (html_engine_insert_table_1_1): new
9815
command implementation
9817
* htmlengine-edit-cut-and-paste.c (look_for_non_appendable): check
9818
for parent type insted of object itself
9820
* htmlobject.c (html_object_merge): work around nested types
9823
* gtkhtml-properties.c: added new commands definitions
9825
* htmlengine-edit-cut-and-paste.c (split_and_add_empty_texts): in
9826
case of '' split after
9828
* htmltable.c (merge): take care of merging 1 row table with other
9830
(merge): fixed cells setting in output (t1) table
9832
2001-03-02 Radek Doulik <rodo@ximian.com>
9834
* htmltable.c (calc_size): test for already properly sized
9835
columnOpt, if needed call set_max_width
9837
* htmlclueflow.c (check_point): check for p != NULL
9839
* htmltext.c (copy): g_strdup face, it caused some crashes in
9840
destroy method before
9842
2001-02-20 Larry Ewing <lewing@ximian.com>
9844
* htmlobject.c (html_object_check_point): allways return NULL when
9845
width or height == 0.
9847
* htmlclueflow.c (check_point): fix logic to work with zero
9848
height objects. This should fix the looping bug the red-carpet
9851
2001-02-15 Dan Winship <danw@ximian.com>
9853
* htmltext.c (split_word_width): fix up a g_renew use to fix a
9856
2001-02-12 Radek Doulik <rodo@ximian.com>
9858
* htmlengine-edit-cut-and-paste.c (check_magic_link): try magic
9859
links only for HTMLText and not link
9861
* htmltext.c (html_text_magic_link): save and restore cursor
9863
(html_text_magic_link): wrapped in one undo step
9864
(paste_link): ops, removed level step here
9865
(paste_link): take care for case when cursor in on end of previous
9868
2001-02-09 Radek Doulik <rodo@ximian.com>
9870
* htmldrawqueue.c (html_draw_queue_flush): do clear/draw_obj only
9871
if GtkHTML has window
9873
* htmliframe.c (draw): use parent_class draw method for non
9876
* htmlembedded.c: reworked size calculation/allocation, removed
9879
* gtkhtml-embedded.c (gtk_html_embedded_new): don't set
9880
resize_mode to QUEUE
9882
* gtkhtml.c (gtk_html_set_default_content_type): take care of
9883
content_type == NULL
9885
2001-02-08 Frederic Crozat <fcrozat@mandrakesoft.com>
9887
* gtkhtml.c (client_notify_widget): rename font_var_family and
9888
font_fix_family to font_var and font_fix
9890
2001-02-08 Radek Doulik <rodo@ximian.com>
9892
* htmltable.c (divide_left_by_preferred_width): expand only
9893
columns with pref > fixed
9895
* htmltext.c (merge_word_width): fixed
9897
2001-02-07 Larry Ewing <lewing@ximian.com>
9899
* htmlimage.c (draw): use HTML_IS_PRINTER to detect printer object
9900
cleanly. (from Dave Benson <daveb@ffem.org>)
9902
* htmltokenizer.c (html_tokenizer_end): clear dest.
9903
(html_tokenizer_reset): free the token buffer list, and clear dest
9904
and size. (from Dave Benson <daveb@ffem.org>)
9906
2001-02-01 Larry Ewing <lewing@ximian.com>
9908
* gtkhtml.c (mouse_change_pos): allow a little bit of motion
9909
before we decide it isn't a click on a url. This should probably be
9910
reworked to function more like netscape over urls.
9912
2001-02-01 Radek Doulik <rodo@ximian.com>
9914
* htmlcursor.c (html_cursor_end_of_line): take care of objects
9915
with different height on one line
9916
(html_cursor_beginning_of_line): ditto
9917
(html_cursor_up): ditto
9918
(html_cursor_down): ditto
9920
2001-02-01 Larry Ewing <lewing@ximian.com>
9922
* htmlembedded.c (calc_size): fix the bug I introduced last week
9923
that caused htmliframes too loop in their size negotiation.
9925
2001-01-31 Radek Doulik <rodo@ximian.com>
9927
* htmlengine-edit-cut-and-paste.c (html_engine_insert_text): delay
9928
spell check only for newly typed words
9930
2001-01-30 Radek Doulik <rodo@ximian.com>
9932
* htmlengine.c (html_engine_set_painter): take care of borber
9934
* htmliframe.c (draw): take care of html border, fixes iframes
9937
* htmlcluev.c (check_point): take care of Objects with zero width
9939
* htmlclueflow.c (check_point): take care of Objects with zero
9942
* htmltextslave.c (check_point): take care of ''
9944
* htmlimage.c (get_actual_width): use actual engine
9945
(get_actual_height): likewise
9947
* htmliframe.c (set_max_width): implemented set max width
9948
(calc_min_width): rewritten, use html_engine_calc_min_width, this
9949
fixes Evolution welcome message problem
9951
* htmlengine.c (html_engine_get_view_width): take care of iframes
9952
(html_engine_get_view_height): likewise
9953
(html_engine_calc_min_width): new method
9955
2001-01-29 Radek Doulik <rodo@ximian.com>
9957
* htmlimage.c (calc_min_width): fix min width for images with
9960
2001-01-29 Larry Ewing <lewing@ximian.com>
9962
* htmlengine.c (html_engine_begin): call html_engine_id_table_clear.
9963
(html_engine_id_table_clear): move the table reset functions to a
9966
2001-01-29 Radek Doulik <rodo@ximian.com>
9968
* gtkhtml-search.c (hide): new helper function
9969
(data_destroy): ditto
9970
(focus_out_event): new signal handler
9972
(gtk_html_isearch): don't destroy input line, hide instead, store
9973
data in input line widget data
9975
* gtkhtml-private.h: added search_input_line
9977
2001-01-29 Larry Ewing <lewing@ximian.com>
9979
* htmltable.c (html_table_init): remove reference to refcount.
9980
Remove unused link/unlink funtions.
9982
* htmltablecell.h: remove unused refcount member. Remore
9983
link/unlink prototypes.
9985
* htmltable.c (set_cell): remove useless call to
9986
html_table_cell_link.
9988
2001-01-29 Radek Doulik <rodo@ximian.com>
9990
* htmltable.c (destroy): reversed order of walk thru table as we
9991
don't want access freed memory
9993
* htmlengine.c (html_engine_add_object_with_id): strdup key only
9994
if it's a new one, else pass old_key (take a look in glib sources
9995
if you don't beleive it's right :)
9997
2001-01-26 Radek Doulik <rodo@ximian.com>
9999
* htmlclueflow.c (html_clueflow_spell_check): draw spelled range
10000
only if engine isn't frozen
10002
* htmlengine.c (parse_table): don't ignore nowrap
10004
2001-01-25 Radek Doulik <rodo@ximian.com>
10006
* htmlengine-edit-cut-and-paste.c (html_engine_insert_text): don't
10007
do spell check yourself and rather pass check param to
10010
2001-01-25 Radek Doulik <rodo@helixcode.com>
10012
* gtkhtml.c (gtk_html_new): added doc comment to test doc stuff
10013
(gtk_html_new_from_string): added new constructor
10015
* gtkhtml-stream.h (gtk_html_stream_unref): moved
10016
gtk_html_stream_ref, gtk_html_stream_unref from gtkhtml.h
10018
* htmltablecell.c (calc_size): new method, take care of fixed
10020
(clue_move_children): new helper function
10021
(html_table_cell_set_fixed_height): new function
10023
* htmlengine.c (parse_table): support <td height=[number]>
10025
* htmltablecell.c (html_table_cell_init): added fixed_height
10027
2001-01-25 Larry Ewing <lewing@ximian.com>
10029
* htmlimage.c (html_image_pointer_timeout): only queue a redraw if
10030
there is an image object to queue it on (not a background).
10032
2001-01-24 Larry Ewing <lewing@ximian.com>
10034
* htmlimage.c (html_image_pointer_timeout): draw the borders now
10035
that we think we've waited long enough. The idea here is that we
10036
are too agressive about drawing the box where the image should be
10037
and it results in ugly artifacts. Now we wait a STALL_INTERVAL
10038
amount of time before we start drawing the box.
10039
(html_image_pointer_new): initialize the timer.
10040
(html_image_pointer_unref): clear the timer if it is still around.
10041
(draw): short circuit if stall is not set.
10043
* htmlimage.h: add stall flag and stall timeout to track stream
10046
* htmlembedded.c (calc_size): use the requisition because the
10047
allocation fluctuates too much.
10049
* gtkhtml-embedded.c (gtk_html_embedded_new): listen to the size
10050
parameters passed along in the html.
10052
2001-01-24 Radek Doulik <rodo@helixcode.com>
10054
* htmlengine-edit.c (html_engine_spell_check_range): check for
10055
properties:live spell checking
10057
* htmltext.c (split_word_width): do renew only when words !=
10058
s->words (not needed, but old way I got segv with efence, weird)
10060
* htmlengine.c: added need_spell_check flag
10062
* htmlengine-edit-cut-and-paste.c: do spell checking only on word
10063
ends and use need_spell_check engine flag
10065
* htmlcursor.c: check for need_spell_check before cursor move
10067
* htmlclueflow.c (html_clueflow_spell_check): queue draw checked
10069
(queue_draw): helper function
10071
* testgtkhtml.c (print_footer): add param to quiet warning
10073
2001-01-23 Larry Ewing <lewing@helixcode.com>
10075
* htmlcolorset.c: unref all the colors when we destroy the
10076
colorset (from iain@ximian.com).
10078
* htmlengine.c: unref the insertion_color. (iain)
10080
* htmltext.c: free text->face in destroy. (iain)
10082
* htmltable.c: initialize higher_span.
10084
2001-01-23 Radek Doulik <rodo@helixcode.com>
10086
* htmlengine-print.c: use user_data in printing
10088
* gtkhtml.c (gtk_html_print_with_header_footer): added user_data
10089
parameter for language bindings
10091
* htmlengine.c (thaw_idle): use gtk_html_edit_make_cursor_visible
10093
* gtkhtml.c (gtk_html_edit_make_cursor_visible): new function
10094
(key_press_event): don't do queue_draw here
10095
(move_selection): use gtk_html_edit_make_cursor_visible
10096
(cursor_move): ditto
10098
* htmlengine.c (html_engine_make_cursor_visible): let cursor
10099
always rather end in right-bottom
10101
2001-01-19 Radek Doulik <rodo@helixcode.com>
10103
* htmlengine-edit.c (html_engine_indent_pre_paragraph): changed
10106
* htmlclueflow.c (html_clueflow_set_style): clear word width when
10107
changing from/to PRE
10109
* htmlengine.c (html_engine_set_painter): use
10110
html_object_clear_word_width
10112
* htmlobject.c (html_object_clear_word_width): new function
10114
* htmlengine-edit.c (html_engine_indent_pre_paragraph): new
10115
function, indents pre paragraph to 72 chars
10116
(go_to_begin_of_pre_para): helper function
10117
(try_break_this_line): ditto
10119
* htmlengine.c (html_engine_thaw): add show cursor if idle already
10121
(html_engine_freeze): hide always cursor
10123
* htmlengine-edit-cut-and-paste.c (html_engine_delete_n): don't do
10124
cut here, just delete
10126
* htmlcursor.c (html_cursor_beginning_of_paragraph): new function
10127
(html_cursor_end_of_paragraph): new function
10129
* htmlengine.c (clear_word_width): new helper function
10130
(html_engine_set_painter): clear word width cache
10132
* htmltext.c (html_text_clear_word_width): make this function
10135
2001-01-18 Radek Doulik <rodo@helixcode.com>
10137
* htmltext.c (object_split): take care of split in sequence
10139
* htmlobject.c (html_object_merge): added engine parameter
10141
* htmlengine-edit-cut-and-paste.c (html_engine_insert_text): call
10144
* htmltext.c (merge_word_width): new function
10145
(object_merge): use merge_word_width
10147
* gtkhtml.c (command): added
10148
GTK_HTML_COMMAND_DELETE_BACK_OR_INDENT_DEC command
10149
(load_keybindings): bind backspace to new command
10151
* htmlengine-edit.c (html_engine_cursor_on_bop): new function
10152
(html_engine_get_indent): new function
10154
* htmlrule.c (save): save all attributes
10156
* htmltext.c (html_text_op_cut_helper): convert nbsp
10157
(html_text_convert_nbsp): new helper function, takes care of nbsp
10159
(convert_nbsp): refactored, does only actual rewrite
10160
(is_convert_nbsp_needed): extracted 1st pass where we find out if
10161
convert is neccessary
10162
(split_word_width): new functions, takes care of word_width cache
10164
(clear_word_width): helper function, clears word width cache
10166
2001-01-16 Radek Doulik <rodo@helixcode.com>
10168
* htmlclue.c (forall): use pnext to remember p->next as p could be
10169
removed in func call
10171
* gtkhtml.c (gtk_html_set_color): new function
10173
* htmltext.c (html_text_op_cut_helper): remove spell errors from
10176
* htmlengine-edit-cut-and-paste.c (prepare_delete_bounds): if
10177
level > 1 prepend NULL before left and right
10179
* htmlclueflow.c (get_post_padding): add post padding for header
10180
preceding another header too
10182
* htmlengine.c (insert_text): create new text if para is pending
10184
2001-01-12 Radek Doulik <rodo@helixcode.com>
10186
* htmlclueflow.c (search): fixed crash for empty document
10188
2001-01-11 Radek Doulik <rodo@helixcode.com>
10190
* htmlclue.c (merge): merge all clues
10192
* htmltext.c (html_text_op_cut_helper): move spell_errors
10193
(html_text_op_cut_helper): remove spell errors when cutting whole
10195
(object_split): update spell errors
10196
(remove_spell_errors): make it exact
10197
(object_split): do convert_nbsp
10198
(object_merge): do convert_nbsp
10200
* htmlgdkpainter.c (alloc_e_font_it): do n1 -> n2 -> n3 instead of
10203
* gtkhtml.c (selection_received): paste only in editable
10204
(gtk_html_request_paste): ditto
10206
* htmlgdkpainter.c (alloc_e_font_it): substitute size by * when
10207
looking for closest font
10209
* gtkhtml.c (scroll): repeat two lines when scrolling by page
10210
(scroll): use rather 2.5 * size
10211
(cursor_move): try to repeat last 2 lines while scrolling by page
10214
* htmlengine-edit-clueflowstyle.c
10215
(html_engine_set_clueflow_style): free/thaw engine
10217
* htmlclueflow.c (check_point): fixed case when flow indent level
10220
* htmlfontmanager.c: use full font name
10222
* gtkhtml-properties.c: read/store full font name
10224
2001-01-10 Radek Doulik <rodo@helixcode.com>
10226
* htmlobject.c (html_object_get_tail_leaf): new function, moved
10228
(html_object_get_head_leaf): ditto
10229
(html_object_get_selection_string): new function, returns
10230
selection string for object
10231
(select_object): helper function for
10232
html_object_get_selection_string
10233
(unselect_object): ditto
10235
* gtkhtml.c (gtk_html_cut): set selection owner
10236
(gtk_html_copy): likewise
10237
(command): use gtk_html_copy, gtk_html_cut
10238
(button_release_event): use gtk_html_copy
10240
* htmlengine-edit-cut-and-paste.c (html_engine_paste_text): add
10241
undo level "Paste text"
10242
(html_engine_paste_object): added undo level "Paste"
10244
* gtkhtml.c (gtk_html_request_paste): do PASTE if no selection
10246
(button_release_event): copy selection to clipboard
10247
(gtk_html_paste): use gtk_html_request_paste instead of
10249
(selection_received): if it's selection from us, use
10250
html_engine_paste rather than text version of data
10251
(command): call gtk_html_paste rather than html_engine_paste as we
10252
want take care of XSelection while pasting
10253
(command): don't cut before inserting rule
10254
(command): don't cut before inserting empty para, do delete instead
10256
2001-01-09 Dave Camp <dave@helixcode.com>
10258
* Makefile.am (libgtkhtml_HEADERS): Added htmlengine-cut-and-paste.h
10260
2001-01-09 Radek Doulik <rodo@helixcode.com>
10262
* htmlengine.c (parse_p): don't push DIV block
10263
(parse_p): don't pop it
10264
(add_line_break): add para with empty text only when !HTML_CLUE
10267
* htmltext.c (html_text_append): new helper method
10269
* htmlengine.c (parse_h): don't place hrule in own flow
10270
(add_line_break): when flow == NULL, add para with empty text
10271
(insert_text): replaced crappy code with html_text_append method
10274
2001-01-08 Radek Doulik <rodo@helixcode.com>
10276
* htmlengine-edit-cut-and-paste.c (html_point_get_left): remove
10277
allow_null parameter
10278
(html_point_get_right): likewise
10280
* htmlobject.c (html_object_op_cut): add left, right parameters
10282
* gtkhtml.c (idle_handler): take care of thaw_idle handler
10284
* htmltext.c (calc_min_width): use strlen rather than
10285
unicode_index_to_offset
10287
* htmltextslave.c (get_offset_for_pointer): renamed from
10288
html_text_slave_get_offset_for_pointer, make it private
10290
* htmlobject.c (html_object_next_not_type): new helper function
10291
(html_object_prev_not_type): ditto
10293
* htmlclueflow.c (check_point): rewritten, take care of objects
10294
with different (ascent + descent)'s
10296
* htmltextslave.c (check_point): implement this method
10298
* htmltext.c (check_point): return just NULL, left work to
10299
clueflow which is container
10301
2001-01-05 Radek Doulik <rodo@helixcode.com>
10303
* htmlengine.c (html_engine_freeze): hide cursor
10304
(thaw_idle): show cursor
10305
(html_engine_thaw_idle_reset): show cursor
10307
* htmlclueflow.c (get_text): use html_object_next_not_slave
10308
(get_text_bytes): ditto
10310
* htmlengine.c (thaw_idle): don't reset blinking
10312
* htmlengine-edit-cursor.c (html_engine_draw_cursor_in_area):
10313
don't draw cursor if engine is freezed
10315
* htmlengine.c (html_engine_thaw): do thaw in idle time
10317
* htmltext.c (html_text_op_cut_helper): use new object helper
10320
* htmlobject.c (html_object_move_cursor_before_remove): new helper
10322
(html_object_move_cursor_before_remove): ditto
10323
(op_cut): use these helper functions
10325
* htmlengine-edit-cut-and-paste.c (delete_object_do): use disable
10326
selection instead of deactivate to deselect deleted objects
10327
(html_point_get_left): added allow_null parameter
10328
(html_point_get_right): likewise
10329
(prepare_delete_bounds): allow NULL for bounds, but not for from,
10331
(remove_empty_and_merge): make sure cursor have no zero offset if
10332
there is prev object
10333
(html_point_get_right): don't allow NULL for ''
10334
(html_point_get_left): likewise
10335
(move_cursor_before_delete): extracted from delete_object_do,
10337
(place_cursor_before_mark): extracted from delete_object_do
10338
(delete_object_do): refactored, use move_cursor_before_delete and
10339
place_cursor_before_mark
10341
* htmlengine.c (html_engine_thaw): use html_draw_queue_clear
10343
* htmldrawqueue.c (html_draw_queue_clear): new function
10344
(html_draw_queue_flush): use html_draw_queue_clear
10346
* htmlengine-edit-cut-and-paste.c (delete_object): don't set
10347
cursor to home, op_cut take care of cursor now
10349
* htmlobject.c (html_object_op_copy): pass engine instead of empty
10351
(html_object_op_cut): likewise
10352
(op_cut): take care of cursor
10354
2001-01-04 Radek Doulik <rodo@helixcode.com>
10356
* htmlengine-edit-cut-and-paste.c (check_magic_link): new helper
10358
(html_engine_insert_empty_paragraph): use check_magic_link
10359
(html_engine_insert_text): likewise
10361
* htmltext.c (html_text_magic_link): moved magic links code here
10362
(paste_link): use paste_object + undo levels
10364
* htmlengine-edit-table.c (html_engine_insert_table): likewise
10366
* htmlengine-edit-rule.c (html_engine_insert_rule): don't destroy
10369
* htmlengine-edit-images.c (html_engine_insert_image): don't
10370
destroy image after pasting
10372
2001-01-03 Radek Doulik <rodo@helixcode.com>
10374
* htmlengine-edit-cut-and-paste.c (remove_empty_and_merge): remove
10375
child before destroy
10377
* htmllinktextmaster.c (html_link_text_master_class_init): set
10380
* htmlobject.c (html_object_destroy): ops, take back remove_child
10382
(html_object_merge): remove child
10384
2000-12-29 Radek Doulik <rodo@helixcode.com>
10386
* htmltable.c (divide_into_percented): fixed, there was error in
10387
part calculation in case left < to_fill
10389
2000-12-21 Radek Doulik <rodo@helixcode.com>
10391
* htmltable.c (html_table_end_row): fixed crash for empty row
10394
2000-12-20 Radek Doulik <rodo@helixcode.com>
10396
* htmlimage.c (get_actual_width): use top_html_engine
10397
(get_actual_height): likewise
10399
2000-12-19 Radek Doulik <rodo@helixcode.com>
10401
* gtkhtml.c (selection_received): use unicode_strlen
10403
2000-12-18 Larry Ewing <lewing@helixcode.com>
10405
* htmlclueflow.c (html_clueflow_spell_check): free the text
10406
returned from get_text to fix a leak.
10407
Free the interval when we create a new one, stops leak.
10409
* htmltext.c (html_text_spell_errors_clear_interval): clean up
10412
2000-12-15 Radek Doulik <rodo@helixcode.com>
10414
* htmltable.c (calc_percentage_step): extracted from
10415
calc_col_percentage, take care of cspan
10416
(calc_col_percentage): use calc_percentage_step
10417
(divide_into_percented): be exact here
10419
* htmlengine-edit-cut.c (html_engine_cut): update selection before
10422
* htmltablecell.c (calc_min_width): don't use fixed_width as
10424
(calc_preferred_width): for fixed width cells use it as preferred
10426
* htmltable.c (calc_preferred_width): calc also fixed width cells
10427
preferred width to columnPref array
10428
(divide_upto_preferred_width): extracted from
10429
divide_into_variable_all
10430
(divide_into_variable_all): first divide in fixed width cells,
10431
then to auto-width ones
10432
(divide_left_by_preferred_width): extracted from
10433
divide_into_variable_all
10435
* htmltablecell.c (html_table_cell_get_fixed_width): new helper
10438
* htmltable.h: added array columnFixed with fixed widths of
10441
* htmltable.c (calc_column_width_template): added parameter pref,
10442
it should be array with preferred width used by portioning width
10445
2000-12-14 Larry Ewing <lewing@helixcode.com>
10447
* gtkhtml.c (gtk_html_begin_content): arggggh... use the content
10448
type we are passed not the default. This breaks the logic in the
10451
* htmlimage.c (save_plain): make sure we initialize the return
10454
2000-12-14 Radek Doulik <rodo@helixcode.com>
10456
* htmlengine.c (parse_i): don't set eat_space here
10457
(parse_a): rather do it here
10459
2000-12-14 Larry Ewing <lewing@helixcode.com>
10461
* gtkhtml.c (destroy): free content_type.
10462
(init): initialize content_type.
10463
(gtk_html_begin_content): add entry point for specifying content type
10464
at stream initialization.
10465
(gtk_html_set_default_content_type): new funtion to set the
10466
default content type assumption of new streams.
10468
* htmlengine.h: add content_type to html_engine_begin prototype.
10470
* htmlengine.c (html_engine_begin): add content_type parameter.
10472
* gtkhtml-private.h: add content_type to private structure.
10474
* htmliframe.c (html_iframe_init): make iframe inheirit default
10477
* gtkhtml.h: add gtk_html_set_default_content_type and
10478
gtk_html_begin_content.
10480
* htmltokenizer.c (html_tokenizer_write): remove call to
10481
html_tokenizer_begin as it shouldn't be needed any more.
10482
(charset_is_utf8): temporary helper function.
10483
(html_tokenizer_begin): add content_type argument to allow support
10484
for multiple charsets.
10485
(in_plain): do not convert to utf-8 if we are expecting utf-8
10487
2000-12-14 Kjartan Maraas <kmaraas@gnome.org>
10489
* *.c: Added #include <config.h> to all .c files and fixed some
10490
_() marked strings to be N_() since they are static.
10492
2000-12-13 Radek Doulik <rodo@helixcode.com>
10494
* gtkhtml.c (shift_to_iframe_parent): remove -1
10495
(enter_notify_event): use shift_to_iframe_parent
10496
(mouse_change_pos): set in_selection only if selection non-empy
10497
(compare coordinates)
10499
2000-12-12 Radek Doulik <rodo@helixcode.com>
10501
* htmlengine-edit-fontstyle.c (html_engine_set_color): if color ==
10502
NULL use default Text color
10504
* htmltablecell.c (calc_preferred_width): implemented
10505
calc_preferred_width
10507
* htmlengine-edit-movement.c (html_engine_forward_word): fixed one
10509
(html_engine_backward_word): make it dual to
10510
html_engine_forward_word
10512
2000-12-12 Iain Holmes <iain@helixcode.com>
10514
* gtkhtml.c (on_object): Emit the ON_URL signal when there is no object.
10516
2000-12-12 Radek Doulik <rodo@helixcode.com>
10518
* htmltable.c (draw): use pixel size for cell content panel
10519
(calc_column_width_template): take care for cspan
10520
(calc_column_width_step): likewise, calc exactly
10521
(divide_into_percented): calc exactly
10523
2000-12-12 Larry Ewing <lewing@helixcode.com>
10525
* htmlclueflow.c (draw): fix list item marker position tweak and
10528
2000-12-11 Radek Doulik <rodo@helixcode.com>
10530
* htmlprinter.c (draw_pixmap): let gnome-print do alpha stuff
10532
* htmlengine-print.c (html_engine_print_set_min_split_index): new
10533
helper setting function
10534
(print_all_pages): use min_split_index
10536
* htmlengine.h: added min_split_index for printing
10538
* Makefile.am (testgtkhtml_SOURCES): move htmlurl.h here
10540
* htmlprinter.c (draw_panel): do shadings
10542
* htmltypes.h: removed HTMLURL
10544
2000-12-10 Radek Doulik <rodo@helixcode.com>
10546
* htmltable.c (forall): call func also on self
10548
* htmlcluev.c (find_free_area): break cycle if try_y == next_y to
10549
avoid infinite cycles
10551
* htmltable.c (calc_min_width): use pixel_size for specified_width
10552
(calc_preferred_width): likewise
10553
(html_table_set_max_width): likewise
10555
2000-12-08 Larry Ewing <lewing@helixcode.com>
10557
* htmlengine.c (parse_object_params): make sure we parse the
10558
string once we have already removed TAG_ESCAPE so that param
10559
parsing works properly.
10561
2000-12-08 Radek Doulik <rodo@helixcode.com>
10563
* htmltable.c (get_bg_color): new method
10564
(draw): use parent color for border panel
10565
(draw): use cell color for its border panel
10566
fix border_extra everywhere
10567
(LL): use unsigned long long while scaling to avoid overflows
10570
* htmlobject.c (html_object_set_bg_color): new function
10572
* htmltable.c (divide_into_variable_all): calc exactly :)
10574
* htmlpainter.c (html_painter_draw_panel): added parameter bg
10577
2000-12-07 Larry Ewing <lewing@helixcode.com>
10579
* gtkhtml.c (selection_get): whoops encode COMPOUND_TEXT as well
10582
2000-12-07 Radek Doulik <rodo@helixcode.com>
10584
* gtkhtml-search.c: reworked, use new API
10586
* removed gtkhtml-input.[ch], implemented it thru editor API
10588
2000-12-07 Larry Ewing <lewing@helixcode.com>
10590
* htmlengine-save.c (html_engine_save_buffer_new): add cast to
10592
(html_engine_save): cleanup warning.
10593
(html_engine_save_plain): cleanup warning.
10595
* htmlengine-save.h: make prototypes match.
10597
* gtkhtml-private.h: add last_selection_type parameter to the the
10598
private stucture to track what selections whe have requested.
10600
* gtkhtml.h: change gtk_html_request_paste prototype to
10601
include type parameter.
10603
* gtkhtml.c: added UTF8_STRING (and UTF-8) targets to support the
10604
various X selection atoms people are using.
10605
(selection_get): support the new targets.
10606
(init): add new targets.
10608
2000-12-07 Radek Doulik <rodo@helixcode.com>
10610
* htmltable.c: border extra tweakings
10612
* htmlgdkpainter.c (draw_panel): changed border drawing
10613
(find_font): if found bigger and smaller font than requsted,
10614
choose according to size known from font style
10616
* htmltable.c: fix HTML_CHANGE_PREF_WIDTH brokeness
10617
count padding to cell width
10619
* htmlgdkpainter.c: removed obsolete code
10621
2000-12-06 Larry Ewing <lewing@helixcode.com>
10623
* htmlengine.c (parse_object_params): use
10624
html_tokenizer_peek_token check for pending <param> tags
10626
(parse_object): clean up the calls to parse_body, and discard_body
10627
now that we have no longer already popped the token off the stack.
10629
* htmltokenizer.h: add prototype for html_tokenizer_peek_token.
10631
* htmltokenizer.c (html_tokenizer_peek_token): add a new function
10632
to peek at the next token nondestructively.
10634
* htmlengine.c (parse_object): make sure we actually match the end
10637
2000-12-06 Radek Doulik <rodo@helixcode.com>
10639
* htmlobject.c (html_object_calc_preferred_width): cache
10642
* htmlobject.h: added pref_width
10644
* htmlembedded.c (allocate): set HTML_CHANGE_ALL
10646
* htmltext.c (split): set HTML_CHANGE_ALL
10648
* htmlimage.c (html_image_factory_area_prepared): set HTML_CHANGE_ALL
10650
* htmlinterval.c (select_object): use top engine for select_in and
10651
"right one" for select_range call
10653
2000-12-06 Larry Ewing <lewing@helixcode.com>
10655
* htmlengine.c (parse_object): change ret_val to object_found to
10656
make the meaning clear. Let me make this clear if you return TRUE
10657
in your object_requested signal we will use the embedded element,
10658
if you return false we will parse and use the contents between
10659
<object> and </object>. Also free type and classid.
10661
* gtkhtml.c (html_engine_object_requested_cb): change ret_val to
10662
object_found to make the meaning clear.
10664
2000-12-06 Radek Doulik <rodo@helixcode.com>
10666
* htmltable.c (calc_column_width_step): take care of cspan
10667
(calc_column_width_template): do steps for all possible cspans
10669
* htmlengine.c (parse_i): set eat_space to FALSE after <img>
10671
* htmltable.c (divide_into_percented): don't substract max_size
10672
[c] from MIN, but from total_width part
10673
(calc_lowest_fill): new helper function
10674
(divide_into_variable_all): use calc_lowest_fill, updated first
10675
step of dividing between cols with pref width < actual
10676
(calc_column_width_step): extracted from
10677
calc_column_width_template
10679
* htmlengine.c (parse_body): set eat_space to FALSE
10680
(insert_text): drop consequent spaces
10681
(parse_s): set eat_space to FALSE after </select>
10682
(parse_t): likewise after </textarea>
10684
* htmlengine.h: added Engine::eat_space flag
10686
* htmlgdkpainter.c (alloc_e_font): drop our heuristic and let
10688
(alloc_e_font): drop fixed font if face != NULL
10689
(alloc_e_font): use our heuristic for size
10690
(alloc_e_font_it): new helper function
10691
(alloc_e_font): try to alloc "obligue" when no italics found
10693
* htmltable.c (divide_into_variable_all): more tuning
10695
* htmlengine.c (parse_p): don't reset divAlign
10696
(parse_d): likewise
10697
(html_engine_parse): set divAlign to HTML_HALIGN_LEFT
10699
* htmltable.c: I have completely rewritten size calculating,
10700
scaling part is done in html_table_set_max_width, calc_size is
10701
partialy rewritten and partialy refactored. I hope it finally work
10702
correctly. It's at least correct in cases I know, which were
10703
miscalculated before. One TODO: implement exact dividing of left
10704
width using an DDA like algorhytm
10705
(divide_into_variable_all): don't add to columns, which already
10706
met their preferred width
10708
2000-12-05 Radek Doulik <rodo@helixcode.com>
10710
* htmlobject.c (fit_line): fixed condition o->width < width_left
10711
to o->width <= width_left
10713
* htmlenums.h: add HTML_CHANGE_PREF_WIDTH
10715
2000-12-05 Larry Ewing <lewing@helixcode.com>
10717
* htmlengine.c (parse_object): applied patch from Bill Gribble
10718
<grib@gnumatic.com> to fix param parsing for object tags.
10719
(parse_object_params): same.
10721
* gtkhtml-embedded.c (gtk_html_embedded_new): (from patch) add
10722
data argument. Also fixed some prototype indentation.
10724
* gtkhtml-embedded.h: (from patch) add data variable.
10726
2000-12-04 Radek Doulik <rodo@helixcode.com>
10728
* htmltable.c (cell_end_col): new helper function
10729
(calc_column_min_widths): take care of FIXED width cells and for
10732
* htmltable.h: removed ColInfo, RowInfo, colInfo
10734
* htmltable.c: removed obsolete calc_col_info,
10735
html_table_add_col_info
10737
* htmltable.h: removed obsolete colSpan
10739
* htmltable.c (calc_column_min_widths): simplify condition
10741
* htmltable.h: removed obsolete colType
10743
* htmltable.c (calc_preferred_width): use COLUMN_PREF_POS
10744
(calc_min_width): use COLUMN_POS
10746
* htmltable.h: removed obsolete _minWidth, _prefWidth
10748
* htmlengine-edit-paste.c (prepare_clueflows): fix case when
10749
engine->cursor->object->next == NULL
10751
* htmlinterval.c (select_object): use selected_in
10752
(html_interval_select): set selected_in to FALSE before selecting
10754
* htmlengine.h: added flag selected_in
10756
* htmltextmaster.c (calc_size): set ascent, descent
10758
2000-12-01 Radek Doulik <rodo@helixcode.com>
10760
* gtkhtml.c (button_press_event): changed some logic, scroll wheel
10761
no more unselects, ...
10763
2000-11-30 Radek Doulik <rodo@helixcode.com>
10765
* htmlentity.c: killed warning
10767
* htmlengine.c (html_engine_update_event): reorder actions, set
10770
2000-11-28 Radek Doulik <rodo@helixcode.com>
10772
* gtkhtml.c (init_properties): updated to latest gconf
10774
* gtkhtml-properties.c: as below
10775
(GET): use gconf_client_get_without_default and gconf_value_free
10776
instead of gconf_client_get_full and gconf_value_destroy
10778
* gtkhtml.c: aplied patch form Chipzz@ULYSSIS.Org
10781
2000-11-27 Radek Doulik <rodo@helixcode.com>
10783
* gtkhtmldebug.c (gtk_html_debug_dump_object): dump ascent and
10786
* htmliframe.c (check_point): take care for border area
10788
2000-11-24 Radek Doulik <rodo@helixcode.com>
10790
* htmltable.c (bin_search_index): new function
10791
(to_index): new helper function
10792
(get_bounds): rewritten, uses to_index and bin_search_index
10793
(check_page_split): updated
10795
* htmlclueflow.c (check_point): check for p coordinates instead of
10797
(check_point): refactoring: remove tmp var obj1
10798
(check_point): refactoring: remove tmp var x1, y1
10799
(check_point): use html_object_next_not_slave
10801
2000-11-22 Radek Doulik <rodo@helixcode.com>
10803
* htmlimage.c (select_range): new method
10805
* htmltablecell.c (save): add \" around color
10806
(save): save width attribute
10808
* htmltable.c (save): save percent if percent > 0 instead of
10811
* htmltablecell.c (save): fixed test
10813
* htmltable.c (save): added BACKGROUND, CELLSPACING, CELLPADDING,
10814
WIDTH and BORDER attributes
10816
* htmlimage.c (html_image_resolve_image_url): also strdup image
10817
url if not resolved
10818
(save): g_free url always
10820
* htmlimage.h (HTML_IMAGE_POINTER): define HTML_IMAGE_POINTER
10822
* htmltable.c (html_table_init): set bgPixmap to NULL
10824
* htmltable.h: added bgPixmap to HTMLTable
10826
* htmltablecell.c (save): make tags uppercase
10828
* htmltable.c (save): make tags uppercase
10830
* htmltext.c (get_tags): make tags uppercase
10832
* htmltablecell.c (save): save bgcolor attribute in TD tag
10834
* htmltable.c (save): save bgcolor attribute in TABLE tag
10836
* htmlengine.c (parse_table): set table->bgColor
10838
* htmltable.c (destroy): free bgColor
10839
(html_table_init): set bgColor to NULL
10841
* htmltable.h: added bgColor to HTMLTable structure
10843
* htmlengine-search.c (display_search_results): use new selection
10846
* htmlcursor.c (forward): use html_object_next_leaf_not_type
10847
instead of html_object_next_leaf
10848
(backward): likewise
10850
* htmlobject.c (html_object_next_not_slave): don't require
10852
(html_object_prev_not_slave): likewise
10853
(html_object_next_leaf_not_type): fixed, use rv when going forward
10854
(html_object_prev_leaf_not_type): likewise
10856
* htmlundo.c (do_action): removed warning
10858
* htmlengine.c (html_engine_normalize_cursor): use
10859
html_engine_edit_selection_updater_update_now
10861
* htmlcursor.c (normalize): use html_object_get_length
10862
(normalize): use html_object_prev_not_slave
10864
* htmlinterval.c (html_interval_new_from_cursor): take care of
10867
* htmlengine-edit-selection-updater.c: removed old_point from
10868
HTMLEngineEditSelectionUpdater, it's not needed anymore
10869
(updater_idle_callback): use new selection API
10871
* htmlselection.c (html_engine_set_active_selection): moved from
10873
(html_engine_activate_selection): renomed from html_engine_set_active_selection
10874
(html_engine_select_interval): use html_engine_activate_selection
10876
* htmlinterval.c (unselect_object): moved from htmlselection.c
10877
(html_interval_unselect): new function
10879
* htmlselection.c (html_engine_select_interval): new function
10880
(selection_helper): use html_engine_select_interval
10881
(html_engine_select_region): use html_engine_select_interval
10883
* htmlinterval.c (select_object): moved from htmlselection.c
10885
* htmlselection.c (html_engine_select_region): use html_interval_select
10887
* htmlinterval.c (html_interval_select): rewritten
10889
2000-11-21 Joe Shaw <joe@helixcode.com>
10891
* htmlengine.c (parse_i): Advance the token by only 3 spaces instead of
10892
8 for the "id" tag. This is a holdover from when it was called
10895
2000-11-21 Radek Doulik <rodo@helixcode.com>
10897
* htmlengine.c (clear_selection): new helper function
10898
(html_engine_destroy): use clear_selection
10899
(html_engine_begin): use clear_selection
10901
* gtkhtml.c (mouse_change_pos): added window parameter
10902
(on_object): likewise
10903
(scroll_update_mouse): updated
10904
(motion_notify_event): updated
10905
(enter_notify_event): updated
10907
* htmlselection.c (html_engine_unselect_all): use
10908
html_engine_get_top_html_engine
10910
* htmlengine.c (html_engine_get_top_html_engine): new helper
10911
function, returns engine from TOP html widget - the one without
10914
* htmliframe.c (append_selection_string): new method
10916
* gtkhtml.c (shift_to_iframe_parent): new helper function
10917
(motion_notify_event): use shift_to_iframe_parent
10918
(button_press_event): shift_to_iframe_parent
10919
(button_release_event): shift_to_iframe_parent
10921
* Makefile.am (libgtkhtml_HEADERS): added gtkhtml-enums.h and
10922
gtkhtml-types.h to libgtkhtml_HEADERS
10924
* htmlinterval.c (do_downtree_lines_intersection): follow engine
10927
2000-11-20 Radek Doulik <rodo@helixcode.com>
10929
* htmliframe.c (is_container): iframe is container
10930
(draw_background): empty method
10932
* htmldrawqueue.c (draw_obj): take care of iframes
10934
* htmliframe.c (html_iframe_init): set clue parent to iframe
10936
2000-11-19 Radek Doulik <rodo@helixcode.com>
10938
* htmliframe.c (get_engine): new method
10940
* htmlinterval.c (html_interval_forall): use html_object_get_engine
10942
* htmlobject.c (get_engine): new virtual method
10943
(html_object_get_engine): new function
10945
* htmliframe.c (head): new method
10948
2000-11-16 Radek Doulik <rodo@helixcode.com>
10950
* htmlobject.c (next): changed to return child->next
10953
* htmlclue.c: removed next, prev methods
10955
* htmlobject.c (html_object_next_not_slave): use html_object_next
10957
* htmlenums.[ch]: renamed from htmlenum
10959
* htmltypes.h: new file, I've moved some type definitions here to
10960
avoid annoying circular dependency problems, more types to store
10963
2000-11-15 Radek Doulik <rodo@helixcode.com>
10965
* htmlengine.c (html_engine_init): set selection to NULL
10967
* replaced engine->active_selection with
10968
html_engine_is_selection_active (engine) call everywhere
10970
* htmlengine.h: removed active_selection from Engine
10972
* htmlselection.c (html_engine_is_selection_active): new function,
10973
replaces engine->active_selection
10975
* htmlengine.h: added selection interval to engine
10977
* htmlobject.c (html_object_next_leaf_not_type): new function,
10978
does next leaf as long as leaf type is t
10979
(html_object_prev_leaf_not_type): likewise
10981
* htmlinterval.c (html_interval_select): use
10982
html_object_next_leaf_not_type instead of
10983
html_object_next_not_slave
10985
* htmlselection.[ch]: new files, contain selection stuff moved
10986
from htmlengine.[ch]
10988
* htmlobject.c (html_object_forall): added engine parameter +
10991
* htmltable.c (check_row_split): new helper function
10992
(check_page_split): try to split row so long as all cells are
10995
2000-11-14 Radek Doulik <rodo@helixcode.com>
10997
* htmltable.c (check_page_split): new method
10998
(html_table_class_init): use check_page_split
11000
* htmlclue.c (check_page_split): don't move y to relative
11001
coordinates as it's already in them
11003
* htmltable.c (forall): simplified cell condition
11005
* htmlprinter.c (html_printer_new): don't save context here
11007
2000-11-13 Radek Doulik <rodo@helixcode.com>
11009
* gtkhtml-properties.c: added new commands
11011
* gtkhtml.c (command): implemented new commands
11013
* gtkhtml.h: added new command cursor-forward/backward
11015
* htmlengine.c (parse_s): better <s>, </s> recognizing
11017
* htmltable.c (calc_col_info): add border size to minimal size
11019
2000-11-12 Larry Ewing <lewing@helixcode.com>
11021
* htmlengine.c (parse_s): make sure we close the s tag.
11023
2000-11-11 Larry Ewing <lewing@helixcode.com>
11025
* htmlimage.c (copy): make sure we copy the percent parameters as
11026
well or bad things happen.
11028
2000-11-10 Radek Doulik <rodo@helixcode.com>
11030
* htmlengine.c (parse_s): added <S></S><STRIKE></STRIKE> tags
11033
* Makefile.am (libgtkhtml_la_SOURCES): added htmlenum.[ch]
11035
* htmlimageinput.c (html_imageinput_init): updated to use
11038
* htmlengine-edit-images.c (html_engine_insert_image): updated to
11041
* htmlengine.c (parse_i): updated to use percentage
11043
* htmlimage.c (save): added ALIGN attribute
11044
(save): added ALT attribute
11045
(html_image_init): use percentage
11046
(html_image_set_size): changed to use new percentage
11048
* htmlenum.c (html_valign_name): get vertical align value name
11049
(html_halign_name): likewise
11051
* htmlenum.[ch]: new files, for html enum utils
11053
* htmlimage.c (get_actual_width): use html_engine_get_view_width
11055
(get_actual_height): likewise
11056
(save): updated to percenatage, also save width instead of height
11058
* htmlengine.c (html_engine_get_view_width): new helper function
11059
(html_engine_get_view_height): likewise
11061
* htmlimage.h: added percent_width/height to HTMLImage
11063
* htmlengine.c (html_engine_add_object_with_id): change type of
11064
old_key to gpointer to avoid compiler warning
11066
* htmltext.c: removed unused code
11068
2000-11-10 Vladimir Vukicevic <vladimir@helixcode.com>
11070
* gtkhtml.c, gtkhtml.h (gtk_html_get_object_by_id): Added
11071
more generic version of imageid hack; got rid of get_image_by_
11074
* htmlengine.c, htmlengine.h: Added
11075
html_engine_add_object_with_id and html_engine_get_object_by_id,
11076
for associating objects with ids. Added id= tag, but only to
11077
images. Removed imageid tag. Changed parse_i to use
11078
add_object for images.
11080
2000-11-10 Radek Doulik <rodo@helixcode.com>
11082
* htmltextslave.c (get_ys): helper function, calculates y shift
11083
for sub/super script
11084
(draw_spell_errors): use get_ys
11085
(draw_normal): likewise
11086
(draw_highlighted): likewise
11088
* gtkhtmlfontstyle.c (gtk_html_font_style_merge): check for
11089
DEFAULT style and replace it with SIZE_3
11091
2000-11-09 Radek Doulik <rodo@helixcode.com>
11093
* gtkhtmlfontstyle.h: added GTK_HTML_FONT_STYLE_SUBSCRIPT and
11094
GTK_HTML_FONT_STYLE_SUPERSCRIPT
11096
* htmlengine.c: added ID_SUB, ID_SUP
11097
(parse_s): added <sub> and <sup> tags
11099
* htmlentity.c: added all entities from XHTML 1.0
11101
* htmltokenizer.c (in_entity): removed old code which doesn't make
11102
sense to me, let me know if you are aware of idea of this code
11103
(in_entity): check for searchCount > 9 (ϑ)
11105
* htmlentity.c: removed old code
11107
2000-11-08 Larry Ewing <lewing@helixcode.com>
11109
* htmltable.c (save_plain): add simple test/plain save method.
11110
(html_table_class_init): use save_plain.
11111
(save): use the result of the calls to html_object_save.
11113
* htmlimage.c (save_plain): only try to output the alt text if it
11116
2000-11-08 Radek Doulik <rodo@helixcode.com>
11118
* htmlcolorset.c (SET_GCOLOR): set color only if it's unchanged
11120
* htmltablecell.c (save): likewise
11122
* htmltable.c (save): added simple save method
11124
2000-11-07 Larry Ewing <lewing@helixcode.com>
11126
* htmlrule.c (html_rule_class_init): use save_plain.
11127
(save_plain): add a simple rule to the text/plain output.
11129
* htmlclueflow.c (save_plain): use format string.
11131
* htmlengine-save.c (write_header): use a format string rather
11132
than passing the body directly.
11133
(html_engine_save_buffer_receiver): fix argument type.
11135
* htmlclueflow.c (string_append_nonbsp): make sure we count the
11136
extra bytes we lose when converting nbsp to a space.
11137
(save_plain): make sure we deal with byte length and character
11138
length where appropriate.
11140
2000-11-07 Radek Doulik <rodo@helixcode.com>
11142
* htmltextslave.c (could_remove_leading_space): new helper
11144
(fit_line): use could_remove_leading_space
11145
(could_remove_leading_space): don't remove on begin of para
11147
* htmlengine.c (insert_text): eat space on beggining of link
11149
* htmlgdkpainter.c (calc_text_width): *sigh*, *sigh*, *sigh*,
11150
replaced painter->text_style with style, this solves random
11151
bad/good layout problem
11153
2000-11-06 Larry Ewing <lewing@helixcode.com>
11155
* htmlclueflow.c (save_plain): disable broken condition checks.
11157
2000-11-04 Larry Ewing <lewing@helixcode.com>
11159
* htmltext.c (save_plain): remove call to encode_text_to_8bit
11160
because this actually breaks the mailer which now assumes it is
11161
getting text/plain in utf-8 not an 8bit character set. Also stop
11162
stipping the nbsp here since we can use it in the wrapping code in
11165
* htmlclueflow.c (save_plain): test for nbsp properly here, and
11166
convert use append_nonbsp to spaces.
11167
(string_append_nonbsp): convert utf-8 nbsp sequence to spaces so
11168
that we put make things less difficult for other mailers.
11170
* htmlengine.c (parse_i): parse the alt attribute when parsing the
11173
* htmlimage.c (copy): copy alt contents.
11174
(html_image_set_alt): set the contents of the alt member.
11175
(html_image_init): initialize alt to NULL;
11177
* htmlimage.h: add html_image_set_alt.
11179
2000-11-04 Radek Doulik <rodo@helixcode.com>
11181
* htmlimage.c (html_image_resolve_image_url): rename from
11182
resolve_image_url, make it public
11184
* htmlengine-save.c (get_body): use html_image_resolve_image_url
11186
2000-11-03 Radek Doulik <rodo@helixcode.com>
11188
* htmlimage.c (resolve_image_url): new function, resolves image
11189
URL using GTK_HTML_EDITOR_EVENT_IMAGE_URL
11190
(save): use resolve_image_url
11192
2000-11-02 Radek Doulik <rodo@helixcode.com>
11194
* gtkhtml.h (struct _GtkHTMLEditorAPI): add return value for event
11195
(_GtkHTMLEditorEventType): added IMAGE_URL editor event
11197
2000-11-03 Dan Winship <danw@helixcode.com>
11199
* htmlobject.c (destroy): Free self->object_data before freeing
11202
2000-11-03 Larry Ewing <lewing@helixcode.com>
11204
* htmliframe.c (html_iframe_init): remove out of date comment.
11205
(iframe_size_changed): correct type of the first arg in the
11206
function prototype.
11208
* htmlobject.c (copy): init the datalist before we start copying
11209
the items into it. This was cause lots of segfaults in the
11212
2000-11-02 Radek Doulik <rodo@helixcode.com>
11214
* htmltokenizer.c (prepare_enough_space): raise reserve in buffer
11217
2000-11-01 Radek Doulik <rodo@helixcode.com>
11219
* gtkhtml.c (load_bindings_from_file): use g_file_test instead of
11222
* htmltable.c (destroy): fixed cell skipping contidion
11224
* htmlengine.c (parse_table): ignore nowrap if width is set
11226
* htmltokenizer.c (html_tokenizer_begin): don't alloc buffer
11227
(html_tokenizer_end): ser t->size to 0
11228
(prepare_enough_space): grow t->size by 1/4*t->size + 5
11229
(TOKEN_BUFFER_SIZE): changed initial token buffer size to 1 << 10
11231
2000-10-31 Radek Doulik <rodo@helixcode.com>
11233
* gtkhtml.c: likewise
11235
* gtkhtml-im.c: replaced GTKHTML_USE_XIM with GTK_HTML_USE_XIM
11237
* gtkhtml.c (gtk_html_editor_command): do editor command
11238
(gtk_html_editor_event_command): new function, "emits"
11240
(get_value_nick): helper function
11241
(load_keybindings): added KP_Enter
11242
(key_press_event): use event->string if e_utf8_from_gtk_event_key
11243
doesn't handle that, also use it only if length == 1 and string
11244
[0] < 0x80 as we don't want illegal UTF-8 sequences
11246
* htmltext.c (spell_error_destroy): commented out g_free
11248
* htmlengine-edit-fontstyle.c: removed old unused code, this
11249
avoids warnings and this code still remain in older versions in
11252
* htmlengine-edit-delete.c (html_engine_delete): use
11253
html_clueflow_new_from_flow
11255
* htmlengine-edit-insert.c (insert_para): use
11256
html_clueflow_new_from_flow
11258
* htmlclueflow.c (html_clueflow_new_from_flow): new function,
11259
creates new clueflow with same attributes (style, level,
11261
(html_clueflow_split): use html_clueflow_new_from_flow
11263
* htmlobject.c (html_object_copy_data_from_object): new function,
11264
copies data references from src object to dest one
11266
* gtkhtml.c (command): new command implemented
11268
* gtkhtml.h: added command indent-zero
11270
* gtkhtml.c (gtk_html_set_indent): renamed from gtk_html_indent
11271
(gtk_html_modify_indent_by_delta): new function
11273
* htmlclueflow.c (html_clueflow_modify_indentation_by_delta):
11274
renamed from old html_clueflow_indent
11276
* keybindingsrc.emacs: likewise
11278
* keybindingsrc.ms: changed to use ...-toggle
11280
* gtkhtml.h: renamed toggle bold/italic/underline/strikeout
11281
commands, added on/off bold/italic/underline/strikeout commands
11283
2000-10-30 Radek Doulik <rodo@helixcode.com>
11285
* htmlengine-edit.c (html_engine_set_data_by_type): new function,
11286
sets data to objects with given type
11288
* htmlobject.c (html_object_set_data): new function for setting
11290
(html_object_get_data): new function for accessing object data
11292
* htmlobject.h: added object_data
11294
* htmltype.c: added hash table type name --> type
11295
(build_type_names_table): helper function for initial build of
11296
type_names hash table
11297
(html_type_from_name): new function, translates type name to type
11298
using type_names table
11300
2000-10-29 Radek Doulik <rodo@helixcode.com>
11302
* htmlengine-edit-insert.c (insert_para): emit editor event with
11303
INSERT_PARAGRAPH command
11305
* gtkhtml.c (gtk_html_editor_event_command): new function
11307
* gtkhtml.h (struct _GtkHTMLEditorAPI): added event to EditorAPI
11309
2000-10-26 Michael Meeks <michael@helixcode.com>
11311
* htmlprinter.c (alloc_font): signdness fix.
11313
* htmlengine-edit-text.c (upper_lower): ditto.
11315
* htmlengine-edit-text.c (find_first): ditto.
11317
2000-10-26 Radek Doulik <rodo@helixcode.com>
11319
* htmlengine.c (parse_body): call insert_text also for spaces
11321
* htmlfontmanager.c (alloc_new_font): g_strdup key while inserting
11323
(destroy_font_set_foreach): g_free key while removing from hash
11326
* gtkhtml-private.h: include config.h
11328
* gtkhtml-im.c: include config.h
11330
* htmlrule.c (fit_line): new virtual method implementation
11331
(draw): updated for new sizing
11332
(calc_size): likewise
11333
(html_rule_class_init): set fit_line
11335
2000-10-25 Radek Doulik <rodo@helixcode.com>
11337
* htmltokenizer.c: changed pre to gint to imitate stacked
11338
behaviour of parser
11339
(end_tag): updated for stacked pre
11341
* htmlengine.c (parse_b): added </br> with the same meaning as
11342
<br> to render broken pages
11344
* gtkhtml-properties.c: added GTK_HTML_COMMAND_INSERT_RULE
11346
* keybindingsrc.emacs: added popup-menu, property-dialog,
11349
* keybindingsrc.ms: added popup-menu, property-dialog
11351
* gtkhtml.c (command): implemented insert-rule
11353
* keybindingsrc.ms: added insert-rule
11355
* htmlclueflow.c (html_clueflow_spell_check): likewise
11357
* gtkhtml.c (command): use editor_data instead of spell_data
11359
* htmlclueflow.c (html_clueflow_spell_check): likewise
11361
* gtkhtml.c (init): likewise
11362
(command): likewise
11364
* htmlengine.c (html_engine_spell_check): use editor_api
11366
* gtkhtml.c (gtk_html_set_editor_api): updated to set EditorAPI
11368
* gtkhtml.h (struct _GtkHTMLEditorAPI): extend EditSpellAPI to
11371
* gtkhtml-properties.c: added new commands
11373
* gtkhtml.h: added new editor commands for popup menu and property
11376
2000-10-24 Radek Doulik <rodo@helixcode.com>
11378
* htmlengine-save.c (get_body): added background attribute
11380
2000-10-23 Radek Doulik <rodo@helixcode.com>
11382
* htmlengine.c (parse_d): set divAlign to left before parsing
11384
(parse_p): likewise
11386
* htmlengine-edit.h: publicate in scope of gtkhtml sources some
11387
useful functions for translating between types
11389
* htmlengine-save.c (html_engine_save_get_paragraph_style): new
11391
(html_engine_save_get_paragraph_align): likewise
11393
* htmlclueflow.c (save): fixed typo
11395
* gtkhtml.h: gtk_html_load_from_string const safe
11397
* htmlengine.c (parse_one_token): commented out warning
11399
* gtkhtml.c (cursor_move): not abort with bad params, only warn
11400
(move_selection): likewise
11402
(gtk_marshal_NONE__INT_INT_FLOAT): added new marshaler
11404
2000-10-20 Radek Doulik <rodo@helixcode.com>
11406
* htmlengine-save.c (html_engine_save_get_sample_body): new
11407
function, used by component for sample views
11408
(get_body): helper function extracted from write_header
11409
(write_header): use get_body
11411
* htmlengine-edit-insert.c (html_engine_insert): try to make magic
11412
links also after '>', ')' - this could simplify of mail adresses,
11413
for example Ape <primate@helixcode.com> should do the right thing
11416
* htmlengine-edit.c (html_is_in_word): changed back from isalnum
11419
2000-10-19 Radek Doulik <rodo@helixcode.com>
11421
* htmltable.c (bin_search_eq_or_lower_index): fixed to not access
11424
* gtkhtml-input.c (focus_out): add focus_out signal handler for
11426
(set_html_focus): new helper function to set focus back to html
11428
(gtk_html_input_line_deactivate): don't set focus to html widget,
11429
leave that on set_html_focus
11430
(key_press_event): use set_html_focus
11431
(focus_out): call set_html_focus in idle callback (otherwise focus
11434
2000-10-18 Radek Doulik <rodo@helixcode.com>
11436
* keybindingsrc.ms: like for emacs
11438
* keybindingsrc.emacs: changed indentation bindings
11440
* gtkhtml.c (command): reset html->binding_handled to TRUE in
11443
* htmlclueflow.c (save_plain): add \n for empty paragraphs
11445
* keybindingsrc.emacs: removed C-left, C-right as they are already
11446
in standard bindings
11448
* gtkhtml.c (load_keybindings): removed M-f, M-b from default
11451
2000-10-17 Radek Doulik <rodo@helixcode.com>
11453
* htmlengine-edit-fontstyle.c (object_set_font_style): changed
11454
order or bit operations, first do OR and then AND
11455
(html_engine_set_font_style): likewise
11457
* gtkhtml.c (gtk_html_load_from_string): new helper function, does
11458
begin, write, end to simplify short/easy html doc loading
11460
* htmltokenizer.c (in_plain): declare as inline
11462
* htmltable.c (get_bounds): extract method
11463
(check_point): optimize
11465
* htmlentity.c (html_entity_parse): kill warning
11467
* htmliframe.c (iframe_object_requested): set ret_val only once
11469
* htmlengine.c (parse_object): don't discard body if we get object
11470
requested and discard it otherwise
11472
2000-10-16 Radek Doulik <rodo@helixcode.com>
11474
* gtkhtml-embedded.c (gtk_html_embedded_set_parameter): check for
11475
already set parameters and don't leak memory
11477
* htmlengine-save.c (encode_entities): update to non-utf8 texts,
11478
save all 8bit range instead of encoding it as #-1; it's wrong
11479
here, but it may work at least with iso-latin-1 I hope,
11480
new painter should replace it soon
11481
(write_header): set charset to UTF-8
11482
(encode_entities): reverted last change
11484
2000-10-15 Radek Doulik <rodo@helixcode.com>
11486
* htmltext.c (save_plain): cut down text from utf8 to 8bit before
11487
plain saving (this fixes anoying A^ for now, should be replaced
11488
later by text painter)
11490
* htmlclueflow.c (save_plain): replaced '\240' with ENTITY_NBSP to
11491
avoid compiler warnings and kill always true compares
11492
(save_plain): don't use unicode functions here, as text is not in
11495
2000-10-13 Lauris Kaplinski <lauris@helixcode.com>
11497
* htmltokenizer.c: Renamed g_unichar_to_utf8 to html_unichar_to_utf8
11499
2000-10-13 Radek Doulik <rodo@helixcode.com>
11501
* htmlengine-edit-rule.c (html_rule_set): new function for setting
11504
2000-10-12 Larry Ewing <lewing@helixcode.com>
11506
* htmlclueflow.c (save_plain): wrap the text contained within the
11508
(plain_padding): helper function to determine line padding
11509
(string_append_len): helper funtion to encode write lengths of
11512
* htmlclue.c (save_plain): add arg.
11514
* htmltext.c (save_plain): add arg.
11516
* htmlobject.h: add width args to save_plain functions.
11518
* htmlobject.c (save_plain): add requested_width arg.
11519
(html_object_save_plain): add arg.
11521
* htmlengine-save.h: add prototype for save buffer functions.
11523
* htmlengine-save.c: added functions to create a save buffer to
11524
hold text before wrapping.
11526
2000-10-12 Radek Doulik <rodo@helixcode.com>
11528
* htmlrule.c (copy): copy also length and size
11530
2000-10-11 Radek Doulik <rodo@helixcode.com>
11532
* Makefile.am (CFLAGS): removed pspell flags
11533
(testgtkhtml_LDADD): removed pspell libs
11535
2000-10-11 Larry Ewing <lewing@helixcode.com>
11537
* htmlengine-edit-selection-updater.c (extend_selection): handle
11538
the NULL obj here as well.
11540
2000-10-10 Larry Ewing <lewing@helixcode.com>
11542
* htmlengine-edit-selection-updater.c (extend_selection): make
11543
sure tht we deal gracefully when next/prev leaf is NULL.
11545
* htmlobject.c (destroy): add code to poison destroyed memory.
11547
2000-10-10 Radek Doulik <rodo@helixcode.com>
11549
* new spell checking API GtkHTMLEditSpellAPI, it's here as I don't
11550
want to make libgtkhtml depend on Bonobo, just editor component
11551
which will use this API
11553
* removed pspell checking #ifdef's
11555
* gtkhtml-private.h: like below
11557
* gtkhtml.c (set_fonts_idle): test for GTKHTML_HAVE_GCONF instead
11558
of PSPELL which was mistaken
11559
(set_fonts): likewise
11561
* htmltable.c (expand_columns): use g_renew
11562
(expand_rows): likewise
11563
(inc_rows): expand rows by .25*allocRows instead of +10
11565
2000-10-09 Larry Ewing <lewing@helixcode.com>
11567
* htmltext.c (convert_nbsp): initialize rv and rp to NULL.
11569
* htmlfontmanager.c (alloc_new_font): initialize font to NULL.
11571
* gtkhtml.c: update to use priv structure.
11572
(destroy): free priv structure.
11573
(init): allocate the priv structure.
11574
(class_init): always initialize the spell suggestion signal.
11576
* gtkhtml.h: Move several of the gtkhtml public structure entries
11577
to a private structure. Always include the spell_suggestion
11578
request signal so that our class structure does not change size.
11579
Also always define all the entries in the Command type enum so
11580
that values do not change based on the inclusion of spelling
11583
* gtkhtml-im.c: use html->priv for the gdk input method
11586
* gtkhtml-private.h: add structure definition for GtkHTMLPrivate
11589
2000-10-06 Radek Doulik <rodo@helixcode.com>
11591
* gtkhtml.c (BSCROLL): use GTK_TYPE_SCROLL_TYPE instead of
11594
* htmlembedded.c (calc_min_width): calc it only if widget is
11595
already realized, use allocation
11596
(calc_size): likewise
11598
* gtkhtml.c (size_allocate): call calc_size only when clue
11599
min_width is less than available width
11601
* htmltable.c (draw): optimized drawing, hopefully call draw
11602
method only on cells in drawed area, use bin_search_eq_or_lower_index
11603
(bin_search_eq_or_lower_index): helper function
11605
* htmltokenizer.c (prepare_enough_space): inc tokenizer buffer in
11606
bigger steps + use realloc
11608
2000-10-04 Radek Doulik <rodo@helixcode.com>
11610
* gtkhtml.c (set_editor_keybindings): new helper function
11611
(gtk_html_set_editable): use set_editor_keybindings
11612
(load_bindings_from_file): new extracted function
11613
(load_keybindings): use load_bindings_from_file
11615
* gtkhtml.h: add editor_bindings to GtkHTML
11617
* gtkhtml.c (command): new commands implementation
11619
* gtkhtml.h: new commands - focus-forward/backward
11621
* gtkhtml.c (focus): container signal handler
11622
(class_init): add focus
11624
2000-10-03 Radek Doulik <rodo@helixcode.com>
11626
* htmlengine.c (html_engine_update_event): do cursor home only
11627
when newPage is TRUE
11629
* htmltext.c (insert_text): set changes also to parent clue
11631
* gtkhtml.c (gtk_html_set_paragraph_style): call queue_draw to
11632
make cursor visible
11634
* htmlclueflow.c (html_clueflow_set_style): schedule update
11635
(relayout): new method, if min_width > max_width do
11636
engine_calc_size and draw
11638
2000-10-02 Radek Doulik <rodo@helixcode.com>
11640
* kill some warnings
11642
* htmltable.c (prev_col_do_cspan): alloc cells before doing
11645
* htmltokenizer.c (in_plain): use g_unichar_to_utf8
11647
* htmltable.c (scale_columns): use cell->col
11648
(calc_column_widths): likewise
11649
(calc_row_heights): use cell->row
11650
(calc_size): use cell->col
11651
(draw): use cell->col and cell->row
11653
2000-09-29 Larry Ewing <lewing@helixcode.com>
11655
* gtkhtml.h: turn GTK_HTML_USE_XIM off for the time being.
11657
* gtkhtml-im.c: wrap contents in ifdef since the structures will
11660
2000-09-29 Larry Ewing <lewing@helixcode.com>
11662
* gtkhtml.c (style_set):
11667
(focus_out_event): add entry points for XIM handling. This is the
11668
first pass integrating the XIM patches from
11669
garetxe@euskalnet.net
11671
* gtkhtml.h: define GTK_HTML_USE_XIM until the configure check is
11674
* gtkhtml-im.c: file added
11676
* gtkhtml-im.h: file added
11678
2000-09-29 Radek Doulik <rodo@helixcode.com>
11680
* htmlengine-search.c (add_iframe_off): new helper function
11681
(move_to_found): updated to work with IFrames
11683
* gtkhtml-search.c (changed): call html_engine_search_incremental
11684
only for non "" texts
11686
* htmltable.c (html_table_end_table): don't cal lprev_col_do_cspan
11689
* htmliframe.c (search): fixes
11691
2000-09-29 Joe Shaw <joe@helixcode.com>
11693
* htmltable.c (do_rspan): Remove printf.
11694
(html_table_add_cell): call do_cspan after setting the cell so that
11695
column spanning works correctly.
11697
2000-09-29 Radek Doulik <rodo@helixcode.com>
11699
* htmltable.c (inc_columns): fix col calculation
11701
2000-09-28 Radek Doulik <rodo@helixcode.com>
11703
* gtkhtml-search.c (changed): update for
11704
html_engine_search_incremental changes
11706
* htmlengine-search.c (html_engine_search_incremental): updated,
11707
so it could be used without former call to html_engine_search,
11708
also added forward argument
11710
* htmltable.c (scale_columns): fixed condition, where r could be
11711
as high as table->totalRows, which was invalid
11712
refactored + fixed col/row span
11714
2000-09-27 Radek Doulik <rodo@helixcode.com>
11716
* htmltextslave.c (calc_size): updated to UTF8 (I've missed this
11717
one before, *sigh*)
11718
(fit_line): use html_text_get_text
11719
(fit_line): likewise
11720
(draw_spell_errors): likewise
11721
(draw_normal): likewise
11722
(html_text_slave_get_offset_for_pointer): likewise
11724
* gtkhtmldebug.c (gtk_html_debug_dump_object): new function
11725
(gtk_html_debug_dump_object): updated slave printing to UTF8
11727
* htmliframe.c (calc_min_width): don't call html_engine_calc_size
11728
as it is not needed
11730
* htmlengine.c: include htmlengine-search.h
11732
* htmltablecell.c (html_table_cell_class_init): removed
11733
set_max_width virtual method as it was the same as parent class
11736
* htmlcluev.c (do_layout): extracted get_lmargin
11737
(get_lmargin): new helper function
11739
* htmltable.c (html_table_add_cell): increase table->col by
11740
previous cell colspan
11742
* htmlclueflow.c (spell_check_word_mark): use interval length
11743
instead of text_len
11744
(html_clueflow_spell_check): likewise
11746
* htmltable.c (optimize_cell_width): fixed calculation of addSize
11747
(calc_size): fixed calculation of available_width
11748
this fixes annoying horizontal scrollbar appearance in evolution
11750
2000-09-26 Radek Doulik <rodo@helixcode.com>
11752
* gtkhtml-search.c (key_press): test e->search_info != NULL
11754
* htmlsearch.c (html_search_set_forward): added assert
11756
* gtkhtml.c (move_selection): set binding_handled = TRUE
11757
(command): binding_handled = FALSE
11758
(key_press_event): don't call parent key_press handler, as it
11759
calls bindings_activate, which we don't want to be called again
11761
* htmliframe.c (search): new virtual method implementation,
11762
forwards search down the iframe
11764
* htmlengine-search.c (display_search_results): unselect also for
11765
root engine (right now it's iframe parent's engine if iframe
11767
(get_root_engine): helper function
11769
* htmlengine-search.[ch]: new files, search stuff moved here from
11772
* htmltokenizer.c (html_tokenizer_write): refactored
11774
2000-09-21 Radek Doulik <rodo@helixcode.com>
11776
* htmlengine.c (html_engine_init): don't use gtk_object_unref in
11777
embedded stack - this should fix Joe's problem - I'll look closer
11780
* htmlimage.c: refcounting for image pointers
11782
2000-09-20 Radek Doulik <rodo@helixcode.com>
11784
* htmlengine.c: update timeouts replaced by idle callbacks
11785
(html_engine_begin): move factory cleanup + stop
11788
* htmltextmaster.c (html_text_master_magic_link): fixed for ' '
11791
* htmltext.c (convert_nbsp): reset state to 0 after first pass
11793
* htmltextmaster.c (html_text_master_magic_link): test mim
11796
* htmliframe.c (set_painter): remember gdk_painter
11797
(draw): draw only with non-gdk painters, also move widget to right
11800
* gtkhtml.c (focus_in_event): fixed iframes handling
11801
(button_press_event): fixed mouse wheel scrolling with iframes
11803
2000-09-19 Radek Doulik <rodo@helixcode.com>
11805
* htmlprinter.c (draw_text): updated to UTF8
11807
* gtkhtml.c (key_press_event): check for str != NULL
11809
* htmlgdkpainter.c (draw_text): use unicode_strlen
11812
* htmlengine-edit-insert.c (html_engine_insert): use unicode_strlen
11814
(do_insert): updated to utf8
11816
* htmlgdkpainter.c (draw_spell_error): fixed off/len calculation
11818
* htmlclueflow.c (spell_check_word_mark): use unicode_strlen
11821
2000-09-18 Radek Doulik <rodo@helixcode.com>
11823
* htmlgdkpainter.c: use e-font
11824
(get_font): look for unicode font first
11826
* gtkhtml.c (key_press_event): use e_utf8_from_gtk_event_key
11828
2000-09-15 Radek Doulik <rodo@helixcode.com>
11830
* gtkhtml.h: rename button_pressed flag to button1_pressed and use
11831
if for button 1 only
11833
* htmlembedded.c (destroy): remove widget from html widget
11835
2000-09-14 Dan Winship <danw@helixcode.com>
11837
* htmlembedded.c (destroy): Just hide the embedded widget rather
11838
than destroying it, to prevent it from being destroyed twice.
11840
2000-09-14 Radek Doulik <rodo@helixcode.com>
11842
* htmlengine-edit-movement.c (html_engine_forward_word): refactored
11843
(html_engine_backward_word): likewise
11845
* gtkhtml.c (load_keybindings): added M-left, M-b bindings for
11846
backward-word and likewise for forward-word
11848
* htmltable.c (set_cell): new helper function, sets cell in table
11850
(add_cell): refactored set_cells function, filling table with
11851
cells, which have cspan or rspan > 1 is delayed to
11852
html_table_end_table, also use set_cell
11853
(cell_fill): new helper function, fills cell in table (if cspan or
11855
(html_table_end_table): fill table with cells here
11856
(get_rc): not needed anymore
11857
(next): remove call to get_rc
11860
* htmltablecell.h: added position info to TableCell (col, row)
11862
* htmlengine-save.c (encode_entities): updated for utf8
11864
* htmlclueflow.c (spell_check_word_mark): index -> offset and not
11867
2000-9-13 Larry Ewing <lewing@helixcode.com>
11869
* htmliframe.c (iframe_object_requested): hook up the object
11872
2000-09-13 Radek Doulik <rodo@helixcode.com>
11874
* htmlengine.c (html_engine_set_arg): configure pspell to use utf8
11877
* htmltext.c: use unicode_offset_to_index and
11878
unicode_index_to_offset everywhere
11879
(convert_nbsp): updated to support utf8
11881
* htmlgdkpainter.c (utf8_gdk_text_width): last argument changed to
11882
len and bytes are calculated using unicode_offset_to_index
11883
(utf8_gdk_draw_text): likewise
11885
2000-09-12 Radek Doulik <rodo@helixcode.com>
11887
* htmltextslave.c (draw_spell_errors): use HTMLSpellErrorColor
11889
* htmlengine.c (html_engine_set_arg): moved spell initialization
11892
* htmlclueflow.c (html_clueflow_spell_check): do live spell
11893
checking only if enabled in properties
11895
* gtkhtml.c: added support for spell checking properties
11896
(init_properties_widget): new helper function
11898
* gtkhtml-properties.h: added spell properties
11900
* htmlcolorset.h (_HTMLColorId): added HTMLSpellErrorColor
11902
* htmltextslave.c (draw_spell_errors): use HTMLSpellErrorColor
11904
2000-09-08 Radek Doulik <rodo@helixcode.com>
11906
* testgtkhtml.c (print_preview_cb): add footer printing (- page number -)
11907
(print_footer): footer printing
11909
* htmltextslave.c (fit_line): add cast to make compiler happy
11911
* htmlprinter.c (do_rectangle): refactored, split to do_rectangle
11912
and prepare_rectangle
11913
(prepare_rectangle): new helper function, also do coordinates
11915
(set_clip_rectangle): implemented this method, also use
11918
* htmlobject.c (check_page_split): return 0 instead of y as we
11919
don't want include this object in upcoming page (it doesn't fit
11920
there - this is the reason it was called)
11922
* htmliframe.c (check_page_split): forward to Engine::clue
11924
* htmlclueflow.c (check_page_split): removed, no more needed
11926
* htmlclue.c (check_page_split): moved here from ClueV + updated
11928
* htmlprinter.c (html_printer_scale_to_gnome_print): exported this
11929
function for engine
11930
(html_printer_coordinates_to_gnome_print): likewise
11932
* htmlengine-print.c (html_engine_print_with_header_footer): likewise
11933
(print_header_footer): helper function for header/footer printing
11934
(print_page): use print_header_footer
11936
* gtkhtml.c (gtk_html_print_with_header_footer): new function,
11937
allows printing headers/footers
11939
* htmlfontmanager.c (alloc_new_font): pass face_list to
11940
html_font_set_new instead of *face which is already freed
11942
* htmlprinter.c: likewise
11944
* htmlpainter.c: likewise
11946
* htmlgdkpainter.c: update fort fontmanager changes
11948
* htmlpainter.h: add unref_font virtual method
11950
* htmlfontmanager.c: use ref/unref_font everywhere
11951
(html_font_manager_get_font): ref font if using default instead of
11954
* htmlfontmanager.h: add ref_font + unref_font to font manager
11956
2000-09-06 Lauris Kaplinski <lauris@helixcode.com>
11958
* htmlgdkpainter.c (utf8_gdk_text_width): translate 0xa0 -> 0x20
11959
(utf8_gdk_draw_text): Same
11961
2000-09-06 Radek Doulik <rodo@helixcode.com>
11963
* htmltextslave.c (fit_line): fixed eating condition once again
11965
* htmlgdkpainter.h: removed font_style from gdk_painter as it is
11968
* htmlgdkpainter.c (draw_text): use painter->font_style instead of
11969
gdk_painter->font_style
11971
* htmlfontmanager.c (alloc_new_font): create empty set if none of
11974
* htmltextslave.c (fit_line): dont eat beggining space on
11975
beginning of paragraph
11977
* htmlclueflow.c (html_clueflow_spell_check): don't check spell if
11980
* htmltokenizer.c (html_tokenizer_add_pending): don't insert 0xa0
11981
instead of space - no more needed and it was causing problems as
11982
0xa0 is not used for anymore
11984
* htmlgdkpainter.c (draw_spell_error): fix width calculation
11986
2000-09-05 Radek Doulik <rodo@helixcode.com>
11988
* gtkhtml.c (scroll): lower page increment by one "standard" line
11991
* htmlfontmanager.c (html_font_set_get_idx): dec size for index
11992
(html_font_set_get_idx): handle GTK_HTML_FONT_STYLE_DEFAULT case
11993
(get_font_size): tuned so that it works fine with 12pt default
11995
(get_real_font_size): renamed from get_font_size
11996
(get_font_num): new helper function
11997
(html_font_set_get_idx): use it
11998
(get_real_font_size): use it
11999
(html_font_set_font): test if new font isn't the same one
12001
* gtkhtmlfontstyle.h (GTK_HTML_FONT_STYLE_MAX_FONT): use ITALIC
12004
2000-09-04 Radek Doulik <rodo@helixcode.com>
12006
* htmltable.c (calc_column_widths): use pixel_size
12007
(calc_row_heights): use pixel_size
12009
* htmlcluev.c (do_layout): use pixel_size for padding
12011
* htmlengine-print.c (html_engine_print): use them
12013
* gtkhtml-properties.[ch]: add separate font family/sizes for
12016
2000-09-01 Radek Doulik <rodo@helixcode.com>
12018
* htmlfontmanager.[ch]: new fontmanager
12020
* htmlgdkpainter.c (utf8_gdk_text_width): move html_gdk_text_width
12021
here, as htmlgdkfontmanager.c is obsolete now
12022
(utf8_gdk_draw_text): likewise
12024
* htmlpainter.c (html_painter_set_font_style): make this method
12026
(html_painter_get_font_style): likewise
12027
(html_painter_set_font_face): likewise
12029
* gtkhtml.c (set_fonts_idle): use new font manager
12031
2000-08-31 Lauris Kaplinski <lauris@helixcode.com>
12033
* htmlgdkfontmanager.h:
12034
* htmlgdkfontmanager.c (html_gdk_text_width): Calculate UTF-8 text width
12035
(html_gdk_draw_text): Draw UTF-8 text
12037
* htmlgdkpainter.c (draw_spell_error): Use fontmanager text width
12038
(draw_text): Use fontmanager methods
12039
(calc_text_width): Same
12041
* htmltokenizer.c (html_tokenizer_write): Convert entityValue to UTF-8
12043
2000-08-31 Radek Doulik <rodo@helixcode.com>
12045
* htmlgdkfontmanager.c (font_face_exists): free list
12046
(html_gdk_font_manager_find_face): fixed walk thru families which
12047
has been broken by Lauris rewrite
12049
* htmliframe.c (draw): forwards draw to embeded widget
12050
(set_painter): sets painter to embeded widget's engine
12051
(forall): forward forall method
12052
(calc_size): don't use pixel_size here
12053
(html_iframe_class_init): set new virtual function implementations
12055
* htmlengine-print.c (html_engine_print): use
12056
html_engine_set_painter
12058
* htmlengine.c (html_engine_set_painter): new function, sets
12061
* htmlobject.c (set_painter): new virtual method
12062
(html_object_set_painter): new function, uses forall to call
12063
set_painter on all objects
12064
(set_painter_forall): helper function
12066
* gtkhtml-input.c (gtk_html_input_line_destroy): deactivate only
12067
if previosly activated, fixed unref of ebox instead of frame
12069
2000-08-30 Radek Doulik <rodo@helixcode.com>
12071
* testgtkhtml.c: added Simple tree dump to debug menu
12073
2000-08-29 Radek Doulik <rodo@helixcode.com>
12077
* htmltable.c (append_selection_string): new method
12078
(html_table_class_init): added append_selection_string
12080
* htmlclueflow.c (append_selection_string): call Clue super method
12083
* htmlclue.c (append_selection_string): added selection string
12084
getting method to Clue
12085
(html_clue_class_init): added append_selection_string
12087
* htmlengine.c (get_selection_forall_func): removed
12088
(html_engine_get_selection_string): instead of calling foreach, do
12089
traversing thru tree in Object methods
12091
2000-08-28 Ettore Perazzoli <ettore@helixcode.com>
12093
* gtkhtml-properties.c (DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE_S):
12094
New #defines. The default font size is now 12 points, instead of
12096
(gtk_html_class_properties_new): Use them.
12097
(gtk_html_class_properties_load): Use them.
12099
2000-08-28 Radek Doulik <rodo@helixcode.com>
12101
* htmlgdkfontmanager.c (html_gdk_font_manager_find_face): do
12102
return activities only on one place
12104
* htmlengine-edit.c (html_engine_selection_pop): switched cursor
12107
2000-08-27 Lauris Kaplinski <lauris@helixcode.com>
12109
* gtkhtml.c (set_fonts_idle): Use fontmanager method
12110
(set_fonts): #ifdef GTKHTML_HAVE_GCONF to kill warning
12112
* htmlengine.c (parse_font_face): Use painter method instead
12114
* htmlentity.h: Removed html_entity_prepare, as 0x160 is valid
12117
* htmlentity.c (html_entity_parse): Use hash table
12120
* htmlfont.c: Removed Gdk dependant parts (which were unused)
12122
* htmlfontface.h: Removed Gdk dependant members and al methods
12124
* htmlfontface.c: This is empty now, so will be removed
12126
* htmlgdkfontmanager.h: Added HTMLGdkFontFace structure
12127
(html_gdk_font_manager_find_face): Replacement
12128
(html_gdk_font_manager_set_fixed): Set fixed family + size
12129
(html_gdk_font_manager_set_variable): Set variable family + size
12131
* htmlgdkfontmanager.c: Moved htmlfontface stuff here to increase
12134
* htmlgdkpainter.c (calc_ascent): Use (HTMLGdkFontFace *) cast
12135
(calc_descent): Same
12136
(calc_text_width): Same
12137
(draw_text): Dont translate 0xa0 -> 0x20
12138
(find_font_face): New class method
12140
* htmlpainter.h (::find_font_face): New class method
12141
(html_painter_find_font_face): New accessor function
12142
* htmlpainter.c: Same
12144
2000-08-24 JP Rosevear <jpr@helixcode.com>
12146
* Makefile.am: Build testgtkhtml with glibwww2
12148
2000-08-24 Ettore Perazzoli <ettore@helixcode.com>
12150
* gtkhtml.c (motion_notify_event): Return FALSE if this is not the
12151
window we are interested in.
12152
(button_press_event): Don't add a GTK+ grab. Check the result of
12153
the grab. Use the right window. Don't set `owner_events'.
12155
2000-08-22 Radek Doulik <rodo@helixcode.com>
12157
* gtkhtml-properties.c (gtk_html_class_properties_new): defaults
12158
to 14pt and helvetica
12160
* gtkhtml.c (init_properties): load properties here for non-gconf
12163
* gtkhtml-properties.c (gtk_html_class_properties_load): changed
12164
gnome-config default font size to 14pt and var font to helvetica
12165
(gtk_html_class_properties_load): removed gnome_config_sync call
12167
* gtkhtml.c (on_object): renamed from on_url
12168
(on_object): reset html->pointer_url to NULL and mouse cursor to
12170
(enter_notify_event): new event handler, call mouse_change_pos
12173
* htmlengine.c (parse_body): don't insert " ", this fixes problem
12174
with linked images but maybe broke another cases? any complains?
12175
(parse_d): fix <div> case when on beggining of new flow (head ==
12176
NULL) set e->flow align to divAlign
12178
* htmlclueflow.c (calc_size): disabled width setting to rmargin -
12179
o->x (Larry could you pls check this?)
12181
* htmltext.c (html_text_init): don't call convert_nbsp here as we
12182
want not disappear from texts
12184
* htmlclueflow.c (calc_preferred_width): use
12185
html_object_next_not_slave instead of obj->next and
12186
html_object_prev_not_slave likewise
12188
2000-08-21 Mathieu Lacage <mathieu@eazel.com>
12190
* src/Makefile.am : add LIBADD variable so that ldd reports correct
12191
output on libgtkhtml.so
12193
2000-08-21 Radek Doulik <rodo@helixcode.com>
12195
* htmlclueflow.c (next_obj_and_clear): fixed for interval checking
12196
(spell_check_word_mark): likewise
12198
* htmltext.c (html_text_init): initialize face to NULL
12200
* gtkhtml.c (set_fonts_idle): use html_gdk_font_manager_set_size,
12201
so fonts scale nicely when changing size of variable width fonts
12203
(set_fonts_idle): get fixed face for fix and not variable
12205
* htmlgdkfontmanager.c (html_gdk_font_manager_set_size): new
12206
function, sets size to all non-default faces
12208
* htmlgdkfontmanager.[ch]: rewritten
12210
* htmlfontface.[ch]: new files
12212
* htmlengine.c (current_font_face): new helper function
12213
(push_font_face): likewise
12214
(pop_font_face): likewise
12215
(parse_font_face): likewise
12217
* gtkhtml.c (gtk_html_construct): moved set_fonts + gconf
12218
notification here, because engine is created
12219
(gtk_html_construct): call set_fonts_idle instead of set_fonts
12221
* htmlengine.c (html_engine_init): initialize clue to NULL
12223
2000-08-18 Larry Ewing <lewing@helixcode.com>
12225
* gtkhtml.c (set_fonts_idle): check to make sure we have an engine
12226
and a clue before we start operating on it. I'll look more
12227
carefully at this tomorrow, but I need to read mail now.
12229
2000-08-17 Radek Doulik <rodo@helixcode.com>
12231
* gtkhtml.c (init): add gconf notification
12233
* htmlgdkfontmanager.c (html_gdk_font_manager_set_family_var): new
12235
(html_gdk_font_manager_set_family_fix): new helper function
12236
(html_gdk_font_manager_set_size_var): new helper function
12237
(html_gdk_font_manager_set_size_fix): new helper function
12238
(release_fonts): new helper function - releases loaded fonts
12239
(load_font): rewritten
12240
(get_closest_font): helper function, tries get closest font to
12241
required, if not found returns fixed font or g_assert's when fixed
12243
(get_font): helper function
12244
(test_font): helper function, uses XListFonts
12245
(get_size): helper function, gets font size from font name
12247
* htmlgdkfontmanager.h: added family_var, family_fix, size_var and
12248
size_fix attributes
12250
* gtkhtml.c (client_notify_class): class gconf notification
12251
(client_notify_widget): widgets notification, font attributes are
12253
(set_fonts): helper function for font setting
12254
(set_fonts_idle): idle cb for font setting
12256
* gtkhtml-properties.c (gtk_html_class_properties_new): set
12257
default values for font attributes
12258
(gtk_html_class_properties_load): updated
12259
(gtk_html_class_properties_update): updated
12260
(gtk_html_class_properties_save): updated
12262
* gtkhtml-properties.h: added new attributes for fonts settings
12264
2000-08-15 Radek Doulik <rodo@helixcode.com>
12266
* gtkhtml.c (button_press_event): do paste only in editable widget
12268
* htmlengine.c (html_engine_get_word): likewise
12269
(html_engine_word_is_valid): likewise
12270
(html_engine_replace_word_with): likewise
12272
* htmlengine-edit.c (html_engine_spell_check_range): likewise
12274
* htmlclueflow.c (html_clueflow_spell_check): use html_is_in_word
12277
2000-08-14 Radek Doulik <rodo@helixcode.com>
12279
* htmlengine.c (selection_helper): new helper function
12280
(html_engine_select_line): use selection_helper here
12281
(html_engine_select_word): likewise
12282
(word_interval): select word interval for selection_helper used in
12284
(line_interval): likewise
12286
* gtkhtml.c (gtk_html_select_word): respect allow_selection
12287
(gtk_html_select_line): likewise
12289
* htmlengine.c (html_engine_select_line): use html_interval_select
12291
* htmlinterval.c (html_interval_select): new function, selects
12292
interval into selection
12294
* htmlengine.c (html_engine_set_active_selection): new fuction,
12295
sets active_selection flag + gtk selection owner
12296
(html_engine_get_cursor): new function, returns cursor with actual
12297
position, works also for non-editable widget
12299
* gtkhtml.c (gtk_html_select_word): new function, selects word
12300
(gtk_html_select_line): new function, selects line
12301
(button_press_event): select word by 2xclick and line by 3xclick
12303
* htmlengine-edit.c (html_engine_select_word_editable): new
12304
function, same as below, but for editable widget
12305
(html_engine_select_line_editable): likewise
12307
* htmlengine.c (html_engine_select_word): new function, selects
12308
word after mouse 2xclick
12309
(html_engine_select_line): likewise for line
12311
* htmlobject.c (html_object_next_by_type): new helper function
12312
(html_object_prev_by_type): likewise
12314
* htmlengine.c (html_engine_select_region): removed queue_draw
12315
arg (it was always used as TRUE)
12316
(html_engine_unselect_all): likewise
12318
* htmlengine-edit-delete.c (html_engine_delete): use
12319
html_engine_spell_check_range here
12321
* htmltext.c (split_spell_errors): new helper function
12322
(split): use split_spell_errors here
12323
(html_text_spell_errors_add): use g_list_insert_sorted here as we
12324
could now add new errors in the middle of list instead of
12325
appending to the end
12327
2000-08-13 Radek Doulik <rodo@helixcode.com>
12329
* htmlengine-edit-insert.c (insert_para): use
12330
html_engine_spell_check_range here
12331
(insert_chars): refactored, return only on end of function,
12332
updated to use html_engine_spell_check_range here, do also
12333
html_engine_move_cursor instead of calling it in do_insert twice
12335
* htmlengine-edit.c (html_engine_spell_check_range): new function,
12336
does spell checking on range given by two cursors - cursors must
12337
be in same paragraph
12339
* htmlclueflow.c (html_clueflow_spell_check): updated to work on
12341
(spell_check_word_mark): likewise
12342
(next_obj_and_clear): likewise
12343
(get_text): likewise
12345
* htmlinterval.[ch]: new files for helper HTMLInterval API +
12348
* htmltext.c (move_spell_errors): new helper function, moves spell
12349
errors after offset by delta
12350
(remove_spell_errors): new helper function remove spell errors in
12351
length len after offset
12352
(insert_text): use move_spell_errors here
12353
(remove_text): use move_spell_errors and remove_spell_errors here
12354
(html_text_spell_errors_clear_interval): new function, clears
12355
spell errors in interval
12357
2000-08-11 Radek Doulik <rodo@helixcode.com>
12359
* htmlengine.c (html_engine_get_word): don't use engine cursor but
12362
* htmlclueflow.c (get_text): refactored
12363
(interval_get_start): new helper function, computes starting
12364
offset in obj relevant to interval
12365
(interval_get_len): new helper function, computes object len
12366
relevant to interval
12367
(get_text_len): extracted from get_text, simplified
12368
(get_text): uses get_text_len
12369
(next_obj): simplified, uses html_object_get_length now
12371
* htmltextslave.c (html_text_slave_class_init): added get_length
12373
(get_length): return 0 here
12375
2000-08-11 Larry Ewing <lewing@helixcode.com>
12377
* htmltextslave.c (html_text_slave_trail_space_width): removed
12378
this as it is no longer needed.
12380
* htmltextslave.h: remove html_text_slave_trail_space_width
12383
* htmlclueflow.c (calc_size): stop subracting the width of the
12384
trailing space of the total width of the cluflow. This is no
12385
longer needed and was causing artifacts.
12387
2000-08-10 Radek Doulik <rodo@helixcode.com>
12389
* gtkhtml.c (load_keybindings): disabled g_warning about missing
12392
* htmlclueflow.c (html_clueflow_spell_check): fixed resolving
12393
is_text by test if obj != NULL
12395
* htmltextmaster.c (get_cursor_base): fix slave condition for
12396
slave identification (replaced < with <=)
12398
2000-08-10 Larry Ewing <lewing@helixcode.com>
12400
* htmlengine.c (html_engine_unrealize): add an unrealize function
12401
to as a slightly reworked version of the patch that Kevin A Gibbs
12402
<kgibbs@stanford.edu> sent in to fix unrelization of the widget
12405
* htmlengine.h: add prototype.
12407
* gtkhtml.c (unrealize): call html_engine_unrealize.
12409
2000-08-05 Radek Doulik <rodo@helixcode.com>
12411
* htmltext.c (html_text_get_nb_width): handle "" case
12412
(html_text_get_nb_width): extracted forwarding of get_nb_width to
12413
(forward_get_nb_width): new helper function
12415
* htmltextslave.c (get_next_nb_width): fixed "" case
12417
* htmltext.c (calc_min_width): fixed "" case
12419
2000-08-04 Radek Doulik <rodo@helixcode.com>
12421
* htmlengine.c (insert_text): don't eat leading spaces in <PRE>
12424
* htmlprinter.c (draw_panel): scale border size to printer
12426
(begin): #ifdef'ed debugging rectangle
12428
* htmlengine-print.c (html_engine_print): use
12429
html_object_change_set_down here to force complete calcsize
12431
* htmlobject.c (html_object_change_set_down): new function, set
12432
changes to this object and all it's childern
12434
2000-08-03 Radek Doulik <rodo@helixcode.com>
12436
* htmlengine-edit.c (html_engine_cut_and_paste_begin): hide cursor
12438
(html_engine_cut_and_paste_end): show it here
12440
* gtkhtml.c (motion_notify_event): fixed editor cursor setting on
12443
* htmlprinter.c (draw_background): added quick color printing
12444
bacground, pixmaps + tiling to be implemented later
12446
* htmlengine-print.c (print_all_pages): fixed page printing loop
12448
* htmlprinter.c (finalize): don't showpage here as it was already
12450
(begin): set debug rounding line to dashed .5pt gray line
12452
* htmlengine-print.c (print_all_pages): force new_split_offset
12453
also when new_split_offset == split_offset
12455
2000-08-02 Radek Doulik <rodo@helixcode.com>
12457
* gtkhtml.c (on_url): added assert here
12458
(mouse_change_pos): call on_url only if obj != NULL
12459
(scroll_update_mouse): call mouse_change_pos only if widget
12462
* htmlclueflow.c (get_post_padding): removed previous uncorrect
12465
* htmltable.c (fit_line): override this virtual method as we do
12466
not want calc_size to be called here - it is expensive and
12469
* htmltextslave.c (fit_line): split only when len < posLen
12471
* gtkhtml.c (motion_notify_event): split
12472
(mouse_change_pos): new helper function, uses on_url
12473
(on_url): new helper function
12474
(scroll_update_mouse): new helper function
12475
(vertical_scroll_cb): call scroll_update_mouse, so mouse is
12476
updated when scrolling
12477
(horizontal_scroll_cb): likewise
12479
2000-08-01 Radek Doulik <rodo@helixcode.com>
12481
* htmlengine-edit-insert.c: same as below
12483
* htmltype.c: same as below
12485
* htmlengine.c: removed inclusion of htmllinktext.h
12487
* htmlobject.h: removed nb_width from htmlobject as it is not
12488
needed/used anymore
12490
* htmlclueflow.c (should_break): not needed anymore - removed
12491
(calc_size): first try of renice of this ugly function, we don't
12492
need is_pre anymore, some code extracted to helper function
12493
set_line_x, fixed first_run arg value for fit_line, fixed FIT_NONE
12496
* gtkhtmldebug.c (dump_object_simple): added dumping of TextSlave
12498
(gtk_html_debug_dump_object_type): added new function
12500
* Makefile.am: removed htmllinktext.[ch] from sources/headers
12502
* htmltype.c (html_types_init): removed LinkText type init
12504
* htmllinktext.[ch]: removed, they were not used anywhere
12506
* htmlobject.c (fit_line): do fitting here instead of simply
12507
returning FIT_COMPLETE
12509
* htmltextslave.c (debug_print): new helper function, move debug
12511
(fit_line): rewritten, should be exact now :)
12512
(split_at_newline): removed, no more needed
12513
(get_next_nb_width): new helper function
12514
(fit_line): do incremental calc_text_width here, so it's much
12517
* htmltext.c (calc_preferred_width): moved here from TextMaster
12518
(html_text_get_nb_width): helper function returns non-breakable
12519
text width on begin/end of this text
12520
(calc_min_width): moved from TextMaster + rewritten
12522
* htmlclueflow.c (calc_min_width): rewritten
12524
2000-07-31 Radek Doulik <rodo@helixcode.com>
12526
* gtkhtml.c (motion_notify_event): set ibeam cursor only when
12529
* htmlengine.c (parse_color): try to pad color string with 0 when
12531
(parse_table): do | on parse_color result so when color not
12532
successfuly parsed and we have table or row color, it remains set
12535
2000-07-28 Radek Doulik <rodo@helixcode.com>
12537
* htmlclueflow.c (get_post_padding): add post padding to items
12540
2000-07-28 Ettore Perazzoli <ettore@helixcode.com>
12542
* htmltext.c (get_tags): Use lowercase for tags.
12544
* htmlclueflow.c (get_tag): Use lowercase for tags.
12545
(write_pre_tags): Likewise.
12546
(get_tag_for_style): Likewise.
12547
(halign_to_string): Likewise.
12551
2000-07-28 Ettore Perazzoli <ettore@helixcode.com>
12553
* gtkhtml.c (button_press_event): Don't select the region if
12554
`allow_selection' is false.
12555
(motion_notify_event): Don't select anything if `allow_selection'
12558
2000-07-27 Joe Shaw <joe@helixcode.com>
12560
* src/htmltokenizer.c (html_tokenizer_write): Initialize the tokenizer
12561
if it hasn't been already.
12563
2000-07-27 Radek Doulik <rodo@helixcode.com>
12565
* htmlclueflow.c (spell_check_word): fixed bad condition in
12568
2000-07-26 Larry Ewing <lewing@helixcode.com>
12570
* htmlembedded.c (html_embedded_set_widget): call force_placement.
12571
(force_placement): The hack to force the widget to get size
12572
allocated lives here now.
12574
* htmliframe.c (html_iframe_init): remove the hack for allocation
12575
from here since it is now in htmlembedded.
12577
* htmlengine.c (html_engine_destroy): only destroy the spell
12578
checker if it was properly made.
12580
2000-07-26 Radek Doulik <rodo@helixcode.com>
12582
* htmlclueflow.c (html_clueflow_spell_check): as below
12584
* htmlengine.c (html_engine_spell_check): do spell checking only
12585
if spell_checker was successfuly created
12587
2000-07-24 Peter Williams <peterw@helixcode.com>
12589
* gtkhtml.c (setup_scroll_timeout): Use GDK_THREADS_LEAVE/ENTER
12590
around our direct call the scroll_timeout_cb so that we don't
12591
deadlock, as we're in a GDK event loop so the threads are locked
12594
2000-07-21 Radek Doulik <rodo@helixcode.com>
12596
* gtkhtml-properties.c (gtk_html_class_properties_load):
12597
implemented gnome_config properties loading
12598
(gtk_html_class_properties_save): and saving
12600
* htmlclueflow.c (next_obj): new helper function, skips to next
12601
non-slave object and updates offset and is_text flag
12602
(spell_check_word): simplified, use next_obj
12603
(html_clueflow_spell_check): fixed case, when after add to
12604
session/personal dictionary word is checked OK and is on the end
12605
of flow - before there were not cleared spell errors
12607
2000-07-20 Ramiro Estrugo <ramiro@eazel.com>
12609
* gtkhtml-properties.c:
12610
* gtkhtml.c: (class_init):
12611
* htmltext.c: (destroy):
12612
Protect more pspell dependent code with #ifdef GTKHTML_HAVE_PSPELL.
12614
2000-07-20 Radek Doulik <rodo@helixcode.com>
12616
* htmltext.c (copy_helper): copy spell_errors here
12617
(destroy): clear spell_errors here
12619
* htmlcursor.c (html_cursor_get_prev_char): new function, returns
12622
* gtkhtml.c: new signal spell_suggestion_request for spell checker
12623
suggestions handling
12625
* keybindingsrc.emacs: added bindings for new commands
12627
* keybindingsrc.ms: added bindings for new commands
12629
* gtkhtml-properties.c: added new commands
12631
* gtkhtml.h: added spell-suggest, spell-personal-add,
12632
spell-session-add commands
12634
* htmlengine.c (html_engine_get_word): new function, returns word
12636
(html_engine_word_is_valid): new function, returns FALSE if word
12637
at cursor is invalid by spell checker
12638
(html_engine_replace_word_with): new function, replaces word at
12639
cursor with new one
12641
2000-07-19 Radek Doulik <rodo@helixcode.com>
12643
* htmlcursor.c (html_cursor_get_current_char): use
12644
html_object_next_not_slave here
12646
2000-07-18 Radek Doulik <rodo@helixcode.com>
12648
* htmlengine-edit-paste.c (do_paste): use SPELL_CHECK
12650
* htmlengine-edit-insert.c (do_insert): use SPELL_CHECK
12652
* htmlengine-edit-delete.c (html_engine_delete): use SPELL_CHECK
12654
* htmlclueflow.h (SPELL_CHECK): new macro - spell checks clue flow
12656
2000-07-15 Radek Doulik <rodo@helixcode.com>
12658
* WIP: spell checking
12660
2000-07-15 Larry Ewing <lewing@helixcode.com>
12662
* htmldrawqueue.c (clear): draw the background properly.
12664
2000-07-14 Radek Doulik <rodo@helixcode.com>
12666
* htmliframe.c (html_iframe_init): set iframe parent
12668
* gtkhtml.c (gtk_html_set_iframe_parent): wrapper to set iframe
12670
(focus_in_event): if embedded in iframe, give focus to iframe
12672
(focus_out_event): updated, handle focus only when not iframe
12675
* gtkhtml.h: added iframe parent to GtkHTML
12677
* htmltextmaster.c (calc_min_width): fix <PRE> minimal width
12680
2000-07-12 Radek Doulik <rodo@helixcode.com>
12682
* gtkhtml-properties.c (gtk_html_class_properties_load): removed
12685
* htmlengine-save.c (encode_entities): added encoding
12687
* htmlengine.c (html_engine_select_region): changed selection
12688
behaviour, don't unselect when selection active and pointer moves
12690
+ select one offset length in object if pointer moves (try move
12691
pointer over image)
12693
* htmlimageinput.c: url and target could be NULL now, so images
12694
with NULL url don't act as links
12696
* htmlgdkpainter.c (draw_pixmap): save one div here
12698
2000-07-11 Radek Doulik <rodo@helixcode.com>
12700
* gtkhtml.c (gtk_html_set_font_style): emit
12701
INSERTION_FONT_STYLE_CHANGED signal
12702
(command): use gtk_html_set_font_style and
12703
gtk_html_toggle_font_style here
12705
* htmlengine-edit-fontstyle.c (html_engine_set_font_style): return
12706
TRUE if insertion_font_style changed
12708
2000-07-10 Radek Doulik <rodo@helixcode.com>
12710
* gtkhtml.c (load_keybindings): set binding_set to klass bindings
12711
set before setting standard bindings
12712
(load_keybindings): clear also klass bindings
12714
2000-07-10 Larry Ewing <lewing@helixcode.com>
12716
* htmlengine-edit-fontstyle.c: remove
12717
html_engine_set_font_style_old as it is no longer being used
12720
* htmlgdkpainter.c (draw_panel): clean up an an incorrect cast of
12723
2000-07-07 Radek Doulik <rodo@helixcode.com>
12725
* gtkhtml.c (init_properties): be more verbose about gconf errors
12726
(command): call copy only when selection is active
12727
(command): call paste only when cut_buffer != NULL
12729
* testgtkhtml.c (main): added gconf_init
12731
2000-07-06 Radek Doulik <rodo@helixcode.com>
12733
* gtkhtml.c: removed gtkhtmllib_init
12734
(init_properties): complain if gconf is not initialized (g_error)
12735
(init_properties): create gconf_client here
12737
2000-07-05 Radek Doulik <rodo@helixcode.com>
12739
* patch from LotR applied
12741
* htmlengine-edit-selection-updater.c (updater_idle_callback):
12742
disable selection if mark and cursor have the same position
12744
2000-07-05 Dan Winship <danw@helixcode.com>
12746
* htmllinktextmaster.c (save):
12747
* htmllinktext.c (save):
12748
* htmltext.c (save, save_plain): Fix calls to
12749
html_engine_save_output_string to be safe when the text contains
12752
2000-07-05 Radek Doulik <rodo@helixcode.com>
12754
* gtkhtml.c (load_keybindings): when keybindings file not found,
12755
bind default bindings anyway
12757
* htmlengine-edit-fontstyle.c (html_engine_set_font_style): I have
12758
problems with font style setting, so I have implemented quick
12759
replacement, which uses cut&paste
12761
* htmlengine-edit-delete.c (delete_different_parent): set pnext
12762
before removing p from parent
12764
* htmlengine-edit-paste.c (merge_possibly): remove empty text
12765
objects here, this fixes well known magic links bug
12766
(do_paste): try to merge for all pasted objects, this simplifies
12767
cut&paste commands (they do not need try to merge by itself)
12768
(prepare_clueflows): do split_first_clueflow_at_cursor also when
12771
* htmlengine-edit-insert.c (equal_insertion): fixed case when
12774
* htmlengine-edit-paste.c (split_first_clueflow_at_cursor):
12775
simplified, use only append_after (it will call prepend if needed)
12776
(prepend_object): likewise
12778
* htmlengine-edit-insert.c (insert_chars_different_style): don't
12779
split text when inserting on end of it (where offset == text_len)
12780
so we don't get empty link/textmasters any more
12781
(insert_chars_at_not_text): simplified, use only append_after (it
12782
will call prepend if needed)
12784
* htmlclue.c (html_clue_append_after): when where == NULL then
12785
call html_clue_prepend instead
12787
2000-07-04 Radek Doulik <rodo@helixcode.com>
12789
* htmlengine-edit-text.c (upper_lower): removed quick selection
12791
(html_engine_capitalize_word): also make tail of word lowercase
12792
instead of only uppercase first letter
12794
* htmlobject.c (select_range): mark object selected only when
12795
length > 0 or start < object length
12797
2000-07-03 Radek Doulik <rodo@helixcode.com>
12799
* htmlengine-edit-text.c (upper_lower): quick fix for bug in
12800
selection, going to fix selection now
12802
* gtkhtml.h: new commands enum entries
12804
* gtkhtml.c (command): call capitalize + up/downcase
12807
* keybindingsrc.ms: the same as in emacs, could someone point me
12808
to right MS bindings?
12810
* keybindingsrc.emacs: added new bindings M-c,M-u,M-l
12812
* htmlengine-edit-text.c: new file
12813
(html_engine_capitalize_word): capitalize word implementation
12814
(html_engine_upcase_downcase_word): up/downcase word implementation
12815
(find_first): helper function, finds 1st alphanum char in forward
12817
(upper_lower): helper function, converts text in cut_buffer to
12820
Sat Jul 01 11:50:30 2000 George Lebl <jirka@5z.com>
12822
* gtkhtml.[ch]: Add a gtkhtmllib_is_initialized call to find out if
12823
we have been initialized. Also don't initialize gconf if it has
12824
already been initialized.
12826
2000-07-01 Radek Doulik <rodo@helixcode.com>
12828
* keybindingsrc.ms: added new bindings for inc/dec font size
12830
* gtkhtml.c (command): added calls for inc/dec font size
12832
* htmlengine-edit-fontstyle.c (html_engine_font_size_inc_dec): new
12833
function implementing command for increase/decrease font size
12834
(inc_dec_size_cb): iterator function for inc/dec in cut&paste
12835
(inc_dec_size): helper function - computes increased/decreased
12838
* htmlengine-edit.c (html_engine_cut_and_paste): new function to
12839
simplify implementation of simple editor commands
12841
2000-06-30 Radek Doulik <rodo@helixcode.com>
12843
* htmlengine-edit-insert.c: added url, target to ActionData
12844
(do_redo): use url, target
12845
(create_action_data): likewise
12846
(decide_color): new function, helps to decide which color for
12848
(do_insert): use url, target
12849
(equal_insertion): new helper function, decides whether the text
12850
object has same attributes as insertion
12852
* htmlengine-edit-fontstyle.c (html_engine_get_document_target):
12853
fix, return html_object_get_target and not html_object_get_url
12855
* gtkhtml.c (button_press_event): shift + mouse press button
12856
extends/reduces selection
12858
* keybindingsrc.emacs: added shift movement selection also to
12859
emacs keybindings + C-Insert copy S-Insert paste and S-Delete cut
12861
* htmltext.c (get_tags): colors attribute saving
12863
2000-06-29 Larry Ewing <lewing@helixcode.com>
12865
* htmliframe.c (iframe_url_requested): remove "this is a note"
12866
warning for peterw's peace of mind.
12868
2000-06-29 Radek Doulik <rodo@helixcode.com>
12870
* htmlengine-edit-images.c (html_engine_insert_image): use
12873
* htmlcolor.c (html_color_new_from_gdk_color): make const safe
12875
* htmlengine.c (html_engine_destroy): destroy insertion_url/target
12877
* htmlengine.h: add insertion_urt/target
12879
* htmlengine-edit-fontstyle.c (html_engine_set_font_style): set
12880
insertion style only when no selection active
12882
2000-06-28 Larry Ewing <lewing@helixcode.com>
12884
* htmlimage.c (html_image_init): initialize some important
12885
variables properly.
12886
Remove the work around for animation sizes, gtkhtml now will
12887
require gdk-pixbuf 0.9 or later to funtion properly for animated
12890
2000-06-28 Radek Doulik <rodo@helixcode.com>
12892
* htmlengine.c (html_engine_unselect_all): reset shift_selection
12895
* keybindingsrc.ms: new bindings for new commands
12897
* htmlengine.h: added shift_selection flag to engine
12899
* gtkhtml.c (move_selection): new commands implementation
12901
* gtkhtml.h: added new commands for ms like shift selection
12903
* htmllinktextmaster.c (html_link_text_master_to_text): fixed
12906
2000-06-28 Larry Ewing <lewing@helixcode.com>
12908
* htmllinktextmaster.c (copy_helper): move the url and target
12910
(copy): call copy_helper.
12911
(extract_text): This was needed to properly support the cut
12912
buffer, otherwise we ended up with invalid url and target strings.
12913
(split): call copy_helper.
12914
(html_link_text_master_class_init): use our extract_text method.
12916
2000-06-28 Radek Doulik <rodo@helixcode.com>
12918
* gtkhtml-properties.c: likewise
12920
* gtkhtml-properties.h: likewise
12922
* gtkhtml.c: likewise
12924
* gtkhtml.h: make gconf usage optional
12926
2000-06-28 Larry Ewing <lewing@helixcode.com>
12928
* htmlengine-edit-delete.c (safe_remove): once again do not access
12929
the next member after you have destroyed the object.
12931
2000-06-27 Ettore Perazzoli <ettore@helixcode.com>
12933
* htmlclueflow.c (write_pre_tags): Renamed from
12934
`write_indentation_tags'. Write an initial `<BR>' if appropriate.
12935
(write_post_tags): New.
12936
(write_indentation_tags): Renamed from
12937
`write_indentation_tags_helper'. Write an initial newline if
12938
@last_value is different from @new_value.
12939
(save): Use it. Don't output the <BR> here.
12940
(append_selection_string): Removed bogus `putchar'.
12941
(write_indent): New.
12942
(write_indentation_tags): Use it.
12943
(save): Use it to write indentation spaces before the actual
12944
contents if the paragraph is not a PRE paragraph.
12946
2000-06-27 Radek Doulik <rodo@helixcode.com>
12948
* htmlengine.c (push_color): ref color when pushing on stack
12950
* htmlimage.c (copy): ref color only if non-NULL
12952
* htmlengine-save.c (write_header): implemented color attributes saving
12954
* near every .c[h] file updated to use HTMLColor
12956
* htmlcolorset.c: updated to use HTMLColor
12958
* htmlcolor.h: new API for colors handling
12960
2000-06-27 Larry Ewing <lewing@helixcode.com>
12962
* htmlclue.c (destroy): don't read the next member from an object
12963
after we have destroyed that object.
12965
2000-06-26 Ettore Perazzoli <ettore@helixcode.com>
12967
* htmlengine-edit-delete.c (html_engine_delete): Relayout the
12968
following paragraph too.
12970
2000-06-26 Radek Doulik <rodo@helixcode.com>
12972
* htmlengine-edit-fontstyle.c
12973
(html_engine_update_insertion_color): test for NULL new_color
12975
* gtkhtml.c (gtk_html_set_paragraph_alignment): renamed
12976
(gtk_html_get_paragraph_alignment): new wrapper function
12977
(gtk_html_get_paragraph_style): likewise
12979
2000-06-23 Radek Doulik <rodo@helixcode.com>
12981
* htmlengine-edit-fontstyle.c
12982
(html_engine_update_insertion_color): new function, used in
12984
(html_engine_get_color): new function, simply returns engine
12986
(html_engine_get_document_color): new function, returns color of
12987
text under cursor or in selection
12989
* gtkhtml.c: added signal insertion_color_changed
12990
(update_styles): emit insertion_color_changed signal when needed
12992
* htmlengine-edit-insert.c (html_engine_insert): use insertion color
12993
(create_action_data): remember color
12994
(do_redo): use remebered color
12995
(do_insert): use color
12996
(insert_chars): test also color equality along with style equality
12997
(insert_chars_at_not_text): use color
12998
(insert_chars_different_style): use color
12999
(insert_para): use insertion color
13001
* htmlengine.h: added insertion color to engine
13003
* htmlengine-edit.c (html_engine_cut_and_paste_begin): new
13004
function, initialization of cut&paste
13005
(html_engine_cut_and_paste_end): new function, finishes cut&paste
13007
* htmlengine-edit-fontstyle.c (html_engine_set_color): as below
13008
(html_engine_set_color): use new cut&paste functions
13010
* htmlengine-edit-insert.c (html_engine_insert_link): use push/pop
13012
(html_engine_remove_link): likewise
13014
* htmlengine-edit.c (html_engine_selection_push): new function to
13015
store current selection on stack
13016
(html_engine_selection_pop): new function to restore selection
13019
* htmlengine.h: added insertion color
13021
* htmlengine-edit-fontstyle.c
13022
(html_engine_get_document_font_style): new function, returns
13023
fontstyle from document (HTMLText or selection)
13024
(html_engine_get_font_style): new function, returns current font
13025
style (insertion style or if it is default then document font style)
13026
(html_engine_font_style_toggle): updated to use html_engine_get_font_style
13027
(html_engine_update_insertion_font_style): updated to use
13028
html_engine_get_document_font_style
13030
* gtkhtml.c (key_press_event): update styles only if cursor
13033
* keybindingsrc.ms: same as below
13035
* keybindingsrc.emacs: added new bindings (Alt 1..7 sets font sizes)
13037
* gtkhtml.c (command): new commands implementation
13039
* gtkhtml-properties.c: added new commands for size setting/increasing/decreasing
13041
2000-06-22 Larry Ewing <lewing@helixcode.com>
13043
* htmlclueflow.c (draw_background): draw our parent in the region
13044
we are drawing our background bacause we may be flowing around
13045
something. This "fixes" bug #6 but now the image drawing code
13046
needs to be written properly to only draw the region we actually
13047
request otherwise we will get odd effects on images with
13050
* htmlengine.c (html_engine_end): make sure we end the tokenizer
13051
before we update the engine, otherwise we do not parse trailing
13052
text because it is only appended after html_tokenizer_end is
13055
* htmliframe.c (html_iframe_init): inherit the colorset from the
13058
2000-06-21 Radek Doulik <rodo@helixcode.com>
13060
* htmlimage.c (html_image_init): make sure url/target is always !=
13063
* htmlengine-edit-insert.c (html_engine_remove_link_object): use
13064
html_object_get_length here
13066
* htmltext.c (get_length): new method, returns text_len
13067
(html_text_class_init): set get_length method
13069
* htmlobject.c (get_length): method for htmlobject, returns 1
13070
(html_object_get_length): new function, returns object length
13071
(html_object_class_init): set get_length
13073
* htmlobject.h: added new virtual method get_length
13075
* htmlengine-edit-insert.c (html_engine_remove_link): new
13076
function, removes link(s) from selection
13077
(html_engine_remove_link_object): new function, removes link from
13080
* htmlimage.c (remove_link): new function, clears url/target
13083
* htmllinktextmaster.c (remove_link): new function, returns text
13084
master with the same content/style
13085
(html_link_text_master_class_init): set remove_link method
13087
* htmlobject.c (html_object_remove_link): new function, returns
13088
linked object replacement, otherwise NULL
13090
* htmlobject.h: new virtual method remove_link
13092
* htmlengine-edit-insert.c (html_engine_insert_link): same as below
13094
* htmlengine-edit-paste.c (html_engine_paste_object): use
13095
cut_buffer push/pop functions
13097
* htmlengine-edit.c (html_engine_cut_buffer_push): new function lo
13098
"legalize" cut_buffer switching hack
13099
(html_engine_cut_buffer_pop): opposite to previous one
13101
* keybindingsrc.ms: added undo/redo to MS like bindings, changed
13102
alignment modifiers to <Ctrl><Alt>
13104
* htmlimage.c (set_link): new function, sets urt and target for
13107
* htmlengine-edit-insert.c (html_engine_insert_link): rewritten,
13108
now it does copy, modify cut buffer to contain linked objects and
13109
then paste it back. In case of empty selection, it paste empty
13110
link text master object
13112
* htmllinktext.c (set_link): new function, sets url and target,
13114
(html_link_text_class_init): set set_link
13116
* htmltextmaster.c (set_link): new virt. function - returns
13117
created linktextmaster
13118
(html_text_master_class_init): set set_link
13120
* htmlobject.c (html_object_set_link): new function for link setting
13121
(html_object_class_init): set set_link virtual function to NULL
13123
2000-06-19 Radek Doulik <rodo@helixcode.com>
13125
* gtkhtml.c (clean_bindings_set): I must clean all 3 possible
13126
binding_set's - this maybe fixed by adding new functions to gtk
13127
(load_keybindings): now it could load custom bindings
13129
* keybindingsrc.emacs: same as below
13131
* keybindingsrc.ms: removed binding to GtkHTML class, done in
13134
2000-06-19 Ettore Perazzoli <ettore@helixcode.com>
13136
* gtkhtml.c (load_keybindings): Map shift+backspace to
13139
2000-06-19 Ettore Perazzoli <ettore@helixcode.com>
13141
* htmlengine-edit-delete.c (html_engine_delete_selection): Update
13142
the selection before deleting it.
13144
* htmlengine-edit-copy.c (html_engine_copy): Update the selection
13146
(html_engine_copy_to_buffer): Likewise.
13148
* keybindingsrc.emacs: Bind "cut-line" to "<Ctrl>k".
13150
* gtkhtml-properties.c: Add a "cut-line" command and bind it as
13151
`GTK_HTML_COMMAND_CUT_LINE'.
13153
* gtkhtml.c (command): Handle `GTK_HTML_COMMAND_CUT_LINE'.
13155
* gtkhtml.h: New command `GTK_HTML_COMMAND_CUT_LINE'.
13157
* gtkhtml-keybinding.c (cut_line): New.
13159
* htmlengine-edit-cut.c (html_engine_cut): Update the selection
13160
before doing anything.
13161
(html_engine_cut_line): New.
13163
* gtkhtml.c (load_keybindings): Load the keybindings from
13164
$(prefix)/share/gtkhtml instead of using the gnome_datadir.
13166
2000-06-18 Ettore Perazzoli <ettore@helixcode.com>
13168
* htmlengine.c (html_engine_set_editable): Bring the cursor home
13169
only after ensuring the thing is actually editing-compatible
13170
[i.e., after calling `ensure_editable()'].
13172
2000-06-17 Ettore Perazzoli <ettore@helixcode.com>
13174
* gtkhtml.c (gtk_html_set_editable): If the widget has become
13175
editable, update the styles with `update_styles()'.
13176
(gtk_html_begin): Added precondition: @html is not editable.
13178
* gtkhtml.c (command): Delete the selection appropriately for
13179
`COMMAND_INSERT_PARAGRAPH', `COMMAND_DELETE',
13180
`COMMAND_DELETE_BACK'.
13181
(selection_received): Delete the selection before inserting.
13182
(key_press_event): Likewise.
13184
* htmlengine-edit-delete.c (html_engine_delete_selection): New.
13186
2000-06-16 Radek Doulik <rodo@helixcode.com>
13188
* gtkhtml.c: moved enum some defs to gtkhtml-properties.c + some
13189
minor keybindings changes
13191
2000-06-14 Larry Ewing <lewing@helixcode.com>
13193
* htmliframe.c (html_iframe_init): place the widget offscreen
13194
initialy so that it can size allocate.
13196
2000-06-15 Radek Doulik <rodo@helixcode.com>
13198
* gtkhtml-properties.c (gtk_html_class_properties_load): use val
13199
== NULL test instead of !dflt
13201
* keybindingsrc.emacs: same as in keybindingsrc.ms
13203
2000-06-14 Radek Doulik <rodo@helixcode.com>
13205
* keybindingsrc.ms: paragraph styles binded to Ctrl 1..8 + 0 and
13208
* gtkhtml.c: more keybindings - paragraph styles
13210
* Makefile.am (testgtkhtml_LDADD): removed -lgconf-gtk which was
13211
hack and is fixed now
13213
* testgtkhtml.c (main): call gtkhtmllib_init
13215
keybindings support + gtkhtml config capplet using gconf
13217
* gtkhtml.c (key_press_event): so, finnaly insert everything which
13218
nas state not containing Ctrl,Alt
13219
(gtkhtmllib_init): new function, please call it before using
13220
gtkhtml widget (we need this for gconf init)
13222
2000-06-12 Ettore Perazzoli <ettore@helixcode.com>
13224
* htmlclueflow.c (save_plain): For indented paragraphs, emit as
13225
many tabs as the level of indentation before the actual contents.
13227
2000-06-12 Radek Doulik <rodo@helixcode.com>
13229
* gtkhtml.c (key_press_event): insert text also with LOCK_MASK bit
13231
(key_press_event): queue draw + update style every time we handle key_press
13233
2000-06-12 Ettore Perazzoli <ettore@helixcode.com>
13235
* htmlclueflow.c (get_tag_for_item_group): Removed.
13236
(save): Don't use it anymore. This will make us produce somewhat
13237
invalid HTML, but at least indentation will look right.
13239
* htmlengine.c (html_engine_queue_clear): Call
13240
`html_colorset_get_color_allocated' instead of
13241
`html_colorset_get_color', so that we get an allocated color.
13242
This fixes the "black box when deleting" bug.
13244
* htmlengine.h: Remove `bDrawBackground' from `HTMLEngine'. It
13245
was not being used anywhere.
13247
* htmlclueflow.c (calc_size): Remove all the text slaves before
13248
doing anything else.
13249
(get_pre_padding): New.
13250
(add_pre_padding): Rewritten to use it.
13251
(get_post_padding): New.
13252
(add_post_padding): Rewritten to use it.
13253
(save_plain): If the pre padding is greater than zero, emit a
13254
newline before the body of the paragraph. Likewise, if the post
13255
padding is greater than zero, emit an extra newline after the body
13256
of the paragraph. This way, the plaintext output mimics the
13257
appearance of the graphically rendered HTML at least a little bit.
13258
(relayout_with_siblings): Renamed from
13259
`relayout_for_level_change'.
13260
(html_clueflow_set_style): Use it. This way a style change
13261
updates the padding for the siblings too when necessary.
13262
(html_clueflow_set_indentation): Use it.
13263
(html_clueflow_indent): Use it.
13265
* htmlengine.c (html_engine_normalize_cursor): New.
13267
* htmlengine-edit-fontstyle.c (set_font_style_in_selection):
13268
Update the selection before doing anything else.
13269
(merge_safely): New arg @engine. Removed args @cursor and @mark.
13270
(merge_backward): New arg @engine. Removed args @cursor and
13272
(merge_forward): Likewise.
13273
(set_font_style): Call
13274
`html_engine_edit_selection_updater_cursor_changed'.
13276
* htmlengine-edit-selection-updater.c
13277
(html_engine_edit_selection_updater_update_now): Renamed from
13278
`html_engine_edit_selection_update_now'.
13279
(html_engine_edit_selection_updater_cursor_changed): New. This
13280
function must be called when the object to which the cursor points
13281
has been destroyed, and consequently the cursor's object pointer
13284
* gtkhtml.c (scroll): Provide initialization for `delta' to
13285
placate the whingin' compiler.
13287
2000-06-12 Dan Winship <danw@helixcode.com>
13289
* htmltextmaster.c: fix up the MagicInsertMatch regexps: "[_-a-z]"
13290
doesn't even compile on my machine, and backslashes aren't needed
13291
(or correct) inside [].
13293
2000-06-12 Ettore Perazzoli <ettore@helixcode.com>
13295
* htmlcolorset.c (html_colorset_set_style): Use ->base instead of
13296
->bg so we look like GtkEntry, GtkCList and the like.
13298
2000-06-12 Radek Doulik <rodo@helixcode.com>
13300
* keybindingsrc.emacs: added new bindings
13302
* keybindingsrc.ms: added new bindings
13304
* gtkhtml.c (command): new commands implementation
13306
* gtkhtml.h: new commands for align and indentation
13308
* gtkhtml.c (load_keybindings): fixed keybindings file path (added
13311
* keybindingsrc.ms: added font style bindings
13313
* keybindingsrc.emacs: added font style bindings
13315
* gtkhtml.c (command): new commands implementation
13317
* htmlengine-edit-fontstyle.c (html_engine_font_style_toggle): new
13318
function, used to toggle font style
13320
* gtkhtml.h: added new commands for font style toggling
13322
* Makefile.am (keybindings_DATA): added keybindingsrc.emacs and
13323
keybindingsrc.ms to EXTRA_DIST and let it install
13325
* gtkhtml.c (load_keybindings): load emacs keybindings (for now,
13326
later it will be selectable)
13328
2000-06-11 Radek Doulik <rodo@helixcode.com>
13330
* Makefile.am (libgtkhtml_la_SOURCES): removed
13331
gtkhtml-keybinding.[ch] as they are obsolete now - keybings are
13332
now in gtkhtml.[ch] + rc files
13334
* gtkhtml.c (class_init): three keybindings signals -
13335
scroll/cursor_move/command
13336
default keybindings moved to new function
13337
(load_keybindings): register default keybindings (+ load from file
13339
(register_enums): register new ENUM types for better rc bindings definition
13340
(scroll): scroll signal handler
13341
(cursor_move): cursor movement handler
13342
(command): command signal handler
13343
(key_press_event): rewritten, now it first tries activate
13344
keybindings, next insert text and if not handled forward it to parent
13346
2000-06-09 Ariel Rios <ariel@arcavia.com>
13348
* Makefile.am: Added htmlengine-edit-rule.c and html-engine-rule.h
13350
* htmlengine-edit-rule.h (html_engine_insert_rule): Added function for inserting an HTML rule.
13352
* htmlengine-edit-rule.c: Ditto.
13354
2000-06-08 Radek Doulik <rodo@helixcode.com>
13356
* gtkhtml.c (key_press_event): call parent keypress handler if not
13359
* testgtkhtml.c (main): set initial focus to html widget
13361
* gtkhtml.c (class_init): added scroll_vertical, scroll_horizontal
13363
added keybindings for new signals (Up/Down, PgUp, PgDown,
13364
Left/Right, Shift-Left/Right, space/backspace)
13365
(scroll): new function - scrolls by scroll_type passed adjustment
13366
(scroll_vertical): new signal handler, scrolls vertical adjustment
13367
(scroll_horizontal): new signal handler, scrolls horizontal adjustment
13369
2000-06-07 Larry Ewing <lewing@helixcode.com>
13371
* htmliframe.c (iframe_size_changed): schedule and updated
13372
whenever we are notified that the size has changed.
13373
(html_iframe_init): connect to the size_changed signal of the
13374
embedded gtkhtml widget.
13375
(iframe_url_requested): remove the spurious calls to
13376
html_embedded_size_recalc and html_engine_schedule_update.
13378
* htmlcolorset.c (html_colorset_set_by): unset the changed flag.
13379
(html_colorset_set_unchanged): this function updates all colors in
13380
the the colorset if thier changed flag is not set.
13381
(html_colorset_set_style): update the colorset based on the style.
13382
(html_colorset_new): use html_coloset_set_style rather than using
13383
the style directly.
13384
(html_colorset_set_color): set the changed flag for each color we
13387
* htmlcolorset.h (struct _HTMLColorSet): add array of changed flags.
13389
* gtkhtml.c (gtk_html_private_calc_scrollbars): emit SIZE_CHANGED
13390
so that htmlembedded can update the embedded widget when needed.
13391
(class_init): add size_changed signal and style_set
13392
(realize): attach the style from the window.
13393
(style_set): update the default colorset and the current colorset
13394
based on the new style.
13396
* gtkhtml.h: add size_changed signal to the class.
13398
2000-06-07 Radek Doulik <rodo@helixcode.com>
13400
* htmltextmaster.c (html_text_master_magic_link): use forward
13401
match direction instead of backward so http://www.helixcode.com is
13402
linked correctly (lewing, thanks for point that)
13404
* everywhere changed to use new colorsets
13406
* htmlsettings.c: colors part rewritten to use new colorsets
13408
* htmlcolorset.c: rewritten, now we have master colorset in engine
13409
and slave colorsets in painters
13410
colors are set by default to colors from GtkHTML widget style
13412
* gtkhtml.c (gtk_html_construct): fixed engine widget setting
13414
* htmlengine.c (html_engine_class_init): added arg html
13415
(html_engine_set_arg): new handler
13416
(html_engine_new): update to use new arg
13418
* htmlgdkpainter.c (draw_panel): updated to display better limit cases
13420
2000-06-06 Larry Ewing <lewing@helixcode.com>
13422
* htmlengine.c (parse_input): correctly use the member element,
13423
this cast was scary. Fixes bugs #11899 #1202 and #11902 at
13424
http://bugs.gnome.org/
13426
2000-06-06 Radek Doulik <rodo@helixcode.com>
13428
* htmlengine.c (html_engine_get_object_at): correct also x
13429
coordinate when y < e->topBorder
13431
* htmlclueflow.c (check_point): corrected bounding condition - now
13432
you don't loose selection by moving mouse above gtkhtml area
13434
2000-06-05 Radek Doulik <rodo@helixcode.com>
13436
* htmltextmaster.c (html_text_master_magic_link): stop search also
13438
updated regex for mailto:, also remove A-Z as we ICASE
13440
* htmllinktextmaster.c (html_link_text_master_to_text): new
13441
function used to replace link by normal text
13443
* htmlengine-edit-paste.c (html_engine_replace_by_object):
13444
replaces region by new_obj (used from magic links/remove link)
13446
* htmltextmaster.c (html_text_master_magic_link): rewritten using
13448
(html_engine_init_magic): magic links initializations - compiles
13452
2000-06-04 Ariel Rios <ariel@arcavia.com>
13454
* htmlengine-edit-table.h: (html_engine_create_table) Added proto.
13456
* htmlengine-edit-table.c (html_engine_create_table): Create and
13457
return a new table.
13458
(html_engine_insert_table) We now create the table and add rows
13459
and cols as required. Still need to find a good way to send the
13463
2000-06-03 Ariel Rios <ariel@arcavia.com>
13465
* htmlengine-edit-table.c: New file needed to add table editing
13467
(html_engine_insert_table): Creates a new table and paste it.
13468
(html_engine_insert_table): Creates and returns a new cell.
13470
* htmlengine-edit-table.h: Ditto.
13472
2000-06-04 Radek Doulik <rodo@heltixcode.com>
13474
* htmlengine-edit-insert.c (html_engine_insert): use magic links
13475
when inserting ' ' or '\n'
13477
* htmltextmaster.c (html_text_master_magic_link): new function for
13478
magical text to link morphing (uses paste)
13480
2000-06-02 Ettore Perazzoli <ettore@helixcode.com>
13482
* htmlclueflow.c (save): Don't print a newline at the end when
13483
style is HTML_CLUEFLOW_STYLE_PRE because that causes <pre> to
13484
duplicate newlines.
13486
2000-06-02 Larry Ewing <lewing@helixcode.com>
13488
* htmlengine.c (html_engine_update_event): remove debugging printf
13491
* htmlengine-edit-delete.c (html_engine_delete): add cast to
13494
2000-06-02 Dan Winship <danw@helixcode.com>
13496
* htmlembedded.c (html_embedded_size_recalc): replace a variable
13497
initialization that got lost yesterday.
13499
2000-06-01 Larry Ewing <lewing@helixcode.com>
13501
* htmlclue.c (destroy): rework that last commit to do things
13502
slightly differently, html_clue_remove had unintended side
13505
2000-06-01 Larry Ewing <lewing@helixcode.com>
13507
* htmlclue.c (destroy): remove the objects before we destroy them
13508
to make sure the clue is in a sane state.
13510
2000-06-01 Ettore Perazzoli <ettore@helixcode.com>
13512
* htmlengine-edit-delete.c (html_engine_delete): Save the parent
13513
of the start object so that we don't segfault when the object gets
13516
2000-06-01 Christopher James Lahey <clahey@helixcode.com>
13518
* htmlengine.c (html_engine_destroy): Check that engine->clue
13519
isn't NULL so that we don't crash.
13521
2000-06-01 Larry Ewing <lewing@helixcode.com>
13523
* htmlengine-edit-delete.c (html_engine_delete): queue a redraw
13524
when we text_len == 0 since we have now lost all text slaves and
13525
they cannot queue a redraw in the area they have exposed (FIXME).
13527
2000-06-01 Ettore Perazzoli <ettore@helixcode.com>
13529
* htmltype.c: #include "htmliframe.h".
13531
* htmlengine.c (parse_object): Added missing `HTML_OBJECT()' cast.
13533
* gtkhtml.c (gtk_html_export): Return FALSE if the type is not
13534
either `text/html" or "text/plain".
13536
* htmlengine-edit-delete.c (html_engine_delete): Added a nasty
13537
workaround to make deletion of an end-of-paragraph correctly
13538
undoable. The deletion undo code should be changed to use
13539
`html_engine_copy()' somehow instead.
13541
2000-05-31 Larry Ewing <lewing@helixcode.com>
13543
* htmlengine.c (parse_object): make sure we don't leak the object
13544
if the handler returns false.
13545
(parse_iframe): display the body of the iframe if there is no url
13546
to load discard it otherwise. This should eventually be extended
13547
to allow errors in the stream to cause the body to be displayed.
13548
(parse_i): remove the closing ifrmae tag check it is now handled
13551
* htmlengine.h (RIGHT_BORDER): changd to 10, 20 was an odd
13554
2000-05-31 Larry Ewing <lewing@helixcode.com>
13556
* htmliframe.c (set_max_width): a huge hack to trick the clueflow
13557
into doing the right thing for the time being.
13559
* htmlembedded.c (html_embedded_size_recalc): fix assumption that
13560
em->widget is a gtk_html_embedded.
13562
2000-05-30 Larry Ewing <lewing@helixcode.com>
13564
* htmlengine.c (html_engine_destroy): destroy the clue as well
13565
fixes http://bugzilla.helixcode.com/show_bug.cgi?id=200
13567
2000-05-30 Larry Ewing <lewing@helixcode.com>
13569
* htmlengine.c (parse_object): call gtk_html_embedded_new with
13570
content type argment.
13572
* gtkhtml-embedded.h: add type to object definition.
13574
* gtkhtml-embedded.c (gtk_html_embedded_new): add type argument.
13575
(gtk_html_embedded_finalize): free type member.
13577
2000-05-30 Larry Ewing <lewing@helixcode.com>
13579
* gtkhtml.c (html_engine_object_requested_cb): check and return
13581
(class_init): change the object_requested signal to have a return
13584
* gtkhtml.h: change the object_requested signal prototype.
13586
* htmlengine.c (discard_body): new helper function to discard
13587
tokens before end tag.
13588
(parse_object): added function to handle the elements inside an
13590
(parse_o): call parse_object.
13591
(html_engine_class_init): change the object_requested signal to
13592
have a boolean return value.
13594
* htmlengine.h: change the object_requested signal prototype.
13596
* testgtkhtml.c (object_requested_cmd): add a testcase for
13597
object_request to return FALSE.
13599
2000-05-30 Larry Ewing <lewing@helixcode.com>
13601
* htmliframe.c (calc_size): preliminary code to try to get a
13602
proper size when width and height are not set.
13603
(html_iframe_init): initialize the new variables and properly set
13605
(calc_min_width): add the start of a new implementation, this
13606
should fix dan's problem with resizing in the short term. needs
13609
* htmliframe.h: add variables for the scroll widget and the html
13612
* htmlengine.c (parse_iframe): change default size.
13614
2000-05-29 Dan Winship <danw@helixcode.com>
13616
* htmlclueflow.c (html_clueflow_class_init): Fix typo. (Don't use
13617
save_plain to implement HTMLObject:save.)
13619
* htmlengine-save.c (html_engine_save_plain): Call
13620
html_object_save_plain rather than html_object_save.
13622
2000-05-29 Larry Ewing <lewing@helixcode.com>
13624
* htmlembedded.c (draw): try to be smarted about when we queue a
13627
* htmlengine-save.c (html_engine_save_plain): add new save
13628
function for text/plain support.
13629
(write_header): actually use the gtkhtml VERSION string when
13630
printing out the header.
13632
* htmlengine-save.h: expose the new save function.
13634
* htmlengine.c (html_engine_calc_size): rename p to e.
13635
(parse_iframe): start of iframe support.
13636
(parse_i): call parse_iframe.
13638
* Makefile.am (libgtkhtml_HEADERS): add htmliframe.h
13640
* htmlimage.c (draw): use calc_intersect instead of the old
13641
check to make sure we are within the bounds.
13643
* htmltextslave.c (draw): use calc_intersect instead of the old
13644
check to make sure we are within the bounds.
13646
* htmltype.h: add iframe type.
13648
* htmltype.c (html_types_init): call html_iframe_type_init.
13649
(html_type_name): add IFrame type.
13651
* htmlclue.c (save_plain): add method.
13652
(html_clue_class_init): use save_plain.
13654
* htmlclueflow.c (save_plain): add method.
13655
(html_clueflow_class_init): use save_plain.
13657
* gtkhtml.c (gtk_html_export): new export interface, all this
13658
new export/save stuff needs renaming but I want to get an
13659
implementation done immediately.
13661
* gtkhtml.h: add gtk_html_export.
13663
* htmlobject.h: add save_plain method.
13665
* htmlobject.c (save_plain): add default implementation.
13666
(html_object_class_init): use save_plain.
13667
(html_object_save_plain): add entry point.
13669
* htmltext.c (get_tags): fix the order so our tags are not assured
13671
(save_plain): add save_plain to write out plaintext.
13672
(html_text_class_init): add save_plain.
13674
2000-05-21 Ettore Perazzoli <ettore@helixcode.com>
13676
* htmlengine-edit-paste.c: New members `orig_clueflow_style',
13677
`orig_halignment' and `orig_indentation' in `ActionData'.
13678
(action_data_from_cut_buffer): New args @orig_clueflow_style,
13679
@orig_halignment, @orig_indentation. Assign their values to the
13680
corresponding member in `ActionData'.
13681
(html_engine_paste): Retrieve the style parameters of the current
13682
clueflow and pass them to `action_data_from_cut_buffer()'.
13683
(do_undo): Reset the original clueflow style according to the values
13684
in the ActionData. [Fixes #13]
13686
* htmlengine-edit-clueflowstyle.c
13687
(free_prop_list): New helper function.
13688
(undo_or_redo_destroy_closure): Use it.
13689
(set_clueflow_style_at_cursor): New arg @do_undo. If false,
13690
don't save undo information.
13691
(html_engine_set_clueflow_style): New arg @do_undo. If false,
13692
don't save undo information.
13693
(set_clueflow_style_in_region): New arg @do_undo. If false,
13694
don't save undo information.
13696
* testgtkhtml.c (goto_url): Updated to the new `gtk_html_begin()'
13697
API. Call the `url_requested' callback directly, in a yucky way,
13698
to reflect the fact that GtkHTML does no longer emit the
13699
"url_requested" signal for the initial URL.
13701
* htmlengine-edit-delete.c (delete_different_parent): Get rid of
13704
* htmlclueflow.c (save): Added a couple casts to placate the
13707
* htmlengine.c (html_engine_begin): Removed arg @url and
13708
corresponding [broken] reference handling. Also, don't emit
13710
(html_engine_update_event): Removed reference handling.
13712
* htmlengine.h: Removed member `reference' in `struct
13715
* gtkhtml.c (gtk_html_begin): Removed arg @url.
13717
* gtkhtml.h: Removed of GtkHTMLStreamHandle. Instead, use
13718
`GtkHTMLStream *'s throughout.
13720
* gtkhtml-stream.h: Don't define `GtkHTMLStream' anymore.
13722
* htmlengine.c: `select', `queue_draw' and `active_selection'
13723
bitfields changed from gbooleans to guints in `SelectRegionData'.
13725
* htmltext.h: `color_allocated' bitfield changed from gboolean to
13728
* htmltablecell.h: `have_bg' and `bg_allocated' bitfields
13729
changed from gbooleans to guints.
13731
* htmlsettings.h: `underlineLinks' and `forceDefaults' bitfields
13732
changed from gbooleans to guints.
13734
* htmlobject.h: `redraw_pending' and `selected' bitfields
13735
changed from gbooleans to guints.
13737
* htmlimage.h: `color_allocated' and `have_color' bitfields
13738
changed from gbooleans to guints.
13740
* htmlengine.h: `have_focus' bitfield changed from gboolean to
13743
* htmlengine-save.h: `error' bitfield changed from gboolean to
13746
* htmlcursor.h: `have_target_x' bitfield changed from gboolean to
13749
* gtkhtml.h: Replaced gboolean bitfields into guints. [Gboolean
13750
is signed so compilers might complain.]
13752
2000-05-21 Ettore Perazzoli <ettore@helixcode.com>
13754
* htmlengine-edit-paste.c (html_engine_paste_object): Eeek! Free
13755
the temporary cut buffer, not the real cut buffer.
13757
* htmlengine-edit-insert.c (insert_para): Create the empty
13758
HTMLTextMaster when splitting at offset == 0 even when the
13759
cursor's object is not text.
13761
* htmlengine-edit-delete.c (delete_in_object): Destroy a non-text
13762
object only if the starting offset is zero and the end offset is
13764
(delete_different_parent): Rewritten to make more sense.
13766
* htmltextmaster.c (merge): If this object is empty, copy font
13767
style and color from the other one.
13769
* htmltext.c (check_merge): If either of the two text elements is
13770
empty, return TRUE.
13772
* htmlengine-edit-insert.c (insert_para): Use
13773
`html_text_master_destroy_slaves' instead of destroying slaves
13775
(split_object): New helper function, that splits a text object
13776
into two text objects or a non-text object into itself and an
13779
* gtkhtml-keybinding.c (handle_none): Use
13780
`gtk_html_debug_dump_tree_simple' instead of
13781
`gtk_html_debug_dump_tree'. The latter is too unreadable to be
13782
useful. [Maybe we should actually get rid of it at some point.]
13783
(handle_alt): Removed stale debugging message.
13785
* htmlengine-edit-paste.c (remove_element_if_empty_text): New
13786
helper function to destroy an object if it is an empty text
13788
(move_cursor_to_safe_object): Helper function for
13789
`remove_element_if_empty_text'.
13790
(do_paste): Call `remove_element_if_empty_text' on the first and
13791
last inserted elements, so that we eat resulting stale empty text
13794
* htmlengine-edit-images.c (html_engine_insert_image): Removed
13797
2000-05-21 Ettore Perazzoli <ettore@helixcode.com>
13799
* gtkhtml-keybinding.c (handle_ctrl): Make `C-d' delete forwards
13800
instead of backwards.
13802
2000-05-18 Ettore Perazzoli <ettore@helixcode.com>
13804
* htmlengine-edit-paste.c (prepare_clueflows): Make sure `first'
13805
is made false after the first round in all cases.
13806
(do_paste): Fix pasting of consecutive HTMLClueFlows.
13808
2000-05-18 Ettore Perazzoli <ettore@helixcode.com>
13810
* htmlengine-edit-fontstyle.c (set_font_style): Added
13811
slow-but-working relayout-and-redraw machinery.
13812
(move_to_next_text_segment_forwards): Use
13813
`html_object_next_not_slave()' instead of just `->next' for
13815
(move_to_next_text_segment_backwards): Likewise, with
13816
`html_object_prev_not_slave()' instead of `->prev'.
13818
* htmltextmaster.c (get_cursor_base): Spit a warning message if we
13821
* htmltext.c (set_font_style): Set `HTML_CHANGE_ALL' as the change
13824
* htmlengine-edit-fontstyle.c (merge_safely): Destroy the slaves
13825
of @text and @other by calling `html_text_master_destroy_slaves()'.
13827
* htmltextmaster.c (html_text_master_destroy_slaves): New function.
13829
* htmlengine-edit-paste.c (html_engine_paste_object): Eeek! Don't
13830
set the cut buffer.
13832
* htmlengine-edit.c (html_engine_undo): Don't freeze/thaw anymore.
13833
(html_engine_redo): Likewise.
13835
* htmlengine-edit-insert.c (do_insert): Skip the inserted text
13837
(do_redo): Don't move the cursor after inserting anymore.
13838
(html_engine_insert): Likewise.
13839
(do_undo): Delete backwards instead of forwards.
13841
2000-05-18 Ettore Perazzoli <ettore@helixcode.com>
13843
* htmltextmaster.c (merge): Call `html_object_change_set()' with
13844
`HTML_CHANGE_ALL' to trigger a complete layout recalculation for
13847
* htmlengine-edit-delete.c: Redone in a cleaner way.
13849
* htmlengine-edit-fontstyle.c (set_font_style): Normalize the
13850
cursor before returning.
13852
* htmlcursor.c (html_cursor_jump_to): Normalize the cursor before
13855
* htmlengine-edit-fontstyle.c (set_font_style_in_selection):
13856
@do_undo renamed to @want_undo to avoid conflicts with the
13857
`do_undo()' function.
13858
(set_font_style): Likewise.
13859
(move_to_next_text_segment_forwards): New helper function that
13860
moves the cursor to the right until there is a non-empty text
13861
segment on the right of the cursor.
13862
(move_to_next_text_segment_backwards): Similiar helper function,
13863
but checking and moving to the left.
13864
(do_undo): Use them after moving the cursor by the size of the
13865
changed segment. This makes sure we correctly handle the case
13866
with end-of-paragraphs within the selection.
13868
2000-05-17 Ettore Perazzoli <ettore@helixcode.com>
13870
* htmlengine-edit-clueflowstyle.c (set_clueflow_style_in_region):
13871
Prevent segfault by stopping at the last element.
13873
* htmlengine-edit-fontstyle.c (set_font_style): Update `p' when
13874
splitting at start.
13876
2000-05-17 Larry Ewing <lewing@helixcode.com>
13878
* htmlclueflow.c (save): fixup the save code for lists a little,
13879
now the clueflow save code is scattered with is_item checks
13880
we need to rework how lists are done, I'll probably do
13882
(get_tag_for_item_group): another hack for lists.
13884
* htmlclueflow.c (is_similar): remove the special case for lists.
13886
2000-05-16 Larry Ewing <lewing@helixcode.com>
13888
* htmlrule.c (save): add shade option and and FIXME comment for
13889
all the possible missing parameters.
13891
* htmlengine-save.c (html_engine_save_output_string): change to
13892
use va_list... the old interface was just too tedious.
13894
* htmlengine-save.h: change to match new va_list interface.
13896
* htmlclueflow.c (write_indentation_tags_helper): change to use
13897
new output string interface.
13900
* htmlimage.c (save): add a save function.
13901
(html_image_set_url): rename from html_image_set_filename.
13903
* htmlimage.h: rename html_image_set_filename to html_image_set_url.
13905
2000-05-11 Larry Ewing <lewing@helixcode.com>
13907
* htmlclueflow.c (is_similar): don't merge list items.
13908
(calc_size): rework to make sure we don't include the height of
13909
the first item in a new line in the previous lines ascent
13910
calculation, we now assume whenever a run ends there is an
13911
implicit newline.2000-05-16 Larry Ewing <lewing@helixcode.com>
13913
* htmlrule.c (save): add shade option and and FIXME comment for
13914
all the possible missing parameters.
13917
* htmlgdkpainter.c (draw_background): optimize this greatly for a couple
13920
2000-05-09 Ettore Perazzoli <ettore@helixcode.com>
13924
2000-05-09 Ettore Perazzoli <ettore@helixcode.com>
13926
* htmlprinter.c (draw_background): Param @color made const.
13928
* htmlgdkpainter.c (draw_pixmap): Removed unused variable.
13929
(draw_background): Param @color made const.
13931
* htmlengine-edit-paste.c (do_paste): Cast to HTMLClueFlow to
13934
* gtkhtml.c (selection_received): Removed unused variable.
13936
* htmlpainter.h: Arg @color in virtual method `draw_background'
13939
2000-05-09 Ettore Perazzoli <ettore@helixcode.com>
13941
* htmlengine-edit.c (html_engine_undo): Freeze/thaw.
13942
Unfortunately something bad is going on in the relayout code.
13943
(html_engine_redo): Likewise.
13945
2000-05-09 Ettore Perazzoli <ettore@helixcode.com>
13947
* htmlengine-edit-fontstyle.c (set_font_style): Don't do stupid
13948
merging. Decrease count when splitting and setting the font.
13949
Don't make your life harder when merging. Overall fixup.
13950
(merge_backward): Return value changed from `void' to `gboolean'.
13951
Return true if a merge happened.
13952
(merge_forward): Likewise.
13954
* htmltextmaster.c (calculate_new_selection): New helper function.
13957
2000-05-09 Ettore Perazzoli <ettore@helixcode.com>
13959
* htmlengine-edit-fontstyle.c (do_redo): Reverse the direction for redo.
13961
2000-05-08 Ettore Perazzoli <ettore@helixcode.com>
13963
* htmlengine-edit-fontstyle.c (figure_interval): Get rid of unused
13966
* htmltextmaster.c (merge): Fix broken merging in the case in
13967
which the select length of self is zero.
13969
2000-05-08 Larry Ewing <lewing@helixcode.com>
13971
* gtkhtml.c (button_press_event): let button 2 request a paste.
13972
(selection_get): add TEXT and COMPOUND_TEXT types.
13973
(selection_received): add preliminary handler for receiving
13975
(class_init): add select_received handler to the class.
13976
(init): add the extra targets.
13978
* gtkhtml.h: expose gtk_html_request_paste to the world.
13980
* htmlengine.c (html_engine_begin): add the url_requested signal
13981
back it was accidentally removed.
13983
2000-05-07 Radek Doulik <rodo@helixcode.com>
13985
* htmlimage.c (html_image_set_size): changed percent changing
13986
behavior to hopefully correct one
13988
* htmlengine.c (html_engine_parse): reset indent_level to 0
13990
* htmlengine-edit-paste.c (do_undo): removed delete bug workaround
13991
as it seems to work now
13993
* htmlengine-edit-delete.c (merge_text_at_cursor): updated it to
13994
merge both directions (need ie. after delete of non-text object)
13995
(delete_different_parent): don't destroy objects going to save_buffer
13996
(delete_same_parent): likewise
13997
(delete_different_parent): also append objects from deleted
13998
paragraphs to save_buffer
13999
(append_to_buffer): added debug msg + don't insert "" to save buffer
14001
* htmlimage.c (html_image_init): removed assertion on *filename
14002
(html_image_factory_register): likewise
14003
(html_image_factory_register): load image only if != ""
14005
* htmlengine-edit-paste.c (do_paste): possibly add "" to clueflow
14006
if bailing out (this fixes pasting parbreak and undo after delete of parbreak)
14008
2000-05-07 Ettore Perazzoli <ettore@helixcode.com>
14010
* htmlengine-edit-delete.c (html_engine_delete): Avoid looking for
14011
the end point beyond the end of the text.
14013
* htmlengine-edit.c
14014
(html_engine_undo): Unselect all.
14015
(html_engine_redo): Don't freeze/thaw.
14016
(html_engine_undo): Don't freeze/thaw here either.
14018
2000-05-07 Ettore Perazzoli <ettore@helixcode.com>
14020
* htmlengine-edit-delete.c
14021
(html_engine_delete): Avoid looking for the end point beyond the
14023
(merge_text_at_cursor): If merging is not possible, return the
14024
current offset unmodified.
14026
2000-05-07 Larry Ewing <lewing@helixcode.com>
14028
* htmlengine.c (html_engine_end): if editable call
14029
html_cursor_home to make sure that even if the the whole buffer is
14030
loaded in one pass we don't end up with a cursor at an incorrect
14033
2000-05-06 Radek Doulik <rodo@helixcode.com>
14035
* htmlengine.c (parse_table): don't create bg ptr if background=""
14036
(parse_b): likewise
14038
* htmlimage.c (html_image_factory_register): added test for ""
14039
filename - now it is forbidden
14040
(html_image_init): likewise
14041
(html_image_set_filename): likewise
14043
* htmlundo.c (html_undo_do_undo): do undo only if stack is
14044
non-empty and don't complain when called with empty stack
14045
(html_undo_do_redo): likewise
14047
* htmltext.c (insert_text): partialy rewritten, inserts whole text
14048
now and calls new convert_nbsp hack
14049
(convert_nbsp): new function, converts sequence of [<space> ']
14050
to sequence with starting space and chars
14051
(remove_text): use convert_nbsp
14052
(html_text_init): likewise
14054
* gtkhtml-keybinding.c (handle_ctrl): added C-z for UNDO and C-r
14055
for REDO (it is not Emacs like, but helps a lot for testing)
14057
2000-05-05 Radek Doulik <rodo@helixcode.com>
14059
* htmlengine-edit-delete.c (html_engine_delete): restore cursor
14060
position before do_undo
14061
(html_engine_delete): if remove text from last object, save it
14062
also in save_buffer
14063
(html_engine_delete): destroy_orig only if it is on object begin,
14064
when offset ==0, if destroy_orig for nontext increase count,
14065
so we move one more point forward, later move one point backward
14068
* htmlengine-edit-insert.c (insert_chars_at_not_text): set cursor
14069
to beggining of inserted text
14071
2000-05-05 Larry Ewing <lewing@helixcode.com>
14073
* htmlembedded.c (draw): queue a draw on the widget when we get a
14074
draw event, should fix the disappearing embedded widgets.
14076
2000-05-04 Radek Doulik <rodo@helixcode.com>
14078
* htmlcursor.c (forward): move cursor also behind non-text
14081
2000-05-03 Radek Doulik <rodo@helixcode.com>
14083
* htmlengine.c (replace): use html_engine_edit_selection_update_now
14084
(html_engine_replace_do): disable selection on end of replace
14085
(parse_a): added missing gdk_color_copy
14087
* htmlengine-edit-selection-updater.c
14088
(html_engine_edit_selection_update_now): new function, removes
14089
idle callback and does update immediately.
14091
* htmlengine.c (display_search_results): use mark/cursor when
14094
* htmltext.c (html_text_set_text): set change flags
14096
* htmlengine.c (html_engine_parse): reset search & replace engine
14098
2000-05-02 Larry Ewing <lewing@helixcode.com>
14100
* htmlimage.c (cleanup_images): if there are no interestes don't try to
14103
2000-05-01 Larry Ewing <lewing@helixcode.com>
14105
* htmlclueflow.c (save): rework the saving code so that we merge
14106
paragraphs of similiar types.
14107
(is_similar): compare the two flows to see if they can be merged.
14109
2000-04-30 Radek Doulik <rodo@helixcode.com>
14111
* htmlsettings.c (html_settings_free_colors): free colors only
14112
when they've been allocated
14114
* gtkhtml.c (gtk_html_set_default_background_color): set bgcolor
14115
in default settings
14117
* htmlpainter.c (html_painter_draw_background): added const to
14120
* htmlengine.h: removed bgColor and bgColor_allocated
14122
* gtkhtml.c (gtk_html_set_default_background_color): use new settings
14124
* htmlengine-edit-insert.c (html_engine_insert_link): use new settings
14126
* htmlsettings.c (html_settings_reset): new function used to reset
14127
values (now only collors) from orig settings
14129
* htmlengine.c (parse_b): update to new settings
14130
(parse_b): added alink color parsing
14131
(html_engine_parse): updated for new settings
14132
(html_engine_draw_background): likewise
14133
(html_engine_queue_clear): likewise
14135
* htmlsettings.c (html_settings_set_color): new function for color setting
14136
(html_settings_get_color): get color (possibly unallocated)
14137
(html_settings_get_color_allocated): get allocated color
14138
(html_settings_free_colors): free colors scheduled to be freed and
14139
possibly also other colors
14141
* htmlsettings.h: added alink and text color
14143
2000-04-29 Ettore Perazzoli <ettore@helixcode.com>
14145
* htmlengine-edit-insert.c
14146
(do_undo): Undelete `num_chars' character, not just one, you
14149
2000-04-29 Radek Doulik <rodo@helixcode.com>
14151
* htmllinktextmaster.c (html_link_text_master_set_url): new setting function
14153
* htmltext.c (html_text_set_text): new setting function
14155
2000-04-28 Ettore Perazzoli <ettore@helixcode.com>
14157
* htmlengine-edit-delete.c
14158
(delete_different_parent): `html_object_dup()' before adding to
14161
* htmlengine-edit-fontstyle.c: Redone, with undo/redo support.
14163
2000-04-28 Radek Doulik <rodo@helixcode.com>
14165
* htmlimage.c (html_image_set_spacing): set hspace, vspace,
14166
updated to schedule update
14167
(html_image_set_filename): set filename, if changed, uregister
14168
current image_ptr and register new one
14169
(html_image_set_valign): set valign, if needed shedules update
14170
(html_image_set_border): set border, if needed shedules update
14171
(html_image_set_size): set specified_width, specified_height,
14172
percent, if needed shedules update
14174
2000-04-27 Radek Doulik <rodo@helixcode.com>
14176
* testgtkhtml.c (main): test gtk_html_set_default_background_color
14177
- set light blue background
14179
* htmlengine.c (html_engine_parse): free allocated bgColor
14181
* gtkhtml.c (gtk_html_set_default_background_color): new function
14183
(realize): removed setting of bgcolor to gtk bg[NORMAL] color,
14184
when needed use gtk_html_set_default_background_color instead
14186
2000-04-26 Radek Doulik <rodo@helixcode.com>
14188
* htmlengine-edit-paste.c (skip): removed
14189
(obj_len): new function, returns 1 for non-text, text_len else
14190
(append_object): don't use skip, keep cursor consistent
14191
(prepend_object): likewise
14192
(do_paste): keep cursor consistent, don't use skip, also merge
14193
objects copied from ClueFlows
14194
(do_undo): use backward arg of html_engine_delete instead of
14195
calling html_engine_move_cursor
14196
hack around html_engine_delete bug - loop buffer_count times and
14197
remove one char each time - hopefully I correct it
14199
2000-04-25 Radek Doulik <rodo@helixcode.com>
14201
* htmlengine-edit-insert.c (html_engine_insert_link): new function
14204
2000-04-24 Dan Winship <danw@helixcode.com>
14206
* htmlengine.c (html_engine_destroy): remove the updateTimer, if
14208
(html_engine_timer_event): if calling html_engine_update_event,
14209
remove the updateTimer first, since update_event will clear it.
14210
(html_engine_end): before calling html_engine_timer_event,
14211
remove the timerId, since timer_event will clear it.
14213
Fixes problems with timers being called after the object is
14216
2000-04-24 Radek Doulik <rodo@helixcode.com>
14218
* htmlengine.c (html_engine_replace_do): updated to use ask
14221
* htmlreplace.c (html_replace_new): added data arg to ask function
14223
* Makefile.am (libgtkhtml_la_SOURCES): removed gtkhtml-search.[ch]
14224
gtkhtml-replace.[ch], gtkhtml-edit-image.[ch]
14226
* htmlengine-edit-images.c (html_engine_insert_image): removed
14227
g_return_if_fail (halign != HTML_HALIGN_NONE); as we don't use
14230
* gtkhtml.c: removed dialogs deps
14232
* testgtkhtml.c: removed menus/callbacks using dialogs
14234
* gtkhtml.h (gtk_html_redo): removed image/search/replace dialog
14237
2000-04-24 Ettore Perazzoli <ettore@helixcode.com>
14239
* htmlengine-edit-paste.c
14240
(skip): Fixed so that it does not skip more than needed when at
14241
the end of a paragraph.
14243
2000-04-24 Ettore Perazzoli <ettore@helixcode.com>
14245
* htmlengine-edit-images.c
14246
(html_engine_insert_image): We cannot support editing of haligned
14247
images, so avoid doing that.
14249
2000-04-24 Radek Doulik <rodo@helixcode.com>
14251
* gtkhtml-edit-image.c (gtk_html_image_dialog_new): lifted dialog
14253
(checked_value): creates check/spin button pair
14254
(check_toggled): checkbuttons callback
14255
(percent_toggled): percent toggle callback
14256
(width_toggled): width toggle callback for percent checkbutton
14257
(menu_activate): align menuitems callback
14258
(insert): callback which calls image insertion
14260
* htmlengine-edit-images.c (html_engine_insert_image): updated to
14263
2000-04-23 Radek Doulik <rodo@helixcode.com>
14265
* htmlengine-edit-images.c (html_engine_insert_image): added
14266
halign, hspace, vspace args
14268
2000-04-23 Ettore Perazzoli <ettore@helixcode.com>
14270
* htmlengine-edit-delete.c: Implemented undo/redo.
14271
(append_to_buffer): New function.
14272
(delete_same_parent): Return a cut buffer with the stuff that we
14273
have deleted in it.
14274
(delete_different_parent): Likewise.
14275
(html_engine_delete): Updated to setup the undo information too.
14276
New params @do_undo and @backwards. @do_undo specifies if we want
14277
undo information or not, @backwards if we want to delete forwards
14281
(copy_text_master_members): New helper function.
14283
(extract_text): New function, implementation of
14284
`HTMLText::extract_text()'.
14285
(html_text_master_class_init): Install it.
14288
(copy_helper): New helper function.
14290
(extract_text): New function, implementation of
14291
`HTMLText::extract_text()'.
14292
(html_text_extract_text): New function.
14293
(html_text_class_init): Install it.
14295
* htmltext.h: New virtual method `extract_text'.
14297
2000-04-23 Radek Doulik <rodo@helixcode.com>
14299
* htmlengine-edit-paste.c (html_engine_paste_object): call
14300
html_engine_paste - this does also cut before insert and fixes
14303
2000-04-23 Ettore Perazzoli <ettore@helixcode.com>
14306
(html_image_new): @filename made const-safe.
14307
(html_image_init): Likewise.
14309
* htmlengine-edit-images.c: New file.
14310
(html_engine_insert_image): Moved here from `htmlengine-edit.c'.
14311
New params for all the properties of the image object.
14313
2000-04-22 Ettore Perazzoli <ettore@helixcode.com>
14316
(replace): Use `html_engine_paste_object()' instead of overriding
14317
the engine's cut buffer and using `html_engine_paste()'.
14319
* htmlengine-edit.c
14320
(html_engine_insert_image): Use `html_engine_paste_object()'.
14322
* htmlengine-edit-paste.c
14323
(html_engine_paste_object): New function.
14325
* htmlengine-edit-cut.c
14326
(html_engine_cut): New param @do_undo. If false, don't save undo
14329
* htmlengine-edit-paste.c
14330
(html_engine_paste): New param @do_undo. If false, don't save
14333
2000-04-22 Ettore Perazzoli <ettore@helixcode.com>
14336
(main): We definitely don't want this test program to let users
14340
(html_button_init): Added an assertion for the case in which
14343
* htmlengine.c: Don't care if we have already parsed a `<body>'
14344
tag; the new `<body>' will just override the existing params.
14345
Don't initialize `leftBorder', `rightBorder', `topBorder' and
14346
`bottomBorder' either.
14347
(html_engine_parse): Do it here instead. Don't init `bodyParsed'
14350
* htmlengine.h: Removed member `bodyParsed'.
14352
2000-04-22 Radek Doulik <rodo@helixcode.com>
14354
* htmlengine-edit-paste.c (html_engine_paste): use undo levels
14356
* htmlengine.c (move_to_found): if editable jump with cursor to
14357
end of founded text
14358
(html_engine_replace_do): use undo levels
14360
* htmlundo.h (HTML_UNDO_LIMIT): raised from 10 to 1024
14362
* htmlundo.c (level_new): new ctor
14363
(level_destroy): new dtor
14364
(html_undo_level_begin): begins new undo level - stores current
14365
level on levels stack and starts new one
14366
(redo_level_begin): likewise for redo
14367
(redo_step_action): redo step action function
14368
(redo_level_end): end of redo level
14369
(undo_step_action): undo step action function
14370
(html_undo_level_end): end of undo level - closes current undo
14371
level and pops another one from levels stack
14372
(html_undo_add_undo_action): use undo LIMIT only for first/base undo level
14374
* htmlundo.h: added undo_levels, redo_levels lists for
14377
2000-04-22 Ettore Perazzoli <ettore@helixcode.com>
14380
(html_cursor_jump_to_position): Fix precondition: a zero position
14383
* gtkhtml-keybinding.c
14384
(insert_para): Updated to use `html_engine_insert()' instead of
14385
`html_engine_insert_para()'.
14387
* htmlengine-edit-insert.c: Extensively reorganized. Implemented
14388
complete undo/redo support.
14389
(html_engine_insert_para): Removed.
14391
2000-04-21 Ettore Perazzoli <ettore@helixcode.com>
14394
(calc_size): Update the y coordinate correctly for
14395
`HTML_VALIGN_TOP' objects.
14397
2000-04-21 Ettore Perazzoli <ettore@helixcode.com>
14400
(ensure_last_clueflow): New function. If the last
14401
HTMLClueFlow is empty, fill it with a zero-length text element.
14402
(html_engine_end): Call it.
14404
2000-04-21 Ettore Perazzoli <ettore@helixcode.com>
14407
(gtk_html_debug_dump_tree_simple): Removed unused variable `i'.
14410
(draw): Removed unused variable `cellpaint'.
14412
* htmlengine-save.c: #include "gtkhtmldebug.h".
14415
(html_image_new): Constify `color'.
14416
(html_image_init): Likewise.
14418
2000-04-21 Radek Doulik <rodo@helixcode.com>
14420
* testgtkhtml.c (image_cb): added insert image to menu + callback
14422
* gtkhtml-edit-image.h: new file, ImageDialog definition
14424
* gtkhtml-edit-image.c: new file, implements image insert dialog
14425
(gtk_html_image_dialog_new): new ctor
14427
* Makefile.am: added gtkhtml-edit-image.[hc]
14429
* htmlengine-edit.c (html_engine_insert_image): new function,
14430
inserts image to document
14432
* htmlimage.c (copy): added valign, hspace and vspace copying,
14433
also add dest image to image_ptr interests
14434
(html_image_animation_timeout): removed some unused
14435
variables to make compiler happy
14437
2000-04-21 Ettore Perazzoli <ettore@helixcode.com>
14439
* gtkhtml-keybinding.c
14440
(paste): Don't disable the selection anymore, as
14441
`html_engine_paste()' now does the right thing.
14443
* htmlengine-edit-selection-updater.c
14444
(updater_idle_callback): Get rid of ugly, useless `goto'.
14445
(update_selection): When unselecting everything if the mark and
14446
the cursor are at the same position, re-set `active_selection' to
14449
* htmlengine-edit.c
14450
(html_engine_set_mark): Set `active_selection' true.
14452
* htmlengine-edit-paste.c
14453
(html_engine_paste): Destroy the cut buffer before re-assigning
14455
(update_cursor_position): Removed.
14457
2000-04-20 Radek Doulik <rodo@helixcode.com>
14459
* htmlengine.c (close_flow): eat trailing spaces in ClueFlow
14461
* testgtkhtml.c (main): commented out gtk_html_set_editable as it
14462
could break things, so uncomment it yourself if you want to test
14465
* gtkhtml-replace.c (gtk_html_replace_dialog_new): replace dialog ctor
14466
(ask_dialog_new): ask dialog ctor
14467
(replace_do): calls html_engine_replace_do, it is used from button
14470
* gtkhtml-replace.h: replace and replace ask dialogs iface
14472
* htmlreplace.c (html_replace_new): new ctor
14473
(html_replace_destroy): new dtor
14475
* htmlreplace.h: replace info struct iface
14477
* testgtkhtml.c: new menu "Edit" for search/replace testing
14478
(main): make widget editable, so we could test some of editing
14479
stuff here instead of fiddling with components all the time
14480
(load_done): new replace callback
14482
* htmltable.c (search): hopefully fixed backward search
14484
* htmlengine.c (move_to_found): new function, implements jump to
14485
resulty of search. It nows focuses to whole text slaves, so maybe
14486
I could enhance it by Slave offset precission
14487
(html_engine_search_next): fixed, now it returns right retval
14489
(html_engine_replace): text replacing, does search and ask caller
14491
(html_engine_replace_do): this one is called from
14492
html_engine_replace's caller with approriate answer, so it could
14493
do Replace, ReplaceAll, Next(aka skip) and Cancel.
14494
(replace): this one does the work, yes replaces text. it prepares
14495
cut_buffer and then calls html_edit_paste. after paste it updates
14498
* htmlengine-edit-paste.c (html_engine_paste): do this: if there
14499
is selection, cut first this selection and then do paste. I mean
14500
this is the right behaviour we want, comments? It needs check, if
14501
it is oook with undo stuff
14503
* htmlclueflow.c (search_set_info): updated to use stop_pos and tail
14505
* htmlsearch.h: added fields stop_pos and last to remember tail of
14508
* gtkhtml.c (gtk_html_replace): new function, launches/shows
14511
* gtkhtml.h: added fields for Replace and Replace Ask dialogs
14513
* Makefile.am: added new files htmlreplace.[hc], gtkhtml-replace.[hc]
14515
* htmlengine.c (display_search_results): now it correctly jumps to
14518
* htmlembedded.c (calc_size): set width and height to minimize updates
14519
(calc_min_width): likewise
14521
2000-04-19 Larry Ewing <lewing@helixcode.com>
14523
* htmltablecell.c (draw_background_helper): use the new super cool
14524
html_painter_draw_background to draw the background of the cell
14525
and change the arguments to use an ArtIRect. No longer deal with
14526
the padding outside of the cluev, the fact that we were meant that
14527
the cell needed to draw outside it's bounding box. Now we need to
14528
fix cluev to do the right thing all the time with padding.
14530
(draw): check the interection before drawing.
14531
(html_table_cell_init): set the cluev padding rather than the
14532
table cell padding. The padding should be handled by the cluev
14533
completely. but the cluev isn't perfect in how it does this right
14534
now (see http://www.helixcode.com/ and look at the monkey image.
14536
* htmltable.c (calc_row_heights):
14538
(calc_size): remove padding, this isn't completely done but I want
14539
to get the current code in the repository.
14540
(draw): use the new object intersection test.
14542
* htmlpainter.c (class_init):
14543
(draw_background): replace draw_background_pixmap with draw_background.
14545
* htmlpainter.h: the same.
14547
* htmlprinter.c: the same.
14549
* htmlobject.c (html_object_calc_intersection): convenience
14550
function for calculating the intersection of the drawing region
14553
* htmlobject.h: make html_object_calc_intersection public.
14555
* htmlgdkpainter.c (draw_background): change
14556
draw_background_pixmap to draw_background and add an argument for
14557
color so that we can optimize drawing later. Also add offset
14558
arguments since we are now correctly only drawing part of the
14559
backround and must know where starting offset is.
14560
(class_init): initialize draw_background.
14562
* htmlengine.c (html_engine_draw_background): change
14563
draw_backround to a public function and use the new
14564
html_painter_draw_background function.
14566
* htmlengine.h: add html_engine_draw_background.
14568
* htmldrawqueue.c (draw_obj): use the new
14569
html_engine_draw_background function.
14571
2000-04-18 Larry Ewing <lewing@helixcode.com>
14573
* htmlengine.c (html_engine_draw): fix the region we choose to
14574
draw on the toplevel clue.
14576
2000-04-18 Radek Doulik <rodo@helixcode.com>
14578
* htmltextarea.c (html_textarea_init): like bellow
14580
* htmlselect.c (html_select_init): like bellow
14582
* htmlcheckbox.c (html_checkbox_init): like bellow
14584
* htmlradio.c (html_radio_new): like bellow
14586
* htmlbutton.c (html_button_init): like bellow
14588
* htmltextinput.c (html_text_input_init): use
14589
html_embedded_set_widget and simplifed
14591
2000-04-17 Radek Doulik <rodo@helixcode.com>
14593
* htmlembedded.h: caching of width and height of widget to
14596
* htmlembedded.c (html_embedded_set_widget): new function, used to
14597
set widget for embedded object
14598
(request): new gignal handler
14599
(allocate): new gignal handler
14600
(calc_min_width): use allocation only if widget is already
14602
(calc_size): likewise
14604
2000-04-17 Ettore Perazzoli <ettore@helixcode.com>
14607
(save): Changed <br> output policy: we now output them only if the
14608
paragraph is of style HTML_CLUEFLOW_STYLE_NORMAL and it's the
14609
first in its parent clue.
14611
* htmllinktextmaster.c
14612
(html_link_text_master_new_with_size): New function.
14613
(html_link_text_master_new): Rewritten by means of it.
14614
(get_selection): New function, implementing the
14615
`HTMLObject::get_selection()' method for `HTMLLinkTextMaster's.
14616
(html_link_text_master_class_init): Install it.
14617
(html_link_text_master_init): New arg @len.
14620
(copy): Added missing instructions to copy certain struct members.
14622
* htmlengine-edit-paste.c
14623
(update_cursor_position): Removed.
14624
(do_paste): Use `html_engine_cut_buffer_count()' instead. Also,
14625
fix updating the cursor while pasting empty paragraphs, by calling
14626
`skip()' whenever we encounter two consecutive HTMLClueFlows in
14629
* htmlengine-cutbuffer.c
14630
(html_engine_cut_buffer_count): New function.
14632
* htmlengine-edit-cut.c
14633
(html_engine_cut): Disable the selection with
14634
`html_engine_disable_selection()'.
14636
* htmlengine-cutbuffer.c
14637
(html_engine_cut_buffer_dup): Make it work.
14639
2000-04-17 Radek Doulik <rodo@helixcode.com>
14641
* htmlengine.c (display_search_results): use html_engine_jump_to_object
14643
* htmlclueflow.c (search_text): implemented backward substring
14644
search, also search backwards thru childern
14645
(search_text): fixed ClueFlow traversing, fixed backward substring
14646
and updated regex search for backward search
14648
2000-04-16 Radek Doulik <rodo@helixcode.com>
14650
* gtkhtml.c (search): set regular when showing dialog again
14652
2000-04-16 Larry Ewing <lewing@helixcode.com>
14654
* testgtkhtml.c (stop_cb): the stream handler takes care of
14655
killing the stream.
14657
* htmlengine.c (html_engine_select_region): remove small leak.
14659
2000-04-17 Ettore Perazzoli <ettore@helixcode.com>
14662
(search): Added missing `GTK_WIDGET()' cast.
14664
* htmlengine-edit-cut.c: Rewritten to use the new cursor/region
14665
handling code. Also implemented support for undo and redo.
14667
* htmlengine-edit-paste.c
14668
(closure_destroy): Use `html_cut_buffer_destroy ()'.
14669
(html_engine_paste_buffer): New function.
14671
* htmlengine-edit-paste.c
14672
(action_data_from_cut_buffer): Use the new function
14673
`html_engine_cut_buffer_dup()'.
14675
* htmlengine-cutbuffer.c
14676
(html_engine_cut_buffer_destroy): Removed arg @engine.
14677
(html_engine_cut_buffer_dup): New function.
14679
2000-04-17 Ettore Perazzoli <ettore@helixcode.com>
14681
* htmlengine.c (html_engine_destroy): Remove the timeout
14682
associated with `timerId', if any.
14684
2000-04-15 Ettore Perazzoli <ettore@helixcode.com>
14687
(destroy): Made the code readable.
14689
* htmlengine-edit-delete.c
14690
(delete_different_parent): Make the style of the second paragraph
14691
"win" over that of the first one, so that inserting a paragraph
14692
break is specular to removing it.
14694
* htmlengine-edit-paste.c
14695
(update_cursor_position): Changed to return the number added to
14696
the cursor's position counter.
14697
(do_paste): New function, doing all of the pasting work previously
14698
done by `html_engine_paste()'. Also return the number of
14699
character elements pasted.
14700
(do_undo): New function, implementing the "undo" action.
14701
(do_redo): New function, implementing the "redo" action.
14702
(setup_undo): New function, to set up the "undo" action.
14703
(setup_undo): New function, to set up the "redo" action.
14704
(html_engine_paste): Rewritten to use these new function, and
14705
support undo properly.
14707
2000-04-15 Radek Doulik <rodo@helixcode.com>
14709
* htmlsearch.c (html_search_new): updated to use GNU regex when
14712
* htmlclueflow.c (search_text): likewise
14714
* htmltextslave.c (fit_line): removed eating of spaces at the
14715
beggining of line. Lewing please could you take a look at it?
14716
Is it ok to remove?
14718
2000-04-15 Ettore Perazzoli <ettore@helixcode.com>
14720
* htmlengine-edit-delete.c
14721
(html_engine_delete): Restore the original `position' value in the
14722
cursor after deleting.
14724
* htmlengine-edit-paste.c
14725
(skip): If this is the last HTMLClueFlow (`next' is NULL), put the
14726
cursor at the end of the current object.
14728
* htmlengine-edit-paste.c
14729
(html_engine_paste): Handle correct pasting of empty
14730
HTMLClueFlows. Also, removed unused variable.
14733
(get_selection): Unselect the copy obtained through
14734
`html_object_dup()'.
14736
2000-04-14 Ettore Perazzoli <ettore@helixcode.com>
14738
* htmlengine-edit-paste.c
14739
(split_first_clueflow_at_cursor): Trigger a recalculation of
14740
everything in the dupped HTMLClueFlow with
14741
`html_object_change_set()'.
14742
(add_new_clueflow): Likewise.
14743
(html_engine_paste): Likewise.
14745
2000-04-15 Radek Doulik <rodo@helixcode.com>
14747
* htmlsearch.c (html_search_new): use POSIX calls instead of GNU
14748
for better portability
14750
* htmlclueflow.c (search): use cur = HTML_OBJECT
14751
(info->found->data) instead of g_list_last (found) as we don't
14752
want miss something :)
14753
(search_text): use POSIX calls instead of GNU for better portability
14755
2000-04-14 Ettore Perazzoli <ettore@helixcode.com>
14757
* htmlengine-edit-paste.c: Cleaned up and made robust. I also
14758
added a few g_assert()s around in the process, just to make sure
14759
things are really working.
14760
(skip): Don't touch the cursor's position counter.
14761
(html_engine_paste): Likewise.
14762
(update_cursor_position): New helper function, for updating the
14763
position counter correctly.
14764
(prepare_clueflows): New param `append'. If true, handle creation
14765
of clueflows for the case in which append to the current object
14766
instead of prepending to it.
14767
(html_engine_paste): Pass the appropriate `append' value to
14768
`prepare_clueflows()'.
14769
(add_empty_text_master_to_clueflow): New helper function.
14770
(split_first_clueflow_at_cursor): Use it.
14771
(prepare_clueflows): If the last HTMLClueFlow is not followed by
14772
anything, add an empty HTMLTextMaster to it using
14773
`add_empty_text_master_to_clueflow()'.
14775
* htmlengine-edit-insert.c
14776
(html_engine_insert_para): Increment cursor's position counter.
14778
* htmlengine-edit-paste.c
14779
(split_at_cursor): In the case of a non-text object, return
14780
`FALSE' if the offset is zero; otherwise, return `TRUE'.
14781
(skip): If the following object is NULL, go at the beginning of
14782
the following HTMLClueFlow.
14783
(prepare_clueflows): Add the clueflows in the right position.
14785
* htmlengine-edit-paste.c: Use `gtk_html_debug_dump_tree_simple()'
14786
instead of `gtk_html_debug_dump_tree()' which is way too verbose.
14789
(gtk_html_debug_dump_tree_simple): New function.
14790
(gtk_html_debug_dump_list_simple): New function.
14792
* gtkhtml-keybinding.c
14793
(paste): New function.
14794
(handle_ctrl): Bind it to `C-y'.
14795
(cut): New function.
14796
(handle_ctrl): Bind it to `C-w'.
14797
(copy): New function.
14798
(handle_alt): Bind it to `M-w'.
14800
* htmlundo-action.h: Changed `description' not to be const
14803
* htmlengine-edit-selection-updater.c
14804
(reduce_selection): Unset the selection for HTMLClueFlows
14807
2000-04-14 Radek Doulik <rodo@helixcode.com>
14809
* gtkhtml-search.c (gtk_html_search_dialog_new): updated to
14812
* gtkhtml.c (gtk_html_search_regex): new function to invoke regex
14815
* htmlclueflow.c (search_text): use regex for search_regex
14817
* htmlsearch.c (html_search_new): use ENTITY_NBSP in translation
14818
table, so 's will be correctly translated to spaces when
14820
(html_search_new): updated to support regex
14822
* htmlentity.h (ENTITY_NBSP): ENTITY_NBSP moved here as it is used
14825
* htmlsearch.c (html_search_new): added translation table for
14826
non-case-sensitive searches
14827
(html_search_destroy): destroy trans table
14829
* htmlclueflow.c (search): added test for search_next as clueflow
14830
could also act as any other clue, so may contain non-text childern
14832
* htmlengine.c (html_engine_search): search for text and selects
14834
(html_engine_search_next): continue search
14836
* gtkhtml.c (gtk_html_search): activate search dialog
14837
(gtk_html_search_next): search_next or activate search dialog,
14838
when no previous search was done
14840
* gtkhtml-search.c (gtk_html_search_dialog_new): new ctor
14841
(gtk_html_search_dialog_destroy): new dtor
14842
(gtk_html_search_dialog_run): run search dialog
14844
* gtkhtml-search.h: new file - interface for Search dialog
14846
* htmlsearch.c (html_search_new): new ctor
14847
(html_search_destroy): new dtor
14848
(html_search_push): push for stack of callers - this stack is
14849
for search_next to continue Object tree traversing
14850
(html_search_pop): pop for stack of callers
14851
(html_search_child_on_stack): test if on top of stack is child of obj
14853
* htmlsearch.h: new file, contains definition of HTMLSearch helper
14854
structure and its interface func's
14856
* Makefile.am (libgtkhtml_HEADERS): replaced gtkhtml-search.c with
14857
gtkhtml-search.h added htmlsearch.[ch], gtkhtml-search.[ch]
14859
2000-04-13 Larry Ewing <lewing@helixcode.com>
14861
* htmlgdkpainter.c (draw_pixmap): do full alpha-blending on
14862
images. This is just testing code right now, and everything is
14863
the same as it used to be if you turn off gdk_painter->alpha. It
14864
is dog slow for animations, but that is easy enough to fix.
14865
(draw_background_pixmap): fix the optimized draw_background_pixmap
14866
to work for transparent images in table cells again (check
14867
http://www.helicode.com/ for the rendering problems this fixes).
14869
* htmlimage.c (html_image_factory_frame_done): make the signature
14870
of the signal that is now being emitted for frame done. This
14871
looks like a recent bug fix in gdk-pixbuf, you will need to update
14874
2000-04-12 Ettore Perazzoli <ettore@helixcode.com>
14876
* htmlengine-edit-clueflowstyle.c: Rewritten in a better, cleaner
14877
way, taking advantage of the changes in cursor and selection
14880
* htmlengine-edit-selection-updater.c: Use `HTMLCursor''s member
14881
`position' instead of `relative_position', which is now gone.
14883
* htmlengine-edit-paste.c
14884
(skip): Update `position' in the cursor, instead of
14885
`relative_position', which is now gone.
14886
(html_engine_paste): Likewise.
14888
* htmlengine-edit-insert.c
14889
(html_engine_insert): Use `html_cursor_get_position()' instead of
14890
using the relative position. Also, don't reset the relative
14894
(do_action): Don't call `html_cursor_set_relative()'. Instead,
14895
use `html_cursor_jump_to_position()' to restore the cursor
14897
(html_undo_discard_redo): Set `redo_stack' to NULL.
14899
* htmlundo-action.c
14900
(html_undo_action_new): Strdup the description before storing it
14902
(html_undo_action_destroy): Free the description.
14904
* htmlundo-action.h: Member `relative_position' replaced by member
14907
* htmlcursor.c: Updated to use `position' instead of
14908
`relative_position' throughout.
14909
(html_cursor_home): Do not call `html_cursor_reset_relative()'
14911
(html_cursor_get_relative): Removed.
14912
(html_cursor_set_relative): Removed.
14913
(html_cursor_reset_relative): Removed.
14914
(html_cursor_goto_zero): Removed.
14915
(html_cursor_set_position): Removed.
14916
(html_cursor_get_position): New function.
14917
(html_cursor_jump_to_position): New function.
14919
* htmlcursor.h: Member `relative_position' removed. New member
14923
(html_undo_add_undo_action): Don't destroy the redo list.
14925
* htmlengine-edit-selection-updater.c
14926
(extend_selection): Use `html_cursor_precedes()'.
14927
(reduce_selection): Use `html_cursor_precedes()' and
14928
`html_cursor_follows()'.
14931
(html_cursor_precedes): New function.
14932
(html_cursor_follows): New function.
14933
(html_cursor_get_current_char): Made const-safe.
14935
* htmlengine-edit-selection-updater.c
14936
(extend_selection): Updated to use `html_object_next_for_cursor()'
14937
and `html_object_prev_for_cursor()' instead of
14938
`html_cursor_forward_object()' and
14939
`html_cursor_backward_object()'.
14940
(reduce_selection): Likewise.
14943
(forward_object): Rewritten to only take and return an `HTMLObject
14945
(forward): Updated accordingly.
14946
(html_cursor_forward_object): Removed.
14947
(html_next_object_for_cursor): New function.
14948
(backward_object): Rewritten to only take and return an
14950
(backward): Updated accordingly.
14951
(html_cursor_backward_object): Removed.
14952
(html_prev_object_for_cursor): New function.
14955
(html_clueflow_indent): Added preconditions for @engine.
14956
(html_clueflow_set_halignment): Likewise.
14957
(html_clueflow_set_style): Likewise.
14958
(html_clueflow_set_properties): Likewise.
14959
(html_clueflow_get_style): New function.
14960
(html_clueflow_get_halignment): New function.
14961
(html_clueflow_set_indentation): New function.
14962
(html_clueflow_get_indentation): New function.
14964
2000-04-12 Radek Doulik <rodo@helixcode.com>
14966
* htmltablecell.c (draw_background_helper): as below
14968
* htmlengine.c (draw_background): update to use modified
14969
draw_background_pixmap
14971
* htmlgdkpainter.c (draw_background_pixmap): changed
14972
functionality, instead of width and height it has tile_width and
14973
tile_height args and do bgPixmap tiling
14975
2000-04-11 Radek Doulik <rodo@helixcode.com>
14977
* htmltable.c (calc_size): do calc_col_info only when min_width
14979
(calc_preferred_width): likewise
14981
2000-04-11 Ettore Perazzoli <ettore@helixcode.com>
14984
(html_engine_disable_selection): Handle the mark only if the
14985
engine is editable.
14986
(html_engine_set_editable): Disable the selection before changing
14987
the editable state.
14990
(motion_notify_event): Do not set the mark if not editable.
14992
2000-04-11 Ettore Perazzoli <ettore@helixcode.com>
14994
* htmlengine-edit-cut.c
14995
(html_engine_cut): Use `html_engine_disable_selection()' instead
14996
of `html_engine_unselect_all()'.
14999
(button_press_event): Use `html_engine_disable_selection()'
15000
instead of `html_engine_unselect_all()'.
15001
(selection_clear_event): Likewise.
15003
* gtkhtml-keybinding.c
15004
(forward): Don't unselect the region.
15005
(backward): Likewise.
15008
(beginning_of_line): Likewise.
15009
(end_of_line): Likewise.
15010
(page_up): Likewise.
15011
(page_down): Likewise.
15012
(forward_word): Likewise.
15013
(backward_word): Likewise.
15014
(beginning_of_document): Likewise.
15015
(end_of_document): Likewise.
15016
(delete): Use `html_engine_disable_selection()' instead of
15017
`html_engine_unselect_all()'.
15018
(insert_para): Likewise.
15019
(handle_none): Likewise.
15020
(unselect_all): Removed.
15021
(disable_selection): New function.
15022
(handle_ctrl): Map it to `C-g'.
15025
(html_engine_disable_selection): New function.
15028
(forward): After going to the next object, increment the offset by
15029
one if it is the first child.
15031
* htmlengine-edit-movement.c
15032
(update_selection_if_necessary): New helper function.
15033
(html_engine_move_cursor): Call it to update the selection when
15035
(html_engine_end_of_document): Likewise.
15038
(html_engine_init): Initialize `selection_updater'
15039
(html_engine_destroy): Destroy it.
15041
* htmlengine.h: New member `selection_updater' in `HTMLEngine'.
15043
* htmlengine-edit-selection-updater.h: New file.
15044
* htmlengine-edit-selection-updater.c: New file.
15047
(html_cursor_equal): Made params const-safe.
15050
(html_engine_unselect_all): Do not destroy the mark if it is NULL.
15052
* htmlengine.c (parse_h): Center `<hr>'s by default.
15054
2000-04-11 Larry Ewing <lewing@helixcode.com>
15056
* htmlimage.c (get_actual_height):
15057
(get_actual_width): copy netscapes method of scaling the image in
15058
both dimensions even in only one dimension is specified. This
15059
should fix the flag problems on http://www.suse.com/
15061
* htmlengine.c (parse_table): fix typo in alignment parsing.
15063
2000-04-11 Darin Adler <darin@eazel.com>
15065
* htmlgdkpainter.c: (create_temporary_pixbuf), (drawpixmap):
15066
Updated for new GdkPixbuf.
15068
* htmlimage.c: (html_image_animation_new),
15069
(html_image_animation_start), (html_image_animation_timeout),
15070
(render_cur_frame), (animation_actual_width),
15071
(animation_actual_height): Updated for new GdkPixbuf.
15073
2000-04-11 Radek Doulik <rodo@helixcode.com>
15075
* htmlengine.c (html_engine_update_event): removed if (e->parsing)
15076
around scrollbars updating - does anybody know why it was here?
15077
(html_object_changed): removed definition of
15078
html_engine_update_event and html_engine_schedule_update as it was
15079
already defined above
15081
* htmltokenizer.c: rewritten tokenizer blocking - I have removed
15082
Blocking token struct as it is no more needed
15083
added tokens_num and blocking_tokens_num counters to tokenizer struct
15084
(html_tokenizer_blocking_push): new function, blocking now works
15085
as simple stack implemented with GList containing HTMLTokenType's
15086
(html_tokenizer_blocking_pop): pop from blocking stack
15087
(html_tokenizer_blocking_get_name): get name of TokenType on top
15089
(html_tokenizer_has_more_tokens): it is now so simple :)
15090
(html_tokenizer_write): updated to use new blocking
15092
2000-04-11 Ettore Perazzoli <ettore@helixcode.com>
15095
(draw): Fixed bogus brace placement that caused aligned rules not
15096
to be laid out correctly.
15099
(parse_table): Do not override horizontal alignment if no
15100
alignment is specified. Also removed some bogus code.
15101
(parse_h): Removed bogus horizontal alignment assignment.
15103
2000-04-11 Ettore Perazzoli <ettore@helixcode.com>
15106
(parse_table): No longer make tables centered when they have a
15107
percent or absolute width. This is not correct as far as I know.
15109
2000-04-11 Ettore Perazzoli <ettore@helixcode.com>
15112
(forward_object): New helper function.
15114
(html_cursor_forward_object): New function.
15115
(backward_object): New helper function.
15116
(backward): Use it.
15117
(html_cursor_backward_object): New function.
15118
(html_cursor_home): Changed so that it does not need
15119
`html_cursor_forward()' anymore.
15121
* gtkhtml-keybinding.c
15122
(set_mark): New helper function.
15123
(handle_ctrl): Bind it to the `C-SPC'.
15124
(unselect_all): New function.
15125
(handle_ctrl): Bind it to `C-g'.
15127
* htmlengine-edit.c
15128
(html_engine_set_mark): New function.
15129
(html_engine_redo): Added precondition: @e must be editable.
15130
(html_engine_undo): Likewise.
15133
(html_engine_init): Initialize `mark' to NULL.
15134
(html_engine_destroy): Destroy `mark' if not NULL.
15135
(html_engine_unselect_all): Destroy `mark' and set it to NULL.
15137
* htmlengine.h: New member `mark' in `HTMLEngine'.
15139
2000-04-10 Larry Ewing <lewing@helixcode.com>
15141
* htmlpainter.h: added new GtkHTMLEtchStyle enum and change the
15142
draw_panel argument types to match.
15144
* htmlgdkpainter.c (draw_panel): change inset type to
15145
GtkHTMLEtchStyle enum. For GTK_HTML_ETCH_NONE draw in the current
15147
(create_temporary_pixbuf): remove unused variables and function
15150
* htmlpainter.c (html_painter_draw_panel): change inset type.
15152
* htmlprinter.c (draw_panel): change inset type.
15153
(do_rectangle): remove color set to black.
15155
* htmlrule.c (draw): call html_painter_draw_panel with proper
15158
* htmltable.c (draw): call html_painter_draw_panel with proper
15161
* htmlimage.h: added color variables to image structure.
15163
* htmlimage.c (reset): clear color_allocated flag.
15164
(copy): copy the new color information.
15165
(draw): pass the new panel type flag. Draw the image border if we
15166
have one, and pass the hightlight color to the animation.
15167
(html_image_class_init): use the new reset.
15168
(html_image_init): added color argument and initialized the color
15170
(html_image_new): added color argument.
15171
(render_cur_frame): added highlight color argument, and used it.
15173
* htmlimageinput.c (html_imageinput_init): call html_image_new
15174
with proper arguments.
15176
* htmlengine.c (parse_i): pass the current color to html_image_new
15177
for drawing borders.
15179
2000-04-10 Radek Doulik <rodo@helixcode.com>
15181
* htmltokenizer.c (html_token_buffer_new): constructor of new
15182
structure HTMLTokenBuffer
15183
(html_token_buffer_destroy): new destructor
15184
(html_token_buffer_append_token): append token to token buffer
15185
(html_tokenizer_new): use HTMLTokenBuffer's
15186
(html_tokenizer_next_token): rewritten to use HTMLTokenBuffer's
15187
(html_tokenizer_has_more_tokens): likewise
15188
(html_tokenizer_reset): updated to HTMLTokenBuffer's
15189
(html_tokenizer_begin): updated to HTMLTokenBuffer's
15190
(html_tokenizer_append_token): rewritten
15191
(html_tokenizer_append_token_buffer): rewritten
15193
* htmltokenizer.h: cleaned interface - most of tokenizer functions
15194
are now static, whole tokenizer structure is private
15196
* htmltokenizer.c: rewritte of token buffers
15198
2000-04-09 Radek Doulik <rodo@helixcode.com>
15200
* htmlengine.c (parse_table): save e->noWrap in noWrap_save and
15201
restore it on return (this fixes case when there are nested table
15202
cells with nowrap option set)
15204
* gtkhtmldebug.c (gtk_html_debug_dump_tree): dump also min_width
15206
* htmltext.c (insert_text): set change flags
15207
(remove_text): likewise
15209
* htmlclueflow.c (html_clueflow_split): set change flags for
15212
* htmltext.c (split): set min_width change flag for original Text
15214
* htmlimage.c (html_image_factory_area_prepared): set change flags on images using this image_ptr
15216
* htmltextslave.c (html_text_slave_init): clear min_width change
15217
bit as textslaves have min_width always 0
15219
* htmlclue.c (html_clue_append_after): added call to html_object_change_set
15220
(html_clue_append): likewise
15221
(html_clue_prepend): likewise
15222
(html_clue_append_right_aligned): likewise
15223
(html_clue_append_left_aligned): likewise
15225
* htmlobject.c (html_object_change_set): new function - set change
15226
flags of object and of all its parents
15228
* htmlobject.h: new enum for change flag bits
15229
flag for info about cached info added to HTMLObject
15230
added min_width to cache calc_min_width
15232
* htmlengine.c (draw_background): fill with bgColor also when it
15233
has background pixmap, because it could contain transparent
15234
pixels as www.post.cz
15236
2000-04-09 Ettore Perazzoli <ettore@helixcode.com>
15239
(html_image_factory_end_pixbuf): Changed param types to match new
15240
GtkHTMLStream stuff.
15241
(html_image_factory_write_pixbuf): Likewise.
15244
(html_engine_write): Get a `GtkHTMLStream *' instead of a
15245
`GtkHTMLStreamHandle' as the @handle param.
15246
(html_engine_end): Likewise.
15248
* gtkhtml-private.h
15249
(gtk_html_private_calc_scrollbars): Prototype moved here.
15251
* gtkhtml-private.h: Removed GtkHTMLStream functions and typedefs.
15253
* gtkhtmlstream.h: New file, header for `gtkhtmlstream.c'.
15255
* gtkhtml-stream.c: Renamed from `htmlstream.c'. Cleaned up a
15256
little, and added preconditions. Use `GtkHTMLStream *' instead of
15257
`GtkHTMLStreamHandle' all over the place.
15258
(gtk_html_stream_ref): Removed.
15259
(gtk_html_stream_unref): Removed.
15260
(gtk_html_stream_destroy): New function.
15261
(gtk_html_stream_close): Renamed from `gtk_html_stream_end'.
15262
(gtk_html_stream_new): Removed param @url.
15265
(set_color): New helper function.
15266
(draw_line): Set the line width to `PIXEL_SIZE' before drawing.
15267
(draw_rect): Likewise.
15268
(do_request_delete): Helper function.
15269
(draw_rect): Use it.
15270
(draw_panel): Use it.
15272
2000-04-08 Larry Ewing <lewing@helixcode.com>
15274
* htmlengine.c (parse_table): change the default alignment for
15275
percent and fixed width tables to HTML_HALIGN_CENTER.
15277
* htmlimage.c (html_image_animation_stop): change argument to
15278
HTMLImageAnimation.
15279
(html_image_animation_destroy): call html_image_animation_stop
15280
before we destroy the animation so we don't get a stray timeout.
15282
2000-04-08 Larry Ewing <lewing@helixcode.com>
15284
* htmltablecell.c (draw_background_helper): account for pixel_size
15285
when drawing background color and pixmaps.
15286
(draw): account for pixel_size when checking bounds.
15288
* htmlengine.c (parse_h): set the default size of rules to 2 pixels.
15289
(html_engine_update_event): Jump to the anchor after adjusting the
15290
document bounds and Keep jumping to the position of the
15291
anchor. This corrects some problems when the layout changes but
15292
is still a bit of a hack.
15293
(html_engine_begin): remember to strip the leading # from the
15294
value we look up so that we look for the same thing we store.
15295
Always free the reference before setting it now that we don't
15296
constantly remove it.
15298
* htmlrule.c (calc_size): mimic the netscape behaviour by having a
15299
minimum hr size then padding every larger size with one pixel on
15301
(draw): use html_painter_draw_panel/rect to properly support the
15302
size arguments and set the pen color for noshade. Also make sure
15303
that we always put the extra padding at the bottom of the rule.
15305
2000-04-07 Radek Doulik <rodo@helixcode.com>
15307
* htmlimage.c (draw): use 1st frame when printing
15309
2000-04-06 Radek Doulik <rodo@helixcode.com>
15311
* htmltokenizer.c (html_tokenizer_end): destroy blocking tokens to
15314
* htmlengine.c (parse_a): moved target = g_strdup (p + 7); behind
15315
#if 0 to not leak memory
15317
* htmltokenizer.c (html_tokenizer_write): g_free blocking token
15319
* htmlembedded.c (destroy): if widget has parent then destroy else
15322
* htmltable.c (destroy): loop thru allocRows and not thru
15324
removed add_row_info one line function as it has been used only
15325
once, from HTMLTable removed rowInfo as it has ben used only in
15327
(calc_col_info): g_free rowInfo
15329
2000-04-06 Ettore Perazzoli <ettore@helixcode.com>
15331
* htmlengine-edit-clueflowstyle.c: Added members `mask',
15332
`alignment' to `SetClueFlowStyleForallData'.
15333
(set_clueflow_style_in_region_forall): Change the attributes
15334
associated with the bits set in `mask'.
15336
* htmlengine-edit-clueflowstyle.h: Fix typo in
15337
`HTMLEngineSetClueFlowStyleMast': `ENGNIE' -> `ENGINE'.
15340
(html_rule_new): @max_width renamed to @length.
15341
(html_rule_init): Likewise. Set `rule->lenght' and update the
15342
`FIXEDWIDTH' flag appropriately. Do not set ascent/descent here.
15343
But do set the new member `size'.
15344
(calc_min_width): Do the Right Thing.
15345
(draw): Display the correct width, using `max_width' instead of
15346
`width' as appropriate.
15347
(calc_size): New function, implementation of
15348
`HTMLObject::calc_size()'.
15349
(html_rule_class_init): Install it.
15351
* htmlrule.h: New members `length' and `size' in `HTMLRule'.
15354
(html_text_init): Respect the passed length param @len properly.
15357
(gtk_html_debug_dump_tree): Print `text_len' for text objects too.
15359
* htmlengine-edit-delete.c
15360
(delete_same_parent): Prevent NULL crash.
15362
2000-04-06 Radek Doulik <rodo@helixcode.com>
15364
* htmlimage.c (html_image_factory_area_prepared): ref pixbuf
15365
(html_image_factory_frame_done): ref animation
15366
(html_image_factory_end_pixbuf): unref loader instead of only
15368
(html_image_factory_area_prepared): catch only first pixbuf
15369
(copy): use g_strdup for url and target
15370
(destroy): g_free url and target
15372
* htmlcluev.c (html_cluev_class_init): removed FIXME as it don't
15375
* htmltablecell.c (html_table_cell_unlink): removed FIXME, use
15376
html_object_destroy instead of g_free
15377
(html_table_cell_class_init): removed FIXME for destroy as cell
15378
has no allocated mem and so don't need it (clue destroy is called
15379
instead by html_object_destroy)
15381
* htmlform.c (html_form_destroy): destroy elements
15383
* htmlimage.c (html_image_animation_destroy): g_free HTMLImageAnimation
15385
* testgtkhtml.c (parse_href): added 3x html_url_destroy (tmpurl);
15387
* htmltable.c (destroy): free table->cells
15388
(destroy): free table->rowInfo
15389
(add_columns): use g_new instead of g_malloc
15390
(destroy): added g_array_free
15392
* htmlimage.c (html_image_pointer_destroy): unref animation
15394
2000-04-06 Ettore Perazzoli <ettore@helixcode.com>
15397
(relayout): Use `prev_ascent' and `prev_descent' instead of the
15398
values in yourself as they are set to zero after the call to
15399
`html_object_reset()'.
15401
2000-04-06 Ettore Perazzoli <ettore@helixcode.com>
15404
(draw): Do not set `width', `ascent'.
15405
(calc_min_width): New function, implementation of
15406
`HTMLObject::calc_min_width()'.
15407
(calc_size): New function, implementation of
15408
`HTMLObject::calc_size()'.
15411
(calc_size): New function, implementation of
15412
`HTMLObject::calc_size()'.
15413
(calc_min_width): New function, implementation of
15414
`HTMLObject::calc_min_width()'.
15415
(html_embedded_class_init): Install them.
15417
2000-04-06 Ettore Perazzoli <ettore@helixcode.com>
15420
(animation_actual_width): Return `w'. Made static.
15421
(animation_actual_height): Return `h'. Made static.
15424
(draw): Don't paint anything unless we have at least
15427
2000-04-06 Ettore Perazzoli <ettore@helixcode.com>
15430
(reset): New function, implementation of `HTMLObject::reset()'.
15431
Set `bg_allocated' to `FALSE'.
15434
(reset): New function, implementation of `HTMLObject::reset()'.
15435
Set `color_allocated' to `FALSE' so that we don't get fooled if
15436
the painter changes.
15437
(html_text_class_init): Install the method.
15440
(calc_size): Use the pixel size, dammit!
15442
2000-04-06 Ettore Perazzoli <ettore@helixcode.com>
15445
(set_max_width): Set the maximum width from `max_width', not
15448
* htmlimage.c (get_actual_width): Calculate width based on the
15449
percent value using double arithmetic to avoid overflow.
15450
* htmlrule.c (draw): Likewise.
15451
* htmltable.c (calc_col_info): Likewise.
15452
* htmltable.c (scale_columns): Likewise.
15453
* htmltable.c (calc_column_widths): Likewise.
15454
* htmltable.c (calc_size): Likewise.
15457
(scale_columns): Calculate proportions through doubles to avoid
15460
2000-04-05 Radek Doulik <rodo@helixcode.com>
15462
* htmlengine-edit-paste.c (split_first_clueflow_at_cursor): removed strdup
15464
* htmllinktext.c (split): removed strdup, set text_len to new value
15466
* htmltextmaster.c (get_selection): removed strdup
15468
* htmlengine-edit-insert.c (html_engine_insert_para): removed strdup
15469
(do_insert_different_style): removed strdup
15470
(do_insert_not_text): removed strdup
15472
* htmlengine.c (insert_text): removed strdup
15473
(create_empty_text): removed strdup
15474
(ensure_editable): removed strdup
15476
* htmltextmaster.c (html_text_master_init): new arg len
15477
(html_text_master_new_with_len): new constructor
15479
* htmltext.c (html_text_init): now uses g_str(n)dup, new arg len
15480
(destroy): new destructor
15481
(html_text_new_with_len): new constructor
15483
2000-04-05 Larry Ewing <lewing@helixcode.com>
15485
* htmltable.c (calc_size): set the table width after we have
15486
calculated the optimal size. Fixes rendering of tables with
15487
borders (tests/test6.html).
15489
2000-04-05 Ettore Perazzoli <ettore@helixcode.com>
15492
(calc_col_info): If the size is specified as a percent value, then
15493
we *don't* want to set the minimum size as the percentage of the
15497
(set_max_width): Don't set the width.
15500
(set_max_width): Don't set the width.
15503
(set_max_width): Don't set the width.
15506
(set_max_width): Don't set the width.
15508
* htmlcluealigned.c
15509
(html_cluealigned_init): Don't set the width. Broken!
15512
(calc_min_width): Don't be stupid and don't set the minimum width
15513
to the current width when you are a fixed width object.
15514
(calc_preferred_width): Likewise for the preferred width.
15517
(get_right_margin): Use the maximum width instead of the max
15518
between the maximum width and the effective one for calculating
15520
(set_max_width): Always set `max_width', even if we are a
15521
fixed-width object.
15524
(parse_h): Set `divAlign' according to the value of the "align="
15525
attribute, and save the old value through the first arg in
15527
(block_end_clueflow_style): Set `divAlign' from `miscData1'.
15528
(parse_p): Pass the current `divAlign' as the first misc arg in
15530
(parse_a): Likewise.
15531
(parse_h): Likewise.
15532
(draw_background): Made static.
15534
2000-04-05 Ettore Perazzoli <ettore@helixcode.com>
15537
(parse_href): Make sure `tmpurl' is always destroyed.
15540
(do_layout): If we are doing the layout from scratch, initially
15541
set the width to zero.
15544
(reset): Invoke the parent class' reset implementation too.
15547
(reset): Set width, descent and ascent to zero.
15550
(calc_min_width): Do not set the object's width.
15554
(a_colinfo): Removed.
15555
(COLUMN_INFO): New, saner macro replacing it.
15556
(a_coltype): Removed.
15557
(COLUMN_TYPE): New, saner macro replacing it.
15558
(a_columnpos): Removed.
15559
(COLUMN_TYPE): New, saner macro replacing it.
15560
(a_columnprefpos): Removed.
15561
(COLUMN_PREF_POS): New, saner macro replacing it.
15562
(a_colspan): Removed.
15563
(COLUMN_SPAN): New, saner macro replacing it.
15564
(a_columnopt): Removed.
15565
(COLUMN_OPT): New, saner macro replacing it.
15566
(a_rowheights): Removed.
15567
(ROW_HEIGHT): New, saner macro replacing it.
15568
(calc_col_info): Consider pixel size throughout.
15569
(optimize_cell_width): Likewise.
15570
(scale_columns): Likewise.
15571
(calc_column_widths): Likewise.
15572
(calc_row_heights): Likewise.
15573
(calc_size): Likewise.
15575
(html_table_new): Removed params @x, @y, @max_width.
15576
(html_table_init): Likewise. Initialize `specified_width'.
15577
Removed broken percent handling.
15578
(calc_size): Use `html_object_set_max_width' instead of
15579
`html_table_cell_set_width()'.
15580
(calc_col_info): Use `specified_width' for the size.
15581
(calc_size): If the object has a fixed width or has a
15582
percent-specified size, set the width accordingly and then call
15583
`optimize_cell_width()'. Otherwise, just set the width and avoid
15584
calling `optimize_cell_width()'.
15586
* htmltable.h: Renamed `ColType' to `ColumnType' and changed the
15587
value names so that they make more sense. `ColInfo_t' renamed to
15588
`ColumnInfo'. `RowInfo_t' renamed to `RowInfo'. New member
15589
`specified_width' in `HTMLTable'.
15592
(calc_min_width): Use the pixel size when dealing with `hspace'
15594
(calc_preferred_width): Likewise.
15595
(calc_size): Likewise.
15598
(html_table_cell_init): Remove parameter `max_width'. Initialize
15599
`fixed_width' to be zero. Also, do not set the object's `width'
15600
field here. This is BROKEN!
15601
(html_table_cell_new): Remove parameter `max_width'.
15602
(html_table_cell_set_width): Removed.
15603
(html_table_cell_set_fixed_width): New function.
15604
(calc_min_width): Use `fixed_width' instead of `maxWidth'. Also,
15605
consider the pixel size as retrieved through
15606
`html_painter_get_pixel_size()'.
15608
* htmltablecell.h: New member `fixed_width' in `HTMLTableCell'.
15611
(html_cluev_new): Removed parameter `max_width'.
15612
(html_cluev_init): Likewise.
15615
(parse_t): Do not suppress paragraphs after the table.
15618
(html_text_slave_trail_space_width): Always return zero for a
15621
2000-04-05 Larry Ewing <lewing@helixcode.com>
15623
* htmlimage.c (html_image_animation_timeout): use html_engine_draw
15624
instead of trying to start the painter by hand. Make a
15625
delay_time == 0 behave the same as delay_time == 1 to make sure we
15626
have some idle time (this seems to be what netscape does too).
15627
(render_cur_frame): do less work now that we are only being called
15628
from the draw method.
15629
(animation_actual_height):
15630
(animation_actual_width): quick hacks to work around bugs in
15631
gdk-pixbuf, will be removed shortly.
15633
2000-04-05 Radek Doulik <rodo@helixcode.com>
15635
* htmlclueflow.c (should_break): fixed to break between text and
15636
non-text objects, return if it shold break after obj instead as
15637
before before object (this makes http://www.stjerneskolan.com more
15638
happy, but there remains some ?table? problems)
15640
* htmlengine.c (parse_b): reset to default border size
15642
* htmltable.c (html_table_class_init): set parent_class
15644
2000-04-04 Radek Doulik <rodo@helixcode.com>
15646
* htmlimage.c (render_cur_frame): implement
15647
GDK_PIXBUF_FRAME_DISPOSE, fix: fill background rectangle first
15649
* htmlstringtokenizer.c (html_string_tokenizer_destroy): make sure
15650
that buffer exists before g_free it
15652
* htmltextarea.c (destroy): replaced html_embedded_class with parent_class
15654
* htmltable.c (destroy): replaced html_object_class with parent_class
15656
* htmlselect.c (destroy): replaced html_embedded_class with parent_class
15658
* htmlimageinput.c (destroy): replaced html_embedded_class with parent_class
15660
* htmlembedded.c (destroy): replaced html_object_class with parent_class
15662
* htmlelement.c (destroy): replaced html_object_class with parent_class
15664
* htmlclue.c (destroy): replaced html_object_class with parent_class
15666
* htmlanchor.c (destroy): added call to parent_class destroy
15668
* htmlimage.c: don't use members of GdkPixbufAnimation directly
15669
and use gdk_pixbuf functions instead, so code is cleaner now
15670
(destroy): destroy animation structure, call parent_class destroy
15671
(html_image_animation_destroy): new HTMLImageAnimation destructor
15672
(html_image_pointer_new): new constructor
15673
(html_image_pointer_destroy): new detructor
15675
2000-04-04 Larry Ewing <lewing@helixcode.com>
15677
* htmlimage.c (html_image_animation_timeout): increment the
15678
current frame after the timeout has expired so that if there is an
15679
expose event before the time is out we have the proper current image.
15680
(render_cur_frame): fix the rendering for frame->action ==
15681
GDK_PIXBUF_FRAME_DISPOSE.
15683
2000-04-04 Ettore Perazzoli <ettore@helixcode.com>
15686
(parse_h): Close the current flow before adding the object.
15688
2000-04-03 Ettore Perazzoli <ettore@helixcode.com>
15691
(init): Initialize `scroll_timeout_id' to zero.
15692
(destroy): If `scroll_timeout_id' is nonzero, remove timeout of
15693
which it is the ID.
15694
(scroll_timeout_cb): New function, handling the scroll timeout.
15695
(setup_scroll_timeout): New function to set up the scroll timeout.
15696
(remove_scroll_timeout): New function to remove the scroll
15698
(motion_notify_event): If we are selecting and the mouse gets
15699
outside the window, set up the scroll timeout so that we allow
15700
scrolling during selection.
15701
(button_release_event): Remove the scroll timeout.
15702
(gtk_html_private_calc_scrollbars): Set upper limits for the
15703
adjustments as well.
15705
* gtkhtml.h: New member `scroll_timeout_id'.
15707
2000-04-03 Radek Doulik <rodo@helixcode.com>
15709
* htmltextmaster.c (calc_min_width): rewritten calculating of
15710
min_width, instead of calling html_painter_calc_text_width for
15711
each char call it for whole words
15713
2000-04-03 Ettore Perazzoli <ettore@helixcode.com>
15716
(button_press_event): Clean up and re-indent a bit.
15719
(parse_i): Fix braino: make sure `valign' is set to
15720
`HTML_ALIGN_BOTTOM' if initially `HTML_VALIGN_NONE".
15722
2000-04-03 Ettore Perazzoli <ettore@helixcode.com>
15725
(select_range): Make sure we don't select beyond the end of the
15729
(button_release_event): Become owner of the X11 selection if we
15730
were doing a mouse selection.
15731
(selection_get): New function.
15732
(selection_clear_event): New function.
15733
(class_init): Install them as implementation of the corresponding
15734
GtkWidget virtual methods.
15735
(init): Add "STRING" selection targets to the widget.
15738
(html_engine_goto_anchor): New param @anchor. Made non-static,
15740
(html_engine_get_selection_string): New function.
15743
(gtk_html_jump_to_anchor): New function.
15746
(append_selection_string): New function,
15747
implementation of `HTMLObject::append_selection_string()'.
15748
(html_clueflow_class_init): Install it.
15751
(append_selection_string): New function, implementation of
15752
`HTMLObject::append_selection_string()'.
15753
(html_text_master_class_init): Install it.
15756
(append_selection_string): New function, default implementation of
15757
`HTMLObject::append_selection_string'
15758
(html_object_class_init): Install it.
15759
(html_object_append_selection_string): New function.
15761
* htmlobject.h: New virtual method `HTMLObject::append_selection_string'.
15763
2000-04-03 Radek Doulik <rodo@helixcode.com>
15765
* htmlimage.c (get_actual_width): updated to use
15766
GdkPixbufAnimation width
15767
(get_actual_height): the same
15768
(draw): remember image offset in HTMLImageAnimation, draw right
15771
* htmlengine.c (html_engine_begin): stop animations from last run
15772
(html_engine_end): also stop animations
15773
(html_engine_update_event): deactivate animations before completely
15776
* htmlimage.c (html_image_animation_new): contructor of
15778
(html_image_factory_stop_animations): removes animation timeout
15779
handler to stop animation
15780
(html_image_factory_deactivate_animations): sets
15781
HTMLImageAnimation::active flag to FALSE to all animations
15782
(html_image_animation_timeout): timeout handler - draws animation
15783
only if active && visible - animation drawing is now done not much
15784
efficiently as there is probably bug in gdk_pixbuf_composite which
15785
will be more efficient to use
15786
(render_cur_frame): workaround gdk_pixbuf_composite
15788
* htmlimage.h: HTMLImageAnimation structure to store some info
15789
about animation - it is used in HTMLImage, but only if there are
15792
* htmlimage.c (html_image_factory_register): connect to signals
15793
frame_done and animation_done
15794
(html_image_factory_frame_done): frame_done signal handler, if
15795
image has >1 frames => start animation
15796
(html_image_factory_animation_done): animation_done - does nothing
15799
2000-04-03 Jacob Berkman <jacob@helixcode.com>
15801
* gtkhtml.c (gtk_html_get_title): return NULL if title is NULL (should
15802
this be a g_return_val_if_fail()?)
15804
* gtkhtml.[ch] (gtk_html_construct): new function so that the gtkhtml
15805
widget can be subclassed and used with language bindings
15807
2000-04-02 Jonas Borgstr�m <jonas_b@bitsmart.com>
15809
* gtkhtml.c and testgtkhtml.c (on_button_press_event): Moved mouse wheel
15810
scrolling from testgtkhtml.c to gtkhtml.c.
15812
2000-04-02 Ettore Perazzoli <ettore@helixcode.com>
15814
* htmlengine.c: New value `ID_STRONG' for enum `ID'.
15815
(parse_s): Use `GTK_HTML_FONT_STYLE_SIZE_2' instead of just `2'.
15816
Implement `<strong>' and `</strong>'.
15817
(parse_b): Make `<big>' use `GTK_HTML_FONT_STYLE_SIZE_4' instead
15818
of `GTK_HTML_FONT_STYLE_SIZE_3'.
15820
2000-04-01 Radek Doulik <rodo@helixcode.com>
15822
* htmlengine.c (parse_b): add support for marginwidth and
15823
marginheight in the <BODY> tag
15825
2000-04-01 Ettore Perazzoli <ettore@helixcode.com>
15828
(gtk_html_parse): Removed deprecated function.
15829
(gtk_html_private_calc_scrollbars): Renamed from
15830
`gtk_html_calc_scrollbars'.
15832
2000-04-01 Ettore Perazzoli <ettore@helixcode.com>
15835
(current_color): Removed unused variable.
15837
2000-04-01 Ettore Perazzoli <ettore@helixcode.com>
15839
* htmlengine.c: Use `HTMLStringTokenizer' instead of
15842
* htmlengine.h: Use `HTMLStringTokenizer' instead of
15845
* htmlstringtokenizer.c: New file.
15846
* htmlstringtokenizer.h: New file.
15848
* stringtokenizer.c: Removed.
15849
* stringtokenizer.h: Removed.
15851
2000-04-01 Ettore Perazzoli <ettore@helixcode.com>
15854
(parse_p): Close the current flow on `<pre>'.
15856
2000-03-31 Ettore Perazzoli <ettore@helixcode.com>
15859
(parse_a): Push link color into the color stack when encountering
15861
(close_anchor): If there is a `url' and/or a `target', pop a color
15862
from the color stack.
15864
2000-04-01 Radek Doulik <rodo@helixcode.com>
15866
* htmlengine.c (TIMER_INTERVAL): set TIMER_INTERVAL to 300
15868
2000-03-31 Ettore Perazzoli <ettore@helixcode.com>
15871
(parse_f): `</form>' opens a new paragraph too.
15873
2000-03-31 Ettore Perazzoli <ettore@helixcode.com>
15876
(parse_f): `<form>' also opens a new paragraph.
15878
2000-03-31 Ettore Perazzoli <ettore@helixcode.com>
15881
(parse_i): Handle attribute `align=center' for the `<img>' tag.
15884
(calc_size): Handle vertical alignment of objects properly. Also,
15885
I cleaned up the code a little bit. (But it's still painfully
15889
(get_valign): New private function, implementation of
15890
`HTMLObject::get_valign'. Return the value of the `valign' member
15891
in the `HTMLImage'.
15892
(html_image_class_init): Install it.
15893
(calc_size): Set the descent to zero. Both horizontal borders go
15894
into the ascent instead.
15897
(get_valign): New private function, default implementation for
15898
`HTMLObject::get_valign'. Always return `HTML_VALIGN_BOTTOM'.
15899
(html_object_class_init): Install it.
15900
(html_object_get_valign): New function.
15902
* htmlobject.h: New virtual method `HTMLObject::get_valign'.
15905
(html_imageinput_init): Create the new image with
15906
`HTML_VALIGN_BOTTOM' vertical alignment.
15909
(parse_i): Use the vertical alignment value as a parameter for the
15910
new image. Do not put the image into an HTMLClueAligned anymore
15911
to make vertical alignment work.
15914
(html_image_init): New param `valign'. Initialize the `valign'
15916
(html_image_new): New param `valign'. Pass it to
15917
`html_image_init()'.
15919
* htmlimage.h: New member `valign' in `HTMLImage'.
15921
2000-03-30 Ettore Perazzoli <ettore@helixcode.com>
15924
(html_image_init): @width and @height changed to be `gint16's.
15925
@percent and @border changed to be `gint8's.
15926
(html_image_new): Likewise.
15928
* htmlimage.h: Changed `vspace', `hspace' and `border' to be
15929
`gint8's instead of `gint's. `specified_width',
15930
`specified_height' changed to be `gshort's instead of `gint's.
15932
2000-03-30 Matt Wilson <msw@redhat.com>
15934
* htmlclueflow.c (should_break): protect from accessing
15935
master->text[-1] by checking to make sure text->text_len > 0
15937
* htmltextmaster.c (html_text_master_trail_space_width): protect
15938
from accessing text->text[-1] by checking to make sure
15941
2000-03-30 Radek Doulik <rodo@helixcode.com>
15943
* htmlengine.c (parse_b): added leftmargin, rightmargin, topmargin
15944
and bottommargin to <body ...> to make fresheat & co. happy :)
15946
* htmlimage.c (calc_preferred_width): added hspace
15947
(calc_preferred_width): added hspace
15948
(calc_size): added hspace and vspace
15950
* htmlimage.h: added hspace, vspace image attributes - these are
15951
already deprecated, but for example Slashdot uses it
15953
* htmlengine.c: added html_image_set_spacing for HTMLImage
15955
2000-03-29 Radek Doulik <rodo@helixcode.com>
15957
* htmlimage.c (get_actual_width): updated to use
15958
GdkPixbufAnimation width
15959
(get_actual_height): the same
15960
(draw): remember image offset in HTMLImageAnimation, draw right
15963
* htmlengine.c (html_engine_begin): stop animations from last run
15964
(html_engine_end): also stop animations
15965
(html_engine_update_event): deactivate animations before completely
15968
* htmlimage.c (html_image_animation_new): contructor of HTMLImageAnimation
15969
(html_image_factory_stop_animations): removes animation timeout
15970
handler to stop animation
15971
(html_image_factory_deactivate_animations): sets
15972
HTMLImageAnimation::active flag to FALSE to all animations
15973
(html_image_animation_timeout): timeout handler - draws animation
15974
only if active && visible - animation drawing is now done not much
15975
efficiently as there is probably bug in gdk_pixbuf_composite which
15976
will be more efficient to use
15977
(render_cur_frame): workaround gdk_pixbuf_composite
15979
* htmlimage.h: HTMLImageAnimation structure to store some info
15980
about animation - it is used in HTMLImage, but only if there are
15983
* htmlimage.c (html_image_factory_register): connect to signals
15984
frame_done and animation_done
15985
(html_image_factory_frame_done): frame_done signal handler, if
15986
image has >1 frames => start animation
15987
(html_image_factory_animation_done): animation_done - does nothing
15990
2000-03-28 Ettore Perazzoli <ettore@helixcode.com>
15993
(draw_background_helper): Use `gdk_pixbuf_get_width()' and
15994
`gdk_pixbuf_get_height()' instead of accessing the GdkPixbuf
15998
(draw_background_pixmap): Use `gdk_pixbuf_get_width()' and
15999
`gdk_pixbuf_get_height()' instead of accessing the GdkPixbuf
16003
(draw_background): Use `gdk_pixbuf_get_width()' and
16004
`gdk_pixbuf_get_height()' instead of accessing the GdkPixbuf
16007
2000-03-27 Ettore Perazzoli <ettore@helixcode.com>
16009
* testgtkhtml.c: Removed unused (global) variables.
16012
(html_textarea_init): Removed unused variable.
16015
(html_entity_prepare): Made const-safe.
16018
(html_entity_prepare): Make prototype const-safe.
16020
* htmlgdkpainter.c: #include "htmlentity.h".
16022
2000-03-27 Ettore Perazzoli <ettore@helixcode.com>
16025
(calc_size): Set the ascent even for `HTML_VALIGN_TOP'. This is
16026
*not* the correct fix, but it looks better, at least on Slashdot.
16027
Anyway, we should not be putting images into HTMLClueH's when they
16028
are aligned; this simply makes it impossible to align them
16029
properly, because we don't know where the baseline is! Instead,
16030
we should probably have an `alignment' attribute in `HTMLObject'
16031
`and HTMLClueFlow's flowing code should respect it.
16033
2000-03-26 Ettore Perazzoli <ettore@helixcode.com>
16036
(check_point): Check that the point expressed by the @x, @y
16037
coordinates is actually in the object.
16039
2000-03-26 Ettore Perazzoli <ettore@helixcode.com>
16042
(draw_obj): If the object is transparent, draw the background too.
16045
(draw_background_helper): New helper function.
16047
(draw_background): New function, implementation of
16048
`HTMLObject::draw_background()'.
16049
(html_table_cell_class_init): Install the `draw_background'
16053
(is_transparent): New function, default implementation for
16054
`HTMLObject::is_transparent()'.
16055
(draw_background): New function, default implementation for
16056
`HTMLObject::draw_background'.
16057
(html_object_class_init): Install them.
16058
(html_object_is_transparent): New function.
16059
(html_object_draw_background): New function.
16061
* htmlobject.h: New virtual methods `is_transparent',
16064
2000-03-36 Jonas Borgstr�m <jonas_b@bitsmart.com>
16066
* htmltextarea.c (on_button_press_event): New function.
16067
It returns TRUE, so the events don't get passed to the parent widget.
16068
This makes it possible to enter text in textareas.
16070
* gtkhtml.c (motion_notify_event): Check if the cursor is over a form element.
16071
If so, don't try to select it.
16072
This makes the engine not selecting text when you scroll a listbox.
16074
2000-03-26 Radek Doulik <rodo@helixcode.com>
16076
* htmlclueflow.c (calc_preferred_width): remove trailing space
16077
width at end of line(s)
16078
(calc_size): same as above
16080
* htmltextslave.c (html_text_slave_trail_space_width): like bellow
16082
* htmltextmaster.c (html_text_master_trail_space_width): new
16083
function, returns trailing space width if it is here, otherwise 0
16085
* gtkhtmldebug.c (gtk_html_debug_dump_tree): also print TextSlave
16088
2000-03-26 Ettore Perazzoli <ettore@helixcode.com>
16090
* htmlengine.c (insert_text): Reverted previous change, as it
16091
breaks spaces between normal text and links, among other things.
16093
2000-03-26 Radek Doulik <rodo@helixcode.com>
16095
* htmlcluev.c (find_free_area): choose rmargin as MAX(max_width,
16096
width) so centering works happily now - like on helixcode page
16097
(get_right_margin): the same
16099
* htmlobject.c (get_right_margin): same as above
16101
* htmlengine.c (insert_text): added trailing space eating, so we
16102
have no problems with longer texts later (there was problem, when
16103
sometimes we count them and sometimes not (Master::min_width and
16106
2000-03-25 Radek Doulik <rodo@helixcode.com>
16108
* gtkhtmldebug.c (gtk_html_debug_dump_tree): added width,
16109
max_width to HTMLObject dump and HAlign, VAlign to HTMLClue
16112
2000-03-25 Ettore Perazzoli <ettore@helixcode.com>
16115
(do_layout): Use `html_object_get_left_margin()' instead of
16116
`html_clue_get_left_margin()'.
16117
(get_left_margin): Get an `HTMLObject *' instead of an `HTMLClue
16119
(get_right_margin): Likewise.
16122
(calc_size): Use `html_object_get_left_margin()' instead of
16123
`html_clue_get_left_margin()'.
16126
(calc_size): Use `html_object_get_left_margin()' and
16127
`html_object_get_right_margin()' instead of
16128
`html_clue_get_left_margin()' and `html_clue_get_right_margin()'.
16130
* gtkhtml-keybinding.c: #include "gtkhtmldebug.h".
16133
(get_left_margin): New function.
16134
(get_right_margin): New function.
16135
(html_object_class_init): Install them as the default
16136
implementations of `get_left_margin' and `get_right_margin'.
16138
* htmlobject.h: Moved here. This is not very nice, but we need to
16142
(get_left_margin): Removed.
16143
(get_right_margin): Removed.
16144
(html_clue_class_init): Do not install them anymore.
16145
(html_clue_get_left_margin): Removed.
16146
(html_clue_get_right_margin): Removed.
16148
* htmlclue.h: Removed `get_left_margin', `get_right_margin'
16152
(check_point): Do not reset `offset_return'. (Why would you ever
16153
want to do that!?!?!?)
16154
(forall): New function, implementation of `HTMLObject::forall()'.
16155
(html_table_class_init): Install it.
16156
(set_cells): Set the cell's parent pointer.
16158
2000-03-24 Ettore Perazzoli <ettore@helixcode.com>
16160
* Makefile.am [! LIBWWW]: Do not build `testgtkhtml'.
16162
2000-03-24 Radek Doulik <rodo@helixcode.com>
16164
* htmlimage.c (html_image_factory_frame_done): I have started work
16165
on gif animations using gdk-pixbuf, but it seems to me, that
16166
progressive loading of animated gifs is still unimplemented
16168
* htmlcluev.c (do_layout): change width, if o->width <
16169
o->max_width instead of o->width > o->max_width - this made cells
16170
shorter than they actually was - this one fixes also moved bg
16171
pixmap on www.helixcode.com page and surely another ones
16173
2000-03-23 Radek Doulik <rodo@helixcode.com>
16175
* htmlclueflow.c (should_break): fixed case, when obj is on the
16176
beginning of clue list (it returned TRUE before, which was bad)
16178
2000-03-23 Radek Doulik <rodo@ucw.cz>
16180
* htmlclueflow.c (calc_min_width): fill HTMLObject::nb_width
16181
(calc_size): use HTMLObject::nb_width
16183
* htmlobject.h: added nb_width - width of following non-breaking
16186
* htmltextmaster.c (calc_min_width): removed run_width +=
16187
space_width as we don't want add spaces to minimal width
16189
* htmlclueflow.c (should_break): new function, decides if line
16190
should be broken before obj
16191
(calc_min_width): uses should_break function
16192
(calc_size): uses should_break function
16194
* htmlgdkpainter.c (draw_text): uses html_entity_prepare
16195
(calc_text_width): uses html_entity_prepare
16197
* htmlentity.c (html_entity_prepare): prepares text to
16198
draw/get_width - now it only replaces with ' '
16200
2000-03-22 Ettore Perazzoli <ettore@helixcode.com>
16202
* htmlclueflow.c (add_pre_padding): Also increment the `y' value
16204
(add_post_padding): Likewise.
16206
* htmlobject.c (relayout): Subtract `ascent + descent' from the y
16207
position to make the HTMLClueFlow::calc_size() code happy. Sigh.
16208
This code is so ugly.
16210
2000-03-20 Ettore Perazzoli <ettore@helixcode.com>
16212
* htmlengine.c (parse_m): When parsing `content=', spaces are
16215
2000-03-20 Ettore Perazzoli <ettore@helixcode.com>
16217
* gtkhtml.c (focus_out_event): Removed annoying debugging message.
16218
(focus_in_event): Likewise.
16220
2000-03-18 Jonas Borgstr�m <jonas_b@bitsmart.com>
16222
* testgtkhtml.c (url_requested): Only use redirect filters on the
16223
first file requested on each page load (the main html file).
16225
2000-03-18 Jonas Borgstr�m <jonas_b@bitsmart.com>
16227
This is quite a big change to htmlclueflow. Hope I didn't break anything.
16228
I have tested it quite some time now and I think it works great.
16229
And the text reflows great around the aligned topic images on slashdot.
16231
But don't hesitate to back out my changes if it breaks something.
16233
* htmlclueflow.c (calc_size): Use lmargin and rmargin correct. And some other
16234
changes to make right aligned items to reflow correctly.
16236
* htmlcluev.c (get_right_margin): Corrected the margin calculation.
16237
(find_free_area): Corrected the boundary checking.
16238
(append_right_aligned): Made it behave more like append_left_aligned ().
16240
* tests/bugs.html: Removed www.slashdot.org entry, it looks great now.
16242
2000-03-17 Jonas Borgstr�m <jonas_b@bitsmart.com>
16244
Second attempt of fixing <br> sorry about this.
16246
* htmlengine.c (add_line_break): Only insert create_empty_text (); when
16248
(new_flow): Only do html_clue_append if firstobject is non NULL.
16250
* tests/bugs.html: Removed www.gimp.org entry, it looks great now.
16252
2000-03-17 Jonas Borgstr�m <jonas_b@bitsmart.com>
16254
* htmltextslave.c (calc_size): Backed out my previous checkin.
16255
It didn't handle multiple <br> after each other very well
16257
* tests/bugs.html: Added www.gimp.org again. With better bug desciption.
16259
2000-03-17 Ettore Perazzoli <ettore@helixcode.com>
16261
* gtkhtml.c: s/char/gchar/.
16262
* gtkhtml.h: Likewise.
16264
2000-03-17 Ettore Perazzoli <ettore@helixcode.com>
16267
(gtk_html_get_title): New function.
16269
2000-03-17 Ettore Perazzoli <ettore@helixcode.com>
16272
(title_changed_cb): New param `title'. Use `g_strconcat()'
16273
instead of `g_strdup_printf()'.
16276
(html_engine_title_changed_cb): Updated to set the new `new_title'
16277
parameter in "title_changed".
16278
(class_init): Set up "title_changed" with a new `GTK_TYPE_STRING'
16281
* gtkhtml.h: Parameter `new_title' added to signal "title_changed".
16283
2000-03-17 Jonas Borgstr�m <jonas_b@bitsmart.com>
16285
* htmltextslave.c (calc_size): Set ascent and descent
16286
to zero if the width also is zero. This helps <br> not make to much space.
16288
* tests/bugs.html: Removed www.gimp.org entry, it looks great now.
16290
2000-03-17 Jonas Borgstr�m <jonas_b@bitsmart.com>
16292
* htmlengine.c (parse_p): Handle <p align=xxx>.
16294
* tests/bugs.html: Removed gtk.themes.org entry, it looks great now.
16295
Removed www.gnome.org entry, it looks ok now.
16297
2000-03-13 Dan Winship <danw@helixcode.com>
16299
* htmlengine.c (html_engine_end): don't call gtk_timeout_remove if
16302
2000-03-13 Ettore Perazzoli <ettore@helixcode.com>
16304
* htmlengine-edit-paste.c
16305
(remove_slaves_at_cursor): New helper function.
16306
(html_engine_paste): Call it before manipulating the text.
16309
(html_clueflow_remove_text_slaves): New function.
16311
* htmlengine-edit-paste.c
16312
(merge_possibly): New helper function.
16313
(html_engine_paste): Use it to merge the first and last pasted
16314
objects with their neighbours.
16316
* gtkhtml-keybinding.c
16317
(handle_none): Cause `GDK_F12' to dump the tree.
16319
* htmlengine-edit-cut.c
16320
(cursor_at_end_of_region): New function to detect if the cursor is
16321
at the end or the beginning of the selected region.
16322
(html_engine_cut): Use `cursor_at_end_of_region' to find out if we
16323
actually need to move the cursor back; if not, don't move the
16327
(add_line_break): Just create a new flow. I hope this won't break
16331
(halign_to_string): New helper function.
16332
(save): Use it to write a `DIV' tag to align the paragraph
16335
2000-03-13 Ettore Perazzoli <ettore@helixcode.com>
16337
* htmlengine-save.c
16338
(write_header): Do not write a `<title>' tag
16339
if there is no title. This also prevents a segfault.
16341
2000-03-12 Ettore Perazzoli <ettore@helixcode.com>
16344
(get_selection): Use the `size_return' parameter properly.
16347
(get_selection): New parameter `size_return'. Set `*size_return'
16348
to 1 before returning.
16349
(html_object_get_selection): New parameter `size_return'.
16351
* htmlobject.h: New parameter `size_return' in
16352
`HTMLObject::get_selection'.
16354
* htmlengine-edit-cut.c
16355
(html_engine_cut): Implemented, by means of
16356
`html_engine_move_cursor()' and `html_engine_delete()'.
16358
* htmlengine-edit-copy.c
16359
(copy): New helper function.
16360
(html_engine_copy): Return value changed to `guint': return the
16361
length of the cut buffer. Rewritten to use the `copy' helper
16363
(html_engine_copy_to_buffer): New function.
16365
2000-03-12 Ettore Perazzoli <ettore@helixcode.com>
16367
* htmlengine-edit-delete.c
16368
(html_engine_delete): Prevent bogus deletion of `destroy_orig'
16369
caused by using `->next' instead of `html_object_next_not_slave()'.
16371
* htmlengine-edit-insert.c
16372
(do_insert_different_style): Use `html_object_prev_not_slave()'.
16374
* htmlengine-edit-delete.c
16375
(delete_same_parent): Use `html_object_next_not_slave()'.
16376
(delete_different_parent): Likewise.
16377
(merge_text_at_cursor): Likewise.
16378
(html_engine_delete): Likewise.
16381
(forward): Use `html_object_next_not_slave()' instead of
16383
(next_not_slave): Removed.
16384
(html_cursor_get_current_char): Likewise.
16387
(html_object_is_text): Added precondition (@object != NULL).
16388
(html_object_next_not_slave): New function.
16389
(html_object_prev_not_slave): New function.
16392
(normalize): New helper function.
16393
(html_cursor_normalize): Rewritten by means of it.
16394
(html_cursor_jump_to): Use it to normalize @object and @offset.
16395
(html_cursor_get_current_char): Get the next non-`HTMLTextSlave'
16396
element instead of just the next element.
16399
(init): Initialize `ibeam_cursor'.
16400
(destroy): Destroy `ibeam_cursor'.
16401
(motion_notify_event): Change the cursor to the ibeam on text
16402
elements, or if we are on a link text element and editing is
16405
* gtkhtml.h: New member `ibeam_cursor' in `GtkHTML'.
16407
2000-03-12 Ettore Perazzoli <ettore@helixcode.com>
16410
(size_allocate): Recalculate size and toolbars only if the size
16414
(check_point): Fix clicking in the blank area on top/left of the
16417
2000-03-12 Ettore Perazzoli <ettore@helixcode.com>
16419
* htmlengine-edit-cursor.c
16420
(html_engine_hide_cursor): Draw the cursor only if the engine is
16422
(html_engine_show_cursor): Likewise.
16425
(draw_obj): Draw the cursor only if the engine is editable.
16428
2000-03-12 Ettore Perazzoli <ettore@helixcode.com>
16431
(check_point): Do not make the offset be greater than the string's
16435
(check_point): New function, implementation of
16436
`HTMLObject::check_point'.
16437
(html_clueflow_class_init): Install it.
16440
(check_point): Consider an object to be on a new line by comparing
16441
the y coordinate too.
16444
(html_engine_get_object_at): If `for_cursor', clip the coordinates
16445
to the cluev's area.
16447
2000-03-09 Ettore Perazzoli <ettore@helixcode.com>
16450
(focus_in_event): Give the engine the focus with
16451
`html_engine_set_focus()'.
16452
(focus_out_event): Remove the focus from the engine with
16453
`html_engine_set_focus()'.
16456
(html_engine_set_focus): New function.
16458
* htmlengine.h: New member `have_focus' in `HTMLEngine'.
16461
(destroy): Argh! Destroy the `HTMLEngine'!
16463
* gtkhtml-keybinding.c
16464
(gtk_html_handle_key_event): If the key event is handled, reset
16465
the blinking cursor with `html_engine_reset_blinking_cursor()'.
16468
(html_engine_init): Initialize `blinking_timer_id'.
16469
(html_engine_destroy): If `blinking_timer_id' is nonzero, remove
16470
the corresponding timeout.
16471
(html_engine_set_editable): If the engine becomes editable, call
16472
`html_engine_setup_blinking_cursor()'. If it beomes non editable,
16473
call `html_engine_stop_blinking_cursor()'.
16475
* htmlengine-edit-cursor.c
16476
(html_engine_setup_blinking_cursor): New function.
16477
(html_engine_stop_blinking_cursor): New function.
16478
(html_engine_reset_blinking_cursor): New function.
16479
(blink_timeout_cb): New static function that implements cursor
16482
* htmlengine.h: New members `blinking_timer_id', `blinking_status'
16486
(draw_obj): Don't draw objects whose width and/or height is zero.
16489
(html_engine_draw_cursor): Removed.
16490
(html_engine_flush_draw_queue): Don't call it anymore. Added
16491
precondition: `e' must be an HTMLEngine.
16492
(html_engine_queue_draw): Added precondition: `e' must be an
16495
* htmlengine-edit-movement.c
16496
(html_engine_move_cursor): Use `html_engine_{hide,show}_cursor()'
16497
instead of `html_engine_draw_cursor()'.
16498
(html_engine_jump_to_object): Likewise.
16499
(html_engine_beginning_of_document): Likewise.
16500
(html_engine_end_of_document): Likewise.
16501
(html_engine_beginning_of_line): Likewise.
16502
(html_engine_end_of_line): Likewise.
16503
(html_engine_scroll_down): Likewise.
16504
(html_engine_scroll_up): Likewise.
16505
(html_engine_forward_word): Likewise.
16506
(html_engine_backward_word): Likewise.
16508
* htmlengine-edit-delete.c
16509
(html_engine_delete): Use `html_engine_{hide,show}_cursor()'
16510
instead of `html_engine_draw_cursor()'.
16512
* htmlengine-edit-insert.c
16513
(html_engine_insert_para): Use `html_engine_{hide,show}_cursor()'
16514
instead of `html_engine_draw_cursor()'.
16516
* htmlengine-edit-inster.c
16517
(html_engine_insert): Use `html_engine_{hide,show}_cursor()'
16518
instead of `html_engine_draw_cursor()'.
16520
* htmlengine-edit-cursor.c
16521
(html_engine_draw_cursor_in_area): Moved here from `htmlengine.c'.
16522
Do not draw anything if `cursor_hide_count' is greater than zero.
16523
(html_engine_show_cursor): New function.
16524
(html_engine_hide_cursor): New function.
16526
* htmlengine-edit-cursor.h: New file.
16527
* htmlengine-edit-cursor.c: New file.
16530
(html_engine_draw_cursor_in_area): Removed.
16531
(html_engine_init): Initialize `cursor_hide_count' to zero.
16533
* htmlengine.h: New member `cursor_hide_count' in `HTMLEngine'.
16536
(clear): Draw the cursor in the cleared area.
16537
(draw_obj): Likewise.
16539
2000-03-08 Ettore Perazzoli <ettore@helixcode.com>
16542
(html_draw_queue_flush): Flush the clearing queue before the
16546
(relayout_and_draw): Removed.
16547
(relayout_for_level_change): New helper function.
16548
(html_clueflow_indent): Just return if `indentation' is zero.
16549
Avoid doing a relayout if indentation does not change. Use
16550
`relayout_for_level_change'.
16551
(html_clueflow_set_style): Use `html_object_relayout ()' instead
16552
of `relayout_and_draw()'.
16553
(html_clueflow_set_halignment): Likewise.
16554
(html_clueflow_set_properties): Likewise.
16557
(do_layout): New parameter `engine'. New parameter `relayout'. If
16558
true, use `html_object_relayout()' instead of
16559
`html_object_calc_size()'.
16560
(relayout): If `child' is NULL, use `head'.
16562
2000-03-08 Ettore Perazzoli <ettore@helixcode.com>
16565
(block_end_quote): Use `HTMLEngine' member `indent_level' instead
16566
of `list_level', `quote_level'.
16567
(block_end_list): Likewise.
16568
(parse_table): Likewise.
16569
(parse_b): Likewise.
16570
(parse_d): Likewise.
16571
(parse_l): Likewise.
16572
(parse_o): Likewise.
16573
(parse_u): Likewise.
16574
(html_engine_init): Likewise.
16575
(ensure_editable): Updated for `html_clueflow_new()'.
16577
* htmlengine-edit-clueflowstyle.c: Removed members `quote_level',
16578
`list_level' in `OriginalClueFlowProps'; replaced them with a
16579
single `level' member.
16580
(get_props): Updated accordingly.
16581
(set_props): Likewise.
16582
(html_engine_get_current_clueflow_indentation): Just use the
16583
`level' member in `HTMLClueFlow' instead of the old `list_level'
16587
(gtk_html_debug_dump_tree): Print `level' instead of `quote_level'
16588
and `list_level' that do not exist anymore.
16591
(copy): Copy `level'. Don't copy `list_level' and `quote_level'
16592
anymore as they are gone.
16593
(add_pre_padding): Updated to use `level' instead of
16594
`list_level'/`quote_level'.
16595
(add_post_padding): Likewise.
16596
(draw): Use `level' instead of `list_level'.
16597
(write_indentation_tags): Use `last_level' in
16598
`HTMLEngineSaveState' instead of `last_quote_level',
16600
(html_clueflow_init): Removed parameters `quote_level',
16601
`indent_level'. Only get a generic `level' parameter instead.
16602
(html_clueflow_new): Likewise.
16603
(html_clueflow_set_properties): Likewise.
16604
(html_clueflow_get_properties): Likewise for `list_level_return'
16605
and `quote_level_return'.
16606
(html_clueflow_split): Updated accordingly.
16607
(html_clueflow_indent): Simply increase/decrease `level'.
16609
* htmlengine-save.c
16610
(html_engine_save): Initialize `last_level' instead of
16611
`last_quote_level' and `last_list_level', that don't exist
16614
* htmlengine-save.h: Members `last_quote_level',
16615
`last_list_level' in `HTMLEngineSaveState' removed. New member
16618
* htmlclueflow.h: Members `quote_level' and `list_level' removed
16619
from `HTMLClueFlow'. New member `level' which is used for both
16620
lists and blockquotes.
16623
(update_styles): Use `html_engine_get_editable' instead of the
16624
`editable' member that does not exist anymore.
16625
(key_press_event): Likewise.
16626
(motion_notify_event): Likewise.
16627
(button_press_event): Likewise.
16628
(gtk_html_get_editable): Likewise.
16629
(init): Do not init `editable' anymore.
16630
(gtk_html_end): Do not call `html_engine_set_editable()' anymore.
16631
(gtk_html_set_editable): Inconditionally call
16632
`html_engine_set_editable()'.
16633
(gtk_html_begin): Do not make the engine non-editable anymore.
16635
* gtkhtml.h: Removed member `editable'.
16638
(html_engine_set_editable): Added preconditions.
16639
(html_engine_get_editable): New function.
16640
(html_engine_end): Make sure the thing is editable if `editable'
16641
is true, by calling `ensure_editable()'.
16644
(html_engine_end): Just before emitting the "load_done" signal,
16645
call `html_engine_timer_event()' repeatedly, until it returns
16646
FALSE: this way, we make sure all the pending text is parsed.
16647
Then remove the timeout, as it is not necessary anymore.
16648
(html_engine_stop_parser): Reset `timerId'.
16650
* htmlengine-edit-movement.c
16651
(html_engine_jump_to_object): Normalize cursor after changing it.
16654
(html_engine_unselect_all): Do not traverse the whole tree if we
16655
are sure there is no current selection [`active_selection' is
16658
2000-03-07 Elliot Lee <sopwith@redhat.com>
16660
* htmlbutton.c, htmlcheckbox.c, htmlengine-save.c,
16661
htmlgdkfontmanager.c, htmlgdkpainter.c htmlhidden.c,
16662
htmlprintfontmanager.c, htmlradio.c, htmltext.c, htmltextinput.c,
16663
htmltextmaster.c: #include <string.h>
16665
2000-03-07 Ettore Perazzoli <ettore@helixcode.com>
16668
(gtk_html_calc_scrollbars): Do not set lower/upper limits for the
16669
toolbars explicitly anymore. Also, do not use
16670
`gtk_layout_set_size()' if the size has not actually changed.
16672
* gtkhtml-keybinding.c
16673
(page_up): Unselect all.
16674
(page_down): Likewise.
16675
(forward_word): Likewise.
16676
(backward_word): Likewise.
16677
(beginning_of_document): New function.
16678
(end_of_document): New function.
16679
(gtk_html_handle_key_event): Do not care about the shift status
16680
when dispatching to `handle_ctrl()' or `handle_alt()'.
16681
(handle_ctrl): Map `GDK_Home' to `beginning_of_document()',
16682
`GDK_End' to `end_of_document()'.
16683
(handle_alt): Map `<' to `beginning_of_document()' and `>' to
16684
`end_of_document()'.
16687
(html_cursor_beginning_of_document): New function.
16688
(html_cursor_end_of_document): New function.
16690
* htmlengine-edit-movement.c
16691
(html_engine_beginning_of_document): New function.
16692
(html_engine_end_of_document): New function.
16694
* htmlengine-edit-insert.c
16695
(do_insert_different_style): Don't crash if there is no previous
16696
non-HTMLTextSlave element.
16699
(ensure_editable): New helper function.
16700
(html_engine_load_empty): Use it. Basically, we now start/stop
16701
the parser and call `ensure_editable()' to make sure the resulting
16702
thing is editable correctly.
16703
(html_engine_set_editable): If the engine is now editable, make
16704
sure it can actually be edited with `ensure_editable()'.
16705
(html_engine_set_base_url): Removed.
16706
(parse_b): Emit signal directly, instead of using
16707
`html_engine_set_base_url()'.
16710
(relayout): Always queue a clear when needed, even if we have no
16714
(relayout): Always queue a clear when needed, even if we have no
16715
parents, as the new relayout logic requires this.
16717
2000-03-06 Ettore Perazzoli <ettore@helixcode.com>
16719
* htmlengine-edit-delete.c (html_engine_delete): Call
16720
`html_cursor_normalize()' on exit.
16722
* htmlcursor.c (html_cursor_normalize): New function. If the
16723
cursor points to an object's zero offset and there is an object
16724
before this one, we change the pointer to point to the object
16725
before it, and the offset to the size of the object.
16727
* htmlengine-edit-delete.c (html_engine_delete): Argh. Initialize
16728
`orig_object' and `orig_offset' at the right time.
16730
2000-03-03 Ettore Perazzoli <ettore@helixcode.com>
16732
* htmlengine-edit-delete.c (html_engine_delete): Move to the next
16733
object without changing the actual position if we are at the very
16734
end of a text object, and this is not the last object.
16736
* htmlcursor.c (forward): When choosing between an object and the
16737
next one, choose the first one.
16738
(backward): Likewise.
16740
* htmlengine-edit-insert.c (do_insert): Play with the cursor
16741
pointer so that it points to an adiacent text object if possible.
16742
Otherwise, just call `do_insert_not_text()'.
16743
(do_insert_not_text): Implemented.
16745
* gtkhtml.c (update_styles): Do nothing if the widget is not
16748
* htmlengine.c (html_engine_init): Initialize `editable' to be
16751
* testgtkhtml.c (main): After creating the HTMLwidget, invoke
16752
`gtk_html_load_empty' on it.
16754
* gtkhtml.c (gtk_html_load_empty): New function.
16756
* htmlengine.c (html_engine_load_empty): New function.
16758
2000-03-01 Ettore Perazzoli <ettore@helixcode.com>
16760
* gtkhtml-keybinding.c
16761
(forward_word): New private function.
16762
(backward_word): New private function.
16763
(handle_alt): Map `M-f' and `M-b' to `forward_word' and
16764
`backward_word', respectively.
16765
(handle_ctrl): Map `C-Right' and `C-Left' to `forward_word' and
16766
`backward_word', respectively.
16768
* htmlengine-edit-movement.c
16769
(html_engine_forward_word): New function.
16770
(html_engine_backward_word): New function.
16773
(html_cursor_goto_zero): More preconditions.
16774
(html_cursor_get_current_char): New function.
16776
* htmlengine-edit-fontstyle.c (merge_safely): Update the cursor
16777
offset if the cursor is in the object we are merging and we are
16780
* htmltextmaster.c (merge): Ooops.
16782
* htmlengine-edit-movement.c
16783
(html_engine_scroll_down): New function.
16784
(html_engine_scroll_up): New function.
16786
2000-02-28 Paolo Molaro <lupus@linuxcare.com>
16788
* gtkhtml.c: use GTK_TYPE_OBJECT instead of GTK_TYPE_POINTER
16789
in signal creation for args that are objects.
16791
2000-02-28 Larry Ewing <lewing@helixcode.com>
16793
* htmlengine.c (parse_table): parse <th> correctly so that we
16794
don't end up with spurious blocks which cause cells to grow.
16796
2000-02-27 Larry Ewing <lewing@helixcode.com>
16798
* htmlimage.c (calc_preferred_width): return the width we calculate not
16801
* htmltextslave.c (fit_line): eat up space we find at the start of lines.
16803
2000-02-27 Ettore Perazzoli <ettore@helixcode.com>
16805
* gtkhtml-keybinding.c (beginning_of_line): New function.
16806
(end_of_line): New function.
16807
(handle_ctrl): `C-a' moves to the beginning of the current line;
16809
(handle_none): `GDK_Home' moves to the beginning of the current line;
16810
`GDK_End' to the end.
16812
* htmlengine-edit-movement.c (html_engine_end_of_line): New function.
16813
(html_engine_beginning_of_line): New function.
16815
* htmlengine-edit-movement.c: New file.
16816
* htmlengine-edit-movement.h: New file.
16818
* htmlcursor.c (html_cursor_end_of_line): New function.
16819
(html_cursor_beginning_of_line): New function.
16821
* htmlengine-edit.c (html_engine_jump_to_object): Removed.
16822
(html_engine_move_cursor): Removed.
16823
(html_engine_jump_at): Removed.
16825
* gtkhtml.c (key_press_event): Use `gtk_html_handle_key_event()'
16826
from `gtkhtml-keybinding.c'.
16828
* gtkhtml-keybinding.c: New file.
16829
* gtkhtml-keybinding.h: New file.
16831
* htmlengine-edit-delete.c: New file.
16832
* htmlengine-edit-delete.h: New file.
16834
* htmlengine-edit.c (html_engine_delete): Removed.
16836
* htmlengine-edit-fontstyle.c (split_safely): New helper function.
16837
This splits text and makes sure that the cursor's object pointer
16838
and offset are still valid after the split.
16839
(set_font_style_in_selection_forall): Use it.
16840
(set_font_style_in_selection_forall): Likewise.
16842
* htmlengine-edit-insert.c (html_engine_insert_para): Calc size on
16843
the two halves of the paragraph that gets splitted.
16845
* htmlcluev.c (do_layout): New helper function.
16846
(calc_size): Use it.
16847
(relayout): New function, implementation of
16848
`HTMLObject::relayout'. It uses `do_layout', and relayouts
16849
objects in the clue without recalculating the size for each of
16851
(html_cluev_class_init): Install the new `relayout'
16854
2000-02-26 Larry Ewing <lewing@helixcode.com>
16856
* htmlclueh.c (calc_size): for HTML_VALIGN_TOP the clue->descent
16857
should be incremented rather than the clue->ascent to get the
16858
correct flow in the the remaining items.
16860
2000-02-26 Ettore Perazzoli <ettore@helixcode.com>
16862
* htmlengine-edit-paste.c (html_engine_paste) [! PARANOID_DEBUG]:
16863
Removed ultra-verbose debugging messages.
16865
* gtkhtml.c (class_init): Setup
16866
"current_paragraph_alignment_changed".
16867
(update_styles): Emit it if the current paragraph alignment is
16869
(init): Initialize `paragraph_alignment' to
16870
`GTK_HTML_PARAGRAPH_ALIGNMENT_LEFT'.
16871
(gtk_html_align_paragraph): New function.
16872
(paragraph_alignment_to_html): New helper function.
16873
(html_alignment_to_paragraph): New helper function.
16874
(gtk_html_cut): New function.
16875
(gtk_html_copy): New function.
16876
(gtk_html_paste): New function.
16877
(gtk_html_undo): New function.
16878
(gtk_html_redo): New function.
16879
(key_press_event): Use `gtk_html_{cut,copy,paste,undo,redo}'
16880
instead of `html_engine_{cut,copy,paste,undo,redo}'.
16882
* gtkhtml.h: New enum `GtkHTMLParagraphAlignment'. New signal
16883
"current_paragraph_alignment_changed". New member
16884
`paragraph_alignment' in `GtkHTML'.
16886
* htmlengine-edit-clueflowstyle.c
16887
(html_engine_get_current_clueflow_alignment): New function.
16889
* gtkhtml.h: New enum `GtkHTMLParagraphAlignment'.
16891
* gtkhtml.c (update_styles): Emit "paragraph_indentation_changed"
16892
if the indentation changes.
16893
(class_init): Setup "paragraph_indentation_changed".
16894
(init): Initialize `paragraph_indentation' to 0.
16895
(gtk_html_indent): New functon.
16897
* gtkhtml.h: New signal "paragraph_indentation_changed". New
16898
member `paragraph_indentation' in `GtkHTML'.
16900
* htmlengine-edit-clueflowstyle.c
16901
(html_engine_set_clueflow_style): New parameters `indentation',
16902
`alignment', `mask'.
16903
(set_clueflow_style_in_region_redo): Likewise.
16904
(set_clueflow_style): Likewise. Handle indentation.
16905
(html_engine_get_current_clueflow_indentation): New function.
16907
* htmlclueflow.c (html_clueflow_indent): New function.
16908
(html_clueflow_set_halignment): New function.
16909
(html_clueflow_set_properties): New function.
16910
(html_clueflow_get_properties): New function.
16912
* htmlclueflow.c (write_indentation_tags_helper): New helper
16914
(write_indentation_tags): New helper function.
16915
(save): Use it to write the proper indentation tags. Also, output
16916
a BR for everything except headers and paragraphs containting
16919
* htmlengine-save.c (html_engine_save): Initialize
16920
`last_quote_level' and `last_list_level' in the
16921
`HTMLEngineSaveState' struct to zero.
16923
* htmlengine-save.h: New members `last_quote_level' and
16924
`last_list_level' in `HTMLEngineSaveState'.
16926
* htmltextmaster.c (split): Set `select_length' and `select_start'
16927
to zero in the new element.
16929
2000-02-25 Ettore Perazzoli <ettore@helixcode.com>
16931
* htmlengine-edit-insert (html_engine_insert_para): Removed some
16934
* htmltext.c (split): Do return empty text elements if cutting at
16935
the very beginning or the very end of the object.
16936
* htmltextmaster.c (split): Likewise.
16938
* htmlengine-edit-fontstyle.c (set_font_style_in_selection) [!
16939
PARANOID_DEBUG]: Disabled debugging messages.
16941
* htmlobject.c (relayout): Do not relayout everything if the size
16944
* gtkhtml.c (update_styles): Use
16945
`html_engine_update_insertion_font_style()'.
16946
(key_press_event): Don't update the style when inserting text.
16948
* htmlengine-edit-fontstyle.c
16949
(html_engine_get_current_insertion_font_style): Removed.
16950
(html_engine_update_insertion_font_style): New function.
16952
2000-02-24 Ettore Perazzoli <ettore@helixcode.com>
16954
* gtkhtml.c (cleanup_selection_and_style): New helper function.
16955
(key_press_event): Use it when moving the cursor around.
16957
* htmlengine-edit-insert.c (do_insert_different_style): Handle the
16958
`offset == 0' case correctly.
16960
* htmlvspace.c (calc_size): Updated to return the boolean value.
16962
* htmltextmaster.c (calc_size): Always return FALSE.
16964
* htmltext.c (calc_size): Updated to return the boolean value.
16966
* htmltable.c (calc_size): Updated to return the boolean value.
16968
* htmlcluev.c (calc_size): Updated to return the boolean value.
16970
* htmlclueh.c (calc_size): Updated to return the boolean value.
16972
* htmlclueflow.c (calc_size): Updated to return the boolean value.
16974
* htmlcluealigned.c (calc_size): Updated to return the boolean
16977
* htmlclue.c (calc_size): Updated to return the boolean value.
16979
* htmlobject.c (relayout): Use the return value from
16980
`html_object_calc_size()' to decide if the element needs to be
16982
(calc_size): Updated to return the boolean value.
16984
* htmlobject.h: Make `HTMLObject::calc_size' return a gboolean.
16985
If true, it means that the object has changed and needs to be re
16986
laid out and redrawn for interactive editing.
16988
2000-02-24 Larry Ewing <lewing@helixcode.com>
16990
* htmltable.c (calc_column_widths): fix a typo by replacing
16991
cell->padding with cell->spacing in the original calculation.
16993
* htmlgdkpainter.c (draw_pixmap): rewrite the clipping code to use
16995
(draw_background_pixmap): use gdk_pixbuf_render_to_drawable_alpha
16996
to get proper alpha clipping.
16997
(create_temporary_pixbuf): remove x and y args and the associated
16998
checking because they are no longer needed.
17000
* htmltablecell.c (draw): properly discount cell->padding for the
17001
background color and pixmap. If a background color is set paint
17002
it even if a background pixmap is set so that we have the correct
17003
background for the transparent regions.
17005
2000-02-24 Ettore Perazzoli <ettore@helixcode.com>
17007
* htmlclue.c (html_clue_append_after): Added preconditions.
17009
* htmltext.c (insert_text): Do not relayout the parent if it's
17012
* htmlengine-edit.c (html_engine_insert_para): Removed.
17013
(html_engine_insert): Removed.
17014
* htmlengine-edit-insert.c: Moved here, with the related helper
17017
* htmlengine-edit-insert.h: New file.
17018
* htmlengine-edit-insert.c: New file.
17020
* gtkhtml.c (button_release_event): If ending a selection, update
17023
* htmlengine-edit-fontstyle.c
17024
(get_font_style_from_selection_forall): New helper function.
17025
(get_font_style_from_selection): New helper function; it
17026
calculates the attributes to display in the editor when a region
17028
(html_engine_get_current_insertion_font_style): Use it when we
17029
have an active selection.
17031
* gtkhtml.c (key_press_event): Unselect all when moving, inserting
17033
(motion_notify_event): Move the insertion cursor where the pointer
17034
is if the engine is editable.
17036
* htmlengine-edit-fontstyle.c (merge_safely): New function to
17037
merge, destroy and update the cursor if necessary.
17038
(merge_backward): Use it.
17039
(merge_forward): Likewise.
17041
* htmlengine-edit-fontstyle.c (merge_backward): Merge with
17042
`prepend' set to TRUE so that we don't destroy the current object.
17044
* htmltextmaster.c (merge): Match the new `HTMLText::merge'.
17046
* htmltext.c (html_text_merge): Match the new `HTMLText::merge'.
17047
(merge): Likewise. Added precondition: the two objects must have
17050
* htmltext.h: New arg `prepend' to `HTMLText::merge'. Take a
17051
single object instead of a list as a parameter.
17053
2000-02-23 Ettore Perazzoli <ettore@helixcode.com>
17055
* htmllinktextmaster.c (split): Rewritten to use
17056
`html_text_split()'.
17058
* htmltextmaster.c (split): Rewritten to use `html_text_split()'.
17060
* htmltext.c (split): Instead of creating the new item with
17061
`html_text_master_new()', use `g_malloc()' and the `size' member
17062
in the class description struct; then initialize with
17063
`html_text_master_init()'. This way, it's easier to derive the
17064
method in the subclass.
17066
2000-02-22 Ettore Perazzoli <ettore@helixcode.com>
17068
* htmlengine-edit-fontstyle.c (merge_forward): Do not to attempt
17069
to merge with elements that are not of the same type.
17070
(merge_backward): Likewise.
17072
2000-02-22 Elliot Lee <sopwith@redhat.com>
17074
* htmlimageinput.c, htmllinktext.c, htmlselect.c, htmlsettings.c,
17075
htmltable.c, htmltextarea.c: #include <string.h>
17077
2000-02-22 Ettore Perazzoli <ettore@helixcode.com>
17079
* gtkhtml.c (key_press_event): Do not update styles if the
17080
keypress was not handled.
17081
(update_styles): Kick me.
17083
* htmlengine-edit-fontstyle.c
17084
(html_engine_get_current_insertion_font_style): A
17085
`GTK_HTML_FONT_STYLE_DEFAULT' is always overridden by the
17086
element's font style.
17088
* gtkhtml.c (class_init): Set up signal
17089
"insertion_font_style_changed".
17090
(update_styles): Deal with the font style too.
17092
* gtkhtml.h: New signal "insertion_font_style_changed". New
17093
member `insertion_font_style'.
17095
2000-02-21 Ettore Perazzoli <ettore@helixcode.com>
17097
* htmlengine.c (html_engine_update_event): Do not draw if the
17098
painter is not realized. This is a quick and dirty fix, I am not
17099
sure what is going on in here.
17101
* htmlgdkpainter.c (html_gdk_painter_realized): New function.
17103
* htmltext.c (check_merge): New function, implementation of
17104
`HTMLText::check_merge'.
17105
(html_text_class_init): Install it.
17107
* htmltext.h: New virtual method `HTMLText::check_merge'.
17109
* htmlengine-edit-fontstyle.c (html_engine_set_font_style):
17110
Changed parameters: get an AND mask and an OR mask for modifying
17112
(set_font_style_in_selection_forall): Use a SetFontStyleForallData
17113
closure, so that we can store both masks.
17114
(set_font_style_in_selection): Likewise.
17115
* gtkhtml.c (gtk_html_set_font_style): Likewise.
17117
* htmltextmaster.c (merge): Completed code to preserve selection
17119
(split): Preserve selection here too.
17121
* htmlengine-edit-fontstyle.c
17122
(set_font_style_in_selection_forall): Make it work.
17124
* htmlembedded.c (html_embedded_grab_cursor): Removed spurious
17127
* gtkhtml.c (gtk_html_allow_selection): New function.
17128
(init): Initialize `allow_selection' to TRUE.
17129
(button_press_event): Do not grab the pointer if `allow_selection'
17131
(realize): Removed spurious `g_message()'.
17133
* gtkhtml.h: New member `allow_selection'.
17135
* htmllinktext.c (html_link_text_new): Get rid of some
17136
ultra-verbose debugging messages.
17138
* All files: use the new `gtk_html_debug_log()' call instead of
17141
* htmlcursor.c (debug_location): Always compile this in,
17142
unconditionally. At least for now. Also, new parameter `html':
17143
use `gtk_html_debug_log()'.
17145
2000-02-20 Ettore Perazzoli <ettore@helixcode.com>
17147
* debug.h: Renamed to `gtkhtmldebug.h'.
17148
* debug.c: Renamed to `gtkhtmldebug.c'.
17150
* gtkhtml.c (gtk_html_enable_debug): New function.
17152
* gtkhtml.h: New member `debug' in `GtkHTML'.
17154
2000-02-19 Ettore Perazzoli <ettore@helixcode.com>
17156
* htmlfontstyle.h, htmlfontstyle.c: Removed.
17157
* gtkhtmlfontstyle.h, gtkhtmlfontstyle.c: New replacements. We
17158
now use `GtkHTMLFontStyle' instead of `HTMLFontStyle' throughout,
17159
so that the values can be exposed to the API.
17161
* gtkhtml.c (font_style_to_internal): New helper function.
17162
(gtk_html_set_font_style): New function.
17164
* gtkhtml.h: New enum `GtkHTMLFontStyle'.
17166
* htmlengine-edit-fontstyle.c: New file.
17167
* htmlengine-edit-fontstyle.h: New file.
17169
* htmlengine-edit-paste.c: #include "debug.h".
17171
2000-02-20 Jonas Borgstr�m <jonas_b@bitsmart.com>
17173
* htmlclueflow.c (calc_min_width): Don't do any wrapping with the
17174
HTML_CLUEFLOW_STYLE_NOWRAP style.
17176
* htmlclueflow.h: Added new style HTML_CLUEFLOW_STYLE_NOWRAP.
17178
* htmlengine.c (parse_table): Use style HTML_CLUEFLOW_STYLE_NOWRAP on
17179
tablecells with the "nowrap" keyword.
17181
* htmltextmaster.c (calc_min_width): Don't do any wrapping with the
17182
HTML_CLUEFLOW_STYLE_NOWRAP style.
17184
* testgtkhtml.c: Added tests/test11.html.
17186
* tests/test1.html: New testcase for tables with the "nowrap" keyword.
17188
2000-02-20 Jonas Borgstr�m <jonas_b@bitsmart.com>
17190
* htmlcheckbox.c (encode): New function.
17191
(html_checkbox_init): Set value to "on" if it's NULL.
17192
Use ftk_check_button instead of gtk_toggle_button.
17194
* htmlengine.c (parse_input): Pass &e->form->radio_group to html_radio_new ().
17196
* htmlform.c (html_form_new): Initialize form->radio_group to ZERO.
17198
* htmlform.h: (GSList *radio_group) new member, it is used by the radio
17199
buttons on the form.
17201
* htmlradio.c (encode): New function.
17202
(html_radio_new, html_radio_init): New argument: GSList **radio_group.
17203
(html_checkbox_init): Set value to "on" if it's NULL.
17205
* htmlradio.h: Changed the arguments for html_radio_new and html_radio_init.
17207
* tests/test9.html: Added <imput type=radio> Testcase.
17210
2000-02-19 Ettore Perazzoli <ettore@helixcode.com>
17212
* htmltext.c (html_text_set_font_style): New function.
17213
(html_text_set_color): New function.
17214
(set_font_style): New function, implementation of
17215
`HTMLText::set_font_style'.
17216
(set_color): New function, implementation of
17217
`HTMLText::set_color'.
17218
(html_text_class_init): Install implementations.
17220
* htmltext.h: New virtual methods `HTMLText::set_color' and
17221
`HTMLText::set_font_style'.
17223
* htmltextmaster.c (merge): New function, implementation of
17226
* htmltext.c (merge): New function, default (non) implementation
17227
of `HTMLText::merge()'.
17228
(html_text_class_init): Install it.
17230
* htmltext.h: New virtual method `HTMLText::merge'.
17232
* htmlengine.h: New member `insertion_font_style'.
17234
* htmlengine-edit-styles.c: Renamed to `htmlengine-edit-styles.c'.
17235
* htmlengine-edit-styles.h: Renamed to `htmlengine-edit-styles.h'.
17237
2000-02-16 Ettore Perazzoli <ettore@helixcode.com>
17239
* gtkhtml.c (key_press_event): Temporarily bind `GDK_F3' to
17240
"cut", `GDK_F4' to "copy" and `GDK_F5' to "paste".
17242
* htmlengine-edit-paste.c: New file.
17243
* htmlengine-edit-paste.h: New file.
17245
* htmltextmaster.c (get_selection): New function, implementation
17246
of `HTMLObject::get_selection'.
17247
(html_text_master_class_init): Install the implementation.
17249
* htmlclue.c (forall): Call the function on self after calling
17250
it on all the objects, instead of doing it before.
17252
* htmltextslave.c (select_range): New function, implementation of
17253
`HTMLObject::select_range'. Do nothing and always return FALSE,
17254
so that the object can never be selected in any way.
17255
(html_text_slave_class_init): Install implementation.
17257
* htmlengine-edit-copy.c (html_engine_copy): New function.
17259
* htmltextslave.c (calc_size): Removed newline stuff.
17260
(draw_newline_highlight): Removed.
17261
(draw_highlighted): Removed newline stuff.
17262
(draw): Removed newline stuff.
17263
(check_newline): Removed.
17265
* htmltextmaster.c (select_range): Removed newline stuff.
17267
* htmltext.c (calc_size): Removed newline stuff.
17268
(have_newline): Removed.
17269
(html_text_have_newline): Removed.
17271
* htmltext.h: Removed virtual method `have_newline'.
17273
2000-02-15 Ettore Perazzoli <ettore@helixcode.com>
17275
* htmltextinput.c: `parent_class' should be `HTMLEmbeddedClass *',
17276
not `HTMLEmbedded *'.
17278
* htmlobject.c (html_object_get_selection): New function.
17279
(get_selection): New function, default implementation of
17280
`HTMLObject::get_selection'.
17281
(html_object_class_init): Install it.
17283
* htmlobject.h: New virtual method `HTMLObject::get_selection'.
17285
* All object implementations: implement `HTMLObject::copy'. Also,
17286
keep track of the parent's class where not done already.
17288
* htmlobject.c (copy): New function, default implementation of
17289
`HTMLObject::copy'.
17290
(html_object_class_init): Install it.
17291
(html_object_copy): New function.
17292
(html_object_dup): New function.
17294
* htmlobject.h: New virtual method `HTMLObject::copy'.
17296
* htmlembedded.c (html_embedded_type_init): Use
17297
`HTML_TYPE_EMBEDDED', not `HTML_TYPE_ELEMENT'.
17299
* htmltype.h: s/HTML_TYPE_ELEMENT/HTML_TYPE_EMBEDDED/.
17300
* htmltype.c (html_type_name): Updated accordingly.
17302
* All object implementations: Use the `object_size' parameter.
17304
* htmlobject.c (html_object_class_init): New parameter
17307
* htmlobject.h: New member `object_size' in `HTMLObjectClass'.
17309
* htmlobject.h: New virtual methods `HTMLObject::copy',
17310
`HTMLObject::get_selection'.
17312
* htmlengine-edit-cut.c: New file.
17313
* htmlengine-edit-cut.h: New file.
17315
* htmlengine-edit-copy.c: New file.
17316
* htmlengine-edit-copy.h: New file.
17318
2000-02-14 Ettore Perazzoli <ettore@helixcode.com>
17320
* htmlengine.c (html_engine_init): Initialize `cut_buffer' as
17322
(html_engine_destroy): Destroy the cut buffer, if any.
17324
* htmlengine.h: New member `cut_buffer'.
17326
* htmlengine-edit.c (html_engine_undo): Freeze before undoing,
17328
(html_engine_redo): Freeze before redoing, thaw afterwards.
17330
* htmlobject.c (relayout): Do nothing if the engine is frozen.
17332
* htmlengine.c (html_engine_init): Initialize `freeze_count'.
17333
(html_engine_freeze): New function.
17334
(html_engine_thaw): New function.
17335
(html_engine_frozen): New function.
17336
(html_engine_queue_draw): Actually queue only if the engine is not
17338
(html_engine_queue_clear): Likewise.
17340
* htmlengine.h: New member `freeze_count' in `HTMLEngine'.
17342
* htmlengine-cutbuffer.c: New file.
17343
* htmlengine-cutbuffer.h: New file.
17345
* htmlengine-edit-styles.c: Implemented paragraph style selection
17346
in a region, with undo/redo support.
17348
* htmlengine.c: New member `active_selection' in
17349
`SelectRegionData'.
17350
(html_engine_init): Initialize `active_selection' to FALSE.
17351
(html_engine_unselect_all): Set `active_selection' to FALSE.
17352
(select_region_forall): Set `active_selection' in the selection
17353
data to TRUE as soon as at least an item is selected.
17354
(html_engine_select_region): Copy `active_selection' from the
17355
selection data to the engine.
17357
* htmlengine.h: New member `active_selection' in `HTMLEngine'.
17359
2000-02-13 Miguel de Icaza <miguel@gnu.org>
17361
* htmlengine.c (html_engine_draw): Do not paint if the width or
17362
the height are zero. Fixes crash (as this case is also window == NULL).
17364
2000-02-12 Joe Shaw <joe@helixcode.com>
17366
* gtkhtml-embedded.c (gtk_html_set_parameter): g_strdup the parameter
17367
name because we cannot assume that it won't be freed during the life
17368
of the application.
17369
* gtkhtml-embedded.c (free_param): Added freeing of the key.
17371
2000-02-12 Joe Shaw <joe@helixcode.com>
17373
* gtkhtml.c (expose): Did the same thing as I did with the draw
17376
2000-02-11 Joe Shaw <joe@helixcode.com>
17378
* gtkhtml.c (draw): Fixed a bug where embedded widgets were not being
17379
repainted correctly; the widget was updating all of its child widgets
17380
and then painting over them. The order has been switched; thus, the
17381
widget repaints itself first and then its child widgets are redrawn.
17383
* htmlembedded.c (html_embedded_new_widget): Connected the
17384
button_press_event signal to a new handler, html_embedded_grab_cursor,
17385
that does not propagate up the tree so that embedded text widgets,
17386
such as GtkEntry, retain the cursor.
17388
2000-02-10 Ettore Perazzoli <ettore@helixcode.com>
17390
* gtkhtml.c (gtk_html_set_paragraph_style): New function.
17391
(button_press_event): Update styles when moving the cursor
17392
position at a mouse click.
17394
* htmlengine-edit-styles.c
17395
(html_engine_set_clueflow_style): New function.
17397
* htmlclueflow.c (html_clueflow_set_style): New function.
17399
* gtkhtml.c (update_styles): New helper function.
17400
(clueflow_style_to_paragraph_style): New helper function.
17401
(class_init): Install new signal
17402
`current_paragraph_style_changed'.
17403
(init): Initialize `paragraph_style' to
17404
`GTK_HTML_PARAGRAPH_STYLE_NORMAL'.
17406
* gtkhtml.h: New enum `GtkHTMLParagraphStyle'. New signal
17407
`current_paragraph_style_changed'. New member
17408
`GtkHTMLParagraphStyle'.
17410
* htmlengine-edit-styles.c: New file.
17411
* htmlengine-edit-styles.h: New file.
17413
* htmlengine-edit.c (html_engine_insert): Avoid inserting anything
17414
if the current object is NULL.
17416
* htmlundo.c (html_undo_add_undo_action): Update the stack size
17417
value when removing an element.
17419
2000-02-09 Ettore Perazzoli <ettore@helixcode.com>
17421
* htmlengine-edit.c (html_engine_insert): Support undo.
17423
* gtkhtml.c (key_press_event): (Temporarily) bind F1 to "undo", F2
17426
* htmlengine-edit.c (html_engine_undo): New function.
17427
(html_engine_redo): New function.
17429
* htmlengine.c (html_engine_init): Initialize `undo'.
17430
(html_engine_destroy): Destroy it.
17432
* htmlengine.h: New member `undo' in `HTMLEngine'.
17434
* htmlundo-action.c: New file.
17435
* htmlundo-action.h: New file.
17437
* htmlundo.c: New file.
17438
* htmlundo.h: New file.
17440
* htmlcursor.c (html_cursor_goto_zero): New function.
17442
* htmlengine-edit.c (html_engine_jump_to_object): Use
17443
`html_cursor_jump_to()'.
17445
* htmlcursor.c (html_cursor_copy): New function.
17446
(html_cursor_dup): Use it.
17447
(html_cursor_up): Use it instead of doing direct C assignments
17448
between the structs.
17449
(html_cursor_down): Likewise.
17450
(html_cursor_jump_to): New function. It is necessary to jump to a
17451
position while keeping the relative position value intact.
17452
(html_cursor_home): Reset relative position.
17454
* htmlcursor.c (html_cursor_new): Initialize `relative_position'.
17455
(html_cursor_get_relative): New function.
17456
(html_cursor_reset_relative): New function.
17457
(html_cursor_home): Set relative position to zero.
17458
(forward): Increment relative position if successfull.
17459
(backward): Decrement relative position if successfull.
17460
(html_cursor_up): Update relative position.
17461
(html_cursor_down): Likewise.
17462
(debug_location): Print relative position too.
17463
(_HTML_CURSOR_DEBUG): Enable.
17465
* htmlcursor.h: New member `relative_position'.
17467
2000-02-08 Ettore Perazzoli <ettore@helixcode.com>
17469
* htmltable.c (calc_min_width): Call `calc_col_info()' before
17470
returning the value.
17471
(calc_preferred_width): Likewise.
17473
* htmlprinter.c (draw_panel): Implemented. It does actually just
17474
draws a rectangle for now.
17475
(class_init): Install it.
17476
(PIXEL_SIZE): Changed to .5.
17478
* htmlengine-print.c (html_engine_print): When you call
17479
`html_engine_calc_size()', it uses `html_object_calc_min_size()'
17480
to decide the layout width, but the minimum HTMLTable width does
17481
not really change before you call `html_object_calc_size()' on it.
17482
So, we have to add an extra call to `html_engine_calc_size()'
17483
here, to make sure the minimum width is correct when we go back
17484
from the GnomePrint painter to the GDK one.
17486
* htmlengine.c (parse_h): Optimize and make more readable the
17489
2000-02-07 Ettore Perazzoli <ettore@helixcode.com>
17491
* htmltable.c (calc_preferred_width): Do not calc_size.
17492
(calc_min_width): Likewise.
17494
2000-02-04 Ettore Perazzoli <ettore@helixcode.com>
17496
* htmlimage.c (calc_min_width): Fixed brainos.
17498
* htmltablecell.c (html_table_cell_new): Removed parameters `x'
17499
and `y'. Renamed `max_width' to `specified_width'
17500
(html_table_cell_init): Likewise.
17502
* htmlimage.c (get_actual_width): New param `painter'. The
17503
returned value is now expressed in painter units, instead of image
17505
(get_actual_height): Likewise.
17506
(calc_preferred_width): Updated accordingly.
17507
(calc_min_width): Updated accordingly.
17508
(calc_size): Updated accordingly.
17509
(draw): Updated accordingly.
17511
* htmlimage.c (draw): Draw an highlighted pixmap when selected.
17513
* htmlgdkpainter.c (draw_pixmap): Fixed to handle the composition
17516
2000-02-03 Ettore Perazzoli <ettore@helixcode.com>
17518
* htmlprinter.c (draw_text): Use `gnome_font_get_underline_position()'
17519
and `gnome_font_get_underline_thickness()' to get the
17520
strikeout/underline line right.
17522
* htmlprintfontmanager.c (load_font): Changed default font size
17523
from 12 pt. to 10 pt.
17525
* htmlprinter.c (begin): Do a gsave and setup a clip region.
17526
Also, paint a rectangle around the clip region to make debugging
17528
(end): Do a grestore.
17529
(draw_line): Added missing `gnome_print_newpath()' call.
17530
(draw_rect): Likewise.
17531
(fill_rect): Likewise.
17532
(draw_text): Likewise.
17534
* htmlclueflow.c (check_page_split): New function, implementation
17535
of `HTMLObject::check_page_split'.
17536
(html_clueflow_class_init): Install it.
17538
* htmlcluev.c (check_page_split): New function, implementation of
17539
`HTMLObject::check_page_split()'.
17540
(html_cluev_class_init): Install it.
17542
* htmlobject.c (html_object_check_page_split): New function.
17543
(check_page_split): New function, default implementation for
17544
`HTMLObject::check_split'.
17545
(html_object_class_init): Install it.
17547
* htmlprinter.c (html_printer_get_page_height): New function.
17549
* htmlobject.h: New virtual method `HTMLObject::check_split'.
17551
* htmlprinter.c (draw_pixmap): Convert RGBA into RGB if necessary.
17553
* htmlobject.c (calc_min_width): Calc size before returning the
17555
(calc_preferred_width): Likewise.
17556
* htmlrule.c (calc_min_width): Likewise.
17557
* htmltable.c (calc_min_width): Likewise.
17558
(calc_preferred_width): Likewise.
17560
* htmlimage.c (draw): Multiply scaled width/height by the pixel
17563
* htmlprinter.c (draw_pixmap): Implemented.
17565
* htmlimage.c (draw): Take advantage of `scale_width',
17566
`scale_height', `color' in `html_painter_draw_pixmap()'.
17567
(html_image_update_scaled_pixbuf): Removed.
17568
(html_image_setup): Removed.
17569
(html_image_factory_area_updated): Removed.
17570
(html_image_factory_register): Do not connect "area_updated"
17572
(html_image_factory_end_pixbuf): Don't do any scaled-related stuff
17574
(html_image_factory_area_prepared): Always schedule an update.
17576
* htmlgdkpainter.c (draw_pixmap): Updated to use the new
17578
* htmlprinter.c (draw_pixmap): Likewise.
17580
* htmlpainter.c (html_painter_draw_pixmap): New params
17581
`scale_width', `scale_height', `color'. Removed clipping params.
17583
* htmlpainter.h: New params `scale_width', `scale_height', `color'
17584
and removed clipping params in virtual method
17585
`HTMLPainter::draw_pixmap'.
17587
* htmlimage.c: Cleaned up the mess.
17588
(html_image_init): Removed arg `max_width'. Simplified to just do
17590
(html_image_new): Updated accordingly.
17591
(get_actual_width): New helper function.
17592
(get_actual_height): New helper function.
17593
(calc_size): Actually do what expected to.
17594
(calc_preferred_width): Likewise.
17595
(calc_min_width): Likewise.
17596
(set_max_width): Removed.
17597
(html_image_class_init): Do not install anymore.
17599
* htmlimage.h: Get rid of `predefinedWidth', `predefinedHeight',
17600
`engine', `scaled' and `scaled_pixbuf'. New members
17601
`specified_width', `specified_height'.
17603
2000-02-02 Ettore Perazzoli <ettore@helixcode.com>
17605
* htmltablecell.c (html_table_cell_set_width): New arg
17608
* htmlobject.h: New argument `painter' in virtual methods
17609
`set_max_ascent', `set_max_descent', `set_max_width'.
17611
* htmlclueflow.c: Removed hardcoded values `VERTICAL_PAD',
17612
`BULLET_SIZE', `BULLET_HPAD', `BULLET_VPAD', `INDENT_UNIT'.
17613
(add_pre_padding): Added arg `pad'.
17614
(add_post_padding): Likewise.
17615
(calc_padding): New function.
17616
(calc_size): Use it.
17617
(get_indent): New arg `painter'.
17618
(set_max_width): New arg `painter'.
17619
(calc_indent_unit): New function.
17620
(get_indent): Use it.
17621
(calc_bullet_size): New function.
17622
(get_indent): Use it.
17625
* htmlobject.h: Size-related members in `HTMLObject' changed to be
17626
`gint's instead of `gshort's.
17628
2000-02-01 Ettore Perazzoli <ettore@helixcode.com>
17630
* testgtkhtml.c: Added a "print preview" menu item.
17631
(print_preview_cb): Callback for the menu: it does the preview.
17633
* gtkhtml.c (gtk_html_print): New function.
17635
* htmlengine-print.c: New file, implementing printing for
17637
* htmlengine-print.h: Corresponding header file.
17639
* htmlprintfontmanager.c: New file, implementing the font manager
17641
* htmlprintfontmanager.h: Corresponding header file.
17643
* htmlprinter.c: New file, implementing a HTMLPainter suitable for
17645
* htmlprinter.h: Corresponding header.
17647
* htmlclueflow.c (html_clueflow_init): Removed parameter `font'.
17648
(html_clueflow_new): Likewise.
17650
* htmlclueflow.h: Removed member `font'.
17652
* htmlgdkpainter.c: Use `htmlgdkfontmanager.c' instead of
17653
`htmlfontmanager.c'.
17655
* All files: updated to use `htmlfontstyle.c' and
17656
`htmlfontstyle.c' instead of `htmlfontmanager.c' and
17657
`htmlfontmanager.h' for HTMLFontStyle handling.
17659
* htmlfontstyle.h: New file.
17660
* htmlfontstyle.c: New file.
17662
* htmlgdkfontmanager.c: New file.
17663
* htmlgdkfontmanager.h: New file.
17665
* htmlfontmanager.c: Removed.
17666
* htmlfontmanager.h: Removed.
17668
* htmlengine.c: Updated to use `HTMLGdkPainter' instead of the
17670
* htmlengine.h: Likewise.
17672
* htmlgdkpainter.c: New file, an HTMLPainter-derived class
17673
implementing a GDK-based painter.
17674
* htmlgdkpainter.h: Header for it.
17676
* htmlpainter.c: Rewritten as an abstract GTK+ class.
17677
* htmlpainter.h: Likewise.
17679
* htmlengine.c (html_engine_parse): No need to allocate the
17680
settings' colors anymore.
17682
* htmlpainter.c (html_painter_get_window): Removed.
17683
(html_painter_alloc_color): Updated to work without it.
17684
(html_painter_free_color): Likewise.
17686
2000-01-30 Ettore Perazzoli <ettore@helixcode.com>
17688
* htmlengine.c (check_prev): Take account for the color too.
17689
(insert_text): Updated accordingly.
17690
(parse_b): Use `e->settings->vLinkColor' for vlink colors, instead of
17691
`e->settings->linkColor'.
17693
2000-01-29 Ettore Perazzoli <ettore@helixcode.com>
17695
* htmldrawqueue.c (clear_element_new_with_background): Use the
17696
return value from `gdk_pixbuf_ref()'. It is not void anymore;
17697
please update to the latest gdk-pixbuf if you do GtkHTML
17699
* htmlimage.c (draw): Likewise.
17701
2000-01-29 Jonas Borgstr�m <jonas_b@bitsmart.com>
17703
* htmlengine.c (insert_text): Use e->settings->linkColor as the color
17706
* htmldrawqueue.c (clear_element_new_with_background): gdk_pixbuf_ref ()
17707
returns void don't use the return value.
17709
2000-01-28 Ettore Perazzoli <ettore@helixcode.com>
17711
* htmlengine.c (parse_color): New function to parse colors. If
17712
`gdk_color_parse()' fails, it prepends a `#' and tries again.
17713
(parse_table): Use `parse_color()' instead of `gdk_color_parse()'.
17714
(parse_b): Likewise.
17715
(parse_f): Likewise.
17717
* htmltokenizer.c (html_tokenizer_new): Initialize all the members
17718
of the struct individually.
17720
* htmltextmaster.c (select_range): Take account for newline
17721
selection when deciding whether to redraw or now.
17723
* htmltextslave.c (draw): Consider a line that only has the
17724
newline highlighted as highlighted.
17726
* htmlengine.c (insert_text): Refuse to insert leading white space
17727
if we have no paragraph, if there is a pending paragraph or if the
17728
current clueflow is empty.
17729
(is_whitespace): Removed.
17731
* htmlengine.h: Made `avoid_para' and `pending_para' plain
17732
booleans (no longer 1 bit wide) because debugging is easier this
17735
* htmlengine.c (parse_d): Close the flow and set a pending
17736
paragraph instead of adding a newline.
17737
(insert_text): Skip all the leading whitespace if we are about to
17738
create a new paragraph.
17740
2000-01-28 NotZed <notzed@zedzone.helixcode.com>
17742
* tests/test10.html: A simple test driver for embedded widgets.
17744
2000-01-28 Ettore Perazzoli <ettore@helixcode.com>
17746
* htmltextslave.c (calc_size): Inconditionally add the width of a
17749
* htmltextmaster.c (calc_min_width): Add the width of a space.
17751
* htmlengine.c (html_engine_parse): Initialize
17752
`pending_para_alignment' to `HTML_HALIGN_LEFT'.
17753
(insert_paragraph_break): New parameter `align'.
17755
* htmlengine.h: New member `pending_para_alignment' in
17758
* htmlengine.c (parse_table): Restore quote and list level and
17759
flow pointer before adding the table to the tree.
17761
* debug.c (debug_dump_tree): Also print the list/quote level for
17764
* testgtkhtml.c (object_timeout): Added `GTK_WIDGET()' cast.
17765
(object_requested_cmd): Likewise. Also, added a `GtkFunction'
17768
* htmlembedded.c (html_embedded_new_widget): Removed unused
17771
* htmlengine.c (parse_o): Added a `GTK_WIDGET()' cast to placate
17774
* htmlclue.c (destroy): Use an HTMLClue pointer instead of an
17775
HTMLObject one, to prevent a warning.
17777
2000-01-27 Ettore Perazzoli <ettore@helixcode.com>
17779
* htmlengine-edit.c (html_engine_insert_para): Use both
17780
`list_level' and `quote_level'.
17782
* htmlengine.c (html_engine_init): Init `quote_level',
17784
(block_end_list): Renamed to `block_end_level'. Set `list_level'
17786
(block_end_indent): Renamed to `block_end_quote'. Use
17788
(parse_table): Restore both `quote_level' and `list_level'.
17789
(parse_d): Increase `list_level' for `<dir>'. (I am not sure how
17790
to handle this for now.) Increase/decrease `quote_level' for
17791
`<dl>', `<dd>' and `<dt>'.
17792
(parse_l): Use `list_level' and `quote_level' when creating the
17794
(parse_o): Use `list_level' for `<ol>'.
17795
(parse_u): Use `quote_level' for `<ul>'.
17796
(parse_b): Use `quote_level' for `<blockquote>'.
17798
* htmlengine.h: `indent' replaced by `quote_level', `list_level'.
17800
* htmlclueflow.c (html_clueflow_new): New params `list_level',
17802
(html_clueflow_init): Likewise.
17803
(add_pre_padding): A change in quote level always adds a space. A
17804
change in list level works like before.
17805
(add_post_padding): Likewise.
17806
(draw): Updated to just use `list_level' for deciding the bullet's
17808
(get_indent): Updated to use `list_level' and `quote_level'.
17810
* htmlclueflow.h: Member `level' replaced by `list_level',
17813
* htmlengine.c (parse_u): Insert a paragraph break if a paragraph
17814
space is pending and the indentation level is greater than zero.
17815
(block_end_list): Only erase pending paragraph spaces and prohibit
17816
new paragraphs if the indentation level is equal to zero.
17818
* htmltextmaster.c (check_point): Select the newline.
17820
* htmltextslave.c (calc_size): Add the size of a space if this is
17821
the last slave of a newline'd text master.
17822
(draw_newline): New helper function.
17823
(draw_normal): Draw a space by using it, if we are before a new
17825
(draw_highlighted): Likewise.
17827
* htmltext.c (html_text_have_newline): New function.
17828
(have_new_line): New function, default implementation of
17829
`HTMLText::have_newline'.
17830
(html_text_class_init): Install it.
17831
(calc_size): If the object has a new line add the width of a space
17834
* htmltext.h: New virtual method `HTMLText::have_newline'.
17836
2000-01-26 Michael Zucchi <notzed@zedzone.helixcode.com>
17838
* Makefile.am (libgtkhtml_HEADERS): Renamed htmlelement.h,
17839
to htmlembedded.h, added gtkhtml-embedded.h.
17841
* testgtkhtml.c (object_requested_cmd): Add a signal handler for
17842
testing custom widgets using the object specifier.
17844
* htmlengine.c (html_engine_class_init): Create object_requested
17847
* gtkhtml.c (gtk_html_new): Link to object_requested signal of
17848
htmlengine to proxy the call.
17849
(class_init): Create the new object_requested signal.
17850
(html_engine_object_requested_cb): Implement the signal proxy.
17852
* htmlengine.c (html_engine_stop_parser): Clear timerID if we
17853
remove the timeout.
17854
(html_object_changed): Use schedule_update to update, dont update
17857
* htmlembedded.c (html_embedded_size_recalc): Force a size
17858
recalculation of an embedded widget.
17859
(html_embedded_new_widget): Create a new html embedded element
17860
from a htmlembedded widget.
17862
* htmlelement.[ch]: Renamed to htmlembedded.[ch], should probably
17863
be somehting more different to gtkhtml-embedded, but its not that
17866
* htmlengine.c (html_engine_init): Initialise the embeddedStack, a
17867
stack of gtkhtmlembedded widgets.
17868
(html_engine_destroy): Destroy the embeddedStack.
17870
* gtkhtml.h: Added object_requested signal, for embedding widgets.
17872
* htmlengine.h (HTMLEngine): Added embeddedStack for embedded
17874
(HTMLEngineClass): Added object_requested signal, for embedding
17877
* htmlengine.c (html_object_changed): Called when an embedded
17878
changes, causes a re-layout. This should probably be queued until
17880
(parse_o): Added support for <OBJECT> element. Returns a callback
17881
"object_requested" to application. The semantic of having
17882
alternative text for non-instantiationable objects is not
17884
(parse_p): Added <PARAM> element, for object parameters.
17886
* gtkhtml-embedded.c/h: New object. A container object for
17887
embeddeing custom widgets into gtk-html. It basically notifies
17888
the caller when its content or layout information about it
17891
2000-01-26 Ettore Perazzoli <ettore@helixcode.com>
17893
* htmllinktextmaster.c (save): New function, implementing
17894
`HTMLObject::save'.
17895
(html_link_text_master_class_init): Install it.
17897
* htmllinktext.c (save): New function, implementing
17898
`HTMLObject::save'.
17899
(html_link_text_class_init): Install it.
17901
* htmlrule.c (save): New function, implementing
17902
`HTMLObject::save'.
17903
(html_rule_class_init): Install it.
17905
* htmlengine-save.c (encode_entities): `'' is not valid in
17906
HTML. Removed (now) unused variable `html'.
17908
* htmlengine-save.c (write_header): Use uppercase tags for consistency.
17909
(write_end): Likewise.
17911
* htmltext.c (get_tags): New helper functions to get the font
17912
style tags associated with the text element.
17914
* htmlclueflow.c (save): New function, implementation of
17915
`HTMLObject::save'. Add the proper start/end tags according to
17916
the clueflow's style.
17917
(html_clueflow_class_init): Install this method implementation.
17918
(get_tag_for_style): New helper function to get the tag associated
17919
with a specific style.
17921
* htmlclue.c (save): New function, implementation of
17922
`HTMLObject::save'. It saves all the children.
17923
(html_clue_class_init): Install this method implementation.
17925
* htmlengine-save.c (write_header): New function to write the
17926
start of the HTML file.
17927
(write_end): New function to write the end of the HTML file.
17928
(html_engine_save): Use them.
17929
(save_forall): Removed.
17930
(html_engine_save): Just save the main (vertical) clue.
17932
* htmlengine-save.c (html_engine_save_output_string): New function
17933
to write a plain, unencoded string.
17935
* htmltext.c (save): Use `html_engine_save_encode()' to write the
17936
string encoded with entities.
17938
* htmlengine-save.c (encode_entities): New helper function to
17939
encode a string through entities.
17940
(html_engine_save_encode): New function to write an encoded
17942
(html_engine_save_encode_string): New to write an encoded
17943
zero-terminated string.
17945
2000-01-25 Ettore Perazzoli <ettore@helixcode.com>
17947
* htmlclue.c (destroy): Always ensure the tree is in a valid state
17948
by removing the clue node before destroying it.
17950
2000-01-25 Ettore Perazzoli <ettore@helixcode.com>
17952
* gtkhtml.c (idle_handler): Call `gtk_html_calc_scrollbars' to
17953
update the scrollbars.
17955
* gtkhtml.c (gtk_html_save): New function.
17957
* htmltext.c (save): New function, implementation of
17958
`HTMLObject::save'. For now, it just dumps the text.
17959
(html_text_class_init): Install it.
17961
* htmlcursor.c (html_cursor_home): Removed debugging message.
17963
* htmlobject.c (html_object_save): New function.
17964
(save): New function, default implementation of
17965
`HTMLObject::save'.
17966
(html_object_class_init): Install it.
17968
* htmlobject.h: New virtual method `HTMLObject::save'.
17970
* htmlengine-save.h: New file.
17971
* htmlengine-save.c: New file.
17973
* htmlengine.c (html_engine_set_editable): Move the cursor to the
17974
home if the widget becomes editable. Also, if the editable state
17975
changes, redraw the whole thing.
17976
(html_engine_timer_event): Move the cursor home.
17977
(html_engine_update_event): Move the cursor home at the end of
17980
* testgtkhtml.c (goto_url): Do not call `gtk_html_parse()'
17983
* gtkhtml.c (init): Initialize `editable' to `FALSE'.
17984
(gtk_html_parse): Turned into a dummy.
17985
(gtk_html_begin): Call `html_engine_parse()' too. Also set
17986
`load_in_progress' to `TRUE' and the engine's editable state to
17988
(gtk_html_end): Set `load_in_progress' to `FALSE'. Set the
17989
engine's editable state according to the value of the `editable'
17991
(gtk_html_set_editable): New function.
17992
(gtk_html_get_editable): New function.
17994
* gtkhtml.h: New members `editable', `load_in_progress' in
17997
* Makefile.am (libgtkhtmldir): Never compile the HTML component.
17999
* htmlengine.c (html_engine_timer_event): No longer do the ugly
18000
font saving/restoring trick. I actually don't understand why it
18003
* htmldrawqueue.c (draw_obj): Don't draw the cursor here as the
18004
idle loop handler will take care of it.
18006
* gtkhtml.c (key_press_event): Don't move the cursor forward when
18007
inserting text, as `html_engine_insert()' now does this.
18009
* htmlengine-edit.c (html_engine_insert): Move the cursor forward.
18011
2000-01-24 Ettore Perazzoli <ettore@helixcode.com>
18013
* htmlimage.c (accepts_cursor): New function, implementation of
18014
`HTMLObject::accepts_cursor'. It always returns `TRUE', so that
18015
we can actually move the cursor to an image and edit it.
18016
(html_image_class_init): Install it.
18018
* htmlengine-edit.c (merge_text_at_cursor): Fix merging.
18020
* htmlcursor.c (html_cursor_dup): New function to duplicate a
18023
* gtkhtml.c (focus_in_event): New function, implementation for
18024
`GtkWidget::focus_in_event'.
18025
(focus_out_event): New function, implementation for
18026
`GtkWidget::focus_out_event'.
18027
(class_init): Install these.
18028
(button_press_event): Grab the focus.
18030
* htmlobject.c (relayout): If the object has no parent and has
18031
shrunk, queue a clear for the area that is not covered by the
18034
* htmlengine.c (html_engine_queue_clear): New function.
18036
* htmldrawqueue.c (html_draw_queue_add_clear): New function.
18037
(html_draw_queue_add_clear_with_background): New function.
18038
(clear): New static function to clear an area specified by an
18040
(html_draw_queue_flush): Flush the clear queue as well.
18041
(html_draw_queue_add): Emit the "draw_pending" signal only if the
18042
clear queue is empty too.
18043
(clear_element_new): New static function to create a clear element
18044
with a solid color background.
18045
(clear_element_new_with_background): New static function to create
18046
a clear element with a pixmap background.
18047
(clear_element_destroy): New static function to destroy a clear
18050
* htmldrawqueue.h: Added an HTMLClearElement queue for erasing
18051
parts of the window.
18053
* htmltextslave.c (fit_line): Do not chop the last word if there
18054
is enough space, even if there is another object after this one.
18056
* htmltextslave.c (html_text_slave_get_offset_for_pointer):
18057
Compare with the middle position of the character, not the
18058
leftmost border, so that it's easier to make selections.
18060
* htmltextslave.c (draw_highlighted): Fix off-by-one selection
18062
(html_text_slave_get_offset_for_pointer): Consider the last
18065
2000-01-24 Elliot Lee <sopwith@redhat.com>
18067
* htmlform.c: Include string.h to eliminate warning.
18069
2000-01-24 Ettore Perazzoli <ettore@helixcode.com>
18071
* gtkhtml.c (expose): Return `TRUE'.
18072
(selection_idle_handler): Removed.
18073
(motion_notify_event): Do not use an idle handler anymore.
18075
* gtkhtml.h: Removed `selection_idle_handler_id', `selection_x2',
18078
* htmltextmaster.c (select_range): Fixed range comparisons. I
18079
think I need to sleep.
18081
* htmldrawqueue.c (draw_obj): Do not paint the cursor if the
18082
engine is not editable.
18083
(html_draw_queue_flush): Removed debugging message.
18085
* htmlengine.c (html_engine_flush_draw_queue): Only draw the
18086
cursor if the engine is not editable.
18087
(html_engine_draw): Do not draw the cursor if not editable.
18088
(html_engine_draw_cursor_in_area): g_assert() that the widget is
18091
* gtkhtml.c (selection_idle_handler): New function, to perform
18092
selection in the idle loop.
18093
(motion_notify_event): Set it up in the idle handler to perform
18095
(destroy): Remove the selection idle, if any.
18096
(init): Initialize `selection_idle_handler_id' to zero.
18097
(gtk_html_end): Removed debugging message.
18099
* gtkhtml.h: New member `selection_idle_handler_id' in `GtkHTML'.
18101
2000-01-23 Federico Mena Quintero <federico@helixcode.com>
18103
* gtkhtml.c (realize): Set the background pixmap to NONE so that
18104
it does not flicker as much when scrolling.
18106
2000-01-23 Ettore Perazzoli <ettore@helixcode.com>
18108
* htmltextmaster.c (check_point): Fix selection for slaves after
18111
* htmlobject.c (check_point): Fix braino: `for_cursor' is a
18112
`gboolean', not a `gpointer'.
18114
* htmltextmaster.c (split): Set the selection on the new element
18115
by hand instead of calling `html_object_select_range()'.
18117
* gtkhtml.c (motion_notify_event): Call
18118
`html_engine_select_region' with `TRUE' as the `queue_draw'
18121
* htmlengine.c (html_engine_select_region): New param
18122
`queue_draw'. When not FALSE, put all the objects that change
18123
selection state on the draw queue.
18124
(select_region_forall): Updated to do this.
18125
(html_engine_unselect_all): New param `queue_draw', honoured by
18126
using `SelectRegionData'.
18127
(unselect_forall): Updated accordingly.
18129
* htmlobject.h (select_range): Updated with the `engine' and
18130
`queue_draw' params.
18131
(html_object_select_range): Likewise.
18133
* htmlobject.h: New params `engine', `queue_draw' in
18134
`HTMLObject::select_range'.
18136
* htmltextmaster.c (check_point): Removed debugging message.
18138
* gtkhtml.c (button_press_event): Sum the X/Y offsets before
18139
passing the coordinates to `html_engine_jump_at'.
18140
(motion_notify_event): Sum the X/Y offsets before calling
18141
`html_engine_get_link_at' too.
18143
* htmlengine.c (html_engine_get_object_at): Do not add the X/Y
18144
offsets when calling the `check_point' method on the parent clue.
18146
* htmltextslave.c (fit_line) [HTML_TEXT_SLAVE_DEBUG]: Updated
18147
debugging code to use the new HTMLFitType values.
18149
* htmltextmaster.c (check_point): Added ugly kludges to make the
18150
mouse selection move the cursor and selected text as expected,
18151
when outside the bounds.
18153
* htmltextslave.c (check_point): New function, implementation for
18154
`HTMLObject::check_point'. Always return NULL: this makes sure
18155
the object cannot be selected with the mouse.
18156
(html_text_slave_class_init): Install it.
18158
* htmlengine.c (html_engine_get_object_at): New param
18160
(html_engine_select_region): If any of the extremes is not in an
18161
object, unselect all.
18163
* htmlobject.h: New parameter `for_cursor' in
18164
`HTMLObject::check_point'. All the method implementations updated.
18166
* htmltable.c (is_container): New function, implementation of
18167
`HTMLObject::is_container'. It returns TRUE.
18168
(html_table_class_init): Install it.
18170
* htmlclue.c (is_container): New function, implementation of
18171
`HTMLObject::is_container'. It returns TRUE.
18172
(html_clue_class_init): Install it.
18174
* htmlobject.c (is_container): New function, default
18175
implementation for `HTMLObject::is_container'.
18176
(html_object_class_init): Install it.
18177
(html_object_is_container): New function.
18179
* htmlobject.h: New virtual method `is_container'.
18181
* htmlengine.c: Added members `x1', `y1', `x2', `y2' to
18182
`SelectionRegionData'.
18183
(html_engine_select_region): Initialize them to the pointer x/y
18184
values relative to the objects that bound the selection. Also,
18187
* htmltextslave.c (draw_highlighted): Fix off-by-one error.
18189
2000-01-22 Ettore Perazzoli <ettore@helixcode.com>
18191
* htmlengine.c (html_engine_select_region): New function.
18192
(html_engine_unselect_all): New function.
18194
* htmlclue.c (forall): New function, implementation of
18195
`HTMLObject::forall'.
18196
(html_clue_class_init): Install it.
18198
* htmlobject.c (html_object_forall): New function.
18199
(forall): New function, default implementation of
18200
`HTMLObject::forall'.
18201
(html_object_class_init): Install it.
18203
* htmlobject.h: New virtual method `forall'.
18205
* htmlcursor.c (html_cursor_backward_element): New function.
18207
* htmlcursor.c (debug_location): Made a non-op by default.
18209
* gtkhtml.c (init): Initialize the new GtkHTML member variables.
18210
(button_press_event): Return `TRUE' as we always handle the press.
18211
Do not emit `link_clicked' anymore. Grab the pointer. Set
18212
`in_selection' to TRUE, and initialize `selection_x1' and
18213
`selection_y1'. Unselect all in the engine.
18214
(button_release_event): Remove the grab. Don't emit the
18215
"link_clicked" signal if we are performing a selection. Set
18216
`in_button' and `in_selection' to FALSE.
18217
(motion_notify_event): Handle the selection if button is pressed.
18219
* gtkhtml.h: New members `selection_x1', `selection_y1',
18220
`selection_x2', `selection_y2', `button_pressed' and
18221
`in_selection' in `GtkHTML'.
18223
* htmlobject.c (select_range): Braino fix.
18225
* htmltextmaster.c (select_range): If the lenght is negative,
18226
select the whole text.
18228
2000-01-21 Ettore Perazzoli <ettore@helixcode.com>
18230
* htmlimage.c (generate_pixbuf_for_selection): New helper
18232
(draw): By using it, display a color-composed image, using the
18235
* htmlcolorset.c (html_color_set_new): I never learn: use 16-bit
18236
color values. Also, make highlight foreground color different
18237
from the highlight color.
18239
* htmltextslave.c (draw_highlighted): New helper function.
18240
(draw_normal): New helper function.
18241
(draw): Draw highlighted text when appropriate, using the above
18244
* htmlpainter.c (html_painter_draw_text): Made param `text'
18247
* htmltextmaster.c (html_text_master_init): Initialize
18248
`select_start', `select_length'.
18249
(select_range): New function, implementation of
18250
`HTMLObject::select_range()'.
18251
(split): Split the selection between self the newly created text
18253
(insert_text): New function, implementation of
18254
`HTMLText::insert_text'. Used to update the selection after
18256
(remove_text): New function, implementation of
18257
`HTMLText::remove_text'. Used to update the selection after the
18259
(html_text_master_class_init): Install these implementations.
18261
* htmltextmaster.h: New member `select_start', `select_length'.
18263
* htmlobject.c (html_object_select): Removed.
18264
(select_range): New function, default implementation of
18265
`HTMLObject::select_range()'.
18266
(html_object_select_range): New function.
18267
(html_object_class_init): Install it.
18269
* htmlobject.h: New virtual method `HTMLObject::select_range()'.
18271
* htmlengine.c (html_engine_init): Set the color set in the
18274
* htmlpainter.c (html_painter_get_default_background_color): New
18276
(html_painter_get_default_foreground_color): Removed.
18277
(html_painter_get_default_link_color): Removed.
18278
(html_painter_get_default_highlight_color): Removed.
18279
(html_painter_get_default_highlight_foreground_color): Removed.
18280
(html_painter_draw_cursor): Removed.
18281
(html_painter_realize): Cleaned up a bit.
18282
(html_painter_new): Set `color_set' to NULL.
18283
(allocate_color_set): New helper function to allocate the
18284
HTMLColorSet colors.
18285
(html_painter_set_color_set): New function.
18286
(html_painter_realize): Allocate colors if `color_set' is not
18289
* htmlpainter.h: New member `color_set' in `HTMLPainter'.
18291
* htmlengine.c: Updated to use `htmlcolorset.c' instead of
18292
`htmlenginecolorset.c'.
18293
(html_engine_get_background_color): Removed.
18294
(html_engine_get_foreground_color): Removed.
18295
(html_engine_get_link_color): Removed.
18296
(html_engine_get_highlight_color): Removed.
18297
(html_engine_get_highlight_foreground_color): Removed.
18299
* htmlengine.h: Likewise.
18301
* htmlcolorset.c: New file.
18302
* htmlcolorset.h: New file.
18304
* htmlenginecolorset.c: Removed.
18305
* htmlenginecolorset.h: Removed.
18307
2000-01-20 Ettore Perazzoli <ettore@helixcode.com>
18309
* htmlobject.c (draw): Removed param `cursor'.
18311
* htmlobject.h: Removed param `cursor' in `HTMLObject::draw'. All
18312
the implementations fixed in all the classes.
18314
* htmlengine.c (html_engine_init): Initialize `color_set'.
18315
(html_engine_destroy): Destroy the color set.
18316
(html_engine_realize): Realize the color set.
18317
(html_engine_get_background_color): New function.
18318
(html_engine_get_foreground_color): New function.
18319
(html_engine_get_link_color): New function.
18320
(html_engine_get_highlight_color): New function.
18321
(html_engine_get_highlight_foreground_color): New function.
18323
* htmlengine.h: New member `color_set'.
18325
* htmlenginecolorset.h: New file.
18326
* htmlenginecolorset.c: New file.
18328
* htmlobject.c (html_object_init): Initialize `selected' to FALSE.
18329
(html_object_select): New function.
18331
* htmlobject.h: New flag `selected' in `HTMLObject'.
18333
* htmlengine-edit.c (merge_text_at_cursor): Changed so that slaves
18334
between the two elements are removed only if the two elements can
18335
actually be merged.
18337
* htmltextmaster.c (fit_line): Use `html_clue_append_after()'.
18338
* htmltextslave.c (split): Likewise.
18340
* htmlengine-edit.c (delete_different_parent): Avoid destroying
18341
the slaves after the first parent.
18342
(delete_same_parent): Likewise.
18344
* htmltextslave.c (fit_line): Remove the object from the parent
18345
before destroying it.
18346
(split): Split the assertion so that it's obvious to see what is
18348
(split_at_newline): Braino fix. Get the owner's text, as we are
18349
no HTMLText-derived class.
18351
* htmlengine-edit.c (html_engine_insert_para): Remove the object
18352
from the parent before destroying it.
18354
* htmltextmaster.c (fit_line): Remove the object from the parent
18355
before destroying it.
18357
* debug.c (debug_dump_tree): Display the HTMLTextSlave intervals
18358
as [start, end] instead of [start, len].
18360
* gtkhtml.c (button_press_event): Implemented.
18362
* htmlengine-edit.c (html_engine_jump_to): Renamed to
18363
`html_engine_jump_to_object' and made void.
18364
(html_engine_jump_at): New function.
18366
* htmlengine.c (html_engine_get_object_at): New function.
18368
2000-01-19 Ettore Perazzoli <ettore@helixcode.com>
18370
* htmltable.c (mouse_event): Removed.
18371
(html_table_class_init): Do not install it.
18373
* htmlimageinput.c (mouse_event): Removed.
18374
(html_imageinput_class_init): Do not install it.
18376
* htmlengine.c (html_engine_mouse_event): Removed.
18378
* htmlcluev.c (mouse_event): Removed.
18379
(html_cluev_class_init): Do not install it.
18381
* htmlclue.c (mouse_event): Removed.
18382
(html_clue_class_init): Do not install it.
18384
* gtkhtml.c (button_press_event): Do not call
18385
`html_engine_mouse_event' anymore. We are going to do this
18387
(button_release_event): Likewise.
18389
* htmlobject.c (mouse_event): Removed.
18390
(html_object_class_init): Do not install it anymore.
18391
(html_object_mouse_event): Removed.
18393
* htmlobject.h: Removed `mouse_event' virtual method.
18395
2000-01-19 Ettore Perazzoli <ettore@helixcode.com>
18397
* htmlcluev.c (check_point): Fixed to use the correct offsets.
18399
* htmlengine.c (html_engine_mouse_event): Make the cursor jump to
18400
the specified position if the engine is editable.
18402
* htmlengine-edit.c (html_engine_jump_to): New function.
18404
* htmltextmaster.c (check_point): New function, implementation of
18405
`HTMLObject::check_point()'.
18406
(html_text_master_class_init): Install it.
18408
* htmltextslave.c (html_text_slave_get_offset_for_pointer): New
18411
* htmlobject.h: New arg `painter' in `check_point'. All the
18412
method implementations updated.
18413
* htmlobject.c (check_point): Updated accordingly.
18415
* htmltextslave.c (fit_line): Removed `#if 0'ed code.
18417
* htmlobject.h: New parameter `offset_return' in
18418
`HTMLObject::check_point'. Through this, the object can also
18419
return a cursor offset.
18420
* htmlobject.c (html_object_check_point): Accordingly, new
18421
parameter `offset_return'.
18422
* htmlengine.c (html_engine_get_link_at): Updated accordingly.
18423
* htmlclue.c (check_point): Updated to get the extra parameter.
18424
* htmlcluev.c (check_point): Likewise.
18425
* htmlobject.c (check_point): Likewise.
18427
* htmlengine-edit.c (html_engine_delete): When a non-text, destroy
18430
* htmlcursor.c (html_cursor_up): Use
18431
`html_object_get_cursor_base', not `html_object_get_cursor'.
18432
(html_cursor_down): Likewise.
18434
* htmltextmaster.c (get_cursor_base): New function, implementation
18435
of `HTMLObject::get_cursor_base'.
18436
(html_text_master_class_init): Install it.
18437
(get_cursor): Rewritten by means of `html_object_get_cursor_base'.
18439
* htmltext.c (get_cursor_base): New function, implementation of
18440
`HTMLObject::get_cursor_base'.
18441
(html_text_class_init): Install it.
18442
(get_cursor): Rewritten by means of `html_object_get_cursor_base'.
18444
* htmlobject.c (html_object_get_cursor_base): New function.
18445
(get_cursor_base): New function, default implementation of
18446
`HTMLObject::get_cursor_base'.
18447
(html_object_class_init): Install it.
18448
(get_cursor): Rewritten by means of `html_object_get_cursor_base'.
18450
* htmlobject.h: New virtual method `get_cursor_base'.
18452
* debug.c (debug_dump_tree): Print the object position.
18454
* htmlengine-edit.c (merge_text_at_cursor): Return the amount of
18455
characters added to the current element.
18456
(html_engine_delete): Sum it to the cursor's current offset.
18458
* htmlcursor.c (backward): Don't go beyond the last character if
18459
there is another element after it.
18461
2000-01-18 Ettore Perazzoli <ettore@helixcode.com>
18463
* htmlengine-edit.c (merge_text_at_cursor): New function,
18464
attempting to merge the text element at the cursor with the
18465
previous text element, if any and if of the same type and with the
18467
(html_engine_delete): Call it.
18469
* htmlengine-edit.c (delete_different_parent): New param
18470
`destroy_start'. If `FALSE', do not destroy the `start_object'.
18471
(delete_same_parent): Likewise.
18472
(html_engine_delete): Do not destroy an empty text object if it's
18473
the last in the clue or it's followed by a vspace.
18475
* htmlrule.c (draw): Don't call the parent class' `draw' method.
18477
* htmlobject.c (draw): Don't draw the cursor.
18479
* htmldrawqueue.c (draw_obj): Draw the cursor in the area we have
18482
* htmlengine.c (draw_cursor): Removed.
18483
(html_engine_draw_cursor_in_area): Replaced by this one.
18484
(html_engine_draw): Updated to use this one.
18485
(html_engine_draw_cursor): Likewise.
18487
* htmltextslave.c (fit_line): Do not skip leading space anymore.
18489
* htmlengine.c (html_engine_make_cursor_visible): Argh.
18490
s/rightBorder/topBorder/.
18491
(draw_cursor): Fixed.
18493
* gtkhtml.c (key_press_event): Queue a draw if return value is
18496
2000-01-18 Jonas Borgstr�m <jonas_b@bitsmart.com>
18498
* htmlengine.c (parse_input): Modified the forms code to work with the
18499
new htmlengine. Changed html_clue_append to append_element. And did some
18502
2000-01-18 Ettore Perazzoli <ettore@helixcode.com>
18504
* htmlengine.c (append_element): Silly me. Don't add the object
18505
to the flow twice when creating a new flow!
18507
* htmlcursor.c (forward): Fixed navigation at the end of the
18508
element so that it works with empty elements.
18509
(backward): Likewise.
18510
(next_not_slave): Fixed so that it starts from the object after
18511
`object', not `object' itself.
18513
* htmlengine.c (current_clueflow_style): If the stack is empty,
18514
return `HTML_CLUEFLOW_STYLE_NORMAL', not `HTML_CLUEFLOW_STYLE_P'.
18516
* htmlclueflow.c (get_default_font_style): Removed handling of
18517
`HTML_CLUEFLOW_STYLE_P'.
18519
* debug.c (clueflow_style_to_string): Removed handling of
18520
`HTML_CLUEFLOW_STYLE_P'.
18522
* htmlclueflow.h: Get rid of `HTML_CLUEFLOW_STYLE_P' as we don't
18525
* htmlengine.c (html_engine_init): The default value for
18526
`editable' should be FALSE!
18528
* htmlengine.c (html_engine_flush_draw_queue): Draw cursor
18529
before/after flushing the queue.
18531
* htmlengine-edit.c (html_engine_insert_para): Draw cursor
18532
before/after doing the stuff.
18533
(html_engine_insert): Likewise.
18535
* htmlcursor.c (html_cursor_up): Rewritten by means of
18536
`html_object_get_cursor'.
18538
* htmltextmaster.c (calc_char_position): Removed.
18539
(get_cursor): New function, implementation of
18540
`HTMLObject::get_cursor'.
18541
(html_text_master_class_init): Install it.
18542
(get_cursor): When we encounter a non-HTMLTextSlave object, we
18543
should break the loop, not continue it.
18545
* htmltext.c (html_text_calc_char_position): Removed.
18546
(calc_char_position): Removed.
18547
(get_cursor): New function, implementation of
18548
`HTMLObject::get_cursor'.
18549
(html_text_class_init): Install it.
18551
* htmltext.h: Removed `calc_char_position' method.
18553
* htmlobject.c (html_object_get_cursor): New function.
18554
(accepts_cursor): Return TRUE by default.
18555
(get_cursor): New function, implementation of
18556
`HTMLObject::get_cursor'.
18557
(class_init): Install it.
18559
* htmlobject.h: New virtual method `get_cursor'.
18561
* htmlengine-edit.c (queue_draw_for_cursor): Removed.
18562
(html_engine_move_cursor): Use `html_draw_cursor' instead.
18564
* htmlengine.c (html_engine_init): Initialize `invert_gc' to
18566
(html_engine_destroy): Destroy `invert_gc' if not `NULL'.
18567
(html_engine_realize): Initialize `invert_gc' by creating a
18569
(html_engine_draw_cursor): New function.
18571
* htmlengine.h: New member `invert_gc' in `HTMLEngine'.
18573
2000-01-17 Ettore Perazzoli <ettore@helixcode.com>
18575
* gtkhtml.c: Do not #include "htmlpainter.h" anymore.
18576
(realize): Call `html_engine_realize' instead of accessing the
18577
painter and calling `html_painter_realize' directly.
18579
* htmlengine.c (html_engine_init): Initialize member `window' to
18581
(html_engine_realize): New function.
18583
* htmlengine.h: New member `window' in `HTMLEngine'.
18585
* htmlengine.h (html_painter_set_background_color): Removed bogus
18588
* htmlclueflow.c (draw): Use `html_painter_get_black' to set the
18589
pen color for the bullet. I think we should be using the font
18590
color instead, but it's fine for now.
18592
* htmlpainter.c (html_painter_get_black): New function.
18594
* htmlclue.c (draw): Removed bogus code to draw rects around the
18595
clue and getting rid of corresponding variables. This was not
18596
even that useful for debugging, as it was intrinsecally broken.
18598
* htmlclueflow.c (add_pre_padding): Add some padding for `<pre>'
18599
as well, if the previous element is not a `<pre>' one.
18600
(add_post_padding): Likewise, but checking with the next element
18601
instead of the previous one.
18603
* htmlengine.c (parse_body): Handle `\n' by inserting a line
18606
* htmltype.c: Do not call `html_bullet_type_init()' anymore.
18608
* htmlbullet.c: Removed.
18609
* htmlbullet.h: Removed.
18611
* htmlengine.c (html_engine_init): Initialize `avoid_para' to
18612
`TRUE', `pending_para' to FALSE.
18613
(html_engine_parse): Likewise.
18614
(all functions): Updated to use these new members.
18615
(block_end_list): Avoid adding empty paragraph breaks after this.
18616
(block_end_indent): Likewise.
18617
(parse_f): Fix relative font size.
18619
* htmlengine.h: New elements `avoid_para', `pending_para'.
18621
* htmlengine.c (close_flow): Added ugly hack to check if the flow
18622
ends with a vspace. If it does, the vspace is killed. Yes, I
18623
should do it differently, but let's just get it to work now.
18625
2000-01-16 Ettore Perazzoli <ettore@helixcode.com>
18627
* htmlcluev.c (get_right_clear): New function, implementation of
18628
`HTMLClue::get_right_clear'.
18629
(get_left_clear): New function, implementation of
18630
`HTMLClue::get_left_clear'.
18631
(html_cluev_class_init): Install virtual methods.
18633
* htmlclueflow.c (add_post_padding): Add padding even if the next
18634
object is an header.
18636
* htmlfontmanager.c: Use a static array for calculating the real
18637
font size. (Yes, this is just a temporary hack.)
18639
* htmlclueflow.c (calc_preferred_width): Use `get_indent()'
18640
correctly instead of simply multiplying the level by the indent
18643
* htmlrule.c (draw): Fix braino: `HTML_HALIGN_RIGHT' and
18644
`HTML_HALIGN_LEFT' were swapped.
18646
2000-01-13 Ettore Perazzoli <ettore@helixcode.com>
18648
* htmlclueflow.c: Changed to display bullets correctly even if
18649
`level' is zero. (Which should not happen according to the
18650
standard, but it does happen in practice.)
18652
* htmlengine.c (html_engine_init): Initialize `pending_vspace' to
18654
(html_engine_insert_text): Removed.
18655
(insert_pending_vspace): New function.
18656
(insert_text): New function.
18657
(add_line_break): New function.
18658
(block_end_font): No longer insert a vspace.
18659
(block_end_list): Likewise.
18660
(parse_body): Do not set `vspace_inserted' anymore. `\n' just
18661
causes `pending_vspace' to be inconditionally incremented.
18662
(All functions): Use `add_line_break' to force line breaks instead
18663
of `html_engine_insert_vspace()'.
18664
(parse_h): Set `pending_vspace' to 0 when opening/closing headers.
18665
Insert pending vspace before adding a rule.
18666
(parse_i): Insert pending vspace before adding the image.
18667
(parse_l): Insert pending vspace before creating the new clue.
18668
(html_engine_insert_vspace): Removed.
18669
(close_flow): New parameter `clue'.
18671
* htmlengine.h: `vspace_inserted' removed. New member
18674
* htmlvspace.c (html_vspace_new): Removed parameter `space'.
18675
(html_vspace_init): Removed parameter `space'. Do not init
18676
`ascent', `descent' anymore.
18677
(calc_size): New function, implementation for
18678
`HTMLObject::calc_size'.
18679
(html_vspace_class_init): Install it.
18681
2000-01-11 Ettore Perazzoli <ettore@helixcode.com>
18683
* htmlclueflow.c (calc_size): Add padding at the end only.
18685
* htmlstack.c (html_stack_pop): Added precondition.
18687
* htmlengine.c (parse_a): Do not force color and font for links
18690
* htmllinktextmaster.c (get_font_style): New function,
18691
implementing `HTMLText::get_font_style'. It forces the font style
18693
(html_link_text_master_class_init): Install it.
18695
* htmllinktext.c (get_font_style): New function, implementing
18696
`HTMLText::get_font_style'. It forces the font style to be
18698
(html_link_text_class_init): Install it.
18700
* htmltablecell.c (html_table_cell_init): Initialize
18701
`bg_allocated' to `FALSE'.
18702
(set_bg_color): Set `bg_allocated' to `FALSE' if the new color is
18703
different from the existing one.
18704
(draw): If `bg_allocated' is `FALSE', allocate the color and set
18705
`bg_allocated' to `TRUE'.
18707
* htmltablecell.h: New member `bg_allocated' in `HTMLTableCell'.
18709
* htmlengine.c (html_engine_init): Set `bgColor_allocated' to
18711
(draw_background): If `bgColor_allocated' is `FALSE', allocate
18712
`bgColor' in the engine's painter.
18713
(parse_b): Set `bgColor_allocated' to FALSE when setting a new
18715
(close_anchor): Do not pop color on links anymore.
18717
* htmlengine.h: New member `bgColor_allocated' in `HTMLEngine'.
18719
2000-01-10 Ettore Perazzoli <ettore@helixcode.com>
18721
* htmlengine.c (current_color): New function.
18722
(html_engine_set_named_color): Removed.
18723
(push_color): New function.
18724
(pop_color): New function.
18725
(html_engine_stop_parser): Clear all the stacks except the
18726
list/glossary ones as I am still unsure how to handle them.
18727
(html_engine_pop_color): Removed.
18728
(All functions): Updated to use these new color stack functions.
18729
Also, use `gdk_color_parse()' instead of
18730
`html_engine_set_named_color'.
18732
* htmlengine.h (html_painter_set_background_color): Removed
18733
prototype (what the hell is this doing here!?).
18735
* htmllinktext.c (html_link_text_init): New parameter `color'.
18736
(html_link_text_new): New parameter `color'.
18738
* htmltextslave.c (draw): Set the color using
18739
`html_text_get_color()'.
18741
* htmltext.c (html_text_init): New parameter `color', to
18742
initialize the `color' member. Alos, set `color_allocated' to
18744
(html_text_new): New parameter `color'.
18745
(get_color): New function, default implementation for
18746
`HTMLText::get_color'.
18747
(html_text_get_color): New function.
18750
* htmltext.h: New members `color', `color_allocated'. New virtual
18751
method `HTMLText::get_color'.
18753
* htmltable.c (draw): Removed stupid "nonono" message. :-)
18755
* htmlengine.c (parse_t): Don't put the a new table in itw own
18756
HTMLClueFlow anymore: close the current flow, and append to the
18759
* htmltextslave.c (calc_size): New function, implementation for
18760
`HTMLObject::calc_size'.
18761
(html_text_slave_class_init): Install it.
18763
* htmlclueflow.c (html_clueflow_get_default_font_style): New
18765
(get_default_font_style): Default implementation for
18766
`HTMLClueFlow::get_default_font_style'; just a stub for now.
18767
(html_clueflow_class_init): Install it.
18769
* htmlclueflow.h: New virtual method
18770
`HTMLClueFlow::get_default_font' to get the font associated with
18771
the HTMLClueFlow's style.
18773
* htmlclueflow.h (HTML_CLUEFLOW_CLASS): Fixed (do the correct
18776
* htmltextmaster.c (calc_min_width): Implemented.
18777
(calc_preferred_width): Implemented.
18778
(calc_size): New function, implementing `HTMLObject::calc_size'.
18779
(html_text_master_class_init): Install it.
18781
* htmltext.c (calc_size): New function, implementation of
18782
`HTMLObject::calc_size()'.
18783
(html_text_class_init): Install it.
18785
* htmltext.c (html_text_get_font_style): New function.
18786
(get_font_style): Default implementation for
18787
`HTMLText::get_font_style'.
18788
(html_text_class_init): Install it.
18790
(calc_size): Use it.
18792
* htmltext.h: New virtual method `HTMLText::get_font_style'.
18794
2000-01-09 Ettore Perazzoli <ettore@helixcode.com>
18796
* htmlobject.h: New arg `painter' in `HTMLObject::calc_size';
18797
removed arg `parent'. New arg `painter' in
18798
`HTMLObject::calc_preferred_width', `HTMLObject::calc_min_width'
18799
and `HTMLObject::fit_line' as well.
18800
* htmlclue.c: Updated accordingly.
18801
* htmlclue.h: Updated accordingly.
18802
* htmlcluealigned.c: Updated accordingly.
18803
* htmlcluealigned.h: Updated accordingly.
18804
* htmlclueflow.c: Updated accordingly.
18805
* htmlclueflow.h: Updated accordingly.
18806
* htmlclueh.c: Updated accordingly.
18807
* htmlclueh.h: Updated accordingly.
18808
* htmlcluev.c: Updated accordingly.
18809
* htmlcluev.h: Updated accordingly.
18810
* htmlengine.c: Updated accordingly.
18811
* htmlimage.c: Updated accordingly.
18812
* htmlimage.h: Updated accordingly.
18813
* htmllinktext.c: Updated accordingly.
18814
* htmllinktext.h: Updated accordingly.
18815
* htmllinktextmaster.c: Updated accordingly.
18816
* htmllinktextmaster.h: Updated accordingly.
18817
* htmlobject.c: Updated accordingly.
18818
* htmlobject.h: Updated accordingly.
18819
* htmlrule.c: Updated accordingly.
18820
* htmlrule.h: Updated accordingly.
18821
* htmlstream.c: Updated accordingly.
18822
* htmltable.c: Updated accordingly.
18823
* htmltablecell.c: Updated accordingly.
18824
* htmltext.c: Updated accordingly.
18825
* htmltextmaster.c: Updated accordingly.
18826
* htmltextslave.c: Updated accordingly.
18827
* htmlvspace.c: Updated accordingly.
18828
* htmlvspace.h: Updated accordingly.
18830
* htmlpainter.c (html_painter_calc_ascent): New function.
18831
(html_painter_calc_descent): New function.
18832
(html_painter_calc_text_width): New function.
18834
* htmltable.c (find_anchor): Kill unused variable.
18836
* htmltype.c (html_types_init): Don't call `html_hspace_init()'
18839
* htmlhspace.c: Removed.
18840
* htmlhspace.h: Removed.
18842
* htmlengine.c: Updated to use `HTMLFontStyle' instead of
18843
`HTMLFont'. Also, we do not hardcode the font and color all the
18844
time anymore: instead, we let the HTMLClueFlow specify the default
18846
(select_font_full): Removed.
18847
(select_font_relative): Removed.
18848
(current_font_style): New utility function.
18849
(push_font_style): New utility function.
18850
(pop_font_style): New utility function.
18851
(current_clueflow_style): New utility function.
18852
(push_clueflow_style): New utility function.
18853
(pop_clueflow_style): New utility function.
18854
(close_anchor): No longer pop the font.
18855
(html_engine_parse): Initialize the font stack with
18856
`HTML_FONT_STYLE_DEFAULT'.
18857
(html_engine_select_font): Removed.
18858
(html_engine_get_current_font): Removed.
18859
(html_engine_insert_text): Parameter `font' removed. Always use
18860
the current font style.
18861
(new_flow): Removed parameter `style'. Get the style from the top
18862
of the ClueFlow style stack using `current_clueflow_style'.
18863
(block_end_clueflow_style): New function.
18865
* htmlengine-edit.c (html_engine_insert_para): Use an empty
18866
HTMLTextMaster element instead of an hspace for the new clue.
18868
* htmlengine.h: New member `clueflow_style_stack' in `HTMLEngine'.
18870
* htmltextmaster.c (calc_min_width): Always return 0.
18871
(calc_preferred_width): Return bogus 100 for now.
18873
* htmltextmaster.h: Removed members `minWidth', `prefWidth'.
18875
* htmlclueflow.h: Updated to use `HTMLFontStyle' instead of
18877
* htmlclueflow.c: Likewise.
18879
* htmllinktextmaster.h: Updated to use `HTMLFontStyle' instead of
18881
* htmllinktextmaster.c: Likewise.
18883
* htmllinktext.h: Updated to use `HTMLFontStyle' instead of
18885
* htmllnktext.c: Likewise.
18887
* htmltext.h: Updated to use `HTMLFontStyle' instead of
18889
* htmltext.c: Likewise.
18891
* htmltextmaster.h: Updated to use `HTMLFontStyle' instead of
18893
* htmltextmaster.c: Likewise.
18895
2000-01-08 Ettore Perazzoli <ettore@helixcode.com>
18897
* htmlclueflow.c (draw): Temporarily disabled bullet painting
18900
* htmlpainter.c (html_painter_set_font): Removed.
18901
(html_painter_set_font_style): Replaced by this one.
18902
(html_painter_get_font): Removed.
18903
(html_painter_get_font_style): Replaced by this one.
18904
(html_painter_new): New arg `font_manager', to set the
18905
`font_manager' member.
18906
(html_painter_draw_text): Retrieve the font using
18907
`html_font_manager_get_gdk_font()'. Also, handle underline and
18908
strikeout according to the value of the `style' member.
18910
* htmlpainter.h: Member `font' removed: replaced by `font_style'.
18911
New member `font_manager', pointer to an HTMLFontManager.
18913
* htmlfont.c: Removed.
18914
* htmlfont.h: Removed.
18916
* htmlengine.c (html_engine_init): Initialize member
18918
(html_engine_destroy): Destroy the font manager.
18920
* htmlengine.h: New member `font_manager' in `HTMLEngine'.
18921
Members `fs', `cs' renamed to `font_stack' and `color_stack',
18922
respectively. `bold', `underline', `fontsize' removedq.
18924
* htmlfontmanager.c: New file.
18925
* htmlfontmanager.h: New file.
18927
* htmlpainter.c: Moved some functions around to make the code
18929
(html_painter_alloc_color): New function.
18930
(html_painter_free_color): New function.
18932
2000-01-07 Ettore Perazzoli <ettore@helixcode.com>
18934
* htmlfont.c, htmlfont.h: Removed.
18936
* Makefile.am (libgtkhtml_HEADERS): Added `htmlurl.h'.
18938
* htmlengine.c (parse_body): Insert vspace instead of creating a
18939
new flow for every newline in the `<pre>' case.
18940
(html_engine_new_flow): Removed.
18941
(new_flow): New function, replaces `html_engine_new_flow'. It has
18942
a `style' parameter to specify the HTMLClueFlowStyle for the new
18943
flow. Callers updated.
18944
(parse_p): Inconditionally create a new `HTML_CLUEFLOW_STYLE_P'
18945
flow for the `<p>' tag. Always close the current one when you get
18946
a `</p>' tag. Likewise with `HTML_CLUEFLOW_STYLE_PRE' and
18948
(parse_h): Inconditionally create a new flow of the appropriate
18949
`HTML_CLUEFLOW_STYLE_H*' style.
18950
(parse_t): Inconditionally create a new flow.
18952
* debug.c (clueflow_style_to_string): New helper function.
18953
(debug_dump_tree): Print the ClueFlowStyle for HTMLClueFlow
18954
objects using it. Also, print the text for `HTMLLinkText' and
18955
`HTMLLinkTextMaster' objects as well.
18957
* htmlclueflow.c (calc_size): Do not split lines if style is
18958
`HTML_CLUEFLOW_STYLE_PRE'.
18959
(calc_min_width): Handle HTML_CLUEFLOW_STYLE_PRE correctly.
18961
* htmlclueflow.h: Added `HTML_CLUEFLOW_STYLE_PRE'.
18963
2000-01-06 Ettore Perazzoli <ettore@helixcode.com>
18965
* gtkhtml.c (key_press_event): Move the cursor forward by the
18966
number of characters inserted.
18968
* htmlengine-edit.c (html_engine_insert): Return the number of
18969
characters actually inserted.
18971
* htmltextslave.c (draw): Updated to use `HTMLText::text_len'
18972
instead of `HTMLTextMaster::strLen'.
18973
(fit_line): Likewise.
18975
* htmltextmaster.c (fit_line): Updated to use `HTMLText::text_len'
18976
instead of `HTMLTextMaster::strLen'.
18978
(insert_text): Removed.
18979
(remove_text): Removed.
18980
(html_text_master_class_init): Updated accordingly.
18981
(html_text_master_init): Do not initialize `strLen' anymore.
18983
* htmllinktextmaster.c (split): Updated to use `HTMLText::text_len'
18984
instead of `HTMLTextMaster::strLen'.
18986
* htmltextmaster.h: Removed member `strLen'.
18988
* htmltext.c (insert_text): Return value changed from `void' to
18989
`guint': return the number of characters actually inserted. Also,
18990
make sure there are never two consecutive spaces in the resulting
18992
(html_text_insert_text): Updated accordingly.
18993
(calc_actual_len): New helper function for `insert_text'.
18994
(copy_collapsing_spaces): New helper function for `insert_text'.
18995
(html_text_init): Initialize `text_len'.
18996
(remove_text): Update `text_len'.
18997
(insert_text): Update `text_len'.
18999
* htmltext.h: New member `text_len' for storing the text's length.
19001
* htmlengine.c (parse_h): Do not create a new flow for the rule,
19002
unless there is no current flow.
19004
* htmlrule.c (html_rule_new): New parameter `halign'.
19005
(html_rule_init): Likewise.
19006
(set_max_width): Always set `width' to `max_width'.
19007
(draw): Only draw the specified percent of the width, and align
19008
according to the `halign' value.
19010
* htmlrule.h: New member `halign'.
19012
* htmlengine-edit.c (html_engine_insert_para): Do not add an
19013
`HTMLHSpace' at the end of the paragraph anymore.
19015
* htmlclueflow.c (html_clueflow_split): Removed HTMLHSpace kludge.
19017
* htmlvspace.c (accepts_cursor): New function, implementation for
19018
`HTMLObject::accepts_cursor()'. Always return `TRUE'.
19019
(html_vspace_class_init): Install it.
19021
* htmlclueflow.c: New constant `VERTICAL_PAD'.
19022
(calc_size): Add `VERTICAL_PAD' to the `ascent' value before the
19023
size computation and to the `descent' value after it, if the style
19024
is not that of an itemized list: this pads the HTMLClueFlow
19027
* htmlimage.c: #include <gdk-pixbuf/gdk-pixbuf.h>.
19029
2000-01-05 Ettore Perazzoli <ettore@helixcode.com>
19031
* htmlengine.c (html_engine_insert_text): Rewritten to always
19032
create HTMLTextMasters and no HTMLHSpaces.
19033
(html_engine_insert_vspace): Do not create a new clueflow for the
19034
vspace: the vspace will just be at the end of the existing flow.
19035
(parse_h): Do not put the rule in a new HTMLClueFlow (that's a
19037
(close_flow): No longer append an hspace.
19038
(parse_p): Always create a new flow with `html_engine_new_flow()'.
19040
* htmlfont.c (html_font_equal): New function.
19042
* htmltextslave.c (split): New helper function.
19043
(split_at_newline): New helper function.
19044
(fit_line): Use them. The TextSlave is now split at the first
19045
newline character before starting the fit process.
19047
2000-01-06 Jonas Borgstr�m <jonas_b@bitsmart.com>
19049
* Makefile.am : Moving htmlurl.c from libgtkhtml_SOURCES to testgtkhtml_SOURCES
19051
* gtkhtml.c : (gtk_html_set_base_url) : removed function, not needed.
19053
* gtkhtml.h : removed function gtk_html_set_base_url
19055
* htmlengine.c : Removed ALL use of HTMLURL from htmlengine.c. htmlengine shouldn't do any url handling.
19057
* htmlengine.h : Removed ALL HTMLURL variables
19059
* testgtkhtml.c : testgtkhtml.c is now doing ALL url handing, it shouldn't be in htmlengine.c
19061
2000-01-06 Jonas Borgstr�m <jonas_b@bitsmart.com>
19063
This adds support for scaling images.
19064
OBS! You need a fresh gdk_pixbuf from the CVS.
19066
* htmlimage.h : New members: gboolean scaled and GdkPixbuf *scaled_pixbuf;
19068
* htmlimage.c : (destroy) : unref scaled_pixbuf if used;
19069
(html_image_update_scaled_pixbuf) : New function updates the local
19070
scaled copy of image_ptr->pixbuf
19071
(html_image_setup) : Set scaled to TRUE if object->width !=
19072
image_ptr->pixbuf->art_pixbuf->width.
19073
(html_image_factory_area_updated) : Call
19074
html_image_update_scaled_pixbuf if scaled.
19075
(html_image_factory_end_pixbuf) : Call
19076
html_image_update_scaled_pixbuf if scaled.
19077
(html_image_factory_register) : Scale the image if necesary if it
19080
2000-01-05 Jonas Borgstr�m <jonas_b@bitsmart.com>
19082
[This adds support for references in urls.]
19084
* htmlanchor.c (find_anchor): New function.
19086
* htmlclue.c (find_anchor): New function.
19088
* htmltable.c (find_anchor): New function.
19090
* htmlengine.c (html_engine_begin): Check if the url wants to view
19091
a reference on the current page, if so don't load it again, just
19094
(html_engine_goto_anchor): New function. Searches for an anchor
19095
and scrolls the page.
19097
* htmlengine.h : Added new member, reference. It is the reference
19098
html_engine_goto_anchor searches for.
19100
* htmlimage.c (cleanup_images): Only destroy ptr->pixbuf if it's not NULL.
19102
* htmlurl.c (html_url_to_string): Add the reference to the string
19105
* testgtkhtml.c (entry_goto_url): g_strdup the string from the
19107
(goto_url): Only call gtk_html_parse () When gtk_html_begin
19108
returns non NULL. Don't call gtk_html_parse when the engine only
19109
scrolls the page (On a #reference).
19111
2000-01-04 Jonas Borgstr�m <jonas_b@bitsmart.com>
19113
* htmlengine.c : (parse_b): Added "clear=xxx" support in <br> tags.
19114
(parse_d): Fixed dt function.
19115
http://cvs.gnome.org/bonsai/rview.cgi?root=/cvs/gnome looks better now.
19117
(parse_table): Added support for nowrap argument in <td> tags.
19118
Now http://www.themes.org looks ok.
19120
(parse_table): Added workaround for bad html in table and form combination,
19121
to make gnome bonsai pages render ok.
19123
(parse_f): With a <form action=> defaults to the current URI.
19125
(html_engine_insert_text): Uses HTMLText instead of HTMLTextMaster with NOWRAP
19127
* htmlengine.h: New variable gboolean noWrap.
19129
* htmlurl.[ch] (html_url_dup): New flag HTML_URL_DUP_NOCGIARGS.
19131
2000-01-03 Jonas Borgstr�m <jonas_b@bitsmart.com>
19133
* Makefile.am : Added htmlimageinput.c and htmlimageinput.h
19135
* gtkhtml.c (button_press_event): Call html_engine_mouse_event
19137
* htmlengine.c (html_engine_mouse_event): New function.
19138
(parse_input): Added imageinput support.
19140
* htmltype.[ch]: Added class HTMLImageInput.
19142
* htmlimageinput.[ch]: New files.
19144
2000-01-03 Jonas Borgstr�m <jonas_b@bitsmart.com>
19146
* Makefile.am : Added htmltextarea and htmlselect
19148
* htmlbutton.c (draw): Removed function.
19150
* htmltextinput.c (draw): Removed function.
19152
* htmlradio.c (draw): Removed function.
19154
* htmlcheckbox.c (draw): Removed function.
19156
* htmlselect.[ch]: New file.
19158
* htmltextarea.[ch]: New file.
19160
* htmlelement.c (draw): Added function.
19162
* htmlengine.c (parse_t): Added <textarea> support.
19164
* htmlengine.h: Added inTextArea and formTextArea.
19166
* htmltype.[ch]: Added class HTMLTextArea.
19168
* tests/test9.html: Extended test.
19170
2000-01-02 Ettore Perazzoli <ettore@helixcode.com>
19172
* htmlengine-edit.c (delete_same_parent): Save the parent before
19173
destroying the object.
19175
* htmlclueflow.c (html_clueflow_split): Set tail.
19177
* htmlengine-edit.c (delete_different_parent): Do not move
19178
TextSlaves; destroy them instead.
19180
* htmltext.c (remove_text): Always queue a redraw for the parent.
19182
2000-01-02 Jonas Borgstr�m <jonas_b@bitsmart.com>
19184
* htmlengine.c (parse_input): Added more support for <input> tag
19186
* htmlbutton.[ch], htmltextinput.[ch],
19187
htmlradio.[ch], htmlcheckbox.[ch],
19188
htmlhidden.[ch], htmlform.[ch] and
19189
htmlelement.[ch] More frame work.
19191
* gtkhtml.[ch], htmlengine.[ch]: Added New signal 'submit'
19193
* testgtkhtml.c: Added submit support.
19195
2000-01-02 Ettore Perazzoli <ettore@helixcode.com>
19197
* htmlfont.c (html_font_calc_width): Made const safe.
19199
2000-01-02 Ettore Perazzoli <ettore@helixcode.com>
19201
* htmlengine-edit.c (html_engine_delete): Rewritten in a saner
19203
(delete_same_parent): Helper function for `html_engine_delete'.
19204
(delete_different_parent): Helper function for
19205
`html_engine_delete'.
19207
* htmldrawqueue.c (draw_obj): Renamed `x', `y', `width', `height'
19208
to `x1',`y1', `x2', `y2' so that the names make sense. Also, clip
19209
the painting region.
19211
2000-01-02 Ettore Perazzoli <ettore@helixcode.com>
19213
* htmlengine.c (parse_l): Do not use `indentSize' anymore -- just
19216
2000-01-02 Jonas Borgstr�m <jonas_b@bitsmart.com>
19218
* htmlengine.c (parse_input): Added more support for <input> tag
19220
* htmlbutton.[ch] : new files, button form element.
19222
* htmltextinput.[ch]: New files, textinput form element.
19224
* htmlradio.[ch]: New files, radio form element.
19225
The radio elements start flickering on mouseover.
19227
* htmlcheckbox.[ch]: New files, checkbox form element.
19229
* htmlhidden.[ch]: New files, hidden form element.
19231
* htmlclue.c (destroy): Enabled destroying again.
19233
* htmllinktextmaster.c: Fixed incorrect parent_class.
19235
* htmltable.c (destroy): New function, free objects.
19237
* htmltype.[ch]: Added new classes.
19239
* Makefile.am: Added New files
19241
2000-01-01 Ettore Perazzoli <ettore@helixcode.com>
19243
* htmlanchor.c (set_max_ascent): Do not change the y. I have no
19244
idea why this is done, and breaks the layout of anchors.
19246
* htmlengine.c (html_engine_new_flow): Argh! It was setting the
19247
indentation level in an hideous way. Anyway, it currently simply
19248
uses the parameter in `html_clueflow_new()'.
19249
(INDENT_SIZE): Constant removed. Instead, we increment/decrement
19250
indentation level by 1, as HTMLClueFlow takes care of using the
19251
correct raw offset for us now.
19252
(parse_b): Modified accordingly.
19253
(parse_d): Likewise.
19254
(parse_o): Likewise.
19255
(parse_u): Likewise.
19256
(parse_l): Instead of doing all the cluev/clueh/clueflow mess,
19257
just create a clueflow with an itemized style. Wee! This
19258
dramatically reduces the complexity of the code and the overhead
19259
of itemized lists in the tree.
19260
(to_roman): Removed.
19262
* htmltext.c (remove_text): Actually return a value, as expected.
19263
(html_text_remove_text): Likewise.
19265
* htmlclueflow.c (html_clueflow_init): New parameters `font',
19266
`style', `level' to initialize the corresponding new members. Do
19267
not initialize `curr', `tail', `head' as they are initialized by
19268
`html_clue_init()' already.
19269
(html_clueflow_new): New parameters `font', `style' and `level',
19270
passed to `html_clueflow_init()'.
19271
(INDENT_UNIT): New constant.
19272
(set_max_width): Use `level' instead of `indent', by multiplying
19274
(calc_min_width): Likewise.
19275
(calc_size): Likewise.
19276
(calc_preferred_width): Likewise.
19277
(draw): New function, implementation for `HTMLObject::draw'. This
19278
is now necessary to draw the bullets/numbers with style
19279
`HTML_CLUEFLOW_STYLE_ITEM*'.
19280
(html_clueflow_class_init): Install it.
19282
* htmlclueflow.h: New enum `HTMLClueFlowStyle'. New members
19283
`font', `level', `style' in `HTMLClueFlow'. Removed member
19286
* htmlobject.h: Do not #include "htmlfont.h" anymore.
19288
2000-01-01 Jonas Borgstr�m <jonas_b@bitsmart.com>
19290
* htmlengine.c (parse_i): Added support for <input> tag
19291
(parse_f): Added support for <form> tag
19292
(parse_input): New function
19294
* htmlengine.h: Added new members form and formList
19296
* htmlform.c: New file, initial form support
19297
* htmlform.h: New file.
19299
* testgtkhtml.c: Added test9.html.
19301
* test9.html: New form test.
19303
* Makefile.am: Added htmlform.c and htmlform.h
19305
1999-12-31 Ettore Perazzoli <ettore@helixcode.com>
19307
* htmlclueflow.c (calc_size): Set `o->y' as for some reason it
19308
does not work without it. I have to find out what this is exactly
19311
1999-12-31 Ettore Perazzoli <ettore@helixcode.com>
19313
* htmlengine.c (close_flow): Avoid segfault if there is no prev.
19315
1999-12-31 Ettore Perazzoli <ettore@helixcode.com>
19317
* htmlclueflow.c (html_clueflow_init): Removed parameters `x',
19318
`y', `max_width', `percent'. I have no idea why they are here
19320
(html_clueflow_new): Likewise. All callers updated.
19322
* htmlengine-edit.c (html_engine_delete): Merge the next clueflow
19323
with the current one if deleting at the end of the flow itself.
19324
This does not completely work yet; I have to fix some stuff in the
19325
way the tree is generated first.
19327
* htmlengine.c (parse_m): Made local variable `content' const
19330
* htmlclue.c (html_clue_remove): New function.
19331
(html_clue_prepend): Doc'ed and added preconditions.
19332
(html_clue_append): Likewise.
19334
* htmltext.c (remove_text): Return the number of characters
19336
(html_text_remove_text): Likewise.
19337
* htmltextmaster.c (remove_text): Updated accordingly.
19339
1999-12-31 Ettore Perazzoli <ettore@helixcode.com>
19341
* htmlengine-edit.c (html_engine_insert_para): Inserting a
19342
paragraph at the beginning of a paragraph correctly results in an
19343
empty paragraph now.
19345
* htmlclueflow.c (html_clueflow_split): Deal with splitting at the
19346
head of the clue correctly.
19347
(calc_size): Consider the object's height even if at the left
19348
margin. I am not sure this is correct fix, but I don't see the
19349
reason for not doing it this way, and the previous code did not
19350
handle a hspace alone in a clueflow as expected.
19352
1999-12-30 Jonas Borgstr�m <jonas_b@bitsmart.com>
19354
* htmlengine.c (parse_m): Added support for META refresh
19356
* htmlengine.[ch] (redirect): New signal
19358
* gtkhtml.[ch] (redirect): New signal
19360
* testgtkhtml.c (on_redirect): New function, support for META redirection.
19362
1999-12-30 Ettore Perazzoli <ettore@helixcode.com>
19364
* htmlobject.c (destroy): Do not deal with the font anymore.
19366
* htmlobject.h: Removed member `font' from `HTMLObject'. Bleargh.
19367
This was truly awful and caused a lot of confusion in the code (as
19368
`HTML_{TEXT,HSPACE} (obj)->font' was used and `obj->font' was
19369
always NULL). It also wasted 4 bytes per object just for nothing.
19371
* htmltext.c (html_text_init): Precondition: the font pointer must
19374
* htmllinktext.c (split): New function, implementation for
19376
(html_link_text_class_init): Install it.
19378
* htmllinktextmaster.c (split): New function, implementation for
19380
(html_link_text_master_class_init): Install it.
19382
* htmltextmaster.c (split): New function, implementation for
19384
(html_text_master_class_init): Install it.
19386
* htmltext.c (html_text_split): New function.
19387
(split): New function, default implementation for
19388
`HTMLText::split()'.
19389
(html_text_class_init): Install it.
19391
* htmltext.h: New virtual method `split'.
19393
* htmlclue.c (html_clue_prepend): New function.
19394
(html_clue_append_after): New function.
19396
* htmllinktextmaster.c (html_link_text_master_init): Removed
19397
parameter `painter'.
19398
(html_link_text_master_new): Likewise.
19400
* htmlclue.c (html_clue_append): Set the child's `next' pointer to
19403
* htmltextmaster.c (html_text_master_init): Removed parameter
19405
(html_text_master_new): Likewise.
19407
* htmltext.c (html_text_init): Removed parameter `painter'.
19408
(html_text_new): Likewise.
19410
* htmlhspace.c (html_hspace_init): Removed parameter `painter'.
19411
(html_hspace_new): Likewise.
19413
* htmlclue.c (html_clue_split): New function.
19415
* htmlobject.c (html_object_set_parent): Allow setting a NULL
19418
* htmlcursor.c (forward): Never put the cursor after the last
19419
character of the text.
19420
(backward): Likewise.
19422
* htmlengine.c: Moved helper functions on top.
19423
(close_flow): New helper function for closing the current
19425
(block_end_pre): Use it.
19426
(html_engine_insert_vspace): Use it.
19427
(block_end_list): Use it.
19428
(block_end_indent): Use it.
19431
* htmlhspace.c (draw): Call `HTMLObject::draw()' so that we can
19432
have the cursor on this.
19433
(accepts_cursor): New function, implementation for
19434
`HTMLObject::accepts_cursor()'.
19435
(html_hspace_class_init): Install it.
19436
(html_hspace_init): Set the width to 1 if the hspace is invisible.
19438
* htmlengine.c (html_engine_end): Move the cursor to the home
19439
position only if the engine is in the editable state.
19441
1999-12-29 Ettore Perazzoli <ettore@helixcode.com>
19443
* htmldrawqueue.c (html_draw_queue_flush): Destroy the object
19444
(without drawing it) if it has `free_pending' true.
19446
* htmlobject.c (destroy): If the object has a redraw pending, do
19447
not `g_free()' it; instead, set `free_pending' to `TRUE'.
19448
(html_object_init): Set `free_pending' to `TRUE'.
19449
(html_object_destroy): If `free_pending' is true, just `g_free()'
19450
the object instead of calling the `destroy' method.
19452
* htmlobject.h: New member `free_pending' in `HTMLObject'.
19454
* gtkhtml.c (key_press_event): Handle `GDK_BackSpace' by moving
19455
the cursor to the left and then, if the movement was successful,
19456
deleting to the right.
19458
* htmlengine-edit.c (html_engine_move_cursor): Return value
19459
changed to `guint': return the number of movement actions actually
19460
taken. Also, I cleaned up the code a bit.
19462
* htmlcursor.c (forward): Return value type changed to `gboolean':
19463
return TRUE if the movement was successful, FALSE otherwise.
19464
(backward): Likewise.
19465
(html_cursor_forward): Likewise.
19466
(html_cursor_backward): Likewise.
19467
(html_cursor_up): Likewise.
19468
(html_cursor_down): Likewise.
19469
(backward): If the cursor is in a NULL position at the beginning
19470
of the call, move it home. (Temporary, but consistent with what
19471
the other cursor movement functions do.)
19473
* htmlengine-edit.c (queue_draw_for_cursor): Queue the draw even
19474
if we are not on a text element.
19476
* htmlcursor.c (next): Removed debugging messages.
19477
(debug_location): New function to print the cursor position on the
19478
HTML tree for debugging purposes.
19479
(html_cursor_home): Use it.
19480
(html_cursor_forward): Likewise.
19481
(html_cursor_backward): Likewise.
19482
(html_cursor_up): Likewise.
19484
* htmlrule.c (accepts_cursor): New function, implementation of
19485
`HTMLObject::accepts_cursor'. This returns TRUE so that you can
19486
now put the cursor on a rule.
19487
(html_rule_class_init): Install it.
19488
(draw): Call `HTMLObject::draw()' so that the cursor is drawn when
19489
on the rule. Also, fixed the out-of-area check.
19491
* htmlcursor.c (forward): Use `html_object_accepts_cursor()'.
19492
(backward): Likewise.
19493
(html_cursor_up): Deal with non-HTMLText objects.
19494
(html_cursor_down): Likewise.
19496
* htmltext.c (accepts_cursor): New function, implementation of
19497
`HTMLObject::accepts_cursor'.
19498
(html_text_class_init): Install it.
19500
* htmlobject.c (html_object_accepts_cursor): New function.
19501
(accepts_cursor): New function, default implementation for the
19502
`accepts_cursor' virtual method.
19503
(html_object_class_init): Install it.
19505
* htmlobject.h: New virtual method `accepts_cursor'.
19507
* htmlengine.c (html_engine_get_type): Removed prototype here.
19508
* htmlengine.h (html_engine_get_type): Moved here.
19510
* htmlengine-edit.c (queue_draw_for_cursor): Use
19511
`html_object_is_text()'.
19512
(html_engine_insert): Likewise.
19514
* htmlcursor.c (is_text): Removed.
19515
(forward): Use `html_object_is_text()' instead.
19516
(backward): Likewise.
19518
* htmlobject.c (html_object_is_text): New function. Ugliest thing
19519
on Earth, but cheap and working for now.
19521
* htmlengine-edit.c (html_engine_delete): Added precondition:
19522
check that `e' is an HTMLEngine.
19523
(html_engine_insert): Likewise.
19525
* htmlengine.h (IS_HTML_ENGINE): Renamed to `HTML_IS_ENGINE'.
19526
(IS_HTML_ENGINE_CLASS): Renamed to `HTML_IS_ENGINE_CLASS'.
19527
(TYPE_HTML_ENGINE): Renamed to `HTML_TYPE_ENGINE'.
19529
1999-12-28 Ettore Perazzoli <ettore@helixcode.com>
19531
* htmlpainter.c (html_painter_draw_cursor): Fix the cursor height:
19532
it was one pixel too high.
19534
* htmlobject.c (html_object_calc_abs_position): Take account for
19537
* gtkhtml.c (idle_handler): Make cursor visible.
19539
* htmlengine.c (html_engine_make_cursor_visible): New function.
19541
* gtkhtml.c (key_press_event): Handle `GDK_Delete' and
19544
* htmlengine-edit.c (html_engine_delete): New function.
19546
* htmltextmaster.c (remove_text): New function, implementation for
19547
the `remove_text' method.
19548
(html_text_master_class_init): Install it.
19550
* htmltext.c (html_text_insert_text): Added precondition on
19551
parameter `engine'.
19552
(html_text_remove_text): New function.
19553
(remove_text): New function, default implementation for the
19554
`remove_text' method.
19555
(html_text_class_init): Install it.
19557
* htmltext.h: New virtual method `remove_text'.
19559
* htmlobject.c (html_object_calc_abs_position): Actually use local
19562
* htmlcursor.c (forward): New helper function.
19563
(html_cursor_forward): Use it. Added preconditions.
19564
(backward): New helper function.
19565
(html_cursor_backward): Use it. Added preconditions.
19566
(html_cursor_up): Set the target X value before anything else, to
19567
make sure it is always set correctly. Use `backward()' instead of
19568
`html_cursor_backward()'.
19569
(html_cursor_down): Likewise. Use `forward()' instead of
19570
`html_cursor_forward()'.
19571
(html_cursor_new): Initialize `have_target_x' to FALSE, not TRUE.
19573
* htmltextmaster.c (calc_char_position): Make sure the coordinates
19574
are always calculated.
19576
* htmltextslave.c (fit_line): Destroy the next object instead of
19577
just `g_free()'ing it. Do not kill the space between the various
19578
TextSlaves: instead, keep it at the end of the slave.
19580
* htmlengine-edit.c (queue_draw_for_cursor): Do nothing if the
19581
pointer to the current object is NULL.
19583
* htmlurl.c (concat_dir_and_file): Made static.
19585
* testgtkhtml.c (netin_stream_free): Call `gtk_html_end()' again.
19586
It does not seem to cause crashes anymore.
19588
* htmldrawqueue.c (draw_obj): Removed debugging message.
19590
* gtkhtml.c: Do not #include <stdio.h> anymore.
19591
(html_engine_draw_pending_cb): Removed debugging message.
19593
* htmlcursor.c (html_cursor_forward): Skip TextMaster-derived
19596
* gtkhtml.c (key_press_event): Handle `GDK_Up' and `GDK_Down'.
19598
* htmlengine-edit.c (html_engine_move_cursor): Handle
19599
`HTML_ENGINE_CURSOR_UP' and `HTML_ENGINE_CURSOR_DOWN'.
19601
* htmlcursor.c (html_cursor_new): Init `target_x',
19603
(html_cursor_equal): New function.
19604
(html_cursor_up): New function.
19605
(html_cursor_down): New function.
19606
(html_cursor_forward): Set `have_target_x' to FALSE.
19607
(html_cursor_backward): Likewise.
19609
* htmlcursor.h: New members `target_x', `have_target_x' in
19612
* htmlobject.c (html_object_calc_abs_position): New function.
19614
* htmltextmaster.c (calc_char_position): Implementation of the
19615
`HTMLText::calc_char_position' method.
19616
(html_text_master_class_init): Install it.
19618
* htmltext.c (html_text_calc_char_position): New function.
19619
(calc_char_position): Default implementation for the
19620
`calc_char_position' method.
19621
(html_text_class_init): Install it.
19623
* htmltext.h: New virtual method `calc_char_position'.
19625
1999-12-26 Ettore Perazzoli <ettore@helixcode.com>
19627
* htmltext.c (insert_text): Relayout the parent instead of just
19630
* htmlobject.c (relayout): Set the X/Y position manually if this
19631
is the toplevel object. Ugly, but there is no way around it for
19634
1999-12-23 Ettore Perazzoli <ettore@helixcode.com>
19636
* htmlengine-edit.c (html_engine_move_cursor): Queue a redraw for
19639
* htmltextmaster.c (queue_draw): New function, implementation for
19640
the `queue_draw' method.
19641
(html_text_master_class_init): Install it.
19643
* htmltext.c (html_text_queue_draw): New function.
19644
(queue_draw): Default implementation for the `queue_draw' method.
19645
(html_text_class_init): Install it.
19646
(insert_text): Queue a draw if the parent did not change after
19647
relayout (and consequently did not queue a draw for itself).
19649
* htmltext.h: New virtual method `queue_draw'.
19651
* htmlclueflow.c (calc_size): Do not assign `o->y' anymore. I am
19652
not 100% sure that this does not break anything, but at the same
19653
time I don't see any reason why the y value should be set here.
19654
So if this breaks, probably it means that something is broken
19657
* htmlcluev.c (calc_size): Replaced hideous binary shift with a
19662
* htmlfont.c (create_gdk_font): `family' made const.
19663
(html_font_new): Removed unused variable.
19664
(create_gdk_font): Removed unused variable.
19666
* htmlcursor.c: #include "htmlclue.h".
19668
* htmlobject.h: Moved all the typedefs on top, before the #include
19671
* htmltext.c (html_text_insert_text): New parameter `engine'.
19672
(insert_text): New parameter `engine'. Queue a redraw for the
19675
* htmltext.h: New parameter `engine' in method `insert_text'.
19677
* htmlobject.c (html_object_relayout): New argument `engine'.
19678
(relayout): New argument `engine'. Queue a redraw for the object
19679
if the size changes and the object has no parent, or if the size
19680
changes and the parent's size does not change.
19682
* htmlobject.h: New argument `engine' in method `relayout'.
19684
* htmlengine.c (html_engine_queue_draw): New function.
19686
* htmlengine-edit.c (html_engine_move_cursor): Do not redraw
19689
* htmlcursor.c (html_cursor_backward): Removed debugging message.
19690
(html_cursor_forward): Removed debugging message.
19692
* gtkhtml.c (html_engine_url_requested_cb): First argument
19693
corrected from `GtkHTML' to `HTMLEngine'.
19694
(html_engine_draw_pending_cb): New function.
19695
(gtk_html_new): Connect it to the "draw_pending" signal of the
19698
* htmlengine.c: New signal `draw_pending'.
19699
(html_engine_class_init): Install it.
19701
* htmlengine.h: Type of first argument in the `url_requested'
19702
method corrected from `GtkHTML' to `HTMLEngine'. New signal
19705
* gtkhtml.c (idle_handler): New function, flushing the engine's
19708
(destroy): Remove pending idle handler.
19709
(queue_draw): New utility function installing the idle handler.
19711
* htmlengine.c (html_engine_flush_draw_queue): New function.
19713
* gtkhtml.h: New member `idle_handler_id' in `GtkHTML'.
19715
* gtkhtml.c (destroy): Call the parent class' `destroy' method.
19717
* htmlengine.h: New member `draw_queue' in `HTMLEngine'.
19718
* htmlengine.c (html_engine_init): Init it.
19719
(html_engine_destroy): Destroy it.
19721
* gtkhtml.c: Cleaned up a bit.
19725
* htmllinktext.c (html_link_text_new): Use `g_print' instead of
19726
`printf' for debugging messages.
19728
* htmltext.c (draw): Removed debugging mesasge.
19730
* htmlobject.h: New member `redraw_pending' in `HTMLObject'.
19731
* htmlobject.c (html_object_init): Initialize it to FALSE.
19733
* htmldrawqueue.c: New file.
19734
* htmldrawqueue.h: New file.
19736
* htmltextslave.c (draw): Draw the cursor if it's in the owner,
19737
instead of the slave.
19739
* htmlcursor.c (html_cursor_forward): Move on the masters instead
19740
of the slaves. The slaves are not a good place for anchoring the
19741
cursor, as they can be destroyed/recreated without the cursor's
19743
(html_cursor_backward): Likewise.
19747
* htmlengine.c (html_engine_insert_text): `str' made const.
19748
`g_strdup()' strings before passing to the text object creation
19751
* htmltextmaster.c (insert_text): New HTMLTextMaster-specific
19752
implementation for the `insert_text' virtual method.
19753
(html_text_master_class_init): Install it.
19755
* htmltext.c (insert_text): Make the text pointer point to the new
19758
* testgtkhtml.c (main): Removed unused variables.
19760
* gtkhtml.c (key_press_event): If we are given a nonempty string,
19761
insert it and move the cursor to the right.
19763
* htmltext.c (insert_text): Relayout parent.
19764
(html_text_class_init): Install `insert_text' as the default
19765
implementation for the `insert_text' method.
19767
* htmlengine-edit.c (html_engine_cursor_move): Renamed to
19768
`html_engine_move_cursor'.
19769
(html_engine_insert_text): New function; not quite finished yet.
19771
* htmlengine-cursor.c: Renamed to `htmlengine-edit.c'.
19772
* htmlengine-cursor.h: Renamed to `htmlengine-edit.h'.
19774
* htmlengine.h: Member `show_cursor' in `HTMLEngine' renamed to
19777
* htmlengine.c (html_engine_show_cursor): Renamed to
19778
`html_engine_set_editable'.
19780
* htmlobject.c (html_object_relayout): New function.
19781
(relayout): Default implementation for `relayout'.
19782
(html_object_class_init): Install it.
19784
* htmlobject.h: New method `relayout'.
19786
* htmltextmaster.c (htmL_text_master_get_slave): New function.
19788
* htmltext.c: Make the `insert_text' method get an integer offset
19789
instead of a pointer to an `HTMLCursor' object.
19790
(html_text_insert_text): Updated accordingly.
19794
* htmlobject.c (html_object_check_point): Removed debugging code.
19795
(html_object_draw): Removed debugging code.
19797
1999-12-20 Ariel Rios <jarios@usa.net>
19799
* gtkhtml.h: (gtk_html_stream_unref): Moved
19800
from gtkhtm-private.h as per Elliot's
19802
(gtk_html_stream_ref): Ditto.
19804
* gtkhtml-private.h:(gtk_html_stream_unref) The function
19805
header was moved unto gtkhtml.h
19806
(gtk_html_stream_ref) Ditto.
19808
1999-12-19 Jonas Borgstr�m <jonas_b@bitsmart.com>
19810
* htmlurl.c (html_url_append_path): Strip cgi args
19812
1999-12-15 Ariel Rios <jarios@usa.net>
19814
Contributed by Marius Vollmer.
19816
* gtkhtml-private.h: Add ref_count element in GtkHTML struct.
19817
(gtk_html_stream_unref): New prototype.
19818
(gtk_html_stream_ref): New prototype.
19819
These two functions would maintain a reference count on a
19820
GtkHTMLStream handle so that the struct would only be freed when the
19821
ref count reaches zero. gtk_html_stream_new would return a stream
19822
with ref_count == 1 and gtk_html_stream_end would flag the stream as
19823
terminated and call gtk_html_stream_unref; gtk_html_stream_write
19824
would recognize a terminated stream.
19826
* htmlstream.c (gtk_html_stream_unref): Added.
19827
(gtk_html_stream_ref): Added.
19828
(gtk_html_stream_new): Added declararion of new ref_count element.
19829
(gtk_html_stream_write): Instead of g_freeing the stream here, we
19830
set write_callback and end_callback as NULL. Then we call
19831
gtk_html_stream_unref to g_free the handle.
19833
1999-12-15 Havoc Pennington <hp@redhat.com>
19835
* gtkhtml.c (gtk_html_realize): Add button press/release to the
19836
event mask so we get link clicks
19838
1999-12-15 Havoc Pennington <hp@redhat.com>
19840
* htmlurl.c (html_url_new): put in a phony path if we return
19841
because the path string has length 0
19843
1999-12-15 Havoc Pennington <hp@redhat.com>
19845
* testgtkhtml.c (main): remove explicit adjustment-setting
19847
* gtkhtml.c (gtk_html_new): no adjustment args, don't init the
19848
adjustment fields. This causes Breakage but it's necessary
19849
probably (and approved by Anders)
19851
* htmlurl.c (html_url_new): Put in a warning if an HTMLURL with
19852
NULL path is returned, this is a bug that needs fixing
19853
(html_url_append_path): put in an assertion that url->path != NULL
19855
1999-12-15 Havoc Pennington <hp@pobox.com>
19857
* gtkhtml.c (gtk_html_set_adjustments): zero the connection ID
19858
if we don't fill it in, avoids a warning message.
19860
1999-12-14 Havoc Pennington <hp@pobox.com>
19862
* gtkhtml.c (gtk_html_new): Use
19863
gtk_widget_set_scroll_adjustments() to set the adjustments
19864
(gtk_html_class_init): install a scroll adjustments handler
19865
(gtk_html_set_adjustments): implement this - it connects to the
19867
(gtk_html_class_init): add destroy handler
19869
* gtkhtml.h: add fields to store adjustment connections
19871
1999-12-13 Ettore Perazzoli <ettore@helixcode.com>
19873
* gtkhtml.c (gtk_html_size_allocate): Do not call
19874
`html_engine_calc_absolute_pos' anymore.
19876
* htmlengine.c (html_engine_calc_absolute_pos): Removed.
19877
(html_engine_update_event): Do not call it anymore.
19879
* htmltable.c (calc_absolute_pos): Removed.
19880
(html_table_class_init): Do not install anymore.
19882
* htmlclue.c (calc_absolute_pos): Removed.
19883
(html_clue_class_init): Do not install anymore.
19885
* htmlobject.c (html_object_init): Do not initialize `abs_x',
19887
(calc_absolute_posi: Removed.
19888
(html_object_class_init): Do not install anymore.
19889
(html_object_calc_absolute_pos): Removed.
19891
* htmlobject.h: Remove `abs_x', `abs_y'. Removed
19892
`calc_absolute_pos' virtual function.
19894
1999-12-12 Miguel de Icaza <miguel@helixcode.com>
19896
* htmlengine.c (draw_background): Removed the clipping from here,
19897
it fixes the double buffering problems.
19899
* htmlfont.c (create_gdk_font): Fixed memory leaks.
19901
1999-12-12 Ettore Perazzoli <ettore@helixcode.com>
19903
* gtkhtml.c (gtk_html_init): Use `GDK_HAND2' and `GDK_LEFT_PTR' as
19904
the hand/arrow cursors.
19906
* htmltext.c (html_text_insert_text): New function.
19907
(insert_text): New function.
19909
* htmltext.h: New virtual method `insert_text'.
19911
* htmlurl.c (html_url_destroy): Added precondition.
19913
* gtkhtml.c (gtk_html_set_geometry): Removed unused function.
19915
* htmlpainter.c (html_painter_set_font): Destroy the existing
19916
font, duplicate the new one.
19918
* htmlfont.c (html_font_destroy): Do not unref the GdkFont if
19920
(html_font_dup): New function.
19922
* testgtkhtml.c (title_changed_cb): Removed debugging message.
19923
Also, free memory returned by `g_strdup_printf()'.
19925
* htmltable.c (calc_col_info): Free existing row information
19926
before allocating new.
19927
(html_table_init): Make sure all the members are initialized.
19929
1999-12-12 Jonas Borgstr�m <jonas_b@bitsmart.com>
19931
* htmlurl.c (html_url_to_string): html_url_to_string produced
19932
incorrect urls on url with a port number.
19934
* htmlengine.c (parse_i): Modified the image loading a bit.
19936
1999-12-12 Jonas Borgstr�m <jonas_b@bitsmart.com>
19938
* testgtkhtml.c (on_stop): Delete all requests.
19939
(goto_url): Delete requests.
19941
1999-12-12 Ettore Perazzoli <ettore@helixcode.com>
19943
* htmltextslave.c (fit_line): Set `prev' on the next, if any.
19945
* gtkhtml.c (key_press_event): Move left too.
19947
* htmlcursor.c (html_cursor_backward): Implemented.
19950
1999-12-12 Jonas Borgstr�m <jonas_b@bitsmart.com>
19952
* htmlengine.c (parse_table): Added support for backgrounds in tables.
19953
(parse_href): Better handling of "" hrefs.
19955
* htmlimage.c (html_image_factory_register(): Insert url into list
19956
before emitting signal.
19958
* htmlpainter.c (html_painter_draw_background: Added two
19959
parameters, pix_width, pix_height.
19961
* htmltablecell.c (draw): Added support for backgrounds:
19962
http.//www.themes.org looks great now :)
19963
(html_table_cell_set_pixmap): New function.
19965
1999-12-12 Ettore Perazzoli <ettore@helixcode.com>
19967
* testgtkhtml.c (on_link_followed): New function.
19968
(main): Instead of connecting `on_button_release_event' to the
19969
"button_release_event" signal, connect `on_link_followed' to
19971
(on_button_release_event): Removed.
19973
* gtkhtml.c: `link_followed' signal renamed to `link_clicked'.
19974
(gtk_html_button_press_event): New function. Not doing anything
19976
(gtk_html_button_release_event): New function. Emit
19977
"link_clicked" on button release if the pointer is on a URL.
19978
(gtk_html_class_init): Install them as the "button_press_event"
19979
and "button_release_event" implementations.
19981
1999-12-11 Ettore Perazzoli <ettore@helixcode.com>
19983
* htmltextslave.c (fit_line): Do not assign to `next_obj->prev' if
19984
`next_obj' is NULL.
19986
1999-12-11 Jonas Borgstr�m <jonas_b@bitsmart.com>
19988
* htmlengine.c (html_engine_set_base_url): New function
19989
(parse_s): New function, added support for <small> and </small>
19990
(html_engine_begin): set newPage = TRUE
19991
(html_engine_update_event): Scroll page to top if newPage is set.
19993
* htmlengine.h:(html_engine): new member newPage
19995
* gtkhtml.c (gtkhtml_set_base_url): New function
19997
* testgtkhtml.c (main): Add a default filter callback (request_terminater).
19998
(request_terminater): New function. Terminates requests.
19999
(url_requested): Adds filters for 4 different redirections.
20000
Redirections are now handled properly.
20001
(redirectFilter): New function. calls gtk_html_set_base_url on redirection.
20003
* htmlurl.c (html_url_new): if path == NULL set it to "/"
20004
(html_url_append_path) Cut the path at the first '/' from the right.
20006
1999-12-11 Ettore Perazzoli <ettore@helixcode.com>
20008
* htmltextslave.c (fit_line): Update the `prev' pointer.
20010
* htmltextmaster.c (fit_line): Update the `prev' pointer.
20012
* htmlclue.c (html_clue_append): Set the `prev' pointer as well.
20014
* htmlobject.c (html_object_init): Initialize it.
20016
* htmlobject.h: New member `prev' in `HTMLObject'.
20018
* htmlcursor.c (html_cursor_backward): New function, does nothing for now.
20020
1999-12-11 Matt Wilson <msw@redhat.com>
20022
* htmlurl.c (html_url_append_path): removed dependency on
20023
gnome by re-implementing g_concat_dir_and_file
20025
1999-12-11 Elliot Turner <turnere@MimeStar.com>
20027
* htmlengine.c (parse_m): New function to deal with the `meta'
20029
(parse_table): Remove tmpCell stuff that resulted in random
20031
(parse_i): Don't set the parent in the ClueAligned object in
20033
(parse_table): Likewise.
20035
1999-12-11 Ettore Perazzoli <ettore@helixcode.com>
20037
* htmlcursor.c (html_cursor_forward): Some navigation fixes.
20039
* debug.c (debug_dump_tree): Print out the value of the parent
20042
* htmltextslave.c (fit_line): Set the parent on the slave.
20044
* htmltextmaster.c (fit_line): Set the parent on the slave.
20046
* htmltextslave.c (draw): Draw the cursor if the cursor is here.
20048
* htmltext.c (draw): Draw the cursor if the cursor is here.
20050
* htmlobject.c (draw): Draw the cursor if the cursor is here.
20052
* htmlobject.h: New argument `cursor' in the `draw' method. All
20053
of the related functions updated accordingly.
20055
* htmlengine-cursor.h, htmlengine-cursor.c: New files.
20057
* gtkhtml.c (key_press_event): New function, implementation for
20058
the `key_press_event' virtual method.
20059
(gtk_html_realize): Removed double realization. Also, add
20060
`GDK_KEY_PRESS_MASK' and `GDK_KEY_RELEASE_MASK' to the event mask
20061
for the bin window.
20063
* htmltext.c (draw_cursor): New function, implementation of the
20064
`draw_cursor' virtual method.
20065
(html_text_class_init): Install it.
20067
* htmlpainter.c (html_painter_draw_cursor): New function.
20069
* htmlcursor.c (html_cursor_forward): New function to make the
20070
cursor go forward on the tree.
20072
* testgtkhtml.c: Big hack to at least make the stop button really
20073
stop loading. Something is still wrong, though, as we get no
20074
callback when the input stream ends. Help is welcome. So, there
20075
is a new local variable called `html_handle' to hold the main html
20077
(goto_url): Initialize it with the return value from
20079
(stop_cb): Stop the stream and set `html_handle' to NULL.
20081
* htmlengine.c (html_engine_end): Position the cursor at the
20082
beginning of the document.
20084
* htmlcursor.c (html_cursor_home): New function to position the
20085
cursor at the beginning of the document.
20087
1999-12-10 Ettore Perazzoli <ettore@helixcode.com>
20089
* htmlcursor.c (html_cursor_destroy): Added precondition.
20091
* htmlengine.h (html_engine_get_doc_width): Added prototype.
20093
* htmlengine.c (parse_body): Add cast to `html_clue_append' call.
20095
* htmlpainter.h: New member `black' in `HTMLPainter', holding the
20096
GdkColor for black.
20097
* htmlpainter.c (html_painter_realize): Allocate it.
20099
* htmlengine.c (draw_cursor): New function.
20100
(html_engine_parse): Set the cursor to point at the first clue.
20102
* htmlpainter.c (html_painter_draw_line): New function.
20104
* htmlengine.h: New members `cursor', `show_cursor' in `struct
20106
* htmlengine.c (html_engine_init): Init them.
20107
(html_engine_destroy): Destroy the cursor.
20109
1999-12-11 Anders Carlsson <andersca@gnu.org>
20111
* htmlengine.c (parse_body): Add a handler for the '\n' tag
20112
that's used for newlines in <pre>...</pre>
20114
1999-12-11 Anders Carlsson <andersca@gnu.org>
20116
* testgtkhtml.c (main): Set policy to only show scrollbars when needed.
20118
* gtkhtml.c (gtk_html_calc_scrollbars): use gtk_layout_set_size ();
20120
1999-12-11 Anders Carlsson <andersca@gnu.org>
20122
* testgtkhtml.c (main): Use a scrolled window instead of
20125
* gtkhtml.c (gtk_html_horizontal_scroll): Added function.
20126
(gtk_html_new): Connect signal to function.
20127
(gtk_html_calc_scrollbars): Calculate adjustment for horizontal
20130
* htmlengine.c: Added functions for calculating document width
20132
1999-12-10 Ettore Perazzoli <ettore@helixcode.com>
20134
* htmlengine.h (html_engine_draw_background): Removed prototype.
20136
* htmlengine.c (html_engine_show_cursor): New function.
20137
(html_engine_init): Initialize `show_cursor' to TRUE.
20138
(html_engine_draw_background): Made static and renamed to
20140
(html_engine_draw): Updated accordingly.
20142
* htmlengine.h: New flag `show_cursor' in `struct HTMLEngine'.
20144
* htmlcursor.c, htmlcursor.h: New files.
20146
1999-12-10 Jonas Borgstr�m <jonas_b@bitsmart.com>
20148
* htmlengine.c (parse_i): Do not pass NULL pointer to
20149
html_url_to_string.
20151
1999-12-10 Ettore Perazzoli <ettore@helixcode.com>
20153
* All files: updated to match these changes.
20155
* htmlclue.c (html_clue_append): Set the parent of the object to
20158
* htmlobject.h: New member `parent' in `HTMLObject'.
20159
* htmlobject.c (html_object_init): Set it to NULL.
20160
(html_object_set_parent): New function.
20162
1999-12-10 Jonas Borgstr�m <jonas_b@bitsmart.com>
20164
* gtkhtml.c (gtk_html_begin): Scroll page to the top on new url
20166
* htmltokenizer.c (html_tokenizer_write): Fixing parsing of entity.
20168
* htmlentity.c (html_entity_parse): Corrected function.
20170
1999-12-09 Miguel de Icaza <miguel@gnu.org>
20172
* htmlpainter.c (html_painter_draw_pixmap): fix the offsets.
20174
1999-12-09 Anders Carlsson <andersca@gnu.org>
20176
* htmltable.c (draw): Doh! Fixed a silly bug where
20177
it checked c against totalRows, changing to r reallly
20178
speeded up test6.html
20180
1999-12-09 Jonas Borgstr�m <jonas_b@bitsmart.com>
20182
* htmlengine.c (parse_a, parse_b, parse_i): Send Absolute urls to
20185
* testgtkhtml.c: New Features:
20186
* Follow links with mouse click works now.
20187
* Implemented Back, Forward, Reload, Home.
20188
* Added popup menu (Back, Forward, Home)
20189
* Added Go menu (Back, Forward, Home and History list)
20190
* Added Wheel mouse scrolling support.
20191
* Prepend "http://" To urls if needed.
20193
* htmlurl.c (html_url_append_path): Fixed correct url handling.
20195
1999-12-08 Miguel de Icaza <miguel@gnu.org>
20197
* htmlpainter.c (html_painter_end): Another off-by one error fix.
20198
(html_painter_draw_panel): Adapt this routine to use the double
20200
(html_painter_draw_background_pixmap): Ditto.
20202
* htmlurl.c (html_url_append_path): Memory leak fix, and crash fix.
20204
* htmlpainter.c (html_painter_end): Fix off by one error.
20205
(html_painter_new): Double buffering is now the default.
20206
(html_painter_draw_pixmap): Remove soptimization to fix image repainting.
20207
(html_painter_draw_pixmap): Use proper API.
20209
1999-12-07 Ettore Perazzoli <ettore@gnu.org>
20211
* htmlurl.c (scan_user_and_password): Renamed to `scan_host_info'.
20212
Do the right thing with URLs that do not have a slash after the
20213
host name (e.g. because there is no path).
20215
* htmlengine.c (parse_href): Do the right thing with
20216
duplicating/changing the HTMLURL structs.
20218
1999-12-06 Ettore Perazzoli <ettore@gnu.org>
20220
* testgtkhtml.c (on_url): Removed unused variable.
20221
(url_requested): Made `ctmp' const.
20223
* htmltype.c: #include "htmlanchor.h".
20225
* htmlobject.c (html_object_check_point): Removed unused variable.
20227
* gtkhtml.c (gtk_html_set_geometry): `#if 0'ed out as currently
20230
* htmlengine.h: Changed type of `url' to `HTMLURL'.
20231
* htmlengine.c: All functions changed accordingly (i.e. to use
20232
`HTMLURL' internally, instead of `gchar *').
20234
* htmlengine.c (parse_href): New function for dealing with links
20235
properly (i.e. handling relative ones etc.).
20238
* htmlengine.h: New member `actualURL' in `HTMLEngine'.
20239
* htmlengine.c (html_engine_begin): Set it.
20240
(html_engine_init): Init it to NULL.
20241
(html_engine_destroy): Free it.
20243
* htmlurl.c: New file.
20244
* htmlurl.h: New file.
20246
* htmlfont.c (html_font_new): Made prototype const-safe.
20248
* htmlpainter.h (html_painter_draw_panel): New function prototype.
20250
* htmlclue.h (html_clue_append_left_aligned): Added missing prototype.
20252
* htmltokenizer.c (html_tokenizer_write): Parse the entity with
20253
`html_entity_parse()'.
20255
* htmlentity.c, htmlentity.h: New files dealing with entity.
20256
(html_entity_parse): New function.
20258
* htmlengine.c (parse_i): Use the current URL and target for the
20261
* htmlimage.c (html_image_init): New parameters `url', `target'.
20262
(html_image_new): Likewise.
20264
* htmlimage.h: New members `url' and `target' in `HTMLImage'.
20266
1999-12-03 Ettore Perazzoli <ettore@gnu.org>
20268
* testgtkhtml.c (do_request_delete): Do not delete the request. I
20269
am not sure if it's supposed to be necessary or not, but it does
20272
* htmlengine.c (parse_b): Oops, fix the `gtk_signal_emit()' calls.
20274
* htmlobject.c (html_object_get_url): Removed debugging message.
20276
* gtkhtml.c (gtk_html_motion_notify_event): Keep track of the
20277
current URL through `pointer_url'. Also, emit the signal when the
20278
current URL changes.
20280
* testgtkhtml.c: Show usage of the `on_url' signal.
20282
* htmlimage.c (html_image_factory_register): Set the `stream'
20283
member to point to the newly created stream.
20284
(html_image_get_stream): New function returning a pointer to the
20287
* htmlimage.h: New member `stream' in `HTMLImage'.
20289
* gtkhtml.c (html_engine_title_changed_cb): New signal handler for
20290
the `title_changed' signal in the HTMLEngine.
20291
(html_engine_set_base_cb): Likewise for `set_base'.
20292
(html_engine_set_base_target_cb): Likewise for `set_base_target'.
20293
(html_engine_load_done_cb): Likewise for `load_done'.
20294
(gtk_html_new): Connect the signal handlers to the newly created
20296
(gtk_html_motion_notify_event): Don't free the URL we get from
20297
`html_engine_get_link_at()' anymore.
20299
* htmlengine.c (html_engine_begin): Emit the
20300
`url_requested_signal' after creating the stream.
20302
* htmlstream.c (gtk_html_stream_new): Do not make the GtkHTML
20303
widget emit any signal!
20305
* htmlengine.c: `html_engine_signals' renamed to `signals' and
20306
made static. Also, added "set_base_target", "set_base",
20307
"load_done", "title_changed" own signals.
20308
(parse_b): Make the engine emit signals, not the owner widget.
20309
(parse_t): Likewise.
20310
(html_engine_end): Likewise.
20312
* gtkhtml-private.h: Removed signals from here.
20313
* gtkhtml.c: Moved here. Also, changed the name from
20314
`html_signals' to `signals'.
20316
* gtkhtml.h, gtkhtml.c: New signal `on_url'.
20318
* gtkhtml.h: New member `pointer_url' in `GtkHTML'.
20319
* gtkhtml.c (gtk_html_init): Init it to NULL.
20320
(destroy): `g_free()' it.
20322
* gtkhtml.c (gtk_html_motion_notify_event): Updated to the const
20323
return of `html_engine_get_link_at()'.
20325
* htmlengine.c (html_engine_get_link_at): Return value made const.
20326
So, we don't strdup the value from `html_object_get_url()'
20329
* gtkhtml.c (destroy): New function, implementation of the
20331
(gtk_html_class_init): Install it.
20332
(gtk_html_realize): Set the arrow cursor as the initial cursor for
20335
* gtkhtml.h: New members `hand_cursor' and `arrow_cursor'.
20336
* gtkhtml.c (gtk_html_init): Init them.
20338
* htmlengine.c (html_engine_get_uri_at_pointer): Renamed to
20339
`html_engine_get_link_at'.
20340
* htmlengine.h: Updated likewise.
20341
* gtkhtml.c (gtk_html_motion_notify_event): Updated accordingly.
20343
1999-12-04 Anders Carlsson <andersca@gnu.org>
20345
* htmlsettings.c: Fix the correct number of font sizes, it's 7 not 6.
20347
* htmltable.c (draw): Use html_painter_draw_panel for table borders.
20349
* htmlpainter.c (html_painter_draw_panel): New function for drawing a
20352
* htmlimage.c (draw): Use html_painter_draw_panel for pictures that
20353
are not yet loaded.
20355
1999-12-03 Ettore Perazzoli <ettore@gnu.org>
20357
* htmllinktextmaster.c (html_link_text_master_init): `url' and
20358
`target' made const. Strdup before assigning.
20359
(html_link_text_master_new): Likewise.
20360
(get_url): Removed debugging message.
20362
* htmllinktext.c (html_link_text_init): Strdup the URL and the
20364
(html_link_text_new): Made the `url' and `target' arguments const.
20365
(html_link_text_init): Likewise.
20367
* htmltextslave.c (get_url): Implementation of the `get_url'
20369
(html_text_slave_class_init): Install it.
20371
* gtkhtml.c (motion_notify_event): New function, handler for the
20372
`notify_event' signal.
20373
(gtk_html_class_init): Install it.
20375
1999-12-04 Anders Carlsson <andersca@gnu.org>
20377
* htmlcluev.c (appended): Traverse the aligned list, not the
20378
regular object tree list. This fixes the slashdot bug (Finally).
20380
1999-12-03 Ettore Perazzoli <ettore@gnu.org>
20382
* htmltable.c (check_point): Implementation of `check_point'.
20383
(html_table_class_init): Install it.
20385
* htmlcluev.c (check_point): Implementation of `check_point'.
20386
(html_cluev_class_init): Install it.
20388
* htmlclue.c (check_point): Implementation of `check_point'.
20389
(html_clue_class_init): Install it.
20391
* htmlobject.c (check_point): Default implementation for
20393
(html_object_class_init): Install it.
20394
(html_object_check_point): New function.
20396
* htmlobject.h: New virtual method `check_point'.
20398
1999-12-03 Ettore Perazzoli <ettore@gnu.org>
20400
* htmltable.c (mouse_event): New function, implementing the
20401
`mouse_event()' virtual method.
20402
(html_table_class_init): Install it.
20404
* htmlcluev.c (mouse_event): New function, implementing the
20405
`mouse_event()' virtual method.
20406
(html_cluev_class_init): Install it.
20408
* htmlclue.c (mouse_event): New function, implementing the
20409
`mouse_event()' virtual method.
20410
(html_clue_class_init): Install it.
20412
* htmlobject.c (mouse_event): Default implementation for
20414
(html_object_class_init): Install it.
20415
(html_object_mouse_event): New function.
20417
* htmlobject.h: New virtual method `mouse_event()'.
20419
* htmllinktextmaster.c: The parent class is
20420
`HTMLLinkTextMasterClass', not `HTMLTextMasterClass'.
20422
* htmlobject.h: Renamed `ClearType' to `HTMLClearType'; made the
20423
ids uppercase and prefixed with `HTML_CLEAR_'. Similiar treatmant
20424
for `HTMLVAlignType' and `HTMLHAlignType'. Changed values for
20425
`HTMLFitType' to be all uppercase and be prefixed with `HTML_FIT'
20426
as well. All instances updated.
20428
1999-11-28 Ettore Perazzoli <ettore@gnu.org>
20430
* htmlengine.c (parse_b): Handle `link=', `vlink=' and `text=' in
20432
(html_engine_init): Allocate `defaultSettings'.
20433
(html_engine_destroy): Free it.
20434
(html_engine_parse): AAARGH! Colors must *never* be allocated
20435
with `g_new()'! Anyway, we needed to push the default color, not
20436
an arbitrary black.
20437
(html_engine_parse): Allocate colors in the defaultSettings and
20438
copy to the settings. Use the settings to set the initial font.
20439
(parse_a): Color and underline links according to the settings.
20440
(parse_table): Honour the `forceDefault' flag in the settings.
20441
(select_font_full): New helper function.
20442
(parse_c): Use it. Set the correct font for `<code>'.
20443
(select_font_relative): New function.
20444
(parse_h): Use it to deal with header font sizes correctly.
20445
(parse_t): Use correct font for `<tt>'.
20446
(parse_p): Use correct font for `<pre>'.
20448
* htmlengine.h: New member `defaultSettings' in `HTMLEngine'.
20450
* htmlsettings.c (html_settings_set_font_sizes): New function.
20451
(html_settings_get_font_sizes): New function.
20452
(html_settings_reset_font_sizes): New function.
20453
(HTML_NUM_FONT_SIZES): New constant.
20454
(html_settings_alloc_colors): New function.
20455
(html_settings_copy): New function.
20456
(html_settings_set_fixed_font_face): New function.
20457
(html_settings_set_font_base_face): New function.
20459
* htmlsettings.h: Updated `HTMLSettings' to contain all the fields
20460
in the original KHTMLW code. `fontbasesize' renamed to
20461
`fontBaseSize' and `bgcolor' to `bgColor', for consistency.
20463
1999-11-28 Ettore Perazzoli <ettore@gnu.org>
20465
* htmlengine.c (select_font_relative): Call `html_engine_set_font'
20466
so that it does not crash.
20468
1999-11-28 Ettore Perazzoli <ettore@gnu.org>
20470
* htmlimage.c (draw): Quick hack to always draw the border
20473
* htmltablecell.h: Fixed typo in `HTMLTableCellClass'.
20475
* htmlobject.c (html_object_draw): Added debug message.
20477
* htmlcluev.c (draw): Add `x' to `tx' and `y - ascent' to `ty', as
20478
the original HTMLW code does. Also, draw left-aligned items as
20479
well. Also, I fixed the drawing calls: stupid polymorphism!
20481
1999-11-27 Ettore Perazzoli <ettore@gnu.org>
20483
* htmltokenizer.c (html_tokenizer_add_pending): Fixed typo: `%
20484
TAB_SIZE' instead of `& TAB_SIZE'.
20486
1999-11-27 Ettore Perazzoli <ettore@gnu.org>
20488
* htmlengine.h: Removed `parseFuncArray[]' from `struct
20490
* htmlengine.c: Moved here.
20491
(html_engine_init): Do not install `parseFuncArray' anymore.
20493
* htmlengine.c (parse_t): Implemented `<tt>' handling (wrong font
20496
1999-11-26 Ettore Perazzoli <ettore@gnu.org>
20498
* htmlengine.c (html_engine_init): Init `inPre', `inTitle'.
20499
(block_end_pre): New function.
20500
(parse_p): Implemented `<pre>' handling. Also, call
20501
`close_anchor()' appropriately for the `<p>' case.
20502
(html_engine_pop_font): Report a warning if the stack is empty
20503
after popping to prevent segfault.
20504
(html_engine_new_flow): Handle `inPre'.
20505
(parse_v): New function, implementing `<var>'.
20506
(html_engine_init): Install it in the parsing vtable.
20507
(parse_u): Enable code for `<ul>'.
20509
* htmlengine.h: New member `inPre' in `HTMLEngine'.
20511
1999-11-26 Ettore Perazzoli <ettore@gnu.org>
20513
* htmlengine.c (html_engine_init): Init `tempStrings'.
20514
(html_engine_destroy): Free it.
20515
(to_roman): New function.
20516
(parse_l): Implemented ordered lists.
20517
(parse_o): Implemented. (Parses only `<ol>' and not `<option>'
20519
(html_engine_init): Install `parse_o' in the parsing vtable.
20520
(block_end_list): Pop and destroy the list on the top of the
20523
* htmlengine.h: New member `tempStrings' in `HTMLEngine'.
20525
* htmlengine.c (html_engine_init): Init `glossaryStack'.
20526
(html_engine_destroy): Destroy it.
20527
(parse_d): Implemented `<dl>', `<dd>' and `<dt>' from the KHTMLW
20529
(html_engine_new_flow): Use the indent value from the HTMLEngine,
20531
(parse_k): New function, parsing for the `<kbd>' tag.
20532
(html_engine_init): Install it.
20533
(parse_l): Call `close_anchor' for `<li>'. Also, use
20534
`html_stack_is_empty()' instead of `html_stack_count()' for
20535
checking for emptiness.
20537
* htmlengine.h: New enum `HTMLGlossaryEntry'. New member
20538
`glossaryStack' in `HTMLEngine'.
20540
* htmlstack.c (html_stack_clear): If the `free_func' is NULL,
20541
don't try to free elements.
20542
(html_stack_top): If the stack is empty, return NULL.
20544
1999-11-26 Ettore Perazzoli <ettore@gnu.org>
20546
* htmlengine.h: Replaced `HTMLListStack' with an `HTMLStack'.
20547
* htmlengine.c: Updated accordingly.
20549
* htmllist.h: `ListType' renamed to `HTMLListType', `ListNumType'
20550
renamed to `HTMLListNumType'. Also, changed the values to upper
20551
case, and prefixed them with `HTML_LIST_TYPE' and
20552
`HTML_LIST_NUM_TYPE' respectively. Occurrences updated.
20554
* htmllist.c, htmllist.h: Removed `HTMLListStack' implementation.
20556
* htmlengine.c (parse_a): Get `<address>' to work.
20558
* htmlengine.h: Replaced the `HTMLFontStack' with an `HTMLStack'.
20559
* htmlengine.c: Updated accordingly.
20561
* htmlfont.c, htmlfont.h: Removed the `HTMLFontStack'
20564
* htmlfont.c (html_font_new): Init `textColor'.
20565
(html_font_destroy): Free `textColor' if not NULL.
20566
(html_font_set_color): New function.
20567
* htmlengine.c (html_engine_parse): Use it.
20568
(html_engine_select_font): Use it.
20570
* htmlengine.h: Replaced the `HTMLColorStack' stack with a
20572
* htmlengine.c: All the functions updated accordingly.
20573
(html_engine_pop_color): Free the popped color.
20575
* htmlcolor.c, htmlcolor.h: Removed. #inclusions from other
20576
source files removed as well.
20578
* htmlstack.c, htmlstack.h: Implementation of a generic
20581
* htmlengine.c: New typedef `BlockStackElement'.
20582
(block_stack_element_new): New static function, derived from
20583
`html_stack_element_new()'.
20584
(html_engine_push_block): Updated to use it.
20585
(html_block_stack_element_free): New function.
20586
(html_engine_free_block): Updated to use it.
20587
(html_engine_push_block): Removed.
20588
(push_block): New static function replacing it. Former callers of
20589
`html_engine_push_block' updated to use it.
20590
(html_engine_free_block): Removed.
20591
(free_block): New static function replacing it. Former callers of
20592
`html_engine_free_block' updated to use it.
20593
(html_engine_pop_block): Removed.
20594
(pop_block): New static function replacing it. Former callers of
20595
`html_engine_pop_block' updated to use it.
20596
(html_engine_block_end_font): Removed.
20597
(block_end_font): New static function replacing it. Former
20598
callers of `html_engine_block_end_font' updated to use it.
20599
(html_engine_block_end_color_font): Removed.
20600
(block_end_color_font): New static function replacing it. Former
20601
callers of `html_engine_block_end_color_font' updated to use it.
20602
(html_engine_block_end_list): Removed.
20603
(block_end_list): New static function replacing it. Former
20604
callers of `html_engine_block_end_list' updated to use it.
20605
(html_engine_block_end_indent): Removed.
20606
(block_end_indent): New static function replacing it. Former
20607
callers of `html_block_end_indent' updated to use it.
20608
(html_engine_block_end_div): Removed.
20609
(block_end_div): New static function replacing it. Former callers
20610
of `html_engine_block_end_div' updated to use it.
20611
* htmlengine.h: Updated prototypes accordingly.
20613
* htmlengine.h: New typedef `HTMLBlockStackElement' that will
20614
replace former `HTMLStackElement'.
20616
* htmlstack.c (html_stack_element_new): Removed. This function is
20617
only used by `htmlengine.c' for the block stack, so the name is
20620
* htmlengine.c (parse_d): Enable code for `</div>' which was `#if
20623
1999-11-26 Ettore Perazzoli <ettore@gnu.org>
20625
* htmlengine.c (parse_table): Call `close_anchor()' when `</table'
20626
is encountered. Added support for `<caption>'. Handle headings.
20627
Destroy objects correctly. Handle Left/Right alignment. With all
20628
of this, this function should finally be completely ported.
20629
(set_base_url): New function; for now it's just a dummy.
20630
(select_font_relative): New function; incomplete.
20631
(html_engine_block_end_indent): New function.
20632
(parse_b): Ported `<base>', `<big>' and `<blockquote>' from
20634
(parse_c): Added `<cite>' and `<code>'. Font for `<code>' is
20636
(html_engine_begin): Removed unused variable.
20637
(html_engine_block_end_div): New function.
20638
(parse_d): New function, implementing only `<dir>' and `<div>' for
20640
(html_engine_init): Install it in the parse array.
20642
* htmlcluev.c (remove_aligned_by_parent): Implemented (from
20643
`HTMLClueV::removeAlignedByParent()').
20644
(calc_size): Call it (as the corresponding KHTMLW function did).
20646
* htmlclueflow.c (calc_size): Handle clear types correctly, using
20647
`html_clue_get_{left,right}_clear()'.
20649
* htmlclue.c (html_clue_get_right_clear): New function.
20650
(html_clue_get_left_clear): New function.
20651
(get_left_clear): Default implementation of the `get_left_clear()'
20653
(get_right_clear): Default implementation of the `get_right_clear()'
20655
(html_clue_class_init): Install them.
20656
(find_free_area): Default implementation changed to match the
20659
* htmlclue.h: New virtual methods `get_right_clear()' and
20660
`get_left_clear()'.
20661
(html_clue_get_right_clear): New prototype.
20662
(html_clue_get_left_clear): New prototype.
20664
1999-11-26 Anders Carlsson <andersca@gnu.org>
20666
* htmlengine.c (html_engine_draw_background): Use the new function
20667
when drawing backgrounds.
20669
* htmlpainter.c (html_painter_draw_background_pixmap): Added a new
20670
function for drawing the background pixmap.
20672
* debug.c: Adapted the debug code to the new object system.
20674
* htmlbullet.c (draw): Fixed the bullet redraw bug.
20676
* htmlimage.c (draw): Fixed the image redraw bug.
20678
1999-11-25 Ettore Perazzoli <ettore@gnu.org>
20680
* htmlengine.c: Added `ID_I' to enum `ID'.
20681
(parse_h): Removed extra `html_engine_select_font()' call which
20682
should not be there.
20683
(parse_i): Added code to deal with the `<i>' tag.
20684
(html_engine_set_named_color): Aaargh. Return `TRUE'!
20685
(parse_a): Pass `TRUE' as the last argument to
20686
`html_engine_push_block()' when doing the "address" tag.
20688
* htmlengine.c (html_engine_set_named_color): Return value made
20689
`gboolean': return FALSE if the color could not be parsed.
20690
(parse_b): If `html_engine_set_named_color()' fails, don't mark
20692
(parse_table): Likewise.
20694
* htmlengine.h (html_engine_set_named_color): Updated prototype.
20696
1999-11-24 Ettore Perazzoli <ettore@gnu.org>
20698
* htmllinktextmaster.c (html_link_text_master_class_init): Assign
20699
`parent_class' correctly.
20701
* htmlengine.c (parse_table): Use `html_object_set_bg_color()'
20702
instead of setting `cell->bg' directly. Also, avoid using the
20703
colors if they have not set explicitly. This fixes the random
20704
color bugs we were having with tables.
20706
* htmltablecell.c (set_bg_color): Implementation of the
20707
`set_bg_color' virtual method for HTMLTableCell.
20708
(html_table_cell_class_init): Install it.
20710
* htmlobject.c (html_object_set_bg_color): New function.
20711
(set_bg_color): Default implementation for the `set_bg_color'
20713
(html_object_class_init): Install it.
20715
* htmlobject.h: New virtual method `set_bg_color'.
20717
* htmltablecell.h: New member `have_bg' in `HTMLTableCell'.
20718
* htmltablecell.c (html_table_cell_init): Init it to `FALSE'.
20719
(draw): Don't draw the background if you don't have a background
20722
* htmlengine.c (parse_l): Removed allocation of `fontbasecolor'.
20723
(html_engine_draw_background): `bgColor' is now always allocated.
20724
(html_engine_parse): `settings->bgcolor' is no longer a pointer,
20726
(parse_h): Added code from KHTMLW to deal with different alignments
20729
* htmlsettings.h: Type of members `bgcolor' and `fontbasecolor' in
20730
`HTMLSettings' changed from `GdkColor *' to `GdkColor'.
20731
* htmlsettings.c (html_settings_destroy): Updated accordingly.
20732
(html_settings_new): Likewise.
20734
* htmlengine.c (parse_b): Updated accordingly.
20735
(html_engine_parse): Likewise.
20736
(html_engine_draw_background): Likewise.
20738
* htmlengine.h: Type of member `bgcolor' in `HTMLEngine' changed
20739
from `GdkColor *' to `GdkColor'.
20741
* htmlclue.c (draw): Do not draw a green rect around the clue
20744
* htmltablecell.c (draw): Removed meaningless check for a non-zero
20747
* htmlengine.c: Added `ID_EM' to enum `ID'.
20748
(parse_e): New function, imported from KHTMLW.
20749
(html_engine_init): Install it.
20751
* htmlengine.c: Renamed all the `html_engine_parse_*()' functions
20752
to `parse_*()', made static and moved to the top of the file.
20753
* htmlengine.h: Removed public prototypes accordingly.
20755
1999-11-23 Ettore Perazzoli <ettore@gnu.org>
20757
* htmlengine.c (html_engine_new_flow): Updated accordingly.
20758
(html_engine_insert_vspace): Updated accordingly.
20759
(html_engine_insert_text): Updated accordingly.
20760
(html_engine_parse_b): Updated accordingly.
20761
(html_engine_parse_i): Updated accordingly.
20762
(html_engine_parse_l): Updated accordingly.
20763
(html_engine_parse_f): Fixed allocation of `color' which caused a
20766
* htmlclue.c (html_clue_append): Type of arg `clue' changed to
20767
from `HTMLObject' to `HTMLClue'.
20769
* htmlengine.c (html_engine_parse): Use `lucida' instead of
20770
`times' (temp hack).
20772
* htmlfont.c (create_gdk_font): Temp hack to make font handling
20773
behave a little more sanely.
20775
* htmlcluev.h: Fixed braino `HTMLClue' -> `HTMLClueClass'.
20777
* htmlengine.c (html_engine_insert_text): Ported all the code from
20778
the corresponding function in KHTMLW.
20779
(html_engine_parse_a): New function, ported from
20780
`KHTMLWidget::parseA' in KHTMLW.
20781
(html_engine_init): Install it.
20782
(close_anchor): New helper function, ported from
20783
`KHTMLWidget::closeAnchor()'.
20785
* htmlengine.h: New members `url', `target' and `baseTarget' in
20786
`struct _HTMLEngine'.
20787
* htmlengine.c (html_engine_init): Init them.
20788
(html_engine_destroy): Free them.
20790
* htmltype.h: New types `HTML_TYPE_LINKTEXT',
20791
`HTML_TYPE_LINKTEXTMASTER'.
20792
* htmltype.c (html_type_name): Updated accordingly.
20794
* htmllinktextmaster.c: New file, implementing the
20795
`HTMLLinkTextMaster' class.
20797
* htmlobject.c (get_url): Default implementation for the `get_url'
20799
(get_target): Default implementation for the `get_target' virtual
20801
(find_anchor): Default implementation for the `find_anchor'
20803
(html_object_class_init): Install these functions in the class
20805
(html_object_get_url): New function.
20806
(html_object_get_target): New function.
20807
(html_object_find_anchor): New function.
20809
* htmlobject.h: New virtual methods `get_url', `get_target' and
20810
`find_anchor' in `HTMLObjectClass'.
20812
* htmlengine.h: Replaced `HTMLFontWeight weight' with `gboolean
20814
* htmlengine.c (html_engine_parse): Updated accordingly.
20815
(html_engine_select_font): Likewise.
20816
(html_engine_parse_b): Likewise.
20817
(html_engine_parse_h): Likewise.
20819
* htmllinktext.c, htmllinktext.h: New files, implementing the
20820
`HTMLLinkText' class.
20822
* htmlanchor.c, htmlanchor.h: New files, implementing
20825
1999-11-17 Ettore Perazzoli <ettore@gnu.org>
20827
* htmlengine.c (html_engine_parse_body): Handle empty space
20828
correctly. (Added a bunch of lines from the KHTMLW original.)
20829
This fixes the bug reported in the previous ChangeLog entry.
20830
(html_tokenizer_write): Added missing increment for `t->dest' when
20831
a sequence that is too long is ignored.
20833
1999-11-17 Ettore Perazzoli <ettore@gnu.org>
20835
* htmltokenizer.c (html_tokenizer_write): Changed handling of
20836
space according to the KHTMLW source; I am not sure why it was
20837
done differently. Something is still wrong though, as `<li> <p>'
20838
introduces a vspace while `<li><p>' does not.
20840
* htmlengine.c (html_engine_parse_l): Set `vspace_inserted' to
20841
TRUE when parsing `li'. Otherwise, things like
20842
`<li><p>text</p></li>' incorrectly insert a newline between the
20843
bullet and the text.
20845
1999-11-17 Ettore Perazzoli <ettore@gnu.org>
20847
* Makefile.am (dist-hook): Removed wrong `cp' line.
20848
(libgtkhtml_HEADERS): Added `gtkhtml-private'.
20850
* Reimplemented object handling for all the object classes. We
20851
still need to fix all the `destroy' handlers and generally
20852
double-check that things are working right.
20854
* htmltype.c, htmltype.h: New files implementing a very minimal
20855
static object system.
20857
* debug.c (debug_dump_object_type): Removed.
20858
(debug_dump_tree): Do nothing for now, while we fix the object
20861
1999-11-11 Elliot Lee <sopwith@redhat.com>
20863
* testgtkhtml.c: WWW_SOURCE, not WWW_PRESENT (so it will work with local files).
20864
* htmlengine.c: Use canonicalized URL for stream creation.
20866
1999-11-09 Ettore Perazzoli <ettore@gnu.org>
20868
* Makefile.am: Compile as a standalone library `libgtkhtml.la'.
20870
1999-10-30 Michael Meeks <mmeeks@gnu.org>
20872
* html-component.c (embeddable_factory): Add persist stream interface.
20873
Set stream item = NULL.
20874
(embeddable_destroy_cb): Kill stream after use.
20875
(embeddable_load, load_html_from_stream): vicious hack.
20877
(view_factory): Hack out view_date->html and move into embeddable_data,
20878
far reaching change; we need doc / view.
20880
* Makefile.am (gnorba_DATA): redundant ( kill ).
20882
1999-10-30 Michael Meeks <mmeeks@gnu.org>
20884
* Makefile.am (gnorba_DATA): Add gnorba install.
20886
* html-component.c (update_view): just do a gtk_widget_queue_draw +
20887
fix args. (view_update): kill.
20889
1999-10-28 Miguel de Icaza <miguel@gnu.org>
20891
* htmlpainter.c (html_painter_begin): Use the propper offset here
20892
when clearing the rectangle.
20894
* gtkhtml.c (gtk_html_vertical_scroll): Remove the spurious call
20895
to repaint the whole exposed region.
20896
(gtk_html_new): If the adjustment was not passed, create it, so
20897
that we can connect to the signal changed emmission before the
20900
* htmlpainter.c (html_painter_draw_text): Adjust the text output
20903
1999-10-26 Miguel de Icaza <miguel@gnu.org>
20905
* gtkhtml.c (gtk_html_vertical_scroll): Do not force a redraw anymore.
20906
(gtk_html_new): Now we take two adjustment arguments.
20907
(gtk_html_init): Do not create an artificial scrollbar nor its
20909
(gtk_html_calc_scrollbars): This should be no longer required; An
20910
alternate mechanism should be pursued.
20911
(gtk_html_calc_scrollbars): Update the adjustment here.
20912
(gtk_html_init): Set the APP_PAINTABLE bit here.
20914
1999-10-25 Miguel de Icaza <miguel@gnu.org>
20916
* htmlengine.c (html_engine_timer_event): Use exported routines to
20917
access the painter.
20919
* htmlpainter.c (html_painter_clear, html_painter_realize,
20920
html_painter_being, html_painter_end): New methods to implement
20923
Moved HTMLPainter structure here to make it completely opaque.
20925
Added preconditions everywhere.
20927
Made all methods aware of the painter offset, to support double
20930
1999-10-24 Miguel de Icaza <miguel@gnu.org>
20932
* gtkhtml.c (gtk_html_unrealize): Added unrealize handler.
20934
1999-10-24 Richard Hult <rhult@frenzy.hemmet.chalmers.se>
20936
* testgtkhtml.c (main): Exit when the window is deleted.
20938
1999-10-23 Miguel de Icaza <miguel@gnu.org>
20940
* htmltextmaster.c (html_text_master_fit_line): Use
20941
html_object_destroy here instead of g_free directly.
20943
* htmlengine.c (html_engine_parse_b): Set the color using the
20944
proper API to insure proper color allocation management (Gdk uses
20947
* htmlsettings.c (html_settings_destroy): New method.
20948
(html_settings_set_bgcolor): New method.
20950
* htmllist.c (html_list_destroy): New method.
20951
(html_list_stack_clear): Implement.
20953
* htmlcolor.c (html_color_stack_destroy): Added destroy method.
20954
(html_color_stack_clear): Implemented.
20956
* htmlfont.c (html_font_stack_destroy): Added destroy method.
20958
* stringtokenizer.c (string_tokenizer_destroy): Added destroy method.
20960
* htmltokenizer.c (html_tokenizer_destroy): Added destroy method
20961
and release reosouorces.
20962
(html_tokenizer_reset): Free buffers here.
20964
* htmlengine.c (html_engine_class_init): Added destroy handler.
20966
* htmltokenizer.c (html_tokenizer_begin): Fixed FIXME.
20968
* htmlcluev.c (html_cluev_appended): Initialize this one.
20969
(cluev_next_aligned): Utility routine to kill warnings.
20971
* htmlfont.c (html_font_destroy): Add a destructor for fonts.
20972
(html_font_stack_clear): Added font stack destruction code.
20974
Added precondition entry points.
20976
1999-10-17 Richard Hult <rhult@hem2.passagen.se>
20978
* htmlengine.[ch]: Turn the engine into a GtkObject.
20980
1999-10-17 Anders Carlsson <andersca@gnu.org>
20982
* testgtkhtml.c: The goto button shouldn't be able to focus
20984
1999-10-17 Richard Hult <rhult@hem2.passagen.se>
20986
* html-component.c: Use a GtkHTML widget directly instead of duplicating the code here.
20988
1999-10-17 Anders Carlsson <andersca@gnu.org>
20990
* testgtkhtml.c: More work on the ui
20992
1999-10-17 Richard Hult <rhult@hem2.passagen.se>
20994
* Makefile.am: Fixed component build.