Re: [gtk-list] Nuke GtkMenuFactory in favour of GtkItemFactory



On Sat, 18 Apr 1998, Tim Janik wrote:

> static void
> create_factories (GImage *image)
> {
>   GtkObject *ifactory_mbar;
>   GtkObject *ifactory_popup;
>   
>   ifactory_mbar = gtk_item_factory_new (gtk_menu_bar_get_type (),
>                                         "<Image-MenuBar>",
>                                          NULL);
>   gtk_window_add_accelerator_table (image->window,
>                                     GTK_ITEM_FACTORY (ifactory_mbar)->table);
>   gtk_item_factory_create_items (GTK_ITEM_FACTORY (ifactory_mbar),
>                                  n_menubar_entries,
>                                  menubar_entries,
>                                  image);
> 
>   ifactory_popup = gtk_item_factory_new (gtk_menu_bar_get_type (),
					   ^^^^^^^^^^^^^^^^^^^^^^^^
>                                          "<Image-Popup>",
>                                          GTK_ITEM_FACTORY (ifactory_mbar)->table);

this was meant to say:

   ifactory_popup = gtk_item_factory_new (gtk_menu_get_type (),
                                          "<Image-Popup>",
                                          GTK_ITEM_FACTORY (ifactory_mbar)->table);
                                           


>   gtk_item_factory_create_items (GTK_ITEM_FACTORY (ifactory_popup),
>                                  n_popup_entries,
>                                  popup_entries,
>                                  image);
>   image->popup = GTK_ITEM_FACTORY (ifactory_popup);
> }
> 

there are surely other bugs in this untested code example ;)

---
ciaoTJ



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