Commit 5ed961f5 authored by Jeremy Bicha's avatar Jeremy Bicha

network: Add accessibile labels to buttons in the popup dialogs

https://bugzilla.gnome.org/show_bug.cgi?id=693657
parent 7061457d
......@@ -222,6 +222,7 @@ add_address_row (CEPageIP4 *page,
gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
atk_object_set_name (gtk_widget_get_accessible (delete_button), _("Delete Address"));
gtk_button_set_image (GTK_BUTTON (delete_button), image);
gtk_grid_attach (GTK_GRID (row), delete_button, 3, 2, 1, 1);
g_object_set_data (G_OBJECT (row), "delete-button", delete_button);
......@@ -273,6 +274,7 @@ add_section_toolbar (CEPageIP4 *page, GtkWidget *section, GCallback add_cb)
button = gtk_button_new ();
g_signal_connect_swapped (button, "clicked", G_CALLBACK (add_cb), page);
image = gtk_image_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_MENU);
atk_object_set_name (gtk_widget_get_accessible (button), _("Add"));
gtk_button_set_image (GTK_BUTTON (button), image);
gtk_container_add (GTK_CONTAINER (box), button);
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (item), 1);
......@@ -354,6 +356,7 @@ add_dns_row (CEPageIP4 *page,
gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
atk_object_set_name (gtk_widget_get_accessible (delete_button), _("Delete DNS Server"));
gtk_button_set_image (GTK_BUTTON (delete_button), image);
gtk_box_pack_start (GTK_BOX (row), delete_button, FALSE, FALSE, 0);
g_object_set_data (G_OBJECT (row), "delete-button", delete_button);
......@@ -487,6 +490,7 @@ add_route_row (CEPageIP4 *page,
gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
atk_object_set_name (gtk_widget_get_accessible (delete_button), _("Delete Route"));
gtk_button_set_image (GTK_BUTTON (delete_button), image);
gtk_widget_set_halign (delete_button, GTK_ALIGN_CENTER);
gtk_widget_set_valign (delete_button, GTK_ALIGN_CENTER);
......
......@@ -223,6 +223,7 @@ add_address_row (CEPageIP6 *page,
gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
atk_object_set_name (gtk_widget_get_accessible (delete_button), _("Delete Address"));
gtk_button_set_image (GTK_BUTTON (delete_button), image);
gtk_grid_attach (GTK_GRID (row), delete_button, 3, 2, 1, 1);
g_object_set_data (G_OBJECT (row), "delete-button", delete_button);
......@@ -274,6 +275,7 @@ add_section_toolbar (CEPageIP6 *page, GtkWidget *section, GCallback add_cb)
button = gtk_button_new ();
g_signal_connect_swapped (button, "clicked", G_CALLBACK (add_cb), page);
image = gtk_image_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_MENU);
atk_object_set_name (gtk_widget_get_accessible (button), _("Add"));
gtk_button_set_image (GTK_BUTTON (button), image);
gtk_container_add (GTK_CONTAINER (box), button);
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (item), 1);
......@@ -358,6 +360,7 @@ add_dns_row (CEPageIP6 *page,
gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
atk_object_set_name (gtk_widget_get_accessible (delete_button), _("Delete DNS Server"));
gtk_button_set_image (GTK_BUTTON (delete_button), image);
gtk_box_pack_start (GTK_BOX (row), delete_button, FALSE, FALSE, 0);
g_object_set_data (G_OBJECT (row), "delete-button", delete_button);
......@@ -495,6 +498,7 @@ add_route_row (CEPageIP6 *page,
gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
atk_object_set_name (gtk_widget_get_accessible (delete_button), _("Delete Route"));
gtk_button_set_image (GTK_BUTTON (delete_button), image);
gtk_widget_set_halign (delete_button, GTK_ALIGN_CENTER);
gtk_widget_set_valign (delete_button, GTK_ALIGN_CENTER);
......
......@@ -166,6 +166,11 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<child internal-child="accessible">
<object class="AtkObject" id="auto_dns_switch-accessible">
<property name="accessible-name" translatable="yes">Automatic DNS</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
......@@ -236,6 +241,11 @@
<object class="GtkSwitch" id="auto_routes_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="auto_routes_switch-accessible">
<property name="accessible-name" translatable="yes">Automatic Routes</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
......
......@@ -166,6 +166,11 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<child internal-child="accessible">
<object class="AtkObject" id="auto_dns_switch-accessible">
<property name="accessible-name" translatable="yes">Automatic DNS</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
......@@ -236,6 +241,11 @@
<object class="GtkSwitch" id="auto_routes_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="auto_routes_switch-accessible">
<property name="accessible-name" translatable="yes">Automatic Routes</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment