GTK gurus: I'm researching how to beef up the tooltips in RawStudio.
I've figured out how to add some of them, but adding tooltips for menu
items is less obvious. Can someone throw a hint as to what else I need
to do to get tooltips to show up for menus?

In rs-actions.c, where the menus are defined, I attempted to fill in
the NULL placeholders for tooltips, with a tooltip string:

GtkActionGroup *
rs_get_core_action_group(RS_BLOB *rs)
{
        /* FIXME: This should be static */
        GtkActionEntry actionentries[] = {
        { "FileMenu", NULL, _("_File"), NULL, _("THIS IS A TOOLTIP"),
ACTION_CB(file_menu) },
        { "EditMenu", NULL, _("_Edit"), NULL,  _("THIS IS A TOOLTIP"),
ACTION_CB(edit_menu) },
        { "PhotoMenu", NULL, _("_Photo"), NULL,  _("THIS IS A TOOLTIP"),
ACTION_CB(photo_menu) },
        { "PriorityMenu", NULL, _("_Set Priority") },
        { "WhiteBalanceMenu", "NULL", _("_White Balance") },
        { "ViewMenu", NULL, _("_View") },
        { "BatchMenu", NULL, _("_Batch"), NULL, NULL, ACTION_CB(batch_menu) },
        { "HelpMenu", NULL, _("_Help") },
        { "PreviewPopup", NULL, NULL, NULL, NULL, ACTION_CB(preview_popup) },

        /* File menu */
        { "Open", GTK_STOCK_OPEN, _("_Open Directory"), "<control>O",
_("THIS IS A TOOLTIP"), ACTION_CB(open) },
        { "QuickExport", GTK_STOCK_SAVE, _("_Quick Export"), "<control>S",
_("THIS IS A TOOLTIP"), ACTION_CB(quick_export) },
        { "ExportAs", GTK_STOCK_SAVE_AS, _("_Export As"),
"<control><shift>S", NULL, ACTION_CB(export_as) },
        { "ExportToGimp", GTK_STOCK_EXECUTE, _("_Export to Gimp"),
"<control>G", NULL, ACTION_CB(export_to_gimp) },
        { "Reload", GTK_STOCK_REFRESH, _("_Reload directory"), "<control>R",
NULL, ACTION_CB(reload) },
        { "DeleteFlagged", GTK_STOCK_DELETE, _("_Delete flagged photos"),
"<control><shift>D", NULL, ACTION_CB(delete_flagged) },
        { "Quit", GTK_STOCK_QUIT, _("_Quit"), "<control>Q", NULL, 
ACTION_CB(quit) },



Thanks for any hints people can offer,
 - Erik

_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev

Reply via email to