From da26097aab554c44540c25f0741dc19f6e92cc41 Mon Sep 17 00:00:00 2001 From: BakasuraRCE Date: Wed, 29 Jul 2020 09:50:12 -0500 Subject: notification: Implement notification option for channels --- src/fe-gtk/maingui.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'src/fe-gtk/maingui.c') diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 335522a0..4e5baaa0 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -1520,14 +1520,32 @@ static void mg_create_alertmenu (session *sess, GtkWidget *menu) { GtkWidget *submenu; + int hex_balloon, hex_beep, hex_tray, hex_flash; - submenu = menu_quick_sub (_("_Extra Alerts"), menu, NULL, XCMENU_MNEMONIC, -1); - mg_perchan_menu_item (_("Beep on _Message"), submenu, &sess->alert_beep, prefs.hex_input_beep_chans); + switch (sess->type) { + case SESS_DIALOG: + hex_balloon = prefs.hex_input_balloon_priv; + hex_beep = prefs.hex_input_beep_priv; + hex_tray = prefs.hex_input_tray_priv; + hex_flash = prefs.hex_input_flash_priv; + break; + default: + hex_balloon = prefs.hex_input_balloon_chans; + hex_beep = prefs.hex_input_beep_chans; + hex_tray = prefs.hex_input_tray_chans; + hex_flash = prefs.hex_input_flash_chans; + } + + submenu = menu_quick_sub(_("_Extra Alerts"), menu, NULL, XCMENU_MNEMONIC, -1); + + mg_perchan_menu_item(_("Show Notifications"), submenu, &sess->alert_balloon, hex_balloon); + + mg_perchan_menu_item(_("Beep on _Message"), submenu, &sess->alert_beep, hex_beep); - mg_perchan_menu_item (_("Blink Tray _Icon"), submenu, &sess->alert_tray, prefs.hex_input_tray_chans); + mg_perchan_menu_item(_("Blink Tray _Icon"), submenu, &sess->alert_tray, hex_tray); - mg_perchan_menu_item (_("Blink Task _Bar"), submenu, &sess->alert_taskbar, prefs.hex_input_flash_chans); + mg_perchan_menu_item(_("Blink Task _Bar"), submenu, &sess->alert_taskbar, hex_flash); } static void -- cgit 1.4.1