aboutsummaryrefslogtreecommitdiffstats
path: root/filters.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-01-14 16:40:23 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-01-14 16:40:23 +0000
commita2d1e9005dc447486e14903f5d53d5ee8d6d725f (patch)
tree78bc861dc4a2907a73ee807f8893914875221a25 /filters.c
parente189eb88870cf39f5785918b56d2284e14f36f0c (diff)
This patch adds support for configuration profiles, which can be used to
configure and use more than one set of preferences and configuration files. This can be found in the "Configuration Profiles..." menu item from the Edit menu, or by pressing Shift-Ctrl-A. It's also possible to start wireshark and tshark with a named profile by using the "-C ProfileName" option. A new status pane in the main window will show the current profile. The configuration files currently stored in the Profiles are: - Preferences - Capture Filters - Display Filters - Coloring Rules - Disabled Protocols - User Accessible Tables The recent data are by design not added to the profile. Planned future enhancements: - make a more convenient function to switch between profiles - add a "clone profile" button to copy an existing profile - make the profiles list active and accept return as OK - save users "Decode as" in the profile - make new, clone and deletion of profiles more secure - make some of the recent values available in the profile This patch also fixes: - setting default status pane sizes - a bug setting status pane for packets when not having main lower pane. svn path=/trunk/; revision=24089
Diffstat (limited to 'filters.c')
-rw-r--r--filters.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/filters.c b/filters.c
index e8c22d1c3a..71d177135b 100644
--- a/filters.c
+++ b/filters.c
@@ -145,7 +145,7 @@ read_filter_list(filter_list_type_t list_type, char **pref_path_return,
}
/* try to open personal "cfilters"/"dfilters" file */
- ff_path = get_persconffile_path(ff_name, FALSE);
+ ff_path = get_persconffile_path(ff_name, TRUE, FALSE);
if ((ff = eth_fopen(ff_path, "r")) == NULL) {
/*
* Did that fail because the file didn't exist?
@@ -168,7 +168,7 @@ read_filter_list(filter_list_type_t list_type, char **pref_path_return,
* a particular list.
*/
g_free(ff_path);
- ff_path = get_persconffile_path(FILTER_FILE_NAME, FALSE);
+ ff_path = get_persconffile_path(FILTER_FILE_NAME, FALSE, FALSE);
if ((ff = eth_fopen(ff_path, "r")) == NULL) {
/*
* Did that fail because the file didn't exist?
@@ -487,7 +487,7 @@ save_filter_list(filter_list_type_t list_type, char **pref_path_return,
return;
}
- ff_path = get_persconffile_path(ff_name, TRUE);
+ ff_path = get_persconffile_path(ff_name, TRUE, TRUE);
/* Write to "XXX.new", and rename if that succeeds.
That means we don't trash the file if we fail to write it out