mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-14 00:04:08 +09:00
Move No Remotes to new list
This commit is contained in:
@@ -24,6 +24,9 @@ template RemotesWindow: Adw.Window {
|
||||
}
|
||||
styles["flat"]
|
||||
};
|
||||
Adw.ActionRow no_remotes {
|
||||
title: _("No remotes on the system, add some from below");
|
||||
}
|
||||
}
|
||||
Adw.PreferencesGroup popular_remotes_list {
|
||||
title: _("Add a Popular Remote");
|
||||
@@ -73,12 +76,6 @@ template RemotesWindow: Adw.Window {
|
||||
styles ["description", "body"]
|
||||
}
|
||||
}
|
||||
|
||||
Adw.StatusPage no_remotes {
|
||||
icon-name: "error-symbolic";
|
||||
title: _("No Remotes");
|
||||
description: _("Warehouse cannot see the list of remotes or the system has no remotes added");
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -87,11 +87,7 @@ class RemotesWindow(Adw.Window):
|
||||
self.app_window.clipboard.set(to_copy)
|
||||
self.make_toast(_("Copied {}").format(to_copy))
|
||||
|
||||
if self.host_remotes[0][0] == '':
|
||||
self.stack.set_visible_child(self.no_remotes)
|
||||
return
|
||||
else:
|
||||
self.stack.set_visible_child(self.main_group)
|
||||
self.no_remotes.set_visible(True)
|
||||
|
||||
for i in range(len(self.host_remotes)):
|
||||
try:
|
||||
@@ -120,6 +116,7 @@ class RemotesWindow(Adw.Window):
|
||||
remote_row.add_suffix(copy_button)
|
||||
remote_row.add_suffix(remove_button)
|
||||
self.rows_in_list.append(remote_row)
|
||||
self.no_remotes.set_visible(False)
|
||||
except Exception as e:
|
||||
print("error in remotes_window.generate_list: could not add remote. error:", e)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user