[Xfce4-commits] [apps/xfdashboard] 06/10: Better debug messages by using textual representation of enum value

noreply at xfce.org noreply at xfce.org
Thu Jul 28 16:52:51 CEST 2016


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

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

commit a5507d17d0f3e7536c8b4f017670f5db417a7adc
Author: Stephan Haller <nomad at froevel.de>
Date:   Mon Jul 25 13:17:09 2016 +0200

    Better debug messages by using textual representation of enum value
---
 libxfdashboard/applications-view.c  | 10 ++++++----
 libxfdashboard/quicklaunch.c        | 10 ++++++----
 libxfdashboard/windows-view.c       | 10 ++++++----
 libxfdashboard/workspace-selector.c |  9 +++++----
 4 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/libxfdashboard/applications-view.c b/libxfdashboard/applications-view.c
index f52bbb5..bedc070 100644
--- a/libxfdashboard/applications-view.c
+++ b/libxfdashboard/applications-view.c
@@ -1041,6 +1041,7 @@ static ClutterActor* _xfdashboard_applications_view_focusable_find_selection(Xfd
 	XfdashboardApplicationsViewPrivate		*priv;
 	ClutterActor							*selection;
 	ClutterActor							*newSelection;
+	gchar									*valueName;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_FOCUSABLE(inFocusable), NULL);
 	g_return_val_if_fail(XFDASHBOARD_IS_APPLICATIONS_VIEW(inFocusable), NULL);
