summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hestilow <hestilow@ximian.com>2001-09-29 21:08:51 +0000
committerRachel Hestilow <hestgray@src.gnome.org>2001-09-29 21:08:51 +0000
commit5a4c5e4188d2df228da7e79278a838cac102fe72 (patch)
tree21a1031137bbe9afa79151d42a36e96e13ed1a32
parentbcf570c7bdf090269fa670e3e7aed5815663b84f (diff)
downloadgnome-control-center-5a4c5e4188d2df228da7e79278a838cac102fe72.tar.gz
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.
-rw-r--r--capplets/wm-properties/ChangeLog7
-rw-r--r--capplets/wm-properties/wm-list.c13
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 <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 .
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 ();