Remove GSourceFunc casts

Convert the callback into a real GSourceFunc.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
master
Olaf Hering 2020-12-12 22:37:17 +01:00 committed by Romain Bouvier
parent 0ffbd97168
commit 7a4820a3f8
1 changed files with 3 additions and 3 deletions

View File

@ -149,8 +149,9 @@ typedef struct
static void set_progressbar_csscolor(GtkWidget*, GdkRGBA*); static void set_progressbar_csscolor(GtkWidget*, GdkRGBA*);
/* ---------------------------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------------------------------- */
static gboolean update_monitors(t_global_monitor *global) static gboolean update_monitors(gpointer user_data)
{ {
t_global_monitor *global = user_data;
char buffer[SUM+1][BUFSIZ]; char buffer[SUM+1][BUFSIZ];
char buffer_panel[SUM][BUFSIZ]; char buffer_panel[SUM][BUFSIZ];
gchar caption[BUFSIZ]; gchar caption[BUFSIZ];
@ -284,8 +285,7 @@ static void run_update (t_global_monitor *global)
if (global->monitor->options.update_interval > 0) if (global->monitor->options.update_interval > 0)
{ {
global->timeout_id = g_timeout_add( global->monitor->options.update_interval, global->timeout_id = g_timeout_add(global->monitor->options.update_interval, update_monitors, global);
(GSourceFunc)update_monitors, global);
} }
} }