#ifdef HHC_DIR
#include <windows.h>
#include <htmlhelp.h>
-#include "epan/unicode-utils.h"
+#include <wsutil/unicode-utils.h>
#endif
-#define HELP_DIR "help"
+#define HELP_DIR "help"
#define NOTEBOOK_KEY "notebook_key"
* (for text format changes).
*/
typedef struct {
- char *topic;
- char *pathname;
- GtkWidget *page;
+ char *topic;
+ char *pathname;
+ GtkWidget *page;
} help_page_t;
static GSList *help_text_pages = NULL;
-
-gboolean topic_available(topic_action_e action) {
-
- if(action == HELP_CAPTURE_INTERFACES_DETAILS_DIALOG) {
- /* XXX - add the page HELP_CAPTURE_INTERFACES_DETAILS_DIALOG and remove this if */
- /* page currently not existing in user's guide */
- return FALSE;
- }
- /* online: we have almost all possible pages available */
- return TRUE;
-}
-
-
/*
* Open the help dialog and show a specific HTML help page.
*/
void help_topic_html(const gchar *topic) {
GString *url;
-
/* try to open local .chm file */
#ifdef HHC_DIR
HWND hw;
url = g_string_new("");
- /* try to open the HTML page from wireshark.org instead */
- g_string_append_printf(url, "http://www.wireshark.org/docs/wsug_html_chunked/%s", topic);
+#ifdef DOC_DIR
+ if (g_file_test(DOC_DIR "/guides/wsug_html_chunked", G_FILE_TEST_IS_DIR)) {
+ /* try to open the HTML page from wireshark.org instead */
+ g_string_append_printf(url, "file://" DOC_DIR "/guides/wsug_html_chunked/%s", topic);
+ } else {
+#endif /* ifdef DOC_DIR */
+ /* try to open the HTML page from wireshark.org instead */
+ g_string_append_printf(url, "http://www.wireshark.org/docs/wsug_html_chunked/%s", topic);
+#ifdef DOC_DIR
+ }
+#endif /* ifdef DOC_DIR */
browser_open_url(url->str);
}
-
/**
* Redraw all help pages, to use a new font.
*/
void help_redraw(void)
{
- GSList *help_page_ent;
- help_page_t *help_page;
-
- if (help_w != NULL) {
- for (help_page_ent = help_text_pages; help_page_ent != NULL;
- help_page_ent = g_slist_next(help_page_ent))
- {
- help_page = (help_page_t *)help_page_ent->data;
- text_page_redraw(help_page->page, help_page->pathname);
+ GSList *help_page_ent;
+ help_page_t *help_page;
+
+ if (help_w != NULL) {
+ for (help_page_ent = help_text_pages; help_page_ent != NULL;
+ help_page_ent = g_slist_next(help_page_ent))
+ {
+ help_page = (help_page_t *)help_page_ent->data;
+ text_page_redraw(help_page->page, help_page->pathname);
+ }
}
- }
}
case(ONLINEPAGE_SECURITY):
return "http://wiki.wireshark.org/Security";
break;
+ case(ONLINEPAGE_CHIMNEY):
+ return "http://wiki.wireshark.org/CaptureSetup/Offloading#chimney";
+ break;
default:
return NULL;
}
case(HELP_CONFIG_PROFILES_DIALOG):
help_topic_html("ChCustConfigProfilesSection.html");
break;
+ case (HELP_MANUAL_ADDR_RESOLVE_DIALOG):
+ help_topic_html("ChManualAddressResolveSection.html");
+ break;
case(HELP_PRINT_DIALOG):
help_topic_html("ChIOPrintSection.html");
break;
help_topic_html("ChWorkFindPacketSection.html");
break;
case(HELP_FIREWALL_DIALOG):
- help_topic_html("ChUseAnalyzeMenuSection.html");
+ help_topic_html("ChUseToolsMenuSection.html");
break;
case(HELP_GOTO_DIALOG):
help_topic_html("ChWorkGoToPacketSection.html");
case(HELP_DECODE_AS_SHOW_DIALOG):
help_topic_html("ChCustProtocolDissectionSection.html");
break;
- case(HELP_FOLLOW_TCP_STREAM_DIALOG):
+ case(HELP_FOLLOW_STREAM_DIALOG):
help_topic_html("ChAdvFollowTCPSection.html");
break;
case(HELP_EXPERT_INFO_DIALOG):
case(HELP_STATS_IO_GRAPH_DIALOG):
help_topic_html("ChStatIOGraphs.html");
break;
+ case(HELP_STATS_COMPARE_FILES_DIALOG):
+ help_topic_html("ChStatCompareCaptureFiles.html");
+ break;
+ case(HELP_STATS_LTE_MAC_TRAFFIC_DIALOG):
+ help_topic_html("ChTelLTEMACTraffic.html");
+ break;
+ case(HELP_STATS_LTE_RLC_TRAFFIC_DIALOG):
+ help_topic_html("ChTelLTERLCTraffic.html");
+ break;
case(HELP_STATS_WLAN_TRAFFIC_DIALOG):
help_topic_html("ChStatWLANTraffic.html");
break;
case(HELP_FILESET_DIALOG):
help_topic_html("ChIOFileSetSection.html");
break;
+ case(HELP_CAPTURE_INTERFACE_OPTIONS_DIALOG):
+ help_topic_html("ChCustPreferencesSection.html#ChCustInterfaceOptionsSection");
+ break;
case(HELP_CAPTURE_INTERFACES_DETAILS_DIALOG):
help_topic_html("ChCapInterfaceDetailsSection.html");
break;
help_topic_html("ChIOExportSection.html#ChIOExportSelectedDialog");
break;
case(HELP_EXPORT_OBJECT_LIST):
- help_topic_html("ChIOExportSection.html#ChIOExportObjectsDialog");
- break;
+ help_topic_html("ChIOExportSection.html#ChIOExportObjectsDialog");
+ break;
case(HELP_OPEN_DIALOG):
case(HELP_OPEN_WIN32_DIALOG):
help_topic_html("ChIOOpenSection.html");
case(HELP_MERGE_WIN32_DIALOG):
help_topic_html("ChIOMergeSection.html");
break;
+ case(HELP_IMPORT_DIALOG):
+ help_topic_html("ChIOImportSection.html");
+ break;
case(HELP_SAVE_DIALOG):
case(HELP_SAVE_WIN32_DIALOG):
help_topic_html("ChIOSaveSection.html");
break;
+ case(HELP_TIME_SHIFT_DIALOG):
+ help_topic_html("ChWorkShiftTimePacketSection.html");
+ break;
default:
g_assert_not_reached();
topic_action(action);
}
-void
-topic_menu_cb(GtkWidget *w _U_, gpointer data _U_, topic_action_e action) {
- topic_action(action);
+
+gboolean
+topic_menu_cb(GtkWidget *w _U_, GdkEventButton *event _U_, gpointer user_data)
+{
+ topic_action((topic_action_e)GPOINTER_TO_INT(user_data));
+ return TRUE;
}