replace g_timeout_add with g_timeout_add_seconds
Hello,
Please find attached a patch to replace the usage of g_timeout_add with g_timeout_add_seconds in the proximity application in bluez-gnome. g_timeout_add_seconds does less wake up, ans so saves a little bit of power.
Could someone review it and commit it?
thanks a lot.
Cheers.
Signature · 1 line
Baptiste Mille-Mathias <[email protected]>
proximity/main.c +4 -4
@@ -80,7 +80,7 @@ static void clicked_callback(GtkWidget *button, gpointer user_data)if (error !=NULL ) {gtk_statusbar_push (GTK_STATUSBAR (statusbar),0 , error->message); -g_timeout_add (3000 , message_remove,NULL ); +g_timeout_add_seconds (3 , message_remove,NULL );g_error_free (error); } }
@@ -100,7 +100,7 @@ static void cancel_callback(GtkWidget *button, gpointer user_data)if (error !=NULL ) {gtk_statusbar_push (GTK_STATUSBAR (statusbar),0 , error->message); -g_timeout_add (3000 , message_remove,NULL ); +g_timeout_add_seconds (3 , message_remove,NULL );g_error_free (error); } }
@@ -127,7 +127,7 @@ static void periodic_callback(GtkWidget *widget, gpointer user_data)if (error !=NULL ) {gtk_statusbar_push (GTK_STATUSBAR (statusbar),0 , error->message); -g_timeout_add (3000 , message_remove,NULL ); +g_timeout_add_seconds (3 , message_remove,NULL );g_error_free (error); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),
@@ -140,7 +140,7 @@ static void periodic_callback(GtkWidget *widget, gpointer user_data)if (error !=NULL ) {gtk_statusbar_push (GTK_STATUSBAR (statusbar),0 , error->message); -g_timeout_add (3000 , message_remove,NULL ); +g_timeout_add_seconds (3 , message_remove,NULL );g_error_free (error); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),
Marcel Holtmann
maintainerHi Baptiste,
Quoted 4 lines
Please find attached a patch to replace the usage of
g_timeout_addwithg_timeout_add_secondsin the proximity application in bluez-gnome.g_timeout_add_secondsdoes less wake up, ans so saves a little bit of power.
patch has been applied. Thanks.
Regards
Marcel