Imported Upstream version 3.0~rc3
Axel Beckert
12 years ago
1 | 1 | Dillo project |
2 | 2 | ============================================================================= |
3 | 3 | |
4 | dillo-3.0 [September ??, 2011] | |
4 | dillo-3.0 [September 06, 2011] | |
5 | 5 | |
6 | 6 | +- Ported Dillo to FLTK-1.3. |
7 | 7 | Patch: corvid, Johannes Hofmann, Jorge Arellano Cid |
35 | 35 | Patches: corvid |
36 | 36 | +- Add support for CSS adjacent sibling selectors. |
37 | 37 | - Collapse parent's and first child's top margin. |
38 | - Fix redraw loops and reenable limit_text_width dillorc option. | |
38 | 39 | Patch: Johannes Hofmann |
39 | 40 | +- Default binding for left-tab changed to Shift-Ctrl-Tab. |
40 | 41 | Patch: Jeremy Henty |
20 | 20 | The core team welcomes developers willing to join our workforce. |
21 | 21 | |
22 | 22 | |
23 | NOTE: With FLTK-1.3, when running on X with Xft enabled (the | |
24 | default), font naming is more restricted than it was with FLTK2. | |
25 | If your font_* preferences are no longer working well, please try | |
26 | the fc-list command as given in dillorc. | |
27 | ||
28 | ||
23 | 29 | Here's a list of some old well-known problems of dillo: |
24 | 30 | |
25 | 31 | * no FRAMES rendering |
41 | 47 | |
42 | 48 | 1.- Install fltk: |
43 | 49 | |
44 | tar jxvf fltk-1.3.0-source.tar.gz | |
50 | tar zxvf fltk-1.3.0-source.tar.gz | |
45 | 51 | cd fltk-1.3.0 |
46 | less README.unix | |
52 | less README.Unix.txt | |
47 | 53 | make |
48 | 54 | sudo make install |
49 | 55 | cd .. |
54 | 60 | |
55 | 61 | tar jxvf dillo-3.0.tar.bz2 |
56 | 62 | cd dillo-3.0 |
57 | ./autogen.sh; ./configure; make | |
63 | ./configure; make | |
58 | 64 | sudo make install-strip |
59 | 65 | |
60 | 66 |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.68 for dillo 3.0-pre. | |
2 | # Generated by GNU Autoconf 2.68 for dillo 3.0. | |
3 | 3 | # |
4 | 4 | # |
5 | 5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
556 | 556 | # Identity of this package. |
557 | 557 | PACKAGE_NAME='dillo' |
558 | 558 | PACKAGE_TARNAME='dillo' |
559 | PACKAGE_VERSION='3.0-pre' | |
560 | PACKAGE_STRING='dillo 3.0-pre' | |
559 | PACKAGE_VERSION='3.0' | |
560 | PACKAGE_STRING='dillo 3.0' | |
561 | 561 | PACKAGE_BUGREPORT='' |
562 | 562 | PACKAGE_URL='' |
563 | 563 | |
1286 | 1286 | # Omit some internal or obsolete options to make the list less imposing. |
1287 | 1287 | # This message is too long to be a string in the A/UX 3.1 sh. |
1288 | 1288 | cat <<_ACEOF |
1289 | \`configure' configures dillo 3.0-pre to adapt to many kinds of systems. | |
1289 | \`configure' configures dillo 3.0 to adapt to many kinds of systems. | |
1290 | 1290 | |
1291 | 1291 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1292 | 1292 | |
1357 | 1357 | |
1358 | 1358 | if test -n "$ac_init_help"; then |
1359 | 1359 | case $ac_init_help in |
1360 | short | recursive ) echo "Configuration of dillo 3.0-pre:";; | |
1360 | short | recursive ) echo "Configuration of dillo 3.0:";; | |
1361 | 1361 | esac |
1362 | 1362 | cat <<\_ACEOF |
1363 | 1363 | |
1463 | 1463 | test -n "$ac_init_help" && exit $ac_status |
1464 | 1464 | if $ac_init_version; then |
1465 | 1465 | cat <<\_ACEOF |
1466 | dillo configure 3.0-pre | |
1466 | dillo configure 3.0 | |
1467 | 1467 | generated by GNU Autoconf 2.68 |
1468 | 1468 | |
1469 | 1469 | Copyright (C) 2010 Free Software Foundation, Inc. |
2171 | 2171 | This file contains any messages produced by compilers while |
2172 | 2172 | running configure, to aid debugging if configure makes a mistake. |
2173 | 2173 | |
2174 | It was created by dillo $as_me 3.0-pre, which was | |
2174 | It was created by dillo $as_me 3.0, which was | |
2175 | 2175 | generated by GNU Autoconf 2.68. Invocation command line was |
2176 | 2176 | |
2177 | 2177 | $ $0 $@ |
3098 | 3098 | |
3099 | 3099 | # Define the identity of the package. |
3100 | 3100 | PACKAGE='dillo' |
3101 | VERSION='3.0-pre' | |
3101 | VERSION='3.0' | |
3102 | 3102 | |
3103 | 3103 | |
3104 | 3104 | cat >>confdefs.h <<_ACEOF |
6983 | 6983 | # report actual input values of CONFIG_FILES etc. instead of their |
6984 | 6984 | # values after options handling. |
6985 | 6985 | ac_log=" |
6986 | This file was extended by dillo $as_me 3.0-pre, which was | |
6986 | This file was extended by dillo $as_me 3.0, which was | |
6987 | 6987 | generated by GNU Autoconf 2.68. Invocation command line was |
6988 | 6988 | |
6989 | 6989 | CONFIG_FILES = $CONFIG_FILES |
7049 | 7049 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
7050 | 7050 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
7051 | 7051 | ac_cs_version="\\ |
7052 | dillo config.status 3.0-pre | |
7052 | dillo config.status 3.0 | |
7053 | 7053 | configured by $0, generated by GNU Autoconf 2.68, |
7054 | 7054 | with options \\"\$ac_cs_config\\" |
7055 | 7055 |
0 | 0 | dnl Process this file with aclocal, autoconf and automake. |
1 | 1 | |
2 | AC_INIT([dillo], [3.0-pre]) | |
2 | AC_INIT([dillo], [3.0]) | |
3 | 3 | |
4 | 4 | dnl Detect the canonical target build environment |
5 | 5 | AC_CANONICAL_TARGET |
79 | 79 | |
80 | 80 | # Set this to YES if you want to limit the word wrap width to the viewport |
81 | 81 | # width (may be useful for iPAQ) |
82 | # *** NOT HOOKED UP YET *** | |
83 | # | |
84 | 82 | #limit_text_width=NO |
85 | 83 | |
86 | 84 |
202 | 202 | char *ret = (char *) malloc(2 * len + 1); |
203 | 203 | char *dest = ret; |
204 | 204 | |
205 | while (len-- > 0) { | |
205 | while (len-- > 0) { | |
206 | 206 | if (*buf == '@') |
207 | 207 | *dest++ = *buf; |
208 | 208 | *dest++ = *buf++; |
1143 | 1143 | fl_font(o->font, o->size); |
1144 | 1144 | fl_measure(o->value, W, H, interpret_symbols); |
1145 | 1145 | } |
1146 | ||
1146 | ||
1147 | 1147 | |
1148 | 1148 | |
1149 | 1149 | //int main(int argc, char **argv) |
171 | 171 | family->set ((Fl_Font) i, t); |
172 | 172 | delete familyName; |
173 | 173 | } else { |
174 | // set first font of family also as normal font in case there | |
174 | // set first font of family also as normal font in case there | |
175 | 175 | // is no normal (non-bold, non-italic) font |
176 | 176 | family = new FontFamily ((Fl_Font) i, -1, -1, -1); |
177 | 177 | family->set ((Fl_Font) i, t); |
682 | 682 | { |
683 | 683 | /* FLTK-1.3 insists upon returning a new copy of the buffer text, so |
684 | 684 | * we have to keep track of it. |
685 | */ | |
685 | */ | |
686 | 686 | if (text_copy) |
687 | 687 | free(text_copy); |
688 | 688 | text_copy = buffer->text(); |
231 | 231 | /* When the viewport has focus (and not one of its children), FLTK |
232 | 232 | * sends the event here. Returning zero tells FLTK to resend the |
233 | 233 | * event as SHORTCUT, which we finally route to the parent. */ |
234 | ||
234 | ||
235 | 235 | /* As we don't know the exact keybindings set by the user, we ask |
236 | 236 | * for all of them (except Tab to keep form navigation). */ |
237 | 237 | if (Fl::event_key() != FL_Tab) |
294 | 294 | |
295 | 295 | case FL_RELEASE: |
296 | 296 | if (Fl::event_button() == FL_MIDDLE_MOUSE) { |
297 | dragScrolling = 0; | |
298 | 297 | setCursor (core::style::CURSOR_DEFAULT); |
299 | } else if (verScrolling && vscrollbar->handle(event)) { | |
300 | verScrolling = 0; | |
301 | return 1; | |
302 | } else if (horScrolling && hscrollbar->handle(event)) { | |
303 | horScrolling = 0; | |
304 | return 1; | |
298 | } else if (verScrolling) { | |
299 | vscrollbar->handle(event); | |
300 | } else if (horScrolling) { | |
301 | hscrollbar->handle(event); | |
305 | 302 | } |
303 | horScrolling = verScrolling = dragScrolling = 0; | |
306 | 304 | break; |
307 | 305 | |
308 | 306 | case FL_ENTER: |
832 | 832 | yp1 = yb1 + style->borderWidth.top; |
833 | 833 | xp2 = xb2 - style->borderWidth.right; |
834 | 834 | yp2 = yb2 - style->borderWidth.bottom; |
835 | ||
835 | ||
836 | 836 | light = inverse ? Color::SHADING_DARK : Color::SHADING_LIGHT; |
837 | 837 | dark = inverse ? Color::SHADING_LIGHT : Color::SHADING_DARK; |
838 | 838 | normal = inverse ? Color::SHADING_INVERSE : Color::SHADING_NORMAL; |
265 | 265 | int descent) |
266 | 266 | { |
267 | 267 | /** |
268 | * \todo The argument to queueResize is not always true. (But this works.) | |
268 | * \todo Verify that this is correct. | |
269 | 269 | */ |
270 | resource->queueResize (true); | |
270 | resource->queueResize (resource->childWidget->extremesChanged ()); | |
271 | 271 | } |
272 | 272 | |
273 | 273 | ComplexButtonResource::ComplexButtonResource () |
116 | 116 | " <tr>\n" |
117 | 117 | " <td> \n" |
118 | 118 | " <td>\n" |
119 | " <a href='http://slashdot.org/'>Slashdot</a>\n" | |
120 | " <tr>\n" | |
121 | " <td> \n" | |
122 | " <td>\n" | |
119 | 123 | " <a href='http://www.linux.org.uk/Portaloo.cs'>Linux.org.uk</a>\n" |
120 | 124 | " <tr>\n" |
121 | 125 | " <td> \n" |
234 | 238 | "<tr>\n" |
235 | 239 | " <td bgcolor='#CCCCCC'>\n" |
236 | 240 | " <h4>Release overview</h4>\n" |
237 | " August ??, 2011\n" | |
241 | " September 06, 2011\n" | |
238 | 242 | "<tr>\n" |
239 | 243 | " <td bgcolor='#FFFFFF'>\n" |
240 | 244 | " <table border='0' cellspacing='0' cellpadding='5'>\n" |
280 | 284 | "<li>Default binding for close-all changed from Alt-q to Ctrl-q.\n" |
281 | 285 | "<li>Default binding for close-tab changed from Ctrl-q to Ctrl-w.\n" |
282 | 286 | "<li>Default binding for left-tab changed to Shift-Ctrl-Tab.\n" |
287 | "<li>Rewrote the User Interface: much simpler design and event handling.\n" | |
288 | "<li>Added on-the-fly panel resize (tiny/small/medium and normal/small icons).\n" | |
283 | 289 | "<li>'hide-panels' key action now hides the findbar if present,\n" |
284 | 290 | " and toggles display of the control panels otherwise.\n" |
285 | 291 | "<li>Allow multiple search engines to be set in dillorc, with a menu\n" |
286 | 292 | " in the web search dialog to select between them.\n" |
287 | 293 | "<li>Added an optional label to dillorc's search_url.\n" |
288 | 294 | " Format: \"[<label> ]<url>\"\n" |
289 | "<li>Removed 'large' option of panel_size preference.\n" | |
290 | 295 | "<li>Add right_click_closes_tab preference (default is middle click).\n" |
291 | 296 | "<li>Allow binding to non-ASCII keys and multimedia keys.\n" |
292 | "<li>Removed --enable-ansi configure option.\n" | |
293 | 297 | "<li>Avoid a certificate dialog storm on some HTTPS sites (BUG#868).\n" |
294 | 298 | "<li>Enable line wrapping for <textarea>. (BUG#903)\n" |
295 | "<li>Rewrote the User Interface: much simpler design and event handling.\n" | |
296 | 299 | "<li>Avoid double render after going Back or Forward\n" |
297 | 300 | " (it takes half the time now!)\n" |
298 | "<li>Added on-the-fly panel resize (tiny/small/medium and normal/small icons).\n" | |
299 | 301 | "<li>Implemented a custom tabs handler (to allow fine control of it).\n" |
300 | 302 | "<li>Rewrote dw's crossing-events dispatcher (avoids redundant events).\n" |
301 | 303 | "<li>Fixed a years old bug: stamped tooltips when scrolling with keyboard.\n" |
303 | 305 | " (BUG#948)\n" |
304 | 306 | "<li>Cancel the expected URL after offering a download (BUG#982)\n" |
305 | 307 | "<li>Eliminated a pack of 22 compiler warnings (gcc-4.6.1 amd64)\n" |
308 | "<li>Removed 'large' option of panel_size preference.\n" | |
309 | "<li>Removed --enable-ansi configure option.\n" | |
306 | 310 | "<li>Limit saved cookie size.\n" |
307 | 311 | "<li>Wrap image alt text.\n" |
308 | 312 | "<li>Added support for CSS adjacent sibling selectors.\n" |
313 | "<li>Fix redraw loops and reenabled limit_text_width dillorc option.\n" | |
309 | 314 | "<li>Collapse parent's and first child's top margin.\n" |
310 | 315 | "</ul>\n" |
311 | 316 | " </table>\n" |
1175 | 1175 | } |
1176 | 1176 | } |
1177 | 1177 | if (AbortEntry) { |
1178 | if (ClientWeb->flags & WEB_RootUrl) | |
1179 | a_Nav_cancel_expect_if_eq(Client_bw, Client->Url); | |
1178 | 1180 | a_Bw_remove_client(Client_bw, Client->Key); |
1179 | 1181 | Cache_client_dequeue(Client, NULLKey); |
1180 | 1182 | --i; /* Keep the index value in the next iteration */ |
766 | 766 | a_Chain_bcb(OpAbort, Info, NULL, NULL); |
767 | 767 | /* remove the cache entry for this URL */ |
768 | 768 | a_Cache_entry_remove_by_url(conn->url); |
769 | a_Nav_cancel_expect_if_eq(conn->bw, conn->url); | |
770 | 769 | Capi_conn_unref(conn); |
771 | 770 | dFree(Info); |
772 | 771 | break; |
160 | 160 | |
161 | 161 | if (comb == ADJACENT_SIBLING) |
162 | 162 | node = docTree->sibling (node); |
163 | else | |
163 | else | |
164 | 164 | node = docTree->parent (node); |
165 | 165 | } |
166 | 166 |
364 | 364 | // Sets WM_CLASS hint on X11 |
365 | 365 | Fl_Window::default_xclass("dillo"); |
366 | 366 | |
367 | if (!prefs.show_tooltip) { | |
368 | // turn off UI tooltips | |
369 | Fl::option(Fl::OPTION_SHOW_TOOLTIPS, false); | |
370 | } | |
371 | ||
367 | 372 | // Disable '@' and '&' interpretation in normal labels. |
368 | 373 | Fl::set_labeltype(FL_NORMAL_LABEL, custLabelDraw, custLabelMeasure); |
369 | 374 |
57 | 57 | num = 0; |
58 | 58 | }; |
59 | 59 | |
60 | ~Doctree () { | |
60 | ~Doctree () { | |
61 | 61 | delete rootNode; |
62 | 62 | }; |
63 | 63 | |
84 | 84 | }; |
85 | 85 | |
86 | 86 | inline DoctreeNode *parent (const DoctreeNode *node) { |
87 | if (node->parent != rootNode) | |
87 | if (node->parent != rootNode) | |
88 | 88 | return node->parent; |
89 | 89 | else |
90 | 90 | return NULL; |
124 | 124 | hide_btn->callback(hide_cb, this); |
125 | 125 | hide_btn->clear_visible_focus(); |
126 | 126 | hide_btn->box(FL_THIN_UP_BOX); |
127 | hide_btn->tooltip("Hide"); | |
127 | 128 | add(hide_btn); |
128 | 129 | |
129 | 130 | i = new MyInput(x, border, input_width, height); |
139 | 140 | next_btn->callback(search_cb, this); |
140 | 141 | next_btn->clear_visible_focus(); |
141 | 142 | next_btn->box(FL_THIN_UP_BOX); |
143 | next_btn->tooltip("Find next occurrence of the search phrase\n" | |
144 | "shortcut: Enter"); | |
142 | 145 | add(next_btn); |
143 | 146 | |
144 | 147 | prev_btn= new Fl_Button(x, border, button_width, height, "Previous"); |
147 | 150 | prev_btn->callback(searchBackwards_cb, this); |
148 | 151 | prev_btn->clear_visible_focus(); |
149 | 152 | prev_btn->box(FL_THIN_UP_BOX); |
153 | prev_btn->tooltip("Find previous occurrence of the search phrase\n" | |
154 | "shortcut: Shift+Enter"); | |
150 | 155 | add(prev_btn); |
151 | 156 | |
152 | 157 | check_btn = new Fl_Check_Button(x, border, 2*button_width, height, |
155 | 160 | check_btn->clear_visible_focus(); |
156 | 161 | add(check_btn); |
157 | 162 | |
158 | if (prefs.show_tooltip) { | |
159 | hide_btn->tooltip("Hide"); | |
160 | next_btn->tooltip("Find next occurrence of the search phrase\n" | |
161 | "shortcut: Enter"); | |
162 | prev_btn->tooltip("Find previous occurrence of the search phrase\n" | |
163 | "shortcut: Shift+Enter"); | |
164 | } | |
165 | 163 | } |
166 | 164 | |
167 | 165 | Findbar::~Findbar() |
850 | 850 | Embed *embed; |
851 | 851 | char *name, *value; |
852 | 852 | |
853 | page = new Textblock (prefs.limit_text_width); | |
853 | /* We used to have Textblock (prefs.limit_text_width) here, | |
854 | * but it caused 100% CPU usage. | |
855 | */ | |
856 | page = new Textblock (false); | |
854 | 857 | page->setStyle (html->styleEngine->backgroundStyle ()); |
855 | 858 | |
856 | 859 | ResourceFactory *factory = HT2LT(html)->getResourceFactory(); |
217 | 217 | // restore the old numeric locale |
218 | 218 | setlocale(LC_NUMERIC, oldLocale); |
219 | 219 | dFree(oldLocale); |
220 | ||
221 | ||
222 | if (prefs.limit_text_width) { | |
223 | /* BUG: causes 100% CPU usage with <button> or <input type="image"> */ | |
224 | MSG_WARN("Disabling limit_text_width preference (currently broken).\n"); | |
225 | prefs.limit_text_width = FALSE; | |
226 | } | |
227 | 220 | } |
142 | 142 | if (styleAttr && prefs.parse_embedded_css) { |
143 | 143 | n->styleAttrProperties = new CssPropertyList (true); |
144 | 144 | n->styleAttrPropertiesImportant = new CssPropertyList (true); |
145 | ||
145 | ||
146 | 146 | CssParser::parseDeclarationBlock (styleAttr, strlen (styleAttr), |
147 | 147 | n->styleAttrProperties, |
148 | 148 | n->styleAttrPropertiesImportant); |
407 | 407 | Bookmarks = make_button("Book", icons->ImgBook, NULL, UI_BOOK); |
408 | 408 | Tools = make_button("Tools", icons->ImgTools, NULL, UI_TOOLS); |
409 | 409 | |
410 | if (prefs.show_tooltip) { | |
411 | Back->tooltip("Previous page"); | |
412 | Forw->tooltip("Next page"); | |
413 | Home->tooltip("Go to the Home page"); | |
414 | Reload->tooltip("Reload"); | |
415 | Save->tooltip("Save this page"); | |
416 | Stop->tooltip("Stop loading"); | |
417 | Bookmarks->tooltip("View bookmarks"); | |
418 | Tools->tooltip("Settings"); | |
419 | } | |
410 | Back->tooltip("Previous page"); | |
411 | Forw->tooltip("Next page"); | |
412 | Home->tooltip("Go to the Home page"); | |
413 | Reload->tooltip("Reload"); | |
414 | Save->tooltip("Save this page"); | |
415 | Stop->tooltip("Stop loading"); | |
416 | Bookmarks->tooltip("View bookmarks"); | |
417 | Tools->tooltip("Settings"); | |
420 | 418 | } |
421 | 419 | |
422 | 420 | /* |
431 | 429 | b->callback(clear_cb, this); |
432 | 430 | b->clear_visible_focus(); |
433 | 431 | b->box(FL_THIN_UP_BOX); |
432 | b->tooltip("Clear the URL box.\nMiddle-click to paste a URL."); | |
434 | 433 | p_xpos += b->w(); |
435 | 434 | |
436 | 435 | Fl_Input *i = Location = new CustInput(p_xpos,0,ww-p_xpos-32,lh,0); |
437 | 436 | i->color(CuteColor); |
438 | 437 | i->when(FL_WHEN_ENTER_KEY); |
439 | 438 | i->callback(location_cb, this); |
439 | i->tooltip("Location"); | |
440 | 440 | p_xpos += i->w(); |
441 | 441 | |
442 | 442 | Search = b = new CustLightButton(p_xpos,0,16,lh,0); |
444 | 444 | b->callback(search_cb, this); |
445 | 445 | b->clear_visible_focus(); |
446 | 446 | b->box(FL_THIN_UP_BOX); |
447 | b->tooltip("Search the Web"); | |
447 | 448 | p_xpos += b->w(); |
448 | 449 | |
449 | 450 | Help = b = new CustLightButton(p_xpos,0,16,lh,0); |
451 | 452 | b->callback(help_cb, this); |
452 | 453 | b->clear_visible_focus(); |
453 | 454 | b->box(FL_THIN_UP_BOX); |
455 | b->tooltip("Help"); | |
454 | 456 | p_xpos += b->w(); |
455 | 457 | |
456 | if (prefs.show_tooltip) { | |
457 | Clear->tooltip("Clear the URL box.\nMiddle-click to paste a URL."); | |
458 | Location->tooltip("Location"); | |
459 | Search->tooltip("Search the Web"); | |
460 | Help->tooltip("Help"); | |
461 | } | |
462 | 458 | } |
463 | 459 | |
464 | 460 | /* |
502 | 498 | _MSG("UI::make_filemenu_button w=%d h=%d padding=%d\n", w, h, padding); |
503 | 499 | btn->box(FL_THIN_UP_BOX); |
504 | 500 | btn->callback(filemenu_cb, this); |
505 | if (prefs.show_tooltip) | |
506 | btn->tooltip("File menu"); | |
501 | btn->tooltip("File menu"); | |
507 | 502 | btn->clear_visible_focus(); |
508 | 503 | if (!prefs.show_filemenu) |
509 | 504 | btn->hide(); |
613 | 608 | BugMeter->image(icons->ImgMeterOK); |
614 | 609 | BugMeter->box(FL_THIN_DOWN_BOX); |
615 | 610 | BugMeter->align(FL_ALIGN_INSIDE | FL_ALIGN_TEXT_NEXT_TO_IMAGE); |
616 | if (prefs.show_tooltip) | |
617 | BugMeter->tooltip("Show HTML bugs\n(right-click for menu)"); | |
611 | BugMeter->tooltip("Show HTML bugs\n(right-click for menu)"); | |
618 | 612 | BugMeter->callback(bugmeter_cb, this); |
619 | 613 | BugMeter->clear_visible_focus(); |
620 | 614 |