diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
index ac2ef75..e03e0f7 100644
a
|
b
|
class ShellModel(gobject.GObject): |
577 | 577 | if home_activity: |
578 | 578 | logging.debug("Activity %s (%s) launch failed", activity_id, |
579 | 579 | home_activity.get_type()) |
580 | | home_activity.props.launching = False |
581 | | self._remove_activity(home_activity) |
| 580 | if home_activity.props.launching: |
| 581 | self.emit('launch-failed', home_activity) |
| 582 | else: |
| 583 | self._remove_activity(home_activity) |
582 | 584 | else: |
583 | 585 | logging.error('Model for activity id %s does not exist.', |
584 | 586 | activity_id) |
585 | 587 | |
586 | | self.emit('launch-failed', home_activity) |
587 | | |
588 | 588 | def _check_activity_launched(self, activity_id): |
589 | 589 | home_activity = self.get_activity_by_id(activity_id) |
590 | 590 | |
diff --git a/src/jarabe/view/launcher.py b/src/jarabe/view/launcher.py
index d4b9967..74f6cb8 100644
a
|
b
|
|
15 | 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
16 | 16 | |
17 | 17 | import logging |
| 18 | from gettext import gettext as _ |
18 | 19 | |
19 | 20 | import gtk |
20 | 21 | import hippo |
… |
… |
class LaunchWindow(gtk.Window): |
34 | 35 | |
35 | 36 | self.props.type_hint = gtk.gdk.WINDOW_TYPE_HINT_NORMAL |
36 | 37 | self.props.decorated = False |
| 38 | self.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color()) |
37 | 39 | |
38 | | canvas = hippo.Canvas() |
39 | | canvas.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color()) |
40 | | self.add(canvas) |
| 40 | canvas = gtk.VBox() |
41 | 41 | canvas.show() |
| 42 | self.add(canvas) |
| 43 | |
| 44 | bar_size = gtk.gdk.screen_height() / 5 * 2 |
| 45 | |
| 46 | header = gtk.VBox() |
| 47 | header.set_size_request(-1, bar_size) |
| 48 | header.show() |
| 49 | canvas.pack_start(header, expand=False) |
42 | 50 | |
43 | 51 | self._activity_id = activity_id |
44 | | self._box = LaunchBox(activity_id, icon_path, icon_color) |
45 | | canvas.set_root(self._box) |
| 52 | self.box = LaunchBox(activity_id, icon_path, icon_color) |
| 53 | box = hippo.Canvas() |
| 54 | box.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color()) |
| 55 | box.set_root(self.box) |
| 56 | box.show() |
| 57 | canvas.pack_start(box) |
| 58 | |
| 59 | footer = gtk.VBox(spacing=style.DEFAULT_SPACING) |
| 60 | footer.set_size_request(-1, bar_size) |
| 61 | footer.show() |
| 62 | canvas.pack_end(footer, expand=False) |
| 63 | |
| 64 | self.error_text = gtk.Label() |
| 65 | self.error_text.props.use_markup = True |
| 66 | footer.pack_start(self.error_text, expand=False) |
| 67 | |
| 68 | button_box = gtk.Alignment(xalign=0.5) |
| 69 | button_box.show() |
| 70 | footer.pack_start(button_box, expand=False) |
| 71 | self.cancel_button = gtk.Button(stock=gtk.STOCK_STOP) |
| 72 | button_box.add(self.cancel_button) |
46 | 73 | |
47 | 74 | self.connect('realize', self.__realize_cb) |
48 | 75 | |
… |
… |
class LaunchWindow(gtk.Window): |
53 | 80 | |
54 | 81 | def show(self): |
55 | 82 | self.present() |
56 | | self._box.zoom_in() |
| 83 | self.box.zoom_in() |
57 | 84 | |
58 | 85 | def _update_size(self): |
59 | 86 | self.resize(gtk.gdk.screen_width(), gtk.gdk.screen_height()) |
… |
… |
def __launch_started_cb(home_model, home_activity): |
145 | 172 | home_activity.get_icon_color()) |
146 | 173 | |
147 | 174 | def __launch_failed_cb(home_model, home_activity): |
| 175 | activity_id = home_activity.get_activity_id() |
| 176 | launcher = _launchers.get(activity_id) |
| 177 | |
| 178 | if launcher is None: |
| 179 | logging.error('Launcher for %s is missing', activity_id) |
| 180 | else: |
| 181 | launcher.error_text.props.label = _('<b>%s</b> failed to start.') % \ |
| 182 | home_activity.get_activity_name() |
| 183 | launcher.error_text.show() |
| 184 | |
| 185 | launcher.cancel_button.connect('clicked', |
| 186 | __cancel_button_clicked_cb, home_activity) |
| 187 | launcher.cancel_button.show() |
| 188 | |
| 189 | def __cancel_button_clicked_cb(button, home_activity): |
148 | 190 | _destroy_launcher(home_activity) |
149 | 191 | |
150 | 192 | def __launch_completed_cb(home_model, home_activity): |