[Goodies-commits] r7423 - in xfce4-power-manager/trunk: . doc/C src

Ali Abdallah aliov at xfce.org
Tue May 26 09:47:29 CEST 2009


Author: aliov
Date: 2009-05-26 07:47:28 +0000 (Tue, 26 May 2009)
New Revision: 7423

Modified:
   xfce4-power-manager/trunk/ChangeLog
   xfce4-power-manager/trunk/doc/C/xfce4-power-manager.html
   xfce4-power-manager/trunk/doc/C/xfce4-power-manager.xml.in
   xfce4-power-manager/trunk/src/xfpm-brightness-hal.c
   xfce4-power-manager/trunk/src/xfpm-config.h
   xfce4-power-manager/trunk/src/xfpm-xfconf.c
Log:
	*: Provide the possibility to disable the brightness popup
	indicator in a hidden option.

Modified: xfce4-power-manager/trunk/ChangeLog
===================================================================
--- xfce4-power-manager/trunk/ChangeLog	2009-05-26 04:56:27 UTC (rev 7422)
+++ xfce4-power-manager/trunk/ChangeLog	2009-05-26 07:47:28 UTC (rev 7423)
@@ -1,3 +1,7 @@
+2009-05-26 10:00 Ali aliov at xfce.org
+	*: Provide the possibility to disable the brightness popup
+	indicator in a hidden option.
+
 2009-05-24 15:30 Ali aliov at xfce.org
 	*: Fix minor issue of displaying adapter icon on desktop computers
 	*: Minor changes in the glade file.

Modified: xfce4-power-manager/trunk/doc/C/xfce4-power-manager.html
===================================================================
--- xfce4-power-manager/trunk/doc/C/xfce4-power-manager.html	2009-05-26 04:56:27 UTC (rev 7422)
+++ xfce4-power-manager/trunk/doc/C/xfce4-power-manager.html	2009-05-26 07:47:28 UTC (rev 7423)
@@ -20,7 +20,7 @@
 	Causes the running power manager to restart.
 	</p></dd><dt><span class="term"><span class="keycap"><strong>--quit</strong></span></span></dt><dd><p>
 	Causes any running instance of the power manager to exit.
-	</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-menu"></a>Context menu</h3></div></div></div><div class="figure"><a name="id2630986"></a><p class="title"><b>Figure 1. Context menu</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/xfpm-context-menu.png" alt="Context menu"></div></div></div></div><p><br class="figure-break"></p><p>
+	</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-menu"></a>Context menu</h3></div></div></div><div class="figure"><a name="id2968838"></a><p class="title"><b>Figure 1. Context menu</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/xfpm-context-menu.png" alt="Context menu"></div></div></div></div><p><br class="figure-break"></p><p>
 The context menu is popped up when you click on the icon placed in your notification area, say a battery or an adapter icon, it contains some useful options like suspend/hibernate,
 display information of the battery device open the settings dialog, it contains as well option to inhibit the power manager, if enabled, the power manager will not attempt
 to dim the screen or switch off the monitor.
@@ -31,7 +31,7 @@
 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-configuration"></a>Power Manager Configuration</h2></div></div></div><p>
   In this section we will explain in details the possible configuration of the power manager running on laptop computer, please note that the configurations are different when 
   the power manager is running on a desktop computer, for example you will not have LCD brightness or so.
-  </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-general"></a>General options</h3></div></div></div><div class="figure"><a name="id2635917"></a><p class="title"><b>Figure 2. General settings</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/xfpm-general-settings.png" alt="General settings"></div></div></div></div><p><br class="figure-break"></p><p>
+  </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-general"></a>General options</h3></div></div></div><div class="figure"><a name="id2973768"></a><p class="title"><b>Figure 2. General settings</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/xfpm-general-settings.png" alt="General settings"></div></div></div></div><p><br class="figure-break"></p><p>
 
 </p><div class="variablelist"><p class="title"><b></b></p><dl><dt><span class="term"><span class="keycap"><strong>Notification area:</strong></span></span></dt><dd><p>The notification area settings allows you to control when the icon placed in your notification are is shown, you can set it to be always visible, for battery devices
 	you can select the icon to be visible only when your are running on battery for example.</p></dd><dt><span class="term"><span class="keycap"><strong>Keyboard special keys:</strong></span></span></dt><dd><p>
