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/logdrake | |
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/logdrake')
-rwxr-xr-x | perl-install/standalone/logdrake | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake index 94315750a..8ad314f0f 100755 --- a/perl-install/standalone/logdrake +++ b/perl-install/standalone/logdrake @@ -72,20 +72,23 @@ my $cal_butt = gtksignal_connect(Gtk3::CheckButton->new(N("Show only for the sel ### menus definition # the menus are not shown # but they provides shiny shortcut like C-q (Broken: FIXME) -my @menu_items = ( - { path => N("/_File"), item_type => '<Branch>' }, - { path => N("/File/_New"), accelerator => N("<control>N") }, - { path => N("/File/_Open"), accelerator => N("<control>O") }, - { path => N("/File/_Save"), accelerator => N("<control>S"), callback => \&save }, - { path => N("/File/Save _As") }, - { path => N("/File/-"), item_type => '<Separator>' }, - { path => N("/File/_Quit"), accelerator => N("<control>Q"), callback => \&quit }, - { path => N("/_Options"), item_type => '<Branch>' }, - { path => N("/Options/Test") }, - { path => N("/_Help"), item_type => '<LastBranch>' }, - { path => N("/Help/_About...") } - ); -my $_menubar = $::isEmbedded ? create_factory_menu($my_win->{rwindow}, @menu_items) : undef; +if ($::isEmbedded) { + my $ui = gtknew('UIManager', actions => [ + # [name, stock_id, value, label, accelerator, tooltip, callback] + [ 'FileMenu', undef, N("_File") ], + [ 'Save', undef, N("_Quit"), N("<control>Q"), undef, \&save ], + [ 'Quit', undef, N("_Quit"), N("<control>Q"), undef, \&quit ], + ], + string => qq(<ui> + <menubar name='MenuBar'> + <menu action='FileMenu'> + <menuitem action='Save'/> + <menuitem action='Quit'/> + </menu> + </menubar> +</ui>)); + $my_win->{rwindow}->add_accel_group($ui->get_accel_group); +} ######### menus end |