tomboy r2102 - in branches/tomboy-portable2: . Tomboy winbin



Author: sharm
Date: Wed Aug 27 23:45:37 2008
New Revision: 2102
URL: http://svn.gnome.org/viewvc/tomboy?rev=2102&view=rev

Log:
(Please excuse this poorly-formatted log message w/ no associated ChangeLog entry.  Also, there may be line-ending issues which I will address later.)

Tomboy.csproj, Tomboy.sln: Update to working VS 2008 files.
GtkApplication.cs: Renamed to Tomboy/WindowsApplication.cs and updated with new members.
Logger.cs, NoteManager.cs: Use INativeApplication.ConfDir.
NativeApplication.cs: Add ConfDir, OpenUrl, and DisplayHelp.
PlatformFactory.cs: Return Windows classes for now.
PreferencesDialog.cs: Use peditor interfaces, but still need to instantiate with factory instead of new operator.
PrefsKeybinder.cs, Tray.cs: New ITomboyTray interface.  Ifdef and try/catch around some GetGeometry issues on win32 for now.
Services.cs: Instantiate NativeApplication first.
Tomboy.cs: Use NativeApplication.ConfDir, and ifdef some panel applet code for now.
Utils.cs: Ifdef ForcedPresentWindow stuff for now, and use NativeApplication.DisplayHelp.
Watchers.cs: Use NativeApplication.OpenUrl.
XmlPreferencesClient.cs: More complete implementation.

winbin: Pre-built required dependencies Mono.Addins.*.dll and Mono*Posix*.dll.

Added:
   branches/tomboy-portable2/Tomboy/WindowsApplication.cs
      - copied, changed from r2100, /branches/tomboy-portable2/Tomboy/GtkApplication.cs
   branches/tomboy-portable2/winbin/
   branches/tomboy-portable2/winbin/ICSharpCode.SharpZipLib.dll   (contents, props changed)
   branches/tomboy-portable2/winbin/Mono.Addins.Gui.dll   (contents, props changed)
   branches/tomboy-portable2/winbin/Mono.Addins.Setup.dll   (contents, props changed)
   branches/tomboy-portable2/winbin/Mono.Addins.dll   (contents, props changed)
   branches/tomboy-portable2/winbin/Mono.Addins.dll.config
   branches/tomboy-portable2/winbin/Mono.Posix.dll   (contents, props changed)
   branches/tomboy-portable2/winbin/MonoPosixHelper.dll   (contents, props changed)
Removed:
   branches/tomboy-portable2/Tomboy/GtkApplication.cs
Modified:
   branches/tomboy-portable2/   (props changed)
   branches/tomboy-portable2/Tomboy.csproj
   branches/tomboy-portable2/Tomboy.sln
   branches/tomboy-portable2/Tomboy/AddinManager.cs
   branches/tomboy-portable2/Tomboy/Logger.cs
   branches/tomboy-portable2/Tomboy/NativeApplication.cs
   branches/tomboy-portable2/Tomboy/NoteManager.cs
   branches/tomboy-portable2/Tomboy/PlatformFactory.cs
   branches/tomboy-portable2/Tomboy/PreferencesDialog.cs
   branches/tomboy-portable2/Tomboy/PrefsKeybinder.cs
   branches/tomboy-portable2/Tomboy/Services.cs
   branches/tomboy-portable2/Tomboy/Tomboy.cs
   branches/tomboy-portable2/Tomboy/Tray.cs
   branches/tomboy-portable2/Tomboy/Utils.cs
   branches/tomboy-portable2/Tomboy/Watchers.cs
   branches/tomboy-portable2/Tomboy/XmlPreferencesClient.cs

