left-header-bar: use proper title in selection-mode
This commit is contained in:
parent
b446dc65a0
commit
a23002e7d7
2 changed files with 10 additions and 0 deletions
|
@ -256,6 +256,12 @@ public class Contacts.App : Gtk.Application {
|
|||
list_pane.selection_changed.connect (selection_changed);
|
||||
list_pane.link_contacts.connect (link_contacts);
|
||||
list_pane.delete_contacts.connect (delete_contacts);
|
||||
list_pane.contacts_marked.connect ((nr_contacts) => {
|
||||
if (nr_contacts == 0)
|
||||
window.left_toolbar.set_title (_("Select"));
|
||||
else
|
||||
window.left_toolbar.set_title (_("%d Selected").printf (nr_contacts));
|
||||
});
|
||||
|
||||
grid.attach (list_pane, 0, 1, 1, 1);
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@ public class Contacts.ListPane : Frame {
|
|||
public signal void link_contacts (LinkedList<Contact> contacts_list);
|
||||
public signal void delete_contacts (LinkedList<Contact> contacts_list);
|
||||
|
||||
public signal void contacts_marked (int contacts_marked);
|
||||
|
||||
public void refilter () {
|
||||
string []? values;
|
||||
string str = filter_entry.get_text ();
|
||||
|
@ -148,6 +150,8 @@ public class Contacts.ListPane : Frame {
|
|||
link_selected_button.set_sensitive (true);
|
||||
else
|
||||
link_selected_button.set_sensitive (false);
|
||||
|
||||
contacts_marked (nr_contacts_marked);
|
||||
});
|
||||
|
||||
link_selected_button.clicked.connect (() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue