gnome-power-manager r2749 - in trunk: . src



Author: rhughes
Date: Wed Mar 26 17:42:00 2008
New Revision: 2749
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=2749&view=rev

Log:
2008-03-26  Richard Hughes  <richard hughsie com>

* src/gpm-notify.c: (gpm_notify_perhaps_recall),
(gpm_notify_low_capacity), (gpm_notify_inhibit_lid):
Don't show some notifications under GDM. Fixes #108075


Modified:
   trunk/ChangeLog
   trunk/src/gpm-notify.c

Modified: trunk/src/gpm-notify.c
==============================================================================
--- trunk/src/gpm-notify.c	(original)
+++ trunk/src/gpm-notify.c	Wed Mar 26 17:42:00 2008
@@ -360,6 +360,12 @@
 	gchar *msg;
 	const gchar *title;
 
+	/* don't show when running under GDM */
+	if (g_getenv ("RUNNING_UNDER_GDM") != NULL) {
+		gpm_debug ("running under gdm, so no notification");
+		return FALSE;
+	}
+
 	/* save in state */
 	title = _("Battery may be recalled");
 	msg = g_strdup_printf (_("The battery in your computer may have been "
@@ -403,6 +409,12 @@
 	gchar *msg;
 	const gchar *title;
 
+	/* don't show when running under GDM */
+	if (g_getenv ("RUNNING_UNDER_GDM") != NULL) {
+		gpm_debug ("running under gdm, so no notification");
+		return FALSE;
+	}
+
 	title = _("Battery may be broken");
 	msg = g_strdup_printf (_("Your battery has a very low capacity (%i%%), "
 				 "which means that it may be old or broken."),
@@ -436,6 +448,12 @@
 	gchar *msg;
 	const gchar *title;
 
+	/* don't show when running under GDM */
+	if (g_getenv ("RUNNING_UNDER_GDM") != NULL) {
+		gpm_debug ("running under gdm, so no notification");
+		return FALSE;
+	}
+
 	title = _("Sleep warning");
 	msg = g_strdup_printf (_("Your laptop will not sleep if you shut the "
 				 "lid as a running program has prevented this.\n"



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