[geary/wip/728002-webkit2] ComposerLinkPopover UI polish.



commit c498e373f46643d2f2f1e5ebeabcbe2685094e5f
Author: Michael James Gratton <mike vee net>
Date:   Mon Jan 30 00:33:50 2017 +1100

    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.

 src/client/composer/composer-link-popover.vala |    5 ++-
 ui/composer-link-popover.ui                    |   30 +++++++++--------------
 2 files changed, 15 insertions(+), 20 deletions(-)
---
diff --git a/src/client/composer/composer-link-popover.vala b/src/client/composer/composer-link-popover.vala
index d51d312..3a763df 100644
--- a/src/client/composer/composer-link-popover.vala
+++ b/src/client/composer/composer-link-popover.vala
@@ -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() {
diff --git a/ui/composer-link-popover.ui b/ui/composer-link-popover.ui
index 6ed29c7..24d71d2 100644
--- a/ui/composer-link-popover.ui
+++ b/ui/composer-link-popover.ui
@@ -16,17 +16,6 @@
         <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>
             <property name="can_focus">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,7 @@
             <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">
@@ -58,9 +47,14 @@
                 <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">2</property>
+            <property name="left_attach">1</property>
             <property name="top_attach">0</property>
           </packing>
         </child>
@@ -69,7 +63,7 @@
             <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>
+            <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 link’s URL</property>
             <signal name="clicked" handler="on_activate_popover" swapped="no"/>
             <child>
               <object class="GtkImage">
@@ -80,7 +74,7 @@
             </child>
           </object>
           <packing>
-            <property name="left_attach">3</property>
+            <property name="left_attach">2</property>
             <property name="top_attach">0</property>
           </packing>
         </child>
@@ -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>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]