[Xfce4-commits] <xfce4-cpufreq-plugin:master> Clean up
Florian Rivoal
noreply at xfce.org
Wed Dec 29 19:20:06 CET 2010
Updating branch refs/heads/master
to b0ad0f735823bdf2e7d115f511c042da6c74ff9d (commit)
from 986f1a88ae617f430b369ca6557261c86d365d35 (commit)
commit b0ad0f735823bdf2e7d115f511c042da6c74ff9d
Author: Florian Rivoal <frivoal at xfce.org>
Date: Thu Dec 30 02:37:52 2010 +0900
Clean up
Remove unused variables, initialize variables properly, and remove the
label size switching based on a non initialized variable.
Adapted from the patch in bug #3357
panel-plugin/xfce4-cpufreq-overview.c | 4 ++--
panel-plugin/xfce4-cpufreq-plugin.c | 5 +----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/panel-plugin/xfce4-cpufreq-overview.c b/panel-plugin/xfce4-cpufreq-overview.c
index a272dbf..5160aa9 100644
--- a/panel-plugin/xfce4-cpufreq-overview.c
+++ b/panel-plugin/xfce4-cpufreq-overview.c
@@ -38,7 +38,7 @@
static void
cpufreq_overview_add (CpuInfo *cpu, guint cpu_number, GtkWidget *dialog_hbox)
{
- gint i, j;
+ gint i = 0, j;
gchar *text;
GtkWidget *hbox, *dialog_vbox, *combo, *label, *icon;
GList *list;
@@ -181,7 +181,7 @@ cpufreq_overview (GtkWidget *widget, GdkEventButton *ev, CpuFreqPlugin *cpuFreq)
{
gint i;
GtkWidget *dialog, *dialog_vbox, *window;
- GtkWidget *header, *dialog_hbox, *separator;
+ GtkWidget *dialog_hbox, *separator;
if (ev->button != 1)
return FALSE;
diff --git a/panel-plugin/xfce4-cpufreq-plugin.c b/panel-plugin/xfce4-cpufreq-plugin.c
index 1d21796..bafb824 100644
--- a/panel-plugin/xfce4-cpufreq-plugin.c
+++ b/panel-plugin/xfce4-cpufreq-plugin.c
@@ -44,14 +44,12 @@ gboolean
cpufreq_update_label (CpuInfo *cpu)
{
gchar *label, *freq;
- gboolean small;
if (!cpuFreq->options->show_label_governor && !cpuFreq->options->show_label_freq)
return TRUE;
freq = cpufreq_get_human_readable_freq (cpu->cur_freq);
- label = g_strconcat (small ? "<span size=\"xx-small\">" : "<span size=\"x-small\">",
-
+ label = g_strconcat (
cpuFreq->options->show_label_freq ? freq : "",
cpu->cur_governor != NULL &&
@@ -60,7 +58,6 @@ cpufreq_update_label (CpuInfo *cpu)
cpu->cur_governor != NULL &&
cpuFreq->options->show_label_governor ? cpu->cur_governor : "",
- "</span>",
NULL);
gtk_label_set_label (GTK_LABEL(cpuFreq->label), label);
More information about the Xfce4-commits
mailing list