diff --git a/GlossMgr.py b/GlossMgr.py index 5f4377c..45aad61 100644 --- a/GlossMgr.py +++ b/GlossMgr.py @@ -307,6 +307,7 @@ class message(): def __init__(self, stage): self.stage = stage self.active = False + self.msgQueue = [] self.backdrop = clutter.Rectangle() self.backdrop.set_color(clutter.color_parse('Black')) @@ -352,8 +353,10 @@ class message(): self.main_group.set_position(group_x, group_y) def display_msg(self, title, text): - self.active = True - + if self.active: + self.msgQueue.append((title, text)) + return + self.message.set_text(title) self.detail.set_text(text) width = int(self.box.get_width() * 0.80) #Width is 80% of the box, giving 10% gap each side @@ -375,11 +378,14 @@ class message(): self.behaviour_group.apply(self.main_group) self.behaviour_backdrop.apply(self.backdrop) self.timeline.start() + + self.active = True def hide_msg(self): self.active = False self.timeline = clutter.Timeline(10,30) + self.timeline.connect("completed", self.remove_from_stage) alpha = clutter.Alpha(self.timeline, clutter.ramp_inc_func) self.behaviour_group = clutter.BehaviourOpacity(opacity_start=255, opacity_end=0, alpha=alpha) self.behaviour_backdrop = clutter.BehaviourOpacity(opacity_start=180, opacity_end=0, alpha=alpha) @@ -387,5 +393,14 @@ class message(): self.behaviour_backdrop.apply(self.backdrop) self.timeline.start() + def remove_from_stage(self, timeline): + self.stage.remove(self.backdrop) + self.stage.remove(self.main_group) + + #if there's messages in the queue, run through them + if len(self.msgQueue) > 0: + (title, text) = self.msgQueue.pop() + self.display_msg(title, text) + def on_key_press_event (self, stage, event): self.hide_msg() \ No newline at end of file diff --git a/modules/slideshow/slideshow.py b/modules/slideshow/slideshow.py index 8344342..fdd5b86 100644 --- a/modules/slideshow/slideshow.py +++ b/modules/slideshow/slideshow.py @@ -363,6 +363,7 @@ class Module: tempMenu = self.glossMgr.create_menu() #Menu(self.glossMgr) self.menu = tempMenu + #print self.baseDir #This occurs when there are not slideshows or we could not connect to the db to establish baseDir if self.baseDir is None: @@ -398,6 +399,6 @@ class Module: tempItem.add_image_from_path(imgPath, 0, 0) tempItem.setAction(self) - + return tempMenu diff --git a/myth/MythMySQL.pyc b/myth/MythMySQL.pyc index 5a61a8d..c0221f0 100644 Binary files a/myth/MythMySQL.pyc and b/myth/MythMySQL.pyc differ