aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r--addressbook/gui/component/addressbook.c53
1 files changed, 12 insertions, 41 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 93c3bdf246..619a89cdd5 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -66,7 +66,6 @@ typedef struct {
BonoboPropertyBag *properties;
char *uri;
char *passwd;
- gboolean ignore_search_changes;
} AddressbookView;
static void addressbook_view_ref (AddressbookView *);
@@ -115,14 +114,6 @@ save_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-view_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- e_addressbook_view_view(view->view);
-}
-
-static void
config_cb (BonoboUIComponent *uih, void *user_data, const char *path)
{
addressbook_config (NULL /* XXX */);
@@ -251,10 +242,6 @@ update_command_state (EAddressbookView *eav, AddressbookView *view)
"/commands/ContactsSaveAsVCard",
"sensitive",
e_addressbook_view_can_save_as (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsView",
- "sensitive",
- e_addressbook_view_can_view (view->view) ? "1" : "0", NULL);
/* Print Contact */
bonobo_ui_component_set_prop (uic,
@@ -323,7 +310,6 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_UNSAFE_VERB ("ContactsPrint", print_cb),
BONOBO_UI_UNSAFE_VERB ("ContactsPrintPreview", print_preview_cb),
BONOBO_UI_UNSAFE_VERB ("ContactsSaveAsVCard", save_contact_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactsView", view_contact_cb),
BONOBO_UI_UNSAFE_VERB ("ToolSearch", search_cb),
BONOBO_UI_UNSAFE_VERB ("AddressbookConfig", config_cb),
@@ -828,28 +814,23 @@ static ESearchBarItem addressbook_search_option_items[] = {
};
static void
-alphabet_state_changed (EAddressbookView *eav, gunichar letter, AddressbookView *view)
-{
- view->ignore_search_changes = TRUE;
- if (letter == 0) {
- e_search_bar_set_item_id (view->search, ESB_ANY);
- e_search_bar_set_text (view->search, "");
- } else {
- e_search_bar_set_item_id (view->search, ESB_ADVANCED);
- }
- view->ignore_search_changes = FALSE;
-}
-
-static void
addressbook_menu_activated (ESearchBar *esb, int id, AddressbookView *view)
{
switch (id) {
case E_FILTERBAR_RESET_ID:
/* e_addressbook_view_show_all(view->view); */
- view->ignore_search_changes = TRUE;
- e_search_bar_set_item_id (view->search, ESB_ANY);
- view->ignore_search_changes = FALSE;
- e_search_bar_set_text (esb, "");
+
+ /* Fix option menu if we are using "Category is" */
+ if (e_search_bar_get_item_id (esb) == ESB_CATEGORY) {
+
+ e_search_bar_set_subitem_id (esb, G_MAXINT);
+
+ } else {
+
+ e_search_bar_set_text (esb, "");
+
+ }
+
break;
}
}
@@ -862,10 +843,6 @@ addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
const char *category_name;
int search_type, subid;
- if (view->ignore_search_changes) {
- return;
- }
-
gtk_object_get(GTK_OBJECT(esb),
"text", &search_word,
"item_id", &search_type,
@@ -1093,7 +1070,6 @@ addressbook_factory_new_control (void)
view = g_new0 (AddressbookView, 1);
view->refs = 1;
- view->ignore_search_changes = FALSE;
view->vbox = gtk_vbox_new (FALSE, 0);
@@ -1153,11 +1129,6 @@ addressbook_factory_new_control (void)
GTK_SIGNAL_FUNC(update_command_state),
view);
- gtk_signal_connect (GTK_OBJECT (view->view),
- "alphabet_state_change",
- GTK_SIGNAL_FUNC(alphabet_state_changed),
- view);
-
view->uri = NULL;
gtk_signal_connect (GTK_OBJECT (view->control), "activate",