aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/help_dlg.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2004-09-16 22:07:03 +0000
committerUlf Lamping <ulf.lamping@web.de>2004-09-16 22:07:03 +0000
commit6cd11f14efd80ca4f977a6fb1e12fe8baaa20f37 (patch)
tree37a8333c93ba1215fdfcf24971d5dfe0b4e06cbd /gtk/help_dlg.c
parent6ad89dda90fc1e4f842c839642a7b029dd2603cf (diff)
first steps towards using the User's Guide as Ethereal's help system
svn path=/trunk/; revision=12021
Diffstat (limited to 'gtk/help_dlg.c')
-rw-r--r--gtk/help_dlg.c79
1 files changed, 79 insertions, 0 deletions
diff --git a/gtk/help_dlg.c b/gtk/help_dlg.c
index 20d1ee1b52..71be7b46fe 100644
--- a/gtk/help_dlg.c
+++ b/gtk/help_dlg.c
@@ -41,6 +41,7 @@
#include "compat_macros.h"
#include "dlg_utils.h"
#include "simple_dialog.h"
+#include "webbrowser.h"
#define HELP_DIR "help"
@@ -258,3 +259,81 @@ void help_redraw(void)
}
}
}
+
+
+void
+url_page_action(url_page_action_e action)
+{
+ /* pages online at www.ethereal.com */
+ switch(action) {
+ case(ONLINEPAGE_HOME):
+ browser_open_url ("http://www.ethereal.com");
+ break;
+ case(ONLINEPAGE_DOWNLOAD):
+ browser_open_url ("http://www.ethereal.com/download.html");
+ break;
+ case(ONLINEPAGE_USERGUIDE):
+ browser_open_url ("http://www.ethereal.com/docs/user-guide");
+ break;
+ case(ONLINEPAGE_FAQ):
+ browser_open_url ("http://www.ethereal.com/faq.html");
+ break;
+ case(ONLINEPAGE_SAMPLE_FILES):
+ browser_open_url ("http://www.ethereal.com/sample");
+ break;
+
+ /* local manual pages */
+ case(LOCALPAGE_MAN_ETHEREAL):
+ browser_open_data_file("ethereal.html");
+ break;
+ case(LOCALPAGE_MAN_ETHEREAL_FILTER):
+ browser_open_data_file("ethereal-filter.html");
+ break;
+ case(LOCALPAGE_MAN_TETHEREAL):
+ browser_open_data_file("tethereal.html");
+ break;
+ case(LOCALPAGE_MAN_MERGECAP):
+ browser_open_data_file("mergecap.html");
+ break;
+ case(LOCALPAGE_MAN_EDITCAP):
+ browser_open_data_file("editcap.html");
+ break;
+ case(LOCALPAGE_MAN_TEXT2PCAP):
+ browser_open_data_file("text2pcap.html");
+ break;
+
+#ifdef ETHEREAL_EUG_DIR
+ /* local help pages (User's Guide) */
+ case(HELP_CONTENT):
+ browser_open_data_file("eug_html_chunked/index.html");
+ break;
+ case(HELP_CAPTURE_OPTIONS_DIALOG):
+ browser_open_data_file("eug_html_chunked/ChCapCaptureOptions.html");
+ break;
+ case(HELP_CAPTURE_FILTERS_DIALOG):
+ browser_open_data_file("eug_html_chunked/ChWorkDefineFilterSection.html");
+ break;
+ case(HELP_DISPLAY_FILTERS_DIALOG):
+ browser_open_data_file("eug_html_chunked/ChWorkDefineFilterSection.html");
+ break;
+#endif
+
+ default:
+ g_assert_not_reached();
+ }
+}
+
+
+void
+url_page_cb(GtkWidget *w _U_, url_page_action_e action)
+{
+ url_page_action(action);
+}
+
+
+void
+url_page_menu_cb( GtkWidget *w _U_, gpointer data _U_, url_page_action_e action)
+{
+ url_page_action(action);
+}
+