#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;
void help_topic_html(const gchar *topic) {
GString *url;
-
/* try to open local .chm file */
#ifdef HHC_DIR
HWND hw;
url = g_string_new("");
- if (g_file_test(DOC_DIR "/wsug_html_chunked", G_FILE_TEST_IS_DIR)) {
+#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 "/wsug_html_chunked/%s", topic);
+ g_string_append_printf(url, "file://" DOC_DIR "/guides/wsug_html_chunked/%s", topic);
} else {
- /* try to open the HTML page from wireshark.org instead */
+#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);
+ }
}
- }
}
break;
case (HELP_MANUAL_ADDR_RESOLVE_DIALOG):
help_topic_html("ChManualAddressResolveSection.html");
- break;
+ break;
case(HELP_PRINT_DIALOG):
help_topic_html("ChIOPrintSection.html");
break;
help_topic_html("ChIOFileSetSection.html");
break;
case(HELP_CAPTURE_INTERFACE_OPTIONS_DIALOG):
- help_topic_html("ChCustInterfaceOptionsSection.html");
+ help_topic_html("ChCustPreferencesSection.html#ChCustInterfaceOptionsSection");
break;
case(HELP_CAPTURE_INTERFACES_DETAILS_DIALOG):
help_topic_html("ChCapInterfaceDetailsSection.html");
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);
}
+
gboolean
-topic_menu_cb(GtkWidget *w _U_, gpointer data _U_, topic_action_e action)
+topic_menu_cb(GtkWidget *w _U_, GdkEventButton *event _U_, gpointer user_data)
{
- topic_action(action);
+ topic_action((topic_action_e)GPOINTER_TO_INT(user_data));
return TRUE;
}