diff options
author | Erick Pérez Castellanos <erick.red@gmail.com> | 2013-02-05 11:20:37 -0500 |
---|---|---|
committer | Erick Pérez Castellanos <erick.red@gmail.com> | 2013-02-06 17:11:43 -0500 |
commit | 472eb599028328ea0c2fc162657ebca179d24c16 (patch) | |
tree | 118765b432bd11b8f2c3338eed588cd0bf6a375b /src/contacts-list-pane.vala | |
parent | 76be90b7c755ed7b33593076bfffd603f8ba8807 (diff) | |
download | gnome-contacts-472eb599028328ea0c2fc162657ebca179d24c16.tar.gz |
Added selection-mode skel.
Added select button to the toolbar.
Added selection-toolbar.
Added some mechanics.
Diffstat (limited to 'src/contacts-list-pane.vala')
-rw-r--r-- | src/contacts-list-pane.vala | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/contacts-list-pane.vala b/src/contacts-list-pane.vala index cf2d222..f560c57 100644 --- a/src/contacts-list-pane.vala +++ b/src/contacts-list-pane.vala @@ -21,8 +21,11 @@ using Folks; public class Contacts.ListPane : Frame { private Store contacts_store; - private View contacts_view; + public Entry filter_entry; + private View contacts_view; + private Gd.MainToolbar selection_toolbar; + private uint filter_entry_changed_id; private bool ignore_selection_change; private bool search_visible; @@ -117,9 +120,25 @@ public class Contacts.ListPane : Frame { grid.add (toolbar); grid.add (scrolled); + selection_toolbar = new Gd.MainToolbar (); + selection_toolbar.get_style_context ().add_class (STYLE_CLASS_MENUBAR); + selection_toolbar.get_style_context ().add_class ("contacts-selection-toolbar"); + selection_toolbar.set_vexpand (false); + + var link_selected_button = selection_toolbar.add_button (null, _("Link"), true) as Gtk.Button; + link_selected_button.set_size_request (70, -1); + link_selected_button.set_sensitive (false); + var delete_selected_button = selection_toolbar.add_button (null, _("Delete"), false) as Gtk.Button; + delete_selected_button.set_size_request (70, -1); + delete_selected_button.set_sensitive (false); + + grid.add (selection_toolbar); + this.show_all (); + this.set_no_show_all (true); scrolled.show (); + selection_toolbar.hide (); } public void select_contact (Contact contact, bool ignore_change = false) { @@ -131,9 +150,11 @@ public class Contacts.ListPane : Frame { public void show_selection () { contacts_view.show_selectors (); + selection_toolbar.show (); } public void hide_selection () { contacts_view.hide_selectors (); + selection_toolbar.hide (); } } |