diff libgui/src/m-editor/file-editor.cc @ 18830:c199304dfb2a gui-release

handling qscintilla internal shortcuts and commands depending on qsci version * file-editor.cc (request_delete_start_word, request_delete_end_word, request_delete_start_line, request_delete_end_line, request_delete_line, request_copy_line, request_cut_line, request_duplicate_selection, request_transpose_line, request_comment_selected_text, request_lower_case): use constants from QsciScintillaBase and not from QsciCommand * octave-qscintilla.cc (constructor): if qscintilla is not version 2.6, search the commands for which the shortcuts has to be disabled by the shortcut itself, otherwise use the find () function; more shortcuts are disabled because the gui takes care of them * main-window.cc (construct_file_menu): add common menu into editor menu only when qscintilla is available
author Torsten <ttl@justmail.de>
date Fri, 25 Apr 2014 06:40:21 +0200
parents 777281eeb3d4
children 86eca5d178a6
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc
+++ b/libgui/src/m-editor/file-editor.cc
@@ -707,55 +707,55 @@
 file_editor::request_delete_start_word (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::DeleteWordLeft);
+                                QsciScintillaBase::SCI_DELWORDLEFT);
 }
 void
 file_editor::request_delete_end_word (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::DeleteWordRight);
+                                QsciScintillaBase::SCI_DELWORDRIGHT);
 }
 void
 file_editor::request_delete_start_line (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::DeleteLineLeft);
+                                QsciScintillaBase::SCI_DELLINELEFT);
 }
 void
 file_editor::request_delete_end_line (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::DeleteLineRight);
+                                QsciScintillaBase::SCI_DELLINERIGHT);
 }
 void
 file_editor::request_delete_line (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::LineDelete);
+                                QsciScintillaBase::SCI_LINEDELETE);
 }
 void
 file_editor::request_copy_line (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::LineCopy);
+                                QsciScintillaBase::SCI_LINECOPY);
 }
 void
 file_editor::request_cut_line (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::LineCut);
+                                QsciScintillaBase::SCI_LINECUT);
 }
 void
 file_editor::request_duplicate_selection (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::SelectionDuplicate);
+                                QsciScintillaBase::SCI_SELECTIONDUPLICATE);
 }
 void
 file_editor::request_transpose_line (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::LineTranspose);
+                                QsciScintillaBase::SCI_LINETRANSPOSE);
 }
 void
 file_editor::request_comment_selected_text (bool)
@@ -773,13 +773,13 @@
 file_editor::request_upper_case (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::SelectionUpperCase);
+                                QsciScintillaBase::SCI_UPPERCASE);
 }
 void
 file_editor::request_lower_case (bool)
 {
   emit fetab_scintilla_command (_tab_widget->currentWidget (),
-                                QsciCommand::SelectionLowerCase);
+                                QsciScintillaBase::SCI_LOWERCASE);
 }
 void
 file_editor::request_indent_selected_text (bool)