[Goodies-commits] r7415 - in xfce4-power-manager/trunk: . settings src

Ali Abdallah aliov at xfce.org
Sun May 24 15:25:22 CEST 2009


Author: aliov
Date: 2009-05-24 13:25:22 +0000 (Sun, 24 May 2009)
New Revision: 7415

Modified:
   xfce4-power-manager/trunk/ChangeLog
   xfce4-power-manager/trunk/settings/xfpm-settings.glade
   xfce4-power-manager/trunk/src/xfpm-supply.c
Log:
	*: Fix minor issue of displaying adapter icon on desktop computers
	*: Minor changes in the glade file.

Modified: xfce4-power-manager/trunk/ChangeLog
===================================================================
--- xfce4-power-manager/trunk/ChangeLog	2009-05-24 09:32:52 UTC (rev 7414)
+++ xfce4-power-manager/trunk/ChangeLog	2009-05-24 13:25:22 UTC (rev 7415)
@@ -1,3 +1,7 @@
+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.
+
 2009-05-21 15:00 Ali aliov at xfce.org
 	*: Properly free the inhibitor data when the inhibitor
 	*: Don't accept events at all if they were not mapped.

Modified: xfce4-power-manager/trunk/settings/xfpm-settings.glade
===================================================================
--- xfce4-power-manager/trunk/settings/xfpm-settings.glade	2009-05-24 09:32:52 UTC (rev 7414)
+++ xfce4-power-manager/trunk/settings/xfpm-settings.glade	2009-05-24 13:25:22 UTC (rev 7415)
@@ -334,37 +334,6 @@
                                             <property name="position">0</property>
                                           </packing>
                                         </child>
-                                        <child>
-                                          <widget class="GtkVBox" id="vbox1">
-                                            <property name="visible">True</property>
-                                            <property name="orientation">vertical</property>
-                                            <child>
-                                              <widget class="GtkLabel" id="label9">
-                                                <property name="visible">True</property>
-                                                <property name="label" translatable="yes">Put the computer to sleep when inactive for:</property>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">0</property>
-                                              </packing>
-                                            </child>
-                                            <child>
-                                              <widget class="GtkHScale" id="inactivity-on-ac">
-                                                <property name="visible">True</property>
-                                                <property name="can_focus">True</property>
-                                                <property name="adjustment">30 30 360 1 10 10</property>
-                                                <property name="digits">0</property>
-                                                <property name="value_pos">bottom</property>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">1</property>
-                                              </packing>
-                                            </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
                                       </widget>
                                     </child>
                                   </widget>
@@ -386,6 +355,37 @@
                                 <property name="position">0</property>
                               </packing>
                             </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox1">
+                                <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <widget class="GtkLabel" id="label9">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">Put the computer to sleep when inactive for:</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkHScale" id="inactivity-on-ac">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">30 30 360 1 10 10</property>
+                                    <property name="digits">0</property>
+                                    <property name="value_pos">bottom</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
                           </widget>
                         </child>
                         <child>

Modified: xfce4-power-manager/trunk/src/xfpm-supply.c
===================================================================
--- xfce4-power-manager/trunk/src/xfpm-supply.c	2009-05-24 09:32:52 UTC (rev 7414)
+++ xfce4-power-manager/trunk/src/xfpm-supply.c	2009-05-24 13:25:22 UTC (rev 7415)
@@ -48,6 +48,7 @@
 #include "xfpm-marshal.h"
 
 static void xfpm_supply_finalize   (GObject *object);
+static void xfpm_supply_refresh_tray_icon (XfpmSupply *supply);
 
 #define XFPM_SUPPLY_GET_PRIVATE(o) \
 (G_TYPE_INSTANCE_GET_PRIVATE((o), XFPM_TYPE_SUPPLY, XfpmSupplyPrivate))
@@ -117,6 +118,12 @@
     supply->priv->inhibited = inhibited;
 }
 
+static void 
+xfpm_supply_tray_settings_changed (XfpmSupply *supply)
+{
+	xfpm_supply_refresh_tray_icon (supply);
+}
+
 static void
 xfpm_supply_class_init(XfpmSupplyClass *klass)
 {
@@ -175,6 +182,9 @@
     
     g_signal_connect (supply->priv->inhibit, "has-inhibit-changed",
 		      G_CALLBACK (xfpm_supply_has_inhibit_changed_cb), supply);
+			  
+    g_signal_connect_swapped (supply->priv->conf, "tray_icon_settings_changed",
+			      G_CALLBACK (xfpm_supply_tray_settings_changed), supply);
 }
 
 static void
@@ -218,8 +228,14 @@
 	    xfpm_tray_icon_set_visible (supply->priv->tray, TRUE);
 	}
 	else
+	{
 	    xfpm_tray_icon_set_visible (supply->priv->tray, FALSE);
+	}
     }
+    else
+    {
+	xfpm_tray_icon_set_visible (supply->priv->tray, FALSE);
+    }
 }
 
 static gboolean 




More information about the Goodies-commits mailing list