about summary refs log tree commit diff stats
path: root/windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'windows.c')
-rw-r--r--windows.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/windows.c b/windows.c
index 6462a790..2bc8a175 100644
--- a/windows.c
+++ b/windows.c
@@ -29,6 +29,7 @@
 #include "windows.h"
 #include "util.h"
 #include "contact.h"
+#include "preferences.h"
 
 #define CONS_WIN_TITLE "_cons"
 #define PAD_SIZE 200
@@ -49,9 +50,6 @@ static int dirty;
 // max columns for main windows, never resize below
 static int max_cols = 0;
 
-// allow beep?
-static int do_beep = FALSE;
-
 static void _create_windows(void);
 static int _find_prof_win_index(const char * const contact);
 static int _new_prof_win(const char * const contact);
@@ -156,11 +154,6 @@ int win_in_chat(void)
         (strcmp(_wins[_curr_prof_win].from, "") != 0));
 }
 
-void win_set_beep(int val)
-{
-    do_beep = val;
-}
-
 char *win_get_recipient(void)
 {
     struct prof_win current = _wins[_curr_prof_win];
@@ -192,7 +185,7 @@ void win_show_incomming_msg(const char * const from, const char * const message)
         _cons_show_incoming_message(short_from, win_index);
     }
 
-    if (do_beep == TRUE)
+    if (prefs_get_beep())
         beep();
 }