Skip to content

Commit fcc6067

Browse files
committed
Remove unnecessary popup windows (Adw.Toast)
1 parent 40d0408 commit fcc6067

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/gui/window.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ def save_selected(source, res, data):
374374
def select_file_to_import(self, w):
375375
# Show a "Please wait" pop-up window while checking the archive type
376376
def show_please_wait_toast():
377-
wait_toast = Adw.Toast.new(title=_("Please wait …"))
378-
wait_toast.set_timeout(5)
379-
self.toast_overlay.add_toast(wait_toast)
377+
self.toast.set_title(title=_("Please wait …"))
378+
self.toast.set_timeout(5)
379+
self.toast_overlay.add_toast(self.toast)
380380

381381
# Check, if the archive is encrypted or not
382382
def get_status_of_encryption():
@@ -546,6 +546,7 @@ def _set_status_desc_save(self):
546546
def import_config(self):
547547
print("Importing the configuration is in progress…\nFull output will be available after finishing this operation.")
548548
self._identify_file_type()
549+
self.toast_overlay.dismiss_all()
549550

550551
self.archive_mode = "--unpack"
551552
self.status_title = _("<big><b>Importing configuration …</b></big>\nImporting configuration from:\n<i>{}</i>\n").split('</b>')[0].split('<b>')[-1]
@@ -733,11 +734,6 @@ def show_warn_toast(self):
733734
self.warn_toast.set_action_name("app.logout")
734735
self.toast_overlay.add_toast(self.warn_toast)
735736

736-
# message that says where will be run a synchronization
737-
def show_special_toast(self):
738-
self.special_toast = Adw.Toast.new(title=_("From now on, you can sync the config from the menu in the header bar"))
739-
self.toast_overlay.add_toast(self.special_toast)
740-
741737
# action after closing the main window
742738
def on_close(self, w):
743739
self.close()

0 commit comments

Comments
 (0)