comparison libgui/src/m-editor/file-editor.h @ 16546:c1e90c7cfd30

try harder to find editor tab widgets for files with multiple names * file-editor.h, file-editor.cc (file_editor::editor_tab_map_iterator, file_editor::editor_tab_map_const_iterator): New typedefs. (file_editor::find_tab_widget): New function. (file_editor::request_open_file, file_editor::check_conflict_save, file_editor::handle_delete_debugger_pointer_request): Use it.
author John W. Eaton <jwe@octave.org>
date Fri, 19 Apr 2013 09:36:22 -0400
parents 10edb6f1ae98
children 5fc1ce2947bd
comparison
equal deleted inserted replaced
16545:cfa98328acc9 16546:c1e90c7cfd30
46 class file_editor : public file_editor_interface 46 class file_editor : public file_editor_interface
47 { 47 {
48 Q_OBJECT 48 Q_OBJECT
49 49
50 public: 50 public:
51
52 typedef std::map<QString, QWidget *>::iterator editor_tab_map_iterator;
53 typedef std::map<QString, QWidget *>::const_iterator editor_tab_map_const_iterator;
51 54
52 file_editor (QWidget *p); 55 file_editor (QWidget *p);
53 ~file_editor (); 56 ~file_editor ();
54 57
55 void connect_visibility_changed (void); 58 void connect_visibility_changed (void);
159 void construct (); 162 void construct ();
160 void add_file_editor_tab(file_editor_tab *f, const QString &fn); 163 void add_file_editor_tab(file_editor_tab *f, const QString &fn);
161 void save_file_as (QWidget *fetabID = 0); 164 void save_file_as (QWidget *fetabID = 0);
162 void mru_menu_update (); 165 void mru_menu_update ();
163 166
167 QWidget *find_tab_widget (const QString& openFileName) const;
168
164 std::map<QString, QWidget *> editor_tab_map; 169 std::map<QString, QWidget *> editor_tab_map;
165 170
166 QString ced; 171 QString ced;
167 172
168 QMenuBar * _menu_bar; 173 QMenuBar * _menu_bar;