Mercurial > pidgin.yaz
comparison src/dialogs.c @ 8137:4971193f761d
[gaim-migrate @ 8842]
The easy parts of Marc Mulcahy accessibility patch. Basically
set a label for a lot of widgets so screen readers and stuff
have something useful to read.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 18 Jan 2004 03:51:40 +0000 |
parents | ea073d234191 |
children | 82aeed3c90f0 |
comparison
equal
deleted
inserted
replaced
8136:fab67640b59f | 8137:4971193f761d |
---|---|
576 | 576 |
577 info->entry = gtk_entry_new(); | 577 info->entry = gtk_entry_new(); |
578 gtk_table_attach_defaults(GTK_TABLE(table), info->entry, 1, 2, 0, 1); | 578 gtk_table_attach_defaults(GTK_TABLE(table), info->entry, 1, 2, 0, 1); |
579 gtk_entry_set_activates_default (GTK_ENTRY(info->entry), TRUE); | 579 gtk_entry_set_activates_default (GTK_ENTRY(info->entry), TRUE); |
580 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(info->entry)); | 580 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(info->entry)); |
581 gaim_set_accessible_label (info->entry, label); | |
581 | 582 |
582 g_signal_connect(G_OBJECT(info->entry), "changed", | 583 g_signal_connect(G_OBJECT(info->entry), "changed", |
583 G_CALLBACK(gaim_gtk_set_sensitive_if_input), window); | 584 G_CALLBACK(gaim_gtk_set_sensitive_if_input), window); |
584 | 585 |
585 if (gaim_connections_get_all()->next) { | 586 if (gaim_connections_get_all()->next) { |
592 info->account = gaim_gtk_account_option_menu_new(NULL, FALSE, | 593 info->account = gaim_gtk_account_option_menu_new(NULL, FALSE, |
593 G_CALLBACK(show_info_select_account), NULL, info); | 594 G_CALLBACK(show_info_select_account), NULL, info); |
594 | 595 |
595 gtk_table_attach_defaults(GTK_TABLE(table), info->account, 1, 2, 1, 2); | 596 gtk_table_attach_defaults(GTK_TABLE(table), info->account, 1, 2, 1, 2); |
596 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(info->account)); | 597 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(info->account)); |
598 gaim_set_accessible_label (info->account, label); | |
597 } | 599 } |
598 | 600 |
599 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(do_im), info); | 601 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(do_im), info); |
600 | 602 |
601 gtk_widget_show_all(window); | 603 gtk_widget_show_all(window); |
651 | 653 |
652 info->entry = gtk_entry_new(); | 654 info->entry = gtk_entry_new(); |
653 gtk_table_attach_defaults(GTK_TABLE(table), info->entry, 1, 2, 0, 1); | 655 gtk_table_attach_defaults(GTK_TABLE(table), info->entry, 1, 2, 0, 1); |
654 gtk_entry_set_activates_default (GTK_ENTRY(info->entry), TRUE); | 656 gtk_entry_set_activates_default (GTK_ENTRY(info->entry), TRUE); |
655 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(info->entry)); | 657 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(info->entry)); |
658 gaim_set_accessible_label (info->entry, label); | |
656 | 659 |
657 g_signal_connect(G_OBJECT(info->entry), "changed", | 660 g_signal_connect(G_OBJECT(info->entry), "changed", |
658 G_CALLBACK(gaim_gtk_set_sensitive_if_input), window); | 661 G_CALLBACK(gaim_gtk_set_sensitive_if_input), window); |
659 | 662 |
660 if (gaim_connections_get_all()->next) { | 663 if (gaim_connections_get_all()->next) { |
667 info->account = gaim_gtk_account_option_menu_new(NULL, FALSE, | 670 info->account = gaim_gtk_account_option_menu_new(NULL, FALSE, |
668 G_CALLBACK(show_info_select_account), NULL, info); | 671 G_CALLBACK(show_info_select_account), NULL, info); |
669 | 672 |
670 gtk_table_attach_defaults(GTK_TABLE(table), info->account, 1, 2, 1, 2); | 673 gtk_table_attach_defaults(GTK_TABLE(table), info->account, 1, 2, 1, 2); |
671 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(info->account)); | 674 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(info->account)); |
675 gaim_set_accessible_label (info->account, label); | |
672 } | 676 } |
673 | 677 |
674 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(do_info), info); | 678 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(do_info), info); |
675 | 679 |
676 gtk_widget_show_all(window); | 680 gtk_widget_show_all(window); |
782 gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1); | 786 gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1); |
783 | 787 |
784 a->url = gtk_entry_new(); | 788 a->url = gtk_entry_new(); |
785 gtk_table_attach_defaults(GTK_TABLE(table), a->url, 1, 2, 0, 1); | 789 gtk_table_attach_defaults(GTK_TABLE(table), a->url, 1, 2, 0, 1); |
786 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(a->url)); | 790 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(a->url)); |
791 gaim_set_accessible_label (a->url, label); | |
787 gtk_widget_grab_focus(a->url); | 792 gtk_widget_grab_focus(a->url); |
788 | 793 |
789 gtk_entry_set_activates_default (GTK_ENTRY(a->url), TRUE); | 794 gtk_entry_set_activates_default (GTK_ENTRY(a->url), TRUE); |
790 g_signal_connect(G_OBJECT(a->url), "changed", | 795 g_signal_connect(G_OBJECT(a->url), "changed", |
791 G_CALLBACK(gaim_gtk_set_sensitive_if_input), a->window); | 796 G_CALLBACK(gaim_gtk_set_sensitive_if_input), a->window); |
795 gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2); | 800 gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2); |
796 | 801 |
797 a->text = gtk_entry_new(); | 802 a->text = gtk_entry_new(); |
798 gtk_table_attach_defaults(GTK_TABLE(table), a->text, 1, 2, 1, 2); | 803 gtk_table_attach_defaults(GTK_TABLE(table), a->text, 1, 2, 1, 2); |
799 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(a->text)); | 804 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(a->text)); |
805 gaim_set_accessible_label (a->text, label); | |
800 gtk_entry_set_activates_default (GTK_ENTRY(a->text), TRUE); | 806 gtk_entry_set_activates_default (GTK_ENTRY(a->text), TRUE); |
801 | 807 |
802 gtkconv->dialogs.link = a->window; | 808 gtkconv->dialogs.link = a->window; |
803 | 809 |
804 gtk_widget_show_all(gtkconv->dialogs.link); | 810 gtk_widget_show_all(gtkconv->dialogs.link); |
1255 label = gtk_label_new(_("Away title: ")); | 1261 label = gtk_label_new(_("Away title: ")); |
1256 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | 1262 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
1257 | 1263 |
1258 ca->entry = gtk_entry_new(); | 1264 ca->entry = gtk_entry_new(); |
1259 gtk_box_pack_start(GTK_BOX(hbox), ca->entry, TRUE, TRUE, 0); | 1265 gtk_box_pack_start(GTK_BOX(hbox), ca->entry, TRUE, TRUE, 0); |
1266 gaim_set_accessible_label (ca->entry, label); | |
1260 gtk_widget_grab_focus(ca->entry); | 1267 gtk_widget_grab_focus(ca->entry); |
1261 | 1268 |
1262 /* Away message text */ | 1269 /* Away message text */ |
1263 sw = gtk_scrolled_window_new(NULL, NULL); | 1270 sw = gtk_scrolled_window_new(NULL, NULL); |
1264 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | 1271 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), |