Remove force load option if box2d isn't detected
sparshg authored 10 months ago
Ibiam Chihurumnaya committed 10 months ago
551 | 551 | dialog = Gtk.MessageDialog( |
552 | 552 | None, Gtk.DialogFlags.MODAL, |
553 | 553 | Gtk.MessageType.WARNING, |
554 | Gtk.ButtonsType.NONE, | |
554 | Gtk.ButtonsType.OK, | |
555 | 555 | _('Box2D is not installed on your system')) |
556 | 556 | 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.')) | |
560 | 558 | |
561 | 559 | from sugar3.graphics import style |
562 | 560 | dialog.modify_bg(Gtk.StateType.NORMAL, style.COLOR_TOOLBAR_GREY.get_gdk_color()) |
563 | 561 | dialog.modify_fg(Gtk.StateType.NORMAL, Gdk.color_parse('white')) |
564 | 562 | |
565 | response = dialog.run() | |
563 | dialog.run() | |
566 | 564 | dialog.destroy() |
567 | if response == Gtk.ResponseType.OK: | |
568 | return True | |
569 | 565 | return False |
570 | 566 | return True |
571 | 567 |