summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Gauthier <philippe.gauthier@deuxpi.ca>2009-10-30 14:51:16 -0400
committerArx Cruz <arxcruz@gmail.com>2010-05-27 20:49:45 -0300
commit1570a2bbf07627cb5f8d9828a95db67b7d00634c (patch)
tree9849583754be635c2e12dc1f16f48213b847a8e7
parentbda85194a8d9ee5ee1ab0921f21528539a5460cb (diff)
downloadzenity-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.c2
-rw-r--r--src/entry.c2
-rw-r--r--src/fileselection.c2
-rw-r--r--src/msg.c2
-rw-r--r--src/notification.c2
-rw-r--r--src/progress.c2
-rw-r--r--src/scale.c2
-rw-r--r--src/text.c2
-rw-r--r--src/tree.c2
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 ();
diff --git a/src/msg.c b/src/msg.c
index fd92289..1a92875 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -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);
diff --git a/src/text.c b/src/text.c
index 25bd768..eb5f989 100644
--- a/src/text.c
+++ b/src/text.c
@@ -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 ();
diff --git a/src/tree.c b/src/tree.c
index 63287e3..3861e86 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -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 ();