tomboy r2302 - in trunk: . Tomboy



Author: sharm
Date: Sat Jan 31 10:17:50 2009
New Revision: 2302
URL: http://svn.gnome.org/viewvc/tomboy?rev=2302&view=rev

Log:
* Tomboy.csproj: Remove deleted files.

* Tomboy/Tray.cs: Hide tray icon on Tomboy exit (bug #569709, idea stolen
  from Benjamin Podszun).

* Tomboy/NoteEditor.cs: Fix how font preferences are handled (bug #559724,
  patch from none other than Benjamin Podszun).

Modified:
   trunk/ChangeLog
   trunk/Tomboy.csproj
   trunk/Tomboy/NoteEditor.cs
   trunk/Tomboy/Tray.cs

Modified: trunk/Tomboy.csproj
==============================================================================
--- trunk/Tomboy.csproj	(original)
+++ trunk/Tomboy.csproj	Sat Jan 31 10:17:50 2009
@@ -140,7 +140,6 @@
     <Compile Include="Tomboy\TagButton.cs" />
     <Compile Include="Tomboy\WindowsFactory.cs" />
     <Compile Include="Tomboy\WindowsKeybinder.cs" />
-    <Compile Include="Tomboy\WrapBox.cs" />
     <Compile Include="Tomboy\PreferencesDialog.cs" />
     <Compile Include="Tomboy\NoteEditor.cs" />
     <Compile Include="Tomboy\AbstractAddin.cs" />
@@ -154,7 +153,6 @@
     <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" />

Modified: trunk/Tomboy/NoteEditor.cs
==============================================================================
--- trunk/Tomboy/NoteEditor.cs	(original)
+++ trunk/Tomboy/NoteEditor.cs	Sat Jan 31 10:17:50 2009
@@ -76,25 +76,28 @@
 		{
 			switch (args.Key) {
 			case Preferences.ENABLE_CUSTOM_FONT:
-				Logger.Log ("Switching note font {0}...",
-				            (bool) args.Value ? "ON" : "OFF");
-
-				if ((bool) args.Value) {
-					string font_string = (string)
-					                     Preferences.Get (Preferences.CUSTOM_FONT_FACE);
-					ModifyFont (Pango.FontDescription.FromString (font_string));
-				} else
-					ModifyFont (GetGnomeDocumentFontDescription ());
-
+				UpdateCustomFontSetting ();
+				break;
+			case Preferences.CUSTOM_FONT_FACE:
+				UpdateCustomFontSetting ();
 				break;
 
 			case GNOME_DOCUMENT_FONT_KEY:
 				if (!(bool) Preferences.Get (Preferences.ENABLE_CUSTOM_FONT))
 					ModifyFontFromString ((string) args.Value);
 				break;
-			case Preferences.CUSTOM_FONT_FACE:
-				ModifyFontFromString ((string) args.Value);
-				break;
+			}
+		}
+		
+		void UpdateCustomFontSetting ()
+		{
+			if ((bool) Preferences.Get(Preferences.ENABLE_CUSTOM_FONT)) {
+				string fontString = (string) Preferences.Get(Preferences.CUSTOM_FONT_FACE);
+				Logger.Log( "Switching note font to '{0}'...", fontString);
+				ModifyFontFromString (fontString);
+			} else {
+				Logger.Log ("Switching back to the default font");
+				ModifyFont (GetGnomeDocumentFontDescription());
 			}
 		}
 

Modified: trunk/Tomboy/Tray.cs
==============================================================================
--- trunk/Tomboy/Tray.cs	(original)
+++ trunk/Tomboy/Tray.cs	Sat Jan 31 10:17:50 2009
@@ -145,6 +145,8 @@
 			Pixbuf = GuiUtils.GetIcon ("tomboy", panel_size);
 
 			Tooltip = TomboyTrayUtils.GetToolTipText ();
+
+			Tomboy.ExitingEvent += OnExit;
 #if MAC
 			Visible = false;
 #endif
@@ -272,6 +274,11 @@
 			Tomboy.ActionManager ["QuitTomboyAction"].Activate ();
 		}
 
+		void OnExit (object sender, EventArgs e)
+		{
+			Visible = false;
+		}
+
 		public bool MenuOpensUpward ()
 		{
 			bool open_upwards = false;



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