Sorry, forgot to change the subject line last time.

Hi Christian,

Thanks for the reply.  The exact problem I am facing is the destruction of
the Socket & Plug widgets.
Currently what I am doing is:
- While creating the plugin, I am creating the plug using gtk_plug_new(). I
am adding my plugin windows & controls to the plug.
- At the time of deletion of plugin, I am freeing all the resources
allocated during the usage of plugin.
- At this time, I am calling for gtk_widget_destroy(plug).
- The problem is at this point. After the last step, the plug is destroyed,
but what about the socket created for holding this plug? I am catching the
"plug-removed" signal, but that callback is never getting called.

As a result, according to me, the socket created is getting accumulated. So,
if I open 5 plugins, I am accumulating (leaking) 5 socket widgets. So, I
wanted to know, whether there is any special way of deleting the plug, so
that "plug-removed" signal is automatically invoked. Also, how do we destroy
socket by calling gtk_widget_destroy(socket) call?

I was going through gtk+ code and I found there are functions
"_gtk_plug_remove_from_socket()" & "gtk_plug_get_socket_window()". Can I use
these functions as I didnt found these functions reference anywhere in Gtk
documentation? If I can, should I use these functions to complete the
destruction process? Please let me the exact protocol.

Thanks in advance,
Ravi Phaneendra K


On Wed, Apr 15, 2009 at 5:30 PM, <gtk-devel-list-requ...@gnome.org> wrote:

> Send gtk-devel-list mailing list submissions to
>        gtk-devel-list@gnome.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://mail.gnome.org/mailman/listinfo/gtk-devel-list
> or, via email, send a message with subject or body 'help' to
>        gtk-devel-list-requ...@gnome.org
>
> You can reach the person managing the list at
>        gtk-devel-list-ow...@gnome.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gtk-devel-list digest..."
>
>
> Today's Topics:
>
>   1. Unplugging GtkPlug from GtkSocket (Ravi Kasibhatla)
>   2. Re: Unplugging GtkPlug from GtkSocket (Christian Dywan)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 15 Apr 2009 00:19:38 +0530
> From: Ravi Kasibhatla <kasibhatla.r...@gmail.com>
> Subject: Unplugging GtkPlug from GtkSocket
> To: gtk-devel-list@gnome.org
> Message-ID:
>        <1a8a91a70904141149x55a73032rfe8acaa40f375...@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all,
>
> I am creating a plugin for a browser based on webkit, using the xembed
> protocol i.e. using GtkSocket & GtkPlug. I have been successfully able to
> create the plugin & show the content required on the plugin window, but I
> am
> facing problem when I try to delete the plugin. At the time of deletion of
> plugin, I want to delete the plug created, so as to free the resources
> allocated to the plug while creating plugin. Can anyone tell me how to do
> it, including how to do the cleanup on the GtkSocket side created in the
> browser?
>
> It would be of great help if anyone could let me know on this ASAP, as I am
> in urgent need of this information. I tried to find any resource telling
> more on XEmbed protocol usage and the cleanup process when using XEmbed
> protocol on the web, but couldn't get anything concrete help on this topic.
>
> Thanks & Regards,
> Ravi Phaneendra K
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.gnome.org/archives/gtk-devel-list/attachments/20090415/b049cf81/attachment.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Wed, 15 Apr 2009 01:59:32 +0200
> From: Christian Dywan <christ...@imendio.com>
> Subject: Re: Unplugging GtkPlug from GtkSocket
> To: gtk-devel-list@gnome.org
> Message-ID: <20090415015932.225cb...@imendio.com>
> Content-Type: text/plain; charset=US-ASCII
>
> Am Wed, 15 Apr 2009 00:19:38 +0530
> schrieb Ravi Kasibhatla <kasibhatla.r...@gmail.com>:
>
> > Hi all,
> >
> > I am creating a plugin for a browser based on webkit, using the xembed
> > protocol i.e. using GtkSocket & GtkPlug. I have been successfully
> > able to create the plugin & show the content required on the plugin
> > window, but I am facing problem when I try to delete the plugin. At
> > the time of deletion of plugin, I want to delete the plug created, so
> > as to free the resources allocated to the plug while creating plugin.
> > Can anyone tell me how to do it, including how to do the cleanup on
> > the GtkSocket side created in the browser?
> >
> > It would be of great help if anyone could let me know on this ASAP,
> > as I am in urgent need of this information. I tried to find any
> > resource telling more on XEmbed protocol usage and the cleanup
> > process when using XEmbed protocol on the web, but couldn't get
> > anything concrete help on this topic.
> >
> > Thanks & Regards,
> > Ravi Phaneendra K
>
> Hey Ravi,
>
> so what problem are you facing exactly? From what I understand you have
> an nsplugin that creates a socket and loads a plug from somewhere.
> Please correct me if I misunderstand the scenario. And I assume you are
> in charge of the socket and plug code. So both are GtkWidgets which
> have the usual finalize, dispose and destroy, plus the "plug-removed"
> signal on GtkSocket.
>
> I haven't used this in a while since it is somewhat messy, so it would
> be good if you could provide more context about what you are doing and
> what is not working.
>
> Yours,
>    Christian
>
>
> ------------------------------
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
>
> End of gtk-devel-list Digest, Vol 60, Issue 24
> **********************************************
>
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to