diff --git a/src/window.py b/src/window.py
index 3f0c5f3..a4ff861 100644
--- a/src/window.py
+++ b/src/window.py
@@ -5,12 +5,11 @@
@Gtk.Template(resource_path='/org/gnome/siglo/window.ui')
class SigloWindow(Gtk.ApplicationWindow):
__gtype_name__ = 'SigloWindow'
- info_scan_fail = Gtk.Template.Child()
info_scan_pass = Gtk.Template.Child()
- bbox_scan_fail = Gtk.Template.Child()
- bbox_scan_pass = Gtk.Template.Child()
+ scan_fail_box = Gtk.Template.Child()
+ scan_pass_box = Gtk.Template.Child()
+ main_info = Gtk.Template.Child()
bt_spinner = Gtk.Template.Child()
- sync_time_button = Gtk.Template.Child()
def __init__(self, **kwargs):
self.manager = None
@@ -21,20 +20,20 @@ def done_scanning(self, manager):
scan_result = manager.get_scan_result()
self.bt_spinner.set_visible(False)
if (scan_result):
+ self.main_info.set_text("Done Scanning...Success")
self.info_scan_pass.set_text("InfiniTime Found!\nMac Address: " + manager.get_mac_address())
- self.info_scan_pass.set_visible(True)
- self.bbox_scan_pass.set_visible(True)
+ self.scan_pass_box.set_visible(True)
else:
- self.info_scan_fail.set_visible(True)
- self.bbox_scan_fail.set_visible(True)
+ self.main_info.set_text("Done Scanning...Failed")
+ self.scan_fail_box.set_visible(True)
@Gtk.Template.Callback()
def rescan_button_clicked(self, widget):
if self.manager is not None:
print("Rescan button clicked...")
+ self.main_info.set_text("Rescanning...")
self.bt_spinner.set_visible(True)
- self.info_scan_fail.set_visible(False)
- self.bbox_scan_fail.set_visible(False)
+ self.scan_fail_box.set_visible(False)
self.manager.scan_for_infinitime()
self.done_scanning(self.manager)
@@ -44,8 +43,6 @@ def sync_time_button_clicked(self, widget):
print("Sync Time button clicked...")
device = InfiniTimeDevice(manager=self.manager, mac_address=self.manager.get_mac_address())
device.connect()
- self.info_scan_pass.set_text("InfiniTime Syncing... Success!")
- self.bbox_scan_pass.set_visible(False)
- self.sync_time_button.set_visible(False)
-
+ self.main_info.set_text("InfiniTime Sync... Success!")
+ self.scan_pass_box.set_visible(False)
diff --git a/src/window.ui b/src/window.ui
index fb49e48..52d739e 100644
--- a/src/window.ui
+++ b/src/window.ui
@@ -8,18 +8,19 @@
300
-