diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-03-02 06:49:11 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-03-02 06:49:11 +0800 |
commit | acd947f3b8d1441431a5cb0ef3c6a7274fd8a34a (patch) | |
tree | 4ef943e9c99c1381b34374c26a40604b9d407a1e /addressbook/gui/component | |
parent | 17d6ee994369ec0acf4e30cf74d251522a109890 (diff) | |
download | gsoc2013-evolution-acd947f3b8d1441431a5cb0ef3c6a7274fd8a34a.tar gsoc2013-evolution-acd947f3b8d1441431a5cb0ef3c6a7274fd8a34a.tar.gz gsoc2013-evolution-acd947f3b8d1441431a5cb0ef3c6a7274fd8a34a.tar.bz2 gsoc2013-evolution-acd947f3b8d1441431a5cb0ef3c6a7274fd8a34a.tar.lz gsoc2013-evolution-acd947f3b8d1441431a5cb0ef3c6a7274fd8a34a.tar.xz gsoc2013-evolution-acd947f3b8d1441431a5cb0ef3c6a7274fd8a34a.tar.zst gsoc2013-evolution-acd947f3b8d1441431a5cb0ef3c6a7274fd8a34a.zip |
I am an idiot.
2001-03-01 Jon Trowbridge <trow@ximian.com>
* gui/component/select-names/e-select-names-completion.c: I am an
idiot.
svn path=/trunk/; revision=8464
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-completion.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-completion.c b/addressbook/gui/component/select-names/e-select-names-completion.c index 211bf6becb..e388851ded 100644 --- a/addressbook/gui/component/select-names/e-select-names-completion.c +++ b/addressbook/gui/component/select-names/e-select-names-completion.c @@ -622,10 +622,12 @@ e_select_names_completion_seq_complete_cb (EBookView *book_view, gpointer user_d g_free (comp->priv->query_text); comp->priv->query_text = NULL; - fprintf (out, "ending search "); - if (!e_completion_searching (E_COMPLETION (comp))) + if (out) + fprintf (out, "ending search "); + if (out && !e_completion_searching (E_COMPLETION (comp))) fprintf (out, "while not searching!"); - fprintf (out, "\n"); + if (out) + fprintf (out, "\n"); e_completion_end_search (E_COMPLETION (comp)); /* That's all folks! */ /* Need to launch a new completion if another one is pending. */ @@ -671,7 +673,8 @@ e_select_names_completion_do_query (ESelectNamesCompletion *comp) comp->priv->cancelled = FALSE; - fprintf (out, "\n\n**** starting query: \"%s\"\n", comp->priv->query_text); + if (out) + fprintf (out, "\n\n**** starting query: \"%s\"\n", comp->priv->query_text); if (! e_book_get_book_view (comp->priv->book, sexp, e_select_names_completion_got_book_view_cb, comp)) { g_warning ( "exception getting book view"); @@ -709,17 +712,21 @@ e_select_names_completion_begin (ECompletion *comp, const gchar *text, gint pos, g_return_if_fail (comp != NULL); g_return_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp)); g_return_if_fail (text != NULL); - - fprintf (out, "\n\n**** requesting completion\n"); - fprintf (out, "text=\"%s\" pos=%d limit=%d\n", text, pos, limit); + + if (out) { + fprintf (out, "\n\n**** requesting completion\n"); + fprintf (out, "text=\"%s\" pos=%d limit=%d\n", text, pos, limit); + } e_select_names_model_text_pos (selcomp->priv->model, pos, &index, NULL, NULL); str = index >= 0 ? e_select_names_model_get_string (selcomp->priv->model, index) : NULL; - fprintf (out, "index=%d str=\"%s\"\n", index, str); + if (out) + fprintf (out, "index=%d str=\"%s\"\n", index, str); if (str == NULL || *str == '\0') { - fprintf (out, "aborting empty query\n"); + if (out) + fprintf (out, "aborting empty query\n"); e_completion_end_search (comp); return; } @@ -731,7 +738,8 @@ e_select_names_completion_begin (ECompletion *comp, const gchar *text, gint pos, for (k=0; override[j].text[k]; ++k) e_completion_found_match (comp, override[j].text[k]); - fprintf (out, "aborting on override \"%s\"\n", override[j].trigger); + if (out) + fprintf (out, "aborting on override \"%s\"\n", override[j].trigger); e_completion_end_search (comp); return; } @@ -750,7 +758,8 @@ e_select_names_completion_end (ECompletion *comp) g_return_if_fail (comp != NULL); g_return_if_fail (E_IS_COMPLETION (comp)); - fprintf (out, "completion ended\n"); + if (out) + fprintf (out, "completion ended\n"); } static void @@ -761,7 +770,8 @@ e_select_names_completion_cancel (ECompletion *comp) E_SELECT_NAMES_COMPLETION (comp)->priv->cancelled = TRUE; - fprintf (out, "completion cancelled\n"); + if (out) + fprintf (out, "completion cancelled\n"); } static void |