Index: Tomboy/Applet.cs
===================================================================
--- Tomboy/Applet.cs	(revision 1503)
+++ Tomboy/Applet.cs	(working copy)
@@ -1,4 +1,3 @@
-
 using System;
 using System.IO;
 using System.Reflection;
@@ -183,6 +182,14 @@
 			item.Image = new Gtk.Image (Gtk.Stock.Preferences, Gtk.IconSize.Menu);
 			item.Activated += ShowPreferences;
 			menu.Append (item);
+            
+			// Only add Synchronize Notes option if synchronization is configured.
+			string addin_id = Preferences.Get (Preferences.SYNC_SELECTED_SERVICE_ADDIN) as string;
+			item = new Gtk.ImageMenuItem (Catalog.GetString ("Synchronize Notes"));
+			item.Image = new Gtk.Image (Gtk.Stock.Convert, Gtk.IconSize.Menu);
+			item.Sensitive = !string.IsNullOrEmpty(addin_id);
+			item.Activated += SynchronizeNotes;
+			menu.Append (item);
 
 			item = new Gtk.ImageMenuItem (Catalog.GetString ("_Help"));
 			item.Image = new Gtk.Image (Gtk.Stock.Help, Gtk.IconSize.Menu);
@@ -209,6 +216,11 @@
 		{
 			Tomboy.ActionManager ["ShowPreferencesAction"].Activate ();
 		}
+        
+		void SynchronizeNotes (object sender, EventArgs args)
+		{
+			Tomboy.ActionManager ["NoteSynchronizationAction"].Activate ();
+		}
 
 		void ShowHelpContents (object sender, EventArgs args)
 		{
Index: Tomboy/Synchronization/SyncDialog.cs
===================================================================
--- Tomboy/Synchronization/SyncDialog.cs	(revision 1503)
+++ Tomboy/Synchronization/SyncDialog.cs	(working copy)
@@ -28,28 +28,37 @@
 					Gtk.DialogFlags.DestroyWithParent)
 		{
 			progressBarTimeoutId = 0;
-			
+
 			SetSizeRequest (400, -1);
-			
-			VBox outerVBox = new VBox (false, 12);
-			outerVBox.BorderWidth = 12;
-			outerVBox.Spacing = 8;
-			
-			HBox hbox = new HBox (false, 8);
-			
+			HasSeparator = false;
+
+			// Outer box. Surrounds all of our content.
+			VBox outerVBox = new VBox (false, 6);
+			outerVBox.BorderWidth = 6;
+			outerVBox.Show ();
+			VBox.PackStart (outerVBox, true, true, 0);
+
+			// Top image and label
+			HBox hbox = new HBox (false, 6);
+			hbox.Show ();
+			outerVBox.PackStart (hbox, false, false, 0);
+
 			image = new Image (GuiUtils.GetIcon ("tomboy", 48));
 			image.Show ();
 			hbox.PackStart (image, false, false, 0);
-			
-			VBox vbox = new VBox (false, 8);
-			
+
+			// Label header and message
+			VBox vbox = new VBox (false, 6);
+			vbox.Show ();
+			hbox.PackStart (vbox, true, true, 0);
+
 			headerLabel = new Label ();
 			headerLabel.UseMarkup = true;
 			headerLabel.Xalign = 0;
 			headerLabel.UseUnderline = false;
 			headerLabel.Show ();
 			vbox.PackStart (headerLabel, false, false, 0);
-			
+
 			messageLabel = new Label ();
 			messageLabel.Xalign = 0;
 			messageLabel.UseUnderline = false;
@@ -57,20 +66,14 @@
 			messageLabel.Wrap = true;
 			messageLabel.Show ();
 			vbox.PackStart (messageLabel, false, false, 0);
-			
-			vbox.Show ();
-			hbox.PackStart (vbox, true, true, 0);
-			
-			hbox.Show ();
-			outerVBox.PackStart (hbox, false, false, 0);
-			
+
 			progressBar = new Gtk.ProgressBar ();
 			progressBar.Orientation = Gtk.ProgressBarOrientation.LeftToRight;
 			progressBar.BarStyle = ProgressBarStyle.Continuous;
 			progressBar.ActivityBlocks = 30;
 			progressBar.Show ();
 			outerVBox.PackStart (progressBar, false, false, 0);
-			
+
 			progressLabel = new Label ();
 			progressLabel.UseMarkup = true;
 			progressLabel.Xalign = 0;
@@ -79,58 +82,54 @@
 			progressLabel.Wrap = true;
 			progressLabel.Show ();
 			outerVBox.PackStart (progressLabel, false, false, 0);
-			
+
+			// Expander containing TreeView
+			expander = new Gtk.Expander (Catalog.GetString ("Details"));
+			expander.Spacing = 6;
+			expander.Activated += OnExpanderActivated;
+			expander.Show ();
+			outerVBox.PackStart (expander, true, true, 0);			
+
+			// Contents of expander
+			Gtk.VBox expandVBox = new Gtk.VBox ();
+			expandVBox.Show ();
+			expander.Add (expandVBox);
+
+			// Scrolled window around TreeView
+			Gtk.ScrolledWindow scrolledWindow = new Gtk.ScrolledWindow ();
+			scrolledWindow.ShadowType = Gtk.ShadowType.In;
+			scrolledWindow.SetSizeRequest (-1, 200);
+			scrolledWindow.Show ();
+			expandVBox.PackStart (scrolledWindow, true, true, 0);
+
 			// Create model for TreeView
 			model = new Gtk.TreeStore (typeof (string), typeof (string));
-			
+
 			// Create TreeView, attach model
 			Gtk.TreeView treeView = new Gtk.TreeView ();
 			treeView.Model = model;
-			
+			treeView.RowActivated += OnRowActivated;
+			treeView.Show ();
+			scrolledWindow.Add (treeView);
+
 			// Set up TreeViewColumns
 			Gtk.TreeViewColumn column = new Gtk.TreeViewColumn (
-					Catalog.GetString ("Note Title"),
-					new Gtk.CellRendererText (), "text", 0);
+			Catalog.GetString ("Note Title"),
+			new Gtk.CellRendererText (), "text", 0);
 			column.SortColumnId = 0;
 			column.Resizable = true;
 			treeView.AppendColumn (column);
