[Xfce4-commits] [panel-plugins/xfce4-fsguard-plugin] 05/06: Set next css class based on remaining free space

noreply at xfce.org noreply at xfce.org
Sun Feb 19 20:06:53 CET 2017


This is an automated email from the git hooks/post-receive script.

landry pushed a commit to branch master
in repository panel-plugins/xfce4-fsguard-plugin.

commit aa84dcac4153a22aa30552d8c3a7f4e38a233b1f
Author: Landry Breuil <landry at xfce.org>
Date:   Sun Feb 19 20:06:05 2017 +0100

    Set next css class based on remaining free space
---
 panel-plugin/fsguard.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/panel-plugin/fsguard.c b/panel-plugin/fsguard.c
index e9a2bd1..91fffdb 100644
--- a/panel-plugin/fsguard.c
+++ b/panel-plugin/fsguard.c
@@ -264,6 +264,7 @@ fsguard_check_fs (FsGuard *fsguard)
     float               totalblocks = 0;
     long                blocksize = 0;
     int                 err;
+    gchar              *css_class = "normal";
     gchar               msg_size[100], msg_total_size[100], msg[100];
     gint                icon_id = ICON_INSENSITIVE;
     static struct statfs fsd;
@@ -279,10 +280,13 @@ fsguard_check_fs (FsGuard *fsguard)
 
         if (freespace > (total * fsguard->limit_warning / 100)) {
             icon_id = ICON_NORMAL;
+            css_class = "normal";
         } else if (freespace > (total * fsguard->limit_urgent / 100) && freespace <= (total * fsguard->limit_warning / 100)) {
             icon_id = ICON_WARNING;
+            css_class = "warning";
         } else {
             icon_id = ICON_URGENT;
+            css_class = "urgent";
         }
     }
         g_snprintf (msg, sizeof (msg),

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list