Commits

Herbert Breunung committed 1fcabe5

new cmd list API starts to show off

Comments (0)

Files changed (5)

lib/Kephra/App.pm

 Kephra::CommandList::register_cmd({
 	'app-close-save' => {
 		sub => 'Kephra::API::app()->close_save()',
-		label => 'Exit', keys  => 'Alt + Q',
+		label => 'Exit', keys  => 'alt + q',
 		help => ''},
 });
 

lib/Kephra/App/Bar/Document.pm

 package Kephra::App::Bar::Document;
 our @ISA = 'Wx::AuiNotebook';
 
-Kephra::CommandList::register_cmd_namespace('doc');
-Kephra::CommandList::register_switch_var('Kepra::API::docbar');
+Kephra::CommandList::register_cmd_namespace('document');
+Kephra::CommandList::register_switch_var('Kephra::API::docbar');
 Kephra::CommandList::register_cmd({
-	'-select-left'    => { sub => '$_->select_page_left()', label => 'Previous Tab',
-						help => ''},
-	'-select-right'   => { sub => '$_->select_page_right()', label => 'Next Tab',
-						help => ''},
-	'-select-leftmost'=> { sub => '$_->select_page_leftmost()', label => 'First Tab',
-						help => ''},
-	'-select-rightmost' => { sub => '$_->select_page_rightmost()', label => 'Last Tab',
-						help => ''},
-	'-move-left'      => { sub => '$_->move_page_left()', label => 'Move Left',
-						help => ''},
-	'-move-right'     => { sub => '$_->move_page_right()', label => 'Move Right',
-						help => ''},
-	'-move-leftmost'  => { sub => '$_->move_page_leftmost()', label => 'Move Leftmost',
-						help => ''},
-	'-move-rightmost' => { sub => '$_->move_page_rightmost()', label => 'Move Rightmost',
-						help => ''},
+	'-select-left' => { 
+		sub => '$_->select_page_left()', label => 'Previous Tab',keys  => 'ctrl + pgup', 
+		help => ''},
+	'-select-right' => {
+		sub => '$_->select_page_right()',label => 'Next Tab',keys  => 'ctrl + pgdown',
+		help => ''},
+	'-select-leftmost'=> {
+		sub => '$_->select_page_leftmost()',label => 'First Tab',keys  => 'ctrl + shift + pgup',
+		help => ''},
+	'-select-rightmost' => {
+		sub => '$_->select_page_rightmost()',label => 'Last Tab',keys  => 'ctrl + shift + pgdown',
+		help => ''},
+	'-move-left' => {
+		sub => '$_->move_page_left()',label => 'Move Left', keys  => 'alt + pgup',
+		help => ''},
+	'-move-right' => {
+		sub => '$_->move_page_right()',label => 'Move Right', keys  => 'alt + pgdown',
+		help => ''},
+	'-move-leftmost'  => {
+		sub => '$_->move_page_leftmost()',label => 'Move Leftmost', keys  => 'alt + shift + pgup',
+		help => ''},
+	'-move-rightmost' => {
+		sub => '$_->move_page_rightmost()',label => 'Move Rightmost', keys  => 'alt + shift + pgdown',
+		help => ''},
 });
 
 

lib/Kephra/App/Panel/Editor.pm

 	my $doc = Kephra::DocumentStash::doc_by_anything(shift);
 	active_docbar()->raise_page( $doc->{panel} ) if $doc;
 }
-sub select_tab_leftmost {active_docbar()->select_page_leftmost }
-sub select_tab_rightmost{active_docbar()->select_page_rightmost }
-sub select_tab_left     {active_docbar()->select_page_left }
-sub select_tab_right    {active_docbar()->select_page_right }
-sub move_tab_leftmost   {active_docbar()->move_page_leftmost }
-sub move_tab_rightmost  {active_docbar()->move_page_rightmost }
-sub move_tab_left       {active_docbar()->move_page_left }
-sub move_tab_right      {active_docbar()->move_page_right }
 
 sub active_title {
 	my $nb = active_docbar();

lib/Kephra/CommandList.pm

 		else {
 			$call = $data->{'source'}.'::'.$call if index($call,'::') == -1;
 		}
-print $cmd," $call \n";
 		$data->{'coderef'} = eval "sub { $call }";
 	}
 }

lib/Kephra/Config/Default/CommandList.pm

 			#keys  => 'Alt + Q',
 			#icon  => '',
 		#},
-		'document-select-leftmost' => {
-			sub   => 'Kephra::App::Panel::Editor::select_tab_leftmost',
-			label => '',
-			help  => '',
-			keys  => '',
-		},
-		'document-select-rightmost' => {
-			sub   => 'Kephra::App::Panel::Editor::select_tab_rightmost',
-			label => ' ',
-			help  => '',
-			keys  => '',
-		},
-		'document-select-left' => {
-			sub   => 'Kephra::App::Panel::Editor::select_tab_left',
-			label => 'Left',
-			help  => '',
-			keys  => '',
-		},
-		'document-select-right' => {
-			sub   => 'Kephra::App::Panel::Editor::select_tab_right',
-			label => 'Right',
-			help  => '',
-			keys  => '',
-		},
-		'document-move-leftmost' => {
-			sub   => 'Kephra::App::Panel::Editor::move_tab_leftmost',
-			label => ' ',
-			help  => '',
-			keys  => '',
-		},
-		'document-move-rightmost' => {
-			sub   => 'Kephra::App::Panel::Editor::move_tab_rightmost',
-			label => ' ',
-			help  => '',
-			keys  => '',
-		},
-		'document-move-left' => {
-			sub   => 'Kephra::App::Panel::Editor::move_tab_left',
-			label => ' ',
-			help  => '',
-			keys  => '',
-		},
-		'document-move-right' => {
-			sub   => 'Kephra::App::Panel::Editor::move_tab_right',
-			label => ' ',
-			help  => '',
-			keys  => '',
-		},
 		'config-global-dialog' => {
 			sub   => 'Kephra::App::Dialog::config',
 			label => 'Global Dialog',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.