[Xfce4-commits] [apps/xfdashboard] 01/01: Only show notification if a notification box is known where the notification could be shown at

noreply at xfce.org noreply at xfce.org
Wed Apr 19 10:20:59 CEST 2017


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

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

commit 306930cd8e267be44c97fc74882414a93f3f9e84
Author: Stephan Haller <nomad at froevel.de>
Date:   Tue Apr 18 10:30:27 2017 +0200

    Only show notification if a notification box is known where the notification could be shown at
---
 libxfdashboard/stage.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/libxfdashboard/stage.c b/libxfdashboard/stage.c
index 5d1d70a..42a4024 100644
--- a/libxfdashboard/stage.c
+++ b/libxfdashboard/stage.c
@@ -576,7 +576,7 @@ static void _xfdashboard_stage_on_window_opened(XfdashboardStage *self,
 	xfdashboard_window_tracker_window_make_stage_window(priv->stageWindow);
 
 	/* Disconnect signal handler as this is a one-time setup of stage window */
-	XFDASHBOARD_DEBUG(self, ACTOR, "Stage window was opened and set up. Removing signal handler.");
+	XFDASHBOARD_DEBUG(self, ACTOR, "Stage window was opened and set up. Removing signal handler");
 	g_signal_handlers_disconnect_by_func(priv->windowTracker, G_CALLBACK(_xfdashboard_stage_on_window_opened), self);
 
 	/* Set focus */
@@ -1983,6 +1983,15 @@ void xfdashboard_stage_show_notification(XfdashboardStage *self, const gchar *in
 		priv->notificationTimeoutID=0;
 	}
 
+	/* Only show notification if a notification box is known where the notification
+	 * could be shown at.
+	 */
+	if(!priv->notification)
+	{
+		XFDASHBOARD_DEBUG(self, ACTOR, "Cannot show notification because no notification box is available");
+		return;
+	}
+
 	/* Show notification on stage */
 	xfdashboard_text_box_set_text(XFDASHBOARD_TEXT_BOX(priv->notification), inText);
 	xfdashboard_text_box_set_primary_icon(XFDASHBOARD_TEXT_BOX(priv->notification), inIconName);

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


More information about the Xfce4-commits mailing list