aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2006-10-11 00:37:29 +0000
committerGerald Combs <gerald@wireshark.org>2006-10-11 00:37:29 +0000
commit1e480346d1fc8cbeb7fbdfa405ed46ae3bba1380 (patch)
treee796fe515e76a0cf0fce195428cc783466bcd0f1 /epan/prefs.c
parentb07b29f711a9c74e56791348b5ef55c09837868d (diff)
Add prefs_apply(), which lets us apply preferences (specifically,
trigger a module's callback) for a specific module. svn path=/trunk/; revision=19487
Diffstat (limited to 'epan/prefs.c')
-rw-r--r--epan/prefs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index ef612685e1..3f9831cae7 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -397,6 +397,19 @@ prefs_apply_all(void)
}
/*
+ * Call the "apply" callback function for a specific module if any of
+ * its preferences have changed, and then clear the flag saying its
+ * preferences have changed, as the module has been notified of that
+ * fact.
+ */
+void
+prefs_apply(module_t *module)
+{
+ if (module && module->prefs_changed)
+ call_apply_cb(module, NULL);
+}
+
+/*
* Register a preference in a module's list of preferences.
* If it has a title, give it an ordinal number; otherwise, it's a
* preference that won't show up in the UI, so it shouldn't get an