Mercurial > pidgin
comparison src/gtkprefs.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 | a89cffefca93 |
children | 5efe3d9cd552 |
comparison
equal
deleted
inserted
replaced
8136:fab67640b59f | 8137:4971193f761d |
---|---|
137 if (sg) { | 137 if (sg) { |
138 gtk_size_group_add_widget(sg, label); | 138 gtk_size_group_add_widget(sg, label); |
139 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 139 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
140 } | 140 } |
141 | 141 |
142 gaim_set_accessible_label (spin, label); | |
143 | |
142 return label; | 144 return label; |
143 } | 145 } |
144 | 146 |
145 static void | 147 static void |
146 dropdown_set(GObject *w, const char *key) | 148 dropdown_set(GObject *w, const char *key) |
252 } | 254 } |
253 | 255 |
254 gtk_option_menu_set_menu(GTK_OPTION_MENU(dropdown), menu); | 256 gtk_option_menu_set_menu(GTK_OPTION_MENU(dropdown), menu); |
255 gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); | 257 gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); |
256 gtk_widget_show(dropdown); | 258 gtk_widget_show(dropdown); |
259 gaim_set_accessible_label (dropdown, label); | |
257 | 260 |
258 return label; | 261 return label; |
259 } | 262 } |
260 | 263 |
261 GtkWidget * | 264 GtkWidget * |
603 gtk_container_add(GTK_CONTAINER(sw), view); | 606 gtk_container_add(GTK_CONTAINER(sw), view); |
604 | 607 |
605 g_signal_connect(G_OBJECT(sel), "changed", G_CALLBACK(smiley_sel), NULL); | 608 g_signal_connect(G_OBJECT(sel), "changed", G_CALLBACK(smiley_sel), NULL); |
606 | 609 |
607 gtk_widget_show_all(ret); | 610 gtk_widget_show_all(ret); |
611 | |
612 gaim_set_accessible_label (view, label); | |
613 | |
608 return ret; | 614 return ret; |
609 } | 615 } |
610 | 616 |
611 static void update_color(GtkWidget *w, GtkWidget *pic) | 617 static void update_color(GtkWidget *w, GtkWidget *pic) |
612 { | 618 { |
1125 gtk_entry_set_text(GTK_ENTRY(entry), | 1131 gtk_entry_set_text(GTK_ENTRY(entry), |
1126 gaim_proxy_info_get_host(proxy_info)); | 1132 gaim_proxy_info_get_host(proxy_info)); |
1127 | 1133 |
1128 hbox = gtk_hbox_new(TRUE, 5); | 1134 hbox = gtk_hbox_new(TRUE, 5); |
1129 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | 1135 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
1136 gaim_set_accessible_label (entry, label); | |
1130 | 1137 |
1131 label = gtk_label_new_with_mnemonic(_("_Port:")); | 1138 label = gtk_label_new_with_mnemonic(_("_Port:")); |
1132 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | 1139 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
1133 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); | 1140 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); |
1134 | 1141 |
1143 g_snprintf(buf, sizeof(buf), "%d", | 1150 g_snprintf(buf, sizeof(buf), "%d", |
1144 gaim_proxy_info_get_port(proxy_info)); | 1151 gaim_proxy_info_get_port(proxy_info)); |
1145 | 1152 |
1146 gtk_entry_set_text(GTK_ENTRY(entry), buf); | 1153 gtk_entry_set_text(GTK_ENTRY(entry), buf); |
1147 } | 1154 } |
1155 gaim_set_accessible_label (entry, label); | |
1148 | 1156 |
1149 label = gtk_label_new_with_mnemonic(_("_User:")); | 1157 label = gtk_label_new_with_mnemonic(_("_User:")); |
1150 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | 1158 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
1151 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0); | 1159 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0); |
1152 | 1160 |
1160 gtk_entry_set_text(GTK_ENTRY(entry), | 1168 gtk_entry_set_text(GTK_ENTRY(entry), |
1161 gaim_proxy_info_get_username(proxy_info)); | 1169 gaim_proxy_info_get_username(proxy_info)); |
1162 | 1170 |
1163 hbox = gtk_hbox_new(TRUE, 5); | 1171 hbox = gtk_hbox_new(TRUE, 5); |
1164 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | 1172 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
1173 gaim_set_accessible_label (entry, label); | |
1165 | 1174 |
1166 label = gtk_label_new_with_mnemonic(_("Pa_ssword:")); | 1175 label = gtk_label_new_with_mnemonic(_("Pa_ssword:")); |
1167 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | 1176 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
1168 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, GTK_FILL, 0, 0, 0); | 1177 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, GTK_FILL, 0, 0, 0); |
1169 | 1178 |
1175 G_CALLBACK(proxy_print_option), (void *)PROXYPASS); | 1184 G_CALLBACK(proxy_print_option), (void *)PROXYPASS); |
1176 | 1185 |
1177 if (proxy_info != NULL && gaim_proxy_info_get_password(proxy_info) != NULL) | 1186 if (proxy_info != NULL && gaim_proxy_info_get_password(proxy_info) != NULL) |
1178 gtk_entry_set_text(GTK_ENTRY(entry), | 1187 gtk_entry_set_text(GTK_ENTRY(entry), |
1179 gaim_proxy_info_get_password(proxy_info)); | 1188 gaim_proxy_info_get_password(proxy_info)); |
1189 gaim_set_accessible_label (entry, label); | |
1180 | 1190 |
1181 gtk_widget_show_all(ret); | 1191 gtk_widget_show_all(ret); |
1182 return ret; | 1192 return ret; |
1183 } | 1193 } |
1184 | 1194 |
1292 if (browsers != NULL) { | 1302 if (browsers != NULL) { |
1293 vbox = gaim_gtk_make_frame (ret, _("Browser Options")); | 1303 vbox = gaim_gtk_make_frame (ret, _("Browser Options")); |
1294 label = gaim_gtk_prefs_checkbox(_("Open new _window by default"), | 1304 label = gaim_gtk_prefs_checkbox(_("Open new _window by default"), |
1295 "/gaim/gtk/browsers/new_window", vbox); | 1305 "/gaim/gtk/browsers/new_window", vbox); |
1296 } | 1306 } |
1307 gaim_set_accessible_label (entry, label); | |
1297 | 1308 |
1298 gtk_widget_show_all(ret); | 1309 gtk_widget_show_all(ret); |
1299 return ret; | 1310 return ret; |
1300 } | 1311 } |
1301 #endif /*_WIN32*/ | 1312 #endif /*_WIN32*/ |
1423 sound_pref_id = gaim_prefs_connect_callback("/gaim/gtk/sound/method", | 1434 sound_pref_id = gaim_prefs_connect_callback("/gaim/gtk/sound/method", |
1424 sound_changed_cb, hbox); | 1435 sound_changed_cb, hbox); |
1425 | 1436 |
1426 #endif /* _WIN32 */ | 1437 #endif /* _WIN32 */ |
1427 gtk_widget_show_all(ret); | 1438 gtk_widget_show_all(ret); |
1439 gaim_set_accessible_label (entry, label); | |
1440 | |
1428 return ret; | 1441 return ret; |
1429 } | 1442 } |
1430 | 1443 |
1431 static void | 1444 static void |
1432 auto_resp_changed_cb(const char *name, GaimPrefType type, gpointer value, | 1445 auto_resp_changed_cb(const char *name, GaimPrefType type, gpointer value, |
1522 | 1535 |
1523 if (!gaim_prefs_get_bool("/core/away/away_when_idle")) { | 1536 if (!gaim_prefs_get_bool("/core/away/away_when_idle")) { |
1524 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | 1537 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
1525 gtk_widget_set_sensitive(GTK_WIDGET(prefs_away_menu), FALSE); | 1538 gtk_widget_set_sensitive(GTK_WIDGET(prefs_away_menu), FALSE); |
1526 } | 1539 } |
1540 | |
1541 gaim_set_accessible_label (prefs_away_menu, label); | |
1527 | 1542 |
1528 gtk_widget_show_all(ret); | 1543 gtk_widget_show_all(ret); |
1529 | 1544 |
1530 return ret; | 1545 return ret; |
1531 } | 1546 } |