All of lore.kernel.org
 help / color / mirror / Atom feed
* [bluez-gnome/proximity] replace g_timeout_add with g_timeout_add_seconds
@ 2008-12-19 11:27 Baptiste Mille-Mathias
  2008-12-19 18:50 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Baptiste Mille-Mathias @ 2008-12-19 11:27 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

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@gmail.com>

[-- Attachment #2: bluez-gnome_565084.diff --]
[-- Type: text/x-patch, Size: 1504 bytes --]

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),

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [bluez-gnome/proximity] replace g_timeout_add with g_timeout_add_seconds
  2008-12-19 11:27 [bluez-gnome/proximity] replace g_timeout_add with g_timeout_add_seconds Baptiste Mille-Mathias
@ 2008-12-19 18:50 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2008-12-19 18:50 UTC (permalink / raw)
  To: Baptiste Mille-Mathias; +Cc: linux-bluetooth

Hi Baptiste,

> 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.

patch has been applied. Thanks.

Regards

Marcel



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-19 18:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-19 11:27 [bluez-gnome/proximity] replace g_timeout_add with g_timeout_add_seconds Baptiste Mille-Mathias
2008-12-19 18:50 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.