[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

need help on: Linux Gnome2 Glade Cairo callback problem

Mike Durham

10/12/2006 1:08:00 AM

Hi,
I have a Glade project main app window with a toolbar and 4
'drawingarea's, into which I draw some test images using Cairo.
After anywhere between 50 and 100 drawingarea updates I get the
following message when clicking on a toolbar button.

cairo_test_2.rb:147: warning: GRClosure invoking callback: already destroyed

Before the 50-100 drawingarea updates, the callback works fine.
Could anyone possibly tell me, or offer an opinion as to why the
callback is getting destroyed?
All I am doing is updating the drawing areas and clicking on a toolbar
button.

I use Ubuntu Linux, Gnome2, Glade2 and Cairo of course.

Thanks, Mike
4 Answers

Kouhei Sutou

10/12/2006 1:56:00 PM

0

Mike Durham

10/13/2006 2:42:00 AM

0

Kouhei Sutou wrote:
> Hi,
>
> In <452da287$1_2@news.peopletelecom.com.au>
> "need help on: Linux Gnome2 Glade Cairo callback problem" on Thu, 12 Oct 2006 10:10:05 +0900,
> Mike Durham <mdurham@people.net.au> wrote:
>
>> I have a Glade project main app window with a toolbar and 4
>> 'drawingarea's, into which I draw some test images using Cairo.
>> After anywhere between 50 and 100 drawingarea updates I get the
>> following message when clicking on a toolbar button.
>>
>> cairo_test_2.rb:147: warning: GRClosure invoking callback: already destroyed
>
> I fixed this bug in CVS.
>
> The following patch may solve this bug.
>
> --- libglade2.rb 8 Jul 2006 16:45:15 -0000 1.13
> +++ libglade2.rb 12 Oct 2006 13:50:17 -0000 1.14
> @@ -40,6 +40,11 @@
> end
>
> if signal_proc
> + @sources ||= {}
> + @sources[source.object_id] = source
> + source.signal_connect("destroy") do |object|
> + @sources.delete(object.object_id)
> + end
> case signal_proc.arity
> when 0
> sig_conn_proc.call(signal) {signal_proc.call}
>
>
> Thanks,
> --
> kou
>

Thanks Kou, your patch fixed the problem perfectly. Just out of
interest, where can I get libglade2.rb 1.14? I don't understand the CVS
thing, where is it?.
Thanks again, Mike

Kouhei Sutou

10/13/2006 2:53:00 AM

0

Hi,

2006/10/13, Mike Durham <mdurham@people.net.au>:

> Thanks Kou, your patch fixed the problem perfectly.

It's a good news. :)

> Just out of
> interest, where can I get libglade2.rb 1.14? I don't understand the CVS
> thing, where is it?.

See http://sourceforge.net/cvs/?grou....

In this case, you will type the following command:
% cvs -z3 -d:pserver:anonymous@ruby-gnome2.cvs.sourceforge.net:/cvsroot/ruby-gnome2
co -P ruby-gnome2/libglade

Thanks,
--
kou

Mike Durham

10/13/2006 5:36:00 AM

0

Kouhei Sutou wrote:
> Hi,
>
> 2006/10/13, Mike Durham <mdurham@people.net.au>:
>
>> Thanks Kou, your patch fixed the problem perfectly.
>
> It's a good news. :)
>
>> Just out of
>> interest, where can I get libglade2.rb 1.14? I don't understand the CVS
>> thing, where is it?.
>
> See http://sourceforge.net/cvs/?grou....
>
> In this case, you will type the following command:
> % cvs -z3
> -d:pserver:anonymous@ruby-gnome2.cvs.sourceforge.net:/cvsroot/ruby-gnome2
> co -P ruby-gnome2/libglade
>
> Thanks,
> --
> kou
>

Thank again Kou

Cheers, Mike