From b1441ba4535195811466e60d099bebe68867028e Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 11 Oct 2013 21:57:41 +0200 Subject: [PATCH] gnome bubbles: Call notifications from the main thread. #1362 Conflicts: SparkleShare/Linux/SparkleBubbles.cs --- SparkleShare/Linux/SparkleBubbles.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/SparkleShare/Linux/SparkleBubbles.cs b/SparkleShare/Linux/SparkleBubbles.cs index 50986c1e..999877d9 100755 --- a/SparkleShare/Linux/SparkleBubbles.cs +++ b/SparkleShare/Linux/SparkleBubbles.cs @@ -34,14 +34,14 @@ namespace SparkleShare { if (!Program.Controller.NotificationsEnabled) return; - try { + Application.Invoke (delegate { Notification notification = new Notification () { Summary = title, Body = subtext, Timeout = 5 * 1000, Urgency = Urgency.Low }; - + if (image_path != null) notification.Icon = new Gdk.Pixbuf (image_path); else @@ -52,11 +52,13 @@ namespace SparkleShare { Controller.BubbleClicked (); }; - notification.Show (); + try { + notification.Show (); - } catch (Exception e) { - SparkleLogger.LogInfo ("Notification", "Error showing notification: ", e); - } + } catch (Exception e) { + SparkleLogger.LogInfo ("Notification", "Error showing notification: ", e); + } + }); }; } }