[tasque] Fix build



commit b55e0fe7babe7d27c0b0ec9c92b95554d842d534
Author: Antonius Riha <antoniusriha gmail com>
Date:   Mon Dec 3 00:11:50 2012 +0100

    Fix build
    
    * Added method ShowAppNotifiactions to INativeApplication
    * Updated POTFILES.in

 po/POTFILES.in                       |    4 ++--
 src/Gtk.Tasque/GtkApplicationBase.cs |   11 ++++++++---
 src/Gtk.Tasque/RemoteControl.cs      |   10 +++-------
 src/libtasque/INativeApplication.cs  |    1 +
 src/libtasque/NativeApplication.cs   |    2 ++
 5 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 533251c..90e5f94 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,10 +2,9 @@
 # Please keep this file sorted alphabetically.
 [encoding: UTF-8]
 data/tasque.desktop.in
-src/Gtk.Tasque/Application.cs
-src/Gtk.Tasque/AllCategory.cs
 src/Gtk.Tasque/CompletedTaskGroup.cs
 src/Gtk.Tasque/Defines.cs.in
+src/Gtk.Tasque/GtkApplicationBase.cs
 src/Gtk.Tasque/GtkTray.cs
 src/Gtk.Tasque/NoteDialog.cs
 src/Gtk.Tasque/PreferencesDialog.cs
@@ -14,4 +13,5 @@ src/Gtk.Tasque/TaskTreeView.cs
 src/Gtk.Tasque/TaskWindow.cs
 src/Gtk.Tasque/Utilities.cs
 src/Addins/Backends/Rtm/Gtk/RtmPreferencesWidget.cs
+src/libtasque/AllCategory.cs
 src/libtasque/TaskParser.cs
diff --git a/src/Gtk.Tasque/GtkApplicationBase.cs b/src/Gtk.Tasque/GtkApplicationBase.cs
index d0511f8..d6fb036 100644
--- a/src/Gtk.Tasque/GtkApplicationBase.cs
+++ b/src/Gtk.Tasque/GtkApplicationBase.cs
@@ -29,6 +29,9 @@ using System.Diagnostics;
 using System.IO;
 using Mono.Unix;
 using Gtk;
+#if ENABLE_NOTIFY_SHARP
+using Notifications;
+#endif
 
 namespace Tasque
 {
@@ -98,12 +101,14 @@ namespace Tasque
 		}
 
 #if ENABLE_NOTIFY_SHARP
-		public static void ShowAppNotification(Notification notification)
+		public override void ShowAppNotification (string summary, string body)
 		{
+			var notification = new Notification (
+				summary, body, Utilities.GetIcon ("tasque", 48));
 			// TODO: Use this API for newer versions of notify-sharp
-			//notification.AttachToStatusIcon(
+			//notification.AttachToStatusIcon (
 			//		Tasque.Application.Instance.trayIcon);
-			notification.Show();
+			notification.Show ();
 		}
 #endif
 		
diff --git a/src/Gtk.Tasque/RemoteControl.cs b/src/Gtk.Tasque/RemoteControl.cs
index 2c310d2..5c1caf8 100644
--- a/src/Gtk.Tasque/RemoteControl.cs
+++ b/src/Gtk.Tasque/RemoteControl.cs
@@ -169,15 +169,11 @@ namespace Tasque
 			#if ENABLE_NOTIFY_SHARP
 			// Use notify-sharp to alert the user that a new task has been
 			// created successfully.
-			Notification notify =
-				new Notification (
-					Catalog.GetString ("New task created."), // summary
-					Catalog.GetString (taskName), // body
-					Utilities.GetIcon ("tasque", 48));
-			application.ShowAppNotification (notify);
+			application.ShowAppNotification (
+				Catalog.GetString ("New task created."), // summary
+				Catalog.GetString (taskName)); // body
 			#endif
 			
-			
 			return task.Id;
 		}
 		
diff --git a/src/libtasque/INativeApplication.cs b/src/libtasque/INativeApplication.cs
index 89f1be3..182166d 100644
--- a/src/libtasque/INativeApplication.cs
+++ b/src/libtasque/INativeApplication.cs
@@ -18,6 +18,7 @@ namespace Tasque
 		void Initialize (string [] args);
 		void QuitMainLoop ();
 		void ShowPreferences ();
+		void ShowAppNotification (string summary, string body);
 		void StartMainLoop ();
 		event EventHandler Exiting;
 		event EventHandler BackendChanged;
diff --git a/src/libtasque/NativeApplication.cs b/src/libtasque/NativeApplication.cs
index f935512..a1250ad 100644
--- a/src/libtasque/NativeApplication.cs
+++ b/src/libtasque/NativeApplication.cs
@@ -194,6 +194,8 @@ namespace Tasque
 		protected abstract void ShowMainWindow ();
 		
 		protected abstract event EventHandler RemoteInstanceKnocked;
+
+		public abstract void ShowAppNotification (string summary, string body);
 		
 		#region IDisposable implementation
 		public void Dispose ()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]