[Xfce4-commits] <xfce4-cpufreq-plugin:master> Code clean up
Florian Rivoal
noreply at xfce.org
Wed Dec 29 19:20:05 CET 2010
Updating branch refs/heads/master
to 986f1a88ae617f430b369ca6557261c86d365d35 (commit)
from 2a2748846dfd829e78fa82477f0dd09bb050dfe8 (commit)
commit 986f1a88ae617f430b369ca6557261c86d365d35
Author: Florian Rivoal <frivoal at xfce.org>
Date: Thu Dec 30 02:29:45 2010 +0900
Code clean up
Simplify the code and fix compile time warnings.
Adapted from the patch in bug #3357
panel-plugin/xfce4-cpufreq-plugin.c | 10 ++++------
panel-plugin/xfce4-cpufreq-plugin.h | 4 ++--
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/panel-plugin/xfce4-cpufreq-plugin.c b/panel-plugin/xfce4-cpufreq-plugin.c
index e17aa39..1d21796 100644
--- a/panel-plugin/xfce4-cpufreq-plugin.c
+++ b/panel-plugin/xfce4-cpufreq-plugin.c
@@ -113,7 +113,7 @@ cpufreq_update_plugin (void)
return TRUE;
}
-gboolean
+void
cpufreq_restart_timeout (void)
{
g_source_remove (cpuFreq->timeoutHandle);
@@ -123,7 +123,7 @@ cpufreq_restart_timeout (void)
NULL);
}
-gboolean
+void
cpufreq_widgets (void)
{
gint size;
@@ -259,8 +259,7 @@ cpufreq_set_size (XfcePanelPlugin *plugin, gint wsize)
static void
cpufreq_orientation_changed (XfcePanelPlugin *plugin, GtkOrientation orientation)
{
- if (cpufreq_widgets () == FALSE)
- xfce_err (_("Could not create widgets !"));
+ cpufreq_widgets ();
}
static void
@@ -281,8 +280,7 @@ cpufreq_construct (XfcePanelPlugin *plugin)
if (cpufreq_linux_init () == FALSE)
xfce_err (_("Your system is not configured correctly to support cpu frequency scaling !"));
- if (cpufreq_widgets () == FALSE)
- xfce_err (_("Could not create widgets !"));
+ cpufreq_widgets ();
cpuFreq->timeoutHandle = g_timeout_add (
cpuFreq->options->timeout,
diff --git a/panel-plugin/xfce4-cpufreq-plugin.h b/panel-plugin/xfce4-cpufreq-plugin.h
index 77199a9..24d3661 100644
--- a/panel-plugin/xfce4-cpufreq-plugin.h
+++ b/panel-plugin/xfce4-cpufreq-plugin.h
@@ -67,10 +67,10 @@ G_BEGIN_DECLS
gboolean
cpufreq_update_plugin (void);
-gboolean
+void
cpufreq_restart_timeout (void);
-gboolean
+void
cpufreq_widgets (void);
void
More information about the Xfce4-commits
mailing list