diff libgui/src/m-editor/file-editor.h @ 20989:98e75f952a36

add find files action also to the editor menu * file-editor-interface.h: new declaration of insert_global_actions * file-editor.cc (insert_global_actions): now using a QList for global actions that are also added tot editor menu or tool bar * file-editor.h: new declaration of insert_global_actions using a list of pointers to the global actions together with an enum for the indexes, new action for finding files * main-window.cc (construct_menu_bar): use new function insert_global_actions with a list of functions to be added to the editor
author Torsten <ttl@justmail.de>
date Sat, 26 Dec 2015 20:46:08 +0100
parents 00835323fb44
children 73e92fca3c78
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.h	Sat Dec 26 07:58:08 2015 -0800
+++ b/libgui/src/m-editor/file-editor.h	Sat Dec 26 20:46:08 2015 +0100
@@ -85,8 +85,19 @@
   QMenu *get_mru_menu (void) { return _mru_file_menu; }
   QMenu *debug_menu (void);
   QToolBar *toolbar (void);
-  void insert_global_actions (QAction*, QAction*, QAction*, QAction*,
-                              QAction*, QAction*, QAction*);
+
+  void insert_global_actions (QList<QAction*>);
+  enum shared_actions_idx
+    {
+      NEW_SCRIPT_ACTION = 0,
+      NEW_FUNCTION_ACTION,
+      OPEN_ACTION,
+      FIND_FILES_ACTION,
+      UNDO_ACTION,
+      COPY_ACTION,
+      PASTE_ACTION,
+      SELECTALL_ACTION
+    };
 
   void handle_enter_debug_mode (void);
   void handle_exit_debug_mode (void);
@@ -350,6 +361,7 @@
   QAction *_transpose_line_action;
 
   QAction *_find_action;
+  QAction *_find_files_action;
   QAction *_goto_line_action;
   QAction *_completion_action;