summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-06-02 21:44:42 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-06-02 21:44:42 (GMT)
commitdf10d1301618658d0a9faed78b8f3e30872e52ce (patch)
tree71bf51eeba60a938b4c1b6f1aaab4f60bcb61282
parenta6f34ced4fa495a78ccc0be360233d64dbb2c6d8 (diff)
Removed all references to gdk_threads_* as calls have to be made from the main thread.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@375 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
-rw-r--r--ChangeLog9
-rw-r--r--src/gtkext/gtkbufferview.c5
-rw-r--r--src/main.c5
-rw-r--r--src/plugins/pglist.c4
-rw-r--r--src/project.c12
5 files changed, 13 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 57d6b3a..518c671 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+14-06-02 Cyrille Bagard <nocbos@gmail.com>
+
+ * src/gtkext/gtkbufferview.c:
+ * src/main.c:
+ * src/plugins/pglist.c:
+ * src/project.c:
+ Remove all references to gdk_threads_* as calls have to be made from
+ the main thread.
+
14-05-29 Cyrille Bagard <nocbos@gmail.com>
* plugins/androhelpers/Makefile.am:
diff --git a/src/gtkext/gtkbufferview.c b/src/gtkext/gtkbufferview.c
index e05fcd0..bcf7ba0 100644
--- a/src/gtkext/gtkbufferview.c
+++ b/src/gtkext/gtkbufferview.c
@@ -695,8 +695,6 @@ void gtk_buffer_view_attach_buffer(GtkBufferView *view, GBufferView *buffer, boo
view->buffer_view = buffer;
- //gdk_threads_enter();
-
/* Taille des marges */
view->line_height = g_buffer_view_get_line_height(view->buffer_view);
@@ -715,9 +713,6 @@ void gtk_buffer_view_attach_buffer(GtkBufferView *view, GBufferView *buffer, boo
gtk_widget_queue_draw(GTK_WIDGET(view));
- //gdk_flush ();
- //gdk_threads_leave();
-
}
diff --git a/src/main.c b/src/main.c
index b1d30df..618bef3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -114,10 +114,6 @@ int main(int argc, char **argv)
bindtextdomain(PACKAGE, LOCALE_DIR);
textdomain(PACKAGE);
- /* init threads */
- gdk_threads_init();
- gdk_threads_enter();
-
/* Initialisation de GTK */
g_set_prgname("Chrysalide");
setlocale (LC_ALL, "");
@@ -190,7 +186,6 @@ int main(int argc, char **argv)
/* Exécution du programme */
gtk_main();
- gdk_threads_leave();
g_db_server_stop(server);
diff --git a/src/plugins/pglist.c b/src/plugins/pglist.c
index c2a2180..9286085 100644
--- a/src/plugins/pglist.c
+++ b/src/plugins/pglist.c
@@ -310,17 +310,21 @@ void run_plugins_on_binary(GLoadedBinary *binary, PluginAction action, bool lock
{
size_t i; /* Boucle de parcours */
+ /*
if (lock)
gdk_threads_enter();
+ */
for (i = 0; i < _list.plugins_count; i++)
if (g_plugin_module_get_action(_list.plugins[i]) & action)
g_plugin_module_execute_action_on_binary(_list.plugins[i], binary, action);
+ /*
if (lock)
{
gdk_flush();
gdk_threads_leave();
}
+ */
}
diff --git a/src/project.c b/src/project.c
index fa5863a..9c4c636 100644
--- a/src/project.c
+++ b/src/project.c
@@ -324,15 +324,10 @@ void g_study_project_add_loaded_binary(GLoadedBinary *binary, GStudyProject *pro
{
size_t index; /* Indice du nouveau binaire */
- gdk_threads_enter();
-
index = g_study_project_attach_binary(project, binary);
g_panel_item_dock(G_PANEL_ITEM(project->binaries[index]->item));
- gdk_flush();
- gdk_threads_leave();
-
}
@@ -367,8 +362,6 @@ size_t g_study_project_attach_binary(GStudyProject *project, GLoadedBinary *bina
{
/* Préparation du support visuel */
- //gdk_threads_enter();
-
switch (i)
{
case BVW_BLOCK:
@@ -389,9 +382,6 @@ size_t g_study_project_attach_binary(GStudyProject *project, GLoadedBinary *bina
gtk_widget_show(view);
- //gdk_flush();
- //gdk_threads_leave();
-
loaded->views[i] = GTK_VIEW_PANEL(view);
gtk_view_panel_attach_binary(loaded->views[i], binary,
@@ -400,8 +390,6 @@ size_t g_study_project_attach_binary(GStudyProject *project, GLoadedBinary *bina
/* Intégration finale dans un support défilant */
- //gdk_threads_enter();
-
scroll = qck_create_scrolled_window(NULL, NULL);
gtk_container_add(GTK_CONTAINER(scroll), view);