summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakfloppy
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-11-03 15:04:02 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-11-24 23:53:09 +0100
commitca6a026a23f723a74dab9a7d3afc11c2a43c01f2 (patch)
treef0f6b7ee52cb585b95ffdadaa435cb7b4e6fd692 /perl-install/standalone/drakfloppy
parent32dfc90e18b52dc5bc3928a46c5e946158d7aee1 (diff)
downloaddrakx-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/drakfloppy')
-rwxr-xr-xperl-install/standalone/drakfloppy18
1 files changed, 13 insertions, 5 deletions
diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy
index 9154d40a3..efb2104df 100755
--- a/perl-install/standalone/drakfloppy
+++ b/perl-install/standalone/drakfloppy
@@ -43,11 +43,19 @@ unless ($::isEmbedded) {
### menus definition
# the menus are not shown but they provides shiny shortcut like C-q
- create_factory_menu($window->{rwindow}, (
- { path => N("/_File"), item_type => '<Branch>' },
- { path => N("/File/_Quit"), accelerator => N("<control>Q"), callback => sub { ugtk3->exit(0) } },
- )
- );
+ 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>));
+ $window->{rwindow}->add_accel_group($ui->get_accel_group);
}