[cheese] Remove useless redraw timeout
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [cheese] Remove useless redraw timeout
- Date: Thu, 14 Jan 2010 17:05:28 +0000 (UTC)
commit b91163038e0df48157a8e6727f4a21609ca0502d
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jan 14 17:02:05 2010 +0000
Remove useless redraw timeout
Should save use some battery, as we really don't need to redraw
the countdonw 10 times a second.
libcheese/cheese-countdown.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/libcheese/cheese-countdown.c b/libcheese/cheese-countdown.c
index b162c96..b2782e2 100644
--- a/libcheese/cheese-countdown.c
+++ b/libcheese/cheese-countdown.c
@@ -493,15 +493,6 @@ on_expose (GtkWidget *widget, GdkEventExpose *pEvent, gpointer data)
return FALSE;
}
-static gboolean
-redraw_handler (gpointer data)
-{
- GtkWidget *widget = (GtkWidget *) data;
-
- gtk_widget_queue_draw (widget);
- return TRUE;
-}
-
static cairo_surface_t *
create_surface_from_svg (GtkWidget *widget, gchar *pcFilename)
{
@@ -615,6 +606,8 @@ cheese_countdown_cb (gpointer countdown)
return FALSE;
}
+ gtk_widget_queue_draw (GTK_WIDGET (countdown));
+
return TRUE;
}
@@ -683,8 +676,6 @@ cheese_countdown_init (CheeseCountdown *countdown)
G_CALLBACK (on_expose), NULL);
g_signal_connect (G_OBJECT (countdown), "style-set",
G_CALLBACK (on_style_set_cb), countdown);
-
- g_timeout_add (100, redraw_handler, (gpointer) countdown);
}
GtkWidget *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]