diff options
author | Philippe Gauthier <philippe.gauthier@deuxpi.ca> | 2009-10-30 14:51:16 -0400 |
---|---|---|
committer | Arx Cruz <arxcruz@gmail.com> | 2010-05-27 20:49:45 -0300 |
commit | 1570a2bbf07627cb5f8d9828a95db67b7d00634c (patch) | |
tree | 9849583754be635c2e12dc1f16f48213b847a8e7 | |
parent | bda85194a8d9ee5ee1ab0921f21528539a5460cb (diff) | |
download | zenity-1570a2bbf07627cb5f8d9828a95db67b7d00634c.tar.gz |
Use g_timeout_add_seconds instead g_timeout_add
The calls to g_timeout_add are replaced with g_timeout_add_seconds to
reduce the number or program wake ups. See the GNOME Goal description:
http://live.gnome.org/GnomeGoals/UseTimeoutAddSeconds
-rw-r--r-- | src/calendar.c | 2 | ||||
-rw-r--r-- | src/entry.c | 2 | ||||
-rw-r--r-- | src/fileselection.c | 2 | ||||
-rw-r--r-- | src/msg.c | 2 | ||||
-rw-r--r-- | src/notification.c | 2 | ||||
-rw-r--r-- | src/progress.c | 2 | ||||
-rw-r--r-- | src/scale.c | 2 | ||||
-rw-r--r-- | src/text.c | 2 | ||||
-rw-r--r-- | src/tree.c | 2 |
9 files changed, 9 insertions, 9 deletions
diff --git a/src/calendar.c b/src/calendar.c index 8ad53ea..9aaee9f 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -85,7 +85,7 @@ zenity_calendar (ZenityData *data, ZenityCalendarData *cal_data) zenity_util_show_dialog (dialog); if(data->timeout_delay > 0) { - g_timeout_add (data->timeout_delay * 1000, (GSourceFunc) zenity_util_timeout_handle, NULL); + g_timeout_add_seconds (data->timeout_delay, (GSourceFunc) zenity_util_timeout_handle, NULL); } g_object_unref (builder); diff --git a/src/entry.c b/src/entry.c index 8826e92..ca53caf 100644 --- a/src/entry.c +++ b/src/entry.c @@ -129,7 +129,7 @@ zenity_entry (ZenityData *data, ZenityEntryData *entry_data) zenity_util_show_dialog (dialog); if(data->timeout_delay > 0) { - g_timeout_add (data->timeout_delay * 1000, (GSourceFunc) zenity_util_timeout_handle, NULL); + g_timeout_add_seconds (data->timeout_delay, (GSourceFunc) zenity_util_timeout_handle, NULL); } gtk_main (); diff --git a/src/fileselection.c b/src/fileselection.c index dd4ab0d..026bb31 100644 --- a/src/fileselection.c +++ b/src/fileselection.c @@ -136,7 +136,7 @@ void zenity_fileselection (ZenityData *data, ZenityFileData *file_data) zenity_util_show_dialog (dialog); if(data->timeout_delay > 0) { - g_timeout_add (data->timeout_delay * 1000, (GSourceFunc) zenity_util_timeout_handle, NULL); + g_timeout_add_seconds (data->timeout_delay, (GSourceFunc) zenity_util_timeout_handle, NULL); } gtk_main (); @@ -138,7 +138,7 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data) zenity_util_show_dialog (dialog); if(data->timeout_delay > 0) { - g_timeout_add (data->timeout_delay * 1000, (GSourceFunc) zenity_util_timeout_handle, NULL); + g_timeout_add_seconds (data->timeout_delay, (GSourceFunc) zenity_util_timeout_handle, NULL); } g_object_unref (builder); diff --git a/src/notification.c b/src/notification.c index 674eaec..99a2e36 100644 --- a/src/notification.c +++ b/src/notification.c @@ -292,7 +292,7 @@ zenity_notification (ZenityData *data, ZenityNotificationData *notification_data gtk_status_icon_set_visible (status_icon, TRUE); if(data->timeout_delay > 0) { - g_timeout_add (data->timeout_delay * 1000, (GSourceFunc) zenity_util_timeout_handle, NULL); + g_timeout_add_seconds (data->timeout_delay, (GSourceFunc) zenity_util_timeout_handle, NULL); } gtk_main (); diff --git a/src/progress.c b/src/progress.c index 40f9182..4f1f55e 100644 --- a/src/progress.c +++ b/src/progress.c @@ -286,7 +286,7 @@ zenity_progress (ZenityData *data, ZenityProgressData *progress_data) zenity_progress_read_info (progress_data); if(data->timeout_delay > 0) { - g_timeout_add (data->timeout_delay * 1000, (GSourceFunc) zenity_util_timeout_handle, NULL); + g_timeout_add_seconds (data->timeout_delay, (GSourceFunc) zenity_util_timeout_handle, NULL); } gtk_main (); diff --git a/src/scale.c b/src/scale.c index 8678774..c0d25d1 100644 --- a/src/scale.c +++ b/src/scale.c @@ -92,7 +92,7 @@ zenity_scale (ZenityData *data, ZenityScaleData *scale_data) zenity_util_show_dialog (dialog); if(data->timeout_delay > 0) { - g_timeout_add (data->timeout_delay * 1000, (GSourceFunc) zenity_util_timeout_handle, NULL); + g_timeout_add_seconds (data->timeout_delay, (GSourceFunc) zenity_util_timeout_handle, NULL); } g_object_unref (builder); @@ -152,7 +152,7 @@ zenity_text (ZenityData *data, ZenityTextData *text_data) g_object_unref (builder); if(data->timeout_delay > 0) { - g_timeout_add (data->timeout_delay * 1000, (GSourceFunc) zenity_util_timeout_handle, NULL); + g_timeout_add_seconds (data->timeout_delay, (GSourceFunc) zenity_util_timeout_handle, NULL); } gtk_main (); @@ -499,7 +499,7 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data) zenity_util_show_dialog (dialog); if(data->timeout_delay > 0) { - g_timeout_add (data->timeout_delay * 1000, (GSourceFunc) zenity_util_timeout_handle, NULL); + g_timeout_add_seconds (data->timeout_delay, (GSourceFunc) zenity_util_timeout_handle, NULL); } gtk_main (); |