[gnome-contacts] main-window: Fix title in the left headerbar when selecting



commit 50d6823fc4e5094266ae21a26de9e575cc596352
Author: Lorenz Wildberg <lorenz wild-fisch de>
Date:   Mon Aug 16 10:35:14 2021 +0200

    main-window: Fix title in the left headerbar when selecting

 src/contacts-main-window.vala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/contacts-main-window.vala b/src/contacts-main-window.vala
index 0fac6017..47c67e47 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 () {


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