comparison src/gtkpounce.c @ 11642:58bc500cf226

[gaim-migrate @ 13919] sf patch #1324285, from Casey Harkins fix "sounds while away" in HEAD This patch adds a GaimAccount as a parameter to the sound playing functions, allowing the caller to specify the account the sound is related to. If the account is not NULL and the while_away preference is not set, then the account is checked to see if it is away, if so, the sound is not played. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 12 Oct 2005 02:27:32 +0000
parents 17142948653e
children 969fd533bd5d
comparison
equal deleted inserted replaced
11641:925c1960af34 11642:58bc500cf226
137 const char *filename; 137 const char *filename;
138 138
139 filename = gtk_entry_get_text(GTK_ENTRY(entry)); 139 filename = gtk_entry_get_text(GTK_ENTRY(entry));
140 140
141 if (filename != NULL && *filename != '\0') 141 if (filename != NULL && *filename != '\0')
142 gaim_sound_play_file((char *) filename); 142 gaim_sound_play_file(filename, NULL);
143 else 143 else
144 gaim_sound_play_event(GAIM_SOUND_POUNCE_DEFAULT); 144 gaim_sound_play_event(GAIM_SOUND_POUNCE_DEFAULT, NULL);
145 } 145 }
146 146
147 static void 147 static void
148 save_pounce_cb(GtkWidget *w, GaimGtkPounceDialog *dialog) 148 save_pounce_cb(GtkWidget *w, GaimGtkPounceDialog *dialog)
149 { 149 {
1100 1100
1101 sound = gaim_pounce_action_get_attribute(pounce, 1101 sound = gaim_pounce_action_get_attribute(pounce,
1102 "play-sound", "filename"); 1102 "play-sound", "filename");
1103 1103
1104 if (sound != NULL) 1104 if (sound != NULL)
1105 gaim_sound_play_file(sound); 1105 gaim_sound_play_file(sound, account);
1106 else 1106 else
1107 gaim_sound_play_event(GAIM_SOUND_POUNCE_DEFAULT); 1107 gaim_sound_play_event(GAIM_SOUND_POUNCE_DEFAULT, account);
1108 } 1108 }
1109 } 1109 }
1110 1110
1111 static void 1111 static void
1112 free_pounce(GaimPounce *pounce) 1112 free_pounce(GaimPounce *pounce)