aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-08-31 23:43:50 +0800
committerXan Lopez <xan@igalia.com>2012-08-31 23:46:02 +0800
commitc9644b2636ccd87a116f303fd0373c89950629ae (patch)
tree57e4d874f949410dbe9c048d6fbc4738e908c164
parent185dab41758fee4ee291d714ae8dc237316752e3 (diff)
downloadgsoc2013-epiphany-c9644b2636ccd87a116f303fd0373c89950629ae.tar.gz
gsoc2013-epiphany-c9644b2636ccd87a116f303fd0373c89950629ae.tar.zst
gsoc2013-epiphany-c9644b2636ccd87a116f303fd0373c89950629ae.zip
ephy-history-service: fix CLEAR signal emission
We were only emitting it if we happened to have a callback method associated with the history message, that does not make sense.
-rw-r--r--lib/history/ephy-history-service.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 9c5d72ebb..64b1760cc 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -425,13 +425,15 @@ ephy_history_service_execute_job_callback (gpointer data)
{
EphyHistoryServiceMessage *message = (EphyHistoryServiceMessage*) data;
- g_assert (message->callback);
+ g_assert (message->callback || message->type == CLEAR);
if (g_cancellable_is_cancelled (message->cancellable)) {
ephy_history_service_message_free (message);
return FALSE;
}
- message->callback (message->service, message->success, message->result, message->user_data);
+
+ if (message->callback)
+ message->callback (message->service, message->success, message->result, message->user_data);
if (message->type == CLEAR)
g_signal_emit (message->service, signals[CLEARED], 0);
@@ -967,7 +969,7 @@ ephy_history_service_process_message (EphyHistoryService *self,
message->result = NULL;
message->success = method (message->service, message->method_argument, &message->result);
- if (message->callback)
+ if (message->callback || message->type == CLEAR)
g_idle_add ((GSourceFunc)ephy_history_service_execute_job_callback, message);
else
ephy_history_service_message_free (message);