Mercurial > pidgin
changeset 109:45bcfa3b584c
[gaim-migrate @ 119]
Added an option to not play 'login' sounds when people first sign on.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 12 Apr 2000 21:30:29 +0000 |
parents | 9a544c677ab7 |
children | f7c6366ca703 |
files | src/aim.c src/gaim.h src/prefs.c |
diffstat | 3 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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),
--- 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;
--- 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);