From d74850a770b15db3c6d2fbae3f85b3318b1d5aa3 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sat, 2 Aug 2003 21:43:46 +0000 Subject: 2003-08-01 Marco Gerards * opts-std-startup.c: Include . (OPT_VISUAL_BELL): New macro. (OPT_AUDIBLE_BELL): Likewise. (_cons_visual_bell): New variable. (_cons_audible_bell): Likewise. (startup_options): Added options "--visual-bell" and "--audible-bell" ... (parse_startup_opt): ...and parse those new options here. * priv.h (bell_type_t): New enumeration. (_cons_visual_bell): New external variable. (_cons_audible_bell): Likewise. * file-changed.c (cons_S_file_changed): Use the right bell. --- libcons/file-changed.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libcons/file-changed.c') diff --git a/libcons/file-changed.c b/libcons/file-changed.c index f65eb0b5..40c00af8 100644 --- a/libcons/file-changed.c +++ b/libcons/file-changed.c @@ -1,5 +1,5 @@ /* file-changed.c - Handling file changed notifications. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. Written by Marcus Brinkmann. This file is part of the GNU Hurd. @@ -202,7 +202,10 @@ cons_S_file_changed (cons_notify_t notify, natural_t tickno, while (vcons->state.bell.audible < vcons->display->bell.audible) { - cons_vcons_beep (vcons); + if (_cons_audible_bell == BELL_AUDIBLE) + cons_vcons_beep (vcons); + else if (_cons_audible_bell == BELL_VISUAL) + cons_vcons_flash (vcons); vcons->state.bell.audible++; } } @@ -211,7 +214,10 @@ cons_S_file_changed (cons_notify_t notify, natural_t tickno, while (vcons->state.bell.visible < vcons->display->bell.visible) { - cons_vcons_flash (vcons); + if (_cons_visual_bell == BELL_VISUAL) + cons_vcons_flash (vcons); + else if (_cons_visual_bell == BELL_AUDIBLE) + cons_vcons_beep (vcons); vcons->state.bell.visible++; } } -- cgit v1.2.3