[Xfce4-commits] <xfce4-cpufreq-plugin:master> Compile fix

Florian Rivoal noreply at xfce.org
Wed Dec 29 19:20:02 CET 2010


Updating branch refs/heads/master
         to 595e46d7138f75236f3d5a1a4aa846f8af2f9258 (commit)
       from 736732cd16a8a0f84a68f0659851ce077015f68b (commit)

commit 595e46d7138f75236f3d5a1a4aa846f8af2f9258
Author: Florian Rivoal <frivoal at xfce.org>
Date:   Thu Dec 30 02:12:56 2010 +0900

    Compile fix
    
    Cast and declare things properly.
    
    Adapted from the patch in bug #3357

 panel-plugin/xfce4-cpufreq-configure.c |    6 +++---
 panel-plugin/xfce4-cpufreq-linux.c     |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/xfce4-cpufreq-configure.c b/panel-plugin/xfce4-cpufreq-configure.c
index c2e1a54..7df09dd 100644
--- a/panel-plugin/xfce4-cpufreq-configure.c
+++ b/panel-plugin/xfce4-cpufreq-configure.c
@@ -74,7 +74,7 @@ combo_changed (GtkWidget *combo, CpuFreqPluginConfigure *configure)
 static void
 spinner_changed (GtkWidget *spinner, CpuFreqPluginConfigure *configure)
 {
-	gdouble timeout = gtk_spin_button_get_value (spinner);
+	gdouble timeout = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinner));
 	timeout *= 100;
 	cpuFreq->options->timeout = timeout;
 	
@@ -98,7 +98,7 @@ cpufreq_configure (XfcePanelPlugin *plugin)
 {
 	gint i;
 	gchar *cpu_name;
-	GtkWidget *dialog, *dialog_vbox, *header;
+	GtkWidget *dialog, *dialog_vbox;
 	GtkWidget *frame, *align, *label, *vbox, *hbox;
 	GtkWidget *combo, *spinner, *button;
 	CpuFreqPluginConfigure *configure;
@@ -147,7 +147,7 @@ cpufreq_configure (XfcePanelPlugin *plugin)
 
 	spinner = configure->spinner_timeout = 
 		gtk_spin_button_new_with_range (TIMEOUT_MIN, TIMEOUT_MAX, TIMEOUT_STEP);
-	gtk_spin_button_set_value (spinner, (gdouble)cpuFreq->options->timeout / 100);
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinner), (gdouble)cpuFreq->options->timeout / 100);
 	gtk_box_pack_start (GTK_BOX (hbox), spinner, FALSE, FALSE, 0);
 	g_signal_connect (G_OBJECT (spinner), "value-changed", G_CALLBACK (spinner_changed), configure);
 
diff --git a/panel-plugin/xfce4-cpufreq-linux.c b/panel-plugin/xfce4-cpufreq-linux.c
index bfa071e..59f464f 100644
--- a/panel-plugin/xfce4-cpufreq-linux.c
+++ b/panel-plugin/xfce4-cpufreq-linux.c
@@ -64,7 +64,7 @@ cpufreq_cpu_parse_sysfs_init (gint cpu_number)
 		{
 			gint freq = atoi (tokens[i]);
 			cpu->available_freqs = g_list_append (
-				cpu->available_freqs, freq);
+				cpu->available_freqs, GINT_TO_POINTER(freq));
 			i++;
 		}
 		g_strfreev (tokens);



More information about the Xfce4-commits mailing list