aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dfilter/dfilter-macro.c1
-rw-r--r--epan/dissectors/packet-k12.c1
-rw-r--r--epan/uat-int.h2
-rw-r--r--epan/uat.c2
-rw-r--r--epan/uat.h1
-rw-r--r--gtk/help_dlg.c2
-rw-r--r--gtk/help_dlg.h8
-rw-r--r--gtk/uat_gui.c17
8 files changed, 31 insertions, 3 deletions
diff --git a/epan/dfilter/dfilter-macro.c b/epan/dfilter/dfilter-macro.c
index 9e01cec70d..5ed2392929 100644
--- a/epan/dfilter/dfilter-macro.c
+++ b/epan/dfilter/dfilter-macro.c
@@ -473,6 +473,7 @@ void dfilter_macro_init(void) {
DFILTER_MACRO_FILENAME,
(void**) &macros,
&num_macros,
+ "ChDisplayFilterMacrosSection",
macro_copy,
macro_update,
macro_free,
diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c
index b1987f7536..398893a218 100644
--- a/epan/dissectors/packet-k12.c
+++ b/epan/dissectors/packet-k12.c
@@ -318,6 +318,7 @@ proto_register_k12(void)
"k12_protos",
(void**) &k12_handles,
&nk12_handles,
+ "ChK12ProtocolsSection",
k12_copy_cb,
k12_update_cb,
k12_free_cb,
diff --git a/epan/uat-int.h b/epan/uat-int.h
index 54de33b8b3..35c614971d 100644
--- a/epan/uat-int.h
+++ b/epan/uat-int.h
@@ -49,6 +49,7 @@ struct _uat_t {
char* name;
size_t record_size;
char* filename;
+ char* help;
void** user_ptr;
guint* nrows_p;
uat_copy_cb_t copy_cb;
@@ -59,7 +60,6 @@ struct _uat_t {
guint ncols;
GArray* user_data;
gboolean changed;
-
uat_rep_t* rep;
uat_rep_free_cb_t free_rep;
};
diff --git a/epan/uat.c b/epan/uat.c
index 133c466d97..de8966a329 100644
--- a/epan/uat.c
+++ b/epan/uat.c
@@ -56,6 +56,7 @@ uat_t* uat_new(const char* name,
char* filename,
void** data_ptr,
guint* numitems_ptr,
+ char* help,
uat_copy_cb_t copy_cb,
uat_update_cb_t update_cb,
uat_free_cb_t free_cb,
@@ -83,6 +84,7 @@ uat_t* uat_new(const char* name,
uat->changed = FALSE;
uat->rep = NULL;
uat->free_rep = NULL;
+ uat->help = help;
for (i=0;flds_array[i].name;i++) {
fld_data_t* f = g_malloc(sizeof(fld_data_t));
diff --git a/epan/uat.h b/epan/uat.h
index 8c37561938..1b025ea3f3 100644
--- a/epan/uat.h
+++ b/epan/uat.h
@@ -229,6 +229,7 @@ uat_t* uat_new(const char* name,
char* filename,
void** data_ptr,
guint* num_items,
+ char* help,
uat_copy_cb_t copy_cb,
uat_update_cb_t update_cb,
uat_free_cb_t free_cb,
diff --git a/gtk/help_dlg.c b/gtk/help_dlg.c
index 1de331e497..56507e817e 100644
--- a/gtk/help_dlg.c
+++ b/gtk/help_dlg.c
@@ -231,7 +231,7 @@ gboolean topic_available(topic_action_e action) {
/*
* Open the help dialog and show a specific HTML help page.
*/
-static void help_topic_html(const gchar *topic) {
+void help_topic_html(const gchar *topic) {
GString *url;
diff --git a/gtk/help_dlg.h b/gtk/help_dlg.h
index 3108a3f7c2..38e71865d6 100644
--- a/gtk/help_dlg.h
+++ b/gtk/help_dlg.h
@@ -112,4 +112,12 @@ gboolean topic_available(topic_action_e action);
/** Redraw all the help dialog text widgets, to use a new font. */
void help_redraw(void);
+
+/*
+ * Open the help dialog and show a specific HTML help page.
+ */
+#if (GLIB_MAJOR_VERSION >= 2)
+void help_topic_html(const gchar *topic);
+#endif
+
#endif
diff --git a/gtk/uat_gui.c b/gtk/uat_gui.c
index fb0a0478ad..7d200e5820 100644
--- a/gtk/uat_gui.c
+++ b/gtk/uat_gui.c
@@ -42,6 +42,7 @@
#include "gtkglobals.h"
#include "gui_utils.h"
#include "dlg_utils.h"
+#include "help_dlg.h"
#include "compat_macros.h"
#include <epan/uat-int.h>
@@ -586,6 +587,11 @@ static gboolean unsaved_dialog(GtkWindow *w _U_, GdkEvent* e _U_, gpointer u) {
return TRUE;
}
+#if (GLIB_MAJOR_VERSION >= 2)
+static void uat_help_cb(GtkWidget* w _U_, gpointer u) {
+ help_topic_html(ep_strdup_printf("%s.html",((uat_t*)u)->help));
+}
+#endif
GtkWidget* uat_window(void* u) {
uat_t* uat = u;
@@ -688,7 +694,16 @@ GtkWidget* uat_window(void* u) {
gtk_box_pack_end(GTK_BOX(c_hbox), rep->bt_delete, TRUE, TRUE, 0);
gtk_widget_show(rep->bt_delete);
-
+#if (GLIB_MAJOR_VERSION >= 2)
+ if(uat->help) {
+ GtkWidget* help_btn;
+ help_btn = BUTTON_NEW_FROM_STOCK(GTK_STOCK_HELP);
+ gtk_box_pack_start(GTK_BOX(r_hbox), help_btn, TRUE, TRUE, 0);
+ gtk_widget_show(help_btn);
+ SIGNAL_CONNECT(help_btn, "clicked", uat_help_cb, uat);
+ }
+#endif
+
rep->bt_save = BUTTON_NEW_FROM_STOCK(GTK_STOCK_SAVE);
gtk_box_pack_end(GTK_BOX(r_hbox), rep->bt_save, TRUE, TRUE, 0);
gtk_widget_show(rep->bt_save);