summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Wildberg <lorenz@wild-fisch.de>2021-08-16 10:35:14 +0200
committerNiels De Graef <nielsdegraef@gmail.com>2021-08-20 11:34:23 +0000
commit50d6823fc4e5094266ae21a26de9e575cc596352 (patch)
treea4207e01c1cf229ef2912289e4e8bb0c3195347b
parentec6c52706e1882d897463517e1b5cf9cc3c67c4f (diff)
downloadgnome-contacts-50d6823fc4e5094266ae21a26de9e575cc596352.tar.gz
main-window: Fix title in the left headerbar when selecting
-rw-r--r--src/contacts-main-window.vala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/contacts-main-window.vala b/src/contacts-main-window.vala
index 0fac601..47c67e4 100644
--- a/src/contacts-main-window.vala
+++ b/src/contacts-main-window.vala
@@ -196,7 +196,7 @@ public class Contacts.MainWindow : Hdy.ApplicationWindow {
list_pane.delete_contacts.connect (delete_contacts);
list_pane.contacts_marked.connect ((nr_contacts) => {
- if (nr_contacts != 0)
+ if (this.state == UiState.SELECTING)
this.left_header.title = ngettext ("%d Selected", "%d Selected", nr_contacts)
.printf (nr_contacts);
else
@@ -300,6 +300,8 @@ public class Contacts.MainWindow : Hdy.ApplicationWindow {
[GtkCallback]
private void on_selection_button_clicked () {
this.state = UiState.SELECTING;
+ this.left_header.title = ngettext ("%d Selected", "%d Selected", 0)
+ .printf (0);
}
private void unlink_contact () {