Mercurial > hg > octave-lojdl
changeset 16516:7af39cc90982
* find-dialog.cc(constructor): add close button to the find dialog
author | Torsten <ttl@justmail.de> |
---|---|
date | Sun, 14 Apr 2013 20:28:35 +0200 |
parents | 87b78e75a2b9 |
children | b348c5835ce4 |
files | libgui/src/m-editor/find-dialog.cc |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/find-dialog.cc +++ b/libgui/src/m-editor/find-dialog.cc @@ -67,7 +67,6 @@ _wrap_check_box = new QCheckBox (tr ("&Wrap while searching")); _wrap_check_box->setChecked(true); _find_next_button = new QPushButton (tr ("&Find Next")); - _find_next_button->setDefault (true); _replace_button = new QPushButton (tr ("&Replace")); _replace_all_button = new QPushButton (tr ("Replace &All")); @@ -80,6 +79,7 @@ _button_box->addButton (_replace_button, QDialogButtonBox::ActionRole); _button_box->addButton (_replace_all_button, QDialogButtonBox::ActionRole); _button_box->addButton (_more_button, QDialogButtonBox::ActionRole); + _button_box->addButton (QDialogButtonBox::Close); _extension = new QWidget (this); _whole_words_check_box = new QCheckBox (tr ("&Whole words")); @@ -100,6 +100,8 @@ this, SLOT (replace_all ())); connect (_backward_check_box, SIGNAL (stateChanged (int)), this, SLOT (handle_backward_search_changed (int))); + connect (_button_box, SIGNAL (rejected ()), + this, SLOT (close ())); QVBoxLayout *extension_layout = new QVBoxLayout (); extension_layout->setMargin (0); @@ -126,11 +128,11 @@ main_layout->setSizeConstraint (QLayout::SetFixedSize); main_layout->addLayout (left_layout, 0, 0); main_layout->addWidget (_button_box, 0, 1); - main_layout->addWidget (_extension, 1, 0, 1, 2); + main_layout->addWidget (_extension, 1, 0); setLayout (main_layout); _extension->hide (); - + _find_next_button->setDefault (true); _find_result_available = false; }