@@ -53,7 +53,7 @@
 	This is the power profile when running on battery, enabling this allows you to run more time on your battery power, but this might be over the performance of your system,
 	enabling this option is always a good idea.
 	</p></dd></dl></div><p>
-</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-extended"></a>Extended options</h3></div></div></div><div class="figure"><a name="id2631283"></a><p class="title"><b>Figure 3. Extended settings</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/xfpm-extended-settings.png" alt="Extended settings"></div></div></div></div><p><br class="figure-break"></p><p>
+</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-extended"></a>Extended options</h3></div></div></div><div class="figure"><a name="id2969134"></a><p class="title"><b>Figure 3. Extended settings</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/xfpm-extended-settings.png" alt="Extended settings"></div></div></div></div><p><br class="figure-break"></p><p>
 </p><div class="variablelist"><p class="title"><b></b></p><dl><dt><span class="term"><span class="keycap"><strong>Inactivity sleep mode:</strong></span></span></dt><dd><p>You can select the inactivity sleep action to be taken by the power manger when the system is idle for a interval of  time specified by you, 
 	either on ac power or on battery power, expired. Of course if you disable idle timeout those settings will have no effects.</p></dd><dt><span class="term"><span class="keycap"><strong>Monitor sleep mode:</strong></span></span></dt><dd><p>
 	DPMS to modes before switching off the monitor, standby and suspend, they are technically different, this option is provided for convenience.
@@ -73,7 +73,6 @@
 the power manager is relying on.
 </p><p>
 Since <strong class="application"><code>xfce4-power-manager</code></strong> relies on xfconf to store and retreive configuration you can change any settings by using xfconf-query or by using your Xfce settings editor.
-
 </p><div class="variablelist"><p class="title"><b></b></p><dl><dt><span class="term">LCD Brightness</span></dt><dd><p>
 	 The <strong class="application"><code>xfce4-power-manager</code></strong> detects brightness key events and interact with the backend to update the brightness level, this might be problematic on some systems, for this the key
 	"/xfce4-power-manager/change-brightness-on-key-events" is provided, just set this key to false if you have any problem related to this, please refer
@@ -81,7 +80,13 @@
 	 
 	</p><pre class="programlisting">xfconf-query -c <strong class="application"><code>xfce4-power-manager</code></strong> -n -p "/<strong class="application"><code>xfce4-power-manager</code></strong>/change-brightness-on-key-events" -t bool -s false</pre><p>
 	 
-	</p></dd></dl></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-plugins"></a> Panel plugins </h2></div></div></div><div class="figure"><a name="id2635459"></a><p class="title"><b>Figure 4. Brightness plugin</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/xfpm-brightness-plugin.png" alt="Brightness plugin"></div></div></div></div><p><br class="figure-break"></p><p>
+	</p></dd><dt><span class="term">Disabling Brightness popup</span></dt><dd><p>
+	If you want, for some reason, to disable the brightness popup indicator (the one which popup to disblay the brightness level), just run the following command
+	in your terminal. 
+	 
+	</p><pre class="programlisting">xfconf-query -c <strong class="application"><code>xfce4-power-manager</code></strong> -n -p "/<strong class="application"><code>xfce4-power-manager</code></strong>/show-brightness-popup" -t bool -s false</pre><p>
+	 
+	</p></dd></dl></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-plugins"></a> Panel plugins </h2></div></div></div><div class="figure"><a name="id2973343"></a><p class="title"><b>Figure 4. Brightness plugin</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/xfpm-brightness-plugin.png" alt="Brightness plugin"></div></div></div></div><p><br class="figure-break"></p><p>
 <strong class="application"><code>xfce4-power-manager</code></strong> version 0.8.0r07387 includes one panel plugin for LCD brightness control, possible other plugins might be added for future releases, the usage of the brightness plugin
 is simple, just add the plugin to the panel same way you add any other plugin, then click on the plugin it will pop up a slider that you move/scroll on it to change
 the brightness level of your screen, of course the plugin will not work on a system with no back light panel. 
