diff options
author | Xan Lopez <xan@igalia.com> | 2011-12-31 04:42:13 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2011-12-31 04:42:13 +0800 |
commit | c46fdcb815a5a50c248a825e59f9456e2be6c140 (patch) | |
tree | 6ec1f956f6b505986eea02eb3e04dc1f9e3dffb5 /src | |
parent | da6fe79eb72e076b5accd13af7654fe9ffa5516c (diff) | |
download | gsoc2013-epiphany-c46fdcb815a5a50c248a825e59f9456e2be6c140.tar gsoc2013-epiphany-c46fdcb815a5a50c248a825e59f9456e2be6c140.tar.gz gsoc2013-epiphany-c46fdcb815a5a50c248a825e59f9456e2be6c140.tar.bz2 gsoc2013-epiphany-c46fdcb815a5a50c248a825e59f9456e2be6c140.tar.lz gsoc2013-epiphany-c46fdcb815a5a50c248a825e59f9456e2be6c140.tar.xz gsoc2013-epiphany-c46fdcb815a5a50c248a825e59f9456e2be6c140.tar.zst gsoc2013-epiphany-c46fdcb815a5a50c248a825e59f9456e2be6c140.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | 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 1a19358e0..2ba95d42c 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 |