How do you remove a Gdl.DockItem from Gdl.Dock? - gtk

I'm using the libgdl in Python using GObject introspection. Does anybody know how to remove a Gdl.DockItem from a Gdl.Dock? I've tried:
dock.remove(dockitem)
and
dock.master.remove(dockitem)
And I've also tried destroying the dockitem and it's child widget. Can't seem to find an example of where this is done.

Figured it out. I was looking for the unbind() method. So, if somebody stumbles upon this, it looks a little like this:
dockitem.unbind()
widget.destroy() # where widget was originally added to dock item

Related

One page, multiple contexts ? Is that possible?

Here is my problem: I have an app that has 2 list view.builders. You can imagine the scenario.
within the Stateful widget, we have:
Widget build(ct)
{
and this returns a column widget that has TWO list views.
The problem I have is that one list view changes (or should change) the items in another list view.
So what are my options? To create two Widget build(ct1) and Widget build(ct2)??
Do we do that? How can I communicate changes to ct1?
Oh my goodness, I've tried a lot, even setState etc... nothing works.. Perhaps could someone tell me how I can invoke the page to be refreshed?? That would work.
I keep on finding the answers myself - but for anyone who has this issue, Flutter apparently has evolved... if you are using the latest version, I really believe that SetState() function should work for you.. you just need to use it in the right place.

How can I take something in then out in Eclipse?

I have been looking for a way to pull something out of my main method into a outer method then plop the output of the outer method back into the main method (this is in Eclipse).
I have been looking for a strangely long time for a answer for this but everything seems way more advanced than what I am looking for. If anyone can help it would be a great help.
You want the extract method refactoring. Select the code block that you want move into a different method and press Shift-Ctrl-M. Or is it Ctrl-Alt-M? Can't remember right now.
And here I go giving refactorings to someone that doesn't even know what a method is....

How to programmatically change help contents in Eclipse?

I have an eclipse plugin and I would like to programmatically disable help content TOC's based on a variable I define. In a nut shell, I want to prevent some help docs from showing up in the help contents if a specific type of user is accessing the plugin.
Preferably I would like to do this in the ApplicationWorkbenchAdvisor somewhere.
One thought would be to modify the "primary" value to be false if the variable were set.
Not sure if it would work, but try using the org.eclipse.ui.activities extension point. The tutorial from Vogella tells it is possible to hide only UI elements like wizards, views and so on, but it is from 2009.. Not sure if hiding TOC is now possible. If you try it out, would be nice to give a feedback ;)

Ocaml lablgtk2 custom widget?

I've been learning Ocaml with lablgtk2 for a while and still searching for a tutorial in which describe a way to create a custom widget (I want to make this widget as a circle filled with color and some text in the center). And this custom widget can be set ~width, ~height, ~label, ~packing,... to another container (as another gtk widgets can).
unfortunately, I found no tutorial about this. I read how to make custom widget in gtk2+ and try to port into Lablgtk2 but still can't help.
Can anyone help me with this issue.
Really appreciate.
I hoped that someone would prove me wrong by answering this question, but here is what I wrote in a comment:
I asked about this to one of the
co-maintainers of lablgtk2, and the
answer is that what you want to do is
not really convenient to do in
lablgtk2 and you would be better of
doing that part in C. Sorry.

Get gtk widget name

I'm writing a GTK-Theme that is pretty dark. It works with most programs but some toolbars look pretty strange (in Bluefish and NetBeans for example).
Now I need to get the name of the toolbar widget to write a workaround.
You could use Parasite, although I never used it so I cannot say how it works. Alternatively, you can use the ever working good old way.
Do Bluefish and NetBeans even use Gtk? Not sure what you would in that case, otherwise here is a list of widgets: http://live.gnome.org/GnomeArt/Tutorials/GtkThemes.