@@ -116,17 +121,17 @@
  
  </p><span class="keycap"><strong>Power management DBus interface.</strong></span><p>
 
-</p><div class="table"><a name="id2635696"></a><p class="title"><b>Table 1. Standard methods (org.freedesktop.PowerManagement):</b></p><div class="table-contents"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" bgcolor="#F8F9FD" cellspacing="0" cellpadding="4" summary="Standard methods (org.freedesktop.PowerManagement):" border="1"><colgroup><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns=""><col xmlns="" align="left"></colgroup><thead xmlns=""><tr><th colspan="2" align="center">Name</th><th align="left">Input parameter</th><th align="left">Return Values</th><th align="left">Errors</th><th align="left">Description</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">CanHibernate</th><th align="left"> </th><th align="left">bool</th><th align="left"> </th><th align="left">whether the system is able to hibernate</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">CanSuspend</th><th align="left"> 
 </th><th align="left">bool</th><th align="left"> </th><th align="left">whether the system is able to suspend</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">GetOnBattery</th><th align="left"> </th><th align="left">bool</th><th align="left"> </th><th align="left">whether the system is running on battery</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">GetLowBattery</th><th align="left"> </th><th align="left">bool</th><th align="left"> </th><th align="left">whether the system is running on low battery</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">Hibernate</th><th align="left"> </th><th align="left"> </th><th align="left">PermissionDenied, NotSupported</th><th align="left"> </th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">Suspend</th><th align="left"> </th><th align="left"> </th><th align="left">PermissionDenied, NotSupported</th><th align="left"> </th></tr></thead><thead xmlns=""><tr><th colspan=
 "2" align="center">Shutdown</th><th align="left"> </th><th align="left"> </th><th align="left">PermissionDenied, NotSupported</th><th align="left"> </th></tr></thead></table></div></div><p><br class="table-break">
+</p><div class="table"><a name="id3016706"></a><p class="title"><b>Table 1. Standard methods (org.freedesktop.PowerManagement):</b></p><div class="table-contents"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" bgcolor="#F8F9FD" cellspacing="0" cellpadding="4" summary="Standard methods (org.freedesktop.PowerManagement):" border="1"><colgroup><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns=""><col xmlns="" align="left"></colgroup><thead xmlns=""><tr><th colspan="2" align="center">Name</th><th align="left">Input parameter</th><th align="left">Return Values</th><th align="left">Errors</th><th align="left">Description</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">CanHibernate</th><th align="left"> </th><th align="left">bool</th><th align="left"> </th><th align="left">whether the system is able to hibernate</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">CanSuspend</th><th align="left"> 
 </th><th align="left">bool</th><th align="left"> </th><th align="left">whether the system is able to suspend</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">GetOnBattery</th><th align="left"> </th><th align="left">bool</th><th align="left"> </th><th align="left">whether the system is running on battery</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">GetLowBattery</th><th align="left"> </th><th align="left">bool</th><th align="left"> </th><th align="left">whether the system is running on low battery</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">Hibernate</th><th align="left"> </th><th align="left"> </th><th align="left">PermissionDenied, NotSupported</th><th align="left"> </th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">Suspend</th><th align="left"> </th><th align="left"> </th><th align="left">PermissionDenied, NotSupported</th><th align="left"> </th></tr></thead><thead xmlns=""><tr><th colspan=
 "2" align="center">Shutdown</th><th align="left"> </th><th align="left"> </th><th align="left">PermissionDenied, NotSupported</th><th align="left"> </th></tr></thead></table></div></div><p><br class="table-break">
 
 