Modified: branches/tomboy-portable2/Tomboy.csproj
==============================================================================
--- branches/tomboy-portable2/Tomboy.csproj	(original)
+++ branches/tomboy-portable2/Tomboy.csproj	Wed Aug 27 23:45:37 2008
@@ -1,268 +1,219 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.21022</ProductVersion>
-    <ProjectGuid>{315DBB30-1461-4A41-A23F-A888D84E1EA0}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <AssemblyName>Tomboy</AssemblyName>
-    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Debug</OutputPath>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
-    <Execution>
-      <Execution xmlns="" />
-    </Execution>
-    <Output>
-      <Output xmlns="" />
-    </Output>
-    <Build>
-      <Build xmlns="" />
-    </Build>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>none</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release</OutputPath>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
-    <Execution>
-      <Execution xmlns="" />
-    </Execution>
-    <Output>
-      <Output xmlns="" />
-    </Output>
-    <Build>
-      <Build xmlns="" />
-    </Build>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="gdk-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
-    <Reference Include="gtk-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
-    <Reference Include="System.Xml" />
-    <Reference Include="glib-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
-    <Reference Include="gnome-sharp, Version=2.16.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
-    <Reference Include="System" />
-    <Reference Include="Mono.Posix" />
-    <Reference Include="pango-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
-    <Reference Include="Mono.Cairo" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Tomboy\ActionManager.cs" />
-    <Compile Include="Tomboy\Applet.cs" />
-    <Compile Include="Tomboy\Logger.cs" />
-    <Compile Include="Tomboy\Note.cs" />
-    <Compile Include="Tomboy\NoteBuffer.cs" />
-    <Compile Include="Tomboy\NoteManager.cs" />
-    <Compile Include="Tomboy\NoteTag.cs" />
-    <Compile Include="Tomboy\NoteWindow.cs" />
-    <Compile Include="Tomboy\Preferences.cs" />
-    <Compile Include="Tomboy\RecentChanges.cs" />
-    <Compile Include="Tomboy\RemoteControl.cs" />
-    <Compile Include="Tomboy\RemoteControlProxy.cs" />
-    <Compile Include="Tomboy\Tomboy.cs" />
-    <Compile Include="Tomboy\Tray.cs" />
-    <Compile Include="Tomboy\Trie.cs" />
-    <Compile Include="Tomboy\Undo.cs" />
-    <Compile Include="Tomboy\Utils.cs" />
-    <Compile Include="Tomboy\Watchers.cs" />
-    <Compile Include="Tomboy\XKeybinder.cs" />
-    <Compile Include="Tomboy\TagManager.cs" />
-    <Compile Include="Tomboy\Tag.cs" />
-    <Compile Include="Tomboy\TagButton.cs" />
-    <Compile Include="Tomboy\WrapBox.cs" />
-    <Compile Include="Tomboy\Defines.cs" />
-    <Compile Include="Tomboy\PreferencesDialog.cs" />
-    <Compile Include="Tomboy\NoteEditor.cs" />
-    <Compile Include="Tomboy\Addins\Backlinks\BacklinksNoteAddin.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\CellRendererDate.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\DateButton.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\Task.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\TaskArchiver.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\TaskData.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\TaskListWindow.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\TaskManager.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\TaskOptionsDialog.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\TasksApplicationAddin.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\TaskTag.cs" />
-    <Compile Include="Tomboy\AbstractAddin.cs" />
-    <Compile Include="Tomboy\ApplicationAddin.cs" />
-    <Compile Include="Tomboy\NoteAddin.cs" />
-    <Compile Include="Tomboy\Addins\Backlinks\BacklinkMenuItem.cs" />
-    <Compile Include="Tomboy\AddinManager.cs" />
-    <Compile Include="Tomboy\Addins\Tasks\TasksNoteAddin.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\Addin.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\AddinAttribute.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\AddinDependencyAttribute.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\AddinErrorEventArgs.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\AddinEventArgs.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\AddinInfo.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\AddinManager.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\AddinRegistry.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\AddinRootAttribute.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\AddinSessionService.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\ConditionType.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\ConsoleProgressStatus.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\ExtensionAttribute.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\ExtensionContext.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\ExtensionNode.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\ExtensionNodeAttribute.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\ExtensionNodeChildAttribute.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\ExtensionNodeList.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\ExtensionPointAttribute.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\ExtensionTree.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\GettextCatalog.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\IProgressStatus.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\MissingDependencyException.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\NodeAttributeAttribute.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\NodeElement.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\RuntimeAddin.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\TreeNode.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\TreeNodeCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\TypeExtensionNode.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\TypeExtensionPointAttribute.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\AddinDatabase.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\AddinHostIndex.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\AddinScanFolderInfo.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\AddinScanner.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\AddinScanResult.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\AddinUpdateData.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\DatabaseConfiguration.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\FileDatabase.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\ProcessProgressStatus.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\SetupProcess.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Database\Util.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\AddinDependency.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\AddinDescription.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\AssemblyDependency.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ConditionTypeDescription.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ConditionTypeDescriptionCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\Dependency.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\DependencyCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\Extension.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ExtensionCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ExtensionNodeDescription.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ExtensionNodeDescriptionCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ExtensionNodeSet.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ExtensionNodeSetCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ExtensionNodeType.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ExtensionNodeTypeCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ExtensionPoint.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ExtensionPointCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ModuleDescription.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ModuleDescriptionCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\NativeDependency.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\NodeTypeAttribute.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\NodeTypeAttributeCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ObjectDescription.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Description\ObjectDescriptionCollection.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Serialization\BinaryXmlReader.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Serialization\BinaryXmlTypeMap.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Serialization\BinaryXmlWriter.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins.Serialization\IBinaryXmlElement.cs" />
-    <Compile Include="Tomboy\Addins\WebDavSyncService\WebDavSyncServiceAddin.cs" />
-    <Compile Include="Tomboy\Addins\SshSyncService\SshSyncServiceAddin.cs" />
-    <Compile Include="Tomboy\Addins\FileSystemSyncService\FileSystemSyncServiceAddin.cs" />
-    <Compile Include="Tomboy\AddinPreferenceFactory.cs" />
-    <Compile Include="Tomboy\Addins\Bugzilla\BugzillaNoteAddin.cs" />
-    <Compile Include="Tomboy\Addins\Bugzilla\InsertBugAction.cs" />
-    <Compile Include="Tomboy\Addins\Bugzilla\BugzillaLink.cs" />
-    <Compile Include="Tomboy\Addins\Bugzilla\BugzillaPreferences.cs" />
-    <Compile Include="Tomboy\Addins\Bugzilla\BugzillaPreferencesFactory.cs" />
-    <Compile Include="Tomboy\Addins\ExportToHtml\ExportToHtmlNoteAddin.cs" />
-    <Compile Include="Tomboy\Addins\ExportToHtml\NoteNameResolver.cs" />
-    <Compile Include="Tomboy\Addins\ExportToHtml\ExportToHtmlDialog.cs" />
-    <Compile Include="Tomboy\Addins\FixedWidth\FixedWidthNoteAddin.cs" />
-    <Compile Include="Tomboy\Addins\FixedWidth\FixedWidthTag.cs" />
-    <Compile Include="Tomboy\Addins\FixedWidth\FixedWidthMenuItem.cs" />
-    <Compile Include="Tomboy\Addins\NoteOfTheDay\NoteOfTheDayApplicationAddin.cs" />
-    <Compile Include="Tomboy\Addins\NoteOfTheDay\NoteOfTheDay.cs" />
-    <Compile Include="Tomboy\Addins\NoteOfTheDay\NoteOfTheDayPreferences.cs" />
-    <Compile Include="Tomboy\Addins\NoteOfTheDay\NoteOfTheDayPreferencesFactory.cs" />
-    <Compile Include="Tomboy\Addins\PrintNotes\PrintNotesNoteAddin.cs" />
-    <Compile Include="Tomboy\Addins\StickyNoteImport\StickyNoteImportNoteAddin.cs" />
-    <Compile Include="Tomboy\Addins\Evolution\EvolutionNoteAddin.cs" />
-    <Compile Include="Tomboy\Synchronization\FuseSyncServiceAddin.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\AccessRights.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\AttributeType.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\GenericItemData.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\ItemACL.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\ItemData.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\ItemType.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\KeyringException.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\KeyringInfo.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\NetItemData.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\NoteItemData.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\Operation.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\RequestMessage.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\ResponseMessage.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\ResultCode.cs" />
-    <Compile Include="Tomboy\Gnome.Keyring\Ring.cs" />
-    <Compile Include="Tomboy\Synchronization\SyncDialog.cs" />
-    <Compile Include="Tomboy\Synchronization\SyncManager.cs" />
-    <Compile Include="Tomboy\Synchronization\SyncUtils.cs" />
-    <Compile Include="Tomboy\Synchronization\TomboySyncClient.cs" />
-    <Compile Include="Tomboy\Synchronization\FileSystemSyncServer.cs" />
-    <Compile Include="Tomboy\Synchronization\SyncServiceAddin.cs" />
-    <Compile Include="Tomboy\TagEntry.cs" />
-    <Compile Include="Tomboy\Search.cs" />
-    <Compile Include="Tomboy\Notebooks\Notebook.cs" />
-    <Compile Include="Tomboy\Notebooks\NotebookManager.cs" />
-    <Compile Include="Tomboy\Notebooks\CreateNotebookDialog.cs" />
-    <Compile Include="Tomboy\Notebooks\NotebookNoteAddin.cs" />
-    <Compile Include="Tomboy\Notebooks\NotebookMenuItem.cs" />
-    <Compile Include="Tomboy\Notebooks\NotebookApplicationAddin.cs" />
-    <Compile Include="Tomboy\Notebooks\NotebookNewNoteMenuItem.cs" />
-    <Compile Include="Tomboy\PreferenceTabAddin.cs" />
-    <Compile Include="Tomboy\Notebooks\NotebooksTreeView.cs" />
-    <Compile Include="Tomboy\Addins\InsertTimestamp\InsertTimestampNoteAddin.cs" />
-    <Compile Include="Tomboy\Addins\InsertTimestamp\InsertTimestampPreferences.cs" />
-    <Compile Include="Tomboy\Addins\InsertTimestamp\InsertTimestampPreferencesFactory.cs" />
-    <Compile Include="Tomboy\Addins\Sketching\Handwriting.cs" />
-    <Compile Include="Tomboy\Addins\Sketching\Paper.cs" />
-    <Compile Include="Tomboy\Addins\Sketching\Pen.cs" />
-    <Compile Include="Tomboy\Addins\Sketching\SketchingNoteAddin.cs" />
-    <Compile Include="Tomboy\Addins\Sketching\SketchingTextTag.cs" />
-    <Compile Include="Tomboy\Addins\Sketching\Stroke.cs" />
-    <Compile Include="Tomboy\Addins\Tasque\TasqueNoteAddin.cs" />
-    <Compile Include="Tomboy\Addins\Tasque\RemoteControl.cs" />
-    <Compile Include="Tomboy\Addins\GalagoPresence\GalagoPresenceNoteAddin.cs" />
-    <Compile Include="Tomboy\RecentTreeView.cs" />
-    <Compile Include="Mono.Addins\Mono.Addins\Mono.Addins\InstanceExtensionNode.cs" />
-    <Compile Include="Tomboy\Services.cs" />
-    <Compile Include="Tomboy\GConfPreferencesClient.cs" />
-    <Compile Include="Tomboy\GnomeApplication.cs" />
-    <Compile Include="Tomboy\Keybinder.cs" />
-    <Compile Include="Tomboy\NativeApplication.cs" />
-    <Compile Include="Tomboy\PlatformFactory.cs" />
-    <Compile Include="Tomboy\PreferencesClient.cs" />
-    <Compile Include="Tomboy\PrefsKeybinder.cs" />
-    <Compile Include="Tomboy\GtkApplication.cs" />
-    <Compile Include="Tomboy\XmlPreferencesClient.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <ProjectExtensions>
-    <MonoDevelop>
-      <Properties xmlns="">
-        <GtkDesignInfo gtkVersion="2.10.3" />
-        <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="./Makefile.am" ExecuteTargetName="run">
-          <BuildFilesVar />
-          <DeployFilesVar />
-          <ResourcesVar />
-          <OthersVar />
-          <GacRefVar />
-          <AsmRefVar />
-          <ProjectRefVar />
-        </MonoDevelop.Autotools.MakefileInfo>
-      </Properties>
-    </MonoDevelop>
-  </ProjectExtensions>
+ï<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"; ToolsVersion="3.5">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <ProjectGuid>{315DBB30-1461-4A41-A23F-A888D84E1EA0}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AssemblyName>Tomboy</AssemblyName>
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
+    <Execution>
+      <Execution xmlns="" />
+    </Execution>
+    <Build>
+      <Build xmlns="" />
+    </Build>
+    <DefineConstants>WIN32</DefineConstants>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
+    <Execution>
+      <Execution xmlns="" />
+    </Execution>
+    <Build>
+      <Build xmlns="" />
+    </Build>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="atk-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\Program Files\Medsphere\Gtk# SDK\lib\gtk-sharp-2.0\atk\atk-sharp.dll</HintPath>
+    </Reference>
+    <Reference Include="gdk-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="gtk-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="ICSharpCode.SharpZipLib, Version=0.85.5.452, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>winbin\ICSharpCode.SharpZipLib.dll</HintPath>
+    </Reference>
+    <Reference Include="Mono.Addins, Version=0.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>winbin\Mono.Addins.dll</HintPath>
+    </Reference>
+    <Reference Include="Mono.Addins.Gui, Version=0.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>winbin\Mono.Addins.Gui.dll</HintPath>
+    </Reference>
+    <Reference Include="Mono.Addins.Setup, Version=0.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>winbin\Mono.Addins.Setup.dll</HintPath>
+    </Reference>
+    <Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>winbin\Mono.Posix.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml" />
+    <Reference Include="glib-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="System" />
+    <Reference Include="pango-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="Mono.Cairo" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Tomboy\ActionManager.cs" />
+    <Compile Include="Tomboy\Contrast.cs" />
+    <Compile Include="Tomboy\Logger.cs" />
+    <Compile Include="Tomboy\Note.cs" />
+    <Compile Include="Tomboy\NoteBuffer.cs" />
+    <Compile Include="Tomboy\NoteManager.cs" />
+    <Compile Include="Tomboy\NoteTag.cs" />
+    <Compile Include="Tomboy\NoteWindow.cs" />
+    <Compile Include="Tomboy\Preferences.cs" />
+    <Compile Include="Tomboy\RecentChanges.cs" />
+    <Compile Include="Tomboy\Tomboy.cs" />
+    <Compile Include="Tomboy\Tray.cs" />
+    <Compile Include="Tomboy\Trie.cs" />
+    <Compile Include="Tomboy\Undo.cs" />
+    <Compile Include="Tomboy\Utils.cs" />
+    <Compile Include="Tomboy\Watchers.cs" />
+    <Compile Include="Tomboy\TagManager.cs" />
+    <Compile Include="Tomboy\Tag.cs" />
+    <Compile Include="Tomboy\TagButton.cs" />
+    <Compile Include="Tomboy\WrapBox.cs" />
+    <Compile Include="Tomboy\Defines.cs" />
+    <Compile Include="Tomboy\PreferencesDialog.cs" />
+    <Compile Include="Tomboy\NoteEditor.cs" />
+    <Compile Include="Tomboy\AbstractAddin.cs" />
+    <Compile Include="Tomboy\ApplicationAddin.cs" />
+    <Compile Include="Tomboy\NoteAddin.cs" />
+    <Compile Include="Tomboy\AddinManager.cs" />
+    <Compile Include="Tomboy\AddinPreferenceFactory.cs" />
+    <Compile Include="Tomboy\Synchronization\SyncDialog.cs" />
+    <Compile Include="Tomboy\Synchronization\SyncManager.cs" />
+    <Compile Include="Tomboy\Synchronization\SyncUtils.cs" />
+    <Compile Include="Tomboy\Synchronization\TomboySyncClient.cs" />
+    <Compile Include="Tomboy\Synchronization\FileSystemSyncServer.cs" />
+    <Compile Include="Tomboy\Synchronization\SyncServiceAddin.cs" />
+    <Compile Include="Tomboy\TagEntry.cs" />
+    <Compile Include="Tomboy\Search.cs" />
+    <Compile Include="Tomboy\Notebooks\Notebook.cs" />
+    <Compile Include="Tomboy\Notebooks\NotebookManager.cs" />
+    <Compile Include="Tomboy\Notebooks\CreateNotebookDialog.cs" />
+    <Compile Include="Tomboy\Notebooks\NotebookNoteAddin.cs" />
+    <Compile Include="Tomboy\Notebooks\NotebookMenuItem.cs" />
+    <Compile Include="Tomboy\Notebooks\NotebookApplicationAddin.cs" />
+    <Compile Include="Tomboy\Notebooks\NotebookNewNoteMenuItem.cs" />
+    <Compile Include="Tomboy\PreferenceTabAddin.cs" />
+    <Compile Include="Tomboy\Notebooks\NotebooksTreeView.cs" />
+    <Compile Include="Tomboy\RecentTreeView.cs" />
+    <Compile Include="Tomboy\Services.cs" />
+    <Compile Include="Tomboy\Keybinder.cs" />
+    <Compile Include="Tomboy\NativeApplication.cs" />
+    <Compile Include="Tomboy\PlatformFactory.cs" />
+    <Compile Include="Tomboy\PreferencesClient.cs" />
+    <Compile Include="Tomboy\PrefsKeybinder.cs" />
+    <Compile Include="Tomboy\WindowsApplication.cs" />
+    <Compile Include="Tomboy\XmlPreferencesClient.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="UIManagerLayout.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Tomboy.addin.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="filter-note-all.png" />
+    <EmbeddedResource Include="filter-note-unfiled.png" />
+    <EmbeddedResource Include="note-new.png" />
+    <EmbeddedResource Include="note.png" />
+    <EmbeddedResource Include="notebook-new.png" />
+    <EmbeddedResource Include="notebook.png" />
+    <EmbeddedResource Include="pin-active.png" />
+    <EmbeddedResource Include="pin-down.png" />
+    <EmbeddedResource Include="pin-up.png" />
+    <EmbeddedResource Include="tomboy.png" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ProjectExtensions>
+    <MonoDevelop>
+      <Properties xmlns="">
+        <GtkDesignInfo gtkVersion="2.10.3" />
+        <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="./Makefile.am" ExecuteTargetName="run">
+          <BuildFilesVar />
+          <DeployFilesVar />
+          <ResourcesVar />
+          <OthersVar />
+          <GacRefVar />
+          <AsmRefVar />
+          <ProjectRefVar />
+        </MonoDevelop.Autotools.MakefileInfo>
+      </Properties>
+    </MonoDevelop>
+    <VisualStudio />
+  </ProjectExtensions>
+  <PropertyGroup>
+    <PreBuildEvent>copy $(ProjectDir)\data\icons\hicolor_apps_48x48_tomboy.png $(ProjectDir)\tomboy.png
+copy $(ProjectDir)\data\icons\hicolor_places_22x22_note.png $(ProjectDir)\note.png
+copy $(ProjectDir)\data\icons\hicolor_actions_16x16_note-new.png $(ProjectDir)\note-new.png
+copy $(ProjectDir)\data\icons\hicolor_actions_22x22_filter-note-all.png $(ProjectDir)\filter-note-all.png
+copy $(ProjectDir)\data\icons\hicolor_actions_22x22_filter-note-unfiled.png $(ProjectDir)\filter-note-unfiled.png
+copy $(ProjectDir)\data\icons\hicolor_places_22x22_notebook.png $(ProjectDir)\notebook.png
+copy $(ProjectDir)\data\icons\hicolor_actions_48x48_notebook-new.png $(ProjectDir)\notebook-new.png
+copy $(ProjectDir)\data\icons\hicolor_status_16x16_pin-down.png $(ProjectDir)\pin-down.png
+copy $(ProjectDir)\data\icons\hicolor_status_16x16_pin-up.png $(ProjectDir)\pin-up.png
+copy $(ProjectDir)\data\icons\hicolor_status_16x16_pin-active.png $(ProjectDir)\pin-active.png
+copy $(ProjectDir)\Tomboy\Tomboy.addin.xml $(ProjectDir)
+copy $(ProjectDir)\data\UIManagerLayout.xml $(ProjectDir)</PreBuildEvent>
+  </PropertyGroup>
 </Project>
