[gnome-software: 2/20] gs-application: Inline initialize_ui() helper function
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 2/20] gs-application: Inline initialize_ui() helper function
- Date: Thu, 17 Mar 2022 10:27:10 +0000 (UTC)
commit 3c822ed53ddc6b2d1fd08508e88af4c602bb02f8
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Mar 7 14:51:52 2022 +0000
gs-application: Inline initialize_ui() helper function
It was only called from one place.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
src/gs-application.c | 39 +++++++++++++--------------------------
1 file changed, 13 insertions(+), 26 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index ab1f2439b..9028ed34e 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -259,31 +259,6 @@ gs_application_shell_loaded_cb (GsShell *shell, GsApplication *app)
app->shell_loaded_handler_id = 0;
}
-static void
-gs_application_initialize_ui (GsApplication *app)
-{
- static gboolean initialized = FALSE;
-
- if (initialized)
- return;
-
- initialized = TRUE;
-
- gs_application_initialize_plugins (app);
-
- /* setup UI */
- app->shell = gs_shell_new ();
- app->cancellable = g_cancellable_new ();
-
- app->shell_loaded_handler_id = g_signal_connect (app->shell, "loaded",
- G_CALLBACK (gs_application_shell_loaded_cb),
- app);
-
- gs_shell_setup (app->shell, app->plugin_loader, app->cancellable);
- app->main_window = GTK_WINDOW (app->shell);
- gtk_application_add_window (GTK_APPLICATION (app), app->main_window);
-}
-
static void
gs_application_present_window (GsApplication *app, const gchar *startup_id)
{
@@ -1048,7 +1023,19 @@ gs_application_startup (GApplication *application)
G_CALLBACK (gs_application_settings_changed_cb),
application);
- gs_application_initialize_ui (app);
+ gs_application_initialize_plugins (app);
+
+ /* setup UI */
+ app->shell = gs_shell_new ();
+ app->cancellable = g_cancellable_new ();
+
+ app->shell_loaded_handler_id = g_signal_connect (app->shell, "loaded",
+ G_CALLBACK (gs_application_shell_loaded_cb),
+ app);
+
+ gs_shell_setup (app->shell, app->plugin_loader, app->cancellable);
+ app->main_window = GTK_WINDOW (app->shell);
+ gtk_application_add_window (GTK_APPLICATION (app), app->main_window);
GS_APPLICATION (application)->update_monitor =
gs_update_monitor_new (GS_APPLICATION (application));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]