Add prefs_apply(), which lets us apply preferences (specifically,
trigger a module's callback) for a specific module. svn path=/trunk/; revision=19487
This commit is contained in:
parent
b07b29f711
commit
1e480346d1
13
epan/prefs.c
13
epan/prefs.c
|
@ -396,6 +396,19 @@ prefs_apply_all(void)
|
|||
g_list_foreach(modules, call_apply_cb, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
|
|
@ -235,6 +235,14 @@ extern guint prefs_modules_foreach(module_cb callback, gpointer user_data);
|
|||
*/
|
||||
extern void 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.
|
||||
*/
|
||||
extern void prefs_apply(module_t *module);
|
||||
|
||||
struct preference;
|
||||
|
||||
typedef struct preference pref_t;
|
||||
|
|
Loading…
Reference in New Issue