[Xfce4-commits] <xfce4-cpugraph-plugin:master> Fix bug 3775

Florian noreply at xfce.org
Sat Apr 17 16:16:17 CEST 2010


Updating branch refs/heads/master
         to c9a5adb1a56c852c41695110d596f7557100e1a0 (commit)
       from 6de8646914b9abf644a72c9dc98fd8b5d1b24b4d (commit)

commit c9a5adb1a56c852c41695110d596f7557100e1a0
Author: Florian <frivoal at gmail.com>
Date:   Fri Feb 19 10:17:33 2010 +0900

    Fix bug 3775
    
    Replace use of the deprecated tooltips API by the tooltip (without s)
    API.

 panel-plugin/cpu.c |    8 +-------
 panel-plugin/cpu.h |    2 --
 2 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/panel-plugin/cpu.c b/panel-plugin/cpu.c
index 89e9eaa..eb81b84 100644
--- a/panel-plugin/cpu.c
+++ b/panel-plugin/cpu.c
@@ -44,8 +44,6 @@ void Kill( XfcePanelPlugin * plugin, CPUGraph * base )
 
 	g_free( base->m_History );
 
-	g_object_unref( base->m_Tooltip );
-
 	g_free( base->m_AssociateCommand );
 	g_free( base );
 }
@@ -118,10 +116,6 @@ CPUGraph * CreateControl( XfcePanelPlugin * plugin )
 
 	xfce_panel_plugin_add_action_widget( plugin, base->m_DrawArea );
 
-	base->m_Tooltip = gtk_tooltips_new();
-	g_object_ref( base->m_Tooltip );
-	gtk_object_sink( GTK_OBJECT( base->m_Tooltip ) );
-
 	g_signal_connect_after( base->m_DrawArea, "expose-event", G_CALLBACK( DrawAreaExposeEvent ), base );
 
 	return base;
@@ -174,7 +168,7 @@ void UpdateTooltip( CPUGraph * base )
 	int pos = g_snprintf( tooltip, 32, "Usage: %d%%", (int)base->m_CpuData[0].load*100/CPU_SCALE );
 	if( base->m_CpuData[0].scalCurFreq )
 		g_snprintf( tooltip+pos, 32-pos, " (%d MHz)", base->m_CpuData[0].scalCurFreq/1000 );
-	gtk_tooltips_set_tip( GTK_TOOLTIPS( base->m_Tooltip ), base->m_FrameWidget->parent, tooltip, NULL );
+	gtk_widget_set_tooltip_text( base->m_FrameWidget, tooltip );
 }
 
 gboolean SetSize( XfcePanelPlugin *plugin, int size, CPUGraph *base )
diff --git a/panel-plugin/cpu.h b/panel-plugin/cpu.h
index 9c87c40..a0ca879 100644
--- a/panel-plugin/cpu.h
+++ b/panel-plugin/cpu.h
@@ -63,8 +63,6 @@ typedef struct
 	GdkColor m_ForeGround3;
 	GdkColor m_BackGround; // Background color.
 
-	GtkTooltips *m_Tooltip; // Eventual tooltip.
-
 	guint m_TimeoutID; // Timeout ID for the tooltip;
 	long *m_History;
 	int m_Values;



More information about the Xfce4-commits mailing list