@@ -1056,10 +1057,13 @@ static ClutterActor* _xfdashboard_applications_view_focusable_find_selection(Xfd
 	if(!inSelection)
 	{
 		newSelection=clutter_actor_get_first_child(CLUTTER_ACTOR(self));
-		g_debug("No selection at %s, so select first child %s for direction %u",
+
+		valueName=xfdashboard_get_enum_value_name(XFDASHBOARD_TYPE_SELECTION_TARGET, inDirection);
+		g_debug("No selection at %s, so select first child %s for direction %s",
 				G_OBJECT_TYPE_NAME(self),
 				newSelection ? G_OBJECT_TYPE_NAME(newSelection) : "<nil>",
-				inDirection);
+				valueName);
+		g_free(valueName);
 
 		return(newSelection);
 	}
@@ -1114,8 +1118,6 @@ static ClutterActor* _xfdashboard_applications_view_focusable_find_selection(Xfd
 
 		default:
 			{
-				gchar					*valueName;
-
 				valueName=xfdashboard_get_enum_value_name(XFDASHBOARD_TYPE_SELECTION_TARGET, inDirection);
 				g_critical(_("Focusable object %s does not handle selection direction of type %s."),
 							G_OBJECT_TYPE_NAME(self),
diff --git a/libxfdashboard/quicklaunch.c b/libxfdashboard/quicklaunch.c
index 023c2d0..1b5b8ff 100644
--- a/libxfdashboard/quicklaunch.c
+++ b/libxfdashboard/quicklaunch.c
@@ -2360,6 +2360,7 @@ static ClutterActor* _xfdashboard_quicklaunch_focusable_find_selection(Xfdashboa
 	XfdashboardQuicklaunchPrivate		*priv;
 	ClutterActor						*selection;
 	ClutterActor						*newSelection;
+	gchar								*valueName;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_FOCUSABLE(inFocusable), FALSE);
 	g_return_val_if_fail(XFDASHBOARD_IS_QUICKLAUNCH(inFocusable), FALSE);
@@ -2375,10 +2376,13 @@ static ClutterActor* _xfdashboard_quicklaunch_focusable_find_selection(Xfdashboa
 	if(!inSelection)
 	{
 		selection=clutter_actor_get_first_child(CLUTTER_ACTOR(self));
-		g_debug("No selection at %s, so select first child %s for direction %u",
+
+		valueName=xfdashboard_get_enum_value_name(XFDASHBOARD_TYPE_SELECTION_TARGET, inDirection);
+		g_debug("No selection at %s, so select first child %s for direction %s",
 				G_OBJECT_TYPE_NAME(self),
 				selection ? G_OBJECT_TYPE_NAME(selection) : "<nil>",
-				inDirection);
+				valueName);
+		g_free(valueName);
 
 		return(selection);
 	}
@@ -2477,8 +2481,6 @@ static ClutterActor* _xfdashboard_quicklaunch_focusable_find_selection(Xfdashboa
 
 		default:
 			{
-				gchar					*valueName;
-
 				valueName=xfdashboard_get_enum_value_name(XFDASHBOARD_TYPE_SELECTION_TARGET, inDirection);
 				g_critical(_("Focusable object %s does not handle selection direction of type %s."),
 							G_OBJECT_TYPE_NAME(self),
diff --git a/libxfdashboard/windows-view.c b/libxfdashboard/windows-view.c
index e62e5b2..9cd80e1 100644
--- a/libxfdashboard/windows-view.c
+++ b/libxfdashboard/windows-view.c
@@ -1489,6 +1489,7 @@ static ClutterActor* _xfdashboard_windows_view_focusable_find_selection(Xfdashbo
 	gint									newSelectionIndex;
 	ClutterActorIter						iter;
 	ClutterActor							*child;
+	gchar									*valueName;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_FOCUSABLE(inFocusable), NULL);
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOWS_VIEW(inFocusable), NULL);
@@ -1504,10 +1505,13 @@ static ClutterActor* _xfdashboard_windows_view_focusable_find_selection(Xfdashbo
 	if(!inSelection)
 	{
 		newSelection=clutter_actor_get_first_child(CLUTTER_ACTOR(self));
-		g_debug("No selection at %s, so select first child %s for direction %u",
+
+		valueName=xfdashboard_get_enum_value_name(XFDASHBOARD_TYPE_SELECTION_TARGET, inDirection);
+		g_debug("No selection at %s, so select first child %s for direction %s",
 				G_OBJECT_TYPE_NAME(self),
 				newSelection ? G_OBJECT_TYPE_NAME(newSelection) : "<nil>",
-				inDirection);
+				valueName);
+		g_free(valueName);
 
 		return(newSelection);
 	}
@@ -1631,8 +1635,6 @@ static ClutterActor* _xfdashboard_windows_view_focusable_find_selection(Xfdashbo
 
 		default:
 			{
-				gchar					*valueName;
-
 				valueName=xfdashboard_get_enum_value_name(XFDASHBOARD_TYPE_SELECTION_TARGET, inDirection);
 				g_critical(_("Focusable object %s does not handle selection direction of type %s."),
 							G_OBJECT_TYPE_NAME(self),
diff --git a/libxfdashboard/workspace-selector.c b/libxfdashboard/workspace-selector.c
index b5ebcd0..76b3dc4 100644
--- a/libxfdashboard/workspace-selector.c
+++ b/libxfdashboard/workspace-selector.c
@@ -919,6 +919,7 @@ static ClutterActor* _xfdashboard_workspace_selector_focusable_find_selection(Xf
 	XfdashboardWorkspaceSelectorPrivate		*priv;
 	XfdashboardLiveWorkspace				*selection;
 	ClutterActor							*newSelection;
+	gchar									*valueName;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_FOCUSABLE(inFocusable), NULL);
 	g_return_val_if_fail(XFDASHBOARD_IS_WORKSPACE_SELECTOR(inFocusable), NULL);
@@ -941,10 +942,12 @@ static ClutterActor* _xfdashboard_workspace_selector_focusable_find_selection(Xf
 	 */
 	if(!inSelection)
 	{
-		g_debug("No selection at %s, so select first child %s for direction %u",
+		valueName=xfdashboard_get_enum_value_name(XFDASHBOARD_TYPE_SELECTION_TARGET, inDirection);
+		g_debug("No selection at %s, so select first child %s for direction %s",
 				G_OBJECT_TYPE_NAME(self),
 				selection ? G_OBJECT_TYPE_NAME(selection) : "<nil>",
-				inDirection);
+				valueName);
+		g_free(valueName);
 
 		return(CLUTTER_ACTOR(selection));
 	}
@@ -1023,8 +1026,6 @@ static ClutterActor* _xfdashboard_workspace_selector_focusable_find_selection(Xf
 
 		default:
 			{
-				gchar					*valueName;
-
 				valueName=xfdashboard_get_enum_value_name(XFDASHBOARD_TYPE_SELECTION_TARGET, inDirection);
 				g_critical(_("Focusable object %s does not handle selection direction of type %s."),
 							G_OBJECT_TYPE_NAME(self),

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


More information about the Xfce4-commits mailing list