[Xfce4-commits] [apps/xfdashboard] 01/01: Re-add removed favourite as dynamically added application button for non-favourites apps when the corresponding application is still running.
noreply at xfce.org
noreply at xfce.org
Thu Sep 3 09:32:20 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 6723b283d64319d523d77d3613faccc3afac07a3
Author: Stephan Haller <nomad at froevel.de>
Date: Thu Sep 3 09:31:58 2015 +0200
Re-add removed favourite as dynamically added application button for non-favourites apps when the corresponding application is still running.
---
xfdashboard/quicklaunch.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/xfdashboard/quicklaunch.c b/xfdashboard/quicklaunch.c
index 7c372a5..62fa0ba 100644
--- a/xfdashboard/quicklaunch.c
+++ b/xfdashboard/quicklaunch.c
@@ -822,11 +822,31 @@ static void _xfdashboard_quicklaunch_on_trash_drop_drop(XfdashboardQuicklaunch *
_("Favourite '%s' removed"),
xfdashboard_application_button_get_display_name(XFDASHBOARD_APPLICATION_BUTTON(draggedActor)));
- /* Emit signal */
+ /* Emit signal and re-add removed favourite as dynamically added
+ * application button for non-favourites apps when it is still running.
+ */
appInfo=xfdashboard_application_button_get_app_info(XFDASHBOARD_APPLICATION_BUTTON(draggedActor));
if(appInfo)
{
+ /* Emit signal */
g_signal_emit(self, XfdashboardQuicklaunchSignals[SIGNAL_FAVOURITE_REMOVED], 0, appInfo);
+
+ /* Re-add removed favourite as dynamically added application button
+ * for non-favourites apps when it is still running.
+ */
+ if(xfdashboard_application_tracker_is_running_by_app_info(priv->appTracker, appInfo))
+ {
+ ClutterActor *actor;
+
+ actor=xfdashboard_application_button_new_from_app_info(appInfo);
+ 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-dynamic-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);
+ }
}
/* Destroy dragged favourite icon before updating property */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list