From 5a4c5e4188d2df228da7e79278a838cac102fe72 Mon Sep 17 00:00:00 2001 From: Richard Hestilow Date: Sat, 29 Sep 2001 21:08:51 +0000 Subject: [PATCH] Check if config_tryexec is blank, and if it is, free it and set it to 2001-09-29 Richard Hestilow * 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. --- capplets/wm-properties/ChangeLog | 7 +++++++ capplets/wm-properties/wm-list.c | 13 +++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/capplets/wm-properties/ChangeLog b/capplets/wm-properties/ChangeLog index 8e4260a45..f34d4dc84 100644 --- a/capplets/wm-properties/ChangeLog +++ b/capplets/wm-properties/ChangeLog @@ -1,3 +1,10 @@ +2001-09-29 Richard Hestilow + + * 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 * wm.desktop.in.in: Rename zh_TW.Big5 to zh_TW . diff --git a/capplets/wm-properties/wm-list.c b/capplets/wm-properties/wm-list.c index 327ba2a30..ae3a95804 100644 --- a/capplets/wm-properties/wm-list.c +++ b/capplets/wm-properties/wm-list.c @@ -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 ();