Cristiano De Michele | 1 May 01:08 2002
Picon
Picon

ferret zvt test


Hi,
I've checked out gail and at-spi modules and I used
ferret with profterm, there is no any evident problem to me,
have you done any test?
					cheers Cristiano

--

-- 
  Cristiano De Michele,
  Department of Physics,
  University "Federico II" of Naples
Chema Celorio | 1 May 02:08 2002

Re: [gnome-print] gnome_printer_dialog_new


It might be something wrong inside your code that is only triggered when
linking staticaly. A stack trace would be usefull to debug this, but my
hunch is that it is not on our side, i could be wrong of course.

regards,
Chema

On Wed, 2002-04-10 at 01:50, Harsha Kodnad wrote:
> 
> Hello,
> 
> To get the GnomePrinter i am using fallowing code
> 
> dialog = gnome_printer_dilaog_new();
> printer = gnome_printer_dialog_get_printer ();
> 
> the code works fine when I link the libgnomeprint
> library dynamically but when I link it staticaly it is
> crashing ??
> Is there any solutions ???
> 
> Thanks in advance,
> 
> Regards, 
> 
> =====
> Harsha Kodnad
> 
> __________________________________________________
(Continue reading)

James Henstridge | 1 May 02:55 2002
Picon

Re: Threads !!!


Anil wrote:

>Hello !!!
>	If i happen to create a new thread using POSIX threads, how should 
>i handle the widget functions (drawing primitives) within the thread. X 
>Errors are creeping in, when i am trying to do so. Are there any tutorials 
>or docs regarding this.
>  
>
This is covered in the GTK+ FAQ at http://www.gtk.org/faq/#AEN462.

James.

--

-- 
Email: james <at> daa.com.au
WWW:   http://www.daa.com.au/~james/
Anil | 1 May 12:59 2002
Picon

Re: Threads !!!


I had no problems with gtk, when i am using them within a thread , by 
enclosing them within gdk_threads_enter and gdk_threads_leave.

But when i am using the gdk drawing functions like gdk_draw_line, 
gdk_draw_pixmap ...., i am gettting sync errors. How can i overcome this ?

Regards,
Anil

On Wed, 1 May 2002, James Henstridge wrote:

> Anil wrote:
> 
> >Hello !!!
> >	If i happen to create a new thread using POSIX threads, how should 
> >i handle the widget functions (drawing primitives) within the thread. X 
> >Errors are creeping in, when i am trying to do so. Are there any tutorials 
> >or docs regarding this.
> >  
> >
> This is covered in the GTK+ FAQ at http://www.gtk.org/faq/#AEN462.
> 
> James.
> 
> 

--

-- 
Chris | 1 May 13:39 2002
Picon

Re: Threads !!!


Anil wrote:

> I had no problems with gtk, when i am using them within a thread , by 
> enclosing them within gdk_threads_enter and gdk_threads_leave.
> 
> But when i am using the gdk drawing functions like gdk_draw_line, 
> gdk_draw_pixmap ...., i am gettting sync errors. How can i overcome this ?

How about having a single "worker" thread that does all the updating, and
all the other threads in your program sent it requests with the instructions
about what needs to be done and the data to do it? Possible implementation:

- have a queue (call it ui_event_queue) protected by a mutex
   (ui_event_mutex)
- the worker thread locks the queue, pulls off the first entry, unlocks the
   queue and processes the entry.
- the other threads lock the queue, add their request to the end then unlock
   the queue

That way you only ever have a single thread changing the ui.

Chris
--

-- 
=[ http://www.starforge.co.uk/ ]===[ Explorer2260 Lead Designer and Coder. ]
=[ Public key: ]===================[ http://www.starforge.co.uk/pubkey.txt ]
=[ Quod nesciunt eos interficiet. ]
Soeren Sandmann | 1 May 14:56 2002
Picon
Picon

Re: Threads !!!


Chris <chris <at> starforge.co.uk> writes:

> How about having a single "worker" thread that does all the updating, and
> all the other threads in your program sent it requests with the instructions
> about what needs to be done and the data to do it? Possible implementation:

In fact, the glib mainloop has good support for this design. Just use
g_idle_add (function_that_does_updating, data). This way only the
thread that runs the mainloop will do any updating. You don't even
have to worry about locking, as g_idle_add() will do the necessary
locking for you.
Chris | 1 May 15:12 2002
Picon

Re: Threads !!!


Soeren Sandmann wrote:

> In fact, the glib mainloop has good support for this design. Just use
> g_idle_add (function_that_does_updating, data). This way only the
> thread that runs the mainloop will do any updating. You don't even
> have to worry about locking, as g_idle_add() will do the necessary
> locking for you.

Thanks for that, I didn't know about that (I've never written a 
multithreaded GTK program where several threads need access to the UI)

Chris
--

-- 
=[ http://www.starforge.co.uk/ ]===[ Explorer2260 Lead Designer and Coder. ]
=[ Public key: ]===================[ http://www.starforge.co.uk/pubkey.txt ]
=[ Quod nesciunt eos interficiet. ]
Anil | 1 May 15:41 2002
Picon

Re: Threads !!!


draw ()
{
	gdk_draw_line (....)
}

thread_func ()
{
	/* Here the program reads data from a file descriptor and i need 
           to plot the data */

	draw (...)
}

X Errors are creeping in, when i am using the above code. 
Though i kept gdk_threads_enter() and gdk_threads_leave() before and after 
draw(), there is no effect. 

In order to prevent this X errors

1. I have tried using pipes, where i send the data to be plotted from the 
thread and i placed the draw () function as an argument to the g_idle_add 
(). Now the draw () function looks like

	gdk_idle_add (draw, ...)	

	draw (..)
	{
		select (..); /* Waiting for the data to be plotted */
		read (..);
(Continue reading)

James Henstridge | 1 May 17:24 2002
Picon

Re: Threads !!!


Anil wrote:

>I had no problems with gtk, when i am using them within a thread , by 
>enclosing them within gdk_threads_enter and gdk_threads_leave.
>
>But when i am using the gdk drawing functions like gdk_draw_line, 
>gdk_draw_pixmap ...., i am gettting sync errors. How can i overcome this ?
>  
>
Do you hold the thread lock while calling the drawing functions?

James.

--

-- 
Email: james <at> daa.com.au
WWW:   http://www.daa.com.au/~james/
Anil | 1 May 17:14 2002
Picon

Re: Threads !!!


Are you referring to gdk_threads_mutex ?. 

What would be the use of a thread lock here

On Wed, 1 May 2002, James Henstridge wrote:

> 
> Anil wrote:
> 
> >I had no problems with gtk, when i am using them within a thread , by 
> >enclosing them within gdk_threads_enter and gdk_threads_leave.
> >
> >But when i am using the gdk drawing functions like gdk_draw_line, 
> >gdk_draw_pixmap ...., i am gettting sync errors. How can i overcome this ?
> >  
> >
> Do you hold the thread lock while calling the drawing functions?
> 
> James.
> 
> 

--

-- 

Gmane