setting widget name on ItemFactory create?

I'm trying to name all the widgets in an application so that font settings
can be applied to it separately from .gtkrc-2.0.  So far I've managed to tag
most the the appropriate widgets to do this with set_name pretty easily.

The final out layers are the main menus in the menubar.  They are generated

    my $factory = new Gtk2::ItemFactory('Gtk2::MenuBar', '<main>', $accel);
    $self->{_window}->{menu_factory} = $factory;

Then a whole lot of menu declarations in an @list, which get passed to:

    $factory->create_items($self, @items);

    my $menubar = $factory->get_widget('<main>');

The MenuBar gets the right fonts, but the menus hidden within do not. :(  Is
there an easy way to either set names on ItemFactory create, or even after
the fact?



Sean Dague                                       Mid-Hudson Valley
sean at dague dot net                            Linux Users Group                       

There is no silver bullet.  Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.

Attachment: pgplBWRhxhkME.pgp
Description: PGP signature

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