[Xfce4-commits] [apps/xfdashboard] 01/01: Block 'toggled' signal handler at stage when a view is activated otherwise this signal handler will enforce the windows view or applications view being shown depending on the toggle state of application button in quicklaunch.

noreply at xfce.org noreply at xfce.org
Fri Oct 23 20:05:46 CEST 2015


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit caeed161c40eb206469c876e95d15eac8aac46bb
Author: Stephan Haller <nomad at froevel.de>
Date:   Fri Oct 23 20:03:08 2015 +0200

    Block 'toggled' signal handler at stage when a view is activated otherwise this signal handler will enforce the windows view or applications view being shown depending on the toggle state of application button in quicklaunch.
---
 xfdashboard/stage.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/xfdashboard/stage.c b/xfdashboard/stage.c
index 26f4a13..c6f965e 100644
--- a/xfdashboard/stage.c
+++ b/xfdashboard/stage.c
@@ -521,10 +521,17 @@ static void _xfdashboard_stage_on_view_activated(XfdashboardStage *self, Xfdashb
 		priv->viewBeforeSearch=XFDASHBOARD_VIEW(g_object_ref(inView));
 	}
 
-	/* Update toggle state of apps button */
+	/* Toggle application button in quicklaunch */
 	appsButton=xfdashboard_quicklaunch_get_apps_button(XFDASHBOARD_QUICKLAUNCH(priv->quicklaunch));
 	if(appsButton)
 	{
+		/* Block our signal handler at stage which is called when apps button's
+		 * state changes because it will enforce a specific view depending on its 
+		 * state which may not be the view which is going to be activated.
+		 */
+		g_signal_handlers_block_by_func(appsButton, _xfdashboard_stage_on_quicklaunch_apps_button_toggled, self);
+
+		/* Update toggle state of apps button */
 		if(G_OBJECT_TYPE(inView)==XFDASHBOARD_TYPE_SEARCH_VIEW ||
 			G_OBJECT_TYPE(inView)==XFDASHBOARD_TYPE_APPLICATIONS_VIEW)
 		{
@@ -534,6 +541,9 @@ static void _xfdashboard_stage_on_view_activated(XfdashboardStage *self, Xfdashb
 			{
 				xfdashboard_toggle_button_set_toggle_state(appsButton, FALSE);
 			}
+
+		/* Unblock any handler we blocked before */
+		g_signal_handlers_unblock_by_func(appsButton, _xfdashboard_stage_on_quicklaunch_apps_button_toggled, self);
 	}
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list