Re: Adding tooltips to menu entries defined in an XML file?
- From: Pierre Sarrazin <sarrazip sympatico ca>
- To: gtkmm-list gnome org
- Subject: Re: Adding tooltips to menu entries defined in an XML file?
- Date: Sun, 22 Jan 2006 18:25:17 -0500
Dixit Murray Cumming (2006-01-22 16:21):
> On Sat, 2006-01-21 at 21:39 -0500, Pierre Sarrazin wrote:
> > Hi. I am using Gtk::UIManager::add_ui_from_file() to load the
> > menubar and toolbar from an XML file. The resulting menu entries
> > do not come with tooltips. Is it possible to add tooltips in
> > the <menuitem> tags in the XML file (in a way that works with
> > GNU Gettext)?
>
> The ui XML does not contain any human-readable text. I guess that would
> be provided in the call to Gtk::Action::create(). For instance:
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Action.html#e2555a23dc41f5b01d97db7ffad573da
>
> (Those functions need doxygen reference documentation.)
>
> > If not, is there a way to associate internationalized tooltips to
> > action names? Thanks.
>
> You can then use _() on the text that you give to create().
You're right. That worked.
The tooltips are now displayed when the mouse cursor goes over the
toolbar buttons. I would now like to have the tooltips for the menu
entries appear in a status bar when the mouse cursor goes over those
entries. I vaguely remember that this was partly automated by the
GNOME API, so I'm now looking for a way to reproduce that behavior
with gtkmm. (I've added a Gtk::Statusbar to the main window.)
Any pointers?
Thanks.
--
Pierre Sarrazin <sarrazip at sympatico dot ca>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]