Re: Accel Paths not being created?



On Fri, 2005-12-02 at 18:01 +0200, Daniel Pekelharing wrote:
Some further experimentation:


GtkWidget *menu, *file, *test;

menu = gtk_menu_new();
file = gtk_menu_item_new_with_label("File");
gtk_menu_item_set_submenu(GTK_MENU_ITEM(file), menu);

test = gtk_menu_item_new_with_label("test");
gtk_menu_shell_append(GTK_MENU_SHELL(menu), test);
gtk_menu_item_set_accel_path(GTK_MENU_ITEM(test), "<test>/File/test");

if (gtk_accel_map_lookup_entry("<test>/File/test", NULL))
      printf("Accel path found!\n");
else    printf("Accel path not found\n");


Is there any reason the call to gtk_accel_map_lookup_entry should be
returning false?
As thats what its doing...

In the meantime I have solved this problem,
I had not been assigning a GtkAccelGroup to the top menu, like so:

gtk_menu_set_accel_group(GTK_MENU(menu), accel_group);

It works fine thereafter..
-- 
Daniel Pekelharing
<legendstar gmail com>




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