[gnome-power-manager] Respect the do not show gconf key for battery recalls
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Respect the do not show gconf key for battery recalls
- Date: Wed, 29 Jul 2009 15:49:30 +0000 (UTC)
commit f669bea7168ef5fecbb11993e4ab35cead26b5a4
Author: Richard Hughes <richard hughsie com>
Date: Wed Jul 29 16:48:23 2009 +0100
Respect the do not show gconf key for battery recalls
src/gpm-manager.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index 34bbc96..ab5ee3b 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -1056,12 +1056,21 @@ gpm_manager_perhaps_recall_delay_cb (GpmManager *manager)
static void
gpm_engine_perhaps_recall_cb (GpmEngine *engine, DkpDevice *device, gchar *oem_vendor, gchar *website, GpmManager *manager)
{
+ gboolean ret;
+
/* don't show when running under GDM */
if (g_getenv ("RUNNING_UNDER_GDM") != NULL) {
egg_debug ("running under gdm, so no notification");
return;
}
+ /* already shown, and dismissed */
+ ret = gconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_PERHAPS_RECALL, NULL);
+ if (!ret) {
+ egg_debug ("GConf prevents notification: %s", GPM_CONF_NOTIFY_PERHAPS_RECALL);
+ return;
+ }
+
g_object_set_data_full (G_OBJECT (manager), "recall-oem-vendor", (gpointer) g_strdup (oem_vendor), (GDestroyNotify) g_free);
g_object_set_data_full (G_OBJECT (manager), "recall-oem-website", (gpointer) g_strdup (website), (GDestroyNotify) g_free);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]