[conduit] Remove terrible old animated status icon



commit ff033f0f0ff69e0d76c180b8ba0bd161c86bb3df
Author: John Stowers <john stowers gmail com>
Date:   Thu Sep 23 11:03:20 2010 +1200

    Remove terrible old animated status icon

 conduit/gtkui/UI.py                                |   55 +-
 data/conduit-progress.svg                          |  831 --------------------
 data/icons/hicolor/16x16/status/Makefile.am        |    8 -
 .../hicolor/16x16/status/conduit-progress-1.png    |  Bin 761 -> 0 bytes
 .../hicolor/16x16/status/conduit-progress-2.png    |  Bin 777 -> 0 bytes
 .../hicolor/16x16/status/conduit-progress-3.png    |  Bin 738 -> 0 bytes
 .../hicolor/16x16/status/conduit-progress-4.png    |  Bin 783 -> 0 bytes
 .../hicolor/16x16/status/conduit-progress-5.png    |  Bin 763 -> 0 bytes
 .../hicolor/16x16/status/conduit-progress-6.png    |  Bin 748 -> 0 bytes
 .../hicolor/16x16/status/conduit-progress-7.png    |  Bin 765 -> 0 bytes
 .../hicolor/16x16/status/conduit-progress-8.png    |  Bin 747 -> 0 bytes
 11 files changed, 12 insertions(+), 882 deletions(-)
---
diff --git a/conduit/gtkui/UI.py b/conduit/gtkui/UI.py
index d2e62ed..ae6d83b 100644
--- a/conduit/gtkui/UI.py
+++ b/conduit/gtkui/UI.py
@@ -722,61 +722,30 @@ class StatusIcon(gtk.StatusIcon):
         self.connect('popup-menu', self.on_popup_menu)
         self.connect('activate', self.on_click)
 
-        self.animating = False
-        self.check_animate = False
-        self.conflict = False
-        self.animated_idx = 0
-        self.animated_icons = range(1,8)
-
-        #start with the application icon
         self.cancelButton.set_property("sensitive", False)
         self.set_from_icon_name("conduit")
         self.set_tooltip("Conduit")
         self.set_visible(True)
 
-    def _animate_icon_timeout(self):
-        #FIXME: When will gtk support animated gtk status icons?
-        if self.animating:
-            if self.animated_idx == self.animated_icons[-1]:
-                self.animated_idx = 1
-            else:
-                self.animated_idx += 1
-                self.set_from_icon_name("conduit-progress-%d" % self.animated_idx)
-            # re-check animation?                
-            if self.check_animate:
-                self.animating =  conduit.GLOBALS.syncManager.is_busy()
-                self.check_animate = False
-            return True
-
-        else: 
-            if self.conflict:
-                self.set_from_icon_name("dialog-error")
-                self.set_tooltip(_("Synchronization Error"))
-            else:
-                self.set_from_icon_name("conduit")
-                self.set_tooltip(_("Synchronization Complete"))
-            self.conflict = False
-            self.cancelButton.set_property("sensitive", False)
-            return False
-
     def _on_sync_started(self, cond):
-        if not self.animating:
-            self.animating = True
-            self.set_tooltip(_("Synchronizing"))
-            self.cancelButton.set_property("sensitive", True)
-            gobject.timeout_add(100, self._animate_icon_timeout)
+        self.set_tooltip(_("Synchronizing"))
+        self.cancelButton.set_property("sensitive", True)
 
     def _on_sync_completed(self, cond, aborted, error, conflict):
-        # check need for animation on next iteration
-        self.check_animate = True
-
-    def _on_sync_conflict(self, cond, conflict):
-        self.conflict = True
+        if not aborted and not error and not conflict:
+            self.set_from_icon_name("conduit")
+            self.set_tooltip(_("Synchronization Complete"))
+        else:
+            self.set_from_icon_name("dialog-error")
+            if aborted or error:
+                self.set_tooltip(_("Synchronization Error"))
+            else:
+                self.set_tooltip(_("Synchronization Conflict"))
+        self.cancelButton.set_property("sensitive", False)
 
     def on_conduit_added(self, syncset, cond):
         cond.connect("sync-started", self._on_sync_started)
         cond.connect("sync-completed", self._on_sync_completed)
-        cond.connect("sync-conflict", self._on_sync_conflict)
 
     def on_conduit_removed(self, syncset, cond):
         pass
diff --git a/data/icons/hicolor/16x16/status/Makefile.am b/data/icons/hicolor/16x16/status/Makefile.am
index 7e41c59..a682091 100644
--- a/data/icons/hicolor/16x16/status/Makefile.am
+++ b/data/icons/hicolor/16x16/status/Makefile.am
@@ -5,14 +5,6 @@ context = status
 iconsdir = $(themedir)/$(size)/$(context)
 
 icons_DATA = \
-	conduit-progress-1.png \
-	conduit-progress-2.png \
-	conduit-progress-3.png \
-	conduit-progress-4.png \
-	conduit-progress-5.png \
-	conduit-progress-6.png \
-	conduit-progress-7.png \
-	conduit-progress-8.png \
 	conduit-sink.png \
 	conduit-source.png \
 	conduit-twoway.png



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