diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-04-10 19:20:07 +0000 |
---|---|---|
committer | William Jon McCann <mccann@src.gnome.org> | 2007-04-10 19:20:07 +0000 |
commit | fddff5097ac5a94ecac7de21b61489c90238c58c (patch) | |
tree | 0d7924ab3cd09acc3fef8971692f9bfbabf99749 /common | |
parent | 95b6202d33ae23aa3c56038984e01f6096bda137 (diff) | |
download | gdm-fddff5097ac5a94ecac7de21b61489c90238c58c.tar.gz |
Fix reboot and halt command handling. Add ability to get string array
2007-04-10 William Jon McCann <mccann@jhu.edu>
* common/gdm-config.c: (gdm_config_value_get_string_array):
* common/gdm-config.h:
* daemon/gdm-daemon-config.c:
(gdm_daemon_config_get_value_string_array):
* daemon/gdm-daemon-config.h:
* daemon/gdm.c: (deal_with_x_crashes), (try_command),
(try_commands), (suspend_machine), (halt_machine),
(restart_machine), (custom_cmd_restart), (custom_cmd_no_restart),
(gdm_cleanup_children), (create_connections),
(gdm_handle_user_message):
Fix reboot and halt command handling. Add ability to get
string array values from config.
svn path=/trunk/; revision=4824
Diffstat (limited to 'common')
-rw-r--r-- | common/gdm-config.c | 8 | ||||
-rw-r--r-- | common/gdm-config.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/common/gdm-config.c b/common/gdm-config.c index 6f6b1f7d..1b6e4e44 100644 --- a/common/gdm-config.c +++ b/common/gdm-config.c @@ -218,6 +218,14 @@ gdm_config_value_get_locale_string (const GdmConfigValue *value) return REAL_VALUE (value)->val.str; } +const char ** +gdm_config_value_get_string_array (const GdmConfigValue *value) +{ + g_return_val_if_fail (value != NULL, NULL); + g_return_val_if_fail (value->type == GDM_CONFIG_VALUE_STRING_ARRAY, NULL); + return (const char **)REAL_VALUE (value)->val.array; +} + gboolean gdm_config_value_get_bool (const GdmConfigValue *value) { diff --git a/common/gdm-config.h b/common/gdm-config.h index 4a4103bc..5fc184c1 100644 --- a/common/gdm-config.h +++ b/common/gdm-config.h @@ -183,6 +183,8 @@ GdmConfigValue * gdm_config_value_new_from_string (GdmConfigValueType ty GError **error); const char * gdm_config_value_get_string (const GdmConfigValue *value); const char * gdm_config_value_get_locale_string (const GdmConfigValue *value); +const char ** gdm_config_value_get_string_array (const GdmConfigValue *value); + int gdm_config_value_get_int (const GdmConfigValue *value); gboolean gdm_config_value_get_bool (const GdmConfigValue *value); |