[anjuta] Fix Glib-CRITICAL **: Source ID was not found when attempting to remove it
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] Fix Glib-CRITICAL **: Source ID was not found when attempting to remove it
- Date: Sun, 25 Jun 2017 12:29:01 +0000 (UTC)
commit 4a7cff6fe71ff99f08e1a68cdf4c69af36296124
Author: Sébastien Granjoux <seb sfo free fr>
Date: Sun Jun 25 14:11:49 2017 +0200
Fix Glib-CRITICAL **: Source ID was not found when attempting to remove it
In the symbol db plugin, the callback on_editor_buffer_symbols_update_timeout
was returning FALSE in some case which automatically remove the source.
In this case, we have to clear sdb_plugin->buf_update_timeout_id to indicate
that the source is removed.
In most of the case, I think it was better to return TRUE to keep checking the
buffer even if an update shouldn't be done at the moment.
plugins/symbol-db/plugin.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/symbol-db/plugin.c b/plugins/symbol-db/plugin.c
index 52d22f7..f31db20 100644
--- a/plugins/symbol-db/plugin.c
+++ b/plugins/symbol-db/plugin.c
@@ -461,7 +461,10 @@ on_editor_buffer_symbols_update_timeout (gpointer user_data)
sdb_plugin = ANJUTA_PLUGIN_SYMBOL_DB (user_data);
if (sdb_plugin->current_editor == NULL)
+ {
+ sdb_plugin->buf_update_timeout_id = 0;
return FALSE;
+ }
/* check the timer. If it's elapsed enought time since the last time the user
* typed in something, than proceed with updating, elsewhere don't do nothing
@@ -474,8 +477,10 @@ on_editor_buffer_symbols_update_timeout (gpointer user_data)
if (seconds_elapsed < TIMEOUT_SECONDS_AFTER_LAST_TIP)
return TRUE;
- return editor_buffer_symbols_update (IANJUTA_EDITOR (sdb_plugin->current_editor),
+ editor_buffer_symbols_update (IANJUTA_EDITOR (sdb_plugin->current_editor),
sdb_plugin);
+
+ return TRUE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]