[Xfce4-commits] [apps/xfdashboard] 01/01: Remove unused code blocks

noreply at xfce.org noreply at xfce.org
Wed Sep 2 09:30:59 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 fee37153e9dd21d61bdd803954ae343d922427c6
Author: Stephan Haller <nomad at froevel.de>
Date:   Wed Sep 2 09:30:46 2015 +0200

    Remove unused code blocks
---
 xfdashboard/quicklaunch.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/xfdashboard/quicklaunch.c b/xfdashboard/quicklaunch.c
index 687db67..5a889d0 100644
--- a/xfdashboard/quicklaunch.c
+++ b/xfdashboard/quicklaunch.c
@@ -144,7 +144,6 @@ static gboolean _xfdashboard_quicklaunch_has_appinfo(XfdashboardQuicklaunch *sel
 	XfdashboardQuicklaunchPrivate	*priv;
 	guint							i;
 	GFile							*desktopFile;
-	gchar							*desktopFilename;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_QUICKLAUNCH(self), TRUE);
 	g_return_val_if_fail(G_IS_APP_INFO(inAppInfo), TRUE);
@@ -164,7 +163,7 @@ static gboolean _xfdashboard_quicklaunch_has_appinfo(XfdashboardQuicklaunch *sel
 		return(TRUE);
 	}
 
-	/* Get desktop file name */
+	/* Check if application information is valid and provides a desktop file */
 	desktopFile=xfdashboard_desktop_app_info_get_file(XFDASHBOARD_DESKTOP_APP_INFO(inAppInfo));
 	if(!desktopFile)
 	{
@@ -172,8 +171,10 @@ static gboolean _xfdashboard_quicklaunch_has_appinfo(XfdashboardQuicklaunch *sel
 					G_OBJECT_TYPE_NAME(inAppInfo));
 		return(TRUE);
 	}
-	desktopFilename=g_file_get_path(desktopFile);
 
+	/* Iterate through favourites and check if already a favourite for
+	 * requested desktop file.
+	 */
 	for(i=0; i<priv->favourites->len; i++)
 	{
 		GValue						*value;
@@ -193,7 +194,6 @@ static gboolean _xfdashboard_quicklaunch_has_appinfo(XfdashboardQuicklaunch *sel
 							value,
 							G_VALUE_TYPE_NAME(value),
 							g_type_name(G_TYPE_STRING));
-				if(desktopFilename) g_free(desktopFilename);
 				return(TRUE);
 			}
 #endif
@@ -217,7 +217,6 @@ static gboolean _xfdashboard_quicklaunch_has_appinfo(XfdashboardQuicklaunch *sel
 
 			/* Release allocated resources */
 			if(valueAppInfo) g_object_unref(valueAppInfo);
-			if(desktopFilename) g_free(desktopFilename);
 
 			return(TRUE);
 		}
@@ -226,9 +225,6 @@ static gboolean _xfdashboard_quicklaunch_has_appinfo(XfdashboardQuicklaunch *sel
 		if(valueAppInfo) g_object_unref(valueAppInfo);
 	}
 
-	/* Release allocated resources */
-	if(desktopFilename) g_free(desktopFilename);
-
 	/* If we get here then this quicklaunch does not have any item
 	 * which matches the requested application information so return FALSE.
 	 */

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


More information about the Xfce4-commits mailing list