-    </p><div class="table"><a name="id2679073"></a><p class="title"><b>Table 2. Standard signals (org.freedesktop.PowerManagement):</b></p><div class="table-contents"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" bgcolor="#F8F9FD" cellspacing="0" cellpadding="4" summary="Standard signals (org.freedesktop.PowerManagement):" border="1"><colgroup><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns="" align="left"></colgroup><thead xmlns=""><tr><th colspan="2" align="center">Name</th><th align="left">Values</th><th align="left">Description</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">OnBatteryChanged</th><th align="left">bool</th><th align="left">whether on battery status changed</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">LowBatteryChanged</th><th align="left">bool</th><th align="left">whether on low battery status changed</th></tr></thead></table></div></div><p><br class="table-break">
+    </p><div class="table"><a name="id3016958"></a><p class="title"><b>Table 2. Standard signals (org.freedesktop.PowerManagement):</b></p><div class="table-contents"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" bgcolor="#F8F9FD" cellspacing="0" cellpadding="4" summary="Standard signals (org.freedesktop.PowerManagement):" border="1"><colgroup><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns="" align="left"></colgroup><thead xmlns=""><tr><th colspan="2" align="center">Name</th><th align="left">Values</th><th align="left">Description</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">OnBatteryChanged</th><th align="left">bool</th><th align="left">whether on battery status changed</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">LowBatteryChanged</th><th align="left">bool</th><th align="left">whether on low battery status changed</th></tr></thead></table></div></div><p><br class="table-break">
 
 </p><span class="keycap"><strong>Power management DBus inhibit interface.</strong></span><p>
 
-</p><div class="table"><a name="id2679181"></a><p class="title"><b>Table 3. Standard methods (org.freedesktop.PowerManagement.Inhibit):</b></p><div class="table-contents"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" bgcolor="#F8F9FD" cellspacing="0" cellpadding="4" summary="Standard methods (org.freedesktop.PowerManagement.Inhibit):" border="1"><colgroup><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns=""><col xmlns="" align="left"></colgroup><thead xmlns=""><tr><th colspan="2" align="center">Name</th><th align="left">Input parameter</th><th align="left">Return Values</th><th align="left">Errors</th><th align="left">Description</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">Inhibit</th><th align="left">string application name, string reason</th><th align="left">uint32 (random cookie)</th><th align="left"> </th><th align="left">Inhibit the power manager.</th></tr></thead><thead xmlns=""><tr><th colspan
 ="2" align="center">UnInhibit</th><th align="left">uint32 cookie</th><th align="left"> </th><th align="left">InvalidCookie</th><th align="left">Unihibit the power manager.</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">HasInhibit</th><th align="left"> </th><th align="left">bool</th><th align="left"> </th><th align="left">Whether the power manager is currently inhibited or not.</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">GetInhibitors</th><th align="left"> </th><th align="left">Array of strings</th><th align="left"> </th><th align="left">List all the applications currently inhibiting the power manager (Not standard, use just for debugging)</th></tr></thead></table></div></div><p><br class="table-break">
+</p><div class="table"><a name="id3017066"></a><p class="title"><b>Table 3. Standard methods (org.freedesktop.PowerManagement.Inhibit):</b></p><div class="table-contents"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" bgcolor="#F8F9FD" cellspacing="0" cellpadding="4" summary="Standard methods (org.freedesktop.PowerManagement.Inhibit):" border="1"><colgroup><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns=""><col xmlns="" align="left"></colgroup><thead xmlns=""><tr><th colspan="2" align="center">Name</th><th align="left">Input parameter</th><th align="left">Return Values</th><th align="left">Errors</th><th align="left">Description</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">Inhibit</th><th align="left">string application name, string reason</th><th align="left">uint32 (random cookie)</th><th align="left"> </th><th align="left">Inhibit the power manager.</th></tr></thead><thead xmlns=""><tr><th colspan
 ="2" align="center">UnInhibit</th><th align="left">uint32 cookie</th><th align="left"> </th><th align="left">InvalidCookie</th><th align="left">Unihibit the power manager.</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">HasInhibit</th><th align="left"> </th><th align="left">bool</th><th align="left"> </th><th align="left">Whether the power manager is currently inhibited or not.</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">GetInhibitors</th><th align="left"> </th><th align="left">Array of strings</th><th align="left"> </th><th align="left">List all the applications currently inhibiting the power manager (Not standard, use just for debugging)</th></tr></thead></table></div></div><p><br class="table-break">
 
 
