summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2017-03-03 20:55:13 +0100
committerMichael Mann <mmann78@netscape.net>2017-03-04 00:56:51 +0000
commit807fe8ed99b09c33c02c7574a830ce0b344d6e91 (patch)
tree6c734784549ba422a6e914626cba9066b0b48f89 /epan
parent4a703e01f47d1127756dab5f43b53cc49179cf9f (diff)
downloadwireshark-807fe8ed99b09c33c02c7574a830ce0b344d6e91.tar.gz
pluginIF: Allow en-/disable of elements
Allow the enable/disable of an element Change-Id: I9652e8d74b261ba259cebfba53e7bc7ef560d347 Reviewed-on: https://code.wireshark.org/review/20370 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/plugin_if.c5
-rw-r--r--epan/plugin_if.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/epan/plugin_if.c b/epan/plugin_if.c
index a24587698d..7006802a00 100644
--- a/epan/plugin_if.c
+++ b/epan/plugin_if.c
@@ -511,6 +511,11 @@ void ext_toolbar_update_data_remove_entry(ext_toolbar_t * entry, gpointer data,
ext_toolbar_update_entry( EXT_TOOLBAR_UPDATE_DATA_REMOVE, entry, data, idx, silent );
}
+void ext_toolbar_update_data_set_active(ext_toolbar_t * entry, gboolean status)
+{
+ ext_toolbar_update_entry(EXT_TOOLBAR_SET_ACTIVE, entry, GINT_TO_POINTER(status ? 1 : 0), 0, TRUE );
+}
+
/* Implementation of GUI callback methods follows.
* This is a necessity, as using modern UI systems, gui interfaces often operate
* in different threads then the calling application. Even more so, if the calling
diff --git a/epan/plugin_if.h b/epan/plugin_if.h
index 34e800a370..61258a92d8 100644
--- a/epan/plugin_if.h
+++ b/epan/plugin_if.h
@@ -140,7 +140,8 @@ typedef enum
EXT_TOOLBAR_UPDATE_DATA,
EXT_TOOLBAR_UPDATE_DATABYINDEX,
EXT_TOOLBAR_UPDATE_DATA_ADD,
- EXT_TOOLBAR_UPDATE_DATA_REMOVE
+ EXT_TOOLBAR_UPDATE_DATA_REMOVE,
+ EXT_TOOLBAR_SET_ACTIVE
} ext_toolbar_update_type_t;
typedef struct _ext_toolbar_update_t
@@ -356,6 +357,8 @@ WS_DLL_PUBLIC void ext_toolbar_update_data_remove_entry(ext_toolbar_t * entry, g
/* Search for and return if found an entry from the toolbar with the given label */
WS_DLL_PUBLIC ext_toolbar_t * ext_toolbar_entry_by_label(const ext_toolbar_t * toolbar, const gchar * label);
+/* Set the ui element for the given enry to the status */
+WS_DLL_PUBLIC void ext_toolbar_update_data_set_active(ext_toolbar_t * entry, gboolean status);
/*
* Structure definition for the plugin_if_get_ws_info function