Re: [anjuta-devel] GDL placeholder



Hi James,


Le 09/05/2012 08:38, James Liggett a écrit :
My latest example of this phenomenon came up over the weekend when I was
trying to get git shell to display the Status view by default. The
obvious thing to do (I think) is to tell gdl to show the dock item with
gdl_dock_show_item, but that doesn't work because non-floating docks
like the ones used for git shell views need to have a "default position"
set on them, whatever that is. So I try to call
gdl_dock_item_set_default_position only to find that it requires some
kind of "reference" object, but I have no idea what would work for this.
Giving it a pointer to the dock just gives me another critical and now I
have no idea what to do next because no one knows what the hell any of
this means.

Looking at the code, I think gdl_dock_item_show_item is not what you need. In GDL context, hiding an item means removing from the layout, so showing an item is adding it to layout which is not what you want. I think you can do what you want, by setting the page property of the dock item.

I have just seen that you have added a layer over GDL in the git plugin. So looking at your code, I think you can get it by doing the following:

GtkContainer *dock_item = g_object_get_data (G_OBJECT (anjuta_dock_pane_get_widget (ANJUTA_DOCK_PANE (git_plugin->stash_pane))), "dock-item"); g_object_set (G_OBJECT (gdl_dock_object_get_parent_object (GDL_DOCK_OBJECT (dock_item))), "page", 0, NULL);

I'm agree that it's not obvious. By the way, why AnjutaDockPane does not derive from a GdlDockItem?


Regards,

Sébastien



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