[Xfce4-commits] [panel-plugins/xfce4-cpugraph-plugin] 09/16: Simplify

noreply at xfce.org noreply at xfce.org
Wed May 29 04:10:10 CEST 2019


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-cpugraph-plugin.

commit a971e2af7ae8aae771360ad9250808e1065e1ca9
Author: Andre Miranda <andreldm at xfce.org>
Date:   Tue Apr 23 00:05:53 2019 -0300

    Simplify
---
 panel-plugin/cpu.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/panel-plugin/cpu.c b/panel-plugin/cpu.c
index a5dea88..3c98692 100644
--- a/panel-plugin/cpu.c
+++ b/panel-plugin/cpu.c
@@ -46,8 +46,7 @@ static void set_bars_orientation( CPUGraph *base, GtkOrientation orientation);
 static gboolean update_cb( CPUGraph *base );
 static void update_tooltip( CPUGraph *base );
 static gboolean tooltip_cb( GtkWidget *widget, gint x, gint y, gboolean keyboard, GtkTooltip * tooltip, CPUGraph *base);
-static void draw_area_cb( GtkWidget *da, GdkEventExpose *event, gpointer data );
-static void draw_graph( CPUGraph *base );
+static void draw_area_cb( GtkWidget *w, cairo_t *cr, gpointer data );
 static gboolean command_cb( GtkWidget *w, GdkEventButton *event, CPUGraph *base );
 
 XFCE_PANEL_PLUGIN_REGISTER( cpugraph_construct );
@@ -346,13 +345,9 @@ static gboolean tooltip_cb( GtkWidget *widget, gint x, gint y, gboolean keyboard
 	return TRUE;
 }
 
-static void draw_area_cb( GtkWidget * da, GdkEventExpose * event, gpointer data )
-{
-	draw_graph( (CPUGraph *) data );
-}
-
-static void draw_graph( CPUGraph * base )
+static void draw_area_cb( GtkWidget * widget, cairo_t * cr, gpointer data )
 {
+	CPUGraph *base = (CPUGraph *) data;
 	GtkWidget *da = base->draw_area;
 	GtkAllocation alloc;
 	gint w, h;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list