Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-31 Thread Andrew Potter
You missed the list in your last reply. It is quoted below, and I've attached the file you sent me as well (table.txt). On Thu, Jan 31, 2013 at 4:54 PM, Ferdinand Ramirez ramirez.ferdin...@yahoo.com wrote: Attached is a working program with GtkEntry in the table. If you comment out line 21

Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Ferdinand Ramirez
I have encountered a strange error followed by a crash when I add the following object to a GtkTextView by creating a child anchor and call gtk_widget_show_all. The object that is added The object that is added to the child anchor is a GtkFrame inside which is a GtkTable and each cell of the

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Edscott Wilson
The current method for calling gtk_xx instructions is from the main thread only (i.e., that which owns the main loop context). You can do this by means of g_main_context_invoke(). Otherwise you must use the deprecated gdk_threads_enter/gdk_threads_leave mutex method. The deprecated method is

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Edscott Wilson
BTW, g_main_context_invoke() will be erratic if you do not have the main context loop running. This is common at startup, when you do all sort of gtk_xx before entering the main loop. Solution: start the loop as soon as possible in the main thread, and anything else the main thread needs to do,

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Ferdinand Ramirez
I used the gdk_threads_enter/gdk_threads_leave pair, but it did not work. It does not work even when the whole creation of the hierarchy is within the gdk_threads_enter/gdk_threads_leave pair. I am able to get it to work without using GtkEntry instead of GtkTextView if I call the function in

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Andrew Potter
On Wed, Jan 30, 2013 at 2:17 PM, Ferdinand Ramirez ramirez.ferdin...@yahoo.com wrote: However, as I pointed out, it works if I replace the GtkTextView with a GtkEntry within each cell of the table. 2013/1/30 Ferdinand Ramirez ramirez.ferdin...@yahoo.com This works fine if it is all done

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Ferdinand Ramirez
--- On Wed, 1/30/13, Andrew Potter agpot...@gmail.com wrote: If you are getting an iterator warning, you may be trying to use an invalidated GtkTextIter. Be sure to read http://developer.gnome.org/gtk3/stable/TextWidget.html I have nothing in there that modifies the buffer. I just create

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Andrew Potter
On Wed, Jan 30, 2013 at 8:11 PM, Ferdinand Ramirez ramirez.ferdin...@yahoo.com wrote: I have nothing in there that modifies the buffer. I just create the view and add it. In fact, the error comes from the line gtk_widget_show_all. If I replace this line with code to traverse the hierarchy and