diff options
author | nobody <nobody@localhost> | 2002-01-25 03:01:46 +0800 |
---|---|---|
committer | nobody <nobody@localhost> | 2002-01-25 03:01:46 +0800 |
commit | 76bbd700763e4b45614df6ad6174fe831ddb932e (patch) | |
tree | 46b61771dcad0f9692e7f34c7627f05edb733c6b /addressbook/gui/component/addressbook.c | |
parent | 7c9e80dd308222afbdec1068a925e4800f13dfb5 (diff) | |
download | gsoc2013-evolution-EVOLUTION_1_0_2.tar gsoc2013-evolution-EVOLUTION_1_0_2.tar.gz gsoc2013-evolution-EVOLUTION_1_0_2.tar.bz2 gsoc2013-evolution-EVOLUTION_1_0_2.tar.lz gsoc2013-evolution-EVOLUTION_1_0_2.tar.xz gsoc2013-evolution-EVOLUTION_1_0_2.tar.zst gsoc2013-evolution-EVOLUTION_1_0_2.zip |
This commit was manufactured by cvs2svn to create tagEVOLUTION_1_0_2
'EVOLUTION_1_0_2'.
svn path=/tags/EVOLUTION_1_0_2/; revision=15455
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r-- | addressbook/gui/component/addressbook.c | 53 |
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", |