aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-05-01 06:51:14 +0000
committerGuy Harris <guy@alum.mit.edu>2006-05-01 06:51:14 +0000
commit0dfbc73cbedd0d1b88218eb594f88bc98c583faf (patch)
treed89d037d5ac2d66e245060575b23e2f9f8437b3c /gtk
parent56728f40ede189fd4d6fed7e416cb9ec6cda3520 (diff)
Handle the case where we *can't* determine the pathname in which to find
programs, by reporting it with a dialog box that at least attempts to indicate what the problem is, and by giving up early on running dumpcap. svn path=/trunk/; revision=18051
Diffstat (limited to 'gtk')
-rw-r--r--gtk/about_dlg.c6
-rw-r--r--gtk/main.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/gtk/about_dlg.c b/gtk/about_dlg.c
index 7d0401d0c0..41abeb370d 100644
--- a/gtk/about_dlg.c
+++ b/gtk/about_dlg.c
@@ -234,8 +234,10 @@ about_folders_page_new(void)
/* global conf */
constpath = get_datafile_dir();
- about_folders_row(table, "Global configuration", constpath,
- "\"dfilters\", \"preferences\", \"manuf\", ...");
+ if (constpath != NULL) {
+ about_folders_row(table, "Global configuration", constpath,
+ "\"dfilters\", \"preferences\", \"manuf\", ...");
+ }
/* system */
constpath = get_systemfile_dir();
diff --git a/gtk/main.c b/gtk/main.c
index daa70992eb..ba6e4f6b15 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -1876,6 +1876,7 @@ static void main_cf_callback(gint event, gpointer data, gpointer user_data _U_)
int
main(int argc, char *argv[])
{
+ char *init_progfile_dir_error;
char *s;
int i;
int opt;
@@ -1928,7 +1929,7 @@ main(int argc, char *argv[])
/*
* Attempt to get the pathname of the executable file.
*/
- init_progfile_dir(argv[0]);
+ init_progfile_dir_error = init_progfile_dir(argv[0]);
/*
* Get credential information for later use.
@@ -2103,6 +2104,14 @@ main(int argc, char *argv[])
/* We won't come till here, if we had a "console only" command line parameter. */
splash_win = splash_new("Loading Ethereal ...");
+ if (init_progfile_dir_error != NULL) {
+ simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
+ "Can't get pathname of Ethereal: %s.\n"
+ "It won't be possible to capture traffic.\n"
+ "Report this to the Ethereal developers.",
+ init_progfile_dir_error);
+ g_free(init_progfile_dir_error);
+ }
splash_update(splash_win, "Init dissectors ...");