[gnome-contacts] Remove favourites support



commit 505ff2ad38b0df95c60b523abd657b0fd66e1cc5
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Jun 7 15:12:15 2011 +0200

    Remove favourites support

 src/Makefile.am                  |    1 -
 src/contacts-app.vala            |   18 ---------------
 src/contacts-starred-button.vala |   44 --------------------------------------
 src/contacts-store.vala          |   13 -----------
 4 files changed, 0 insertions(+), 76 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 4df38bf..7d1cee8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,7 +18,6 @@ bin_PROGRAMS = gnome-contacts
 gnome_contacts_SOURCES = \
 	contacts-app.vala \
 	contacts-contact.vala \
-	contacts-starred-button.vala \
 	contacts-menu-button.vala \
 	contacts-hover-image.vala \
 	contacts-store.vala \
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index cd7f04a..b5c6b80 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -96,10 +96,6 @@ public class Contacts.App : Window {
     tree_view.append_column (column);
   }
 
-  private void favourites_button_toggled (ToggleToolButton toggle_button) {
-    contacts_store.set_filter_favourites (toggle_button.get_active ());
-  }
-
   private void filter_entry_changed (Editable editable) {
     string []? values;
     string str = filter_entry.get_text ();
@@ -251,13 +247,6 @@ public class Contacts.App : Window {
     l.set_halign (Align.START);
     g.attach (l,  1, 2, 1, 1);
 
-    var starred = new StarredButton ();
-    starred.set_active (contact.individual.is_favourite);
-    starred.set_hexpand (false);
-    starred.set_vexpand (false);
-    starred.set_valign (Align.START);
-    card_grid.attach (starred, 2, 0, 1, 1);
-
     DetailsRow row;
     var emails = contact.individual.email_addresses;
     if (!emails.is_empty) {
@@ -438,13 +427,6 @@ public class Contacts.App : Window {
     toolbar.set_icon_size (IconSize.MENU);
     toolbar.set_vexpand (false);
 
-    var favourite_button = new ToggleToolButton ();
-    favourite_button.set_icon_name ("user-bookmarks-symbolic");
-    favourite_button.get_style_context ().add_class (STYLE_CLASS_RAISED);
-    favourite_button.is_important = false;
-    toolbar.add (favourite_button);
-    favourite_button.toggled.connect (favourites_button_toggled);
-
     var separator = new SeparatorToolItem ();
     separator.set_draw (false);
     toolbar.add (separator);
diff --git a/src/contacts-store.vala b/src/contacts-store.vala
index aa92166..eff16fa 100644
--- a/src/contacts-store.vala
+++ b/src/contacts-store.vala
@@ -31,12 +31,10 @@ public class Contacts.Store  {
 	ListStore list_store;
 	Gee.ArrayList<ContactData> contacts;
 	string []? filter_values;
-	bool filter_favourites;
 
 	public Store () {
 		list_store = new ListStore (2, typeof (Contact), typeof (ContactData *));
 		contacts = new Gee.ArrayList<ContactData>();
-		filter_favourites = false;
 
 		list_store.set_sort_func (0, (model, iter_a, iter_b) => {
 				Contact a, b;
@@ -50,9 +48,6 @@ public class Contacts.Store  {
 	public TreeModel model { get { return list_store; } }
 
 	private bool apply_filter (Contact contact) {
-		if (filter_favourites && !contact.individual.is_favourite)
-			return false;
-
 		if (filter_values == null || filter_values.length == 0)
 			return true;
 
@@ -153,14 +148,6 @@ public class Contacts.Store  {
 		}
 	}
 
-	public void set_filter_favourites (bool filter) {
-		if (filter_favourites == filter)
-			return;
-
-		filter_favourites = filter;
-		refilter ();
-	}
-
 	public void set_filter_values (string []? values) {
 		filter_values = values;
 		refilter ();



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