[Xfce4-commits] [apps/xfdashboard] 02/04: Make use of new signal "application-launched" at XfdashboardApplication in actor XfdashboardApplicationButton
noreply at xfce.org
noreply at xfce.org
Wed Jan 20 15:38:22 CET 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 67353ce414b06121fea4a3bcab3c2566fdabfbb3
Author: Stephan Haller <nomad at froevel.de>
Date: Wed Jan 20 08:31:16 2016 +0100
Make use of new signal "application-launched" at XfdashboardApplication in actor XfdashboardApplicationButton
---
xfdashboard/application-button.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/xfdashboard/application-button.c b/xfdashboard/application-button.c
index 451abeb..8caa61e 100644
--- a/xfdashboard/application-button.c
+++ b/xfdashboard/application-button.c
@@ -36,6 +36,7 @@
#include "utils.h"
#include "application-tracker.h"
#include "stylable.h"
+#include "application.h"
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardApplicationButton,
@@ -666,6 +667,7 @@ gboolean xfdashboard_application_button_execute(XfdashboardApplicationButton *se
error=NULL;
if(!g_app_info_launch(priv->appInfo, NULL, context, &error))
{
+ /* Show notification about failed application launch */
xfdashboard_notify(CLUTTER_ACTOR(self),
xfdashboard_application_button_get_icon_name(self),
_("Launching application '%s' failed: %s"),
@@ -678,10 +680,16 @@ gboolean xfdashboard_application_button_execute(XfdashboardApplicationButton *se
}
else
{
+ /* Show notification about successful application launch */
xfdashboard_notify(CLUTTER_ACTOR(self),
xfdashboard_application_button_get_icon_name(self),
_("Application '%s' launched"),
xfdashboard_application_button_get_display_name(self));
+
+ /* Emit signal for successful application launch */
+ g_signal_emit_by_name(xfdashboard_application_get_default(), "application-launched", priv->appInfo);
+
+ /* Set status that application has been started successfully */
started=TRUE;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list