tomboy r2234 - in trunk: . Tomboy



Author: sharm
Date: Mon Oct 20 07:41:25 2008
New Revision: 2234
URL: http://svn.gnome.org/viewvc/tomboy?rev=2234&view=rev

Log:
* Tomboy.mac.csproj: Add RemoteControl stuff to Mac project.
* Tomboy/Tomboy.cs: Add RemoteControl support #if MAC.
* Tomboy/RemoteControl*.cs: Replace #if !WIN32 with #if ENABLE_DBUS.


Modified:
   trunk/ChangeLog
   trunk/Tomboy.mac.csproj
   trunk/Tomboy/RemoteControl.cs
   trunk/Tomboy/RemoteControlProxy.cs
   trunk/Tomboy/Tomboy.cs

Modified: trunk/Tomboy.mac.csproj
==============================================================================
--- trunk/Tomboy.mac.csproj	(original)
+++ trunk/Tomboy.mac.csproj	Mon Oct 20 07:41:25 2008
@@ -105,6 +105,7 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>macbin\ige-mac-integration-sharp.dll</HintPath>
     </Reference>
+    <Reference Include="System.Runtime.Remoting" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Tomboy\ActionManager.cs" />
@@ -166,10 +167,14 @@
     <Compile Include="Tomboy\PrefsKeybinder.cs" />
     <Compile Include="Tomboy\WindowsApplication.cs" />
     <Compile Include="Tomboy\XmlPreferencesClient.cs" />
+    <Compile Include="Tomboy\MacApplication.cs" />
     <None Include="ChangeLog" />
     <None Include="COPYING" />
     <None Include="Tomboy\Defines.cs.in" />
-    <Compile Include="Tomboy\MacApplication.cs" />
+    <Compile Include="Tomboy\IRemoteControl.cs" />
+    <Compile Include="Tomboy\RemoteControl.cs" />
+    <Compile Include="Tomboy\RemoteControlProxy.cs" />
+    <Compile Include="Tomboy\RemoteControlWrapper.cs" />
   </ItemGroup>
   <ItemGroup>
     <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">

Modified: trunk/Tomboy/RemoteControl.cs
==============================================================================
--- trunk/Tomboy/RemoteControl.cs	(original)
+++ trunk/Tomboy/RemoteControl.cs	Mon Oct 20 07:41:25 2008
@@ -2,7 +2,7 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
-#if !WIN32
+#if ENABLE_DBUS
 using NDesk.DBus;
 using org.freedesktop.DBus;
 #endif
@@ -12,7 +12,7 @@
 	public delegate void RemoteDeletedHandler (string uri, string title);
 	public delegate void RemoteAddedHandler (string uri);
 	public delegate void RemoteSavedHandler (string uri);
-#if !WIN32
+#if ENABLE_DBUS
 	[Interface ("org.gnome.Tomboy.RemoteControl")]
 #endif
 	public class RemoteControl : MarshalByRefObject, IRemoteControl

Modified: trunk/Tomboy/RemoteControlProxy.cs
==============================================================================
--- trunk/Tomboy/RemoteControlProxy.cs	(original)
+++ trunk/Tomboy/RemoteControlProxy.cs	Mon Oct 20 07:41:25 2008
@@ -1,5 +1,5 @@
 using System;
-#if !WIN32
+#if ENABLE_DBUS
 using NDesk.DBus;
 using org.freedesktop.DBus;
 #else
@@ -13,7 +13,7 @@
 namespace Tomboy
 {
 	public static class RemoteControlProxy {
-#if !WIN32
+#if ENABLE_DBUS
 		private const string Path = "/org/gnome/Tomboy/RemoteControl";
 		private const string Namespace = "org.gnome.Tomboy";
 #else
@@ -28,7 +28,7 @@
 #endif
 
 		public static IRemoteControl GetInstance () {
-#if !WIN32
+#if ENABLE_DBUS
 			BusG.Init ();
 
 			if (! Bus.Session.NameHasOwner (Namespace))
@@ -47,7 +47,7 @@
 
 		public static RemoteControl Register (NoteManager manager)
 		{
-#if !WIN32
+#if ENABLE_DBUS
 			BusG.Init ();
 
 			RemoteControl remote_control = new RemoteControl (manager);

Modified: trunk/Tomboy/Tomboy.cs
==============================================================================
--- trunk/Tomboy/Tomboy.cs	(original)
+++ trunk/Tomboy/Tomboy.cs	Mon Oct 20 07:41:25 2008
@@ -23,7 +23,7 @@
 		static bool is_panel_applet = false;
 		static PreferencesDialog prefs_dlg;
 		static SyncDialog sync_dlg;
-#if ENABLE_DBUS || WIN32
+#if ENABLE_DBUS || WIN32 || MAC
 		static RemoteControl remote_control;
 #endif
 		static Gtk.IconTheme icon_theme = null;
@@ -35,7 +35,7 @@
 
 			TomboyCommandLine cmd_line = new TomboyCommandLine (args);
 
-#if ENABLE_DBUS || WIN32 // Run command-line earlier with DBus enabled
+#if ENABLE_DBUS || WIN32 || MAC // Run command-line earlier with DBus enabled
 			if (cmd_line.NeedsExecute) {
 				// Execute args at an existing tomboy instance...
 				cmd_line.Execute ();
@@ -69,7 +69,7 @@
 				addin.Initialize ();
 			}
 
-#if !ENABLE_DBUS && !WIN32
+#if !ENABLE_DBUS && !WIN32 && !MAC
 			if (cmd_line.NeedsExecute) {
 				cmd_line.Execute ();
 			}
@@ -149,7 +149,7 @@
 
 		static void RegisterRemoteControl (NoteManager manager)
 		{
-#if ENABLE_DBUS || WIN32
+#if ENABLE_DBUS || WIN32 || MAC
 			try {
 				remote_control = RemoteControlProxy.Register (manager);
 				if (remote_control != null) {
@@ -430,7 +430,7 @@
 			                "  --search [text]\t\tOpen the search all notes window with " +
 			                "the search text.\n");
 
-#if ENABLE_DBUS || WIN32
+#if ENABLE_DBUS || WIN32 || MAC
 			usage +=
 			        Catalog.GetString (
 			                "  --new-note\t\t\tCreate and display a new note.\n" +
@@ -449,7 +449,7 @@
 //     "  --check-plugin-unloading\tCheck if plugins are " +
 //     "unloaded properly.\n");
 
-#if !ENABLE_DBUS && !WIN32
+#if !ENABLE_DBUS && !WIN32 && !MAC
 			usage += Catalog.GetString ("D-BUS remote control disabled.\n");
 #endif
 
@@ -467,7 +467,7 @@
 				bool quit = false;
 
 				switch (args [idx]) {
-#if ENABLE_DBUS || WIN32
+#if ENABLE_DBUS || WIN32 || MAC
 				case "--new-note":
 					// Get optional name for new note...
 					if (idx + 1 < args.Length
@@ -602,7 +602,7 @@
 
 		public void Execute ()
 		{
-#if ENABLE_DBUS || WIN32
+#if ENABLE_DBUS || WIN32 || MAC
 			IRemoteControl remote = null;
 			try {
 				remote = RemoteControlProxy.GetInstance ();



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