ComposerLinkPopover UI polish.

* src/client/composer/composer-link-popover.vala
  (ComposerLinkPopover::show): Focus URL entry on being shown.

* ui/composer-link-popover.ui: Replace URL entry text label with an
  accessibility name. Refine the tooltip for the insert button, add notes
  to translators about it.
This commit is contained in:
Michael James Gratton 2017-01-30 00:33:50 +11:00
parent 5163b5198d
commit 8bf68bd345
2 changed files with 32 additions and 37 deletions

View file

@ -88,8 +88,9 @@ public class ComposerLinkPopover : Gtk.Popover {
);
}
~ComposerLinkPopover() {
debug("Destructing...");
public override void show() {
base.show();
this.url.grab_focus();
}
public override void destroy() {

View file

@ -15,17 +15,6 @@
<property name="margin_bottom">6</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Link URL:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="url">
<property name="visible">True</property>
@ -40,7 +29,7 @@
<signal name="changed" handler="on_url_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
@ -49,7 +38,32 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Insert a new link with this URL</property>
<property name="tooltip_text" translatable="yes" comments="Note that this button and the Update button will never be shown at the same time to the user.">Insert the new link with this URL</property>
<signal name="clicked" handler="on_activate_popover" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">emblem-ok-symbolic</property>
</object>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="insert-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Link URL</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="update">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" comments="Note that this button and the Insert button will never be shown at the same time to the user.">Update this links URL</property>
<signal name="clicked" handler="on_activate_popover" swapped="no"/>
<child>
<object class="GtkImage">
@ -64,26 +78,6 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="update">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Update the link URL</property>
<signal name="clicked" handler="on_activate_popover" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">emblem-ok-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="delete">
<property name="visible">True</property>
@ -100,7 +94,7 @@
</child>
</object>
<packing>
<property name="left_attach">4</property>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
</packing>
</child>
@ -120,7 +114,7 @@
</child>
</object>
<packing>
<property name="left_attach">5</property>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
</packing>
</child>