aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs-int.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-01-05 02:30:58 +0000
committerGerald Combs <gerald@wireshark.org>2013-01-05 02:30:58 +0000
commit4a3342e4bac842152cbe73afbbb3593caf6c0e65 (patch)
treed627c5b6aaca63caad8d4ca718d89d1be43f198a /epan/prefs-int.h
parentbab105d094c6fd89ee542d36f6777681ae96f68b (diff)
Break out preference type names, type descriptions, string
representations, and default status out of write_prefs and into their own routines. Split the corresponding custom preference write callbacks. Fix an apparent memory leak in the hidden column callback. Add an initial preferences dialog to the Qt port. Use the new preference routines to implement an "Adavanced" page similar to the "about:config" page available in many web browsers. Standard pages will hopefully follow soon. Remove some QDebug includes and make sure our QTreeWidgets have uniform row heights set. svn path=/trunk/; revision=46942
Diffstat (limited to 'epan/prefs-int.h')
-rw-r--r--epan/prefs-int.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/epan/prefs-int.h b/epan/prefs-int.h
index ec91db175f..9994a4555d 100644
--- a/epan/prefs-int.h
+++ b/epan/prefs-int.h
@@ -68,14 +68,23 @@ WS_VAR_IMPORT module_t *protocols_module;
typedef void (*pref_custom_free_cb) (pref_t* pref);
typedef void (*pref_custom_reset_cb) (pref_t* pref);
typedef prefs_set_pref_e (*pref_custom_set_cb) (pref_t* pref, const gchar* value, gboolean* changed);
-typedef void (*pref_custom_write_cb) (pref_t* pref, write_pref_arg_t* arg);
+/* typedef void (*pref_custom_write_cb) (pref_t* pref, write_pref_arg_t* arg); Deprecated. */
+/* pref_custom_type_name_cb should return NULL for internal / hidden preferences. */
+typedef const char * (*pref_custom_type_name_cb) (void);
+typedef char * (*pref_custom_type_description_cb) (void);
+typedef gboolean (*pref_custom_is_default_cb) (pref_t* pref);
+typedef char * (*pref_custom_to_str_cb) (pref_t* pref, gboolean default_val);
/** Structure to hold callbacks for PREF_CUSTOM type */
struct pref_custom_cbs {
pref_custom_free_cb free_cb;
pref_custom_reset_cb reset_cb;
pref_custom_set_cb set_cb;
- pref_custom_write_cb write_cb;
+ /* pref_custom_write_cb write_cb; Deprecated. */
+ pref_custom_type_name_cb type_name_cb;
+ pref_custom_type_description_cb type_description_cb;
+ pref_custom_is_default_cb is_default_cb;
+ pref_custom_to_str_cb to_str_cb;
};
/**