summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-dictionary/libgdict/gdict-client-context.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/mate-dictionary/libgdict/gdict-client-context.c b/mate-dictionary/libgdict/gdict-client-context.c
index 118a0d91..af13e800 100644
--- a/mate-dictionary/libgdict/gdict-client-context.c
+++ b/mate-dictionary/libgdict/gdict-client-context.c
@@ -1395,8 +1395,6 @@ gdict_client_context_parse_line (GdictClientContext *context,
p = g_utf8_next_char (p);
GDICT_NOTE (DICT, "server replied: %d databases found", atoi (p));
-
- g_signal_emit_by_name (context, "lookup-start");
}
else if (0 == strcmp (buffer, "."))
priv->command->state = S_FINISH;
@@ -1447,8 +1445,6 @@ gdict_client_context_parse_line (GdictClientContext *context,
p = g_utf8_next_char (p);
GDICT_NOTE (DICT, "server replied: %d strategies found", atoi (p));
-
- g_signal_emit_by_name (context, "lookup-start");
}
else if (0 == strcmp (buffer, "."))
priv->command->state = S_FINISH;
@@ -1502,8 +1498,6 @@ gdict_client_context_parse_line (GdictClientContext *context,
priv->command->data = def;
priv->command->data_destroy = (GDestroyNotify) gdict_definition_unref;
-
- g_signal_emit_by_name (context, "lookup-start");
}
else if (priv->status_code == GDICT_STATUS_WORD_DB_NAME)
{
@@ -1611,8 +1605,6 @@ gdict_client_context_parse_line (GdictClientContext *context,
p = g_utf8_next_char (p);
GDICT_NOTE (DICT, "server replied: %d matches found", atoi (p));
-
- g_signal_emit_by_name (context, "lookup-start");
}
else if (0 == strcmp (buffer, "."))
priv->command->state = S_FINISH;
@@ -2046,6 +2038,8 @@ gdict_client_context_get_databases (GdictContext *context,
client_ctx = GDICT_CLIENT_CONTEXT (context);
+ g_signal_emit_by_name (context, "lookup-start");
+
if (!gdict_client_context_is_connected (client_ctx))
{
GError *connect_error = NULL;
@@ -2053,6 +2047,8 @@ gdict_client_context_get_databases (GdictContext *context,
gdict_client_context_connect (client_ctx, &connect_error);
if (connect_error)
{
+ g_signal_emit_by_name (context, "lookup-end");
+
g_propagate_error (error, connect_error);
return FALSE;
@@ -2075,6 +2071,8 @@ gdict_client_context_get_strategies (GdictContext *context,
client_ctx = GDICT_CLIENT_CONTEXT (context);
+ g_signal_emit_by_name (context, "lookup-start");
+
if (!gdict_client_context_is_connected (client_ctx))
{
GError *connect_error = NULL;
@@ -2082,6 +2080,8 @@ gdict_client_context_get_strategies (GdictContext *context,
gdict_client_context_connect (client_ctx, &connect_error);
if (connect_error)
{
+ g_signal_emit_by_name (context, "lookup-end");
+
g_propagate_error (error, connect_error);
return FALSE;
@@ -2106,6 +2106,8 @@ gdict_client_context_define_word (GdictContext *context,
client_ctx = GDICT_CLIENT_CONTEXT (context);
+ g_signal_emit_by_name (context, "lookup-start");
+
if (!gdict_client_context_is_connected (client_ctx))
{
GError *connect_error = NULL;
@@ -2113,6 +2115,8 @@ gdict_client_context_define_word (GdictContext *context,
gdict_client_context_connect (client_ctx, &connect_error);
if (connect_error)
{
+ g_signal_emit_by_name (context, "lookup-end");
+
g_propagate_error (error, connect_error);
return FALSE;
@@ -2140,6 +2144,8 @@ gdict_client_context_match_word (GdictContext *context,
client_ctx = GDICT_CLIENT_CONTEXT (context);
+ g_signal_emit_by_name (context, "lookup-start");
+
if (!gdict_client_context_is_connected (client_ctx))
{
GError *connect_error = NULL;
@@ -2147,6 +2153,8 @@ gdict_client_context_match_word (GdictContext *context,
gdict_client_context_connect (client_ctx, &connect_error);
if (connect_error)
{
+ g_signal_emit_by_name (context, "lookup-end");
+
g_propagate_error (error, connect_error);
return FALSE;