mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-15 00:34:42 +09:00
Guh
This commit is contained in:
@@ -172,6 +172,11 @@ class RemotesWindow(Adw.Window):
|
||||
self.remotes_list.remove_all()
|
||||
self.host_remotes = self.get_host_remotes()
|
||||
self.host_flatpaks = self.get_host_flatpaks()
|
||||
if len(self.host_remotes) <= 1:
|
||||
no_remotes = Adw.StatusPage(icon_name="error-symbolic", title=_("No Remotes"), description=_("Warehouse cannot see the list of remotes or the system has no remotes added"))
|
||||
self.stack.add_child(no_remotes)
|
||||
self.stack.set_visible_child(no_remotes)
|
||||
return
|
||||
for i in range(len(self.host_remotes)):
|
||||
name = self.host_remotes[i][0]
|
||||
title = self.host_remotes[i][1]
|
||||
@@ -233,11 +238,6 @@ class RemotesWindow(Adw.Window):
|
||||
self.set_content(self.toolbar)
|
||||
self.generate_list()
|
||||
|
||||
if len(self.host_remotes) == 0:
|
||||
no_remotes = Adw.StatusPage(icon_name="error-symbolic", title=_("No Remotes"), description=_("Warehouse cannot see the list of remotes or the system has no remotes added"))
|
||||
self.stack.add_child(no_remotes)
|
||||
self.stack.set_visible_child(no_remotes)
|
||||
|
||||
event_controller = Gtk.EventControllerKey()
|
||||
event_controller.connect("key-pressed", self.key_handler)
|
||||
self.add_controller(event_controller)
|
||||
|
||||
Reference in New Issue
Block a user