-    </p><div class="table"><a name="id2679361"></a><p class="title"><b>Table 4. Standard signals (org.freedesktop.PowerManagement.Inhibit):</b></p><div class="table-contents"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" bgcolor="#F8F9FD" cellspacing="0" cellpadding="4" summary="Standard signals (org.freedesktop.PowerManagement.Inhibit):" border="1"><colgroup><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns="" align="left"></colgroup><thead xmlns=""><tr><th colspan="2" align="center">Name</th><th align="left">Values</th><th align="left">Description</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">HasInhibitChanged</th><th align="left">bool</th><th align="left">whether the inhibit status changed.</th></tr></thead></table></div></div><p><br class="table-break">
+    </p><div class="table"><a name="id3017246"></a><p class="title"><b>Table 4. Standard signals (org.freedesktop.PowerManagement.Inhibit):</b></p><div class="table-contents"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" bgcolor="#F8F9FD" cellspacing="0" cellpadding="4" summary="Standard signals (org.freedesktop.PowerManagement.Inhibit):" border="1"><colgroup><col xmlns="" align="left"><col xmlns="" align="left"><col xmlns="" align="left"></colgroup><thead xmlns=""><tr><th colspan="2" align="center">Name</th><th align="left">Values</th><th align="left">Description</th></tr></thead><thead xmlns=""><tr><th colspan="2" align="center">HasInhibitChanged</th><th align="left">bool</th><th align="left">whether the inhibit status changed.</th></tr></thead></table></div></div><p><br class="table-break">
 
 </p><p>
 In addition, <strong class="application"><code>xfce4-power-manager</code></strong> has other interfaces, but those interfaces are mainly used internally, for example the settings application uses such interface to

Modified: xfce4-power-manager/trunk/doc/C/xfce4-power-manager.xml.in
===================================================================
--- xfce4-power-manager/trunk/doc/C/xfce4-power-manager.xml.in	2009-05-26 04:56:27 UTC (rev 7422)
+++ xfce4-power-manager/trunk/doc/C/xfce4-power-manager.xml.in	2009-05-26 07:47:28 UTC (rev 7423)
@@ -331,7 +331,6 @@
 
 <para>
 Since &app; relies on xfconf to store and retreive configuration you can change any settings by using xfconf-query or by using your Xfce settings editor.
-
 </para>
 
 <variablelist><title></title>
@@ -352,7 +351,21 @@
 	
 	</varlistentry>
 	
+<varlistentry><term>Disabling Brightness popup</term>
+	<listitem>
 	
+	<para>
+	If you want, for some reason, to disable the brightness popup indicator (the one which popup to disblay the brightness level), just run the following command
+	in your terminal. 
+	 
+	<programlisting>xfconf-query -c &app; -n -p "/&app;/show-brightness-popup" -t bool -s false</programlisting>
+	 
+	</para>
+	
+	</listitem>
+	
+	</varlistentry>	
+	
 </variablelist>
 
 </sect2>

Modified: xfce4-power-manager/trunk/src/xfpm-brightness-hal.c
===================================================================
--- xfce4-power-manager/trunk/src/xfpm-brightness-hal.c	2009-05-26 04:56:27 UTC (rev 7422)
+++ xfce4-power-manager/trunk/src/xfpm-brightness-hal.c	2009-05-26 07:47:28 UTC (rev 7423)
@@ -199,7 +199,7 @@
 xfpm_brightness_hal_up (XfpmBrightnessHal *brg)
 {
     GError *error = NULL;
-    
+    gboolean show_popup;
     gboolean enable_brightness = xfpm_xfconf_get_property_bool (brg->priv->conf, ENABLE_BRIGHTNESS_CONTROL);
     
     if ( enable_brightness == FALSE || brg->priv->brightness_in_hw)
@@ -220,15 +220,18 @@
 	g_error_free (error);
 	return;
     }
