From e7b07bd91e34d1ee94da38d6a928682d0a78d8c1 Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Sun, 21 Jan 2018 11:40:21 +0100 Subject: Window: no more "Select" title in left header. Either no-one is selected => we're not in selection mode, or some people are selected => show how much (handled by the contacts_marked signal) --- src/contacts-window.vala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/contacts-window.vala') diff --git a/src/contacts-window.vala b/src/contacts-window.vala index 25ce666..36393c9 100644 --- a/src/contacts-window.vala +++ b/src/contacts-window.vala @@ -95,9 +95,7 @@ public class Contacts.Window : Gtk.ApplicationWindow { list_pane.delete_contacts.connect (list_pane_delete_contacts_cb); list_pane.contacts_marked.connect ((nr_contacts) => { - if (nr_contacts == 0) - this.left_header.title = _("Select"); - else + if (nr_contacts != 0) this.left_header.title = ngettext ("%d Selected", "%d Selected", nr_contacts) .printf (nr_contacts); }); @@ -128,7 +126,8 @@ public class Contacts.Window : Gtk.ApplicationWindow { // Selecting UI this.select_cancel_button.visible = (this.state == UiState.SELECTING); - this.left_header.title = (this.state == UiState.SELECTING)? _("Select") : _("Contacts"); + if (this.state != UiState.SELECTING) + this.left_header.title = _("Contacts"); // Editing UI this.cancel_button.visible -- cgit v1.2.1