Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
Simone Marzona committed Apr 30, 2016
2 parents e425673 + bc072d6 commit 08a76ba
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
45 changes: 25 additions & 20 deletions modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ def process_entry(self, event) :
event_value = event.widget.get()
ekey = str(event_name.split("_",1)[1])
if (event_value == "") or event_value.isspace() :
answer = tkMessageBox.askyesno("Error {} must have a value "\
answer = tkMessageBox.askyesno("Error", "{} must have a value "\
"entered. Use the "\
"default?".format(ekey))
if answer :
Expand All @@ -1128,16 +1128,16 @@ def process_entry(self, event) :
event.widget.focus_set()
return
try :
event_value = int(event.widget.get().replace(',',''))
event_value_int = int(event.widget.get().replace(',',''))
except ValueError:
tkMessageBox.showerror("Error",
"Invalid input value in %s" % event_name)
event.widget.focus_set()
return
self.params_last_content[event_name] = event_value
if self.scan_thread != None :
event_list = (event_name, event_value)
event_list = (event_name, event_value_int)
self.scanq.send_event_update(event_list)
self.params_last_content[event_name] = event_value

""" Methods to handle checkbutton updates
Expand Down Expand Up @@ -1224,22 +1224,27 @@ def _scan(self, mode, action):

if (action.lower() == "start" and self.scan_thread == None) :
# there is no ongoing scan task and we want to start one
self.scan_mode = mode
scanq = self.scanq
bookmarks = self.tree
pass_params = dict.copy(self.params)
nbl = self.new_bookmark_list

task = ScanningTask(scanq,
mode,
bookmarks,
nbl,
pass_params)
self.scanning = Scanning()
self.scan_thread = threading.Thread(target = self.scanning.scan,
args = (task,))
self.scan_thread.start()
self.after(0, self.check_scanthread)
if len(self.tree.get_children()) == 0 and mode == "bookmarks":
tkMessageBox.showerror("Error",
"No bookmarks to scan.")
self.bookmark_toggle()
else:
self.scan_mode = mode
scanq = self.scanq
bookmarks = self.tree
pass_params = dict.copy(self.params)
nbl = self.new_bookmark_list

task = ScanningTask(scanq,
mode,
bookmarks,
nbl,
pass_params)
self.scanning = Scanning()
self.scan_thread = threading.Thread(target = self.scanning.scan,
args = (task,))
self.scan_thread.start()
self.after(0, self.check_scanthread)

def _new_activity_message(self, nbl):
"""Provides a little formatting from the new bookmark list.
Expand Down
8 changes: 7 additions & 1 deletion rig-remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ def log_configuration(verbose):
"""

os.environ["TZ"] = "UTC"
time.tzset()

# Windows doesn't support tzset. Ignore for now.
try:
time.tzset()
except AttributeError:
pass

if verbose:
logging.basicConfig(level=logging.INFO,
format="%(asctime)s %(message)s",
Expand Down

0 comments on commit 08a76ba

Please sign in to comment.