# HG changeset patch # User Eric Warmenhoven # Date 955575029 0 # Node ID 45bcfa3b584cc2f5a1db27ab246ccdaf71c4c005 # Parent 9a544c677ab77db47057bb2ac93bd48b3da658ec [gaim-migrate @ 119] Added an option to not play 'login' sounds when people first sign on. committer: Tailor Script diff -r 9a544c677ab7 -r 45bcfa3b584c src/aim.c --- a/src/aim.c Wed Apr 12 08:28:52 2000 +0000 +++ b/src/aim.c Wed Apr 12 21:30:29 2000 +0000 @@ -109,6 +109,12 @@ gtk_main_iteration(); } +static int snd_tmout; +static void sound_timeout() { + sound_options += OPT_SOUND_LOGIN; + gtk_timeout_remove(snd_tmout); +} + void dologin(GtkWidget *widget, GtkWidget *w) { static gboolean running = FALSE; @@ -140,6 +146,13 @@ return; } + if (sound_options & OPT_SOUND_LOGIN && + sound_options & OPT_SOUND_SILENT_SIGNON) { + sound_options -= OPT_SOUND_LOGIN; + snd_tmout = gtk_timeout_add(10000, (GtkFunction)sound_timeout, + NULL); + } + #ifdef USE_APPLET applet_widget_unregister_callback(APPLET_WIDGET(applet),"signon"); applet_widget_register_callback(APPLET_WIDGET(applet), diff -r 9a544c677ab7 -r 45bcfa3b584c src/gaim.h --- a/src/gaim.h Wed Apr 12 08:28:52 2000 +0000 +++ b/src/gaim.h Wed Apr 12 21:30:29 2000 +0000 @@ -290,7 +290,7 @@ #define TYPE_SIGNOFF 4 #define TYPE_KEEPALIVE 5 -#define REVISION "gaim:$Revision: 117 $" +#define REVISION "gaim:$Revision: 119 $" #define FLAPON "FLAPON\r\n\r\n" #define ROAST "Tic/Toc" @@ -376,6 +376,7 @@ #define OPT_SOUND_SEND 0x00000008 #define OPT_SOUND_FIRST_RCV 0x00000010 #define OPT_SOUND_WHEN_AWAY 0x00000020 +#define OPT_SOUND_SILENT_SIGNON 0x00000040 extern int font_options; diff -r 9a544c677ab7 -r 45bcfa3b584c src/prefs.c --- a/src/prefs.c Wed Apr 12 08:28:52 2000 +0000 +++ b/src/prefs.c Wed Apr 12 21:30:29 2000 +0000 @@ -619,6 +619,7 @@ gaim_button("Sound when message is sent", &sound_options, OPT_SOUND_SEND, sound_page); gaim_button("Sound when first message is received", &sound_options, OPT_SOUND_FIRST_RCV, sound_page); gaim_button("Sound when message is received if away", &sound_options, OPT_SOUND_WHEN_AWAY, sound_page); + gaim_button("No sound for buddies signed on when you log in", &sound_options, OPT_SOUND_SILENT_SIGNON, sound_page); gtk_widget_show(sound_page);