summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-08-12 13:44:04 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-08-12 13:44:04 +0000
commit4f768533afa7fb2342c8e77f84f3c400ffefab66 (patch)
tree7c8ac88c1b798928733bfc6e6b99c34b65f13402 /perl-install
parent40248b8f66ffb56250eb447ee0711e8e83926380 (diff)
downloaddrakx-backup-do-not-use-4f768533afa7fb2342c8e77f84f3c400ffefab66.tar
drakx-backup-do-not-use-4f768533afa7fb2342c8e77f84f3c400ffefab66.tar.gz
drakx-backup-do-not-use-4f768533afa7fb2342c8e77f84f3c400ffefab66.tar.bz2
drakx-backup-do-not-use-4f768533afa7fb2342c8e77f84f3c400ffefab66.tar.xz
drakx-backup-do-not-use-4f768533afa7fb2342c8e77f84f3c400ffefab66.zip
consolidate create_factory_menu
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/harddrake/ui.pmbin9352 -> 9154 bytes
-rw-r--r--perl-install/ugtk.pm12
2 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm
index 0848510e1..29453ef17 100644
--- a/perl-install/harddrake/ui.pm
+++ b/perl-install/harddrake/ui.pm
Binary files differ
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);