mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-14 00:04:08 +09:00
Use the LoadingStatus object
This commit is contained in:
@@ -37,15 +37,15 @@ template $ResultsPage : Adw.NavigationPage {
|
||||
title: _("Too Many Results");
|
||||
description: _("Try being more specific with your search");
|
||||
}
|
||||
Adw.StatusPage loading {
|
||||
title: _("Searching");
|
||||
description: _("This should only take a moment");
|
||||
child:
|
||||
Spinner {
|
||||
spinning: true;
|
||||
}
|
||||
;
|
||||
}
|
||||
// Adw.StatusPage loading {
|
||||
// title: _("Searching");
|
||||
// description: _("This should only take a moment");
|
||||
// child:
|
||||
// Spinner {
|
||||
// spinning: true;
|
||||
// }
|
||||
// ;
|
||||
// }
|
||||
ScrolledWindow results_view {
|
||||
Adw.Clamp {
|
||||
ListBox results_list {
|
||||
|
||||
@@ -2,6 +2,7 @@ from gi.repository import Adw, Gtk, GLib, Gio
|
||||
from .host_info import HostInfo
|
||||
from .error_toast import ErrorToast
|
||||
from .result_row import ResultRow
|
||||
from .loading_status import LoadingStatus
|
||||
import subprocess
|
||||
|
||||
class AddedPackage:
|
||||
@@ -43,7 +44,6 @@ class ResultsPage(Adw.NavigationPage):
|
||||
stack = gtc()
|
||||
new_search = gtc()
|
||||
too_many = gtc()
|
||||
loading = gtc()
|
||||
results_view= gtc()
|
||||
no_results = gtc()
|
||||
|
||||
@@ -136,9 +136,11 @@ class ResultsPage(Adw.NavigationPage):
|
||||
self.installation = None
|
||||
self.packages = []
|
||||
self.pending_page = None
|
||||
self.loading = LoadingStatus(_("Searching"), _("This should only take a moment"))
|
||||
|
||||
# Connections
|
||||
self.search_entry.connect("activate", self.on_search)
|
||||
self.search_apply_button.connect("clicked", self.on_search)
|
||||
|
||||
# Apply
|
||||
self.stack.add_child(self.loading)
|
||||
|
||||
Reference in New Issue
Block a user