diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-08-12 13:44:04 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-08-12 13:44:04 +0000 |
commit | 4f768533afa7fb2342c8e77f84f3c400ffefab66 (patch) | |
tree | 7c8ac88c1b798928733bfc6e6b99c34b65f13402 | |
parent | 40248b8f66ffb56250eb447ee0711e8e83926380 (diff) | |
download | drakx-4f768533afa7fb2342c8e77f84f3c400ffefab66.tar drakx-4f768533afa7fb2342c8e77f84f3c400ffefab66.tar.gz drakx-4f768533afa7fb2342c8e77f84f3c400ffefab66.tar.bz2 drakx-4f768533afa7fb2342c8e77f84f3c400ffefab66.tar.xz drakx-4f768533afa7fb2342c8e77f84f3c400ffefab66.zip |
consolidate create_factory_menu
-rw-r--r-- | perl-install/harddrake/ui.pm | bin | 9352 -> 9154 bytes | |||
-rw-r--r-- | perl-install/ugtk.pm | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm Binary files differindex 0848510e1..29453ef17 100644 --- a/perl-install/harddrake/ui.pm +++ b/perl-install/harddrake/ui.pm diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm index 0da69e483..4b097514f 100644 --- a/perl-install/ugtk.pm +++ b/perl-install/ugtk.pm @@ -271,6 +271,18 @@ sub create_box_with_title { sub create_hbox { gtkset_layout(gtkset_border_width(new Gtk::HButtonBox, 3), $_[0] || 'spread') } +sub create_factory_menu_ { + my ($type, $name, $window, @menu_items) = @_; + print "TOTO - $type - $name - $window - @menu_items - \n\n"; + my $widget = new Gtk::ItemFactory($type, $name, my $accel_group = new Gtk::AccelGroup); + use Data::Dumper; print "\n\nMenu =", Dumper(\@menu_items),"\n\n"; + $widget->create_items(@menu_items); + $window->add_accel_group($accel_group); #$accel_group->attach($main_win); + $widget->get_widget($name); # return menu bar +} + +sub create_factory_menu { create_factory_menu_('Gtk::MenuBar', '<main>', @_) } + sub create_menu { my $title = shift; my $w = new Gtk::MenuItem($title); |