aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-10-24 06:13:07 +0000
committerGuy Harris <guy@alum.mit.edu>2001-10-24 06:13:07 +0000
commitd453f6d99253d5946a4c150c57a7ab8bce2a0715 (patch)
treead8ca8b08b9ff2a10d2456edf4bc10b4e65b26df /gtk
parent7e27e176c0e8cedb6cbf94dad30c7ac2ca889252 (diff)
On Windows, put Ethereal configuration files under the "Application
Data\Ethereal" directory under the user's profile, as that appears to be the Windows 2000 standard. svn path=/trunk/; revision=4071
Diffstat (limited to 'gtk')
-rw-r--r--gtk/colors.c5
-rw-r--r--gtk/filter_prefs.c5
-rw-r--r--gtk/prefs_dlg.c8
3 files changed, 11 insertions, 7 deletions
diff --git a/gtk/colors.c b/gtk/colors.c
index ac29b6db79..cebf124d23 100644
--- a/gtk/colors.c
+++ b/gtk/colors.c
@@ -1,7 +1,7 @@
/* colors.c
* Definitions for color structures and routines
*
- * $Id: colors.c,v 1.13 2001/10/23 05:01:02 guy Exp $
+ * $Id: colors.c,v 1.14 2001/10/24 06:13:06 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -288,7 +288,7 @@ write_filter(gpointer filter_arg, gpointer file_arg)
gboolean
write_filters(colfilter *filter)
{
- const gchar *pf_dir_path;
+ gchar *pf_dir_path;
const gchar *path;
FILE *f;
@@ -298,6 +298,7 @@ write_filters(colfilter *filter)
simple_dialog(ESD_TYPE_WARN, NULL,
"Can't create directory\n\"%s\"\nfor color files: %s.",
pf_dir_path, strerror(errno));
+ g_free(pf_dir_path);
return FALSE;
}
diff --git a/gtk/filter_prefs.c b/gtk/filter_prefs.c
index 50f645035d..44f0b391a3 100644
--- a/gtk/filter_prefs.c
+++ b/gtk/filter_prefs.c
@@ -3,7 +3,7 @@
* (This used to be a notebook page under "Preferences", hence the
* "prefs" in the file name.)
*
- * $Id: filter_prefs.c,v 1.31 2001/10/23 05:01:02 guy Exp $
+ * $Id: filter_prefs.c,v 1.32 2001/10/24 06:13:06 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -708,7 +708,7 @@ static void
filter_dlg_save_cb(GtkWidget *save_bt, gpointer data)
{
filter_list_type_t list = *(filter_list_type_t *)data;
- const char *pf_dir_path;
+ char *pf_dir_path;
char *f_path;
int f_save_errno;
char *filter_type;
@@ -719,6 +719,7 @@ filter_dlg_save_cb(GtkWidget *save_bt, gpointer data)
simple_dialog(ESD_TYPE_WARN, NULL,
"Can't create directory\n\"%s\"\nfor filter files: %s.",
pf_dir_path, strerror(errno));
+ g_free(pf_dir_path);
return;
}
diff --git a/gtk/prefs_dlg.c b/gtk/prefs_dlg.c
index 75d2e399fa..e1512ccfba 100644
--- a/gtk/prefs_dlg.c
+++ b/gtk/prefs_dlg.c
@@ -1,7 +1,7 @@
/* prefs_dlg.c
* Routines for handling preferences
*
- * $Id: prefs_dlg.c,v 1.31 2001/10/23 05:01:02 guy Exp $
+ * $Id: prefs_dlg.c,v 1.32 2001/10/24 06:13:07 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -645,6 +645,7 @@ prefs_main_save_cb(GtkWidget *save_bt, gpointer parent_w)
{
gboolean must_redissect = FALSE;
int err;
+ char *pf_dir_path;
const char *pf_path;
/* Fetch the preferences (i.e., make sure all the values set in all of
@@ -658,10 +659,11 @@ prefs_main_save_cb(GtkWidget *save_bt, gpointer parent_w)
/* Create the directory that holds personal configuration files, if
necessary. */
- if (create_persconffile_dir(&pf_path) == -1) {
+ if (create_persconffile_dir(&pf_dir_path) == -1) {
simple_dialog(ESD_TYPE_WARN, NULL,
- "Can't create directory\n\"%s\"\nfor preferences file: %s.", pf_path,
+ "Can't create directory\n\"%s\"\nfor preferences file: %s.", pf_dir_path,
strerror(errno));
+ g_free(pf_dir_path);
} else {
/* Write the preferencs out. */
err = write_prefs(&pf_path);