Pickle state in core.queue_* methods. Idea by eternalswd, thanks.

This commit is contained in:
Alex Dedul 2007-08-09 00:29:33 +00:00
parent c2bd8b7ac3
commit 4caa29fddc
1 changed files with 6 additions and 1 deletions

View File

@ -457,7 +457,9 @@ class Manager:
# Queueing functions
def queue_top(self, unique_ID, enforce_queue=True):
self.state.queue.insert(0,self.state.queue.pop(self.get_queue_index(unique_ID)))
self.state.queue.insert(0,
self.state.queue.pop(self.get_queue_index(unique_ID)))
self.pickle_state()
def queue_up(self, unique_ID, enforce_queue=True):
curr_index = self.get_queue_index(unique_ID)
@ -467,6 +469,7 @@ class Manager:
self.state.queue[curr_index] = temp
if enforce_queue:
self.apply_queue()
self.pickle_state()
def queue_down(self, unique_ID, enforce_queue=True):
curr_index = self.get_queue_index(unique_ID)
@ -476,6 +479,7 @@ class Manager:
self.state.queue[curr_index] = temp
if enforce_queue:
self.apply_queue()
self.pickle_state()
def queue_bottom(self, unique_ID, enforce_queue=True):
curr_index = self.get_queue_index(unique_ID)
@ -484,6 +488,7 @@ class Manager:
self.state.queue.append(unique_ID)
if enforce_queue:
self.apply_queue()
self.pickle_state()
def clear_completed(self):
for unique_ID in self.unique_IDs: