Re: Clone a notebook tab?

2008-08-28 Thread Roland Roberts

Gabriele Greco wrote:


Is there a way to clone a notebook tab?  I'm writing an
application where I've laid out the tab using glade.  The tab is
for controlling a camera, and I may have multiple cameras.  Each
time I connect one, I'd like to clone a generic tab then reassign
data associated with the tab just like I do when the first camera
attaches.  Is there any shortcut other than writing the layout
completely in code?

Write the layout in a separate glade file and load it multiple times 
(multiple glade_xml_new(), glade_xml_get_widget()).
Except I can't create a glade file using glade-3 that doesn't have a 
toplevel.  How do you do this?  Hand-edit (blech)?  And glade_xml_new() 
takes a root widget so I was thinking I could just reference the vbox 
that contains everything for the new tab.  I'm about to try that so I 
guess I'll find out real fast if it works or not


roland

--
   PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
[EMAIL PROTECTED]6818 Madeline Court
[EMAIL PROTECTED]   Brooklyn, NY 11220

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Clone a notebook tab?

2008-08-28 Thread Roland Roberts

dhk wrote:

Roland Roberts wrote:
Is there a way to clone a notebook tab?  I'm writing an application 
where I've laid out the tab using glade.  The tab is for controlling 
a camera, and I may have multiple cameras.  Each time I connect one, 
I'd like to clone a generic tab then reassign data associated with 
the tab just like I do when the first camera attaches.  Is there any 
shortcut other than writing the layout completely in code?
I get the object out of the .glade file whenever I need to duplicate a 
widget and then add it to the container.  In your case, a notebook 
tab, the object would be probably be a vbox in the .glade file and 
your container would be the notebook you want to add it to.
I'm not quite sure how to parse that statement :-/  How do you "get the 
object out of the .glade file?"  glade_xml_new lets me specify the root 
widget which is why I was thinking of just using that to create a new 
container that I would then attach to the notebook.  Is this what you meant?


roland

--
   PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
[EMAIL PROTECTED]6818 Madeline Court
[EMAIL PROTECTED]   Brooklyn, NY 11220

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Clone a notebook tab?

2008-08-28 Thread dhk

Roland Roberts wrote:
Is there a way to clone a notebook tab?  I'm writing an application 
where I've laid out the tab using glade.  The tab is for controlling a 
camera, and I may have multiple cameras.  Each time I connect one, I'd 
like to clone a generic tab then reassign data associated with the tab 
just like I do when the first camera attaches.  Is there any shortcut 
other than writing the layout completely in code?


roland

I get the object out of the .glade file whenever I need to duplicate a 
widget and then add it to the container.  In your case, a notebook tab, 
the object would be probably be a vbox in the .glade file and your 
container would be the notebook you want to add it to.


dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Clone a notebook tab?

2008-08-27 Thread Roland Roberts
Is there a way to clone a notebook tab?  I'm writing an application 
where I've laid out the tab using glade.  The tab is for controlling a 
camera, and I may have multiple cameras.  Each time I connect one, I'd 
like to clone a generic tab then reassign data associated with the tab 
just like I do when the first camera attaches.  Is there any shortcut 
other than writing the layout completely in code?


roland

--
   PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
[EMAIL PROTECTED]6818 Madeline Court
[EMAIL PROTECTED]   Brooklyn, NY 11220

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list