aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-12-04 19:42:49 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-12-04 19:42:49 +0800
commitdc0d0ee010319425b19d8d8d493f0bc489d5fd07 (patch)
tree19d4f0e1b3f04bcc09d96ecca5fbe27bc5c98e5f /addressbook
parent6375ba9a6cf327e665d98c5820992ab7fb80a6d0 (diff)
downloadgsoc2013-evolution-dc0d0ee010319425b19d8d8d493f0bc489d5fd07.tar
gsoc2013-evolution-dc0d0ee010319425b19d8d8d493f0bc489d5fd07.tar.gz
gsoc2013-evolution-dc0d0ee010319425b19d8d8d493f0bc489d5fd07.tar.bz2
gsoc2013-evolution-dc0d0ee010319425b19d8d8d493f0bc489d5fd07.tar.lz
gsoc2013-evolution-dc0d0ee010319425b19d8d8d493f0bc489d5fd07.tar.xz
gsoc2013-evolution-dc0d0ee010319425b19d8d8d493f0bc489d5fd07.tar.zst
gsoc2013-evolution-dc0d0ee010319425b19d8d8d493f0bc489d5fd07.zip
Implement bug #263268 - Contact categories need to be able to be filtered by
"not categorized". Also fix a crasher. svn path=/branches/kill-bonobo/; revision=36831
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/component/e-book-shell-view-actions.c12
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.c9
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.h3
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c7
4 files changed, 26 insertions, 5 deletions
diff --git a/addressbook/gui/component/e-book-shell-view-actions.c b/addressbook/gui/component/e-book-shell-view-actions.c
index 646715d88a..457f15cf1b 100644
--- a/addressbook/gui/component/e-book-shell-view-actions.c
+++ b/addressbook/gui/component/e-book-shell-view-actions.c
@@ -753,7 +753,14 @@ static GtkRadioActionEntry contact_filter_entries[] = {
N_("Any Category"),
NULL,
NULL,
- CONTACT_FILTER_ANY_CATEGORY }
+ CONTACT_FILTER_ANY_CATEGORY },
+
+ { "contact-filter-unmatched",
+ NULL,
+ N_("Unmatched"),
+ NULL,
+ NULL,
+ CONTACT_FILTER_UNMATCHED }
};
static GtkRadioActionEntry contact_search_entries[] = {
@@ -898,4 +905,7 @@ e_book_shell_view_update_search_filter (EBookShellView *book_shell_view)
/* Use any action in the group; doesn't matter which. */
e_shell_content_set_filter_action (shell_content, radio_action);
+
+ ii = CONTACT_FILTER_UNMATCHED;
+ e_shell_content_add_filter_separator_after (shell_content, ii);
}
diff --git a/addressbook/gui/component/e-book-shell-view-private.c b/addressbook/gui/component/e-book-shell-view-private.c
index 521260bdeb..509547c6c0 100644
--- a/addressbook/gui/component/e-book-shell-view-private.c
+++ b/addressbook/gui/component/e-book-shell-view-private.c
@@ -575,6 +575,15 @@ e_book_shell_view_execute_search (EBookShellView *book_shell_view)
case CONTACT_FILTER_ANY_CATEGORY:
break;
+ case CONTACT_FILTER_UNMATCHED:
+ temp = g_strdup_printf (
+ "(and (not (and (exists \"CATEGORIES\") "
+ "(not (is \"CATEGORIES\" \"\")))) %s)",
+ query);
+ g_free (query);
+ query = temp;
+ break;
+
default:
{
GList *categories;
diff --git a/addressbook/gui/component/e-book-shell-view-private.h b/addressbook/gui/component/e-book-shell-view-private.h
index 9bb4f91a22..0079ca3ec2 100644
--- a/addressbook/gui/component/e-book-shell-view-private.h
+++ b/addressbook/gui/component/e-book-shell-view-private.h
@@ -78,7 +78,8 @@ struct _EditorUidClosure {
/* List these in the order to be displayed.
* Positive values are reserved for categories. */
enum {
- CONTACT_FILTER_ANY_CATEGORY = -1
+ CONTACT_FILTER_ANY_CATEGORY = -2,
+ CONTACT_FILTER_UNMATCHED = -1
};
/* List these in the order to be displayed. */
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 216a7c77a6..a979e5a1cb 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -666,9 +666,10 @@ addressbook_view_class_init (EAddressbookViewClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EAddressbookViewClass, open_contact),
NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1,
- E_TYPE_CONTACT);
+ e_marshal_VOID__OBJECT_BOOLEAN,
+ G_TYPE_NONE, 2,
+ E_TYPE_CONTACT,
+ G_TYPE_BOOLEAN);
signals[POPUP_EVENT] = g_signal_new (
"popup-event",