Mercurial > hg > octave-lyh
diff libgui/src/m-editor/find-dialog.cc @ 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 | eee1b78d031f |
children | 086b5e81245b |
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; }