[bluez-gnome/proximity] replace g_timeout_add with g_timeout_add_seconds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Baptiste Mille-Mathias <baptiste.millemathias@xxxxxxxxx>
diff --git a/proximity/main.c b/proximity/main.c
index d295be5..71e9128 100644
--- a/proximity/main.c
+++ b/proximity/main.c
@@ -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),

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux