[gnome-software/1399-drop-first-run-dialog] misc: Drop the first run dialog



commit 6b42785d97a7c5501d9994181b7e8ea8c4d2ed04
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jan 20 13:06:45 2022 +0100

    misc: Drop the first run dialog
    
    It's not that useful as years ago, thus drop it.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1399

 po/POTFILES.in                   |  1 -
 src/gnome-software.gresource.xml |  1 -
 src/gs-application.c             | 15 ----------
 src/gs-first-run-dialog.c        | 60 ----------------------------------------
 src/gs-first-run-dialog.h        | 22 ---------------
 src/gs-first-run-dialog.ui       | 41 ---------------------------
 src/gs-loading-page.c            |  5 ++--
 src/gs-shell.c                   |  3 ++
 src/meson.build                  |  1 -
 tests/actions.py                 |  7 -----
 tests/basic.py                   |  6 ----
 11 files changed, 6 insertions(+), 156 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5e139f15b..8cf9b138f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -40,7 +40,6 @@ src/gs-extras-page.ui
 src/gs-feature-tile.c
 src/gs-featured-carousel.c
 src/gs-featured-carousel.ui
-src/gs-first-run-dialog.ui
 src/gs-hardware-support-context-dialog.c
 src/gs-hardware-support-context-dialog.ui
 src/gs-installed-page.c
diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml
index 9280d81bb..3a3813ed8 100644
--- a/src/gnome-software.gresource.xml
+++ b/src/gnome-software.gresource.xml
@@ -17,7 +17,6 @@
   <file preprocess="xml-stripblanks">gs-extras-page.ui</file>
   <file preprocess="xml-stripblanks">gs-feature-tile.ui</file>
   <file preprocess="xml-stripblanks">gs-featured-carousel.ui</file>
-  <file preprocess="xml-stripblanks">gs-first-run-dialog.ui</file>
   <file preprocess="xml-stripblanks">gs-hardware-support-context-dialog.ui</file>
   <file preprocess="xml-stripblanks">gs-info-bar.ui</file>
   <file preprocess="xml-stripblanks">gs-info-window.ui</file>
diff --git a/src/gs-application.c b/src/gs-application.c
index 188eeb385..0f745735b 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -24,7 +24,6 @@
 #include "gs-build-ident.h"
 #include "gs-common.h"
 #include "gs-debug.h"
-#include "gs-first-run-dialog.h"
 #include "gs-shell.h"
 #include "gs-update-monitor.h"
 #include "gs-shell-search-provider.h"
@@ -223,18 +222,6 @@ gs_application_dbus_unregister (GApplication    *application,
        }
 }
 
-static void
-gs_application_show_first_run_dialog (GsApplication *app)
-{
-       GtkWidget *dialog;
-
-       if (g_settings_get_boolean (app->settings, "first-run") == TRUE) {
-               dialog = gs_first_run_dialog_new ();
-               gs_shell_modal_dialog_present (app->shell, GTK_WINDOW (dialog));
-               g_settings_set_boolean (app->settings, "first-run", FALSE);
-       }
-}
-
 static void
 gs_application_shell_loaded_cb (GsShell *shell, GsApplication *app)
 {
@@ -1035,8 +1022,6 @@ gs_application_activate (GApplication *application)
                gs_shell_set_mode (app->shell, GS_SHELL_MODE_OVERVIEW);
 
        gs_shell_activate (GS_APPLICATION (application)->shell);
-
-       gs_application_show_first_run_dialog (GS_APPLICATION (application));
 }
 
 static void
diff --git a/src/gs-loading-page.c b/src/gs-loading-page.c
index 8584ebbb2..ef53d4438 100644
--- a/src/gs-loading-page.c
+++ b/src/gs-loading-page.c
@@ -128,9 +128,10 @@ gs_loading_page_load (GsLoadingPage *self)
         * completely missing app data — otherwise, we want to start up as fast
         * as possible. */
        settings = g_settings_new ("org.gnome.software");
-       if (g_settings_get_boolean (settings, "first-run"))
+       if (g_settings_get_boolean (settings, "first-run")) {
+               g_settings_set_boolean (settings, "first-run", FALSE);
                cache_age = 60 * 60 * 24;  /* 24 hours */
-       else
+       } else
                cache_age = G_MAXUINT;
 
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REFRESH,
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 58cbf1c8d..0ff933c3a 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -2247,6 +2247,9 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
        } else {
                g_debug ("Skipped refresh of the repositories due to 'download-updates' disabled");
                initial_refresh_done (GS_LOADING_PAGE (shell->pages[GS_SHELL_MODE_LOADING]), shell);
+
+               if (g_settings_get_boolean (shell->settings, "first-run"))
+                       g_settings_set_boolean (shell->settings, "first-run", FALSE);
        }
 }
 
diff --git a/src/meson.build b/src/meson.build
index 9a93ef8f1..47b17d25e 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -44,7 +44,6 @@ gnome_software_sources = [
   'gs-extras-page.c',
   'gs-feature-tile.c',
   'gs-featured-carousel.c',
-  'gs-first-run-dialog.c',
   'gs-folders.c',
   'gs-hardware-support-context-dialog.c',
   'gs-info-bar.c',
diff --git a/tests/actions.py b/tests/actions.py
index 8e8d0930c..3bb026899 100755
--- a/tests/actions.py
+++ b/tests/actions.py
@@ -30,13 +30,6 @@ try:
                                    'org.gtk.Application')
     proxy.call_sync('Activate', GLib.Variant('(a{sv})', ({},)), 0, -1, None)
 
-    doDelay(1)
-    try:
-        shopping_button = app.child(name=u'Browse Software', retry=False)
-        shopping_button.click()
-    except tree.SearchError:
-        print "not first-run, moving on"
-
     doDelay(1)
     assert (len(app.children) == 1)
 
diff --git a/tests/basic.py b/tests/basic.py
index 099b8921d..1006ecff2 100755
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -39,12 +39,6 @@ try:
 
     search_page_listbox = search_page.child(roleName='list box')
 
-    try:
-        shopping_button = app.child(name=u'Browse Software', retry=False)
-        shopping_button.click()
-    except tree.SearchError:
-        print "not first-run, moving on"
-
     all_button.click()
     assert (all_button.checked)
     assert (not installed_button.checked)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]