/pidgin/main: 93aeafc2dd13: Set some accessible names, to make u...

Tomasz Wasilczyk twasilczyk at pidgin.im
Thu Feb 27 09:45:22 EST 2014


Changeset: 93aeafc2dd13dd73bfead1511ae4a42dc53c8a7e
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-02-27 15:45 +0100
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/93aeafc2dd13

Description:

Set some accessible names, to make ui testing easier

diffstat:

 pidgin/gtkconv.c     |  3 +++
 pidgin/gtkinternal.h |  9 +++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diffs (49 lines):

diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -5665,6 +5665,7 @@ setup_common_pane(PidginConversation *gt
 	/* Setup the webkit widget */
 	frame = pidgin_create_webview(FALSE, &gtkconv->webview, &webview_sw);
 	g_object_set(G_OBJECT(gtkconv->webview), "expand", TRUE, NULL);
+	_pidgin_widget_set_accessible_name(frame, "Conversation Pane");
 
 	load_conv_theme(gtkconv);
 
@@ -5708,6 +5709,7 @@ setup_common_pane(PidginConversation *gt
 	gtk_box_pack_start(GTK_BOX(gtkconv->lower_hbox), frame, TRUE, TRUE, 0);
 	gtk_widget_show(frame);
 
+	_pidgin_widget_set_accessible_name(frame, "Message Input");
 	gtk_widget_set_name(gtkconv->entry, "pidgin_conv_entry");
 	pidgin_webview_set_protocol_name(PIDGIN_WEBVIEW(gtkconv->entry),
 			purple_account_get_protocol_name(purple_conversation_get_account(conv)));
@@ -10233,6 +10235,7 @@ pidgin_conv_window_new()
 
 	/* Create the window. */
 	win->window = pidgin_create_window(NULL, 0, "conversation", TRUE);
+	/*_pidgin_widget_set_accessible_name(win->window, "Conversations");*/
 	if (!gtk_get_current_event_state(&state))
 		gtk_window_set_focus_on_map(GTK_WINDOW(win->window), FALSE);
 
diff --git a/pidgin/gtkinternal.h b/pidgin/gtkinternal.h
--- a/pidgin/gtkinternal.h
+++ b/pidgin/gtkinternal.h
@@ -30,9 +30,18 @@
 
 G_BEGIN_DECLS
 
+static inline void
+_pidgin_widget_set_accessible_name(GtkWidget *widget, const gchar *name);
+
 PurpleStoredImage *
 _pidgin_e2ee_stock_icon_get(const gchar *stock_name);
 
 G_END_DECLS
 
+static inline void
+_pidgin_widget_set_accessible_name(GtkWidget *widget, const gchar *name)
+{
+	atk_object_set_name(gtk_widget_get_accessible(widget), name);
+}
+
 #endif /* _PIDGIN_INTERNAL_H_ */



More information about the Commits mailing list