rhythmbox r5847 - in trunk: . lib plugins plugins/audioscrobbler rhythmdb shell
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r5847 - in trunk: . lib plugins plugins/audioscrobbler rhythmdb shell
- Date: Sat, 9 Aug 2008 11:41:20 +0000 (UTC)
Author: jmatthew
Date: Sat Aug 9 11:41:20 2008
New Revision: 5847
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5847&view=rev
Log:
2008-08-09 Jonathan Matthew <jonathan d14n org>
* lib/rb-util.c: (rb_threads_init):
* plugins/audioscrobbler/rb-audioscrobbler.c:
(rb_audioscrobbler_add_timeout):
* plugins/rb-plugins-engine.c: (rb_plugins_engine_init):
* rhythmdb/rhythmdb-monitor.c: (add_changed_file):
* rhythmdb/rhythmdb-query-model.c:
(rhythmdb_query_model_set_query_internal):
* rhythmdb/rhythmdb.c: (rhythmdb_process_one_event):
* shell/rb-shell.c: (add_to_library_response_cb),
(idle_handle_load_complete):
Convert various long period repeating timers to use
g_timeout_add_seconds in the hope of reducing wakeup frequency.
From #399012.
Modified:
trunk/ChangeLog
trunk/lib/rb-util.c
trunk/plugins/audioscrobbler/rb-audioscrobbler.c
trunk/plugins/rb-plugins-engine.c
trunk/rhythmdb/rhythmdb-monitor.c
trunk/rhythmdb/rhythmdb-query-model.c
trunk/rhythmdb/rhythmdb.c
trunk/shell/rb-shell.c
Modified: trunk/lib/rb-util.c
==============================================================================
--- trunk/lib/rb-util.c (original)
+++ trunk/lib/rb-util.c Sat Aug 9 11:41:20 2008
@@ -405,7 +405,7 @@
rb_debug ("GMutex %s recursive", mutex_recurses ? "is" : "isn't");
/* purge useless thread-pool threads occasionally */
- g_timeout_add (30 * 1000, purge_useless_threads, NULL);
+ g_timeout_add_seconds (30, purge_useless_threads, NULL);
}
gchar **
Modified: trunk/plugins/audioscrobbler/rb-audioscrobbler.c
==============================================================================
--- trunk/plugins/audioscrobbler/rb-audioscrobbler.c (original)
+++ trunk/plugins/audioscrobbler/rb-audioscrobbler.c Sat Aug 9 11:41:20 2008
@@ -463,8 +463,9 @@
if (!audioscrobbler->priv->timeout_id) {
rb_debug ("Adding Audioscrobbler timer (15 seconds)");
audioscrobbler->priv->timeout_id =
- g_timeout_add (15000, (GSourceFunc) rb_audioscrobbler_timeout_cb,
- audioscrobbler);
+ g_timeout_add_seconds (15,
+ (GSourceFunc) rb_audioscrobbler_timeout_cb,
+ audioscrobbler);
}
}
Modified: trunk/plugins/rb-plugins-engine.c
==============================================================================
--- trunk/plugins/rb-plugins-engine.c (original)
+++ trunk/plugins/rb-plugins-engine.c Sat Aug 9 11:41:20 2008
@@ -374,7 +374,7 @@
rb_plugins_engine_load_all ();
- garbage_collect_id = g_timeout_add_full (G_PRIORITY_LOW, 20000, garbage_collect_cb, NULL, NULL);
+ garbage_collect_id = g_timeout_add_seconds_full (G_PRIORITY_LOW, 20, garbage_collect_cb, NULL, NULL);
rb_profile_end ("plugins engine init");
Modified: trunk/rhythmdb/rhythmdb-monitor.c
==============================================================================
--- trunk/rhythmdb/rhythmdb-monitor.c (original)
+++ trunk/rhythmdb/rhythmdb-monitor.c Sat Aug 9 11:41:20 2008
@@ -265,9 +265,12 @@
g_hash_table_replace (db->priv->changed_files,
rb_refstring_new (uri),
GINT_TO_POINTER (time.tv_sec));
- if (db->priv->changed_files_id == 0)
- db->priv->changed_files_id = g_timeout_add (RHYTHMDB_FILE_MODIFY_PROCESS_TIME * 1000,
- (GSourceFunc) rhythmdb_process_changed_files, db);
+ if (db->priv->changed_files_id == 0) {
+ db->priv->changed_files_id =
+ g_timeout_add_seconds (RHYTHMDB_FILE_MODIFY_PROCESS_TIME,
+ (GSourceFunc) rhythmdb_process_changed_files,
+ db);
+ }
}
static void
Modified: trunk/rhythmdb/rhythmdb-query-model.c
==============================================================================
--- trunk/rhythmdb/rhythmdb-query-model.c (original)
+++ trunk/rhythmdb/rhythmdb-query-model.c Sat Aug 9 11:41:20 2008
@@ -483,14 +483,12 @@
rhythmdb_query_preprocess (model->priv->db, model->priv->query);
/* if the query contains time-relative criteria, re-run it periodically.
- * currently it's just every half hour, but perhaps it could be smarter.
+ * currently it's just every minute, but perhaps it could be smarter.
*/
if (rhythmdb_query_is_time_relative (model->priv->db, model->priv->query)) {
if (model->priv->query_reapply_timeout_id == 0) {
model->priv->query_reapply_timeout_id =
- g_timeout_add (1 * 60 * 1000,
- (GSourceFunc) rhythmdb_query_model_reapply_query_cb,
- model);
+ g_timeout_add_seconds (60, (GSourceFunc) rhythmdb_query_model_reapply_query_cb, model);
}
} else if (model->priv->query_reapply_timeout_id) {
g_source_remove (model->priv->query_reapply_timeout_id);
Modified: trunk/rhythmdb/rhythmdb.c
==============================================================================
--- trunk/rhythmdb/rhythmdb.c (original)
+++ trunk/rhythmdb/rhythmdb.c Sat Aug 9 11:41:20 2008
@@ -2328,11 +2328,11 @@
if (db->priv->save_timeout_id > 0) {
g_source_remove (db->priv->save_timeout_id);
}
- db->priv->save_timeout_id = g_timeout_add_full (G_PRIORITY_LOW,
- 5 * 60 * 1000,
- (GSourceFunc) rhythmdb_idle_save,
- db,
- NULL);
+ db->priv->save_timeout_id = g_timeout_add_seconds_full (G_PRIORITY_LOW,
+ 5 * 60,
+ (GSourceFunc) rhythmdb_idle_save,
+ db,
+ NULL);
break;
case RHYTHMDB_EVENT_THREAD_EXITED:
rb_debug ("processing RHYTHMDB_EVENT_THREAD_EXITED");
Modified: trunk/shell/rb-shell.c
==============================================================================
--- trunk/shell/rb-shell.c (original)
+++ trunk/shell/rb-shell.c Sat Aug 9 11:41:20 2008
@@ -2456,7 +2456,7 @@
if (shell->priv->save_db_id > 0) {
g_source_remove (shell->priv->save_db_id);
}
- shell->priv->save_db_id = g_timeout_add (10000, (GSourceFunc) idle_save_rhythmdb, shell);
+ shell->priv->save_db_id = g_timeout_add_seconds (10, (GSourceFunc) idle_save_rhythmdb, shell);
}
static void
@@ -2542,7 +2542,7 @@
rb_playlist_manager_load_playlists (shell->priv->playlist_manager);
shell->priv->load_complete = TRUE;
- shell->priv->save_playlist_id = g_timeout_add (10000, (GSourceFunc) idle_save_playlist_manager, shell);
+ shell->priv->save_playlist_id = g_timeout_add_seconds (10, (GSourceFunc) idle_save_playlist_manager, shell);
rhythmdb_start_action_thread (shell->priv->db);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]