Skip to content

Commit

Permalink
Merge pull request #41 from drauger-os-development/dev
Browse files Browse the repository at this point in the history
lots of bug fixes
  • Loading branch information
Batcastle authored Sep 23, 2021
2 parents 2be281a + 0b00a7b commit 01c8cd8
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 13 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.0.9
Version: 2.1.0
Maintainer: Thomas Castleman <contact@draugeros.org>
Homepage: https://github.com/drauger-os-development/system-installer
Section: admin
Expand Down
2 changes: 1 addition & 1 deletion usr/bin/system-installer
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import de_control.disable as de_disable
import de_control.enable as de_enable
from os import path
ARGC = len(argv)
VERSION = "2.0.9"
VERSION = "2.1.0"
HELP = """
system-installer, Version %s
Expand Down
3 changes: 3 additions & 0 deletions usr/share/system-installer/UI/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def main_menu(self, widget):
"""Main Menu"""
self.clear_window()

if hasattr(self, 'text_buffer'):
self.text_buffer.set_text("", length=0)

self.label = Gtk.Label()
self.label.set_markup("<b>" + self.display + "</b>")
self.label.set_justify(Gtk.Justification.CENTER)
Expand Down
48 changes: 37 additions & 11 deletions usr/share/system-installer/UI/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,17 +543,14 @@ def message_accept(self, widget):
"""Accept Message Input in GUI"""
if self.custom.get_active():
self.custom_setting = True
if hasattr(self, 'text_buffer'):
self.grid.attach(self.custom_message, 1, 8, 8, 4)
else:
self.text_buffer = Gtk.TextBuffer()
self.text_buffer.set_text(self.default_message,
len(self.default_message))
self.custom_message = Gtk.TextView.new_with_buffer(self.text_buffer)
self.custom_message.set_editable(True)
self.custom_message.set_accepts_tab(True)
self.custom_message = self._set_default_margins(self.custom_message)
self.grid.attach(self.custom_message, 1, 8, 8, 4)
self.text_buffer = Gtk.TextBuffer()
self.text_buffer.set_text(self.default_message,
len(self.default_message))
self.custom_message = Gtk.TextView.new_with_buffer(self.text_buffer)
self.custom_message.set_editable(True)
self.custom_message.set_accepts_tab(True)
self.custom_message = self._set_default_margins(self.custom_message)
self.grid.attach(self.custom_message, 1, 8, 8, 4)

else:
self.grid.remove(self.custom_message)
Expand Down Expand Up @@ -671,6 +668,7 @@ def cpu_info():
sentenal = 0
output = []
backup_speed = None
count = 0
while sentenal < 7:
for each in info:
if sentenal == 0:
Expand All @@ -689,18 +687,46 @@ def cpu_info():
if "CPU max MHz:" in each:
output.append(each)
sentenal += 1
count = 0
elif count == len(info):
count = 0
sentenal += 1
output.append("CPU max MHz:\t\t\tUnknown")
else:
count += 1
elif sentenal == 4:
if "L2 cache:" in each:
output.append(each)
sentenal += 1
count = 0
elif count == len(info):
count = 0
sentenal += 1
output.append("L2 cache:\t\t\tUnknown")
else:
count += 1
elif sentenal == 5:
if "L3 cache:" in each:
output.append(each)
sentenal += 1
count = 0
elif count == len(info):
count = 0
sentenal += 1
output.append("L3 cache:\t\t\tUnknown")
else:
count += 1
elif sentenal == 6:
if "CPU MHz:" in each:
backup_speed = each
sentenal += 1
count = 0
elif count == len(info):
count = 0
sentenal += 1
backup_speed = "Unknown"
else:
count += 1
speed_dir = "/sys/devices/system/cpu/cpu0/cpufreq/"
if path.exists(speed_dir):
if path.exists(speed_dir + "bios_limit"):
Expand Down
3 changes: 3 additions & 0 deletions usr/share/system-installer/UI/success.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def main_menu(self, widget):
"""Main Success Window"""
self.clear_window()

if hasattr(self, 'text_buffer'):
self.text_buffer.set_text("", length=0)

text = """
\t<b>%s has been successfully installed on your computer!</b>\t
""" % (self.distro)
Expand Down

0 comments on commit 01c8cd8

Please sign in to comment.