f-spot r4001 - in trunk/src: . Widgets



Author: sdelcroix
Date: Wed May 28 09:35:16 2008
New Revision: 4001
URL: http://svn.gnome.org/viewvc/f-spot?rev=4001&view=rev

Log:
splitting HighlightedBox in its own file

Added:
   trunk/src/Widgets/HighlightedBox.cs
Modified:
   trunk/src/Makefile.am
   trunk/src/Widgets/FindBar.cs

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Wed May 28 09:35:16 2008
@@ -61,6 +61,7 @@
 WIDGETS_CSDISTFILES =				\
 	$(srcdir)/Widgets/ComplexMenuItem.cs	\
 	$(srcdir)/Widgets/CustomPrintWidget.cs	\
+	$(srcdir)/Widgets/HighlightedBox.cs	\
 	$(srcdir)/Widgets/Rating.cs		\
 	$(srcdir)/Widgets/SaneTreeView.cs	\
 	$(srcdir)/Widgets/ScrolledView.cs	\

Modified: trunk/src/Widgets/FindBar.cs
==============================================================================
--- trunk/src/Widgets/FindBar.cs	(original)
+++ trunk/src/Widgets/FindBar.cs	Wed May 28 09:35:16 2008
@@ -18,31 +18,6 @@
 using FSpot.Query;
 
 namespace FSpot.Widgets {
-	public class HighlightedBox : EventBox {
-        private bool changing_style = false;
-
-		public HighlightedBox(Widget child) : base()
-        {
-            Child = child;
-            AppPaintable = true;
-        }
-
-        protected override void OnStyleSet(Style style)
-        {
-            if (!changing_style) {
-                changing_style = true;
-                ModifyBg(StateType.Normal, Style.Background(StateType.Selected));
-                changing_style = false;
-            }
-        }
-
-        protected override bool OnExposeEvent(Gdk.EventExpose evnt)
-        {
-            GdkWindow.DrawRectangle(Style.ForegroundGC(StateType.Normal), false, 0, 0, Allocation.Width - 1, Allocation.Height - 1);
-            return base.OnExposeEvent(evnt);
-        }
-    }
-
 	public class FindBar : HighlightedBox {
 		private Entry entry;
 		private string last_entry_text = String.Empty;
@@ -74,7 +49,6 @@
 		public FindBar (PhotoQuery query, TreeModel model) : base(new HBox())
 		{
 			this.query = query;
-
             box = Child as HBox;
 
 			box.Spacing = 6;

Added: trunk/src/Widgets/HighlightedBox.cs
==============================================================================
--- (empty file)
+++ trunk/src/Widgets/HighlightedBox.cs	Wed May 28 09:35:16 2008
@@ -0,0 +1,39 @@
+/*
+ * FSpot.Widgets.HighlightedBox.cs
+ *
+ * Author(s)
+ *  Gabriel Burt  <gabriel burt gmail com>
+ * 
+ * This is free software. See COPYING for details.
+ */
+
+using Gtk;
+
+namespace FSpot.Widgets
+{
+	public class HighlightedBox : EventBox
+	{
+		private bool changing_style = false;
+
+		public HighlightedBox (Widget child) : base ()
+		{
+			Child = child;
+			AppPaintable = true;
+		}
+
+		protected override void OnStyleSet(Style style)
+		{
+			if (!changing_style) {
+				changing_style = true;
+				ModifyBg(StateType.Normal, Style.Background(StateType.Selected));
+				changing_style = false;
+			}
+		}
+
+		protected override bool OnExposeEvent(Gdk.EventExpose evnt)
+		{
+			GdkWindow.DrawRectangle(Style.ForegroundGC(StateType.Normal), false, 0, 0, Allocation.Width - 1, Allocation.Height - 1);
+			return base.OnExposeEvent(evnt);
+		}
+	}
+}



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