[gnome-contacts] contact-sheet: stop cursor from appearing in contact pane values



commit 815bf6c97b6ae95ca3cb59d535a4066710195650
Author: Eric Daigle <daigle e outlook com>
Date:   Sun Feb 14 14:12:58 2021 -0500

    contact-sheet: stop cursor from appearing in contact pane values
    
    As described in #199, clicking anywhere on a value in the selected contact pane
    (such as the contact's name or email address) causes a cursor to appear
    after the character which was clicked, making the value look editable.
    
    Set the name and row value labels' can_focus attribute, to false
    stopping the cursor from appearing (as expected).
    
    Fixes #199

 src/contacts-contact-sheet.vala | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala
index 3c622fc7..39791bb1 100644
--- a/src/contacts-contact-sheet.vala
+++ b/src/contacts-contact-sheet.vala
@@ -90,6 +90,7 @@ public class Contacts.ContactSheet : Gtk.Grid {
     value_label.set_ellipsize (Pango.EllipsizeMode.END);
     value_label.wrap_mode = Pango.WrapMode.CHAR;
     value_label.set_selectable (true);
+    value_label.set_can_focus (false);
 
     if (btn1 != null || btn2 !=null) {
       var value_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
@@ -155,6 +156,7 @@ public class Contacts.ContactSheet : Gtk.Grid {
     name_label.ellipsize = Pango.EllipsizeMode.END;
     name_label.xalign = 0f;
     name_label.selectable = true;
+    name_label.set_can_focus (false);
     this.attach (name_label,  1, 0, 1, 3);
     update_name_label (name_label);
     this.individual.notify["display-name"].connect ((obj, spec) => {


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