gnome-settings-daemon/gnome-settings-daemon-2.91.91-fix-updates-plugin.patch
2011-03-16 10:30:10 +00:00

65 lines
3.4 KiB
Diff

diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c
index d869712..64373bd 100644
--- a/plugins/updates/gsd-updates-manager.c
+++ b/plugins/updates/gsd-updates-manager.c
@@ -350,15 +350,16 @@ notify_normal_updates_maybe (GsdUpdatesManager *manager, GPtrArray *array)
NotifyNotification *notification;
/* find out if enough time has passed since the last notification */
- time_now = g_get_real_time ();
+ time_now = g_get_real_time () / 1000000;
freq_updates_notify = g_settings_get_int (manager->priv->settings_gsd,
GSD_SETTINGS_FREQUENCY_UPDATES_NOTIFICATION);
g_settings_get (manager->priv->settings_gsd,
GSD_SETTINGS_LAST_UPDATES_NOTIFICATION,
"t", &time_last_notify);
- if ((guint64) freq_updates_notify < time_now - time_last_notify) {
- g_debug ("not showing non-critical notification as already shown %i days ago",
- (guint) (time_now - time_last_notify) / (24 * 60 * 60));
+ if (time_last_notify > 0 &&
+ (guint64) freq_updates_notify > time_now - time_last_notify) {
+ g_debug ("not showing non-critical notification as already shown %i hours ago",
+ (guint) (time_now - time_last_notify) / (60 * 60));
return;
}
@@ -835,6 +836,7 @@ get_updates_finished_cb (GObject *object,
if (update == GSD_UPDATE_TYPE_SECURITY) {
if (security_array->len == 0) {
g_debug ("policy security, but none available");
+ notify_normal_updates_maybe (manager, array);
goto out;
}
@@ -1405,7 +1407,7 @@ gsd_updates_manager_start (GsdUpdatesManager *manager,
set_install_root (manager);
/* load introspection from file */
- file = g_file_new_for_path (DATADIR "/dbus-1/interfaces/org.gnome.ColorManager.xml");
+ file = g_file_new_for_path (DATADIR "/dbus-1/interfaces/org.gnome.SettingsDaemonUpdates.xml");
ret = g_file_load_contents (file, NULL, &introspection_data, NULL, NULL, error);
if (!ret)
goto out;
diff --git a/plugins/updates/gsd-updates-refresh.c b/plugins/updates/gsd-updates-refresh.c
index 9193358..15e6917 100644
--- a/plugins/updates/gsd-updates-refresh.c
+++ b/plugins/updates/gsd-updates-refresh.c
@@ -506,7 +506,7 @@ session_presence_signal_cb (GDBusProxy *proxy,
if (g_strcmp0 (signal_name, "StatusChanged") != 0)
return;
- /* map stauts code into boolean */
+ /* map status code into boolean */
g_variant_get (parameters, "(u)", &status);
refresh->priv->session_idle = (status == PRESENCE_STATUS_IDLE);
g_debug ("setting is_idle %i",
@@ -578,7 +578,7 @@ gsd_updates_refresh_init (GsdUpdatesRefresh *refresh)
refresh);
status = g_dbus_proxy_get_cached_property (refresh->priv->proxy_session,
"status");
- g_variant_get (status, "(u)", &status_code);
+ g_variant_get (status, "u", &status_code);
refresh->priv->session_idle = (status_code == PRESENCE_STATUS_IDLE);
g_variant_unref (status);
}