Mercurial > pidgin
changeset 2759:f26f1d139615
[gaim-migrate @ 2772]
Arturo Cisneros, Jr (r-2-ro)'s patch
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 19 Nov 2001 09:54:00 +0000 |
parents | 269fb9005d13 |
children | 72272d43e265 |
files | src/prefs.c |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/prefs.c Mon Nov 19 09:45:22 2001 +0000 +++ b/src/prefs.c Mon Nov 19 09:54:00 2001 +0000 @@ -1405,6 +1405,15 @@ last_sound_dir = g_dirname(sound_file[snd]); } +static void test_sound(GtkWidget *button, int snd) +{ + guint32 tmp_sound = sound_options; + if (!(sound_options & OPT_SOUND_WHEN_AWAY)) + sound_options ^= OPT_SOUND_WHEN_AWAY; + play_sound(snd); + sound_options = tmp_sound; +} + static void reset_sound(GtkWidget *button, int snd) { @@ -1454,6 +1463,11 @@ gaim_button(label, &sound_options, opt, hbox); + button = gtk_button_new_with_label(_("Play")); + gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(test_sound), (void *)snd); + gtk_widget_show(button); + button = gtk_button_new_with_label(_("Reset")); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(reset_sound), (void *)snd);