From 3780c658d967be508b48f388ec5fe6ada55711b3 Mon Sep 17 00:00:00 2001 From: bahniks Date: Wed, 20 Apr 2016 22:26:02 +0200 Subject: [PATCH] linux wait cursor changed --- Stuff/Modules/explorer.py | 2 +- Stuff/Modules/filestorage.py | 8 ++++---- Stuff/Modules/mode.py | 5 ++++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Stuff/Modules/explorer.py b/Stuff/Modules/explorer.py index 74b3f77..4273669 100644 --- a/Stuff/Modules/explorer.py +++ b/Stuff/Modules/explorer.py @@ -305,7 +305,7 @@ def saveImages(self): if len(files) > 1: progress = ProgressWindow(self, len(files), text = "saved") elif len(files) == 1 and files[0]: - self.root.config(cursor = "wait") + self.root.config(cursor = m.wait) self.root.update() else: self.status.set("No file selected.") diff --git a/Stuff/Modules/filestorage.py b/Stuff/Modules/filestorage.py index bb4aee9..5afabe8 100644 --- a/Stuff/Modules/filestorage.py +++ b/Stuff/Modules/filestorage.py @@ -345,7 +345,7 @@ def pairSelectedFun(self): def findPairsFun(self): "calls method of FileStorage finding pairs of data files" - self.config(cursor = "wait") + self.config(cursor = m.wait) self.update() self.fileStorage.findPairs(self.fileStorage.wrongfiles) self.refresh() @@ -585,7 +585,7 @@ def update(self): def addFilesFun(self): "asks uset to select files and adds them to filestorage (via addFiles)" - self.root.root.config(cursor = "wait") + self.root.root.config(cursor = m.wait) self.root.root.update() self.addFiles(self.getFiles()) self.root.root.config(cursor = "") @@ -595,7 +595,7 @@ def addFilesFun(self): def addDirectoryFun(self): """asks user to select directory and adds files from the directory to the list of files for processing""" - self.root.root.config(cursor = "wait") + self.root.root.config(cursor = m.wait) self.root.root.update() self.addFiles(self.getDirectory()) self.root.root.config(cursor = "") @@ -605,7 +605,7 @@ def addDirectoryFun(self): def loadFromLogFun(self): """asks user to select file with a log, loads files from the log and adds them to fileStorage""" - self.root.root.config(cursor = "wait") + self.root.root.config(cursor = m.wait) self.root.root.update() filename = str(askopenfilename(initialdir = optionGet("LogDirectory", diff --git a/Stuff/Modules/mode.py b/Stuff/Modules/mode.py index feee5e5..06b5e4f 100644 --- a/Stuff/Modules/mode.py +++ b/Stuff/Modules/mode.py @@ -17,8 +17,9 @@ along with Carousel Maze Manager. If not, see . """ -from collections import namedtuple, OrderedDict +import platform +from collections import namedtuple, OrderedDict from cm import CM from mwm import MWM @@ -35,6 +36,8 @@ slaves = {} name = "" parameters = None +wait = "wait" if platform.system() == "Windows" else "spinning" + Task = namedtuple("Task", ["constructor", "files", "parameters"])