Selaa lähdekoodia

TextEditor: Add search-related actions to the text editor context menu

Using the new GTextEditor::add_custom_context_menu_action() mechanism.

Fixes #478.
Andreas Kling 5 vuotta sitten
vanhempi
commit
d88c40568f
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      Applications/TextEditor/TextEditorWidget.cpp

+ 4 - 0
Applications/TextEditor/TextEditorWidget.cpp

@@ -92,6 +92,10 @@ TextEditorWidget::TextEditorWidget()
         m_find_textbox->set_focus(true);
         m_find_textbox->set_focus(true);
     });
     });
 
 
+    m_editor->add_custom_context_menu_action(*m_find_action);
+    m_editor->add_custom_context_menu_action(*m_find_next_action);
+    m_editor->add_custom_context_menu_action(*m_find_previous_action);
+
     auto* statusbar = new GStatusBar(this);
     auto* statusbar = new GStatusBar(this);
 
 
     m_editor->on_cursor_change = [statusbar, this] {
     m_editor->on_cursor_change = [statusbar, this] {