Commits

Herbert Breunung committed 0a0c3e0

optimize after menu gen refactoring

  • Participants
  • Parent commits 4493951

Comments (0)

Files changed (2)

lib/Kephra/App.pm

 use strict;
 use warnings;
+
 use Wx;
 use Kephra::App::Window;
 use Kephra::CommandList;

lib/Kephra/App/Bar/Menu.pm

     my $menu_def = Kephra::Config::Default::mainmenu();
     die "__PACKAGE__::get got no array ref" unless ref $menu_def eq ref [];
 
-    my $bar_data = Kephra::App::Menu::assemble($menu_def);
     my $bar = Wx::MenuBar->new();
 
-    for my $menu_data (@$bar_data) {
+    for my $menu_data (@{ Kephra::App::Menu::assemble($menu_def) }) {
         next unless ref $menu_data eq ref [];
-        my ($menu, $label) = Kephra::App::Menu::compile( $menu_data );
-        $bar->Append( $menu, $label );
+        $bar->Append( Kephra::App::Menu::compile( $menu_data ) );
     }
     return $bar;
 }
 
 
 1;
-__END__
-[
-	{ ID => 'file'}
-	'file_new',
-	'file_open',
-	'file_save',
-	'file_close',
-	'',
-	'app_close_save',
-],