From f17b415f930f3926cb5099dd8c88cd99259d6b26 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sun, 15 Oct 2006 16:03:32 +0000 Subject: hddtemp support cleanup, fixes --- hardinfo2/util.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'hardinfo2/util.c') diff --git a/hardinfo2/util.c b/hardinfo2/util.c index ee6040b2..b1c11174 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -77,3 +77,20 @@ widget_set_cursor(GtkWidget *widget, GdkCursorType cursor_type) while(gtk_events_pending()) gtk_main_iteration(); } + +static gboolean +__nonblock_cb(gpointer data) +{ + gtk_main_quit(); + return FALSE; +} + +void +nonblock_sleep(guint msec) +{ + g_timeout_add(msec, (GSourceFunc)__nonblock_cb, NULL); + gtk_main(); +} + + + -- cgit v1.2.3