empathy r2085 - trunk/libempathy-gtk



Author: xclaesse
Date: Tue Jan  6 16:49:11 2009
New Revision: 2085
URL: http://svn.gnome.org/viewvc/empathy?rev=2085&view=rev

Log:
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.

Modified:
   trunk/libempathy-gtk/empathy-ui-utils.c

Modified: trunk/libempathy-gtk/empathy-ui-utils.c
==============================================================================
--- trunk/libempathy-gtk/empathy-ui-utils.c	(original)
+++ trunk/libempathy-gtk/empathy-ui-utils.c	Tue Jan  6 16:49:11 2009
@@ -1500,6 +1500,7 @@
 	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 @@
 	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 @@
 	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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]