[banshee] [Fixup] Fix checkbox hover prelight



commit ad7d88c3a5fedd603c684bf8dd18310924aaa406
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Tue Oct 19 18:22:29 2010 -0500

    [Fixup] Fix checkbox hover prelight

 build/build.environment.mk                         |    2 +-
 .../Banshee.Fixup/ColumnCellSolutionOptions.cs     |   11 ++++++-----
 .../Banshee.Fixup/Banshee.Fixup/Problem.cs         |   15 +++++++++++----
 src/Libraries/Migo/Migo.Syndication/MigoItem.cs    |    2 +-
 .../Migo/Migo.Syndication/MigoModelProvider.cs     |    6 +++++-
 5 files changed, 24 insertions(+), 12 deletions(-)
---
diff --git a/build/build.environment.mk b/build/build.environment.mk
index a2bd1aa..07f5a8c 100644
--- a/build/build.environment.mk
+++ b/build/build.environment.mk
@@ -145,7 +145,7 @@ REF_EXTENSION_MEEGO = $(LINK_BANSHEE_THICKCLIENT_DEPS)
 LINK_EXTENSION_MEEGO = -r:$(DIR_BIN)/Banshee.MeeGo.dll $(REF_EXTENSION_MEEGO)
 REF_EXTENSION_MPRIS = $(LINK_BANSHEE_THICKCLIENT_DEPS)
 REF_EXTENSION_MULTIMEDIAKEYS = $(LINK_BANSHEE_SERVICES_DEPS)
-REF_EXTENSION_FIXUP = $(LINK_BANSHEE_THICKCLIENT_DEPS) $(LINK_MUSICBRAINZ_DEPS)
+REF_EXTENSION_FIXUP = $(LINK_BANSHEE_THICKCLIENT_DEPS) $(LINK_MUSICBRAINZ_DEPS) $(LINK_MIGO_DEPS)
 REF_EXTENSION_NOTIFICATIONAREA = $(LINK_BANSHEE_THICKCLIENT_DEPS)
 REF_EXTENSION_PLAYER_MIGRATION = $(LINK_BANSHEE_THICKCLIENT_DEPS)
 REF_EXTENSION_PLAYQUEUE = $(LINK_BANSHEE_THICKCLIENT_DEPS)
diff --git a/src/Extensions/Banshee.Fixup/Banshee.Fixup/ColumnCellSolutionOptions.cs b/src/Extensions/Banshee.Fixup/Banshee.Fixup/ColumnCellSolutionOptions.cs
index 6cdc466..fd391fb 100644
--- a/src/Extensions/Banshee.Fixup/Banshee.Fixup/ColumnCellSolutionOptions.cs
+++ b/src/Extensions/Banshee.Fixup/Banshee.Fixup/ColumnCellSolutionOptions.cs
@@ -32,6 +32,7 @@ using System.Linq;
 using Mono.Unix;
 
 using Hyena;
+using Hyena.Gui.Canvas;
 using Hyena.Data.Gui;
 using System.Text;
 using System.Collections.Generic;
@@ -98,10 +99,10 @@ namespace Banshee.Fixup
             return -1;
         }
 
-        public bool ButtonEvent (int x, int y, bool pressed, Gdk.EventButton press)
+        public override bool ButtonEvent (Point cursor, bool pressed, uint button)
         {
-            if (press.Button == 1 && press.Type == Gdk.EventType.ButtonRelease) {
-                int sol = GetSolutionValueFor (x);
+            if (button == 1 && !pressed) {
+                int sol = GetSolutionValueFor ((int)cursor.X);
                 if (sol != -1) {
                     var problem = ((Problem)BoundObject);
                     problem.SolutionValue = problem.SolutionOptions.Skip (sol).First ();
@@ -113,13 +114,13 @@ namespace Banshee.Fixup
             return false;
         }
 
-        public bool MotionEvent (int x, int y, Gdk.EventMotion evnt)
+        public override bool CursorMotionEvent (Point cursor)
         {
             measure = true;
             return false;
         }
 
-        public bool PointerLeaveEvent ()
+        public override bool CursorLeaveEvent ()
         {
             solution_value_widths.Clear ();
             measure = false;
diff --git a/src/Extensions/Banshee.Fixup/Banshee.Fixup/Problem.cs b/src/Extensions/Banshee.Fixup/Banshee.Fixup/Problem.cs
index 8c94ef6..a0505c7 100644
--- a/src/Extensions/Banshee.Fixup/Banshee.Fixup/Problem.cs
+++ b/src/Extensions/Banshee.Fixup/Banshee.Fixup/Problem.cs
@@ -31,23 +31,30 @@ using System.Collections.Generic;
 using Hyena;
 using Hyena.Data.Sqlite;
 
+using Migo.Syndication;
+
 using Banshee.ServiceStack;
 
 namespace Banshee.Fixup
 {
-    public class Problem : IEquatable<Problem>
+    public class Problem : MigoItem<Problem>, IEquatable<Problem>
     {
-        private static SqliteModelProvider<Problem> provider;
-        public static SqliteModelProvider<Problem> Provider {
+        private static MigoModelProvider<Problem> provider;
+        public static MigoModelProvider<Problem> Provider {
             get {
                 return provider ?? (provider =
-                    new SqliteModelProvider<Problem> (ServiceManager.DbConnection, "MetadataProblems", false));
+                    new MigoModelProvider<Problem> (ServiceManager.DbConnection, "MetadataProblems", false));
             }
         }
 
         [DatabaseColumn ("ProblemID", Constraints = DatabaseColumnConstraints.PrimaryKey)]
         public int Id { get; private set; }
 
+        public override long DbId {
+            get { return Id; }
+            protected set { Id = (int)value; }
+        }
+
         [DatabaseColumn ("ProblemType")]
         public string ProblemType { get; private set; }
 
diff --git a/src/Libraries/Migo/Migo.Syndication/MigoItem.cs b/src/Libraries/Migo/Migo.Syndication/MigoItem.cs
index 90e6040..7f02293 100644
--- a/src/Libraries/Migo/Migo.Syndication/MigoItem.cs
+++ b/src/Libraries/Migo/Migo.Syndication/MigoItem.cs
@@ -51,4 +51,4 @@ namespace Migo.Syndication
 
         public abstract long DbId { get; protected set;}
     }
-}
\ No newline at end of file
+}
diff --git a/src/Libraries/Migo/Migo.Syndication/MigoModelProvider.cs b/src/Libraries/Migo/Migo.Syndication/MigoModelProvider.cs
index f0689a8..03f4345 100644
--- a/src/Libraries/Migo/Migo.Syndication/MigoModelProvider.cs
+++ b/src/Libraries/Migo/Migo.Syndication/MigoModelProvider.cs
@@ -45,6 +45,10 @@ namespace Migo.Syndication
         {
         }
 
+        public MigoModelProvider (HyenaSqliteConnection connection, string table_name, bool check) : base (connection, table_name, check)
+        {
+        }
+
 #region Overrides
 
         public override T FetchSingle (long id)
@@ -103,4 +107,4 @@ namespace Migo.Syndication
 #endregion
 
     }
-}
\ No newline at end of file
+}



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