[gnome-software/wip/temp/ubuntu-xenial-rebased: 145/326] Manually disable update monitor



commit 293081babbf30ef5bc8ac9752764ff0b33aa12e7
Author: William Hua <william hua canonical com>
Date:   Mon Mar 7 09:13:07 2016 -0500

    Manually disable update monitor
    
    Ubuntu already has update-manager for this. This is an Ubuntu-specific change
    and should remain downstream.
    
    See also https://bugs.launchpad.net/ubuntu/+source/gnome-software/+bug/1546649.

 src/gs-application.c |   49 -------------------------------------------------
 1 files changed, 0 insertions(+), 49 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 02270fa..327330c 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -118,53 +118,6 @@ gs_application_init (GsApplication *application)
 }
 
 static void
-download_updates_setting_changed (GSettings     *settings,
-                                 const gchar   *key,
-                                 GsApplication *app)
-{
-       if (!gs_update_monitor_is_managed () &&
-           g_settings_get_boolean (settings, key)) {
-               g_debug ("Enabling update monitor");
-               app->update_monitor = gs_update_monitor_new (app);
-       } else {
-               g_debug ("Disabling update monitor");
-               g_clear_object (&app->update_monitor);
-       }
-}
-
-static void
-on_permission_changed (GPermission *permission,
-                       GParamSpec  *pspec,
-                       gpointer     data)
-{
-       GsApplication *app = data;
-
-       if (app->settings)
-               download_updates_setting_changed (app->settings, "download-updates", app);
-}
-
-static void
-gs_application_monitor_permission (GsApplication *app)
-{
-       GPermission *permission;
-
-       permission = gs_update_monitor_permission_get ();
-       if (permission != NULL)
-               g_signal_connect (permission, "notify",
-                                 G_CALLBACK (on_permission_changed), app);
-}
-
-static void
-gs_application_monitor_updates (GsApplication *app)
-{
-       g_signal_connect (app->settings, "changed::download-updates",
-                         G_CALLBACK (download_updates_setting_changed), app);
-       download_updates_setting_changed (app->settings,
-                                         "download-updates",
-                                         app);
-}
-
-static void
 network_changed_cb (GNetworkMonitor *monitor,
                    gboolean available,
                    GsApplication *app)
@@ -668,8 +621,6 @@ gs_application_startup (GApplication *application)
        GS_APPLICATION (application)->dbus_helper = gs_dbus_helper_new ();
 #endif
        GS_APPLICATION (application)->settings = g_settings_new ("org.gnome.software");
-       gs_application_monitor_permission (GS_APPLICATION (application));
-       gs_application_monitor_updates (GS_APPLICATION (application));
        gs_application_monitor_network (GS_APPLICATION (application));
        gs_folders_convert ();
 }


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