Check if config_tryexec is blank, and if it is, free it and set it to

2001-09-29  Richard Hestilow  <hestilow@ximian.com>

	* wm-list.c (wm_list_read_dir): Check if config_tryexec is blank,
	and if it is, free it and set it to NULL.
	(wm_check_present): If there is no config_tryexec, fall back
	on checking the path of the config_exec. Fix for bug #58306.
This commit is contained in:
Richard Hestilow 2001-09-29 21:08:51 +00:00 committed by Rachel Hestilow
parent bcf570c7bd
commit 5a4c5e4188
2 changed files with 18 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2001-09-29 Richard Hestilow <hestilow@ximian.com>
* wm-list.c (wm_list_read_dir): Check if config_tryexec is blank,
and if it is, free it and set it to NULL.
(wm_check_present): If there is no config_tryexec, fall back
on checking the path of the config_exec. Fix for bug #58306.
2001-09-05 Abel Cheung <maddog@linux.org.hk>
* wm.desktop.in.in: Rename zh_TW.Big5 to zh_TW .

View file

@ -79,8 +79,12 @@ wm_check_present (WindowManager *wm)
wm->is_config_present = (path != NULL);
if (path)
g_free (path);
} else
wm->is_config_present = TRUE;
} else {
path = gnome_is_program_in_path (wm->config_exec);
wm->is_config_present = (path != NULL);
if (path)
g_free (path);
}
} else
wm->is_config_present = FALSE;
@ -202,6 +206,11 @@ wm_list_read_dir (gchar *directory, gboolean is_user)
g_free (wm->config_exec);
wm->config_exec = NULL;
}
if (wm->config_tryexec && is_blank (wm->config_tryexec)) {
g_free (wm->config_tryexec);
wm->config_tryexec = NULL;
}
gnome_config_pop_prefix ();