\ No newline at end of file

Modified: branches/tomboy-portable2/Tomboy.sln
==============================================================================
--- branches/tomboy-portable2/Tomboy.sln	(original)
+++ branches/tomboy-portable2/Tomboy.sln	Wed Aug 27 23:45:37 2008
@@ -1,6 +1,6 @@
 ï
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tomboy", "Tomboy.csproj", "{315DBB30-1461-4A41-A23F-A888D84E1EA0}"
 EndProject
 Global
@@ -14,6 +14,9 @@
 		{315DBB30-1461-4A41-A23F-A888D84E1EA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{315DBB30-1461-4A41-A23F-A888D84E1EA0}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
 		name = Tomboy
 		StartupItem = Tomboy.csproj

Modified: branches/tomboy-portable2/Tomboy/AddinManager.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/AddinManager.cs	(original)
+++ branches/tomboy-portable2/Tomboy/AddinManager.cs	Wed Aug 27 23:45:37 2008
@@ -6,7 +6,6 @@
 using System.IO;
 
 using Mono.Unix;
-using Mono.Unix.Native;
 
 using Tomboy.Sync;
 

Modified: branches/tomboy-portable2/Tomboy/Logger.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/Logger.cs	(original)
+++ branches/tomboy-portable2/Tomboy/Logger.cs	Wed Aug 27 23:45:37 2008
@@ -35,7 +35,7 @@
 		{
 			try {
 				log = File.CreateText (Path.Combine (
-				                               Environment.GetEnvironmentVariable ("HOME"),
+				                               Services.NativeApplication.ConfDir,
 				                               ".tomboy.log"));
 				log.Flush ();
 			} catch (IOException) {
@@ -48,7 +48,9 @@
 		~FileLogger ()
 		{
 			if (log != null)
-				log.Flush ();
+				try {
+					log.Flush ();
+				} catch { }
 		}
 
 		public void Log (Level lvl, string msg, params object[] args)

Modified: branches/tomboy-portable2/Tomboy/NativeApplication.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/NativeApplication.cs	(original)
+++ branches/tomboy-portable2/Tomboy/NativeApplication.cs	Wed Aug 27 23:45:37 2008
@@ -18,5 +18,13 @@
 		void Exit (int exitcode);
 		void StartMainLoop ();
 		void QuitMainLoop ();
+
+		string ConfDir { get; }
+
+		void OpenUrl (string url);
+
+		void DisplayHelp (string filename,
+			string link_id,
+			Gdk.Screen screen);
 	}
 }

Modified: branches/tomboy-portable2/Tomboy/NoteManager.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/NoteManager.cs	(original)
+++ branches/tomboy-portable2/Tomboy/NoteManager.cs	Wed Aug 27 23:45:37 2008
@@ -78,9 +78,7 @@
 
 		protected virtual AddinManager CreateAddinManager ()
 		{
-			string tomboy_conf_dir =
-			        Path.Combine (Environment.GetEnvironmentVariable ("HOME"),
-			                      ".tomboy");
+			string tomboy_conf_dir = Services.NativeApplication.ConfDir;
 
 			return new AddinManager (tomboy_conf_dir);
 		}

Modified: branches/tomboy-portable2/Tomboy/PlatformFactory.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/PlatformFactory.cs	(original)
+++ branches/tomboy-portable2/Tomboy/PlatformFactory.cs	Wed Aug 27 23:45:37 2008
@@ -4,29 +4,30 @@
 	{
 		public static IPropertyEditor CreatePropertyEditorEntry (string key, Gtk.Entry sourceEntry)
 		{
-			return new GConfPropertyEditorEntry (key, sourceEntry);
+			return new PropertyEditorEntry (key, sourceEntry);
 		}
 
 		public static IPropertyEditorBool CreatePropertyEditorToggleButton (
 		        string key, Gtk.CheckButton sourceButton)
 		{
-			return new GConfPropertyEditorToggleButton (key, sourceButton);
+			return new PropertyEditorToggleButton (key, sourceButton);
 		}
 
 		public static IPreferencesClient CreatePreferencesClient ()
 		{
-			return new GConfPreferencesClient ();
+			return new XmlPreferencesClient ();
+			//return new NullPreferencesClient ();
 		}
 
 		public static INativeApplication CreateNativeApplication ()
 		{
-			return new GnomeApplication ();
+			return new WindowsApplication ();
 			// or GtkApplication
 		}
 
 		public static IKeybinder CreateKeybinder ()
 		{
-			return new XKeybinder ();
+			return new NullKeybinder ();
 			// or NullKeybinder
 			// (consider having a separate file+class
 			// for NeutralPlatformFactory vs GnomePlatformFactory)

Modified: branches/tomboy-portable2/Tomboy/PreferencesDialog.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/PreferencesDialog.cs	(original)
+++ branches/tomboy-portable2/Tomboy/PreferencesDialog.cs	Wed Aug 27 23:45:37 2008
@@ -2,7 +2,6 @@
 using System;
 using System.Collections.Generic;
 using System.Text;
-using GConf.PropertyEditors;
 using Mono.Unix;
 
 using Tomboy.Sync;
@@ -132,7 +131,7 @@
 			Gtk.Label label;
 			Gtk.CheckButton check;
 			Gtk.Alignment align;
-			PropertyEditorBool peditor, font_peditor, bullet_peditor;
+			IPropertyEditorBool peditor, font_peditor, bullet_peditor;
 
 			Gtk.VBox options_list = new Gtk.VBox (false, 12);
 			options_list.BorderWidth = 12;
@@ -269,8 +268,8 @@
 			Gtk.CheckButton check;
 			Gtk.Alignment align;
 			Gtk.Entry entry;
-			PropertyEditorBool keybind_peditor;
-			PropertyEditor peditor;
+			IPropertyEditorBool keybind_peditor;
+			IPropertyEditor peditor;
 
 			Gtk.VBox hotkeys_list = new Gtk.VBox (false, 12);
 			hotkeys_list.BorderWidth = 12;
@@ -792,7 +791,7 @@
 			AddinInfoDialogDeleted (sender, null);
 		}
 
-		void SetupPropertyEditor (PropertyEditor peditor)
+		void SetupPropertyEditor (IPropertyEditor peditor)
 		{
 			// Ensure the key exists
 			Preferences.Get (peditor.Key);

Modified: branches/tomboy-portable2/Tomboy/PrefsKeybinder.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/PrefsKeybinder.cs	(original)
+++ branches/tomboy-portable2/Tomboy/PrefsKeybinder.cs	Wed Aug 27 23:45:37 2008
@@ -128,9 +128,9 @@
 	public class TomboyPrefsKeybinder : PrefsKeybinder
 	{
 		NoteManager manager;
-		TomboyTray  tray;
+		ITomboyTray  tray;
 
-		public TomboyPrefsKeybinder (NoteManager manager, TomboyTray tray)
+		public TomboyPrefsKeybinder (NoteManager manager, ITomboyTray tray)
 				: base ()
 		{
 			this.manager = manager;

Modified: branches/tomboy-portable2/Tomboy/Services.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/Services.cs	(original)
+++ branches/tomboy-portable2/Tomboy/Services.cs	Wed Aug 27 23:45:37 2008
@@ -36,8 +36,8 @@
 		
 		static Services ()
 		{
-			prefs = PlatformFactory.CreatePreferencesClient ();
 			nativeApp = PlatformFactory.CreateNativeApplication ();
+			prefs = PlatformFactory.CreatePreferencesClient ();
 			keybinder = PlatformFactory.CreateKeybinder ();
 		}
 

Modified: branches/tomboy-portable2/Tomboy/Tomboy.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/Tomboy.cs	(original)
+++ branches/tomboy-portable2/Tomboy/Tomboy.cs	Wed Aug 27 23:45:37 2008
@@ -96,7 +96,7 @@
 			        override_path :
 			        Environment.GetEnvironmentVariable ("TOMBOY_PATH");
 			if (note_path == null)
-				note_path = "~/.tomboy";
+				note_path = Services.NativeApplication.ConfDir;
 
 			// Tilde expand
 			return note_path.Replace ("~", Environment.GetEnvironmentVariable ("HOME"));
@@ -105,7 +105,10 @@
 		static void RegisterPanelAppletFactory ()
 		{
 			// This will block if there is no existing instance running
+			// TODO: Refactor panel applet code in this class properly
+#if !WIN32
 			Gnome.PanelAppletFactory.Register (typeof (TomboyApplet));
+#endif
 		}
 
 		static void StartTrayIcon ()

Modified: branches/tomboy-portable2/Tomboy/Tray.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/Tray.cs	(original)
+++ branches/tomboy-portable2/Tomboy/Tray.cs	Wed Aug 27 23:45:37 2008
@@ -133,7 +133,7 @@
 	}
 	
 	
-	public class TomboyTrayIcon : Gtk.StatusIcon
+	public class TomboyTrayIcon : Gtk.StatusIcon, ITomboyTray
 	{
 		TomboyTray tray;
 		TomboyPrefsKeybinder keybinder;
@@ -141,7 +141,7 @@
 		public TomboyTrayIcon (NoteManager manager)
 		{
 			tray = new TomboyTray (manager, this);
-			keybinder = new TomboyPrefsKeybinder (manager, tray);
+			keybinder = new TomboyPrefsKeybinder (manager, this);
 			int panel_size = 22;
 			Pixbuf = GuiUtils.GetIcon ("tomboy", panel_size);
 
@@ -194,16 +194,20 @@
 			Gdk.Screen screen;
 			Gdk.Rectangle area;
 			Gtk.Orientation orientation;
-			GetGeometry (out screen, out area, out orientation);
-			
-			x = area.X;
-			y = area.Y;
-			
-			Gtk.Requisition menu_req = menu.SizeRequest ();
-			if (y + menu_req.Height >= screen.Height)
-				y -= menu_req.Height;
-			else
-				y += area.Height;
+			try {
+				GetGeometry (out screen, out area, out orientation);
+
+				x = area.X;
+				y = area.Y;
+
+				Gtk.Requisition menu_req = menu.SizeRequest ();
+				if (y + menu_req.Height >= screen.Height)
+					y -= menu_req.Height;
+				else
+					y += area.Height;
+			} catch (Exception e) {
+				Logger.Error ("Exception in GetTrayMenuPosition: " + e.ToString ());
+			}
 		}
 		
 		Gtk.Menu MakeRightClickMenu ()
@@ -261,13 +265,40 @@
 			Tomboy.ActionManager ["QuitTomboyAction"].Activate ();
 		}
 
+		public bool MenuOpensUpward ()
+		{
+#if WIN32
+			return true;
+#else
+			bool open_upwards = false;
+			int val = 0;
+			Gdk.Screen screen = null;
+
+			Gdk.Rectangle area;
+			Gtk.Orientation orientation;
+			GetGeometry (out screen, out area, out orientation);
+			val = area.Y;
+
+			Gtk.Requisition menu_req = tray.TomboyTrayMenu.SizeRequest ();
+			if (val + menu_req.Height >= screen.Height)
+				open_upwards = true;
+
+			return open_upwards;
+#endif
+		}
+	}
+
+	// TODO: Some naming love would be nice
+	public interface ITomboyTray
+	{
+		void ShowMenu (bool select_first_item);
+		bool MenuOpensUpward ();
 	}
 	
 	public class TomboyTray
 	{
 		NoteManager manager;
-		TomboyTrayIcon tray_icon = null;
-		TomboyAppletEventBox applet_event_box = null;
+		ITomboyTray tray;
 		bool menu_added = false;
 		List<Gtk.MenuItem> recent_notes = new List<Gtk.MenuItem> ();
 		Gtk.Menu tray_menu;
@@ -280,24 +311,10 @@
 			tray_menu.Hidden += MenuHidden;
 		}
 		
-		public TomboyTray (NoteManager manager, TomboyTrayIcon tray_icon)
-			: this (manager)
-		{
-			this.tray_icon = tray_icon;
-		}
-		
-		public TomboyTray (NoteManager manager, TomboyAppletEventBox applet_event_box)
+		public TomboyTray (NoteManager manager, ITomboyTray tray)
 			: this (manager)
 		{
-			this.applet_event_box = applet_event_box;
-		}
-		
-		public void ShowMenu (bool select_first_item)
-		{
-			if (applet_event_box != null)
-				applet_event_box.ShowMenu (select_first_item);
-			else if (tray_icon != null)
-				tray_icon.ShowMenu (select_first_item);
+			this.tray = tray;
 		}
 		
 		Gtk.Menu MakeTrayNotesMenu ()
@@ -359,7 +376,7 @@
 			int min_size = (int) Preferences.Get (Preferences.MENU_NOTE_COUNT);
 			int max_size = 18;
 			int list_size = 0;
-			bool menuOpensUpward = MenuOpensUpward ();
+			bool menuOpensUpward = tray.MenuOpensUpward ();
 			NoteMenuItem item;
 
 			// Assume menu opens downward, move common items to top of menu
@@ -463,31 +480,6 @@
 			tray_menu.Insert (separator, insertion_point);
 			recent_notes.Add (separator);
 		}
-		
-		public bool MenuOpensUpward ()
-		{
-			bool open_upwards = false;
-			int val = 0;
-			Gdk.Screen screen = null;
-			
-			if (applet_event_box != null) {
-				int x, y;
-				applet_event_box.GdkWindow.GetOrigin (out x, out y);
-				val = y;
-				screen = applet_event_box.Screen;
-			} else if (tray_icon != null) {
-				Gdk.Rectangle area;
-				Gtk.Orientation orientation;
-				tray_icon.GetGeometry(out screen, out area, out orientation);
-				val = area.Y;
-			}
-			
-			Gtk.Requisition menu_req = tray_menu.SizeRequest ();
-			if (val + menu_req.Height >= screen.Height)
-				open_upwards = true;
-
-			return open_upwards;
-		}
 
 		public bool IsMenuAdded
 		{

Modified: branches/tomboy-portable2/Tomboy/Utils.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/Utils.cs	(original)
+++ branches/tomboy-portable2/Tomboy/Utils.cs	Wed Aug 27 23:45:37 2008
@@ -136,12 +136,16 @@
 		                             Gtk.Window parent)
 		{
 			try {
-				Gnome.Help.DisplayDesktopOnScreen (
+				Services.NativeApplication.DisplayHelp (
+					filename,
+					link_id,
+					screen);
+				/*Gnome.Help.DisplayDesktopOnScreen (
 				        Gnome.Program.Get (),
 				        Defines.GNOME_HELP_DIR,
 				        filename,
 				        link_id,
-				        screen);
+				        screen);*/
 			} catch {
 			string message =
 			Catalog.GetString ("The \"Tomboy Notes Manual\" could " +
@@ -788,7 +792,7 @@
 : base (name)
 		{
 		}
-
+#if !WIN32
 		[DllImport("libtomboy")]
 		static extern void tomboy_window_present_hardcore (IntPtr win);
 
@@ -796,6 +800,7 @@
 		{
 			tomboy_window_present_hardcore (this.Handle);
 		}
+#endif
 	}
 
 	class ToolMenuButton : Gtk.ToggleToolButton

Modified: branches/tomboy-portable2/Tomboy/Watchers.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/Watchers.cs	(original)
+++ branches/tomboy-portable2/Tomboy/Watchers.cs	Wed Aug 27 23:45:37 2008
@@ -456,7 +456,7 @@
 		{
 			if (url != string.Empty) {
 				Logger.Log ("Opening url '{0}'...", url);
-				Gnome.Url.Show (url);
+				Services.NativeApplication.OpenUrl (url);
 			}
 		}
 

Copied: branches/tomboy-portable2/Tomboy/WindowsApplication.cs (from r2100, /branches/tomboy-portable2/Tomboy/GtkApplication.cs)
==============================================================================
--- /branches/tomboy-portable2/Tomboy/GtkApplication.cs	(original)
+++ branches/tomboy-portable2/Tomboy/WindowsApplication.cs	Wed Aug 27 23:45:37 2008
@@ -25,10 +25,11 @@
 
 
 using System;
+using System.IO;
 
 namespace Tomboy
 {
-	public class GtkApplication : INativeApplication
+	public class WindowsApplication : INativeApplication
 	{
 		#region INativeApplication implementation 
 		
@@ -65,8 +66,35 @@
 		{
 			Gtk.Application.Quit ();
 		}
-		
-		#endregion 
-		
+
+		public string ConfDir
+		{
+			get
+			{
+				string confDir = Path.Combine (
+					Environment.GetFolderPath (
+					Environment.SpecialFolder.LocalApplicationData),
+					".tomboy");
+				if (!Directory.Exists (confDir))
+					Directory.CreateDirectory (confDir);
+				return confDir;
+			}
+		}
+
+		public void OpenUrl (string url)
+		{
+			try {
+				System.Diagnostics.Process.Start (url);
+			} catch (Exception e) {
+				Logger.Error ("Error opening url [{0}]:\n{1}", url, e.ToString ());
+			}
+		}
+
+		public void DisplayHelp (string filename, string link_id, Gdk.Screen screen)
+		{
+			throw new NotImplementedException ();
+		}
+
+		#endregion
 	}
 }

Modified: branches/tomboy-portable2/Tomboy/XmlPreferencesClient.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/XmlPreferencesClient.cs	(original)
+++ branches/tomboy-portable2/Tomboy/XmlPreferencesClient.cs	Wed Aug 27 23:45:37 2008
@@ -25,6 +25,7 @@
 
 
 using System;
+using System.IO;
 using System.Collections.Generic;
 using System.Xml;
 
@@ -44,7 +45,11 @@
 
 		public XmlPreferencesClient ()
 		{
-
+			fileName = Path.Combine (
+				Services.NativeApplication.ConfDir,
+				"prefs.xml");
+			prefsDoc = new XmlDocument ();
+			events = new Dictionary<string, NotifyEventHandler> ();
 		}
 		
 		#endregion
@@ -74,13 +79,23 @@
 			try {
 				XmlElement element = prefsDoc.SelectSingleNode(key) as XmlElement;
 				if (element != null) {
-					if (element.InnerText.ToLower () == "true")
-						return true;
-					if (element.InnerText.ToLower () == "false")
-						return false;
-					return element.InnerText;
+					int intVal;
+					double doubleVal;
+					bool boolVal;
+
+					string innerText = element.InnerText;
+
+					if (bool.TryParse (innerText, out boolVal))
+						return boolVal;
+					else if (int.TryParse (innerText, out intVal))
+						return intVal;
+					else if (double.TryParse (innerText, out doubleVal))
+						return doubleVal;
+					else
+						return innerText;
 				}
 				
+				// TODO: Ugly, fix
 				throw new System.Exception();
 			} catch {
 				throw new NoSuchKeyException (key);
@@ -91,14 +106,18 @@
 		public void AddNotify (string dir, NotifyEventHandler notify)
 		{
 			lock (events) {
-				events [dir] += notify;
+				if (!events.ContainsKey (dir))
+					events [dir] = notify;
+				else
+					events [dir] += notify;
 			}
 		}
 		
 		public void RemoveNotify (string dir, NotifyEventHandler notify)
 		{
 			lock (events) {
-				events [dir] -= notify;
+				if (events.ContainsKey (dir))
+					events [dir] -= notify;
 			}
 		}
 		
@@ -134,4 +153,120 @@
 
 		#endregion
 	}
+
+	public class PropertyEditor : IPropertyEditor{
+		private string key;
+
+		public string Key
+		{
+			get { return key; }
+		}
+
+		public PropertyEditor (string key)
+		{
+			this.key = key;
+		}
+
+		public virtual void Setup ()
+		{
+		}
+
+		protected object Get ()
+		{
+			return Services.Preferences.Get (Key);
+		}
+
+		protected void Set (object value)
+		{
+			Services.Preferences.Set (Key, value);
+		}
+	}
+
+	public class PropertyEditorBool : PropertyEditor, IPropertyEditorBool {
+		protected List<Gtk.Widget> guards = new List<Gtk.Widget> ();
+
+		public PropertyEditorBool (string key) : base (key) { }
+
+		public virtual void AddGuard (Gtk.Widget widget)
+		{
+			guards.Add (widget);
+		}
+
+		protected void Set (bool value)
+		{
+			base.Set (value);
+			UpdateGuards (value);
+		}
+
+		protected void UpdateGuards ()
+		{
+			bool val = false;
+			try {
+				val = Get ();
+			} catch (NoSuchKeyException) { }
+			UpdateGuards (val);
+		}
+
+		private void UpdateGuards (bool value)
+		{
+			foreach (Gtk.Widget widget in guards)
+				widget.Sensitive = value;
+		}
+
+		protected new bool Get ()
+		{
+			return (bool) base.Get ();
+		}
+	}
+
+	public class PropertyEditorToggleButton : PropertyEditorBool {
+		Gtk.CheckButton button;
+
+		public PropertyEditorToggleButton (string key, Gtk.CheckButton sourceButton) :
+			base (key)
+		{
+			button = sourceButton;
+		}
+
+		public override void Setup ()
+		{
+			bool active = false;
+			try {
+				active = Get ();
+			} catch (NoSuchKeyException) { }
+			button.Active = active;
+			button.Clicked += new System.EventHandler (OnChanged);
+			UpdateGuards ();
+		}
+
+		private void OnChanged (object sender, System.EventArgs args)
+		{
+			Set (button.Active);
+		}
+	}
+
+	public class PropertyEditorEntry : PropertyEditor {
+		Gtk.Entry entry;
+		public PropertyEditorEntry (string key, Gtk.Entry sourceEntry) :
+			base (key)
+		{
+			entry = sourceEntry;
+		}
+
+		public override void Setup ()
+		{
+			string val = string.Empty;
+			try {
+				val = System.Convert.ToString (base.Get ());
+			} catch (NoSuchKeyException) { }
+			entry.Text = val;
+			entry.Changed += OnChanged;
+		}
+
+		private void OnChanged (object sender, System.EventArgs args)
+		{
+			Set (entry.Text);
+		}
+	}
+
 }

Added: branches/tomboy-portable2/winbin/ICSharpCode.SharpZipLib.dll
==============================================================================
Binary file. No diff available.

Added: branches/tomboy-portable2/winbin/Mono.Addins.Gui.dll
==============================================================================
Binary file. No diff available.

Added: branches/tomboy-portable2/winbin/Mono.Addins.Setup.dll
==============================================================================
Binary file. No diff available.

Added: branches/tomboy-portable2/winbin/Mono.Addins.dll
==============================================================================
Binary file. No diff available.

Added: branches/tomboy-portable2/winbin/Mono.Addins.dll.config
==============================================================================
--- (empty file)
+++ branches/tomboy-portable2/winbin/Mono.Addins.dll.config	Wed Aug 27 23:45:37 2008
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+  <startup>
+    <supportedRuntime version="v2.0.50727" /> 
+  </startup>
+</configuration>

Added: branches/tomboy-portable2/winbin/Mono.Posix.dll
==============================================================================
Binary file. No diff available.

Added: branches/tomboy-portable2/winbin/MonoPosixHelper.dll
==============================================================================
Binary file. No diff available.



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