tomboy r2105 - in branches/tomboy-portable2: . Tomboy



Author: sharm
Date: Thu Aug 28 19:48:26 2008
New Revision: 2105
URL: http://svn.gnome.org/viewvc/tomboy?rev=2105&view=rev

Log:
* Tomboy.mdp, Tomboy/Makefile.am: Rename
  GtkApplication.cs->WindowsApplication.cs
* Tomboy/Applet.cs: Implement ITomboyTray.
* Tomboy/Utils.cs: Remove commented-out code.
* Tomboy/GnomeApplication.cs: Implement new stuff from
  INativeApplication.

Modified:
   branches/tomboy-portable2/ChangeLog
   branches/tomboy-portable2/Tomboy.mdp
   branches/tomboy-portable2/Tomboy/Applet.cs
   branches/tomboy-portable2/Tomboy/GnomeApplication.cs
   branches/tomboy-portable2/Tomboy/Makefile.am
   branches/tomboy-portable2/Tomboy/Utils.cs

Modified: branches/tomboy-portable2/Tomboy.mdp
==============================================================================
--- branches/tomboy-portable2/Tomboy.mdp	(original)
+++ branches/tomboy-portable2/Tomboy.mdp	Thu Aug 28 19:48:26 2008
@@ -214,8 +214,8 @@
     <File name="Tomboy/PlatformFactory.cs" subtype="Code" buildaction="Compile" />
     <File name="Tomboy/PreferencesClient.cs" subtype="Code" buildaction="Compile" />
     <File name="Tomboy/PrefsKeybinder.cs" subtype="Code" buildaction="Compile" />
-    <File name="Tomboy/GtkApplication.cs" subtype="Code" buildaction="Compile" />
     <File name="Tomboy/XmlPreferencesClient.cs" subtype="Code" buildaction="Compile" />
+    <File name="Tomboy/WindowsApplication.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />

Modified: branches/tomboy-portable2/Tomboy/Applet.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/Applet.cs	(original)
+++ branches/tomboy-portable2/Tomboy/Applet.cs	Thu Aug 28 19:48:26 2008
@@ -43,7 +43,7 @@
 
 			manager = Tomboy.DefaultNoteManager;
 			applet_event_box = new TomboyAppletEventBox (manager);
-			keybinder = new TomboyPrefsKeybinder (manager, applet_event_box.Tray);
+			keybinder = new TomboyPrefsKeybinder (manager, applet_event_box);
 
 			Flags |= PanelAppletFlags.ExpandMinor;
 
@@ -134,7 +134,7 @@
 	
 	public enum PanelOrientation { Horizontal, Vertical };
 	
-	public class TomboyAppletEventBox : Gtk.EventBox
+	public class TomboyAppletEventBox : Gtk.EventBox, ITomboyTray
 	{
 		NoteManager manager;
 		TomboyTray tray;
@@ -394,6 +394,24 @@
 
 			InitPixbuf ();
 		}
+
+		public bool MenuOpensUpward ()
+		{
+			bool open_upwards = false;
+			int val = 0;
+			Gdk.Screen screen = null;
+
+			int x, y;
+			GdkWindow.GetOrigin (out x, out y);
+			val = y;
+			screen = Screen;
+
+			Gtk.Requisition menu_req = tray.TomboyTrayMenu.SizeRequest ();
+			if (val + menu_req.Height >= screen.Height)
+				open_upwards = true;
+
+			return open_upwards;
+		}
 	}
 }
 

Modified: branches/tomboy-portable2/Tomboy/GnomeApplication.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/GnomeApplication.cs	(original)
+++ branches/tomboy-portable2/Tomboy/GnomeApplication.cs	Thu Aug 28 19:48:26 2008
@@ -13,6 +13,13 @@
 	public class GnomeApplication : INativeApplication
 	{
 		private Gnome.Program program;
+		private string confDir;
+
+		public GnomeApplication ()
+		{
+			confDir = Path.Combine (Environment.GetEnvironmentVariable ("HOME"),
+			                        ".tomboy");
+		}
 
 		public void Initialize (string locale_dir,
 		                        string display_name,
@@ -140,5 +147,26 @@
 			if (ExitingEvent != null)
 				ExitingEvent (null, new EventArgs ());
 		}
+		
+		public void OpenUrl (string url)
+		{
+			Gnome.Url.Show (url);
+		}
+		
+		public void DisplayHelp (string filename, string link_id, Gdk.Screen screen)
+		{
+			Gnome.Help.DisplayDesktopOnScreen (
+			        Gnome.Program.Get (),
+			        Defines.GNOME_HELP_DIR,
+			        filename,
+			        link_id,
+			        screen);
+		}
+		
+		public string ConfDir {
+			get {
+				return confDir;
+			}
+		}
 	}
 }

Modified: branches/tomboy-portable2/Tomboy/Makefile.am
==============================================================================
--- branches/tomboy-portable2/Tomboy/Makefile.am	(original)
+++ branches/tomboy-portable2/Tomboy/Makefile.am	Thu Aug 28 19:48:26 2008
@@ -38,7 +38,7 @@
 	$(srcdir)/Contrast.cs		\
 	$(srcdir)/GConfPreferencesClient.cs	\
 	$(srcdir)/GnomeApplication.cs		\
-	$(srcdir)/GtkApplication.cs		\
+	$(srcdir)/WindowsApplication.cs		\
 	$(srcdir)/Keybinder.cs			\
 	$(srcdir)/Logger.cs			\
 	$(srcdir)/NativeApplication.cs		\

Modified: branches/tomboy-portable2/Tomboy/Utils.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/Utils.cs	(original)
+++ branches/tomboy-portable2/Tomboy/Utils.cs	Thu Aug 28 19:48:26 2008
@@ -140,12 +140,6 @@
 					filename,
 					link_id,
 					screen);
-				/*Gnome.Help.DisplayDesktopOnScreen (
-				        Gnome.Program.Get (),
-				        Defines.GNOME_HELP_DIR,
-				        filename,
-				        link_id,
-				        screen);*/
 			} catch {
 			string message =
 			Catalog.GetString ("The \"Tomboy Notes Manual\" could " +



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