diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-03 15:04:02 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-24 23:53:09 +0100 |
commit | ca6a026a23f723a74dab9a7d3afc11c2a43c01f2 (patch) | |
tree | f0f6b7ee52cb585b95ffdadaa435cb7b4e6fd692 /perl-install/standalone/drakboot | |
parent | 32dfc90e18b52dc5bc3928a46c5e946158d7aee1 (diff) | |
download | drakx-ca6a026a23f723a74dab9a7d3afc11c2a43c01f2.tar drakx-ca6a026a23f723a74dab9a7d3afc11c2a43c01f2.tar.gz drakx-ca6a026a23f723a74dab9a7d3afc11c2a43c01f2.tar.bz2 drakx-ca6a026a23f723a74dab9a7d3afc11c2a43c01f2.tar.xz drakx-ca6a026a23f723a74dab9a7d3afc11c2a43c01f2.zip |
convert to UIManager
Diffstat (limited to 'perl-install/standalone/drakboot')
-rwxr-xr-x | perl-install/standalone/drakboot | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index e9f6cf348..375b0b4d1 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -85,10 +85,20 @@ sub run_boot_window { $window->set_border_width(2); ### menus definition # the menus are not shown but they provides shiny shortcut like C-q - my @menu_items = ([ N("/_File"), undef, undef, undef, '<Branch>' ], - [ N("/File/_Quit"), N("<control>Q"), sub { ugtk3->exit(0) }, undef, '<Item>' ], - ); - create_factory_menu($w->{rwindow}, @menu_items); + my $ui = gtknew('UIManager', actions => [ + # [name, stock_id, value, label, accelerator, tooltip, callback] + [ 'FileMenu', undef, N("_File") ], + [ 'Quit', undef, N("_Quit"), N("<control>Q"), undef, sub { ugtk3->exit(0) } ], + ], + string => qq(<ui> + <menubar name='MenuBar'> + <menu action='FileMenu'> + <menuitem action='Quit'/> + </menu> + </menubar> +</ui>)); + $w->{rwindow}->add_accel_group($ui->get_accel_group); + ######### menus end } gtkadd($window, gtknew('VBox', children => [ |