[gnome-settings-daemon] updates: Remove the notification when we don't check for updates because on battery power
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] updates: Remove the notification when we don't check for updates because on battery power
- Date: Fri, 29 Jun 2012 12:15:24 +0000 (UTC)
commit cffd6b930ad9f9ed660856a5b1418765bb489d3b
Author: Richard Hughes <richard hughsie com>
Date: Fri Jun 29 10:50:16 2012 +0100
updates: Remove the notification when we don't check for updates because on battery power
It's disabled by default, and I can't think of a good reason to have the
notification now.
...ttings-daemon.plugins.updates.gschema.xml.in.in | 5 ---
plugins/updates/gsd-updates-common.h | 1 -
plugins/updates/gsd-updates-manager.c | 29 --------------------
3 files changed, 0 insertions(+), 35 deletions(-)
---
diff --git a/data/org.gnome.settings-daemon.plugins.updates.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.updates.gschema.xml.in.in
index 8a787bd..b07e34f 100644
--- a/data/org.gnome.settings-daemon.plugins.updates.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.plugins.updates.gschema.xml.in.in
@@ -70,11 +70,6 @@
<_summary>Notify the user for completed updates where the user needs to restart</_summary>
<_description>Notify the user for completed updates where the user needs to restart.</_description>
</key>
- <key name="notify-update-not-battery" type="b">
- <default>false</default>
- <_summary>Notify the user when the automatic update was not started on battery power</_summary>
- <_description>Notify the user when the update was not automatically started because the machine is running on battery power.</_description>
- </key>
<key name="notify-update-started" type="b">
<default>true</default>
<_summary>Notify the user when the update was started</_summary>
diff --git a/plugins/updates/gsd-updates-common.h b/plugins/updates/gsd-updates-common.h
index b916d75..fe406d9 100644
--- a/plugins/updates/gsd-updates-common.h
+++ b/plugins/updates/gsd-updates-common.h
@@ -38,7 +38,6 @@ G_BEGIN_DECLS
#define GSD_SETTINGS_NOTIFY_DISTRO_UPGRADES "notify-distro-upgrades"
#define GSD_SETTINGS_NOTIFY_UPDATE_COMPLETE "notify-update-complete"
#define GSD_SETTINGS_NOTIFY_UPDATE_COMPLETE_RESTART "notify-update-complete-restart"
-#define GSD_SETTINGS_NOTIFY_UPDATE_NOT_BATTERY "notify-update-not-battery"
#define GSD_SETTINGS_SCHEMA "org.gnome.settings-daemon.plugins.updates"
#define GSD_SETTINGS_UPDATE_BATTERY "update-battery"
#define GSD_SETTINGS_AUTO_DOWNLOAD_UPDATES "auto-download-updates"
diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c
index 5c2fa37..3dc1127 100644
--- a/plugins/updates/gsd-updates-manager.c
+++ b/plugins/updates/gsd-updates-manager.c
@@ -531,10 +531,7 @@ notify_normal_updates_maybe (GsdUpdatesManager *manager, GPtrArray *array)
static gboolean
update_check_on_battery (GsdUpdatesManager *manager)
{
- const gchar *message;
gboolean ret;
- GError *error = NULL;
- NotifyNotification *notification;
ret = g_settings_get_boolean (manager->priv->settings_gsd,
GSD_SETTINGS_UPDATE_BATTERY);
@@ -549,32 +546,6 @@ update_check_on_battery (GsdUpdatesManager *manager)
return TRUE;
}
- /* do we do the notification? */
- ret = g_settings_get_boolean (manager->priv->settings_gsd,
- GSD_SETTINGS_NOTIFY_UPDATE_NOT_BATTERY);
- if (!ret) {
- g_debug ("ignoring due to GSettings");
- return FALSE;
- }
-
- /* TRANSLATORS: policy says update, but we are on battery and so prompt */
- message = _("Automatic updates are not being installed as the computer is running on battery power");
- /* TRANSLATORS: informs user will not install by default */
- notification = notify_notification_new (_("Updates not installed"),
- message,
- GSD_UPDATES_ICON_NORMAL);
- notify_notification_set_app_name (notification, _("Software Updates"));
- notify_notification_set_timeout (notification, 15000);
- notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
- notify_notification_add_action (notification, "update-all-packages",
- /* TRANSLATORS: to hell with my battery life, just do it */
- _("Install the updates anyway"), libnotify_action_cb, manager, NULL);
- ret = notify_notification_show (notification, &error);
- if (!ret) {
- g_warning ("error: %s", error->message);
- g_error_free (error);
- }
-
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]