Re: status bars and strangeness



В Чтв, 07/07/2005 в 15:00 +0800, Davyd Madeley пишет:
> In a bonobo based app I'm working on. A number of windows (let's call
> them MGivaComponent windows) are created by a shell and bonobo controls
> are placed in them. These bonobo controls are merging menus and toolbars
> into their respective windows. One of the windows is trying to add a
> status bar.
> 

Me too, we are almost alone here :)


> The XML for this controls UI element looks something like this:
>         <status>
>                 <control name="appbar"/>
>         </status>
> 
> And the code looks something like:
>                 bonobo_ui_util_set_ui (ui_component,
>                                        GLADE_DIR,
>                                        "mgiva-map.xml",
>                                        "mgiva-map",
>                                        NULL);
> 
>                 /* add the GnomeAppBar */
>                 mgiva_map->appbar = gnome_appbar_new (TRUE, TRUE,                                 GNOME_PREFERENCES_NEVER);
>                 ctrl = bonobo_control_new (mgiva_map->appbar);
>                 gtk_widget_show (mgiva_map->appbar);
> 
>                 bonobo_ui_component_object_set (ui_component,
>                                 "/status/appbar",
>                                 BONOBO_OBJREF (ctrl),
>                                 NULL);
>                 bonobo_object_unref (BONOBO_OBJECT (ctrl));
> 
> Now, the appbar gets added as you might expect, however even though it
> is the only element in the status bar (as this is the only
> MGivaComponent window to have a status bar) the GnomeAppBar is not
> expanded to fill the width and the text portion of the appbar is about
> 2mm wide.
> 
> Thoughts? Am I doing something wrong, is this expected behaviour, or is
> this a bug somewhere in libbonoboui?
> 

I know it's badly documented, but isn't it what you are searching?

from docs/ui-xml.txt:

<control> - a control to be inserted into the status area. If
name="main" it overrides the standard bar. Otherwise it gets packed into
the right side of the status area.

If you don't want to be so small, but still want to have status text,
proper selection of size request on control side may have sense

> --d
> 
> _______________________________________________
> gnome-components-list mailing list
> gnome-components-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-components-list




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