aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ui-utils.c
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-01-07 00:49:11 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-01-07 00:49:11 +0800
commit7ef8d4b7d66d8695536368c786f801366792a0cf (patch)
tree663d981e36b61e420231e30b2487ae57d14f34b2 /libempathy-gtk/empathy-ui-utils.c
parent4b5b9baa8180a790db5678225f92fdc3e899becb (diff)
downloadgsoc2013-empathy-7ef8d4b7d66d8695536368c786f801366792a0cf.tar
gsoc2013-empathy-7ef8d4b7d66d8695536368c786f801366792a0cf.tar.gz
gsoc2013-empathy-7ef8d4b7d66d8695536368c786f801366792a0cf.tar.bz2
gsoc2013-empathy-7ef8d4b7d66d8695536368c786f801366792a0cf.tar.lz
gsoc2013-empathy-7ef8d4b7d66d8695536368c786f801366792a0cf.tar.xz
gsoc2013-empathy-7ef8d4b7d66d8695536368c786f801366792a0cf.tar.zst
gsoc2013-empathy-7ef8d4b7d66d8695536368c786f801366792a0cf.zip
Propperly mark event descriptions for translation.
Add a comment about the order of the sound entries array, and assert if the order isn't correct. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@2085 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 7c125a57b..306942929 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1500,6 +1500,7 @@ typedef struct {
const char * gconf_key;
} EmpathySoundEntry;
+/* NOTE: these entries MUST be in the same order of the EmpathySound enum */
static EmpathySoundEntry sound_entries[LAST_EMPATHY_SOUND] = {
{ EMPATHY_SOUND_MESSAGE_INCOMING, "message-new-instant",
N_("Received an instant message"), EMPATHY_PREFS_SOUNDS_INCOMING_MESSAGE } ,
@@ -1565,6 +1566,8 @@ empathy_sound_play (GtkWidget *widget,
EmpathySoundEntry *entry = &(sound_entries[sound_id]);
gboolean should_play = TRUE;
+ g_assert (entry->sound_id == sound_id);
+
if (entry->gconf_key != NULL) {
should_play = empathy_sound_pref_is_enabled (entry->gconf_key);
}
@@ -1572,7 +1575,7 @@ empathy_sound_play (GtkWidget *widget,
if (should_play) {
ca_gtk_play_for_widget (widget, 0,
CA_PROP_EVENT_ID, entry->event_ca_id,
- CA_PROP_EVENT_DESCRIPTION, entry->event_ca_description,
+ CA_PROP_EVENT_DESCRIPTION, gettext (entry->event_ca_description),
NULL);
}
} \ No newline at end of file