[gnome-software] Load updates and installed at start
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Load updates and installed at start
- Date: Thu, 29 Aug 2013 23:43:27 +0000 (UTC)
commit c0f640ce0380b7d8ab7b43094a5f39055f8f0a77
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Aug 29 19:39:55 2013 -0400
Load updates and installed at start
We can avoid the wait most of the time, by loading the
updates and installed lists at start. But we don't want
to slow down the loading of the overview page (which is shown
by default), so we only load the others when the overview
is fully loaded.
src/gs-shell.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 7e7da08..3f7cf9d 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -165,6 +165,17 @@ gs_shell_back_button_cb (GtkWidget *widget, GsShell *shell)
gs_shell_set_overview_mode (shell, shell->priv->tab_back_id, NULL, NULL);
}
+static void
+initial_overview_load_done (GsShellOverview *shell_overview, gpointer data)
+{
+ GsShell *shell = data;
+
+ g_signal_handlers_disconnect_by_func (shell_overview, initial_overview_load_done, data);
+
+ gs_shell_updates_refresh (shell->priv->shell_updates);
+ gs_shell_installed_refresh (shell->priv->shell_installed);
+}
+
/**
* gs_shell_setup:
*/
@@ -245,7 +256,8 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
shell,
priv->builder);
- /* show main UI */
+ g_signal_connect (priv->shell_overview, "refreshed",
+ G_CALLBACK (initial_overview_load_done), shell);
gs_shell_set_mode (shell, GS_SHELL_MODE_OVERVIEW);
return GTK_WINDOW (main_window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]