[epiphany] ephy-combined-stop-reload-action: make sure we always set the initial state
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-combined-stop-reload-action: make sure we always set the initial state
- Date: Fri, 30 Dec 2011 20:43:28 +0000 (UTC)
commit c46fdcb815a5a50c248a825e59f9456e2be6c140
Author: Xan Lopez <xan igalia com>
Date: Fri Dec 30 21:42:13 2011 +0100
ephy-combined-stop-reload-action: make sure we always set the initial state
Since we were only checking the loading status, and it's FALSE by
default, the action would be empty until it was set to loading = TRUE
at least once.
src/ephy-combined-stop-reload-action.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/ephy-combined-stop-reload-action.c b/src/ephy-combined-stop-reload-action.c
index 1a19358..2ba95d4 100644
--- a/src/ephy-combined-stop-reload-action.c
+++ b/src/ephy-combined-stop-reload-action.c
@@ -64,8 +64,9 @@ ephy_combined_stop_reload_action_set_loading (EphyCombinedStopReloadAction *acti
gboolean loading)
{
EphyCombinedStopReloadActionEnum action_enum;
+ EphyCombinedStopReloadActionPrivate *priv = action->priv;
- if (action->priv->loading == loading)
+ if (priv->loading == loading && priv->action_handler_id)
return;
action_enum = loading ?
@@ -77,14 +78,14 @@ ephy_combined_stop_reload_action_set_loading (EphyCombinedStopReloadAction *acti
"tooltip", combined_stop_reload_action_entries[action_enum].tooltip,
NULL);
- if (action->priv->action_handler_id)
- g_signal_handler_disconnect (action, action->priv->action_handler_id);
+ if (priv->action_handler_id)
+ g_signal_handler_disconnect (action, priv->action_handler_id);
- action->priv->action_handler_id = g_signal_connect (action, "activate",
- combined_stop_reload_action_entries[action_enum].callback,
- action->priv->window);
+ priv->action_handler_id = g_signal_connect (action, "activate",
+ combined_stop_reload_action_entries[action_enum].callback,
+ priv->window);
- action->priv->loading = loading;
+ priv->loading = loading;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]