From: Eric W. <war...@us...> - 2001-11-19 09:54:03
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv20619/src Modified Files: prefs.c Log Message: Arturo Cisneros, Jr (r-2-ro)'s patch Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.200 retrieving revision 1.201 diff -u -d -r1.200 -r1.201 --- prefs.c 2001/11/18 05:42:08 1.200 +++ prefs.c 2001/11/19 09:54:00 1.201 @@ -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) { @@ -1453,6 +1462,11 @@ gtk_widget_show(hbox); 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); |