ui manager for menus and tooltips



Hello,

Is there a way to enable/disable tooltips for menus created with the ui manager?

 GtkUIManager *ui;
  GtkActionGroup *actions;
GtkActionEntry *new_entries;


 ui = gtk_ui_manager_new ();
 actions = gtk_action_group_new ("Actions");

/* code that fills in new_entries goes here*/

  /* now add the actionentries to the menus */
 gtk_action_group_add_actions (actions, new_entries, menuitem_cnt, NULL);
gtk_ui_manager_insert_action_group (ui, actions, 0);


for each entry in the "new_entries" array I have something like:

  /* name, stock_id, label, accelerator, tooltip, callback */
  new_entries[menuitem_cnt].name = strdup (name);
new_entries[menuitem_cnt].stock_id = (stock_id == NULL ? NULL : strdup (stock_id));
  new_entries[menuitem_cnt].label = strdup (label);
new_entries[menuitem_cnt].accelerator = ( (accelerator == NULL || *accelerator == '\0')
                                            ? NULL : strdup (accelerator));
new_entries[menuitem_cnt].tooltip = (tooltip == NULL ? NULL : strdup (tooltip));
  new_entries[menuitem_cnt].callback = G_CALLBACK (ghid_menu_cb);
  menuitem_cnt++;

I've verified that I'm actually setting a tooltip string on several of my menu items, but no tool tip shows up when I run my program. Do I have to do something else to enable tooltips?

Thanks
-Dan



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