-			
+
 			column = new Gtk.TreeViewColumn (
-					Catalog.GetString ("Status"),
-					new Gtk.CellRendererText (), "text", 1);
+			Catalog.GetString ("Status"),
+			new Gtk.CellRendererText (), "text", 1);
 			column.SortColumnId = 1;
 			column.Resizable = true;
 			treeView.AppendColumn (column);
-			
-			treeView.RowActivated += OnRowActivated;
-			
-			treeView.Show ();
-			
-			// Drop TreeView into a ScrolledWindow into a VBox
-			Gtk.ScrolledWindow scrolledWindow = new Gtk.ScrolledWindow ();
-			scrolledWindow.SetSizeRequest (-1, 200);
-			scrolledWindow.Add (treeView);
-			scrolledWindow.Show ();
-			Gtk.VBox expandVBox = new Gtk.VBox ();
-			expandVBox.PackStart (scrolledWindow, true, true, 5);
-			
-			// Drop all that into into the Expander
-			expander = new Gtk.Expander (Catalog.GetString ("Details"));
-			expander.Add (expandVBox);
-			expander.Show ();
-			outerVBox.PackStart (expander, true, true, 5);
-			
+
+			// Button to close dialog.
 			closeButton = (Gtk.Button) AddButton (Gtk.Stock.Close, Gtk.ResponseType.Close);
 			closeButton.Sensitive = false;
-			
-			HasSeparator = false;
-			
-			expander.Activated += OnExpanderActivated;
-			
-			outerVBox.Show ();
-			VBox.PackStart (outerVBox, true, true, 0);
-
-			VBox.ShowAll ();
 		}
 		
 		public override void Destroy ()
Index: Tomboy/NoteWindow.cs
===================================================================
--- Tomboy/NoteWindow.cs	(revision 1503)
+++ Tomboy/NoteWindow.cs	(working copy)
@@ -16,6 +16,7 @@
 		Gtk.Widget link_button;
 		NoteTextMenu text_menu;
 		Gtk.Menu plugin_menu;
+		Gtk.ImageMenuItem sync_menu_item;
 		Gtk.TextView editor;
 		Gtk.ScrolledWindow editor_window;
 //		NoteTagBar tag_bar;
@@ -181,6 +182,8 @@
 
 		protected override bool OnDeleteEvent (Gdk.Event evnt)
 		{
+			Preferences.SettingChanged -= Preferences_SettingChanged;
+			
 			CloseWindowHandler (null, null);
 			return true;
 		}
@@ -476,16 +479,34 @@
 			if (note.IsSpecial)
 				delete.Sensitive = false;
 
-			Gtk.ImageMenuItem item = 
-				new Gtk.ImageMenuItem (Catalog.GetString ("Synchronize Notes"));
-			item.Image = new Gtk.Image (Gtk.Stock.Convert, Gtk.IconSize.Menu);
-			item.Activated += SyncItemSelected;
-			item.Show ();
-			PluginMenu.Add (item);
+			sync_menu_item = new Gtk.ImageMenuItem (Catalog.GetString ("Synchronize Notes"));
+			sync_menu_item.Image = new Gtk.Image (Gtk.Stock.Convert, Gtk.IconSize.Menu);
+			sync_menu_item.Activated += SyncItemSelected;
+			sync_menu_item.Show ();
+			PluginMenu.Add (sync_menu_item);
 
+			// We might want to know when various settings are altered.
+			Preferences.SettingChanged += Preferences_SettingChanged;
+
+			// Update items based on configuration.
+			UpdateMenuItems();
+
 			return toolbar;
 		}
-		
+
+		void Preferences_SettingChanged (object sender, EventArgs args)
+		{
+			// Update items based on configuration.
+			UpdateMenuItems ();
+		}
+                
+		void UpdateMenuItems ()
+		{
+			// Synchronization not configured?
+			string sync_addin_id = (string)Preferences.Get(Preferences.SYNC_SELECTED_SERVICE_ADDIN);
+			sync_menu_item.Sensitive = !string.IsNullOrEmpty(sync_addin_id);
+		}
+
 		void SyncItemSelected (object sender, EventArgs args)
 		{
 			Tomboy.ActionManager ["NoteSynchronizationAction"].Activate ();
