aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:49:11 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:49:11 +0800
commit8846b859c27a911e2ebbe5f5a95538f4b962d520 (patch)
tree663d981e36b61e420231e30b2487ae57d14f34b2 /libempathy-gtk
parent74d4c594bb1893558b08fe0fa40019cff59c2cda (diff)
downloadgsoc2013-empathy-8846b859c27a911e2ebbe5f5a95538f4b962d520.tar
gsoc2013-empathy-8846b859c27a911e2ebbe5f5a95538f4b962d520.tar.gz
gsoc2013-empathy-8846b859c27a911e2ebbe5f5a95538f4b962d520.tar.bz2
gsoc2013-empathy-8846b859c27a911e2ebbe5f5a95538f4b962d520.tar.lz
gsoc2013-empathy-8846b859c27a911e2ebbe5f5a95538f4b962d520.tar.xz
gsoc2013-empathy-8846b859c27a911e2ebbe5f5a95538f4b962d520.tar.zst
gsoc2013-empathy-8846b859c27a911e2ebbe5f5a95538f4b962d520.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. svn path=/trunk/; revision=2085
Diffstat (limited to 'libempathy-gtk')
-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