diff options
author | Javier Jardón <javierjc1982@gmail.com> | 2009-05-20 05:31:37 +0200 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2009-07-15 15:35:22 -0400 |
commit | 8e2122deec56472132422250653b40981f64ff75 (patch) | |
tree | 155eb7572736a06c849487ed1df7d4e328bae992 /gui | |
parent | 57659df20dc97e055b41c4d8e30836515aa9bde9 (diff) | |
download | gdm-8e2122deec56472132422250653b40981f64ff75.tar.gz |
Use g_timeout_add_seconds to reduce wakeups (closes:GnomeBug #583295)
* daemon/main.c
(bus_proxy_destroyed_cb),
(main)
* gui/simple-chooser/gdm-host-chooser-widget.c,
(xdmcp_discover)
Diffstat (limited to 'gui')
-rw-r--r-- | gui/simple-chooser/gdm-host-chooser-widget.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gui/simple-chooser/gdm-host-chooser-widget.c b/gui/simple-chooser/gdm-host-chooser-widget.c index 999a9c0e..5b572c81 100644 --- a/gui/simple-chooser/gdm-host-chooser-widget.c +++ b/gui/simple-chooser/gdm-host-chooser-widget.c @@ -93,8 +93,8 @@ static void gdm_host_chooser_widget_finalize (GObject * G_DEFINE_TYPE (GdmHostChooserWidget, gdm_host_chooser_widget, GTK_TYPE_VBOX) #define GDM_XDMCP_PROTOCOL_VERSION 1001 -#define SCAN_TIMEOUT 30000 -#define PING_TIMEOUT 2000 +#define SCAN_TIMEOUT 30 +#define PING_TIMEOUT 2 #define PING_TRIES 3 enum { @@ -378,9 +378,9 @@ xdmcp_discover (GdmHostChooserWidget *widget) g_source_remove (widget->priv->scan_time_id); } - widget->priv->scan_time_id = g_timeout_add (SCAN_TIMEOUT, - chooser_scan_time_update, - widget); + widget->priv->scan_time_id = g_timeout_add_seconds (SCAN_TIMEOUT, + chooser_scan_time_update, + widget); #endif /* Note we already used up one try */ widget->priv->ping_tries = PING_TRIES - 1; @@ -388,9 +388,9 @@ xdmcp_discover (GdmHostChooserWidget *widget) g_source_remove (widget->priv->ping_try_id); } - widget->priv->ping_try_id = g_timeout_add (PING_TIMEOUT, - (GSourceFunc)ping_try, - widget); + widget->priv->ping_try_id = g_timeout_add_seconds (PING_TIMEOUT, + (GSourceFunc)ping_try, + widget); } /* Find broadcast address for all active, non pointopoint interfaces */ |