[Xfce4-commits] <xfce4-sensors-plugin:master> correct multiple ifdef statements for libnotify
Fabian
noreply at xfce.org
Sat May 7 10:32:01 CEST 2011
Updating branch refs/heads/master
to f33c099522834e5deed8bea859678f981b8f0329 (commit)
from b45106e3439f041fc417a7fd84023991745f3487 (commit)
commit f33c099522834e5deed8bea859678f981b8f0329
Author: Fabian <timystery at arcor.de>
Date: Sat May 7 10:32:26 2011 +0200
correct multiple ifdef statements for libnotify
lib/hddtemp.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/hddtemp.c b/lib/hddtemp.c
index 0b7b01e..1a9e8c6 100644
--- a/lib/hddtemp.c
+++ b/lib/hddtemp.c
@@ -45,7 +45,7 @@
#include <gtk/gtkstock.h> */
/* Global includes */
-#ifdef HAVE_LIBNOTIFY4 || HAVE_LIBNOTIFY7
+#if defined(HAVE_LIBNOTIFY4) || defined(HAVE_LIBNOTIFY7)
#include <libnotify/notify.h>
#endif
/* #include <stdio.h> */
@@ -95,7 +95,7 @@ void read_disks_fallback (t_chip *chip);
void remove_unmonitored_drives (t_chip *chip, gboolean *suppressmessage);
void populate_detected_drives (t_chip *chip);
-#ifdef HAVE_LIBNOTIFY4 || HAVE_LIBNOTIFY7
+#if defined(HAVE_LIBNOTIFY4) || defined(HAVE_LIBNOTIFY7)
void
notification_suppress_messages (NotifyNotification *n, gchar *action, gpointer *data)
{
@@ -199,7 +199,7 @@ gboolean quick_message_with_checkbox (gchar *message, gchar *checkboxtext) {
void quick_message (gchar *message)
{
-#ifdef HAVE_LIBNOTIFY4 || HAVE_LIBNOTIFY7
+#if defined(HAVE_LIBNOTIFY4) || defined(HAVE_LIBNOTIFY7)
quick_message_notify (message);
#else
quick_message_dialog (message);
@@ -509,7 +509,7 @@ get_hddtemp_value (char* disk, gboolean *suppressmessage)
gchar *standard_output=NULL, *standard_error=NULL;
gchar *cmd_line=NULL, *msg_text=NULL;
-#ifndef HAVE_LIBNOTIFY4 || HAVE_LIBNOTIFY7
+#if !defined(HAVE_LIBNOTIFY4) && !defined(HAVE_LIBNOTIFY7)
gchar *checktext = NULL;
#endif
gint exit_status=0;
@@ -604,7 +604,7 @@ get_hddtemp_value (char* disk, gboolean *suppressmessage)
"Calling \"%s\" gave the following error:\n%s\nwith a return value of %d.\n"),
PATH_HDDTEMP, cmd_line, standard_error, exit_status);
-#ifdef HAVE_LIBNOTIFY4 || HAVE_LIBNOTIFY7
+#if defined(HAVE_LIBNOTIFY4) || defined(HAVE_LIBNOTIFY7)
//msg_text = g_strconcat(msg_text, _("\nYou can disable these notifications in the settings dialog.\n");
quick_message_notify (msg_text);
nevershowagain = FALSE;
@@ -635,7 +635,7 @@ get_hddtemp_value (char* disk, gboolean *suppressmessage)
if (!nevershowagain) {
msg_text = g_strdup_printf (_("An error occurred when executing"
" \"%s\":\n%s"), cmd_line, error->message);
-#ifdef HAVE_LIBNOTIFY4 || HAVE_LIBNOTIFY7
+#if defined(HAVE_LIBNOTIFY4) || defined(HAVE_LIBNOTIFY7)
quick_message_notify (msg_text);
nevershowagain = FALSE;
#else
@@ -668,7 +668,7 @@ get_hddtemp_value (char* disk, gboolean *suppressmessage)
g_free (standard_output);
g_free (standard_error);
g_free (msg_text);
-#ifndef HAVE_LIBNOTIFY4 || HAVE_LIBNOTIFY7
+#if !defined(HAVE_LIBNOTIFY4) && !defined(HAVE_LIBNOTIFY7)
g_free (checktext);
#endif
More information about the Xfce4-commits
mailing list