Mercurial > hg > octave-avbm
comparison libgui/src/main-window.cc @ 16567:e4b94abfeb96
use generic dialog for cd or addpath question
* dialog.h, dialog.cc (cd_or_addpath_dialog): Delete class.
(QUIWidgetCreator::get_dialog_button): Return QString, not QString*.
Change all uses.
(QUIWidgetCreator::signal_debug_cd_or_addpath): Delete.
(QUIWidgetCreator::create_debug_cd_or_addpath_dialog): Delete.
* file-editor-tab.cc (file_editor_tab::file_in_path): Also use
same_file to compare curr_dir and info.path.
* main-window.h, main-window.cc
(main_window::handle_create_debug_cd_or_addpath_dialog): Delete.
(main_window::connect_uiwidget_links): Delete connection from
uiwidget_creator::create_debug_cd_or_addpath_dialog to
main_window::handle_create_debug_cd_or_addpath_dialog.
* octave-qt-link.cc (octave_qt_link::do_debug_cd_or_addpath_error):
Use generic dialog for cd or addpath question.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 25 Apr 2013 00:11:01 -0400 |
parents | 6ae555fc8c43 |
children | 662a712b8fd5 |
comparison
equal
deleted
inserted
replaced
16566:aa5299a1d770 | 16567:e4b94abfeb96 |
---|---|
590 const QStringList&)), | 590 const QStringList&)), |
591 this, | 591 this, |
592 SLOT (handle_create_inputlayout (const QStringList&, const QString&, | 592 SLOT (handle_create_inputlayout (const QStringList&, const QString&, |
593 const QFloatList&, const QFloatList&, | 593 const QFloatList&, const QFloatList&, |
594 const QStringList&))); | 594 const QStringList&))); |
595 | |
596 connect (&uiwidget_creator, | |
597 SIGNAL (create_debug_cd_or_addpath_dialog (const QString&, | |
598 const QString&, bool)), | |
599 this, | |
600 SLOT (handle_create_debug_cd_or_addpath_dialog (const QString&, | |
601 const QString&, | |
602 bool))); | |
603 } | 595 } |
604 | 596 |
605 // Create a message dialog with specified string, buttons and decorative | 597 // Create a message dialog with specified string, buttons and decorative |
606 // text. | 598 // text. |
607 | 599 |
652 InputDialog *input_dialog = new InputDialog (prompt, title, nr, nc, | 644 InputDialog *input_dialog = new InputDialog (prompt, title, nr, nc, |
653 defaults); | 645 defaults); |
654 | 646 |
655 input_dialog->setAttribute (Qt::WA_DeleteOnClose); | 647 input_dialog->setAttribute (Qt::WA_DeleteOnClose); |
656 input_dialog->show (); | 648 input_dialog->show (); |
657 } | |
658 | |
659 void | |
660 main_window::handle_create_debug_cd_or_addpath_dialog (const QString& file, | |
661 const QString& dir, | |
662 bool addpath_option) | |
663 | |
664 { | |
665 cd_or_addpath_dialog *dialog | |
666 = new cd_or_addpath_dialog (file, dir, addpath_option); | |
667 | |
668 dialog->setAttribute (Qt::WA_DeleteOnClose); | |
669 dialog->show (); | |
670 } | 649 } |
671 | 650 |
672 // Main subroutine of the constructor | 651 // Main subroutine of the constructor |
673 void | 652 void |
674 main_window::construct (void) | 653 main_window::construct (void) |