diff options
author | Not Zed <NotZed@Ximian.com> | 2004-06-23 16:08:40 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-06-23 16:08:40 +0800 |
commit | 4b2eddbec72f5e72166bcc7ee3dfd1f1d68c28e8 (patch) | |
tree | efa26c23e8a19945bc58f52a76b82553a9e84a93 /mail | |
parent | 84b8798d7b6db9c77f38aa91e3855a64e862bc45 (diff) | |
download | gsoc2013-evolution-4b2eddbec72f5e72166bcc7ee3dfd1f1d68c28e8.tar.gz gsoc2013-evolution-4b2eddbec72f5e72166bcc7ee3dfd1f1d68c28e8.tar.zst gsoc2013-evolution-4b2eddbec72f5e72166bcc7ee3dfd1f1d68c28e8.zip |
** See #54030.
2004-06-23 Not Zed <NotZed@Ximian.com>
** See #54030.
* e-searching-tokenizer.c (e_searching_tokenizer_match_count):
only return a count if we're using the primary search string.
* em-format-html-display.c (efhd_search_response): set the primary
search string to NULL instead of resetting it.
(efhd_update_search): dont noop if we have a null search text,
just set an empty search.
* e-searching-tokenizer.c (e_searching_tokenizer_reset): remove
this, revert jeff's fixes for 54030. this is incomplete and so
doesn't work either (search text stays remembered and secondary
search text lost too).
** See #60523.
* em-folder-view.c (emfv_finalise): unhook the folder changed
before destroying the async thing, and move it all to destroy
event anyway.
(emfv_destroy): as above.
svn path=/trunk/; revision=26472
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 24 | ||||
-rw-r--r-- | mail/e-searching-tokenizer.c | 14 | ||||
-rw-r--r-- | mail/e-searching-tokenizer.h | 3 | ||||
-rw-r--r-- | mail/em-folder-view.c | 24 | ||||
-rw-r--r-- | mail/em-format-html-display.c | 5 |
5 files changed, 42 insertions, 28 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index c25b0cde45..84de1ba05c 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,27 @@ +2004-06-23 Not Zed <NotZed@Ximian.com> + + ** See #54030. + + * e-searching-tokenizer.c (e_searching_tokenizer_match_count): + only return a count if we're using the primary search string. + + * em-format-html-display.c (efhd_search_response): set the primary + search string to NULL instead of resetting it. + (efhd_update_search): dont noop if we have a null search text, + just set an empty search. + + * e-searching-tokenizer.c (e_searching_tokenizer_reset): remove + this, revert jeff's fixes for 54030. this is incomplete and so + doesn't work either (search text stays remembered and secondary + search text lost too). + + ** See #60523. + + * em-folder-view.c (emfv_finalise): unhook the folder changed + before destroying the async thing, and move it all to destroy + event anyway. + (emfv_destroy): as above. + 2004-06-22 Jeffrey Stedfast <fejj@novell.com> * em-folder-tree-model.c (sort_cb): Same as below. diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c index 020d4d2fe4..d7d30801d9 100644 --- a/mail/e-searching-tokenizer.c +++ b/mail/e-searching-tokenizer.c @@ -1139,7 +1139,7 @@ e_searching_tokenizer_next_token (HTMLTokenizer *tok) oldmatched = st->priv->engine->matchcount; token = searcher_next_token(st->priv->engine); - + /* not sure if this has to be accurate or just say we had some matches */ if (oldmatched != st->priv->engine->matchcount) g_signal_emit (st, signals[MATCH_SIGNAL], 0); @@ -1239,22 +1239,14 @@ e_searching_tokenizer_set_secondary_case_sensitivity (ESearchingTokenizer *st, g search_info_set_flags(st->priv->secondary, iscase?SEARCH_CASE:0, SEARCH_CASE); } +/* Note: only returns the primary search string count */ gint e_searching_tokenizer_match_count (ESearchingTokenizer *st) { g_return_val_if_fail (E_IS_SEARCHING_TOKENIZER (st), -1); - if (st->priv->engine) + if (st->priv->engine && st->priv->primary->strv->len) return st->priv->engine->matchcount; return 0; } - -void -e_searching_tokenizer_reset (ESearchingTokenizer *st) -{ - if (st->priv->engine) { - searcher_free (st->priv->engine); - st->priv->engine = NULL; - } -} diff --git a/mail/e-searching-tokenizer.h b/mail/e-searching-tokenizer.h index d0546a0557..b6d04eeb29 100644 --- a/mail/e-searching-tokenizer.h +++ b/mail/e-searching-tokenizer.h @@ -70,7 +70,4 @@ void e_searching_tokenizer_set_secondary_case_sensitivity (ESearchingTokenizer * int e_searching_tokenizer_match_count (ESearchingTokenizer *); -void e_searching_tokenizer_reset (ESearchingTokenizer *); - - #endif /* __E_SEARCHING_TOKENIZER_H__ */ diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index b5222f7b6c..71e24a3d40 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -203,16 +203,6 @@ emfv_finalise(GObject *o) EMFolderView *emfv = (EMFolderView *)o; struct _EMFolderViewPrivate *p = emfv->priv; - if (emfv->async) - mail_async_event_destroy(emfv->async); - - if (emfv->folder) { - if (p->folder_changed_id) - camel_object_remove_event(emfv->folder, p->folder_changed_id); - camel_object_unref(emfv->folder); - g_free(emfv->folder_uri); - } - g_slist_free(emfv->ui_files); g_slist_free(emfv->enable_map); @@ -240,6 +230,20 @@ emfv_destroy (GtkObject *o) g_object_unref(gconf); } + if (emfv->folder) { + if (p->folder_changed_id) + camel_object_remove_event(emfv->folder, p->folder_changed_id); + camel_object_unref(emfv->folder); + g_free(emfv->folder_uri); + emfv->folder = NULL; + emfv->folder_uri = NULL; + } + + if (emfv->async) { + mail_async_event_destroy(emfv->async); + emfv->async = NULL; + } + if (p->invisible) { g_object_unref(p->invisible); p->invisible = NULL; diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index ee02347d08..a55189d644 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -423,9 +423,6 @@ efhd_update_search(EMFormatHTMLDisplay *efhd) GSList *words = NULL; int flags = 0; - if (p->search_text == NULL) - return; - if (!gtk_toggle_button_get_active((GtkToggleButton *)p->search_case_check)) flags = EM_FORMAT_HTML_DISPLAY_SEARCH_ICASE | EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY; else @@ -465,8 +462,8 @@ efhd_search_response(GtkWidget *w, int button, EMFormatHTMLDisplay *efhd) g_free(p->search_text); p->search_text = NULL; gtk_widget_destroy((GtkWidget *)p->search_dialog); - e_searching_tokenizer_reset (efhd->search_tok); p->search_dialog = NULL; + em_format_html_display_set_search(efhd, EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY, NULL); } } |