[Goodies-commits] r5730 - xfce4-power-manager/trunk/src
Ali Abdallah
aliov at xfce.org
Tue Oct 21 09:52:46 CEST 2008
Author: aliov
Date: 2008-10-21 07:52:46 +0000 (Tue, 21 Oct 2008)
New Revision: 5730
Modified:
xfce4-power-manager/trunk/src/xfpm-settings.c
Log:
Fix a GtkWidget warning when no cpu governor found
Modified: xfce4-power-manager/trunk/src/xfpm-settings.c
===================================================================
--- xfce4-power-manager/trunk/src/xfpm-settings.c 2008-10-20 21:02:01 UTC (rev 5729)
+++ xfce4-power-manager/trunk/src/xfpm-settings.c 2008-10-21 07:52:46 UTC (rev 5730)
@@ -271,11 +271,14 @@
{
g_critical("Cannot set value %s\n",CPU_FREQ_SCALING_CFG);
}
- gtk_widget_set_sensitive(ondemand_on_ac,value);
- gtk_widget_set_sensitive(performance_on_ac,value);
- gtk_widget_set_sensitive(powersave_on_ac,value);
- gtk_widget_set_sensitive(conservative_on_ac,value);
- gtk_widget_set_sensitive(userspace_on_ac,value);
+ if ( GTK_IS_WIDGET(ondemand_on_ac) )
+ {
+ gtk_widget_set_sensitive(ondemand_on_ac,value);
+ gtk_widget_set_sensitive(performance_on_ac,value);
+ gtk_widget_set_sensitive(powersave_on_ac,value);
+ gtk_widget_set_sensitive(conservative_on_ac,value);
+ gtk_widget_set_sensitive(userspace_on_ac,value);
+ }
if ( GTK_IS_WIDGET(ondemand_on_batt) ) /* enough to check only one widget */
{
More information about the Goodies-commits
mailing list