Re: status bars and strangeness

"Nickolay V. Shmyrev" <[email protected]> Fri, 08 Jul 2005 05:20:42 +0400
Newsgroups gmane.comp.gnome.components
Message-ID <[email protected]>
=F7 =FE=D4=D7, 07/07/2005 =D7 15:00 +0800, Davyd Madeley =D0=C9=DB=C5=D4:
> 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 toolbar=
s
> into their respective windows. One of the windows is trying to add a
> status bar.
>=20

Me too, we are almost alone here :)


> The XML for this controls UI element looks something like this:
>         <status>
>                 <control name=3D"appbar"/>
>         </status>
>=20
> And the code looks something like:
>                 bonobo_ui_util_set_ui (ui_component,
>                                        GLADE_DIR,
>                                        "mgiva-map.xml",
>                                        "mgiva-map",
>                                        NULL);
>=20
>                 /* add the GnomeAppBar */
>                 mgiva_map->appbar =3D gnome_appbar_new (TRUE, TRUE,    =
                             GNOME_PREFERENCES_NEVER);
>                 ctrl =3D bonobo_control_new (mgiva_map->appbar);
>                 gtk_widget_show (mgiva_map->appbar);
>=20
>                 bonobo_ui_component_object_set (ui_component,
>                                 "/status/appbar",
>                                 BONOBO_OBJREF (ctrl),
>                                 NULL);
>                 bonobo_object_unref (BONOBO_OBJECT (ctrl));
>=20
> 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.
>=20
> Thoughts? Am I doing something wrong, is this expected behaviour, or is
> this a bug somewhere in libbonoboui?
>=20

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=3D"main" it overrides the standard bar. Otherwise it gets packed int=
o
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
>=20
> _______________________________________________
> gnome-components-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/gnome-components-list