[Goodies-commits] r5624 - xfce4-sensors-plugin/trunk/lib

Fabian Nowak timystery at xfce.org
Tue Oct 14 22:36:27 CEST 2008


Author: timystery
Date: 2008-10-14 20:36:27 +0000 (Tue, 14 Oct 2008)
New Revision: 5624

Modified:
   xfce4-sensors-plugin/trunk/lib/sensors-interface.c
Log:
added ifdef around libnotify stuff


Modified: xfce4-sensors-plugin/trunk/lib/sensors-interface.c
===================================================================
--- xfce4-sensors-plugin/trunk/lib/sensors-interface.c	2008-10-14 20:26:15 UTC (rev 5623)
+++ xfce4-sensors-plugin/trunk/lib/sensors-interface.c	2008-10-14 20:36:27 UTC (rev 5624)
@@ -46,10 +46,13 @@
     double sensorFeature;
     t_chipfeature *chipfeature;
     GtkTreeIter *iter;
+    #ifdef HAVE_LIBNOTIFY
     NotifyNotification *nn;
+    GError *error = NULL;
+    #endif
     gchar *summary, *body, *icon;
-    GError *error = NULL;
 
+
     summary = "Xfce 4 Sensors Plugin Failure";
     body = _("Seems like there was a problem reading a sensor "
                     "feature value.\nProper proceeding cannot be "
@@ -70,11 +73,15 @@
                     (chip, chipfeature->address, &sensorFeature);
             if ( res!=0) {
 
+                #ifdef HAVE_LIBNOTIFY
                 if (!notify_is_initted())
                     notify_init(PACKAGE); /* NOTIFY_APPNAME */
 
                 nn = notify_notification_new(summary, body, icon, NULL);
                 notify_notification_show(nn, &error);
+                #else
+                DBG("%s\n%s", summary, body);
+                #endif
 
                 /* FIXME: Better popup a window or DBG message or quit plugin. */
                 break;




More information about the Goodies-commits mailing list