diff options
author | Michael Mann <mmann78@netscape.net> | 2012-08-08 16:54:02 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2012-08-08 16:54:02 +0000 |
commit | e0e533d643fbac41ddea4dc7495dc4fed221aff9 (patch) | |
tree | ffcde6212c6ab8975a3feeafb83ae54361835e3a /ui/gtk/prefs_dlg.c | |
parent | 68e2e8b8891385efe6126fa1b5a578e9fc693fe4 (diff) |
Have (almost) all preferences use the generic preferences API (per https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402). This cleaned up a lot of hardcoded code and allows breaking up the prefs structure (or at least prevent it from growing too large) if desired.
Bugfixed problems mentioned in
http://www.wireshark.org/lists/wireshark-dev/201208/msg00001.html
Column preferences now support default '#' character
svn path=/trunk/; revision=44348
Diffstat (limited to 'ui/gtk/prefs_dlg.c')
-rw-r--r-- | ui/gtk/prefs_dlg.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/ui/gtk/prefs_dlg.c b/ui/gtk/prefs_dlg.c index 5289bb3dfb..a4bb3d05ae 100644 --- a/ui/gtk/prefs_dlg.c +++ b/ui/gtk/prefs_dlg.c @@ -104,13 +104,6 @@ static GtkWidget *create_preference_filename_entry(GtkWidget *, int, */ static GtkWidget *prefs_w; -/* - * Save the value of the preferences as of when the preferences dialog - * box was first popped up, so we can revert to those values if the - * user selects "Cancel". - */ -static e_prefs saved_prefs; - struct ct_struct { GtkWidget *main_vb; GtkWidget *notebook; @@ -446,10 +439,6 @@ prefs_page_cb(GtkWidget *w _U_, gpointer dummy _U_, PREFS_PAGE_E prefs_page) return; } - /* Save the current preferences, so we can revert to those values - if the user presses "Cancel". */ - copy_prefs(&saved_prefs, &prefs); - prefs_w = dlg_conf_window_new("Wireshark: Preferences"); /* @@ -1404,7 +1393,6 @@ prefs_main_destroy_all(GtkWidget *dlg) /* Free up the saved preferences (both for "prefs" and for registered preferences). */ - free_prefs(&saved_prefs); prefs_modules_foreach(module_prefs_clean, NULL); } @@ -1468,8 +1456,6 @@ module_prefs_copy(module_t *module, gpointer user_data _U_) /* Copy prefs to saved values so we can revert to these values */ /* if the user selects Cancel. */ static void prefs_copy(void) { - free_prefs(&saved_prefs); - copy_prefs(&saved_prefs, &prefs); prefs_modules_foreach(module_prefs_copy, NULL); } @@ -1699,8 +1685,6 @@ prefs_main_cancel_cb(GtkWidget *cancel_bt _U_, gpointer parent_w) /* Free up the current preferences and copy the saved preferences to the current preferences. */ - free_prefs(&prefs); - copy_prefs(&prefs, &saved_prefs); cfile.cinfo.columns_changed = FALSE; /* [XXX: "columns_changed" should treally be stored in prefs struct ??] */ /* Now revert the registered preferences. */ |