Skip to content

Commit

Permalink
Merge pull request #89 from drauger-os-development/dev
Browse files Browse the repository at this point in the history
fix compat_mode handling bug
  • Loading branch information
Batcastle authored Jan 12, 2023
2 parents bf96678 + c1d9de9 commit b71e378
Showing 7 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: system-installer
Version: 2.4.5
Version: 2.4.6
Maintainer: Thomas Castleman <contact@draugeros.org>
Homepage: https://github.com/drauger-os-development/system-installer
Section: admin
2 changes: 1 addition & 1 deletion usr/bin/system-installer.cxx
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@

using namespace std;

str VERSION = "2.4.5";
str VERSION = "2.4.6";
str R = "\033[0;31m";
str G = "\033[0;32m";
str Y = "\033[1;33m";
2 changes: 1 addition & 1 deletion usr/share/system-installer/UI/confirm.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
#
# confirm.py
#
# Copyright 2022 Thomas Castleman <contact@draugeros.org>
# Copyright 2023 Thomas Castleman <contact@draugeros.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
15 changes: 10 additions & 5 deletions usr/share/system-installer/UI/main.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
#
# main.py
#
# Copyright 2022 Thomas Castleman <contact@draugeros.org>
# Copyright 2023 Thomas Castleman <contact@draugeros.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -1663,6 +1663,11 @@ def options(self, button):
self.login = self._set_default_margins(self.login)
self.grid.attach(self.login, 1, 7, 2, 1)

self.compat_mode = Gtk.CheckButton.new_with_label("Enable Bootloader Compatibility Mode")
if self.data["COMPAT_MODE"] == 1:
self.compat_mode.set_active(True)
self.compat_mode = self._set_default_margins(self.compat_mode)

if ap.is_EFI():
label2 = Gtk.Label()
label2.set_markup("""
@@ -1672,10 +1677,6 @@ def options(self, button):
label2 = self._set_default_margins(label2)
self.grid.attach(label2, 1, 8, 2, 1)

self.compat_mode = Gtk.CheckButton.new_with_label("Enable Bootloader Compatibility Mode")
if self.data["COMPAT_MODE"] == 1:
self.compat_mode.set_active(True)
self.compat_mode = self._set_default_margins(self.compat_mode)
self.grid.attach(self.compat_mode, 1, 9, 2, 1)

button1 = Gtk.Button.new_with_label("Okay -->")
@@ -1704,6 +1705,10 @@ def options_next(self, button):
self.data["LOGIN"] = 1
else:
self.data["LOGIN"] = 0
if self.compat_mode.get_active():
self.data["COMPAT_MODE"] = 1
else:
self.data["COMPAT_MODE"] = 0
global OPTIONS_COMPLETION
OPTIONS_COMPLETION = "COMPLETED"
self.main_menu("clicked")
3 changes: 2 additions & 1 deletion usr/share/system-installer/engine.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
#
# engine.py
#
# Copyright 2022 Thomas Castleman <contact@draugeros.org>
# Copyright 2023 Thomas Castleman <contact@draugeros.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -112,6 +112,7 @@ def copy_log_to_disk():
SETTINGS = UI.main.show_main(boot_time=BOOT_TIME)
try:
if ((SETTINGS == 1) or (len(SETTINGS) == 0)):
print("Returned data from UI appears empty. Assuming installation was canceled...")
sys.exit(1)
elif SETTINGS == 2:
UI.error.show_error("""
2 changes: 1 addition & 1 deletion usr/share/system-installer/installer.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
#
# installer.py
#
# Copyright 2022 Thomas Castleman <contact@draugeros.org>
# Copyright 2023 Thomas Castleman <contact@draugeros.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
2 changes: 1 addition & 1 deletion usr/share/system-installer/modules/master.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
#
# master.py
#
# Copyright 2022 Thomas Castleman <contact@draugeros.org>
# Copyright 2023 Thomas Castleman <contact@draugeros.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

0 comments on commit b71e378

Please sign in to comment.