Re: Re-attaching tab to notebook via "close" event


  No, basically just that if I open the program. Detach from notebook (creates separate window), re-attach to notebook (via re-parenting), then detach from notebook again, I am unable (with the same event, ie delete-event aka X/File->Close) to re-attach. Nothing happens.

It seems likely that when I re-attach something needs to be reset that re-parenting is not doing that I need to do manually, what that is I have no idea.

On Fri, Jul 12, 2013 at 9:27 AM, richard boaz <ivor boaz gmail com> wrote:
you will need to study notebooks, its tabs, how a notebook manages its children (tab names, properties, etc.) to fully understand why it behaves the way it does (your questions) since i am not privy to such details (never needed to know them myself).
only being able to reparent once sounds strange to me, this is a question of re-assignment.  why there would be a one-time limit sounds a bit strange.  perhaps the widget experts out there know something on this?  (when you say you are unable, what does that mean exactly?  what happens?  a message saying you can't reparent a second time?)

On Fri, Jul 12, 2013 at 3:22 PM, Ryan Taylor <ryta1203 gmail com> wrote:
Yes, I have done this and it works, except simply "reparenting" does not save the tab label (for example, before it might be XYZ and after I reparent back to notebook the text is the original page number. I have gotten around this by re-setting the tab label. Also, reparenting does not save the detachable property, again I have to reset this. Should re-parenting be doing this for me?

Also: I seem to be able to only reparent once. For example, if I detach, then re-attach (reparent), then detach again I am unable to re-parent.

On Fri, Jul 12, 2013 at 12:35 AM, richard boaz <ivor boaz gmail com> wrote:

connect a callback to the "delete-event" associated with the new window.  you are keeping track of which tabs are where at any given moment, so when you receive the "delete-event" callback, simply move the tabs found in that window back over to the notebook in the original window.

it is a question of intercepting the the widget destroy event on the window before GTK+ has a chance to issue destroy events for all its child widgets..  Re-parenting your notebook tabs before they are issued destroy events is key.


On Thu, Jul 11, 2013 at 8:50 AM, Ryan Taylor <ryta1203 gmail com> wrote:
If I take a page from a notebook (a tab from a notebook) and move it, it creates a window.

What I want is to take all the pages from the new window and re-insert them into the old notebook when a close event occurs (ie the X exit or File->Close).

What is the best way to accomplish this?


gtk-list mailing list
gtk-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]