[meld/meld-3-18] meldwindow: Fake out our progress spinner on Windows (#133)



commit dbbe3b59a76416ad0bfeccd0c8f6da2db4bbe50c
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Feb 25 06:43:54 2018 +1000

    meldwindow: Fake out our progress spinner on Windows (#133)
    
    On Windows, the spinner repaint is so slow (and on a high enough idle
    priority) that it stops us making any comparison progress. This looks
    like a Cairo problem, but either way it's not something we can really
    fix in Meld, so we're doing the dumbest possible thing here and shimming
    out the spinner.

 meld/meldwindow.py | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index ce9dbd86..1786e5ea 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -215,8 +215,13 @@ class MeldWindow(gnomeglade.Component):
             action.connect('activate', callback)
             self.widget.add_action(action)
 
+        # Create a secondary toolbar, just to hold our progress spinner
         toolbutton = Gtk.ToolItem()
         self.spinner = Gtk.Spinner()
+        # Fake out the spinner on Windows. See Gitlab issue #133.
+        if os.name == 'nt':
+            for attr in ('stop', 'hide', 'show', 'start'):
+                setattr(self.spinner, attr, lambda *args: True)
         toolbutton.add(self.spinner)
         self.secondary_toolbar.insert(toolbutton, -1)
         # Set a minimum size because the spinner requests nothing


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