Re: [anjuta-devel] GDL placeholder



On 05/10/2012 02:13 PM, Sébastien Granjoux wrote:
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);
That's awfully complicated. ;) In any case, your probably right that I'm
using the wrong function here. I'll dig into it some more to see if we
can't do this in a more elegant and obvious way. If not, then I'll try
this. Thanks.

I'm agree that it's not obvious. By the way, why AnjutaDockPane does not
derive from a GdlDockItem?
I don't want AnjutaDock users to have access to low level GDL objects;
the goal with AnjutaDock was to simplify GDL for use with less
complicated scenarios. Wrapping the GdlDockItem lets me hide the
complexity of dealing with GDL directly, which is something you and I
are already too familiar with :-)

Thanks,
James



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