diff options
author | George Lebl <jirka@5z.com> | 2003-12-30 23:39:21 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2003-12-30 23:39:21 +0000 |
commit | 669245886f2437c8efb3adf73f7245e57cb6e818 (patch) | |
tree | a9aee98535bd3fe498c2e440ef07c9499fef7a26 /gui/gdmcommon.c | |
parent | afa6a5a8099360422eb1f18e1f729872796d8de8 (diff) | |
download | gdm-669245886f2437c8efb3adf73f7245e57cb6e818.tar.gz |
Complain on some more errors
Tue Dec 30 15:34:59 2003 George Lebl <jirka@5z.com>
* daemon/gdm.c, daemon/auth.c: Complain on some more errors
* gui/gdmlogin.c, gui/gdmcommon.[ch], gui/gdmsetup.(c|glade),
gui/greeter/greeter.c, gui/greeter/greeter_configuration.h,
daemon/gdm.[ch], daemon/slave.c: Make the login sound thingie
configurable and make it possible to play an arbitrary sound with
/usr/bin/play (or whatever else is configured). Add accessibility
section to gdmsetup which configures the accessibility modules
and the sound. Fixes #125487
* config/gdm.conf.in, docs/C/gdm.xml: Update docs for the
accessibility/sound stuff
Diffstat (limited to 'gui/gdmcommon.c')
-rw-r--r-- | gui/gdmcommon.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gui/gdmcommon.c b/gui/gdmcommon.c index 04da5544..615ae43e 100644 --- a/gui/gdmcommon.c +++ b/gui/gdmcommon.c @@ -36,6 +36,9 @@ extern gchar *GdmInfoMsgFile; extern gchar *GdmInfoMsgFont; +extern gchar *GdmSoundProgram; +extern gboolean GdmSoundOnLogin; +extern gchar *GdmSoundOnLoginFile; void gdm_common_show_info_msg (void) @@ -223,4 +226,21 @@ gdm_common_int_same (VeConfig *config, int cur, const char *key) } } +void +gdm_common_login_sound (void) +{ + if ( ! GdmSoundOnLogin) + return; + if (ve_string_empty (g_getenv ("GDM_IS_LOCAL")) || + ve_string_empty (GdmSoundProgram) || + ve_string_empty (GdmSoundOnLoginFile) || + access (GdmSoundProgram, F_OK) != 0 || + access (GdmSoundOnLoginFile, F_OK) != 0) { + gdk_beep (); + } else { + /* login sound interruption */ + printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_LOGIN_SOUND); + fflush (stdout); + } +} |