banshee r5113 - in trunk/banshee: . src/Clients/Nereid/Nereid src/Core/Banshee.ThickClient src/Core/Banshee.ThickClient/Banshee.Gui.Widgets



Author: jmillikin
Date: Thu Mar  5 22:56:22 2009
New Revision: 5113
URL: http://svn.gnome.org/viewvc/banshee?rev=5113&view=rev

Log:
2009-03-05  John Millikin  <jmillikin gmail com>

	* src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusIcon.cs:
	* src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusButton.cs:
	Use an animated image, rather than a button *containing* an animated
	image, for the task status icon (BGO #574298).
	
	* src/Clients/Nereid/Nereid/PlayerInterface.cs:
	* src/Core/Banshee.ThickClient/Makefile.am:
	Rename TaskStatusButton to TaskStatusIcon.



Added:
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusIcon.cs   (contents, props changed)
      - copied, changed from r5111, /trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusButton.cs
Removed:
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusButton.cs
Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am

Modified: trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs
==============================================================================
--- trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs	(original)
+++ trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs	Thu Mar  5 22:56:22 2009
@@ -191,7 +191,7 @@
             footer_toolbar.ShowArrow = false;
             footer_toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
 
-            Widget task_status = new Banshee.Gui.Widgets.TaskStatusButton ();
+            Widget task_status = new Banshee.Gui.Widgets.TaskStatusIcon ();
 
             EventBox status_event_box = new EventBox ();
             status_event_box.ButtonPressEvent += OnStatusBoxButtonPress;

Copied: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusIcon.cs (from r5111, /trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusButton.cs)
==============================================================================
--- /trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusButton.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TaskStatusIcon.cs	Thu Mar  5 22:56:22 2009
@@ -1,5 +1,5 @@
 // 
-// TaskStatusButton.cs
+// TaskStatusIcon.cs
 //
 // Author:
 //   Gabriel Burt <gburt novell com>
@@ -42,31 +42,24 @@
 
 namespace Banshee.Gui.Widgets
 {
-    public class TaskStatusButton : Gtk.Button
+    public class TaskStatusIcon : AnimatedImage
     {
-        private AnimatedImage image;
         //private Dictionary<IUserJob, UserJobTile> job_tiles = new Dictionary<IUserJob, UserJobTile> ();
         private List<IUserJob> jobs = new List<IUserJob> ();
 
-        public TaskStatusButton ()
+        public TaskStatusIcon ()
         {
             // Setup widgetry
-            Relief = ReliefStyle.None;
-            Sensitive = false;
-
-            image = new AnimatedImage ();
             try {
-                image.Pixbuf = Gtk.IconTheme.Default.LoadIcon ("process-working", 22, IconLookupFlags.NoSvg);
-                image.FrameHeight = 22;
-                image.FrameWidth = 22;
-                image.Load ();
-                image.Active = false;
+                Pixbuf = Gtk.IconTheme.Default.LoadIcon ("process-working", 22, IconLookupFlags.NoSvg);
+                FrameHeight = 22;
+                FrameWidth = 22;
+                Load ();
+                TaskActive = false;
             } catch (Exception e) {
                 Hyena.Log.Exception (e);
             }
 
-            Child = image;
-
             // Listen for jobs
             UserJobManager job_manager = ServiceManager.Get<UserJobManager> ();
             job_manager.JobAdded += OnJobAdded;
@@ -91,26 +84,25 @@
                             jobs.Count
                         ), sb.ToString ()
                     );
-                    Active = true;
+                    TaskActive = true;
                 } else {
                     TooltipText = Catalog.GetString ("No background tasks running");
-                    Active = false;
+                    TaskActive = false;
                 }
             }
         }
 
         private bool first = true;
-        private bool active = false;
-        private bool Active {
+        private bool task_active = false;
+        private bool TaskActive {
             set {
-                if (!first && active == value)
+                if (!first && task_active == value)
                     return;
 
                 first = false;
-                active = value;
-                Sensitive = active;
+                task_active = value;
 
-                if (active) {
+                if (task_active) {
                     TurnOn ();
                 } else {
                     TurnOff ();
@@ -120,8 +112,8 @@
 
         private bool TurnOn ()
         {
-            if (active) {
-                image.Active = true;
+            if (task_active) {
+                Active = true;
                 Banshee.ServiceStack.Application.RunTimeout (1000, TurnOff);
             }
             return false;
@@ -129,9 +121,9 @@
 
         private bool TurnOff ()
         {
-            image.Active = false;
+            Active = false;
 
-            if (active) {
+            if (task_active) {
                 Banshee.ServiceStack.Application.RunTimeout (5000, TurnOn);
             }
             return false;

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am	Thu Mar  5 22:56:22 2009
@@ -89,7 +89,7 @@
 	Banshee.Gui.Widgets/NextButton.cs \
 	Banshee.Gui.Widgets/PlaylistMenuItem.cs \
 	Banshee.Gui.Widgets/RepeatActionButton.cs \
-	Banshee.Gui.Widgets/TaskStatusButton.cs \
+	Banshee.Gui.Widgets/TaskStatusIcon.cs \
 	Banshee.Gui.Widgets/TrackInfoDisplay.cs \
 	Banshee.Gui.Widgets/UserJobTile.cs \
 	Banshee.Gui.Widgets/UserJobTileHost.cs \



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