-	
-    g_signal_emit (G_OBJECT (brg), signals [BRIGHTNESS_UP], 0, brg->priv->hw_level);
+    
+    show_popup = xfpm_xfconf_get_property_bool (brg->priv->conf, SHOW_BRIGHTNESS_POPUP);
+    
+    if ( show_popup )
+	g_signal_emit (G_OBJECT (brg), signals [BRIGHTNESS_UP], 0, brg->priv->hw_level);
 }
 
 static void
 xfpm_brightness_hal_down (XfpmBrightnessHal *brg)
 {
     GError *error = NULL;
-    
+    gboolean show_popup;
     gboolean enable_brightness = xfpm_xfconf_get_property_bool (brg->priv->conf, ENABLE_BRIGHTNESS_CONTROL);
     
     if ( enable_brightness == FALSE || brg->priv->brightness_in_hw)
@@ -249,7 +252,11 @@
 	g_error_free (error);
 	return;
     }
-    g_signal_emit (G_OBJECT (brg), signals [BRIGHTNESS_UP], 0, brg->priv->hw_level);
+    
+    show_popup = xfpm_xfconf_get_property_bool (brg->priv->conf, SHOW_BRIGHTNESS_POPUP);
+    
+    if ( show_popup )
+	g_signal_emit (G_OBJECT (brg), signals [BRIGHTNESS_UP], 0, brg->priv->hw_level);
 }
 
 static void

Modified: xfce4-power-manager/trunk/src/xfpm-config.h
===================================================================
--- xfce4-power-manager/trunk/src/xfpm-config.h	2009-05-26 04:56:27 UTC (rev 7422)
+++ xfce4-power-manager/trunk/src/xfpm-config.h	2009-05-26 07:47:28 UTC (rev 7423)
@@ -74,6 +74,7 @@
 #endif
 
 #define         ENABLE_BRIGHTNESS_CONTROL    "/xfce4-power-manager/change-brightness-on-key-events"
+#define         SHOW_BRIGHTNESS_POPUP        "/xfce4-power-manager/show-brightness-popup"
 
 G_END_DECLS
 

Modified: xfce4-power-manager/trunk/src/xfpm-xfconf.c
===================================================================
--- xfce4-power-manager/trunk/src/xfpm-xfconf.c	2009-05-26 04:56:27 UTC (rev 7422)
+++ xfce4-power-manager/trunk/src/xfpm-xfconf.c	2009-05-26 07:47:28 UTC (rev 7423)
@@ -82,6 +82,7 @@
     guint                inactivity_on_battery;
     gboolean             sleep_inactivity; /* TRUE = suspend FALSE = hibernate*/
     gboolean             enable_brightness;
+    gboolean		 show_brightness_popup;
 };
 
 enum
@@ -328,6 +329,8 @@
     }
     else if ( xfpm_strequal (property, ENABLE_BRIGHTNESS_CONTROL) )
 	conf->priv->enable_brightness = g_value_get_boolean (value);
+    else if ( xfpm_strequal (property, SHOW_BRIGHTNESS_POPUP ) )
+	conf->priv->show_brightness_popup = g_value_get_boolean (value);
     else
 	g_warn_if_reached ();
 }
@@ -518,6 +521,8 @@
     
     conf->priv->enable_brightness =
 	xfconf_channel_get_bool (conf->priv->channel, ENABLE_BRIGHTNESS_CONTROL, TRUE);
+    conf->priv->show_brightness_popup =
+	xfconf_channel_get_bool (conf->priv->channel, SHOW_BRIGHTNESS_POPUP, TRUE);
 }
 
 static void
@@ -650,6 +655,8 @@
 	return conf->priv->sleep_inactivity;
     else if ( xfpm_strequal (property, ENABLE_BRIGHTNESS_CONTROL) )
 	return conf->priv->enable_brightness;
+    else if ( xfpm_strequal (property, SHOW_BRIGHTNESS_POPUP) )
+	return conf->priv->show_brightness_popup;
     
     g_warn_if_reached ();
 




More information about the Goodies-commits mailing list