[Xfce4-commits] [apps/xfdashboard] 01/03: Fix checking statements

noreply at xfce.org noreply at xfce.org
Tue Aug 25 13:10: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 fbe5f54dae53494619a73987de71ac02a0036cf5
Author: Stephan Haller <nomad at froevel.de>
Date:   Tue Aug 25 10:21:19 2015 +0200

    Fix checking statements
---
 xfdashboard/collapse-box.c |   18 ++++++++++++++----
 xfdashboard/stage.c        |    2 +-
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/xfdashboard/collapse-box.c b/xfdashboard/collapse-box.c
index 66601fc..16b2686 100644
--- a/xfdashboard/collapse-box.c
+++ b/xfdashboard/collapse-box.c
@@ -195,17 +195,27 @@ static void _xfdashboard_collapse_box_on_focus_changed(XfdashboardCollapseBox *s
 	gboolean						newActorIsChild;
 
 	g_return_if_fail(XFDASHBOARD_IS_COLLAPSE_BOX(self));
+	g_return_if_fail(XFDASHBOARD_IS_FOCUSABLE(inOldActor) || !inOldActor);
+	g_return_if_fail(XFDASHBOARD_IS_FOCUSABLE(inNewActor) || !inNewActor);
 
 	priv=self->priv;
+	oldActorIsChild=FALSE;
+	newActorIsChild=FALSE;
 
 	/* Determine if old and new focusable actor are children of
 	 * this collapse box.
 	 */
-	oldActorIsChild=clutter_actor_contains(CLUTTER_ACTOR(self),
-											CLUTTER_ACTOR(inOldActor));
+	if(inOldActor)
+	{
+		oldActorIsChild=clutter_actor_contains(CLUTTER_ACTOR(self),
+												CLUTTER_ACTOR(inOldActor));
+	}
 
-	newActorIsChild=clutter_actor_contains(CLUTTER_ACTOR(self),
-											CLUTTER_ACTOR(inNewActor));
+	if(inNewActor)
+	{
+		newActorIsChild=clutter_actor_contains(CLUTTER_ACTOR(self),
+												CLUTTER_ACTOR(inNewActor));
+	}
 
 	/* Do nothing if both actors are children of this collapse box */
 	if(oldActorIsChild==newActorIsChild) return;
diff --git a/xfdashboard/stage.c b/xfdashboard/stage.c
index 6702890..04e5b73 100644
--- a/xfdashboard/stage.c
+++ b/xfdashboard/stage.c
@@ -1318,7 +1318,7 @@ static void _xfdashboard_stage_show(ClutterActor *inActor)
 	{
 		/* Look up view and switch to it if found */
 		switchView=xfdashboard_viewpad_find_view_by_name(XFDASHBOARD_VIEWPAD(priv->viewpad), priv->switchToView);
-		if(!switchView)
+		if(switchView)
 		{
 			xfdashboard_viewpad_set_active_view(XFDASHBOARD_VIEWPAD(priv->viewpad), switchView);
 		}

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


More information about the Xfce4-commits mailing list