Codebase list sugar-pippy-activity / ad71249
Remove force load option if box2d isn't detected sparshg authored 10 months ago Ibiam Chihurumnaya committed 10 months ago
1 changed file(s) with 3 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
551551 dialog = Gtk.MessageDialog(
552552 None, Gtk.DialogFlags.MODAL,
553553 Gtk.MessageType.WARNING,
554 Gtk.ButtonsType.NONE,
554 Gtk.ButtonsType.OK,
555555 _('Box2D is not installed on your system'))
556556 dialog.format_secondary_text(
557 _('Box2D is required to run this example. This example will fail to run. Do you still wish to continue?'))
558 dialog.add_button("Force Load", Gtk.ResponseType.OK)
559 dialog.add_button("Cancel", Gtk.ResponseType.CANCEL)
557 _('Box2D is required to run this example.'))
560558
561559 from sugar3.graphics import style
562560 dialog.modify_bg(Gtk.StateType.NORMAL, style.COLOR_TOOLBAR_GREY.get_gdk_color())
563561 dialog.modify_fg(Gtk.StateType.NORMAL, Gdk.color_parse('white'))
564562
565 response = dialog.run()
563 dialog.run()
566564 dialog.destroy()
567 if response == Gtk.ResponseType.OK:
568 return True
569565 return False
570566 return True
571567