[Xfce4-commits] [apps/xfdashboard] 01/01: Add CSS class ".is-favourite-app" to XfdashboardApplicationButton in XfdashboardQuicklaunch which represents a user-stored favourite app

noreply at xfce.org noreply at xfce.org
Wed Sep 2 18:13:56 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 0821b65ca252f3fe9548bb6bd3f82c4a0e973f6d
Author: Stephan Haller <nomad at froevel.de>
Date:   Wed Sep 2 18:12:48 2015 +0200

    Add CSS class ".is-favourite-app" to XfdashboardApplicationButton in XfdashboardQuicklaunch which represents a user-stored favourite app
---
 xfdashboard/quicklaunch.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/xfdashboard/quicklaunch.c b/xfdashboard/quicklaunch.c
index 5a889d0..319fe17 100644
--- a/xfdashboard/quicklaunch.c
+++ b/xfdashboard/quicklaunch.c
@@ -818,7 +818,9 @@ static void _xfdashboard_quicklaunch_update_property_from_icons(XfdashboardQuick
 		if(desktopAppInfo)
 		{
 			desktopFile=g_strdup(g_app_info_get_id(desktopAppInfo));
-			if(!desktopFile && XFDASHBOARD_IS_DESKTOP_APP_INFO(desktopAppInfo))
+			if(!desktopFile &&
+				XFDASHBOARD_IS_DESKTOP_APP_INFO(desktopAppInfo) &&
+				xfdashboard_stylable_has_class(XFDASHBOARD_STYLABLE(button), "is-favourite-app"))
 			{
 				GFile				*file;
 
@@ -877,7 +879,11 @@ static void _xfdashboard_quicklaunch_update_icons_from_property(XfdashboardQuick
 	clutter_actor_iter_init(&iter, CLUTTER_ACTOR(self));
 	while(clutter_actor_iter_next(&iter, &child))
 	{
-		if(XFDASHBOARD_IS_APPLICATION_BUTTON(child)) clutter_actor_iter_destroy(&iter);
+		if(XFDASHBOARD_IS_APPLICATION_BUTTON(child) &&
+			xfdashboard_stylable_has_class(XFDASHBOARD_STYLABLE(child), "is-favourite-app"))
+		{
+			clutter_actor_iter_destroy(&iter);
+		}
 	}
 
 	/* Now re-add all application icons for current favourites */
@@ -898,6 +904,7 @@ static void _xfdashboard_quicklaunch_update_icons_from_property(XfdashboardQuick
 		xfdashboard_button_set_icon_size(XFDASHBOARD_BUTTON(actor), priv->normalIconSize);
 		xfdashboard_button_set_sync_icon_size(XFDASHBOARD_BUTTON(actor), FALSE);
 		xfdashboard_button_set_style(XFDASHBOARD_BUTTON(actor), XFDASHBOARD_BUTTON_STYLE_ICON);
+		xfdashboard_stylable_add_class(XFDASHBOARD_STYLABLE(actor), "is-favourite-app");
 		clutter_actor_show(actor);
 		clutter_actor_add_child(CLUTTER_ACTOR(self), actor);
 		g_signal_connect_swapped(actor, "clicked", G_CALLBACK(_xfdashboard_quicklaunch_on_favourite_clicked), self);
@@ -1369,6 +1376,7 @@ static gboolean _xfdashboard_quicklaunch_selection_add_favourite(XfdashboardQuic
 		 */
 		favouriteActor=xfdashboard_application_button_new_from_app_info(appInfo);
 		clutter_actor_hide(favouriteActor);
+		xfdashboard_stylable_add_class(XFDASHBOARD_STYLABLE(favouriteActor), "is-favourite-app");
 		clutter_actor_add_child(CLUTTER_ACTOR(self), favouriteActor);
 
 		/* Update favourites from icon order */

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


More information about the Xfce4-commits mailing list