Mercurial > hg > octave-nkf
comparison libgui/src/m-editor/file-editor.cc @ 18920:64bd9afac22c gui-release
Add back main menu copy,paste,select all in editor
* libgui/src/m-editor/file-editor.cc, libgui/src/m-editor/file-editor.h:
(file_editor::copyClipboard): add back function from cs 86eca5d178a6.
(file_editor::pasteClipboard): add back function from cs 86eca5d178a6.
(file_editor::selectAll): add back function from cs 86eca5d178a6.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 11 May 2014 13:22:57 -0400 |
parents | 834f6e604dc3 |
children | 095fdef3d67c |
comparison
equal
deleted
inserted
replaced
18909:c23e9e29a499 | 18920:64bd9afac22c |
---|---|
1548 | 1548 |
1549 check_actions (); | 1549 check_actions (); |
1550 } | 1550 } |
1551 | 1551 |
1552 void | 1552 void |
1553 file_editor::copyClipboard () | |
1554 { | |
1555 QWidget * foc_w = focusWidget (); | |
1556 | |
1557 if (foc_w && foc_w->inherits ("octave_qscintilla")) | |
1558 { | |
1559 request_copy (true); | |
1560 } | |
1561 } | |
1562 void | |
1563 file_editor::pasteClipboard () | |
1564 { | |
1565 QWidget * foc_w = focusWidget (); | |
1566 | |
1567 if (foc_w && foc_w->inherits ("octave_qscintilla")) | |
1568 { | |
1569 request_paste (true); | |
1570 } | |
1571 } | |
1572 void | |
1573 file_editor::selectAll () | |
1574 { | |
1575 QWidget * foc_w = focusWidget (); | |
1576 | |
1577 if (foc_w && foc_w->inherits ("octave_qscintilla")) | |
1578 { | |
1579 request_selectall (true); | |
1580 } | |
1581 } | |
1582 | |
1583 void | |
1553 file_editor::set_shortcuts () | 1584 file_editor::set_shortcuts () |
1554 { | 1585 { |
1555 // File menu | 1586 // File menu |
1556 shortcut_manager::set_shortcut (_edit_function_action, "editor_file:edit_function"); | 1587 shortcut_manager::set_shortcut (_edit_function_action, "editor_file:edit_function"); |
1557 shortcut_manager::set_shortcut (_save_action, "editor_file:save"); | 1588 shortcut_manager::set_shortcut (_save_action, "editor_file:save"); |