comparison src/sound.c @ 606:eaab8abda2c0

[gaim-migrate @ 616] ok, a few changes. 1) --enable-gnome (which is the default) can make sounds go through gnome, which means they're configurable. they can still go through gaim. 2) --enable-gnome will also install the necessary files to make sounds through gnome work. 3) the rpm will be built without gnome; if a distributor later wants to require gnome that's up to them. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 04 Aug 2000 17:13:54 +0000
parents 7b49c67e561c
children 6ba20a0089d8
comparison
equal deleted inserted replaced
605:1dbc72baf900 606:eaab8abda2c0
264 } 264 }
265 } 265 }
266 266
267 extern int logins_not_muted; 267 extern int logins_not_muted;
268 268
269 #ifdef USE_APPLET 269 #ifdef USE_GNOME
270 void applet_play_sound(int sound) 270 void gnome_play_sound(int sound)
271 #else 271 #else
272 void play_sound(int sound) 272 void play_sound(int sound)
273 #endif 273 #endif
274 { 274 {
275 275
299 play(Receive, sizeof(Receive)); 299 play(Receive, sizeof(Receive));
300 break; 300 break;
301 } 301 }
302 } 302 }
303 303
304 #ifdef USE_APPLET 304 #ifdef USE_GNOME
305 305
306 #include <gnome.h> 306 #include <gnome.h>
307 void play_sound(int sound) 307 void play_sound(int sound)
308 { 308 {
309 309
310 if (!(sound_options & OPT_SOUND_THROUGH_GNOME)) { 310 if (!(sound_options & OPT_SOUND_THROUGH_GNOME)) {
311 applet_play_sound(sound); 311 gnome_play_sound(sound);
312 return; 312 return;
313 } 313 }
314 314
315 switch(sound) { 315 switch(sound) {
316 case BUDDY_ARRIVE: 316 case BUDDY_ARRIVE:
317 if ((sound_options & OPT_SOUND_LOGIN) && logins_not_muted) 317 if ((sound_options & OPT_SOUND_LOGIN) && logins_not_muted)
318 gnome_triggers_do("", "program", "gaim_applet", "login", NULL); 318 gnome_triggers_do("", "program", "gaim", "login", NULL);
319 break; 319 break;
320 case BUDDY_LEAVE: 320 case BUDDY_LEAVE:
321 if (sound_options & OPT_SOUND_LOGOUT) 321 if (sound_options & OPT_SOUND_LOGOUT)
322 gnome_triggers_do("", "program", "gaim_applet", "leave", NULL); 322 gnome_triggers_do("", "program", "gaim", "leave", NULL);
323 break; 323 break;
324 case SEND: 324 case SEND:
325 if (sound_options & OPT_SOUND_SEND) 325 if (sound_options & OPT_SOUND_SEND)
326 gnome_triggers_do("", "program", "gaim_applet", "send", NULL); 326 gnome_triggers_do("", "program", "gaim", "send", NULL);
327 break; 327 break;
328 case FIRST_RECEIVE: 328 case FIRST_RECEIVE:
329 if (sound_options & OPT_SOUND_FIRST_RCV) 329 if (sound_options & OPT_SOUND_FIRST_RCV)
330 gnome_triggers_do("", "program", "gaim_applet", "recv", NULL); 330 gnome_triggers_do("", "program", "gaim", "recv", NULL);
331 break; 331 break;
332 case RECEIVE: 332 case RECEIVE:
333 if (sound_options & OPT_SOUND_RECV) 333 if (sound_options & OPT_SOUND_RECV)
334 gnome_triggers_do("", "program", "gaim_applet", "recv", NULL); 334 gnome_triggers_do("", "program", "gaim", "recv", NULL);
335 break; 335 break;
336 case AWAY: 336 case AWAY:
337 if (sound_options & OPT_SOUND_WHEN_AWAY) 337 if (sound_options & OPT_SOUND_WHEN_AWAY)
338 gnome_triggers_do("", "program", "gaim_applet", "recv", NULL); 338 gnome_triggers_do("", "program", "gaim", "recv", NULL);
339 break; 339 break;
340 } 340 }
341 } 341 }
342 342
343 #endif /* USE_APPLET */ 343 #endif /* USE_GNOME */