changeset 13521:d593b7d4f29c

[gaim-migrate @ 15897] Add an accessible description to complement the tab color changes. Fixes SF Bug #1449986 A bunch of this is commented out because of string freeze. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 17 Mar 2006 00:47:03 +0000
parents c836ba676c7c
children 5ddae6fe983e
files src/gtkconv.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Thu Mar 16 20:25:01 2006 +0000
+++ b/src/gtkconv.c	Fri Mar 17 00:47:03 2006 +0000
@@ -5599,6 +5599,7 @@
 		char *title;
 		GaimConvIm *im = NULL;
 		GaimAccount *account = gaim_conversation_get_account(conv);
+		AtkObject *accessibility_obj;
 		/* I think this is a little longer than it needs to be but I'm lazy. */
 		char style[51];
 
@@ -5618,26 +5619,36 @@
 		if (!GTK_WIDGET_REALIZED(gtkconv->tab_label))
 			gtk_widget_realize(gtkconv->tab_label);
 
+		accessibility_obj = gtk_widget_get_accessible(gtkconv->tab_cont);
 		if (im != NULL &&
 		    gaim_conv_im_get_typing_state(im) == GAIM_TYPING)
 		{
+			atk_object_set_description(accessibility_obj, _("Typing"));
 			strncpy(style, "color=\"#47A046\"", sizeof(style));
 		}
 		else if (im != NULL &&
 		         gaim_conv_im_get_typing_state(im) == GAIM_TYPED)
 		{
+			/* TODO: Post string freeze.
+			atk_object_set_description(accessibility_obj, _("Stopped Typing")); */
 			strncpy(style, "color=\"#D1940C\"", sizeof(style));
 		}
 		else if (gtkconv->unseen_state == GAIM_UNSEEN_NICK)
 		{
+			/* TODO: Post string freeze.
+			atk_object_set_description(accessibility_obj, _("Nick Said")); */
 			strncpy(style, "color=\"#0D4E91\" style=\"italic\" weight=\"bold\"", sizeof(style));
 		}
 		else if (gtkconv->unseen_state == GAIM_UNSEEN_TEXT)
 		{
+			atk_object_set_description(accessibility_obj, _("Unread Messages"));
 			strncpy(style, "color=\"#DF421E\" weight=\"bold\"", sizeof(style));
 		}
 		else if (gtkconv->unseen_state == GAIM_UNSEEN_EVENT)
 		{
+			atk_object_set_description(accessibility_obj, _("Event"));
+			/* TODO: Post string freeze
+			atk_object_set_description(accessibility_obj, _("New Event")); */
 			strncpy(style, "color=\"#868272\" style=\"italic\"", sizeof(style));
 		}