Make labels in contact-sheet selectable

Right now to be able to copy & paste a name, address or telephone
number one has to change to edit mode, select the text and then
copy it. This is not a good UI, therefor thes patch makes the labels
in the contact-sheet selectable. This way the user doesn't have to
change to edit mode to be able to copy & paste the information.
This commit is contained in:
Jeena 2017-08-15 16:53:05 +02:00
parent f61ab617f6
commit ef97da75e6

View file

@ -76,6 +76,7 @@ public class Contacts.ContactSheet : Grid {
value_label.set_halign (Align.START);
value_label.set_ellipsize (Pango.EllipsizeMode.END);
value_label.wrap_mode = Pango.WrapMode.CHAR;
value_label.set_selectable (true);
/* FIXME: hardcode gap to match the button size */
type_label.margin_top = 3;
@ -111,6 +112,7 @@ public class Contacts.ContactSheet : Grid {
name_label.margin_start = 6;
name_label.set_ellipsize (Pango.EllipsizeMode.END);
name_label.xalign = 0.0f;
name_label.set_selectable (true);
c.keep_widget_uptodate (name_label, (w) => {
(w as Label).set_markup (Markup.printf_escaped ("<span font='16'>%s</span>", c.display_name));