[meld] meldwindow: Fake out our progress spinner on Windows (#133)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] meldwindow: Fake out our progress spinner on Windows (#133)
- Date: Sat, 24 Feb 2018 20:46:12 +0000 (UTC)
commit a36963e0d41155027de6e2216acffc572768d253
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 | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index e941c773..b2e15b44 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -14,6 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import os
+
from gi.repository import Gdk
from gi.repository import Gio
from gi.repository import GLib
@@ -212,8 +214,13 @@ class MeldWindow(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]