[libgda] Honor global connection's main context in GdaDataProxy
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Honor global connection's main context in GdaDataProxy
- Date: Wed, 25 Feb 2015 21:38:18 +0000 (UTC)
commit 46f0d1b46182085928c46d988315e1f12e49d04b
Author: Vivien Malerba <malerba gnome-db org>
Date: Wed Feb 25 22:37:20 2015 +0100
Honor global connection's main context in GdaDataProxy
libgda-ui/demos/main.c | 4 ++--
libgda/gda-data-proxy.c | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/libgda-ui/demos/main.c b/libgda-ui/demos/main.c
index 98e994e..dd26b93 100644
--- a/libgda-ui/demos/main.c
+++ b/libgda-ui/demos/main.c
@@ -796,10 +796,10 @@ main (int argc, char **argv)
if (! full_filename)
gda_connection_update_meta_store (demo_cnc, NULL, NULL);
- /* set main context for connection */
+ /* set main context for the connection */
GMainContext *context;
context = g_main_context_ref_thread_default ();
- gda_connection_set_main_context (demo_cnc, NULL, context);
+ gda_connection_set_main_context (NULL, NULL, context);
g_main_context_unref (context);
g_object_set (demo_cnc, "execution-slowdown", 1000000, NULL);
diff --git a/libgda/gda-data-proxy.c b/libgda/gda-data-proxy.c
index 336ae95..6caf027 100644
--- a/libgda/gda-data-proxy.c
+++ b/libgda/gda-data-proxy.c
@@ -3082,7 +3082,10 @@ apply_filter_statement (GdaDataProxy *proxy, GError **error)
proxy->priv->force_direct_mapping = FALSE;
goto clean_previous_filter;
}
-
+ GMainContext *ctx;
+ ctx = gda_connection_get_main_context (NULL, NULL);
+ if (ctx)
+ gda_connection_set_main_context (vcnc, NULL, ctx);
proxy->priv->filter_vcnc = vcnc;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]