Mercurial > octave-nkf
comparison libgui/src/m-editor/file-editor.cc @ 15365:b4c32f245da7
GUI: Settings take immediate effect on the m-editor
* main-window.cc (main_window::construct): connect settings change to file-editor
* file-editor.h (file-editor::notice_settings): new notice settings method
* file-editor.cc (file-editor::notice_settings): new notice settings method
and pass-through to all file-editor-tabs
* file-editor-tab.h (file-editor::notice_settings): new notice settings method
* file-editor-tab.c (file_editor_tab::file_editor_tab): removed all settings to
file-editor::notice_settings
(file-editor::update_lexer): fix in case settings is 0 (should never happen)
(file-editor::notice_settings): all settings moved here
author | Thorsten Liebig <thorsten.liebig@gmx.de> |
---|---|
date | Tue, 11 Sep 2012 22:19:51 +0200 |
parents | 842ab161c10a |
children | 501a9cc2c68f |
comparison
equal
deleted
inserted
replaced
15364:75f28de3a387 | 15365:b4c32f245da7 |
---|---|
368 bool copy_available = f->copy_available (); | 368 bool copy_available = f->copy_available (); |
369 _copy_action->setEnabled (copy_available); | 369 _copy_action->setEnabled (copy_available); |
370 _cut_action->setEnabled (copy_available); | 370 _cut_action->setEnabled (copy_available); |
371 setFocusProxy (f); | 371 setFocusProxy (f); |
372 } | 372 } |
373 } | |
374 | |
375 void | |
376 file_editor::notice_settings () | |
377 { | |
378 for(int i = 0; i < _tab_widget->count (); i++) | |
379 { | |
380 file_editor_tab *fileEditorTab | |
381 = dynamic_cast <file_editor_tab*> (_tab_widget->widget (i)); | |
382 if (fileEditorTab) | |
383 fileEditorTab->notice_settings (); | |
384 } | |
373 } | 385 } |
374 | 386 |
375 void | 387 void |
376 file_editor::construct () | 388 file_editor::construct () |
377 { | 389 { |