summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@src.gnome.org>2007-09-06 20:16:10 +0000
committerEmmanuele Bassi <ebassi@src.gnome.org>2007-09-06 20:16:10 +0000
commit948be3bf553ef0c5575ffeee6d2190994b1c0677 (patch)
tree6ccb46c0a7084d2ce02a8e224e8ed44e81860f02
parent368ee6ff81f23c0729f8e7835ccfd66ed9b04d89 (diff)
downloadgnome-dictionary-948be3bf553ef0c5575ffeee6d2190994b1c0677.tar.gz
Reload the list of sources if the loader has the dirty bit set
svn path=/trunk/; revision=7683
-rw-r--r--ChangeLog6
-rw-r--r--libgdict/gdict-source-loader.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 82e4fc2..c1bcc5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-06 Emmanuele Bassi <ebassi@gnome.org>
+
+ * libgdict/gdict-source-loader.c:
+ (gdict_source_loader_has_source): Reload the sources if the
+ loader has the dirty bit set.
+
2007-09-04 Emmanuele Bassi <ebassi@gnome.org>
* src/gdict-window.c: Make sure that the word to match is not
diff --git a/libgdict/gdict-source-loader.c b/libgdict/gdict-source-loader.c
index 1b49184..75f63a5 100644
--- a/libgdict/gdict-source-loader.c
+++ b/libgdict/gdict-source-loader.c
@@ -593,5 +593,8 @@ gdict_source_loader_has_source (GdictSourceLoader *loader,
g_return_val_if_fail (GDICT_IS_SOURCE_LOADER (loader), FALSE);
g_return_val_if_fail (source_name != NULL, FALSE);
+ if (loader->priv->paths_dirty)
+ gdict_source_loader_update_sources (loader);
+
return (g_hash_table_lookup (loader->priv->sources_by_name, source_name) != NULL);
}