summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dillorc1
-rw-r--r--doc/Makefile.am1
-rw-r--r--doc/user_help.html298
-rw-r--r--src/Makefile.am2
-rw-r--r--src/pixmaps.h36
-rw-r--r--src/prefs.c1
-rw-r--r--src/prefs.h1
-rw-r--r--src/prefsparser.cc1
-rw-r--r--src/ui.cc32
-rw-r--r--src/ui.hh2
10 files changed, 372 insertions, 3 deletions
diff --git a/dillorc b/dillorc
index 33a4a40d..eba282bc 100644
--- a/dillorc
+++ b/dillorc
@@ -179,6 +179,7 @@
#show_clear_url=YES
#show_url=YES
#show_search=YES
+#show_help=YES
#show_progress_box=YES
# Start dillo with the panels hidden?
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 3aa81b84..d644393b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,3 +1,4 @@
+dist_doc_DATA = user_help.html
man_MANS = dillo.1
EXTRA_DIST = \
$(man_MANS) \
diff --git a/doc/user_help.html b/doc/user_help.html
new file mode 100644
index 00000000..06d2129f
--- /dev/null
+++ b/doc/user_help.html
@@ -0,0 +1,298 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title> Help for Dillo </title>
+</head>
+
+<body bgcolor='#778899' text='#000000'>
+
+ <table bgcolor="#70a0c0" border="1" cellpadding="5">
+ <tr><td><h1>Help for Dillo 2.1.1</h1>
+ </table>
+ <p>
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=5>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Basics:</font></h4>
+ </td></tr>
+
+ <tr><td WIDTH="100%" bgcolor="#70a0c0">
+ <ul>
+ <li>You can tell a link from plain content by the hand-shaped cursor.
+ <li> Besides browsing the web, Dillo also has basic file browsing
+ capabilities included. So, entering <a href="file:">file:</a> in your
+ Dillo URL window will give you the contents of your current
+ working directory, and <a href="file:~">file:~</a> entered in the
+ same place will point your Dillo browser right to your home
+ directory...
+ <li> Dillo, at this stage of development, is <u>not</u> not ready
+ to render pages that use <b><font color="#5040a0">frames</font></b>.
+ Nevertheless, it comes with a tiny handler (lynx/w3m-like) that will
+ let you choose which frame to visit, one by one.
+ <li> Dillo has <b><font color="#5040a0">context
+ sensitive menus</font></b> using the right mouse button
+ (available on pages, links, images, forms, the Back
+ and Forward buttons, and the bug meter).
+ <li> Some of the functions in Dillo are handled by independent
+ processes. For instance, downloads come through <em>wget</em>.
+ If Dillo exits, the download can continue (more details
+ below).
+ </ul>
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Usage:</font></h4>
+ </td></tr>
+
+ <tr><td BGCOLOR="#70a0c0">
+ <ul>
+ <li> You can scroll around your Dillo main window using
+ CTRL+{PgUp|PgDwn|Home|End} or using the mouse middle button
+ or mouse wheel. If nothing happens when keys are pressed, try
+ <b> <font color="#5040a0">focusing</font></b> your Dillo main
+ window first by clicking it (not on any link!:)).
+ <li> You can use the space key as PgDn, and {'b' | 'B'} as PgUp.</li>
+ <li> Similarly, you can use "<b>,</b>" and "<b>.</b>" as shortcuts for
+ forward and backward buttons (mnemonic: those
+ keys are usually labeled "<" and ">").
+ <li> <b>Configuration:</b> If you want to change Dillo's
+ appearance or behaviour, look at the options in your
+ <b><font color="#5040a0">dillorc</font></b>
+ file (if you don't have a copy in your ~/.dillo/ directory, get it
+ <a href='http://www.dillo.org/dillorc'>here</a>).
+ <li> Clicking the "Reload" button always requests an end-to-end reload
+ of the page currently viewed, but it will *not* reload embedded
+ images during this process.
+ <li> Dialogs can be closed with the ESC key.
+ <li> If you want to try a different control panel, right-click over the
+ search button until you find one that suits your needs, then make
+ it the default in your <code>dillorc</code> file.
+ <li> The whole window area can be used to display the page. Just hit
+ Ctrl-Space!
+ </ul>
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Downloads:</font></h4>
+ </td></tr>
+
+ <tr><td BGCOLOR="#70a0c0">
+ <p>
+ Downloads are made using <b><font color="#5040a0">wget</font></b>
+ with a FLTK2-based GUI wrapper, through the Dillo plugin (dpi) framework.
+ If you close the browser window, downloads will continue.
+ <p>
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Find text:</font></h4>
+ </td></tr>
+
+ <tr><td bgcolor="#70a0c0">
+ <p>
+ This one is very useful;
+ it can be found in the right-mouse-button menu<br>
+ Find text is tuned for speed so don't hesitate to use it even for minimal
+ searches.
+ <p>
+ <u>Semantics:</u>
+ <ul>
+ <li> You can search for substrings, words and sentences. </li>
+ <li> To find a substring or word, just enter its text. </li>
+ <li> To find a left-aligned substring, prepend it with a space. </li>
+ <li> To find a right-aligned substring, append a space to it.</li>
+ <li> To find full words only, prepend and append spaces to them. </li>
+ <li> To find a sentence, enter the words and remember that the above rules
+ apply for every word in it. </li>
+ </ul>
+ <p>
+ Dillo will scroll the page and highlight found text!
+ <p>
+ <small>Default shortcut: [CTRL]+"F".</small>
+
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Copy&amp;Paste:</font></h4>
+ </td></tr>
+
+ <tr><td bgcolor="#70a0c0">
+ <p>
+ Just hold down the left mouse button and move to select the
+ area to copy. To paste, go to the target application and
+ press the middle mouse button.
+ <p>
+ If you want to select more than one screen, hold the mouse button
+ down and scroll with PgUp, PgDn or the arrow keys.
+ <P>
+ If you want to paste an URL into Dillo, do it on the "clear-URL"
+ button (the "X" next to the location bar).
+ <p>
+ Note: If it doesn't work, please try again. There's a bug lurking there.
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Navigation history:</font></h4>
+ </td></tr>
+
+ <tr><td bgcolor="#70a0c0">
+ <p>
+ Currently, navigation history supports the navigation-stack model; just
+ right-click on the Back or Forward buttons and they will pop up!
+ <p> <u>Remember:</u>
+ <ul>
+ <li> These history menus are relative to the current page. </li>
+ <li> They show the page-title but the status bar shows the URL. </li>
+ <li> Left-click jumps to the selected item. </li>
+ <li> Middle-click opens the item in a new browser tab/window. </li>
+ </ul>
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Cookies:</font></h4>
+ </td></tr>
+
+ <tr><td bgcolor="#70a0c0">
+ <p>
+ Due to privacy concerns, cookies are disabled by default.
+ That is, if you just compile and use dillo, it will reject
+ every single cookie sent to it!
+ <p>
+ If you want to enable cookies in dillo, just
+ <a href="http://www.dillo.org/Cookies.txt">set up a <code>cookiesrc</code>
+ file</a>.
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Tabs:</font></h4>
+ </td></tr>
+
+ <tr><td bgcolor="#70a0c0">
+ <p>
+ Dillo has tabbed browsing. Just middle click to open a link or submit a
+ form in a new tab. It will be automatically focused. If you want to
+ customize this behaviour, adjust these dillorc options:
+ <ul>
+ <li><code>middle_click_opens_new_tab</code>
+ <li><code>focus_new_tab</code>
+ </ul>
+ Press SHIFT to temporarily reverse the focusing behaviour.
+ <p>
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Images-off mode:</font></h4>
+ </td></tr>
+ <tr><td bgcolor="#70a0c0">
+ <p>
+ You can browse without images now:
+ <ul>
+ <li>There is an option in the Tools menu to disable automatic image loading.
+ An image's alt text (or <code>[IMG]</code> placeholder) will appear in the
+ page.
+ <li>If you want to load an individual image, left click on its text.
+ <li>You can set "no images" as the default mode in dillorc.
+ </ul>
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Bookmarks:</font></h4>
+ </td></tr>
+
+ <tr><td bgcolor="#70a0c0">
+ <p>
+ Bookmarks are handled by the Dillo plugin
+ (<a href='http://www.dillo.org/dpi1.html'>dpi</a>) framework.
+ This should be transparent to the end user. Please note that:
+ <ul>
+ <li>It is a good idea to keep a backup of your
+ <code>~/.dillo/bm.txt</code>
+ <li>The server will stay alive after closing dillo.
+ <li>You can stop the server by sending it a KILL signal. Dillo
+ will automatically restart it when it is needed.
+ <li>If you don't have root access, install <em>dpid</em> and
+ the <em>dpis</em>
+ inside your <code>~/.dillo/</code> directory as explained
+ in the README file.
+ </ul>
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Bug Meter:</font></h4>
+ </td></tr>
+ <tr><td bgcolor="#70a0c0">
+ <p>
+ Dillo's <a href='http://www.dillo.org/help/bug_meter.html'>bug meter</a>
+ shows the number of
+ <b><font color="#5040a0">detected bugs</font></b> inside the
+ page. The bugs are caught at parsing time, so the
+ error messages also show the line where they occur and provide a
+ <b><font color="#5040a0">hint</font></b> of what was expected instead!
+ <p>
+ The primary purpose of the bug meter is to
+ <b><font color="#5040a0">help</font></b> webmasters and page
+ authors to polish the contents of their sites with a view to making
+ them standards-compliant.
+ <p>
+ The bug meter is located at the lower right corner of
+ Dillo. Left-click to see the messages, right-click for a menu.
+ </td></tr>
+ </table>
+
+ <table WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
+ <tr ALIGN=LEFT VALIGN=TOP><td bgcolor="wheat">
+ <h4><font color="green">Keyboard shortcuts:</font></h4>
+ </td></tr>
+ <tr><td bgcolor="#70a0c0">
+<table border=1 width="100%">
+<tr><th>Shortcut <th>Mnemonic <th>Function
+<tr><td>Ctrl-L <td>Location <td>enter a new URL
+<tr><td>Ctrl-F <td>Find <td>find text
+<tr><td>Ctrl-S <td>Search <td>search the web
+<tr><td>Ctrl-R <td>Reload <td>reload current page
+<tr><td>Ctrl-N <td>New <td>New browser window
+<tr><td>Ctrl-T <td>Tab <td>New tab
+<tr><td>Ctrl-Q <td>Quit <td>quit tab/window
+<tr><td>Ctrl-O <td>Open <td>Open file
+<tr><td>Ctrl-B <td>Bookmarks <td>view bookmarks
+<tr><td>Ctrl-Space <td>"more space!" <td>Hide/show controls
+<tr><td>Back or "<b>,</b>" <td>< <td>previous page
+<tr><td>Shift-Back or "<b>.</b>" <td>> <td>next page
+<tr><td>Esc <td>escape <td>close dialog
+<tr><td>Alt-F <td>File <td>file menu
+<tr><td>Alt-X <td>eXit <td>exit Dillo
+<tr><td>Shift-Right <td>Right <td>Next tab
+<tr><td>Shift-Left <td>Left <td>Previous tab
+<tr><td>Ctrl-TabKey <td>TabKey <td>Next tab
+<tr><td>Shift-Ctrl- TabKey <td>TabKey <td>Previous tab
+</table>
+<p>
+You can change the bindings using a
+<code>~/.dillo/<a href="http://www.dillo.org/keysrc">keysrc</a></code>
+file.
+ </td></tr>
+ </table>
+
+</body>
+</html>
diff --git a/src/Makefile.am b/src/Makefile.am
index 0994c9fc..95da3d05 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS=-DDILLO_SYSCONF='"$(sysconfdir)/"' @LIBJPEG_CPPFLAGS@
+AM_CPPFLAGS=-DDILLO_SYSCONF='"$(sysconfdir)/"' -DDILLO_DOCDIR='"$(docdir)/"' @LIBJPEG_CPPFLAGS@
AM_CFLAGS = @LIBPNG_CFLAGS@
AM_CXXFLAGS = -I.. @LIBPNG_CFLAGS@ @LIBFLTK_CXXFLAGS@
diff --git a/src/pixmaps.h b/src/pixmaps.h
index 060ec2cb..83235dd2 100644
--- a/src/pixmaps.h
+++ b/src/pixmaps.h
@@ -1521,6 +1521,42 @@ static const char *const search_xpm[] = {
" 11 "};
/* XPM */
+static const char *const help_xpm[] = {
+"14 16 16 1",
+" c None",
+"1 c #DBDBDB",
+"2 c #B6B6B6",
+"3 c #929292",
+"4 c #6D6D6D",
+"5 c #F1EFEF",
+"6 c #018B00",
+"7 c #A48A53",
+"8 c #A4BDA4",
+"9 c #000000",
+"A c #000000",
+"B c #000000",
+"C c #000000",
+"D c #000000",
+"E c #000000",
+"F c #000000",
+" 5555555 ",
+" 544433355 ",
+" 54555438455 ",
+" 44555542835 ",
+" 44445548245 ",
+" 4444554274 ",
+" 544554274 ",
+" 55474 ",
+" 5474 ",
+" 544 ",
+" 44 ",
+" ",
+" 5445 ",
+" 4764 ",
+" 4674 ",
+" 5445 "};
+
+/* XPM */
static const char *const full_screen_on_xpm[] = {
"13 15 2 1",
" c None",
diff --git a/src/prefs.c b/src/prefs.c
index e65d8e1a..6d073251 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -76,6 +76,7 @@ void a_Prefs_init(void)
prefs.show_extra_warnings = FALSE;
prefs.show_filemenu=TRUE;
prefs.show_forw = TRUE;
+ prefs.show_help = TRUE;
prefs.show_home = TRUE;
prefs.show_msg = TRUE;
prefs.show_progress_box = TRUE;
diff --git a/src/prefs.h b/src/prefs.h
index f3e0a977..f5eef724 100644
--- a/src/prefs.h
+++ b/src/prefs.h
@@ -63,6 +63,7 @@ struct _DilloPrefs {
bool_t show_clear_url;
bool_t show_url;
bool_t show_search;
+ bool_t show_help;
bool_t show_progress_box;
bool_t fullwindow_start;
bool_t load_images;
diff --git a/src/prefsparser.cc b/src/prefsparser.cc
index e77aecf6..3b4dc6e1 100644
--- a/src/prefsparser.cc
+++ b/src/prefsparser.cc
@@ -84,6 +84,7 @@ int PrefsParser::parseOption(char *name, char *value)
{ "show_extra_warnings", &prefs.show_extra_warnings, PREFS_BOOL },
{ "show_filemenu", &prefs.show_filemenu, PREFS_BOOL },
{ "show_forw", &prefs.show_forw, PREFS_BOOL },
+ { "show_help", &prefs.show_help, PREFS_BOOL },
{ "show_home", &prefs.show_home, PREFS_BOOL },
{ "show_msg", &prefs.show_msg, PREFS_BOOL },
{ "show_progress_box", &prefs.show_progress_box, PREFS_BOOL },
diff --git a/src/ui.cc b/src/ui.cc
index cc99b5ac..1561d5ac 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -11,6 +11,7 @@
// UI for Dillo
+#include <unistd.h>
#include <stdio.h>
#include <fltk/HighlightButton.h>
@@ -40,7 +41,7 @@ using namespace fltk;
struct iconset {
Image *ImgMeterOK, *ImgMeterBug,
*ImgHome, *ImgReload, *ImgSave, *ImgBook, *ImgTools,
- *ImgClear,*ImgSearch;
+ *ImgClear,*ImgSearch, *ImgHelp;
MultiImage *ImgLeftMulti, *ImgRightMulti, *ImgStopMulti;
};
@@ -54,6 +55,7 @@ static struct iconset standard_icons = {
new xpmImage(tools_xpm),
new xpmImage(new_s_xpm),
new xpmImage(search_xpm),
+ new xpmImage(help_xpm),
new MultiImage(*new xpmImage(left_xpm), INACTIVE_R,
*new xpmImage(left_i_xpm)),
new MultiImage(*new xpmImage(right_xpm), INACTIVE_R,
@@ -72,6 +74,7 @@ static struct iconset small_icons = {
new xpmImage(tools_s_xpm),
new xpmImage(new_s_xpm),
standard_icons.ImgSearch,
+ standard_icons.ImgHelp,
new MultiImage(*new xpmImage(left_s_xpm), INACTIVE_R,
*new xpmImage(left_si_xpm)),
new MultiImage(*new xpmImage(right_s_xpm), INACTIVE_R,
@@ -216,6 +219,25 @@ static void search_cb(Widget *wid, void *data)
}
/*
+ * Callback for the help button.
+ */
+static void help_cb(Widget *w, void *)
+{
+ char *path = dStrconcat(DILLO_DOCDIR, "user_help.html", NULL);
+ BrowserWindow *bw = a_UIcmd_get_bw_by_widget(w);
+
+ if (access(path, R_OK) == 0) {
+ char *urlstr = dStrconcat("file:", path, NULL);
+ a_UIcmd_open_urlstr(bw, urlstr);
+ dFree(urlstr);
+ } else {
+ MSG("Can't read local help file at \"%s\". Getting remote help...\n", path);
+ a_UIcmd_open_urlstr(bw, "http://www.dillo.org/dillo2-help.html");
+ }
+ dFree(path);
+}
+
+/*
* Callback for the File menu button.
*/
static void filemenu_cb(Widget *wid, void *)
@@ -455,6 +477,11 @@ PackedGroup *UI::make_location()
b->callback(search_cb, this);
b->clear_tab_to_focus();
+ Help = b = new HighlightButton(0,0,16,22,0);
+ b->image(icons->ImgHelp);
+ b->callback(help_cb, this);
+ b->clear_tab_to_focus();
+
pg->type(PackedGroup::ALL_CHILDREN_VERTICAL);
pg->resizable(i);
pg->end();
@@ -463,6 +490,7 @@ PackedGroup *UI::make_location()
Clear->tooltip("Clear the URL box.\nMiddle-click to paste a URL.");
Location->tooltip("Location");
Search->tooltip("Search the Web");
+ Help->tooltip("Help");
}
return pg;
}
@@ -986,6 +1014,8 @@ void UI::customize(int flags)
Location->hide();
if ( !prefs.show_search )
Search->hide();
+ if ( !prefs.show_help )
+ Help->hide();
if ( !prefs.show_progress_box )
ProgBox->hide();
}
diff --git a/src/ui.hh b/src/ui.hh
index 92297643..9e1b6d4f 100644
--- a/src/ui.hh
+++ b/src/ui.hh
@@ -48,7 +48,7 @@ class UI : public fltk::Group {
fltk::Group *TopGroup;
fltk::Button *Back, *Forw, *Home, *Reload, *Save, *Stop, *Bookmarks, *Tools,
- *Clear, *Search, *FullScreen, *BugMeter, *FileButton;
+ *Clear, *Search, *Help, *FullScreen, *BugMeter, *FileButton;
fltk::Input *Location;
fltk::PackedGroup *ProgBox;
CustProgressBox *PProg, *IProg;