[f-spot] Move TipWindow to FSpot.Widgets.ToolTipWindow.



commit 72ddc91ef4e869454149d8770fbb897924b4bf65
Author: Ruben Vermeersch <ruben savanne be>
Date:   Thu Aug 12 17:07:28 2010 +0200

    Move TipWindow to FSpot.Widgets.ToolTipWindow.

 src/Clients/MainApp/FSpot/GroupSelector.cs        |    3 +-
 src/Clients/MainApp/FSpot/TipWindow.cs            |   22 -------------------
 src/Clients/MainApp/MainApp.csproj                |    1 -
 src/Clients/MainApp/Makefile.am                   |    1 -
 src/Core/FSpot.Gui/FSpot.Gui.csproj               |    1 +
 src/Core/FSpot.Gui/FSpot.Widgets/ToolTipWindow.cs |   24 +++++++++++++++++++++
 src/Core/FSpot.Gui/Makefile.am                    |    3 +-
 7 files changed, 29 insertions(+), 26 deletions(-)
---
diff --git a/src/Clients/MainApp/FSpot/GroupSelector.cs b/src/Clients/MainApp/FSpot/GroupSelector.cs
index e8d90d0..b8fca11 100644
--- a/src/Clients/MainApp/FSpot/GroupSelector.cs
+++ b/src/Clients/MainApp/FSpot/GroupSelector.cs
@@ -5,6 +5,7 @@ using Gdk;
 using GLib;
 using FSpot.Core;
 using FSpot.Utils;
+using FSpot.Widgets;
 
 namespace FSpot {
 	public class GroupSelector : Fixed {
@@ -703,7 +704,7 @@ namespace FSpot {
 
 			public Glass (GroupSelector selector) : base (selector)
 			{
-				popup_window = new TipWindow ();
+				popup_window = new ToolTipWindow ();
 				popup_label = new Gtk.Label (String.Empty);
 				popup_label.Show ();
 				popup_window.Add (popup_label);
diff --git a/src/Clients/MainApp/MainApp.csproj b/src/Clients/MainApp/MainApp.csproj
index 9376408..97cbf70 100644
--- a/src/Clients/MainApp/MainApp.csproj
+++ b/src/Clients/MainApp/MainApp.csproj
@@ -136,7 +136,6 @@
     <Compile Include="FSpot\ThumbnailCache.cs" />
     <Compile Include="FSpot\ThumbnailGenerator.cs" />
     <Compile Include="FSpot\TimeAdaptor.cs" />
-    <Compile Include="FSpot\TipWindow.cs" />
     <Compile Include="FSpot.UI.Dialog\AboutDialog.cs" />
     <Compile Include="FSpot.UI.Dialog\AdjustTimeDialog.cs" />
     <Compile Include="FSpot.UI.Dialog\BuilderDialog.cs" />
diff --git a/src/Clients/MainApp/Makefile.am b/src/Clients/MainApp/Makefile.am
index a4ff25f..05c9c3f 100644
--- a/src/Clients/MainApp/Makefile.am
+++ b/src/Clients/MainApp/Makefile.am
@@ -159,7 +159,6 @@ SOURCES =  \
 	FSpot/ThumbnailCache.cs \
 	FSpot/ThumbnailGenerator.cs \
 	FSpot/TimeAdaptor.cs \
-	FSpot/TipWindow.cs \
 	FSpot/UriCollection.cs \
 	FSpot/XScreenSaverSlide.cs \
 	ImageLoaderThread.cs \
diff --git a/src/Core/FSpot.Gui/FSpot.Gui.csproj b/src/Core/FSpot.Gui/FSpot.Gui.csproj
index e3f432e..3f32b9d 100644
--- a/src/Core/FSpot.Gui/FSpot.Gui.csproj
+++ b/src/Core/FSpot.Gui/FSpot.Gui.csproj
@@ -58,6 +58,7 @@
     <Compile Include="FSpot.Widgets\ImageView_Container.cs" />
     <Compile Include="FSpot.Gui\WindowOpacityFader.cs" />
     <Compile Include="FSpot.Gui\CompositeUtils.cs" />
+    <Compile Include="FSpot.Widgets\ToolTipWindow.cs" />
   </ItemGroup>
   <ProjectExtensions>
     <MonoDevelop>
diff --git a/src/Core/FSpot.Gui/FSpot.Widgets/ToolTipWindow.cs b/src/Core/FSpot.Gui/FSpot.Widgets/ToolTipWindow.cs
new file mode 100644
index 0000000..acb2aa4
--- /dev/null
+++ b/src/Core/FSpot.Gui/FSpot.Widgets/ToolTipWindow.cs
@@ -0,0 +1,24 @@
+using Gtk;
+using Gdk;
+
+namespace FSpot.Widgets
+{
+    public class ToolTipWindow : Gtk.Window
+    {
+        public ToolTipWindow () : base(Gtk.WindowType.Popup)
+        {
+            Name = "gtk-tooltips";
+            AppPaintable = true;
+            BorderWidth = 4;
+        }
+
+        protected override bool OnExposeEvent (Gdk.EventExpose args)
+        {
+            Gtk.Style.PaintFlatBox (Style, GdkWindow, State, ShadowType.Out, args.Area,
+                            this, "tooltip", Allocation.X, Allocation.Y, Allocation.Width,
+                            Allocation.Height);
+            
+            return base.OnExposeEvent (args);
+        }
+    }
+}
diff --git a/src/Core/FSpot.Gui/Makefile.am b/src/Core/FSpot.Gui/Makefile.am
index 078d91f..144e313 100644
--- a/src/Core/FSpot.Gui/Makefile.am
+++ b/src/Core/FSpot.Gui/Makefile.am
@@ -28,7 +28,8 @@ SOURCES =  \
 	FSpot.Widgets/PointerMode.cs \
 	FSpot.Widgets/Rating.cs \
 	FSpot.Widgets/SaneTreeView.cs \
-	FSpot.Widgets/ScrolledView.cs
+	FSpot.Widgets/ScrolledView.cs \
+	FSpot.Widgets/ToolTipWindow.cs
 
 RESOURCES =
 



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